GitHub Action commited on
Commit
4c355e8
·
1 Parent(s): 7db6302

Sync from GitHub: 40bcac1aeb658657c0b9f4250e875aad86a4e259

Browse files
.gitattributes CHANGED
@@ -7,3 +7,9 @@
7
  *.mp4 filter=lfs diff=lfs merge=lfs -text
8
  *.webm filter=lfs diff=lfs merge=lfs -text
9
  *.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
7
  *.mp4 filter=lfs diff=lfs merge=lfs -text
8
  *.webm filter=lfs diff=lfs merge=lfs -text
9
  *.pdf filter=lfs diff=lfs merge=lfs -text
10
+ hfstudio/static/assets/hf-logo.png filter=lfs diff=lfs merge=lfs -text
11
+ hfstudio/static/assets/hf-studio-logo.png filter=lfs diff=lfs merge=lfs -text
12
+ frontend/static/assets/hf-logo.png filter=lfs diff=lfs merge=lfs -text
13
+ frontend/static/assets/hf-studio-logo.png filter=lfs diff=lfs merge=lfs -text
14
+ hfstudio/static/samples/harvard.wav filter=lfs diff=lfs merge=lfs -text
15
+ frontend/static/samples/harvard.wav filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -7,14 +7,6 @@ sdk: gradio
7
  sdk_version: 5.49.1
8
  app_file: app.py
9
  pinned: false
10
- hf_oauth: true
11
- hf_oauth_expiration_minutes: 480
12
- hf_oauth_scopes:
13
- - read-repos
14
- - write-repos
15
- - manage-repos
16
- - inference-api
17
-
18
  ---
19
 
20
  # HFStudio 🎙️
 
7
  sdk_version: 5.49.1
8
  app_file: app.py
9
  pinned: false
 
 
 
 
 
 
 
 
10
  ---
11
 
12
  # HFStudio 🎙️
frontend/src/routes/+layout.svelte CHANGED
@@ -7,6 +7,9 @@
7
  let sidebarOpen = true;
8
  let isLoggedIn = false;
9
  let username = '';
 
 
 
10
 
11
  onMount(() => {
12
  // Check if user is logged in
@@ -44,13 +47,8 @@
44
 
45
  async function fetchUserInfo(token) {
46
  try {
47
- // For OAuth tokens, we need to use the OAuth API endpoint
48
- const isOAuthToken = token.startsWith('hf_oauth_');
49
- const apiUrl = isOAuthToken
50
- ? 'https://huggingface.co/oauth/userinfo'
51
- : 'https://huggingface.co/api/whoami';
52
-
53
- const response = await fetch(apiUrl, {
54
  headers: {
55
  'Authorization': `Bearer ${token}`
56
  }
@@ -59,8 +57,8 @@
59
  if (response.ok) {
60
  const userData = await response.json();
61
  isLoggedIn = true;
62
- const fullName = userData.name || userData.login || 'User';
63
- username = fullName.split(' ')[0]; // Extract first name only
64
  } else {
65
  // Token might be invalid, remove it
66
  localStorage.removeItem('hf_access_token');
@@ -83,15 +81,53 @@
83
  isLoggedIn = false;
84
  username = '';
85
  } else {
86
- // Login
87
- const clientId = 'cdf32a17-e40f-4a84-b683-f66aa1105793';
88
- const redirectUri = 'http://localhost:11111/auth/callback';
89
- const scope = 'read-repos';
90
- const state = Math.random().toString(36).substring(2, 15);
91
- const authUrl = `https://huggingface.co/oauth/authorize?client_id=${clientId}&redirect_uri=${encodeURIComponent(redirectUri)}&scope=${scope}&response_type=code&state=${state}`;
92
-
93
- sessionStorage.setItem('oauth_state', state);
94
- window.location.href = authUrl;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  }
96
  }
97
  </script>
@@ -182,4 +218,56 @@
182
  <main class="flex-1 overflow-auto">
183
  <slot />
184
  </main>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  </div>
 
7
  let sidebarOpen = true;
8
  let isLoggedIn = false;
9
  let username = '';
10
+ let showTokenInput = false;
11
+ let tokenInput = '';
12
+ let tokenError = '';
13
 
14
  onMount(() => {
15
  // Check if user is logged in
 
47
 
48
  async function fetchUserInfo(token) {
49
  try {
50
+ // Validate token using the correct whoami-v2 endpoint
51
+ const response = await fetch('https://huggingface.co/api/whoami-v2', {
 
 
 
 
 
52
  headers: {
53
  'Authorization': `Bearer ${token}`
54
  }
 
57
  if (response.ok) {
58
  const userData = await response.json();
59
  isLoggedIn = true;
60
+ const fullName = userData.name || userData.fullname || userData.login || userData.username || 'User';
61
+ username = fullName.split(' ')[0];
62
  } else {
63
  // Token might be invalid, remove it
64
  localStorage.removeItem('hf_access_token');
 
81
  isLoggedIn = false;
82
  username = '';
83
  } else {
84
+ // Show token input instead of OAuth
85
+ showTokenInput = true;
86
+ tokenInput = '';
87
+ tokenError = '';
88
+ }
89
+ }
90
+
91
+ function closeTokenInput() {
92
+ showTokenInput = false;
93
+ tokenInput = '';
94
+ tokenError = '';
95
+ }
96
+
97
+ async function submitToken() {
98
+ if (!tokenInput.trim()) {
99
+ tokenError = 'Please enter a token';
100
+ return;
101
+ }
102
+
103
+ if (!tokenInput.startsWith('hf_')) {
104
+ tokenError = 'Token should start with "hf_"';
105
+ return;
106
+ }
107
+
108
+ try {
109
+ // Validate token using the correct whoami-v2 endpoint
110
+ const response = await fetch('https://huggingface.co/api/whoami-v2', {
111
+ headers: {
112
+ 'Authorization': `Bearer ${tokenInput.trim()}`
113
+ }
114
+ });
115
+
116
+ if (response.ok) {
117
+ const userData = await response.json();
118
+ localStorage.setItem('hf_access_token', tokenInput.trim());
119
+ isLoggedIn = true;
120
+ const fullName = userData.name || userData.fullname || userData.login || userData.username || 'User';
121
+ username = fullName.split(' ')[0];
122
+ closeTokenInput();
123
+ } else {
124
+ const errorText = await response.text();
125
+ console.log('Token validation error:', response.status, errorText);
126
+ tokenError = `Invalid token (${response.status}). Please check your token and try again.`;
127
+ }
128
+ } catch (error) {
129
+ console.error('Token validation error:', error);
130
+ tokenError = 'Error validating token. Please try again.';
131
  }
132
  }
133
  </script>
 
218
  <main class="flex-1 overflow-auto">
219
  <slot />
220
  </main>
221
+
222
+ <!-- Token Input Modal -->
223
+ {#if showTokenInput}
224
+ <div class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
225
+ <div class="bg-white rounded-lg p-6 max-w-md w-full mx-4 shadow-xl">
226
+ <h2 class="text-xl font-semibold mb-4">Sign In with HuggingFace Token</h2>
227
+
228
+ <div class="mb-4 p-3 bg-blue-50 rounded-md text-sm">
229
+ <p class="text-blue-800 mb-2">
230
+ <strong>Temporary:</strong> OAuth is being fixed. For now, please use a HuggingFace token.
231
+ </p>
232
+ <p class="text-blue-700">
233
+ 1. Go to <a href="https://huggingface.co/settings/tokens" target="_blank" class="underline text-blue-600">HuggingFace Settings</a><br>
234
+ 2. Create a new token with "Inference API" permissions<br>
235
+ 3. Copy and paste it below
236
+ </p>
237
+ </div>
238
+
239
+ <div class="mb-4">
240
+ <label for="token" class="block text-sm font-medium text-gray-700 mb-2">
241
+ HuggingFace Token
242
+ </label>
243
+ <input
244
+ id="token"
245
+ type="password"
246
+ bind:value={tokenInput}
247
+ placeholder="hf_..."
248
+ 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"
249
+ on:keydown={(e) => e.key === 'Enter' && submitToken()}
250
+ />
251
+ {#if tokenError}
252
+ <p class="text-red-600 text-sm mt-1">{tokenError}</p>
253
+ {/if}
254
+ </div>
255
+
256
+ <div class="flex justify-end gap-3">
257
+ <button
258
+ on:click={closeTokenInput}
259
+ class="px-4 py-2 text-gray-600 hover:text-gray-800 transition-colors"
260
+ >
261
+ Cancel
262
+ </button>
263
+ <button
264
+ on:click={submitToken}
265
+ class="px-4 py-2 bg-orange-500 text-white rounded-md hover:bg-orange-600 transition-colors"
266
+ >
267
+ Sign In
268
+ </button>
269
+ </div>
270
+ </div>
271
+ </div>
272
+ {/if}
273
  </div>
frontend/src/routes/+page.svelte CHANGED
@@ -1,11 +1,7 @@
1
  <script>
2
  import { Play, Download, Loader2, AlertCircle, ChevronDown, Copy, RefreshCw, Share, MoreHorizontal, Settings, Sliders, Pause, SkipBack, SkipForward } from 'lucide-svelte';
3
 
4
- let text = `Adam was playing outside when he heard a tiny meow! He looked around. Meow! There it was again! He tiptoed toward the bushes. Pushing the leaves aside, he gasped. A fluffy, orange kitten with big, curious eyes stared up at him. "Oh no! Where is your home?" Adam asked. The kitten just blinked and let out a tiny mew!
5
-
6
- "Mama! I found a lost kitten!" Adam called as he carried the little furball inside. The kitten sniffed around, then jumped up—boing!—right onto the couch. "Oh!" Mama laughed. "Let's give it some milk while we find its owner." The kitten licked the milk happily and purred, prrrr! Adam giggled. "I think he likes it here!"
7
-
8
- That evening, there was a knock at the door. A little girl stood there, eyes wide. "Have you seen my kitten, Biscuit?" she asked. Adam smiled and pointed. The kitten ran to her, mew mew mew! The girl hugged Biscuit tightly. "Thank you!" she said. As she left, Adam waved. "Goodbye, Biscuit!" he whispered. And in the quiet, he could still hear a happy prrrr!`;
9
  let selectedVoice = 'Novia';
10
  let selectedModel = 'Chatterbox';
11
  let mode = 'api'; // 'api' or 'local'
@@ -318,7 +314,7 @@ That evening, there was a knock at the door. A little girl stood there, eyes wid
318
  <textarea
319
  bind:value={text}
320
  class="w-full h-full p-6 bg-white resize-none border-0 focus:outline-none text-gray-900 text-base leading-relaxed"
321
- placeholder="Enter text to convert to speech..."
322
  />
323
 
324
  {#if text}
 
1
  <script>
2
  import { Play, Download, Loader2, AlertCircle, ChevronDown, Copy, RefreshCw, Share, MoreHorizontal, Settings, Sliders, Pause, SkipBack, SkipForward } from 'lucide-svelte';
3
 
4
+ let text = `In a world where knowledge flowed freely like rivers connecting distant lands, a community of passionate researchers and developers worked together to build something extraordinary. They believed that artificial intelligence should belong to everyone, not locked away in corporate towers. Day by day, they shared their discoveries, their code, and their dreams with people across the globe. Their open source models could understand language, generate images, and even speak with human-like voices. This collaborative spirit sparked innovation in ways that no single company could achieve alone, proving that when brilliant minds unite around a common cause, they can democratize the future of technology.`;
 
 
 
 
5
  let selectedVoice = 'Novia';
6
  let selectedModel = 'Chatterbox';
7
  let mode = 'api'; // 'api' or 'local'
 
314
  <textarea
315
  bind:value={text}
316
  class="w-full h-full p-6 bg-white resize-none border-0 focus:outline-none text-gray-900 text-base leading-relaxed"
317
+ placeholder="Welcome to our text to speech demo. This technology can transform any written content into natural sounding audio."
318
  />
319
 
320
  {#if text}
hfstudio/server.py CHANGED
@@ -131,6 +131,30 @@ async def generate_tts(request: TTSRequest):
131
  )
132
 
133
  print(f"Calling text_to_speech with text: '{request.text[:50]}...'")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
 
135
  # Generate audio using Chatterbox
136
  audio_bytes = client.text_to_speech(
@@ -189,7 +213,7 @@ async def generate_tts(request: TTSRequest):
189
  raise HTTPException(status_code=500, detail=str(e))
190
 
191
  @app.post("/api/auth/token")
192
- async def exchange_oauth_token(request: OAuthTokenRequest):
193
  """Exchange OAuth authorization code for access token"""
194
  try:
195
  # HuggingFace OAuth token endpoint
@@ -198,7 +222,19 @@ async def exchange_oauth_token(request: OAuthTokenRequest):
198
  # OAuth app credentials
199
  client_id = "cdf32a17-e40f-4a84-b683-f66aa1105793"
200
  client_secret = "f590cb2d-6eac-4cef-a0cb-d0116825295c"
201
- redirect_uri = "http://localhost:11111/auth/callback"
 
 
 
 
 
 
 
 
 
 
 
 
202
 
203
  # Prepare token exchange request
204
  token_data = {
@@ -236,6 +272,86 @@ async def exchange_oauth_token(request: OAuthTokenRequest):
236
  except Exception as e:
237
  raise HTTPException(status_code=500, detail=str(e))
238
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  # Catch-all route to serve the SvelteKit app (excluding API routes)
240
  @app.get("/{path:path}")
241
  async def serve_spa(path: str):
 
131
  )
132
 
133
  print(f"Calling text_to_speech with text: '{request.text[:50]}...'")
134
+ print(f"Using token: {request.access_token}")
135
+ print(f"Model: ResembleAI/chatterbox")
136
+ print(f"Provider: fal-ai")
137
+
138
+ # Print the equivalent Python command for testing
139
+ print("=" * 80)
140
+ print("EQUIVALENT PYTHON CODE:")
141
+ print("You can test this locally with:")
142
+ print(f"""
143
+ from huggingface_hub import InferenceClient
144
+
145
+ client = InferenceClient(
146
+ provider="fal-ai",
147
+ api_key="{request.access_token}",
148
+ )
149
+
150
+ audio_bytes = client.text_to_speech(
151
+ "{request.text}",
152
+ model="ResembleAI/chatterbox",
153
+ )
154
+
155
+ print(f"Success! Generated {{len(audio_bytes)}} bytes of audio")
156
+ """.strip())
157
+ print("=" * 80)
158
 
159
  # Generate audio using Chatterbox
160
  audio_bytes = client.text_to_speech(
 
213
  raise HTTPException(status_code=500, detail=str(e))
214
 
215
  @app.post("/api/auth/token")
216
+ async def exchange_oauth_token(request: OAuthTokenRequest, http_request: Request):
217
  """Exchange OAuth authorization code for access token"""
218
  try:
219
  # HuggingFace OAuth token endpoint
 
222
  # OAuth app credentials
223
  client_id = "cdf32a17-e40f-4a84-b683-f66aa1105793"
224
  client_secret = "f590cb2d-6eac-4cef-a0cb-d0116825295c"
225
+
226
+ # Get the redirect URI from environment variable or use referer header
227
+ redirect_uri = os.getenv("FRONTEND_URL", "").rstrip('/') + "/auth/callback"
228
+ if not os.getenv("FRONTEND_URL"):
229
+ # Fallback: try to determine from referer header
230
+ referer = http_request.headers.get("referer", "")
231
+ if referer:
232
+ from urllib.parse import urlparse
233
+ parsed = urlparse(referer)
234
+ redirect_uri = f"{parsed.scheme}://{parsed.netloc}/auth/callback"
235
+ else:
236
+ # Final fallback for development
237
+ redirect_uri = "http://localhost:7860/auth/callback"
238
 
239
  # Prepare token exchange request
240
  token_data = {
 
272
  except Exception as e:
273
  raise HTTPException(status_code=500, detail=str(e))
274
 
275
+ @app.get("/auth/callback")
276
+ async def oauth_callback(code: str = None, state: str = None):
277
+ """Handle OAuth callback and redirect to frontend with token"""
278
+ if not code:
279
+ return HTMLResponse("""
280
+ <html>
281
+ <head><title>OAuth Error</title></head>
282
+ <body>
283
+ <h1>OAuth Error</h1>
284
+ <p>No authorization code received.</p>
285
+ <script>window.close();</script>
286
+ </body>
287
+ </html>
288
+ """, status_code=400)
289
+
290
+ try:
291
+ # Exchange code for token using the same logic as the API endpoint
292
+ token_url = "https://huggingface.co/oauth/token"
293
+
294
+ client_id = "cdf32a17-e40f-4a84-b683-f66aa1105793"
295
+ client_secret = "f590cb2d-6eac-4cef-a0cb-d0116825295c"
296
+ redirect_uri = "http://localhost:7860/auth/callback"
297
+
298
+ token_data = {
299
+ "client_id": client_id,
300
+ "client_secret": client_secret,
301
+ "code": code,
302
+ "grant_type": "authorization_code",
303
+ "redirect_uri": redirect_uri,
304
+ }
305
+
306
+ async with httpx.AsyncClient() as client:
307
+ response = await client.post(
308
+ token_url,
309
+ data=token_data,
310
+ headers={"Accept": "application/json"}
311
+ )
312
+
313
+ if response.status_code == 200:
314
+ token_response = response.json()
315
+ access_token = token_response["access_token"]
316
+
317
+ # Return HTML page that stores token and closes popup/redirects
318
+ return HTMLResponse(f"""
319
+ <html>
320
+ <head><title>OAuth Success</title></head>
321
+ <body>
322
+ <h1>Sign in successful!</h1>
323
+ <p>Redirecting...</p>
324
+ <script>
325
+ localStorage.setItem('hf_access_token', '{access_token}');
326
+ window.location.href = '/';
327
+ </script>
328
+ </body>
329
+ </html>
330
+ """)
331
+ else:
332
+ return HTMLResponse(f"""
333
+ <html>
334
+ <head><title>OAuth Error</title></head>
335
+ <body>
336
+ <h1>OAuth Error</h1>
337
+ <p>Token exchange failed: {response.text}</p>
338
+ <a href="/">Return to app</a>
339
+ </body>
340
+ </html>
341
+ """, status_code=400)
342
+
343
+ except Exception as e:
344
+ return HTMLResponse(f"""
345
+ <html>
346
+ <head><title>OAuth Error</title></head>
347
+ <body>
348
+ <h1>OAuth Error</h1>
349
+ <p>Error: {str(e)}</p>
350
+ <a href="/">Return to app</a>
351
+ </body>
352
+ </html>
353
+ """, status_code=500)
354
+
355
  # Catch-all route to serve the SvelteKit app (excluding API routes)
356
  @app.get("/{path:path}")
357
  async def serve_spa(path: str):
hfstudio/static/_app/immutable/assets/0._BHW5xHR.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}.left-0{left:0}.left-2{left:.5rem}.left-56{left:14rem}.right-0{right:0}.right-2{right:.5rem}.right-6{right:1.5rem}.right-80{right:20rem}.top-4{top:1rem}.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-1{height:.25rem}.h-1\.5{height:.375rem}.h-12{height:3rem}.h-2{height:.5rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.w-12{width:3rem}.w-2{width:.5rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-56{width:14rem}.w-8{width:2rem}.w-80{width:20rem}.w-full{width:100%}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.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-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-r{border-right-width:1px}.border-t{border-top-width:1px}.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-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-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-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-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.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-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}.leading-relaxed{line-height:1.625}.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-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-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-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.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/BI_gvUUO.js ADDED
@@ -0,0 +1 @@
 
 
1
+ var I=Object.defineProperty;var R=(t,n,e)=>n in t?I(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var N=(t,n,e)=>R(t,typeof n!="symbol"?n+"":n,e);function w(){}function W(t,n){for(const e in n)t[e]=n[e];return t}function O(t){return t()}function T(){return Object.create(null)}function $(t){t.forEach(O)}function P(t){return typeof t=="function"}function ht(t,n){return t!=t?n==n:t!==n||t&&typeof t=="object"||typeof t=="function"}let b;function mt(t,n){return t===n?!0:(b||(b=document.createElement("a")),b.href=n,t===b.href)}function G(t){return Object.keys(t).length===0}function J(t,...n){if(t==null){for(const r of n)r(void 0);return w}const e=t.subscribe(...n);return e.unsubscribe?()=>e.unsubscribe():e}function pt(t,n,e){t.$$.on_destroy.push(J(n,e))}function yt(t,n,e,r){if(t){const i=q(t,n,e,r);return t[0](i)}}function q(t,n,e,r){return t[1]&&r?W(e.ctx.slice(),t[1](r(n))):e.ctx}function gt(t,n,e,r){if(t[2]&&r){const i=t[2](r(e));if(n.dirty===void 0)return i;if(typeof i=="object"){const o=[],c=Math.max(n.dirty.length,i.length);for(let l=0;l<c;l+=1)o[l]=n.dirty[l]|i[l];return o}return n.dirty|i}return n.dirty}function $t(t,n,e,r,i,o){if(i){const c=q(n,e,r,o);t.p(c,i)}}function xt(t){if(t.ctx.length>32){const n=[],e=t.ctx.length/32;for(let r=0;r<e;r++)n[r]=-1;return n}return-1}function bt(t){const n={};for(const e in t)e[0]!=="$"&&(n[e]=t[e]);return n}function vt(t,n){const e={};n=new Set(n);for(const r in t)!n.has(r)&&r[0]!=="$"&&(e[r]=t[r]);return e}let E=!1;function K(){E=!0}function Q(){E=!1}function V(t,n,e,r){for(;t<n;){const i=t+(n-t>>1);e(i)<=r?t=i+1:n=i}return t}function X(t){if(t.hydrate_init)return;t.hydrate_init=!0;let n=t.childNodes;if(t.nodeName==="HEAD"){const u=[];for(let s=0;s<n.length;s++){const f=n[s];f.claim_order!==void 0&&u.push(f)}n=u}const e=new Int32Array(n.length+1),r=new Int32Array(n.length);e[0]=-1;let i=0;for(let u=0;u<n.length;u++){const s=n[u].claim_order,f=(i>0&&n[e[i]].claim_order<=s?i+1:V(1,i,x=>n[e[x]].claim_order,s))-1;r[u]=e[f]+1;const a=f+1;e[a]=u,i=Math.max(a,i)}const o=[],c=[];let l=n.length-1;for(let u=e[i]+1;u!=0;u=r[u-1]){for(o.push(n[u-1]);l>=u;l--)c.push(n[l]);l--}for(;l>=0;l--)c.push(n[l]);o.reverse(),c.sort((u,s)=>u.claim_order-s.claim_order);for(let u=0,s=0;u<c.length;u++){for(;s<o.length&&c[u].claim_order>=o[s].claim_order;)s++;const f=s<o.length?o[s]:null;t.insertBefore(c[u],f)}}function Y(t,n){if(E){for(X(t),(t.actual_end_child===void 0||t.actual_end_child!==null&&t.actual_end_child.parentNode!==t)&&(t.actual_end_child=t.firstChild);t.actual_end_child!==null&&t.actual_end_child.claim_order===void 0;)t.actual_end_child=t.actual_end_child.nextSibling;n!==t.actual_end_child?(n.claim_order!==void 0||n.parentNode!==t)&&t.insertBefore(n,t.actual_end_child):t.actual_end_child=n.nextSibling}else(n.parentNode!==t||n.nextSibling!==null)&&t.appendChild(n)}function wt(t,n,e){E&&!e?Y(t,n):(n.parentNode!==t||n.nextSibling!=e)&&t.insertBefore(n,e||null)}function Z(t){t.parentNode&&t.parentNode.removeChild(t)}function Et(t,n){for(let e=0;e<t.length;e+=1)t[e]&&t[e].d(n)}function tt(t){return document.createElement(t)}function nt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function j(t){return document.createTextNode(t)}function Nt(){return j(" ")}function At(){return j("")}function Ct(t,n,e,r){return t.addEventListener(n,e,r),()=>t.removeEventListener(n,e,r)}function et(t,n,e){e==null?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function St(t,n){for(const e in n)et(t,e,n[e])}function jt(t){return t.dataset.svelteH}function kt(t){return t===""?null:+t}function rt(t){return Array.from(t.childNodes)}function it(t){t.claim_info===void 0&&(t.claim_info={last_index:0,total_claimed:0})}function B(t,n,e,r,i=!1){it(t);const o=(()=>{for(let c=t.claim_info.last_index;c<t.length;c++){const l=t[c];if(n(l)){const u=e(l);return u===void 0?t.splice(c,1):t[c]=u,i||(t.claim_info.last_index=c),l}}for(let c=t.claim_info.last_index-1;c>=0;c--){const l=t[c];if(n(l)){const u=e(l);return u===void 0?t.splice(c,1):t[c]=u,i?u===void 0&&t.claim_info.last_index--:t.claim_info.last_index=c,l}}return r()})();return o.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,o}function L(t,n,e,r){return B(t,i=>i.nodeName===n,i=>{const o=[];for(let c=0;c<i.attributes.length;c++){const l=i.attributes[c];e[l.name]||o.push(l.name)}o.forEach(c=>i.removeAttribute(c))},()=>r(n))}function Dt(t,n,e){return L(t,n,e,tt)}function Tt(t,n,e){return L(t,n,e,nt)}function ct(t,n){return B(t,e=>e.nodeType===3,e=>{const r=""+n;if(e.data.startsWith(r)){if(e.data.length!==r.length)return e.splitText(r.length)}else e.data=r},()=>j(n),!0)}function Ht(t){return ct(t," ")}function Mt(t,n){n=""+n,t.data!==n&&(t.data=n)}function Ot(t,n){t.value=n??""}function Pt(t,n,e,r){e==null?t.style.removeProperty(n):t.style.setProperty(n,e,"")}function ut(t,n,{bubbles:e=!1,cancelable:r=!1}={}){return new CustomEvent(t,{detail:n,bubbles:e,cancelable:r})}function qt(t,n){const e=[];let r=0;for(const i of n.childNodes)if(i.nodeType===8){const o=i.textContent.trim();o===`HEAD_${t}_END`?(r-=1,e.push(i)):o===`HEAD_${t}_START`&&(r+=1,e.push(i))}else r>0&&e.push(i);return e}function Bt(t,n){return new t(n)}let g;function y(t){g=t}function _(){if(!g)throw new Error("Function called outside component initialization");return g}function Lt(t){_().$$.before_update.push(t)}function Ut(t){_().$$.on_mount.push(t)}function zt(t){_().$$.after_update.push(t)}function Ft(t){_().$$.on_destroy.push(t)}function It(){const t=_();return(n,e,{cancelable:r=!1}={})=>{const i=t.$$.callbacks[n];if(i){const o=ut(n,e,{cancelable:r});return i.slice().forEach(c=>{c.call(t,o)}),!o.defaultPrevented}return!0}}function Rt(t,n){return _().$$.context.set(t,n),n}function Wt(t){return _().$$.context.get(t)}function Gt(){return _().$$.context}function Jt(t){return _().$$.context.has(t)}const m=[],H=[];let p=[];const M=[],U=Promise.resolve();let C=!1;function z(){C||(C=!0,U.then(F))}function Kt(){return z(),U}function S(t){p.push(t)}const A=new Set;let h=0;function F(){if(h!==0)return;const t=g;do{try{for(;h<m.length;){const n=m[h];h++,y(n),st(n.$$)}}catch(n){throw m.length=0,h=0,n}for(y(null),m.length=0,h=0;H.length;)H.pop()();for(let n=0;n<p.length;n+=1){const e=p[n];A.has(e)||(A.add(e),e())}p.length=0}while(m.length);for(;M.length;)M.pop()();C=!1,A.clear(),y(t)}function st(t){if(t.fragment!==null){t.update(),$(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(S)}}function ot(t){const n=[],e=[];p.forEach(r=>t.indexOf(r)===-1?n.push(r):e.push(r)),e.forEach(r=>r()),p=n}const v=new Set;let d;function Qt(){d={r:0,c:[],p:d}}function Vt(){d.r||$(d.c),d=d.p}function lt(t,n){t&&t.i&&(v.delete(t),t.i(n))}function Xt(t,n,e,r){if(t&&t.o){if(v.has(t))return;v.add(t),d.c.push(()=>{v.delete(t),r&&(e&&t.d(1),r())}),t.o(n)}else r&&r()}function Yt(t){t&&t.c()}function Zt(t,n){t&&t.l(n)}function at(t,n,e){const{fragment:r,after_update:i}=t.$$;r&&r.m(n,e),S(()=>{const o=t.$$.on_mount.map(O).filter(P);t.$$.on_destroy?t.$$.on_destroy.push(...o):$(o),t.$$.on_mount=[]}),i.forEach(S)}function ft(t,n){const e=t.$$;e.fragment!==null&&(ot(e.after_update),$(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function _t(t,n){t.$$.dirty[0]===-1&&(m.push(t),z(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function tn(t,n,e,r,i,o,c=null,l=[-1]){const u=g;y(t);const s=t.$$={fragment:null,ctx:[],props:o,update:w,not_equal:i,bound:T(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:T(),dirty:l,skip_bound:!1,root:n.target||u.$$.root};c&&c(s.root);let f=!1;if(s.ctx=e?e(t,n.props||{},(a,x,...k)=>{const D=k.length?k[0]:x;return s.ctx&&i(s.ctx[a],s.ctx[a]=D)&&(!s.skip_bound&&s.bound[a]&&s.bound[a](D),f&&_t(t,a)),x}):[],s.update(),f=!0,$(s.before_update),s.fragment=r?r(s.ctx):!1,n.target){if(n.hydrate){K();const a=rt(n.target);s.fragment&&s.fragment.l(a),a.forEach(Z)}else s.fragment&&s.fragment.c();n.intro&&lt(t.$$.fragment),at(t,n.target,n.anchor),Q(),F()}y(u)}class nn{constructor(){N(this,"$$");N(this,"$$set")}$destroy(){ft(this,1),this.$destroy=w}$on(n,e){if(!P(e))return w;const r=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return r.push(e),()=>{const i=r.indexOf(e);i!==-1&&r.splice(i,1)}}$set(n){this.$$set&&!G(n)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}}export{Wt as $,xt as A,gt as B,Ot as C,Qt as D,Vt as E,At as F,zt as G,Kt as H,Bt as I,ft as J,Yt as K,at as L,Zt as M,Pt as N,H as O,W as P,Et as Q,St as R,nn as S,Tt as T,nt as U,vt as V,bt as W,kt as X,Lt as Y,It as Z,Gt as _,Mt as a,Jt as a0,Ft as a1,Rt as a2,wt as b,Y as c,Z as d,Dt as e,rt as f,ct as g,Ht as h,tn as i,tt as j,Nt as k,pt as l,mt as m,w as n,et as o,qt as p,jt as q,Ut as r,ht as s,j as t,Ct as u,yt as v,$ as w,Xt as x,lt as y,$t as z};
hfstudio/static/_app/immutable/chunks/DC4WdVUD.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{s as e}from"./y8VvPua7.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
hfstudio/static/_app/immutable/chunks/y8VvPua7.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ var St=Object.defineProperty;var Et=(e,t,n)=>t in e?St(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_nwpvkk)==null?void 0:Xe.base)??"";var Ze;const Qt=((Ze=globalThis.__sveltekit_nwpvkk)==null?void 0:Ze.assets)??$??"",en="1760663843683",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 ke(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||fe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(r==null?void 0:r.origin)===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",kn=".html__data.json";function Sn(e){return e.endsWith(".html")?e.replace(/\.html$/,kn):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,Se,ne,x,Ee,S;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_nwpvkk)!=null&&s.data&&globalThis.__sveltekit_nwpvkk.data,document.URL!==location.href&&(location.href=location.href),S=e,await((o=(i=e.hooks).init)==null?void 0:o.call(i)),xe=Zt(e),x=document.documentElement,Ee=t,Se=e.nodes[0],ne=e.nodes[1],Se(),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(S.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 S.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)},S.hash),async fetch(u,g){u instanceof Request&&(g={body:u.method==="GET"||u.method==="HEAD"?void 0:await u.blob(),cache:u.cache,credentials:u.credentials,headers:[...u.headers].length>0?u==null?void 0:u.headers:void 0,integrity:u.integrity,keepalive:u.keepalive,method:u.method,mode:u.mode,redirect:u.redirect,referrer:u.referrer,referrerPolicy:u.referrerPolicy,signal:u.signal,...g});const{resolved:_,promise: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],k=!!(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 k&&(p=!0),k});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],k=g==null?void 0:g[m];if((!k||k.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,(k==null?void 0:k.type)==="error")throw k;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(k===void 0&&w[0]?{type:"skip"}:k??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),k;if(g!=null&&g.includes(m))v=m.status??v,k=m.error;else if(m instanceof ce)k=m.body;else{if(await C.updated.check())return await ct(),await q(n);k=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:k,route:a}):await yt(n,{id:a.id},k,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(S.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:Se,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 S.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);S.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,$,S.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(S.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice($.length))||"/"}function ie(e){return(S.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,$,S.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(k=>{H.delete(k)})};m.push(v),m.forEach(k=>{H.add(k)})}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(kt(t));if(E)scrollTo(E.x,E.y);else if(m){m.scrollIntoView();const{top:v,left:k}=m.getBoundingClientRect();E={x:pageXOffset+k,y:pageYOffset+v}}else scrollTo(0,0)}const w=document.activeElement!==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}=ke(l,$,S.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}=ke(o,$,S.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 S.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}=ke(r,$,S.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=ee(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[d,h]=(S.hash?a.hash.replace(/^#/,""):a.href).split("#"),y=d===me(location);if(s||c.reload&&(!y||!h)){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),S.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[F]:++A,[z]:L},"",location.href))});for(const n of document.querySelectorAll("link"))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:S.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=Sn(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,{...S.decoders,Promise:f=>new Promise((p,u)=>{o.set(f,{fulfil:p,reject:u})})})}let d="";for(;;){const{done:y,value:f}=await c.read();if(y&&!d)break;for(d+=!f&&d?`
2
+ `:Vt.decode(f,{stream:!0});;){const p=d.indexOf(`
3
+ `);if(p===-1)break;const u=JSON.parse(d.slice(0,p));if(d=d.slice(p+1),u.type==="redirect")return i(u);if(u.type==="data")(h=u.nodes)==null||h.forEach(g=>{(g==null?void 0:g.type)==="data"&&(g.uses=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=kt(e);if(r&&document.getElementById(r)){const{x:s,y:i}=t??le();setTimeout(()=>{const o=history.state;Ae=!0,location.replace(`#${r}`),S.hash&&location.replace(e.hash),history.replaceState(o,"",e.hash),scrollTo(s,i),Ae=!1})}else{const s=document.body,i=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),i!==null?s.setAttribute("tabindex",i):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let i=0;i<a.rangeCount;i+=1)s.push(a.getRangeAt(i));setTimeout(()=>{if(a.rangeCount===s.length){for(let i=0;i<a.rangeCount;i+=1){const o=s[i],c=a.getRangeAt(i);if(o.commonAncestorContainer!==c.commonAncestorContainer||o.startContainer!==c.startContainer||o.endContainer!==c.endContainer||o.startOffset!==c.startOffset||o.endOffset!==c.endOffset)return}a.removeAllRanges()}})}}}function 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 kt(e){let t;if(S.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Kn as a,zn as g,qn as l,C as s};
hfstudio/static/_app/immutable/entry/app.YV7NjOZx.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BkH7B4XA.js","../chunks/BI_gvUUO.js","../chunks/IHki7fMi.js","../assets/0._BHW5xHR.css","../nodes/1.6-QsMY98.js","../chunks/DC4WdVUD.js","../chunks/y8VvPua7.js","../nodes/2.H90UMdat.js","../nodes/3.RGK6VdE2.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.BkH7B4XA.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>O(()=>import("../nodes/1.6-QsMY98.js"),__vite__mapDeps([4,1,2,5,6]),import.meta.url),()=>O(()=>import("../nodes/2.H90UMdat.js"),__vite__mapDeps([7,1,2]),import.meta.url),()=>O(()=>import("../nodes/3.RGK6VdE2.js"),__vite__mapDeps([8,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.B8HZh-hp.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{l as o,a as r}from"../chunks/y8VvPua7.js";export{o as load_css,r as start};
hfstudio/static/_app/immutable/nodes/0.BkH7B4XA.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import{S as ye,i as we,s as Te,v as Ce,d as y,w as xe,x as Ie,y as Ee,o as a,z as Le,A as Se,B as He,b as $,c as s,u as Z,m as Me,e as o,f as U,q as L,h as x,j as r,k,r as Ne,C as _e,a as ke,g as ue,t as ce,n as Ae}from"../chunks/BI_gvUUO.js";import"../chunks/IHki7fMi.js";function Be(i){let t,e="Sign In";return{c(){t=r("span"),t.textContent=e},l(n){t=o(n,"SPAN",{"data-svelte-h":!0}),L(t)!=="svelte-6n3gky"&&(t.textContent=e)},m(n,f){$(n,t,f)},p:Ae,d(n){n&&y(t)}}}function Ue(i){let t,e,n;return{c(){t=r("span"),e=ce("Sign Out, "),n=ce(i[2])},l(f){t=o(f,"SPAN",{});var g=U(t);e=ue(g,"Sign Out, "),n=ue(g,i[2]),g.forEach(y)},m(f,g){$(f,t,g),s(t,e),s(t,n)},p(f,g){g&4&&ke(n,f[2])},d(f){f&&y(t)}}}function be(i){let t,e,n,f="Sign In with HuggingFace Token",g,l,_=`<p class="text-blue-800 mb-2"><strong>Temporary:</strong> OAuth is being fixed. For now, please use a HuggingFace token.</p> <p class="text-blue-700">1. Go to <a href="https://huggingface.co/settings/tokens" target="_blank" class="underline text-blue-600">HuggingFace Settings</a><br/>
2
+ 2. Create a new token with &quot;Inference API&quot; permissions<br/>
3
+ 3. Copy and paste it below</p>`,j,d,u,C="HuggingFace Token",q,b,N,V,I,S,A="Cancel",c,m,v="Sign In",z,Q,p=i[5]&&ve(i);return{c(){t=r("div"),e=r("div"),n=r("h2"),n.textContent=f,g=k(),l=r("div"),l.innerHTML=_,j=k(),d=r("div"),u=r("label"),u.textContent=C,q=k(),b=r("input"),N=k(),p&&p.c(),V=k(),I=r("div"),S=r("button"),S.textContent=A,c=k(),m=r("button"),m.textContent=v,this.h()},l(H){t=o(H,"DIV",{class:!0});var D=U(t);e=o(D,"DIV",{class:!0});var w=U(e);n=o(w,"H2",{class:!0,"data-svelte-h":!0}),L(n)!=="svelte-1t0ehet"&&(n.textContent=f),g=x(w),l=o(w,"DIV",{class:!0,"data-svelte-h":!0}),L(l)!=="svelte-1cborhl"&&(l.innerHTML=_),j=x(w),d=o(w,"DIV",{class:!0});var F=U(d);u=o(F,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),L(u)!=="svelte-vtbmxo"&&(u.textContent=C),q=x(F),b=o(F,"INPUT",{id:!0,type:!0,placeholder:!0,class:!0}),N=x(F),p&&p.l(F),F.forEach(y),V=x(w),I=o(w,"DIV",{class:!0});var G=U(I);S=o(G,"BUTTON",{class:!0,"data-svelte-h":!0}),L(S)!=="svelte-csk0rj"&&(S.textContent=A),c=x(G),m=o(G,"BUTTON",{class:!0,"data-svelte-h":!0}),L(m)!=="svelte-1nxas5u"&&(m.textContent=v),G.forEach(y),w.forEach(y),D.forEach(y),this.h()},h(){a(n,"class","text-xl font-semibold mb-4"),a(l,"class","mb-4 p-3 bg-blue-50 rounded-md text-sm"),a(u,"for","token"),a(u,"class","block text-sm font-medium text-gray-700 mb-2"),a(b,"id","token"),a(b,"type","password"),a(b,"placeholder","hf_..."),a(b,"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(d,"class","mb-4"),a(S,"class","px-4 py-2 text-gray-600 hover:text-gray-800 transition-colors"),a(m,"class","px-4 py-2 bg-orange-500 text-white rounded-md hover:bg-orange-600 transition-colors"),a(I,"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(H,D){$(H,t,D),s(t,e),s(e,n),s(e,g),s(e,l),s(e,j),s(e,d),s(d,u),s(d,q),s(d,b),_e(b,i[4]),s(d,N),p&&p.m(d,null),s(e,V),s(e,I),s(I,S),s(I,c),s(I,m),z||(Q=[Z(b,"input",i[12]),Z(b,"keydown",i[13]),Z(S,"click",i[7]),Z(m,"click",i[8])],z=!0)},p(H,D){D&16&&b.value!==H[4]&&_e(b,H[4]),H[5]?p?p.p(H,D):(p=ve(H),p.c(),p.m(d,null)):p&&(p.d(1),p=null)},d(H){H&&y(t),p&&p.d(),z=!1,xe(Q)}}}function ve(i){let t,e;return{c(){t=r("p"),e=ce(i[5]),this.h()},l(n){t=o(n,"P",{class:!0});var f=U(t);e=ue(f,i[5]),f.forEach(y),this.h()},h(){a(t,"class","text-red-600 text-sm mt-1")},m(n,f){$(n,t,f),s(t,e)},p(n,f){f&32&&ke(e,n[5])},d(n){n&&y(t)}}}function De(i){let t,e,n,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>',g,l,_,j="Tasks",d,u,C,q="🎙️",b,N,V="Text to Speech",I,S,A,c="<span>🎵</span> <span>Voice Cloning</span>",m,v,z="<span>🎧</span> <span>Speech to Text</span>",Q,p,H="<span>🎼</span> <span>Sound Effects</span>",D,w,F="<span>🎸</span> <span>Music Generation</span>",G,W,fe="<span>🔊</span> <span>Audio Enhancement</span>",ne,R,P,J,de,le,ae,X,oe,K,re,pe;function he(h,E){return h[1]?Ue:Be}let ee=he(i),O=ee(i);const ie=i[10].default,B=Ce(ie,i,i[9],null);let T=i[3]&&be(i);return{c(){t=r("div"),e=r("aside"),n=r("div"),n.innerHTML=f,g=k(),l=r("nav"),_=r("div"),_.textContent=j,d=k(),u=r("button"),C=r("span"),C.textContent=q,b=k(),N=r("span"),N.textContent=V,S=k(),A=r("button"),A.innerHTML=c,m=k(),v=r("button"),v.innerHTML=z,Q=k(),p=r("button"),p.innerHTML=H,D=k(),w=r("button"),w.innerHTML=F,G=k(),W=r("button"),W.innerHTML=fe,ne=k(),R=r("div"),P=r("button"),J=r("img"),le=k(),O.c(),ae=k(),X=r("main"),B&&B.c(),oe=k(),T&&T.c(),this.h()},l(h){t=o(h,"DIV",{class:!0});var E=U(t);e=o(E,"ASIDE",{class:!0});var Y=U(e);n=o(Y,"DIV",{class:!0,"data-svelte-h":!0}),L(n)!=="svelte-1vahj38"&&(n.innerHTML=f),g=x(Y),l=o(Y,"NAV",{class:!0});var M=U(l);_=o(M,"DIV",{class:!0,"data-svelte-h":!0}),L(_)!=="svelte-1x5465q"&&(_.textContent=j),d=x(M),u=o(M,"BUTTON",{class:!0});var te=U(u);C=o(te,"SPAN",{"data-svelte-h":!0}),L(C)!=="svelte-1yx42xi"&&(C.textContent=q),b=x(te),N=o(te,"SPAN",{"data-svelte-h":!0}),L(N)!=="svelte-2j89jk"&&(N.textContent=V),te.forEach(y),S=x(M),A=o(M,"BUTTON",{class:!0,"data-svelte-h":!0}),L(A)!=="svelte-10dl8nf"&&(A.innerHTML=c),m=x(M),v=o(M,"BUTTON",{class:!0,"data-svelte-h":!0}),L(v)!=="svelte-wf0x5d"&&(v.innerHTML=z),Q=x(M),p=o(M,"BUTTON",{class:!0,"data-svelte-h":!0}),L(p)!=="svelte-x7bha3"&&(p.innerHTML=H),D=x(M),w=o(M,"BUTTON",{class:!0,"data-svelte-h":!0}),L(w)!=="svelte-1tyblmt"&&(w.innerHTML=F),G=x(M),W=o(M,"BUTTON",{class:!0,"data-svelte-h":!0}),L(W)!=="svelte-1emrjb3"&&(W.innerHTML=fe),M.forEach(y),ne=x(Y),R=o(Y,"DIV",{class:!0});var me=U(R);P=o(me,"BUTTON",{class:!0});var se=U(P);J=o(se,"IMG",{src:!0,alt:!0,class:!0}),le=x(se),O.l(se),se.forEach(y),me.forEach(y),Y.forEach(y),ae=x(E),X=o(E,"MAIN",{class:!0});var ge=U(X);B&&B.l(ge),ge.forEach(y),oe=x(E),T&&T.l(E),E.forEach(y),this.h()},h(){a(n,"class","p-4 border-b border-gray-200"),a(_,"class","mt-2 mb-1 px-2 text-xs font-medium text-gray-500 uppercase"),a(u,"class",I="w-full flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-gray-100 transition-colors text-left "+(i[0]==="tts"?"bg-gray-100":"")),a(A,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),A.disabled=!0,a(v,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),v.disabled=!0,a(p,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),p.disabled=!0,a(w,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),w.disabled=!0,a(W,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),W.disabled=!0,a(l,"class","p-2 text-sm"),Me(J.src,de="/assets/hf-logo.png")||a(J,"src",de),a(J,"alt","HF Logo"),a(J,"class","w-5 h-5"),a(P,"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"),a(R,"class","absolute bottom-4 left-2 right-2 w-52"),a(e,"class","w-56 border-r border-gray-200 bg-white flex-shrink-0 "),a(X,"class","flex-1 overflow-auto"),a(t,"class","flex h-screen bg-white")},m(h,E){$(h,t,E),s(t,e),s(e,n),s(e,g),s(e,l),s(l,_),s(l,d),s(l,u),s(u,C),s(u,b),s(u,N),s(l,S),s(l,A),s(l,m),s(l,v),s(l,Q),s(l,p),s(l,D),s(l,w),s(l,G),s(l,W),s(e,ne),s(e,R),s(R,P),s(P,J),s(P,le),O.m(P,null),s(t,ae),s(t,X),B&&B.m(X,null),s(t,oe),T&&T.m(t,null),K=!0,re||(pe=[Z(u,"click",i[11]),Z(P,"click",i[6])],re=!0)},p(h,[E]){(!K||E&1&&I!==(I="w-full flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-gray-100 transition-colors text-left "+(h[0]==="tts"?"bg-gray-100":"")))&&a(u,"class",I),ee===(ee=he(h))&&O?O.p(h,E):(O.d(1),O=ee(h),O&&(O.c(),O.m(P,null))),B&&B.p&&(!K||E&512)&&Le(B,ie,h,h[9],K?He(ie,h[9],E,null):Se(h[9]),null),h[3]?T?T.p(h,E):(T=be(h),T.c(),T.m(t,null)):T&&(T.d(1),T=null)},i(h){K||(Ee(B,h),K=!0)},o(h){Ie(B,h),K=!1},d(h){h&&y(t),O.d(),B&&B.d(h),T&&T.d(),re=!1,xe(pe)}}}function Oe(i,t,e){let{$$slots:n={},$$scope:f}=t,g="tts",l=!1,_="",j=!1,d="",u="";Ne(()=>{C(),document.addEventListener("visibilitychange",()=>{document.hidden||C()}),window.addEventListener("storage",C);const c=setInterval(C,1e3);return()=>{window.removeEventListener("storage",C),clearInterval(c)}});function C(){const c=localStorage.getItem("hf_access_token");c?q(c):(e(1,l=!1),e(2,_=""))}async function q(c){try{const m=await fetch("https://huggingface.co/api/whoami-v2",{headers:{Authorization:`Bearer ${c}`}});if(m.ok){const v=await m.json();e(1,l=!0);const z=v.name||v.fullname||v.login||v.username||"User";e(2,_=z.split(" ")[0])}else localStorage.removeItem("hf_access_token"),e(1,l=!1),e(2,_="")}catch{localStorage.removeItem("hf_access_token"),e(1,l=!1),e(2,_="")}}function b(){l?(localStorage.removeItem("hf_access_token"),sessionStorage.removeItem("oauth_state"),e(1,l=!1),e(2,_="")):(e(3,j=!0),e(4,d=""),e(5,u=""))}function N(){e(3,j=!1),e(4,d=""),e(5,u="")}async function V(){if(!d.trim()){e(5,u="Please enter a token");return}if(!d.startsWith("hf_")){e(5,u='Token should start with "hf_"');return}try{const c=await fetch("https://huggingface.co/api/whoami-v2",{headers:{Authorization:`Bearer ${d.trim()}`}});if(c.ok){const m=await c.json();localStorage.setItem("hf_access_token",d.trim()),e(1,l=!0);const v=m.name||m.fullname||m.login||m.username||"User";e(2,_=v.split(" ")[0]),N()}else{const m=await c.text();console.log("Token validation error:",c.status,m),e(5,u=`Invalid token (${c.status}). Please check your token and try again.`)}}catch(c){console.error("Token validation error:",c),e(5,u="Error validating token. Please try again.")}}const I=()=>e(0,g="tts");function S(){d=this.value,e(4,d)}const A=c=>c.key==="Enter"&&V();return i.$$set=c=>{"$$scope"in c&&e(9,f=c.$$scope)},[g,l,_,j,d,u,b,N,V,f,n,I,S,A]}class Ve extends ye{constructor(t){super(),we(this,t,Oe,De,Te,{})}}export{Ve as component};
hfstudio/static/_app/immutable/nodes/1.6-QsMY98.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/DC4WdVUD.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.H90UMdat.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import{S as Ye,i as Ze,s as Le,v as ut,P as D,d as u,Q as Dl,x as w,y as $,z as ft,A as dt,B as mt,R as Vl,b as J,c as a,T as vn,f as m,F as xt,U as bn,V as Yl,W as X,J as O,L as x,M as B,K as j,w as Bl,o as i,E as dl,C as wt,a as ct,u as U,e as f,g as I,h as p,q as Qe,j as d,t as S,k as v,n as Kt,D as ml,N as fl,O as $n,X as Sl,m as Zl}from"../chunks/BI_gvUUO.js";import"../chunks/IHki7fMi.js";function Ot(o){return(o==null?void 0:o.length)!==void 0?o:Array.from(o)}function et(o,e){const s={},t={},l={$$scope:1};let n=o.length;for(;n--;){const r=o[n],c=e[n];if(c){for(const g in r)g in c||(t[g]=1);for(const g in c)l[g]||(s[g]=c[g],l[g]=1);o[n]=c}else for(const g in r)l[g]=1}for(const r in t)r in s||(s[r]=void 0);return s}function Et(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 en={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 tn(o,e,s){const t=o.slice();return t[10]=e[s][0],t[11]=e[s][1],t}function Ol(o){let e,s=[o[11]],t={};for(let l=0;l<s.length;l+=1)t=D(t,s[l]);return{c(){e=bn(o[10]),this.h()},l(l){e=vn(l,o[10],{}),m(e).forEach(u),this.h()},h(){Vl(e,t)},m(l,n){J(l,e,n)},p(l,n){Vl(e,t=et(s,[n&32&&l[11]]))},d(l){l&&u(e)}}}function ln(o){let e=o[10],s,t=o[10]&&Ol(o);return{c(){t&&t.c(),s=xt()},l(l){t&&t.l(l),s=xt()},m(l,n){t&&t.m(l,n),J(l,s,n)},p(l,n){l[10]?e?Le(e,l[10])?(t.d(1),t=Ol(l),e=l[10],t.c(),t.m(s.parentNode,s)):t.p(l,n):(t=Ol(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 yn(o){let e,s,t,l,n,r=Ot(o[5]),c=[];for(let _=0;_<r.length;_+=1)c[_]=ln(tn(o,r,_));const g=o[9].default,E=ut(g,o,o[8],null);let N=[en,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??""}`}],T={};for(let _=0;_<N.length;_+=1)T=D(T,N[_]);return{c(){e=bn("svg");for(let _=0;_<c.length;_+=1)c[_].c();s=xt(),E&&E.c(),this.h()},l(_){e=vn(_,"svg",{width:!0,height:!0,stroke:!0,"stroke-width":!0,class:!0});var b=m(e);for(let k=0;k<c.length;k+=1)c[k].l(b);s=xt(),E&&E.l(b),b.forEach(u),this.h()},h(){Vl(e,T)},m(_,b){J(_,e,b);for(let k=0;k<c.length;k+=1)c[k]&&c[k].m(e,null);a(e,s),E&&E.m(e,null),n=!0},p(_,[b]){if(b&32){r=Ot(_[5]);let k;for(k=0;k<r.length;k+=1){const P=tn(_,r,k);c[k]?c[k].p(P,b):(c[k]=ln(P),c[k].c(),c[k].m(e,s))}for(;k<c.length;k+=1)c[k].d(1);c.length=r.length}E&&E.p&&(!n||b&256)&&ft(E,g,_,_[8],n?mt(g,_[8],b,null):dt(_[8]),null),Vl(e,T=et(N,[en,b&64&&_[6],(!n||b&4)&&{width:_[2]},(!n||b&4)&&{height:_[2]},(!n||b&2)&&{stroke:_[1]},(!n||b&28&&t!==(t=_[4]?Number(_[3])*24/Number(_[2]):_[3]))&&{"stroke-width":t},(!n||b&129&&l!==(l=`lucide-icon lucide lucide-${_[0]} ${_[7].class??""}`))&&{class:l}]))},i(_){n||($(E,_),n=!0)},o(_){w(E,_),n=!1},d(_){_&&u(e),Dl(c,_),E&&E.d(_)}}}function wn(o,e,s){const t=["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"];let l=Yl(e,t),{$$slots:n={},$$scope:r}=e,{name:c}=e,{color:g="currentColor"}=e,{size:E=24}=e,{strokeWidth:N=2}=e,{absoluteStrokeWidth:T=!1}=e,{iconNode:_}=e;return o.$$set=b=>{s(7,e=D(D({},e),X(b))),s(6,l=Yl(e,t)),"name"in b&&s(0,c=b.name),"color"in b&&s(1,g=b.color),"size"in b&&s(2,E=b.size),"strokeWidth"in b&&s(3,N=b.strokeWidth),"absoluteStrokeWidth"in b&&s(4,T=b.absoluteStrokeWidth),"iconNode"in b&&s(5,_=b.iconNode),"$$scope"in b&&s(8,r=b.$$scope)},e=X(e),[c,g,E,N,T,_,l,e,r,n]}class Nt extends Ye{constructor(e){super(),Ze(this,e,wn,yn,Le,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function En(o){let e;const s=o[2].default,t=ut(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)&&ft(t,s,l,l[3],e?mt(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Nn(o){let e,s;const t=[{name:"alert-circle"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[En]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=D(l,t[n]);return e=new Nt({props:l}),{c(){j(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,r){x(e,n,r),s=!0},p(n,[r]){const c=r&3?et(t,[t[0],r&2&&Et(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(c.$$scope={dirty:r,ctx:n}),e.$set(c)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function Tn(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=D(D({},e),X(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=X(e),[n,e,t,l]}class In extends Ye{constructor(e){super(),Ze(this,e,Tn,Nn,Le,{})}}function Sn(o){let e;const s=o[2].default,t=ut(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)&&ft(t,s,l,l[3],e?mt(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Dn(o){let e,s;const t=[{name:"chevron-down"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Sn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=D(l,t[n]);return e=new Nt({props:l}),{c(){j(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,r){x(e,n,r),s=!0},p(n,[r]){const c=r&3?et(t,[t[0],r&2&&Et(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(c.$$scope={dirty:r,ctx:n}),e.$set(c)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function Vn(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=D(D({},e),X(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=X(e),[n,e,t,l]}class An extends Ye{constructor(e){super(),Ze(this,e,Vn,Dn,Le,{})}}function Cn(o){let e;const s=o[2].default,t=ut(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)&&ft(t,s,l,l[3],e?mt(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Pn(o){let e,s;const t=[{name:"download"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Cn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=D(l,t[n]);return e=new Nt({props:l}),{c(){j(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,r){x(e,n,r),s=!0},p(n,[r]){const c=r&3?et(t,[t[0],r&2&&Et(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(c.$$scope={dirty:r,ctx:n}),e.$set(c)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function Un(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=D(D({},e),X(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=X(e),[n,e,t,l]}class nn extends Ye{constructor(e){super(),Ze(this,e,Un,Pn,Le,{})}}function zn(o){let e;const s=o[2].default,t=ut(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)&&ft(t,s,l,l[3],e?mt(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function On(o){let e,s;const t=[{name:"loader-2"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[zn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=D(l,t[n]);return e=new Nt({props:l}),{c(){j(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,r){x(e,n,r),s=!0},p(n,[r]){const c=r&3?et(t,[t[0],r&2&&Et(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(c.$$scope={dirty:r,ctx:n}),e.$set(c)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function xn(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=D(D({},e),X(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=X(e),[n,e,t,l]}class Bn extends Ye{constructor(e){super(),Ze(this,e,xn,On,Le,{})}}function jn(o){let e;const s=o[2].default,t=ut(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)&&ft(t,s,l,l[3],e?mt(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Ln(o){let e,s;const t=[{name:"more-horizontal"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[jn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=D(l,t[n]);return e=new Nt({props:l}),{c(){j(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,r){x(e,n,r),s=!0},p(n,[r]){const c=r&3?et(t,[t[0],r&2&&Et(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(c.$$scope={dirty:r,ctx:n}),e.$set(c)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function Mn(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=D(D({},e),X(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=X(e),[n,e,t,l]}class kn extends Ye{constructor(e){super(),Ze(this,e,Mn,Ln,Le,{})}}function Fn(o){let e;const s=o[2].default,t=ut(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)&&ft(t,s,l,l[3],e?mt(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Hn(o){let e,s;const t=[{name:"play"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Fn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=D(l,t[n]);return e=new Nt({props:l}),{c(){j(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,r){x(e,n,r),s=!0},p(n,[r]){const c=r&3?et(t,[t[0],r&2&&Et(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(c.$$scope={dirty:r,ctx:n}),e.$set(c)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function Wn(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=D(D({},e),X(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=X(e),[n,e,t,l]}class jl extends Ye{constructor(e){super(),Ze(this,e,Wn,Hn,Le,{})}}function qn(o){let e;const s=o[2].default,t=ut(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)&&ft(t,s,l,l[3],e?mt(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Gn(o){let e,s;const t=[{name:"settings"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[qn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=D(l,t[n]);return e=new Nt({props:l}),{c(){j(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,r){x(e,n,r),s=!0},p(n,[r]){const c=r&3?et(t,[t[0],r&2&&Et(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(c.$$scope={dirty:r,ctx:n}),e.$set(c)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function Rn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}],["circle",{cx:"12",cy:"12",r:"3"}]];return o.$$set=r=>{s(1,e=D(D({},e),X(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=X(e),[n,e,t,l]}class Kn extends Ye{constructor(e){super(),Ze(this,e,Rn,Gn,Le,{})}}function Jn(o){let e;const s=o[2].default,t=ut(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)&&ft(t,s,l,l[3],e?mt(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Xn(o){let e,s;const t=[{name:"share"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Jn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=D(l,t[n]);return e=new Nt({props:l}),{c(){j(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,r){x(e,n,r),s=!0},p(n,[r]){const c=r&3?et(t,[t[0],r&2&&Et(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(c.$$scope={dirty:r,ctx:n}),e.$set(c)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function Qn(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=D(D({},e),X(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=X(e),[n,e,t,l]}class xl extends Ye{constructor(e){super(),Ze(this,e,Qn,Xn,Le,{})}}function Yn(o){let e;const s=o[2].default,t=ut(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)&&ft(t,s,l,l[3],e?mt(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Zn(o){let e,s;const t=[{name:"skip-back"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Yn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=D(l,t[n]);return e=new Nt({props:l}),{c(){j(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,r){x(e,n,r),s=!0},p(n,[r]){const c=r&3?et(t,[t[0],r&2&&Et(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(c.$$scope={dirty:r,ctx:n}),e.$set(c)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function es(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=D(D({},e),X(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=X(e),[n,e,t,l]}class ts extends Ye{constructor(e){super(),Ze(this,e,es,Zn,Le,{})}}function ls(o){let e;const s=o[2].default,t=ut(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)&&ft(t,s,l,l[3],e?mt(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function ns(o){let e,s;const t=[{name:"skip-forward"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[ls]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=D(l,t[n]);return e=new Nt({props:l}),{c(){j(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,r){x(e,n,r),s=!0},p(n,[r]){const c=r&3?et(t,[t[0],r&2&&Et(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(c.$$scope={dirty:r,ctx:n}),e.$set(c)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function ss(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=D(D({},e),X(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=X(e),[n,e,t,l]}class os extends Ye{constructor(e){super(),Ze(this,e,ss,ns,Le,{})}}function sn(o,e,s){const t=o.slice();return t[39]=e[s],t}function on(o,e,s){const t=o.slice();return t[42]=e[s],t}function rn(o,e,s){const t=o.slice();return t[42]=e[s],t}function an(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 In({props:{size:18,class:"text-blue-600 mt-0.5 flex-shrink-0"}}),{c(){e=d("div"),j(s.$$.fragment),t=v(),l=d("div"),l.innerHTML=n,this.h()},l(c){e=f(c,"DIV",{class:!0});var g=m(e);B(s.$$.fragment,g),t=p(g),l=f(g,"DIV",{class:!0,"data-svelte-h":!0}),Qe(l)!=="svelte-p3cqs1"&&(l.innerHTML=n),g.forEach(u),this.h()},h(){i(l,"class","text-sm"),i(e,"class","mb-4 p-3 bg-blue-50 border border-blue-200 rounded-lg flex items-start gap-2")},m(c,g){J(c,e,g),x(s,e,null),a(e,t),a(e,l),r=!0},i(c){r||($(s.$$.fragment,c),r=!0)},o(c){w(s.$$.fragment,c),r=!1},d(c){c&&u(e),O(s)}}}function cn(o){let e,s="Clear",t,l;return{c(){e=d("button"),e.textContent=s,this.h()},l(n){e=f(n,"BUTTON",{class:!0,"data-svelte-h":!0}),Qe(e)!=="svelte-18e8snq"&&(e.textContent=s),this.h()},h(){i(e,"class","absolute top-4 right-6 text-sm text-gray-400 hover:text-gray-600")},m(n,r){J(n,e,r),t||(l=U(e,"click",o[26]),t=!0)},p:Kt,d(n){n&&u(e),t=!1,l()}}}function rs(o){let e,s,t;return e=new jl({props:{size:20}}),{c(){j(e.$$.fragment),s=S(`
7
+ Generate speech`)},l(l){B(e.$$.fragment,l),s=I(l,`
8
+ Generate speech`)},m(l,n){x(e,l,n),J(l,s,n),t=!0},i(l){t||($(e.$$.fragment,l),t=!0)},o(l){w(e.$$.fragment,l),t=!1},d(l){l&&u(s),O(e,l)}}}function as(o){let e,s,t;return e=new Bn({props:{size:20,class:"animate-spin"}}),{c(){j(e.$$.fragment),s=S(`
9
+ Generating...`)},l(l){B(e.$$.fragment,l),s=I(l,`
10
+ Generating...`)},m(l,n){x(e,l,n),J(l,s,n),t=!0},i(l){t||($(e.$$.fragment,l),t=!0)},o(l){w(e.$$.fragment,l),t=!1},d(l){l&&u(s),O(e,l)}}}function un(o){let e,s,t,l,n,r,c,g,E,N,T,_,b,k,P,fe,de,M="Share",Q,L,R,Ee="Download",Me,Y,le,Ne,ne,q,me,Tt,Z,Te,Ie=zt(o[12])+"",Fe,ht,He,Oe,pe,se,ie=zt(o[13])+"",C,gt,F,H,W,tt,lt,Se,ee,_t,nt,De,Bt,Ce,Ve,xe=zt(o[12])+"",jt,Lt,ve,We,qe,It,St=zt(o[13])+"",he,Be,ce,be,pt,Mt,st,Pe,Ge,Ft,ot,oe,Ht,re,Jt,Xt;P=new xl({props:{size:14,class:"text-gray-600"}}),Y=new nn({props:{size:14,class:"text-gray-600"}});const vt=[cs,is],ke=[];function bt(y,z){return y[11]?0:1}q=bt(o),me=ke[q]=vt[q](o),W=new ts({props:{size:20,class:"text-gray-600"}});const cl=[fs,us],rt=[];function kt(y,z){return y[11]?0:1}Se=kt(o),ee=rt[Se]=cl[Se](o),De=new os({props:{size:20,class:"text-gray-600"}}),pt=new xl({props:{size:14}}),Ge=new nn({props:{size:16,class:"text-gray-600"}}),oe=new kn({props:{size:16,class:"text-gray-600"}});let K=o[6]&&fn(o);return{c(){e=d("div"),s=d("div"),t=d("div"),l=v(),n=d("div"),r=d("h3"),c=S(o[14]),g=v(),E=d("p"),N=S(o[1]),T=S(" • Created 1 second ago"),_=v(),b=d("div"),k=d("button"),j(P.$$.fragment),fe=v(),de=d("span"),de.textContent=M,Q=v(),L=d("button"),R=d("span"),R.textContent=Ee,Me=v(),j(Y.$$.fragment),le=v(),Ne=d("div"),ne=d("button"),me.c(),Tt=v(),Z=d("div"),Te=d("span"),Fe=S(Ie),ht=v(),He=d("div"),Oe=d("div"),pe=v(),se=d("span"),C=S(ie),gt=v(),F=d("div"),H=d("button"),j(W.$$.fragment),tt=v(),lt=d("button"),ee.c(),_t=v(),nt=d("button"),j(De.$$.fragment),Bt=v(),Ce=d("div"),Ve=d("span"),jt=S(xe),Lt=v(),ve=d("div"),We=d("div"),qe=v(),It=d("span"),he=S(St),Be=v(),ce=d("div"),be=d("button"),j(pt.$$.fragment),Mt=S(`
11
+ Share`),st=v(),Pe=d("button"),j(Ge.$$.fragment),Ft=v(),ot=d("button"),j(oe.$$.fragment),Ht=v(),K&&K.c(),this.h()},l(y){e=f(y,"DIV",{class:!0});var z=m(e);s=f(z,"DIV",{class:!0});var Ue=m(s);t=f(Ue,"DIV",{class:!0}),m(t).forEach(u),l=p(Ue),n=f(Ue,"DIV",{class:!0});var te=m(n);r=f(te,"H3",{class:!0});var Qt=m(r);c=I(Qt,o[14]),Qt.forEach(u),g=p(te),E=f(te,"P",{class:!0});var at=m(E);N=I(at,o[1]),T=I(at," • Created 1 second ago"),at.forEach(u),te.forEach(u),_=p(Ue),b=f(Ue,"DIV",{class:!0});var je=m(b);k=f(je,"BUTTON",{class:!0});var Re=m(k);B(P.$$.fragment,Re),fe=p(Re),de=f(Re,"SPAN",{class:!0,"data-svelte-h":!0}),Qe(de)!=="svelte-hbn8gl"&&(de.textContent=M),Re.forEach(u),Q=p(je),L=f(je,"BUTTON",{class:!0});var Wt=m(L);R=f(Wt,"SPAN",{class:!0,"data-svelte-h":!0}),Qe(R)!=="svelte-h01aeg"&&(R.textContent=Ee),Me=p(Wt),B(Y.$$.fragment,Wt),Wt.forEach(u),je.forEach(u),Ue.forEach(u),le=p(z),Ne=f(z,"DIV",{class:!0});var Vt=m(Ne);ne=f(Vt,"BUTTON",{class:!0});var $t=m(ne);me.l($t),$t.forEach(u),Tt=p(Vt),Z=f(Vt,"DIV",{class:!0});var Ke=m(Z);Te=f(Ke,"SPAN",{class:!0});var qt=m(Te);Fe=I(qt,Ie),qt.forEach(u),ht=p(Ke),He=f(Ke,"DIV",{class:!0});var Yt=m(He);Oe=f(Yt,"DIV",{class:!0,style:!0}),m(Oe).forEach(u),Yt.forEach(u),pe=p(Ke),se=f(Ke,"SPAN",{class:!0});var Zt=m(se);C=I(Zt,ie),Zt.forEach(u),Ke.forEach(u),Vt.forEach(u),gt=p(z),F=f(z,"DIV",{class:!0});var G=m(F);H=f(G,"BUTTON",{class:!0,title:!0});var el=m(H);B(W.$$.fragment,el),el.forEach(u),tt=p(G),lt=f(G,"BUTTON",{class:!0});var yt=m(lt);ee.l(yt),yt.forEach(u),_t=p(G),nt=f(G,"BUTTON",{class:!0,title:!0});var it=m(nt);B(De.$$.fragment,it),it.forEach(u),Bt=p(G),Ce=f(G,"DIV",{class:!0});var ze=m(Ce);Ve=f(ze,"SPAN",{class:!0});var ul=m(Ve);jt=I(ul,xe),ul.forEach(u),Lt=p(ze),ve=f(ze,"DIV",{class:!0});var tl=m(ve);We=f(tl,"DIV",{class:!0,style:!0}),m(We).forEach(u),tl.forEach(u),qe=p(ze),It=f(ze,"SPAN",{class:!0});var Dt=m(It);he=I(Dt,St),Dt.forEach(u),ze.forEach(u),Be=p(G),ce=f(G,"DIV",{class:!0});var Je=m(ce);be=f(Je,"BUTTON",{class:!0});var At=m(be);B(pt.$$.fragment,At),Mt=I(At,`
12
+ Share`),At.forEach(u),st=p(Je),Pe=f(Je,"BUTTON",{class:!0,title:!0});var ll=m(Pe);B(Ge.$$.fragment,ll),ll.forEach(u),Ft=p(Je),ot=f(Je,"BUTTON",{class:!0,title:!0});var Ae=m(ot);B(oe.$$.fragment,Ae),Ae.forEach(u),Je.forEach(u),G.forEach(u),Ht=p(z),K&&K.l(z),z.forEach(u),this.h()},h(){i(t,"class","w-2 h-2 bg-green-500 rounded-full"),i(r,"class","font-medium text-gray-900 text-sm"),i(E,"class","text-xs text-gray-500"),i(n,"class","flex-1"),i(de,"class","text-gray-700"),i(k,"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"),i(R,"class","text-gray-700"),i(L,"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"),i(b,"class","flex items-center gap-2"),i(s,"class","flex items-center gap-3 mb-4"),i(ne,"class","w-8 h-8 bg-black rounded-full flex items-center justify-center hover:bg-gray-800 transition-colors"),i(Te,"class","text-xs text-gray-500 font-mono"),i(Oe,"class","h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all"),fl(Oe,"width",o[12]/o[13]*100+"%"),i(He,"class","flex-1 h-1 bg-gray-200 rounded-full cursor-pointer"),i(se,"class","text-xs text-gray-500 font-mono"),i(Z,"class","flex-1 flex items-center gap-2"),i(Ne,"class","flex items-center gap-3 mb-4"),i(H,"class","p-2 hover:bg-gray-100 rounded-full"),i(H,"title","Skip back"),i(lt,"class","w-12 h-12 bg-black rounded-full flex items-center justify-center hover:bg-gray-800 transition-colors"),i(nt,"class","p-2 hover:bg-gray-100 rounded-full"),i(nt,"title","Skip forward"),i(Ve,"class","text-xs text-gray-500 font-mono"),i(We,"class","h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all"),fl(We,"width",o[12]/o[13]*100+"%"),i(ve,"class","flex-1 h-1 bg-gray-200 rounded-full"),i(It,"class","text-xs text-gray-500 font-mono"),i(Ce,"class","flex-1 flex items-center gap-3"),i(be,"class","flex items-center gap-2 px-3 py-1.5 text-sm border border-gray-200 rounded-md hover:bg-gray-50"),i(Pe,"class","p-2 hover:bg-gray-100 rounded-md"),i(Pe,"title","Download"),i(ot,"class","p-2 hover:bg-gray-100 rounded-md"),i(ot,"title","More options"),i(ce,"class","flex items-center gap-2"),i(F,"class","flex items-center gap-4 mb-4"),i(e,"class","p-4 border border-gray-200 rounded-lg bg-white")},m(y,z){J(y,e,z),a(e,s),a(s,t),a(s,l),a(s,n),a(n,r),a(r,c),a(n,g),a(n,E),a(E,N),a(E,T),a(s,_),a(s,b),a(b,k),x(P,k,null),a(k,fe),a(k,de),a(b,Q),a(b,L),a(L,R),a(L,Me),x(Y,L,null),a(e,le),a(e,Ne),a(Ne,ne),ke[q].m(ne,null),a(Ne,Tt),a(Ne,Z),a(Z,Te),a(Te,Fe),a(Z,ht),a(Z,He),a(He,Oe),a(Z,pe),a(Z,se),a(se,C),a(e,gt),a(e,F),a(F,H),x(W,H,null),a(F,tt),a(F,lt),rt[Se].m(lt,null),a(F,_t),a(F,nt),x(De,nt,null),a(F,Bt),a(F,Ce),a(Ce,Ve),a(Ve,jt),a(Ce,Lt),a(Ce,ve),a(ve,We),a(Ce,qe),a(Ce,It),a(It,he),a(F,Be),a(F,ce),a(ce,be),x(pt,be,null),a(be,Mt),a(ce,st),a(ce,Pe),x(Ge,Pe,null),a(ce,Ft),a(ce,ot),x(oe,ot,null),a(e,Ht),K&&K.m(e,null),re=!0,Jt||(Xt=[U(k,"click",pn),U(L,"click",o[24]),U(ne,"click",o[19]),U(lt,"click",o[19]),U(be,"click",pn),U(Pe,"click",o[24])],Jt=!0)},p(y,z){(!re||z[0]&16384)&&ct(c,y[14]),(!re||z[0]&2)&&ct(N,y[1]);let Ue=q;q=bt(y),q!==Ue&&(ml(),w(ke[Ue],1,1,()=>{ke[Ue]=null}),dl(),me=ke[q],me||(me=ke[q]=vt[q](y),me.c()),$(me,1),me.m(ne,null)),(!re||z[0]&4096)&&Ie!==(Ie=zt(y[12])+"")&&ct(Fe,Ie),(!re||z[0]&12288)&&fl(Oe,"width",y[12]/y[13]*100+"%"),(!re||z[0]&8192)&&ie!==(ie=zt(y[13])+"")&&ct(C,ie);let te=Se;Se=kt(y),Se!==te&&(ml(),w(rt[te],1,1,()=>{rt[te]=null}),dl(),ee=rt[Se],ee||(ee=rt[Se]=cl[Se](y),ee.c()),$(ee,1),ee.m(lt,null)),(!re||z[0]&4096)&&xe!==(xe=zt(y[12])+"")&&ct(jt,xe),(!re||z[0]&12288)&&fl(We,"width",y[12]/y[13]*100+"%"),(!re||z[0]&8192)&&St!==(St=zt(y[13])+"")&&ct(he,St),y[6]?K?K.p(y,z):(K=fn(y),K.c(),K.m(e,null)):K&&(K.d(1),K=null)},i(y){re||($(P.$$.fragment,y),$(Y.$$.fragment,y),$(me),$(W.$$.fragment,y),$(ee),$(De.$$.fragment,y),$(pt.$$.fragment,y),$(Ge.$$.fragment,y),$(oe.$$.fragment,y),re=!0)},o(y){w(P.$$.fragment,y),w(Y.$$.fragment,y),w(me),w(W.$$.fragment,y),w(ee),w(De.$$.fragment,y),w(pt.$$.fragment,y),w(Ge.$$.fragment,y),w(oe.$$.fragment,y),re=!1},d(y){y&&u(e),O(P),O(Y),ke[q].d(),O(W),rt[Se].d(),O(De),O(pt),O(Ge),O(oe),K&&K.d(),Jt=!1,Bl(Xt)}}}function is(o){let e,s;return e=new jl({props:{size:14,class:"text-white ml-0.5"}}),{c(){j(e.$$.fragment)},l(t){B(e.$$.fragment,t)},m(t,l){x(e,t,l),s=!0},i(t){s||($(e.$$.fragment,t),s=!0)},o(t){w(e.$$.fragment,t),s=!1},d(t){O(e,t)}}}function cs(o){let e;return{c(){e=d("div"),this.h()},l(s){e=f(s,"DIV",{class:!0}),m(e).forEach(u),this.h()},h(){i(e,"class","pause-filled text-white")},m(s,t){J(s,e,t)},i:Kt,o:Kt,d(s){s&&u(e)}}}function us(o){let e,s;return e=new jl({props:{size:20,class:"text-white ml-0.5"}}),{c(){j(e.$$.fragment)},l(t){B(e.$$.fragment,t)},m(t,l){x(e,t,l),s=!0},i(t){s||($(e.$$.fragment,t),s=!0)},o(t){w(e.$$.fragment,t),s=!1},d(t){O(e,t)}}}function fs(o){let e;return{c(){e=d("div"),this.h()},l(s){e=f(s,"DIV",{class:!0}),m(e).forEach(u),this.h()},h(){i(e,"class","pause-filled text-white scale-150")},m(s,t){J(s,e,t)},i:Kt,o:Kt,d(s){s&&u(e)}}}function fn(o){let e,s,t,l;return{c(){e=d("audio"),this.h()},l(n){e=f(n,"AUDIO",{src:!0,style:!0}),m(e).forEach(u),this.h()},h(){Zl(e.src,s=o[6])||i(e,"src",s),fl(e,"display","none")},m(n,r){J(n,e,r),o[30](e),t||(l=[U(e,"loadedmetadata",o[20]),U(e,"timeupdate",o[21]),U(e,"play",o[22]),U(e,"pause",o[23])],t=!0)},p(n,r){r[0]&64&&!Zl(e.src,s=n[6])&&i(e,"src",s)},d(n){n&&u(e),o[30](null),t=!1,Bl(l)}}}function dn(o){let e=o[42].name+"",s,t,l=o[42].badge&&ds(o);return{c(){s=S(e),l&&l.c(),t=xt()},l(n){s=I(n,e),l&&l.l(n),t=xt()},m(n,r){J(n,s,r),l&&l.m(n,r),J(n,t,r)},p(n,r){n[42].badge&&l.p(n,r)},d(n){n&&(u(s),u(t)),l&&l.d(n)}}}function ds(o){let e,s,t,l=o[42].badge+"",n,r;return{c(){e=S(" "),s=d("span"),t=S("("),n=S(l),r=S(")"),this.h()},l(c){e=I(c," "),s=f(c,"SPAN",{class:!0});var g=m(s);t=I(g,"("),n=I(g,l),r=I(g,")"),g.forEach(u),this.h()},h(){i(s,"class","text-xs text-gray-500")},m(c,g){J(c,e,g),J(c,s,g),a(s,t),a(s,n),a(s,r)},p:Kt,d(c){c&&(u(e),u(s))}}}function mn(o){let e,s=o[42].name===o[2]&&dn(o);return{c(){s&&s.c(),e=xt()},l(t){s&&s.l(t),e=xt()},m(t,l){s&&s.m(t,l),J(t,e,l)},p(t,l){t[42].name===t[2]?s?s.p(t,l):(s=dn(t),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null)},d(t){t&&u(e),s&&s.d(t)}}}function hn(o){let e,s=Ot(o[16]),t=[];for(let l=0;l<s.length;l+=1)t[l]=gn(on(o,s,l));return{c(){e=d("div");for(let l=0;l<t.length;l+=1)t[l].c();this.h()},l(l){e=f(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(){i(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){J(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]&65556){s=Ot(l[16]);let r;for(r=0;r<s.length;r+=1){const c=on(l,s,r);t[r]?t[r].p(c,n):(t[r]=gn(c),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),Dl(t,l)}}}function ms(o){let e,s,t,l=o[42].badge+"",n,r;return{c(){e=S(" "),s=d("span"),t=S("("),n=S(l),r=S(")"),this.h()},l(c){e=I(c," "),s=f(c,"SPAN",{class:!0});var g=m(s);t=I(g,"("),n=I(g,l),r=I(g,")"),g.forEach(u),this.h()},h(){i(s,"class","text-xs text-gray-500")},m(c,g){J(c,e,g),J(c,s,g),a(s,t),a(s,n),a(s,r)},p:Kt,d(c){c&&(u(e),u(s))}}}function gn(o){let e,s=o[42].name+"",t,l,n,r,c,g=o[42].badge&&ms(o);function E(){return o[32](o[42])}return{c(){e=d("button"),t=S(s),g&&g.c(),l=v(),this.h()},l(N){e=f(N,"BUTTON",{class:!0});var T=m(e);t=I(T,s),g&&g.l(T),l=p(T),T.forEach(u),this.h()},h(){i(e,"class",n="w-full px-3 py-2 text-left hover:bg-gray-50 transition-colors text-sm "+(o[42].name===o[2]?"bg-gray-100":""))},m(N,T){J(N,e,T),a(e,t),g&&g.m(e,null),a(e,l),r||(c=U(e,"click",E),r=!0)},p(N,T){o=N,o[42].badge&&g.p(o,T),T[0]&4&&n!==(n="w-full px-3 py-2 text-left hover:bg-gray-50 transition-colors text-sm "+(o[42].name===o[2]?"bg-gray-100":""))&&i(e,"class",n)},d(N){N&&u(e),g&&g.d(),r=!1,c()}}}function _n(o){let e,s,t,l=o[39].name[0]+"",n,r,c,g=o[39].name+"",E,N,T,_=o[39].description+"",b,k,P,fe,de;function M(){return o[33](o[39])}return{c(){e=d("button"),s=d("div"),t=d("div"),n=S(l),r=v(),c=d("span"),E=S(g),N=v(),T=d("div"),b=S(_),k=v(),this.h()},l(Q){e=f(Q,"BUTTON",{class:!0});var L=m(e);s=f(L,"DIV",{class:!0});var R=m(s);t=f(R,"DIV",{class:!0});var Ee=m(t);n=I(Ee,l),Ee.forEach(u),r=p(R),c=f(R,"SPAN",{class:!0});var Me=m(c);E=I(Me,g),Me.forEach(u),R.forEach(u),N=p(L),T=f(L,"DIV",{class:!0});var Y=m(T);b=I(Y,_),Y.forEach(u),k=p(L),L.forEach(u),this.h()},h(){i(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"),i(c,"class","text-sm font-medium"),i(s,"class","flex items-center gap-2"),i(T,"class","text-xs text-gray-500"),i(e,"class",P="w-full flex items-center justify-between p-2 rounded-md hover:bg-gray-50 transition-colors text-left "+(o[39].name===o[1]?"bg-gray-100":""))},m(Q,L){J(Q,e,L),a(e,s),a(s,t),a(t,n),a(s,r),a(s,c),a(c,E),a(e,N),a(e,T),a(T,b),a(e,k),fe||(de=U(e,"click",M),fe=!0)},p(Q,L){o=Q,L[0]&2&&P!==(P="w-full flex items-center justify-between p-2 rounded-md hover:bg-gray-50 transition-colors text-left "+(o[39].name===o[1]?"bg-gray-100":""))&&i(e,"class",P)},d(Q){Q&&u(e),fe=!1,de()}}}function hs(o){let e,s,t,l,n,r,c,g,E,N,T,_,b,k,P,fe,de,M,Q,L,R,Ee,Me,Y,le,Ne,ne,q,me,Tt,Z,Te,Ie,Fe=o[0].length+"",ht,He,Oe,pe,se,ie,C,gt,F,H,W,tt,lt="Model",Se,ee,_t,nt,De,Bt,Ce,Ve,xe,jt='<h3 class="font-medium text-gray-900">Voice</h3>',Lt,ve,We,qe,It='<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>',St,he,Be,ce,be,pt="Speed",Mt,st,Pe=o[7].toFixed(1)+"",Ge,Ft,ot,oe,Ht,re,Jt="<span>0.5x</span> <span>2.0x</span>",Xt,vt,ke,bt,cl="Stability",rt,kt,K=(o[8]*100).toFixed(0)+"",y,z,Ue,te,Qt,at,je,Re,Wt="Similarity",Vt,$t,Ke=(o[9]*100).toFixed(0)+"",qt,Yt,Zt,G,el,yt,it,ze,ul="Style",tl,Dt,Je=o[10]===0?"None":"Exaggerated",At,ll,Ae,Xe,Al,Ll;fe=new Kn({props:{size:18,class:"text-gray-600"}}),Q=new xl({props:{size:18,class:"text-gray-600"}}),Ee=new kn({props:{size:18,class:"text-gray-600"}});let ue=o[3]==="local"&&an(),$e=o[0]&&cn(o);const Ml=[as,rs],Gt=[];function Fl(h,V){return h[5]?0:1}se=Fl(o),ie=Gt[se]=Ml[se](o);let ae=o[6]&&un(o),nl=Ot(o[16]),ge=[];for(let h=0;h<nl.length;h+=1)ge[h]=mn(rn(o,nl,h));De=new An({props:{size:16,class:"text-gray-500"}});let ye=o[4]&&hn(o),sl=Ot(o[17]),_e=[];for(let h=0;h<sl.length;h+=1)_e[h]=_n(sn(o,sl,h));return{c(){e=d("div"),s=d("header"),t=d("div"),l=d("div"),n=d("div"),r=d("button"),c=S("API"),E=v(),N=d("button"),T=S("Local"),b=v(),k=d("div"),P=d("button"),j(fe.$$.fragment),de=v(),M=d("button"),j(Q.$$.fragment),L=v(),R=d("button"),j(Ee.$$.fragment),Me=v(),Y=d("div"),le=d("div"),ue&&ue.c(),Ne=v(),ne=d("div"),q=d("textarea"),me=v(),$e&&$e.c(),Tt=v(),Z=d("div"),Te=d("div"),Ie=d("span"),ht=S(Fe),He=S(" / 5,000 characters"),Oe=v(),pe=d("button"),ie.c(),gt=v(),ae&&ae.c(),F=v(),H=d("div"),W=d("div"),tt=d("h3"),tt.textContent=lt,Se=v(),ee=d("button"),_t=d("span");for(let h=0;h<ge.length;h+=1)ge[h].c();nt=v(),j(De.$$.fragment),Bt=v(),ye&&ye.c(),Ce=v(),Ve=d("div"),xe=d("div"),xe.innerHTML=jt,Lt=v(),ve=d("div");for(let h=0;h<_e.length;h+=1)_e[h].c();We=v(),qe=d("button"),qe.innerHTML=It,St=v(),he=d("div"),Be=d("div"),ce=d("div"),be=d("label"),be.textContent=pt,Mt=v(),st=d("span"),Ge=S(Pe),Ft=S("x"),ot=v(),oe=d("input"),Ht=v(),re=d("div"),re.innerHTML=Jt,Xt=v(),vt=d("div"),ke=d("div"),bt=d("label"),bt.textContent=cl,rt=v(),kt=d("span"),y=S(K),z=S("%"),Ue=v(),te=d("input"),Qt=v(),at=d("div"),je=d("div"),Re=d("label"),Re.textContent=Wt,Vt=v(),$t=d("span"),qt=S(Ke),Yt=S("%"),Zt=v(),G=d("input"),el=v(),yt=d("div"),it=d("div"),ze=d("label"),ze.textContent=ul,tl=v(),Dt=d("span"),At=S(Je),ll=v(),Ae=d("input"),this.h()},l(h){e=f(h,"DIV",{class:!0});var V=m(e);s=f(V,"HEADER",{class:!0});var we=m(s);t=f(we,"DIV",{class:!0});var A=m(t);l=f(A,"DIV",{class:!0});var Ct=m(l);n=f(Ct,"DIV",{class:!0});var hl=m(n);r=f(hl,"BUTTON",{class:!0});var Hl=m(r);c=I(Hl,"API"),Hl.forEach(u),E=p(hl),N=f(hl,"BUTTON",{class:!0});var Wl=m(N);T=I(Wl,"Local"),Wl.forEach(u),hl.forEach(u),Ct.forEach(u),b=p(A),k=f(A,"DIV",{class:!0});var ol=m(k);P=f(ol,"BUTTON",{class:!0,title:!0});var ql=m(P);B(fe.$$.fragment,ql),ql.forEach(u),de=p(ol),M=f(ol,"BUTTON",{class:!0,title:!0});var Gl=m(M);B(Q.$$.fragment,Gl),Gl.forEach(u),L=p(ol),R=f(ol,"BUTTON",{class:!0,title:!0});var Rl=m(R);B(Ee.$$.fragment,Rl),Rl.forEach(u),ol.forEach(u),A.forEach(u),we.forEach(u),Me=p(V),Y=f(V,"DIV",{class:!0});var gl=m(Y);le=f(gl,"DIV",{class:!0});var Pt=m(le);ue&&ue.l(Pt),Ne=p(Pt),ne=f(Pt,"DIV",{class:!0});var _l=m(ne);q=f(_l,"TEXTAREA",{class:!0,placeholder:!0}),m(q).forEach(u),me=p(_l),$e&&$e.l(_l),_l.forEach(u),Tt=p(Pt),Z=f(Pt,"DIV",{class:!0});var pl=m(Z);Te=f(pl,"DIV",{class:!0});var Kl=m(Te);Ie=f(Kl,"SPAN",{class:!0});var Cl=m(Ie);ht=I(Cl,Fe),He=I(Cl," / 5,000 characters"),Cl.forEach(u),Kl.forEach(u),Oe=p(pl),pe=f(pl,"BUTTON",{class:!0});var Jl=m(pe);ie.l(Jl),Jl.forEach(u),pl.forEach(u),gt=p(Pt),ae&&ae.l(Pt),Pt.forEach(u),F=p(gl),H=f(gl,"DIV",{class:!0});var rl=m(H);W=f(rl,"DIV",{class:!0});var al=m(W);tt=f(al,"H3",{class:!0,"data-svelte-h":!0}),Qe(tt)!=="svelte-b3hs3r"&&(tt.textContent=lt),Se=p(al),ee=f(al,"BUTTON",{class:!0});var vl=m(ee);_t=f(vl,"SPAN",{});var Xl=m(_t);for(let Rt=0;Rt<ge.length;Rt+=1)ge[Rt].l(Xl);Xl.forEach(u),nt=p(vl),B(De.$$.fragment,vl),vl.forEach(u),Bt=p(al),ye&&ye.l(al),al.forEach(u),Ce=p(rl),Ve=f(rl,"DIV",{class:!0});var bl=m(Ve);xe=f(bl,"DIV",{class:!0,"data-svelte-h":!0}),Qe(xe)!=="svelte-182x1ki"&&(xe.innerHTML=jt),Lt=p(bl),ve=f(bl,"DIV",{class:!0});var kl=m(ve);for(let Rt=0;Rt<_e.length;Rt+=1)_e[Rt].l(kl);We=p(kl),qe=f(kl,"BUTTON",{class:!0,"data-svelte-h":!0}),Qe(qe)!=="svelte-20x663"&&(qe.innerHTML=It),kl.forEach(u),bl.forEach(u),St=p(rl),he=f(rl,"DIV",{class:!0});var Ut=m(he);Be=f(Ut,"DIV",{});var il=m(Be);ce=f(il,"DIV",{class:!0});var $l=m(ce);be=f($l,"LABEL",{class:!0,"data-svelte-h":!0}),Qe(be)!=="svelte-9vcpiu"&&(be.textContent=pt),Mt=p($l),st=f($l,"SPAN",{class:!0});var Pl=m(st);Ge=I(Pl,Pe),Ft=I(Pl,"x"),Pl.forEach(u),$l.forEach(u),ot=p(il),oe=f(il,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),Ht=p(il),re=f(il,"DIV",{class:!0,"data-svelte-h":!0}),Qe(re)!=="svelte-4ydm1m"&&(re.innerHTML=Jt),il.forEach(u),Xt=p(Ut),vt=f(Ut,"DIV",{});var yl=m(vt);ke=f(yl,"DIV",{class:!0});var wl=m(ke);bt=f(wl,"LABEL",{class:!0,"data-svelte-h":!0}),Qe(bt)!=="svelte-1lgjete"&&(bt.textContent=cl),rt=p(wl),kt=f(wl,"SPAN",{class:!0});var Ul=m(kt);y=I(Ul,K),z=I(Ul,"%"),Ul.forEach(u),wl.forEach(u),Ue=p(yl),te=f(yl,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),yl.forEach(u),Qt=p(Ut),at=f(Ut,"DIV",{});var El=m(at);je=f(El,"DIV",{class:!0});var Nl=m(je);Re=f(Nl,"LABEL",{class:!0,"data-svelte-h":!0}),Qe(Re)!=="svelte-1ha0vec"&&(Re.textContent=Wt),Vt=p(Nl),$t=f(Nl,"SPAN",{class:!0});var zl=m($t);qt=I(zl,Ke),Yt=I(zl,"%"),zl.forEach(u),Nl.forEach(u),Zt=p(El),G=f(El,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),El.forEach(u),el=p(Ut),yt=f(Ut,"DIV",{});var Tl=m(yt);it=f(Tl,"DIV",{class:!0});var Il=m(it);ze=f(Il,"LABEL",{class:!0,"data-svelte-h":!0}),Qe(ze)!=="svelte-1ata0tk"&&(ze.textContent=ul),tl=p(Il),Dt=f(Il,"SPAN",{class:!0});var Ql=m(Dt);At=I(Ql,Je),Ql.forEach(u),Il.forEach(u),ll=p(Tl),Ae=f(Tl,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),Tl.forEach(u),Ut.forEach(u),rl.forEach(u),gl.forEach(u),V.forEach(u),this.h()},h(){i(r,"class",g="px-3 py-1 text-sm font-medium rounded transition-colors "+(o[3]==="api"?"bg-white shadow-sm":"text-gray-600")),i(N,"class",_="px-3 py-1 text-sm font-medium rounded transition-colors "+(o[3]==="local"?"bg-white shadow-sm":"text-gray-600")),i(n,"class","flex items-center bg-gray-100 rounded-md p-0.5"),i(l,"class","flex items-center gap-3"),i(P,"class","p-2 hover:bg-gray-50 rounded-md"),i(P,"title","Settings"),i(M,"class","p-2 hover:bg-gray-50 rounded-md"),i(M,"title","Share"),i(R,"class","p-2 hover:bg-gray-50 rounded-md"),i(R,"title","More"),i(k,"class","flex items-center gap-2"),i(t,"class","flex items-center justify-between px-4 py-2"),i(s,"class","border-b border-gray-200 bg-white"),i(q,"class","w-full h-full p-6 bg-white resize-none border-0 focus:outline-none text-gray-900 text-base leading-relaxed"),i(q,"placeholder","Welcome to our text to speech demo. This technology can transform any written content into natural sounding audio."),i(ne,"class","flex-1 pb-24"),i(Ie,"class","text-sm text-gray-500"),i(Te,"class","flex items-center justify-between mb-3"),pe.disabled=C=o[5]||!o[0].trim(),i(pe,"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"),i(Z,"class","fixed bottom-0 left-56 right-80 p-4 bg-white border-t border-gray-200"),i(le,"class","flex-1 flex flex-col p-6"),i(tt,"class","font-medium text-gray-900 mb-3"),i(ee,"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"),i(W,"class","mb-6 relative model-dropdown"),i(xe,"class","mb-3"),i(qe,"class","w-full flex items-center justify-between p-2 rounded-md opacity-50 cursor-not-allowed text-left"),qe.disabled=!0,i(ve,"class","space-y-1"),i(Ve,"class","mb-6"),i(be,"class","text-sm font-medium text-gray-700"),i(st,"class","text-sm text-gray-500"),i(ce,"class","flex justify-between mb-1"),i(oe,"type","range"),i(oe,"min","0.5"),i(oe,"max","2"),i(oe,"step","0.1"),i(oe,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),i(re,"class","flex justify-between text-xs text-gray-400 mt-1"),i(bt,"class","text-sm font-medium text-gray-700"),i(kt,"class","text-sm text-gray-500"),i(ke,"class","flex justify-between mb-1"),i(te,"type","range"),i(te,"min","0"),i(te,"max","1"),i(te,"step","0.01"),i(te,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),i(Re,"class","text-sm font-medium text-gray-700"),i($t,"class","text-sm text-gray-500"),i(je,"class","flex justify-between mb-1"),i(G,"type","range"),i(G,"min","0"),i(G,"max","1"),i(G,"step","0.01"),i(G,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),i(ze,"class","text-sm font-medium text-gray-700"),i(Dt,"class","text-sm text-gray-500"),i(it,"class","flex justify-between mb-1"),i(Ae,"type","range"),i(Ae,"min","0"),i(Ae,"max","1"),i(Ae,"step","1"),i(Ae,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),i(he,"class","space-y-4 pt-4 border-t border-gray-200"),i(H,"class","w-80 border-l border-gray-200 bg-white p-4 overflow-y-auto"),i(Y,"class","flex-1 flex"),i(e,"class","flex flex-col h-full")},m(h,V){J(h,e,V),a(e,s),a(s,t),a(t,l),a(l,n),a(n,r),a(r,c),a(n,E),a(n,N),a(N,T),a(t,b),a(t,k),a(k,P),x(fe,P,null),a(k,de),a(k,M),x(Q,M,null),a(k,L),a(k,R),x(Ee,R,null),a(e,Me),a(e,Y),a(Y,le),ue&&ue.m(le,null),a(le,Ne),a(le,ne),a(ne,q),wt(q,o[0]),a(ne,me),$e&&$e.m(ne,null),a(le,Tt),a(le,Z),a(Z,Te),a(Te,Ie),a(Ie,ht),a(Ie,He),a(Z,Oe),a(Z,pe),Gt[se].m(pe,null),a(le,gt),ae&&ae.m(le,null),a(Y,F),a(Y,H),a(H,W),a(W,tt),a(W,Se),a(W,ee),a(ee,_t);for(let we=0;we<ge.length;we+=1)ge[we]&&ge[we].m(_t,null);a(ee,nt),x(De,ee,null),a(W,Bt),ye&&ye.m(W,null),a(H,Ce),a(H,Ve),a(Ve,xe),a(Ve,Lt),a(Ve,ve);for(let we=0;we<_e.length;we+=1)_e[we]&&_e[we].m(ve,null);a(ve,We),a(ve,qe),a(H,St),a(H,he),a(he,Be),a(Be,ce),a(ce,be),a(ce,Mt),a(ce,st),a(st,Ge),a(st,Ft),a(Be,ot),a(Be,oe),wt(oe,o[7]),a(Be,Ht),a(Be,re),a(he,Xt),a(he,vt),a(vt,ke),a(ke,bt),a(ke,rt),a(ke,kt),a(kt,y),a(kt,z),a(vt,Ue),a(vt,te),wt(te,o[8]),a(he,Qt),a(he,at),a(at,je),a(je,Re),a(je,Vt),a(je,$t),a($t,qt),a($t,Yt),a(at,Zt),a(at,G),wt(G,o[9]),a(he,el),a(he,yt),a(yt,it),a(it,ze),a(it,tl),a(it,Dt),a(Dt,At),a(yt,ll),a(yt,Ae),wt(Ae,o[10]),Xe=!0,Al||(Ll=[U(r,"click",o[27]),U(N,"click",o[28]),U(q,"input",o[29]),U(pe,"click",o[18]),U(ee,"click",o[31]),U(oe,"change",o[34]),U(oe,"input",o[34]),U(te,"change",o[35]),U(te,"input",o[35]),U(G,"change",o[36]),U(G,"input",o[36]),U(Ae,"change",o[37]),U(Ae,"input",o[37]),U(e,"click",o[25])],Al=!0)},p(h,V){(!Xe||V[0]&8&&g!==(g="px-3 py-1 text-sm font-medium rounded transition-colors "+(h[3]==="api"?"bg-white shadow-sm":"text-gray-600")))&&i(r,"class",g),(!Xe||V[0]&8&&_!==(_="px-3 py-1 text-sm font-medium rounded transition-colors "+(h[3]==="local"?"bg-white shadow-sm":"text-gray-600")))&&i(N,"class",_),h[3]==="local"?ue?V[0]&8&&$(ue,1):(ue=an(),ue.c(),$(ue,1),ue.m(le,Ne)):ue&&(ml(),w(ue,1,1,()=>{ue=null}),dl()),V[0]&1&&wt(q,h[0]),h[0]?$e?$e.p(h,V):($e=cn(h),$e.c(),$e.m(ne,null)):$e&&($e.d(1),$e=null),(!Xe||V[0]&1)&&Fe!==(Fe=h[0].length+"")&&ct(ht,Fe);let we=se;if(se=Fl(h),se!==we&&(ml(),w(Gt[we],1,1,()=>{Gt[we]=null}),dl(),ie=Gt[se],ie||(ie=Gt[se]=Ml[se](h),ie.c()),$(ie,1),ie.m(pe,null)),(!Xe||V[0]&33&&C!==(C=h[5]||!h[0].trim()))&&(pe.disabled=C),h[6]?ae?(ae.p(h,V),V[0]&64&&$(ae,1)):(ae=un(h),ae.c(),$(ae,1),ae.m(le,null)):ae&&(ml(),w(ae,1,1,()=>{ae=null}),dl()),V[0]&65540){nl=Ot(h[16]);let A;for(A=0;A<nl.length;A+=1){const Ct=rn(h,nl,A);ge[A]?ge[A].p(Ct,V):(ge[A]=mn(Ct),ge[A].c(),ge[A].m(_t,null))}for(;A<ge.length;A+=1)ge[A].d(1);ge.length=nl.length}if(h[4]?ye?ye.p(h,V):(ye=hn(h),ye.c(),ye.m(W,null)):ye&&(ye.d(1),ye=null),V[0]&131074){sl=Ot(h[17]);let A;for(A=0;A<sl.length;A+=1){const Ct=sn(h,sl,A);_e[A]?_e[A].p(Ct,V):(_e[A]=_n(Ct),_e[A].c(),_e[A].m(ve,We))}for(;A<_e.length;A+=1)_e[A].d(1);_e.length=sl.length}(!Xe||V[0]&128)&&Pe!==(Pe=h[7].toFixed(1)+"")&&ct(Ge,Pe),V[0]&128&&wt(oe,h[7]),(!Xe||V[0]&256)&&K!==(K=(h[8]*100).toFixed(0)+"")&&ct(y,K),V[0]&256&&wt(te,h[8]),(!Xe||V[0]&512)&&Ke!==(Ke=(h[9]*100).toFixed(0)+"")&&ct(qt,Ke),V[0]&512&&wt(G,h[9]),(!Xe||V[0]&1024)&&Je!==(Je=h[10]===0?"None":"Exaggerated")&&ct(At,Je),V[0]&1024&&wt(Ae,h[10])},i(h){Xe||($(fe.$$.fragment,h),$(Q.$$.fragment,h),$(Ee.$$.fragment,h),$(ue),$(ie),$(ae),$(De.$$.fragment,h),Xe=!0)},o(h){w(fe.$$.fragment,h),w(Q.$$.fragment,h),w(Ee.$$.fragment,h),w(ue),w(ie),w(ae),w(De.$$.fragment,h),Xe=!1},d(h){h&&u(e),O(fe),O(Q),O(Ee),ue&&ue.d(),$e&&$e.d(),Gt[se].d(),ae&&ae.d(),Dl(ge,h),O(De),ye&&ye.d(),Dl(_e,h),Al=!1,Bl(Ll)}}}function gs(){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 zt(o){const e=Math.floor(o/60),s=Math.floor(o%60);return`${e}:${s.toString().padStart(2,"0")}`}function pn(){console.log("Share audio")}function _s(o,e,s){let t="In a world where knowledge flowed freely like rivers connecting distant lands, a community of passionate researchers and developers worked together to build something extraordinary. They believed that artificial intelligence should belong to everyone, not locked away in corporate towers. Day by day, they shared their discoveries, their code, and their dreams with people across the globe. Their open source models could understand language, generate images, and even speak with human-like voices. This collaborative spirit sparked innovation in ways that no single company could achieve alone, proving that when brilliant minds unite around a common cause, they can democratize the future of technology.",l="Novia",n="Chatterbox",r="api",c=!1,g=!1,E=null,N=1,T=.5,_=.75,b=0,k=!1,P=0,fe=0,de="",M=null;const Q=[{id:"chatterbox",name:"Chatterbox",badge:"recommended"},{id:"kokoro",name:"Kokoro",badge:"faster but lower quality"}],L=[{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 R(){if(t.trim()){s(5,g=!0),s(6,E=null),s(12,P=0),s(11,k=!1),s(14,de=t.length>30?t.substring(0,30)+"...":t);try{const C=gs();console.log("Access token for API call:",C?"Found ("+C.substring(0,10)+"...)":"None");const gt={text:t,voice_id:l.toLowerCase(),model_id:n.toLowerCase(),mode:r,access_token:C,parameters:{speed:N,stability:T,similarity:_,style_exaggeration:b}};console.log("Sending request to /api/tts/generate:",gt);const F=await fetch("/api/tts/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gt)});if(console.log("API response status:",F.status),!F.ok){const W=await F.text();throw console.error("API error response:",W),new Error(`HTTP error! status: ${F.status}, body: ${W}`)}const H=await F.json();if(console.log("API response result:",H),H.success&&H.audio_url)s(6,E=H.audio_url);else{const W=H.error||"Unknown error occurred";alert(`❌ ${W}`),s(6,E=null)}}catch(C){console.error("Error generating speech:",C),alert("❌ Network error: Failed to connect to the server"),s(6,E=null)}finally{s(5,g=!1)}}}function Ee(){M&&(k?M.pause():M.play())}function Me(){M&&(s(13,fe=M.duration),M.play())}function Y(){M&&s(12,P=M.currentTime)}function le(){s(11,k=!0)}function Ne(){s(11,k=!1)}function ne(){if(E){const C=document.createElement("a");C.href=E,C.download="speech.wav",C.click()}}function q(C){C.target.closest(".model-dropdown")||s(4,c=!1)}function me(){s(0,t=""),s(6,E=null)}const Tt=()=>s(3,r="api"),Z=()=>s(3,r="local");function Te(){t=this.value,s(0,t)}function Ie(C){$n[C?"unshift":"push"](()=>{M=C,s(15,M)})}const Fe=()=>s(4,c=!c),ht=C=>{s(2,n=C.name),s(4,c=!1)},He=C=>s(1,l=C.name);function Oe(){N=Sl(this.value),s(7,N)}function pe(){T=Sl(this.value),s(8,T)}function se(){_=Sl(this.value),s(9,_)}function ie(){b=Sl(this.value),s(10,b)}return[t,l,n,r,c,g,E,N,T,_,b,k,P,fe,de,M,Q,L,R,Ee,Me,Y,le,Ne,ne,q,me,Tt,Z,Te,Ie,Fe,ht,He,Oe,pe,se,ie]}class bs extends Ye{constructor(e){super(),Ze(this,e,_s,hs,Le,{},null,[-1,-1])}}export{bs as component};
hfstudio/static/_app/immutable/nodes/3.RGK6VdE2.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/y8VvPua7.js";import{p as B}from"../chunks/DC4WdVUD.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};