GitHub Action
commited on
Commit
·
000ec77
1
Parent(s):
c9e6c62
Sync from GitHub: bfd64de499d58f7764db24390ce01fb39ca3415e
Browse files- .gitattributes +6 -0
- frontend/package.json +1 -1
- frontend/src/routes/+layout.svelte +34 -3
- frontend/src/routes/+page.svelte +8 -0
- hfstudio/static/_app/immutable/assets/0.DjRUhvta.css +1 -0
- hfstudio/static/_app/immutable/chunks/CThD--Q6.js +3 -0
- hfstudio/static/_app/immutable/chunks/vedv2sVy.js +1 -0
- hfstudio/static/_app/immutable/entry/app.BdL7ph0c.js +2 -0
- hfstudio/static/_app/immutable/entry/start.BPSNNA26.js +1 -0
- hfstudio/static/_app/immutable/nodes/0.CCn_0NlH.js +3 -0
- hfstudio/static/_app/immutable/nodes/1.jgEqIh0i.js +1 -0
- hfstudio/static/_app/immutable/nodes/2.PwaXI23i.js +65 -0
- hfstudio/static/_app/immutable/nodes/3.COyHjFz7.js +1 -0
- hfstudio/static/_app/version.json +1 -1
- hfstudio/static/index.html +6 -6
.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-studio-logo.png filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
hfstudio/static/assets/hf-logo.png filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
frontend/static/assets/hf-studio-logo.png filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
frontend/static/assets/hf-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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "hfstudio-frontend",
|
| 3 |
-
"version": "0.1.
|
| 4 |
"private": true,
|
| 5 |
"scripts": {
|
| 6 |
"dev": "vite dev",
|
|
|
|
| 1 |
{
|
| 2 |
"name": "hfstudio-frontend",
|
| 3 |
+
"version": "0.1.2",
|
| 4 |
"private": true,
|
| 5 |
"scripts": {
|
| 6 |
"dev": "vite dev",
|
frontend/src/routes/+layout.svelte
CHANGED
|
@@ -12,9 +12,19 @@
|
|
| 12 |
let tokenError = '';
|
| 13 |
let isLocalEnvironment = false;
|
| 14 |
let isCheckingAuth = true;
|
|
|
|
| 15 |
|
| 16 |
onMount(() => {
|
| 17 |
console.log('onMount called - starting auth check');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
// First check if we can use local token (for local development)
|
| 19 |
// This should happen before checking localStorage to prioritize local tokens
|
| 20 |
checkLocalTokenAvailability();
|
|
@@ -203,7 +213,7 @@
|
|
| 203 |
|
| 204 |
<div class="flex h-screen bg-white">
|
| 205 |
<!-- Sidebar -->
|
| 206 |
-
<aside class="w-56 border-r border-gray-200 bg-white flex-shrink-0 {sidebarOpen ? '' : 'hidden'}">
|
| 207 |
<div class="p-4 border-b border-gray-200">
|
| 208 |
<div class="flex items-center gap-3">
|
| 209 |
<img src="/assets/hf-studio-logo.png" alt="HF Logo" class="w-8 h-8" />
|
|
@@ -211,7 +221,7 @@
|
|
| 211 |
</div>
|
| 212 |
</div>
|
| 213 |
|
| 214 |
-
<nav class="p-2 text-sm">
|
| 215 |
<div class="mt-2 mb-1 px-2 text-xs font-medium text-gray-500 uppercase">
|
| 216 |
Tasks
|
| 217 |
</div>
|
|
@@ -268,7 +278,7 @@
|
|
| 268 |
</nav>
|
| 269 |
|
| 270 |
<!-- Sign in with Hugging Face at bottom -->
|
| 271 |
-
<div class="
|
| 272 |
<button
|
| 273 |
on:click={handleAuthAction}
|
| 274 |
disabled={isCheckingAuth}
|
|
@@ -283,6 +293,27 @@
|
|
| 283 |
<span>Sign In</span>
|
| 284 |
{/if}
|
| 285 |
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 286 |
</div>
|
| 287 |
</aside>
|
| 288 |
|
|
|
|
| 12 |
let tokenError = '';
|
| 13 |
let isLocalEnvironment = false;
|
| 14 |
let isCheckingAuth = true;
|
| 15 |
+
let showSignInPopover = false;
|
| 16 |
|
| 17 |
onMount(() => {
|
| 18 |
console.log('onMount called - starting auth check');
|
| 19 |
+
|
| 20 |
+
// Listen for sign in popover requests from child components
|
| 21 |
+
window.addEventListener('show-signin-popover', () => {
|
| 22 |
+
showSignInPopover = true;
|
| 23 |
+
setTimeout(() => {
|
| 24 |
+
showSignInPopover = false;
|
| 25 |
+
}, 4000);
|
| 26 |
+
});
|
| 27 |
+
|
| 28 |
// First check if we can use local token (for local development)
|
| 29 |
// This should happen before checking localStorage to prioritize local tokens
|
| 30 |
checkLocalTokenAvailability();
|
|
|
|
| 213 |
|
| 214 |
<div class="flex h-screen bg-white">
|
| 215 |
<!-- Sidebar -->
|
| 216 |
+
<aside class="w-56 border-r border-gray-200 bg-white flex-shrink-0 flex flex-col h-full {sidebarOpen ? '' : 'hidden'}">
|
| 217 |
<div class="p-4 border-b border-gray-200">
|
| 218 |
<div class="flex items-center gap-3">
|
| 219 |
<img src="/assets/hf-studio-logo.png" alt="HF Logo" class="w-8 h-8" />
|
|
|
|
| 221 |
</div>
|
| 222 |
</div>
|
| 223 |
|
| 224 |
+
<nav class="p-2 text-sm flex-1">
|
| 225 |
<div class="mt-2 mb-1 px-2 text-xs font-medium text-gray-500 uppercase">
|
| 226 |
Tasks
|
| 227 |
</div>
|
|
|
|
| 278 |
</nav>
|
| 279 |
|
| 280 |
<!-- Sign in with Hugging Face at bottom -->
|
| 281 |
+
<div class="p-2 relative">
|
| 282 |
<button
|
| 283 |
on:click={handleAuthAction}
|
| 284 |
disabled={isCheckingAuth}
|
|
|
|
| 293 |
<span>Sign In</span>
|
| 294 |
{/if}
|
| 295 |
</button>
|
| 296 |
+
|
| 297 |
+
<!-- Sign In Popover -->
|
| 298 |
+
{#if showSignInPopover && !isLoggedIn}
|
| 299 |
+
<div class="absolute bottom-full left-0 right-0 mb-2 z-50">
|
| 300 |
+
<div class="bg-blue-600 text-white text-sm rounded-lg p-3 shadow-lg relative">
|
| 301 |
+
<div class="flex items-start gap-2">
|
| 302 |
+
<svg class="w-4 h-4 mt-0.5 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20">
|
| 303 |
+
<path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"/>
|
| 304 |
+
</svg>
|
| 305 |
+
<div>
|
| 306 |
+
<p class="font-medium">Sign in required</p>
|
| 307 |
+
<p class="text-blue-100 text-xs mt-1">You need to sign in to use HuggingFace Inference Providers for text-to-speech generation.</p>
|
| 308 |
+
</div>
|
| 309 |
+
</div>
|
| 310 |
+
<!-- Arrow pointing down -->
|
| 311 |
+
<div class="absolute top-full left-1/2 transform -translate-x-1/2">
|
| 312 |
+
<div class="w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-blue-600"></div>
|
| 313 |
+
</div>
|
| 314 |
+
</div>
|
| 315 |
+
</div>
|
| 316 |
+
{/if}
|
| 317 |
</div>
|
| 318 |
</aside>
|
| 319 |
|
frontend/src/routes/+page.svelte
CHANGED
|
@@ -39,6 +39,14 @@
|
|
| 39 |
console.log('generateSpeech called, text:', text.trim().substring(0, 50));
|
| 40 |
if (!text.trim()) return;
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
console.log('Starting generation...');
|
| 43 |
isGenerating = true;
|
| 44 |
audioUrl = null;
|
|
|
|
| 39 |
console.log('generateSpeech called, text:', text.trim().substring(0, 50));
|
| 40 |
if (!text.trim()) return;
|
| 41 |
|
| 42 |
+
// Check if user is logged in (has access token)
|
| 43 |
+
const accessToken = getAccessToken();
|
| 44 |
+
if (!accessToken) {
|
| 45 |
+
// Trigger popover over sign in button in layout
|
| 46 |
+
window.dispatchEvent(new CustomEvent('show-signin-popover'));
|
| 47 |
+
return;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
console.log('Starting generation...');
|
| 51 |
isGenerating = true;
|
| 52 |
audioUrl = null;
|
hfstudio/static/_app/immutable/assets/0.DjRUhvta.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}:root{--background: 0 0% 100%;--foreground: 240 10% 3.9%;--card: 0 0% 100%;--card-foreground: 240 10% 3.9%;--popover: 0 0% 100%;--popover-foreground: 240 10% 3.9%;--primary: 240 5.9% 10%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 90%;--input: 240 5.9% 90%;--ring: 240 5.9% 10%;--radius: .5rem}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-56{left:14rem}.right-0{right:0}.right-4{right:1rem}.right-80{right:20rem}.top-full{top:100%}.z-10{z-index:10}.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}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.block{display:block}.flex{display:flex}.contents{display:contents}.hidden{display:none}.h-0{height:0px}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-12{height:3rem}.h-2{height:.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-12{width:3rem}.w-2{width:.5rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-8{width:2rem}.w-80{width:20rem}.w-full{width:100%}.max-w-4xl{max-width:56rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;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))}.scale-150{--tw-scale-x: 1.5;--tw-scale-y: 1.5;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}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * 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))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-4{border-right-width:4px}.border-t{border-top-width:1px}.border-t-4{border-top-width:4px}.border-amber-400{--tw-border-opacity: 1;border-color:rgb(251 191 36 / 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-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-l-transparent{border-left-color:transparent}.border-r-transparent{border-right-color:transparent}.border-t-blue-600{--tw-border-opacity: 1;border-top-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.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-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / 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-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / 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-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-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.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)}.to-orange-500{--tw-gradient-to: #f97316 var(--tw-gradient-to-position)}.bg-right{background-position:right}.bg-no-repeat{background-repeat:no-repeat}.p-0\.5{padding:.125rem}.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-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-3{padding-top:.75rem;padding-bottom:.75rem}.pb-24{padding-bottom:6rem}.pr-10{padding-right:2.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.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-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-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.text-blue-100{--tw-text-opacity: 1;color:rgb(219 234 254 / 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-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.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)}.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}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.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\: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-orange-600:hover{--tw-bg-opacity: 1;background-color:rgb(234 88 12 / 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\:to-orange-600:hover{--tw-gradient-to: #ea580c var(--tw-gradient-to-position)}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / 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}
|
hfstudio/static/_app/immutable/chunks/CThD--Q6.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var kt=Object.defineProperty;var Et=(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)=>Et(e,typeof t!="symbol"?t+"":t,n);import{S as At,G as Rt,Y as Tt,Z as Ut,_ as It,$ as Lt,a0 as $t,a1 as xt,r as ve,a2 as Ct,H as be,n as ge,s as Pt}from"./BI_gvUUO.js";class Qe extends At{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 Ot extends Qe{}const Nt=Object.freeze(Object.defineProperty({__proto__:null,SvelteComponent:Qe,SvelteComponentTyped:Ot,afterUpdate:Rt,beforeUpdate:Tt,createEventDispatcher:Ut,getAllContexts:It,getContext:Lt,hasContext:$t,onDestroy:xt,onMount:ve,setContext:Ct,tick:be},Symbol.toStringTag,{value:"Module"}));class ce{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 jt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function Dt(e){return e.split("%25").map(decodeURI).join("%25")}function Bt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function Ft(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 Mt(...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 qt(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 Gt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:(t==null?void 0:t.method)||"GET")!=="GET"&&Y.delete(Ue(e)),Gt(e,t));const Y=new Map;function Yt(e,t){const n=Ue(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=qt(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Ht(e,t,n){if(Y.size>0){const r=Ue(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 Ue(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="${Mt(...a)}"]`}return r}const Kt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function zt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Jt(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=Kt.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 Wt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Jt(e){return e.slice(1).split("/").filter(Wt)}function Xt(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 Zt({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}=zt(o),f={id:o,exec:p=>{const u=h.exec(p);if(u)return Xt(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 et(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Me(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const D=[];function Ie(e,t=ge){let n;const r=new Set;function a(o){if(Pt(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 Xe;const $=((Xe=globalThis.__sveltekit_1ef7hlc)==null?void 0:Xe.base)??"";var Ze;const Qt=((Ze=globalThis.__sveltekit_1ef7hlc)==null?void 0:Ze.assets)??$??"",en="1760686118005",tt="sveltekit:snapshot",nt="sveltekit:scroll",at="sveltekit:states",tn="sveltekit:pageurl",F="sveltekit:history",z="sveltekit:navigation",O={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Z=location.origin;function Le(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 Se(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)===Z&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function ee(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 qe(e){const t=Ie(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 nn(){const{set:e,subscribe:t}=Ie(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Qt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==en;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!==Z||!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 an(e){const t=on(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 rn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function on(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|=rn.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 sn=-1,cn=-2,ln=-3,fn=-4,un=-5,dn=-6;function hn(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===sn)return;if(s===ln)return NaN;if(s===fn)return 1/0;if(s===un)return-1/0;if(s===dn)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=an(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!==cn&&(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 pn=new Set([...it]);[...pn];function gn(e){return e.filter(t=>t!=null)}const mn="x-sveltekit-invalidated",_n="x-sveltekit-trailing-slash";function te(e){return e instanceof ce||e instanceof Te?e.status:500}function wn(e){return e instanceof Te?e.text:"Internal Error"}let T,W,we;const yn=ve.toString().includes("$$")||/function \w+\(\) \{\}/.test(ve.toString());yn?(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 vn(e){Object.assign(T,e)}const bn="/__data.json",Sn=".html__data.json";function kn(e){return e.endsWith(".html")?e.replace(/\.html$/,Sn):e.replace(/\/$/,"")+bn}const Ge={spanContext(){return En},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}},En={traceId:"",spanId:"",traceFlags:0},{tick:An}=Nt,Rn=new Set(["icon","shortcut icon","apple-touch-icon"]),j=et(nt)??{},J=et(tt)??{},C={url:qe({}),page:qe({}),navigating:Ie(null),updated:nn()};function $e(e){j[e]=le()}function Tn(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 Ye(){}let xe,ke,ne,x,Ee,k;const ae=[],re=[];let I=null;const Q=new Map,lt=new Set,Un=new Set,H=new Set;let b={branch:[],error:null,url:null},Ce=!1,oe=!1,He=!0,X=!1,G=!1,ft=!1,Pe=!1,ut,A,L,N;const K=new Set,Ke=new Map;async function Kn(e,t,n){var s,i,o,c,l;(s=globalThis.__sveltekit_1ef7hlc)!=null&&s.data&&globalThis.__sveltekit_1ef7hlc.data,document.URL!==location.href&&(location.href=location.href),k=e,await((o=(i=e.hooks).init)==null?void 0:o.call(i)),xe=Zt(e),x=document.documentElement,Ee=t,ke=e.nodes[0],ne=e.nodes[1],ke(),ne(),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 M({type:"enter",url:Le(k.hash?Fn(new URL(location.href)):location.href),replace_state:!0}),a()),jn()}function In(){ae.length=0,Pe=!1}function dt(e){re.some(t=>t==null?void 0:t.snapshot)&&(J[e]=re.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=re[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function ze(){$e(A),Me(nt,j),dt(L),Me(tt,J)}async function pt(e,t,n,r){let a;t.invalidateAll&&(I=null),await M({type:"goto",url:Le(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Pe=!0,a=[...Ke.keys()]),t.invalidate&&t.invalidate.forEach(Nn)}}),t.invalidateAll&&be().then(be).then(()=>{Ke.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!==(I==null?void 0:I.id)){const t={};K.add(t),I={id:e.id,token:t,promise:_t({...e,preload:t}).then(n=>(K.delete(t),n.type==="loaded"&&n.state.error&&(I=null),n))}}return I.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 gt(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 k.root({target:t,props:{...e.props,stores:C,components:re},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))}oe=!0}function se({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=jt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:gn(n).map(f=>f.node.component),page:De(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 Oe({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:Ge,current:Ge},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:Ft(n,()=>{o&&(c.url=!0)},u=>{o&&c.search_params.add(u)},k.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:U}=mt(u,g,n);return o&&f(_.href),U},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 mt(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=oe?Ht(r,a.href,t):Yt(r,t);return{resolved:a,promise:s}}function We(e,t,n,r,a,s){if(Pe)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(ae.some(o=>o(new URL(i))))return!0;return!1}function Ne(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 Je({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:De(T),constructors:[]}}}async function _t({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if((I==null?void 0:I.id)===e)return K.delete(I.token),I.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!==ie(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],S=!!(w!=null&&w[0])&&((v==null?void 0:v.loader)!==w[1]||We(p,y,h,f,(P=v.server)==null?void 0:P.uses,r));return S&&(p=!0),S});if(u.some(Boolean)){try{d=await vt(n,u)}catch(w){const m=await V(w,{url:n,params:r,route:{id:e}});return K.has(s)?Je({error:m,url:n,params:r,route:a}):ue({status:te(w),error:m,url:n,route:a})}if(d.type==="redirect")return d}const g=d==null?void 0:d.nodes;let _=!1;const U=l.map(async(w,m)=>{var he;if(!w)return;const v=b.branch[m],S=g==null?void 0:g[m];if((!S||S.type==="skip")&&w[1]===(v==null?void 0:v.loader)&&!We(_,y,h,f,(he=v.universal)==null?void 0:he.uses,r))return v;if(_=!0,(S==null?void 0:S.type)==="error")throw S;return Oe({loader:w[1],url:n,params:r,route:a,parent:async()=>{var Fe;const Be={};for(let pe=0;pe<m;pe+=1)Object.assign(Be,(Fe=await U[pe])==null?void 0:Fe.data);return Be},server_data_node:Ne(S===void 0&&w[0]?{type:"skip"}:S??null,w[0]?v==null?void 0:v.server:void 0)})});for(const w of U)w.catch(()=>{});const E=[];for(let w=0;w<l.length;w+=1)if(l[w])try{E.push(await U[w])}catch(m){if(m instanceof Re)return{type:"redirect",location:m.location};if(K.has(s))return Je({error:await V(m,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let v=te(m),S;if(g!=null&&g.includes(m))v=m.status??v,S=m.error;else if(m instanceof ce)S=m.body;else{if(await C.updated.check())return await ct(),await q(n);S=await V(m,{params:r,url:n,route:{id:a.id}})}const P=await xn(w,E,i);return P?se({url:n,params:r,branch:E.slice(0,P.idx).concat(P.node),status:v,error:S,route:a}):await yt(n,{id:a.id},S,v)}else E.push(void 0);return se({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(k.server_loads[0]===0)try{const o=await vt(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==Z||n.pathname!==location.pathname||Ce)&&await q(n)}try{const o=await Oe({loader:ke,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ne(s)}),c={node:await ne(),loader:ne,universal:null,server:null,data:null};return se({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Re)return pt(new URL(o.location,location.href),{},0);throw o}}async function Cn(e){const t=e.href;if(Q.has(t))return Q.get(t);let n;try{const r=(async()=>{let a=await k.hooks.reroute({url:new URL(e),fetch:async(s,i)=>mt(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);k.hash?s.hash=a:s.pathname=a,a=s}return a})();Q.set(t,r),n=await r}catch{Q.delete(t);return}return n}async function de(e,t){if(e&&!fe(e,$,k.hash)){const n=await Cn(e);if(!n)return;const r=Pn(n);for(const a of xe){const s=a.exec(r);if(s)return{id:ie(e),invalidating:t,route:a,params:Bt(s),url:e}}}}function Pn(e){return Dt(k.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice($.length))||"/"}function ie(e){return(k.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function wt({url:e,type:t,intent:n,delta:r,event:a}){let s=!1;const i=je(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 M({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:l=Ye,block:d=Ye,event:h}){const y=N;N=c;const f=await de(t,!1),p=e==="enter"?je(b,f,t,e):wt({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,oe&&p.navigation.type!=="enter"&&C.navigating.set(W.current=p.navigation);let _=f&&await _t(f);if(!_){if(fe(t,$,k.hash))return await q(t,s);_=await yt(t,{id:null},await V(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 M({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 V(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(),$e(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,[at]:i};(s?history.replaceState:history.pushState).call(history,v,"",t),s||Tn(A,L)}if(I=null,_.props.page.state=i,oe){const m=(await Promise.all(Array.from(Un,v=>v(p.navigation)))).filter(v=>typeof v=="function");if(m.length>0){let v=function(){m.forEach(S=>{H.delete(S)})};m.push(v),m.forEach(S=>{H.add(S)})}b=_.state,_.props.page&&(_.props.page.url=t),ut.$set(_.props),vn(_.props.page),ft=!0}else gt(_,Ee,!1);const{activeElement:U}=document;await An();let E=n?n.scroll:a?le():null;if(He){const m=t.hash&&document.getElementById(St(t));if(E)scrollTo(E.x,E.y);else if(m){m.scrollIntoView();const{top:v,left:S}=m.getBoundingClientRect();E={x:pageXOffset+S,y:pageYOffset+v}}else scrollTo(0,0)}const w=document.activeElement!==U&&document.activeElement!==document.body;!r&&!w&&Bn(t,E),He=!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 yt(e,t,n,r,a){return e.origin===Z&&e.pathname===location.pathname&&!Ce?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}=Se(l,$,k.hash);if(y||f)return;const p=ee(l),u=h&&ie(b.url)===ie(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}=Se(o,$,k.hash);if(l||d)continue;const h=ee(o);h.reload||(h.preload_code===O.viewport&&a.observe(o),h.preload_code===O.eager&&ye(c))}}H.add(i),i()}function V(e,t){if(e instanceof ce)return e.body;const n=te(e),r=wn(e);return k.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function zn(e,t={}){return e=new URL(Le(e)),e.origin!==Z?Promise.reject(new Error("goto: invalid URL")):pt(e,t,0)}function Nn(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function jn(){var t;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(ze(),!X){const a=je(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"&&ze()}),(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}=Se(r,$,k.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=ee(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[d,h]=(k.hash?a.hash.replace(/^#/,""):a.href).split("#"),y=d===me(location);if(s||c.reload&&(!y||!h)){wt({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,$e(A),e(a),!c.replace_state)return;G=!1}n.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await M({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=ee(c);if(l.reload)return;n.preventDefault(),n.stopPropagation();const d=new FormData(c,a);o.search=new URLSearchParams(d).toString(),M({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[at]??{},o=new URL(n.state[tn]??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 M({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),k.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"))Rn.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(De(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}){Ce=!0;const l=new URL(location.href);let d;({params:a={},route:s={id:null}}=await de(l,!1)||{}),d=xe.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=bt(_.uses)),Oe({loader:k.nodes[u],url:l,params:a,route:s,parent:async()=>{const U={};for(let E=0;E<g;E+=1)Object.assign(U,(await f[E]).data);return U},server_data_node:Ne(_)})}),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=se({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:te(f),error:await V(f,{url:l,params:a,route:s}),url:l,route:s}),e.textContent="",y=!1}h.props.page&&(h.props.page.state={}),gt(h,e,y)}async function vt(e,t){var s;const n=new URL(e);n.pathname=kn(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(_n,"1"),n.searchParams.append(mn,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 ce(a.status,i)}return new Promise(async i=>{var h;const o=new Map,c=a.body.getReader();function l(y){return hn(y,{...k.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=bt(g.uses),g.data=l(g.data))}),i(u);else if(u.type==="chunk"){const{id:g,data:_,error:U}=u,E=o.get(g);o.delete(g),U?E.reject(l(U)):E.fulfil(l(_))}}}})}function bt(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=St(e);if(r&&document.getElementById(r)){const{x:s,y:i}=t??le();setTimeout(()=>{const o=history.state;Ae=!0,location.replace(`#${r}`),k.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 je(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 De(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 St(e){let t;if(k.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Kn as a,zn as g,qn as l,C as s};
|
hfstudio/static/_app/immutable/chunks/vedv2sVy.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{s as e}from"./CThD--Q6.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/entry/app.BdL7ph0c.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.CCn_0NlH.js","../chunks/BI_gvUUO.js","../chunks/IHki7fMi.js","../assets/0.DjRUhvta.css","../nodes/1.jgEqIh0i.js","../chunks/vedv2sVy.js","../chunks/CThD--Q6.js","../nodes/2.PwaXI23i.js","../assets/2.We9sRuZI.css","../nodes/3.COyHjFz7.js"])))=>i.map(i=>d[i]);
|
| 2 |
+
import{S as C,i as q,s as B,d,x as h,y as g,D as S,E as A,b as E,h as U,F as w,k as F,G,r as H,H as J,I as y,J as P,K as R,L,M as N,o as D,N as p,e as K,f as W,j as z,O as I,a as Q,g as X,t as Y}from"../chunks/BI_gvUUO.js";import"../chunks/IHki7fMi.js";const Z="modulepreload",M=function(o,e){return new URL(o,e).href},T={},O=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 T)return;T[f]=!0;const l=f.endsWith(".css"),_=l?'[rel="stylesheet"]':"";if(!!i)for(let k=t.length-1;k>=0;k--){const v=t[k];if(v.href===f&&(!l||v.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,v)=>{m.addEventListener("load",k),m.addEventListener("error",()=>v(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&&N(e.$$.fragment,t),n=w()},m(t,s){e&&L(e,t,s),E(t,n,s),i=!0},p(t,s){if(s&4&&r!==(r=t[2][0])){if(e){S();const a=e;h(a.$$.fragment,1,0,()=>{P(a,1)}),A()}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&&N(e.$$.fragment,t),n=w()},m(t,s){e&&L(e,t,s),E(t,n,s),i=!0},p(t,s){if(s&4&&r!==(r=t[2][0])){if(e){S();const a=e;h(a.$$.fragment,1,0,()=>{P(a,1)}),A()}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&&N(e.$$.fragment,t),n=w()},m(t,s){e&&L(e,t,s),E(t,n,s),i=!0},p(t,s){if(s&4&&r!==(r=t[2][1])){if(e){S();const a=e;h(a.$$.fragment,1,0,()=>{P(a,1)}),A()}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 V(o){let e,n=o[7]&&j(o);return{c(){e=z("div"),n&&n.c(),this.h()},l(i){e=K(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var r=W(e);n&&n.l(r),r.forEach(d),this.h()},h(){D(e,"id","svelte-announcer"),D(e,"aria-live","assertive"),D(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){E(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){E(n,e,i)},p(n,i){i&256&&Q(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]&&V(o);return{c(){n.c(),i=F(),f&&f.c(),r=w()},l(l){n.l(l),i=U(l),f&&f.l(l),r=w()},m(l,_){s[e].m(l,_),E(l,i,_),f&&f.m(l,_),E(l,r,_),u=!0},p(l,[_]){let b=e;e=a(l),e===b?s[e].p(l,_):(S(),h(s[b],1,1,()=>{s[b]=null}),A(),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=V(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;G(i.page.notify);let l=!1,_=!1,b=null;H(()=>{const c=i.page.subscribe(()=>{l&&(n(7,_=!0),J().then(()=>{n(8,b=document.title||"untitled page")}))});return n(6,l=!0),c});function m(c){I[c?"unshift":"push"](()=>{t[1]=c,n(0,t)})}function k(c){I[c?"unshift":"push"](()=>{t[0]=c,n(0,t)})}function v(c){I[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,v]}class le extends C{constructor(e){super(),q(this,e,ne,te,B,{stores:9,page:1,constructors:2,components:0,form:3,data_0:4,data_1:5})}}const fe=[()=>O(()=>import("../nodes/0.CCn_0NlH.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>O(()=>import("../nodes/1.jgEqIh0i.js"),__vite__mapDeps([4,1,2,5,6]),import.meta.url),()=>O(()=>import("../nodes/2.PwaXI23i.js"),__vite__mapDeps([7,1,2,8]),import.meta.url),()=>O(()=>import("../nodes/3.COyHjFz7.js"),__vite__mapDeps([9,1,2,6,5]),import.meta.url)],ce=[],ue={"/":[2],"/auth/callback":[3]},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.BPSNNA26.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{l as o,a as r}from"../chunks/CThD--Q6.js";export{o as load_css,r as start};
|
hfstudio/static/_app/immutable/nodes/0.CCn_0NlH.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{S as Ie,i as Le,s as Se,v as Ee,d as _,w as Ce,x as He,y as Me,o as a,z as Ae,A as Ne,B as Pe,b as Z,c as n,u as se,m as Ue,e as c,f as P,q as S,h as v,j as u,k as x,r as Be,C as xe,a as me,g as ne,t as le,n as De}from"../chunks/BI_gvUUO.js";import"../chunks/IHki7fMi.js";function je(r){let t,e="Sign In";return{c(){t=u("span"),t.textContent=e},l(s){t=c(s,"SPAN",{"data-svelte-h":!0}),S(t)!=="svelte-6n3gky"&&(t.textContent=e)},m(s,f){Z(s,t,f)},p:De,d(s){s&&_(t)}}}function Ve(r){let t,e,s;return{c(){t=u("span"),e=le("Sign Out, "),s=le(r[2])},l(f){t=c(f,"SPAN",{});var b=P(t);e=ne(b,"Sign Out, "),s=ne(b,r[2]),b.forEach(_)},m(f,b){Z(f,t,b),n(t,e),n(t,s)},p(f,b){b&4&&me(s,f[2])},d(f){f&&_(t)}}}function Oe(r){let t,e,s=r[1]?"logged in":"not logged in",f,b;return{c(){t=u("span"),e=le("Checking... ("),f=le(s),b=le(")")},l(l){t=c(l,"SPAN",{});var o=P(t);e=ne(o,"Checking... ("),f=ne(o,s),b=ne(o,")"),o.forEach(_)},m(l,o){Z(l,t,o),n(t,e),n(t,f),n(t,b)},p(l,o){o&2&&s!==(s=l[1]?"logged in":"not logged in")&&me(f,s)},d(l){l&&_(t)}}}function ke(r){let t,e='<div class="bg-blue-600 text-white text-sm rounded-lg p-3 shadow-lg relative"><div class="flex items-start gap-2"><svg class="w-4 h-4 mt-0.5 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg> <div><p class="font-medium">Sign in required</p> <p class="text-blue-100 text-xs mt-1">You need to sign in to use HuggingFace Inference Providers for text-to-speech generation.</p></div></div> <div class="absolute top-full left-1/2 transform -translate-x-1/2"><div class="w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-blue-600"></div></div></div>';return{c(){t=u("div"),t.innerHTML=e,this.h()},l(s){t=c(s,"DIV",{class:!0,"data-svelte-h":!0}),S(t)!=="svelte-drpr74"&&(t.innerHTML=e),this.h()},h(){a(t,"class","absolute bottom-full left-0 right-0 mb-2 z-50")},m(s,f){Z(s,t,f)},d(s){s&&_(t)}}}function we(r){let t,e,s,f="Sign In with HuggingFace Token",b,l,o,G="<strong>Manual Token Entry:</strong> Please enter your HuggingFace token.",I,g,U=`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 "Inference API" permissions<br/>
|
| 3 |
+
3. Copy and paste it below`,Y,F,k,E,W="HuggingFace Token",J,m,K,Q,y,j,d="Cancel",i,w,R="Sign In",O,oe,T=r[6]&&ye(),h=r[5]&&Te(r);return{c(){t=u("div"),e=u("div"),s=u("h2"),s.textContent=f,b=x(),l=u("div"),o=u("p"),o.innerHTML=G,I=x(),g=u("p"),g.innerHTML=U,Y=x(),T&&T.c(),F=x(),k=u("div"),E=u("label"),E.textContent=W,J=x(),m=u("input"),K=x(),h&&h.c(),Q=x(),y=u("div"),j=u("button"),j.textContent=d,i=x(),w=u("button"),w.textContent=R,this.h()},l(A){t=c(A,"DIV",{class:!0});var z=P(t);e=c(z,"DIV",{class:!0});var L=P(e);s=c(L,"H2",{class:!0,"data-svelte-h":!0}),S(s)!=="svelte-1t0ehet"&&(s.textContent=f),b=v(L),l=c(L,"DIV",{class:!0});var C=P(l);o=c(C,"P",{class:!0,"data-svelte-h":!0}),S(o)!=="svelte-344vn4"&&(o.innerHTML=G),I=v(C),g=c(C,"P",{class:!0,"data-svelte-h":!0}),S(g)!=="svelte-1ffvpx3"&&(g.innerHTML=U),Y=v(C),T&&T.l(C),C.forEach(_),F=v(L),k=c(L,"DIV",{class:!0});var B=P(k);E=c(B,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),S(E)!=="svelte-vtbmxo"&&(E.textContent=W),J=v(B),m=c(B,"INPUT",{id:!0,type:!0,placeholder:!0,class:!0}),K=v(B),h&&h.l(B),B.forEach(_),Q=v(L),y=c(L,"DIV",{class:!0});var $=P(y);j=c($,"BUTTON",{class:!0,"data-svelte-h":!0}),S(j)!=="svelte-csk0rj"&&(j.textContent=d),i=v($),w=c($,"BUTTON",{class:!0,"data-svelte-h":!0}),S(w)!=="svelte-1nxas5u"&&(w.textContent=R),$.forEach(_),L.forEach(_),z.forEach(_),this.h()},h(){a(s,"class","text-xl font-semibold mb-4"),a(o,"class","text-blue-800 mb-2"),a(g,"class","text-blue-700"),a(l,"class","mb-4 p-3 bg-blue-50 rounded-md text-sm"),a(E,"for","token"),a(E,"class","block text-sm font-medium text-gray-700 mb-2"),a(m,"id","token"),a(m,"type","password"),a(m,"placeholder","hf_..."),a(m,"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"),a(k,"class","mb-4"),a(j,"class","px-4 py-2 text-gray-600 hover:text-gray-800 transition-colors"),a(w,"class","px-4 py-2 bg-orange-500 text-white rounded-md hover:bg-orange-600 transition-colors"),a(y,"class","flex justify-end gap-3"),a(e,"class","bg-white rounded-lg p-6 max-w-md w-full mx-4 shadow-xl"),a(t,"class","fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50")},m(A,z){Z(A,t,z),n(t,e),n(e,s),n(e,b),n(e,l),n(l,o),n(l,I),n(l,g),n(l,Y),T&&T.m(l,null),n(e,F),n(e,k),n(k,E),n(k,J),n(k,m),xe(m,r[4]),n(k,K),h&&h.m(k,null),n(e,Q),n(e,y),n(y,j),n(y,i),n(y,w),O||(oe=[se(m,"input",r[15]),se(m,"keydown",r[16]),se(j,"click",r[10]),se(w,"click",r[11])],O=!0)},p(A,z){A[6]?T||(T=ye(),T.c(),T.m(l,null)):T&&(T.d(1),T=null),z&16&&m.value!==A[4]&&xe(m,A[4]),A[5]?h?h.p(A,z):(h=Te(A),h.c(),h.m(k,null)):h&&(h.d(1),h=null)},d(A){A&&_(t),T&&T.d(),h&&h.d(),O=!1,Ce(oe)}}}function ye(r){let t,e="<strong>Tip:</strong> You can also run <code>huggingface-cli login</code> in your terminal to automatically use your local token.";return{c(){t=u("p"),t.innerHTML=e,this.h()},l(s){t=c(s,"P",{class:!0,"data-svelte-h":!0}),S(t)!=="svelte-1gg2uwy"&&(t.innerHTML=e),this.h()},h(){a(t,"class","text-blue-600 mt-2")},m(s,f){Z(s,t,f)},d(s){s&&_(t)}}}function Te(r){let t,e;return{c(){t=u("p"),e=le(r[5]),this.h()},l(s){t=c(s,"P",{class:!0});var f=P(t);e=ne(f,r[5]),f.forEach(_),this.h()},h(){a(t,"class","text-red-600 text-sm mt-1")},m(s,f){Z(s,t,f),n(t,e)},p(s,f){f&32&&me(e,s[5])},d(s){s&&_(t)}}}function Fe(r){let t,e,s,f='<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>',b,l,o,G="Tasks",I,g,U,Y="🎙️",F,k,E="Text to Speech",W,J,m,K="<span>🎵</span> <span>Voice Cloning</span>",Q,y,j="<span>🎧</span> <span>Speech to Text</span>",d,i,w="<span>🎼</span> <span>Sound Effects</span>",R,O,oe="<span>🎸</span> <span>Music Generation</span>",T,h,A="<span>🔊</span> <span>Audio Enhancement</span>",z,L,C,B,$,ue,fe,de,ee,pe,X,ge,_e;function be(p,M){return p[7]?Oe:p[1]?Ve:je}let ae=be(r),q=ae(r),N=r[8]&&!r[1]&&ke();const he=r[13].default,V=Ee(he,r,r[12],null);let H=r[3]&&we(r);return{c(){t=u("div"),e=u("aside"),s=u("div"),s.innerHTML=f,b=x(),l=u("nav"),o=u("div"),o.textContent=G,I=x(),g=u("button"),U=u("span"),U.textContent=Y,F=x(),k=u("span"),k.textContent=E,J=x(),m=u("button"),m.innerHTML=K,Q=x(),y=u("button"),y.innerHTML=j,d=x(),i=u("button"),i.innerHTML=w,R=x(),O=u("button"),O.innerHTML=oe,T=x(),h=u("button"),h.innerHTML=A,z=x(),L=u("div"),C=u("button"),B=u("img"),ue=x(),q.c(),fe=x(),N&&N.c(),de=x(),ee=u("main"),V&&V.c(),pe=x(),H&&H.c(),this.h()},l(p){t=c(p,"DIV",{class:!0});var M=P(t);e=c(M,"ASIDE",{class:!0});var te=P(e);s=c(te,"DIV",{class:!0,"data-svelte-h":!0}),S(s)!=="svelte-1vahj38"&&(s.innerHTML=f),b=v(te),l=c(te,"NAV",{class:!0});var D=P(l);o=c(D,"DIV",{class:!0,"data-svelte-h":!0}),S(o)!=="svelte-1x5465q"&&(o.textContent=G),I=v(D),g=c(D,"BUTTON",{class:!0});var re=P(g);U=c(re,"SPAN",{"data-svelte-h":!0}),S(U)!=="svelte-1yx42xi"&&(U.textContent=Y),F=v(re),k=c(re,"SPAN",{"data-svelte-h":!0}),S(k)!=="svelte-2j89jk"&&(k.textContent=E),re.forEach(_),J=v(D),m=c(D,"BUTTON",{class:!0,"data-svelte-h":!0}),S(m)!=="svelte-10dl8nf"&&(m.innerHTML=K),Q=v(D),y=c(D,"BUTTON",{class:!0,"data-svelte-h":!0}),S(y)!=="svelte-wf0x5d"&&(y.innerHTML=j),d=v(D),i=c(D,"BUTTON",{class:!0,"data-svelte-h":!0}),S(i)!=="svelte-x7bha3"&&(i.innerHTML=w),R=v(D),O=c(D,"BUTTON",{class:!0,"data-svelte-h":!0}),S(O)!=="svelte-1tyblmt"&&(O.innerHTML=oe),T=v(D),h=c(D,"BUTTON",{class:!0,"data-svelte-h":!0}),S(h)!=="svelte-1emrjb3"&&(h.innerHTML=A),D.forEach(_),z=v(te),L=c(te,"DIV",{class:!0});var ie=P(L);C=c(ie,"BUTTON",{class:!0});var ce=P(C);B=c(ce,"IMG",{src:!0,alt:!0,class:!0}),ue=v(ce),q.l(ce),ce.forEach(_),fe=v(ie),N&&N.l(ie),ie.forEach(_),te.forEach(_),de=v(M),ee=c(M,"MAIN",{class:!0});var ve=P(ee);V&&V.l(ve),ve.forEach(_),pe=v(M),H&&H.l(M),M.forEach(_),this.h()},h(){a(s,"class","p-4 border-b border-gray-200"),a(o,"class","mt-2 mb-1 px-2 text-xs font-medium text-gray-500 uppercase"),a(g,"class",W="w-full flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-gray-100 transition-colors text-left "+(r[0]==="tts"?"bg-gray-100":"")),a(m,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),m.disabled=!0,a(y,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),y.disabled=!0,a(i,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),i.disabled=!0,a(O,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),O.disabled=!0,a(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,a(l,"class","p-2 text-sm flex-1"),Ue(B.src,$="/assets/hf-logo.png")||a(B,"src",$),a(B,"alt","HF Logo"),a(B,"class","w-5 h-5"),C.disabled=r[7],a(C,"class","w-full px-6 py-3 bg-black text-white rounded-lg font-medium hover:bg-gray-800 transition-colors shadow-sm flex items-center justify-center gap-2 text-sm disabled:opacity-50 disabled:cursor-not-allowed"),a(L,"class","p-2 relative"),a(e,"class","w-56 border-r border-gray-200 bg-white flex-shrink-0 flex flex-col h-full "),a(ee,"class","flex-1 overflow-auto"),a(t,"class","flex h-screen bg-white")},m(p,M){Z(p,t,M),n(t,e),n(e,s),n(e,b),n(e,l),n(l,o),n(l,I),n(l,g),n(g,U),n(g,F),n(g,k),n(l,J),n(l,m),n(l,Q),n(l,y),n(l,d),n(l,i),n(l,R),n(l,O),n(l,T),n(l,h),n(e,z),n(e,L),n(L,C),n(C,B),n(C,ue),q.m(C,null),n(L,fe),N&&N.m(L,null),n(t,de),n(t,ee),V&&V.m(ee,null),n(t,pe),H&&H.m(t,null),X=!0,ge||(_e=[se(g,"click",r[14]),se(C,"click",r[9])],ge=!0)},p(p,[M]){(!X||M&1&&W!==(W="w-full flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-gray-100 transition-colors text-left "+(p[0]==="tts"?"bg-gray-100":"")))&&a(g,"class",W),ae===(ae=be(p))&&q?q.p(p,M):(q.d(1),q=ae(p),q&&(q.c(),q.m(C,null))),(!X||M&128)&&(C.disabled=p[7]),p[8]&&!p[1]?N||(N=ke(),N.c(),N.m(L,null)):N&&(N.d(1),N=null),V&&V.p&&(!X||M&4096)&&Ae(V,he,p,p[12],X?Pe(he,p[12],M,null):Ne(p[12]),null),p[3]?H?H.p(p,M):(H=we(p),H.c(),H.m(t,null)):H&&(H.d(1),H=null)},i(p){X||(Me(V,p),X=!0)},o(p){He(V,p),X=!1},d(p){p&&_(t),q.d(),N&&N.d(),V&&V.d(p),H&&H.d(),ge=!1,Ce(_e)}}}function ze(r,t,e){let{$$slots:s={},$$scope:f}=t,b="tts",l=!1,o="",G=!1,I="",g="",U=!1,Y=!0,F=!1;Be(()=>{console.log("onMount called - starting auth check"),window.addEventListener("show-signin-popover",()=>{e(8,F=!0),setTimeout(()=>{e(8,F=!1)},4e3)}),k(),E(),document.addEventListener("visibilitychange",()=>{document.hidden||E()}),window.addEventListener("storage",E);const d=setInterval(E,1e3);return()=>{window.removeEventListener("storage",E),clearInterval(d)}});async function k(){try{console.log("Checking local token availability...");const i=await(await fetch("/api/auth/local-token")).json();console.log("Local token response:",i),i.available?(e(6,U=!0),localStorage.setItem("hf_access_token",i.token),console.log("Set local token in localStorage"),i.user_info&&i.user_info.name!=="Local User"?(e(1,l=!0),e(2,o=i.user_info.name.split(" ")[0]),console.log("Logged in with user info:",o)):(e(1,l=!0),e(2,o="Local User"),console.log("Logged in with local token (validation skipped due to rate limiting)"),console.log("isLoggedIn set to:",l,"username set to:",o))):(e(6,U=!1),console.log("No local token available"))}catch(d){console.log("Could not check local token availability:",d),e(6,U=!1)}finally{e(7,Y=!1),console.log("Finished checking auth, isLoggedIn:",l)}}function E(){const d=localStorage.getItem("hf_access_token");d&&!l?W(d):d||(e(1,l=!1),e(2,o=""))}async function W(d){try{console.log("Fetching user info for token:",d.substring(0,10)+"...");const i=await fetch("https://huggingface.co/api/whoami-v2",{headers:{Authorization:`Bearer ${d}`}});if(i.ok){const w=await i.json();e(1,l=!0);const R=w.name||w.fullname||w.login||w.username||"User";e(2,o=R.split(" ")[0]),console.log("Successfully fetched user info:",o)}else localStorage.removeItem("hf_access_token"),e(1,l=!1),e(2,o=""),console.log("Token validation failed:",i.status)}catch(i){localStorage.removeItem("hf_access_token"),e(1,l=!1),e(2,o=""),console.log("Error fetching user info:",i)}}async function J(){if(l)localStorage.removeItem("hf_access_token"),sessionStorage.removeItem("oauth_state"),e(1,l=!1),e(2,o="");else if(window.location.hostname.includes("hf.space")||window.location.hostname.includes("huggingface.co"))try{const i=await(await fetch("/api/auth/oauth-config")).json(),w=i.scopes||"read-repos write-repos manage-repos inference-api",R=`https://huggingface.co/oauth/authorize?client_id=${i.client_id}&redirect_uri=${encodeURIComponent(window.location.origin+"/auth/callback")}&scope=${encodeURIComponent(w)}&response_type=code&state=${Date.now()}`;window.location.href=R}catch(d){console.error("Failed to get OAuth config:",d),e(3,G=!0),e(4,I=""),e(5,g="")}else e(3,G=!0),e(4,I=""),e(5,g="")}function m(){e(3,G=!1),e(4,I=""),e(5,g="")}async function K(){if(!I.trim()){e(5,g="Please enter a token");return}if(!I.startsWith("hf_")){e(5,g='Token should start with "hf_"');return}try{const d=await fetch("https://huggingface.co/api/whoami-v2",{headers:{Authorization:`Bearer ${I.trim()}`}});if(d.ok){const i=await d.json();localStorage.setItem("hf_access_token",I.trim()),e(1,l=!0);const w=i.name||i.fullname||i.login||i.username||"User";e(2,o=w.split(" ")[0]),m()}else{const i=await d.text();console.log("Token validation error:",d.status,i),e(5,g=`Invalid token (${d.status}). Please check your token and try again.`)}}catch(d){console.error("Token validation error:",d),e(5,g="Error validating token. Please try again.")}}const Q=()=>e(0,b="tts");function y(){I=this.value,e(4,I)}const j=d=>d.key==="Enter"&&K();return r.$$set=d=>{"$$scope"in d&&e(12,f=d.$$scope)},[b,l,o,G,I,g,U,Y,F,J,m,K,f,s,Q,y,j]}class Re extends Ie{constructor(t){super(),Le(this,t,ze,Fe,Se,{})}}export{Re as component};
|
hfstudio/static/_app/immutable/nodes/1.jgEqIh0i.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/BI_gvUUO.js";import"../chunks/IHki7fMi.js";import{p as C}from"../chunks/vedv2sVy.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.PwaXI23i.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{w as Jt,y,x as I,S as We,i as Ge,s as Fe,v as Ye,P as L,d as u,Q as rl,z as Qe,A as Ze,B as et,R as al,b as Q,c as a,T as Hl,f as m,F as xt,U as Fl,V as _l,W as ie,J as ee,L as te,M as le,K as ne,o as c,E as St,u as Y,e as d,g as O,h as $,j as h,t as M,k as E,D as Vt,C as kt,a as je,q as Xe,O as Gl,X as ol,N as Kt,n as wt,m as pl}from"../chunks/BI_gvUUO.js";import"../chunks/IHki7fMi.js";function yt(o){return(o==null?void 0:o.length)!==void 0?o:Array.from(o)}function Rl(o,e){I(o,1,1,()=>{e.delete(o.key)})}function ql(o,e,s,t,l,n,r,i,f,p,w,b){let _=o.length,g=n.length,v=_;const k={};for(;v--;)k[o[v].key]=v;const T=[],S=new Map,G=new Map,R=[];for(v=g;v--;){const U=b(l,n,v),H=s(U);let q=r.get(H);q?R.push(()=>q.p(U,e)):(q=p(H,U),q.c()),S.set(H,T[v]=q),H in k&&G.set(H,Math.abs(v-k[H]))}const A=new Set,C=new Set;function x(U){y(U,1),U.m(i,w),r.set(U.key,U),w=U.first,g--}for(;_&&g;){const U=T[g-1],H=o[_-1],q=U.key,B=H.key;U===H?(w=U.first,_--,g--):S.has(B)?!r.has(q)||A.has(q)?x(U):C.has(B)?_--:G.get(q)>G.get(B)?(C.add(q),x(U)):(A.add(B),_--):(f(H,r),_--)}for(;_--;){const U=o[_];S.has(U.key)||f(U,r)}for(;g;)x(T[g-1]);return Jt(R),T}function Re(o,e){const s={},t={},l={$$scope:1};let n=o.length;for(;n--;){const r=o[n],i=e[n];if(i){for(const f in r)f in i||(t[f]=1);for(const f in i)l[f]||(s[f]=i[f],l[f]=1);o[n]=i}else for(const f in r)l[f]=1}for(const r in t)r in s||(s[r]=void 0);return s}function rt(o){return typeof o=="object"&&o!==null?o:{}}/**
|
| 2 |
+
* @license lucide-svelte v0.303.0 - ISC
|
| 3 |
+
|
| 4 |
+
This source code is licensed under the ISC license.
|
| 5 |
+
See the LICENSE file in the root directory of this source tree.
|
| 6 |
+
*/const vl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function bl(o,e,s){const t=o.slice();return t[10]=e[s][0],t[11]=e[s][1],t}function fl(o){let e,s=[o[11]],t={};for(let l=0;l<s.length;l+=1)t=L(t,s[l]);return{c(){e=Fl(o[10]),this.h()},l(l){e=Hl(l,o[10],{}),m(e).forEach(u),this.h()},h(){al(e,t)},m(l,n){Q(l,e,n)},p(l,n){al(e,t=Re(s,[n&32&&l[11]]))},d(l){l&&u(e)}}}function kl(o){let e=o[10],s,t=o[10]&&fl(o);return{c(){t&&t.c(),s=xt()},l(l){t&&t.l(l),s=xt()},m(l,n){t&&t.m(l,n),Q(l,s,n)},p(l,n){l[10]?e?Fe(e,l[10])?(t.d(1),t=fl(l),e=l[10],t.c(),t.m(s.parentNode,s)):t.p(l,n):(t=fl(l),e=l[10],t.c(),t.m(s.parentNode,s)):e&&(t.d(1),t=null,e=l[10])},d(l){l&&u(s),t&&t.d(l)}}}function Kl(o){let e,s,t,l,n,r=yt(o[5]),i=[];for(let _=0;_<r.length;_+=1)i[_]=kl(bl(o,r,_));const f=o[9].default,p=Ye(f,o,o[8],null);let w=[vl,o[6],{width:o[2]},{height:o[2]},{stroke:o[1]},{"stroke-width":t=o[4]?Number(o[3])*24/Number(o[2]):o[3]},{class:l=`lucide-icon lucide lucide-${o[0]} ${o[7].class??""}`}],b={};for(let _=0;_<w.length;_+=1)b=L(b,w[_]);return{c(){e=Fl("svg");for(let _=0;_<i.length;_+=1)i[_].c();s=xt(),p&&p.c(),this.h()},l(_){e=Hl(_,"svg",{width:!0,height:!0,stroke:!0,"stroke-width":!0,class:!0});var g=m(e);for(let v=0;v<i.length;v+=1)i[v].l(g);s=xt(),p&&p.l(g),g.forEach(u),this.h()},h(){al(e,b)},m(_,g){Q(_,e,g);for(let v=0;v<i.length;v+=1)i[v]&&i[v].m(e,null);a(e,s),p&&p.m(e,null),n=!0},p(_,[g]){if(g&32){r=yt(_[5]);let v;for(v=0;v<r.length;v+=1){const k=bl(_,r,v);i[v]?i[v].p(k,g):(i[v]=kl(k),i[v].c(),i[v].m(e,s))}for(;v<i.length;v+=1)i[v].d(1);i.length=r.length}p&&p.p&&(!n||g&256)&&Qe(p,f,_,_[8],n?et(f,_[8],g,null):Ze(_[8]),null),al(e,b=Re(w,[vl,g&64&&_[6],(!n||g&4)&&{width:_[2]},(!n||g&4)&&{height:_[2]},(!n||g&2)&&{stroke:_[1]},(!n||g&28&&t!==(t=_[4]?Number(_[3])*24/Number(_[2]):_[3]))&&{"stroke-width":t},(!n||g&129&&l!==(l=`lucide-icon lucide lucide-${_[0]} ${_[7].class??""}`))&&{class:l}]))},i(_){n||(y(p,_),n=!0)},o(_){I(p,_),n=!1},d(_){_&&u(e),rl(i,_),p&&p.d(_)}}}function Jl(o,e,s){const t=["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"];let l=_l(e,t),{$$slots:n={},$$scope:r}=e,{name:i}=e,{color:f="currentColor"}=e,{size:p=24}=e,{strokeWidth:w=2}=e,{absoluteStrokeWidth:b=!1}=e,{iconNode:_}=e;return o.$$set=g=>{s(7,e=L(L({},e),ie(g))),s(6,l=_l(e,t)),"name"in g&&s(0,i=g.name),"color"in g&&s(1,f=g.color),"size"in g&&s(2,p=g.size),"strokeWidth"in g&&s(3,w=g.strokeWidth),"absoluteStrokeWidth"in g&&s(4,b=g.absoluteStrokeWidth),"iconNode"in g&&s(5,_=g.iconNode),"$$scope"in g&&s(8,r=g.$$scope)},e=ie(e),[i,f,p,w,b,_,l,e,r,n]}class at extends We{constructor(e){super(),Ge(this,e,Jl,Kl,Fe,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function Xl(o){let e;const s=o[2].default,t=Ye(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function Yl(o){let e,s;const t=[{name:"alert-circle"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Xl]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Re(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function Ql(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class Zl extends We{constructor(e){super(),Ge(this,e,Ql,Yl,Fe,{})}}function en(o){let e;const s=o[2].default,t=Ye(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function tn(o){let e,s;const t=[{name:"chevron-down"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[en]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Re(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function ln(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["path",{d:"m6 9 6 6 6-6"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class nn extends We{constructor(e){super(),Ge(this,e,ln,tn,Fe,{})}}function sn(o){let e;const s=o[2].default,t=Ye(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function on(o){let e,s;const t=[{name:"code"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[sn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Re(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function rn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["polyline",{points:"16 18 22 12 16 6"}],["polyline",{points:"8 6 2 12 8 18"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class an extends We{constructor(e){super(),Ge(this,e,rn,on,Fe,{})}}function cn(o){let e;const s=o[2].default,t=Ye(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function un(o){let e,s;const t=[{name:"copy"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[cn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Re(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function fn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class Wl extends We{constructor(e){super(),Ge(this,e,fn,un,Fe,{})}}function dn(o){let e;const s=o[2].default,t=Ye(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function hn(o){let e,s;const t=[{name:"download"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[dn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Re(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function mn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["polyline",{points:"7 10 12 15 17 10"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class yl extends We{constructor(e){super(),Ge(this,e,mn,hn,Fe,{})}}function gn(o){let e;const s=o[2].default,t=Ye(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function _n(o){let e,s;const t=[{name:"loader-2"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[gn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Re(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function pn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class vn extends We{constructor(e){super(),Ge(this,e,pn,_n,Fe,{})}}function bn(o){let e;const s=o[2].default,t=Ye(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function kn(o){let e,s;const t=[{name:"more-horizontal"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[bn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Re(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function yn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class wn extends We{constructor(e){super(),Ge(this,e,yn,kn,Fe,{})}}function $n(o){let e;const s=o[2].default,t=Ye(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function En(o){let e,s;const t=[{name:"panels-top-left"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[$n]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Re(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function Nn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 9h18"}],["path",{d:"M9 21V9"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class In extends We{constructor(e){super(),Ge(this,e,Nn,En,Fe,{})}}function Tn(o){let e;const s=o[2].default,t=Ye(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function Dn(o){let e,s;const t=[{name:"play"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Tn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Re(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function Sn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["polygon",{points:"5 3 19 12 5 21 5 3"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class hl extends We{constructor(e){super(),Ge(this,e,Sn,Dn,Fe,{})}}function Vn(o){let e;const s=o[2].default,t=Ye(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function Cn(o){let e,s;const t=[{name:"share"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Vn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Re(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function An(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}],["polyline",{points:"16 6 12 2 8 6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class wl extends We{constructor(e){super(),Ge(this,e,An,Cn,Fe,{})}}function Pn(o){let e;const s=o[2].default,t=Ye(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function xn(o){let e,s;const t=[{name:"skip-back"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Pn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Re(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function Un(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["polygon",{points:"19 20 9 12 19 4 19 20"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class On extends We{constructor(e){super(),Ge(this,e,Un,xn,Fe,{})}}function Mn(o){let e;const s=o[2].default,t=Ye(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function zn(o){let e,s;const t=[{name:"skip-forward"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Mn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Re(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function Ln(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["polygon",{points:"5 4 15 12 5 20 5 4"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class jn extends We{constructor(e){super(),Ge(this,e,Ln,zn,Fe,{})}}function $l(o,e,s){const t=o.slice();return t[58]=e[s],t}function El(o,e,s){const t=o.slice();return t[50]=e[s],t}function Nl(o,e,s){const t=o.slice();return t[53]=e[s],t}function Il(o,e,s){const t=o.slice();return t[53]=e[s],t}function Tl(o){let e;return{c(){e=h("span"),this.h()},l(s){e=d(s,"SPAN",{class:!0}),m(e).forEach(u),this.h()},h(){c(e,"class","flash-sweep svelte-10276gt")},m(s,t){Q(s,e,t)},d(s){s&&u(e)}}}function Bn(o){let e,s,t,l,n='<h2 class="text-2xl font-semibold text-gray-900">Integration Code</h2> <p class="text-sm text-gray-600 mt-1">Python code to reproduce your actions via the API</p>',r,i,f,p,w,b=o[2].length>0&&Dl(o);const _=[Wn,Fn],g=[];function v(k,T){return k[2].length===0?0:1}return f=v(o),p=g[f]=_[f](o),{c(){e=h("div"),s=h("div"),t=h("div"),l=h("div"),l.innerHTML=n,r=E(),b&&b.c(),i=E(),p.c(),this.h()},l(k){e=d(k,"DIV",{class:!0});var T=m(e);s=d(T,"DIV",{class:!0});var S=m(s);t=d(S,"DIV",{class:!0});var G=m(t);l=d(G,"DIV",{"data-svelte-h":!0}),Xe(l)!=="svelte-jwt4ug"&&(l.innerHTML=n),r=$(G),b&&b.l(G),G.forEach(u),i=$(S),p.l(S),S.forEach(u),T.forEach(u),this.h()},h(){c(t,"class","flex items-center justify-between mb-6"),c(s,"class","max-w-4xl mx-auto p-8"),c(e,"class","flex-1 bg-gray-50 overflow-y-auto")},m(k,T){Q(k,e,T),a(e,s),a(s,t),a(t,l),a(t,r),b&&b.m(t,null),a(s,i),g[f].m(s,null),w=!0},p(k,T){k[2].length>0?b?(b.p(k,T),T[0]&4&&y(b,1)):(b=Dl(k),b.c(),y(b,1),b.m(t,null)):b&&(Vt(),I(b,1,1,()=>{b=null}),St());let S=f;f=v(k),f===S?g[f].p(k,T):(Vt(),I(g[S],1,1,()=>{g[S]=null}),St(),p=g[f],p?p.p(k,T):(p=g[f]=_[f](k),p.c()),y(p,1),p.m(s,null))},i(k){w||(y(b),y(p),w=!0)},o(k){I(b),I(p),w=!1},d(k){k&&u(e),b&&b.d(),g[f].d()}}}function Hn(o){let e,s,t,l,n,r,i,f,p,w=o[0].length+"",b,_,g,v,k,T,S,G,R,A,C,x,U="Model",H,q,B,P,j,z,Ce,Z,F,$e='<h3 class="font-medium text-gray-900">Voice</h3>',ve,he,K,D,re='<div class="flex items-center gap-2"><div class="w-8 h-8 bg-gray-400 rounded-full flex items-center justify-center text-white text-xs font-medium">+</div> <span class="text-sm font-medium text-gray-600">Clone your voice</span></div> <div class="text-xs text-gray-400">(coming soon)</div>',Ee,ce,Ne,Ie,oe,Be="Speed",Oe,Ae,ye=o[11].toFixed(1)+"",me,Ue,$t,be,J,fe,Pe="<span>0.5x</span> <span>2.0x</span>",Te,De,xe,it,Et="Stability",ct,ut,tt=(o[12]*100).toFixed(0)+"",_t,Ct,Ut,ge,lt,He,nt,ft,dt="Similarity",ht,mt,qe=(o[13]*100).toFixed(0)+"",st,Ot,Me,ze,Bt,pt,Le,vt,Rt="Style",gt,Nt,ke=o[14]===0?"None":"Exaggerated",V,ae,_e,Se,Ht,Ft,de=o[5]==="local"&&Cl();const Mt=[Rn,Gn],ot=[];function zt(N,X){return N[7]?0:1}k=zt(o),T=ot[k]=Mt[k](o);let pe=o[8]&&Al(o),Ke=yt(o[20]),we=[];for(let N=0;N<Ke.length;N+=1)we[N]=Ul(Il(o,Ke,N));j=new nn({props:{size:16,class:"text-gray-500"}});let Ve=o[6]&&Ol(o),It=yt(o[21]),se=[];for(let N=0;N<It.length;N+=1)se[N]=zl(El(o,It,N));return{c(){e=h("div"),s=h("div"),de&&de.c(),t=E(),l=h("div"),n=h("textarea"),r=E(),i=h("div"),f=h("div"),p=h("span"),b=M(w),_=M(" / 5,000 characters"),g=E(),v=h("button"),T.c(),G=E(),pe&&pe.c(),R=E(),A=h("div"),C=h("div"),x=h("h3"),x.textContent=U,H=E(),q=h("button"),B=h("span");for(let N=0;N<we.length;N+=1)we[N].c();P=E(),ne(j.$$.fragment),z=E(),Ve&&Ve.c(),Ce=E(),Z=h("div"),F=h("div"),F.innerHTML=$e,ve=E(),he=h("div");for(let N=0;N<se.length;N+=1)se[N].c();K=E(),D=h("button"),D.innerHTML=re,Ee=E(),ce=h("div"),Ne=h("div"),Ie=h("div"),oe=h("label"),oe.textContent=Be,Oe=E(),Ae=h("span"),me=M(ye),Ue=M("x"),$t=E(),be=h("input"),J=E(),fe=h("div"),fe.innerHTML=Pe,Te=E(),De=h("div"),xe=h("div"),it=h("label"),it.textContent=Et,ct=E(),ut=h("span"),_t=M(tt),Ct=M("%"),Ut=E(),ge=h("input"),lt=E(),He=h("div"),nt=h("div"),ft=h("label"),ft.textContent=dt,ht=E(),mt=h("span"),st=M(qe),Ot=M("%"),Me=E(),ze=h("input"),Bt=E(),pt=h("div"),Le=h("div"),vt=h("label"),vt.textContent=Rt,gt=E(),Nt=h("span"),V=M(ke),ae=E(),_e=h("input"),this.h()},l(N){e=d(N,"DIV",{class:!0});var X=m(e);s=d(X,"DIV",{class:!0});var ue=m(s);de&&de.l(ue),t=$(ue),l=d(ue,"DIV",{class:!0});var W=m(l);n=d(W,"TEXTAREA",{class:!0,placeholder:!0}),m(n).forEach(u),W.forEach(u),r=$(ue),i=d(ue,"DIV",{class:!0});var Je=m(i);f=d(Je,"DIV",{class:!0});var qt=m(f);p=d(qt,"SPAN",{class:!0});var Wt=m(p);b=O(Wt,w),_=O(Wt," / 5,000 characters"),Wt.forEach(u),qt.forEach(u),g=$(Je),v=d(Je,"BUTTON",{class:!0});var Tt=m(v);T.l(Tt),Tt.forEach(u),Je.forEach(u),G=$(ue),pe&&pe.l(ue),ue.forEach(u),R=$(X),A=d(X,"DIV",{class:!0});var bt=m(A);C=d(bt,"DIV",{class:!0});var Dt=m(C);x=d(Dt,"H3",{class:!0,"data-svelte-h":!0}),Xe(x)!=="svelte-b3hs3r"&&(x.textContent=U),H=$(Dt),q=d(Dt,"BUTTON",{class:!0});var Lt=m(q);B=d(Lt,"SPAN",{});var ml=m(B);for(let jt=0;jt<we.length;jt+=1)we[jt].l(ml);ml.forEach(u),P=$(Lt),le(j.$$.fragment,Lt),Lt.forEach(u),z=$(Dt),Ve&&Ve.l(Dt),Dt.forEach(u),Ce=$(bt),Z=d(bt,"DIV",{class:!0});var Xt=m(Z);F=d(Xt,"DIV",{class:!0,"data-svelte-h":!0}),Xe(F)!=="svelte-182x1ki"&&(F.innerHTML=$e),ve=$(Xt),he=d(Xt,"DIV",{class:!0});var Yt=m(he);for(let jt=0;jt<se.length;jt+=1)se[jt].l(Yt);K=$(Yt),D=d(Yt,"BUTTON",{class:!0,"data-svelte-h":!0}),Xe(D)!=="svelte-20x663"&&(D.innerHTML=re),Yt.forEach(u),Xt.forEach(u),Ee=$(bt),ce=d(bt,"DIV",{class:!0});var At=m(ce);Ne=d(At,"DIV",{});var Gt=m(Ne);Ie=d(Gt,"DIV",{class:!0});var Qt=m(Ie);oe=d(Qt,"LABEL",{class:!0,"data-svelte-h":!0}),Xe(oe)!=="svelte-9vcpiu"&&(oe.textContent=Be),Oe=$(Qt),Ae=d(Qt,"SPAN",{class:!0});var il=m(Ae);me=O(il,ye),Ue=O(il,"x"),il.forEach(u),Qt.forEach(u),$t=$(Gt),be=d(Gt,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),J=$(Gt),fe=d(Gt,"DIV",{class:!0,"data-svelte-h":!0}),Xe(fe)!=="svelte-4ydm1m"&&(fe.innerHTML=Pe),Gt.forEach(u),Te=$(At),De=d(At,"DIV",{});var Zt=m(De);xe=d(Zt,"DIV",{class:!0});var el=m(xe);it=d(el,"LABEL",{class:!0,"data-svelte-h":!0}),Xe(it)!=="svelte-1lgjete"&&(it.textContent=Et),ct=$(el),ut=d(el,"SPAN",{class:!0});var cl=m(ut);_t=O(cl,tt),Ct=O(cl,"%"),cl.forEach(u),el.forEach(u),Ut=$(Zt),ge=d(Zt,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),Zt.forEach(u),lt=$(At),He=d(At,"DIV",{});var tl=m(He);nt=d(tl,"DIV",{class:!0});var ll=m(nt);ft=d(ll,"LABEL",{class:!0,"data-svelte-h":!0}),Xe(ft)!=="svelte-1ha0vec"&&(ft.textContent=dt),ht=$(ll),mt=d(ll,"SPAN",{class:!0});var ul=m(mt);st=O(ul,qe),Ot=O(ul,"%"),ul.forEach(u),ll.forEach(u),Me=$(tl),ze=d(tl,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),tl.forEach(u),Bt=$(At),pt=d(At,"DIV",{});var nl=m(pt);Le=d(nl,"DIV",{class:!0});var sl=m(Le);vt=d(sl,"LABEL",{class:!0,"data-svelte-h":!0}),Xe(vt)!=="svelte-1ata0tk"&&(vt.textContent=Rt),gt=$(sl),Nt=d(sl,"SPAN",{class:!0});var gl=m(Nt);V=O(gl,ke),gl.forEach(u),sl.forEach(u),ae=$(nl),_e=d(nl,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),nl.forEach(u),At.forEach(u),bt.forEach(u),X.forEach(u),this.h()},h(){c(n,"class","w-full h-full p-6 bg-white resize-none border-0 focus:outline-none text-gray-900 text-base leading-relaxed"),c(n,"placeholder","Welcome to our text to speech demo. This technology can transform any written content into natural sounding audio."),c(l,"class","flex-1 pb-24"),c(p,"class","text-sm text-gray-500"),c(f,"class","flex items-center justify-between mb-3"),v.disabled=S=o[7]||!o[0].trim(),c(v,"class","w-full px-6 py-3 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-2 shadow-sm"),c(i,"class","fixed bottom-0 left-56 right-80 p-4 bg-white border-t border-gray-200"),c(s,"class","flex-1 flex flex-col p-6"),c(x,"class","font-medium text-gray-900 mb-3"),c(q,"class","w-full p-3 border border-gray-200 rounded-lg bg-white text-sm focus:outline-none focus:ring-2 focus:ring-amber-400 focus:border-transparent appearance-none bg-no-repeat bg-right pr-10 shadow-sm text-left flex items-center justify-between"),c(C,"class","mb-6 relative model-dropdown"),c(F,"class","mb-3"),c(D,"class","w-full flex items-center justify-between p-2 rounded-md opacity-50 cursor-not-allowed text-left"),D.disabled=!0,c(he,"class","space-y-1"),c(Z,"class","mb-6"),c(oe,"class","text-sm font-medium text-gray-700"),c(Ae,"class","text-sm text-gray-500"),c(Ie,"class","flex justify-between mb-1"),c(be,"type","range"),c(be,"min","0.5"),c(be,"max","2"),c(be,"step","0.1"),c(be,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),c(fe,"class","flex justify-between text-xs text-gray-400 mt-1"),c(it,"class","text-sm font-medium text-gray-700"),c(ut,"class","text-sm text-gray-500"),c(xe,"class","flex justify-between mb-1"),c(ge,"type","range"),c(ge,"min","0"),c(ge,"max","1"),c(ge,"step","0.01"),c(ge,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),c(ft,"class","text-sm font-medium text-gray-700"),c(mt,"class","text-sm text-gray-500"),c(nt,"class","flex justify-between mb-1"),c(ze,"type","range"),c(ze,"min","0"),c(ze,"max","1"),c(ze,"step","0.01"),c(ze,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),c(vt,"class","text-sm font-medium text-gray-700"),c(Nt,"class","text-sm text-gray-500"),c(Le,"class","flex justify-between mb-1"),c(_e,"type","range"),c(_e,"min","0"),c(_e,"max","1"),c(_e,"step","1"),c(_e,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),c(ce,"class","space-y-4 pt-4 border-t border-gray-200"),c(A,"class","w-80 border-l border-gray-200 bg-white p-4 overflow-y-auto"),c(e,"class","flex-1 flex")},m(N,X){Q(N,e,X),a(e,s),de&&de.m(s,null),a(s,t),a(s,l),a(l,n),kt(n,o[0]),a(s,r),a(s,i),a(i,f),a(f,p),a(p,b),a(p,_),a(i,g),a(i,v),ot[k].m(v,null),a(s,G),pe&&pe.m(s,null),a(e,R),a(e,A),a(A,C),a(C,x),a(C,H),a(C,q),a(q,B);for(let ue=0;ue<we.length;ue+=1)we[ue]&&we[ue].m(B,null);a(q,P),te(j,q,null),a(C,z),Ve&&Ve.m(C,null),a(A,Ce),a(A,Z),a(Z,F),a(Z,ve),a(Z,he);for(let ue=0;ue<se.length;ue+=1)se[ue]&&se[ue].m(he,null);a(he,K),a(he,D),a(A,Ee),a(A,ce),a(ce,Ne),a(Ne,Ie),a(Ie,oe),a(Ie,Oe),a(Ie,Ae),a(Ae,me),a(Ae,Ue),a(Ne,$t),a(Ne,be),kt(be,o[11]),a(Ne,J),a(Ne,fe),a(ce,Te),a(ce,De),a(De,xe),a(xe,it),a(xe,ct),a(xe,ut),a(ut,_t),a(ut,Ct),a(De,Ut),a(De,ge),kt(ge,o[12]),a(ce,lt),a(ce,He),a(He,nt),a(nt,ft),a(nt,ht),a(nt,mt),a(mt,st),a(mt,Ot),a(He,Me),a(He,ze),kt(ze,o[13]),a(ce,Bt),a(ce,pt),a(pt,Le),a(Le,vt),a(Le,gt),a(Le,Nt),a(Nt,V),a(pt,ae),a(pt,_e),kt(_e,o[14]),Se=!0,Ht||(Ft=[Y(n,"input",o[37]),Y(v,"click",o[22]),Y(q,"click",o[39]),Y(be,"change",o[42]),Y(be,"input",o[42]),Y(ge,"change",o[43]),Y(ge,"input",o[43]),Y(ze,"change",o[44]),Y(ze,"input",o[44]),Y(_e,"change",o[45]),Y(_e,"input",o[45])],Ht=!0)},p(N,X){N[5]==="local"?de?X[0]&32&&y(de,1):(de=Cl(),de.c(),y(de,1),de.m(s,t)):de&&(Vt(),I(de,1,1,()=>{de=null}),St()),X[0]&1&&kt(n,N[0]),(!Se||X[0]&1)&&w!==(w=N[0].length+"")&&je(b,w);let ue=k;if(k=zt(N),k!==ue&&(Vt(),I(ot[ue],1,1,()=>{ot[ue]=null}),St(),T=ot[k],T||(T=ot[k]=Mt[k](N),T.c()),y(T,1),T.m(v,null)),(!Se||X[0]&129&&S!==(S=N[7]||!N[0].trim()))&&(v.disabled=S),N[8]?pe?(pe.p(N,X),X[0]&256&&y(pe,1)):(pe=Al(N),pe.c(),y(pe,1),pe.m(s,null)):pe&&(Vt(),I(pe,1,1,()=>{pe=null}),St()),X[0]&1048592){Ke=yt(N[20]);let W;for(W=0;W<Ke.length;W+=1){const Je=Il(N,Ke,W);we[W]?we[W].p(Je,X):(we[W]=Ul(Je),we[W].c(),we[W].m(B,null))}for(;W<we.length;W+=1)we[W].d(1);we.length=Ke.length}if(N[6]?Ve?Ve.p(N,X):(Ve=Ol(N),Ve.c(),Ve.m(C,null)):Ve&&(Ve.d(1),Ve=null),X[0]&2097160){It=yt(N[21]);let W;for(W=0;W<It.length;W+=1){const Je=El(N,It,W);se[W]?se[W].p(Je,X):(se[W]=zl(Je),se[W].c(),se[W].m(he,K))}for(;W<se.length;W+=1)se[W].d(1);se.length=It.length}(!Se||X[0]&2048)&&ye!==(ye=N[11].toFixed(1)+"")&&je(me,ye),X[0]&2048&&kt(be,N[11]),(!Se||X[0]&4096)&&tt!==(tt=(N[12]*100).toFixed(0)+"")&&je(_t,tt),X[0]&4096&&kt(ge,N[12]),(!Se||X[0]&8192)&&qe!==(qe=(N[13]*100).toFixed(0)+"")&&je(st,qe),X[0]&8192&&kt(ze,N[13]),(!Se||X[0]&16384)&&ke!==(ke=N[14]===0?"None":"Exaggerated")&&je(V,ke),X[0]&16384&&kt(_e,N[14])},i(N){Se||(y(de),y(T),y(pe),y(j.$$.fragment,N),Se=!0)},o(N){I(de),I(T),I(pe),I(j.$$.fragment,N),Se=!1},d(N){N&&u(e),de&&de.d(),ot[k].d(),pe&&pe.d(),rl(we,N),ee(j),Ve&&Ve.d(),rl(se,N),Ht=!1,Jt(Ft)}}}function Dl(o){let e,s,t,l,n,r;return s=new Wl({props:{size:16}}),{c(){e=h("button"),ne(s.$$.fragment),t=M(`
|
| 7 |
+
Copy All`),this.h()},l(i){e=d(i,"BUTTON",{class:!0});var f=m(e);le(s.$$.fragment,f),t=O(f,`
|
| 8 |
+
Copy All`),f.forEach(u),this.h()},h(){c(e,"class","flex items-center gap-2 px-4 py-2 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors")},m(i,f){Q(i,e,f),te(s,e,null),a(e,t),l=!0,n||(r=Y(e,"click",o[31]),n=!0)},p:wt,i(i){l||(y(s.$$.fragment,i),l=!0)},o(i){I(s.$$.fragment,i),l=!1},d(i){i&&u(e),ee(s),n=!1,r()}}}function Fn(o){let e,s=[],t=new Map,l,n=yt(o[2]);const r=i=>i[58].id;for(let i=0;i<n.length;i+=1){let f=$l(o,n,i),p=r(f);t.set(p,s[i]=Vl(p,f))}return{c(){e=h("div");for(let i=0;i<s.length;i+=1)s[i].c();this.h()},l(i){e=d(i,"DIV",{class:!0});var f=m(e);for(let p=0;p<s.length;p+=1)s[p].l(f);f.forEach(u),this.h()},h(){c(e,"class","space-y-4")},m(i,f){Q(i,e,f);for(let p=0;p<s.length;p+=1)s[p]&&s[p].m(e,null);l=!0},p(i,f){f[0]&1073741828&&(n=yt(i[2]),Vt(),s=ql(s,f,r,1,i,n,t,e,Rl,Vl,null,$l),St())},i(i){if(!l){for(let f=0;f<n.length;f+=1)y(s[f]);l=!0}},o(i){for(let f=0;f<s.length;f+=1)I(s[f]);l=!1},d(i){i&&u(e);for(let f=0;f<s.length;f+=1)s[f].d()}}}function Wn(o){let e,s='<p class="text-gray-500">Start using the UI to see generated code here</p>';return{c(){e=h("div"),e.innerHTML=s,this.h()},l(t){e=d(t,"DIV",{class:!0,"data-svelte-h":!0}),Xe(e)!=="svelte-1dkp70o"&&(e.innerHTML=s),this.h()},h(){c(e,"class","bg-white rounded-lg border border-gray-200 p-8 text-center")},m(t,l){Q(t,e,l)},p:wt,i:wt,o:wt,d(t){t&&u(e)}}}function Sl(o){let e,s=o[58].output+"",t;return{c(){e=h("div"),t=M(s),this.h()},l(l){e=d(l,"DIV",{class:!0});var n=m(e);t=O(n,s),n.forEach(u),this.h()},h(){c(e,"class","px-4 py-2 bg-gray-900 text-green-400 font-mono text-xs border-t border-gray-200")},m(l,n){Q(l,e,n),a(e,t)},p(l,n){n[0]&4&&s!==(s=l[58].output+"")&&je(t,s)},d(l){l&&u(e)}}}function Vl(o,e){let s,t,l,n,r=e[58].title+"",i,f,p,w=e[58].timestamp+"",b,_,g,v,k,T,S,G,R=e[58].code+"",A,C,x,U,H,q;v=new Wl({props:{size:14,class:"text-gray-600"}});function B(){return e[46](e[58])}let P=e[58].output&&Sl(e);return{key:o,first:null,c(){s=h("div"),t=h("div"),l=h("div"),n=h("span"),i=M(r),f=E(),p=h("span"),b=M(w),_=E(),g=h("button"),ne(v.$$.fragment),k=E(),T=h("div"),S=h("pre"),G=h("code"),A=M(R),C=E(),P&&P.c(),x=E(),this.h()},l(j){s=d(j,"DIV",{class:!0});var z=m(s);t=d(z,"DIV",{class:!0});var Ce=m(t);l=d(Ce,"DIV",{class:!0});var Z=m(l);n=d(Z,"SPAN",{class:!0});var F=m(n);i=O(F,r),F.forEach(u),f=$(Z),p=d(Z,"SPAN",{class:!0});var $e=m(p);b=O($e,w),$e.forEach(u),Z.forEach(u),_=$(Ce),g=d(Ce,"BUTTON",{class:!0,title:!0});var ve=m(g);le(v.$$.fragment,ve),ve.forEach(u),Ce.forEach(u),k=$(z),T=d(z,"DIV",{class:!0});var he=m(T);S=d(he,"PRE",{class:!0});var K=m(S);G=d(K,"CODE",{class:!0});var D=m(G);A=O(D,R),D.forEach(u),K.forEach(u),he.forEach(u),C=$(z),P&&P.l(z),x=$(z),z.forEach(u),this.h()},h(){c(n,"class","text-sm font-medium text-gray-700"),c(p,"class","text-xs text-gray-500"),c(l,"class","flex items-center gap-3"),c(g,"class","p-1.5 hover:bg-gray-200 rounded transition-colors"),c(g,"title","Copy code"),c(t,"class","flex items-center justify-between px-4 py-2 bg-gray-50 border-b border-gray-200"),c(G,"class","language-python text-sm font-mono"),c(S,"class","p-4 overflow-x-auto bg-gray-50 text-gray-900"),c(T,"class","relative"),c(s,"class","bg-white rounded-lg border border-gray-200 overflow-hidden"),this.first=s},m(j,z){Q(j,s,z),a(s,t),a(t,l),a(l,n),a(n,i),a(l,f),a(l,p),a(p,b),a(t,_),a(t,g),te(v,g,null),a(s,k),a(s,T),a(T,S),a(S,G),a(G,A),a(s,C),P&&P.m(s,null),a(s,x),U=!0,H||(q=Y(g,"click",B),H=!0)},p(j,z){e=j,(!U||z[0]&4)&&r!==(r=e[58].title+"")&&je(i,r),(!U||z[0]&4)&&w!==(w=e[58].timestamp+"")&&je(b,w),(!U||z[0]&4)&&R!==(R=e[58].code+"")&&je(A,R),e[58].output?P?P.p(e,z):(P=Sl(e),P.c(),P.m(s,x)):P&&(P.d(1),P=null)},i(j){U||(y(v.$$.fragment,j),U=!0)},o(j){I(v.$$.fragment,j),U=!1},d(j){j&&u(s),ee(v),P&&P.d(),H=!1,q()}}}function Cl(o){let e,s,t,l,n='<p class="font-medium text-blue-900">To run locally:</p> <code class="text-xs bg-blue-100 px-1.5 py-0.5 rounded">pip install hfstudio</code> <span class="text-blue-700">and run</span> <code class="text-xs bg-blue-100 px-1.5 py-0.5 rounded">hfstudio</code> <span class="text-blue-700">from your terminal</span>',r;return s=new Zl({props:{size:18,class:"text-blue-600 mt-0.5 flex-shrink-0"}}),{c(){e=h("div"),ne(s.$$.fragment),t=E(),l=h("div"),l.innerHTML=n,this.h()},l(i){e=d(i,"DIV",{class:!0});var f=m(e);le(s.$$.fragment,f),t=$(f),l=d(f,"DIV",{class:!0,"data-svelte-h":!0}),Xe(l)!=="svelte-p3cqs1"&&(l.innerHTML=n),f.forEach(u),this.h()},h(){c(l,"class","text-sm"),c(e,"class","mb-4 p-3 bg-blue-50 border border-blue-200 rounded-lg flex items-start gap-2")},m(i,f){Q(i,e,f),te(s,e,null),a(e,t),a(e,l),r=!0},i(i){r||(y(s.$$.fragment,i),r=!0)},o(i){I(s.$$.fragment,i),r=!1},d(i){i&&u(e),ee(s)}}}function Gn(o){let e,s,t;return e=new hl({props:{size:20}}),{c(){ne(e.$$.fragment),s=M(`
|
| 9 |
+
Generate speech`)},l(l){le(e.$$.fragment,l),s=O(l,`
|
| 10 |
+
Generate speech`)},m(l,n){te(e,l,n),Q(l,s,n),t=!0},i(l){t||(y(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){l&&u(s),ee(e,l)}}}function Rn(o){let e,s,t;return e=new vn({props:{size:20,class:"animate-spin"}}),{c(){ne(e.$$.fragment),s=M(`
|
| 11 |
+
Generating...`)},l(l){le(e.$$.fragment,l),s=O(l,`
|
| 12 |
+
Generating...`)},m(l,n){te(e,l,n),Q(l,s,n),t=!0},i(l){t||(y(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){l&&u(s),ee(e,l)}}}function Al(o){let e,s,t,l,n,r,i,f,p,w,b,_,g,v,k,T,S,G="Share",R,A,C,x="Download",U,H,q,B,P,j,z,Ce,Z,F,$e=Pt(o[16])+"",ve,he,K,D,re,Ee,ce=Pt(o[17])+"",Ne,Ie,oe,Be,Oe,Ae,ye,me,Ue,$t,be,J,fe,Pe,Te,De=Pt(o[16])+"",xe,it,Et,ct,ut,tt,_t=Pt(o[17])+"",Ct,Ut,ge,lt,He,nt,ft,dt,ht,mt,qe,st,Ot,Me,ze,Bt;k=new wl({props:{size:14,class:"text-gray-600"}}),H=new yl({props:{size:14,class:"text-gray-600"}});const pt=[Kn,qn],Le=[];function vt(V,ae){return V[15]?0:1}j=vt(o),z=Le[j]=pt[j](o),Oe=new On({props:{size:20,class:"text-gray-600"}});const Rt=[Xn,Jn],gt=[];function Nt(V,ae){return V[15]?0:1}me=Nt(o),Ue=gt[me]=Rt[me](o),J=new jn({props:{size:20,class:"text-gray-600"}}),He=new wl({props:{size:14}}),ht=new yl({props:{size:16,class:"text-gray-600"}}),st=new wn({props:{size:16,class:"text-gray-600"}});let ke=o[8]&&Pl(o);return{c(){e=h("div"),s=h("div"),t=h("div"),l=E(),n=h("div"),r=h("h3"),i=M(o[18]),f=E(),p=h("p"),w=M(o[3]),b=M(" • Created 1 second ago"),_=E(),g=h("div"),v=h("button"),ne(k.$$.fragment),T=E(),S=h("span"),S.textContent=G,R=E(),A=h("button"),C=h("span"),C.textContent=x,U=E(),ne(H.$$.fragment),q=E(),B=h("div"),P=h("button"),z.c(),Ce=E(),Z=h("div"),F=h("span"),ve=M($e),he=E(),K=h("div"),D=h("div"),re=E(),Ee=h("span"),Ne=M(ce),Ie=E(),oe=h("div"),Be=h("button"),ne(Oe.$$.fragment),Ae=E(),ye=h("button"),Ue.c(),$t=E(),be=h("button"),ne(J.$$.fragment),fe=E(),Pe=h("div"),Te=h("span"),xe=M(De),it=E(),Et=h("div"),ct=h("div"),ut=E(),tt=h("span"),Ct=M(_t),Ut=E(),ge=h("div"),lt=h("button"),ne(He.$$.fragment),nt=M(`
|
| 13 |
+
Share`),ft=E(),dt=h("button"),ne(ht.$$.fragment),mt=E(),qe=h("button"),ne(st.$$.fragment),Ot=E(),ke&&ke.c(),this.h()},l(V){e=d(V,"DIV",{class:!0});var ae=m(e);s=d(ae,"DIV",{class:!0});var _e=m(s);t=d(_e,"DIV",{class:!0}),m(t).forEach(u),l=$(_e),n=d(_e,"DIV",{class:!0});var Se=m(n);r=d(Se,"H3",{class:!0});var Ht=m(r);i=O(Ht,o[18]),Ht.forEach(u),f=$(Se),p=d(Se,"P",{class:!0});var Ft=m(p);w=O(Ft,o[3]),b=O(Ft," • Created 1 second ago"),Ft.forEach(u),Se.forEach(u),_=$(_e),g=d(_e,"DIV",{class:!0});var de=m(g);v=d(de,"BUTTON",{class:!0});var Mt=m(v);le(k.$$.fragment,Mt),T=$(Mt),S=d(Mt,"SPAN",{class:!0,"data-svelte-h":!0}),Xe(S)!=="svelte-hbn8gl"&&(S.textContent=G),Mt.forEach(u),R=$(de),A=d(de,"BUTTON",{class:!0});var ot=m(A);C=d(ot,"SPAN",{class:!0,"data-svelte-h":!0}),Xe(C)!=="svelte-h01aeg"&&(C.textContent=x),U=$(ot),le(H.$$.fragment,ot),ot.forEach(u),de.forEach(u),_e.forEach(u),q=$(ae),B=d(ae,"DIV",{class:!0});var zt=m(B);P=d(zt,"BUTTON",{class:!0});var pe=m(P);z.l(pe),pe.forEach(u),Ce=$(zt),Z=d(zt,"DIV",{class:!0});var Ke=m(Z);F=d(Ke,"SPAN",{class:!0});var we=m(F);ve=O(we,$e),we.forEach(u),he=$(Ke),K=d(Ke,"DIV",{class:!0});var Ve=m(K);D=d(Ve,"DIV",{class:!0,style:!0}),m(D).forEach(u),Ve.forEach(u),re=$(Ke),Ee=d(Ke,"SPAN",{class:!0});var It=m(Ee);Ne=O(It,ce),It.forEach(u),Ke.forEach(u),zt.forEach(u),Ie=$(ae),oe=d(ae,"DIV",{class:!0});var se=m(oe);Be=d(se,"BUTTON",{class:!0,title:!0});var N=m(Be);le(Oe.$$.fragment,N),N.forEach(u),Ae=$(se),ye=d(se,"BUTTON",{class:!0});var X=m(ye);Ue.l(X),X.forEach(u),$t=$(se),be=d(se,"BUTTON",{class:!0,title:!0});var ue=m(be);le(J.$$.fragment,ue),ue.forEach(u),fe=$(se),Pe=d(se,"DIV",{class:!0});var W=m(Pe);Te=d(W,"SPAN",{class:!0});var Je=m(Te);xe=O(Je,De),Je.forEach(u),it=$(W),Et=d(W,"DIV",{class:!0});var qt=m(Et);ct=d(qt,"DIV",{class:!0,style:!0}),m(ct).forEach(u),qt.forEach(u),ut=$(W),tt=d(W,"SPAN",{class:!0});var Wt=m(tt);Ct=O(Wt,_t),Wt.forEach(u),W.forEach(u),Ut=$(se),ge=d(se,"DIV",{class:!0});var Tt=m(ge);lt=d(Tt,"BUTTON",{class:!0});var bt=m(lt);le(He.$$.fragment,bt),nt=O(bt,`
|
| 14 |
+
Share`),bt.forEach(u),ft=$(Tt),dt=d(Tt,"BUTTON",{class:!0,title:!0});var Dt=m(dt);le(ht.$$.fragment,Dt),Dt.forEach(u),mt=$(Tt),qe=d(Tt,"BUTTON",{class:!0,title:!0});var Lt=m(qe);le(st.$$.fragment,Lt),Lt.forEach(u),Tt.forEach(u),se.forEach(u),Ot=$(ae),ke&&ke.l(ae),ae.forEach(u),this.h()},h(){c(t,"class","w-2 h-2 bg-green-500 rounded-full"),c(r,"class","font-medium text-gray-900 text-sm"),c(p,"class","text-xs text-gray-500"),c(n,"class","flex-1"),c(S,"class","text-gray-700"),c(v,"class","flex items-center gap-1.5 px-3 py-1.5 text-sm border border-gray-200 rounded-md hover:bg-gray-50 transition-colors"),c(C,"class","text-gray-700"),c(A,"class","flex items-center gap-1.5 px-3 py-1.5 text-sm border border-gray-200 rounded-md hover:bg-gray-50 transition-colors"),c(g,"class","flex items-center gap-2"),c(s,"class","flex items-center gap-3 mb-4"),c(P,"class","w-8 h-8 bg-black rounded-full flex items-center justify-center hover:bg-gray-800 transition-colors"),c(F,"class","text-xs text-gray-500 font-mono"),c(D,"class","h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all"),Kt(D,"width",o[16]/o[17]*100+"%"),c(K,"class","flex-1 h-1 bg-gray-200 rounded-full cursor-pointer"),c(Ee,"class","text-xs text-gray-500 font-mono"),c(Z,"class","flex-1 flex items-center gap-2"),c(B,"class","flex items-center gap-3 mb-4"),c(Be,"class","p-2 hover:bg-gray-100 rounded-full"),c(Be,"title","Skip back"),c(ye,"class","w-12 h-12 bg-black rounded-full flex items-center justify-center hover:bg-gray-800 transition-colors"),c(be,"class","p-2 hover:bg-gray-100 rounded-full"),c(be,"title","Skip forward"),c(Te,"class","text-xs text-gray-500 font-mono"),c(ct,"class","h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all"),Kt(ct,"width",o[16]/o[17]*100+"%"),c(Et,"class","flex-1 h-1 bg-gray-200 rounded-full"),c(tt,"class","text-xs text-gray-500 font-mono"),c(Pe,"class","flex-1 flex items-center gap-3"),c(lt,"class","flex items-center gap-2 px-3 py-1.5 text-sm border border-gray-200 rounded-md hover:bg-gray-50"),c(dt,"class","p-2 hover:bg-gray-100 rounded-md"),c(dt,"title","Download"),c(qe,"class","p-2 hover:bg-gray-100 rounded-md"),c(qe,"title","More options"),c(ge,"class","flex items-center gap-2"),c(oe,"class","flex items-center gap-4 mb-4"),c(e,"class","p-4 border border-gray-200 rounded-lg bg-white")},m(V,ae){Q(V,e,ae),a(e,s),a(s,t),a(s,l),a(s,n),a(n,r),a(r,i),a(n,f),a(n,p),a(p,w),a(p,b),a(s,_),a(s,g),a(g,v),te(k,v,null),a(v,T),a(v,S),a(g,R),a(g,A),a(A,C),a(A,U),te(H,A,null),a(e,q),a(e,B),a(B,P),Le[j].m(P,null),a(B,Ce),a(B,Z),a(Z,F),a(F,ve),a(Z,he),a(Z,K),a(K,D),a(Z,re),a(Z,Ee),a(Ee,Ne),a(e,Ie),a(e,oe),a(oe,Be),te(Oe,Be,null),a(oe,Ae),a(oe,ye),gt[me].m(ye,null),a(oe,$t),a(oe,be),te(J,be,null),a(oe,fe),a(oe,Pe),a(Pe,Te),a(Te,xe),a(Pe,it),a(Pe,Et),a(Et,ct),a(Pe,ut),a(Pe,tt),a(tt,Ct),a(oe,Ut),a(oe,ge),a(ge,lt),te(He,lt,null),a(lt,nt),a(ge,ft),a(ge,dt),te(ht,dt,null),a(ge,mt),a(ge,qe),te(st,qe,null),a(e,Ot),ke&&ke.m(e,null),Me=!0,ze||(Bt=[Y(v,"click",jl),Y(A,"click",o[28]),Y(P,"click",o[23]),Y(ye,"click",o[23]),Y(lt,"click",jl),Y(dt,"click",o[28])],ze=!0)},p(V,ae){(!Me||ae[0]&262144)&&je(i,V[18]),(!Me||ae[0]&8)&&je(w,V[3]);let _e=j;j=vt(V),j!==_e&&(Vt(),I(Le[_e],1,1,()=>{Le[_e]=null}),St(),z=Le[j],z||(z=Le[j]=pt[j](V),z.c()),y(z,1),z.m(P,null)),(!Me||ae[0]&65536)&&$e!==($e=Pt(V[16])+"")&&je(ve,$e),(!Me||ae[0]&196608)&&Kt(D,"width",V[16]/V[17]*100+"%"),(!Me||ae[0]&131072)&&ce!==(ce=Pt(V[17])+"")&&je(Ne,ce);let Se=me;me=Nt(V),me!==Se&&(Vt(),I(gt[Se],1,1,()=>{gt[Se]=null}),St(),Ue=gt[me],Ue||(Ue=gt[me]=Rt[me](V),Ue.c()),y(Ue,1),Ue.m(ye,null)),(!Me||ae[0]&65536)&&De!==(De=Pt(V[16])+"")&&je(xe,De),(!Me||ae[0]&196608)&&Kt(ct,"width",V[16]/V[17]*100+"%"),(!Me||ae[0]&131072)&&_t!==(_t=Pt(V[17])+"")&&je(Ct,_t),V[8]?ke?ke.p(V,ae):(ke=Pl(V),ke.c(),ke.m(e,null)):ke&&(ke.d(1),ke=null)},i(V){Me||(y(k.$$.fragment,V),y(H.$$.fragment,V),y(z),y(Oe.$$.fragment,V),y(Ue),y(J.$$.fragment,V),y(He.$$.fragment,V),y(ht.$$.fragment,V),y(st.$$.fragment,V),Me=!0)},o(V){I(k.$$.fragment,V),I(H.$$.fragment,V),I(z),I(Oe.$$.fragment,V),I(Ue),I(J.$$.fragment,V),I(He.$$.fragment,V),I(ht.$$.fragment,V),I(st.$$.fragment,V),Me=!1},d(V){V&&u(e),ee(k),ee(H),Le[j].d(),ee(Oe),gt[me].d(),ee(J),ee(He),ee(ht),ee(st),ke&&ke.d(),ze=!1,Jt(Bt)}}}function qn(o){let e,s;return e=new hl({props:{size:14,class:"text-white ml-0.5"}}),{c(){ne(e.$$.fragment)},l(t){le(e.$$.fragment,t)},m(t,l){te(e,t,l),s=!0},i(t){s||(y(e.$$.fragment,t),s=!0)},o(t){I(e.$$.fragment,t),s=!1},d(t){ee(e,t)}}}function Kn(o){let e;return{c(){e=h("div"),this.h()},l(s){e=d(s,"DIV",{class:!0}),m(e).forEach(u),this.h()},h(){c(e,"class","pause-filled text-white")},m(s,t){Q(s,e,t)},i:wt,o:wt,d(s){s&&u(e)}}}function Jn(o){let e,s;return e=new hl({props:{size:20,class:"text-white ml-0.5"}}),{c(){ne(e.$$.fragment)},l(t){le(e.$$.fragment,t)},m(t,l){te(e,t,l),s=!0},i(t){s||(y(e.$$.fragment,t),s=!0)},o(t){I(e.$$.fragment,t),s=!1},d(t){ee(e,t)}}}function Xn(o){let e;return{c(){e=h("div"),this.h()},l(s){e=d(s,"DIV",{class:!0}),m(e).forEach(u),this.h()},h(){c(e,"class","pause-filled text-white scale-150")},m(s,t){Q(s,e,t)},i:wt,o:wt,d(s){s&&u(e)}}}function Pl(o){let e,s,t,l;return{c(){e=h("audio"),this.h()},l(n){e=d(n,"AUDIO",{src:!0,style:!0}),m(e).forEach(u),this.h()},h(){pl(e.src,s=o[8])||c(e,"src",s),Kt(e,"display","none")},m(n,r){Q(n,e,r),o[38](e),t||(l=[Y(e,"loadedmetadata",o[24]),Y(e,"timeupdate",o[25]),Y(e,"play",o[26]),Y(e,"pause",o[27])],t=!0)},p(n,r){r[0]&256&&!pl(e.src,s=n[8])&&c(e,"src",s)},d(n){n&&u(e),o[38](null),t=!1,Jt(l)}}}function xl(o){let e=o[53].name+"",s,t,l=o[53].badge&&Yn(o);return{c(){s=M(e),l&&l.c(),t=xt()},l(n){s=O(n,e),l&&l.l(n),t=xt()},m(n,r){Q(n,s,r),l&&l.m(n,r),Q(n,t,r)},p(n,r){n[53].badge&&l.p(n,r)},d(n){n&&(u(s),u(t)),l&&l.d(n)}}}function Yn(o){let e,s,t,l=o[53].badge+"",n,r;return{c(){e=M(" "),s=h("span"),t=M("("),n=M(l),r=M(")"),this.h()},l(i){e=O(i," "),s=d(i,"SPAN",{class:!0});var f=m(s);t=O(f,"("),n=O(f,l),r=O(f,")"),f.forEach(u),this.h()},h(){c(s,"class","text-xs text-gray-500")},m(i,f){Q(i,e,f),Q(i,s,f),a(s,t),a(s,n),a(s,r)},p:wt,d(i){i&&(u(e),u(s))}}}function Ul(o){let e,s=o[53].name===o[4]&&xl(o);return{c(){s&&s.c(),e=xt()},l(t){s&&s.l(t),e=xt()},m(t,l){s&&s.m(t,l),Q(t,e,l)},p(t,l){t[53].name===t[4]?s?s.p(t,l):(s=xl(t),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null)},d(t){t&&u(e),s&&s.d(t)}}}function Ol(o){let e,s=yt(o[20]),t=[];for(let l=0;l<s.length;l+=1)t[l]=Ml(Nl(o,s,l));return{c(){e=h("div");for(let l=0;l<t.length;l+=1)t[l].c();this.h()},l(l){e=d(l,"DIV",{class:!0});var n=m(e);for(let r=0;r<t.length;r+=1)t[r].l(n);n.forEach(u),this.h()},h(){c(e,"class","absolute top-full left-0 right-0 mt-1 bg-white border border-gray-200 rounded-lg shadow-lg z-10")},m(l,n){Q(l,e,n);for(let r=0;r<t.length;r+=1)t[r]&&t[r].m(e,null)},p(l,n){if(n[0]&1048656){s=yt(l[20]);let r;for(r=0;r<s.length;r+=1){const i=Nl(l,s,r);t[r]?t[r].p(i,n):(t[r]=Ml(i),t[r].c(),t[r].m(e,null))}for(;r<t.length;r+=1)t[r].d(1);t.length=s.length}},d(l){l&&u(e),rl(t,l)}}}function Qn(o){let e,s,t,l=o[53].badge+"",n,r;return{c(){e=M(" "),s=h("span"),t=M("("),n=M(l),r=M(")"),this.h()},l(i){e=O(i," "),s=d(i,"SPAN",{class:!0});var f=m(s);t=O(f,"("),n=O(f,l),r=O(f,")"),f.forEach(u),this.h()},h(){c(s,"class","text-xs text-gray-500")},m(i,f){Q(i,e,f),Q(i,s,f),a(s,t),a(s,n),a(s,r)},p:wt,d(i){i&&(u(e),u(s))}}}function Ml(o){let e,s=o[53].name+"",t,l,n,r,i,f=o[53].badge&&Qn(o);function p(){return o[40](o[53])}return{c(){e=h("button"),t=M(s),f&&f.c(),l=E(),this.h()},l(w){e=d(w,"BUTTON",{class:!0});var b=m(e);t=O(b,s),f&&f.l(b),l=$(b),b.forEach(u),this.h()},h(){c(e,"class",n="w-full px-3 py-2 text-left hover:bg-gray-50 transition-colors text-sm "+(o[53].name===o[4]?"bg-gray-100":""))},m(w,b){Q(w,e,b),a(e,t),f&&f.m(e,null),a(e,l),r||(i=Y(e,"click",p),r=!0)},p(w,b){o=w,o[53].badge&&f.p(o,b),b[0]&16&&n!==(n="w-full px-3 py-2 text-left hover:bg-gray-50 transition-colors text-sm "+(o[53].name===o[4]?"bg-gray-100":""))&&c(e,"class",n)},d(w){w&&u(e),f&&f.d(),r=!1,i()}}}function zl(o){let e,s,t,l=o[50].name[0]+"",n,r,i,f=o[50].name+"",p,w,b,_=o[50].description+"",g,v,k,T,S;function G(){return o[41](o[50])}return{c(){e=h("button"),s=h("div"),t=h("div"),n=M(l),r=E(),i=h("span"),p=M(f),w=E(),b=h("div"),g=M(_),v=E(),this.h()},l(R){e=d(R,"BUTTON",{class:!0});var A=m(e);s=d(A,"DIV",{class:!0});var C=m(s);t=d(C,"DIV",{class:!0});var x=m(t);n=O(x,l),x.forEach(u),r=$(C),i=d(C,"SPAN",{class:!0});var U=m(i);p=O(U,f),U.forEach(u),C.forEach(u),w=$(A),b=d(A,"DIV",{class:!0});var H=m(b);g=O(H,_),H.forEach(u),v=$(A),A.forEach(u),this.h()},h(){c(t,"class","w-8 h-8 bg-gradient-to-br from-amber-400 to-orange-500 rounded-full flex items-center justify-center text-white text-xs font-medium"),c(i,"class","text-sm font-medium"),c(s,"class","flex items-center gap-2"),c(b,"class","text-xs text-gray-500"),c(e,"class",k="w-full flex items-center justify-between p-2 rounded-md hover:bg-gray-50 transition-colors text-left "+(o[50].name===o[3]?"bg-gray-100":""))},m(R,A){Q(R,e,A),a(e,s),a(s,t),a(t,n),a(s,r),a(s,i),a(i,p),a(e,w),a(e,b),a(b,g),a(e,v),T||(S=Y(e,"click",G),T=!0)},p(R,A){o=R,A[0]&8&&k!==(k="w-full flex items-center justify-between p-2 rounded-md hover:bg-gray-50 transition-colors text-left "+(o[50].name===o[3]?"bg-gray-100":""))&&c(e,"class",k)},d(R){R&&u(e),T=!1,S()}}}function Ll(o){let e,s;return{c(){e=h("div"),s=M(o[9]),this.h()},l(t){e=d(t,"DIV",{class:!0});var l=m(e);s=O(l,o[9]),l.forEach(u),this.h()},h(){c(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-10276gt")},m(t,l){Q(t,e,l),a(e,s)},p(t,l){l[0]&512&&je(s,t[9])},d(t){t&&u(e)}}}function Zn(o){let e,s,t,l,n,r,i,f,p,w,b,_,g,v,k,T,S,G,R,A,C,x,U,H,q,B,P,j,z,Ce,Z;S=new In({props:{size:14}}),x=new an({props:{size:14}});let F=o[10]&&Tl();const $e=[Hn,Bn],ve=[];function he(D,re){return D[1]==="ui"?0:1}B=he(o),P=ve[B]=$e[B](o);let K=o[9]&&Ll(o);return{c(){e=h("div"),s=h("header"),t=h("div"),l=h("div"),n=h("div"),r=h("button"),i=M("API"),p=E(),w=h("button"),b=M("Local"),g=E(),v=h("div"),k=h("div"),T=h("button"),ne(S.$$.fragment),G=M(`
|
| 15 |
+
UI`),A=E(),C=h("button"),ne(x.$$.fragment),U=M(`
|
| 16 |
+
API Recorder
|
| 17 |
+
`),F&&F.c(),q=E(),P.c(),j=E(),K&&K.c(),this.h()},l(D){e=d(D,"DIV",{class:!0});var re=m(e);s=d(re,"HEADER",{class:!0});var Ee=m(s);t=d(Ee,"DIV",{class:!0});var ce=m(t);l=d(ce,"DIV",{class:!0});var Ne=m(l);n=d(Ne,"DIV",{class:!0});var Ie=m(n);r=d(Ie,"BUTTON",{class:!0});var oe=m(r);i=O(oe,"API"),oe.forEach(u),p=$(Ie),w=d(Ie,"BUTTON",{class:!0});var Be=m(w);b=O(Be,"Local"),Be.forEach(u),Ie.forEach(u),Ne.forEach(u),g=$(ce),v=d(ce,"DIV",{class:!0});var Oe=m(v);k=d(Oe,"DIV",{class:!0});var Ae=m(k);T=d(Ae,"BUTTON",{class:!0});var ye=m(T);le(S.$$.fragment,ye),G=O(ye,`
|
| 18 |
+
UI`),ye.forEach(u),A=$(Ae),C=d(Ae,"BUTTON",{class:!0});var me=m(C);le(x.$$.fragment,me),U=O(me,`
|
| 19 |
+
API Recorder
|
| 20 |
+
`),F&&F.l(me),me.forEach(u),Ae.forEach(u),Oe.forEach(u),ce.forEach(u),Ee.forEach(u),q=$(re),P.l(re),j=$(re),K&&K.l(re),re.forEach(u),this.h()},h(){c(r,"class",f="px-3 py-1 text-sm font-medium rounded transition-colors "+(o[5]==="api"?"bg-white shadow-sm":"text-gray-600")),c(w,"class",_="px-3 py-1 text-sm font-medium rounded transition-colors "+(o[5]==="local"?"bg-white shadow-sm":"text-gray-600")),c(n,"class","flex items-center bg-gray-100 rounded-md p-0.5"),c(l,"class","flex items-center gap-3"),c(T,"class",R="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors "+(o[1]==="ui"?"bg-white shadow-sm":"text-gray-600")),c(C,"class",H="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors relative overflow-hidden "+(o[1]==="code"?"bg-white shadow-sm":"text-gray-600")+" "+(o[10]?"code-flash":"")+" svelte-10276gt"),c(k,"class","flex items-center bg-gray-100 rounded-md p-0.5"),c(v,"class","flex items-center gap-2"),c(t,"class","flex items-center justify-between px-4 py-2"),c(s,"class","border-b border-gray-200 bg-white"),c(e,"class","flex flex-col h-full")},m(D,re){Q(D,e,re),a(e,s),a(s,t),a(t,l),a(l,n),a(n,r),a(r,i),a(n,p),a(n,w),a(w,b),a(t,g),a(t,v),a(v,k),a(k,T),te(S,T,null),a(T,G),a(k,A),a(k,C),te(x,C,null),a(C,U),F&&F.m(C,null),a(e,q),ve[B].m(e,null),a(e,j),K&&K.m(e,null),z=!0,Ce||(Z=[Y(r,"click",o[33]),Y(w,"click",o[34]),Y(T,"click",o[35]),Y(C,"click",o[36]),Y(e,"click",o[29])],Ce=!0)},p(D,re){(!z||re[0]&32&&f!==(f="px-3 py-1 text-sm font-medium rounded transition-colors "+(D[5]==="api"?"bg-white shadow-sm":"text-gray-600")))&&c(r,"class",f),(!z||re[0]&32&&_!==(_="px-3 py-1 text-sm font-medium rounded transition-colors "+(D[5]==="local"?"bg-white shadow-sm":"text-gray-600")))&&c(w,"class",_),(!z||re[0]&2&&R!==(R="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors "+(D[1]==="ui"?"bg-white shadow-sm":"text-gray-600")))&&c(T,"class",R),D[10]?F||(F=Tl(),F.c(),F.m(C,null)):F&&(F.d(1),F=null),(!z||re[0]&1026&&H!==(H="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors relative overflow-hidden "+(D[1]==="code"?"bg-white shadow-sm":"text-gray-600")+" "+(D[10]?"code-flash":"")+" svelte-10276gt"))&&c(C,"class",H);let Ee=B;B=he(D),B===Ee?ve[B].p(D,re):(Vt(),I(ve[Ee],1,1,()=>{ve[Ee]=null}),St(),P=ve[B],P?P.p(D,re):(P=ve[B]=$e[B](D),P.c()),y(P,1),P.m(e,j)),D[9]?K?K.p(D,re):(K=Ll(D),K.c(),K.m(e,null)):K&&(K.d(1),K=null)},i(D){z||(y(S.$$.fragment,D),y(x.$$.fragment,D),y(P),z=!0)},o(D){I(S.$$.fragment,D),I(x.$$.fragment,D),I(P),z=!1},d(D){D&&u(e),ee(S),ee(x),F&&F.d(),ve[B].d(),K&&K.d(),Ce=!1,Jt(Z)}}}function dl(){if(console.log("Getting access token..."),typeof window<"u"&&window.gradio&&window.gradio.auth_token)return console.log("Found Gradio auth token:",window.gradio.auth_token.substring(0,10)+"..."),window.gradio.auth_token;const o=document.querySelector('meta[name="hf-oauth-token"]');if(o){const t=o.getAttribute("content");if(t)return console.log("Found token in meta tag:",t.substring(0,10)+"..."),t}const e=["hf_access_token","hf_token","huggingface_token","oauth_token","access_token"];for(const t of e){const l=localStorage.getItem(t);if(l)return console.log(`Found token in localStorage['${t}']:`,l.substring(0,10)+"..."),l}for(const t of e){const l=sessionStorage.getItem(t);if(l)return console.log(`Found token in sessionStorage['${t}']:`,l.substring(0,10)+"..."),l}const s=document.cookie.split(";");for(const t of s){const[l,n]=t.trim().split("=");if(l&&(l.includes("token")||l.includes("hf")||l.includes("oauth")))return console.log(`Found potential token in cookie '${l}':`,n?n.substring(0,10)+"...":"empty"),decodeURIComponent(n)}try{const t=document.querySelector("script[data-hf-token]");if(t){const l=t.getAttribute("data-hf-token");if(l)return console.log("Found token in script data attribute:",l.substring(0,10)+"..."),l}}catch{}return console.log("No OAuth token found in any storage location"),console.log("Available localStorage keys:",Object.keys(localStorage)),console.log("Available sessionStorage keys:",Object.keys(sessionStorage)),console.log("Available cookies:",document.cookie),console.log("Available global objects:",{window:typeof window,gradio:typeof(window==null?void 0:window.gradio),hf:typeof(window==null?void 0:window.hf),huggingface:typeof(window==null?void 0:window.huggingface)}),console.log("URL search params:",new URLSearchParams(window.location.search).toString()),console.log("All meta tags:",Array.from(document.getElementsByTagName("meta")).map(t=>{var l;return{name:t.name,content:((l=t.content)==null?void 0:l.substring(0,20))+"..."}})),null}function Pt(o){const e=Math.floor(o/60),s=Math.floor(o%60);return`${e}:${s.toString().padStart(2,"0")}`}function jl(){console.log("Share audio")}function Bl(){const o=dl();return`# Install required packages
|
| 21 |
+
# pip install huggingface-hub
|
| 22 |
+
|
| 23 |
+
from huggingface_hub import InferenceClient
|
| 24 |
+
import base64
|
| 25 |
+
import io
|
| 26 |
+
|
| 27 |
+
# Initialize the client
|
| 28 |
+
client = InferenceClient(
|
| 29 |
+
provider="fal-ai",
|
| 30 |
+
api_key="YOUR_HF_TOKEN", # Get your token from https://huggingface.co/settings/tokens
|
| 31 |
+
)`}function es(){return`# Save the audio to a file
|
| 32 |
+
output_filename = "output_speech.wav"
|
| 33 |
+
|
| 34 |
+
with open(output_filename, "wb") as f:
|
| 35 |
+
f.write(audio_bytes)
|
| 36 |
+
|
| 37 |
+
print(f"✓ Audio saved to {output_filename}")
|
| 38 |
+
|
| 39 |
+
# Optional: Play the audio (requires additional packages)
|
| 40 |
+
# from playsound import playsound
|
| 41 |
+
# playsound(output_filename)`}function ts(o,e,s){let t="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.",l="Novia",n="Chatterbox",r="api",i="ui",f=!1,p=!1,w=[],b=null,_=null,g=!1,v=1,k=.5,T=.75,S=0,G=!1,R=0,A=0,C="",x=null;const U=[{id:"chatterbox",name:"Chatterbox",badge:"recommended"},{id:"kokoro",name:"Kokoro",badge:"faster but lower quality"}],H=[{id:"novia",name:"Novia",description:"Warm, conversational voice"},{id:"sarah",name:"Sarah",description:"Clear, professional tone"},{id:"alex",name:"Alex",description:"Friendly, approachable voice"},{id:"emma",name:"Emma",description:"Calm, soothing delivery"}];async function q(){if(console.log("generateSpeech called, text:",t.trim().substring(0,50)),!t.trim())return;if(!dl()){window.dispatchEvent(new CustomEvent("show-signin-popover"));return}console.log("Starting generation..."),s(7,p=!0),s(8,b=null),s(16,R=0),w.length===0&&$e("Setup and Import",Bl()),$e("Generate Speech",ve()),i==="ui"&&(s(10,g=!0),setTimeout(()=>{s(10,g=!1)},2500)),s(15,G=!1),s(18,C=t.length>30?t.substring(0,30)+"...":t);try{const fe=dl();console.log("Access token for API call:",fe?"Found ("+fe.substring(0,10)+"...)":"None");const Pe={text:t,voice_id:l.toLowerCase(),model_id:n.toLowerCase(),mode:r,access_token:fe,parameters:{speed:v,stability:k,similarity:T,style_exaggeration:S}};console.log("Sending request to /api/tts/generate:",Pe);const Te=await fetch("/api/tts/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Pe)});if(console.log("API response status:",Te.status),!Te.ok){const xe=await Te.text();throw console.error("API error response:",xe),new Error(`HTTP error! status: ${Te.status}, body: ${xe}`)}const De=await Te.json();if(console.log("API response result:",De),De.success&&De.audio_url)s(8,b=De.audio_url),$e("Save Audio Output",es()),i==="ui"&&(s(10,g=!0),setTimeout(()=>{s(10,g=!1)},2500));else{const xe=De.error||"Unknown error occurred";alert(`❌ ${xe}`),s(8,b=null)}}catch(fe){console.error("Error generating speech:",fe),alert("❌ Network error: Failed to connect to the server"),s(8,b=null)}finally{s(7,p=!1)}}function B(){x&&(G?x.pause():x.play())}function P(){x&&(s(17,A=x.duration),x.play())}function j(){x&&s(16,R=x.currentTime)}function z(){s(15,G=!0)}function Ce(){s(15,G=!1)}function Z(){if(b){const J=document.createElement("a");J.href=b,J.download="speech.wav",J.click()}}function F(J){J.target.closest(".model-dropdown")||s(6,f=!1)}function $e(J,fe,Pe=null){const Te={id:Date.now()+Math.random(),title:J,code:fe,output:Pe,timestamp:new Date().toLocaleTimeString()};return s(2,w=[...w,Te]),Te}function ve(){return t.length>100&&t.substring(0,100)+"",`# Text to convert to speech
|
| 42 |
+
text = """${t}"""
|
| 43 |
+
|
| 44 |
+
# Voice and model settings
|
| 45 |
+
model = "ResembleAI/chatterbox"
|
| 46 |
+
voice = "${l.toLowerCase()}"
|
| 47 |
+
speed = ${v}
|
| 48 |
+
stability = ${k}
|
| 49 |
+
similarity = ${T}
|
| 50 |
+
style_exaggeration = ${S}
|
| 51 |
+
|
| 52 |
+
# Generate speech
|
| 53 |
+
print("Generating speech...")
|
| 54 |
+
try:
|
| 55 |
+
audio_bytes = client.text_to_speech(
|
| 56 |
+
text,
|
| 57 |
+
model=model,
|
| 58 |
+
# Note: Voice and other parameters may vary by model
|
| 59 |
+
)
|
| 60 |
+
print(f"✓ Generated {len(audio_bytes)} bytes of audio")
|
| 61 |
+
except Exception as e:
|
| 62 |
+
print(f"Error: {e}")`}function he(J,fe="Copied to clipboard!"){navigator.clipboard.writeText(J).then(()=>{s(9,_=fe),setTimeout(()=>{s(9,_=null)},2e3)})}function K(){const J=w.map(fe=>`# ${fe.title}
|
| 63 |
+
${fe.code}`).join(`
|
| 64 |
+
|
| 65 |
+
`);he(J,"All code copied!")}let D=t;const re=()=>s(5,r="api"),Ee=()=>s(5,r="local"),ce=()=>s(1,i="ui"),Ne=()=>s(1,i="code");function Ie(){t=this.value,s(0,t)}function oe(J){Gl[J?"unshift":"push"](()=>{x=J,s(19,x)})}const Be=()=>s(6,f=!f),Oe=J=>{s(4,n=J.name),s(6,f=!1)},Ae=J=>s(3,l=J.name);function ye(){v=ol(this.value),s(11,v)}function me(){k=ol(this.value),s(12,k)}function Ue(){T=ol(this.value),s(13,T)}function $t(){S=ol(this.value),s(14,S)}const be=J=>he(J.code);return o.$$.update=()=>{o.$$.dirty[0]&2&&i==="ui"&&s(2,w=[]),o.$$.dirty[0]&6&&w.length===0&&i==="code"&&$e("Setup and Import",Bl()),o.$$.dirty[0]&5|o.$$.dirty[1]&2&&t!==D&&w.length>0&&s(32,D=t)},[t,i,w,l,n,r,f,p,b,_,g,v,k,T,S,G,R,A,C,x,U,H,q,B,P,j,z,Ce,Z,F,he,K,D,re,Ee,ce,Ne,Ie,oe,Be,Oe,Ae,ye,me,Ue,$t,be]}class ss extends We{constructor(e){super(),Ge(this,e,ts,Zn,Fe,{},null,[-1,-1])}}export{ss as component};
|
hfstudio/static/_app/immutable/nodes/3.COyHjFz7.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{S as V,i as j,s as q,n as A,d,b as y,c as h,m as N,o as f,p as O,h as E,e as p,f as b,q as H,k as P,j as _,l as z,r as M,a as S,u as R,g as I,t as C}from"../chunks/BI_gvUUO.js";import"../chunks/IHki7fMi.js";import{g as F}from"../chunks/CThD--Q6.js";import{p as B}from"../chunks/vedv2sVy.js";function G(m){let s,t,l,e,r;return{c(){s=_("div"),t=_("div"),l=P(),e=_("p"),r=C(m[0]),this.h()},l(u){s=p(u,"DIV",{class:!0});var o=b(s);t=p(o,"DIV",{class:!0}),b(t).forEach(d),l=E(o),e=p(o,"P",{});var n=b(e);r=I(n,m[0]),n.forEach(d),o.forEach(d),this.h()},h(){f(t,"class","animate-spin w-8 h-8 border-2 border-amber-400 border-t-transparent rounded-full mx-auto mb-2"),f(s,"class","text-gray-600 mb-4")},m(u,o){y(u,s,o),h(s,t),h(s,l),h(s,e),h(e,r)},p(u,o){o&1&&S(r,u[0])},d(u){u&&d(s)}}}function J(m){let s,t,l,e,r,u,o,n,k="Return to HFStudio",g,x;return{c(){s=_("div"),t=_("p"),l=C(m[0]),e=P(),r=_("p"),u=C(m[1]),o=P(),n=_("button"),n.textContent=k,this.h()},l(c){s=p(c,"DIV",{class:!0});var a=b(s);t=p(a,"P",{class:!0});var i=b(t);l=I(i,m[0]),i.forEach(d),e=E(a),r=p(a,"P",{class:!0});var v=b(r);u=I(v,m[1]),v.forEach(d),a.forEach(d),o=E(c),n=p(c,"BUTTON",{class:!0,"data-svelte-h":!0}),H(n)!=="svelte-lo2i5l"&&(n.textContent=k),this.h()},h(){f(t,"class","font-medium"),f(r,"class","text-sm mt-1"),f(s,"class","text-red-600 mb-4"),f(n,"class","px-4 py-2 bg-gradient-to-r from-amber-400 to-orange-500 text-white rounded-lg hover:from-amber-500 hover:to-orange-600 transition-colors")},m(c,a){y(c,s,a),h(s,t),h(t,l),h(s,e),h(s,r),h(r,u),y(c,o,a),y(c,n,a),g||(x=R(n,"click",m[2]),g=!0)},p(c,a){a&1&&S(l,c[0]),a&2&&S(u,c[1])},d(c){c&&(d(s),d(o),d(n)),g=!1,x()}}}function L(m){let s,t,l,e,r,u,o,n,k="HFStudio Authentication",g;function x(i,v){return i[1]?J:G}let c=x(m),a=c(m);return{c(){s=P(),t=_("div"),l=_("div"),e=_("div"),r=_("img"),o=P(),n=_("h1"),n.textContent=k,g=P(),a.c(),this.h()},l(i){O("svelte-17lku3q",document.head).forEach(d),s=E(i),t=p(i,"DIV",{class:!0});var D=b(t);l=p(D,"DIV",{class:!0});var T=b(l);e=p(T,"DIV",{class:!0});var w=b(e);r=p(w,"IMG",{src:!0,alt:!0,class:!0}),o=E(w),n=p(w,"H1",{class:!0,"data-svelte-h":!0}),H(n)!=="svelte-l7zisw"&&(n.textContent=k),g=E(w),a.l(w),w.forEach(d),T.forEach(d),D.forEach(d),this.h()},h(){document.title="Authenticating with Hugging Face - HFStudio",N(r.src,u="/assets/hf-logo.png")||f(r,"src",u),f(r,"alt","HF Logo"),f(r,"class","w-12 h-12 mx-auto mb-4"),f(n,"class","text-xl font-semibold mb-2"),f(e,"class","text-center"),f(l,"class","max-w-md w-full bg-white rounded-lg shadow-md p-6"),f(t,"class","min-h-screen flex items-center justify-center bg-gray-50")},m(i,v){y(i,s,v),y(i,t,v),h(t,l),h(l,e),h(e,r),h(e,o),h(e,n),h(e,g),a.m(e,null)},p(i,[v]){c===(c=x(i))&&a?a.p(i,v):(a.d(1),a=c(i),a&&(a.c(),a.m(e,null)))},i:A,o:A,d(i){i&&(d(s),d(t)),a.d()}}}function U(m,s,t){let l;z(m,B,o=>t(3,l=o));let e="Processing...",r=null;return M(async()=>{try{const o=l.url.searchParams.get("code"),n=l.url.searchParams.get("state"),k=l.url.searchParams.get("error"),g=l.url.searchParams.get("error_description");if(k){t(1,r=g||k),t(0,e="Authentication failed");return}if(!o){t(1,r="No authorization code received"),t(0,e="Authentication failed");return}const x=sessionStorage.getItem("oauth_state");if(x&&n!==x){t(1,r="Invalid state parameter"),t(0,e="Authentication failed");return}const c=await fetch("/api/auth/token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:o})});if(!c.ok){const i=await c.text();throw console.error("Token exchange failed:",i),new Error(`Failed to exchange code for token: ${i}`)}const a=await c.json();localStorage.setItem("hf_access_token",a.access_token),t(0,e="Successfully authenticated!"),setTimeout(()=>{F("/")},2e3)}catch(o){t(1,r=o.message),t(0,e="Authentication failed")}}),[e,r,()=>F("/")]}class Y extends V{constructor(s){super(),j(this,s,U,L,q,{})}}export{Y as component};
|
hfstudio/static/_app/version.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"version":"
|
|
|
|
| 1 |
+
{"version":"1760686118005"}
|
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.
|
| 10 |
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
| 11 |
<link rel="modulepreload" href="/_app/immutable/chunks/BI_gvUUO.js">
|
| 12 |
-
<link rel="modulepreload" href="/_app/immutable/entry/app.
|
| 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 |
-
|
| 20 |
base: ""
|
| 21 |
};
|
| 22 |
|
| 23 |
const element = document.currentScript.parentElement;
|
| 24 |
|
| 25 |
Promise.all([
|
| 26 |
-
import("/_app/immutable/entry/start.
|
| 27 |
-
import("/_app/immutable/entry/app.
|
| 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.BPSNNA26.js">
|
| 10 |
+
<link rel="modulepreload" href="/_app/immutable/chunks/CThD--Q6.js">
|
| 11 |
<link rel="modulepreload" href="/_app/immutable/chunks/BI_gvUUO.js">
|
| 12 |
+
<link rel="modulepreload" href="/_app/immutable/entry/app.BdL7ph0c.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_1ef7hlc = {
|
| 20 |
base: ""
|
| 21 |
};
|
| 22 |
|
| 23 |
const element = document.currentScript.parentElement;
|
| 24 |
|
| 25 |
Promise.all([
|
| 26 |
+
import("/_app/immutable/entry/start.BPSNNA26.js"),
|
| 27 |
+
import("/_app/immutable/entry/app.BdL7ph0c.js")
|
| 28 |
]).then(([kit, app]) => {
|
| 29 |
kit.start(app, element);
|
| 30 |
});
|