GitHub Action commited on
Commit
e0a4000
·
1 Parent(s): b79a55c

Sync from GitHub: 522d05bb6b9da27f6286aca9d3bf2cd584fcf546

Browse files
.gitattributes CHANGED
@@ -7,3 +7,9 @@
7
  *.mp4 filter=lfs diff=lfs merge=lfs -text
8
  *.webm filter=lfs diff=lfs merge=lfs -text
9
  *.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
7
  *.mp4 filter=lfs diff=lfs merge=lfs -text
8
  *.webm filter=lfs diff=lfs merge=lfs -text
9
  *.pdf filter=lfs diff=lfs merge=lfs -text
10
+ hfstudio/static/assets/hf-logo.png filter=lfs diff=lfs merge=lfs -text
11
+ hfstudio/static/assets/hf-studio-logo.png filter=lfs diff=lfs merge=lfs -text
12
+ frontend/static/assets/hf-logo.png filter=lfs diff=lfs merge=lfs -text
13
+ frontend/static/assets/hf-studio-logo.png filter=lfs diff=lfs merge=lfs -text
14
+ hfstudio/static/samples/harvard.wav filter=lfs diff=lfs merge=lfs -text
15
+ frontend/static/samples/harvard.wav filter=lfs diff=lfs merge=lfs -text
frontend/src/routes/+page.svelte CHANGED
@@ -116,13 +116,21 @@
116
  audioTitle = text.length > 30 ? text.substring(0, 30) + '...' : text;
117
 
118
  try {
119
- // Check if this is a cloned voice and get the voice URL
120
  let voiceUrl = null;
 
121
  if (selectedVoice === 'Yours' && userVoices.length > 0) {
122
- const userVoice = userVoices[0]; // Use the first (latest) user voice
 
123
  if (userVoice && userVoice.voice_url) {
124
  voiceUrl = window.location.origin + userVoice.voice_url;
125
  }
 
 
 
 
 
 
126
  }
127
 
128
  const requestBody = {
@@ -133,8 +141,8 @@
133
  parameters: {
134
  exaggeration: exaggeration,
135
  temperature: temperature,
136
- ...(voiceUrl && { voice_url: voiceUrl }), // Include voice URL if it's a cloned voice
137
  },
 
138
  };
139
 
140
  const response = await fetch('/api/tts/generate', {
@@ -649,7 +657,7 @@ audio_bytes = client.text_to_speech(
649
 
650
  <!-- Pricing info -->
651
  <div class="mt-1.5 text-xs text-gray-500 text-right">
652
- $0.025 per 1000 chars • <a
653
  href="https://huggingface.co/settings/billing"
654
  target="_blank"
655
  class="text-amber-600 hover:text-amber-700 underline">Billing ⤴</a
@@ -944,13 +952,35 @@ audio_bytes = client.text_to_speech(
944
  </button>
945
  </div>
946
 
947
- <button
948
- on:click={copyAllCode}
949
- class="flex items-center bg-gray-100 hover:bg-gray-200 rounded-md px-2 py-1 transition-colors"
950
- >
951
- <Copy size={12} class="text-gray-600" />
952
- <span class="ml-1 text-xs font-medium text-gray-600">Copy all as Markdown</span>
953
- </button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
954
  </div>
955
 
956
  <!-- Code sections -->
 
116
  audioTitle = text.length > 30 ? text.substring(0, 30) + '...' : text;
117
 
118
  try {
119
+ // Get voice URL for ALL voices (both built-in and cloned)
120
  let voiceUrl = null;
121
+
122
  if (selectedVoice === 'Yours' && userVoices.length > 0) {
123
+ // Cloned voice
124
+ const userVoice = userVoices[0];
125
  if (userVoice && userVoice.voice_url) {
126
  voiceUrl = window.location.origin + userVoice.voice_url;
127
  }
128
+ } else {
129
+ // Built-in voice
130
+ const voice = voices.find((v) => v.name === selectedVoice);
131
+ if (voice && voice.preview_url) {
132
+ voiceUrl = voice.preview_url;
133
+ }
134
  }
135
 
136
  const requestBody = {
 
141
  parameters: {
142
  exaggeration: exaggeration,
143
  temperature: temperature,
 
144
  },
145
+ voice_url: voiceUrl, // Always send voice URL
146
  };
147
 
148
  const response = await fetch('/api/tts/generate', {
 
657
 
658
  <!-- Pricing info -->
659
  <div class="mt-1.5 text-xs text-gray-500 text-right">
660
+ ~$0.025 per generation • <a
661
  href="https://huggingface.co/settings/billing"
662
  target="_blank"
663
  class="text-amber-600 hover:text-amber-700 underline">Billing ⤴</a
 
952
  </button>
953
  </div>
954
 
955
+ <div class="flex items-center gap-2">
956
+ <button
957
+ on:click={copyAllCode}
958
+ class="flex items-center bg-gray-100 hover:bg-gray-200 rounded-md px-2 py-1 transition-colors"
959
+ >
960
+ <Copy size={12} class="text-gray-600" />
961
+ <span class="ml-1 text-xs font-medium text-gray-600">Copy all</span>
962
+ </button>
963
+
964
+ <button
965
+ on:click={() => window.open('https://huggingface.co/new-space', '_blank')}
966
+ class="flex items-center bg-amber-100 hover:bg-amber-200 rounded-md px-2 py-1 transition-colors"
967
+ >
968
+ <svg
969
+ width="12"
970
+ height="12"
971
+ viewBox="0 0 24 24"
972
+ fill="none"
973
+ stroke="currentColor"
974
+ stroke-width="2"
975
+ class="text-amber-700"
976
+ >
977
+ <path d="M12 2L2 7l10 5 10-5-10-5z" />
978
+ <path d="M2 17l10 5 10-5" />
979
+ <path d="M2 12l10 5 10-5" />
980
+ </svg>
981
+ <span class="ml-1 text-xs font-medium text-amber-700">Deploy as Space</span>
982
+ </button>
983
+ </div>
984
  </div>
985
 
986
  <!-- Code sections -->
hfstudio/server.py CHANGED
@@ -51,6 +51,7 @@ class TTSRequest(BaseModel):
51
  model_id: str = "coqui-tts"
52
  parameters: Dict[str, Any] = {}
53
  mode: str = "api"
 
54
 
55
 
56
  class TTSResponse(BaseModel):
@@ -199,9 +200,9 @@ def generate_tts_with_client(
199
  if param_name in api_params:
200
  extra_body[param_name] = param_value
201
 
202
- voice_urls = model_spec.get("api", {}).get("voice_urls", {})
203
- if request.voice_id.lower() in voice_urls:
204
- extra_body["audio_url"] = voice_urls[request.voice_id.lower()]
205
 
206
  # Time the API call
207
  start_time = time.time()
 
51
  model_id: str = "coqui-tts"
52
  parameters: Dict[str, Any] = {}
53
  mode: str = "api"
54
+ voice_url: Optional[str] = None
55
 
56
 
57
  class TTSResponse(BaseModel):
 
200
  if param_name in api_params:
201
  extra_body[param_name] = param_value
202
 
203
+ # Use provided voice URL (works for both built-in and cloned voices)
204
+ if request.voice_url:
205
+ extra_body["audio_url"] = request.voice_url
206
 
207
  # Time the API call
208
  start_time = time.time()
hfstudio/static/_app/immutable/assets/0.C15aDGlV.css ADDED
@@ -0,0 +1 @@
 
 
1
+ *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.-left-full{left:-100%}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.bottom-full{bottom:100%}.left-0{left:0}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-2{top:.5rem}.top-3{top:.75rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-80{height:20rem}.h-96{height:24rem}.h-full{height:100%}.h-screen{height:100vh}.max-h-\[80vh\]{max-height:80vh}.min-h-0{min-height:0px}.min-h-\[73px\]{min-height:73px}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-80{width:20rem}.w-96{width:24rem}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-300{--tw-border-opacity: 1;border-color:rgb(252 211 77 / var(--tw-border-opacity, 1))}.border-amber-400{--tw-border-opacity: 1;border-color:rgb(251 191 36 / var(--tw-border-opacity, 1))}.border-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-orange-100{--tw-border-opacity: 1;border-color:rgb(255 237 213 / var(--tw-border-opacity, 1))}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(254 215 170 / var(--tw-border-opacity, 1))}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity, 1))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity, 1))}.border-purple-200{--tw-border-opacity: 1;border-color:rgb(233 213 255 / var(--tw-border-opacity, 1))}.border-purple-400{--tw-border-opacity: 1;border-color:rgb(192 132 252 / var(--tw-border-opacity, 1))}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-200{--tw-bg-opacity: 1;background-color:rgb(253 230 138 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-amber-400{--tw-gradient-from: #fbbf24 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 191 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-amber-50{--tw-gradient-from: #fffbeb var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 251 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-amber-500{--tw-gradient-from: #f59e0b var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 158 11 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-50{--tw-gradient-from: #f9fafb var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 250 251 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400{--tw-gradient-from: #c084fc var(--tw-gradient-from-position);--tw-gradient-to: rgb(192 132 252 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #a855f7 var(--tw-gradient-from-position);--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-transparent{--tw-gradient-from: transparent var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-green-500{--tw-gradient-to: rgb(34 197 94 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #22c55e var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-orange-400\/40{--tw-gradient-to: rgb(251 146 60 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(251 146 60 / .4) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-500{--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #ec4899 var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-blue-500{--tw-gradient-to: #3b82f6 var(--tw-gradient-to-position)}.to-orange-50{--tw-gradient-to: #fff7ed var(--tw-gradient-to-position)}.to-orange-500{--tw-gradient-to: #f97316 var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #ec4899 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-16{padding-bottom:4rem}.pb-24{padding-bottom:6rem}.pb-6{padding-bottom:1.5rem}.pr-4{padding-right:1rem}.pt-10{padding-top:2.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-green-900{--tw-text-opacity: 1;color:rgb(20 83 45 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-purple-900{--tw-text-opacity: 1;color:rgb(88 28 135 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.duration-75{transition-duration:75ms}.ease-linear{transition-timing-function:linear}code[class*=language-],pre[class*=language-]{color:#393a34;font-family:Consolas,Bitstream Vera Sans Mono,Courier New,Courier,monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;font-size:.875rem;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}pre[class*=language-]{padding:1rem;margin:0;overflow:auto;background:#f8f9fa}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:green;font-style:italic}.token.punctuation{color:#393a34}.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol,.token.deleted{color:#e91e63}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#067d17}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string{color:#795da3}.token.atrule,.token.attr-value,.token.keyword{color:#00f}.token.function,.token.class-name{color:#795da3}.token.regex,.token.important,.token.variable{color:#e90}.language-bash .token.function{color:#067d17}.slider-hf::-webkit-slider-thumb{height:1rem;width:1rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:9999px;background:linear-gradient(45deg,#ffd21e,#ff9d00);box-shadow:0 1px 3px #0000001a}.slider-hf::-moz-range-thumb{height:1rem;width:1rem;cursor:pointer;border-radius:9999px;border-width:0px;background:linear-gradient(45deg,#ffd21e,#ff9d00);box-shadow:0 1px 3px #0000001a}.pause-filled{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px}.pause-filled:before,.pause-filled:after{content:"";width:2px;height:10px;background-color:currentColor;border-radius:1px}.pause-filled:before{margin-right:2px}.pause-filled:after{margin-left:2px}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.hover\:bg-amber-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-200:hover{--tw-bg-opacity: 1;background-color:rgb(253 230 138 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.hover\:bg-orange-600:hover{--tw-bg-opacity: 1;background-color:rgb(234 88 12 / var(--tw-bg-opacity, 1))}.hover\:bg-purple-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\:from-amber-500:hover{--tw-gradient-from: #f59e0b var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 158 11 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-amber-600:hover{--tw-gradient-from: #d97706 var(--tw-gradient-from-position);--tw-gradient-to: rgb(217 119 6 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-orange-600:hover{--tw-gradient-to: #ea580c var(--tw-gradient-to-position)}.hover\:text-amber-700:hover{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.hover\:text-green-900:hover{--tw-text-opacity: 1;color:rgb(20 83 45 / var(--tw-text-opacity, 1))}.hover\:text-red-800:hover{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.focus\:border-transparent:focus{border-color:transparent}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-amber-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(251 191 36 / var(--tw-ring-opacity, 1))}.focus\:ring-orange-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 115 22 / var(--tw-ring-opacity, 1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width: 1024px){.lg\:grid-cols-\[1fr_1\.4fr_1fr\]{grid-template-columns:1fr 1.4fr 1fr}}@keyframes svelte-1s3xy1i-sweep{0%{transform:translate(-100%)}to{transform:translate(300%)}}
hfstudio/static/_app/immutable/chunks/BI5cgKvc.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{s as e}from"./CxVfujWq.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
hfstudio/static/_app/immutable/chunks/CxVfujWq.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ var kt=Object.defineProperty;var St=(e,t,n)=>t in e?kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>St(e,typeof t!="symbol"?t+"":t,n);import{S as Et,U as At,$ as Rt,a0 as Tt,a1 as It,a2 as Ut,a3 as Lt,a4 as $t,G as ve,a5 as xt,V as be,n as ge,s as Ct}from"./TRxHAhOH.js";class Ze extends Et{constructor(n){if(!n||!n.target&&!n.$$inline)throw new Error("'target' is a required option");super();R(this,"$$prop_def");R(this,"$$events_def");R(this,"$$slot_def")}$destroy(){super.$destroy(),this.$destroy=()=>{console.warn("Component was already destroyed")}}$capture_state(){}$inject_state(){}}class Pt extends Ze{}const Ot=Object.freeze(Object.defineProperty({__proto__:null,SvelteComponent:Ze,SvelteComponentTyped:Pt,afterUpdate:At,beforeUpdate:Rt,createEventDispatcher:Tt,getAllContexts:It,getContext:Ut,hasContext:Lt,onDestroy:$t,onMount:ve,setContext:xt,tick:be},Symbol.toStringTag,{value:"Module"}));class ie{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Re{constructor(t,n){this.status=t,this.location=n}}class Te extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function Nt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function jt(e){return e.split("%25").map(decodeURI).join("%25")}function Dt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function Bt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return l=>(n(l),i[o](l));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function Ft(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;const Vt=new TextDecoder;function Mt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const qt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:(t==null?void 0:t.method)||"GET")!=="GET"&&Y.delete(Ie(e)),qt(e,t));const Y=new Map;function Gt(e,t){const n=Ie(e,t),r=document.querySelector(n);if(r!=null&&r.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&Y.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=Mt(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Yt(e,t,n){if(Y.size>0){const r=Ie(e,n),a=Y.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);Y.delete(r)}}return window.fetch(t,n)}function Ie(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t!=null&&t.headers||t!=null&&t.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${Ft(...a)}"]`}return r}const Ht=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Kt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Wt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return _e(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return _e(String.fromCharCode(...c.slice(2).split("-").map(u=>parseInt(u,16))));const d=Ht.exec(c),[,h,y,f,p]=d;return t.push({name:f,matcher:p,optional:!!h,rest:!!y,chained:y?l===1&&i[0]==="":!1}),y?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return _e(c)}).join("")}).join("")}/?$`),params:t}}function zt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Wt(e){return e.slice(1).split("/").filter(zt)}function Jt(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<t.length;o+=1){const c=t[o];let l=a[o-i];if(c.chained&&c.rest&&i&&(l=a.slice(o-i,o+1).filter(d=>d).join("/"),i=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const d=t[o+1],h=a[o+1];d&&!d.rest&&d.optional&&h&&c.chained&&(i=0),!d&&!h&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Xt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,l,d]])=>{const{pattern:h,params:y}=Kt(o),f={id:o,exec:p=>{const u=h.exec(p);if(u)return Jt(u,y,r)},errors:[1,...d||[]].map(p=>e[p]),layouts:[0,...l||[]].map(i),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function Qe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Fe(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const D=[];function Ue(e,t=ge){let n;const r=new Set;function a(o){if(Ct(e,o)&&(e=o,n)){const c=!D.length;for(const l of r)l[1](),D.push(l,e);if(c){for(let l=0;l<D.length;l+=2)D[l][0](D[l+1]);D.length=0}}}function s(o){a(o(e))}function i(o,c=ge){const l=[o,c];return r.add(l),r.size===1&&(n=t(a,s)||ge),o(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:a,update:s,subscribe:i}}var Je;const $=((Je=globalThis.__sveltekit_81rgwk)==null?void 0:Je.base)??"";var Xe;const Zt=((Xe=globalThis.__sveltekit_81rgwk)==null?void 0:Xe.assets)??$??"",Qt="1761293217408",et="sveltekit:snapshot",tt="sveltekit:scroll",nt="sveltekit:states",en="sveltekit:pageurl",F="sveltekit:history",z="sveltekit:navigation",O={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ce=location.origin;function at(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function le(){return{x:pageXOffset,y:pageYOffset}}function B(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...O,"":O.hover};function rt(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function ot(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=rt(e)}}function ke(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||fe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(r==null?void 0:r.origin)===ce&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function Q(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=B(o,"preload-code")),a===null&&(a=B(o,"preload-data")),t===null&&(t=B(o,"keepfocus")),n===null&&(n=B(o,"noscroll")),s===null&&(s=B(o,"reload")),i===null&&(i=B(o,"replacestate")),o=rt(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ve[r??"off"],preload_data:Ve[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function Me(e){const t=Ue(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const st={v:()=>{}};function tn(){const{set:e,subscribe:t}=Ue(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Zt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Qt;return i&&(e(!0),st.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function fe(e,t,n){return e.origin!==ce||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function qn(e){}function nn(e){const t=rn(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,t.charCodeAt(a));return n}const an="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function rn(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let a=0;a<e.length;a++)n<<=6,n|=an.indexOf(e[a]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const on=-1,sn=-2,cn=-3,ln=-4,fn=-5,un=-6;function dn(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===on)return;if(s===cn)return NaN;if(s===ln)return 1/0;if(s===fn)return-1/0;if(s===un)return-0;if(i||typeof s!="number")throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],l=t==null?void 0:t[c];if(l)return r[s]=l(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let f=1;f<o.length;f+=1)d.add(a(o[f]));break;case"Map":const h=new Map;r[s]=h;for(let f=1;f<o.length;f+=2)h.set(a(o[f]),a(o[f+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const y=Object.create(null);r[s]=y;for(let f=1;f<o.length;f+=2)y[o[f]]=a(o[f+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const f=globalThis[c],p=new f(a(o[1]));r[s]=o[2]!==void 0?p.subarray(o[2],o[3]):p;break}case"ArrayBuffer":{const f=o[1],p=nn(f);r[s]=p;break}case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{const f=c.slice(9);r[s]=Temporal[f].from(o[1]);break}case"URL":{const f=new URL(o[1]);r[s]=f;break}case"URLSearchParams":{const f=new URLSearchParams(o[1]);r[s]=f;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let l=0;l<o.length;l+=1){const d=o[l];d!==sn&&(c[l]=a(d))}}else{const c={};r[s]=c;for(const l in o){if(l==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const d=o[l];c[l]=a(d)}}return r[s]}return a(0)}const it=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...it];const hn=new Set([...it]);[...hn];function pn(e){return e.filter(t=>t!=null)}const gn="x-sveltekit-invalidated",mn="x-sveltekit-trailing-slash";function ee(e){return e instanceof ie||e instanceof Te?e.status:500}function _n(e){return e instanceof Te?e.text:"Internal Error"}let T,W,we;const wn=ve.toString().includes("$$")||/function \w+\(\) \{\}/.test(ve.toString());wn?(T={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},we={current:!1}):(T=new class{constructor(){R(this,"data",$state.raw({}));R(this,"form",$state.raw(null));R(this,"error",$state.raw(null));R(this,"params",$state.raw({}));R(this,"route",$state.raw({id:null}));R(this,"state",$state.raw({}));R(this,"status",$state.raw(-1));R(this,"url",$state.raw(new URL("https://example.com")))}},W=new class{constructor(){R(this,"current",$state.raw(null))}},we=new class{constructor(){R(this,"current",$state.raw(!1))}},st.v=()=>we.current=!0);function yn(e){Object.assign(T,e)}const vn="/__data.json",bn=".html__data.json";function kn(e){return e.endsWith(".html")?e.replace(/\.html$/,bn):e.replace(/\/$/,"")+vn}const qe={spanContext(){return Sn},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Sn={traceId:"",spanId:"",traceFlags:0},{tick:En}=Ot,An=new Set(["icon","shortcut icon","apple-touch-icon"]),j=Qe(tt)??{},J=Qe(et)??{},C={url:Me({}),page:Me({}),navigating:Ue(null),updated:tn()};function Le(e){j[e]=le()}function Rn(e,t){let n=e+1;for(;j[n];)delete j[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function q(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function ct(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration($||"/");e&&await e.update()}}function Ge(){}let $e,Se,te,x,Ee,S;const ne=[],ae=[];let U=null;const Z=new Map,lt=new Set,Tn=new Set,H=new Set;let b={branch:[],error:null,url:null},xe=!1,re=!1,Ye=!0,X=!1,G=!1,ft=!1,Ce=!1,ut,A,L,N;const K=new Set,He=new Map;async function Kn(e,t,n){var s,i,o,c,l;(s=globalThis.__sveltekit_81rgwk)!=null&&s.data&&globalThis.__sveltekit_81rgwk.data,document.URL!==location.href&&(location.href=location.href),S=e,await((o=(i=e.hooks).init)==null?void 0:o.call(i)),$e=Xt(e),x=document.documentElement,Ee=t,Se=e.nodes[0],te=e.nodes[1],Se(),te(),A=(c=history.state)==null?void 0:c[F],L=(l=history.state)==null?void 0:l[z],A||(A=L=Date.now(),history.replaceState({...history.state,[F]:A,[z]:L},""));const r=j[A];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await Dn(Ee,n)):(await V({type:"enter",url:at(S.hash?Fn(new URL(location.href)):location.href),replace_state:!0}),a()),jn()}function In(){ne.length=0,Ce=!1}function dt(e){ae.some(t=>t==null?void 0:t.snapshot)&&(J[e]=ae.map(t=>{var n;return(n=t==null?void 0:t.snapshot)==null?void 0:n.capture()}))}function ht(e){var t;(t=J[e])==null||t.forEach((n,r)=>{var a,s;(s=(a=ae[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function Ke(){Le(A),Fe(tt,j),dt(L),Fe(et,J)}async function Un(e,t,n,r){let a;t.invalidateAll&&(U=null),await V({type:"goto",url:at(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Ce=!0,a=[...He.keys()]),t.invalidate&&t.invalidate.forEach(Nn)}}),t.invalidateAll&&be().then(be).then(()=>{He.forEach(({resource:s},i)=>{var o;a!=null&&a.includes(i)&&((o=s.refresh)==null||o.call(s))})})}async function Ln(e){if(e.id!==(U==null?void 0:U.id)){const t={};K.add(t),U={id:e.id,token:t,promise:mt({...e,preload:t}).then(n=>(K.delete(t),n.type==="loaded"&&n.state.error&&(U=null),n))}}return U.promise}async function ye(e){var n;const t=(n=await de(e,!1))==null?void 0:n.route;t&&await Promise.all([...t.layouts,t.leaf].map(r=>r==null?void 0:r[1]()))}function pt(e,t,n){var a;b=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(T,e.props.page),ut=new S.root({target:t,props:{...e.props,stores:C,components:ae},hydrate:n,sync:!1}),ht(L),n){const s={from:null,to:{params:b.params,route:{id:((a=b.route)==null?void 0:a.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};H.forEach(i=>i(s))}re=!0}function oe({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if($&&(e.pathname===$||e.pathname===$+"/"))o="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(o=f.slash);e.pathname=Nt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:pn(n).map(f=>f.node.component),page:je(T)}};i!==void 0&&(c.props.form=i);let l={},d=!T,h=0;for(let f=0;f<Math.max(n.length,b.branch.length);f+=1){const p=n[f],u=b.branch[f];(p==null?void 0:p.data)!==(u==null?void 0:u.data)&&(d=!0),p&&(l={...l,...p.data},d&&(c.props[`data_${h}`]=l),h+=1)}return(!b.url||e.href!==b.url.href||b.error!==a||i!==void 0&&i!==T.form||d)&&(c.props.page={error:a,params:t,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(e),form:i??null,data:d?l:T.data}),c}async function Pe({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){var d,h,y;let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if((d=l.universal)!=null&&d.load){let f=function(...u){for(const g of u){const{href:_}=new URL(g,n);c.dependencies.add(_)}};const p={tracing:{enabled:!1,root:qe,current:qe},route:new Proxy(a,{get:(u,g)=>(o&&(c.route=!0),u[g])}),params:new Proxy(r,{get:(u,g)=>(o&&c.params.add(g),u[g])}),data:(s==null?void 0:s.data)??null,url:Bt(n,()=>{o&&(c.url=!0)},u=>{o&&c.search_params.add(u)},S.hash),async fetch(u,g){u instanceof Request&&(g={body:u.method==="GET"||u.method==="HEAD"?void 0:await u.blob(),cache:u.cache,credentials:u.credentials,headers:[...u.headers].length>0?u==null?void 0:u.headers:void 0,integrity:u.integrity,keepalive:u.keepalive,method:u.method,mode:u.mode,redirect:u.redirect,referrer:u.referrer,referrerPolicy:u.referrerPolicy,signal:u.signal,...g});const{resolved:_,promise:I}=gt(u,g,n);return o&&f(_.href),I},setHeaders:()=>{},depends:f,parent(){return o&&(c.parent=!0),t()},untrack(u){o=!1;try{return u()}finally{o=!0}}};i=await l.universal.load.call(null,p)??null}return{node:l,loader:e,server:s,universal:(h=l.universal)!=null&&h.load?{type:"data",data:i,uses:c}:null,data:i??(s==null?void 0:s.data)??null,slash:((y=l.universal)==null?void 0:y.trailingSlash)??(s==null?void 0:s.slash)}}function gt(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=re?Yt(r,a.href,t):Gt(r,t);return{resolved:a,promise:s}}function ze(e,t,n,r,a,s){if(Ce)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==b.params[i])return!0;for(const i of a.dependencies)if(ne.some(o=>o(new URL(i))))return!0;return!1}function Oe(e,t){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?t??null:null}function $n(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function We({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:je(T),constructors:[]}}}async function mt({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if((U==null?void 0:U.id)===e)return K.delete(U.token),U.promise;const{errors:i,layouts:o,leaf:c}=a,l=[...o,c];i.forEach(w=>w==null?void 0:w().catch(()=>{})),l.forEach(w=>w==null?void 0:w[1]().catch(()=>{}));let d=null;const h=b.url?e!==se(b.url):!1,y=b.route?a.id!==b.route.id:!1,f=$n(b.url,n);let p=!1;const u=l.map((w,m)=>{var P;const v=b.branch[m],k=!!(w!=null&&w[0])&&((v==null?void 0:v.loader)!==w[1]||ze(p,y,h,f,(P=v.server)==null?void 0:P.uses,r));return k&&(p=!0),k});if(u.some(Boolean)){try{d=await yt(n,u)}catch(w){const m=await M(w,{url:n,params:r,route:{id:e}});return K.has(s)?We({error:m,url:n,params:r,route:a}):ue({status:ee(w),error:m,url:n,route:a})}if(d.type==="redirect")return d}const g=d==null?void 0:d.nodes;let _=!1;const I=l.map(async(w,m)=>{var he;if(!w)return;const v=b.branch[m],k=g==null?void 0:g[m];if((!k||k.type==="skip")&&w[1]===(v==null?void 0:v.loader)&&!ze(_,y,h,f,(he=v.universal)==null?void 0:he.uses,r))return v;if(_=!0,(k==null?void 0:k.type)==="error")throw k;return Pe({loader:w[1],url:n,params:r,route:a,parent:async()=>{var Be;const De={};for(let pe=0;pe<m;pe+=1)Object.assign(De,(Be=await I[pe])==null?void 0:Be.data);return De},server_data_node:Oe(k===void 0&&w[0]?{type:"skip"}:k??null,w[0]?v==null?void 0:v.server:void 0)})});for(const w of I)w.catch(()=>{});const E=[];for(let w=0;w<l.length;w+=1)if(l[w])try{E.push(await I[w])}catch(m){if(m instanceof Re)return{type:"redirect",location:m.location};if(K.has(s))return We({error:await M(m,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let v=ee(m),k;if(g!=null&&g.includes(m))v=m.status??v,k=m.error;else if(m instanceof ie)k=m.body;else{if(await C.updated.check())return await ct(),await q(n);k=await M(m,{params:r,url:n,route:{id:a.id}})}const P=await xn(w,E,i);return P?oe({url:n,params:r,branch:E.slice(0,P.idx).concat(P.node),status:v,error:k,route:a}):await wt(n,{id:a.id},k,v)}else E.push(void 0);return oe({url:n,params:r,branch:E,status:200,error:null,route:a,form:t?void 0:null})}async function xn(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function ue({status:e,error:t,url:n,route:r}){const a={};let s=null;if(S.server_loads[0]===0)try{const o=await yt(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==ce||n.pathname!==location.pathname||xe)&&await q(n)}try{const o=await Pe({loader:Se,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Oe(s)}),c={node:await te(),loader:te,universal:null,server:null,data:null};return oe({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Re)return Un(new URL(o.location,location.href),{},0);throw o}}async function Cn(e){const t=e.href;if(Z.has(t))return Z.get(t);let n;try{const r=(async()=>{let a=await S.hooks.reroute({url:new URL(e),fetch:async(s,i)=>gt(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);S.hash?s.hash=a:s.pathname=a,a=s}return a})();Z.set(t,r),n=await r}catch{Z.delete(t);return}return n}async function de(e,t){if(e&&!fe(e,$,S.hash)){const n=await Cn(e);if(!n)return;const r=Pn(n);for(const a of $e){const s=a.exec(r);if(s)return{id:se(e),invalidating:t,route:a,params:Dt(s),url:e}}}}function Pn(e){return jt(S.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice($.length))||"/"}function se(e){return(S.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function _t({url:e,type:t,intent:n,delta:r,event:a}){let s=!1;const i=Ne(b,n,e,t);r!==void 0&&(i.navigation.delta=r),a!==void 0&&(i.navigation.event=a);const o={...i.navigation,cancel:()=>{s=!0,i.reject(new Error("navigation cancelled"))}};return X||lt.forEach(c=>c(o)),s?null:i}async function V({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:l=Ge,block:d=Ge,event:h}){const y=N;N=c;const f=await de(t,!1),p=e==="enter"?Ne(b,f,t,e):_t({url:t,type:e,delta:n==null?void 0:n.delta,intent:f,event:h});if(!p){d(),N===c&&(N=y);return}const u=A,g=L;l(),X=!0,re&&p.navigation.type!=="enter"&&C.navigating.set(W.current=p.navigation);let _=f&&await mt(f);if(!_){if(fe(t,$,S.hash))return await q(t,s);_=await wt(t,{id:null},await M(new Te(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=(f==null?void 0:f.url)||t,N!==c)return p.reject(new Error("navigation aborted")),!1;if(_.type==="redirect"){if(o<20){await V({type:e,url:new URL(_.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i,redirect_count:o+1,nav_token:c}),p.fulfil(void 0);return}_=await ue({status:500,error:await M(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else _.props.page.status>=400&&await C.updated.check()&&(await ct(),await q(t,s));if(In(),Le(u),dt(g),_.props.page.url.pathname!==t.pathname&&(t.pathname=_.props.page.url.pathname),i=n?n.state:i,!n){const m=s?0:1,v={[F]:A+=m,[z]:L+=m,[nt]:i};(s?history.replaceState:history.pushState).call(history,v,"",t),s||Rn(A,L)}if(U=null,_.props.page.state=i,re){const m=(await Promise.all(Array.from(Tn,v=>v(p.navigation)))).filter(v=>typeof v=="function");if(m.length>0){let v=function(){m.forEach(k=>{H.delete(k)})};m.push(v),m.forEach(k=>{H.add(k)})}b=_.state,_.props.page&&(_.props.page.url=t),ut.$set(_.props),yn(_.props.page),ft=!0}else pt(_,Ee,!1);const{activeElement:I}=document;await En();let E=n?n.scroll:a?le():null;if(Ye){const m=t.hash&&document.getElementById(bt(t));if(E)scrollTo(E.x,E.y);else if(m){m.scrollIntoView();const{top:v,left:k}=m.getBoundingClientRect();E={x:pageXOffset+k,y:pageYOffset+v}}else scrollTo(0,0)}const w=document.activeElement!==I&&document.activeElement!==document.body;!r&&!w&&Bn(t,E),Ye=!0,_.props.page&&Object.assign(T,_.props.page),X=!1,e==="popstate"&&ht(L),p.fulfil(void 0),H.forEach(m=>m(p.navigation)),C.navigating.set(W.current=null)}async function wt(e,t,n,r,a){return e.origin===ce&&e.pathname===location.pathname&&!xe?await ue({status:r,error:n,url:e,route:t}):await q(e,a)}function On(){let e,t,n;x.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(e),e=setTimeout(()=>{s(c,O.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],O.tap)}x.addEventListener("mousedown",r),x.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(ye(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const l=ot(o,x),d=l===t&&c>=n;if(!l||d)return;const{url:h,external:y,download:f}=ke(l,$,S.hash);if(y||f)return;const p=Q(l),u=h&&se(b.url)===se(h);if(!(p.reload||u))if(c<=p.preload_data){t=l,n=O.tap;const g=await de(h,!1);if(!g)return;Ln(g)}else c<=p.preload_code&&(t=l,n=c,ye(h))}function i(){a.disconnect();for(const o of x.querySelectorAll("a")){const{url:c,external:l,download:d}=ke(o,$,S.hash);if(l||d)continue;const h=Q(o);h.reload||(h.preload_code===O.viewport&&a.observe(o),h.preload_code===O.eager&&ye(c))}}H.add(i),i()}function M(e,t){if(e instanceof ie)return e.body;const n=ee(e),r=_n(e);return S.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Nn(e){if(typeof e=="function")ne.push(e);else{const{href:t}=new URL(e,location.href);ne.push(n=>n.href===t)}}function jn(){var t;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(Ke(),!X){const a=Ne(b,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};lt.forEach(i=>i(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ke()}),(t=navigator.connection)!=null&&t.saveData||On(),x.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=ot(n.composedPath()[0],x);if(!r)return;const{url:a,external:s,target:i,download:o}=ke(r,$,S.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=Q(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[d,h]=(S.hash?a.hash.replace(/^#/,""):a.href).split("#"),y=d===me(location);if(s||c.reload&&(!y||!h)){_t({url:a,type:"link",event:n})?X=!0:n.preventDefault();return}if(h!==void 0&&y){const[,f]=b.url.href.split("#");if(f===h){if(n.preventDefault(),h===""||h==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const p=r.ownerDocument.getElementById(decodeURIComponent(h));p&&(p.scrollIntoView(),p.focus())}return}if(G=!0,Le(A),e(a),!c.replace_state)return;G=!1}n.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await V({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href,event:n})}),x.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const o=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(fe(o,$,!1))return;const c=n.target,l=Q(c);if(l.reload)return;n.preventDefault(),n.stopPropagation();const d=new FormData(c,a);o.search=new URLSearchParams(d).toString(),V({type:"form",url:o,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??o.href===location.href,event:n})}),addEventListener("popstate",async n=>{var r;if(!Ae){if((r=n.state)!=null&&r[F]){const a=n.state[F];if(N={},a===A)return;const s=j[a],i=n.state[nt]??{},o=new URL(n.state[en]??location.href),c=n.state[z],l=b.url?me(location)===me(b.url):!1;if(c===L&&(ft||l)){i!==T.state&&(T.state=i),e(o),j[A]=le(),s&&scrollTo(s.x,s.y),A=a;return}const h=a-A;await V({type:"popstate",url:o,popped:{state:i,scroll:s,delta:h},accept:()=>{A=a,L=c},block:()=>{history.go(-h)},nav_token:N,event:n})}else if(!G){const a=new URL(location.href);e(a),S.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[F]:++A,[z]:L},"",location.href))});for(const n of document.querySelectorAll("link"))An.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&C.navigating.set(W.current=null)});function e(n){b.url=T.url=n,C.page.set(je(T)),C.page.notify()}}async function Dn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){xe=!0;const l=new URL(location.href);let d;({params:a={},route:s={id:null}}=await de(l,!1)||{}),d=$e.find(({id:f})=>f===s.id);let h,y=!0;try{const f=r.map(async(u,g)=>{const _=o[g];return _!=null&&_.uses&&(_.uses=vt(_.uses)),Pe({loader:S.nodes[u],url:l,params:a,route:s,parent:async()=>{const I={};for(let E=0;E<g;E+=1)Object.assign(I,(await f[E]).data);return I},server_data_node:Oe(_)})}),p=await Promise.all(f);if(d){const u=d.layouts;for(let g=0;g<u.length;g++)u[g]||p.splice(g,0,void 0)}h=oe({url:l,params:a,branch:p,status:t,error:n,form:c,route:d??null})}catch(f){if(f instanceof Re){await q(new URL(f.location,location.href));return}h=await ue({status:ee(f),error:await M(f,{url:l,params:a,route:s}),url:l,route:s}),e.textContent="",y=!1}h.props.page&&(h.props.page.state={}),pt(h,e,y)}async function yt(e,t){var s;const n=new URL(e);n.pathname=kn(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(mn,"1"),n.searchParams.append(gn,t.map(i=>i?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let i;throw(s=a.headers.get("content-type"))!=null&&s.includes("application/json")?i=await a.json():a.status===404?i="Not Found":a.status===500&&(i="Internal Error"),new ie(a.status,i)}return new Promise(async i=>{var h;const o=new Map,c=a.body.getReader();function l(y){return dn(y,{...S.decoders,Promise:f=>new Promise((p,u)=>{o.set(f,{fulfil:p,reject:u})})})}let d="";for(;;){const{done:y,value:f}=await c.read();if(y&&!d)break;for(d+=!f&&d?`
2
+ `:Vt.decode(f,{stream:!0});;){const p=d.indexOf(`
3
+ `);if(p===-1)break;const u=JSON.parse(d.slice(0,p));if(d=d.slice(p+1),u.type==="redirect")return i(u);if(u.type==="data")(h=u.nodes)==null||h.forEach(g=>{(g==null?void 0:g.type)==="data"&&(g.uses=vt(g.uses),g.data=l(g.data))}),i(u);else if(u.type==="chunk"){const{id:g,data:_,error:I}=u,E=o.get(g);o.delete(g),I?E.reject(l(I)):E.fulfil(l(_))}}}})}function vt(e){return{dependencies:new Set((e==null?void 0:e.dependencies)??[]),params:new Set((e==null?void 0:e.params)??[]),parent:!!(e!=null&&e.parent),route:!!(e!=null&&e.route),url:!!(e!=null&&e.url),search_params:new Set((e==null?void 0:e.search_params)??[])}}let Ae=!1;function Bn(e,t=null){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=bt(e);if(r&&document.getElementById(r)){const{x:s,y:i}=t??le();setTimeout(()=>{const o=history.state;Ae=!0,location.replace(`#${r}`),S.hash&&location.replace(e.hash),history.replaceState(o,"",e.hash),scrollTo(s,i),Ae=!1})}else{const s=document.body,i=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),i!==null?s.setAttribute("tabindex",i):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let i=0;i<a.rangeCount;i+=1)s.push(a.getRangeAt(i));setTimeout(()=>{if(a.rangeCount===s.length){for(let i=0;i<a.rangeCount;i+=1){const o=s[i],c=a.getRangeAt(i);if(o.commonAncestorContainer!==c.commonAncestorContainer||o.startContainer!==c.startContainer||o.endContainer!==c.endContainer||o.startOffset!==c.startOffset||o.endOffset!==c.endOffset)return}a.removeAllRanges()}})}}}function Ne(e,t,n,r){var c,l;let a,s;const i=new Promise((d,h)=>{a=d,s=h});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:((c=e.route)==null?void 0:c.id)??null},url:e.url},to:n&&{params:(t==null?void 0:t.params)??null,route:{id:((l=t==null?void 0:t.route)==null?void 0:l.id)??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function je(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Fn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function bt(e){let t;if(S.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Kn as a,qn as l,C as s};
hfstudio/static/_app/immutable/entry/app.DuRM45UA.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DkXKHVEs.js","../chunks/TRxHAhOH.js","../chunks/IHki7fMi.js","../chunks/BI5cgKvc.js","../chunks/CxVfujWq.js","../chunks/TiXs4BPB.js","../chunks/nn-QVLrM.js","../chunks/BhRpzVYR.js","../assets/0.C15aDGlV.css","../nodes/1.mYZpzzTi.js","../nodes/2.BKGoQ-mY.js","../chunks/DUd0gdPo.js","../chunks/BNlacN_j.js","../chunks/gtFtmmyB.js","../assets/2.CdRym-eY.css","../nodes/3.CEcncCN6.js","../assets/3.BNkL3CE9.css","../nodes/4.Cv9lY0r5.js"])))=>i.map(i=>d[i]);
2
+ import{S as C,i as U,s as q,d,w as h,x as g,N as O,K as S,b as v,h as B,M as w,k as W,U as z,G,V as K,W as y,v as P,A as R,y as L,z as D,p as T,Q as p,e as Q,f as F,j as H,T as V,a as J,g as X,t as Y}from"../chunks/TRxHAhOH.js";import"../chunks/IHki7fMi.js";const Z="modulepreload",M=function(o,e){return new URL(o,e).href},I={},A=function(e,n,i){let r=Promise.resolve();if(n&&n.length>0){const t=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));r=Promise.allSettled(n.map(f=>{if(f=M(f,i),f in I)return;I[f]=!0;const l=f.endsWith(".css"),_=l?'[rel="stylesheet"]':"";if(!!i)for(let k=t.length-1;k>=0;k--){const E=t[k];if(E.href===f&&(!l||E.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${_}`))return;const m=document.createElement("link");if(m.rel=l?"stylesheet":Z,l||(m.as="script"),m.crossOrigin="",m.href=f,a&&m.setAttribute("nonce",a),document.head.appendChild(m),l)return new Promise((k,E)=>{m.addEventListener("load",k),m.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${f}`)))})}))}function u(t){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=t,window.dispatchEvent(s),!s.defaultPrevented)throw t}return r.then(t=>{for(const s of t||[])s.status==="rejected"&&u(s.reason);return e().catch(u)})},ae={};function $(o){let e,n,i;var r=o[2][0];function u(t,s){return{props:{data:t[4],form:t[3],params:t[1].params}}}return r&&(e=y(r,u(o)),o[12](e)),{c(){e&&R(e.$$.fragment),n=w()},l(t){e&&D(e.$$.fragment,t),n=w()},m(t,s){e&&L(e,t,s),v(t,n,s),i=!0},p(t,s){if(s&4&&r!==(r=t[2][0])){if(e){O();const a=e;h(a.$$.fragment,1,0,()=>{P(a,1)}),S()}r?(e=y(r,u(t)),t[12](e),R(e.$$.fragment),g(e.$$.fragment,1),L(e,n.parentNode,n)):e=null}else if(r){const a={};s&16&&(a.data=t[4]),s&8&&(a.form=t[3]),s&2&&(a.params=t[1].params),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){t&&d(n),o[12](null),e&&P(e,t)}}}function x(o){let e,n,i;var r=o[2][0];function u(t,s){return{props:{data:t[4],params:t[1].params,$$slots:{default:[ee]},$$scope:{ctx:t}}}}return r&&(e=y(r,u(o)),o[11](e)),{c(){e&&R(e.$$.fragment),n=w()},l(t){e&&D(e.$$.fragment,t),n=w()},m(t,s){e&&L(e,t,s),v(t,n,s),i=!0},p(t,s){if(s&4&&r!==(r=t[2][0])){if(e){O();const a=e;h(a.$$.fragment,1,0,()=>{P(a,1)}),S()}r?(e=y(r,u(t)),t[11](e),R(e.$$.fragment),g(e.$$.fragment,1),L(e,n.parentNode,n)):e=null}else if(r){const a={};s&16&&(a.data=t[4]),s&2&&(a.params=t[1].params),s&8239&&(a.$$scope={dirty:s,ctx:t}),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){t&&d(n),o[11](null),e&&P(e,t)}}}function ee(o){let e,n,i;var r=o[2][1];function u(t,s){return{props:{data:t[5],form:t[3],params:t[1].params}}}return r&&(e=y(r,u(o)),o[10](e)),{c(){e&&R(e.$$.fragment),n=w()},l(t){e&&D(e.$$.fragment,t),n=w()},m(t,s){e&&L(e,t,s),v(t,n,s),i=!0},p(t,s){if(s&4&&r!==(r=t[2][1])){if(e){O();const a=e;h(a.$$.fragment,1,0,()=>{P(a,1)}),S()}r?(e=y(r,u(t)),t[10](e),R(e.$$.fragment),g(e.$$.fragment,1),L(e,n.parentNode,n)):e=null}else if(r){const a={};s&32&&(a.data=t[5]),s&8&&(a.form=t[3]),s&2&&(a.params=t[1].params),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){t&&d(n),o[10](null),e&&P(e,t)}}}function N(o){let e,n=o[7]&&j(o);return{c(){e=H("div"),n&&n.c(),this.h()},l(i){e=Q(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var r=F(e);n&&n.l(r),r.forEach(d),this.h()},h(){T(e,"id","svelte-announcer"),T(e,"aria-live","assertive"),T(e,"aria-atomic","true"),p(e,"position","absolute"),p(e,"left","0"),p(e,"top","0"),p(e,"clip","rect(0 0 0 0)"),p(e,"clip-path","inset(50%)"),p(e,"overflow","hidden"),p(e,"white-space","nowrap"),p(e,"width","1px"),p(e,"height","1px")},m(i,r){v(i,e,r),n&&n.m(e,null)},p(i,r){i[7]?n?n.p(i,r):(n=j(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&d(e),n&&n.d()}}}function j(o){let e;return{c(){e=Y(o[8])},l(n){e=X(n,o[8])},m(n,i){v(n,e,i)},p(n,i){i&256&&J(e,n[8])},d(n){n&&d(e)}}}function te(o){let e,n,i,r,u;const t=[x,$],s=[];function a(l,_){return l[2][1]?0:1}e=a(o),n=s[e]=t[e](o);let f=o[6]&&N(o);return{c(){n.c(),i=W(),f&&f.c(),r=w()},l(l){n.l(l),i=B(l),f&&f.l(l),r=w()},m(l,_){s[e].m(l,_),v(l,i,_),f&&f.m(l,_),v(l,r,_),u=!0},p(l,[_]){let b=e;e=a(l),e===b?s[e].p(l,_):(O(),h(s[b],1,1,()=>{s[b]=null}),S(),n=s[e],n?n.p(l,_):(n=s[e]=t[e](l),n.c()),g(n,1),n.m(i.parentNode,i)),l[6]?f?f.p(l,_):(f=N(l),f.c(),f.m(r.parentNode,r)):f&&(f.d(1),f=null)},i(l){u||(g(n),u=!0)},o(l){h(n),u=!1},d(l){l&&(d(i),d(r)),s[e].d(l),f&&f.d(l)}}}function ne(o,e,n){let{stores:i}=e,{page:r}=e,{constructors:u}=e,{components:t=[]}=e,{form:s}=e,{data_0:a=null}=e,{data_1:f=null}=e;z(i.page.notify);let l=!1,_=!1,b=null;G(()=>{const c=i.page.subscribe(()=>{l&&(n(7,_=!0),K().then(()=>{n(8,b=document.title||"untitled page")}))});return n(6,l=!0),c});function m(c){V[c?"unshift":"push"](()=>{t[1]=c,n(0,t)})}function k(c){V[c?"unshift":"push"](()=>{t[0]=c,n(0,t)})}function E(c){V[c?"unshift":"push"](()=>{t[0]=c,n(0,t)})}return o.$$set=c=>{"stores"in c&&n(9,i=c.stores),"page"in c&&n(1,r=c.page),"constructors"in c&&n(2,u=c.constructors),"components"in c&&n(0,t=c.components),"form"in c&&n(3,s=c.form),"data_0"in c&&n(4,a=c.data_0),"data_1"in c&&n(5,f=c.data_1)},o.$$.update=()=>{o.$$.dirty&514&&i.page.set(r)},[t,r,u,s,a,f,l,_,b,i,m,k,E]}class le extends C{constructor(e){super(),U(this,e,ne,te,q,{stores:9,page:1,constructors:2,components:0,form:3,data_0:4,data_1:5})}}const fe=[()=>A(()=>import("../nodes/0.DkXKHVEs.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url),()=>A(()=>import("../nodes/1.mYZpzzTi.js"),__vite__mapDeps([9,1,2,3,4]),import.meta.url),()=>A(()=>import("../nodes/2.BKGoQ-mY.js"),__vite__mapDeps([10,1,11,7,2,12,13,14]),import.meta.url),()=>A(()=>import("../nodes/3.CEcncCN6.js"),__vite__mapDeps([15,1,11,7,2,5,13,16]),import.meta.url),()=>A(()=>import("../nodes/4.Cv9lY0r5.js"),__vite__mapDeps([17,1,7,2,12,6,13]),import.meta.url)],ce=[],ue={"/":[2],"/code-recorder":[3],"/voice-cloning":[4]},se={handleError:({error:o})=>{console.error(o)},reroute:()=>{},transport:{}},ie=Object.fromEntries(Object.entries(se.transport).map(([o,e])=>[o,e.decode])),_e=!1,me=(o,e)=>ie[o](e);export{me as decode,ie as decoders,ue as dictionary,_e as hash,se as hooks,ae as matchers,fe as nodes,le as root,ce as server_loads};
hfstudio/static/_app/immutable/entry/start.CKoTx8mP.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{l as o,a as r}from"../chunks/CxVfujWq.js";export{o as load_css,r as start};
hfstudio/static/_app/immutable/nodes/0.DkXKHVEs.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ import{S as at,i as ot,s as rt,C as it,d as E,v as Qe,w as Be,x as Pe,p as s,D as ut,E as ct,F as dt,b as _e,c as e,y as Xe,e as a,f as R,r as p,h as u,z as Ze,j as o,k as c,A as $e,l as ft,G as pt,H as ht,I as et,m as xe,a as mt,g as gt,t as xt}from"../chunks/TRxHAhOH.js";import"../chunks/IHki7fMi.js";import{p as _t}from"../chunks/BI5cgKvc.js";import{N as bt}from"../chunks/TiXs4BPB.js";import{M as vt}from"../chunks/nn-QVLrM.js";function tt(f){let r,n,d,H="Sign In with HuggingFace Token",z,t,g,A="<strong>Manual Token Entry:</strong> Please enter your HuggingFace token.",q,_,C=`1. Go to <a href="https://huggingface.co/settings/tokens" target="_blank" class="underline text-blue-600">HuggingFace Settings</a><br/>
2
+ 2. Create a new token with &quot;Inference API&quot; permissions<br/>
3
+ 3. Copy and paste it below`,M,Y,b,B,K="HuggingFace Token",G,x,P,D,I,O,l="Cancel",w,h,S="Sign In",V,L,T=f[5]&&nt(),y=f[4]&&st(f);return{c(){r=o("div"),n=o("div"),d=o("h2"),d.textContent=H,z=c(),t=o("div"),g=o("p"),g.innerHTML=A,q=c(),_=o("p"),_.innerHTML=C,M=c(),T&&T.c(),Y=c(),b=o("div"),B=o("label"),B.textContent=K,G=c(),x=o("input"),P=c(),y&&y.c(),D=c(),I=o("div"),O=o("button"),O.textContent=l,w=c(),h=o("button"),h.textContent=S,this.h()},l(v){r=a(v,"DIV",{class:!0});var J=R(r);n=a(J,"DIV",{class:!0});var F=R(n);d=a(F,"H2",{class:!0,"data-svelte-h":!0}),p(d)!=="svelte-1t0ehet"&&(d.textContent=H),z=u(F),t=a(F,"DIV",{class:!0});var U=R(t);g=a(U,"P",{class:!0,"data-svelte-h":!0}),p(g)!=="svelte-344vn4"&&(g.innerHTML=A),q=u(U),_=a(U,"P",{class:!0,"data-svelte-h":!0}),p(_)!=="svelte-orsfwv"&&(_.innerHTML=C),M=u(U),T&&T.l(U),U.forEach(E),Y=u(F),b=a(F,"DIV",{class:!0});var Q=R(b);B=a(Q,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),p(B)!=="svelte-vtbmxo"&&(B.textContent=K),G=u(Q),x=a(Q,"INPUT",{id:!0,type:!0,placeholder:!0,class:!0}),P=u(Q),y&&y.l(Q),Q.forEach(E),D=u(F),I=a(F,"DIV",{class:!0});var X=R(I);O=a(X,"BUTTON",{class:!0,"data-svelte-h":!0}),p(O)!=="svelte-csk0rj"&&(O.textContent=l),w=u(X),h=a(X,"BUTTON",{class:!0,"data-svelte-h":!0}),p(h)!=="svelte-1nxas5u"&&(h.textContent=S),X.forEach(E),F.forEach(E),J.forEach(E),this.h()},h(){s(d,"class","text-xl font-semibold mb-4"),s(g,"class","text-blue-800 mb-2"),s(_,"class","text-blue-700"),s(t,"class","mb-4 p-3 bg-blue-50 rounded-md text-sm"),s(B,"for","token"),s(B,"class","block text-sm font-medium text-gray-700 mb-2"),s(x,"id","token"),s(x,"type","password"),s(x,"placeholder","hf_..."),s(x,"class","w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-transparent"),s(b,"class","mb-4"),s(O,"class","px-4 py-2 text-gray-600 hover:text-gray-800 transition-colors"),s(h,"class","px-4 py-2 bg-orange-500 text-white rounded-md hover:bg-orange-600 transition-colors"),s(I,"class","flex justify-end gap-3"),s(n,"class","bg-white rounded-lg p-6 max-w-md w-full mx-4 shadow-xl"),s(r,"class","fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50")},m(v,J){_e(v,r,J),e(r,n),e(n,d),e(n,z),e(n,t),e(t,g),e(t,q),e(t,_),e(t,M),T&&T.m(t,null),e(n,Y),e(n,b),e(b,B),e(b,G),e(b,x),et(x,f[3]),e(b,P),y&&y.m(b,null),e(n,D),e(n,I),e(I,O),e(I,w),e(I,h),V||(L=[xe(x,"input",f[13]),xe(x,"keydown",f[14]),xe(O,"click",f[9]),xe(h,"click",f[10])],V=!0)},p(v,J){v[5]?T||(T=nt(),T.c(),T.m(t,null)):T&&(T.d(1),T=null),J&8&&x.value!==v[3]&&et(x,v[3]),v[4]?y?y.p(v,J):(y=st(v),y.c(),y.m(b,null)):y&&(y.d(1),y=null)},d(v){v&&E(r),T&&T.d(),y&&y.d(),V=!1,ht(L)}}}function nt(f){let r,n=`<strong>Tip:</strong> You can also run <code>huggingface-cli login</code> in your terminal
4
+ to automatically use your local token.`;return{c(){r=o("p"),r.innerHTML=n,this.h()},l(d){r=a(d,"P",{class:!0,"data-svelte-h":!0}),p(r)!=="svelte-xrut8w"&&(r.innerHTML=n),this.h()},h(){s(r,"class","text-blue-600 mt-2")},m(d,H){_e(d,r,H)},d(d){d&&E(r)}}}function st(f){let r,n;return{c(){r=o("p"),n=xt(f[4]),this.h()},l(d){r=a(d,"P",{class:!0});var H=R(r);n=gt(H,f[4]),H.forEach(E),this.h()},h(){s(r,"class","text-red-600 text-sm mt-1")},m(d,H){_e(d,r,H),e(r,n)},p(d,H){H&16&&mt(n,d[4])},d(d){d&&E(r)}}}function wt(f){let r,n,d,H='<div class="flex items-center gap-3"><img src="/assets/hf-studio-logo.png" alt="HF Logo" class="w-8 h-8"/> <h1 class="text-xl font-semibold">HFStudio<sup class="text-xs text-gray-500 ml-1">BETA</sup></h1></div>',z,t,g,A="Audio",q,_,C,M="🎙️",Y,b,B="Text to Speech",K,G,x,P,D,I,O="Voice Cloning",l,w,h,S="<span>🎧</span> <span>Speech to Text</span>",V,L,T="<span>🎼</span> <span>Sound Effects</span>",y,v,J="<span>🎸</span> <span>Music Generation</span>",F,U,Q="<span>🔊</span> <span>Audio Enhancement</span>",X,fe,Oe="Image",be,Z,Ve="<span>🎨</span> <span>Text to Image</span>",ve,$,je="<span>🖼️</span> <span>Image to Image</span>",we,ee,Fe="<span>✂️</span> <span>Remove Background</span>",Te,te,Re="<span>🔍</span> <span>Upscale Image</span>",ye,ne,ze="<span>🎭</span> <span>Face Swap</span>",Ce,se,qe="<span>📝</span> <span>Image to Text</span>",Le,pe,Ge="Video",ke,le,De="<span>🎬</span> <span>Text to Video</span>",Ie,ae,Je="<span>🎞️</span> <span>Image to Video</span>",He,oe,We="<span>✨</span> <span>Video Enhancement</span>",Me,re,Ye="<span>🎤</span> <span>Lip Sync</span>",Ne,ie,Ke="<span>🗣️</span> <span>Video Dubbing</span>",Ee,ue,ce,Se,Ue,de;P=new vt({props:{size:16}}),ce=new bt({props:{isLoggedIn:f[0],username:f[1],handleAuthAction:f[8],flashButton:f[6],pageTitle:lt(f[7].url.pathname)}});const Ae=f[12].default,j=it(Ae,f,f[11],null);let N=f[2]&&tt(f);return{c(){r=o("div"),n=o("aside"),d=o("div"),d.innerHTML=H,z=c(),t=o("nav"),g=o("div"),g.textContent=A,q=c(),_=o("a"),C=o("span"),C.textContent=M,Y=c(),b=o("span"),b.textContent=B,G=c(),x=o("a"),$e(P.$$.fragment),D=c(),I=o("span"),I.textContent=O,w=c(),h=o("button"),h.innerHTML=S,V=c(),L=o("button"),L.innerHTML=T,y=c(),v=o("button"),v.innerHTML=J,F=c(),U=o("button"),U.innerHTML=Q,X=c(),fe=o("div"),fe.textContent=Oe,be=c(),Z=o("button"),Z.innerHTML=Ve,ve=c(),$=o("button"),$.innerHTML=je,we=c(),ee=o("button"),ee.innerHTML=Fe,Te=c(),te=o("button"),te.innerHTML=Re,ye=c(),ne=o("button"),ne.innerHTML=ze,Ce=c(),se=o("button"),se.innerHTML=qe,Le=c(),pe=o("div"),pe.textContent=Ge,ke=c(),le=o("button"),le.innerHTML=De,Ie=c(),ae=o("button"),ae.innerHTML=Je,He=c(),oe=o("button"),oe.innerHTML=We,Me=c(),re=o("button"),re.innerHTML=Ye,Ne=c(),ie=o("button"),ie.innerHTML=Ke,Ee=c(),ue=o("main"),$e(ce.$$.fragment),Se=c(),j&&j.c(),Ue=c(),N&&N.c(),this.h()},l(m){r=a(m,"DIV",{class:!0});var k=R(r);n=a(k,"ASIDE",{class:!0});var W=R(n);d=a(W,"DIV",{class:!0,"data-svelte-h":!0}),p(d)!=="svelte-xzbt87"&&(d.innerHTML=H),z=u(W),t=a(W,"NAV",{class:!0});var i=R(t);g=a(i,"DIV",{class:!0,"data-svelte-h":!0}),p(g)!=="svelte-52jqai"&&(g.textContent=A),q=u(i),_=a(i,"A",{href:!0,class:!0});var he=R(_);C=a(he,"SPAN",{"data-svelte-h":!0}),p(C)!=="svelte-1yx42xi"&&(C.textContent=M),Y=u(he),b=a(he,"SPAN",{"data-svelte-h":!0}),p(b)!=="svelte-2j89jk"&&(b.textContent=B),he.forEach(E),G=u(i),x=a(i,"A",{href:!0,class:!0});var me=R(x);Ze(P.$$.fragment,me),D=u(me),I=a(me,"SPAN",{"data-svelte-h":!0}),p(I)!=="svelte-10pmll2"&&(I.textContent=O),me.forEach(E),w=u(i),h=a(i,"BUTTON",{class:!0,"data-svelte-h":!0}),p(h)!=="svelte-wf0x5d"&&(h.innerHTML=S),V=u(i),L=a(i,"BUTTON",{class:!0,"data-svelte-h":!0}),p(L)!=="svelte-x7bha3"&&(L.innerHTML=T),y=u(i),v=a(i,"BUTTON",{class:!0,"data-svelte-h":!0}),p(v)!=="svelte-1tyblmt"&&(v.innerHTML=J),F=u(i),U=a(i,"BUTTON",{class:!0,"data-svelte-h":!0}),p(U)!=="svelte-1emrjb3"&&(U.innerHTML=Q),X=u(i),fe=a(i,"DIV",{class:!0,"data-svelte-h":!0}),p(fe)!=="svelte-1pmjg3x"&&(fe.textContent=Oe),be=u(i),Z=a(i,"BUTTON",{class:!0,"data-svelte-h":!0}),p(Z)!=="svelte-11wbuiv"&&(Z.innerHTML=Ve),ve=u(i),$=a(i,"BUTTON",{class:!0,"data-svelte-h":!0}),p($)!=="svelte-ol2yvl"&&($.innerHTML=je),we=u(i),ee=a(i,"BUTTON",{class:!0,"data-svelte-h":!0}),p(ee)!=="svelte-ttigif"&&(ee.innerHTML=Fe),Te=u(i),te=a(i,"BUTTON",{class:!0,"data-svelte-h":!0}),p(te)!=="svelte-ixgtu4"&&(te.innerHTML=Re),ye=u(i),ne=a(i,"BUTTON",{class:!0,"data-svelte-h":!0}),p(ne)!=="svelte-r2ax5z"&&(ne.innerHTML=ze),Ce=u(i),se=a(i,"BUTTON",{class:!0,"data-svelte-h":!0}),p(se)!=="svelte-n9rt3x"&&(se.innerHTML=qe),Le=u(i),pe=a(i,"DIV",{class:!0,"data-svelte-h":!0}),p(pe)!=="svelte-1gfxetb"&&(pe.textContent=Ge),ke=u(i),le=a(i,"BUTTON",{class:!0,"data-svelte-h":!0}),p(le)!=="svelte-gox1rd"&&(le.innerHTML=De),Ie=u(i),ae=a(i,"BUTTON",{class:!0,"data-svelte-h":!0}),p(ae)!=="svelte-13pimzy"&&(ae.innerHTML=Je),He=u(i),oe=a(i,"BUTTON",{class:!0,"data-svelte-h":!0}),p(oe)!=="svelte-c86wph"&&(oe.innerHTML=We),Me=u(i),re=a(i,"BUTTON",{class:!0,"data-svelte-h":!0}),p(re)!=="svelte-wkify0"&&(re.innerHTML=Ye),Ne=u(i),ie=a(i,"BUTTON",{class:!0,"data-svelte-h":!0}),p(ie)!=="svelte-10ou061"&&(ie.innerHTML=Ke),i.forEach(E),W.forEach(E),Ee=u(k),ue=a(k,"MAIN",{class:!0});var ge=R(ue);Ze(ce.$$.fragment,ge),Se=u(ge),j&&j.l(ge),ge.forEach(E),Ue=u(k),N&&N.l(k),k.forEach(E),this.h()},h(){s(d,"class","px-4 py-4 border-b border-gray-200 min-h-[73px] flex items-center"),s(g,"class","mt-2 mb-1 px-2 text-xs font-medium text-gray-500 uppercase"),s(_,"href","/"),s(_,"class",K="w-full flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-gray-100 transition-colors text-left "+(f[7].url.pathname==="/"?"bg-gray-100":"")),s(x,"href","/voice-cloning"),s(x,"class",l="w-full flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-gray-100 transition-colors text-left "+(f[7].url.pathname==="/voice-cloning"?"bg-gray-100":"")),s(h,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),h.disabled=!0,s(L,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),L.disabled=!0,s(v,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),v.disabled=!0,s(U,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),U.disabled=!0,s(fe,"class","mt-4 mb-1 px-2 text-xs font-medium text-gray-500 uppercase"),s(Z,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),Z.disabled=!0,s($,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),$.disabled=!0,s(ee,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),ee.disabled=!0,s(te,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),te.disabled=!0,s(ne,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),ne.disabled=!0,s(se,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),se.disabled=!0,s(pe,"class","mt-4 mb-1 px-2 text-xs font-medium text-gray-500 uppercase"),s(le,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),le.disabled=!0,s(ae,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),ae.disabled=!0,s(oe,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),oe.disabled=!0,s(re,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),re.disabled=!0,s(ie,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),ie.disabled=!0,s(t,"class","p-2 text-sm flex-1"),s(n,"class","w-56 border-r border-gray-200 bg-white flex-shrink-0 flex flex-col h-full relative "),s(ue,"class","flex-1 overflow-auto"),s(r,"class","flex h-screen bg-white")},m(m,k){_e(m,r,k),e(r,n),e(n,d),e(n,z),e(n,t),e(t,g),e(t,q),e(t,_),e(_,C),e(_,Y),e(_,b),e(t,G),e(t,x),Xe(P,x,null),e(x,D),e(x,I),e(t,w),e(t,h),e(t,V),e(t,L),e(t,y),e(t,v),e(t,F),e(t,U),e(t,X),e(t,fe),e(t,be),e(t,Z),e(t,ve),e(t,$),e(t,we),e(t,ee),e(t,Te),e(t,te),e(t,ye),e(t,ne),e(t,Ce),e(t,se),e(t,Le),e(t,pe),e(t,ke),e(t,le),e(t,Ie),e(t,ae),e(t,He),e(t,oe),e(t,Me),e(t,re),e(t,Ne),e(t,ie),e(r,Ee),e(r,ue),Xe(ce,ue,null),e(ue,Se),j&&j.m(ue,null),e(r,Ue),N&&N.m(r,null),de=!0},p(m,[k]){(!de||k&128&&K!==(K="w-full flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-gray-100 transition-colors text-left "+(m[7].url.pathname==="/"?"bg-gray-100":"")))&&s(_,"class",K),(!de||k&128&&l!==(l="w-full flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-gray-100 transition-colors text-left "+(m[7].url.pathname==="/voice-cloning"?"bg-gray-100":"")))&&s(x,"class",l);const W={};k&1&&(W.isLoggedIn=m[0]),k&2&&(W.username=m[1]),k&64&&(W.flashButton=m[6]),k&128&&(W.pageTitle=lt(m[7].url.pathname)),ce.$set(W),j&&j.p&&(!de||k&2048)&&ut(j,Ae,m,m[11],de?dt(Ae,m[11],k,null):ct(m[11]),null),m[2]?N?N.p(m,k):(N=tt(m),N.c(),N.m(r,null)):N&&(N.d(1),N=null)},i(m){de||(Pe(P.$$.fragment,m),Pe(ce.$$.fragment,m),Pe(j,m),de=!0)},o(m){Be(P.$$.fragment,m),Be(ce.$$.fragment,m),Be(j,m),de=!1},d(m){m&&E(r),Qe(P),Qe(ce),j&&j.d(m),N&&N.d()}}}function lt(f){switch(f){case"/":return"Text to Speech Playground";case"/voice-cloning":return"Voice Cloning Playground";default:return"HFStudio"}}function Tt(f,r,n){let d;ft(f,_t,l=>n(7,d=l));let{$$slots:H={},$$scope:z}=r,t={authenticated:!1},g=!1,A="";function q(l){if(t=l,n(0,g=(l==null?void 0:l.authenticated)||!1),l!=null&&l.authenticated&&(l!=null&&l.user_info)){const w=l.user_info,h=w.name||w.fullname||w.login||w.username||"User";n(1,A=h.split(" ")[0])}}typeof window<"u"&&(window.__INITIAL_USER__?(console.log("Found initial user data:",window.__INITIAL_USER__),q(window.__INITIAL_USER__)):(console.log("No initial user data found, listening for event"),window.addEventListener("initial-user-loaded",l=>{console.log("Received initial user event:",l.detail),q(l.detail)})));let _=!1,C="",M="",Y=!1,b=!1,B=!1;pt(()=>(window.addEventListener("show-login-prompt",()=>{g||(n(6,b=!0),setTimeout(()=>{n(6,b=!1)},1600))}),K().then(()=>{!window.__INITIAL_USER__&&!(t!=null&&t.authenticated)&&(console.log("No server data available, checking auth status via API"),G())}),document.addEventListener("visibilitychange",()=>{document.hidden||G()}),()=>{}));async function K(){try{B=(await(await fetch("/api/status")).json()).is_spaces||!1}catch(l){console.error("Error checking Spaces status:",l),B=!1}}async function G(){if(!(t!=null&&t.authenticated&&g))try{const l=await fetch("/api/auth/user",{credentials:"include"});if(l.ok){const w=await l.json();if(w.authenticated){n(0,g=!0);const h=w.user_info,S=h.name||h.fullname||h.login||h.username||"User";n(1,A=S.split(" ")[0])}else n(0,g=!1),n(1,A="")}else n(0,g=!1),n(1,A="")}catch{n(0,g=!1),n(1,A="")}}async function x(){if(g){try{await fetch("/api/auth/logout",{method:"POST",credentials:"include"})}catch(l){console.error("Logout error:",l)}sessionStorage.removeItem("oauth_state"),n(0,g=!1),n(1,A=""),window.location.reload()}else try{const w=await(await fetch("/api/auth/oauth-config")).json(),h=w.scopes||"inference-api";let S=window.location.origin+"/auth/callback";window.location.hostname==="localhost"&&window.location.port==="11111"&&(S="http://localhost:7860/auth/callback");const V=window.location.pathname,L=`https://huggingface.co/oauth/authorize?client_id=${w.client_id}&redirect_uri=${encodeURIComponent(S)}&scope=${encodeURIComponent(h)}&response_type=code&state=${encodeURIComponent(V)}`;window.location.href=L}catch{n(2,_=!0),n(3,C=""),n(4,M="")}}function P(){n(2,_=!1),n(3,C=""),n(4,M="")}async function D(){if(!C.trim()){n(4,M="Please enter a token");return}if(!C.startsWith("hf_")){n(4,M='Token should start with "hf_"');return}try{const l=await fetch("https://huggingface.co/api/whoami-v2",{headers:{Authorization:`Bearer ${C.trim()}`}});if(l.ok){const w=await l.json(),h=C.trim();try{const S=await fetch("/api/auth/manual-token",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({token:h})});if(S.ok){const V=await S.json();n(0,g=!0);const L=V.user_info,T=L.name||L.fullname||L.login||L.username||"User";n(1,A=T.split(" ")[0]),P()}else{const V=await S.json();n(4,M=V.detail||"Token validation failed")}}catch{n(4,M="Failed to validate token. Please try again.")}}else n(4,M=`Invalid token (${l.status}). Please check your token and try again.`)}catch{n(4,M="Error validating token. Please try again.")}}function I(){C=this.value,n(3,C)}const O=l=>l.key==="Enter"&&D();return f.$$set=l=>{"$$scope"in l&&n(11,z=l.$$scope)},[g,A,_,C,M,Y,b,d,x,P,D,z,H,I,O]}class Ht extends at{constructor(r){super(),ot(this,r,Tt,wt,rt,{})}}export{Ht as component};
hfstudio/static/_app/immutable/nodes/1.mYZpzzTi.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as x,i as S,s as j,n as u,d as c,a as h,b as _,c as d,e as v,f as g,g as b,h as k,j as E,t as $,k as q,l as y}from"../chunks/TRxHAhOH.js";import"../chunks/IHki7fMi.js";import{p as C}from"../chunks/BI5cgKvc.js";function H(p){var f;let a,s=p[0].status+"",r,n,o,i=((f=p[0].error)==null?void 0:f.message)+"",m;return{c(){a=E("h1"),r=$(s),n=q(),o=E("p"),m=$(i)},l(e){a=v(e,"H1",{});var t=g(a);r=b(t,s),t.forEach(c),n=k(e),o=v(e,"P",{});var l=g(o);m=b(l,i),l.forEach(c)},m(e,t){_(e,a,t),d(a,r),_(e,n,t),_(e,o,t),d(o,m)},p(e,[t]){var l;t&1&&s!==(s=e[0].status+"")&&h(r,s),t&1&&i!==(i=((l=e[0].error)==null?void 0:l.message)+"")&&h(m,i)},i:u,o:u,d(e){e&&(c(a),c(n),c(o))}}}function P(p,a,s){let r;return y(p,C,n=>s(0,r=n)),[r]}class B extends x{constructor(a){super(),S(this,a,P,H,j,{})}}export{B as component};
hfstudio/static/_app/immutable/nodes/2.BKGoQ-mY.js ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import{S as ds,i as fs,s as Hl,u as nr,v as ie,w as I,x as T,y as ce,z as ue,A as de,B as Yr,C as hs,D as ms,E as gs,F as bs,d as c,J as ps,H as hl,a as tt,I as cl,K as it,p as o,b as j,c as n,m as V,L as _s,h as b,e as u,f as p,g as B,r as K,M as Lt,k as _,j as d,t as R,G as vs,N as ct,n as Vt,O as ar,P as ir,Q as or,R as qr,T as ys,q as Kr}from"../chunks/TRxHAhOH.js";import{C as sr,g as ws,P as Dt,D as ks}from"../chunks/DUd0gdPo.js";import{I as xs,g as Es,a as Ts,e as Nl}from"../chunks/BhRpzVYR.js";import"../chunks/IHki7fMi.js";import{S as $s,L as Is,A as Cs,X as Ds}from"../chunks/BNlacN_j.js";import{P as dl,a as jl}from"../chunks/gtFtmmyB.js";function Vs(s){let e;const t=s[2].default,l=hs(t,s,s[3],null);return{c(){l&&l.c()},l(r){l&&l.l(r)},m(r,a){l&&l.m(r,a),e=!0},p(r,a){l&&l.p&&(!e||a&8)&&ms(l,t,r,r[3],e?bs(t,r[3],a,null):gs(r[3]),null)},i(r){e||(T(l,r),e=!0)},o(r){I(l,r),e=!1},d(r){l&&l.d(r)}}}function Ls(s){let e,t;const l=[{name:"chevron-down"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[Vs]},$$scope:{ctx:s}};for(let a=0;a<l.length;a+=1)r=nr(r,l[a]);return e=new xs({props:r}),{c(){de(e.$$.fragment)},l(a){ue(e.$$.fragment,a)},m(a,i){ce(e,a,i),t=!0},p(a,[i]){const h=i&3?Es(l,[l[0],i&2&&Ts(a[1]),i&1&&{iconNode:a[0]}]):{};i&8&&(h.$$scope={dirty:i,ctx:a}),e.$set(h)},i(a){t||(T(e.$$.fragment,a),t=!0)},o(a){I(e.$$.fragment,a),t=!1},d(a){ie(e,a)}}}function Ps(s,e,t){let{$$slots:l={},$$scope:r}=e;const a=[["path",{d:"m6 9 6 6 6-6"}]];return s.$$set=i=>{t(1,e=nr(nr({},e),Yr(i))),"$$scope"in i&&t(3,r=i.$$scope)},e=Yr(e),[a,e,l,r]}class Ms extends ds{constructor(e){super(),fs(this,e,Ps,Ls,Hl,{})}}const{document:Jr}=ws;function Xr(s,e,t){const l=s.slice();return l[75]=e[t],l}function Qr(s,e,t){const l=s.slice();return l[75]=e[t],l}function Hs(s){let e,t,l;return e=new dl({props:{size:16}}),{c(){de(e.$$.fragment),t=R(`
2
+ Generate speech`)},l(r){ue(e.$$.fragment,r),t=B(r,`
3
+ Generate speech`)},m(r,a){ce(e,r,a),j(r,t,a),l=!0},i(r){l||(T(e.$$.fragment,r),l=!0)},o(r){I(e.$$.fragment,r),l=!1},d(r){r&&c(t),ie(e,r)}}}function Ns(s){let e,t,l;return e=new Is({props:{size:16,class:"animate-spin"}}),{c(){de(e.$$.fragment),t=R(`
4
+ Generating...`)},l(r){ue(e.$$.fragment,r),t=B(r,`
5
+ Generating...`)},m(r,a){ce(e,r,a),j(r,t,a),l=!0},i(r){l||(T(e.$$.fragment,r),l=!0)},o(r){I(e.$$.fragment,r),l=!1},d(r){r&&c(t),ie(e,r)}}}function Wr(s){let e=s[75].name+"",t,l,r=s[75].badge&&js(s);return{c(){t=R(e),r&&r.c(),l=Lt()},l(a){t=B(a,e),r&&r.l(a),l=Lt()},m(a,i){j(a,t,i),r&&r.m(a,i),j(a,l,i)},p(a,i){a[75].badge&&r.p(a,i)},d(a){a&&(c(t),c(l)),r&&r.d(a)}}}function js(s){let e,t,l,r=s[75].badge+"",a,i;return{c(){e=R(" "),t=d("span"),l=R("("),a=R(r),i=R(")"),this.h()},l(h){e=B(h," "),t=u(h,"SPAN",{class:!0});var m=p(t);l=B(m,"("),a=B(m,r),i=B(m,")"),m.forEach(c),this.h()},h(){o(t,"class","text-sm text-gray-500")},m(h,m){j(h,e,m),j(h,t,m),n(t,l),n(t,a),n(t,i)},p:Vt,d(h){h&&(c(e),c(t))}}}function Zr(s){let e,t=s[75].name===s[2]&&Wr(s);return{c(){t&&t.c(),e=Lt()},l(l){t&&t.l(l),e=Lt()},m(l,r){t&&t.m(l,r),j(l,e,r)},p(l,r){l[75].name===l[2]?t?t.p(l,r):(t=Wr(l),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(l){l&&c(e),t&&t.d(l)}}}function es(s){let e,t=Nl(s[25]),l=[];for(let r=0;r<t.length;r+=1)l[r]=ts(Xr(s,t,r));return{c(){e=d("div");for(let r=0;r<l.length;r+=1)l[r].c();this.h()},l(r){e=u(r,"DIV",{class:!0});var a=p(e);for(let i=0;i<l.length;i+=1)l[i].l(a);a.forEach(c),this.h()},h(){o(e,"class","absolute bottom-full left-0 right-0 border border-gray-200 border-b-0 bg-white shadow-lg rounded-t-lg overflow-hidden z-20")},m(r,a){j(r,e,a);for(let i=0;i<l.length;i+=1)l[i]&&l[i].m(e,null)},p(r,a){if(a[0]&33554692){t=Nl(r[25]);let i;for(i=0;i<t.length;i+=1){const h=Xr(r,t,i);l[i]?l[i].p(h,a):(l[i]=ts(h),l[i].c(),l[i].m(e,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=t.length}},d(r){r&&c(e),ps(l,r)}}}function Os(s){let e,t,l,r=s[75].badge+"",a,i;return{c(){e=R(" "),t=d("span"),l=R("("),a=R(r),i=R(")"),this.h()},l(h){e=B(h," "),t=u(h,"SPAN",{class:!0});var m=p(t);l=B(m,"("),a=B(m,r),i=B(m,")"),m.forEach(c),this.h()},h(){o(t,"class","text-sm text-gray-500")},m(h,m){j(h,e,m),j(h,t,m),n(t,l),n(t,a),n(t,i)},p:Vt,d(h){h&&(c(e),c(t))}}}function ts(s){let e,t=s[75].name+"",l,r,a,i,h,m=s[75].badge&&Os(s);function $(){return s[42](s[75])}return{c(){e=d("button"),l=R(t),m&&m.c(),r=_(),this.h()},l(w){e=u(w,"BUTTON",{class:!0});var v=p(e);l=B(v,t),m&&m.l(v),r=b(v),v.forEach(c),this.h()},h(){o(e,"class",a="w-full px-3 py-2.5 text-left transition-colors text-sm "+(s[75].disabled?"opacity-50 cursor-not-allowed":"hover:bg-gray-50")+" "+(s[75].name===s[2]?"bg-gray-100":"")),e.disabled=s[75].disabled},m(w,v){j(w,e,v),n(e,l),m&&m.m(e,null),n(e,r),i||(h=V(e,"click",$),i=!0)},p(w,v){s=w,s[75].badge&&m.p(s,v),v[0]&4&&a!==(a="w-full px-3 py-2.5 text-left transition-colors text-sm "+(s[75].disabled?"opacity-50 cursor-not-allowed":"hover:bg-gray-50")+" "+(s[75].name===s[2]?"bg-gray-100":""))&&o(e,"class",a)},d(w){w&&c(e),m&&m.d(),i=!1,h()}}}function As(s){let e,t;return e=new dl({props:{size:10,class:"text-gray-600"}}),{c(){de(e.$$.fragment)},l(l){ue(e.$$.fragment,l)},m(l,r){ce(e,l,r),t=!0},i(l){t||(T(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){ie(e,l)}}}function zs(s){let e,t;return e=new jl({props:{size:10,class:"text-gray-600"}}),{c(){de(e.$$.fragment)},l(l){ue(e.$$.fragment,l)},m(l,r){ce(e,l,r),t=!0},i(l){t||(T(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){ie(e,l)}}}function Us(s){let e,t;return e=new dl({props:{size:10,class:"text-gray-600"}}),{c(){de(e.$$.fragment)},l(l){ue(e.$$.fragment,l)},m(l,r){ce(e,l,r),t=!0},i(l){t||(T(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){ie(e,l)}}}function Ss(s){let e,t;return e=new jl({props:{size:10,class:"text-gray-600"}}),{c(){de(e.$$.fragment)},l(l){ue(e.$$.fragment,l)},m(l,r){ce(e,l,r),t=!0},i(l){t||(T(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){ie(e,l)}}}function Bs(s){let e,t;return e=new dl({props:{size:10,class:"text-gray-600"}}),{c(){de(e.$$.fragment)},l(l){ue(e.$$.fragment,l)},m(l,r){ce(e,l,r),t=!0},i(l){t||(T(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){ie(e,l)}}}function Rs(s){let e,t;return e=new jl({props:{size:10,class:"text-gray-600"}}),{c(){de(e.$$.fragment)},l(l){ue(e.$$.fragment,l)},m(l,r){ce(e,l,r),t=!0},i(l){t||(T(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){ie(e,l)}}}function Fs(s){let e,t='<div class="flex items-center justify-between mb-1"><div class="flex items-center gap-2"><div class="w-6 h-6 bg-gradient-to-br from-purple-400 to-pink-500 rounded-full flex items-center justify-center text-white text-xs font-semibold">🎤</div> <span class="text-xs font-medium text-purple-900">Clone your voice</span></div> <div class="w-5 h-5 flex items-center justify-center"><svg class="w-3 h-3 text-purple-600" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg></div></div>';return{c(){e=d("a"),e.innerHTML=t,this.h()},l(l){e=u(l,"A",{href:!0,class:!0,"data-svelte-h":!0}),K(e)!=="svelte-aczm6q"&&(e.innerHTML=t),this.h()},h(){o(e,"href","/voice-cloning"),o(e,"class","p-3 border border-purple-200 rounded-lg transition-colors text-left hover:bg-purple-50 bg-purple-25")},m(l,r){j(l,e,r)},p:Vt,i:Vt,o:Vt,d(l){l&&c(e)}}}function Gs(s){let e,t,l,r='<div class="w-6 h-6 bg-gradient-to-br from-purple-400 to-pink-500 rounded-full flex items-center justify-center text-white text-xs">🎤</div> <span class="text-xs font-medium">Your cloned voice</span>',a,i,h,m,$,w,v,x;const O=[qs,Ys],ee=[];function P(y,C){return y[17]==="Yours"?0:1}return h=P(s),m=ee[h]=O[h](s),{c(){e=d("button"),t=d("div"),l=d("div"),l.innerHTML=r,a=_(),i=d("button"),m.c(),this.h()},l(y){e=u(y,"BUTTON",{class:!0});var C=p(e);t=u(C,"DIV",{class:!0});var k=p(t);l=u(k,"DIV",{class:!0,"data-svelte-h":!0}),K(l)!=="svelte-1ixcco1"&&(l.innerHTML=r),a=b(k),i=u(k,"BUTTON",{class:!0,title:!0});var A=p(i);m.l(A),A.forEach(c),k.forEach(c),C.forEach(c),this.h()},h(){o(l,"class","flex items-center gap-2"),o(i,"class","p-1 rounded-full hover:bg-gray-200 transition-colors w-5 h-5 flex items-center justify-center"),o(i,"title","Play sample"),o(t,"class","flex items-center justify-between mb-1"),o(e,"class",$="p-3 border rounded-lg transition-colors text-left hover:bg-gray-50 "+(s[1]==="Yours"?"border-purple-400 bg-purple-50":"border-gray-200"))},m(y,C){j(y,e,C),n(e,t),n(t,l),n(t,a),n(t,i),ee[h].m(i,null),w=!0,v||(x=[V(i,"click",s[49]),V(e,"click",s[50])],v=!0)},p(y,C){let k=h;h=P(y),h!==k&&(ct(),I(ee[k],1,1,()=>{ee[k]=null}),it(),m=ee[h],m||(m=ee[h]=O[h](y),m.c()),T(m,1),m.m(i,null)),(!w||C[0]&2&&$!==($="p-3 border rounded-lg transition-colors text-left hover:bg-gray-50 "+(y[1]==="Yours"?"border-purple-400 bg-purple-50":"border-gray-200")))&&o(e,"class",$)},i(y){w||(T(m),w=!0)},o(y){I(m),w=!1},d(y){y&&c(e),ee[h].d(),v=!1,hl(x)}}}function Ys(s){let e,t;return e=new dl({props:{size:10,class:"text-gray-600"}}),{c(){de(e.$$.fragment)},l(l){ue(e.$$.fragment,l)},m(l,r){ce(e,l,r),t=!0},i(l){t||(T(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){ie(e,l)}}}function qs(s){let e,t;return e=new jl({props:{size:10,class:"text-gray-600"}}),{c(){de(e.$$.fragment)},l(l){ue(e.$$.fragment,l)},m(l,r){ce(e,l,r),t=!0},i(l){t||(T(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){ie(e,l)}}}function ls(s){let e,t,l='<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',r,a,i='Hugging Face <span class="bg-gradient-to-r from-purple-500 via-pink-500 via-green-500 to-blue-500 bg-clip-text text-transparent font-bold">PRO</span>',h,m,$=`Sign in to with your Hugging Face <a href="https://huggingface.co/pro" target="_blank" class="text-amber-600 hover:text-amber-700 underline font-medium">PRO account</a> to get started with $2 of free API credits per month. You can add a billing method for
6
+ additional pay-as-you-go usage ⤴`,w,v;return{c(){e=d("div"),t=d("button"),t.innerHTML=l,r=_(),a=d("p"),a.innerHTML=i,h=_(),m=d("p"),m.innerHTML=$,this.h()},l(x){e=u(x,"DIV",{class:!0});var O=p(e);t=u(O,"BUTTON",{class:!0,"aria-label":!0,"data-svelte-h":!0}),K(t)!=="svelte-9gdgq5"&&(t.innerHTML=l),r=b(O),a=u(O,"P",{class:!0,"data-svelte-h":!0}),K(a)!=="svelte-1q58z3k"&&(a.innerHTML=i),h=b(O),m=u(O,"P",{class:!0,"data-svelte-h":!0}),K(m)!=="svelte-dysk74"&&(m.innerHTML=$),O.forEach(c),this.h()},h(){o(t,"class","absolute top-2 right-2 text-gray-400 hover:text-gray-600 transition-colors"),o(t,"aria-label","Dismiss"),o(a,"class","text-sm font-medium text-gray-700 mb-1 pr-4"),o(m,"class","text-sm text-gray-600 pr-4"),o(e,"class","mb-4 px-3 py-2 bg-gradient-to-r from-amber-50 to-orange-50 rounded-lg border border-amber-200 relative")},m(x,O){j(x,e,O),n(e,t),n(e,r),n(e,a),n(e,h),n(e,m),w||(v=V(t,"click",s[53]),w=!0)},p:Vt,d(x){x&&c(e),w=!1,v()}}}function rs(s){let e,t,l,r=Dt.highlight(s[23],Dt.languages.bash,"bash")+"";return{c(){e=d("pre"),t=d("code"),l=new ir(!1),this.h()},l(a){e=u(a,"PRE",{class:!0});var i=p(e);t=u(i,"CODE",{class:!0});var h=p(t);l=ar(h,!1),h.forEach(c),i.forEach(c),this.h()},h(){l.a=null,o(t,"class","language-bash"),o(e,"class","p-3 overflow-x-auto bg-gray-50 text-xs")},m(a,i){j(a,e,i),n(e,t),l.m(r,t)},p(a,i){i[0]&8388608&&r!==(r=Dt.highlight(a[23],Dt.languages.bash,"bash")+"")&&l.p(r)},d(a){a&&c(e)}}}function ss(s){let e,t,l,r=Dt.highlight(s[24],Dt.languages.python,"python")+"";return{c(){e=d("pre"),t=d("code"),l=new ir(!1),this.h()},l(a){e=u(a,"PRE",{class:!0});var i=p(e);t=u(i,"CODE",{class:!0});var h=p(t);l=ar(h,!1),h.forEach(c),i.forEach(c),this.h()},h(){l.a=null,o(t,"class","language-python"),o(e,"class","p-3 overflow-x-auto bg-gray-50 text-xs")},m(a,i){j(a,e,i),n(e,t),l.m(r,t)},p(a,i){i[0]&16777216&&r!==(r=Dt.highlight(a[24],Dt.languages.python,"python")+"")&&l.p(r)},d(a){a&&c(e)}}}function ns(s){let e,t,l,r,a,i,h="Generated Audio",m,$,w,v,x,O="Download",ee,P,y,C,k,A,F,re,me,U,se,W=ul(s[14])+"",L,z,S,M,H,G,Le,Y,ge,De=ul(s[13])+"",Ne,we,Je,je,Oe,ke,Pe=ul(s[14])+"",et,fe,te,Me,Fe,ne=s[11]>0&&s[6]!=="local"&&os(s);P=new ks({props:{size:12,class:"text-green-600"}});const lt=[Js,Ks],pe=[];function xe(D,q){return D[12]?0:1}H=xe(s),G=pe[H]=lt[H](s);let N=s[10]&&as(s);return{c(){e=d("div"),t=d("div"),l=d("div"),r=d("div"),a=_(),i=d("span"),i.textContent=h,m=_(),ne&&ne.c(),$=_(),w=d("div"),v=d("button"),x=d("span"),x.textContent=O,ee=_(),de(P.$$.fragment),y=_(),C=d("div"),k=d("div"),A=d("h4"),F=R(s[15]),re=_(),me=d("p"),U=R(s[1]),se=R(" • "),L=R(W),z=_(),S=d("div"),M=d("button"),G.c(),Le=_(),Y=d("div"),ge=d("span"),Ne=R(De),we=_(),Je=d("div"),je=d("div"),Oe=_(),ke=d("span"),et=R(Pe),fe=_(),N&&N.c(),this.h()},l(D){e=u(D,"DIV",{class:!0});var q=p(e);t=u(q,"DIV",{class:!0});var he=p(t);l=u(he,"DIV",{class:!0});var _e=p(l);r=u(_e,"DIV",{class:!0}),p(r).forEach(c),a=b(_e),i=u(_e,"SPAN",{class:!0,"data-svelte-h":!0}),K(i)!=="svelte-1hz7jl7"&&(i.textContent=h),m=b(_e),ne&&ne.l(_e),_e.forEach(c),$=b(he),w=u(he,"DIV",{class:!0});var Ge=p(w);v=u(Ge,"BUTTON",{class:!0,title:!0});var rt=p(v);x=u(rt,"SPAN",{class:!0,"data-svelte-h":!0}),K(x)!=="svelte-kkuif9"&&(x.textContent=O),ee=b(rt),ue(P.$$.fragment,rt),rt.forEach(c),Ge.forEach(c),he.forEach(c),y=b(q),C=u(q,"DIV",{class:!0});var Ye=p(C);k=u(Ye,"DIV",{class:!0});var Ee=p(k);A=u(Ee,"H4",{class:!0});var Te=p(A);F=B(Te,s[15]),Te.forEach(c),re=b(Ee),me=u(Ee,"P",{class:!0});var be=p(me);U=B(be,s[1]),se=B(be," • "),L=B(be,W),be.forEach(c),Ee.forEach(c),z=b(Ye),S=u(Ye,"DIV",{class:!0});var Xe=p(S);M=u(Xe,"BUTTON",{class:!0});var ut=p(M);G.l(ut),ut.forEach(c),Le=b(Xe),Y=u(Xe,"DIV",{class:!0});var ve=p(Y);ge=u(ve,"SPAN",{class:!0});var Ae=p(ge);Ne=B(Ae,De),Ae.forEach(c),we=b(ve),Je=u(ve,"DIV",{class:!0});var qe=p(Je);je=u(qe,"DIV",{class:!0,style:!0}),p(je).forEach(c),qe.forEach(c),Oe=b(ve),ke=u(ve,"SPAN",{class:!0});var Pt=p(ke);et=B(Pt,Pe),Pt.forEach(c),ve.forEach(c),Xe.forEach(c),fe=b(Ye),N&&N.l(Ye),Ye.forEach(c),q.forEach(c),this.h()},h(){o(r,"class","w-1.5 h-1.5 bg-green-500 rounded-full"),o(i,"class","text-xs font-medium text-green-900"),o(l,"class","flex items-center gap-2"),o(x,"class","text-xs text-green-700"),o(v,"class","flex items-center gap-1 px-2 py-1 hover:bg-green-100 rounded transition-colors"),o(v,"title","Download audio"),o(w,"class","flex items-center gap-1"),o(t,"class","flex items-center justify-between px-3 py-2 bg-green-50 border-b border-green-200"),o(A,"class","font-medium text-gray-900 text-xs"),o(me,"class","text-xs text-gray-500"),o(k,"class","mb-3"),o(M,"class","w-6 h-6 bg-black rounded-full flex items-center justify-center hover:bg-gray-800 transition-colors flex-shrink-0"),o(ge,"class","text-xs text-gray-500 font-mono"),o(je,"class","h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all"),or(je,"width",s[13]/s[14]*100+"%"),o(Je,"class","flex-1 h-1 bg-gray-200 rounded-full cursor-pointer"),o(ke,"class","text-xs text-gray-500 font-mono"),o(Y,"class","flex-1 flex items-center gap-1"),o(S,"class","flex items-center gap-2"),o(C,"class","p-3"),o(e,"class","bg-white rounded-lg border border-gray-200 overflow-hidden mt-4")},m(D,q){j(D,e,q),n(e,t),n(t,l),n(l,r),n(l,a),n(l,i),n(l,m),ne&&ne.m(l,null),n(t,$),n(t,w),n(w,v),n(v,x),n(v,ee),ce(P,v,null),n(e,y),n(e,C),n(C,k),n(k,A),n(A,F),n(k,re),n(k,me),n(me,U),n(me,se),n(me,L),n(C,z),n(C,S),n(S,M),pe[H].m(M,null),n(S,Le),n(S,Y),n(Y,ge),n(ge,Ne),n(Y,we),n(Y,Je),n(Je,je),n(Y,Oe),n(Y,ke),n(ke,et),n(C,fe),N&&N.m(C,null),te=!0,Me||(Fe=[V(v,"click",s[32]),V(M,"click",s[27])],Me=!0)},p(D,q){D[11]>0&&D[6]!=="local"?ne?ne.p(D,q):(ne=os(D),ne.c(),ne.m(l,null)):ne&&(ne.d(1),ne=null),(!te||q[0]&32768)&&tt(F,D[15]),(!te||q[0]&2)&&tt(U,D[1]),(!te||q[0]&16384)&&W!==(W=ul(D[14])+"")&&tt(L,W);let he=H;H=xe(D),H!==he&&(ct(),I(pe[he],1,1,()=>{pe[he]=null}),it(),G=pe[H],G||(G=pe[H]=lt[H](D),G.c()),T(G,1),G.m(M,null)),(!te||q[0]&8192)&&De!==(De=ul(D[13])+"")&&tt(Ne,De),(!te||q[0]&24576)&&or(je,"width",D[13]/D[14]*100+"%"),(!te||q[0]&16384)&&Pe!==(Pe=ul(D[14])+"")&&tt(et,Pe),D[10]?N?N.p(D,q):(N=as(D),N.c(),N.m(C,null)):N&&(N.d(1),N=null)},i(D){te||(T(P.$$.fragment,D),T(G),te=!0)},o(D){I(P.$$.fragment,D),I(G),te=!1},d(D){D&&c(e),ne&&ne.d(),ie(P),pe[H].d(),N&&N.d(),Me=!1,hl(Fe)}}}function os(s){let e,t,l=s[11].toFixed(1)+"",r,a;return{c(){e=d("span"),t=R("(took "),r=R(l),a=R("s)"),this.h()},l(i){e=u(i,"SPAN",{class:!0});var h=p(e);t=B(h,"(took "),r=B(h,l),a=B(h,"s)"),h.forEach(c),this.h()},h(){o(e,"class","text-xs text-green-700")},m(i,h){j(i,e,h),n(e,t),n(e,r),n(e,a)},p(i,h){h[0]&2048&&l!==(l=i[11].toFixed(1)+"")&&tt(r,l)},d(i){i&&c(e)}}}function Ks(s){let e,t;return e=new dl({props:{size:10,class:"text-white ml-0.5"}}),{c(){de(e.$$.fragment)},l(l){ue(e.$$.fragment,l)},m(l,r){ce(e,l,r),t=!0},i(l){t||(T(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){ie(e,l)}}}function Js(s){let e;return{c(){e=d("div"),this.h()},l(t){e=u(t,"DIV",{class:!0}),p(e).forEach(c),this.h()},h(){o(e,"class","pause-filled text-white text-xs svelte-13ak1iw")},m(t,l){j(t,e,l)},i:Vt,o:Vt,d(t){t&&c(e)}}}function as(s){let e,t,l,r;return{c(){e=d("audio"),this.h()},l(a){e=u(a,"AUDIO",{src:!0,style:!0}),p(e).forEach(c),this.h()},h(){Kr(e.src,t=s[10])||o(e,"src",t),or(e,"display","none")},m(a,i){j(a,e,i),s[59](e),l||(r=[V(e,"loadedmetadata",s[28]),V(e,"timeupdate",s[29]),V(e,"play",s[30]),V(e,"pause",s[31])],l=!0)},p(a,i){i[0]&1024&&!Kr(e.src,t=a[10])&&o(e,"src",t)},d(a){a&&c(e),s[59](null),l=!1,hl(r)}}}function is(s){let e,t,l,r,a,i,h,m,$,w,v,x,O="An error occurred while processing your request",ee,P,y,C,k,A,F,re,me="Close",U,se,W;i=new Cs({props:{size:20,class:"text-red-600"}}),y=new Ds({props:{size:20,class:"text-gray-500"}});let L=s[20]&&cs(s);return{c(){e=d("div"),t=d("div"),l=d("div"),r=d("div"),a=d("div"),de(i.$$.fragment),h=_(),m=d("div"),$=d("h3"),w=R(s[19]),v=_(),x=d("p"),x.textContent=O,ee=_(),P=d("button"),de(y.$$.fragment),C=_(),k=d("div"),L&&L.c(),A=_(),F=d("div"),re=d("button"),re.textContent=me,this.h()},l(z){e=u(z,"DIV",{class:!0});var S=p(e);t=u(S,"DIV",{class:!0});var M=p(t);l=u(M,"DIV",{class:!0});var H=p(l);r=u(H,"DIV",{class:!0});var G=p(r);a=u(G,"DIV",{class:!0});var Le=p(a);ue(i.$$.fragment,Le),Le.forEach(c),h=b(G),m=u(G,"DIV",{class:!0});var Y=p(m);$=u(Y,"H3",{class:!0});var ge=p($);w=B(ge,s[19]),ge.forEach(c),v=b(Y),x=u(Y,"P",{class:!0,"data-svelte-h":!0}),K(x)!=="svelte-1l3zl3"&&(x.textContent=O),Y.forEach(c),G.forEach(c),ee=b(H),P=u(H,"BUTTON",{class:!0,title:!0});var De=p(P);ue(y.$$.fragment,De),De.forEach(c),H.forEach(c),C=b(M),k=u(M,"DIV",{class:!0});var Ne=p(k);L&&L.l(Ne),Ne.forEach(c),A=b(M),F=u(M,"DIV",{class:!0});var we=p(F);re=u(we,"BUTTON",{class:!0,"data-svelte-h":!0}),K(re)!=="svelte-4sxk6g"&&(re.textContent=me),we.forEach(c),M.forEach(c),S.forEach(c),this.h()},h(){o(a,"class","w-10 h-10 bg-red-100 rounded-full flex items-center justify-center flex-shrink-0"),o($,"class","text-lg font-semibold text-gray-900 truncate"),o(x,"class","text-sm text-gray-600"),o(m,"class","min-w-0"),o(r,"class","flex items-center gap-3 min-w-0"),o(P,"class","p-2 hover:bg-red-100 rounded-full transition-colors flex-shrink-0"),o(P,"title","Close"),o(l,"class","flex items-center justify-between p-6 border-b border-gray-200 bg-red-50 flex-shrink-0"),o(k,"class","p-6 overflow-y-auto flex-1 min-h-0"),o(re,"class","px-6 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors"),o(F,"class","flex items-center justify-end gap-3 p-6 border-t border-gray-200 bg-gray-50 flex-shrink-0"),o(t,"class","bg-white rounded-xl shadow-2xl max-w-2xl w-full max-h-[80vh] flex flex-col"),o(e,"class","fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4")},m(z,S){j(z,e,S),n(e,t),n(t,l),n(l,r),n(r,a),ce(i,a,null),n(r,h),n(r,m),n(m,$),n($,w),n(m,v),n(m,x),n(l,ee),n(l,P),ce(y,P,null),n(t,C),n(t,k),L&&L.m(k,null),n(t,A),n(t,F),n(F,re),U=!0,se||(W=[V(P,"click",s[36]),V(re,"click",s[36])],se=!0)},p(z,S){(!U||S[0]&524288)&&tt(w,z[19]),z[20]?L?L.p(z,S):(L=cs(z),L.c(),L.m(k,null)):L&&(L.d(1),L=null)},i(z){U||(T(i.$$.fragment,z),T(y.$$.fragment,z),U=!0)},o(z){I(i.$$.fragment,z),I(y.$$.fragment,z),U=!1},d(z){z&&c(e),ie(i),ie(y),L&&L.d(),se=!1,hl(W)}}}function cs(s){let e,t,l="Error Details:",r,a,i;function h(w,v){return v[0]&1048576&&(i=null),i==null&&(i=!!w[20].includes("exceeded your monthly included credits")),i?Qs:Xs}let m=h(s,[-1,-1,-1]),$=m(s);return{c(){e=d("div"),t=d("h4"),t.textContent=l,r=_(),a=d("pre"),$.c(),this.h()},l(w){e=u(w,"DIV",{class:!0});var v=p(e);t=u(v,"H4",{class:!0,"data-svelte-h":!0}),K(t)!=="svelte-3lmggt"&&(t.textContent=l),r=b(v),a=u(v,"PRE",{class:!0});var x=p(a);$.l(x),x.forEach(c),v.forEach(c),this.h()},h(){o(t,"class","text-sm font-medium text-gray-900 mb-2"),o(a,"class","text-xs text-gray-700 whitespace-pre-wrap font-mono leading-relaxed break-words"),o(e,"class","bg-gray-50 rounded-lg p-4 border")},m(w,v){j(w,e,v),n(e,t),n(e,r),n(e,a),$.m(a,null)},p(w,v){m===(m=h(w,v))&&$?$.p(w,v):($.d(1),$=m(w),$&&($.c(),$.m(a,null)))},d(w){w&&c(e),$.d()}}}function Xs(s){let e;return{c(){e=R(s[20])},l(t){e=B(t,s[20])},m(t,l){j(t,e,l)},p(t,l){l[0]&1048576&&tt(e,t[20])},d(t){t&&c(e)}}}function Qs(s){let e,t=s[20].replace("Subscribe to PRO",'<a href="https://huggingface.co/settings/billing" target="_blank" class="text-amber-600 hover:text-amber-700 underline font-medium">Subscribe to PRO</a>')+"",l;return{c(){e=new ir(!1),l=Lt(),this.h()},l(r){e=ar(r,!1),l=Lt(),this.h()},h(){e.a=l},m(r,a){e.m(t,r,a),j(r,l,a)},p(r,a){a[0]&1048576&&t!==(t=r[20].replace("Subscribe to PRO",'<a href="https://huggingface.co/settings/billing" target="_blank" class="text-amber-600 hover:text-amber-700 underline font-medium">Subscribe to PRO</a>')+"")&&e.p(t)},d(r){r&&(c(l),e.d())}}}function us(s){let e,t;return{c(){e=d("div"),t=R(s[22]),this.h()},l(l){e=u(l,"DIV",{class:!0});var r=p(e);t=B(r,s[22]),r.forEach(c),this.h()},h(){o(e,"class","fixed bottom-4 right-4 px-4 py-2 bg-gray-900 text-white rounded-lg shadow-lg z-50 animate-fade-in svelte-13ak1iw")},m(l,r){j(l,e,r),n(e,t)},p(l,r){r[0]&4194304&&tt(t,l[22])},d(l){l&&c(e)}}}function Ws(s){let e,t,l,r,a,i,h,m=s[0].length.toLocaleString()+"",$,w,v,x,O,ee,P,y,C,k,A,F,re,me,U,se,W,L,z="Model",S,M,H,G,Le,Y,ge,De,Ne,we,Je='~$0.025 per generation • <a href="https://huggingface.co/settings/billing" target="_blank" class="text-amber-600 hover:text-amber-700 underline">Billing ⤴</a>',je,Oe,ke,Pe="Voice",et,fe,te,Me,Fe,ne='<div class="w-6 h-6 bg-gradient-to-br from-amber-400 to-orange-500 rounded-full flex items-center justify-center text-white text-xs font-semibold">A</div> <span class="text-sm font-medium">Andrew</span>',lt,pe,xe,N,D,q,he,_e,Ge,rt='<div class="w-6 h-6 bg-gradient-to-br from-amber-400 to-orange-500 rounded-full flex items-center justify-center text-white text-xs font-semibold">L</div> <span class="text-sm font-medium">Lily</span>',Ye,Ee,Te,be,Xe,ut,ve,Ae,qe,Pt='<div class="w-6 h-6 bg-gradient-to-br from-amber-400 to-orange-500 rounded-full flex items-center justify-center text-white text-xs font-semibold">P</div> <span class="text-sm font-medium">Pirate</span>',fl,Qe,ze,Ue,Zt,pl,He,g,Z,J,X,Q,le='<label for="exaggeration-slider" class="text-sm font-medium text-gray-900">Exaggeration</label>',Mt,Se,Ol,Ht,cr="<span>None</span> <span>More</span>",Al,st,Nt,ur='<label for="temperature-slider" class="text-sm font-medium text-gray-900">Stability</label>',zl,Be,Ul,jt,dr="<span>More stable</span> <span>More variable</span>",Sl,el,Re,ml,Ot,fr='<h3 class="text-lg font-semibold text-gray-900 mb-1">Results &amp; Live Documentation</h3> <p class="text-sm text-gray-600">The code below will update as you adjust the UI ✨</p>',Bl,dt,ft,pt,Rl,gl,Fl,ht,Gl,bl,Yl,mt,nt,At,ql,zt,pr="Copy all",Kl,gt,hr='<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="text-amber-700"><path d="M12 2L2 7l10 5 10-5-10-5z"></path><path d="M2 17l10 5 10-5"></path><path d="M2 12l10 5 10-5"></path></svg> <span class="ml-1 text-xs font-medium text-amber-700">Deploy as Space</span>',Jl,We,bt,_t,Ut,mr='<span class="text-xs font-medium text-blue-900">Install in Terminal</span>',Xl,vt,St,Ql,Bt,gr=s[7],Wl,yt,wt,Rt,br='<span class="text-xs font-medium text-amber-900">Python Code</span> <span class="text-xs bg-amber-100 text-amber-700 px-1.5 py-0.5 rounded">Live</span>',Zl,kt,Ft,er,Gt,_r=s[7],tr,_l,tl,ll,Ke,lr,vr;O=new $s({props:{size:16}});const yr=[Ns,Hs],Yt=[];function wr(f,E){return f[9]?0:1}A=wr(s),F=Yt[A]=yr[A](s);let rl=Nl(s[25]),ye=[];for(let f=0;f<rl.length;f+=1)ye[f]=Zr(Qr(s,rl,f));Y=new Ms({props:{size:14,class:"text-gray-500 transition-transform "+(s[8]?"rotate-180":"")}});let $e=s[8]&&es(s);const kr=[zs,As],qt=[];function xr(f,E){return f[17]==="Andrew"?0:1}xe=xr(s),N=qt[xe]=kr[xe](s);const Er=[Ss,Us],Kt=[];function Tr(f,E){return f[17]==="Lily"?0:1}Te=Tr(s),be=Kt[Te]=Er[Te](s);const $r=[Rs,Bs],Jt=[];function Ir(f,E){return f[17]==="Pirate"?0:1}ze=Ir(s),Ue=Jt[ze]=$r[ze](s);const Cr=[Gs,Fs],xt=[];function Dr(f,E){return f[5].length>0?0:1}He=Dr(s),g=xt[He]=Cr[He](s);let Ie=s[21]&&ls(s);At=new sr({props:{size:12,class:"text-gray-600"}}),St=new sr({props:{size:12,class:"text-blue-600"}});let ot=rs(s);Ft=new sr({props:{size:12,class:"text-amber-600"}});let at=ss(s),oe=s[10]&&ns(s),ae=s[18]&&is(s),Ce=s[22]&&us(s);return{c(){e=_(),t=d("div"),l=d("div"),r=d("div"),a=d("div"),i=d("div"),h=d("span"),$=R(m),w=R(" / 1,000 characters"),v=_(),x=d("button"),de(O.$$.fragment),ee=_(),P=d("div"),y=d("textarea"),C=_(),k=d("button"),F.c(),me=_(),U=d("div"),se=d("div"),W=d("div"),L=d("h3"),L.textContent=z,S=_(),M=d("div"),H=d("button"),G=d("span");for(let f=0;f<ye.length;f+=1)ye[f].c();Le=_(),de(Y.$$.fragment),De=_(),$e&&$e.c(),Ne=_(),we=d("div"),we.innerHTML=Je,je=_(),Oe=d("div"),ke=d("h3"),ke.textContent=Pe,et=_(),fe=d("div"),te=d("button"),Me=d("div"),Fe=d("div"),Fe.innerHTML=ne,lt=_(),pe=d("button"),N.c(),q=_(),he=d("button"),_e=d("div"),Ge=d("div"),Ge.innerHTML=rt,Ye=_(),Ee=d("button"),be.c(),ut=_(),ve=d("button"),Ae=d("div"),qe=d("div"),qe.innerHTML=Pt,fl=_(),Qe=d("button"),Ue.c(),pl=_(),g.c(),Z=_(),J=d("div"),X=d("div"),Q=d("div"),Q.innerHTML=le,Mt=_(),Se=d("input"),Ol=_(),Ht=d("div"),Ht.innerHTML=cr,Al=_(),st=d("div"),Nt=d("div"),Nt.innerHTML=ur,zl=_(),Be=d("input"),Ul=_(),jt=d("div"),jt.innerHTML=dr,Sl=_(),el=d("div"),Re=d("div"),Ie&&Ie.c(),ml=_(),Ot=d("div"),Ot.innerHTML=fr,Bl=_(),dt=d("div"),ft=d("div"),pt=d("button"),Rl=R("API"),Fl=_(),ht=d("button"),Gl=R("Local"),Yl=_(),mt=d("div"),nt=d("button"),de(At.$$.fragment),ql=_(),zt=d("span"),zt.textContent=pr,Kl=_(),gt=d("button"),gt.innerHTML=hr,Jl=_(),We=d("div"),bt=d("div"),_t=d("div"),Ut=d("div"),Ut.innerHTML=mr,Xl=_(),vt=d("button"),de(St.$$.fragment),Ql=_(),Bt=d("div"),ot.c(),Wl=_(),yt=d("div"),wt=d("div"),Rt=d("div"),Rt.innerHTML=br,Zl=_(),kt=d("button"),de(Ft.$$.fragment),er=_(),Gt=d("div"),at.c(),tr=_(),oe&&oe.c(),_l=_(),ae&&ae.c(),tl=_(),Ce&&Ce.c(),ll=Lt(),this.h()},l(f){_s("svelte-y100ki",Jr.head).forEach(c),e=b(f),t=u(f,"DIV",{class:!0,role:!0,tabindex:!0});var Ze=p(t);l=u(Ze,"DIV",{class:!0});var Xt=p(l);r=u(Xt,"DIV",{class:!0});var Et=p(r);a=u(Et,"DIV",{class:!0});var Tt=p(a);i=u(Tt,"DIV",{class:!0});var $t=p(i);h=u($t,"SPAN",{class:!0});var Qt=p(h);$=B(Qt,m),w=B(Qt," / 1,000 characters"),Qt.forEach(c),v=b($t),x=u($t,"BUTTON",{class:!0,title:!0});var Ve=p(x);ue(O.$$.fragment,Ve),Ve.forEach(c),$t.forEach(c),ee=b(Tt),P=u(Tt,"DIV",{class:!0});var Wt=p(P);y=u(Wt,"TEXTAREA",{maxlength:!0,class:!0,placeholder:!0}),p(y).forEach(c),C=b(Wt),k=u(Wt,"BUTTON",{class:!0});var Vr=p(k);F.l(Vr),Vr.forEach(c),Wt.forEach(c),Tt.forEach(c),me=b(Et),U=u(Et,"DIV",{class:!0});var Lr=p(U);se=u(Lr,"DIV",{class:!0});var sl=p(se);W=u(sl,"DIV",{class:!0});var nl=p(W);L=u(nl,"H3",{class:!0,"data-svelte-h":!0}),K(L)!=="svelte-x9l5tw"&&(L.textContent=z),S=b(nl),M=u(nl,"DIV",{class:!0});var vl=p(M);H=u(vl,"BUTTON",{class:!0});var yl=p(H);G=u(yl,"SPAN",{});var Pr=p(G);for(let rr=0;rr<ye.length;rr+=1)ye[rr].l(Pr);Pr.forEach(c),Le=b(yl),ue(Y.$$.fragment,yl),yl.forEach(c),De=b(vl),$e&&$e.l(vl),vl.forEach(c),Ne=b(nl),we=u(nl,"DIV",{class:!0,"data-svelte-h":!0}),K(we)!=="svelte-m7murz"&&(we.innerHTML=Je),nl.forEach(c),je=b(sl),Oe=u(sl,"DIV",{});var wl=p(Oe);ke=u(wl,"H3",{class:!0,"data-svelte-h":!0}),K(ke)!=="svelte-1pzzi7j"&&(ke.textContent=Pe),et=b(wl),fe=u(wl,"DIV",{class:!0});var It=p(fe);te=u(It,"BUTTON",{class:!0});var Mr=p(te);Me=u(Mr,"DIV",{class:!0});var kl=p(Me);Fe=u(kl,"DIV",{class:!0,"data-svelte-h":!0}),K(Fe)!=="svelte-qsi6ww"&&(Fe.innerHTML=ne),lt=b(kl),pe=u(kl,"BUTTON",{class:!0,title:!0});var Hr=p(pe);N.l(Hr),Hr.forEach(c),kl.forEach(c),Mr.forEach(c),q=b(It),he=u(It,"BUTTON",{class:!0});var Nr=p(he);_e=u(Nr,"DIV",{class:!0});var xl=p(_e);Ge=u(xl,"DIV",{class:!0,"data-svelte-h":!0}),K(Ge)!=="svelte-1c7qu8y"&&(Ge.innerHTML=rt),Ye=b(xl),Ee=u(xl,"BUTTON",{class:!0,title:!0});var jr=p(Ee);be.l(jr),jr.forEach(c),xl.forEach(c),Nr.forEach(c),ut=b(It),ve=u(It,"BUTTON",{class:!0});var Or=p(ve);Ae=u(Or,"DIV",{class:!0});var El=p(Ae);qe=u(El,"DIV",{class:!0,"data-svelte-h":!0}),K(qe)!=="svelte-1o6w87n"&&(qe.innerHTML=Pt),fl=b(El),Qe=u(El,"BUTTON",{class:!0,title:!0});var Ar=p(Qe);Ue.l(Ar),Ar.forEach(c),El.forEach(c),Or.forEach(c),pl=b(It),g.l(It),It.forEach(c),wl.forEach(c),Z=b(sl),J=u(sl,"DIV",{class:!0});var Tl=p(J);X=u(Tl,"DIV",{});var ol=p(X);Q=u(ol,"DIV",{class:!0,"data-svelte-h":!0}),K(Q)!=="svelte-1n9m3ma"&&(Q.innerHTML=le),Mt=b(ol),Se=u(ol,"INPUT",{id:!0,type:!0,min:!0,max:!0,step:!0,class:!0}),Ol=b(ol),Ht=u(ol,"DIV",{class:!0,"data-svelte-h":!0}),K(Ht)!=="svelte-y6blve"&&(Ht.innerHTML=cr),ol.forEach(c),Al=b(Tl),st=u(Tl,"DIV",{});var al=p(st);Nt=u(al,"DIV",{class:!0,"data-svelte-h":!0}),K(Nt)!=="svelte-pmq2mj"&&(Nt.innerHTML=ur),zl=b(al),Be=u(al,"INPUT",{id:!0,type:!0,min:!0,max:!0,step:!0,class:!0}),Ul=b(al),jt=u(al,"DIV",{class:!0,"data-svelte-h":!0}),K(jt)!=="svelte-17pelb8"&&(jt.innerHTML=dr),al.forEach(c),Tl.forEach(c),sl.forEach(c),Lr.forEach(c),Et.forEach(c),Sl=b(Xt),el=u(Xt,"DIV",{class:!0});var zr=p(el);Re=u(zr,"DIV",{class:!0});var Ct=p(Re);Ie&&Ie.l(Ct),ml=b(Ct),Ot=u(Ct,"DIV",{class:!0,"data-svelte-h":!0}),K(Ot)!=="svelte-jb3ali"&&(Ot.innerHTML=fr),Bl=b(Ct),dt=u(Ct,"DIV",{class:!0});var $l=p(dt);ft=u($l,"DIV",{class:!0});var Il=p(ft);pt=u(Il,"BUTTON",{class:!0});var Ur=p(pt);Rl=B(Ur,"API"),Ur.forEach(c),Fl=b(Il),ht=u(Il,"BUTTON",{class:!0});var Sr=p(ht);Gl=B(Sr,"Local"),Sr.forEach(c),Il.forEach(c),Yl=b($l),mt=u($l,"DIV",{class:!0});var Cl=p(mt);nt=u(Cl,"BUTTON",{class:!0});var Dl=p(nt);ue(At.$$.fragment,Dl),ql=b(Dl),zt=u(Dl,"SPAN",{class:!0,"data-svelte-h":!0}),K(zt)!=="svelte-1horous"&&(zt.textContent=pr),Dl.forEach(c),Kl=b(Cl),gt=u(Cl,"BUTTON",{class:!0,"data-svelte-h":!0}),K(gt)!=="svelte-1yz0406"&&(gt.innerHTML=hr),Cl.forEach(c),$l.forEach(c),Jl=b(Ct),We=u(Ct,"DIV",{class:!0});var il=p(We);bt=u(il,"DIV",{class:!0});var Vl=p(bt);_t=u(Vl,"DIV",{class:!0});var Ll=p(_t);Ut=u(Ll,"DIV",{class:!0,"data-svelte-h":!0}),K(Ut)!=="svelte-1eboucz"&&(Ut.innerHTML=mr),Xl=b(Ll),vt=u(Ll,"BUTTON",{class:!0,title:!0});var Br=p(vt);ue(St.$$.fragment,Br),Br.forEach(c),Ll.forEach(c),Ql=b(Vl),Bt=u(Vl,"DIV",{class:!0});var Rr=p(Bt);ot.l(Rr),Rr.forEach(c),Vl.forEach(c),Wl=b(il),yt=u(il,"DIV",{class:!0});var Pl=p(yt);wt=u(Pl,"DIV",{class:!0});var Ml=p(wt);Rt=u(Ml,"DIV",{class:!0,"data-svelte-h":!0}),K(Rt)!=="svelte-w4xfzx"&&(Rt.innerHTML=br),Zl=b(Ml),kt=u(Ml,"BUTTON",{class:!0,title:!0});var Fr=p(kt);ue(Ft.$$.fragment,Fr),Fr.forEach(c),Ml.forEach(c),er=b(Pl),Gt=u(Pl,"DIV",{class:!0});var Gr=p(Gt);at.l(Gr),Gr.forEach(c),Pl.forEach(c),tr=b(il),oe&&oe.l(il),il.forEach(c),Ct.forEach(c),zr.forEach(c),Xt.forEach(c),Ze.forEach(c),_l=b(f),ae&&ae.l(f),tl=b(f),Ce&&Ce.l(f),ll=Lt(),this.h()},h(){Jr.title="Text to Speech - HFStudio",o(h,"class","text-sm text-gray-400"),o(x,"class","p-1 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-lg transition-colors"),o(x,"title","Refresh with famous book opening"),o(i,"class","absolute top-3 right-3 flex items-center gap-2 z-10"),o(y,"maxlength","1000"),o(y,"class","w-full h-96 pt-10 px-6 pb-16 bg-white resize-none border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-amber-400 focus:border-transparent text-gray-900 text-lg leading-relaxed"),o(y,"placeholder","Type the text you'd like to convert to spoken audio here..."),y.autofocus=!0,k.disabled=re=s[9]||!s[0].trim(),o(k,"class","absolute bottom-4 right-4 px-5 py-2.5 bg-gradient-to-r from-amber-400 to-orange-500 text-white rounded-lg font-medium hover:from-amber-500 hover:to-orange-600 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-1.5 shadow-sm text-base"),o(P,"class","relative"),o(a,"class","relative mb-4"),o(L,"class","text-sm font-medium text-gray-900 mb-2"),o(H,"class",ge="w-full p-3 border bg-white text-sm focus:outline-none focus:ring-2 focus:ring-amber-400 focus:border-transparent shadow-sm text-left flex items-center justify-between "+(s[8]?"rounded-b-lg border-t-0 border-black":"rounded-lg border-black")),o(M,"class","relative"),o(we,"class","mt-1.5 text-xs text-gray-500 text-right"),o(W,"class","model-dropdown"),o(ke,"class","text-sm font-medium text-gray-900 mb-2"),o(Fe,"class","flex items-center gap-2"),o(pe,"class","p-1 rounded-full hover:bg-gray-200 transition-colors w-5 h-5 flex items-center justify-center"),o(pe,"title","Play sample"),o(Me,"class","flex items-center justify-between mb-1"),o(te,"class",D="p-3 border rounded-lg transition-colors text-left hover:bg-gray-50 "+(s[1]==="Andrew"?"border-black":"border-gray-200")),o(Ge,"class","flex items-center gap-2"),o(Ee,"class","p-1 rounded-full hover:bg-gray-200 transition-colors w-5 h-5 flex items-center justify-center"),o(Ee,"title","Play sample"),o(_e,"class","flex items-center justify-between mb-1"),o(he,"class",Xe="p-3 border rounded-lg transition-colors text-left hover:bg-gray-50 "+(s[1]==="Lily"?"border-black":"border-gray-200")),o(qe,"class","flex items-center gap-2"),o(Qe,"class","p-1 rounded-full hover:bg-gray-200 transition-colors w-5 h-5 flex items-center justify-center"),o(Qe,"title","Play sample"),o(Ae,"class","flex items-center justify-between mb-1"),o(ve,"class",Zt="p-3 border rounded-lg transition-colors text-left hover:bg-gray-50 "+(s[1]==="Pirate"?"border-black":"border-gray-200")),o(fe,"class","grid grid-cols-2 gap-2"),o(Q,"class","mb-1"),o(Se,"id","exaggeration-slider"),o(Se,"type","range"),o(Se,"min","0"),o(Se,"max","1"),o(Se,"step","0.01"),o(Se,"class","w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),o(Ht,"class","flex justify-between text-xs text-gray-400 mt-1"),o(Nt,"class","mb-1"),o(Be,"id","temperature-slider"),o(Be,"type","range"),o(Be,"min","0"),o(Be,"max","1"),o(Be,"step","0.01"),o(Be,"class","w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),o(jt,"class","flex justify-between text-xs text-gray-400 mt-1"),o(J,"class","space-y-3"),o(se,"class","grid grid-cols-1 lg:grid-cols-[1fr_1.4fr_1fr] gap-6"),o(U,"class","p-4 border border-gray-200 rounded-lg bg-white mb-6"),o(r,"class","flex-1 flex flex-col p-6"),o(Ot,"class","mb-4"),o(pt,"class",gl="px-2 py-1 text-xs font-medium rounded transition-colors "+(s[6]==="api"?"bg-white shadow-sm":"text-gray-600")),o(ht,"class",bl="px-2 py-1 text-xs font-medium rounded transition-colors "+(s[6]==="local"?"bg-white shadow-sm":"text-gray-600")),o(ft,"class","flex items-center bg-gray-100 rounded-md p-0.5"),o(zt,"class","ml-1 text-xs font-medium text-gray-600"),o(nt,"class","flex items-center bg-gray-100 hover:bg-gray-200 rounded-md px-2 py-1 transition-colors"),o(gt,"class","flex items-center bg-amber-100 hover:bg-amber-200 rounded-md px-2 py-1 transition-colors"),o(mt,"class","flex items-center gap-2"),o(dt,"class","flex items-center justify-between mb-4"),o(Ut,"class","flex items-center gap-2"),o(vt,"class","p-1 hover:bg-blue-100 rounded transition-colors"),o(vt,"title","Copy setup code"),o(_t,"class","flex items-center justify-between px-3 py-2 bg-blue-50 border-b border-blue-200"),o(Bt,"class","relative"),o(bt,"class","bg-white rounded-lg border border-gray-200 overflow-hidden"),o(Rt,"class","flex items-center gap-2"),o(kt,"class","p-1 hover:bg-amber-100 rounded transition-colors"),o(kt,"title","Copy Python code"),o(wt,"class","flex items-center justify-between px-3 py-2 bg-amber-50 border-b border-amber-200"),o(Gt,"class","relative"),o(yt,"class","bg-white rounded-lg border border-gray-200 overflow-hidden"),o(We,"class","space-y-4"),o(Re,"class","p-4"),o(el,"class","w-96 border-l border-gray-200 bg-white overflow-y-auto"),o(l,"class","flex-1 flex"),o(t,"class","flex flex-col h-full"),o(t,"role","main"),o(t,"tabindex","-1")},m(f,E){j(f,e,E),j(f,t,E),n(t,l),n(l,r),n(r,a),n(a,i),n(i,h),n(h,$),n(h,w),n(i,v),n(i,x),ce(O,x,null),n(a,ee),n(a,P),n(P,y),cl(y,s[0]),n(P,C),n(P,k),Yt[A].m(k,null),n(r,me),n(r,U),n(U,se),n(se,W),n(W,L),n(W,S),n(W,M),n(M,H),n(H,G);for(let Ze=0;Ze<ye.length;Ze+=1)ye[Ze]&&ye[Ze].m(G,null);n(H,Le),ce(Y,H,null),n(M,De),$e&&$e.m(M,null),n(W,Ne),n(W,we),n(se,je),n(se,Oe),n(Oe,ke),n(Oe,et),n(Oe,fe),n(fe,te),n(te,Me),n(Me,Fe),n(Me,lt),n(Me,pe),qt[xe].m(pe,null),n(fe,q),n(fe,he),n(he,_e),n(_e,Ge),n(_e,Ye),n(_e,Ee),Kt[Te].m(Ee,null),n(fe,ut),n(fe,ve),n(ve,Ae),n(Ae,qe),n(Ae,fl),n(Ae,Qe),Jt[ze].m(Qe,null),n(fe,pl),xt[He].m(fe,null),n(se,Z),n(se,J),n(J,X),n(X,Q),n(X,Mt),n(X,Se),cl(Se,s[3]),n(X,Ol),n(X,Ht),n(J,Al),n(J,st),n(st,Nt),n(st,zl),n(st,Be),cl(Be,s[4]),n(st,Ul),n(st,jt),n(l,Sl),n(l,el),n(el,Re),Ie&&Ie.m(Re,null),n(Re,ml),n(Re,Ot),n(Re,Bl),n(Re,dt),n(dt,ft),n(ft,pt),n(pt,Rl),n(ft,Fl),n(ft,ht),n(ht,Gl),n(dt,Yl),n(dt,mt),n(mt,nt),ce(At,nt,null),n(nt,ql),n(nt,zt),n(mt,Kl),n(mt,gt),n(Re,Jl),n(Re,We),n(We,bt),n(bt,_t),n(_t,Ut),n(_t,Xl),n(_t,vt),ce(St,vt,null),n(bt,Ql),n(bt,Bt),ot.m(Bt,null),n(We,Wl),n(We,yt),n(yt,wt),n(wt,Rt),n(wt,Zl),n(wt,kt),ce(Ft,kt,null),n(yt,er),n(yt,Gt),at.m(Gt,null),n(We,tr),oe&&oe.m(We,null),j(f,_l,E),ae&&ae.m(f,E),j(f,tl,E),Ce&&Ce.m(f,E),j(f,ll,E),Ke=!0,y.focus(),lr||(vr=[V(x,"click",s[37]),V(y,"input",s[40]),V(y,"keydown",s[34]),V(k,"click",s[26]),V(H,"click",s[41]),V(pe,"click",s[43]),V(te,"click",s[44]),V(Ee,"click",s[45]),V(he,"click",s[46]),V(Qe,"click",s[47]),V(ve,"click",s[48]),V(Se,"change",s[51]),V(Se,"input",s[51]),V(Be,"change",s[52]),V(Be,"input",s[52]),V(pt,"click",s[54]),V(ht,"click",s[55]),V(nt,"click",s[39]),V(gt,"click",s[56]),V(vt,"click",s[57]),V(kt,"click",s[58]),V(t,"click",s[35]),V(t,"keydown",s[34])],lr=!0)},p(f,E){(!Ke||E[0]&1)&&m!==(m=f[0].length.toLocaleString()+"")&&tt($,m),E[0]&1&&cl(y,f[0]);let Ze=A;if(A=wr(f),A!==Ze&&(ct(),I(Yt[Ze],1,1,()=>{Yt[Ze]=null}),it(),F=Yt[A],F||(F=Yt[A]=yr[A](f),F.c()),T(F,1),F.m(k,null)),(!Ke||E[0]&513&&re!==(re=f[9]||!f[0].trim()))&&(k.disabled=re),E[0]&33554436){rl=Nl(f[25]);let Ve;for(Ve=0;Ve<rl.length;Ve+=1){const Wt=Qr(f,rl,Ve);ye[Ve]?ye[Ve].p(Wt,E):(ye[Ve]=Zr(Wt),ye[Ve].c(),ye[Ve].m(G,null))}for(;Ve<ye.length;Ve+=1)ye[Ve].d(1);ye.length=rl.length}const Xt={};E[0]&256&&(Xt.class="text-gray-500 transition-transform "+(f[8]?"rotate-180":"")),Y.$set(Xt),(!Ke||E[0]&256&&ge!==(ge="w-full p-3 border bg-white text-sm focus:outline-none focus:ring-2 focus:ring-amber-400 focus:border-transparent shadow-sm text-left flex items-center justify-between "+(f[8]?"rounded-b-lg border-t-0 border-black":"rounded-lg border-black")))&&o(H,"class",ge),f[8]?$e?$e.p(f,E):($e=es(f),$e.c(),$e.m(M,null)):$e&&($e.d(1),$e=null);let Et=xe;xe=xr(f),xe!==Et&&(ct(),I(qt[Et],1,1,()=>{qt[Et]=null}),it(),N=qt[xe],N||(N=qt[xe]=kr[xe](f),N.c()),T(N,1),N.m(pe,null)),(!Ke||E[0]&2&&D!==(D="p-3 border rounded-lg transition-colors text-left hover:bg-gray-50 "+(f[1]==="Andrew"?"border-black":"border-gray-200")))&&o(te,"class",D);let Tt=Te;Te=Tr(f),Te!==Tt&&(ct(),I(Kt[Tt],1,1,()=>{Kt[Tt]=null}),it(),be=Kt[Te],be||(be=Kt[Te]=Er[Te](f),be.c()),T(be,1),be.m(Ee,null)),(!Ke||E[0]&2&&Xe!==(Xe="p-3 border rounded-lg transition-colors text-left hover:bg-gray-50 "+(f[1]==="Lily"?"border-black":"border-gray-200")))&&o(he,"class",Xe);let $t=ze;ze=Ir(f),ze!==$t&&(ct(),I(Jt[$t],1,1,()=>{Jt[$t]=null}),it(),Ue=Jt[ze],Ue||(Ue=Jt[ze]=$r[ze](f),Ue.c()),T(Ue,1),Ue.m(Qe,null)),(!Ke||E[0]&2&&Zt!==(Zt="p-3 border rounded-lg transition-colors text-left hover:bg-gray-50 "+(f[1]==="Pirate"?"border-black":"border-gray-200")))&&o(ve,"class",Zt);let Qt=He;He=Dr(f),He===Qt?xt[He].p(f,E):(ct(),I(xt[Qt],1,1,()=>{xt[Qt]=null}),it(),g=xt[He],g?g.p(f,E):(g=xt[He]=Cr[He](f),g.c()),T(g,1),g.m(fe,null)),E[0]&8&&cl(Se,f[3]),E[0]&16&&cl(Be,f[4]),f[21]?Ie?Ie.p(f,E):(Ie=ls(f),Ie.c(),Ie.m(Re,ml)):Ie&&(Ie.d(1),Ie=null),(!Ke||E[0]&64&&gl!==(gl="px-2 py-1 text-xs font-medium rounded transition-colors "+(f[6]==="api"?"bg-white shadow-sm":"text-gray-600")))&&o(pt,"class",gl),(!Ke||E[0]&64&&bl!==(bl="px-2 py-1 text-xs font-medium rounded transition-colors "+(f[6]==="local"?"bg-white shadow-sm":"text-gray-600")))&&o(ht,"class",bl),E[0]&128&&Hl(gr,gr=f[7])?(ot.d(1),ot=rs(f),ot.c(),ot.m(Bt,null)):ot.p(f,E),E[0]&128&&Hl(_r,_r=f[7])?(at.d(1),at=ss(f),at.c(),at.m(Gt,null)):at.p(f,E),f[10]?oe?(oe.p(f,E),E[0]&1024&&T(oe,1)):(oe=ns(f),oe.c(),T(oe,1),oe.m(We,null)):oe&&(ct(),I(oe,1,1,()=>{oe=null}),it()),f[18]?ae?(ae.p(f,E),E[0]&262144&&T(ae,1)):(ae=is(f),ae.c(),T(ae,1),ae.m(tl.parentNode,tl)):ae&&(ct(),I(ae,1,1,()=>{ae=null}),it()),f[22]?Ce?Ce.p(f,E):(Ce=us(f),Ce.c(),Ce.m(ll.parentNode,ll)):Ce&&(Ce.d(1),Ce=null)},i(f){Ke||(T(O.$$.fragment,f),T(F),T(Y.$$.fragment,f),T(N),T(be),T(Ue),T(g),T(At.$$.fragment,f),T(St.$$.fragment,f),T(Ft.$$.fragment,f),T(oe),T(ae),Ke=!0)},o(f){I(O.$$.fragment,f),I(F),I(Y.$$.fragment,f),I(N),I(be),I(Ue),I(g),I(At.$$.fragment,f),I(St.$$.fragment,f),I(Ft.$$.fragment,f),I(oe),I(ae),Ke=!1},d(f){f&&(c(e),c(t),c(_l),c(tl),c(ll)),ie(O),Yt[A].d(),ps(ye,f),ie(Y),$e&&$e.d(),qt[xe].d(),Kt[Te].d(),Jt[ze].d(),xt[He].d(),Ie&&Ie.d(),ie(At),ie(St),ot.d(f),ie(Ft),at.d(f),oe&&oe.d(),ae&&ae.d(f),Ce&&Ce.d(f),lr=!1,hl(vr)}}}function ul(s){const e=Math.floor(s/60),t=Math.floor(s%60);return`${e}:${t.toString().padStart(2,"0")}`}function Zs(s,e,t){let l="In a hole in the ground, there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a hobbit-hole, and that means comfort.",r="Andrew",a="Chatterbox",i=!1,h=!1,m=null,$=0,w=.25,v=.7,x=!1,O=0,ee=0,P="",y=null,C=null,k=null,A=!1,F="",re="",me=0,U=[],se=!1,W=!1,L=null,z="api",S="",M="",H=0;const G=["It was the best of times, it was the worst of times. It was the age of wisdom, it was the age of foolishness.","It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife.","All happy families are alike; each unhappy family is unhappy in its own way.","In a hole in the ground, there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a hobbit-hole, and that means comfort."];let Le=0;const Y=[{id:"chatterbox",name:"Chatterbox",badge:"recommended"},{id:"kokoro",name:"Kokoro",badge:"coming soon",disabled:!0}],ge=[{id:"andrew",name:"Andrew",description:"Older British man who speaks clearly and warmly.",sample:"/voices/andrew.mp3",preview_url:"https://huggingface.co/spaces/abidlabs/hfstudio/resolve/main/frontend/static/voices/andrew.mp3"},{id:"lily",name:"Lily",description:"Friendly, conversational tone of a woman in her 30s",sample:"/voices/lily.mp3",preview_url:"https://huggingface.co/spaces/abidlabs/hfstudio/resolve/main/frontend/static/voices/lily.mp3"},{id:"pirate",name:"Pirate",description:"Young male pirate-y voice that speaks gruffly and with excitement",sample:"/voices/pirate.mp3",preview_url:"https://huggingface.co/spaces/abidlabs/hfstudio/resolve/main/frontend/static/voices/pirate.mp3"},{id:"fairy",name:"Fairy",description:"High and airy female voice that bursts with excitement",sample:"/voices/fairy.mp3",preview_url:"https://huggingface.co/spaces/abidlabs/hfstudio/resolve/main/frontend/static/voices/fairy.mp3"}];async function De(){if(!l.trim())return;if(!(await fetch("/api/auth/user",{credentials:"include"})).ok){t(21,W=!0);return}t(9,h=!0),t(10,m=null),t(13,O=0),t(12,x=!1),t(15,P=l.length>30?l.substring(0,30)+"...":l);try{let Z=null;if(r==="Yours"&&U.length>0){const le=U[0];le&&le.voice_url&&(Z=window.location.origin+le.voice_url)}else{const le=ge.find(Mt=>Mt.name===r);le&&le.preview_url&&(Z=le.preview_url)}const J={text:l,voice_id:r.toLowerCase(),model_id:a.toLowerCase(),mode:"api",parameters:{exaggeration:w,temperature:v},voice_url:Z},X=await fetch("/api/tts/generate",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(J)});if(!X.ok){const le=await X.text();throw new Error(`HTTP error! status: ${X.status}, body: ${le}`)}const Q=await X.json();if(Q.success&&Q.audio_url)t(10,m=Q.audio_url),t(11,$=Q.generation_time||0),await ne(J,Q),setTimeout(()=>{y&&y.play().catch(()=>{})},100);else{const le=Q.error||"Unknown error occurred";te("Generation Failed",le),t(10,m=null)}}catch{te("Network Error","Failed to connect to the server. Please check your connection and try again."),t(10,m=null)}finally{t(9,h=!1)}}function Ne(){y&&(x?y.pause():y.play())}function we(){y&&t(14,ee=y.duration)}function Je(){y&&t(13,O=y.currentTime)}function je(){t(12,x=!0)}function Oe(){t(12,x=!1)}function ke(){if(m){const g=document.createElement("a");g.href=m,g.download="speech.wav",g.click()}}function Pe(g,Z){if(Z.stopPropagation(),k===g.name)C&&(C.pause(),C.currentTime=0),t(17,k=null);else{C&&C.pause(),t(17,k=g.name);const J=g.sample||"/samples/harvard.wav";C?C.src=J:(C=new Audio(J),C.addEventListener("ended",()=>{t(17,k=null)})),C.play().catch(X=>{t(17,k=null)})}}function et(g){g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),De()),g.key==="Escape"&&t(8,i=!1)}function fe(g){g.target.closest(".model-dropdown")||t(8,i=!1),g.target.closest(".voice-dropdown")}function te(g,Z=""){t(19,F=g),t(20,re=Z),t(18,A=!0)}function Me(){t(18,A=!1),t(19,F=""),t(20,re="")}function Fe(){Le=(Le+1)%G.length,t(0,l=G[Le])}async function ne(g,Z){try{let J=null;const X=U.find(le=>le.voice_name===r);if(X&&X.voice_url)J=window.location.origin+X.voice_url;else{const le=ge.find(Mt=>Mt.name===r);le&&le.preview_url&&(J=le.preview_url)}const Q=`audio_bytes = client.text_to_speech(
7
+ "${g.text.replace(/"/g,'\\"')}",
8
+ extra_body={
9
+ "exaggeration": ${g.parameters.exaggeration},
10
+ "temperature": ${g.parameters.temperature}${J?`,
11
+ "audio_url": "${J}"`:""}
12
+ }
13
+ )`;await fetch("/api/history/save",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({code:Q,result_type:"audio",result_data:{url:Z.audio_url,title:P,type:"audio"},entry_type:"generation"})}),await lt()}catch(J){console.error("Error saving to history:",J)}}async function lt(){try{const g=await fetch("/api/history/load",{method:"GET",credentials:"include"});g.ok&&(me=(await g.json()).entries.filter(X=>X.entry_type==="generation").length)}catch(g){console.error("Error loading history count:",g),me=0}}async function pe(){try{se=!0;const g=await fetch("/api/voice/user-voices",{method:"GET",credentials:"include"});if(g.ok){const Z=await g.json();t(5,U=Z.voices||[])}else t(5,U=[])}catch(g){console.error("Error loading user voices:",g),t(5,U=[])}finally{se=!1}}function xe(){return z==="local"?`pip install huggingface-hub hfstudio uv
14
+ hfstudio start ${a.toLowerCase()} --port 7861`:"pip install huggingface-hub"}function N(){return z==="local"?'client = InferenceClient(base_url="http://localhost:7861/api/v1")':`client = InferenceClient(
15
+ api_key="YOUR_HF_TOKEN", # Get your token from https://huggingface.co/settings/tokens
16
+ model="${a.toLowerCase()==="chatterbox"?"ResembleAI/chatterbox":a.toLowerCase()}",
17
+ )`}function D(){let g=null;if(r==="Yours"&&U.length>0){const Q=U[0];Q&&Q.voice_url&&(g=window.location.origin+Q.voice_url)}else{const Q=ge.find(le=>le.name===r);Q&&Q.preview_url&&(g=Q.preview_url)}const Z=l||"Hello, this is a sample text.";return`${`from huggingface_hub import InferenceClient
18
+
19
+ ${N()}`}
20
+
21
+ audio_bytes = client.text_to_speech(
22
+ "${Z.replace(/"/g,'\\"')}",
23
+ extra_body={
24
+ "exaggeration": ${w},
25
+ "temperature": ${v}${g?`,
26
+ "audio_url": "${g}"`:""}
27
+ }
28
+ )`}function q(g,Z="Copied to clipboard!"){navigator.clipboard.writeText(g).then(()=>{t(22,L=Z),setTimeout(()=>{t(22,L=null)},2e3)})}function he(){const g=[];if(S){const X=S.includes("pip install")||S.includes("hfstudio start")?"bash":"";g.push(`## Setup (Run in Terminal)
29
+
30
+ \`\`\`${X}
31
+ ${S}
32
+ \`\`\``)}M&&g.push(`## Python Code
33
+
34
+ \`\`\`python
35
+ ${M}
36
+ \`\`\``);const Z=g.join(`
37
+
38
+ `);q(Z,"All code copied as Markdown!")}vs(async()=>{await lt(),await pe()});function _e(){l=this.value,t(0,l)}const Ge=()=>t(8,i=!i),rt=g=>{g.disabled||(t(2,a=g.name),t(8,i=!1))},Ye=g=>Pe({name:"Andrew",sample:"/voices/andrew.mp3"},g),Ee=()=>t(1,r="Andrew"),Te=g=>Pe({name:"Lily",sample:"/voices/lily.mp3"},g),be=()=>t(1,r="Lily"),Xe=g=>Pe({name:"Pirate",sample:"/voices/pirate.mp3"},g),ut=()=>t(1,r="Pirate"),ve=g=>Pe({name:"Yours",sample:U[0].voice_url},g),Ae=()=>t(1,r="Yours");function qe(){w=qr(this.value),t(3,w)}function Pt(){v=qr(this.value),t(4,v)}const fl=()=>t(21,W=!1),Qe=()=>t(6,z="api"),ze=()=>t(6,z="local"),Ue=()=>window.open("https://huggingface.co/new-space","_blank"),Zt=()=>q(S),pl=()=>q(M);function He(g){ys[g?"unshift":"push"](()=>{y=g,t(16,y)})}return s.$$.update=()=>{s.$$.dirty[0]&255&&(t(23,S=xe()),t(24,M=D()),t(7,H++,H))},[l,r,a,w,v,U,z,H,i,h,m,$,x,O,ee,P,y,k,A,F,re,W,L,S,M,Y,De,Ne,we,Je,je,Oe,ke,Pe,et,fe,Me,Fe,q,he,_e,Ge,rt,Ye,Ee,Te,be,Xe,ut,ve,Ae,qe,Pt,fl,Qe,ze,Ue,Zt,pl,He]}class on extends ds{constructor(e){super(),fs(this,e,Zs,Ws,Hl,{},null,[-1,-1,-1])}}export{on as component};
hfstudio/static/_app/version.json CHANGED
@@ -1 +1 @@
1
- {"version":"1761292043688"}
 
1
+ {"version":"1761293217408"}
hfstudio/static/index.html CHANGED
@@ -6,25 +6,25 @@
6
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
  <title>HFStudio - Text to Speech</title>
8
 
9
- <link rel="modulepreload" href="/_app/immutable/entry/start.Dd7aIwC-.js">
10
- <link rel="modulepreload" href="/_app/immutable/chunks/ue2h1h1Z.js">
11
  <link rel="modulepreload" href="/_app/immutable/chunks/TRxHAhOH.js">
12
- <link rel="modulepreload" href="/_app/immutable/entry/app.DVFwIaHe.js">
13
  <link rel="modulepreload" href="/_app/immutable/chunks/IHki7fMi.js">
14
  </head>
15
  <body data-sveltekit-preload-data="hover">
16
  <div style="display: contents">
17
  <script>
18
  {
19
- __sveltekit_6juxp8 = {
20
  base: ""
21
  };
22
 
23
  const element = document.currentScript.parentElement;
24
 
25
  Promise.all([
26
- import("/_app/immutable/entry/start.Dd7aIwC-.js"),
27
- import("/_app/immutable/entry/app.DVFwIaHe.js")
28
  ]).then(([kit, app]) => {
29
  kit.start(app, element);
30
  });
 
6
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
  <title>HFStudio - Text to Speech</title>
8
 
9
+ <link rel="modulepreload" href="/_app/immutable/entry/start.CKoTx8mP.js">
10
+ <link rel="modulepreload" href="/_app/immutable/chunks/CxVfujWq.js">
11
  <link rel="modulepreload" href="/_app/immutable/chunks/TRxHAhOH.js">
12
+ <link rel="modulepreload" href="/_app/immutable/entry/app.DuRM45UA.js">
13
  <link rel="modulepreload" href="/_app/immutable/chunks/IHki7fMi.js">
14
  </head>
15
  <body data-sveltekit-preload-data="hover">
16
  <div style="display: contents">
17
  <script>
18
  {
19
+ __sveltekit_81rgwk = {
20
  base: ""
21
  };
22
 
23
  const element = document.currentScript.parentElement;
24
 
25
  Promise.all([
26
+ import("/_app/immutable/entry/start.CKoTx8mP.js"),
27
+ import("/_app/immutable/entry/app.DuRM45UA.js")
28
  ]).then(([kit, app]) => {
29
  kit.start(app, element);
30
  });