@jeffusion/bungee-core 2.2.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/worker.js +87 -32
  2. package/package.json +3 -3
package/dist/worker.js CHANGED
@@ -16159,10 +16159,13 @@ class PluginRegistry {
16159
16159
  if (existingFactory) {
16160
16160
  return transformerName;
16161
16161
  }
16162
+ const baseDir = import.meta.dir;
16162
16163
  const possiblePaths = [
16163
- path5.join(__dirname, "plugins", "transformers", `${transformerName}.plugin.ts`),
16164
+ path5.join("/usr/app/data/plugins/transformers", `${transformerName}.plugin.ts`),
16165
+ path5.join(baseDir, "plugins", "transformers", `${transformerName}.plugin.js`),
16166
+ path5.join(baseDir, "plugins", "transformers", `${transformerName}.plugin.ts`),
16164
16167
  path5.join(this.configBasePath, "packages/core/src/plugins/transformers", `${transformerName}.plugin.ts`),
16165
- path5.resolve(__dirname, "../plugins/transformers", `${transformerName}.plugin.ts`)
16168
+ path5.resolve(baseDir, "../plugins/transformers", `${transformerName}.plugin.ts`)
16166
16169
  ];
16167
16170
  for (const pluginPath of possiblePaths) {
16168
16171
  try {
@@ -16251,7 +16254,6 @@ class PluginRegistry {
16251
16254
  }
16252
16255
  }
16253
16256
  }
16254
- var __dirname = "/home/runner/work/bungee/bungee/packages/core/src";
16255
16257
  var init_plugin_registry = __esm(() => {
16256
16258
  init_logger();
16257
16259
  init_plugin_pool();
@@ -20246,6 +20248,53 @@ async function applyBodyRules(body, rules, context, requestLog) {
20246
20248
  logger.debug({ request: requestLog, phase: "after", body: modifiedBody }, "Body after applying rules");
20247
20249
  return modifiedBody;
20248
20250
  }
20251
+ function applyQueryRules(searchParams, rules, context, requestLog) {
20252
+ const modified = new URLSearchParams(searchParams);
20253
+ if (rules) {
20254
+ if (rules.add) {
20255
+ forEach_default(rules.add, (value, key) => {
20256
+ const processed = processDynamicValue(value, context);
20257
+ if (processed !== undefined) {
20258
+ modified.set(key, String(processed));
20259
+ logger.debug({ request: requestLog, query: { key, value: processed } }, "Applied query 'add' rule");
20260
+ }
20261
+ });
20262
+ }
20263
+ if (rules.replace) {
20264
+ forEach_default(rules.replace, (value, key) => {
20265
+ if (modified.has(key) || rules.add && key in rules.add) {
20266
+ const processed = processDynamicValue(value, context);
20267
+ if (processed !== undefined) {
20268
+ modified.set(key, String(processed));
20269
+ logger.debug({ request: requestLog, query: { key, value: processed } }, "Applied query 'replace' rule");
20270
+ }
20271
+ }
20272
+ });
20273
+ }
20274
+ if (rules.default) {
20275
+ forEach_default(rules.default, (value, key) => {
20276
+ if (!modified.has(key)) {
20277
+ const processed = processDynamicValue(value, context);
20278
+ if (processed !== undefined) {
20279
+ modified.set(key, String(processed));
20280
+ logger.debug({ request: requestLog, query: { key, value: processed } }, "Applied query 'default' rule");
20281
+ }
20282
+ }
20283
+ });
20284
+ }
20285
+ if (rules.remove) {
20286
+ for (const key of rules.remove) {
20287
+ const wasAdded = rules.add && key in rules.add;
20288
+ const wasReplaced = rules.replace && key in rules.replace;
20289
+ if (!wasAdded && !wasReplaced) {
20290
+ modified.delete(key);
20291
+ logger.debug({ request: requestLog, query: { key } }, "Removed query parameter");
20292
+ }
20293
+ }
20294
+ }
20295
+ }
20296
+ return modified;
20297
+ }
20249
20298
  var init_modifier = __esm(() => {
20250
20299
  init_lodash();
20251
20300
  init_logger();
@@ -20943,6 +20992,11 @@ async function proxyRequest(requestSnapshot, route, upstream, requestLog, config
20943
20992
  });
20944
20993
  }
20945
20994
  }
20995
+ if (finalRequestRules.query) {
20996
+ logger.debug({ request: requestLog }, "Applying query parameter rules");
20997
+ const modifiedSearchParams = applyQueryRules(new URLSearchParams(targetUrl.search), finalRequestRules.query, finalContext, requestLog);
20998
+ targetUrl.search = modifiedSearchParams.toString();
20999
+ }
20946
21000
  let body = null;
20947
21001
  if (requestSnapshot.body) {
20948
21002
  if (requestSnapshot.isJsonBody) {
@@ -21032,6 +21086,7 @@ async function proxyRequest(requestSnapshot, route, upstream, requestLog, config
21032
21086
  }, `Request with ${isRecoveryAttempt ? "recovery" : "normal"} timeout`);
21033
21087
  let proxyRes;
21034
21088
  try {
21089
+ console.log("????", targetUrl.href, fetchOptions);
21035
21090
  proxyRes = await fetch(targetUrl.href, fetchOptions);
21036
21091
  clearTimeout(timeoutId);
21037
21092
  } catch (error) {
@@ -21180,8 +21235,11 @@ var init_assets = __esm(() => {
21180
21235
  <meta charset="UTF-8" />
21181
21236
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
21182
21237
  <title>Bungee Dashboard</title>
21183
- <script type="module" crossorigin src="/__ui/assets/index-DdThT9d-.js"></script>
21184
- <link rel="stylesheet" crossorigin href="/__ui/assets/index-Chy1BWYs.css">
21238
+ <script type="module" crossorigin src="/__ui/assets/index-BFVayO0q.js"></script>
21239
+ <link rel="modulepreload" crossorigin href="/__ui/assets/vendor-charts-Bo4qyjB7.js">
21240
+ <link rel="modulepreload" crossorigin href="/__ui/assets/vendor-C5kRSwys.js">
21241
+ <link rel="modulepreload" crossorigin href="/__ui/assets/vendor-lodash-CRdCilnf.js">
21242
+ <link rel="stylesheet" crossorigin href="/__ui/assets/index-D-TPeiTP.css">
21185
21243
  </head>
21186
21244
  <body>
21187
21245
  <div id="app"></div>
@@ -21189,41 +21247,37 @@ var init_assets = __esm(() => {
21189
21247
  </html>
21190
21248
  `,
21191
21249
  assets: {
21192
- "en-Woa_MXgq.js": 'const e={error:"Error",loading:"Loading...",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",confirm:"Confirm",reset:"Reset",search:"Search",filter:"Filter",export:"Export",import:"Import",close:"Close"},t={dashboard:"Dashboard",routes:"Routes",logs:"Request Logs",configuration:"Configuration"},r={title:"Dashboard",dataRange:"Data Time Range",totalRequests:"Total Requests",requestsPerSec:"Requests/sec",requestsPerSecond:"Requests/sec",successRate:"Success Rate",avgResponseTime:"Avg Response Time",upstreamAnalysis:"Upstream Analysis",upstreamDistribution:"Upstream Request Distribution",upstreamFailures:"Upstream Failure Statistics",upstreamStatusCodes:"Upstream Status Code Distribution",noUpstreamData:"No upstream data available for the selected time range",noData:"No data available"},a={title:"Monitoring Charts",range:{"1h":"1 Hour","12h":"12 Hours","24h":"24 Hours",oneHour:"1 Hour",twelveHours:"12 Hours",twentyFourHours:"24 Hours"},charts:{requestsTrend:"Requests Trend",periodRequests:"Period Requests",requests:"Requests",responseTimeTrend:"Response Time Trend",avgResponseTime:"Avg Response Time (ms)",milliseconds:"Milliseconds (ms)",successRateTrend:"Success Rate Trend",successRate:"Success Rate (%)",percentage:"Percentage (%)",errorsTrend:"Errors Trend",periodErrors:"Period Errors",errors:"Errors"},noData:"No historical data available"},o={title:"Routes",subtitle:"Manage your reverse proxy routes and upstreams",addRoute:"Add Route",newRoute:"+ New Route",createFirstRoute:"Create First Route",editRoute:"Edit Route",deleteRoute:"Delete Route",export:"Export",import:"Import",path:"Path",upstreams:"Upstreams",actions:"Actions",searchPlaceholder:"Search routes or upstreams...",allTransformers:"All Transformers",noRoutes:"No routes configured",noRoutesMessage:"Create your first route to start proxying requests",noMatchingRoutes:"No matching routes",noMatchingMessage:"Try adjusting your search or filter criteria",showingRoutes:"Showing {count} of {total} route(s)",confirmDelete:"Confirm Delete Route",confirmDeleteMessage:\'Are you sure you want to delete route "{path}"? This action cannot be undone.\',deleted:\'Route "{path}" has been deleted\',deleteFailed:"Delete failed: {error}",duplicated:\'Route "{path}" has been duplicated\',duplicateFailed:"Duplicate failed: {error}",noRoutesToExport:"No routes to export",exported:"Routes exported",importMustBeArray:"Import file must be an array of routes",importSuccess:"Successfully imported {success} route(s)",importPartialSuccess:"Successfully imported {success} route(s), failed {failed}",importFailed:"Import failed: {error}"},s={title:"Configuration",subtitle:"Edit and manage system configuration",export:"Export",import:"Import",reload:"Reload",restart:"Restart Service",formEditor:"Form Editor",jsonEditor:"JSON Editor",systemSettings:"System Settings",serverPort:"Server Port",workerProcesses:"Worker Processes",workerProcessesHelp:"Number of worker processes to spawn",logLevel:"Log Level",bodyParserLimit:"Body Parser Limit",bodyParserLimitHelp:\'Maximum request body size (e.g., "50mb", "100kb")\',requiresRestart:"Note: Changes to Port, Workers, Log Level, and Body Parser Limit require a service restart to take effect.",routesConfigured:"{count} routes configured.",manageRoutes:"Use the Routes page to manage routes.",jsonConfiguration:"JSON Configuration",jsonParseError:"JSON Parse Error: {error}",jsonPlaceholder:"Enter JSON configuration...",jsonHelp:"Edit the raw JSON configuration. Changes will be validated before saving.",unsavedChanges:"You have unsaved changes",reset:"Reset",save:"Save Configuration",confirmRestart:"Confirm Service Restart",restartMessage:"Are you sure you want to restart the service? This will cause a brief interruption (typically 2-3 seconds) as the service gracefully restarts.",restartWarning:"Active connections may be temporarily interrupted.",validationFailed:"Configuration validation failed: {error}",saved:"Configuration saved",saveFailed:"Save failed: {error}",exported:"Configuration exported",imported:"Configuration imported",importFailed:"Import failed: {error}",reloaded:"Configuration successfully reloaded",reloadFailed:"Reload failed: {error}",restartSent:"Restart signal sent, service will restart in a few seconds",restartDaemonOnly:\'Restart feature is only available in daemon mode. Please use "bungee restart" command or manually restart the development server.\',restartFailed:"Restart failed: {error}"},i={title:"404",message:"Page Not Found",goHome:"Go Home"},n={newRoute:"New Route",editRoute:"Edit Route",backToList:"Back to List",routePath:"Route Path",pathPlaceholder:"e.g.: /api/*",pathHelp:"Supports wildcards (*) and parameters (:param)",pathRewrite:"Path Rewrite",pathRewriteHelp:"Regex patterns to modify request paths",addPathRewriteRule:"Add Path Rewrite Rule",patternPlaceholder:"^/api",replacementPlaceholder:"/v1",upstreams:"Upstreams",addUpstream:"Add Upstream",transformer:"Route Transformer",transformerHelp:"Transformer applied to the entire route (optional)",optional:"Optional",failoverTitle:"Failover",failoverHelp:"Configure automatic failover and health check mechanisms",enableFailover:"Enable automatic failover",retryableStatusCodes:"Retryable Status Codes",retryableStatusCodesPlaceholder:"Default: 500, 502, 503, 504 (Server Errors)",retryableStatusCodesHelp:"Automatically retry other upstreams when these status codes occur",passiveHealthCheck:"Passive Health Check",passiveHealthCheckTooltip:"Monitors actual request success/failure to determine upstream health, no extra probe requests",consecutiveFailuresThreshold:"Consecutive Failures Threshold",consecutiveFailuresThresholdHelp:"Mark as unhealthy after this many consecutive failures (default: 3)",healthyThreshold:"Healthy Threshold",healthyThresholdHelp:"Recover to healthy after this many consecutive successes (default: 2)",requestTimeoutMs:"Request Timeout (ms)",requestTimeoutMsHelp:"Timeout for normal requests (default: 30000ms)",connectTimeoutMs:"Connect Timeout (ms)",connectTimeoutMsHelp:"Timeout for establishing connection (default: 5000ms)",activeHealthCheck:"Active Health Check",activeHealthCheckTooltip:"Periodically sends probe requests to actively detect upstream health, independent of business traffic",enableActiveHealthCheck:"Enable active health check",healthCheckIntervalMs:"Check Interval (ms)",healthCheckIntervalMsHelp:"How often to perform health checks (default: 10000ms)",healthCheckTimeoutMs:"Check Timeout (ms)",healthCheckTimeoutMsHelp:"Timeout for health check requests (default: 3000ms)",healthCheckPath:"Check Path",healthCheckPathHelp:"HTTP path for health checks (default: /health)",healthCheckMethod:"HTTP Method",healthCheckExpectedStatus:"Expected Status Codes",healthCheckExpectedStatusHelp:"Expected status codes for health checks (default: 200)",healthCheckUnhealthyThreshold:"Unhealthy Threshold",healthCheckUnhealthyThresholdHelp:"Mark as unhealthy after this many consecutive failures (default: 3)",healthCheckHealthyThreshold:"Healthy Threshold",healthCheckHealthyThresholdHelp:"Recover to healthy after this many consecutive successes (default: 2)",slowStart:"Slow Start",slowStartTooltip:"Gradually increases traffic to recovered upstreams to prevent immediate overload and re-failure",enableSlowStart:"Enable slow start mechanism",slowStartDurationMs:"Slow Start Duration (ms)",slowStartDurationMsHelp:"Duration to gradually increase weight after recovery (default: 30000ms)",slowStartInitialWeightFactor:"Initial Weight Factor",slowStartInitialWeightFactorHelp:"Initial weight ratio after recovery, 0.1 means 10% (default: 0.1)",failoverInfoNotice:"Failover automatically detects upstream health status and switches to backup upstreams on failure to ensure service availability.",recoveryIntervalMs:"Recovery Interval (ms)",recoveryIntervalPlaceholder:"5000",recoveryIntervalHelp:"Wait time before attempting to recover a failed upstream",recoveryTimeoutMs:"Recovery Timeout (ms)",recoveryTimeoutPlaceholder:"3000",recoveryTimeoutHelp:"Timeout for recovery attempts to avoid long pending requests",saveRoute:"Save Route",cancel:"Cancel",saving:"Saving...",loadingTemplates:"Loading templates...",useTemplate:"Use Template",routeSaved:"Route saved",routeUpdated:"Route updated",saveFailed:"Save failed: {error}",pathRequired:"Route path cannot be empty",upstreamRequired:"At least one upstream is required"},l={upstreams:"{count} upstream(s)",hasTransformer:"With transformer",failover:"Failover",edit:"Edit",duplicate:"Duplicate",delete:"Delete",duplicating:"Duplicating...",deleting:"Deleting..."},u={title:"Upstream #{index}",targetUrl:"Target URL",targetPlaceholder:"https://api.example.com",targetHelp:"Full URL of the upstream server",weight:"Weight",weightHelp:"Load balancing weight (1-100)",transformer:"Upstream Transformer",transformerHelp:"Transformer applied only to this upstream (optional)",remove:"Remove Upstream",targetRequired:"Target URL cannot be empty",invalidUrl:"Invalid URL format"},d={selectPlugin:"Select Plugin",none:"No Plugin",description:"Plugin Description",testPlugin:"Test Plugin",testing:"Testing...",input:"Input (Original Format)",output:"Output (Transformed Format)",inputPlaceholder:"Enter test data...",testSuccess:"Transform successful",testFailed:"Transform failed: {error}"},c={title:"Request Headers",addHeader:"Add Header",name:"Name",namePlaceholder:"Content-Type",value:"Value",valuePlaceholder:"application/json",remove:"Remove",empty:"No headers",default:"Default Headers"},p={title:"Request Body",bodyType:"Body Type",json:"JSON",text:"Plain Text",form:"Form Data",none:"No Body",placeholder:"Enter request body content...",jsonInvalid:"Invalid JSON format",replace:"Replace",default:"Default"},h={title:"Conditional Expression",placeholder:"request.headers[\'User-Agent\'].includes(\'Mobile\')",help:"Use JavaScript expressions that return true or false",examples:"Examples",example1:"Check request headers",example2:"Check query parameters",example3:"Check request method",test:"Test Expression",testResult:"Test Result",resultTrue:"Condition is true",resultFalse:"Condition is false",resultError:"Expression error: {error}"},m={title:"Route Templates",subtitle:"Quickly create common route configurations",useTemplate:"Use This Template",categories:{api:"API Proxy",static:"Static Resources",websocket:"WebSocket",auth:"Auth Proxy"},restApi:{name:"REST API Proxy",description:"Standard RESTful API proxy configuration"},graphql:{name:"GraphQL API",description:"GraphQL endpoint proxy"},static:{name:"Static File Server",description:"Proxy static resource files"},websocket:{name:"WebSocket Proxy",description:"Real-time communication WebSocket proxy"},loadBalancing:{name:"Load Balancing",description:"Multi-upstream load balancing configuration"}},g={title:"Confirm Action",confirm:"Confirm",cancel:"Cancel"},f={targetRequired:"Target URL cannot be empty",targetProtocol:"Target URL must use http or https protocol",invalidUrl:"Invalid URL format",weightPositive:"Weight must be positive",priorityNonNegative:"Priority must be non-negative",totalWeightPositive:"Total weight must be greater than 0",unknownTransformer:"Unknown transformer: {transformer}. Available options: {options}",pathRequired:"Path cannot be empty",pathStartSlash:"Path must start with /",upstreamRequired:"At least one upstream is required",invalidRegex:"Invalid regular expression: {pattern}",invalidStatusCode:"Invalid status code: {code}",recoveryIntervalPositive:"Recovery interval must be greater than 0",recoveryTimeoutPositive:"Recovery timeout must be greater than 0",expressionEmpty:"Expression cannot be empty",mismatchedBraces:"Mismatched {{ }} braces",mismatchedParentheses:"Mismatched parentheses",mismatchedQuotes:"Mismatched quotes"},y={globalAuth:"Global Authentication",routeAuth:"Route Authentication",helpText:"Protect your API endpoints",enableAuth:"Enable Authentication",enabled:"Enabled",disabled:"Disabled",tokens:"Token List",tokenPlaceholder:"Enter token or use {{ env.TOKEN_NAME }}",addToken:"Add Token",expressionSupport:"Expression syntax is supported for referencing environment variables:",securityNotice:"When authentication is enabled, the Authorization header is automatically removed and will not be forwarded to upstream servers (security measure).",routeAuthHelp:"Route-level authentication will override global authentication configuration. If not configured, the global authentication settings will be used."},v={title:"Request Logs",filters:"Filters",searchTerm:"Search",searchPlaceholder:"Search path or error message...",method:"HTTP Method",allMethods:"All Methods",status:"Status Code",statusPlaceholder:"e.g., 200, 404, 500",result:"Result",allResults:"All",success:"Success",failed:"Failed",timeRange:"Time Range",allTime:"All Time",recentTime:"Recent Time",customTime:"Custom Range",recentHours:"Recent Hours",startTime:"Start Time",endTime:"End Time",sortBy:"Sort By",sortByTimestamp:"Timestamp",sortByDuration:"Duration",sortByStatus:"Status Code",sortOrder:"Order",asc:"Ascending",desc:"Descending",time:"Time",path:"Path",duration:"Duration",requestType:"Type",requestTypeFilter:"Request Type",requestType_all:"All Types",requestType_final:"Final",requestType_retry:"Retry",requestType_recovery:"Recovery",requestType_final_desc:"Request returned to client",requestType_retry_desc:"Retry attempt",requestType_recovery_desc:"Failover recovery test",upstream:"Upstream",actions:"Actions",viewDetail:"Details",export:"Export",startStream:"Start Stream",stopStream:"Stop Stream",showing:"Showing {start}-{end} of {total}",page:"Page {page} of {totalPages}",noData:"No log data available",advancedFilters:"Advanced Filters",activeFilters:"active filter(s)",clearFilters:"Clear All",detail:{title:"Request Log Details",requestId:"Request ID",timestamp:"Timestamp",method:"Method",status:"Status",duration:"Duration",success:"Success",requestInfo:"Request Information",path:"Path",originalPath:"Original Path",transformedPath:"Transformed Path",query:"Query String",routePath:"Matched Route",upstreamInfo:"Upstream Information",upstream:"Upstream",transformer:"Transformer",authInfo:"Authentication Information",authLevel:"Auth Level",authResult:"Result",authSuccess:"Authenticated",authFailed:"Failed",processingSteps:"Processing Steps",errorInfo:"Error Information",requestBody:"Request Body",responseBody:"Response Body",loadRequestBody:"Load Request Body",loadResponseBody:"Load Response Body",bodyNotRecorded:"Body not recorded for this request",bodyNotRecordedReason:"May have exceeded size limit or was empty",originalRequest:"Original Request (Before Transform)",finalRequest:"Final Request (To Upstream)",responseData:"Response Data (From Upstream)",originalHeaders:"Original Headers",finalHeaders:"Final Headers",requestHeaders:"Request Headers",responseHeaders:"Response Headers",bodyPreview:"Body Preview",bodyTooLarge:"Body too large ({size})",clickToExpand:"Click to expand",headers:"headers",noHeaders:"No headers available",noBody:"No body data",overview:"Overview",routeAndUpstream:"Route & Upstream",processingTimeline:"Processing Timeline",totalSteps:"{count} steps",totalDuration:"took {duration}",showTimeline:"Show Timeline",hideTimeline:"Hide Timeline",copyToClipboard:"Copy",downloadJson:"Download JSON",copied:"Copied!",tabOriginalRequest:"Original",tabFinalRequest:"Transformed",tabResponse:"Response",requestData:"Request Data",noDataAvailable:"No data available",step:"Step"},steps:{route_matched:"Route Matched",request_snapshot_created:"Request Snapshot Created",auth_failed:"Authentication Failed",auth_success:"Authentication Success",upstream_selected:"Upstream Selected",trying_upstream:"Trying Upstream",circuit_breaker_closed:"Circuit Breaker Closed",circuit_breaker_opened:"Circuit Breaker Opened",circuit_breaker_reopened:"Circuit Breaker Reopened",upstream_recovered:"Upstream Recovered",upstream_retry:"Upstream Retry",upstream_failed:"Upstream Failed",plugin_request_init:"Plugin Request Init",plugin_before_request:"Plugin Before Request",plugin_intercepted:"Plugin Intercepted Request",plugin_response:"Plugin Response",plugin_error:"Plugin Error"}},R={title:"Logging Configuration",bodyRecording:"Enable Request/Response Body Recording",bodyRecordingHelp:"Record request and response bodies for troubleshooting and analysis",maxSize:"Maximum Body Size",maxSizeHelp:"Bodies larger than this will be skipped (1-100 KB)",retentionDays:"Body Retention Days",retentionDaysHelp:"Bodies will be automatically deleted after this many days",days:"days",hours:"hours",cleanupConfig:"Cleanup Configuration",cleanupStatus:"Status",active:"Active",inactive:"Inactive",cleanupRetention:"Retention",cleanupInterval:"Cleanup Interval",manualCleanup:"Manual Cleanup",confirmCleanup:"Are you sure you want to manually trigger log cleanup? This will delete all logs and bodies older than the configured retention period.",cleanupSuccess:"Cleanup completed successfully",cleanupFailed:"Cleanup failed: {error}",lastCleanup:"Last Cleanup Results",deletedSqliteRecords:"Deleted SQLite records",deletedFileLogFiles:"Deleted log files",deletedBodyFiles:"Deleted body files",dirs:"directories",files:"files",duration:"Duration"},T={title:"Login",subtitle:"Enter your access token to continue",token:"Access Token",tokenPlaceholder:"Enter your access token...",submit:"Login",loggingIn:"Logging in...",success:"Login successful",failed:"Login failed: {error}",required:"Access token is required",unauthorized:"Invalid access token",logout:"Logout",logoutConfirm:"Are you sure you want to logout?"},b={common:e,nav:t,dashboard:r,monitoring:a,routes:o,configuration:s,notFound:i,routeEditor:n,routeCard:l,upstream:u,plugin:d,headers:c,body:p,expression:h,templates:m,confirmDialog:g,validation:f,auth:y,logs:v,logging:R,login:T};export{y as auth,p as body,e as common,s as configuration,g as confirmDialog,r as dashboard,b as default,h as expression,c as headers,R as logging,T as login,v as logs,a as monitoring,t as nav,i as notFound,d as plugin,l as routeCard,n as routeEditor,o as routes,m as templates,u as upstream,f as validation};\n',
21193
- "index-DdThT9d-.js": `var Qp=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Q5=Qp((Xs,Ys)=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function Ae(){}function Ss(t,e){for(const n in e)t[n]=e[n];return t}function td(t){return t()}function Ta(){return Object.create(null)}function ht(t){t.forEach(td)}function ui(t){return typeof t=="function"}function Nt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function $p(t){return Object.keys(t).length===0}function Br(t,...e){if(t==null){for(const s of e)s(void 0);return Ae}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function ps(t){let e;return Br(t,n=>e=n)(),e}function Zt(t,e,n){t.$$.on_destroy.push(Br(e,n))}function ci(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function r(t,e){t.appendChild(e)}function I(t,e,n){t.insertBefore(e,n||null)}function H(t){t.parentNode&&t.parentNode.removeChild(t)}function Tn(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function d(t){return document.createElement(t)}function pe(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function E(t){return document.createTextNode(t)}function v(){return E(" ")}function Zn(){return E("")}function ee(t,e,n,s){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}function eg(t){return function(e){return e.preventDefault(),t.call(this,e)}}function c(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const tg=["width","height"];function ng(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const s in e)e[s]==null?t.removeAttribute(s):s==="style"?t.style.cssText=e[s]:s==="__value"?t.value=t[s]=e[s]:n[s]&&n[s].set&&tg.indexOf(s)===-1?t[s]=e[s]:c(t,s,e[s])}function Fr(t){let e;return{p(...n){e=n,e.forEach(s=>t.push(s))},r(){e.forEach(n=>t.splice(t.indexOf(n),1))}}}function yt(t){return t===""?null:+t}function sg(t){return Array.from(t.childNodes)}function T(t,e){e=""+e,t.data!==e&&(t.data=e)}function ne(t,e){t.value=e??""}function Ma(t,e,n,s){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,"")}function Cn(t,e,n){for(let s=0;s<t.options.length;s+=1){const i=t.options[s];if(i.__value===e){i.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function Is(t){const e=t.querySelector(":checked");return e&&e.__value}function ie(t,e,n){t.classList.toggle(e,!!n)}function ig(t,e,{bubbles:n=!1,cancelable:s=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:s})}let zi;function hl(t){zi=t}function Co(){if(!zi)throw new Error("Function called outside component initialization");return zi}function ls(t){Co().$$.on_mount.push(t)}function lg(t){Co().$$.after_update.push(t)}function Ai(t){Co().$$.on_destroy.push(t)}function Dl(){const t=Co();return(e,n,{cancelable:s=!1}={})=>{const i=t.$$.callbacks[e];if(i){const l=ig(e,n,{cancelable:s});return i.slice().forEach(o=>{o.call(t,l)}),!l.defaultPrevented}return!0}}function og(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(s=>s.call(this,e))}const Bi=[],wn=[];let Fi=[];const gr=[],nd=Promise.resolve();let mr=!1;function sd(){mr||(mr=!0,nd.then(ld))}function id(){return sd(),nd}function vs(t){Fi.push(t)}function Xn(t){gr.push(t)}const Vo=new Set;let Di=0;function ld(){if(Di!==0)return;const t=zi;do{try{for(;Di<Bi.length;){const e=Bi[Di];Di++,hl(e),rg(e.$$)}}catch(e){throw Bi.length=0,Di=0,e}for(hl(null),Bi.length=0,Di=0;wn.length;)wn.pop()();for(let e=0;e<Fi.length;e+=1){const n=Fi[e];Vo.has(n)||(Vo.add(n),n())}Fi.length=0}while(Bi.length);for(;gr.length;)gr.pop()();mr=!1,Vo.clear(),hl(t)}function rg(t){if(t.fragment!==null){t.update(),ht(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(vs)}}function ag(t){const e=[],n=[];Fi.forEach(s=>t.indexOf(s)===-1?e.push(s):n.push(s)),n.forEach(s=>s()),Fi=e}const oo=new Set;let ki;function ms(){ki={r:0,c:[],p:ki}}function bs(){ki.r||ht(ki.c),ki=ki.p}function ze(t,e){t&&t.i&&(oo.delete(t),t.i(e))}function Ue(t,e,n,s){if(t&&t.o){if(oo.has(t))return;oo.add(t),ki.c.push(()=>{oo.delete(t),s&&(n&&t.d(1),s())}),t.o(e)}else s&&s()}function tt(t){return t?.length!==void 0?t:Array.from(t)}function ug(t,e){t.d(1),e.delete(t.key)}function od(t,e){Ue(t,1,1,()=>{e.delete(t.key)})}function Nr(t,e,n,s,i,l,o,a,u,f,h,p){let g=t.length,m=l.length,b=g;const _={};for(;b--;)_[t[b].key]=b;const y=[],k=new Map,w=new Map,S=[];for(b=m;b--;){const A=p(i,l,b),O=n(A);let C=o.get(O);C?S.push(()=>C.p(A,e)):(C=f(O,A),C.c()),k.set(O,y[b]=C),O in _&&w.set(O,Math.abs(b-_[O]))}const P=new Set,M=new Set;function x(A){ze(A,1),A.m(a,h),o.set(A.key,A),h=A.first,m--}for(;g&&m;){const A=y[m-1],O=t[g-1],C=A.key,R=O.key;A===O?(h=A.first,g--,m--):k.has(R)?!o.has(C)||P.has(C)?x(A):M.has(R)?g--:w.get(C)>w.get(R)?(M.add(C),x(A)):(P.add(R),g--):(u(O,o),g--)}for(;g--;){const A=t[g];k.has(A.key)||u(A,o)}for(;m;)x(y[m-1]);return ht(S),y}function jr(t,e){const n={},s={},i={$$scope:1};let l=t.length;for(;l--;){const o=t[l],a=e[l];if(a){for(const u in o)u in a||(s[u]=1);for(const u in a)i[u]||(n[u]=a[u],i[u]=1);t[l]=a}else for(const u in o)i[u]=1}for(const o in s)o in n||(n[o]=void 0);return n}function zr(t){return typeof t=="object"&&t!==null?t:{}}function Yn(t,e,n){const s=t.$$.props[e];s!==void 0&&(t.$$.bound[s]=n,n(t.$$.ctx[s]))}function _t(t){t&&t.c()}function pt(t,e,n){const{fragment:s,after_update:i}=t.$$;s&&s.m(e,n),vs(()=>{const l=t.$$.on_mount.map(td).filter(ui);t.$$.on_destroy?t.$$.on_destroy.push(...l):ht(l),t.$$.on_mount=[]}),i.forEach(vs)}function gt(t,e){const n=t.$$;n.fragment!==null&&(ag(n.after_update),ht(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function cg(t,e){t.$$.dirty[0]===-1&&(Bi.push(t),sd(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function qt(t,e,n,s,i,l,o=null,a=[-1]){const u=zi;hl(t);const f=t.$$={fragment:null,ctx:[],props:l,update:Ae,not_equal:i,bound:Ta(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:Ta(),dirty:a,skip_bound:!1,root:e.target||u.$$.root};o&&o(f.root);let h=!1;if(f.ctx=n?n(t,e.props||{},(p,g,...m)=>{const b=m.length?m[0]:g;return f.ctx&&i(f.ctx[p],f.ctx[p]=b)&&(!f.skip_bound&&f.bound[p]&&f.bound[p](b),h&&cg(t,p)),g}):[],f.update(),h=!0,ht(f.before_update),f.fragment=s?s(f.ctx):!1,e.target){if(e.hydrate){const p=sg(e.target);f.fragment&&f.fragment.l(p),p.forEach(H)}else f.fragment&&f.fragment.c();e.intro&&ze(t.$$.fragment),pt(t,e.target,e.anchor),ld()}hl(u)}class Gt{$$=void 0;$$set=void 0;$destroy(){gt(this,1),this.$destroy=Ae}$on(e,n){if(!ui(n))return Ae;const s=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return s.push(n),()=>{const i=s.indexOf(n);i!==-1&&s.splice(i,1)}}$set(e){this.$$set&&!$p(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const fg="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(fg);const Li=[];function rd(t,e){return{subscribe:Ns(t,e).subscribe}}function Ns(t,e=Ae){let n;const s=new Set;function i(a){if(Nt(t,a)&&(t=a,n)){const u=!Li.length;for(const f of s)f[1](),Li.push(f,t);if(u){for(let f=0;f<Li.length;f+=2)Li[f][0](Li[f+1]);Li.length=0}}}function l(a){i(a(t))}function o(a,u=Ae){const f=[a,u];return s.add(f),s.size===1&&(n=e(i,l)||Ae),a(t),()=>{s.delete(f),s.size===0&&n&&(n(),n=null)}}return{set:i,update:l,subscribe:o}}function js(t,e,n){const s=!Array.isArray(t),i=s?[t]:t;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const l=e.length<2;return rd(n,(o,a)=>{let u=!1;const f=[];let h=0,p=Ae;const g=()=>{if(h)return;p();const b=e(s?f[0]:f,o,a);l?o(b):p=ui(b)?b:Ae},m=i.map((b,_)=>Br(b,y=>{f[_]=y,h&=~(1<<_),u&&g()},()=>{h|=1<<_}));return u=!0,g(),function(){ht(m),p(),u=!1}})}function Ca(){const t=window.location.href.indexOf("#/");let e=t>-1?window.location.href.substr(t+1):"/";const n=e.indexOf("?");let s="";return n>-1&&(s=e.substr(n+1),e=e.substr(0,n)),{location:e,querystring:s}}const ad=rd(null,function(e){e(Ca());const n=()=>{e(Ca())};return window.addEventListener("hashchange",n,!1),function(){window.removeEventListener("hashchange",n,!1)}}),hg=js(ad,t=>t.location);js(ad,t=>t.querystring);async function ud(t){if(!t||t.length<1||t.charAt(0)!="/"&&t.indexOf("#/")!==0)throw Error("Invalid parameter location");await id(),history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=(t.charAt(0)=="#"?"":"#")+t}async function Nl(){await id(),window.history.back()}function dg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Wo,Pa;function pg(){if(Pa)return Wo;Pa=1;var t=function(w){return e(w)&&!n(w)};function e(k){return!!k&&typeof k=="object"}function n(k){var w=Object.prototype.toString.call(k);return w==="[object RegExp]"||w==="[object Date]"||l(k)}var s=typeof Symbol=="function"&&Symbol.for,i=s?Symbol.for("react.element"):60103;function l(k){return k.$$typeof===i}function o(k){return Array.isArray(k)?[]:{}}function a(k,w){return w.clone!==!1&&w.isMergeableObject(k)?_(o(k),k,w):k}function u(k,w,S){return k.concat(w).map(function(P){return a(P,S)})}function f(k,w){if(!w.customMerge)return _;var S=w.customMerge(k);return typeof S=="function"?S:_}function h(k){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(k).filter(function(w){return Object.propertyIsEnumerable.call(k,w)}):[]}function p(k){return Object.keys(k).concat(h(k))}function g(k,w){try{return w in k}catch{return!1}}function m(k,w){return g(k,w)&&!(Object.hasOwnProperty.call(k,w)&&Object.propertyIsEnumerable.call(k,w))}function b(k,w,S){var P={};return S.isMergeableObject(k)&&p(k).forEach(function(M){P[M]=a(k[M],S)}),p(w).forEach(function(M){m(k,M)||(g(k,M)&&S.isMergeableObject(w[M])?P[M]=f(M,S)(k[M],w[M],S):P[M]=a(w[M],S))}),P}function _(k,w,S){S=S||{},S.arrayMerge=S.arrayMerge||u,S.isMergeableObject=S.isMergeableObject||t,S.cloneUnlessOtherwiseSpecified=a;var P=Array.isArray(w),M=Array.isArray(k),x=P===M;return x?P?S.arrayMerge(k,w,S):b(k,w,S):a(w,S)}_.all=function(w,S){if(!Array.isArray(w))throw new Error("first argument should be an array");return w.reduce(function(P,M){return _(P,M,S)},{})};var y=_;return Wo=y,Wo}var gg=pg();const mg=dg(gg);var br=function(t,e){return br=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},br(t,e)};function Po(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");br(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Dt=function(){return Dt=Object.assign||function(e){for(var n,s=1,i=arguments.length;s<i;s++){n=arguments[s];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},Dt.apply(this,arguments)};function bg(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(t);i<s.length;i++)e.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(t,s[i])&&(n[s[i]]=t[s[i]]);return n}function qo(t,e,n){if(n||arguments.length===2)for(var s=0,i=e.length,l;s<i;s++)(l||!(s in e))&&(l||(l=Array.prototype.slice.call(e,0,s)),l[s]=e[s]);return t.concat(l||Array.prototype.slice.call(e))}function Go(t,e){var n=e&&e.cache?e.cache:Eg,s=e&&e.serializer?e.serializer:kg,i=e&&e.strategy?e.strategy:yg;return i(t,{cache:n,serializer:s})}function _g(t){return t==null||typeof t=="number"||typeof t=="boolean"}function vg(t,e,n,s){var i=_g(s)?s:n(s),l=e.get(i);return typeof l>"u"&&(l=t.call(this,s),e.set(i,l)),l}function cd(t,e,n){var s=Array.prototype.slice.call(arguments,3),i=n(s),l=e.get(i);return typeof l>"u"&&(l=t.apply(this,s),e.set(i,l)),l}function fd(t,e,n,s,i){return n.bind(e,t,s,i)}function yg(t,e){var n=t.length===1?vg:cd;return fd(t,this,n,e.cache.create(),e.serializer)}function wg(t,e){return fd(t,this,cd,e.cache.create(),e.serializer)}var kg=function(){return JSON.stringify(arguments)},Sg=(function(){function t(){this.cache=Object.create(null)}return t.prototype.get=function(e){return this.cache[e]},t.prototype.set=function(e,n){this.cache[e]=n},t})(),Eg={create:function(){return new Sg}},Xo={variadic:wg},Mt;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Mt||(Mt={}));var hn;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(hn||(hn={}));var Ui;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(Ui||(Ui={}));function Aa(t){return t.type===hn.literal}function Tg(t){return t.type===hn.argument}function hd(t){return t.type===hn.number}function dd(t){return t.type===hn.date}function pd(t){return t.type===hn.time}function gd(t){return t.type===hn.select}function md(t){return t.type===hn.plural}function Mg(t){return t.type===hn.pound}function bd(t){return t.type===hn.tag}function _d(t){return!!(t&&typeof t=="object"&&t.type===Ui.number)}function _r(t){return!!(t&&typeof t=="object"&&t.type===Ui.dateTime)}var vd=/[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/,Cg=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Pg(t){var e={};return t.replace(Cg,function(n){var s=n.length;switch(n[0]){case"G":e.era=s===4?"long":s===5?"narrow":"short";break;case"y":e.year=s===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("\`Y/u/U/r\` (year) patterns are not supported, use \`y\` instead");case"q":case"Q":throw new RangeError("\`q/Q\` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][s-1];break;case"w":case"W":throw new RangeError("\`w/W\` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][s-1];break;case"D":case"F":case"g":throw new RangeError("\`D/F/g\` (day) patterns are not supported, use \`d\` instead");case"E":e.weekday=s===4?"long":s===5?"narrow":"short";break;case"e":if(s<4)throw new RangeError("\`e..eee\` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][s-4];break;case"c":if(s<4)throw new RangeError("\`c..ccc\` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][s-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("\`b/B\` (period) patterns are not supported, use \`a\` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][s-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][s-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][s-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][s-1];break;case"j":case"J":case"C":throw new RangeError("\`j/J/C\` (hour) patterns are not supported, use \`h/H/K/k\` instead");case"m":e.minute=["numeric","2-digit"][s-1];break;case"s":e.second=["numeric","2-digit"][s-1];break;case"S":case"A":throw new RangeError("\`S/A\` (second) patterns are not supported, use \`s\` instead");case"z":e.timeZoneName=s<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("\`Z/O/v/V/X/x\` (timeZone) patterns are not supported, use \`z\` instead")}return""}),e}var Ag=/[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;function xg(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var e=t.split(Ag).filter(function(g){return g.length>0}),n=[],s=0,i=e;s<i.length;s++){var l=i[s],o=l.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var a=o[0],u=o.slice(1),f=0,h=u;f<h.length;f++){var p=h[f];if(p.length===0)throw new Error("Invalid number skeleton")}n.push({stem:a,options:u})}return n}function Og(t){return t.replace(/^(.*?)-/,"")}var xa=/^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g,yd=/^(@+)?(\\+|#+)?[rs]?$/g,Rg=/(\\*)(0+)|(#+)(0+)|(0+)/g,wd=/^(0+)$/;function Oa(t){var e={};return t[t.length-1]==="r"?e.roundingPriority="morePrecision":t[t.length-1]==="s"&&(e.roundingPriority="lessPrecision"),t.replace(yd,function(n,s,i){return typeof i!="string"?(e.minimumSignificantDigits=s.length,e.maximumSignificantDigits=s.length):i==="+"?e.minimumSignificantDigits=s.length:s[0]==="#"?e.maximumSignificantDigits=s.length:(e.minimumSignificantDigits=s.length,e.maximumSignificantDigits=s.length+(typeof i=="string"?i.length:0)),""}),e}function kd(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Dg(t){var e;if(t[0]==="E"&&t[1]==="E"?(e={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(e={notation:"scientific"},t=t.slice(1)),e){var n=t.slice(0,2);if(n==="+!"?(e.signDisplay="always",t=t.slice(2)):n==="+?"&&(e.signDisplay="exceptZero",t=t.slice(2)),!wd.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function Ra(t){var e={},n=kd(t);return n||e}function Lg(t){for(var e={},n=0,s=t;n<s.length;n++){var i=s[n];switch(i.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=i.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=Og(i.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=Dt(Dt(Dt({},e),{notation:"scientific"}),i.options.reduce(function(u,f){return Dt(Dt({},u),Ra(f))},{}));continue;case"engineering":e=Dt(Dt(Dt({},e),{notation:"engineering"}),i.options.reduce(function(u,f){return Dt(Dt({},u),Ra(f))},{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":e.roundingMode="floor";continue;case"rounding-mode-ceiling":e.roundingMode="ceil";continue;case"rounding-mode-down":e.roundingMode="trunc";continue;case"rounding-mode-up":e.roundingMode="expand";continue;case"rounding-mode-half-even":e.roundingMode="halfEven";continue;case"rounding-mode-half-down":e.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":e.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Rg,function(u,f,h,p,g,m){if(f)e.minimumIntegerDigits=h.length;else{if(p&&g)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(wd.test(i.stem)){e.minimumIntegerDigits=i.stem.length;continue}if(xa.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(xa,function(u,f,h,p,g,m){return h==="*"?e.minimumFractionDigits=f.length:p&&p[0]==="#"?e.maximumFractionDigits=p.length:g&&m?(e.minimumFractionDigits=g.length,e.maximumFractionDigits=g.length+m.length):(e.minimumFractionDigits=f.length,e.maximumFractionDigits=f.length),""});var l=i.options[0];l==="w"?e=Dt(Dt({},e),{trailingZeroDisplay:"stripIfInteger"}):l&&(e=Dt(Dt({},e),Oa(l)));continue}if(yd.test(i.stem)){e=Dt(Dt({},e),Oa(i.stem));continue}var o=kd(i.stem);o&&(e=Dt(Dt({},e),o));var a=Dg(i.stem);a&&(e=Dt(Dt({},e),a))}return e}var jl={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Hg(t,e){for(var n="",s=0;s<t.length;s++){var i=t.charAt(s);if(i==="j"){for(var l=0;s+1<t.length&&t.charAt(s+1)===i;)l++,s++;var o=1+(l&1),a=l<2?1:3+(l>>1),u="a",f=Ig(e);for((f=="H"||f=="k")&&(a=0);a-- >0;)n+=u;for(;o-- >0;)n=f+n}else i==="J"?n+="H":n+=i}return n}function Ig(t){var e=t.hourCycle;if(e===void 0&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=t.language,s;n!=="root"&&(s=t.maximize().region);var i=jl[s||""]||jl[n||""]||jl["".concat(n,"-001")]||jl["001"];return i[0]}var Yo,Bg=new RegExp("^".concat(vd.source,"*")),Fg=new RegExp("".concat(vd.source,"*$"));function Pt(t,e){return{start:t,end:e}}var Ng=!!String.prototype.startsWith&&"_a".startsWith("a",1),jg=!!String.fromCodePoint,zg=!!Object.fromEntries,Ug=!!String.prototype.codePointAt,Vg=!!String.prototype.trimStart,Wg=!!String.prototype.trimEnd,qg=!!Number.isSafeInteger,Gg=qg?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},vr=!0;try{var Xg=Ed("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");vr=((Yo=Xg.exec("a"))===null||Yo===void 0?void 0:Yo[0])==="a"}catch{vr=!1}var Da=Ng?function(e,n,s){return e.startsWith(n,s)}:function(e,n,s){return e.slice(s,s+n.length)===n},yr=jg?String.fromCodePoint:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var s="",i=e.length,l=0,o;i>l;){if(o=e[l++],o>1114111)throw RangeError(o+" is not a valid code point");s+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return s},La=zg?Object.fromEntries:function(e){for(var n={},s=0,i=e;s<i.length;s++){var l=i[s],o=l[0],a=l[1];n[o]=a}return n},Sd=Ug?function(e,n){return e.codePointAt(n)}:function(e,n){var s=e.length;if(!(n<0||n>=s)){var i=e.charCodeAt(n),l;return i<55296||i>56319||n+1===s||(l=e.charCodeAt(n+1))<56320||l>57343?i:(i-55296<<10)+(l-56320)+65536}},Yg=Vg?function(e){return e.trimStart()}:function(e){return e.replace(Bg,"")},Jg=Wg?function(e){return e.trimEnd()}:function(e){return e.replace(Fg,"")};function Ed(t,e){return new RegExp(t,e)}var wr;if(vr){var Ha=Ed("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");wr=function(e,n){var s;Ha.lastIndex=n;var i=Ha.exec(e);return(s=i[1])!==null&&s!==void 0?s:""}}else wr=function(e,n){for(var s=[];;){var i=Sd(e,n);if(i===void 0||Td(i)||$g(i))break;s.push(i),n+=i>=65536?2:1}return yr.apply(void 0,s)};var Kg=(function(){function t(e,n){n===void 0&&(n={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(e,n,s){for(var i=[];!this.isEOF();){var l=this.char();if(l===123){var o=this.parseArgument(e,s);if(o.err)return o;i.push(o.val)}else{if(l===125&&e>0)break;if(l===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:hn.pound,location:Pt(a,this.clonePosition())})}else if(l===60&&!this.ignoreTag&&this.peek()===47){if(s)break;return this.error(Mt.UNMATCHED_CLOSING_TAG,Pt(this.clonePosition(),this.clonePosition()))}else if(l===60&&!this.ignoreTag&&kr(this.peek()||0)){var o=this.parseTag(e,n);if(o.err)return o;i.push(o.val)}else{var o=this.parseLiteral(e,n);if(o.err)return o;i.push(o.val)}}}return{val:i,err:null}},t.prototype.parseTag=function(e,n){var s=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:hn.literal,value:"<".concat(i,"/>"),location:Pt(s,this.clonePosition())},err:null};if(this.bumpIf(">")){var l=this.parseMessage(e+1,n,!0);if(l.err)return l;var o=l.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!kr(this.char()))return this.error(Mt.INVALID_TAG,Pt(a,this.clonePosition()));var u=this.clonePosition(),f=this.parseTagName();return i!==f?this.error(Mt.UNMATCHED_CLOSING_TAG,Pt(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:hn.tag,value:i,children:o,location:Pt(s,this.clonePosition())},err:null}:this.error(Mt.INVALID_TAG,Pt(a,this.clonePosition())))}else return this.error(Mt.UNCLOSED_TAG,Pt(s,this.clonePosition()))}else return this.error(Mt.INVALID_TAG,Pt(s,this.clonePosition()))},t.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&Qg(this.char());)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(e,n){for(var s=this.clonePosition(),i="";;){var l=this.tryParseQuote(n);if(l){i+=l;continue}var o=this.tryParseUnquoted(e,n);if(o){i+=o;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var u=Pt(s,this.clonePosition());return{val:{type:hn.literal,value:i,location:u},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Zg(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var s=this.char();if(s===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(s);this.bump()}return yr.apply(void 0,n)},t.prototype.tryParseUnquoted=function(e,n){if(this.isEOF())return null;var s=this.char();return s===60||s===123||s===35&&(n==="plural"||n==="selectordinal")||s===125&&e>0?null:(this.bump(),yr(s))},t.prototype.parseArgument=function(e,n){var s=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Mt.EXPECT_ARGUMENT_CLOSING_BRACE,Pt(s,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Mt.EMPTY_ARGUMENT,Pt(s,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(Mt.MALFORMED_ARGUMENT,Pt(s,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Mt.EXPECT_ARGUMENT_CLOSING_BRACE,Pt(s,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:hn.argument,value:i,location:Pt(s,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Mt.EXPECT_ARGUMENT_CLOSING_BRACE,Pt(s,this.clonePosition())):this.parseArgumentOptions(e,n,i,s);default:return this.error(Mt.MALFORMED_ARGUMENT,Pt(s,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),n=this.offset(),s=wr(this.message,n),i=n+s.length;this.bumpTo(i);var l=this.clonePosition(),o=Pt(e,l);return{value:s,location:o}},t.prototype.parseArgumentOptions=function(e,n,s,i){var l,o=this.clonePosition(),a=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(a){case"":return this.error(Mt.EXPECT_ARGUMENT_TYPE,Pt(o,u));case"number":case"date":case"time":{this.bumpSpace();var f=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var g=Jg(p.val);if(g.length===0)return this.error(Mt.EXPECT_ARGUMENT_STYLE,Pt(this.clonePosition(),this.clonePosition()));var m=Pt(h,this.clonePosition());f={style:g,styleLocation:m}}var b=this.tryParseArgumentClose(i);if(b.err)return b;var _=Pt(i,this.clonePosition());if(f&&Da(f?.style,"::",0)){var y=Yg(f.style.slice(2));if(a==="number"){var p=this.parseNumberSkeletonFromString(y,f.styleLocation);return p.err?p:{val:{type:hn.number,value:s,location:_,style:p.val},err:null}}else{if(y.length===0)return this.error(Mt.EXPECT_DATE_TIME_SKELETON,_);var k=y;this.locale&&(k=Hg(y,this.locale));var g={type:Ui.dateTime,pattern:k,location:f.styleLocation,parsedOptions:this.shouldParseSkeletons?Pg(k):{}},w=a==="date"?hn.date:hn.time;return{val:{type:w,value:s,location:_,style:g},err:null}}}return{val:{type:a==="number"?hn.number:a==="date"?hn.date:hn.time,value:s,location:_,style:(l=f?.style)!==null&&l!==void 0?l:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Mt.EXPECT_SELECT_ARGUMENT_OPTIONS,Pt(S,Dt({},S)));this.bumpSpace();var P=this.parseIdentifierIfPossible(),M=0;if(a!=="select"&&P.value==="offset"){if(!this.bumpIf(":"))return this.error(Mt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Pt(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(Mt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Mt.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),P=this.parseIdentifierIfPossible(),M=p.val}var x=this.tryParsePluralOrSelectOptions(e,a,n,P);if(x.err)return x;var b=this.tryParseArgumentClose(i);if(b.err)return b;var A=Pt(i,this.clonePosition());return a==="select"?{val:{type:hn.select,value:s,options:La(x.val),location:A},err:null}:{val:{type:hn.plural,value:s,options:La(x.val),offset:M,pluralType:a==="plural"?"cardinal":"ordinal",location:A},err:null}}default:return this.error(Mt.INVALID_ARGUMENT_TYPE,Pt(o,u))}},t.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(Mt.EXPECT_ARGUMENT_CLOSING_BRACE,Pt(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,n=this.clonePosition();!this.isEOF();){var s=this.char();switch(s){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Mt.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Pt(i,this.clonePosition()));this.bump();break}case 123:{e+=1,this.bump();break}case 125:{if(e>0)e-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(e,n){var s=[];try{s=xg(e)}catch{return this.error(Mt.INVALID_NUMBER_SKELETON,n)}return{val:{type:Ui.number,tokens:s,location:n,parsedOptions:this.shouldParseSkeletons?Lg(s):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(e,n,s,i){for(var l,o=!1,a=[],u=new Set,f=i.value,h=i.location;;){if(f.length===0){var p=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var g=this.tryParseDecimalInteger(Mt.EXPECT_PLURAL_ARGUMENT_SELECTOR,Mt.INVALID_PLURAL_ARGUMENT_SELECTOR);if(g.err)return g;h=Pt(p,this.clonePosition()),f=this.message.slice(p.offset,this.offset())}else break}if(u.has(f))return this.error(n==="select"?Mt.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Mt.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);f==="other"&&(o=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?Mt.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Mt.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Pt(this.clonePosition(),this.clonePosition()));var b=this.parseMessage(e+1,n,s);if(b.err)return b;var _=this.tryParseArgumentClose(m);if(_.err)return _;a.push([f,{value:b.val,location:Pt(m,this.clonePosition())}]),u.add(f),this.bumpSpace(),l=this.parseIdentifierIfPossible(),f=l.value,h=l.location}return a.length===0?this.error(n==="select"?Mt.EXPECT_SELECT_ARGUMENT_SELECTOR:Mt.EXPECT_PLURAL_ARGUMENT_SELECTOR,Pt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(Mt.MISSING_OTHER_CLAUSE,Pt(this.clonePosition(),this.clonePosition())):{val:a,err:null}},t.prototype.tryParseDecimalInteger=function(e,n){var s=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(s=-1);for(var l=!1,o=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)l=!0,o=o*10+(a-48),this.bump();else break}var u=Pt(i,this.clonePosition());return l?(o*=s,Gg(o)?{val:o,err:null}:this.error(n,u)):this.error(e,u)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var n=Sd(this.message,e);if(n===void 0)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return n},t.prototype.error=function(e,n){return{val:null,err:{kind:e,message:this.message,location:n}}},t.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},t.prototype.bumpIf=function(e){if(Da(this.message,e,this.offset())){for(var n=0;n<e.length;n++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(e){var n=this.offset(),s=this.message.indexOf(e,n);return s>=0?(this.bumpTo(s),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var n=this.offset();if(n===e)break;if(n>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&Td(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),n=this.offset(),s=this.message.charCodeAt(n+(e>=65536?2:1));return s??null},t})();function kr(t){return t>=97&&t<=122||t>=65&&t<=90}function Zg(t){return kr(t)||t===47}function Qg(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function Td(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function $g(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function Sr(t){t.forEach(function(e){if(delete e.location,gd(e)||md(e))for(var n in e.options)delete e.options[n].location,Sr(e.options[n].value);else hd(e)&&_d(e.style)||(dd(e)||pd(e))&&_r(e.style)?delete e.style.location:bd(e)&&Sr(e.children)})}function e0(t,e){e===void 0&&(e={}),e=Dt({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new Kg(t,e).parse();if(n.err){var s=SyntaxError(Mt[n.err.kind]);throw s.location=n.err.location,s.originalMessage=n.err.message,s}return e?.captureLocation||Sr(n.val),n.val}var Vi;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(Vi||(Vi={}));var Ao=(function(t){Po(e,t);function e(n,s,i){var l=t.call(this,n)||this;return l.code=s,l.originalMessage=i,l}return e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e})(Error),Ia=(function(t){Po(e,t);function e(n,s,i,l){return t.call(this,'Invalid values for "'.concat(n,'": "').concat(s,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Vi.INVALID_VALUE,l)||this}return e})(Ao),t0=(function(t){Po(e,t);function e(n,s,i){return t.call(this,'Value for "'.concat(n,'" must be of type ').concat(s),Vi.INVALID_VALUE,i)||this}return e})(Ao),n0=(function(t){Po(e,t);function e(n,s){return t.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(s,'"'),Vi.MISSING_VALUE,s)||this}return e})(Ao),is;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(is||(is={}));function s0(t){return t.length<2?t:t.reduce(function(e,n){var s=e[e.length-1];return!s||s.type!==is.literal||n.type!==is.literal?e.push(n):s.value+=n.value,e},[])}function i0(t){return typeof t=="function"}function ro(t,e,n,s,i,l,o){if(t.length===1&&Aa(t[0]))return[{type:is.literal,value:t[0].value}];for(var a=[],u=0,f=t;u<f.length;u++){var h=f[u];if(Aa(h)){a.push({type:is.literal,value:h.value});continue}if(Mg(h)){typeof l=="number"&&a.push({type:is.literal,value:n.getNumberFormat(e).format(l)});continue}var p=h.value;if(!(i&&p in i))throw new n0(p,o);var g=i[p];if(Tg(h)){(!g||typeof g=="string"||typeof g=="number")&&(g=typeof g=="string"||typeof g=="number"?String(g):""),a.push({type:typeof g=="string"?is.literal:is.object,value:g});continue}if(dd(h)){var m=typeof h.style=="string"?s.date[h.style]:_r(h.style)?h.style.parsedOptions:void 0;a.push({type:is.literal,value:n.getDateTimeFormat(e,m).format(g)});continue}if(pd(h)){var m=typeof h.style=="string"?s.time[h.style]:_r(h.style)?h.style.parsedOptions:s.time.medium;a.push({type:is.literal,value:n.getDateTimeFormat(e,m).format(g)});continue}if(hd(h)){var m=typeof h.style=="string"?s.number[h.style]:_d(h.style)?h.style.parsedOptions:void 0;m&&m.scale&&(g=g*(m.scale||1)),a.push({type:is.literal,value:n.getNumberFormat(e,m).format(g)});continue}if(bd(h)){var b=h.children,_=h.value,y=i[_];if(!i0(y))throw new t0(_,"function",o);var k=ro(b,e,n,s,i,l),w=y(k.map(function(M){return M.value}));Array.isArray(w)||(w=[w]),a.push.apply(a,w.map(function(M){return{type:typeof M=="string"?is.literal:is.object,value:M}}))}if(gd(h)){var S=h.options[g]||h.options.other;if(!S)throw new Ia(h.value,g,Object.keys(h.options),o);a.push.apply(a,ro(S.value,e,n,s,i));continue}if(md(h)){var S=h.options["=".concat(g)];if(!S){if(!Intl.PluralRules)throw new Ao(\`Intl.PluralRules is not available in this environment.
21194
- Try polyfilling it using "@formatjs/intl-pluralrules"
21195
- \`,Vi.MISSING_INTL_API,o);var P=n.getPluralRules(e,{type:h.pluralType}).select(g-(h.offset||0));S=h.options[P]||h.options.other}if(!S)throw new Ia(h.value,g,Object.keys(h.options),o);a.push.apply(a,ro(S.value,e,n,s,i,g-(h.offset||0)));continue}}return s0(a)}function l0(t,e){return e?Dt(Dt(Dt({},t||{}),e||{}),Object.keys(t).reduce(function(n,s){return n[s]=Dt(Dt({},t[s]),e[s]||{}),n},{})):t}function o0(t,e){return e?Object.keys(t).reduce(function(n,s){return n[s]=l0(t[s],e[s]),n},Dt({},t)):t}function Jo(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,n){t[e]=n}}}}}function r0(t){return t===void 0&&(t={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Go(function(){for(var e,n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return new((e=Intl.NumberFormat).bind.apply(e,qo([void 0],n,!1)))},{cache:Jo(t.number),strategy:Xo.variadic}),getDateTimeFormat:Go(function(){for(var e,n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return new((e=Intl.DateTimeFormat).bind.apply(e,qo([void 0],n,!1)))},{cache:Jo(t.dateTime),strategy:Xo.variadic}),getPluralRules:Go(function(){for(var e,n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return new((e=Intl.PluralRules).bind.apply(e,qo([void 0],n,!1)))},{cache:Jo(t.pluralRules),strategy:Xo.variadic})}}var Md=(function(){function t(e,n,s,i){n===void 0&&(n=t.defaultLocale);var l=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var f=l.formatToParts(u);if(f.length===1)return f[0].value;var h=f.reduce(function(p,g){return!p.length||g.type!==is.literal||typeof p[p.length-1]!="string"?p.push(g.value):p[p.length-1]+=g.value,p},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(u){return ro(l.ast,l.locales,l.formatters,l.formats,u,void 0,l.message)},this.resolvedOptions=function(){var u;return{locale:((u=l.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(l.locales)[0]}},this.getAst=function(){return l.ast},this.locales=n,this.resolvedLocale=t.resolveLocale(n),typeof e=="string"){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process \`message\` of type \`string\`");var o=i||{};o.formatters;var a=bg(o,["formatters"]);this.ast=t.__parse(e,Dt(Dt({},a),{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=o0(t.formats,s),this.formatters=i&&i.formatters||r0(this.formatterCache)}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(e){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(e);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof e=="string"?e:e[0])}},t.__parse=e0,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t})();function a0(t,e){if(e==null)return;if(e in t)return t[e];const n=e.split(".");let s=t;for(let i=0;i<n.length;i++)if(typeof s=="object"){if(i>0){const l=n.slice(i,n.length).join(".");if(l in s){s=s[l];break}}s=s[n[i]]}else s=void 0;return s}const ni={},u0=(t,e,n)=>n&&(e in ni||(ni[e]={}),t in ni[e]||(ni[e][t]=n),n),Cd=(t,e)=>{if(e==null)return;if(e in ni&&t in ni[e])return ni[e][t];const n=Ll(e);for(let s=0;s<n.length;s++){const i=n[s],l=f0(i,t);if(l)return u0(t,e,l)}};let Ur;const Ji=Ns({});function c0(t){return Ur[t]||null}function Vr(t){return t in Ur}function f0(t,e){if(!Vr(t))return null;const n=c0(t);return a0(n,e)}function h0(t){if(t==null)return;const e=Ll(t);for(let n=0;n<e.length;n++){const s=e[n];if(Vr(s))return s}}function d0(t,...e){delete ni[t],Ji.update(n=>(n[t]=mg.all([n[t]||{},...e]),n))}js([Ji],([t])=>Object.keys(t));Ji.subscribe(t=>Ur=t);const dl={};function p0(t){dl[t]=new Set}function g0(t,e){dl[t].delete(e),dl[t].size===0&&delete dl[t]}function pl(t){return dl[t]}function m0(t){return Ll(t).map(e=>{const n=pl(e);return[e,n?[...n]:[]]}).filter(([,e])=>e.length>0)}function po(t){return t==null?!1:Ll(t).some(e=>{var n;return(n=pl(e))==null?void 0:n.size})}function b0(t,e){return Promise.all(e.map(s=>(g0(t,s),s().then(i=>i.default||i)))).then(s=>d0(t,...s))}const $i={};function Pd(t){if(!po(t))return t in $i?$i[t]:Promise.resolve();const e=m0(t);return $i[t]=Promise.all(e.map(([n,s])=>b0(n,s))).then(()=>{if(po(t))return Pd(t);delete $i[t]}),$i[t]}function Ad(t,e){pl(t)||p0(t);const n=pl(t);pl(t).has(e)||(Vr(t)||Ji.update(s=>(s[t]={},s)),n.add(e))}var Ba=Object.getOwnPropertySymbols,_0=Object.prototype.hasOwnProperty,v0=Object.prototype.propertyIsEnumerable,y0=(t,e)=>{var n={};for(var s in t)_0.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&Ba)for(var s of Ba(t))e.indexOf(s)<0&&v0.call(t,s)&&(n[s]=t[s]);return n};const w0={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}};function k0({locale:t,id:e}){console.warn(\`[svelte-i18n] The message "\${e}" was not found in "\${Ll(t).join('", "')}".\${po(hi())?\`
21196
-
21197
- Note: there are at least one loader still registered to this locale that wasn't executed.\`:""}\`)}const S0={fallbackLocale:null,loadingDelay:200,formats:w0,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},rl=S0;function Wi(){return rl}function E0(t){const e=t,{formats:n}=e,s=y0(e,["formats"]);let i=t.fallbackLocale;if(t.initialLocale)try{Md.resolveLocale(t.initialLocale)&&(i=t.initialLocale)}catch{console.warn(\`[svelte-i18n] The initial locale "\${t.initialLocale}" is not a valid locale.\`)}return s.warnOnMissingMessages&&(delete s.warnOnMissingMessages,s.handleMissingMessage==null?s.handleMissingMessage=k0:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(rl,s,{initialLocale:i}),n&&("number"in n&&Object.assign(rl.formats.number,n.number),"date"in n&&Object.assign(rl.formats.date,n.date),"time"in n&&Object.assign(rl.formats.time,n.time)),di.set(i)}const ao=Ns(!1);var T0=Object.defineProperty,M0=Object.defineProperties,C0=Object.getOwnPropertyDescriptors,Fa=Object.getOwnPropertySymbols,P0=Object.prototype.hasOwnProperty,A0=Object.prototype.propertyIsEnumerable,Na=(t,e,n)=>e in t?T0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,x0=(t,e)=>{for(var n in e||(e={}))P0.call(e,n)&&Na(t,n,e[n]);if(Fa)for(var n of Fa(e))A0.call(e,n)&&Na(t,n,e[n]);return t},O0=(t,e)=>M0(t,C0(e));let Er;const go=Ns(null);function ja(t){return t.split("-").map((e,n,s)=>s.slice(0,n+1).join("-")).reverse()}function Ll(t,e=Wi().fallbackLocale){const n=ja(t);return e?[...new Set([...n,...ja(e)])]:n}function hi(){return Er??void 0}go.subscribe(t=>{Er=t??void 0,typeof window<"u"&&t!=null&&document.documentElement.setAttribute("lang",t)});const R0=t=>{if(t&&h0(t)&&po(t)){const{loadingDelay:e}=Wi();let n;return typeof window<"u"&&hi()!=null&&e?n=window.setTimeout(()=>ao.set(!0),e):ao.set(!0),Pd(t).then(()=>{go.set(t)}).finally(()=>{clearTimeout(n),ao.set(!1)})}return go.set(t)},di=O0(x0({},go),{set:R0}),D0=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],xo=t=>{const e=Object.create(null);return s=>{const i=JSON.stringify(s);return i in e?e[i]:e[i]=t(s)}};var L0=Object.defineProperty,mo=Object.getOwnPropertySymbols,xd=Object.prototype.hasOwnProperty,Od=Object.prototype.propertyIsEnumerable,za=(t,e,n)=>e in t?L0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Wr=(t,e)=>{for(var n in e||(e={}))xd.call(e,n)&&za(t,n,e[n]);if(mo)for(var n of mo(e))Od.call(e,n)&&za(t,n,e[n]);return t},Ki=(t,e)=>{var n={};for(var s in t)xd.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&mo)for(var s of mo(t))e.indexOf(s)<0&&Od.call(t,s)&&(n[s]=t[s]);return n};const wl=(t,e)=>{const{formats:n}=Wi();if(t in n&&e in n[t])return n[t][e];throw new Error(\`[svelte-i18n] Unknown "\${e}" \${t} format.\`)},H0=xo(t=>{var e=t,{locale:n,format:s}=e,i=Ki(e,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return s&&(i=wl("number",s)),new Intl.NumberFormat(n,i)}),I0=xo(t=>{var e=t,{locale:n,format:s}=e,i=Ki(e,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return s?i=wl("date",s):Object.keys(i).length===0&&(i=wl("date","short")),new Intl.DateTimeFormat(n,i)}),B0=xo(t=>{var e=t,{locale:n,format:s}=e,i=Ki(e,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return s?i=wl("time",s):Object.keys(i).length===0&&(i=wl("time","short")),new Intl.DateTimeFormat(n,i)}),F0=(t={})=>{var e=t,{locale:n=hi()}=e,s=Ki(e,["locale"]);return H0(Wr({locale:n},s))},N0=(t={})=>{var e=t,{locale:n=hi()}=e,s=Ki(e,["locale"]);return I0(Wr({locale:n},s))},j0=(t={})=>{var e=t,{locale:n=hi()}=e,s=Ki(e,["locale"]);return B0(Wr({locale:n},s))},z0=xo((t,e=hi())=>new Md(t,e,Wi().formats,{ignoreTag:Wi().ignoreTag})),U0=(t,e={})=>{var n,s,i,l;let o=e;typeof t=="object"&&(o=t,t=o.id);const{values:a,locale:u=hi(),default:f}=o;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let h=Cd(t,u);if(!h)h=(l=(i=(s=(n=Wi()).handleMissingMessage)==null?void 0:s.call(n,{locale:u,id:t,defaultValue:f}))!=null?i:f)!=null?l:t;else if(typeof h!="string")return console.warn(\`[svelte-i18n] Message with id "\${t}" must be of type "string", found: "\${typeof h}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.\`),h;if(!a)return h;let p=h;try{p=z0(h,u).format(a)}catch(g){g instanceof Error&&console.warn(\`[svelte-i18n] Message "\${t}" has syntax error:\`,g.message)}return p},V0=(t,e)=>j0(e).format(t),W0=(t,e)=>N0(e).format(t),q0=(t,e)=>F0(e).format(t),G0=(t,e=hi())=>Cd(t,e),xt=js([di,Ji],()=>U0);js([di],()=>V0);js([di],()=>W0);js([di],()=>q0);js([di,Ji],()=>G0);const X0="modulepreload",Y0=function(t){return"/__ui/"+t},Ua={},Rd=function(e,n,s){let i=Promise.resolve();if(n&&n.length>0){let o=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),u=a?.nonce||a?.getAttribute("nonce");i=o(n.map(f=>{if(f=Y0(f),f in Ua)return;Ua[f]=!0;const h=f.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(\`link[href="\${f}"]\${p}\`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":X0,h||(g.as="script"),g.crossOrigin="",g.href=f,u&&g.setAttribute("nonce",u),document.head.appendChild(g),h)return new Promise((m,b)=>{g.addEventListener("load",m),g.addEventListener("error",()=>b(new Error(\`Unable to preload CSS for \${f}\`)))})}))}function l(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&l(a.reason);return e().catch(l)})},Dd="zh-CN",Ld="locale",zl=[{code:"zh-CN",name:"\u4E2D\u6587"},{code:"en",name:"English"}];Ad("zh-CN",()=>Rd(()=>import("./zh-CN-bARHc6B8.js"),[]));Ad("en",()=>Rd(()=>import("./en-Woa_MXgq.js"),[]));function J0(){return typeof localStorage<"u"?localStorage.getItem(Ld):null}function K0(t){typeof localStorage<"u"&&localStorage.setItem(Ld,t)}function Z0(t){di.set(t),K0(t)}const Q0=J0(),$0=D0(),em=Q0||$0||Dd;E0({fallbackLocale:Dd,initialLocale:em});const Hl="bungee_auth_token",Hd=Ns(typeof window<"u"?localStorage.getItem(Hl):null),bo=Ns(typeof window<"u"?!!localStorage.getItem(Hl):!1),Va=Ns(!1);function tm(t){typeof window>"u"||(localStorage.setItem(Hl,t),Hd.set(t),bo.set(!0))}function Id(){typeof window>"u"||(localStorage.removeItem(Hl),Hd.set(null),bo.set(!1))}function Bd(){return typeof window>"u"?null:localStorage.getItem(Hl)}const nm="/__ui/api";async function Ul(t,e){const n=\`\${nm}\${t}\`,s=Bd(),i={"Content-Type":"application/json",...e?.headers};s&&(i.Authorization=\`Bearer \${s}\`);const l=await fetch(n,{...e,headers:i});if(l.status===401)throw Id(),window.location.hash="#/login",new Error("Unauthorized: Please login");if(!l.ok){const a=await l.json().catch(()=>({error:"Unknown error"}));throw new Error(a.error||\`Request failed with status \${l.status}\`)}return await l.json()}const yn={get:t=>Ul(t),post:(t,e)=>Ul(t,{method:"POST",body:JSON.stringify(e)}),put:(t,e)=>Ul(t,{method:"PUT",body:JSON.stringify(e)}),delete:t=>Ul(t,{method:"DELETE"})};async function qr(){return yn.get("/config")}async function sm(t){return yn.put("/config",t)}async function im(t){return yn.post("/config/validate",t)}async function lm(t="1h"){return yn.get(\`/stats/history/v2?range=\${t}\`)}async function om(t="1h"){return yn.get(\`/stats/upstream-status-codes?range=\${t}\`)}async function Wa(t="1h",e="all"){return yn.get(\`/stats/upstream-stats?range=\${t}&type=\${e}\`)}/*!
21198
- * @kurkle/color v0.3.4
21199
- * https://github.com/kurkle/color#readme
21200
- * (c) 2024 Jukka Kurkela
21201
- * Released under the MIT License
21202
- */function Il(t){return t+.5|0}const si=(t,e,n)=>Math.max(Math.min(t,n),e);function al(t){return si(Il(t*2.55),0,255)}function ri(t){return si(Il(t*255),0,255)}function qs(t){return si(Il(t/2.55)/100,0,1)}function qa(t){return si(Il(t*100),0,100)}const ws={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Tr=[..."0123456789ABCDEF"],rm=t=>Tr[t&15],am=t=>Tr[(t&240)>>4]+Tr[t&15],Vl=t=>(t&240)>>4===(t&15),um=t=>Vl(t.r)&&Vl(t.g)&&Vl(t.b)&&Vl(t.a);function cm(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&ws[t[1]]*17,g:255&ws[t[2]]*17,b:255&ws[t[3]]*17,a:e===5?ws[t[4]]*17:255}:(e===7||e===9)&&(n={r:ws[t[1]]<<4|ws[t[2]],g:ws[t[3]]<<4|ws[t[4]],b:ws[t[5]]<<4|ws[t[6]],a:e===9?ws[t[7]]<<4|ws[t[8]]:255})),n}const fm=(t,e)=>t<255?e(t):"";function hm(t){var e=um(t)?rm:am;return t?"#"+e(t.r)+e(t.g)+e(t.b)+fm(t.a,e):void 0}const dm=/^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function Fd(t,e,n){const s=e*Math.min(n,1-n),i=(l,o=(l+t/30)%12)=>n-s*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function pm(t,e,n){const s=(i,l=(i+t/60)%6)=>n-n*e*Math.max(Math.min(l,4-l,1),0);return[s(5),s(3),s(1)]}function gm(t,e,n){const s=Fd(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)s[i]*=1-e-n,s[i]+=e;return s}function mm(t,e,n,s,i){return t===i?(e-n)/s+(e<n?6:0):e===i?(n-t)/s+2:(t-e)/s+4}function Gr(t){const n=t.r/255,s=t.g/255,i=t.b/255,l=Math.max(n,s,i),o=Math.min(n,s,i),a=(l+o)/2;let u,f,h;return l!==o&&(h=l-o,f=a>.5?h/(2-l-o):h/(l+o),u=mm(n,s,i,h,l),u=u*60+.5),[u|0,f||0,a]}function Xr(t,e,n,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,s)).map(ri)}function Yr(t,e,n){return Xr(Fd,t,e,n)}function bm(t,e,n){return Xr(gm,t,e,n)}function _m(t,e,n){return Xr(pm,t,e,n)}function Nd(t){return(t%360+360)%360}function vm(t){const e=dm.exec(t);let n=255,s;if(!e)return;e[5]!==s&&(n=e[6]?al(+e[5]):ri(+e[5]));const i=Nd(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?s=bm(i,l,o):e[1]==="hsv"?s=_m(i,l,o):s=Yr(i,l,o),{r:s[0],g:s[1],b:s[2],a:n}}function ym(t,e){var n=Gr(t);n[0]=Nd(n[0]+e),n=Yr(n),t.r=n[0],t.g=n[1],t.b=n[2]}function wm(t){if(!t)return;const e=Gr(t),n=e[0],s=qa(e[1]),i=qa(e[2]);return t.a<255?\`hsla(\${n}, \${s}%, \${i}%, \${qs(t.a)})\`:\`hsl(\${n}, \${s}%, \${i}%)\`}const Ga={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Xa={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function km(){const t={},e=Object.keys(Xa),n=Object.keys(Ga);let s,i,l,o,a;for(s=0;s<e.length;s++){for(o=a=e[s],i=0;i<n.length;i++)l=n[i],a=a.replace(l,Ga[l]);l=parseInt(Xa[o],16),t[a]=[l>>16&255,l>>8&255,l&255]}return t}let Wl;function Sm(t){Wl||(Wl=km(),Wl.transparent=[0,0,0,0]);const e=Wl[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const Em=/^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function Tm(t){const e=Em.exec(t);let n=255,s,i,l;if(e){if(e[7]!==s){const o=+e[7];n=e[8]?al(o):si(o*255,0,255)}return s=+e[1],i=+e[3],l=+e[5],s=255&(e[2]?al(s):si(s,0,255)),i=255&(e[4]?al(i):si(i,0,255)),l=255&(e[6]?al(l):si(l,0,255)),{r:s,g:i,b:l,a:n}}}function Mm(t){return t&&(t.a<255?\`rgba(\${t.r}, \${t.g}, \${t.b}, \${qs(t.a)})\`:\`rgb(\${t.r}, \${t.g}, \${t.b})\`)}const Ko=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Hi=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Cm(t,e,n){const s=Hi(qs(t.r)),i=Hi(qs(t.g)),l=Hi(qs(t.b));return{r:ri(Ko(s+n*(Hi(qs(e.r))-s))),g:ri(Ko(i+n*(Hi(qs(e.g))-i))),b:ri(Ko(l+n*(Hi(qs(e.b))-l))),a:t.a+n*(e.a-t.a)}}function ql(t,e,n){if(t){let s=Gr(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*n,e===0?360:1)),s=Yr(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function jd(t,e){return t&&Object.assign(e||{},t)}function Ya(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=ri(t[3]))):(e=jd(t,{r:0,g:0,b:0,a:1}),e.a=ri(e.a)),e}function Pm(t){return t.charAt(0)==="r"?Tm(t):vm(t)}class kl{constructor(e){if(e instanceof kl)return e;const n=typeof e;let s;n==="object"?s=Ya(e):n==="string"&&(s=cm(e)||Sm(e)||Pm(e)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var e=jd(this._rgb);return e&&(e.a=qs(e.a)),e}set rgb(e){this._rgb=Ya(e)}rgbString(){return this._valid?Mm(this._rgb):void 0}hexString(){return this._valid?hm(this._rgb):void 0}hslString(){return this._valid?wm(this._rgb):void 0}mix(e,n){if(e){const s=this.rgb,i=e.rgb;let l;const o=n===l?.5:n,a=2*o-1,u=s.a-i.a,f=((a*u===-1?a:(a+u)/(1+a*u))+1)/2;l=1-f,s.r=255&f*s.r+l*i.r+.5,s.g=255&f*s.g+l*i.g+.5,s.b=255&f*s.b+l*i.b+.5,s.a=o*s.a+(1-o)*i.a,this.rgb=s}return this}interpolate(e,n){return e&&(this._rgb=Cm(this._rgb,e._rgb,n)),this}clone(){return new kl(this.rgb)}alpha(e){return this._rgb.a=ri(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Il(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return ql(this._rgb,2,e),this}darken(e){return ql(this._rgb,2,-e),this}saturate(e){return ql(this._rgb,1,e),this}desaturate(e){return ql(this._rgb,1,-e),this}rotate(e){return ym(this._rgb,e),this}}/*!
21250
+ "index-BFVayO0q.js": `import{r as Ip,g as r0,i as i0,$ as Ap,w as Zn,d as Fp,S as Nt,a as Ut,s as Vt,L as u0,b as H,c as yt,t as st,e as et,f as L,m as Ct,h as r,j as Et,k as o,l as Dt,o as Hs,n as Xn,D as f0,B as c0,p as v,q as Gl,u as Kl,v as t,x as _,y as h,z as Rt,A as ot,E as re,F as Mu,G as vt,H as le,I as V,J as Y,K as ut,M as Gt,N as oa,O as Mt,P as Ul,Q as dl,R as Sl,T as Ml,U as kt,V as Rl,W as pl,X as sa,Y as zp,Z as Cs,_ as Ru,a0 as Op,a1 as ta,a2 as Yr,a3 as e1,a4 as d0,a5 as p0,a6 as h0}from"./vendor-C5kRSwys.js";import{C as qu,a as Np,b as Up,P as m0,c as g0,p as _0,d as Hu,e as Lu,A as b0,f as v0}from"./vendor-charts-Bo4qyjB7.js";import{s as k0}from"./vendor-lodash-CRdCilnf.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const u of i.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function e(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=e(a);fetch(a.href,i)}})();const w0="modulepreload",y0=function(l){return"/__ui/"+l},t1={},Vp=function(s,e,n){let a=Promise.resolve();if(e&&e.length>0){let u=function(d){return Promise.all(d.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");a=u(e.map(d=>{if(d=y0(d),d in t1)return;t1[d]=!0;const p=d.endsWith(".css"),m=p?'[rel="stylesheet"]':"";if(document.querySelector(\`link[href="\${d}"]\${m}\`))return;const g=document.createElement("link");if(g.rel=p?"stylesheet":w0,p||(g.as="script"),g.crossOrigin="",g.href=d,f&&g.setAttribute("nonce",f),document.head.appendChild(g),p)return new Promise((b,k)=>{g.addEventListener("load",b),g.addEventListener("error",()=>k(new Error(\`Unable to preload CSS for \${d}\`)))})}))}function i(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return a.then(u=>{for(const c of u||[])c.status==="rejected"&&i(c.reason);return s().catch(i)})},Jp="zh-CN",Wp="locale",Qr=[{code:"zh-CN",name:"\u4E2D\u6587"},{code:"en",name:"English"}];Ip("zh-CN",()=>Vp(()=>import("./zh-CN-wPD53IzZ.js"),[]));Ip("en",()=>Vp(()=>import("./en-D_EcykrR.js"),[]));function C0(){return typeof localStorage<"u"?localStorage.getItem(Wp):null}function E0(l){typeof localStorage<"u"&&localStorage.setItem(Wp,l)}function T0(l){Ap.set(l),E0(l)}const S0=C0(),M0=r0(),R0=S0||M0||Jp;i0({fallbackLocale:Jp,initialLocale:R0});const na="bungee_auth_token",Gp=Zn(typeof window<"u"?localStorage.getItem(na):null),ei=Zn(typeof window<"u"?!!localStorage.getItem(na):!1),l1=Zn(!1);function q0(l){typeof window>"u"||(localStorage.setItem(na,l),Gp.set(l),ei.set(!0))}function Kp(){typeof window>"u"||(localStorage.removeItem(na),Gp.set(null),ei.set(!1))}function Yp(){return typeof window>"u"?null:localStorage.getItem(na)}const H0="/__ui/api";async function Zr(l,s){const e=\`\${H0}\${l}\`,n=Yp(),a={"Content-Type":"application/json",...s?.headers};n&&(a.Authorization=\`Bearer \${n}\`);const i=await fetch(e,{...s,headers:a});if(i.status===401)throw Kp(),window.location.hash="#/login",new Error("Unauthorized: Please login");if(!i.ok){const c=await i.json().catch(()=>({error:"Unknown error"}));throw new Error(c.error||\`Request failed with status \${i.status}\`)}return await i.json()}const yl={get:l=>Zr(l),post:(l,s)=>Zr(l,{method:"POST",body:JSON.stringify(s)}),put:(l,s)=>Zr(l,{method:"PUT",body:JSON.stringify(s)}),delete:l=>Zr(l,{method:"DELETE"})};async function Pu(){return yl.get("/config")}async function L0(l){return yl.put("/config",l)}async function P0(l){return yl.post("/config/validate",l)}async function j0(l="1h"){return yl.get(\`/stats/history/v2?range=\${l}\`)}async function D0(l="1h"){return yl.get(\`/stats/upstream-status-codes?range=\${l}\`)}async function s1(l="1h",s="all"){return yl.get(\`/stats/upstream-stats?range=\${l}&type=\${s}\`)}const o1=typeof window<"u";function B0(){const{subscribe:l,set:s}=Zn({textColor:"rgba(255, 255, 255, 0.9)",gridColor:"rgba(255, 255, 255, 0.1)"});let e=null,n=null,a=!1;function i(){if(!o1)return;const f=document.createElement("div");f.className="text-base-content",f.style.position="absolute",f.style.visibility="hidden",document.body.appendChild(f);const d=getComputedStyle(f).color;document.body.removeChild(f);const p=d.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*[\\d.]+)?\\)/);if(p){const m=parseInt(p[1]),g=parseInt(p[2]),b=parseInt(p[3]),w=(m*299+g*587+b*114)/1e3<128?.2:.15,C=\`rgba(\${m}, \${g}, \${b}, \${w})\`;s({textColor:d,gridColor:C})}else s({textColor:"rgba(100, 100, 100, 0.9)",gridColor:"rgba(100, 100, 100, 0.2)"})}function u(){if(!o1||a)return;a=!0,i(),e=new MutationObserver(()=>{i()}),e.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class"]}),n=window.matchMedia("(prefers-color-scheme: dark)");const f=()=>i();n.addEventListener("change",f),typeof window<"u"&&window.addEventListener("beforeunload",()=>{c()})}function c(){e&&(e.disconnect(),e=null),n&&(n.removeEventListener("change",i),n=null),a=!1}return{subscribe:l,init:u,cleanup:c}}const zs=B0();Fp(zs,l=>l.textColor);Fp(zs,l=>l.gridColor);function ju(l,s,e=!0){return{display:e&&!!l,text:l,color:s,font:{size:16,weight:"bold"}}}function I0(l,s={}){const{position:e="top",display:n=!0,padding:a=15,fontSize:i=11}=s;return{display:n,position:e,labels:{padding:a,font:{size:i},color:l}}}function ti(l,s,e={}){const{stacked:n=!1,beginAtZero:a=!0,fontSize:i=11,maxRotation:u,minRotation:c,title:f}=e,d={stacked:n,beginAtZero:a,ticks:{font:{size:i},color:l},grid:{color:s}};return f&&(d.title={display:f.display,text:f.text,color:l}),u!==void 0&&(d.ticks.maxRotation=u),c!==void 0&&(d.ticks.minRotation=c),d}function Qp(l="index",s=!1){return{mode:l,intersect:s}}const $r=new Map,la=new Map;function Zp(l){return $r.has(l)||$r.set(l,Zn({activeIndex:null})),$r.get(l)}function A0(l,s){la.has(l)||la.set(l,new Set),la.get(l).add(s)}function F0(l,s){const e=la.get(l);e&&(e.delete(s),e.size===0&&(la.delete(l),$r.delete(l)))}function n1(l,s,e){Zp(l).set({activeIndex:s,sourceChartId:e})}function z0(l){let s=null,e=!1;return{id:\`chartSync-\${l}-\${Math.random().toString(36).substring(2,11)}\`,afterInit(a){A0(l,a),s=Zp(l).subscribe(u=>{e||(u.activeIndex!==null&&u.sourceChartId!==a.id?O0(a,u.activeIndex):u.activeIndex===null&&N0(a))})},afterEvent(a,i){const u=i.event;if(u.type==="mousemove"){const c=a.getElementsAtEventForMode(u,"index",{axis:"x",intersect:!1},!1);if(c.length>0){const f=c[0].index;n1(l,f,a.id),i.changed=!0}}else u.type==="mouseout"&&(n1(l,null,a.id),i.changed=!0)},destroy(a){e=!0,s&&(s(),s=null),F0(l,a)}}}function O0(l,s){try{if(!l||!l.ctx||!l.tooltip||!l.data.datasets||l.data.datasets.length===0)return;const e=[];for(let n=0;n<l.data.datasets.length;n++){const a=l.data.datasets[n];if(!a.data||s<0||s>=a.data.length)continue;const i=l.getDatasetMeta(n);!i||!i.controller||!i.data||!i.data[s]||e.push({datasetIndex:n,index:s})}if(e.length===0)return;l.tooltip.setActiveElements(e,{x:0,y:0}),l.update("none")}catch(e){console.debug("Chart sync: tooltip update failed (chart may be destroying)",e)}}function N0(l){try{if(!l||!l.ctx||!l.tooltip)return;l.tooltip.setActiveElements([],{x:0,y:0}),l.update("none")}catch(s){console.debug("Chart sync: tooltip hide failed (chart may be destroying)",s)}}function U0(l){let s,e,n;return e=new u0({props:{data:l[2],options:l[1],plugins:l[0]}}),{c(){s=r("div"),Et(e.$$.fragment),o(s,"class","w-full h-full")},m(a,i){L(a,s,i),Ct(e,s,null),n=!0},p(a,[i]){const u={};i&4&&(u.data=a[2]),i&2&&(u.options=a[1]),i&1&&(u.plugins=a[0]),e.$set(u)},i(a){n||(et(e.$$.fragment,a),n=!0)},o(a){st(e.$$.fragment,a),n=!1},d(a){a&&H(s),yt(e)}}}function V0(l,s,e){let n,a,i,u;Dt(l,zs,g=>e(8,u=g)),qu.register(Np,Up,m0,g0,_0,Hu,Lu);let{title:c}=s,{labels:f}=s,{datasets:d}=s,{yAxisLabel:p=""}=s,{syncGroup:m=void 0}=s;return Hs(()=>{zs.init()}),Xn(()=>{zs.cleanup()}),l.$$set=g=>{"title"in g&&e(3,c=g.title),"labels"in g&&e(4,f=g.labels),"datasets"in g&&e(5,d=g.datasets),"yAxisLabel"in g&&e(6,p=g.yAxisLabel),"syncGroup"in g&&e(7,m=g.syncGroup)},l.$$.update=()=>{l.$$.dirty&48&&e(2,n={labels:f,datasets:d.map(g=>({...g,borderColor:g.borderColor||"rgb(75, 192, 192)",backgroundColor:g.backgroundColor||"rgba(75, 192, 192, 0.2)",tension:g.tension??.4}))}),l.$$.dirty&360&&e(1,a={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:d.length>1,position:"top",labels:{color:u.textColor}},title:ju(c,u.textColor,!0),tooltip:Qp("index",!1)},scales:{y:ti(u.textColor,u.gridColor,{beginAtZero:!0,title:p?{display:!0,text:p}:void 0}),x:{...ti(u.textColor,u.gridColor),ticks:{maxRotation:45,minRotation:0,autoSkip:!0,maxTicksLimit:10,color:u.textColor}}},interaction:{mode:"index",axis:"x",intersect:!1}}),l.$$.dirty&128&&e(0,i=m?[z0(m)]:[])},[i,a,n,c,f,d,p,m,u]}class Xr extends Nt{constructor(s){super(),Ut(this,s,V0,U0,Vt,{title:3,labels:4,datasets:5,yAxisLabel:6,syncGroup:7})}}function J0(l){let s,e,n;return e=new f0({props:{data:l[1],options:l[0]}}),{c(){s=r("div"),Et(e.$$.fragment),o(s,"class","w-full h-full")},m(a,i){L(a,s,i),Ct(e,s,null),n=!0},p(a,[i]){const u={};i&2&&(u.data=a[1]),i&1&&(u.options=a[0]),e.$set(u)},i(a){n||(et(e.$$.fragment,a),n=!0)},o(a){st(e.$$.fragment,a),n=!1},d(a){a&&H(s),yt(e)}}}function W0(l,s,e){let n,a,i;Dt(l,zs,f=>e(4,i=f)),qu.register(b0,Hu,Lu);let{data:u=[]}=s,{title:c=""}=s;return Hs(()=>{zs.init()}),Xn(()=>{zs.cleanup()}),l.$$set=f=>{"data"in f&&e(2,u=f.data),"title"in f&&e(3,c=f.title)},l.$$.update=()=>{l.$$.dirty&20&&e(1,n={labels:u.map(f=>f.label),datasets:[{data:u.map(f=>f.value),backgroundColor:["rgba(59, 130, 246, 0.8)","rgba(16, 185, 129, 0.8)","rgba(245, 158, 11, 0.8)","rgba(239, 68, 68, 0.8)","rgba(168, 85, 247, 0.8)","rgba(236, 72, 153, 0.8)","rgba(20, 184, 166, 0.8)","rgba(251, 146, 60, 0.8)","rgba(132, 204, 22, 0.8)","rgba(148, 163, 184, 0.8)"],borderColor:i.gridColor,borderWidth:1}]}),l.$$.dirty&28&&e(0,a={responsive:!0,maintainAspectRatio:!1,plugins:{title:ju(c,i.textColor),legend:{position:"right",labels:{padding:10,font:{size:11},color:i.textColor,generateLabels:f=>{const p=f.data.datasets[0].backgroundColor,m=f.getDatasetMeta(0);return f.data.labels?.map((g,b)=>{const k=m.data[b],w=k&&typeof k.hidden<"u"?k.hidden:!1;return{text:\`\${g} (\${u[b]?.percentage||0}%)\`,fillStyle:p[b],strokeStyle:p[b],fontColor:i.textColor,hidden:w,index:b,datasetIndex:0}})||[]}},onClick:(f,d,p)=>{const m=d.index,g=p.chart,b=g.getDatasetMeta(0);b.data[m].hidden=!b.data[m].hidden,g.update()}},tooltip:{callbacks:{label:f=>{const d=f.label||"",p=f.parsed||0,m=u[f.dataIndex]?.percentage||0;return\`\${d}: \${p} (\${m}%)\`}}}}})},[a,n,u,c,i]}class Xp extends Nt{constructor(s){super(),Ut(this,s,W0,J0,Vt,{data:2,title:3})}}function G0(l){let s,e,n;return e=new c0({props:{data:l[1],options:l[0]}}),{c(){s=r("div"),Et(e.$$.fragment),o(s,"class","w-full h-full")},m(a,i){L(a,s,i),Ct(e,s,null),n=!0},p(a,[i]){const u={};i&2&&(u.data=a[1]),i&1&&(u.options=a[0]),e.$set(u)},i(a){n||(et(e.$$.fragment,a),n=!0)},o(a){st(e.$$.fragment,a),n=!1},d(a){a&&H(s),yt(e)}}}function K0(l,s,e){let n,a,i;Dt(l,zs,f=>e(4,i=f)),qu.register(v0,Np,Up,Hu,Lu);let{data:u=[]}=s,{title:c=""}=s;return Hs(()=>{zs.init()}),Xn(()=>{zs.cleanup()}),l.$$set=f=>{"data"in f&&e(2,u=f.data),"title"in f&&e(3,c=f.title)},l.$$.update=()=>{l.$$.dirty&4&&e(1,n={labels:u.map(f=>f.label),datasets:[{label:"2xx",data:u.map(f=>f.status2xx),backgroundColor:"rgba(16, 185, 129, 0.8)",borderColor:"rgba(16, 185, 129, 1)",borderWidth:1},{label:"3xx",data:u.map(f=>f.status3xx),backgroundColor:"rgba(59, 130, 246, 0.8)",borderColor:"rgba(59, 130, 246, 1)",borderWidth:1},{label:"4xx",data:u.map(f=>f.status4xx),backgroundColor:"rgba(245, 158, 11, 0.8)",borderColor:"rgba(245, 158, 11, 1)",borderWidth:1},{label:"5xx",data:u.map(f=>f.status5xx),backgroundColor:"rgba(239, 68, 68, 0.8)",borderColor:"rgba(239, 68, 68, 1)",borderWidth:1}]}),l.$$.dirty&24&&e(0,a={responsive:!0,maintainAspectRatio:!1,scales:{x:ti(i.textColor,i.gridColor,{stacked:!0,fontSize:10,maxRotation:45,minRotation:45}),y:ti(i.textColor,i.gridColor,{stacked:!0,beginAtZero:!0,fontSize:11})},plugins:{title:ju(c,i.textColor),legend:I0(i.textColor,{position:"top",padding:15,fontSize:11}),tooltip:Qp("index",!1)}})},[a,n,u,c,i]}class Y0 extends Nt{constructor(s){super(),Ut(this,s,K0,G0,Vt,{data:2,title:3})}}function Q0(l){let s,e,n,a,i,u=l[11]("monitoring.noData")+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(s,"class","alert alert-info")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d&2048&&u!==(u=f[11]("monitoring.noData")+"")&&v(c,u)},i:ot,o:ot,d(f){f&&H(s)}}}function Z0(l){let s,e,n,a,i=l[11]("monitoring.charts.requestsTrend")+"",u,c,f,d,p,m,g,b,k=l[11]("monitoring.charts.responseTimeTrend")+"",w,C,E,y,T,M,R,j,P=l[11]("monitoring.charts.successRateTrend")+"",I,q,D,A,N,Z,Q,x,z=l[11]("monitoring.charts.errorsTrend")+"",K,S,B,U,F,J,ie,ue,ne,$,te,ae,ee,G,pe,oe,ge=l[11]("dashboard.upstreamFailures")+"",he,ye,ze,Pe,we,Fe,Je,je,Le,Se=l[11]("dashboard.upstreamStatusCodes")+"",fe,_e,Ie,De,se,ke;d=new Xr({props:{labels:l[10],datasets:[{label:l[11]("monitoring.charts.periodRequests"),data:l[9],borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)"}],yAxisLabel:l[11]("monitoring.charts.requests"),syncGroup:"monitoring-trends"}}),y=new Xr({props:{labels:l[10],datasets:[{label:l[11]("monitoring.charts.avgResponseTime"),data:l[7],borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)"}],yAxisLabel:l[11]("monitoring.charts.milliseconds"),syncGroup:"monitoring-trends"}}),A=new Xr({props:{labels:l[10],datasets:[{label:l[11]("monitoring.charts.successRate"),data:l[6],borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)"}],yAxisLabel:l[11]("monitoring.charts.percentage"),syncGroup:"monitoring-trends"}}),U=new Xr({props:{labels:l[10],datasets:[{label:l[11]("monitoring.charts.periodErrors"),data:l[8],borderColor:"rgb(239, 68, 68)",backgroundColor:"rgba(239, 68, 68, 0.1)"}],yAxisLabel:l[11]("monitoring.charts.errors"),syncGroup:"monitoring-trends"}});const me=[e2,$0],Ee=[];function Ve(de,Te){return de[5].length>0?0:1}te=Ve(l),ae=Ee[te]=me[te](l);const Be=[l2,t2],nt=[];function Ne(de,Te){return de[4].length>0?0:1}Pe=Ne(l),we=nt[Pe]=Be[Pe](l);const Qe=[o2,s2],Ye=[];function ve(de,Te){return de[3].length>0?0:1}return De=ve(l),se=Ye[De]=Qe[De](l),{c(){s=r("div"),e=r("div"),n=r("div"),a=r("h3"),u=_(i),c=h(),f=r("div"),Et(d.$$.fragment),p=h(),m=r("div"),g=r("div"),b=r("h3"),w=_(k),C=h(),E=r("div"),Et(y.$$.fragment),T=h(),M=r("div"),R=r("div"),j=r("h3"),I=_(P),q=h(),D=r("div"),Et(A.$$.fragment),N=h(),Z=r("div"),Q=r("div"),x=r("h3"),K=_(z),S=h(),B=r("div"),Et(U.$$.fragment),F=h(),J=r("div"),ie=r("div"),ue=r("h3"),ue.textContent="\u4E0A\u6E38\u6210\u529F\u7EDF\u8BA1",ne=h(),$=r("div"),ae.c(),ee=h(),G=r("div"),pe=r("div"),oe=r("h3"),he=_(ge),ye=h(),ze=r("div"),we.c(),Fe=h(),Je=r("div"),je=r("div"),Le=r("h3"),fe=_(Se),_e=h(),Ie=r("div"),se.c(),o(a,"class","text-base font-semibold mb-3"),o(f,"class","h-64"),o(n,"class","card-body p-4"),o(e,"class","card bg-base-100 shadow-xl"),o(b,"class","text-base font-semibold mb-3"),o(E,"class","h-64"),o(g,"class","card-body p-4"),o(m,"class","card bg-base-100 shadow-xl"),o(j,"class","text-base font-semibold mb-3"),o(D,"class","h-64"),o(R,"class","card-body p-4"),o(M,"class","card bg-base-100 shadow-xl"),o(x,"class","text-base font-semibold mb-3"),o(B,"class","h-64"),o(Q,"class","card-body p-4"),o(Z,"class","card bg-base-100 shadow-xl"),o(ue,"class","text-base font-semibold mb-3"),o($,"class","h-64"),o(ie,"class","card-body p-4"),o(J,"class","card bg-base-100 shadow-xl"),o(oe,"class","text-base font-semibold mb-3"),o(ze,"class","h-64"),o(pe,"class","card-body p-4"),o(G,"class","card bg-base-100 shadow-xl"),o(Le,"class","text-base font-semibold mb-3"),o(Ie,"class","h-64"),o(je,"class","card-body p-4"),o(Je,"class","card bg-base-100 shadow-xl lg:col-span-2"),o(s,"class","grid grid-cols-1 lg:grid-cols-2 gap-6")},m(de,Te){L(de,s,Te),t(s,e),t(e,n),t(n,a),t(a,u),t(n,c),t(n,f),Ct(d,f,null),t(s,p),t(s,m),t(m,g),t(g,b),t(b,w),t(g,C),t(g,E),Ct(y,E,null),t(s,T),t(s,M),t(M,R),t(R,j),t(j,I),t(R,q),t(R,D),Ct(A,D,null),t(s,N),t(s,Z),t(Z,Q),t(Q,x),t(x,K),t(Q,S),t(Q,B),Ct(U,B,null),t(s,F),t(s,J),t(J,ie),t(ie,ue),t(ie,ne),t(ie,$),Ee[te].m($,null),t(s,ee),t(s,G),t(G,pe),t(pe,oe),t(oe,he),t(pe,ye),t(pe,ze),nt[Pe].m(ze,null),t(s,Fe),t(s,Je),t(Je,je),t(je,Le),t(Le,fe),t(je,_e),t(je,Ie),Ye[De].m(Ie,null),ke=!0},p(de,Te){(!ke||Te&2048)&&i!==(i=de[11]("monitoring.charts.requestsTrend")+"")&&v(u,i);const Ze={};Te&1024&&(Ze.labels=de[10]),Te&2560&&(Ze.datasets=[{label:de[11]("monitoring.charts.periodRequests"),data:de[9],borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)"}]),Te&2048&&(Ze.yAxisLabel=de[11]("monitoring.charts.requests")),d.$set(Ze),(!ke||Te&2048)&&k!==(k=de[11]("monitoring.charts.responseTimeTrend")+"")&&v(w,k);const Me={};Te&1024&&(Me.labels=de[10]),Te&2176&&(Me.datasets=[{label:de[11]("monitoring.charts.avgResponseTime"),data:de[7],borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)"}]),Te&2048&&(Me.yAxisLabel=de[11]("monitoring.charts.milliseconds")),y.$set(Me),(!ke||Te&2048)&&P!==(P=de[11]("monitoring.charts.successRateTrend")+"")&&v(I,P);const Ue={};Te&1024&&(Ue.labels=de[10]),Te&2112&&(Ue.datasets=[{label:de[11]("monitoring.charts.successRate"),data:de[6],borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)"}]),Te&2048&&(Ue.yAxisLabel=de[11]("monitoring.charts.percentage")),A.$set(Ue),(!ke||Te&2048)&&z!==(z=de[11]("monitoring.charts.errorsTrend")+"")&&v(K,z);const Ce={};Te&1024&&(Ce.labels=de[10]),Te&2304&&(Ce.datasets=[{label:de[11]("monitoring.charts.periodErrors"),data:de[8],borderColor:"rgb(239, 68, 68)",backgroundColor:"rgba(239, 68, 68, 0.1)"}]),Te&2048&&(Ce.yAxisLabel=de[11]("monitoring.charts.errors")),U.$set(Ce);let mt=te;te=Ve(de),te===mt?Ee[te].p(de,Te):(Gl(),st(Ee[mt],1,1,()=>{Ee[mt]=null}),Kl(),ae=Ee[te],ae?ae.p(de,Te):(ae=Ee[te]=me[te](de),ae.c()),et(ae,1),ae.m($,null)),(!ke||Te&2048)&&ge!==(ge=de[11]("dashboard.upstreamFailures")+"")&&v(he,ge);let Ge=Pe;Pe=Ne(de),Pe===Ge?nt[Pe].p(de,Te):(Gl(),st(nt[Ge],1,1,()=>{nt[Ge]=null}),Kl(),we=nt[Pe],we?we.p(de,Te):(we=nt[Pe]=Be[Pe](de),we.c()),et(we,1),we.m(ze,null)),(!ke||Te&2048)&&Se!==(Se=de[11]("dashboard.upstreamStatusCodes")+"")&&v(fe,Se);let ce=De;De=ve(de),De===ce?Ye[De].p(de,Te):(Gl(),st(Ye[ce],1,1,()=>{Ye[ce]=null}),Kl(),se=Ye[De],se?se.p(de,Te):(se=Ye[De]=Qe[De](de),se.c()),et(se,1),se.m(Ie,null))},i(de){ke||(et(d.$$.fragment,de),et(y.$$.fragment,de),et(A.$$.fragment,de),et(U.$$.fragment,de),et(ae),et(we),et(se),ke=!0)},o(de){st(d.$$.fragment,de),st(y.$$.fragment,de),st(A.$$.fragment,de),st(U.$$.fragment,de),st(ae),st(we),st(se),ke=!1},d(de){de&&H(s),yt(d),yt(y),yt(A),yt(U),Ee[te].d(),nt[Pe].d(),Ye[De].d()}}}function X0(l){let s,e,n,a,i,u=l[11]("common.error")+"",c,f,d;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),f=_(": "),d=_(l[1]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(s,"class","alert alert-error")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c),t(i,f),t(i,d)},p(p,m){m&2048&&u!==(u=p[11]("common.error")+"")&&v(c,u),m&2&&v(d,p[1])},i:ot,o:ot,d(p){p&&H(s)}}}function x0(l){let s;return{c(){s=r("div"),s.innerHTML='<span class="loading loading-spinner loading-lg"></span>',o(s,"class","flex justify-center items-center h-64")},m(e,n){L(e,s,n)},p:ot,i:ot,o:ot,d(e){e&&H(s)}}}function $0(l){let s,e,n,a,i,u=l[11]("dashboard.noData")+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","1.5"),o(n,"d","M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-12 w-12"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm"),o(s,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d&2048&&u!==(u=f[11]("dashboard.noData")+"")&&v(c,u)},i:ot,o:ot,d(f){f&&H(s)}}}function e2(l){let s,e;return s=new Xp({props:{data:l[5]}}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p(n,a){const i={};a&32&&(i.data=n[5]),s.$set(i)},i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function t2(l){let s,e,n,a,i,u=l[11]("dashboard.noData")+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","1.5"),o(n,"d","M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-12 w-12"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm"),o(s,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d&2048&&u!==(u=f[11]("dashboard.noData")+"")&&v(c,u)},i:ot,o:ot,d(f){f&&H(s)}}}function l2(l){let s,e;return s=new Xp({props:{data:l[4]}}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p(n,a){const i={};a&16&&(i.data=n[4]),s.$set(i)},i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function s2(l){let s,e,n,a,i,u=l[11]("dashboard.noData")+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","1.5"),o(n,"d","M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-12 w-12"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm"),o(s,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d&2048&&u!==(u=f[11]("dashboard.noData")+"")&&v(c,u)},i:ot,o:ot,d(f){f&&H(s)}}}function o2(l){let s,e;return s=new Y0({props:{data:l[3]}}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p(n,a){const i={};a&8&&(i.data=n[3]),s.$set(i)},i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function n2(l){let s,e,n,a=l[11]("monitoring.title")+"",i,u,c,f,d;const p=[x0,X0,Z0,Q0],m=[];function g(b,k){return b[2]&&!b[0]?0:b[1]?1:b[0]&&b[0].timestamps.length>0?2:3}return c=g(l),f=m[c]=p[c](l),{c(){s=r("div"),e=r("div"),n=r("h2"),i=_(a),u=h(),f.c(),o(n,"class","text-2xl font-bold"),o(s,"class","space-y-6")},m(b,k){L(b,s,k),t(s,e),t(e,n),t(n,i),t(s,u),m[c].m(s,null),d=!0},p(b,[k]){(!d||k&2048)&&a!==(a=b[11]("monitoring.title")+"")&&v(i,a);let w=c;c=g(b),c===w?m[c].p(b,k):(Gl(),st(m[w],1,1,()=>{m[w]=null}),Kl(),f=m[c],f?f.p(b,k):(f=m[c]=p[c](b),f.c()),et(f,1),f.m(s,null))},i(b){d||(et(f),d=!0)},o(b){st(f),d=!1},d(b){b&&H(s),m[c].d()}}}function a2(l,s,e){let n,a,i,u,c,f,d,p,m;Dt(l,Rt,I=>e(11,m=I));let{selectedRange:g="1h"}=s,{onDataLoaded:b=()=>{}}=s,k=null,w=!0,C=null,E,y=[],T=[],M=[];async function R(){try{e(2,w=!0),e(0,k=await j0(g)),e(1,C=null)}catch(I){e(1,C=I.message)}finally{e(2,w=!1)}}async function j(){try{const[I,q,D]=await Promise.all([s1(g,"success"),s1(g,"failure"),D0(g)]);e(14,y=I.data),e(15,T=q.data),e(16,M=D.data)}catch(I){console.error("Failed to load upstream stats:",I)}finally{}}async function P(){await Promise.all([R(),j()])}return Hs(()=>{P(),E=setInterval(P,3e4)}),Xn(()=>{E&&clearInterval(E)}),l.$$set=I=>{"selectedRange"in I&&e(12,g=I.selectedRange),"onDataLoaded"in I&&e(13,b=I.onDataLoaded)},l.$$.update=()=>{l.$$.dirty&4096&&g&&P(),l.$$.dirty&8195&&(k!==null||C!==null)&&b(C?null:k),l.$$.dirty&4097&&e(10,n=k?.timestamps.map(I=>{const q=new Date(I);switch(g){case"1h":return q.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});case"12h":return q.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});case"24h":return q.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit"});default:return q.toLocaleTimeString("zh-CN")}})||[]),l.$$.dirty&1&&e(9,a=k?.requests||[]),l.$$.dirty&1&&e(8,i=k?.errors||[]),l.$$.dirty&1&&e(7,u=k?.responseTime||[]),l.$$.dirty&1&&e(6,c=k?.successRate||[]),l.$$.dirty&16384&&e(5,f=y.map(I=>({label:new URL(I.upstream).host,value:I.count,percentage:I.percentage}))),l.$$.dirty&32768&&e(4,d=T.filter(I=>I.failedRequests>0).sort((I,q)=>q.failedRequests-I.failedRequests).map(I=>({label:new URL(I.upstream).host,value:I.failedRequests,percentage:I.percentage}))),l.$$.dirty&65536&&e(3,p=M.map(I=>({label:new URL(I.upstream).host,status2xx:I.status2xx,status3xx:I.status3xx,status4xx:I.status4xx,status5xx:I.status5xx})))},[k,C,w,p,d,f,c,u,i,a,n,m,g,b,y,T,M]}class r2 extends Nt{constructor(s){super(),Ut(this,s,a2,n2,Vt,{selectedRange:12,onDataLoaded:13})}}function i2(l){let s,e,n,a,i=l[2]("dashboard.totalRequests")+"",u,c,f,d,p,m,g,b=l[2]("dashboard.requestsPerSecond")+"",k,w,C,E,y,T,M,R=l[2]("dashboard.successRate")+"",j,P,I,q,D,A,N,Z=l[2]("dashboard.avgResponseTime")+"",Q,x,z;return{c(){s=r("div"),e=r("div"),n=r("div"),a=r("h2"),u=_(i),c=h(),f=r("p"),f.textContent="-",d=h(),p=r("div"),m=r("div"),g=r("h2"),k=_(b),w=h(),C=r("p"),C.textContent="-",E=h(),y=r("div"),T=r("div"),M=r("h2"),j=_(R),P=h(),I=r("p"),I.textContent="-",q=h(),D=r("div"),A=r("div"),N=r("h2"),Q=_(Z),x=h(),z=r("p"),z.textContent="-",o(a,"class","card-title text-sm"),o(f,"class","text-3xl font-bold"),o(n,"class","card-body"),o(e,"class","card bg-base-100 shadow-xl"),o(g,"class","card-title text-sm"),o(C,"class","text-3xl font-bold"),o(m,"class","card-body"),o(p,"class","card bg-base-100 shadow-xl"),o(M,"class","card-title text-sm"),o(I,"class","text-3xl font-bold"),o(T,"class","card-body"),o(y,"class","card bg-base-100 shadow-xl"),o(N,"class","card-title text-sm"),o(z,"class","text-3xl font-bold"),o(A,"class","card-body"),o(D,"class","card bg-base-100 shadow-xl"),o(s,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(K,S){L(K,s,S),t(s,e),t(e,n),t(n,a),t(a,u),t(n,c),t(n,f),t(s,d),t(s,p),t(p,m),t(m,g),t(g,k),t(m,w),t(m,C),t(s,E),t(s,y),t(y,T),t(T,M),t(M,j),t(T,P),t(T,I),t(s,q),t(s,D),t(D,A),t(A,N),t(N,Q),t(A,x),t(A,z)},p(K,S){S&4&&i!==(i=K[2]("dashboard.totalRequests")+"")&&v(u,i),S&4&&b!==(b=K[2]("dashboard.requestsPerSecond")+"")&&v(k,b),S&4&&R!==(R=K[2]("dashboard.successRate")+"")&&v(j,R),S&4&&Z!==(Z=K[2]("dashboard.avgResponseTime")+"")&&v(Q,Z)},d(K){K&&H(s)}}}function u2(l){let s,e,n,a,i=l[2]("dashboard.totalRequests")+"",u,c,f,d=l[1].totalRequests+"",p,m,g,b,k,w=l[2]("dashboard.requestsPerSecond")+"",C,E,y,T=l[1].requestsPerSecond.toFixed(2)+"",M,R,j,P,I,q=l[2]("dashboard.successRate")+"",D,A,N,Z=l[1].successRate.toFixed(1)+"",Q,x,z,K,S,B,U=l[2]("dashboard.avgResponseTime")+"",F,J,ie,ue=l[1].avgResponseTime.toFixed(0)+"",ne,$;return{c(){s=r("div"),e=r("div"),n=r("div"),a=r("h2"),u=_(i),c=h(),f=r("p"),p=_(d),m=h(),g=r("div"),b=r("div"),k=r("h2"),C=_(w),E=h(),y=r("p"),M=_(T),R=h(),j=r("div"),P=r("div"),I=r("h2"),D=_(q),A=h(),N=r("p"),Q=_(Z),x=_("%"),z=h(),K=r("div"),S=r("div"),B=r("h2"),F=_(U),J=h(),ie=r("p"),ne=_(ue),$=_("ms"),o(a,"class","card-title text-sm"),o(f,"class","text-3xl font-bold"),o(n,"class","card-body"),o(e,"class","card bg-base-100 shadow-xl"),o(k,"class","card-title text-sm"),o(y,"class","text-3xl font-bold"),o(b,"class","card-body"),o(g,"class","card bg-base-100 shadow-xl"),o(I,"class","card-title text-sm"),o(N,"class","text-3xl font-bold"),o(P,"class","card-body"),o(j,"class","card bg-base-100 shadow-xl"),o(B,"class","card-title text-sm"),o(ie,"class","text-3xl font-bold"),o(S,"class","card-body"),o(K,"class","card bg-base-100 shadow-xl"),o(s,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(te,ae){L(te,s,ae),t(s,e),t(e,n),t(n,a),t(a,u),t(n,c),t(n,f),t(f,p),t(s,m),t(s,g),t(g,b),t(b,k),t(k,C),t(b,E),t(b,y),t(y,M),t(s,R),t(s,j),t(j,P),t(P,I),t(I,D),t(P,A),t(P,N),t(N,Q),t(N,x),t(s,z),t(s,K),t(K,S),t(S,B),t(B,F),t(S,J),t(S,ie),t(ie,ne),t(ie,$)},p(te,ae){ae&4&&i!==(i=te[2]("dashboard.totalRequests")+"")&&v(u,i),ae&2&&d!==(d=te[1].totalRequests+"")&&v(p,d),ae&4&&w!==(w=te[2]("dashboard.requestsPerSecond")+"")&&v(C,w),ae&2&&T!==(T=te[1].requestsPerSecond.toFixed(2)+"")&&v(M,T),ae&4&&q!==(q=te[2]("dashboard.successRate")+"")&&v(D,q),ae&2&&Z!==(Z=te[1].successRate.toFixed(1)+"")&&v(Q,Z),ae&4&&U!==(U=te[2]("dashboard.avgResponseTime")+"")&&v(F,U),ae&2&&ue!==(ue=te[1].avgResponseTime.toFixed(0)+"")&&v(ne,ue)},d(te){te&&H(s)}}}function f2(l){let s,e,n=l[2]("dashboard.title")+"",a,i,u,c,f=l[2]("dashboard.dataRange")+"",d,p,m=l[2]("monitoring.range."+l[0])+"",g,b,k,w,C,E,y,T=l[2]("monitoring.range.oneHour")+"",M,R,j,P,I,q,D=l[2]("monitoring.range.twelveHours")+"",A,N,Z,Q,x,z,K=l[2]("monitoring.range.twentyFourHours")+"",S,B,U,F,J,ie,ue,ne;function $(ee,G){return ee[1]?u2:i2}let te=$(l),ae=te(l);return F=new r2({props:{selectedRange:l[0],onDataLoaded:l[3]}}),ie=Mu(l[5][0]),{c(){s=r("div"),e=r("h1"),a=_(n),i=h(),u=r("div"),c=r("p"),d=_(f),p=_(": "),g=_(m),b=h(),k=r("div"),w=r("label"),C=r("input"),E=h(),y=r("span"),M=_(T),R=h(),j=r("label"),P=r("input"),I=h(),q=r("span"),A=_(D),N=h(),Z=r("label"),Q=r("input"),x=h(),z=r("span"),S=_(K),B=h(),ae.c(),U=h(),Et(F.$$.fragment),o(e,"class","text-3xl font-bold mb-6"),o(c,"class","text-sm text-gray-500"),o(C,"class","sr-only"),o(C,"type","radio"),o(C,"name","range"),C.__value="1h",Y(C,C.__value),o(y,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(y,"bg-primary",l[0]==="1h"),le(y,"text-primary-content",l[0]==="1h"),le(y,"shadow",l[0]==="1h"),le(y,"text-gray-700",l[0]!=="1h"),le(y,"dark:text-gray-300",l[0]!=="1h"),le(y,"hover:text-gray-900",l[0]!=="1h"),le(y,"dark:hover:text-gray-100",l[0]!=="1h"),o(w,"class","cursor-pointer"),o(P,"class","sr-only"),o(P,"type","radio"),o(P,"name","range"),P.__value="12h",Y(P,P.__value),o(q,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(q,"bg-primary",l[0]==="12h"),le(q,"text-primary-content",l[0]==="12h"),le(q,"shadow",l[0]==="12h"),le(q,"text-gray-700",l[0]!=="12h"),le(q,"dark:text-gray-300",l[0]!=="12h"),le(q,"hover:text-gray-900",l[0]!=="12h"),le(q,"dark:hover:text-gray-100",l[0]!=="12h"),o(j,"class","cursor-pointer"),o(Q,"class","sr-only"),o(Q,"type","radio"),o(Q,"name","range"),Q.__value="24h",Y(Q,Q.__value),o(z,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(z,"bg-primary",l[0]==="24h"),le(z,"text-primary-content",l[0]==="24h"),le(z,"shadow",l[0]==="24h"),le(z,"text-gray-700",l[0]!=="24h"),le(z,"dark:text-gray-300",l[0]!=="24h"),le(z,"hover:text-gray-900",l[0]!=="24h"),le(z,"dark:hover:text-gray-100",l[0]!=="24h"),o(Z,"class","cursor-pointer"),o(k,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm"),o(u,"class","flex justify-between items-center mb-6"),o(s,"class","p-6"),ie.p(C,P,Q)},m(ee,G){L(ee,s,G),t(s,e),t(e,a),t(s,i),t(s,u),t(u,c),t(c,d),t(c,p),t(c,g),t(u,b),t(u,k),t(k,w),t(w,C),C.checked=C.__value===l[0],t(w,E),t(w,y),t(y,M),t(k,R),t(k,j),t(j,P),P.checked=P.__value===l[0],t(j,I),t(j,q),t(q,A),t(k,N),t(k,Z),t(Z,Q),Q.checked=Q.__value===l[0],t(Z,x),t(Z,z),t(z,S),t(s,B),ae.m(s,null),t(s,U),Ct(F,s,null),J=!0,ue||(ne=[V(C,"change",l[4]),V(P,"change",l[6]),V(Q,"change",l[7])],ue=!0)},p(ee,[G]){(!J||G&4)&&n!==(n=ee[2]("dashboard.title")+"")&&v(a,n),(!J||G&4)&&f!==(f=ee[2]("dashboard.dataRange")+"")&&v(d,f),(!J||G&5)&&m!==(m=ee[2]("monitoring.range."+ee[0])+"")&&v(g,m),G&1&&(C.checked=C.__value===ee[0]),(!J||G&4)&&T!==(T=ee[2]("monitoring.range.oneHour")+"")&&v(M,T),(!J||G&1)&&le(y,"bg-primary",ee[0]==="1h"),(!J||G&1)&&le(y,"text-primary-content",ee[0]==="1h"),(!J||G&1)&&le(y,"shadow",ee[0]==="1h"),(!J||G&1)&&le(y,"text-gray-700",ee[0]!=="1h"),(!J||G&1)&&le(y,"dark:text-gray-300",ee[0]!=="1h"),(!J||G&1)&&le(y,"hover:text-gray-900",ee[0]!=="1h"),(!J||G&1)&&le(y,"dark:hover:text-gray-100",ee[0]!=="1h"),G&1&&(P.checked=P.__value===ee[0]),(!J||G&4)&&D!==(D=ee[2]("monitoring.range.twelveHours")+"")&&v(A,D),(!J||G&1)&&le(q,"bg-primary",ee[0]==="12h"),(!J||G&1)&&le(q,"text-primary-content",ee[0]==="12h"),(!J||G&1)&&le(q,"shadow",ee[0]==="12h"),(!J||G&1)&&le(q,"text-gray-700",ee[0]!=="12h"),(!J||G&1)&&le(q,"dark:text-gray-300",ee[0]!=="12h"),(!J||G&1)&&le(q,"hover:text-gray-900",ee[0]!=="12h"),(!J||G&1)&&le(q,"dark:hover:text-gray-100",ee[0]!=="12h"),G&1&&(Q.checked=Q.__value===ee[0]),(!J||G&4)&&K!==(K=ee[2]("monitoring.range.twentyFourHours")+"")&&v(S,K),(!J||G&1)&&le(z,"bg-primary",ee[0]==="24h"),(!J||G&1)&&le(z,"text-primary-content",ee[0]==="24h"),(!J||G&1)&&le(z,"shadow",ee[0]==="24h"),(!J||G&1)&&le(z,"text-gray-700",ee[0]!=="24h"),(!J||G&1)&&le(z,"dark:text-gray-300",ee[0]!=="24h"),(!J||G&1)&&le(z,"hover:text-gray-900",ee[0]!=="24h"),(!J||G&1)&&le(z,"dark:hover:text-gray-100",ee[0]!=="24h"),te===(te=$(ee))&&ae?ae.p(ee,G):(ae.d(1),ae=te(ee),ae&&(ae.c(),ae.m(s,U)));const pe={};G&1&&(pe.selectedRange=ee[0]),F.$set(pe)},i(ee){J||(et(F.$$.fragment,ee),J=!0)},o(ee){st(F.$$.fragment,ee),J=!1},d(ee){ee&&H(s),ae.d(),yt(F),ie.r(),ue=!1,vt(ne)}}}function c2(l){switch(l){case"1h":return 3600;case"12h":return 43200;case"24h":return 86400;default:return 3600}}function d2(l,s,e){let n;Dt(l,Rt,g=>e(2,n=g));let a="1h",i=null;function u(g){e(1,i=c(g))}function c(g){if(!g||g.requests.length===0)return null;const b=g.requests.reduce((T,M)=>T+M,0),k=c2(a),w=b/k,C=g.errors.reduce((T,M)=>T+M,0),E=b>0?(b-C)/b*100:100,y=g.responseTime.length>0?g.responseTime.reduce((T,M)=>T+M,0)/g.responseTime.length:0;return{totalRequests:b,requestsPerSecond:w,successRate:E,avgResponseTime:y}}const f=[[]];function d(){a=this.__value,e(0,a)}function p(){a=this.__value,e(0,a)}function m(){a=this.__value,e(0,a)}return[a,i,n,u,d,f,p,m]}class p2 extends Nt{constructor(s){super(),Ut(this,s,d2,f2,Vt,{})}}async function h2(){return yl.post("/system/reload",{})}async function m2(){return yl.post("/system/restart",{})}function ea(){const{subscribe:l,update:s}=Zn([]);let e=0;return{subscribe:l,show:(n,a="info",i=3e3)=>{const u=e++,c={id:u,message:n,type:a,duration:i};return s(f=>[...f,c]),i>0&&setTimeout(()=>{s(f=>f.filter(d=>d.id!==u))},i),u},success:(n,a=3e3)=>ea().show(n,"success",a),error:(n,a=4e3)=>ea().show(n,"error",a),warning:(n,a=3500)=>ea().show(n,"warning",a),info:(n,a=3e3)=>ea().show(n,"info",a),remove:n=>{s(a=>a.filter(i=>i.id!==n))},clear:()=>{s(()=>[])}}}const jt=ea();function a1(l,s,e){const n=l.slice();return n[13]=s[e],n[14]=s,n[15]=e,n}function r1(l){let s,e=l[5]("auth.helpText")+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","label-text-alt text-xs")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i&32&&e!==(e=a[5]("auth.helpText")+"")&&v(n,e)},d(a){a&&H(s)}}}function i1(l){let s,e,n,a,i=l[5]("auth.tokens")+"",u,c,f=l[3].length+"",d,p,m,g,b,k,w,C,E,y,T=l[5]("auth.expressionSupport")+"",M,R,j,P,I,q,D,A,N=l[5]("auth.addToken")+"",Z,Q,x,z,K,S,B,U=l[5]("auth.securityNotice")+"",F,J,ie,ue=ut(l[3]),ne=[];for(let $=0;$<ue.length;$+=1)ne[$]=u1(a1(l,ue,$));return{c(){s=r("div"),e=r("input"),n=h(),a=r("div"),u=_(i),c=_(" ("),d=_(f),p=_(")"),m=h(),g=r("div"),b=r("div"),k=re("svg"),w=re("path"),C=h(),E=r("div"),y=r("div"),M=_(T),R=h(),j=r("div"),P=r("code"),P.textContent="{{ env.API_TOKEN }}",I=h();for(let $=0;$<ne.length;$+=1)ne[$].c();q=h(),D=r("button"),A=_("+ "),Z=_(N),Q=h(),x=r("div"),z=re("svg"),K=re("path"),S=h(),B=r("div"),F=_(U),o(e,"type","checkbox"),e.checked=!0,o(a,"class","collapse-title text-sm font-medium"),o(w,"stroke-linecap","round"),o(w,"stroke-linejoin","round"),o(w,"stroke-width","2"),o(w,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(k,"xmlns","http://www.w3.org/2000/svg"),o(k,"fill","none"),o(k,"viewBox","0 0 24 24"),o(k,"class","stroke-current shrink-0 w-4 h-4 opacity-60"),o(P,"class","text-xs bg-base-300 px-1 rounded"),o(j,"class","mt-1"),o(b,"class","text-xs text-base-content/60 bg-base-200 rounded p-3 flex gap-2"),o(D,"type","button"),o(D,"class","btn btn-sm btn-ghost"),o(g,"class","collapse-content space-y-2"),o(s,"class","collapse collapse-arrow bg-base-200 collapse-open"),o(K,"stroke-linecap","round"),o(K,"stroke-linejoin","round"),o(K,"stroke-width","2"),o(K,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),o(z,"xmlns","http://www.w3.org/2000/svg"),o(z,"fill","none"),o(z,"viewBox","0 0 24 24"),o(z,"class","stroke-current shrink-0 w-4 h-4"),o(x,"class","alert alert-warning shadow-sm text-xs")},m($,te){L($,s,te),t(s,e),t(s,n),t(s,a),t(a,u),t(a,c),t(a,d),t(a,p),t(s,m),t(s,g),t(g,b),t(b,k),t(k,w),t(b,C),t(b,E),t(E,y),t(y,M),t(E,R),t(E,j),t(j,P),t(g,I);for(let ae=0;ae<ne.length;ae+=1)ne[ae]&&ne[ae].m(g,null);t(g,q),t(g,D),t(D,A),t(D,Z),L($,Q,te),L($,x,te),t(x,z),t(z,K),t(x,S),t(x,B),t(B,F),J||(ie=V(D,"click",l[6]),J=!0)},p($,te){if(te&32&&i!==(i=$[5]("auth.tokens")+"")&&v(u,i),te&8&&f!==(f=$[3].length+"")&&v(d,f),te&32&&T!==(T=$[5]("auth.expressionSupport")+"")&&v(M,T),te&168){ue=ut($[3]);let ae;for(ae=0;ae<ue.length;ae+=1){const ee=a1($,ue,ae);ne[ae]?ne[ae].p(ee,te):(ne[ae]=u1(ee),ne[ae].c(),ne[ae].m(g,q))}for(;ae<ne.length;ae+=1)ne[ae].d(1);ne.length=ue.length}te&32&&N!==(N=$[5]("auth.addToken")+"")&&v(Z,N),te&32&&U!==(U=$[5]("auth.securityNotice")+"")&&v(F,U)},d($){$&&(H(s),H(Q),H(x)),Gt(ne,$),J=!1,ie()}}}function u1(l){let s,e,n,a,i,u,c;function f(){l[11].call(e,l[15])}function d(){return l[12](l[15])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("button"),i.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[5]("auth.tokenPlaceholder")),o(e,"class","input input-bordered input-sm flex-1 font-mono text-xs"),o(i,"type","button"),o(i,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(p,m){L(p,s,m),t(s,e),Y(e,l[3][l[15]]),t(s,a),t(s,i),u||(c=[V(e,"input",f),V(i,"click",d)],u=!0)},p(p,m){l=p,m&32&&n!==(n=l[5]("auth.tokenPlaceholder"))&&o(e,"placeholder",n),m&8&&e.value!==l[3][l[15]]&&Y(e,l[3][l[15]])},d(p){p&&H(s),u=!1,vt(c)}}}function g2(l){let s,e,n,a,i,u,c,f,d,p,m,g,b=l[5]("auth.enableAuth")+"",k,w,C,E,y=l[1]&&r1(l),T=l[2]&&i1(l);return{c(){s=r("div"),e=r("div"),n=r("span"),a=_(l[0]),i=h(),y&&y.c(),u=h(),c=r("div"),f=r("div"),d=r("label"),p=r("input"),m=h(),g=r("span"),k=_(b),w=h(),T&&T.c(),o(n,"class","label-text font-semibold"),o(e,"class","label"),o(p,"type","checkbox"),o(p,"class","checkbox"),o(g,"class","label-text"),o(d,"class","label cursor-pointer justify-start gap-4"),o(f,"class","form-control"),o(c,"class","space-y-4"),o(s,"class","form-control w-full")},m(M,R){L(M,s,R),t(s,e),t(e,n),t(n,a),t(e,i),y&&y.m(e,null),t(s,u),t(s,c),t(c,f),t(f,d),t(d,p),p.checked=l[2],t(d,m),t(d,g),t(g,k),t(c,w),T&&T.m(c,null),C||(E=[V(p,"change",l[9]),V(p,"change",l[10])],C=!0)},p(M,[R]){R&1&&v(a,M[0]),M[1]?y?y.p(M,R):(y=r1(M),y.c(),y.m(e,null)):y&&(y.d(1),y=null),R&4&&(p.checked=M[2]),R&32&&b!==(b=M[5]("auth.enableAuth")+"")&&v(k,b),M[2]?T?T.p(M,R):(T=i1(M),T.c(),T.m(c,null)):T&&(T.d(1),T=null)},i:ot,o:ot,d(M){M&&H(s),y&&y.d(),T&&T.d(),C=!1,vt(E)}}}function _2(l,s,e){let n;Dt(l,Rt,C=>e(5,n=C));let{value:a=void 0}=s,{label:i="Authentication"}=s,{showHelp:u=!0}=s,c=!1,f=[],d=!1;function p(){e(3,f=[...f,""]),e(4,d=!0)}function m(C){e(3,f=f.filter((E,y)=>y!==C))}function g(){c=this.checked,e(2,c),e(4,d),e(8,a),e(3,f)}const b=()=>{c&&f.length===0&&e(3,f=[""]),e(4,d=!0)};function k(C){f[C]=this.value,e(3,f),e(4,d),e(8,a),e(2,c)}const w=C=>m(C);return l.$$set=C=>{"value"in C&&e(8,a=C.value),"label"in C&&e(0,i=C.label),"showHelp"in C&&e(1,u=C.showHelp)},l.$$.update=()=>{if(l.$$.dirty&284)if(!d&&a&&(e(2,c=a.enabled||!1),e(3,f=a.tokens?[...a.tokens]:[]),e(4,d=!0)),c){const C=f.filter(E=>E.trim()!=="");a?(e(8,a.enabled=!0,a),e(8,a.tokens=C,a)):e(8,a={enabled:!0,tokens:C})}else a&&(e(8,a.enabled=!1,a),e(8,a.tokens=[],a))},[i,u,c,f,d,n,p,m,a,g,b,k,w]}class xp extends Nt{constructor(s){super(),Ut(this,s,_2,g2,Vt,{value:8,label:0,showHelp:1})}}async function b2(l={}){const s=new URLSearchParams;return Object.entries(l).forEach(([e,n])=>{n!=null&&(Array.isArray(n)?n.forEach(a=>s.append(e,String(a))):s.append(e,String(n)))}),yl.get(\`/logs?\${s.toString()}\`)}async function v2(l={},s="json"){const e=new URLSearchParams;Object.entries(l).forEach(([a,i])=>{i!=null&&e.append(a,String(i))}),e.append("format",s);const n=await fetch(\`/__ui/api/logs/export?\${e.toString()}\`);if(!n.ok)throw new Error("Failed to export logs");return n.blob()}async function Eu(l){return(await yl.get(\`/logs/body/\${l}\`)).content}async function Tu(l){return yl.get(\`/logs/headers/\${l}\`)}async function k2(){return yl.get("/logs/cleanup/config")}async function w2(){return yl.post("/logs/cleanup")}function f1(l){let s,e;return{c(){s=r("h3"),e=_(l[1]),o(s,"class","text-lg font-semibold")},m(n,a){L(n,s,a),t(s,e)},p(n,a){a&2&&v(e,n[1])},d(n){n&&H(s)}}}function c1(l){let s,e,n,a,i=l[6]("logging.maxSize")+"",u,c,f,d,p,m,g,b,k,w=l[6]("logging.maxSizeHelp")+"",C,E,y,T,M,R=l[6]("logging.retentionDays")+"",j,P,I,q,D,A,N=l[6]("logging.days")+"",Z,Q,x,z,K=l[6]("logging.retentionDaysHelp")+"",S,B,U;return{c(){s=r("div"),e=r("div"),n=r("label"),a=r("span"),u=_(i),c=h(),f=r("div"),d=r("input"),p=h(),m=r("span"),m.textContent="KB",g=h(),b=r("div"),k=r("span"),C=_(w),E=h(),y=r("div"),T=r("label"),M=r("span"),j=_(R),P=h(),I=r("div"),q=r("input"),D=h(),A=r("span"),Z=_(N),Q=h(),x=r("div"),z=r("span"),S=_(K),o(a,"class","label-text"),o(n,"class","label"),o(n,"for","logging-max-size"),o(d,"id","logging-max-size"),o(d,"type","number"),o(d,"class","input input-bordered flex-1"),o(d,"min","1024"),o(d,"max","102400"),o(d,"step","1024"),o(m,"class","text-sm text-gray-500"),o(f,"class","flex gap-2 items-center"),o(k,"class","label-text-alt"),o(b,"class","label"),o(e,"class","form-control"),o(M,"class","label-text"),o(T,"class","label"),o(T,"for","logging-retention-days"),o(q,"id","logging-retention-days"),o(q,"type","number"),o(q,"class","input input-bordered flex-1"),o(q,"min","1"),o(q,"max","30"),o(A,"class","text-sm text-gray-500"),o(I,"class","flex gap-2 items-center"),o(z,"class","label-text-alt"),o(x,"class","label"),o(y,"class","form-control"),o(s,"class","ml-8 space-y-4")},m(F,J){L(F,s,J),t(s,e),t(e,n),t(n,a),t(a,u),t(e,c),t(e,f),t(f,d),Y(d,l[0].body.maxSize),t(f,p),t(f,m),t(e,g),t(e,b),t(b,k),t(k,C),t(s,E),t(s,y),t(y,T),t(T,M),t(M,j),t(y,P),t(y,I),t(I,q),Y(q,l[0].body.retentionDays),t(I,D),t(I,A),t(A,Z),t(y,Q),t(y,x),t(x,z),t(z,S),B||(U=[V(d,"input",l[10]),V(d,"input",l[7]),V(q,"input",l[11]),V(q,"input",l[7])],B=!0)},p(F,J){J&64&&i!==(i=F[6]("logging.maxSize")+"")&&v(u,i),J&1&&Mt(d.value)!==F[0].body.maxSize&&Y(d,F[0].body.maxSize),J&64&&w!==(w=F[6]("logging.maxSizeHelp")+"")&&v(C,w),J&64&&R!==(R=F[6]("logging.retentionDays")+"")&&v(j,R),J&1&&Mt(q.value)!==F[0].body.retentionDays&&Y(q,F[0].body.retentionDays),J&64&&N!==(N=F[6]("logging.days")+"")&&v(Z,N),J&64&&K!==(K=F[6]("logging.retentionDaysHelp")+"")&&v(S,K)},d(F){F&&H(s),B=!1,vt(U)}}}function y2(l){let s,e,n,a=l[6]("logging.cleanupStatus")+"",i,u,c,f=(l[2].isActive?l[6]("logging.active"):l[6]("logging.inactive"))+"",d,p,m,g,b,k=l[6]("logging.cleanupRetention")+"",w,C,E,y=l[2].retentionDays+"",T,M,R=l[6]("logging.days")+"",j,P,I,q,D=l[6]("logging.cleanupInterval")+"",A,N,Z,Q=l[2].scheduleIntervalHours+"",x,z,K=l[6]("logging.hours")+"",S,B,U,F,J=l[6]("logging.manualCleanup")+"",ie,ue,ne,$,te;function ae(oe,ge){return oe[4]?T2:E2}let ee=ae(l),G=ee(l),pe=l[5]&&d1(l);return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("span"),d=_(f),m=h(),g=r("div"),b=r("span"),w=_(k),C=h(),E=r("span"),T=_(y),M=h(),j=_(R),P=h(),I=r("div"),q=r("span"),A=_(D),N=h(),Z=r("span"),x=_(Q),z=h(),S=_(K),B=h(),U=r("button"),G.c(),F=h(),ie=_(J),ue=h(),pe&&pe.c(),ne=Ul(),o(n,"class","text-gray-500"),o(c,"class",p="font-semibold "+(l[2].isActive?"text-success":"text-error")),o(e,"class","flex justify-between text-sm"),o(b,"class","text-gray-500"),o(E,"class","font-semibold"),o(g,"class","flex justify-between text-sm"),o(q,"class","text-gray-500"),o(Z,"class","font-semibold"),o(I,"class","flex justify-between text-sm"),o(s,"class","bg-base-200 p-4 rounded-lg space-y-2"),o(U,"class","btn btn-outline btn-sm w-full"),U.disabled=l[4]},m(oe,ge){L(oe,s,ge),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,d),t(s,m),t(s,g),t(g,b),t(b,w),t(g,C),t(g,E),t(E,T),t(E,M),t(E,j),t(s,P),t(s,I),t(I,q),t(q,A),t(I,N),t(I,Z),t(Z,x),t(Z,z),t(Z,S),L(oe,B,ge),L(oe,U,ge),G.m(U,null),t(U,F),t(U,ie),L(oe,ue,ge),pe&&pe.m(oe,ge),L(oe,ne,ge),$||(te=V(U,"click",l[8]),$=!0)},p(oe,ge){ge&64&&a!==(a=oe[6]("logging.cleanupStatus")+"")&&v(i,a),ge&68&&f!==(f=(oe[2].isActive?oe[6]("logging.active"):oe[6]("logging.inactive"))+"")&&v(d,f),ge&4&&p!==(p="font-semibold "+(oe[2].isActive?"text-success":"text-error"))&&o(c,"class",p),ge&64&&k!==(k=oe[6]("logging.cleanupRetention")+"")&&v(w,k),ge&4&&y!==(y=oe[2].retentionDays+"")&&v(T,y),ge&64&&R!==(R=oe[6]("logging.days")+"")&&v(j,R),ge&64&&D!==(D=oe[6]("logging.cleanupInterval")+"")&&v(A,D),ge&4&&Q!==(Q=oe[2].scheduleIntervalHours+"")&&v(x,Q),ge&64&&K!==(K=oe[6]("logging.hours")+"")&&v(S,K),ee!==(ee=ae(oe))&&(G.d(1),G=ee(oe),G&&(G.c(),G.m(U,F))),ge&64&&J!==(J=oe[6]("logging.manualCleanup")+"")&&v(ie,J),ge&16&&(U.disabled=oe[4]),oe[5]?pe?pe.p(oe,ge):(pe=d1(oe),pe.c(),pe.m(ne.parentNode,ne)):pe&&(pe.d(1),pe=null)},d(oe){oe&&(H(s),H(B),H(U),H(ue),H(ne)),G.d(),pe&&pe.d(oe),$=!1,te()}}}function C2(l){let s,e,n,a,i=l[6]("common.loading")+"",u;return{c(){s=r("div"),e=r("span"),n=h(),a=r("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-2")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f&64&&i!==(i=c[6]("common.loading")+"")&&v(u,i)},d(c){c&&H(s)}}}function E2(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function T2(l){let s;return{c(){s=r("span"),o(s,"class","loading loading-spinner loading-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function d1(l){let s,e,n,a,i,u,c=l[6]("logging.lastCleanup")+"",f,d,p,m,g=l[6]("logging.deletedSqliteRecords")+"",b,k,w=l[5].deletedSqliteRecords+"",C,E,y,T=l[6]("logging.deletedFileLogFiles")+"",M,R,j=l[5].deletedFileLogFiles+"",P,I,q,D=l[6]("logging.deletedBodyFiles")+"",A,N,Z=l[5].deletedBodyDirs+"",Q,x,z=l[6]("logging.dirs")+"",K,S,B=l[5].deletedBodyFiles+"",U,F,J=l[6]("logging.files")+"",ie,ue,ne,$=l[6]("logging.duration")+"",te,ae,ee=l[5].durationMs+"",G,pe;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("div"),u=r("div"),f=_(c),d=h(),p=r("div"),m=r("div"),b=_(g),k=_(": "),C=_(w),E=h(),y=r("div"),M=_(T),R=_(": "),P=_(j),I=h(),q=r("div"),A=_(D),N=_(": "),Q=_(Z),x=h(),K=_(z),S=_(", "),U=_(B),F=h(),ie=_(J),ue=h(),ne=r("div"),te=_($),ae=_(": "),G=_(ee),pe=_("ms"),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(u,"class","font-semibold"),o(p,"class","mt-1 space-y-1"),o(i,"class","text-sm"),o(s,"class","alert alert-success")},m(oe,ge){L(oe,s,ge),t(s,e),t(e,n),t(s,a),t(s,i),t(i,u),t(u,f),t(i,d),t(i,p),t(p,m),t(m,b),t(m,k),t(m,C),t(p,E),t(p,y),t(y,M),t(y,R),t(y,P),t(p,I),t(p,q),t(q,A),t(q,N),t(q,Q),t(q,x),t(q,K),t(q,S),t(q,U),t(q,F),t(q,ie),t(p,ue),t(p,ne),t(ne,te),t(ne,ae),t(ne,G),t(ne,pe)},p(oe,ge){ge&64&&c!==(c=oe[6]("logging.lastCleanup")+"")&&v(f,c),ge&64&&g!==(g=oe[6]("logging.deletedSqliteRecords")+"")&&v(b,g),ge&32&&w!==(w=oe[5].deletedSqliteRecords+"")&&v(C,w),ge&64&&T!==(T=oe[6]("logging.deletedFileLogFiles")+"")&&v(M,T),ge&32&&j!==(j=oe[5].deletedFileLogFiles+"")&&v(P,j),ge&64&&D!==(D=oe[6]("logging.deletedBodyFiles")+"")&&v(A,D),ge&32&&Z!==(Z=oe[5].deletedBodyDirs+"")&&v(Q,Z),ge&64&&z!==(z=oe[6]("logging.dirs")+"")&&v(K,z),ge&32&&B!==(B=oe[5].deletedBodyFiles+"")&&v(U,B),ge&64&&J!==(J=oe[6]("logging.files")+"")&&v(ie,J),ge&64&&$!==($=oe[6]("logging.duration")+"")&&v(te,$),ge&32&&ee!==(ee=oe[5].durationMs+"")&&v(G,ee)},d(oe){oe&&H(s)}}}function S2(l){let s,e,n,a,i,u,c,f,d=l[6]("logging.bodyRecording")+"",p,m,g,b=l[6]("logging.bodyRecordingHelp")+"",k,w,C,E,y,T,M=l[6]("logging.cleanupConfig")+"",R,j,P,I,q=l[1]&&f1(l),D=l[0].body.enabled&&c1(l);function A(Q,x){if(Q[3])return C2;if(Q[2])return y2}let N=A(l),Z=N&&N(l);return{c(){s=r("div"),q&&q.c(),e=h(),n=r("div"),a=r("label"),i=r("input"),u=h(),c=r("div"),f=r("span"),p=_(d),m=h(),g=r("p"),k=_(b),w=h(),D&&D.c(),C=h(),E=r("div"),y=h(),T=r("h4"),R=_(M),j=h(),Z&&Z.c(),o(i,"type","checkbox"),o(i,"class","checkbox"),o(f,"class","label-text font-semibold"),o(g,"class","text-xs text-gray-500 mt-1"),o(c,"class","flex-1"),o(a,"class","label cursor-pointer justify-start gap-4"),o(n,"class","form-control"),o(E,"class","divider"),o(T,"class","font-semibold"),o(s,"class","space-y-4")},m(Q,x){L(Q,s,x),q&&q.m(s,null),t(s,e),t(s,n),t(n,a),t(a,i),i.checked=l[0].body.enabled,t(a,u),t(a,c),t(c,f),t(f,p),t(c,m),t(c,g),t(g,k),t(s,w),D&&D.m(s,null),t(s,C),t(s,E),t(s,y),t(s,T),t(T,R),t(s,j),Z&&Z.m(s,null),P||(I=[V(i,"change",l[9]),V(i,"change",l[7])],P=!0)},p(Q,[x]){Q[1]?q?q.p(Q,x):(q=f1(Q),q.c(),q.m(s,e)):q&&(q.d(1),q=null),x&1&&(i.checked=Q[0].body.enabled),x&64&&d!==(d=Q[6]("logging.bodyRecording")+"")&&v(p,d),x&64&&b!==(b=Q[6]("logging.bodyRecordingHelp")+"")&&v(k,b),Q[0].body.enabled?D?D.p(Q,x):(D=c1(Q),D.c(),D.m(s,C)):D&&(D.d(1),D=null),x&64&&M!==(M=Q[6]("logging.cleanupConfig")+"")&&v(R,M),N===(N=A(Q))&&Z?Z.p(Q,x):(Z&&Z.d(1),Z=N&&N(Q),Z&&(Z.c(),Z.m(s,null)))},i:ot,o:ot,d(Q){Q&&H(s),q&&q.d(),D&&D.d(),Z&&Z.d(),P=!1,vt(I)}}}function M2(l,s,e){let n;Dt(l,Rt,E=>e(6,n=E));let{value:a=null}=s,{label:i=""}=s;const u=oa();let c=null,f=!1,d=!1,p=null;function m(){u("input")}async function g(){e(3,f=!0);try{e(2,c=await k2())}catch(E){console.error("Failed to load cleanup config:",E),jt.show(n("common.error")+": "+(E instanceof Error?E.message:"Unknown error"),"error")}finally{e(3,f=!1)}}async function b(){if(confirm(n("logging.confirmCleanup"))){e(4,d=!0);try{e(5,p=await w2()),jt.show(n("logging.cleanupSuccess"),"success"),await g()}catch(E){console.error("Failed to trigger cleanup:",E),jt.show(n("logging.cleanupFailed",{values:{error:E instanceof Error?E.message:"Unknown error"}}),"error")}finally{e(4,d=!1)}}}Hs(()=>{g()});function k(){a.body.enabled=this.checked,e(0,a)}function w(){a.body.maxSize=Mt(this.value),e(0,a)}function C(){a.body.retentionDays=Mt(this.value),e(0,a)}return l.$$set=E=>{"value"in E&&e(0,a=E.value),"label"in E&&e(1,i=E.label)},l.$$.update=()=>{l.$$.dirty&1&&(a||e(0,a={body:{enabled:!1,maxSize:5120,retentionDays:1}})),l.$$.dirty&1&&a&&!a.body&&e(0,a.body={enabled:!1,maxSize:5120,retentionDays:1},a)},[a,i,c,f,d,p,n,m,b,k,w,C]}class R2 extends Nt{constructor(s){super(),Ut(this,s,M2,S2,Vt,{value:0,label:1})}}function q2(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function H2(l){let s;return{c(){s=r("span"),o(s,"class","loading loading-spinner loading-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function L2(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function P2(l){let s;return{c(){s=r("span"),o(s,"class","loading loading-spinner loading-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function j2(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function D2(l){let s;return{c(){s=r("span"),o(s,"class","loading loading-spinner loading-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function B2(l){let s,e,n,a,i,u=l[11]("configuration.formEditor")+"",c,f,d,p,m,g,b=l[11]("configuration.jsonEditor")+"",k,w,C,E,y,T,M,R,j;const P=[z2,F2],I=[];function q(D,A){return D[7]==="form"?0:1}return C=q(l),E=I[C]=P[C](l),M=Mu(l[20][0]),{c(){s=r("div"),e=r("label"),n=r("input"),a=h(),i=r("span"),c=_(u),f=h(),d=r("label"),p=r("input"),m=h(),g=r("span"),k=_(b),w=h(),E.c(),y=Ul(),o(n,"class","sr-only"),o(n,"type","radio"),o(n,"name","editMode"),n.__value="form",Y(n,n.__value),o(i,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(i,"bg-primary",l[7]==="form"),le(i,"text-primary-content",l[7]==="form"),le(i,"shadow",l[7]==="form"),le(i,"text-gray-700",l[7]!=="form"),le(i,"dark:text-gray-300",l[7]!=="form"),le(i,"hover:text-gray-900",l[7]!=="form"),le(i,"dark:hover:text-gray-100",l[7]!=="form"),o(e,"class","cursor-pointer"),o(p,"class","sr-only"),o(p,"type","radio"),o(p,"name","editMode"),p.__value="json",Y(p,p.__value),o(g,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(g,"bg-primary",l[7]==="json"),le(g,"text-primary-content",l[7]==="json"),le(g,"shadow",l[7]==="json"),le(g,"text-gray-700",l[7]!=="json"),le(g,"dark:text-gray-300",l[7]!=="json"),le(g,"hover:text-gray-900",l[7]!=="json"),le(g,"dark:hover:text-gray-100",l[7]!=="json"),o(d,"class","cursor-pointer"),o(s,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm mb-4"),M.p(n,p)},m(D,A){L(D,s,A),t(s,e),t(e,n),n.checked=n.__value===l[7],t(e,a),t(e,i),t(i,c),t(s,f),t(s,d),t(d,p),p.checked=p.__value===l[7],t(d,m),t(d,g),t(g,k),L(D,w,A),I[C].m(D,A),L(D,y,A),T=!0,R||(j=[V(n,"change",l[19]),V(p,"change",l[21])],R=!0)},p(D,A){A[0]&128&&(n.checked=n.__value===D[7]),(!T||A[0]&2048)&&u!==(u=D[11]("configuration.formEditor")+"")&&v(c,u),(!T||A[0]&128)&&le(i,"bg-primary",D[7]==="form"),(!T||A[0]&128)&&le(i,"text-primary-content",D[7]==="form"),(!T||A[0]&128)&&le(i,"shadow",D[7]==="form"),(!T||A[0]&128)&&le(i,"text-gray-700",D[7]!=="form"),(!T||A[0]&128)&&le(i,"dark:text-gray-300",D[7]!=="form"),(!T||A[0]&128)&&le(i,"hover:text-gray-900",D[7]!=="form"),(!T||A[0]&128)&&le(i,"dark:hover:text-gray-100",D[7]!=="form"),A[0]&128&&(p.checked=p.__value===D[7]),(!T||A[0]&2048)&&b!==(b=D[11]("configuration.jsonEditor")+"")&&v(k,b),(!T||A[0]&128)&&le(g,"bg-primary",D[7]==="json"),(!T||A[0]&128)&&le(g,"text-primary-content",D[7]==="json"),(!T||A[0]&128)&&le(g,"shadow",D[7]==="json"),(!T||A[0]&128)&&le(g,"text-gray-700",D[7]!=="json"),(!T||A[0]&128)&&le(g,"dark:text-gray-300",D[7]!=="json"),(!T||A[0]&128)&&le(g,"hover:text-gray-900",D[7]!=="json"),(!T||A[0]&128)&&le(g,"dark:hover:text-gray-100",D[7]!=="json");let N=C;C=q(D),C===N?I[C].p(D,A):(Gl(),st(I[N],1,1,()=>{I[N]=null}),Kl(),E=I[C],E?E.p(D,A):(E=I[C]=P[C](D),E.c()),et(E,1),E.m(y.parentNode,y))},i(D){T||(et(E),T=!0)},o(D){st(E),T=!1},d(D){D&&(H(s),H(w),H(y)),I[C].d(D),M.r(),R=!1,vt(j)}}}function I2(l){let s,e,n,a,i,u=l[11]("common.error")+"",c,f,d;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),f=_(": "),d=_(l[2]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(s,"class","alert alert-error")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c),t(i,f),t(i,d)},p(p,m){m[0]&2048&&u!==(u=p[11]("common.error")+"")&&v(c,u),m[0]&4&&v(d,p[2])},i:ot,o:ot,d(p){p&&H(s)}}}function A2(l){let s;return{c(){s=r("div"),s.innerHTML='<span class="loading loading-spinner loading-lg"></span>',o(s,"class","flex justify-center items-center h-64")},m(e,n){L(e,s,n)},p:ot,i:ot,o:ot,d(e){e&&H(s)}}}function F2(l){let s,e,n,a=l[11]("configuration.jsonConfiguration")+"",i,u,c,f,d,p,m,g=l[11]("configuration.jsonHelp")+"",b,k,w,C=l[9]&&p1(l);return{c(){s=r("div"),e=r("div"),n=r("h2"),i=_(a),u=h(),C&&C.c(),c=h(),f=r("textarea"),p=h(),m=r("p"),b=_(g),o(n,"class","card-title"),o(f,"class","textarea textarea-bordered font-mono text-sm h-96"),o(f,"placeholder",d=l[11]("configuration.jsonPlaceholder")),o(m,"class","text-sm text-gray-500 mt-2"),o(e,"class","card-body"),o(s,"class","card bg-base-100 shadow-xl")},m(E,y){L(E,s,y),t(s,e),t(e,n),t(n,i),t(e,u),C&&C.m(e,null),t(e,c),t(e,f),Y(f,l[8]),t(e,p),t(e,m),t(m,b),k||(w=[V(f,"input",l[28]),V(f,"input",l[12])],k=!0)},p(E,y){y[0]&2048&&a!==(a=E[11]("configuration.jsonConfiguration")+"")&&v(i,a),E[9]?C?C.p(E,y):(C=p1(E),C.c(),C.m(e,c)):C&&(C.d(1),C=null),y[0]&2048&&d!==(d=E[11]("configuration.jsonPlaceholder"))&&o(f,"placeholder",d),y[0]&256&&Y(f,E[8]),y[0]&2048&&g!==(g=E[11]("configuration.jsonHelp")+"")&&v(b,g)},i:ot,o:ot,d(E){E&&H(s),C&&C.d(),k=!1,vt(w)}}}function z2(l){let s,e,n,a=l[11]("configuration.systemSettings")+"",i,u,c,f,d,p=l[11]("configuration.serverPort")+"",m,g,b,k,w,C,E,y=l[11]("configuration.workerProcesses")+"",T,M,R,j,P,I,q=l[11]("configuration.workerProcessesHelp")+"",D,A,N,Z,Q,x=l[11]("configuration.logLevel")+"",z,K,S,B,U,F,J,ie,ue,ne,$,te=l[11]("configuration.bodyParserLimit")+"",ae,ee,G,pe,oe,ge,he=l[11]("configuration.bodyParserLimitHelp")+"",ye,ze,Pe,we,Fe,Je,je,Le,Se,fe,_e,Ie,De,se,ke=l[11]("configuration.requiresRestart")+"",me,Ee,Ve,Be,nt,Ne=l[11]("logging.title")+"",Qe,Ye,ve,de,Te,Ze,Me,Ue,Ce=l[11]("routes.title")+"",mt,Ge,ce,qe,Re,dt,We,O=l[11]("configuration.routesConfigured",{values:{count:l[1].routes.length}})+"",He,X,ft=l[11]("configuration.manageRoutes")+"",Ht,Ke,_t,tt;function it(rt){l[26](rt)}let Oe={label:l[11]("auth.globalAuth")};l[1].auth!==void 0&&(Oe.value=l[1].auth),Fe=new xp({props:Oe}),Sl.push(()=>Ml(Fe,"value",it));function Xe(rt){l[27](rt)}let It={};return l[1].logging!==void 0&&(It.value=l[1].logging),ve=new R2({props:It}),Sl.push(()=>Ml(ve,"value",Xe)),{c(){s=r("div"),e=r("div"),n=r("h2"),i=_(a),u=h(),c=r("div"),f=r("label"),d=r("span"),m=_(p),g=h(),b=r("input"),k=h(),w=r("div"),C=r("label"),E=r("span"),T=_(y),M=h(),R=r("input"),j=h(),P=r("div"),I=r("span"),D=_(q),A=h(),N=r("div"),Z=r("label"),Q=r("span"),z=_(x),K=h(),S=r("select"),B=r("option"),B.textContent="Debug",U=r("option"),U.textContent="Info",F=r("option"),F.textContent="Warning",J=r("option"),J.textContent="Error",ie=h(),ue=r("div"),ne=r("label"),$=r("span"),ae=_(te),ee=h(),G=r("input"),pe=h(),oe=r("div"),ge=r("span"),ye=_(he),ze=h(),Pe=r("div"),we=h(),Et(Fe.$$.fragment),je=h(),Le=r("div"),Se=h(),fe=r("div"),_e=re("svg"),Ie=re("path"),De=h(),se=r("span"),me=_(ke),Ee=h(),Ve=r("div"),Be=r("div"),nt=r("h2"),Qe=_(Ne),Ye=h(),Et(ve.$$.fragment),Te=h(),Ze=r("div"),Me=r("div"),Ue=r("h2"),mt=_(Ce),Ge=h(),ce=r("div"),qe=re("svg"),Re=re("path"),dt=h(),We=r("span"),He=_(O),X=h(),Ht=_(ft),o(n,"class","card-title"),o(d,"class","label-text"),o(f,"class","label"),o(f,"for","config-port"),o(b,"id","config-port"),o(b,"type","number"),o(b,"class","input input-bordered"),o(b,"placeholder","8088"),o(c,"class","form-control"),o(E,"class","label-text"),o(C,"class","label"),o(C,"for","config-workers"),o(R,"id","config-workers"),o(R,"type","number"),o(R,"class","input input-bordered"),o(R,"min","1"),o(R,"placeholder","2"),o(I,"class","label-text-alt"),o(P,"class","label"),o(w,"class","form-control"),o(Q,"class","label-text"),o(Z,"class","label"),o(Z,"for","config-log-level"),B.__value="debug",Y(B,B.__value),U.__value="info",Y(U,U.__value),F.__value="warn",Y(F,F.__value),J.__value="error",Y(J,J.__value),o(S,"id","config-log-level"),o(S,"class","select select-bordered"),l[1].logLevel===void 0&&pl(()=>l[24].call(S)),o(N,"class","form-control"),o($,"class","label-text"),o(ne,"class","label"),o(ne,"for","config-body-limit"),o(G,"id","config-body-limit"),o(G,"type","text"),o(G,"class","input input-bordered"),o(G,"placeholder","50mb"),o(ge,"class","label-text-alt"),o(oe,"class","label"),o(ue,"class","form-control"),o(Pe,"class","divider"),o(Le,"class","divider"),o(Ie,"stroke-linecap","round"),o(Ie,"stroke-linejoin","round"),o(Ie,"stroke-width","2"),o(Ie,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),o(_e,"xmlns","http://www.w3.org/2000/svg"),o(_e,"class","stroke-current shrink-0 h-6 w-6"),o(_e,"fill","none"),o(_e,"viewBox","0 0 24 24"),o(fe,"class","alert alert-warning"),o(e,"class","card-body"),o(s,"class","card bg-base-100 shadow-xl mb-4"),o(nt,"class","card-title"),o(Be,"class","card-body"),o(Ve,"class","card bg-base-100 shadow-xl mb-4"),o(Ue,"class","card-title"),o(Re,"stroke-linecap","round"),o(Re,"stroke-linejoin","round"),o(Re,"stroke-width","2"),o(Re,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(qe,"xmlns","http://www.w3.org/2000/svg"),o(qe,"fill","none"),o(qe,"viewBox","0 0 24 24"),o(qe,"class","stroke-current shrink-0 w-6 h-6"),o(ce,"class","alert alert-info"),o(Me,"class","card-body"),o(Ze,"class","card bg-base-100 shadow-xl")},m(rt,gt){L(rt,s,gt),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,f),t(f,d),t(d,m),t(c,g),t(c,b),Y(b,l[1].port),t(e,k),t(e,w),t(w,C),t(C,E),t(E,T),t(w,M),t(w,R),Y(R,l[1].workers),t(w,j),t(w,P),t(P,I),t(I,D),t(e,A),t(e,N),t(N,Z),t(Z,Q),t(Q,z),t(N,K),t(N,S),t(S,B),t(S,U),t(S,F),t(S,J),kt(S,l[1].logLevel,!0),t(e,ie),t(e,ue),t(ue,ne),t(ne,$),t($,ae),t(ue,ee),t(ue,G),Y(G,l[1].bodyParserLimit),t(ue,pe),t(ue,oe),t(oe,ge),t(ge,ye),t(e,ze),t(e,Pe),t(e,we),Ct(Fe,e,null),t(e,je),t(e,Le),t(e,Se),t(e,fe),t(fe,_e),t(_e,Ie),t(fe,De),t(fe,se),t(se,me),L(rt,Ee,gt),L(rt,Ve,gt),t(Ve,Be),t(Be,nt),t(nt,Qe),t(Be,Ye),Ct(ve,Be,null),L(rt,Te,gt),L(rt,Ze,gt),t(Ze,Me),t(Me,Ue),t(Ue,mt),t(Me,Ge),t(Me,ce),t(ce,qe),t(qe,Re),t(ce,dt),t(ce,We),t(We,He),t(We,X),t(We,Ht),Ke=!0,_t||(tt=[V(b,"input",l[22]),V(R,"input",l[23]),V(S,"change",l[24]),V(G,"input",l[25])],_t=!0)},p(rt,gt){(!Ke||gt[0]&2048)&&a!==(a=rt[11]("configuration.systemSettings")+"")&&v(i,a),(!Ke||gt[0]&2048)&&p!==(p=rt[11]("configuration.serverPort")+"")&&v(m,p),gt[0]&2&&Mt(b.value)!==rt[1].port&&Y(b,rt[1].port),(!Ke||gt[0]&2048)&&y!==(y=rt[11]("configuration.workerProcesses")+"")&&v(T,y),gt[0]&2&&Mt(R.value)!==rt[1].workers&&Y(R,rt[1].workers),(!Ke||gt[0]&2048)&&q!==(q=rt[11]("configuration.workerProcessesHelp")+"")&&v(D,q),(!Ke||gt[0]&2048)&&x!==(x=rt[11]("configuration.logLevel")+"")&&v(z,x),gt[0]&2&&kt(S,rt[1].logLevel),(!Ke||gt[0]&2048)&&te!==(te=rt[11]("configuration.bodyParserLimit")+"")&&v(ae,te),gt[0]&2&&G.value!==rt[1].bodyParserLimit&&Y(G,rt[1].bodyParserLimit),(!Ke||gt[0]&2048)&&he!==(he=rt[11]("configuration.bodyParserLimitHelp")+"")&&v(ye,he);const wt={};gt[0]&2048&&(wt.label=rt[11]("auth.globalAuth")),!Je&&gt[0]&2&&(Je=!0,wt.value=rt[1].auth,Rl(()=>Je=!1)),Fe.$set(wt),(!Ke||gt[0]&2048)&&ke!==(ke=rt[11]("configuration.requiresRestart")+"")&&v(me,ke),(!Ke||gt[0]&2048)&&Ne!==(Ne=rt[11]("logging.title")+"")&&v(Qe,Ne);const pt={};!de&&gt[0]&2&&(de=!0,pt.value=rt[1].logging,Rl(()=>de=!1)),ve.$set(pt),(!Ke||gt[0]&2048)&&Ce!==(Ce=rt[11]("routes.title")+"")&&v(mt,Ce),(!Ke||gt[0]&2050)&&O!==(O=rt[11]("configuration.routesConfigured",{values:{count:rt[1].routes.length}})+"")&&v(He,O),(!Ke||gt[0]&2048)&&ft!==(ft=rt[11]("configuration.manageRoutes")+"")&&v(Ht,ft)},i(rt){Ke||(et(Fe.$$.fragment,rt),et(ve.$$.fragment,rt),Ke=!0)},o(rt){st(Fe.$$.fragment,rt),st(ve.$$.fragment,rt),Ke=!1},d(rt){rt&&(H(s),H(Ee),H(Ve),H(Te),H(Ze)),yt(Fe),yt(ve),_t=!1,vt(tt)}}}function p1(l){let s,e,n,a,i,u=l[11]("configuration.jsonParseError",{values:{error:l[9]}})+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(s,"class","alert alert-error mb-4")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d[0]&2560&&u!==(u=f[11]("configuration.jsonParseError",{values:{error:f[9]}})+"")&&v(c,u)},d(f){f&&H(s)}}}function O2(l){let s,e,n,a,i=l[11]("configuration.title")+"",u,c,f,d=l[11]("configuration.subtitle")+"",p,m,g,b,k,w,C,E=l[11]("configuration.export")+"",y,T,M,R,j,P,I,q=l[11]("configuration.import")+"",D,A,N,Z,Q=l[11]("configuration.save")+"",x,z,K,S,B,U=l[11]("configuration.reload")+"",F,J,ie,ue,ne,$=l[11]("configuration.restart")+"",te,ae,ee,G,pe,oe,ge,he,ye,ze,Pe,we=l[11]("configuration.confirmRestart")+"",Fe,Je,je,Le=l[11]("configuration.restartMessage")+"",Se,fe,_e,Ie,De,se,ke,me=l[11]("configuration.restartWarning")+"",Ee,Ve,Be,nt,Ne=l[11]("common.cancel")+"",Qe,Ye,ve,de,Te,Ze,Me=l[11]("configuration.restart")+"",Ue,Ce,mt,Ge;function ce(tt,it){return tt[6]?H2:q2}let qe=ce(l),Re=qe(l);function dt(tt,it){return tt[4]?P2:L2}let We=dt(l),O=We(l);function He(tt,it){return tt[5]?D2:j2}let X=He(l),ft=X(l);const Ht=[A2,I2,B2],Ke=[];function _t(tt,it){return tt[3]?0:tt[2]?1:tt[1]?2:-1}return~(G=_t(l))&&(pe=Ke[G]=Ht[G](l)),{c(){s=r("div"),e=r("div"),n=r("div"),a=r("h1"),u=_(i),c=h(),f=r("p"),p=_(d),m=h(),g=r("div"),b=r("button"),k=re("svg"),w=re("path"),C=h(),y=_(E),M=h(),R=r("button"),j=re("svg"),P=re("path"),I=h(),D=_(q),A=h(),N=r("button"),Re.c(),Z=h(),x=_(Q),K=h(),S=r("button"),O.c(),B=h(),F=_(U),ie=h(),ue=r("button"),ft.c(),ne=h(),te=_($),ee=h(),pe&&pe.c(),oe=h(),ge=r("input"),he=h(),ye=r("div"),ze=r("div"),Pe=r("h3"),Fe=_(we),Je=h(),je=r("p"),Se=_(Le),fe=h(),_e=r("div"),Ie=re("svg"),De=re("path"),se=h(),ke=r("span"),Ee=_(me),Ve=h(),Be=r("div"),nt=r("button"),Qe=_(Ne),Ye=h(),ve=r("button"),de=re("svg"),Te=re("path"),Ze=h(),Ue=_(Me),o(a,"class","text-3xl font-bold"),o(f,"class","text-sm text-gray-500 mt-1"),o(w,"stroke-linecap","round"),o(w,"stroke-linejoin","round"),o(w,"stroke-width","2"),o(w,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(k,"xmlns","http://www.w3.org/2000/svg"),o(k,"class","h-4 w-4"),o(k,"fill","none"),o(k,"viewBox","0 0 24 24"),o(k,"stroke","currentColor"),o(b,"class","btn btn-outline btn-sm"),b.disabled=T=l[3]||!l[0],o(P,"stroke-linecap","round"),o(P,"stroke-linejoin","round"),o(P,"stroke-width","2"),o(P,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),o(j,"xmlns","http://www.w3.org/2000/svg"),o(j,"class","h-4 w-4"),o(j,"fill","none"),o(j,"viewBox","0 0 24 24"),o(j,"stroke","currentColor"),o(R,"class","btn btn-outline btn-sm"),R.disabled=l[3],o(N,"class","btn btn-success btn-sm"),N.disabled=z=l[6]||l[3]||!!l[9],o(S,"class","btn btn-primary btn-sm"),S.disabled=J=l[4]||l[3],o(ue,"class","btn btn-warning btn-sm"),ue.disabled=ae=l[5]||l[3],o(g,"class","flex gap-2"),o(e,"class","flex justify-between items-center mb-6"),o(ge,"type","checkbox"),o(ge,"class","modal-toggle"),o(Pe,"class","font-bold text-lg"),o(je,"class","py-4"),o(De,"stroke-linecap","round"),o(De,"stroke-linejoin","round"),o(De,"stroke-width","2"),o(De,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),o(Ie,"xmlns","http://www.w3.org/2000/svg"),o(Ie,"class","stroke-current shrink-0 h-6 w-6"),o(Ie,"fill","none"),o(Ie,"viewBox","0 0 24 24"),o(_e,"class","alert alert-warning"),o(nt,"class","btn btn-ghost"),o(Te,"stroke-linecap","round"),o(Te,"stroke-linejoin","round"),o(Te,"stroke-width","2"),o(Te,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(de,"xmlns","http://www.w3.org/2000/svg"),o(de,"class","h-4 w-4 mr-1"),o(de,"fill","none"),o(de,"viewBox","0 0 24 24"),o(de,"stroke","currentColor"),o(ve,"class","btn btn-warning"),o(Be,"class","modal-action"),o(ze,"class","modal-box"),o(ye,"class","modal"),le(ye,"modal-open",l[10]),o(s,"class","p-6")},m(tt,it){L(tt,s,it),t(s,e),t(e,n),t(n,a),t(a,u),t(n,c),t(n,f),t(f,p),t(e,m),t(e,g),t(g,b),t(b,k),t(k,w),t(b,C),t(b,y),t(g,M),t(g,R),t(R,j),t(j,P),t(R,I),t(R,D),t(g,A),t(g,N),Re.m(N,null),t(N,Z),t(N,x),t(g,K),t(g,S),O.m(S,null),t(S,B),t(S,F),t(g,ie),t(g,ue),ft.m(ue,null),t(ue,ne),t(ue,te),t(s,ee),~G&&Ke[G].m(s,null),t(s,oe),t(s,ge),ge.checked=l[10],t(s,he),t(s,ye),t(ye,ze),t(ze,Pe),t(Pe,Fe),t(ze,Je),t(ze,je),t(je,Se),t(ze,fe),t(ze,_e),t(_e,Ie),t(Ie,De),t(_e,se),t(_e,ke),t(ke,Ee),t(ze,Ve),t(ze,Be),t(Be,nt),t(nt,Qe),t(Be,Ye),t(Be,ve),t(ve,de),t(de,Te),t(ve,Ze),t(ve,Ue),Ce=!0,mt||(Ge=[V(b,"click",l[14]),V(R,"click",l[15]),V(N,"click",l[13]),V(S,"click",l[16]),V(ue,"click",l[18]),V(ge,"change",l[29]),V(nt,"click",l[30]),V(ve,"click",l[17])],mt=!0)},p(tt,it){(!Ce||it[0]&2048)&&i!==(i=tt[11]("configuration.title")+"")&&v(u,i),(!Ce||it[0]&2048)&&d!==(d=tt[11]("configuration.subtitle")+"")&&v(p,d),(!Ce||it[0]&2048)&&E!==(E=tt[11]("configuration.export")+"")&&v(y,E),(!Ce||it[0]&9&&T!==(T=tt[3]||!tt[0]))&&(b.disabled=T),(!Ce||it[0]&2048)&&q!==(q=tt[11]("configuration.import")+"")&&v(D,q),(!Ce||it[0]&8)&&(R.disabled=tt[3]),qe!==(qe=ce(tt))&&(Re.d(1),Re=qe(tt),Re&&(Re.c(),Re.m(N,Z))),(!Ce||it[0]&2048)&&Q!==(Q=tt[11]("configuration.save")+"")&&v(x,Q),(!Ce||it[0]&584&&z!==(z=tt[6]||tt[3]||!!tt[9]))&&(N.disabled=z),We!==(We=dt(tt))&&(O.d(1),O=We(tt),O&&(O.c(),O.m(S,B))),(!Ce||it[0]&2048)&&U!==(U=tt[11]("configuration.reload")+"")&&v(F,U),(!Ce||it[0]&24&&J!==(J=tt[4]||tt[3]))&&(S.disabled=J),X!==(X=He(tt))&&(ft.d(1),ft=X(tt),ft&&(ft.c(),ft.m(ue,ne))),(!Ce||it[0]&2048)&&$!==($=tt[11]("configuration.restart")+"")&&v(te,$),(!Ce||it[0]&40&&ae!==(ae=tt[5]||tt[3]))&&(ue.disabled=ae);let Oe=G;G=_t(tt),G===Oe?~G&&Ke[G].p(tt,it):(pe&&(Gl(),st(Ke[Oe],1,1,()=>{Ke[Oe]=null}),Kl()),~G?(pe=Ke[G],pe?pe.p(tt,it):(pe=Ke[G]=Ht[G](tt),pe.c()),et(pe,1),pe.m(s,oe)):pe=null),it[0]&1024&&(ge.checked=tt[10]),(!Ce||it[0]&2048)&&we!==(we=tt[11]("configuration.confirmRestart")+"")&&v(Fe,we),(!Ce||it[0]&2048)&&Le!==(Le=tt[11]("configuration.restartMessage")+"")&&v(Se,Le),(!Ce||it[0]&2048)&&me!==(me=tt[11]("configuration.restartWarning")+"")&&v(Ee,me),(!Ce||it[0]&2048)&&Ne!==(Ne=tt[11]("common.cancel")+"")&&v(Qe,Ne),(!Ce||it[0]&2048)&&Me!==(Me=tt[11]("configuration.restart")+"")&&v(Ue,Me),(!Ce||it[0]&1024)&&le(ye,"modal-open",tt[10])},i(tt){Ce||(et(pe),Ce=!0)},o(tt){st(pe),Ce=!1},d(tt){tt&&H(s),Re.d(),O.d(),ft.d(),~G&&Ke[G].d(),mt=!1,vt(Ge)}}}function N2(l,s,e){let n;Dt(l,Rt,B=>e(11,n=B));let a=null,i=null,u=null,c=!0,f=!1,d=!1,p=!1,m="form",g="",b=null,k=!1;async function w(){try{e(0,a=await Pu()),e(1,i=JSON.parse(JSON.stringify(a))),e(8,g=JSON.stringify(a,null,2)),e(2,u=null)}catch(B){e(2,u=B.message)}finally{e(3,c=!1)}}function C(){e(9,b=null);try{e(1,i=JSON.parse(g))}catch(B){e(9,b=B.message)}}async function E(){if(i){e(6,p=!0);try{const B=await P0(i);if(!B.valid){jt.show(n("configuration.validationFailed",{values:{error:B.error}}),"error");return}const U=await L0(i);U.success?(jt.show(n("configuration.saved"),"success"),e(0,a=JSON.parse(JSON.stringify(i)))):jt.show(n("configuration.saveFailed",{values:{error:U.message}}),"error")}catch(B){jt.show(n("configuration.saveFailed",{values:{error:B.message}}),"error")}finally{e(6,p=!1)}}}function y(){if(!a)return;const B=JSON.stringify(a,null,2),U="data:application/json;charset=utf-8,"+encodeURIComponent(B),F=\`bungee-config-\${new Date().toISOString().split("T")[0]}.json\`,J=document.createElement("a");J.setAttribute("href",U),J.setAttribute("download",F),J.click(),jt.show(n("configuration.exported"),"success")}function T(){const B=document.createElement("input");B.type="file",B.accept=".json",B.onchange=async U=>{const F=U.target.files[0];if(F)try{const J=await F.text(),ie=JSON.parse(J);e(1,i=ie),e(8,g=JSON.stringify(ie,null,2)),jt.show(n("configuration.imported"),"success")}catch(J){jt.show(n("configuration.importFailed",{values:{error:J.message}}),"error")}},B.click()}async function M(){e(4,f=!0);try{const B=await h2();B.success?(jt.show(n("configuration.reloaded"),"success"),await w()):jt.show(n("configuration.reloadFailed",{values:{error:B.message}}),"error")}catch(B){jt.show(n("configuration.reloadFailed",{values:{error:B.message}}),"error")}finally{e(4,f=!1)}}async function R(){e(10,k=!1),e(5,d=!0);try{const B=await m2();B.success?jt.show(n("configuration.restartSent"),"success"):B.error&&B.error.includes("daemon mode")?jt.show(n("configuration.restartDaemonOnly"),"error",8e3):jt.show(n("configuration.restartFailed",{values:{error:B.error||B.message}}),"error")}catch(B){jt.show(n("configuration.restartFailed",{values:{error:B.message}}),"error")}finally{e(5,d=!1)}}Hs(()=>{w()});const j=[[]],P=()=>e(10,k=!0);function I(){m=this.__value,e(7,m)}function q(){m=this.__value,e(7,m)}function D(){i.port=Mt(this.value),e(1,i)}function A(){i.workers=Mt(this.value),e(1,i)}function N(){i.logLevel=dl(this),e(1,i)}function Z(){i.bodyParserLimit=this.value,e(1,i)}function Q(B){l.$$.not_equal(i.auth,B)&&(i.auth=B,e(1,i))}function x(B){l.$$.not_equal(i.logging,B)&&(i.logging=B,e(1,i))}function z(){g=this.value,e(8,g)}function K(){k=this.checked,e(10,k)}return[a,i,u,c,f,d,p,m,g,b,k,n,C,E,y,T,M,R,P,I,j,q,D,A,N,Z,Q,x,z,K,()=>e(10,k=!1)]}class U2 extends Nt{constructor(s){super(),Ut(this,s,N2,O2,Vt,{},null,[-1,-1])}}class wo{static async list(){return await yl.get("/routes")}static async get(s){return(await this.list()).find(n=>n.path===s)||null}static async create(s){const e=await yl.get("/config");if(e.routes?.some(n=>n.path===s.path))throw new Error(\`Route with path "\${s.path}" already exists\`);e.routes=e.routes||[],e.routes.push(s),await yl.put("/config",e)}static async update(s,e){const n=await yl.get("/config"),a=n.routes?.findIndex(i=>i.path===s);if(a===void 0||a===-1)throw new Error(\`Route with path "\${s}" not found\`);if(s!==e.path&&n.routes?.some(i=>i.path===e.path))throw new Error(\`Route with path "\${e.path}" already exists\`);n.routes[a]=e,await yl.put("/config",n)}static async delete(s){const e=await yl.get("/config"),n=e.routes?.findIndex(a=>a.path===s);if(n===void 0||n===-1)throw new Error(\`Route with path "\${s}" not found\`);e.routes.splice(n,1),await yl.put("/config",e)}static async validateRoute(s){const e={routes:[s]};return await yl.post("/config/validate",e)}static async duplicate(s){const e=await this.get(s);if(!e)throw new Error(\`Route with path "\${s}" not found\`);const n={...e};let a=1,i=\`\${s}-copy\`;const u=await this.list();for(;u.some(c=>c.path===i);)a++,i=\`\${s}-copy-\${a}\`;n.path=i,await this.create(n)}}function h1(l,s,e){const n=l.slice();return n[6]=s[e],n}function m1(l){let s;return{c(){s=r("span"),s.textContent="RED",o(s,"class","text-xs text-error font-semibold")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function g1(l){let s,e,n,a,i,u,c=js(l[6])==="unhealthy",f,d,p,m=l[6].target+"",g,b,k,w=(l[6].weight||100)+"",C,E,y,T=(l[6].priority||1)+"",M,R,j=c&&m1();return{c(){s=r("tr"),e=r("td"),n=r("div"),a=r("div"),u=h(),j&&j.c(),f=h(),d=r("td"),p=r("code"),g=_(m),b=h(),k=r("td"),C=_(w),E=h(),y=r("td"),M=_(T),R=h(),o(a,"class","w-3 h-3 rounded-full tooltip tooltip-right"),o(a,"data-tip",i=l[6].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${_1(l[6].lastFailureTime)}\`:js(l[6])==="healthy"?l[3]("upstreamsModal.statusHealthy"):js(l[6])==="unhealthy"?l[3]("upstreamsModal.statusUnhealthy"):l[3]("upstreamsModal.statusUnknown")),le(a,"bg-success",js(l[6])==="healthy"),le(a,"bg-error",js(l[6])==="unhealthy"),le(a,"bg-warning",js(l[6])==="unknown"),o(n,"class","flex items-center gap-2"),o(p,"class","text-sm"),o(k,"class","text-right"),o(y,"class","text-right"),o(s,"class","hover")},m(P,I){L(P,s,I),t(s,e),t(e,n),t(n,a),t(n,u),j&&j.m(n,null),t(s,f),t(s,d),t(d,p),t(p,g),t(s,b),t(s,k),t(k,C),t(s,E),t(s,y),t(y,M),t(s,R)},p(P,I){I&12&&i!==(i=P[6].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${_1(P[6].lastFailureTime)}\`:js(P[6])==="healthy"?P[3]("upstreamsModal.statusHealthy"):js(P[6])==="unhealthy"?P[3]("upstreamsModal.statusUnhealthy"):P[3]("upstreamsModal.statusUnknown"))&&o(a,"data-tip",i),I&4&&le(a,"bg-success",js(P[6])==="healthy"),I&4&&le(a,"bg-error",js(P[6])==="unhealthy"),I&4&&le(a,"bg-warning",js(P[6])==="unknown"),I&4&&(c=js(P[6])==="unhealthy"),c?j||(j=m1(),j.c(),j.m(n,null)):j&&(j.d(1),j=null),I&4&&m!==(m=P[6].target+"")&&v(g,m),I&4&&w!==(w=(P[6].weight||100)+"")&&v(C,w),I&4&&T!==(T=(P[6].priority||1)+"")&&v(M,T)},d(P){P&&H(s),j&&j.d()}}}function V2(l){let s,e,n,a=l[3]("upstreamsModal.title")+"",i,u,c,f,d,p,m,g,b,k,w=l[3]("routeCard.tableHeaders.status")+"",C,E,y,T=l[3]("routeCard.tableHeaders.target")+"",M,R,j,P=l[3]("routeCard.tableHeaders.weight")+"",I,q,D,A=l[3]("routeCard.tableHeaders.priority")+"",N,Z,Q,x,z,K,S=l[3]("upstreamsModal.close")+"",B,U,F,J,ie,ue,ne=ut(l[2]),$=[];for(let te=0;te<ne.length;te+=1)$[te]=g1(h1(l,ne,te));return{c(){s=r("dialog"),e=r("div"),n=r("h3"),i=_(a),u=_(" - "),c=r("code"),f=_(l[1]),d=h(),p=r("div"),m=r("table"),g=r("thead"),b=r("tr"),k=r("th"),C=_(w),E=h(),y=r("th"),M=_(T),R=h(),j=r("th"),I=_(P),q=h(),D=r("th"),N=_(A),Z=h(),Q=r("tbody");for(let te=0;te<$.length;te+=1)$[te].c();x=h(),z=r("div"),K=r("button"),B=_(S),U=h(),F=r("form"),J=r("button"),J.textContent="close",o(c,"class","text-primary"),o(n,"class","font-bold text-lg mb-4"),o(k,"class","w-20"),o(j,"class","w-24 text-right"),o(D,"class","w-20 text-right"),o(m,"class","table table-zebra w-full"),o(p,"class","overflow-x-auto max-h-[60vh]"),o(K,"class","btn"),o(z,"class","modal-action"),o(e,"class","modal-box max-w-3xl"),o(F,"method","dialog"),o(F,"class","modal-backdrop"),o(s,"class","modal"),le(s,"modal-open",l[0])},m(te,ae){L(te,s,ae),t(s,e),t(e,n),t(n,i),t(n,u),t(n,c),t(c,f),t(e,d),t(e,p),t(p,m),t(m,g),t(g,b),t(b,k),t(k,C),t(b,E),t(b,y),t(y,M),t(b,R),t(b,j),t(j,I),t(b,q),t(b,D),t(D,N),t(m,Z),t(m,Q);for(let ee=0;ee<$.length;ee+=1)$[ee]&&$[ee].m(Q,null);t(e,x),t(e,z),t(z,K),t(K,B),t(s,U),t(s,F),t(F,J),ie||(ue=[V(window,"keydown",l[5]),V(K,"click",l[4]),V(J,"click",l[4])],ie=!0)},p(te,[ae]){if(ae&8&&a!==(a=te[3]("upstreamsModal.title")+"")&&v(i,a),ae&2&&v(f,te[1]),ae&8&&w!==(w=te[3]("routeCard.tableHeaders.status")+"")&&v(C,w),ae&8&&T!==(T=te[3]("routeCard.tableHeaders.target")+"")&&v(M,T),ae&8&&P!==(P=te[3]("routeCard.tableHeaders.weight")+"")&&v(I,P),ae&8&&A!==(A=te[3]("routeCard.tableHeaders.priority")+"")&&v(N,A),ae&12){ne=ut(te[2]);let ee;for(ee=0;ee<ne.length;ee+=1){const G=h1(te,ne,ee);$[ee]?$[ee].p(G,ae):($[ee]=g1(G),$[ee].c(),$[ee].m(Q,null))}for(;ee<$.length;ee+=1)$[ee].d(1);$.length=ne.length}ae&8&&S!==(S=te[3]("upstreamsModal.close")+"")&&v(B,S),ae&1&&le(s,"modal-open",te[0])},i:ot,o:ot,d(te){te&&H(s),Gt($,te),ie=!1,vt(ue)}}}function js(l){return l.status?l.status==="HEALTHY"?"healthy":"unhealthy":"unknown"}function _1(l){if(!l)return"";const s=new Date(l),n=new Date().getTime()-s.getTime(),a=Math.floor(n/1e3),i=Math.floor(a/60),u=Math.floor(i/60);return a<60?\`\${a}\u79D2\u524D\`:i<60?\`\${i}\u5206\u949F\u524D\`:u<24?\`\${u}\u5C0F\u65F6\u524D\`:s.toLocaleString("zh-CN")}function J2(l,s,e){let n;Dt(l,Rt,d=>e(3,n=d));let{open:a=!1}=s,{routePath:i}=s,{upstreams:u=[]}=s;function c(){e(0,a=!1)}function f(d){d.key==="Escape"&&a&&c()}return l.$$set=d=>{"open"in d&&e(0,a=d.open),"routePath"in d&&e(1,i=d.routePath),"upstreams"in d&&e(2,u=d.upstreams)},[a,i,u,n,c,f]}class W2 extends Nt{constructor(s){super(),Ut(this,s,J2,V2,Vt,{open:0,routePath:1,upstreams:2})}}function b1(l,s,e){const n=l.slice();return n[12]=s[e][0],n[13]=s[e][1],n}function v1(l,s,e){const n=l.slice();return n[16]=s[e],n}function k1(l){let s,e=l[8]("routeCard.hasTransformer")+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-sm badge-info")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i&256&&e!==(e=a[8]("routeCard.hasTransformer")+"")&&v(n,e)},d(a){a&&H(s)}}}function w1(l){let s,e=l[8]("routeCard.failover")+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-sm badge-success")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i&256&&e!==(e=a[8]("routeCard.failover")+"")&&v(n,e)},d(a){a&&H(s)}}}function G2(l){let s,e,n,a,i=l[8]("routeCard.duplicate")+"",u;return{c(){s=re("svg"),e=re("path"),n=h(),a=r("span"),u=_(i),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(c,f){L(c,s,f),t(s,e),L(c,n,f),L(c,a,f),t(a,u)},p(c,f){f&256&&i!==(i=c[8]("routeCard.duplicate")+"")&&v(u,i)},d(c){c&&(H(s),H(n),H(a))}}}function K2(l){let s,e,n,a=l[8]("routeCard.duplicating")+"",i;return{c(){s=r("span"),e=h(),n=r("span"),i=_(a),o(s,"class","loading loading-spinner loading-xs")},m(u,c){L(u,s,c),L(u,e,c),L(u,n,c),t(n,i)},p(u,c){c&256&&a!==(a=u[8]("routeCard.duplicating")+"")&&v(i,a)},d(u){u&&(H(s),H(e),H(n))}}}function Y2(l){let s,e,n,a,i=l[8]("routeCard.delete")+"",u;return{c(){s=re("svg"),e=re("path"),n=h(),a=r("span"),u=_(i),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(c,f){L(c,s,f),t(s,e),L(c,n,f),L(c,a,f),t(a,u)},p(c,f){f&256&&i!==(i=c[8]("routeCard.delete")+"")&&v(u,i)},d(c){c&&(H(s),H(n),H(a))}}}function Q2(l){let s,e,n,a=l[8]("routeCard.deleting")+"",i;return{c(){s=r("span"),e=h(),n=r("span"),i=_(a),o(s,"class","loading loading-spinner loading-xs")},m(u,c){L(u,s,c),L(u,e,c),L(u,n,c),t(n,i)},p(u,c){c&256&&a!==(a=u[8]("routeCard.deleting")+"")&&v(i,a)},d(u){u&&(H(s),H(e),H(n))}}}function y1(l){let s,e,n,a,i,u,c,f=l[16].target+"",d,p,m,g,b=(l[16].weight||100)+"",k,w,C,E=(l[16].priority||1)+"",y,T;return{c(){s=r("tr"),e=r("td"),n=r("div"),i=h(),u=r("td"),c=r("code"),d=_(f),m=h(),g=r("td"),k=_(b),w=h(),C=r("td"),y=_(E),T=h(),o(n,"class","w-2.5 h-2.5 rounded-full tooltip tooltip-right"),o(n,"data-tip",a=l[16].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${M1(l[16].lastFailureTime)}\`:to(l[16])==="healthy"?"\u5065\u5EB7":to(l[16])==="unhealthy"?"\u5F02\u5E38":"\u672A\u77E5"),le(n,"bg-success",to(l[16])==="healthy"),le(n,"bg-error",to(l[16])==="unhealthy"),le(n,"bg-warning",to(l[16])==="unknown"),o(c,"class","text-xs truncate max-w-xs block"),o(c,"title",p=l[16].target),o(g,"class","text-right text-xs"),o(C,"class","text-right text-xs"),o(s,"class","hover")},m(M,R){L(M,s,R),t(s,e),t(e,n),t(s,i),t(s,u),t(u,c),t(c,d),t(s,m),t(s,g),t(g,k),t(s,w),t(s,C),t(C,y),t(s,T)},p(M,R){R&128&&a!==(a=M[16].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${M1(M[16].lastFailureTime)}\`:to(M[16])==="healthy"?"\u5065\u5EB7":to(M[16])==="unhealthy"?"\u5F02\u5E38":"\u672A\u77E5")&&o(n,"data-tip",a),R&128&&le(n,"bg-success",to(M[16])==="healthy"),R&128&&le(n,"bg-error",to(M[16])==="unhealthy"),R&128&&le(n,"bg-warning",to(M[16])==="unknown"),R&128&&f!==(f=M[16].target+"")&&v(d,f),R&128&&p!==(p=M[16].target)&&o(c,"title",p),R&128&&b!==(b=(M[16].weight||100)+"")&&v(k,b),R&128&&E!==(E=(M[16].priority||1)+"")&&v(y,E)},d(M){M&&H(s)}}}function C1(l){let s,e,n,a,i,u=l[8]("routeCard.viewAll",{values:{count:l[0].upstreams.length}})+"",c,f,d;return{c(){s=r("div"),e=r("button"),n=re("svg"),a=re("path"),i=h(),c=_(u),o(a,"stroke-linecap","round"),o(a,"stroke-linejoin","round"),o(a,"stroke-width","2"),o(a,"d","M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"class","h-3 w-3"),o(n,"fill","none"),o(n,"viewBox","0 0 24 24"),o(n,"stroke","currentColor"),o(e,"class","btn btn-sm btn-outline gap-1"),o(s,"class","flex justify-center mt-2")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(n,a),t(e,i),t(e,c),f||(d=V(e,"click",l[10]),f=!0)},p(p,m){m&257&&u!==(u=p[8]("routeCard.viewAll",{values:{count:p[0].upstreams.length}})+"")&&v(c,u)},d(p){p&&H(s),f=!1,d()}}}function E1(l){let s,e,n,a=ut(Object.entries(l[0].pathRewrite)),i=[];for(let u=0;u<a.length;u+=1)i[u]=T1(b1(l,a,u));return{c(){s=r("div"),e=r("p"),e.textContent="Path Rewrite:",n=h();for(let u=0;u<i.length;u+=1)i[u].c();o(e,"class","text-sm font-semibold mb-1"),o(s,"class","mt-3")},m(u,c){L(u,s,c),t(s,e),t(s,n);for(let f=0;f<i.length;f+=1)i[f]&&i[f].m(s,null)},p(u,c){if(c&257){a=ut(Object.entries(u[0].pathRewrite));let f;for(f=0;f<a.length;f+=1){const d=b1(u,a,f);i[f]?i[f].p(d,c):(i[f]=T1(d),i[f].c(),i[f].m(s,null))}for(;f<i.length;f+=1)i[f].d(1);i.length=a.length}},d(u){u&&H(s),Gt(i,u)}}}function T1(l){let s,e=l[8]("routeCard.pathRewrite.original")+"",n,a,i,u=l[12]+"",c,f,d=l[8]("routeCard.pathRewrite.rewriteTo")+"",p,m,g,b=l[13]+"",k,w;return{c(){s=r("div"),n=_(e),a=h(),i=r("code"),c=_(u),f=_(" \u2192 "),p=_(d),m=h(),g=r("code"),k=_(b),w=h(),o(i,"class","bg-base-200 px-1.5 py-0.5 rounded text-sm font-mono"),o(g,"class","bg-base-200 px-1.5 py-0.5 rounded text-sm font-mono"),o(s,"class","text-sm text-gray-600")},m(C,E){L(C,s,E),t(s,n),t(s,a),t(s,i),t(i,c),t(s,f),t(s,p),t(s,m),t(s,g),t(g,k),t(s,w)},p(C,E){E&256&&e!==(e=C[8]("routeCard.pathRewrite.original")+"")&&v(n,e),E&1&&u!==(u=C[12]+"")&&v(c,u),E&256&&d!==(d=C[8]("routeCard.pathRewrite.rewriteTo")+"")&&v(p,d),E&1&&b!==(b=C[13]+"")&&v(k,b)},d(C){C&&H(s)}}}function Z2(l){let s,e,n,a,i,u,c=l[0].path+"",f,d,p,m,g=l[8]("routeCard.upstreams",{values:{count:l[0].upstreams.length}})+"",b,k,w,C,E,y,T,M,R,j=l[8]("routeCard.edit")+"",P,I,q,D,A,N,Z,Q,x,z,K,S,B,U,F,J,ie,ue,ne,$,te,ae=l[8]("routeCard.tableHeaders.status")+"",ee,G,pe,oe=l[8]("routeCard.tableHeaders.target")+"",ge,he,ye,ze=l[8]("routeCard.tableHeaders.weight")+"",Pe,we,Fe,Je=l[8]("routeCard.tableHeaders.priority")+"",je,Le,Se,fe,_e,Ie,De,se,ke,me,Ee,Ve=l[0].transformer&&k1(l),Be=l[0].failover?.enabled&&w1(l);function nt(Ge,ce){return Ge[4]?K2:G2}let Ne=nt(l),Qe=Ne(l);function Ye(Ge,ce){return Ge[3]?Q2:Y2}let ve=Ye(l),de=ve(l),Te=ut(l[7]),Ze=[];for(let Ge=0;Ge<Te.length;Ge+=1)Ze[Ge]=y1(v1(l,Te,Ge));let Me=l[6]&&C1(l),Ue=l[0].pathRewrite&&E1(l);function Ce(Ge){l[11](Ge)}let mt={routePath:l[0].path,upstreams:l[0].upstreams};return l[5]!==void 0&&(mt.open=l[5]),De=new W2({props:mt}),Sl.push(()=>Ml(De,"open",Ce)),{c(){s=r("div"),e=r("div"),n=r("div"),a=r("div"),i=r("h2"),u=r("code"),f=_(c),d=h(),p=r("div"),m=r("span"),b=_(g),k=h(),Ve&&Ve.c(),w=h(),Be&&Be.c(),C=h(),E=r("div"),y=r("button"),T=re("svg"),M=re("path"),R=h(),P=_(j),I=h(),q=r("div"),D=r("button"),A=re("svg"),N=re("path"),Q=h(),x=r("ul"),z=r("li"),K=r("button"),Qe.c(),S=h(),B=r("li"),U=r("button"),de.c(),F=h(),J=r("div"),ie=r("div"),ue=r("table"),ne=r("thead"),$=r("tr"),te=r("th"),ee=_(ae),G=h(),pe=r("th"),ge=_(oe),he=h(),ye=r("th"),Pe=_(ze),we=h(),Fe=r("th"),je=_(Je),Le=h(),Se=r("tbody");for(let Ge=0;Ge<Ze.length;Ge+=1)Ze[Ge].c();fe=h(),Me&&Me.c(),_e=h(),Ue&&Ue.c(),Ie=h(),Et(De.$$.fragment),o(u,"class","text-primary"),o(i,"class","card-title text-lg"),o(m,"class","badge badge-sm"),o(p,"class","flex gap-2 mt-2 flex-wrap"),o(a,"class","flex-1"),o(M,"stroke-linecap","round"),o(M,"stroke-linejoin","round"),o(M,"stroke-width","2"),o(M,"d","M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"),o(T,"xmlns","http://www.w3.org/2000/svg"),o(T,"class","h-4 w-4"),o(T,"fill","none"),o(T,"viewBox","0 0 24 24"),o(T,"stroke","currentColor"),o(y,"class","btn btn-sm btn-primary gap-1"),o(N,"stroke-linecap","round"),o(N,"stroke-linejoin","round"),o(N,"stroke-width","2"),o(N,"d","M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"),o(A,"xmlns","http://www.w3.org/2000/svg"),o(A,"class","h-4 w-4"),o(A,"fill","none"),o(A,"viewBox","0 0 24 24"),o(A,"stroke","currentColor"),o(D,"type","button"),o(D,"class","btn btn-sm btn-ghost btn-square"),o(D,"title",Z=l[8]("routeCard.moreActions")),K.disabled=l[4],o(U,"class","text-error"),U.disabled=l[3],o(x,"class","dropdown-content menu p-2 shadow-lg bg-base-100 rounded-box w-40 z-10"),o(q,"class","dropdown dropdown-end"),o(E,"class","flex gap-2"),o(n,"class","flex justify-between items-start"),o(te,"class","w-12"),o(ye,"class","w-16 text-right"),o(Fe,"class","w-12 text-right"),o($,"class","bg-base-200"),o(ue,"class","table table-xs w-full"),o(ie,"class","overflow-x-auto border border-base-300 rounded-lg"),o(J,"class","mt-4"),o(e,"class","card-body flex flex-col"),o(s,"class","card bg-base-100 shadow-md hover:shadow-lg transition-shadow")},m(Ge,ce){L(Ge,s,ce),t(s,e),t(e,n),t(n,a),t(a,i),t(i,u),t(u,f),t(a,d),t(a,p),t(p,m),t(m,b),t(p,k),Ve&&Ve.m(p,null),t(p,w),Be&&Be.m(p,null),t(n,C),t(n,E),t(E,y),t(y,T),t(T,M),t(y,R),t(y,P),t(E,I),t(E,q),t(q,D),t(D,A),t(A,N),t(q,Q),t(q,x),t(x,z),t(z,K),Qe.m(K,null),t(x,S),t(x,B),t(B,U),de.m(U,null),t(e,F),t(e,J),t(J,ie),t(ie,ue),t(ue,ne),t(ne,$),t($,te),t(te,ee),t($,G),t($,pe),t(pe,ge),t($,he),t($,ye),t(ye,Pe),t($,we),t($,Fe),t(Fe,je),t(ue,Le),t(ue,Se);for(let qe=0;qe<Ze.length;qe+=1)Ze[qe]&&Ze[qe].m(Se,null);t(J,fe),Me&&Me.m(J,null),t(e,_e),Ue&&Ue.m(e,null),L(Ge,Ie,ce),Ct(De,Ge,ce),ke=!0,me||(Ee=[V(y,"click",l[9]),V(K,"click",function(){sa(l[2])&&l[2].apply(this,arguments)}),V(U,"click",function(){sa(l[1])&&l[1].apply(this,arguments)})],me=!0)},p(Ge,[ce]){if(l=Ge,(!ke||ce&1)&&c!==(c=l[0].path+"")&&v(f,c),(!ke||ce&257)&&g!==(g=l[8]("routeCard.upstreams",{values:{count:l[0].upstreams.length}})+"")&&v(b,g),l[0].transformer?Ve?Ve.p(l,ce):(Ve=k1(l),Ve.c(),Ve.m(p,w)):Ve&&(Ve.d(1),Ve=null),l[0].failover?.enabled?Be?Be.p(l,ce):(Be=w1(l),Be.c(),Be.m(p,null)):Be&&(Be.d(1),Be=null),(!ke||ce&256)&&j!==(j=l[8]("routeCard.edit")+"")&&v(P,j),(!ke||ce&256&&Z!==(Z=l[8]("routeCard.moreActions")))&&o(D,"title",Z),Ne===(Ne=nt(l))&&Qe?Qe.p(l,ce):(Qe.d(1),Qe=Ne(l),Qe&&(Qe.c(),Qe.m(K,null))),(!ke||ce&16)&&(K.disabled=l[4]),ve===(ve=Ye(l))&&de?de.p(l,ce):(de.d(1),de=ve(l),de&&(de.c(),de.m(U,null))),(!ke||ce&8)&&(U.disabled=l[3]),(!ke||ce&256)&&ae!==(ae=l[8]("routeCard.tableHeaders.status")+"")&&v(ee,ae),(!ke||ce&256)&&oe!==(oe=l[8]("routeCard.tableHeaders.target")+"")&&v(ge,oe),(!ke||ce&256)&&ze!==(ze=l[8]("routeCard.tableHeaders.weight")+"")&&v(Pe,ze),(!ke||ce&256)&&Je!==(Je=l[8]("routeCard.tableHeaders.priority")+"")&&v(je,Je),ce&128){Te=ut(l[7]);let Re;for(Re=0;Re<Te.length;Re+=1){const dt=v1(l,Te,Re);Ze[Re]?Ze[Re].p(dt,ce):(Ze[Re]=y1(dt),Ze[Re].c(),Ze[Re].m(Se,null))}for(;Re<Ze.length;Re+=1)Ze[Re].d(1);Ze.length=Te.length}l[6]?Me?Me.p(l,ce):(Me=C1(l),Me.c(),Me.m(J,null)):Me&&(Me.d(1),Me=null),l[0].pathRewrite?Ue?Ue.p(l,ce):(Ue=E1(l),Ue.c(),Ue.m(e,null)):Ue&&(Ue.d(1),Ue=null);const qe={};ce&1&&(qe.routePath=l[0].path),ce&1&&(qe.upstreams=l[0].upstreams),!se&&ce&32&&(se=!0,qe.open=l[5],Rl(()=>se=!1)),De.$set(qe)},i(Ge){ke||(et(De.$$.fragment,Ge),ke=!0)},o(Ge){st(De.$$.fragment,Ge),ke=!1},d(Ge){Ge&&(H(s),H(Ie)),Ve&&Ve.d(),Be&&Be.d(),Qe.d(),de.d(),Gt(Ze,Ge),Me&&Me.d(),Ue&&Ue.d(),yt(De,Ge),me=!1,vt(Ee)}}}const S1=5;function to(l){return l.status?l.status==="HEALTHY"?"healthy":"unhealthy":"unknown"}function M1(l){if(!l)return"";const s=new Date(l),n=new Date().getTime()-s.getTime(),a=Math.floor(n/1e3),i=Math.floor(a/60),u=Math.floor(i/60);return a<60?\`\${a}\u79D2\u524D\`:i<60?\`\${i}\u5206\u949F\u524D\`:u<24?\`\${u}\u5C0F\u65F6\u524D\`:s.toLocaleString("zh-CN")}function X2(l,s,e){let n,a,i;Dt(l,Rt,w=>e(8,i=w));let{route:u}=s,{onDelete:c}=s,{onDuplicate:f}=s,{isDeleting:d=!1}=s,{isDuplicating:p=!1}=s,m=!1;function g(){zp(\`/routes/edit/\${encodeURIComponent(u.path)}\`)}function b(){e(5,m=!0)}function k(w){m=w,e(5,m)}return l.$$set=w=>{"route"in w&&e(0,u=w.route),"onDelete"in w&&e(1,c=w.onDelete),"onDuplicate"in w&&e(2,f=w.onDuplicate),"isDeleting"in w&&e(3,d=w.isDeleting),"isDuplicating"in w&&e(4,p=w.isDuplicating)},l.$$.update=()=>{l.$$.dirty&1&&e(7,n=u.upstreams.slice(0,S1)),l.$$.dirty&1&&e(6,a=u.upstreams.length>S1)},[u,c,f,d,p,m,a,n,i,g,b,k]}class x2 extends Nt{constructor(s){super(),Ut(this,s,X2,Z2,Vt,{route:0,onDelete:1,onDuplicate:2,isDeleting:3,isDuplicating:4})}}function R1(l){let s,e,n,a,i,u,c,f,d,p,m,g,b,k,w,C,E;return{c(){s=r("dialog"),e=r("div"),n=r("h3"),a=_(l[5]),i=h(),u=r("p"),c=_(l[4]),f=h(),d=r("div"),p=r("button"),m=_(l[2]),g=h(),b=r("button"),k=_(l[3]),o(n,"class","font-bold text-lg"),o(u,"class","py-4"),o(p,"class","btn"),o(b,"class",w="btn "+l[1]),o(d,"class","modal-action"),o(e,"class","modal-box"),o(s,"class","modal modal-open")},m(y,T){L(y,s,T),t(s,e),t(e,n),t(n,a),t(e,i),t(e,u),t(u,c),t(e,f),t(e,d),t(d,p),t(p,m),t(d,g),t(d,b),t(b,k),C||(E=[V(p,"click",l[7]),V(b,"click",l[6]),V(s,"click",l[8])],C=!0)},p(y,T){T&32&&v(a,y[5]),T&16&&v(c,y[4]),T&4&&v(m,y[2]),T&8&&v(k,y[3]),T&2&&w!==(w="btn "+y[1])&&o(b,"class",w)},d(y){y&&H(s),C=!1,vt(E)}}}function $2(l){let s,e=l[0]&&R1(l);return{c(){e&&e.c(),s=Ul()},m(n,a){e&&e.m(n,a),L(n,s,a)},p(n,[a]){n[0]?e?e.p(n,a):(e=R1(n),e.c(),e.m(s.parentNode,s)):e&&(e.d(1),e=null)},i:ot,o:ot,d(n){n&&H(s),e&&e.d(n)}}}function eh(l,s,e){let n,a,i,u,c;Dt(l,Rt,y=>e(13,c=y));let{open:f=!1}=s,{title:d=""}=s,{message:p=""}=s,{confirmText:m=""}=s,{cancelText:g=""}=s,{confirmClass:b="btn-error"}=s;const k=oa();function w(){k("confirm"),e(0,f=!1)}function C(){k("cancel"),e(0,f=!1)}function E(y){y.target===y.currentTarget&&C()}return l.$$set=y=>{"open"in y&&e(0,f=y.open),"title"in y&&e(9,d=y.title),"message"in y&&e(10,p=y.message),"confirmText"in y&&e(11,m=y.confirmText),"cancelText"in y&&e(12,g=y.cancelText),"confirmClass"in y&&e(1,b=y.confirmClass)},l.$$.update=()=>{l.$$.dirty&8704&&e(5,n=d||c("confirmDialog.title")),l.$$.dirty&1024&&e(4,a=p),l.$$.dirty&10240&&e(3,i=m||c("confirmDialog.confirm")),l.$$.dirty&12288&&e(2,u=g||c("confirmDialog.cancel"))},[f,b,u,i,a,n,w,C,E,d,p,m,g,c]}class $p extends Nt{constructor(s){super(),Ut(this,s,eh,$2,Vt,{open:0,title:9,message:10,confirmText:11,cancelText:12,confirmClass:1})}}function q1(l,s,e){const n=l.slice();return n[29]=s[e],n}function H1(l,s,e){const n=l.slice();return n[32]=s[e],n}function th(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function lh(l){let s;return{c(){s=r("span"),o(s,"class","loading loading-spinner loading-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function L1(l){let s,e=l[32]+"",n,a;return{c(){s=r("option"),n=_(e),s.__value=a=l[32],Y(s,s.__value)},m(i,u){L(i,s,u),t(s,n)},p(i,u){u[0]&2048&&e!==(e=i[32]+"")&&v(n,e),u[0]&2048&&a!==(a=i[32])&&(s.__value=a,Y(s,s.__value))},d(i){i&&H(s)}}}function sh(l){let s,e,n=ut(l[12]),a=[];for(let u=0;u<n.length;u+=1)a[u]=P1(q1(l,n,u));const i=u=>st(a[u],1,1,()=>{a[u]=null});return{c(){s=r("div");for(let u=0;u<a.length;u+=1)a[u].c();o(s,"class","grid grid-cols-1 lg:grid-cols-2 gap-4")},m(u,c){L(u,s,c);for(let f=0;f<a.length;f+=1)a[f]&&a[f].m(s,null);e=!0},p(u,c){if(c[0]&152320){n=ut(u[12]);let f;for(f=0;f<n.length;f+=1){const d=q1(u,n,f);a[f]?(a[f].p(d,c),et(a[f],1)):(a[f]=P1(d),a[f].c(),et(a[f],1),a[f].m(s,null))}for(Gl(),f=n.length;f<a.length;f+=1)i(f);Kl()}},i(u){if(!e){for(let c=0;c<n.length;c+=1)et(a[c]);e=!0}},o(u){a=a.filter(Boolean);for(let c=0;c<a.length;c+=1)st(a[c]);e=!1},d(u){u&&H(s),Gt(a,u)}}}function oh(l){let s;function e(i,u){return i[0].length===0?ih:rh}let n=e(l),a=n(l);return{c(){s=r("div"),a.c(),o(s,"class","text-center py-12")},m(i,u){L(i,s,u),a.m(s,null)},p(i,u){n===(n=e(i))&&a?a.p(i,u):(a.d(1),a=n(i),a&&(a.c(),a.m(s,null)))},i:ot,o:ot,d(i){i&&H(s),a.d()}}}function nh(l){let s,e,n,a,i,u=l[13]("common.error")+"",c,f,d;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),f=_(": "),d=_(l[5]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(s,"class","alert alert-error")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c),t(i,f),t(i,d)},p(p,m){m[0]&8192&&u!==(u=p[13]("common.error")+"")&&v(c,u),m[0]&32&&v(d,p[5])},i:ot,o:ot,d(p){p&&H(s)}}}function ah(l){let s;return{c(){s=r("div"),s.innerHTML='<span class="loading loading-spinner loading-lg"></span>',o(s,"class","flex justify-center items-center h-64")},m(e,n){L(e,s,n)},p:ot,i:ot,o:ot,d(e){e&&H(s)}}}function P1(l){let s,e;function n(){return l[24](l[29])}function a(){return l[25](l[29])}return s=new x2({props:{route:l[29],onDelete:n,onDuplicate:a,isDeleting:l[8].has(l[29].path),isDuplicating:l[9].has(l[29].path)}}),{c(){Et(s.$$.fragment)},m(i,u){Ct(s,i,u),e=!0},p(i,u){l=i;const c={};u[0]&4096&&(c.route=l[29]),u[0]&4096&&(c.onDelete=n),u[0]&4096&&(c.onDuplicate=a),u[0]&4352&&(c.isDeleting=l[8].has(l[29].path)),u[0]&4608&&(c.isDuplicating=l[9].has(l[29].path)),s.$set(c)},i(i){e||(et(s.$$.fragment,i),e=!0)},o(i){st(s.$$.fragment,i),e=!1},d(i){yt(s,i)}}}function rh(l){let s,e,n,a=l[13]("routes.noMatchingRoutes")+"",i,u,c,f=l[13]("routes.noMatchingMessage")+"",d;return{c(){s=r("div"),s.textContent="\uD83D\uDD0D",e=h(),n=r("h3"),i=_(a),u=h(),c=r("p"),d=_(f),o(s,"class","text-6xl mb-4"),o(n,"class","text-xl font-semibold mb-2"),o(c,"class","text-gray-500")},m(p,m){L(p,s,m),L(p,e,m),L(p,n,m),t(n,i),L(p,u,m),L(p,c,m),t(c,d)},p(p,m){m[0]&8192&&a!==(a=p[13]("routes.noMatchingRoutes")+"")&&v(i,a),m[0]&8192&&f!==(f=p[13]("routes.noMatchingMessage")+"")&&v(d,f)},d(p){p&&(H(s),H(e),H(n),H(u),H(c))}}}function ih(l){let s,e,n,a=l[13]("routes.noRoutes")+"",i,u,c,f=l[13]("routes.noRoutesMessage")+"",d,p,m,g=l[13]("routes.createFirstRoute")+"",b,k,w;return{c(){s=r("div"),s.textContent="\uD83D\uDE80",e=h(),n=r("h3"),i=_(a),u=h(),c=r("p"),d=_(f),p=h(),m=r("button"),b=_(g),o(s,"class","text-6xl mb-4"),o(n,"class","text-xl font-semibold mb-2"),o(c,"class","text-gray-500 mb-4"),o(m,"class","btn btn-primary")},m(C,E){L(C,s,E),L(C,e,E),L(C,n,E),t(n,i),L(C,u,E),L(C,c,E),t(c,d),L(C,p,E),L(C,m,E),t(m,b),k||(w=V(m,"click",l[18]),k=!0)},p(C,E){E[0]&8192&&a!==(a=C[13]("routes.noRoutes")+"")&&v(i,a),E[0]&8192&&f!==(f=C[13]("routes.noRoutesMessage")+"")&&v(d,f),E[0]&8192&&g!==(g=C[13]("routes.createFirstRoute")+"")&&v(b,g)},d(C){C&&(H(s),H(e),H(n),H(u),H(c),H(p),H(m)),k=!1,w()}}}function j1(l){let s,e=l[13]("routes.showingRoutes",{values:{count:l[12].length,total:l[0].length}})+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","mt-6 text-sm text-gray-500 text-center")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&12289&&e!==(e=a[13]("routes.showingRoutes",{values:{count:a[12].length,total:a[0].length}})+"")&&v(n,e)},d(a){a&&H(s)}}}function uh(l){let s,e,n,a,i=l[13]("routes.title")+"",u,c,f,d=l[13]("routes.subtitle")+"",p,m,g,b,k,w,C,E=l[13]("routes.export")+"",y,T,M,R,j,P=l[13]("routes.import")+"",I,q,D,A,N=l[13]("routes.newRoute")+"",Z,Q,x,z,K,S,B,U,F,J,ie=l[13]("routes.allTransformers")+"",ue,ne,$,te,ae,ee=l[13]("routes.filterStatus.all")+"",G,pe,oe=l[13]("routes.filterStatus.healthy")+"",ge,he,ye=l[13]("routes.filterStatus.unhealthy")+"",ze,Pe,we,Fe,Je,je,Le,Se,fe,_e,Ie;function De(ve,de){return ve[10]?lh:th}let se=De(l),ke=se(l),me=ut(l[11]),Ee=[];for(let ve=0;ve<me.length;ve+=1)Ee[ve]=L1(H1(l,me,ve));const Ve=[ah,nh,oh,sh],Be=[];function nt(ve,de){return ve[4]?0:ve[5]?1:ve[12].length===0?2:3}we=nt(l),Fe=Be[we]=Ve[we](l);let Ne=!l[4]&&l[0].length>0&&j1(l);function Qe(ve){l[26](ve)}let Ye={title:l[13]("routes.confirmDelete"),message:l[7]?l[13]("routes.confirmDeleteMessage",{values:{path:l[7].path}}):"",confirmText:l[13]("common.delete"),cancelText:l[13]("common.cancel"),confirmClass:"btn-error"};return l[6]!==void 0&&(Ye.open=l[6]),Le=new $p({props:Ye}),Sl.push(()=>Ml(Le,"open",Qe)),Le.$on("confirm",l[15]),Le.$on("cancel",l[16]),{c(){s=r("div"),e=r("div"),n=r("div"),a=r("h1"),u=_(i),c=h(),f=r("p"),p=_(d),m=h(),g=r("div"),b=r("button"),k=re("svg"),w=re("path"),C=h(),y=_(E),M=h(),R=r("button"),ke.c(),j=h(),I=_(P),D=h(),A=r("button"),Z=_(N),Q=h(),x=r("div"),z=r("div"),K=r("input"),B=h(),U=r("div"),F=r("select"),J=r("option"),ue=_(ie);for(let ve=0;ve<Ee.length;ve+=1)Ee[ve].c();ne=h(),$=r("div"),te=r("select"),ae=r("option"),G=_(ee),pe=r("option"),ge=_(oe),he=r("option"),ze=_(ye),Pe=h(),Fe.c(),Je=h(),Ne&&Ne.c(),je=h(),Et(Le.$$.fragment),o(a,"class","text-3xl font-bold"),o(f,"class","text-sm text-gray-500 mt-1"),o(w,"stroke-linecap","round"),o(w,"stroke-linejoin","round"),o(w,"stroke-width","2"),o(w,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(k,"xmlns","http://www.w3.org/2000/svg"),o(k,"class","h-4 w-4"),o(k,"fill","none"),o(k,"viewBox","0 0 24 24"),o(k,"stroke","currentColor"),o(b,"class","btn btn-sm btn-outline"),b.disabled=T=l[4]||l[0].length===0,o(R,"class","btn btn-sm btn-outline"),R.disabled=q=l[4]||l[10],o(A,"class","btn btn-primary btn-sm"),o(g,"class","flex gap-2"),o(e,"class","flex justify-between items-center mb-6"),o(K,"type","text"),o(K,"placeholder",S=l[13]("routes.searchPlaceholder")),o(K,"class","input input-bordered"),o(z,"class","form-control flex-1"),J.__value="",Y(J,J.__value),o(F,"class","select select-bordered"),l[2]===void 0&&pl(()=>l[22].call(F)),o(U,"class","form-control w-48"),ae.__value="all",Y(ae,ae.__value),pe.__value="healthy",Y(pe,pe.__value),he.__value="unhealthy",Y(he,he.__value),o(te,"class","select select-bordered"),l[3]===void 0&&pl(()=>l[23].call(te)),o($,"class","form-control w-32"),o(x,"class","flex gap-4 mb-6"),o(s,"class","p-6")},m(ve,de){L(ve,s,de),t(s,e),t(e,n),t(n,a),t(a,u),t(n,c),t(n,f),t(f,p),t(e,m),t(e,g),t(g,b),t(b,k),t(k,w),t(b,C),t(b,y),t(g,M),t(g,R),ke.m(R,null),t(R,j),t(R,I),t(g,D),t(g,A),t(A,Z),t(s,Q),t(s,x),t(x,z),t(z,K),Y(K,l[1]),t(x,B),t(x,U),t(U,F),t(F,J),t(J,ue);for(let Te=0;Te<Ee.length;Te+=1)Ee[Te]&&Ee[Te].m(F,null);kt(F,l[2],!0),t(x,ne),t(x,$),t($,te),t(te,ae),t(ae,G),t(te,pe),t(pe,ge),t(te,he),t(he,ze),kt(te,l[3],!0),t(s,Pe),Be[we].m(s,null),t(s,Je),Ne&&Ne.m(s,null),t(s,je),Ct(Le,s,null),fe=!0,_e||(Ie=[V(b,"click",l[19]),V(R,"click",l[20]),V(A,"click",l[18]),V(K,"input",l[21]),V(F,"change",l[22]),V(te,"change",l[23])],_e=!0)},p(ve,de){if((!fe||de[0]&8192)&&i!==(i=ve[13]("routes.title")+"")&&v(u,i),(!fe||de[0]&8192)&&d!==(d=ve[13]("routes.subtitle")+"")&&v(p,d),(!fe||de[0]&8192)&&E!==(E=ve[13]("routes.export")+"")&&v(y,E),(!fe||de[0]&17&&T!==(T=ve[4]||ve[0].length===0))&&(b.disabled=T),se!==(se=De(ve))&&(ke.d(1),ke=se(ve),ke&&(ke.c(),ke.m(R,j))),(!fe||de[0]&8192)&&P!==(P=ve[13]("routes.import")+"")&&v(I,P),(!fe||de[0]&1040&&q!==(q=ve[4]||ve[10]))&&(R.disabled=q),(!fe||de[0]&8192)&&N!==(N=ve[13]("routes.newRoute")+"")&&v(Z,N),(!fe||de[0]&8192&&S!==(S=ve[13]("routes.searchPlaceholder")))&&o(K,"placeholder",S),de[0]&2&&K.value!==ve[1]&&Y(K,ve[1]),(!fe||de[0]&8192)&&ie!==(ie=ve[13]("routes.allTransformers")+"")&&v(ue,ie),de[0]&2048){me=ut(ve[11]);let Me;for(Me=0;Me<me.length;Me+=1){const Ue=H1(ve,me,Me);Ee[Me]?Ee[Me].p(Ue,de):(Ee[Me]=L1(Ue),Ee[Me].c(),Ee[Me].m(F,null))}for(;Me<Ee.length;Me+=1)Ee[Me].d(1);Ee.length=me.length}de[0]&2052&&kt(F,ve[2]),(!fe||de[0]&8192)&&ee!==(ee=ve[13]("routes.filterStatus.all")+"")&&v(G,ee),(!fe||de[0]&8192)&&oe!==(oe=ve[13]("routes.filterStatus.healthy")+"")&&v(ge,oe),(!fe||de[0]&8192)&&ye!==(ye=ve[13]("routes.filterStatus.unhealthy")+"")&&v(ze,ye),de[0]&8&&kt(te,ve[3]);let Te=we;we=nt(ve),we===Te?Be[we].p(ve,de):(Gl(),st(Be[Te],1,1,()=>{Be[Te]=null}),Kl(),Fe=Be[we],Fe?Fe.p(ve,de):(Fe=Be[we]=Ve[we](ve),Fe.c()),et(Fe,1),Fe.m(s,Je)),!ve[4]&&ve[0].length>0?Ne?Ne.p(ve,de):(Ne=j1(ve),Ne.c(),Ne.m(s,je)):Ne&&(Ne.d(1),Ne=null);const Ze={};de[0]&8192&&(Ze.title=ve[13]("routes.confirmDelete")),de[0]&8320&&(Ze.message=ve[7]?ve[13]("routes.confirmDeleteMessage",{values:{path:ve[7].path}}):""),de[0]&8192&&(Ze.confirmText=ve[13]("common.delete")),de[0]&8192&&(Ze.cancelText=ve[13]("common.cancel")),!Se&&de[0]&64&&(Se=!0,Ze.open=ve[6],Rl(()=>Se=!1)),Le.$set(Ze)},i(ve){fe||(et(Fe),et(Le.$$.fragment,ve),fe=!0)},o(ve){st(Fe),st(Le.$$.fragment,ve),fe=!1},d(ve){ve&&H(s),ke.d(),Gt(Ee,ve),Be[we].d(),Ne&&Ne.d(),yt(Le),_e=!1,vt(Ie)}}}function fh(l,s,e){let n,a,i;Dt(l,Rt,z=>e(13,i=z));let u=[],c=!0,f=null,d="",p="",m="all",g=!0,b=!1,k=null,w=new Set,C=new Set,E=!1;async function y(z=!1){const K=!z&&g;try{K&&e(4,c=!0),e(0,u=await wo.list()),e(5,f=null),g=!1}catch(S){e(5,f=S.message),z||jt.show(S.message,"error")}finally{K&&e(4,c=!1)}}async function T(z){e(7,k=z),e(6,b=!0)}async function M(){if(k){w.add(k.path),e(8,w);try{await wo.delete(k.path),jt.show(i("routes.deleted",{values:{path:k.path}}),"success"),await y()}catch(z){jt.show(i("routes.deleteFailed",{values:{error:z.message}}),"error")}finally{w.delete(k.path),e(8,w),e(7,k=null)}}}function R(){e(7,k=null)}async function j(z){C.add(z.path),e(9,C);try{await wo.duplicate(z.path),jt.show(i("routes.duplicated",{values:{path:z.path}}),"success"),await y()}catch(K){jt.show(i("routes.duplicateFailed",{values:{error:K.message}}),"error")}finally{C.delete(z.path),e(9,C)}}function P(){zp("/routes/new")}function I(){if(u.length===0){jt.show(i("routes.noRoutesToExport"),"warning");return}const z=JSON.stringify(u,null,2),K="data:application/json;charset=utf-8,"+encodeURIComponent(z),S=\`bungee-routes-\${new Date().toISOString().split("T")[0]}.json\`,B=document.createElement("a");B.setAttribute("href",K),B.setAttribute("download",S),B.click(),jt.show(i("routes.exported"),"success")}function q(){const z=document.createElement("input");z.type="file",z.accept=".json",z.onchange=async K=>{const S=K.target.files[0];if(S){e(10,E=!0);try{const B=await S.text(),U=JSON.parse(B);if(!Array.isArray(U))throw new Error(i("routes.importMustBeArray"));let F=0,J=0;for(const ie of U)try{await wo.create(ie),F++}catch(ue){J++,console.error(\`Failed to import route \${ie.path}:\`,ue)}if(F>0){const ie=J>0?i("routes.importPartialSuccess",{values:{success:F,failed:J}}):i("routes.importSuccess",{values:{success:F}});jt.show(ie,"success"),await y()}else jt.show(i("routes.importFailed",{values:{error:\`\${J} routes failed\`}}),"error")}catch(B){jt.show(i("routes.importFailed",{values:{error:B.message}}),"error")}finally{e(10,E=!1)}}},z.click()}Hs(()=>{y();const z=setInterval(()=>{y(!0)},5e3);return()=>{clearInterval(z)}});function D(){d=this.value,e(1,d)}function A(){p=dl(this),e(2,p),e(11,a),e(0,u)}function N(){m=dl(this),e(3,m)}const Z=z=>T(z),Q=z=>j(z);function x(z){b=z,e(6,b)}return l.$$.update=()=>{l.$$.dirty[0]&15&&e(12,n=u.filter(z=>{const K=z.path.toLowerCase().includes(d.toLowerCase())||z.upstreams.some(U=>U.target.toLowerCase().includes(d.toLowerCase())),S=!p||typeof z.transformer=="string"&&z.transformer===p||z.upstreams.some(U=>typeof U.transformer=="string"&&U.transformer===p);let B=!0;return m==="healthy"?B=z.upstreams.every(U=>U.status==="HEALTHY"):m==="unhealthy"&&(B=z.upstreams.some(U=>U.status==="UNHEALTHY")),K&&S&&B})),l.$$.dirty[0]&1&&e(11,a=Array.from(new Set(u.flatMap(z=>{const K=[];return typeof z.transformer=="string"&&K.push(z.transformer),z.upstreams.forEach(S=>{typeof S.transformer=="string"&&K.push(S.transformer)}),K}))))},[u,d,p,m,c,f,b,k,w,C,E,a,n,i,T,M,R,j,P,I,q,D,A,N,Z,Q,x]}class ch extends Nt{constructor(s){super(),Ut(this,s,fh,uh,Vt,{},null,[-1,-1])}}const D1="/__ui/api";class e0{static async getAll(){const s=await fetch(\`\${D1}/transformers\`);if(!s.ok)throw new Error(\`HTTP \${s.status}: \${s.statusText}\`);const e=await s.json();return e.plugins||e.transformers||[]}static async getById(s){const e=await fetch(\`\${D1}/transformers/\${encodeURIComponent(s)}\`);if(!e.ok)throw new Error(\`HTTP \${e.status}: \${e.statusText}\`);return await e.json()}}let xr=null;async function dh(){if(xr===null)try{xr=await e0.getAll()}catch(l){console.warn("Failed to fetch transformers from API, using fallback:",l),xr=["openai-to-anthropic","anthropic-to-openai","anthropic-to-gemini"]}return xr}function Du(l,s){const e=[],n=\`upstreams[\${s}]\`;if(!l.target)e.push({field:\`\${n}.target\`,message:Cs(Rt)("validation.targetRequired")});else try{const a=new URL(l.target);["http:","https:"].includes(a.protocol)||e.push({field:\`\${n}.target\`,message:Cs(Rt)("validation.targetProtocol")})}catch{e.push({field:\`\${n}.target\`,message:Cs(Rt)("validation.invalidUrl")})}return l.weight!==void 0&&(typeof l.weight!="number"||l.weight<=0)&&e.push({field:\`\${n}.weight\`,message:Cs(Rt)("validation.weightPositive")}),l.priority!==void 0&&(typeof l.priority!="number"||l.priority<0)&&e.push({field:\`\${n}.priority\`,message:Cs(Rt)("validation.priorityNonNegative")}),e}function ph(l){const s=[];return l.some(n=>n.weight!==void 0)&&l.reduce((a,i)=>a+(i.weight||0),0)===0&&s.push({field:"upstreams",message:Cs(Rt)("validation.totalWeightPositive")}),s}async function hh(l,s){const e=Du(l,s),n=\`upstreams[\${s}]\`;if(l.plugins&&l.plugins.length>0){const a=l.plugins[0];if(typeof a=="string")try{const i=await dh();if(!i.includes(a)){const u=Cs(Rt);e.push({field:\`\${n}.plugins\`,message:u("validation.unknownTransformer",{values:{transformer:a,options:i.join(", ")}})})}}catch(i){console.warn("Failed to validate plugin:",i)}}return e}async function mh(l){const s=[];if(l.path?l.path.startsWith("/")||s.push({field:"path",message:Cs(Rt)("validation.pathStartSlash")}):s.push({field:"path",message:Cs(Rt)("validation.pathRequired")}),!l.upstreams||l.upstreams.length===0)s.push({field:"upstreams",message:Cs(Rt)("validation.upstreamRequired")});else{const e=l.upstreams.map((a,i)=>hh(a,i));(await Promise.all(e)).forEach(a=>s.push(...a))}return l.pathRewrite&&Object.keys(l.pathRewrite).forEach(e=>{try{new RegExp(e)}catch{const n=Cs(Rt);s.push({field:\`pathRewrite.\${e}\`,message:n("validation.invalidRegex",{values:{pattern:e}})})}}),l.failover?.enabled&&(l.failover.retryableStatusCodes&&l.failover.retryableStatusCodes.forEach(e=>{if(e<100||e>599){const n=Cs(Rt);s.push({field:"failover.retryableStatusCodes",message:n("validation.invalidStatusCode",{values:{code:e}})})}}),l.failover.recoveryIntervalMs!==void 0&&l.failover.recoveryIntervalMs<=0&&s.push({field:"failover.recoveryIntervalMs",message:Cs(Rt)("validation.recoveryIntervalPositive")}),l.failover.recoveryTimeoutMs!==void 0&&l.failover.recoveryTimeoutMs<=0&&s.push({field:"failover.recoveryTimeoutMs",message:Cs(Rt)("validation.recoveryTimeoutPositive")})),s}function B1(l){let s,e,n,a,i,u,c,f,d,p,m;function g(w,C){return w[2]==="success"?vh:w[2]==="error"?bh:w[2]==="warning"?_h:gh}let b=g(l),k=b(l);return{c(){s=r("div"),e=r("div"),n=r("div"),k.c(),a=h(),i=r("span"),u=_(l[1]),c=h(),f=r("button"),f.textContent="\u2715",o(f,"class","btn btn-sm btn-ghost"),o(e,"class",d="alert "+l[3]+" shadow-lg"),o(s,"class","toast toast-end toast-top z-50")},m(w,C){L(w,s,C),t(s,e),t(e,n),k.m(n,null),t(n,a),t(n,i),t(i,u),t(e,c),t(e,f),p||(m=V(f,"click",l[4]),p=!0)},p(w,C){b!==(b=g(w))&&(k.d(1),k=b(w),k&&(k.c(),k.m(n,a))),C&2&&v(u,w[1]),C&8&&d!==(d="alert "+w[3]+" shadow-lg")&&o(e,"class",d)},d(w){w&&H(s),k.d(),p=!1,m()}}}function gh(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"class","stroke-current shrink-0 w-6 h-6")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function _h(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","stroke-current shrink-0 h-6 w-6"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function bh(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","stroke-current shrink-0 h-6 w-6"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function vh(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","stroke-current shrink-0 h-6 w-6"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function kh(l){let s,e=l[0]&&B1(l);return{c(){e&&e.c(),s=Ul()},m(n,a){e&&e.m(n,a),L(n,s,a)},p(n,[a]){n[0]?e?e.p(n,a):(e=B1(n),e.c(),e.m(s.parentNode,s)):e&&(e.d(1),e=null)},i:ot,o:ot,d(n){n&&H(s),e&&e.d(n)}}}function wh(l,s,e){let n,{message:a}=s,{type:i="info"}=s,{duration:u=3e3}=s,{visible:c=!0}=s;const f=oa();let d;Hs(()=>(u>0&&(d=setTimeout(()=>{e(0,c=!1),f("close")},u)),()=>{d&&clearTimeout(d)}));function p(){e(0,c=!1),f("close"),d&&clearTimeout(d)}return l.$$set=m=>{"message"in m&&e(1,a=m.message),"type"in m&&e(2,i=m.type),"duration"in m&&e(5,u=m.duration),"visible"in m&&e(0,c=m.visible)},l.$$.update=()=>{l.$$.dirty&4&&e(3,n={success:"alert-success",error:"alert-error",warning:"alert-warning",info:"alert-info"}[i])},[c,a,i,n,p,u]}class yh extends Nt{constructor(s){super(),Ut(this,s,wh,kh,Vt,{message:1,type:2,duration:5,visible:0})}}function I1(l,s,e){const n=l.slice();return n[7]=s[e],n}function A1(l){let s,e,n,a,i,u,c,f,d,p,m,g,b=ut(l[1]),k=[];for(let w=0;w<b.length;w+=1)k[w]=F1(I1(l,b,w));return{c(){s=r("div"),e=r("div"),n=r("h3"),n.textContent="Select Route Template",a=h(),i=r("div");for(let w=0;w<k.length;w+=1)k[w].c();u=h(),c=r("div"),f=r("button"),f.textContent="Close",d=h(),p=r("button"),o(n,"class","font-bold text-lg mb-4"),o(i,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),o(f,"type","button"),o(f,"class","btn btn-sm"),o(c,"class","modal-action"),o(e,"class","modal-box max-w-4xl"),o(p,"type","button"),o(p,"class","modal-backdrop"),o(p,"aria-label","Close modal"),o(s,"class","modal modal-open")},m(w,C){L(w,s,C),t(s,e),t(e,n),t(e,a),t(e,i);for(let E=0;E<k.length;E+=1)k[E]&&k[E].m(i,null);t(e,u),t(e,c),t(c,f),t(s,d),t(s,p),m||(g=[V(f,"click",l[4]),V(p,"click",l[5])],m=!0)},p(w,C){if(C&6){b=ut(w[1]);let E;for(E=0;E<b.length;E+=1){const y=I1(w,b,E);k[E]?k[E].p(y,C):(k[E]=F1(y),k[E].c(),k[E].m(i,null))}for(;E<k.length;E+=1)k[E].d(1);k.length=b.length}},d(w){w&&H(s),Gt(k,w),m=!1,vt(g)}}}function F1(l){let s,e,n,a,i,u,c,f,d,p,m;function g(){return l[3](l[7])}return{c(){s=r("button"),e=r("div"),n=r("h4"),n.textContent=\`\${l[7].name}\`,a=h(),i=r("p"),i.textContent=\`\${l[7].description}\`,u=h(),c=r("div"),f=r("div"),f.textContent=\`\${JSON.stringify(l[7].template,null,2)}\`,d=h(),o(n,"class","card-title text-base"),o(i,"class","text-sm text-gray-600"),o(f,"class","text-xs font-mono bg-base-100 p-2 rounded max-h-32 overflow-auto"),o(c,"class","mt-2"),o(e,"class","card-body"),o(s,"type","button"),o(s,"class","card card-compact bg-base-200 hover:bg-base-300 cursor-pointer text-left")},m(b,k){L(b,s,k),t(s,e),t(e,n),t(e,a),t(e,i),t(e,u),t(e,c),t(c,f),t(s,d),p||(m=V(s,"click",g),p=!0)},p(b,k){l=b},d(b){b&&H(s),p=!1,m()}}}function Ch(l){let s,e=l[0]&&A1(l);return{c(){e&&e.c(),s=Ul()},m(n,a){e&&e.m(n,a),L(n,s,a)},p(n,[a]){n[0]?e?e.p(n,a):(e=A1(n),e.c(),e.m(s.parentNode,s)):e&&(e.d(1),e=null)},i:ot,o:ot,d(n){n&&H(s),e&&e.d(n)}}}function Eh(l,s,e){let{showTemplates:n=!1}=s;const a=oa(),i=[{name:"Simple Proxy",description:"Basic reverse proxy to a single upstream",template:{path:"/api",upstreams:[{target:"https://api.example.com",weight:100,priority:1}]}},{name:"Load Balanced",description:"Multiple upstreams with load balancing",template:{path:"/api",upstreams:[{target:"https://api1.example.com",weight:100,priority:1},{target:"https://api2.example.com",weight:100,priority:1}]}},{name:"Failover Setup",description:"Primary and backup upstreams with failover",template:{path:"/api",upstreams:[{target:"https://primary.example.com",weight:200,priority:1},{target:"https://backup.example.com",weight:100,priority:2}],failover:{enabled:!0,retryableStatusCodes:[500,502,503,504]}}},{name:"Anthropic to Gemini",description:"Convert Anthropic API to Google Gemini format",template:{path:"/v1/messages",transformer:"anthropic-to-gemini",upstreams:[{target:"https://generativelanguage.googleapis.com",weight:100,priority:1}]}},{name:"Anthropic to OpenAI",description:"Convert Anthropic API to OpenAI format",template:{path:"/v1/messages",transformer:"anthropic-to-openai",upstreams:[{target:"https://api.openai.com",weight:100,priority:1}]}},{name:"Health Checked API",description:"API with health checks enabled",template:{path:"/api",upstreams:[{target:"https://api.example.com",weight:100,priority:1}],healthCheck:{enabled:!0,interval:3e4,timeout:5e3,path:"/health"}}},{name:"Path Rewrite",description:"Route with path rewriting",template:{path:"/api/v2",upstreams:[{target:"https://api.example.com",weight:100,priority:1}],pathRewrite:{"^/api/v2":"/v1"}}}];function u(p){a("select",p.template),e(0,n=!1)}const c=p=>u(p),f=()=>e(0,n=!1),d=()=>e(0,n=!1);return l.$$set=p=>{"showTemplates"in p&&e(0,n=p.showTemplates)},[n,i,u,c,f,d]}class Th extends Nt{constructor(s){super(),Ut(this,s,Eh,Ch,Vt,{showTemplates:0})}}function z1(l,s,e){const n=l.slice();return n[16]=s[e],n}function Sh(l){let s,e,n=l[7]("plugin.none")+"",a,i,u,c,f,d=ut(l[6]),p=[];for(let g=0;g<d.length;g+=1)p[g]=O1(z1(l,d,g));let m=l[0]&&N1(l);return{c(){s=r("select"),e=r("option"),a=_(n);for(let g=0;g<p.length;g+=1)p[g].c();i=h(),m&&m.c(),u=Ul(),e.__value=null,Y(e,e.__value),o(s,"id","plugin-select"),o(s,"class","select select-bordered"),l[0]===void 0&&pl(()=>l[11].call(s))},m(g,b){L(g,s,b),t(s,e),t(e,a);for(let k=0;k<p.length;k+=1)p[k]&&p[k].m(s,null);kt(s,l[0],!0),L(g,i,b),m&&m.m(g,b),L(g,u,b),c||(f=[V(s,"change",l[11]),V(s,"change",l[8])],c=!0)},p(g,b){if(b&128&&n!==(n=g[7]("plugin.none")+"")&&v(a,n),b&64){d=ut(g[6]);let k;for(k=0;k<d.length;k+=1){const w=z1(g,d,k);p[k]?p[k].p(w,b):(p[k]=O1(w),p[k].c(),p[k].m(s,null))}for(;k<p.length;k+=1)p[k].d(1);p.length=d.length}b&65&&kt(s,g[0]),g[0]?m?m.p(g,b):(m=N1(g),m.c(),m.m(u.parentNode,u)):m&&(m.d(1),m=null)},d(g){g&&(H(s),H(i),H(u)),Gt(p,g),m&&m.d(g),c=!1,vt(f)}}}function Mh(l){let s,e,n,a,i,u=l[7]("routeEditor.noPluginsAvailable")+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(s,"class","alert alert-info")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d&128&&u!==(u=f[7]("routeEditor.noPluginsAvailable")+"")&&v(c,u)},d(f){f&&H(s)}}}function O1(l){let s,e=l[16].name+"",n,a;return{c(){s=r("option"),n=_(e),s.__value=a=l[16].id,Y(s,s.__value)},m(i,u){L(i,s,u),t(s,n)},p(i,u){u&64&&e!==(e=i[16].name+"")&&v(n,e),u&64&&a!==(a=i[16].id)&&(s.__value=a,Y(s,s.__value))},d(i){i&&H(s)}}}function N1(l){let s,e,n=l[6].find(l[12])?.description+"",a;return{c(){s=r("div"),e=r("span"),a=_(n),o(e,"class","label-text-alt text-gray-500"),o(s,"class","label")},m(i,u){L(i,s,u),t(s,e),t(e,a)},p(i,u){u&65&&n!==(n=i[6].find(i[12])?.description+"")&&v(a,n)},d(i){i&&H(s)}}}function U1(l){let s,e,n=l[2]?"Hide":"Show",a,i,u,c,f,d,p=l[2]&&V1(l);return{c(){s=r("div"),e=r("button"),a=_(n),i=_(" Preview"),u=h(),p&&p.c(),c=Ul(),o(e,"type","button"),o(e,"class","btn btn-xs btn-outline"),o(s,"class","flex items-center gap-2")},m(m,g){L(m,s,g),t(s,e),t(e,a),t(e,i),L(m,u,g),p&&p.m(m,g),L(m,c,g),f||(d=V(e,"click",l[13]),f=!0)},p(m,g){g&4&&n!==(n=m[2]?"Hide":"Show")&&v(a,n),m[2]?p?p.p(m,g):(p=V1(m),p.c(),p.m(c.parentNode,c)):p&&(p.d(1),p=null)},d(m){m&&(H(s),H(u),H(c)),p&&p.d(m),f=!1,d()}}}function V1(l){let s,e,n,a=l[7]("plugin.testPlugin")+"",i,u,c,f,d,p,m=l[7]("plugin.input")+"",g,b,k,w,C,E,y,T,M=l[7]("plugin.output")+"",R,j,P,I,q,D,A,N,Z,Q,x=l[7]("plugin.testPlugin")+"",z,K,S,B,U,F=(l[4]||l[5])&&J1(l),J=l[5]&&W1(l);return{c(){s=r("div"),e=r("div"),n=r("h4"),i=_(a),u=h(),c=r("div"),f=r("div"),d=r("label"),p=r("span"),g=_(m),b=h(),k=r("textarea"),C=h(),E=r("div"),y=r("label"),T=r("span"),R=_(M),j=h(),P=r("textarea"),q=h(),D=r("div"),A=r("button"),N=re("svg"),Z=re("path"),Q=h(),z=_(x),K=h(),F&&F.c(),S=h(),J&&J.c(),o(n,"class","font-semibold text-sm"),o(p,"class","label-text text-xs"),o(d,"class","label py-1"),o(d,"for","plugin-input"),o(k,"id","plugin-input"),o(k,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full"),o(k,"placeholder",w=l[7]("plugin.inputPlaceholder")),o(k,"rows","10"),o(T,"class","label-text text-xs"),o(y,"class","label py-1"),o(y,"for","plugin-output"),o(P,"id","plugin-output"),o(P,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full bg-base-100"),P.value=l[4],P.readOnly=!0,o(P,"rows","10"),o(P,"placeholder",I=l[7]("plugin.outputPlaceholder")),o(c,"class","grid grid-cols-2 gap-4"),o(Z,"stroke-linecap","round"),o(Z,"stroke-linejoin","round"),o(Z,"stroke-width","2"),o(Z,"d","M14 5l7 7m0 0l-7 7m7-7H3"),o(N,"xmlns","http://www.w3.org/2000/svg"),o(N,"class","h-3 w-3"),o(N,"fill","none"),o(N,"viewBox","0 0 24 24"),o(N,"stroke","currentColor"),o(A,"type","button"),o(A,"class","btn btn-xs btn-primary"),o(D,"class","flex gap-2"),o(e,"class","card-body p-4 space-y-3"),o(s,"class","card bg-base-200")},m(ie,ue){L(ie,s,ue),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,f),t(f,d),t(d,p),t(p,g),t(f,b),t(f,k),Y(k,l[3]),t(c,C),t(c,E),t(E,y),t(y,T),t(T,R),t(E,j),t(E,P),t(e,q),t(e,D),t(D,A),t(A,N),t(N,Z),t(A,Q),t(A,z),t(D,K),F&&F.m(D,null),t(e,S),J&&J.m(e,null),B||(U=[V(k,"input",l[14]),V(A,"click",l[9])],B=!0)},p(ie,ue){ue&128&&a!==(a=ie[7]("plugin.testPlugin")+"")&&v(i,a),ue&128&&m!==(m=ie[7]("plugin.input")+"")&&v(g,m),ue&128&&w!==(w=ie[7]("plugin.inputPlaceholder"))&&o(k,"placeholder",w),ue&8&&Y(k,ie[3]),ue&128&&M!==(M=ie[7]("plugin.output")+"")&&v(R,M),ue&16&&(P.value=ie[4]),ue&128&&I!==(I=ie[7]("plugin.outputPlaceholder"))&&o(P,"placeholder",I),ue&128&&x!==(x=ie[7]("plugin.testPlugin")+"")&&v(z,x),ie[4]||ie[5]?F?F.p(ie,ue):(F=J1(ie),F.c(),F.m(D,null)):F&&(F.d(1),F=null),ie[5]?J?J.p(ie,ue):(J=W1(ie),J.c(),J.m(e,null)):J&&(J.d(1),J=null)},d(ie){ie&&H(s),F&&F.d(),J&&J.d(),B=!1,vt(U)}}}function J1(l){let s,e=l[7]("common.reset")+"",n,a,i;return{c(){s=r("button"),n=_(e),o(s,"type","button"),o(s,"class","btn btn-xs btn-ghost")},m(u,c){L(u,s,c),t(s,n),a||(i=V(s,"click",l[10]),a=!0)},p(u,c){c&128&&e!==(e=u[7]("common.reset")+"")&&v(n,e)},d(u){u&&H(s),a=!1,i()}}}function W1(l){let s,e,n,a,i,u=l[7]("common.error")+"",c,f,d;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),f=_(": "),d=_(l[5]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-4 w-4"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(i,"class","text-xs"),o(s,"class","alert alert-error py-2")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c),t(i,f),t(i,d)},p(p,m){m&128&&u!==(u=p[7]("common.error")+"")&&v(c,u),m&32&&v(d,p[5])},d(p){p&&H(s)}}}function Rh(l){let s,e,n,a,i,u,c;function f(g,b){return g[6].length===0?Mh:Sh}let d=f(l),p=d(l),m=l[0]&&U1(l);return{c(){s=r("div"),e=r("div"),n=r("label"),a=r("span"),i=_(l[1]),u=h(),p.c(),c=h(),m&&m.c(),o(a,"class","label-text font-semibold"),o(n,"class","label"),o(n,"for","plugin-select"),o(e,"class","form-control"),o(s,"class","space-y-3")},m(g,b){L(g,s,b),t(s,e),t(e,n),t(n,a),t(a,i),t(e,u),p.m(e,null),t(s,c),m&&m.m(s,null)},p(g,[b]){b&2&&v(i,g[1]),d===(d=f(g))&&p?p.p(g,b):(p.d(1),p=d(g),p&&(p.c(),p.m(e,null))),g[0]?m?m.p(g,b):(m=U1(g),m.c(),m.m(s,null)):m&&(m.d(1),m=null)},i:ot,o:ot,d(g){g&&H(s),p.d(),m&&m.d()}}}function t0(l){return l.split("-").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" \u2192 ")}function qh(l){const s=l.split("-to-");if(s.length===2){const[e,n]=s;return\`Convert \${e.charAt(0).toUpperCase()+e.slice(1)} API format to \${n.charAt(0).toUpperCase()+n.slice(1)} format\`}return\`\${t0(l)} plugin\`}function Hh(l,s,e){let n;Dt(l,Rt,T=>e(7,n=T));let{plugin:a=null}=s,{label:i="Plugin"}=s;const u=oa();let c=!1,f=\`{
21251
+ "model": "claude-3-5-sonnet-20241022",
21252
+ "messages": [
21253
+ {
21254
+ "role": "user",
21255
+ "content": "Hello"
21256
+ }
21257
+ ]
21258
+ }\`,d="",p=null,m=[];Hs(async()=>{try{const T=await e0.getAll();e(6,m=T.map(M=>({id:M,name:t0(M),description:qh(M)})))}catch(T){console.warn("Failed to load plugins from API, using fallback:",T),e(6,m=[{id:"openai-to-anthropic",name:"OpenAI \u2192 Anthropic",description:"Convert OpenAI API format to Anthropic format"},{id:"anthropic-to-openai",name:"Anthropic \u2192 OpenAI",description:"Convert Anthropic API format to OpenAI format"},{id:"anthropic-to-gemini",name:"Anthropic \u2192 Gemini",description:"Convert Anthropic API format to Google Gemini format"}])}});function g(){u("change",a),e(4,d=""),e(5,p=null)}function b(){if(!a||!f){e(5,p=n("plugin.testFailed",{values:{error:"Invalid input"}}));return}try{const T=JSON.parse(f);let M;a==="anthropic-to-gemini"?M={contents:T.messages?.map(R=>({role:R.role==="user"?"user":"model",parts:[{text:R.content}]})),generationConfig:{temperature:T.temperature||1,maxOutputTokens:T.max_tokens||8192}}:a==="anthropic-to-openai"?M={model:T.model?.replace("claude","gpt-4"),messages:T.messages,temperature:T.temperature,max_tokens:T.max_tokens}:M={...T,_transformed:!0},e(4,d=JSON.stringify(M,null,2)),e(5,p=null)}catch(T){e(5,p=T.message),e(4,d="")}}function k(){e(4,d=""),e(5,p=null)}function w(){a=dl(this),e(0,a),e(6,m)}const C=T=>T.id===a,E=()=>e(2,c=!c);function y(){f=this.value,e(3,f)}return l.$$set=T=>{"plugin"in T&&e(0,a=T.plugin),"label"in T&&e(1,i=T.label)},[a,i,c,f,d,p,m,n,g,b,k,w,C,E,y]}class l0 extends Nt{constructor(s){super(),Ut(this,s,Hh,Rh,Vt,{plugin:0,label:1})}}function G1(l,s,e){const n=l.slice();return n[15]=s[e],n[16]=s,n[17]=e,n}function Lh(l){let s,e=l[5]("routeEditor.pathHelpLong")+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","label-text-alt text-gray-500")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i&32&&e!==(e=a[5]("routeEditor.pathHelpLong")+"")&&v(n,e)},d(a){a&&H(s)}}}function Ph(l){let s,e=l[1].find(Q1)?.message+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","label-text-alt text-error")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i&2&&e!==(e=a[1].find(Q1)?.message+"")&&v(n,e)},d(a){a&&H(s)}}}function K1(l){let s,e,n,a,i,u,c,f,d,p,m,g,b;function k(){l[11].call(e,l[16],l[17])}function w(){l[12].call(f,l[16],l[17])}function C(){return l[13](l[17])}return{c(){s=r("div"),e=r("input"),a=h(),i=re("svg"),u=re("path"),c=h(),f=r("input"),p=h(),m=r("button"),m.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg>',o(e,"id",\`path-rewrite-pattern-\${l[17]}\`),o(e,"type","text"),o(e,"placeholder",n=l[5]("routeEditor.patternPlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(u,"stroke-linecap","round"),o(u,"stroke-linejoin","round"),o(u,"stroke-width","2"),o(u,"d","M14 5l7 7m0 0l-7 7m7-7H3"),o(i,"xmlns","http://www.w3.org/2000/svg"),o(i,"class","h-5 w-5 text-gray-400 flex-shrink-0"),o(i,"fill","none"),o(i,"viewBox","0 0 24 24"),o(i,"stroke","currentColor"),o(f,"id",\`path-rewrite-replacement-\${l[17]}\`),o(f,"type","text"),o(f,"placeholder",d=l[5]("routeEditor.replacementPlaceholder")),o(f,"class","input input-bordered input-sm flex-1"),o(m,"type","button"),o(m,"class","btn btn-sm btn-error btn-square flex-shrink-0"),o(s,"class","flex gap-2 items-center")},m(E,y){L(E,s,y),t(s,e),Y(e,l[15].pattern),t(s,a),t(s,i),t(i,u),t(s,c),t(s,f),Y(f,l[15].replacement),t(s,p),t(s,m),g||(b=[V(e,"input",k),V(f,"input",w),V(m,"click",C)],g=!0)},p(E,y){l=E,y&32&&n!==(n=l[5]("routeEditor.patternPlaceholder"))&&o(e,"placeholder",n),y&4&&e.value!==l[15].pattern&&Y(e,l[15].pattern),y&32&&d!==(d=l[5]("routeEditor.replacementPlaceholder"))&&o(f,"placeholder",d),y&4&&f.value!==l[15].replacement&&Y(f,l[15].replacement)},d(E){E&&H(s),g=!1,vt(b)}}}function jh(l){let s,e,n,a,i=l[5]("routes.path")+"",u,c,f,d,p,m,g,b,k,w,C,E,y,T=l[5]("routeEditor.pathRewrite")+"",M,R,j=l[5]("routeEditor.optional")+"",P,I,q,D,A,N,Z,Q,x,z,K,S,B,U=l[5]("routeEditor.addPathRewriteRule")+"",F,J,ie,ue,ne,$,te=l[5]("routeEditor.transformer")+"",ae,ee,G,pe=l[5]("routeEditor.transformerHelp")+"",oe,ge,he,ye,ze,Pe,we,Fe,Je;function je(se,ke){return ke&2&&(k=null),k==null&&(k=!!se[1].some(Dh)),k?Ph:Lh}let Le=je(l,-1),Se=Le(l),fe=ut(l[2]),_e=[];for(let se=0;se<fe.length;se+=1)_e[se]=K1(G1(l,fe,se));function Ie(se){l[14](se)}let De={label:l[5]("routeEditor.transformer")};return l[3]!==void 0&&(De.plugin=l[3]),he=new l0({props:De}),Sl.push(()=>Ml(he,"plugin",Ie)),Pe=new $p({props:{open:l[4]!==null,title:l[5]("common.confirm"),message:l[5]("routeEditor.confirmDeleteRule"),confirmText:l[5]("common.delete"),cancelText:l[5]("common.cancel"),confirmClass:"btn-error"}}),Pe.$on("confirm",l[8]),Pe.$on("cancel",l[9]),{c(){s=r("div"),e=r("div"),n=r("label"),a=r("span"),u=_(i),c=h(),f=r("span"),f.textContent="*",d=h(),p=r("input"),g=h(),b=r("div"),Se.c(),w=h(),C=r("div"),E=r("label"),y=r("span"),M=_(T),R=_(" ("),P=_(j),I=_(\`)
21259
+ \`),q=r("div"),D=re("svg"),A=re("path"),Z=h(),Q=r("div");for(let se=0;se<_e.length;se+=1)_e[se].c();x=h(),z=r("button"),K=re("svg"),S=re("path"),B=h(),F=_(U),J=h(),ie=r("div"),ue=h(),ne=r("div"),$=r("h3"),ae=_(te),ee=h(),G=r("p"),oe=_(pe),ge=h(),Et(he.$$.fragment),ze=h(),Et(Pe.$$.fragment),o(f,"class","text-error"),o(a,"class","label-text font-semibold"),o(n,"class","label"),o(n,"for","route-path"),o(p,"id","route-path"),o(p,"type","text"),o(p,"placeholder",m=l[5]("routeEditor.pathPlaceholder")),o(p,"class","input input-bordered"),p.required=!0,le(p,"input-error",l[1].some(Y1)),o(b,"class","label"),o(e,"class","form-control"),o(A,"stroke-linecap","round"),o(A,"stroke-linejoin","round"),o(A,"stroke-width","2"),o(A,"d","M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(D,"xmlns","http://www.w3.org/2000/svg"),o(D,"class","h-4 w-4 text-gray-400 cursor-help"),o(D,"fill","none"),o(D,"viewBox","0 0 24 24"),o(D,"stroke","currentColor"),o(q,"class","tooltip tooltip-right"),o(q,"data-tip",N=l[5]("routeEditor.pathRewriteTooltip")),o(y,"class","label-text font-semibold flex items-center gap-2"),o(E,"class","label"),o(E,"for","path-rewrite-pattern-0"),o(S,"stroke-linecap","round"),o(S,"stroke-linejoin","round"),o(S,"stroke-width","2"),o(S,"d","M12 4v16m8-8H4"),o(K,"xmlns","http://www.w3.org/2000/svg"),o(K,"class","h-4 w-4"),o(K,"fill","none"),o(K,"viewBox","0 0 24 24"),o(K,"stroke","currentColor"),o(z,"type","button"),o(z,"class","btn btn-sm btn-outline gap-2"),o(Q,"class","space-y-2"),o(C,"class","form-control"),o(ie,"class","divider"),o($,"class","text-lg font-semibold mb-2"),o(G,"class","text-sm text-gray-500 mb-4"),o(s,"class","space-y-6")},m(se,ke){L(se,s,ke),t(s,e),t(e,n),t(n,a),t(a,u),t(a,c),t(a,f),t(e,d),t(e,p),Y(p,l[0].path),t(e,g),t(e,b),Se.m(b,null),t(s,w),t(s,C),t(C,E),t(E,y),t(y,M),t(y,R),t(y,P),t(y,I),t(y,q),t(q,D),t(D,A),t(C,Z),t(C,Q);for(let me=0;me<_e.length;me+=1)_e[me]&&_e[me].m(Q,null);t(Q,x),t(Q,z),t(z,K),t(K,S),t(z,B),t(z,F),t(s,J),t(s,ie),t(s,ue),t(s,ne),t(ne,$),t($,ae),t(ne,ee),t(ne,G),t(G,oe),t(ne,ge),Ct(he,ne,null),L(se,ze,ke),Ct(Pe,se,ke),we=!0,Fe||(Je=[V(p,"input",l[10]),V(z,"click",l[6])],Fe=!0)},p(se,[ke]){if((!we||ke&32)&&i!==(i=se[5]("routes.path")+"")&&v(u,i),(!we||ke&32&&m!==(m=se[5]("routeEditor.pathPlaceholder")))&&o(p,"placeholder",m),ke&1&&p.value!==se[0].path&&Y(p,se[0].path),(!we||ke&2)&&le(p,"input-error",se[1].some(Y1)),Le===(Le=je(se,ke))&&Se?Se.p(se,ke):(Se.d(1),Se=Le(se),Se&&(Se.c(),Se.m(b,null))),(!we||ke&32)&&T!==(T=se[5]("routeEditor.pathRewrite")+"")&&v(M,T),(!we||ke&32)&&j!==(j=se[5]("routeEditor.optional")+"")&&v(P,j),(!we||ke&32&&N!==(N=se[5]("routeEditor.pathRewriteTooltip")))&&o(q,"data-tip",N),ke&164){fe=ut(se[2]);let Ve;for(Ve=0;Ve<fe.length;Ve+=1){const Be=G1(se,fe,Ve);_e[Ve]?_e[Ve].p(Be,ke):(_e[Ve]=K1(Be),_e[Ve].c(),_e[Ve].m(Q,x))}for(;Ve<_e.length;Ve+=1)_e[Ve].d(1);_e.length=fe.length}(!we||ke&32)&&U!==(U=se[5]("routeEditor.addPathRewriteRule")+"")&&v(F,U),(!we||ke&32)&&te!==(te=se[5]("routeEditor.transformer")+"")&&v(ae,te),(!we||ke&32)&&pe!==(pe=se[5]("routeEditor.transformerHelp")+"")&&v(oe,pe);const me={};ke&32&&(me.label=se[5]("routeEditor.transformer")),!ye&&ke&8&&(ye=!0,me.plugin=se[3],Rl(()=>ye=!1)),he.$set(me);const Ee={};ke&16&&(Ee.open=se[4]!==null),ke&32&&(Ee.title=se[5]("common.confirm")),ke&32&&(Ee.message=se[5]("routeEditor.confirmDeleteRule")),ke&32&&(Ee.confirmText=se[5]("common.delete")),ke&32&&(Ee.cancelText=se[5]("common.cancel")),Pe.$set(Ee)},i(se){we||(et(he.$$.fragment,se),et(Pe.$$.fragment,se),we=!0)},o(se){st(he.$$.fragment,se),st(Pe.$$.fragment,se),we=!1},d(se){se&&(H(s),H(ze)),Se.d(),Gt(_e,se),yt(he),yt(Pe,se),Fe=!1,vt(Je)}}}const Dh=l=>l.field==="path",Y1=l=>l.field==="path",Q1=l=>l.field==="path";function Bh(l,s,e){let n;Dt(l,Rt,y=>e(5,n=y));let{route:a}=s,{errors:i=[]}=s,u=[],c=null,f=a.plugins?.[0]||null;function d(){e(2,u=[...u,{pattern:"",replacement:""}])}function p(y){e(4,c=y)}function m(){c!==null&&(e(2,u=u.filter((y,T)=>T!==c)),e(4,c=null))}function g(){e(4,c=null)}function b(){a.path=this.value,e(0,a),e(2,u),e(3,f)}function k(y,T){y[T].pattern=this.value,e(2,u),e(0,a),e(3,f)}function w(y,T){y[T].replacement=this.value,e(2,u),e(0,a),e(3,f)}const C=y=>p(y);function E(y){f=y,e(3,f)}return l.$$set=y=>{"route"in y&&e(0,a=y.route),"errors"in y&&e(1,i=y.errors)},l.$$.update=()=>{if(l.$$.dirty&5){!u.length&&a.pathRewrite&&e(2,u=Object.entries(a.pathRewrite||{}).map(([T,M])=>({pattern:T,replacement:M})));const y={};u.filter(T=>T.pattern.trim()).forEach(T=>{y[T.pattern]=T.replacement}),e(0,a.pathRewrite=Object.keys(y).length>0?y:void 0,a)}l.$$.dirty&8&&e(0,a.plugins=f?[f]:void 0,a)},[a,i,u,f,c,n,d,p,m,g,b,k,w,C,E]}class Ih extends Nt{constructor(s){super(),Ut(this,s,Bh,jh,Vt,{route:0,errors:1})}}function Z1(l,s,e){const n=l.slice();return n[31]=s[e],n[32]=s,n[33]=e,n}function X1(l,s,e){const n=l.slice();return n[31]=s[e],n[34]=s,n[33]=e,n}function x1(l,s,e){const n=l.slice();return n[31]=s[e],n[33]=e,n}function $1(l,s,e){const n=l.slice();return n[31]=s[e],n[36]=s,n[33]=e,n}function ec(l){let s,e,n,a,i=l[1]&&tc();return{c(){s=r("div"),e=r("span"),n=_(l[0]),a=h(),i&&i.c(),o(e,"class","label-text font-semibold"),o(s,"class","label")},m(u,c){L(u,s,c),t(s,e),t(e,n),t(s,a),i&&i.m(s,null)},p(u,c){c[0]&1&&v(n,u[0]),u[1]?i||(i=tc(),i.c(),i.m(s,null)):i&&(i.d(1),i=null)},d(u){u&&H(s),i&&i.d()}}}function tc(l){let s,e,n;return{c(){s=r("span"),e=_("Support dynamic expressions: "),n=r("code"),n.textContent="{{ expression }}",o(n,"class","text-xs"),o(s,"class","label-text-alt text-xs")},m(a,i){L(a,s,i),t(s,e),t(s,n)},d(a){a&&H(s)}}}function lc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[20].call(e,l[36],l[33])}function g(){l[21].call(i,l[36],l[33])}function b(){return l[22](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("headers.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("headers.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("headers.namePlaceholder"))&&o(e,"placeholder",n),w[0]&8&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("headers.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&8&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function Ah(l){let s,e=l[8]("headers.empty")+"",n;return{c(){s=r("p"),n=_(e),o(s,"class","text-xs text-gray-500")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&256&&e!==(e=a[8]("headers.empty")+"")&&v(n,e)},d(a){a&&H(s)}}}function Fh(l){let s,e=ut(l[4]),n=[];for(let a=0;a<e.length;a+=1)n[a]=sc(x1(l,e,a));return{c(){s=r("div");for(let a=0;a<n.length;a+=1)n[a].c();o(s,"class","flex flex-wrap gap-2 mt-2")},m(a,i){L(a,s,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(s,null)},p(a,i){if(i[0]&4112){e=ut(a[4]);let u;for(u=0;u<e.length;u+=1){const c=x1(a,e,u);n[u]?n[u].p(c,i):(n[u]=sc(c),n[u].c(),n[u].m(s,null))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(a){a&&H(s),Gt(n,a)}}}function sc(l){let s,e=l[31]+"",n,a,i,u,c,f;function d(){return l[24](l[33])}return{c(){s=r("div"),n=_(e),a=h(),i=r("button"),i.textContent="\u2715",u=h(),o(i,"type","button"),o(i,"class","btn btn-ghost btn-xs btn-circle"),o(s,"class","badge badge-lg gap-2")},m(p,m){L(p,s,m),t(s,n),t(s,a),t(s,i),t(s,u),c||(f=V(i,"click",d),c=!0)},p(p,m){l=p,m[0]&16&&e!==(e=l[31]+"")&&v(n,e)},d(p){p&&H(s),c=!1,f()}}}function oc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[25].call(e,l[34],l[33])}function g(){l[26].call(i,l[34],l[33])}function b(){return l[27](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("headers.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("headers.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("headers.namePlaceholder"))&&o(e,"placeholder",n),w[0]&32&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("headers.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&32&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function nc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[28].call(e,l[32],l[33])}function g(){l[29].call(i,l[32],l[33])}function b(){return l[30](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("headers.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("headers.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("headers.namePlaceholder"))&&o(e,"placeholder",n),w[0]&64&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("headers.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&64&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function zh(l){let s,e,n,a,i,u,c,f=l[8]("headers.add")+"",d,p,m=l[3].length+"",g,b,k,w,C,E,y=l[8]("headers.add")+"",T,M,R,j,P,I,q=l[8]("headers.remove")+"",D,A,N=l[4].length+"",Z,Q,x,z,K,S,B,U,F,J=l[8]("common.add")+"",ie,ue,ne,$,te,ae,ee,G,pe=l[8]("headers.replace")+"",oe,ge,he=l[5].length+"",ye,ze,Pe,we,Fe,Je,je=l[8]("headers.add")+"",Le,Se,fe,_e,Ie,De,se=l[8]("headers.default")+"",ke,me,Ee=l[6].length+"",Ve,Be,nt,Ne,Qe,Ye,ve=l[8]("headers.add")+"",de,Te,Ze,Me=l[2]&&ec(l),Ue=ut(l[3]),Ce=[];for(let O=0;O<Ue.length;O+=1)Ce[O]=lc($1(l,Ue,O));function mt(O,He){return O[4].length>0?Fh:Ah}let Ge=mt(l),ce=Ge(l),qe=ut(l[5]),Re=[];for(let O=0;O<qe.length;O+=1)Re[O]=oc(X1(l,qe,O));let dt=ut(l[6]),We=[];for(let O=0;O<dt.length;O+=1)We[O]=nc(Z1(l,dt,O));return{c(){s=r("div"),Me&&Me.c(),e=h(),n=r("div"),a=r("div"),i=r("input"),u=h(),c=r("div"),d=_(f),p=_(" ("),g=_(m),b=_(")"),k=h(),w=r("div");for(let O=0;O<Ce.length;O+=1)Ce[O].c();C=h(),E=r("button"),T=_(y),M=h(),R=r("div"),j=r("input"),P=h(),I=r("div"),D=_(q),A=_(" ("),Z=_(N),Q=_(")"),x=h(),z=r("div"),K=r("div"),S=r("input"),U=h(),F=r("button"),ie=_(J),ne=h(),ce.c(),$=h(),te=r("div"),ae=r("input"),ee=h(),G=r("div"),oe=_(pe),ge=_(" ("),ye=_(he),ze=_(")"),Pe=h(),we=r("div");for(let O=0;O<Re.length;O+=1)Re[O].c();Fe=h(),Je=r("button"),Le=_(je),Se=h(),fe=r("div"),_e=r("input"),Ie=h(),De=r("div"),ke=_(se),me=_(" ("),Ve=_(Ee),Be=_(")"),nt=h(),Ne=r("div");for(let O=0;O<We.length;O+=1)We[O].c();Qe=h(),Ye=r("button"),de=_(ve),o(i,"type","checkbox"),i.checked=!0,o(c,"class","collapse-title text-sm font-medium"),o(E,"type","button"),o(E,"class","btn btn-sm btn-ghost"),o(w,"class","collapse-content space-y-2"),o(a,"class","collapse collapse-arrow bg-base-200"),o(j,"type","checkbox"),o(I,"class","collapse-title text-sm font-medium"),o(S,"type","text"),o(S,"placeholder",B=l[8]("headers.namePlaceholder")),o(S,"class","input input-bordered input-sm flex-1"),o(F,"type","button"),o(F,"class","btn btn-sm btn-primary"),F.disabled=ue=!l[7].trim(),o(K,"class","flex gap-2"),o(z,"class","collapse-content space-y-2"),o(R,"class","collapse collapse-arrow bg-base-200"),o(ae,"type","checkbox"),o(G,"class","collapse-title text-sm font-medium"),o(Je,"type","button"),o(Je,"class","btn btn-sm btn-ghost"),o(we,"class","collapse-content space-y-2"),o(te,"class","collapse collapse-arrow bg-base-200"),o(_e,"type","checkbox"),o(De,"class","collapse-title text-sm font-medium"),o(Ye,"type","button"),o(Ye,"class","btn btn-sm btn-ghost"),o(Ne,"class","collapse-content space-y-2"),o(fe,"class","collapse collapse-arrow bg-base-200"),o(n,"class","space-y-4"),o(s,"class","form-control w-full")},m(O,He){L(O,s,He),Me&&Me.m(s,null),t(s,e),t(s,n),t(n,a),t(a,i),t(a,u),t(a,c),t(c,d),t(c,p),t(c,g),t(c,b),t(a,k),t(a,w);for(let X=0;X<Ce.length;X+=1)Ce[X]&&Ce[X].m(w,null);t(w,C),t(w,E),t(E,T),t(n,M),t(n,R),t(R,j),t(R,P),t(R,I),t(I,D),t(I,A),t(I,Z),t(I,Q),t(R,x),t(R,z),t(z,K),t(K,S),Y(S,l[7]),t(K,U),t(K,F),t(F,ie),t(z,ne),ce.m(z,null),t(n,$),t(n,te),t(te,ae),t(te,ee),t(te,G),t(G,oe),t(G,ge),t(G,ye),t(G,ze),t(te,Pe),t(te,we);for(let X=0;X<Re.length;X+=1)Re[X]&&Re[X].m(we,null);t(we,Fe),t(we,Je),t(Je,Le),t(n,Se),t(n,fe),t(fe,_e),t(fe,Ie),t(fe,De),t(De,ke),t(De,me),t(De,Ve),t(De,Be),t(fe,nt),t(fe,Ne);for(let X=0;X<We.length;X+=1)We[X]&&We[X].m(Ne,null);t(Ne,Qe),t(Ne,Ye),t(Ye,de),Te||(Ze=[V(E,"click",l[9]),V(S,"input",l[23]),V(S,"keydown",l[13]),V(F,"click",l[11]),V(Je,"click",l[14]),V(Ye,"click",l[16])],Te=!0)},p(O,He){if(O[2]?Me?Me.p(O,He):(Me=ec(O),Me.c(),Me.m(s,e)):Me&&(Me.d(1),Me=null),He[0]&256&&f!==(f=O[8]("headers.add")+"")&&v(d,f),He[0]&8&&m!==(m=O[3].length+"")&&v(g,m),He[0]&1288){Ue=ut(O[3]);let X;for(X=0;X<Ue.length;X+=1){const ft=$1(O,Ue,X);Ce[X]?Ce[X].p(ft,He):(Ce[X]=lc(ft),Ce[X].c(),Ce[X].m(w,C))}for(;X<Ce.length;X+=1)Ce[X].d(1);Ce.length=Ue.length}if(He[0]&256&&y!==(y=O[8]("headers.add")+"")&&v(T,y),He[0]&256&&q!==(q=O[8]("headers.remove")+"")&&v(D,q),He[0]&16&&N!==(N=O[4].length+"")&&v(Z,N),He[0]&256&&B!==(B=O[8]("headers.namePlaceholder"))&&o(S,"placeholder",B),He[0]&128&&S.value!==O[7]&&Y(S,O[7]),He[0]&256&&J!==(J=O[8]("common.add")+"")&&v(ie,J),He[0]&128&&ue!==(ue=!O[7].trim())&&(F.disabled=ue),Ge===(Ge=mt(O))&&ce?ce.p(O,He):(ce.d(1),ce=Ge(O),ce&&(ce.c(),ce.m(z,null))),He[0]&256&&pe!==(pe=O[8]("headers.replace")+"")&&v(oe,pe),He[0]&32&&he!==(he=O[5].length+"")&&v(ye,he),He[0]&33056){qe=ut(O[5]);let X;for(X=0;X<qe.length;X+=1){const ft=X1(O,qe,X);Re[X]?Re[X].p(ft,He):(Re[X]=oc(ft),Re[X].c(),Re[X].m(we,Fe))}for(;X<Re.length;X+=1)Re[X].d(1);Re.length=qe.length}if(He[0]&256&&je!==(je=O[8]("headers.add")+"")&&v(Le,je),He[0]&256&&se!==(se=O[8]("headers.default")+"")&&v(ke,se),He[0]&64&&Ee!==(Ee=O[6].length+"")&&v(Ve,Ee),He[0]&131392){dt=ut(O[6]);let X;for(X=0;X<dt.length;X+=1){const ft=Z1(O,dt,X);We[X]?We[X].p(ft,He):(We[X]=nc(ft),We[X].c(),We[X].m(Ne,Qe))}for(;X<We.length;X+=1)We[X].d(1);We.length=dt.length}He[0]&256&&ve!==(ve=O[8]("headers.add")+"")&&v(de,ve)},i:ot,o:ot,d(O){O&&H(s),Me&&Me.d(),Gt(Ce,O),ce.d(),Gt(Re,O),Gt(We,O),Te=!1,vt(Ze)}}}function Oh(l,s,e){let n;Dt(l,Rt,S=>e(8,n=S));let{value:a={}}=s,{label:i="Headers"}=s,{showHelp:u=!0}=s,{showLabel:c=!0}=s,f=[],d=[],p="",m=[],g=[],b=!1;function k(){e(3,f=[...f,{key:"",value:""}]),e(19,b=!0)}function w(S){e(3,f=f.filter((B,U)=>U!==S))}function C(){const S=p.trim();S&&!d.includes(S)&&(e(4,d=[...d,S]),e(7,p=""),e(19,b=!0))}function E(S){e(4,d=d.filter((B,U)=>U!==S))}function y(S){S.key==="Enter"&&(S.preventDefault(),C())}function T(){e(5,m=[...m,{key:"",value:""}]),e(19,b=!0)}function M(S){e(5,m=m.filter((B,U)=>U!==S))}function R(){e(6,g=[...g,{key:"",value:""}]),e(19,b=!0)}function j(S){e(6,g=g.filter((B,U)=>U!==S))}function P(S,B){S[B].key=this.value,e(3,f),e(19,b),e(18,a),e(4,d),e(5,m),e(6,g)}function I(S,B){S[B].value=this.value,e(3,f),e(19,b),e(18,a),e(4,d),e(5,m),e(6,g)}const q=S=>w(S);function D(){p=this.value,e(7,p)}const A=S=>E(S);function N(S,B){S[B].key=this.value,e(5,m),e(19,b),e(18,a),e(3,f),e(4,d),e(6,g)}function Z(S,B){S[B].value=this.value,e(5,m),e(19,b),e(18,a),e(3,f),e(4,d),e(6,g)}const Q=S=>M(S);function x(S,B){S[B].key=this.value,e(6,g),e(19,b),e(18,a),e(3,f),e(4,d),e(5,m)}function z(S,B){S[B].value=this.value,e(6,g),e(19,b),e(18,a),e(3,f),e(4,d),e(5,m)}const K=S=>j(S);return l.$$set=S=>{"value"in S&&e(18,a=S.value),"label"in S&&e(0,i=S.label),"showHelp"in S&&e(1,u=S.showHelp),"showLabel"in S&&e(2,c=S.showLabel)},l.$$.update=()=>{if(l.$$.dirty[0]&786552){!b&&(a.add||a.remove||a.replace||a.default)&&(e(3,f=Object.entries(a.add||{}).map(([F,J])=>({key:F,value:String(J)}))),e(4,d=[...a.remove||[]]),e(5,m=Object.entries(a.replace||{}).map(([F,J])=>({key:F,value:String(J)}))),e(6,g=Object.entries(a.default||{}).map(([F,J])=>({key:F,value:String(J)}))),e(19,b=!0));const S={};f.filter(F=>F.key.trim()).forEach(F=>{S[F.key]=F.value}),e(18,a.add=Object.keys(S).length>0?S:void 0,a),e(18,a.remove=d.length>0?d:void 0,a);const B={};m.filter(F=>F.key.trim()).forEach(F=>{B[F.key]=F.value}),e(18,a.replace=Object.keys(B).length>0?B:void 0,a);const U={};g.filter(F=>F.key.trim()).forEach(F=>{U[F.key]=F.value}),e(18,a.default=Object.keys(U).length>0?U:void 0,a)}},[i,u,c,f,d,m,g,p,n,k,w,C,E,y,T,M,R,j,a,b,P,I,q,D,A,N,Z,Q,x,z,K]}class s0 extends Nt{constructor(s){super(),Ut(this,s,Oh,zh,Vt,{value:18,label:0,showHelp:1,showLabel:2},null,[-1,-1])}}function ac(l,s,e){const n=l.slice();return n[31]=s[e],n[32]=s,n[33]=e,n}function rc(l,s,e){const n=l.slice();return n[31]=s[e],n[34]=s,n[33]=e,n}function ic(l,s,e){const n=l.slice();return n[31]=s[e],n[33]=e,n}function uc(l,s,e){const n=l.slice();return n[31]=s[e],n[36]=s,n[33]=e,n}function fc(l){let s,e,n,a,i=l[1]&&cc();return{c(){s=r("div"),e=r("span"),n=_(l[0]),a=h(),i&&i.c(),o(e,"class","label-text font-semibold"),o(s,"class","label")},m(u,c){L(u,s,c),t(s,e),t(e,n),t(s,a),i&&i.m(s,null)},p(u,c){c[0]&1&&v(n,u[0]),u[1]?i||(i=cc(),i.c(),i.m(s,null)):i&&(i.d(1),i=null)},d(u){u&&H(s),i&&i.d()}}}function cc(l){let s;return{c(){s=r("span"),s.textContent="Support JSON values and dynamic expressions",o(s,"class","label-text-alt text-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function dc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[20].call(e,l[36],l[33])}function g(){l[21].call(i,l[36],l[33])}function b(){return l[22](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("headers.name")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("headers.value")),o(i,"class","input input-bordered input-sm flex-[2]"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("headers.name"))&&o(e,"placeholder",n),w[0]&8&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("headers.value"))&&o(i,"placeholder",u),w[0]&8&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function Nh(l){let s,e=l[8]("body.empty")+"",n;return{c(){s=r("p"),n=_(e),o(s,"class","text-xs text-gray-500")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&256&&e!==(e=a[8]("body.empty")+"")&&v(n,e)},d(a){a&&H(s)}}}function Uh(l){let s,e=ut(l[4]),n=[];for(let a=0;a<e.length;a+=1)n[a]=pc(ic(l,e,a));return{c(){s=r("div");for(let a=0;a<n.length;a+=1)n[a].c();o(s,"class","flex flex-wrap gap-2 mt-2")},m(a,i){L(a,s,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(s,null)},p(a,i){if(i[0]&4112){e=ut(a[4]);let u;for(u=0;u<e.length;u+=1){const c=ic(a,e,u);n[u]?n[u].p(c,i):(n[u]=pc(c),n[u].c(),n[u].m(s,null))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(a){a&&H(s),Gt(n,a)}}}function pc(l){let s,e=l[31]+"",n,a,i,u,c,f;function d(){return l[24](l[33])}return{c(){s=r("div"),n=_(e),a=h(),i=r("button"),i.textContent="\u2715",u=h(),o(i,"type","button"),o(i,"class","btn btn-ghost btn-xs btn-circle"),o(s,"class","badge badge-lg gap-2")},m(p,m){L(p,s,m),t(s,n),t(s,a),t(s,i),t(s,u),c||(f=V(i,"click",d),c=!0)},p(p,m){l=p,m[0]&16&&e!==(e=l[31]+"")&&v(n,e)},d(p){p&&H(s),c=!1,f()}}}function hc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[25].call(e,l[34],l[33])}function g(){l[26].call(i,l[34],l[33])}function b(){return l[27](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("headers.name")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("headers.value")),o(i,"class","input input-bordered input-sm flex-[2]"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("headers.name"))&&o(e,"placeholder",n),w[0]&32&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("headers.value"))&&o(i,"placeholder",u),w[0]&32&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function mc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[28].call(e,l[32],l[33])}function g(){l[29].call(i,l[32],l[33])}function b(){return l[30](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("headers.name")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("headers.value")),o(i,"class","input input-bordered input-sm flex-[2]"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("headers.name"))&&o(e,"placeholder",n),w[0]&64&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("headers.value"))&&o(i,"placeholder",u),w[0]&64&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function Vh(l){let s,e,n,a,i,u,c,f=l[8]("body.add")+"",d,p,m=l[3].length+"",g,b,k,w,C,E,y=l[8]("body.add")+"",T,M,R,j,P,I,q=l[8]("body.remove")+"",D,A,N=l[4].length+"",Z,Q,x,z,K,S,B,U,F,J=l[8]("common.add")+"",ie,ue,ne,$,te,ae,ee,G,pe=l[8]("body.replace")+"",oe,ge,he=l[5].length+"",ye,ze,Pe,we,Fe,Je,je=l[8]("body.add")+"",Le,Se,fe,_e,Ie,De,se=l[8]("body.default")+"",ke,me,Ee=l[6].length+"",Ve,Be,nt,Ne,Qe,Ye,ve=l[8]("body.add")+"",de,Te,Ze,Me=l[2]&&fc(l),Ue=ut(l[3]),Ce=[];for(let O=0;O<Ue.length;O+=1)Ce[O]=dc(uc(l,Ue,O));function mt(O,He){return O[4].length>0?Uh:Nh}let Ge=mt(l),ce=Ge(l),qe=ut(l[5]),Re=[];for(let O=0;O<qe.length;O+=1)Re[O]=hc(rc(l,qe,O));let dt=ut(l[6]),We=[];for(let O=0;O<dt.length;O+=1)We[O]=mc(ac(l,dt,O));return{c(){s=r("div"),Me&&Me.c(),e=h(),n=r("div"),a=r("div"),i=r("input"),u=h(),c=r("div"),d=_(f),p=_(" ("),g=_(m),b=_(")"),k=h(),w=r("div");for(let O=0;O<Ce.length;O+=1)Ce[O].c();C=h(),E=r("button"),T=_(y),M=h(),R=r("div"),j=r("input"),P=h(),I=r("div"),D=_(q),A=_(" ("),Z=_(N),Q=_(")"),x=h(),z=r("div"),K=r("div"),S=r("input"),U=h(),F=r("button"),ie=_(J),ne=h(),ce.c(),$=h(),te=r("div"),ae=r("input"),ee=h(),G=r("div"),oe=_(pe),ge=_(" ("),ye=_(he),ze=_(")"),Pe=h(),we=r("div");for(let O=0;O<Re.length;O+=1)Re[O].c();Fe=h(),Je=r("button"),Le=_(je),Se=h(),fe=r("div"),_e=r("input"),Ie=h(),De=r("div"),ke=_(se),me=_(" ("),Ve=_(Ee),Be=_(")"),nt=h(),Ne=r("div");for(let O=0;O<We.length;O+=1)We[O].c();Qe=h(),Ye=r("button"),de=_(ve),o(i,"type","checkbox"),i.checked=!0,o(c,"class","collapse-title text-sm font-medium"),o(E,"type","button"),o(E,"class","btn btn-sm btn-ghost"),o(w,"class","collapse-content space-y-2"),o(a,"class","collapse collapse-arrow bg-base-200"),o(j,"type","checkbox"),o(I,"class","collapse-title text-sm font-medium"),o(S,"type","text"),o(S,"placeholder",B=l[8]("headers.name")),o(S,"class","input input-bordered input-sm flex-1"),o(F,"type","button"),o(F,"class","btn btn-sm btn-primary"),F.disabled=ue=!l[7].trim(),o(K,"class","flex gap-2"),o(z,"class","collapse-content space-y-2"),o(R,"class","collapse collapse-arrow bg-base-200"),o(ae,"type","checkbox"),o(G,"class","collapse-title text-sm font-medium"),o(Je,"type","button"),o(Je,"class","btn btn-sm btn-ghost"),o(we,"class","collapse-content space-y-2"),o(te,"class","collapse collapse-arrow bg-base-200"),o(_e,"type","checkbox"),o(De,"class","collapse-title text-sm font-medium"),o(Ye,"type","button"),o(Ye,"class","btn btn-sm btn-ghost"),o(Ne,"class","collapse-content space-y-2"),o(fe,"class","collapse collapse-arrow bg-base-200"),o(n,"class","space-y-4"),o(s,"class","form-control w-full")},m(O,He){L(O,s,He),Me&&Me.m(s,null),t(s,e),t(s,n),t(n,a),t(a,i),t(a,u),t(a,c),t(c,d),t(c,p),t(c,g),t(c,b),t(a,k),t(a,w);for(let X=0;X<Ce.length;X+=1)Ce[X]&&Ce[X].m(w,null);t(w,C),t(w,E),t(E,T),t(n,M),t(n,R),t(R,j),t(R,P),t(R,I),t(I,D),t(I,A),t(I,Z),t(I,Q),t(R,x),t(R,z),t(z,K),t(K,S),Y(S,l[7]),t(K,U),t(K,F),t(F,ie),t(z,ne),ce.m(z,null),t(n,$),t(n,te),t(te,ae),t(te,ee),t(te,G),t(G,oe),t(G,ge),t(G,ye),t(G,ze),t(te,Pe),t(te,we);for(let X=0;X<Re.length;X+=1)Re[X]&&Re[X].m(we,null);t(we,Fe),t(we,Je),t(Je,Le),t(n,Se),t(n,fe),t(fe,_e),t(fe,Ie),t(fe,De),t(De,ke),t(De,me),t(De,Ve),t(De,Be),t(fe,nt),t(fe,Ne);for(let X=0;X<We.length;X+=1)We[X]&&We[X].m(Ne,null);t(Ne,Qe),t(Ne,Ye),t(Ye,de),Te||(Ze=[V(E,"click",l[9]),V(S,"input",l[23]),V(S,"keydown",l[13]),V(F,"click",l[11]),V(Je,"click",l[14]),V(Ye,"click",l[16])],Te=!0)},p(O,He){if(O[2]?Me?Me.p(O,He):(Me=fc(O),Me.c(),Me.m(s,e)):Me&&(Me.d(1),Me=null),He[0]&256&&f!==(f=O[8]("body.add")+"")&&v(d,f),He[0]&8&&m!==(m=O[3].length+"")&&v(g,m),He[0]&1288){Ue=ut(O[3]);let X;for(X=0;X<Ue.length;X+=1){const ft=uc(O,Ue,X);Ce[X]?Ce[X].p(ft,He):(Ce[X]=dc(ft),Ce[X].c(),Ce[X].m(w,C))}for(;X<Ce.length;X+=1)Ce[X].d(1);Ce.length=Ue.length}if(He[0]&256&&y!==(y=O[8]("body.add")+"")&&v(T,y),He[0]&256&&q!==(q=O[8]("body.remove")+"")&&v(D,q),He[0]&16&&N!==(N=O[4].length+"")&&v(Z,N),He[0]&256&&B!==(B=O[8]("headers.name"))&&o(S,"placeholder",B),He[0]&128&&S.value!==O[7]&&Y(S,O[7]),He[0]&256&&J!==(J=O[8]("common.add")+"")&&v(ie,J),He[0]&128&&ue!==(ue=!O[7].trim())&&(F.disabled=ue),Ge===(Ge=mt(O))&&ce?ce.p(O,He):(ce.d(1),ce=Ge(O),ce&&(ce.c(),ce.m(z,null))),He[0]&256&&pe!==(pe=O[8]("body.replace")+"")&&v(oe,pe),He[0]&32&&he!==(he=O[5].length+"")&&v(ye,he),He[0]&33056){qe=ut(O[5]);let X;for(X=0;X<qe.length;X+=1){const ft=rc(O,qe,X);Re[X]?Re[X].p(ft,He):(Re[X]=hc(ft),Re[X].c(),Re[X].m(we,Fe))}for(;X<Re.length;X+=1)Re[X].d(1);Re.length=qe.length}if(He[0]&256&&je!==(je=O[8]("body.add")+"")&&v(Le,je),He[0]&256&&se!==(se=O[8]("body.default")+"")&&v(ke,se),He[0]&64&&Ee!==(Ee=O[6].length+"")&&v(Ve,Ee),He[0]&131392){dt=ut(O[6]);let X;for(X=0;X<dt.length;X+=1){const ft=ac(O,dt,X);We[X]?We[X].p(ft,He):(We[X]=mc(ft),We[X].c(),We[X].m(Ne,Qe))}for(;X<We.length;X+=1)We[X].d(1);We.length=dt.length}He[0]&256&&ve!==(ve=O[8]("body.add")+"")&&v(de,ve)},i:ot,o:ot,d(O){O&&H(s),Me&&Me.d(),Gt(Ce,O),ce.d(),Gt(Re,O),Gt(We,O),Te=!1,vt(Ze)}}}function Jh(l,s,e){let n;Dt(l,Rt,S=>e(8,n=S));let{value:a={}}=s,{label:i="Body"}=s,{showHelp:u=!0}=s,{showLabel:c=!0}=s,f=[],d=[],p="",m=[],g=[],b=!1;function k(){e(3,f=[...f,{key:"",value:""}]),e(19,b=!0)}function w(S){e(3,f=f.filter((B,U)=>U!==S))}function C(){const S=p.trim();S&&!d.includes(S)&&(e(4,d=[...d,S]),e(7,p=""),e(19,b=!0))}function E(S){e(4,d=d.filter((B,U)=>U!==S))}function y(S){S.key==="Enter"&&(S.preventDefault(),C())}function T(){e(5,m=[...m,{key:"",value:""}]),e(19,b=!0)}function M(S){e(5,m=m.filter((B,U)=>U!==S))}function R(){e(6,g=[...g,{key:"",value:""}]),e(19,b=!0)}function j(S){e(6,g=g.filter((B,U)=>U!==S))}function P(S,B){S[B].key=this.value,e(3,f),e(19,b),e(18,a),e(4,d),e(5,m),e(6,g)}function I(S,B){S[B].value=this.value,e(3,f),e(19,b),e(18,a),e(4,d),e(5,m),e(6,g)}const q=S=>w(S);function D(){p=this.value,e(7,p)}const A=S=>E(S);function N(S,B){S[B].key=this.value,e(5,m),e(19,b),e(18,a),e(3,f),e(4,d),e(6,g)}function Z(S,B){S[B].value=this.value,e(5,m),e(19,b),e(18,a),e(3,f),e(4,d),e(6,g)}const Q=S=>M(S);function x(S,B){S[B].key=this.value,e(6,g),e(19,b),e(18,a),e(3,f),e(4,d),e(5,m)}function z(S,B){S[B].value=this.value,e(6,g),e(19,b),e(18,a),e(3,f),e(4,d),e(5,m)}const K=S=>j(S);return l.$$set=S=>{"value"in S&&e(18,a=S.value),"label"in S&&e(0,i=S.label),"showHelp"in S&&e(1,u=S.showHelp),"showLabel"in S&&e(2,c=S.showLabel)},l.$$.update=()=>{if(l.$$.dirty[0]&786552){!b&&(a.add||a.remove||a.replace||a.default)&&(e(3,f=Object.entries(a.add||{}).map(([F,J])=>({key:F,value:typeof J=="string"?J:JSON.stringify(J)}))),e(4,d=[...a.remove||[]]),e(5,m=Object.entries(a.replace||{}).map(([F,J])=>({key:F,value:typeof J=="string"?J:JSON.stringify(J)}))),e(6,g=Object.entries(a.default||{}).map(([F,J])=>({key:F,value:typeof J=="string"?J:JSON.stringify(J)}))),e(19,b=!0));const S={};f.filter(F=>F.key.trim()).forEach(F=>{try{S[F.key]=JSON.parse(F.value)}catch{S[F.key]=F.value}}),e(18,a.add=Object.keys(S).length>0?S:void 0,a),e(18,a.remove=d.length>0?d:void 0,a);const B={};m.filter(F=>F.key.trim()).forEach(F=>{try{B[F.key]=JSON.parse(F.value)}catch{B[F.key]=F.value}}),e(18,a.replace=Object.keys(B).length>0?B:void 0,a);const U={};g.filter(F=>F.key.trim()).forEach(F=>{try{U[F.key]=JSON.parse(F.value)}catch{U[F.key]=F.value}}),e(18,a.default=Object.keys(U).length>0?U:void 0,a)}},[i,u,c,f,d,m,g,p,n,k,w,C,E,y,T,M,R,j,a,b,P,I,q,D,A,N,Z,Q,x,z,K]}class o0 extends Nt{constructor(s){super(),Ut(this,s,Jh,Vh,Vt,{value:18,label:0,showHelp:1,showLabel:2},null,[-1,-1])}}function gc(l,s,e){const n=l.slice();return n[31]=s[e],n[32]=s,n[33]=e,n}function _c(l,s,e){const n=l.slice();return n[31]=s[e],n[34]=s,n[33]=e,n}function bc(l,s,e){const n=l.slice();return n[31]=s[e],n[33]=e,n}function vc(l,s,e){const n=l.slice();return n[31]=s[e],n[36]=s,n[33]=e,n}function kc(l){let s,e,n,a,i=l[1]&&wc();return{c(){s=r("div"),e=r("span"),n=_(l[0]),a=h(),i&&i.c(),o(e,"class","label-text font-semibold"),o(s,"class","label")},m(u,c){L(u,s,c),t(s,e),t(e,n),t(s,a),i&&i.m(s,null)},p(u,c){c[0]&1&&v(n,u[0]),u[1]?i||(i=wc(),i.c(),i.m(s,null)):i&&(i.d(1),i=null)},d(u){u&&H(s),i&&i.d()}}}function wc(l){let s,e,n;return{c(){s=r("span"),e=_("Support dynamic expressions: "),n=r("code"),n.textContent="{{ expression }}",o(n,"class","text-xs"),o(s,"class","label-text-alt text-xs")},m(a,i){L(a,s,i),t(s,e),t(s,n)},d(a){a&&H(s)}}}function yc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[20].call(e,l[36],l[33])}function g(){l[21].call(i,l[36],l[33])}function b(){return l[22](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("query.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("query.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("query.namePlaceholder"))&&o(e,"placeholder",n),w[0]&8&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("query.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&8&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function Wh(l){let s,e=l[8]("query.empty")+"",n;return{c(){s=r("p"),n=_(e),o(s,"class","text-xs text-gray-500")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&256&&e!==(e=a[8]("query.empty")+"")&&v(n,e)},d(a){a&&H(s)}}}function Gh(l){let s,e=ut(l[4]),n=[];for(let a=0;a<e.length;a+=1)n[a]=Cc(bc(l,e,a));return{c(){s=r("div");for(let a=0;a<n.length;a+=1)n[a].c();o(s,"class","flex flex-wrap gap-2 mt-2")},m(a,i){L(a,s,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(s,null)},p(a,i){if(i[0]&4112){e=ut(a[4]);let u;for(u=0;u<e.length;u+=1){const c=bc(a,e,u);n[u]?n[u].p(c,i):(n[u]=Cc(c),n[u].c(),n[u].m(s,null))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(a){a&&H(s),Gt(n,a)}}}function Cc(l){let s,e=l[31]+"",n,a,i,u,c,f;function d(){return l[24](l[33])}return{c(){s=r("div"),n=_(e),a=h(),i=r("button"),i.textContent="\u2715",u=h(),o(i,"type","button"),o(i,"class","btn btn-ghost btn-xs btn-circle"),o(s,"class","badge badge-lg gap-2")},m(p,m){L(p,s,m),t(s,n),t(s,a),t(s,i),t(s,u),c||(f=V(i,"click",d),c=!0)},p(p,m){l=p,m[0]&16&&e!==(e=l[31]+"")&&v(n,e)},d(p){p&&H(s),c=!1,f()}}}function Ec(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[25].call(e,l[34],l[33])}function g(){l[26].call(i,l[34],l[33])}function b(){return l[27](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("query.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("query.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("query.namePlaceholder"))&&o(e,"placeholder",n),w[0]&32&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("query.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&32&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function Tc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[28].call(e,l[32],l[33])}function g(){l[29].call(i,l[32],l[33])}function b(){return l[30](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("query.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("query.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("query.namePlaceholder"))&&o(e,"placeholder",n),w[0]&64&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("query.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&64&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function Kh(l){let s,e,n,a,i,u,c,f=l[8]("query.add")+"",d,p,m=l[3].length+"",g,b,k,w,C,E,y=l[8]("query.add")+"",T,M,R,j,P,I,q=l[8]("query.remove")+"",D,A,N=l[4].length+"",Z,Q,x,z,K,S,B,U,F,J=l[8]("common.add")+"",ie,ue,ne,$,te,ae,ee,G,pe=l[8]("query.replace")+"",oe,ge,he=l[5].length+"",ye,ze,Pe,we,Fe,Je,je=l[8]("query.add")+"",Le,Se,fe,_e,Ie,De,se=l[8]("query.default")+"",ke,me,Ee=l[6].length+"",Ve,Be,nt,Ne,Qe,Ye,ve=l[8]("query.add")+"",de,Te,Ze,Me=l[2]&&kc(l),Ue=ut(l[3]),Ce=[];for(let O=0;O<Ue.length;O+=1)Ce[O]=yc(vc(l,Ue,O));function mt(O,He){return O[4].length>0?Gh:Wh}let Ge=mt(l),ce=Ge(l),qe=ut(l[5]),Re=[];for(let O=0;O<qe.length;O+=1)Re[O]=Ec(_c(l,qe,O));let dt=ut(l[6]),We=[];for(let O=0;O<dt.length;O+=1)We[O]=Tc(gc(l,dt,O));return{c(){s=r("div"),Me&&Me.c(),e=h(),n=r("div"),a=r("div"),i=r("input"),u=h(),c=r("div"),d=_(f),p=_(" ("),g=_(m),b=_(")"),k=h(),w=r("div");for(let O=0;O<Ce.length;O+=1)Ce[O].c();C=h(),E=r("button"),T=_(y),M=h(),R=r("div"),j=r("input"),P=h(),I=r("div"),D=_(q),A=_(" ("),Z=_(N),Q=_(")"),x=h(),z=r("div"),K=r("div"),S=r("input"),U=h(),F=r("button"),ie=_(J),ne=h(),ce.c(),$=h(),te=r("div"),ae=r("input"),ee=h(),G=r("div"),oe=_(pe),ge=_(" ("),ye=_(he),ze=_(")"),Pe=h(),we=r("div");for(let O=0;O<Re.length;O+=1)Re[O].c();Fe=h(),Je=r("button"),Le=_(je),Se=h(),fe=r("div"),_e=r("input"),Ie=h(),De=r("div"),ke=_(se),me=_(" ("),Ve=_(Ee),Be=_(")"),nt=h(),Ne=r("div");for(let O=0;O<We.length;O+=1)We[O].c();Qe=h(),Ye=r("button"),de=_(ve),o(i,"type","checkbox"),i.checked=!0,o(c,"class","collapse-title text-sm font-medium"),o(E,"type","button"),o(E,"class","btn btn-sm btn-ghost"),o(w,"class","collapse-content space-y-2"),o(a,"class","collapse collapse-arrow bg-base-200"),o(j,"type","checkbox"),o(I,"class","collapse-title text-sm font-medium"),o(S,"type","text"),o(S,"placeholder",B=l[8]("query.namePlaceholder")),o(S,"class","input input-bordered input-sm flex-1"),o(F,"type","button"),o(F,"class","btn btn-sm btn-primary"),F.disabled=ue=!l[7].trim(),o(K,"class","flex gap-2"),o(z,"class","collapse-content space-y-2"),o(R,"class","collapse collapse-arrow bg-base-200"),o(ae,"type","checkbox"),o(G,"class","collapse-title text-sm font-medium"),o(Je,"type","button"),o(Je,"class","btn btn-sm btn-ghost"),o(we,"class","collapse-content space-y-2"),o(te,"class","collapse collapse-arrow bg-base-200"),o(_e,"type","checkbox"),o(De,"class","collapse-title text-sm font-medium"),o(Ye,"type","button"),o(Ye,"class","btn btn-sm btn-ghost"),o(Ne,"class","collapse-content space-y-2"),o(fe,"class","collapse collapse-arrow bg-base-200"),o(n,"class","space-y-4"),o(s,"class","form-control w-full")},m(O,He){L(O,s,He),Me&&Me.m(s,null),t(s,e),t(s,n),t(n,a),t(a,i),t(a,u),t(a,c),t(c,d),t(c,p),t(c,g),t(c,b),t(a,k),t(a,w);for(let X=0;X<Ce.length;X+=1)Ce[X]&&Ce[X].m(w,null);t(w,C),t(w,E),t(E,T),t(n,M),t(n,R),t(R,j),t(R,P),t(R,I),t(I,D),t(I,A),t(I,Z),t(I,Q),t(R,x),t(R,z),t(z,K),t(K,S),Y(S,l[7]),t(K,U),t(K,F),t(F,ie),t(z,ne),ce.m(z,null),t(n,$),t(n,te),t(te,ae),t(te,ee),t(te,G),t(G,oe),t(G,ge),t(G,ye),t(G,ze),t(te,Pe),t(te,we);for(let X=0;X<Re.length;X+=1)Re[X]&&Re[X].m(we,null);t(we,Fe),t(we,Je),t(Je,Le),t(n,Se),t(n,fe),t(fe,_e),t(fe,Ie),t(fe,De),t(De,ke),t(De,me),t(De,Ve),t(De,Be),t(fe,nt),t(fe,Ne);for(let X=0;X<We.length;X+=1)We[X]&&We[X].m(Ne,null);t(Ne,Qe),t(Ne,Ye),t(Ye,de),Te||(Ze=[V(E,"click",l[9]),V(S,"input",l[23]),V(S,"keydown",l[13]),V(F,"click",l[11]),V(Je,"click",l[14]),V(Ye,"click",l[16])],Te=!0)},p(O,He){if(O[2]?Me?Me.p(O,He):(Me=kc(O),Me.c(),Me.m(s,e)):Me&&(Me.d(1),Me=null),He[0]&256&&f!==(f=O[8]("query.add")+"")&&v(d,f),He[0]&8&&m!==(m=O[3].length+"")&&v(g,m),He[0]&1288){Ue=ut(O[3]);let X;for(X=0;X<Ue.length;X+=1){const ft=vc(O,Ue,X);Ce[X]?Ce[X].p(ft,He):(Ce[X]=yc(ft),Ce[X].c(),Ce[X].m(w,C))}for(;X<Ce.length;X+=1)Ce[X].d(1);Ce.length=Ue.length}if(He[0]&256&&y!==(y=O[8]("query.add")+"")&&v(T,y),He[0]&256&&q!==(q=O[8]("query.remove")+"")&&v(D,q),He[0]&16&&N!==(N=O[4].length+"")&&v(Z,N),He[0]&256&&B!==(B=O[8]("query.namePlaceholder"))&&o(S,"placeholder",B),He[0]&128&&S.value!==O[7]&&Y(S,O[7]),He[0]&256&&J!==(J=O[8]("common.add")+"")&&v(ie,J),He[0]&128&&ue!==(ue=!O[7].trim())&&(F.disabled=ue),Ge===(Ge=mt(O))&&ce?ce.p(O,He):(ce.d(1),ce=Ge(O),ce&&(ce.c(),ce.m(z,null))),He[0]&256&&pe!==(pe=O[8]("query.replace")+"")&&v(oe,pe),He[0]&32&&he!==(he=O[5].length+"")&&v(ye,he),He[0]&33056){qe=ut(O[5]);let X;for(X=0;X<qe.length;X+=1){const ft=_c(O,qe,X);Re[X]?Re[X].p(ft,He):(Re[X]=Ec(ft),Re[X].c(),Re[X].m(we,Fe))}for(;X<Re.length;X+=1)Re[X].d(1);Re.length=qe.length}if(He[0]&256&&je!==(je=O[8]("query.add")+"")&&v(Le,je),He[0]&256&&se!==(se=O[8]("query.default")+"")&&v(ke,se),He[0]&64&&Ee!==(Ee=O[6].length+"")&&v(Ve,Ee),He[0]&131392){dt=ut(O[6]);let X;for(X=0;X<dt.length;X+=1){const ft=gc(O,dt,X);We[X]?We[X].p(ft,He):(We[X]=Tc(ft),We[X].c(),We[X].m(Ne,Qe))}for(;X<We.length;X+=1)We[X].d(1);We.length=dt.length}He[0]&256&&ve!==(ve=O[8]("query.add")+"")&&v(de,ve)},i:ot,o:ot,d(O){O&&H(s),Me&&Me.d(),Gt(Ce,O),ce.d(),Gt(Re,O),Gt(We,O),Te=!1,vt(Ze)}}}function Yh(l,s,e){let n;Dt(l,Rt,S=>e(8,n=S));let{value:a={}}=s,{label:i="Query Parameters"}=s,{showHelp:u=!0}=s,{showLabel:c=!0}=s,f=[],d=[],p="",m=[],g=[],b=!1;function k(){e(3,f=[...f,{key:"",value:""}]),e(19,b=!0)}function w(S){e(3,f=f.filter((B,U)=>U!==S))}function C(){const S=p.trim();S&&!d.includes(S)&&(e(4,d=[...d,S]),e(7,p=""),e(19,b=!0))}function E(S){e(4,d=d.filter((B,U)=>U!==S))}function y(S){S.key==="Enter"&&(S.preventDefault(),C())}function T(){e(5,m=[...m,{key:"",value:""}]),e(19,b=!0)}function M(S){e(5,m=m.filter((B,U)=>U!==S))}function R(){e(6,g=[...g,{key:"",value:""}]),e(19,b=!0)}function j(S){e(6,g=g.filter((B,U)=>U!==S))}function P(S,B){S[B].key=this.value,e(3,f),e(19,b),e(18,a),e(4,d),e(5,m),e(6,g)}function I(S,B){S[B].value=this.value,e(3,f),e(19,b),e(18,a),e(4,d),e(5,m),e(6,g)}const q=S=>w(S);function D(){p=this.value,e(7,p)}const A=S=>E(S);function N(S,B){S[B].key=this.value,e(5,m),e(19,b),e(18,a),e(3,f),e(4,d),e(6,g)}function Z(S,B){S[B].value=this.value,e(5,m),e(19,b),e(18,a),e(3,f),e(4,d),e(6,g)}const Q=S=>M(S);function x(S,B){S[B].key=this.value,e(6,g),e(19,b),e(18,a),e(3,f),e(4,d),e(5,m)}function z(S,B){S[B].value=this.value,e(6,g),e(19,b),e(18,a),e(3,f),e(4,d),e(5,m)}const K=S=>j(S);return l.$$set=S=>{"value"in S&&e(18,a=S.value),"label"in S&&e(0,i=S.label),"showHelp"in S&&e(1,u=S.showHelp),"showLabel"in S&&e(2,c=S.showLabel)},l.$$.update=()=>{if(l.$$.dirty[0]&786552){!b&&(a.add||a.remove||a.replace||a.default)&&(e(3,f=Object.entries(a.add||{}).map(([F,J])=>({key:F,value:String(J)}))),e(4,d=[...a.remove||[]]),e(5,m=Object.entries(a.replace||{}).map(([F,J])=>({key:F,value:String(J)}))),e(6,g=Object.entries(a.default||{}).map(([F,J])=>({key:F,value:String(J)}))),e(19,b=!0));const S={};f.filter(F=>F.key.trim()).forEach(F=>{S[F.key]=F.value}),e(18,a.add=Object.keys(S).length>0?S:void 0,a),e(18,a.remove=d.length>0?d:void 0,a);const B={};m.filter(F=>F.key.trim()).forEach(F=>{B[F.key]=F.value}),e(18,a.replace=Object.keys(B).length>0?B:void 0,a);const U={};g.filter(F=>F.key.trim()).forEach(F=>{U[F.key]=F.value}),e(18,a.default=Object.keys(U).length>0?U:void 0,a)}},[i,u,c,f,d,m,g,p,n,k,w,C,E,y,T,M,R,j,a,b,P,I,q,D,A,N,Z,Q,x,z,K]}class n0 extends Nt{constructor(s){super(),Ut(this,s,Yh,Kh,Vt,{value:18,label:0,showHelp:1,showLabel:2},null,[-1,-1])}}function Sc(l){let s,e,n=l[7]("upstream.title",{values:{index:l[1]+1}})+"",a,i,u,c,f,d,p,m,g,b,k,w,C;return{c(){s=r("div"),e=r("h3"),a=_(n),i=h(),u=r("div"),c=r("button"),f=re("svg"),d=re("path"),m=h(),g=r("button"),b=_("\u2715"),o(e,"class","font-semibold"),o(d,"stroke-linecap","round"),o(d,"stroke-linejoin","round"),o(d,"stroke-width","2"),o(d,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(f,"xmlns","http://www.w3.org/2000/svg"),o(f,"class","h-4 w-4"),o(f,"fill","none"),o(f,"viewBox","0 0 24 24"),o(f,"stroke","currentColor"),o(c,"type","button"),o(c,"class","btn btn-sm btn-outline btn-square"),o(c,"title",p=l[7]("routeCard.duplicate")),o(g,"type","button"),o(g,"class","btn btn-sm btn-error btn-square"),o(g,"title",k=l[7]("upstream.remove")),o(u,"class","flex gap-2"),o(s,"class","flex justify-between items-center mb-4")},m(E,y){L(E,s,y),t(s,e),t(e,a),t(s,i),t(s,u),t(u,c),t(c,f),t(f,d),t(u,m),t(u,g),t(g,b),w||(C=[V(c,"click",function(){sa(l[3])&&l[3].apply(this,arguments)}),V(g,"click",function(){sa(l[2])&&l[2].apply(this,arguments)})],w=!0)},p(E,y){l=E,y&130&&n!==(n=l[7]("upstream.title",{values:{index:l[1]+1}})+"")&&v(a,n),y&128&&p!==(p=l[7]("routeCard.duplicate"))&&o(c,"title",p),y&128&&k!==(k=l[7]("upstream.remove"))&&o(g,"title",k)},d(E){E&&H(s),w=!1,vt(C)}}}function Mc(l){let s,e,n=l[6].find(Hc)?.message+"",a,i;return{c(){s=r("label"),e=r("span"),a=_(n),o(e,"class","label-text-alt text-error"),o(s,"class","label"),o(s,"for",i="upstream-target-"+l[1])},m(u,c){L(u,s,c),t(s,e),t(e,a)},p(u,c){c&64&&n!==(n=u[6].find(Hc)?.message+"")&&v(a,n),c&2&&i!==(i="upstream-target-"+u[1])&&o(s,"for",i)},d(u){u&&H(s)}}}function Qh(l){let s,e,n,a,i,u,c,f=l[7]("upstream.targetUrl")+"",d,p,m,g,b,k,w,C,E,y=l[6].some(Rc),T,M,R,j,P,I=l[7]("upstream.weight")+"",q,D,A,N=l[7]("upstream.weightHelp")+"",Z,Q,x,z,K,S,B,U,F,J,ie,ue,ne,$,te,ae,ee,G,pe,oe,ge=l[7]("upstream.transformerHelp")+"",he,ye,ze,Pe,we,Fe,Je=l[7]("headers.title")+"",je,Le,Se,fe,_e,Ie,De,se,ke,me,Ee=l[7]("body.title")+"",Ve,Be,nt,Ne,Qe,Ye,ve,de,Te,Ze,Me=l[7]("query.title")+"",Ue,Ce,mt,Ge,ce,qe,Re,dt,We=l[4]&&Sc(l),O=y&&Mc(l);function He(Oe){l[11](Oe)}let X={label:l[7]("upstream.transformer")};l[5]!==void 0&&(X.plugin=l[5]),ee=new l0({props:X}),Sl.push(()=>Ml(ee,"plugin",He));function ft(Oe){l[12](Oe)}let Ht={label:l[7]("headers.title"),showHelp:!1,showLabel:!1};l[0].headers!==void 0&&(Ht.value=l[0].headers),fe=new s0({props:Ht}),Sl.push(()=>Ml(fe,"value",ft));function Ke(Oe){l[13](Oe)}let _t={label:l[7]("body.title"),showHelp:!1,showLabel:!1};l[0].body!==void 0&&(_t.value=l[0].body),Ne=new o0({props:_t}),Sl.push(()=>Ml(Ne,"value",Ke));function tt(Oe){l[14](Oe)}let it={label:l[7]("query.title"),showHelp:!1,showLabel:!1};return l[0].query!==void 0&&(it.value=l[0].query),Ge=new n0({props:it}),Sl.push(()=>Ml(Ge,"value",tt)),{c(){s=r("div"),e=r("div"),We&&We.c(),n=h(),a=r("div"),i=r("div"),u=r("label"),c=r("span"),d=_(f),p=h(),m=r("span"),m.textContent="*",b=h(),k=r("input"),E=h(),O&&O.c(),T=h(),M=r("div"),R=r("div"),j=r("label"),P=r("span"),q=_(I),D=h(),A=r("span"),Z=_(N),x=h(),z=r("input"),S=h(),B=r("div"),U=r("label"),F=r("span"),F.textContent="Priority",J=h(),ie=r("span"),ie.textContent="Failover order",ne=h(),$=r("input"),ae=h(),Et(ee.$$.fragment),pe=h(),oe=r("div"),he=_(ge),ye=h(),ze=r("div"),Pe=r("input"),we=h(),Fe=r("div"),je=_(Je),Le=h(),Se=r("div"),Et(fe.$$.fragment),Ie=h(),De=r("div"),se=r("input"),ke=h(),me=r("div"),Ve=_(Ee),Be=h(),nt=r("div"),Et(Ne.$$.fragment),Ye=h(),ve=r("div"),de=r("input"),Te=h(),Ze=r("div"),Ue=_(Me),Ce=h(),mt=r("div"),Et(Ge.$$.fragment),o(m,"class","text-error"),o(c,"class","label-text font-semibold"),o(u,"class","label"),o(u,"for",g="upstream-target-"+l[1]),o(k,"id",w="upstream-target-"+l[1]),o(k,"type","url"),o(k,"placeholder",C=l[7]("upstream.targetPlaceholder")),o(k,"class","input input-bordered"),k.required=!0,le(k,"input-error",l[6].some(qc)),o(i,"class","form-control"),o(P,"class","label-text"),o(A,"class","label-text-alt text-xs"),o(j,"class","label"),o(j,"for",Q="upstream-weight-"+l[1]),o(z,"id",K="upstream-weight-"+l[1]),o(z,"type","number"),o(z,"placeholder","100"),o(z,"class","input input-bordered"),o(z,"min","1"),o(R,"class","form-control"),o(F,"class","label-text"),o(ie,"class","label-text-alt text-xs"),o(U,"class","label"),o(U,"for",ue="upstream-priority-"+l[1]),o($,"id",te="upstream-priority-"+l[1]),o($,"type","number"),o($,"placeholder","1"),o($,"class","input input-bordered"),o($,"min","0"),o(B,"class","form-control"),o(M,"class","grid grid-cols-2 gap-4"),o(oe,"class","divider text-sm font-semibold"),o(Pe,"type","checkbox"),o(Fe,"class","collapse-title text-sm font-medium"),o(Se,"class","collapse-content"),o(ze,"class","collapse collapse-arrow bg-base-200"),o(se,"type","checkbox"),o(me,"class","collapse-title text-sm font-medium"),o(nt,"class","collapse-content"),o(De,"class","collapse collapse-arrow bg-base-200"),o(de,"type","checkbox"),o(Ze,"class","collapse-title text-sm font-medium"),o(mt,"class","collapse-content"),o(ve,"class","collapse collapse-arrow bg-base-200"),o(a,"class","grid grid-cols-1 gap-4"),o(e,"class","card-body p-4"),o(s,"class","card bg-base-100 shadow-sm border border-base-300")},m(Oe,Xe){L(Oe,s,Xe),t(s,e),We&&We.m(e,null),t(e,n),t(e,a),t(a,i),t(i,u),t(u,c),t(c,d),t(c,p),t(c,m),t(i,b),t(i,k),Y(k,l[0].target),t(i,E),O&&O.m(i,null),t(a,T),t(a,M),t(M,R),t(R,j),t(j,P),t(P,q),t(j,D),t(j,A),t(A,Z),t(R,x),t(R,z),Y(z,l[0].weight),t(M,S),t(M,B),t(B,U),t(U,F),t(U,J),t(U,ie),t(B,ne),t(B,$),Y($,l[0].priority),t(a,ae),Ct(ee,a,null),t(a,pe),t(a,oe),t(oe,he),t(a,ye),t(a,ze),t(ze,Pe),t(ze,we),t(ze,Fe),t(Fe,je),t(ze,Le),t(ze,Se),Ct(fe,Se,null),t(a,Ie),t(a,De),t(De,se),t(De,ke),t(De,me),t(me,Ve),t(De,Be),t(De,nt),Ct(Ne,nt,null),t(a,Ye),t(a,ve),t(ve,de),t(ve,Te),t(ve,Ze),t(Ze,Ue),t(ve,Ce),t(ve,mt),Ct(Ge,mt,null),qe=!0,Re||(dt=[V(k,"input",l[8]),V(z,"input",l[9]),V($,"input",l[10])],Re=!0)},p(Oe,[Xe]){Oe[4]?We?We.p(Oe,Xe):(We=Sc(Oe),We.c(),We.m(e,n)):We&&(We.d(1),We=null),(!qe||Xe&128)&&f!==(f=Oe[7]("upstream.targetUrl")+"")&&v(d,f),(!qe||Xe&2&&g!==(g="upstream-target-"+Oe[1]))&&o(u,"for",g),(!qe||Xe&2&&w!==(w="upstream-target-"+Oe[1]))&&o(k,"id",w),(!qe||Xe&128&&C!==(C=Oe[7]("upstream.targetPlaceholder")))&&o(k,"placeholder",C),Xe&1&&k.value!==Oe[0].target&&Y(k,Oe[0].target),(!qe||Xe&64)&&le(k,"input-error",Oe[6].some(qc)),Xe&64&&(y=Oe[6].some(Rc)),y?O?O.p(Oe,Xe):(O=Mc(Oe),O.c(),O.m(i,null)):O&&(O.d(1),O=null),(!qe||Xe&128)&&I!==(I=Oe[7]("upstream.weight")+"")&&v(q,I),(!qe||Xe&128)&&N!==(N=Oe[7]("upstream.weightHelp")+"")&&v(Z,N),(!qe||Xe&2&&Q!==(Q="upstream-weight-"+Oe[1]))&&o(j,"for",Q),(!qe||Xe&2&&K!==(K="upstream-weight-"+Oe[1]))&&o(z,"id",K),Xe&1&&Mt(z.value)!==Oe[0].weight&&Y(z,Oe[0].weight),(!qe||Xe&2&&ue!==(ue="upstream-priority-"+Oe[1]))&&o(U,"for",ue),(!qe||Xe&2&&te!==(te="upstream-priority-"+Oe[1]))&&o($,"id",te),Xe&1&&Mt($.value)!==Oe[0].priority&&Y($,Oe[0].priority);const It={};Xe&128&&(It.label=Oe[7]("upstream.transformer")),!G&&Xe&32&&(G=!0,It.plugin=Oe[5],Rl(()=>G=!1)),ee.$set(It),(!qe||Xe&128)&&ge!==(ge=Oe[7]("upstream.transformerHelp")+"")&&v(he,ge),(!qe||Xe&128)&&Je!==(Je=Oe[7]("headers.title")+"")&&v(je,Je);const rt={};Xe&128&&(rt.label=Oe[7]("headers.title")),!_e&&Xe&1&&(_e=!0,rt.value=Oe[0].headers,Rl(()=>_e=!1)),fe.$set(rt),(!qe||Xe&128)&&Ee!==(Ee=Oe[7]("body.title")+"")&&v(Ve,Ee);const gt={};Xe&128&&(gt.label=Oe[7]("body.title")),!Qe&&Xe&1&&(Qe=!0,gt.value=Oe[0].body,Rl(()=>Qe=!1)),Ne.$set(gt),(!qe||Xe&128)&&Me!==(Me=Oe[7]("query.title")+"")&&v(Ue,Me);const wt={};Xe&128&&(wt.label=Oe[7]("query.title")),!ce&&Xe&1&&(ce=!0,wt.value=Oe[0].query,Rl(()=>ce=!1)),Ge.$set(wt)},i(Oe){qe||(et(ee.$$.fragment,Oe),et(fe.$$.fragment,Oe),et(Ne.$$.fragment,Oe),et(Ge.$$.fragment,Oe),qe=!0)},o(Oe){st(ee.$$.fragment,Oe),st(fe.$$.fragment,Oe),st(Ne.$$.fragment,Oe),st(Ge.$$.fragment,Oe),qe=!1},d(Oe){Oe&&H(s),We&&We.d(),O&&O.d(),yt(ee),yt(fe),yt(Ne),yt(Ge),Re=!1,vt(dt)}}}const Rc=l=>l.field.includes("target"),qc=l=>l.field.includes("target"),Hc=l=>l.field.includes("target");function Zh(l,s,e){let n,a;Dt(l,Rt,y=>e(7,a=y));let{upstream:i}=s,{index:u}=s,{onRemove:c}=s,{onDuplicate:f}=s,{showHeader:d=!0}=s,p=i.plugins?.[0]||null;function m(){i.target=this.value,e(0,i),e(5,p)}function g(){i.weight=Mt(this.value),e(0,i),e(5,p)}function b(){i.priority=Mt(this.value),e(0,i),e(5,p)}function k(y){p=y,e(5,p)}function w(y){l.$$.not_equal(i.headers,y)&&(i.headers=y,e(0,i),e(5,p))}function C(y){l.$$.not_equal(i.body,y)&&(i.body=y,e(0,i),e(5,p))}function E(y){l.$$.not_equal(i.query,y)&&(i.query=y,e(0,i),e(5,p))}return l.$$set=y=>{"upstream"in y&&e(0,i=y.upstream),"index"in y&&e(1,u=y.index),"onRemove"in y&&e(2,c=y.onRemove),"onDuplicate"in y&&e(3,f=y.onDuplicate),"showHeader"in y&&e(4,d=y.showHeader)},l.$$.update=()=>{l.$$.dirty&1&&(e(0,i.headers=i.headers||{add:{},remove:[],default:{}},i),e(0,i.body=i.body||{add:{},remove:[],replace:{},default:{}},i),e(0,i.query=i.query||{add:{},remove:[],replace:{},default:{}},i)),l.$$.dirty&32&&e(0,i.plugins=p?[p]:void 0,i),l.$$.dirty&3&&e(6,n=Du(i,u))},[i,u,c,f,d,p,n,a,m,g,b,k,w,C,E]}class Xh extends Nt{constructor(s){super(),Ut(this,s,Zh,Qh,Vt,{upstream:0,index:1,onRemove:2,onDuplicate:3,showHeader:4})}}function Lc(l,s,e){const n=l.slice();return n[22]=s[e].u,n[23]=s[e].i,n}function Pc(l){let s,e,n=l[0].find(zc)?.message+"",a;return{c(){s=r("div"),e=r("span"),a=_(n),o(s,"class","alert alert-error")},m(i,u){L(i,s,u),t(s,e),t(e,a)},p(i,u){u&1&&n!==(n=i[0].find(zc)?.message+"")&&v(a,n)},d(i){i&&H(s)}}}function jc(l){let s;return{c(){s=r("span"),s.textContent="Transformer",o(s,"class","badge badge-sm badge-info mt-1")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function Dc(l,s){let e,n,a=(s[22].priority||1)+"",i,u,c,f,d,p=s[22].target+"",m,g,b,k,w,C=(s[22].weight||100)+"",E,y,T,M,R,j,P,I,q,D,A,N,Z,Q,x,z,K,S,B,U,F=s[22].plugins&&s[22].plugins.length>0&&jc();function J(){return s[18](s[23])}function ie(){return s[19](s[23])}function ue(){return s[20](s[23])}return{key:l,first:null,c(){e=r("tr"),n=r("td"),i=_(a),u=h(),c=r("td"),f=r("div"),d=r("div"),m=_(p),b=h(),F&&F.c(),k=h(),w=r("td"),E=_(C),y=h(),T=r("td"),M=r("div"),R=r("button"),j=re("svg"),P=re("path"),q=h(),D=r("button"),A=re("svg"),N=re("path"),Q=h(),x=r("button"),z=re("svg"),K=re("path"),o(d,"class","font-bold truncate max-w-xs"),o(d,"title",g=s[22].target),o(f,"class","flex flex-col"),o(P,"stroke-linecap","round"),o(P,"stroke-linejoin","round"),o(P,"stroke-width","2"),o(P,"d","M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"),o(j,"xmlns","http://www.w3.org/2000/svg"),o(j,"class","h-4 w-4"),o(j,"fill","none"),o(j,"viewBox","0 0 24 24"),o(j,"stroke","currentColor"),o(R,"type","button"),o(R,"class","btn btn-square btn-xs"),o(R,"title",I=s[8]("common.edit")),o(N,"stroke-linecap","round"),o(N,"stroke-linejoin","round"),o(N,"stroke-width","2"),o(N,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(A,"xmlns","http://www.w3.org/2000/svg"),o(A,"class","h-4 w-4"),o(A,"fill","none"),o(A,"viewBox","0 0 24 24"),o(A,"stroke","currentColor"),o(D,"type","button"),o(D,"class","btn btn-square btn-xs"),o(D,"title",Z=s[8]("routeCard.duplicate")),o(K,"stroke-linecap","round"),o(K,"stroke-linejoin","round"),o(K,"stroke-width","2"),o(K,"d","M6 18L18 6M6 6l12 12"),o(z,"xmlns","http://www.w3.org/2000/svg"),o(z,"class","h-4 w-4"),o(z,"fill","none"),o(z,"viewBox","0 0 24 24"),o(z,"stroke","currentColor"),o(x,"type","button"),o(x,"class","btn btn-square btn-xs btn-error"),o(x,"title",S=s[8]("common.delete")),o(M,"class","flex gap-1"),o(e,"class","hover"),this.first=e},m(ne,$){L(ne,e,$),t(e,n),t(n,i),t(e,u),t(e,c),t(c,f),t(f,d),t(d,m),t(f,b),F&&F.m(f,null),t(e,k),t(e,w),t(w,E),t(e,y),t(e,T),t(T,M),t(M,R),t(R,j),t(j,P),t(M,q),t(M,D),t(D,A),t(A,N),t(M,Q),t(M,x),t(x,z),t(z,K),B||(U=[V(R,"click",J),V(D,"click",ie),V(x,"click",ue)],B=!0)},p(ne,$){s=ne,$&128&&a!==(a=(s[22].priority||1)+"")&&v(i,a),$&128&&p!==(p=s[22].target+"")&&v(m,p),$&128&&g!==(g=s[22].target)&&o(d,"title",g),s[22].plugins&&s[22].plugins.length>0?F||(F=jc(),F.c(),F.m(f,null)):F&&(F.d(1),F=null),$&128&&C!==(C=(s[22].weight||100)+"")&&v(E,C),$&256&&I!==(I=s[8]("common.edit"))&&o(R,"title",I),$&256&&Z!==(Z=s[8]("routeCard.duplicate"))&&o(D,"title",Z),$&256&&S!==(S=s[8]("common.delete"))&&o(x,"title",S)},d(ne){ne&&H(e),F&&F.d(),B=!1,vt(U)}}}function Bc(l){let s,e,n=(l[2]?l[8]("routes.noMatchingRoutes"):l[8]("routes.noRoutesMessage"))+"",a;return{c(){s=r("tr"),e=r("td"),a=_(n),o(e,"colspan","4"),o(e,"class","text-center text-gray-500 py-8")},m(i,u){L(i,s,u),t(s,e),t(e,a)},p(i,u){u&260&&n!==(n=(i[2]?i[8]("routes.noMatchingRoutes"):i[8]("routes.noRoutesMessage"))+"")&&v(a,n)},d(i){i&&H(s)}}}function Ic(l){let s,e,n=l[1][0].message+"",a;return{c(){s=r("div"),e=r("span"),a=_(n),o(s,"class","alert alert-warning")},m(i,u){L(i,s,u),t(s,e),t(e,a)},p(i,u){u&2&&n!==(n=i[1][0].message+"")&&v(a,n)},d(i){i&&H(s)}}}function Ac(l){let s,e,n,a=(l[4]>=0?l[8]("upstream.title",{values:{index:l[4]+1}}):l[8]("routeEditor.addUpstream"))+"",i,u,c,f,d,p,m,g,b=l[8]("common.cancel")+"",k,w,C,E=l[8]("common.save")+"",y,T,M,R,j;function P(q){l[21](q)}let I={index:l[4],showHeader:!1,onRemove:$h,onDuplicate:em};return l[5]!==void 0&&(I.upstream=l[5]),f=new Xh({props:I}),Sl.push(()=>Ml(f,"upstream",P)),{c(){s=r("div"),e=r("div"),n=r("h3"),i=_(a),u=h(),c=r("div"),Et(f.$$.fragment),p=h(),m=r("div"),g=r("button"),k=_(b),w=h(),C=r("button"),y=_(E),o(n,"class","font-bold text-lg mb-4"),o(c,"class","max-h-[70vh] overflow-y-auto"),o(g,"type","button"),o(g,"class","btn"),o(C,"type","button"),o(C,"class","btn btn-primary"),C.disabled=T=!l[6],o(m,"class","modal-action"),o(e,"class","modal-box w-11/12 max-w-3xl"),o(s,"class","modal modal-open")},m(q,D){L(q,s,D),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),Ct(f,c,null),t(e,p),t(e,m),t(m,g),t(g,k),t(m,w),t(m,C),t(C,y),M=!0,R||(j=[V(g,"click",l[10]),V(C,"click",l[11])],R=!0)},p(q,D){(!M||D&272)&&a!==(a=(q[4]>=0?q[8]("upstream.title",{values:{index:q[4]+1}}):q[8]("routeEditor.addUpstream"))+"")&&v(i,a);const A={};D&16&&(A.index=q[4]),!d&&D&32&&(d=!0,A.upstream=q[5],Rl(()=>d=!1)),f.$set(A),(!M||D&256)&&b!==(b=q[8]("common.cancel")+"")&&v(k,b),(!M||D&256)&&E!==(E=q[8]("common.save")+"")&&v(y,E),(!M||D&64&&T!==(T=!q[6]))&&(C.disabled=T)},i(q){M||(et(f.$$.fragment,q),M=!0)},o(q){st(f.$$.fragment,q),M=!1},d(q){q&&H(s),yt(f),R=!1,vt(j)}}}function xh(l){let s,e,n,a,i=l[8]("routeEditor.upstreams")+"",u,c,f,d,p,m=l[8]("routeEditor.upstreamsHelp")+"",g,b,k,w,C,E,y,T=l[8]("routeEditor.addUpstream")+"",M,R,j=l[0].some(Fc),P,I,q,D,A,N,Z=l[8]("upstream.priority")+"",Q,x,z,K=l[8]("upstream.target")+"",S,B,U,F=l[8]("upstream.weight")+"",J,ie,ue,ne=l[8]("routes.actions")+"",$,te,ae,ee=[],G=new Map,pe,oe,ge,he,ye,ze,Pe,we=j&&Pc(l),Fe=ut(l[7]);const Je=fe=>fe[22]._uid;for(let fe=0;fe<Fe.length;fe+=1){let _e=Lc(l,Fe,fe),Ie=Je(_e);G.set(Ie,ee[fe]=Dc(Ie,_e))}let je=l[7].length===0&&Bc(l),Le=l[1].length>0&&Ic(l),Se=l[3]&&l[5]&&Ac(l);return{c(){s=r("div"),e=r("div"),n=r("div"),a=r("h3"),u=_(i),c=h(),f=r("span"),f.textContent="*",d=h(),p=r("p"),g=_(m),b=h(),k=r("div"),w=r("input"),E=h(),y=r("button"),M=_(T),R=h(),we&&we.c(),P=h(),I=r("div"),q=r("table"),D=r("thead"),A=r("tr"),N=r("th"),Q=_(Z),x=h(),z=r("th"),S=_(K),B=h(),U=r("th"),J=_(F),ie=h(),ue=r("th"),$=_(ne),te=h(),ae=r("tbody");for(let fe=0;fe<ee.length;fe+=1)ee[fe].c();pe=h(),je&&je.c(),oe=h(),Le&&Le.c(),ge=h(),Se&&Se.c(),he=Ul(),o(f,"class","text-error"),o(a,"class","text-lg font-semibold"),o(p,"class","text-sm text-gray-500 mt-1"),o(w,"type","text"),o(w,"placeholder",C=l[8]("common.search")),o(w,"class","input input-bordered input-sm"),o(y,"type","button"),o(y,"class","btn btn-sm btn-primary"),o(k,"class","flex gap-2"),o(e,"class","flex justify-between items-center"),o(N,"class","w-20"),o(U,"class","w-24"),o(ue,"class","w-32"),o(q,"class","table table-zebra w-full"),o(I,"class","overflow-x-auto"),o(s,"class","space-y-4")},m(fe,_e){L(fe,s,_e),t(s,e),t(e,n),t(n,a),t(a,u),t(a,c),t(a,f),t(n,d),t(n,p),t(p,g),t(e,b),t(e,k),t(k,w),Y(w,l[2]),t(k,E),t(k,y),t(y,M),t(s,R),we&&we.m(s,null),t(s,P),t(s,I),t(I,q),t(q,D),t(D,A),t(A,N),t(N,Q),t(A,x),t(A,z),t(z,S),t(A,B),t(A,U),t(U,J),t(A,ie),t(A,ue),t(ue,$),t(q,te),t(q,ae);for(let Ie=0;Ie<ee.length;Ie+=1)ee[Ie]&&ee[Ie].m(ae,null);t(ae,pe),je&&je.m(ae,null),t(s,oe),Le&&Le.m(s,null),L(fe,ge,_e),Se&&Se.m(fe,_e),L(fe,he,_e),ye=!0,ze||(Pe=[V(w,"input",l[16]),V(y,"click",l[17])],ze=!0)},p(fe,[_e]){(!ye||_e&256)&&i!==(i=fe[8]("routeEditor.upstreams")+"")&&v(u,i),(!ye||_e&256)&&m!==(m=fe[8]("routeEditor.upstreamsHelp")+"")&&v(g,m),(!ye||_e&256&&C!==(C=fe[8]("common.search")))&&o(w,"placeholder",C),_e&4&&w.value!==fe[2]&&Y(w,fe[2]),(!ye||_e&256)&&T!==(T=fe[8]("routeEditor.addUpstream")+"")&&v(M,T),_e&1&&(j=fe[0].some(Fc)),j?we?we.p(fe,_e):(we=Pc(fe),we.c(),we.m(s,P)):we&&(we.d(1),we=null),(!ye||_e&256)&&Z!==(Z=fe[8]("upstream.priority")+"")&&v(Q,Z),(!ye||_e&256)&&K!==(K=fe[8]("upstream.target")+"")&&v(S,K),(!ye||_e&256)&&F!==(F=fe[8]("upstream.weight")+"")&&v(J,F),(!ye||_e&256)&&ne!==(ne=fe[8]("routes.actions")+"")&&v($,ne),_e&13184&&(Fe=ut(fe[7]),ee=Ru(ee,_e,Je,1,fe,Fe,G,ae,Op,Dc,pe,Lc)),fe[7].length===0?je?je.p(fe,_e):(je=Bc(fe),je.c(),je.m(ae,null)):je&&(je.d(1),je=null),fe[1].length>0?Le?Le.p(fe,_e):(Le=Ic(fe),Le.c(),Le.m(s,null)):Le&&(Le.d(1),Le=null),fe[3]&&fe[5]?Se?(Se.p(fe,_e),_e&40&&et(Se,1)):(Se=Ac(fe),Se.c(),et(Se,1),Se.m(he.parentNode,he)):Se&&(Gl(),st(Se,1,1,()=>{Se=null}),Kl())},i(fe){ye||(et(Se),ye=!0)},o(fe){st(Se),ye=!1},d(fe){fe&&(H(s),H(ge),H(he)),we&&we.d();for(let _e=0;_e<ee.length;_e+=1)ee[_e].d();je&&je.d(),Le&&Le.d(),Se&&Se.d(fe),ze=!1,vt(Pe)}}}const Fc=l=>l.field==="upstreams",zc=l=>l.field==="upstreams",$h=()=>{},em=()=>{};function tm(l,s,e){let n,a,i;Dt(l,Rt,q=>e(8,i=q));let{route:u}=s,{errors:c=[]}=s,{weightErrors:f=[]}=s,d="",p=!1,m=-1,g=null,b=[];function k(q=-1){e(4,m=q),q>=0?e(5,g=JSON.parse(JSON.stringify(u.upstreams[q]))):e(5,g={_uid:ta(),target:"",weight:100,priority:u.upstreams.length+1,headers:{add:{},remove:[],default:{}},body:{add:{},remove:[],replace:{},default:{}},query:{add:{},remove:[],replace:{},default:{}}}),e(3,p=!0)}function w(){e(3,p=!1),e(5,g=null)}function C(){a&&(m>=0?e(14,u.upstreams[m]=g,u):e(14,u.upstreams=[...u.upstreams,g],u),w())}function E(q){if(u.upstreams.length<=1){alert(i("routeEditor.upstreamRequired"));return}e(14,u.upstreams=u.upstreams.filter((D,A)=>A!==q),u)}function y(q){const D=u.upstreams[q],A=JSON.parse(JSON.stringify(D));if(A._uid=ta(),A.target){const N=A.target.match(/^(.+?)(-\\d+)?$/);if(N){const[,Z,Q]=N;if(Q){const x=parseInt(Q.slice(1))+1;A.target=\`\${Z}-\${x}\`}else A.target=\`\${Z}-copy\`}else A.target=\`\${A.target}-copy\`}A.priority!==void 0&&(A.priority=Math.max(...u.upstreams.map(N=>N.priority||1))+1),e(14,u.upstreams=[...u.upstreams.slice(0,q+1),A,...u.upstreams.slice(q+1)],u)}function T(){d=this.value,e(2,d)}const M=()=>k(-1),R=q=>k(q),j=q=>y(q),P=q=>E(q);function I(q){g=q,e(5,g)}return l.$$set=q=>{"route"in q&&e(14,u=q.route),"errors"in q&&e(0,c=q.errors),"weightErrors"in q&&e(1,f=q.weightErrors)},l.$$.update=()=>{l.$$.dirty&16388&&e(7,n=u.upstreams.map((q,D)=>({u:q,i:D})).filter(({u:q})=>!d||q.target.toLowerCase().includes(d.toLowerCase()))),l.$$.dirty&16440&&p&&g&&e(15,b=Du(g,m===-1?u.upstreams.length:m)),l.$$.dirty&32808&&e(6,a=p&&g&&b.length===0)},[c,f,d,p,m,g,a,n,i,k,w,C,E,y,u,b,T,M,R,j,P,I]}class lm extends Nt{constructor(s){super(),Ut(this,s,tm,xh,Vt,{route:14,errors:0,weightErrors:1})}}function sm(l){let s,e,n;function a(u){l[8](u)}let i={label:l[2]("query.title"),showLabel:!1};return l[0].query!==void 0&&(i.value=l[0].query),s=new n0({props:i}),Sl.push(()=>Ml(s,"value",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};c&4&&(f.label=u[2]("query.title")),!e&&c&1&&(e=!0,f.value=u[0].query,Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function om(l){let s,e,n;function a(u){l[7](u)}let i={label:l[2]("body.title"),showLabel:!1};return l[0].body!==void 0&&(i.value=l[0].body),s=new o0({props:i}),Sl.push(()=>Ml(s,"value",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};c&4&&(f.label=u[2]("body.title")),!e&&c&1&&(e=!0,f.value=u[0].body,Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function nm(l){let s,e,n;function a(u){l[6](u)}let i={label:l[2]("headers.title"),showLabel:!1};return l[0].headers!==void 0&&(i.value=l[0].headers),s=new s0({props:i}),Sl.push(()=>Ml(s,"value",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};c&4&&(f.label=u[2]("headers.title")),!e&&c&1&&(e=!0,f.value=u[0].headers,Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function am(l){let s,e,n,a=l[2]("routeEditor.requestModification")+"",i,u,c,f=l[2]("routeEditor.requestModificationHelp")+"",d,p,m,g,b=l[2]("headers.title")+"",k,w,C,E=l[2]("body.title")+"",y,T,M,R=l[2]("query.title")+"",j,P,I,q,D,A,N,Z,Q,x,z,K=l[2]("routeEditor.routeLevelModificationNote")+"",S,B,U,F;const J=[nm,om,sm],ie=[];function ue(ne,$){return ne[1]==="headers"?0:ne[1]==="body"?1:ne[1]==="query"?2:-1}return~(q=ue(l))&&(D=ie[q]=J[q](l)),{c(){s=r("div"),e=r("div"),n=r("h3"),i=_(a),u=h(),c=r("p"),d=_(f),p=h(),m=r("div"),g=r("button"),k=_(b),w=h(),C=r("button"),y=_(E),T=h(),M=r("button"),j=_(R),P=h(),I=r("div"),D&&D.c(),A=h(),N=r("div"),Z=re("svg"),Q=re("path"),x=h(),z=r("span"),S=_(K),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(g,"role","tab"),o(g,"class","tab"),le(g,"tab-active",l[1]==="headers"),o(C,"role","tab"),o(C,"class","tab"),le(C,"tab-active",l[1]==="body"),o(M,"role","tab"),o(M,"class","tab"),le(M,"tab-active",l[1]==="query"),o(m,"role","tablist"),o(m,"class","tabs tabs-boxed"),o(I,"class","mt-4"),o(Q,"stroke-linecap","round"),o(Q,"stroke-linejoin","round"),o(Q,"stroke-width","2"),o(Q,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(Z,"xmlns","http://www.w3.org/2000/svg"),o(Z,"fill","none"),o(Z,"viewBox","0 0 24 24"),o(Z,"class","stroke-current shrink-0 w-6 h-6"),o(z,"class","text-sm"),o(N,"class","alert alert-info mt-4"),o(s,"class","space-y-4")},m(ne,$){L(ne,s,$),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,d),t(s,p),t(s,m),t(m,g),t(g,k),t(m,w),t(m,C),t(C,y),t(m,T),t(m,M),t(M,j),t(s,P),t(s,I),~q&&ie[q].m(I,null),t(s,A),t(s,N),t(N,Z),t(Z,Q),t(N,x),t(N,z),t(z,S),B=!0,U||(F=[V(g,"click",l[3]),V(C,"click",l[4]),V(M,"click",l[5])],U=!0)},p(ne,[$]){(!B||$&4)&&a!==(a=ne[2]("routeEditor.requestModification")+"")&&v(i,a),(!B||$&4)&&f!==(f=ne[2]("routeEditor.requestModificationHelp")+"")&&v(d,f),(!B||$&4)&&b!==(b=ne[2]("headers.title")+"")&&v(k,b),(!B||$&2)&&le(g,"tab-active",ne[1]==="headers"),(!B||$&4)&&E!==(E=ne[2]("body.title")+"")&&v(y,E),(!B||$&2)&&le(C,"tab-active",ne[1]==="body"),(!B||$&4)&&R!==(R=ne[2]("query.title")+"")&&v(j,R),(!B||$&2)&&le(M,"tab-active",ne[1]==="query");let te=q;q=ue(ne),q===te?~q&&ie[q].p(ne,$):(D&&(Gl(),st(ie[te],1,1,()=>{ie[te]=null}),Kl()),~q?(D=ie[q],D?D.p(ne,$):(D=ie[q]=J[q](ne),D.c()),et(D,1),D.m(I,null)):D=null),(!B||$&4)&&K!==(K=ne[2]("routeEditor.routeLevelModificationNote")+"")&&v(S,K)},i(ne){B||(et(D),B=!0)},o(ne){st(D),B=!1},d(ne){ne&&H(s),~q&&ie[q].d(),U=!1,vt(F)}}}function rm(l,s,e){let n;Dt(l,Rt,g=>e(2,n=g));let{route:a}=s,i="headers";const u=()=>e(1,i="headers"),c=()=>e(1,i="body"),f=()=>e(1,i="query");function d(g){l.$$.not_equal(a.headers,g)&&(a.headers=g,e(0,a))}function p(g){l.$$.not_equal(a.body,g)&&(a.body=g,e(0,a))}function m(g){l.$$.not_equal(a.query,g)&&(a.query=g,e(0,a))}return l.$$set=g=>{"route"in g&&e(0,a=g.route)},[a,i,n,u,c,f,d,p,m]}class im extends Nt{constructor(s){super(),Ut(this,s,rm,am,Vt,{route:0})}}function um(l){let s,e,n,a=l[1]("auth.routeAuth")+"",i,u,c,f=l[1]("auth.routeAuthHelp")+"",d,p,m,g,b;function k(C){l[2](C)}let w={label:l[1]("auth.routeAuth"),showHelp:!0,showLabel:!1};return l[0].auth!==void 0&&(w.value=l[0].auth),m=new xp({props:w}),Sl.push(()=>Ml(m,"value",k)),{c(){s=r("div"),e=r("div"),n=r("h3"),i=_(a),u=h(),c=r("p"),d=_(f),p=h(),Et(m.$$.fragment),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(s,"class","space-y-4")},m(C,E){L(C,s,E),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,d),t(s,p),Ct(m,s,null),b=!0},p(C,[E]){(!b||E&2)&&a!==(a=C[1]("auth.routeAuth")+"")&&v(i,a),(!b||E&2)&&f!==(f=C[1]("auth.routeAuthHelp")+"")&&v(d,f);const y={};E&2&&(y.label=C[1]("auth.routeAuth")),!g&&E&1&&(g=!0,y.value=C[0].auth,Rl(()=>g=!1)),m.$set(y)},i(C){b||(et(m.$$.fragment,C),b=!0)},o(C){st(m.$$.fragment,C),b=!1},d(C){C&&H(s),yt(m)}}}function fm(l,s,e){let n;Dt(l,Rt,u=>e(1,n=u));let{route:a}=s;function i(u){l.$$.not_equal(a.auth,u)&&(a.auth=u,e(0,a))}return l.$$set=u=>{"route"in u&&e(0,a=u.route)},[a,n,i]}class cm extends Nt{constructor(s){super(),Ut(this,s,fm,um,Vt,{route:0})}}function Oc(l){let s,e=l[22]("routeEditor.failoverHelp")+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","label-text-alt text-xs")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&4194304&&e!==(e=a[22]("routeEditor.failoverHelp")+"")&&v(n,e)},d(a){a&&H(s)}}}function Nc(l){let s,e,n,a=l[22]("routeEditor.retryableStatusCodes")+"",i,u,c,f,d,p,m,g=l[22]("routeEditor.retryableStatusCodesHelp")+"",b,k,w,C,E,y,T=l[22]("routeEditor.passiveHealthCheck")+"",M,R,j,P,I,q,D,A,N=l[22]("routeEditor.passiveHealthCheckTooltip")+"",Z,Q,x,z,K,S,B=l[22]("routeEditor.consecutiveFailuresThreshold")+"",U,F,J,ie,ue,ne,$=l[22]("routeEditor.consecutiveFailuresThresholdHelp")+"",te,ae,ee,G,pe,oe=l[22]("routeEditor.healthyThreshold")+"",ge,he,ye,ze,Pe,we,Fe=l[22]("routeEditor.healthyThresholdHelp")+"",Je,je,Le,Se,fe,_e=l[22]("routeEditor.requestTimeoutMs")+"",Ie,De,se,ke,me,Ee,Ve=l[22]("routeEditor.requestTimeoutMsHelp")+"",Be,nt,Ne,Qe,Ye,ve=l[22]("routeEditor.connectTimeoutMs")+"",de,Te,Ze,Me,Ue,Ce,mt=l[22]("routeEditor.connectTimeoutMsHelp")+"",Ge,ce,qe,Re,dt,We=l[22]("routeEditor.recoveryIntervalMs")+"",O,He,X,ft,Ht,Ke,_t=l[22]("routeEditor.recoveryIntervalHelp")+"",tt,it,Oe,Xe,It,rt=l[22]("routeEditor.recoveryTimeoutMs")+"",gt,wt,pt,bl,at,St,ht=l[22]("routeEditor.recoveryTimeoutHelp")+"",Tt,vl,At,hl,ml,ql,Jt=l[22]("routeEditor.activeHealthCheck")+"",Yl,Yt,Qt,Hl,Bl,gl,sl,Ql,Ft=l[22]("routeEditor.activeHealthCheckTooltip")+"",Ll,Vl,Jl,Cl,zt,Zl,Lt,Pl=l[22]("routeEditor.enableActiveHealthCheck")+"",jl,$l,xt,kl,es,zl,Il,Wl=l[22]("routeEditor.slowStart")+"",Ls,ol,wl,nl,Ol,al,_l,tl,Dl=l[22]("routeEditor.slowStartTooltip")+"",Nl,El,Wt,Bt,Pt,$t,el,Kt=l[22]("routeEditor.enableSlowStart")+"",Zt,rl,Xt,$e,Al,ts,Xl,xl,ls=l[22]("routeEditor.failoverInfoNotice")+"",Ds,ss,Os,il=l[11]&&Uc(l),Ot=l[19]&&Vc(l);return{c(){s=r("div"),e=r("label"),n=r("span"),i=_(a),u=h(),c=r("input"),d=h(),p=r("div"),m=r("span"),b=_(g),k=h(),w=r("div"),C=r("input"),E=h(),y=r("div"),M=_(T),R=h(),j=r("div"),P=r("div"),I=re("svg"),q=re("path"),D=h(),A=r("span"),Z=_(N),Q=h(),x=r("div"),z=r("div"),K=r("label"),S=r("span"),U=_(B),F=h(),J=r("input"),ie=h(),ue=r("div"),ne=r("span"),te=_($),ae=h(),ee=r("div"),G=r("label"),pe=r("span"),ge=_(oe),he=h(),ye=r("input"),ze=h(),Pe=r("div"),we=r("span"),Je=_(Fe),je=h(),Le=r("div"),Se=r("label"),fe=r("span"),Ie=_(_e),De=h(),se=r("input"),ke=h(),me=r("div"),Ee=r("span"),Be=_(Ve),nt=h(),Ne=r("div"),Qe=r("label"),Ye=r("span"),de=_(ve),Te=h(),Ze=r("input"),Me=h(),Ue=r("div"),Ce=r("span"),Ge=_(mt),ce=h(),qe=r("div"),Re=r("label"),dt=r("span"),O=_(We),He=h(),X=r("input"),ft=h(),Ht=r("div"),Ke=r("span"),tt=_(_t),it=h(),Oe=r("div"),Xe=r("label"),It=r("span"),gt=_(rt),wt=h(),pt=r("input"),bl=h(),at=r("div"),St=r("span"),Tt=_(ht),vl=h(),At=r("div"),hl=r("input"),ml=h(),ql=r("div"),Yl=_(Jt),Yt=h(),Qt=r("div"),Hl=r("div"),Bl=re("svg"),gl=re("path"),sl=h(),Ql=r("span"),Ll=_(Ft),Vl=h(),Jl=r("div"),Cl=r("label"),zt=r("input"),Zl=h(),Lt=r("span"),jl=_(Pl),$l=h(),il&&il.c(),xt=h(),kl=r("div"),es=r("input"),zl=h(),Il=r("div"),Ls=_(Wl),ol=h(),wl=r("div"),nl=r("div"),Ol=re("svg"),al=re("path"),_l=h(),tl=r("span"),Nl=_(Dl),El=h(),Wt=r("div"),Bt=r("label"),Pt=r("input"),$t=h(),el=r("span"),Zt=_(Kt),rl=h(),Ot&&Ot.c(),Xt=h(),$e=r("div"),Al=re("svg"),ts=re("path"),Xl=h(),xl=r("div"),Ds=_(ls),o(n,"class","label-text"),o(e,"class","label"),o(e,"for","failover-status-codes"),o(c,"id","failover-status-codes"),o(c,"type","text"),o(c,"placeholder",f=l[22]("routeEditor.retryableStatusCodesPlaceholder")),o(c,"class","input input-bordered input-sm"),o(m,"class","label-text-alt text-xs"),o(p,"class","label"),o(s,"class","form-control"),o(C,"type","checkbox"),o(y,"class","collapse-title text-sm font-medium"),o(q,"stroke-linecap","round"),o(q,"stroke-linejoin","round"),o(q,"stroke-width","2"),o(q,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(I,"xmlns","http://www.w3.org/2000/svg"),o(I,"fill","none"),o(I,"viewBox","0 0 24 24"),o(I,"class","stroke-current shrink-0 w-4 h-4"),o(P,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),o(S,"class","label-text"),o(K,"class","label"),o(K,"for","consecutive-failures-threshold"),o(J,"id","consecutive-failures-threshold"),o(J,"type","number"),o(J,"placeholder","3"),o(J,"class","input input-bordered input-sm"),o(J,"min","1"),o(ne,"class","label-text-alt text-xs"),o(ue,"class","label"),o(z,"class","form-control"),o(pe,"class","label-text"),o(G,"class","label"),o(G,"for","healthy-threshold"),o(ye,"id","healthy-threshold"),o(ye,"type","number"),o(ye,"placeholder","2"),o(ye,"class","input input-bordered input-sm"),o(ye,"min","1"),o(we,"class","label-text-alt text-xs"),o(Pe,"class","label"),o(ee,"class","form-control"),o(fe,"class","label-text"),o(Se,"class","label"),o(Se,"for","request-timeout-ms"),o(se,"id","request-timeout-ms"),o(se,"type","number"),o(se,"placeholder","30000"),o(se,"class","input input-bordered input-sm"),o(se,"min","100"),o(Ee,"class","label-text-alt text-xs"),o(me,"class","label"),o(Le,"class","form-control"),o(Ye,"class","label-text"),o(Qe,"class","label"),o(Qe,"for","connect-timeout-ms"),o(Ze,"id","connect-timeout-ms"),o(Ze,"type","number"),o(Ze,"placeholder","5000"),o(Ze,"class","input input-bordered input-sm"),o(Ze,"min","100"),o(Ce,"class","label-text-alt text-xs"),o(Ue,"class","label"),o(Ne,"class","form-control"),o(dt,"class","label-text"),o(Re,"class","label"),o(Re,"for","recovery-interval-ms"),o(X,"id","recovery-interval-ms"),o(X,"type","number"),o(X,"placeholder","5000"),o(X,"class","input input-bordered input-sm"),o(X,"min","1000"),o(Ke,"class","label-text-alt text-xs"),o(Ht,"class","label"),o(qe,"class","form-control"),o(It,"class","label-text"),o(Xe,"class","label"),o(Xe,"for","recovery-timeout-ms"),o(pt,"id","recovery-timeout-ms"),o(pt,"type","number"),o(pt,"placeholder","3000"),o(pt,"class","input input-bordered input-sm"),o(pt,"min","100"),o(St,"class","label-text-alt text-xs"),o(at,"class","label"),o(Oe,"class","form-control"),o(x,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),o(j,"class","collapse-content space-y-4"),o(w,"class","collapse collapse-arrow bg-base-200"),o(hl,"type","checkbox"),o(ql,"class","collapse-title text-sm font-medium"),o(gl,"stroke-linecap","round"),o(gl,"stroke-linejoin","round"),o(gl,"stroke-width","2"),o(gl,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(Bl,"xmlns","http://www.w3.org/2000/svg"),o(Bl,"fill","none"),o(Bl,"viewBox","0 0 24 24"),o(Bl,"class","stroke-current shrink-0 w-4 h-4"),o(Hl,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),o(zt,"type","checkbox"),o(zt,"class","checkbox checkbox-sm"),o(Lt,"class","label-text"),o(Cl,"class","label cursor-pointer justify-start gap-4"),o(Jl,"class","form-control"),o(Qt,"class","collapse-content space-y-4"),o(At,"class","collapse collapse-arrow bg-base-200"),o(es,"type","checkbox"),o(Il,"class","collapse-title text-sm font-medium"),o(al,"stroke-linecap","round"),o(al,"stroke-linejoin","round"),o(al,"stroke-width","2"),o(al,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(Ol,"xmlns","http://www.w3.org/2000/svg"),o(Ol,"fill","none"),o(Ol,"viewBox","0 0 24 24"),o(Ol,"class","stroke-current shrink-0 w-4 h-4"),o(nl,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),o(Pt,"type","checkbox"),o(Pt,"class","checkbox checkbox-sm"),o(el,"class","label-text"),o(Bt,"class","label cursor-pointer justify-start gap-4"),o(Wt,"class","form-control"),o(wl,"class","collapse-content space-y-4"),o(kl,"class","collapse collapse-arrow bg-base-200"),o(ts,"stroke-linecap","round"),o(ts,"stroke-linejoin","round"),o(ts,"stroke-width","2"),o(ts,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(Al,"xmlns","http://www.w3.org/2000/svg"),o(Al,"fill","none"),o(Al,"viewBox","0 0 24 24"),o(Al,"class","stroke-current shrink-0 w-4 h-4"),o($e,"class","alert alert-info shadow-sm text-xs")},m(lt,ct){L(lt,s,ct),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),Y(c,l[4]),t(s,d),t(s,p),t(p,m),t(m,b),L(lt,k,ct),L(lt,w,ct),t(w,C),t(w,E),t(w,y),t(y,M),t(w,R),t(w,j),t(j,P),t(P,I),t(I,q),t(P,D),t(P,A),t(A,Z),t(j,Q),t(j,x),t(x,z),t(z,K),t(K,S),t(S,U),t(z,F),t(z,J),Y(J,l[5]),t(z,ie),t(z,ue),t(ue,ne),t(ne,te),t(x,ae),t(x,ee),t(ee,G),t(G,pe),t(pe,ge),t(ee,he),t(ee,ye),Y(ye,l[6]),t(ee,ze),t(ee,Pe),t(Pe,we),t(we,Je),t(x,je),t(x,Le),t(Le,Se),t(Se,fe),t(fe,Ie),t(Le,De),t(Le,se),Y(se,l[7]),t(Le,ke),t(Le,me),t(me,Ee),t(Ee,Be),t(x,nt),t(x,Ne),t(Ne,Qe),t(Qe,Ye),t(Ye,de),t(Ne,Te),t(Ne,Ze),Y(Ze,l[8]),t(Ne,Me),t(Ne,Ue),t(Ue,Ce),t(Ce,Ge),t(x,ce),t(x,qe),t(qe,Re),t(Re,dt),t(dt,O),t(qe,He),t(qe,X),Y(X,l[9]),t(qe,ft),t(qe,Ht),t(Ht,Ke),t(Ke,tt),t(x,it),t(x,Oe),t(Oe,Xe),t(Xe,It),t(It,gt),t(Oe,wt),t(Oe,pt),Y(pt,l[10]),t(Oe,bl),t(Oe,at),t(at,St),t(St,Tt),L(lt,vl,ct),L(lt,At,ct),t(At,hl),t(At,ml),t(At,ql),t(ql,Yl),t(At,Yt),t(At,Qt),t(Qt,Hl),t(Hl,Bl),t(Bl,gl),t(Hl,sl),t(Hl,Ql),t(Ql,Ll),t(Qt,Vl),t(Qt,Jl),t(Jl,Cl),t(Cl,zt),zt.checked=l[11],t(Cl,Zl),t(Cl,Lt),t(Lt,jl),t(Qt,$l),il&&il.m(Qt,null),L(lt,xt,ct),L(lt,kl,ct),t(kl,es),t(kl,zl),t(kl,Il),t(Il,Ls),t(kl,ol),t(kl,wl),t(wl,nl),t(nl,Ol),t(Ol,al),t(nl,_l),t(nl,tl),t(tl,Nl),t(wl,El),t(wl,Wt),t(Wt,Bt),t(Bt,Pt),Pt.checked=l[19],t(Bt,$t),t(Bt,el),t(el,Zt),t(wl,rl),Ot&&Ot.m(wl,null),L(lt,Xt,ct),L(lt,$e,ct),t($e,Al),t(Al,ts),t($e,Xl),t($e,xl),t(xl,Ds),ss||(Os=[V(c,"input",l[28]),V(J,"input",l[29]),V(ye,"input",l[30]),V(se,"input",l[31]),V(Ze,"input",l[32]),V(X,"input",l[33]),V(pt,"input",l[34]),V(zt,"change",l[35]),V(Pt,"change",l[43])],ss=!0)},p(lt,ct){ct[0]&4194304&&a!==(a=lt[22]("routeEditor.retryableStatusCodes")+"")&&v(i,a),ct[0]&4194304&&f!==(f=lt[22]("routeEditor.retryableStatusCodesPlaceholder"))&&o(c,"placeholder",f),ct[0]&16&&c.value!==lt[4]&&Y(c,lt[4]),ct[0]&4194304&&g!==(g=lt[22]("routeEditor.retryableStatusCodesHelp")+"")&&v(b,g),ct[0]&4194304&&T!==(T=lt[22]("routeEditor.passiveHealthCheck")+"")&&v(M,T),ct[0]&4194304&&N!==(N=lt[22]("routeEditor.passiveHealthCheckTooltip")+"")&&v(Z,N),ct[0]&4194304&&B!==(B=lt[22]("routeEditor.consecutiveFailuresThreshold")+"")&&v(U,B),ct[0]&32&&Mt(J.value)!==lt[5]&&Y(J,lt[5]),ct[0]&4194304&&$!==($=lt[22]("routeEditor.consecutiveFailuresThresholdHelp")+"")&&v(te,$),ct[0]&4194304&&oe!==(oe=lt[22]("routeEditor.healthyThreshold")+"")&&v(ge,oe),ct[0]&64&&Mt(ye.value)!==lt[6]&&Y(ye,lt[6]),ct[0]&4194304&&Fe!==(Fe=lt[22]("routeEditor.healthyThresholdHelp")+"")&&v(Je,Fe),ct[0]&4194304&&_e!==(_e=lt[22]("routeEditor.requestTimeoutMs")+"")&&v(Ie,_e),ct[0]&128&&Mt(se.value)!==lt[7]&&Y(se,lt[7]),ct[0]&4194304&&Ve!==(Ve=lt[22]("routeEditor.requestTimeoutMsHelp")+"")&&v(Be,Ve),ct[0]&4194304&&ve!==(ve=lt[22]("routeEditor.connectTimeoutMs")+"")&&v(de,ve),ct[0]&256&&Mt(Ze.value)!==lt[8]&&Y(Ze,lt[8]),ct[0]&4194304&&mt!==(mt=lt[22]("routeEditor.connectTimeoutMsHelp")+"")&&v(Ge,mt),ct[0]&4194304&&We!==(We=lt[22]("routeEditor.recoveryIntervalMs")+"")&&v(O,We),ct[0]&512&&Mt(X.value)!==lt[9]&&Y(X,lt[9]),ct[0]&4194304&&_t!==(_t=lt[22]("routeEditor.recoveryIntervalHelp")+"")&&v(tt,_t),ct[0]&4194304&&rt!==(rt=lt[22]("routeEditor.recoveryTimeoutMs")+"")&&v(gt,rt),ct[0]&1024&&Mt(pt.value)!==lt[10]&&Y(pt,lt[10]),ct[0]&4194304&&ht!==(ht=lt[22]("routeEditor.recoveryTimeoutHelp")+"")&&v(Tt,ht),ct[0]&4194304&&Jt!==(Jt=lt[22]("routeEditor.activeHealthCheck")+"")&&v(Yl,Jt),ct[0]&4194304&&Ft!==(Ft=lt[22]("routeEditor.activeHealthCheckTooltip")+"")&&v(Ll,Ft),ct[0]&2048&&(zt.checked=lt[11]),ct[0]&4194304&&Pl!==(Pl=lt[22]("routeEditor.enableActiveHealthCheck")+"")&&v(jl,Pl),lt[11]?il?il.p(lt,ct):(il=Uc(lt),il.c(),il.m(Qt,null)):il&&(il.d(1),il=null),ct[0]&4194304&&Wl!==(Wl=lt[22]("routeEditor.slowStart")+"")&&v(Ls,Wl),ct[0]&4194304&&Dl!==(Dl=lt[22]("routeEditor.slowStartTooltip")+"")&&v(Nl,Dl),ct[0]&524288&&(Pt.checked=lt[19]),ct[0]&4194304&&Kt!==(Kt=lt[22]("routeEditor.enableSlowStart")+"")&&v(Zt,Kt),lt[19]?Ot?Ot.p(lt,ct):(Ot=Vc(lt),Ot.c(),Ot.m(wl,null)):Ot&&(Ot.d(1),Ot=null),ct[0]&4194304&&ls!==(ls=lt[22]("routeEditor.failoverInfoNotice")+"")&&v(Ds,ls)},d(lt){lt&&(H(s),H(k),H(w),H(vl),H(At),H(xt),H(kl),H(Xt),H($e)),il&&il.d(),Ot&&Ot.d(),ss=!1,vt(Os)}}}function Uc(l){let s,e,n,a,i=l[22]("routeEditor.healthCheckIntervalMs")+"",u,c,f,d,p,m,g=l[22]("routeEditor.healthCheckIntervalMsHelp")+"",b,k,w,C,E,y=l[22]("routeEditor.healthCheckTimeoutMs")+"",T,M,R,j,P,I,q=l[22]("routeEditor.healthCheckTimeoutMsHelp")+"",D,A,N,Z,Q,x=l[22]("routeEditor.healthCheckPath")+"",z,K,S,B,U,F,J=l[22]("routeEditor.healthCheckPathHelp")+"",ie,ue,ne,$,te,ae=l[22]("routeEditor.healthCheckMethod")+"",ee,G,pe,oe,ge,he,ye,ze,Pe,we,Fe,Je=l[22]("routeEditor.healthCheckExpectedStatus")+"",je,Le,Se,fe,_e,Ie,De=l[22]("routeEditor.healthCheckExpectedStatusHelp")+"",se,ke,me,Ee,Ve,Be=l[22]("routeEditor.healthCheckUnhealthyThreshold")+"",nt,Ne,Qe,Ye,ve,de,Te=l[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"",Ze,Me,Ue,Ce,mt,Ge=l[22]("routeEditor.healthCheckHealthyThreshold")+"",ce,qe,Re,dt,We,O,He=l[22]("routeEditor.healthCheckHealthyThresholdHelp")+"",X,ft,Ht;return{c(){s=r("div"),e=r("div"),n=r("label"),a=r("span"),u=_(i),c=h(),f=r("input"),d=h(),p=r("div"),m=r("span"),b=_(g),k=h(),w=r("div"),C=r("label"),E=r("span"),T=_(y),M=h(),R=r("input"),j=h(),P=r("div"),I=r("span"),D=_(q),A=h(),N=r("div"),Z=r("label"),Q=r("span"),z=_(x),K=h(),S=r("input"),B=h(),U=r("div"),F=r("span"),ie=_(J),ue=h(),ne=r("div"),$=r("label"),te=r("span"),ee=_(ae),G=h(),pe=r("select"),oe=r("option"),oe.textContent="GET (default)",ge=r("option"),ge.textContent="GET",he=r("option"),he.textContent="POST",ye=r("option"),ye.textContent="HEAD",ze=h(),Pe=r("div"),we=r("label"),Fe=r("span"),je=_(Je),Le=h(),Se=r("input"),fe=h(),_e=r("div"),Ie=r("span"),se=_(De),ke=h(),me=r("div"),Ee=r("label"),Ve=r("span"),nt=_(Be),Ne=h(),Qe=r("input"),Ye=h(),ve=r("div"),de=r("span"),Ze=_(Te),Me=h(),Ue=r("div"),Ce=r("label"),mt=r("span"),ce=_(Ge),qe=h(),Re=r("input"),dt=h(),We=r("div"),O=r("span"),X=_(He),o(a,"class","label-text"),o(n,"class","label"),o(n,"for","health-check-interval-ms"),o(f,"id","health-check-interval-ms"),o(f,"type","number"),o(f,"placeholder","10000"),o(f,"class","input input-bordered input-sm"),o(f,"min","1000"),o(m,"class","label-text-alt text-xs"),o(p,"class","label"),o(e,"class","form-control"),o(E,"class","label-text"),o(C,"class","label"),o(C,"for","health-check-timeout-ms"),o(R,"id","health-check-timeout-ms"),o(R,"type","number"),o(R,"placeholder","3000"),o(R,"class","input input-bordered input-sm"),o(R,"min","100"),o(I,"class","label-text-alt text-xs"),o(P,"class","label"),o(w,"class","form-control"),o(Q,"class","label-text"),o(Z,"class","label"),o(Z,"for","health-check-path"),o(S,"id","health-check-path"),o(S,"type","text"),o(S,"placeholder","/health"),o(S,"class","input input-bordered input-sm"),o(F,"class","label-text-alt text-xs"),o(U,"class","label"),o(N,"class","form-control"),o(te,"class","label-text"),o($,"class","label"),o($,"for","health-check-method"),oe.__value="",Y(oe,oe.__value),ge.__value="GET",Y(ge,ge.__value),he.__value="POST",Y(he,he.__value),ye.__value="HEAD",Y(ye,ye.__value),o(pe,"id","health-check-method"),o(pe,"class","select select-bordered select-sm"),l[15]===void 0&&pl(()=>l[39].call(pe)),o(ne,"class","form-control"),o(Fe,"class","label-text"),o(we,"class","label"),o(we,"for","health-check-expected-status"),o(Se,"id","health-check-expected-status"),o(Se,"type","text"),o(Se,"placeholder","200"),o(Se,"class","input input-bordered input-sm"),o(Ie,"class","label-text-alt text-xs"),o(_e,"class","label"),o(Pe,"class","form-control"),o(Ve,"class","label-text"),o(Ee,"class","label"),o(Ee,"for","health-check-unhealthy-threshold"),o(Qe,"id","health-check-unhealthy-threshold"),o(Qe,"type","number"),o(Qe,"placeholder","3"),o(Qe,"class","input input-bordered input-sm"),o(Qe,"min","1"),o(de,"class","label-text-alt text-xs"),o(ve,"class","label"),o(me,"class","form-control"),o(mt,"class","label-text"),o(Ce,"class","label"),o(Ce,"for","health-check-healthy-threshold"),o(Re,"id","health-check-healthy-threshold"),o(Re,"type","number"),o(Re,"placeholder","2"),o(Re,"class","input input-bordered input-sm"),o(Re,"min","1"),o(O,"class","label-text-alt text-xs"),o(We,"class","label"),o(Ue,"class","form-control"),o(s,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(Ke,_t){L(Ke,s,_t),t(s,e),t(e,n),t(n,a),t(a,u),t(e,c),t(e,f),Y(f,l[12]),t(e,d),t(e,p),t(p,m),t(m,b),t(s,k),t(s,w),t(w,C),t(C,E),t(E,T),t(w,M),t(w,R),Y(R,l[13]),t(w,j),t(w,P),t(P,I),t(I,D),t(s,A),t(s,N),t(N,Z),t(Z,Q),t(Q,z),t(N,K),t(N,S),Y(S,l[14]),t(N,B),t(N,U),t(U,F),t(F,ie),t(s,ue),t(s,ne),t(ne,$),t($,te),t(te,ee),t(ne,G),t(ne,pe),t(pe,oe),t(pe,ge),t(pe,he),t(pe,ye),kt(pe,l[15],!0),t(s,ze),t(s,Pe),t(Pe,we),t(we,Fe),t(Fe,je),t(Pe,Le),t(Pe,Se),Y(Se,l[16]),t(Pe,fe),t(Pe,_e),t(_e,Ie),t(Ie,se),t(s,ke),t(s,me),t(me,Ee),t(Ee,Ve),t(Ve,nt),t(me,Ne),t(me,Qe),Y(Qe,l[17]),t(me,Ye),t(me,ve),t(ve,de),t(de,Ze),t(s,Me),t(s,Ue),t(Ue,Ce),t(Ce,mt),t(mt,ce),t(Ue,qe),t(Ue,Re),Y(Re,l[18]),t(Ue,dt),t(Ue,We),t(We,O),t(O,X),ft||(Ht=[V(f,"input",l[36]),V(R,"input",l[37]),V(S,"input",l[38]),V(pe,"change",l[39]),V(Se,"input",l[40]),V(Qe,"input",l[41]),V(Re,"input",l[42])],ft=!0)},p(Ke,_t){_t[0]&4194304&&i!==(i=Ke[22]("routeEditor.healthCheckIntervalMs")+"")&&v(u,i),_t[0]&4096&&Mt(f.value)!==Ke[12]&&Y(f,Ke[12]),_t[0]&4194304&&g!==(g=Ke[22]("routeEditor.healthCheckIntervalMsHelp")+"")&&v(b,g),_t[0]&4194304&&y!==(y=Ke[22]("routeEditor.healthCheckTimeoutMs")+"")&&v(T,y),_t[0]&8192&&Mt(R.value)!==Ke[13]&&Y(R,Ke[13]),_t[0]&4194304&&q!==(q=Ke[22]("routeEditor.healthCheckTimeoutMsHelp")+"")&&v(D,q),_t[0]&4194304&&x!==(x=Ke[22]("routeEditor.healthCheckPath")+"")&&v(z,x),_t[0]&16384&&S.value!==Ke[14]&&Y(S,Ke[14]),_t[0]&4194304&&J!==(J=Ke[22]("routeEditor.healthCheckPathHelp")+"")&&v(ie,J),_t[0]&4194304&&ae!==(ae=Ke[22]("routeEditor.healthCheckMethod")+"")&&v(ee,ae),_t[0]&32768&&kt(pe,Ke[15]),_t[0]&4194304&&Je!==(Je=Ke[22]("routeEditor.healthCheckExpectedStatus")+"")&&v(je,Je),_t[0]&65536&&Se.value!==Ke[16]&&Y(Se,Ke[16]),_t[0]&4194304&&De!==(De=Ke[22]("routeEditor.healthCheckExpectedStatusHelp")+"")&&v(se,De),_t[0]&4194304&&Be!==(Be=Ke[22]("routeEditor.healthCheckUnhealthyThreshold")+"")&&v(nt,Be),_t[0]&131072&&Mt(Qe.value)!==Ke[17]&&Y(Qe,Ke[17]),_t[0]&4194304&&Te!==(Te=Ke[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"")&&v(Ze,Te),_t[0]&4194304&&Ge!==(Ge=Ke[22]("routeEditor.healthCheckHealthyThreshold")+"")&&v(ce,Ge),_t[0]&262144&&Mt(Re.value)!==Ke[18]&&Y(Re,Ke[18]),_t[0]&4194304&&He!==(He=Ke[22]("routeEditor.healthCheckHealthyThresholdHelp")+"")&&v(X,He)},d(Ke){Ke&&H(s),ft=!1,vt(Ht)}}}function Vc(l){let s,e,n,a,i=l[22]("routeEditor.slowStartDurationMs")+"",u,c,f,d,p,m,g=l[22]("routeEditor.slowStartDurationMsHelp")+"",b,k,w,C,E,y=l[22]("routeEditor.slowStartInitialWeightFactor")+"",T,M,R,j,P,I,q=l[22]("routeEditor.slowStartInitialWeightFactorHelp")+"",D,A,N;return{c(){s=r("div"),e=r("div"),n=r("label"),a=r("span"),u=_(i),c=h(),f=r("input"),d=h(),p=r("div"),m=r("span"),b=_(g),k=h(),w=r("div"),C=r("label"),E=r("span"),T=_(y),M=h(),R=r("input"),j=h(),P=r("div"),I=r("span"),D=_(q),o(a,"class","label-text"),o(n,"class","label"),o(n,"for","slow-start-duration-ms"),o(f,"id","slow-start-duration-ms"),o(f,"type","number"),o(f,"placeholder","30000"),o(f,"class","input input-bordered input-sm"),o(f,"min","1000"),o(m,"class","label-text-alt text-xs"),o(p,"class","label"),o(e,"class","form-control"),o(E,"class","label-text"),o(C,"class","label"),o(C,"for","slow-start-initial-weight-factor"),o(R,"id","slow-start-initial-weight-factor"),o(R,"type","number"),o(R,"placeholder","0.1"),o(R,"class","input input-bordered input-sm"),o(R,"min","0.01"),o(R,"max","1"),o(R,"step","0.01"),o(I,"class","label-text-alt text-xs"),o(P,"class","label"),o(w,"class","form-control"),o(s,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(Z,Q){L(Z,s,Q),t(s,e),t(e,n),t(n,a),t(a,u),t(e,c),t(e,f),Y(f,l[20]),t(e,d),t(e,p),t(p,m),t(m,b),t(s,k),t(s,w),t(w,C),t(C,E),t(E,T),t(w,M),t(w,R),Y(R,l[21]),t(w,j),t(w,P),t(P,I),t(I,D),A||(N=[V(f,"input",l[44]),V(R,"input",l[45])],A=!0)},p(Z,Q){Q[0]&4194304&&i!==(i=Z[22]("routeEditor.slowStartDurationMs")+"")&&v(u,i),Q[0]&1048576&&Mt(f.value)!==Z[20]&&Y(f,Z[20]),Q[0]&4194304&&g!==(g=Z[22]("routeEditor.slowStartDurationMsHelp")+"")&&v(b,g),Q[0]&4194304&&y!==(y=Z[22]("routeEditor.slowStartInitialWeightFactor")+"")&&v(T,y),Q[0]&2097152&&Mt(R.value)!==Z[21]&&Y(R,Z[21]),Q[0]&4194304&&q!==(q=Z[22]("routeEditor.slowStartInitialWeightFactorHelp")+"")&&v(D,q)},d(Z){Z&&H(s),A=!1,vt(N)}}}function dm(l){let s,e,n,a,i,u,c,f,d,p,m,g,b=l[22]("routeEditor.enableFailover")+"",k,w,C,E,y=l[1]&&Oc(l),T=l[2]&&Nc(l);return{c(){s=r("div"),e=r("div"),n=r("span"),a=_(l[0]),i=h(),y&&y.c(),u=h(),c=r("div"),f=r("div"),d=r("label"),p=r("input"),m=h(),g=r("span"),k=_(b),w=h(),T&&T.c(),o(n,"class","label-text font-semibold"),o(e,"class","label"),o(p,"type","checkbox"),o(p,"class","checkbox"),o(g,"class","label-text"),o(d,"class","label cursor-pointer justify-start gap-4"),o(f,"class","form-control"),o(c,"class","space-y-4"),o(s,"class","form-control w-full")},m(M,R){L(M,s,R),t(s,e),t(e,n),t(n,a),t(e,i),y&&y.m(e,null),t(s,u),t(s,c),t(c,f),t(f,d),t(d,p),p.checked=l[2],t(d,m),t(d,g),t(g,k),t(c,w),T&&T.m(c,null),C||(E=[V(p,"change",l[26]),V(p,"change",l[27])],C=!0)},p(M,R){R[0]&1&&v(a,M[0]),M[1]?y?y.p(M,R):(y=Oc(M),y.c(),y.m(e,null)):y&&(y.d(1),y=null),R[0]&4&&(p.checked=M[2]),R[0]&4194304&&b!==(b=M[22]("routeEditor.enableFailover")+"")&&v(k,b),M[2]?T?T.p(M,R):(T=Nc(M),T.c(),T.m(c,null)):T&&(T.d(1),T=null)},i:ot,o:ot,d(M){M&&H(s),y&&y.d(),T&&T.d(),C=!1,vt(E)}}}function Jc(l){return l.split(",").map(s=>parseInt(s.trim())).filter(s=>!isNaN(s)&&s>=100&&s<600)}function pm(l,s,e){let n;Dt(l,Rt,ge=>e(22,n=ge));let{value:a=void 0}=s,{label:i="Failover"}=s,{showHelp:u=!0}=s,c=!1,f=!1,d=[],p="",m,g,b,k,w,C,E=!1,y,T,M,R,j=[],P="",I,q,D=!1,A,N;function Z(){c=this.checked,e(2,c),e(3,f),e(23,a),e(24,d),e(25,j),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}const Q=()=>{e(3,f=!0)};function x(){p=this.value,e(4,p),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(16,P)}function z(){m=Mt(this.value),e(5,m),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function K(){g=Mt(this.value),e(6,g),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function S(){b=Mt(this.value),e(7,b),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function B(){k=Mt(this.value),e(8,k),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function U(){w=Mt(this.value),e(9,w),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function F(){C=Mt(this.value),e(10,C),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function J(){E=this.checked,e(11,E),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function ie(){y=Mt(this.value),e(12,y),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function ue(){T=Mt(this.value),e(13,T),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function ne(){M=this.value,e(14,M),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function $(){R=dl(this),e(15,R),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function te(){P=this.value,e(16,P),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p)}function ae(){I=Mt(this.value),e(17,I),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function ee(){q=Mt(this.value),e(18,q),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function G(){D=this.checked,e(19,D),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(20,A),e(21,N),e(4,p),e(16,P)}function pe(){A=Mt(this.value),e(20,A),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(21,N),e(4,p),e(16,P)}function oe(){N=Mt(this.value),e(21,N),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(4,p),e(16,P)}return l.$$set=ge=>{"value"in ge&&e(23,a=ge.value),"label"in ge&&e(0,i=ge.label),"showHelp"in ge&&e(1,u=ge.showHelp)},l.$$.update=()=>{l.$$.dirty[0]&62849004&&(!f&&a&&(e(2,c=a.enabled||!1),e(24,d=a.retryableStatusCodes||[500,502,503,504]),e(4,p=d.join(", ")),e(5,m=a.consecutiveFailuresThreshold),e(6,g=a.healthyThreshold),e(7,b=a.requestTimeoutMs),e(8,k=a.connectTimeoutMs),e(9,w=a.recoveryIntervalMs),e(10,C=a.recoveryTimeoutMs),a.healthCheck&&(e(11,E=a.healthCheck.enabled||!1),e(12,y=a.healthCheck.intervalMs),e(13,T=a.healthCheck.timeoutMs),e(14,M=a.healthCheck.path),e(15,R=a.healthCheck.method),e(25,j=a.healthCheck.expectedStatus||[200]),e(16,P=j.join(", ")),e(17,I=a.healthCheck.unhealthyThreshold),e(18,q=a.healthCheck.healthyThreshold)),a.slowStart&&(e(19,D=a.slowStart.enabled||!1),e(20,A=a.slowStart.durationMs),e(21,N=a.slowStart.initialWeightFactor)),e(3,f=!0)),c?a?(e(23,a.enabled=!0,a),e(23,a.retryableStatusCodes=d.length>0?d:[500,502,503,504],a),m!==void 0&&e(23,a.consecutiveFailuresThreshold=m,a),g!==void 0&&e(23,a.healthyThreshold=g,a),b!==void 0&&e(23,a.requestTimeoutMs=b,a),k!==void 0&&e(23,a.connectTimeoutMs=k,a),w!==void 0&&e(23,a.recoveryIntervalMs=w,a),C!==void 0&&e(23,a.recoveryTimeoutMs=C,a),E?e(23,a.healthCheck={enabled:!0,intervalMs:y,timeoutMs:T,path:M,method:R,expectedStatus:j.length>0?j:[200],unhealthyThreshold:I,healthyThreshold:q},a):e(23,a.healthCheck=void 0,a),D?e(23,a.slowStart={enabled:!0,durationMs:A,initialWeightFactor:N},a):e(23,a.slowStart=void 0,a)):e(23,a={enabled:!0,retryableStatusCodes:d.length>0?d:[500,502,503,504]}):e(23,a=void 0)),l.$$.dirty[0]&16&&e(24,d=Jc(p)),l.$$.dirty[0]&65536&&e(25,j=Jc(P))},[i,u,c,f,p,m,g,b,k,w,C,E,y,T,M,R,P,I,q,D,A,N,n,a,d,j,Z,Q,x,z,K,S,B,U,F,J,ie,ue,ne,$,te,ae,ee,G,pe,oe]}class hm extends Nt{constructor(s){super(),Ut(this,s,pm,dm,Vt,{value:23,label:0,showHelp:1},null,[-1,-1])}}function mm(l){let s,e,n,a=l[1]("routeEditor.failoverTitle")+"",i,u,c,f=l[1]("routeEditor.failoverHelp")+"",d,p,m,g,b;function k(C){l[2](C)}let w={label:l[1]("routeEditor.failoverTitle"),showHelp:!0,showLabel:!1};return l[0].failover!==void 0&&(w.value=l[0].failover),m=new hm({props:w}),Sl.push(()=>Ml(m,"value",k)),{c(){s=r("div"),e=r("div"),n=r("h3"),i=_(a),u=h(),c=r("p"),d=_(f),p=h(),Et(m.$$.fragment),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(s,"class","space-y-4")},m(C,E){L(C,s,E),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,d),t(s,p),Ct(m,s,null),b=!0},p(C,[E]){(!b||E&2)&&a!==(a=C[1]("routeEditor.failoverTitle")+"")&&v(i,a),(!b||E&2)&&f!==(f=C[1]("routeEditor.failoverHelp")+"")&&v(d,f);const y={};E&2&&(y.label=C[1]("routeEditor.failoverTitle")),!g&&E&1&&(g=!0,y.value=C[0].failover,Rl(()=>g=!1)),m.$set(y)},i(C){b||(et(m.$$.fragment,C),b=!0)},o(C){st(m.$$.fragment,C),b=!1},d(C){C&&H(s),yt(m)}}}function gm(l,s,e){let n;Dt(l,Rt,u=>e(1,n=u));let{route:a}=s;function i(u){l.$$.not_equal(a.failover,u)&&(a.failover=u,e(0,a))}return l.$$set=u=>{"route"in u&&e(0,a=u.route)},[a,n,i]}class _m extends Nt{constructor(s){super(),Ut(this,s,gm,mm,Vt,{route:0})}}function Wc(l,s,e){const n=l.slice();return n[8]=s[e],n[10]=e,n}function Gc(l){let s;return{c(){s=r("span"),s.textContent="Transformer",o(s,"class","badge badge-xs badge-info ml-2")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function Kc(l){let s,e,n=(l[8].priority||l[10]+1)+"",a,i,u,c,f=(l[8].target||l[4]("routeEditor.notSet"))+"",d,p,m,g,b=l[4]("upstream.weight")+"",k,w,C=(l[8].weight||100)+"",E,y,T,M=l[8].plugins&&l[8].plugins.length>0&&Gc();return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),u=r("div"),c=r("div"),d=_(f),m=h(),g=r("div"),k=_(b),w=_(": "),E=_(C),y=h(),M&&M.c(),T=h(),o(e,"class","badge badge-primary"),o(c,"class","font-medium text-sm truncate"),o(c,"title",p=l[8].target),o(g,"class","text-xs text-gray-500"),o(u,"class","flex-1"),o(s,"class","flex items-center gap-3 p-3 bg-base-100 rounded-lg")},m(R,j){L(R,s,j),t(s,e),t(e,a),t(s,i),t(s,u),t(u,c),t(c,d),t(u,m),t(u,g),t(g,k),t(g,w),t(g,E),t(g,y),M&&M.m(g,null),t(s,T)},p(R,j){j&1&&n!==(n=(R[8].priority||R[10]+1)+"")&&v(a,n),j&17&&f!==(f=(R[8].target||R[4]("routeEditor.notSet"))+"")&&v(d,f),j&1&&p!==(p=R[8].target)&&o(c,"title",p),j&16&&b!==(b=R[4]("upstream.weight")+"")&&v(k,b),j&1&&C!==(C=(R[8].weight||100)+"")&&v(E,C),R[8].plugins&&R[8].plugins.length>0?M||(M=Gc(),M.c(),M.m(g,null)):M&&(M.d(1),M=null)},d(R){R&&H(s),M&&M.d()}}}function Yc(l){let s,e,n,a,i,u,c,f,d,p,m=l[4]("common.copy")+"",g,b,k;return{c(){s=r("div"),e=r("pre"),n=r("code"),a=_(l[3]),i=h(),u=r("div"),c=r("button"),f=re("svg"),d=re("path"),p=h(),g=_(m),o(s,"class","mockup-code mt-4"),o(d,"stroke-linecap","round"),o(d,"stroke-linejoin","round"),o(d,"stroke-width","2"),o(d,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(f,"xmlns","http://www.w3.org/2000/svg"),o(f,"class","h-4 w-4"),o(f,"fill","none"),o(f,"viewBox","0 0 24 24"),o(f,"stroke","currentColor"),o(c,"type","button"),o(c,"class","btn btn-sm btn-outline"),o(u,"class","card-actions justify-end mt-4")},m(w,C){L(w,s,C),t(s,e),t(e,n),t(n,a),L(w,i,C),L(w,u,C),t(u,c),t(c,f),t(f,d),t(c,p),t(c,g),b||(k=V(c,"click",l[7]),b=!0)},p(w,C){C&8&&v(a,w[3]),C&16&&m!==(m=w[4]("common.copy")+"")&&v(g,m)},d(w){w&&(H(s),H(i),H(u)),b=!1,k()}}}function Qc(l){let s,e,n,a,i=l[4]("auth.routeAuth")+"",u;return{c(){s=r("div"),e=r("div"),e.textContent="\u2713",n=h(),a=r("div"),u=_(i),o(e,"class","badge badge-sm badge-success"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-3")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f&16&&i!==(i=c[4]("auth.routeAuth")+"")&&v(u,i)},d(c){c&&H(s)}}}function Zc(l){let s,e,n,a,i=l[4]("routeEditor.pathRewrite")+"",u;return{c(){s=r("div"),e=r("div"),e.textContent="\u2192",n=h(),a=r("div"),u=_(i),o(e,"class","badge badge-sm badge-info"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-3")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f&16&&i!==(i=c[4]("routeEditor.pathRewrite")+"")&&v(u,i)},d(c){c&&H(s)}}}function Xc(l){let s,e,n,a,i=l[4]("routeEditor.transformer")+"",u;return{c(){s=r("div"),e=r("div"),e.textContent="\u26A1",n=h(),a=r("div"),u=_(i),o(e,"class","badge badge-sm badge-warning"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-3")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f&16&&i!==(i=c[4]("routeEditor.transformer")+"")&&v(u,i)},d(c){c&&H(s)}}}function xc(l){let s,e=l[4]("routeEditor.failoverEnabled")+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-xs badge-success ml-1")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i&16&&e!==(e=a[4]("routeEditor.failoverEnabled")+"")&&v(n,e)},d(a){a&&H(s)}}}function bm(l){let s,e,n,a=l[4]("routeEditor.preview")+"",i,u,c,f=l[4]("routeEditor.previewHelp")+"",d,p,m,g,b,k=l[4]("routeEditor.upstreams")+"",w,C,E,y=l[2].upstreamsCount+"",T,M,R,j=l[4]("routeEditor.totalWeight")+"",P,I,q=l[2].totalWeight+"",D,A,N,Z,Q=l[4]("routeEditor.features")+"",x,z,K,S=[l[2].hasAuth,l[2].hasFailover,l[2].hasTransformer,l[2].hasPathRewrite].filter(Boolean).length+"",B,U,F,J=l[4]("routeEditor.featuresEnabled")+"",ie,ue,ne,$,te=l[4]("routes.path")+"",ae,ee,G,pe=(l[0].path||l[4]("routeEditor.notSet"))+"",oe,ge,he,ye,ze=l[4]("routeEditor.routePath")+"",Pe,we,Fe,Je,je,Le=l[4]("routeEditor.enabledFeatures")+"",Se,fe,_e,Ie,De,se=l[2].hasAuth?"\u2713":"\u25CB",ke,me,Ee,Ve,Be=l[4]("auth.routeAuth")+"",nt,Ne,Qe,Ye,ve=l[2].hasFailover?"\u2713":"\u25CB",de,Te,Ze,Me,Ue=l[4]("routeEditor.failoverTitle")+"",Ce,mt,Ge,ce,qe=l[2].hasTransformer?"\u2713":"\u25CB",Re,dt,We,O,He=l[4]("routeEditor.transformer")+"",X,ft,Ht,Ke,_t=l[2].hasPathRewrite?"\u2713":"\u25CB",tt,it,Oe,Xe,It=l[4]("routeEditor.pathRewrite")+"",rt,gt,wt,pt,bl,at=l[4]("routeEditor.upstreams")+"",St,ht,Tt,vl,At,hl,ml,ql,Jt=l[4]("routeEditor.jsonConfig")+"",Yl,Yt,Qt,Hl=(l[1]?l[4]("common.hide"):l[4]("common.show"))+"",Bl,gl,sl,Ql,Ft,Ll,Vl=l[4]("routeEditor.requestFlow")+"",Jl,Cl,zt,Zl,Lt,Pl,jl,$l,xt=l[4]("routeEditor.clientRequest")+"",kl,es,zl,Il=(l[0].path||"/")+"",Wl,Ls,ol,wl,nl,Ol,al,_l,tl,Dl,Nl,El=l[4]("routeEditor.selectUpstream")+"",Wt,Bt,Pt,$t=l[2].upstreamsCount+"",el,Kt,Zt=l[4]("routeEditor.upstreams")+"",rl,Xt,$e,Al,ts,Xl,xl,ls=l[4]("routeEditor.returnResponse")+"",Ds,ss,Os,il=ut(l[0].upstreams),Ot=[];for(let xe=0;xe<il.length;xe+=1)Ot[xe]=Kc(Wc(l,il,xe));let lt=l[1]&&Yc(l),ct=l[2].hasAuth&&Qc(l),ll=l[2].hasPathRewrite&&Zc(l),Tl=l[2].hasTransformer&&Xc(l),ul=l[2].hasFailover&&xc(l);return{c(){s=r("div"),e=r("div"),n=r("h3"),i=_(a),u=h(),c=r("p"),d=_(f),p=h(),m=r("div"),g=r("div"),b=r("div"),w=_(k),C=h(),E=r("div"),T=_(y),M=h(),R=r("div"),P=_(j),I=_(": "),D=_(q),A=h(),N=r("div"),Z=r("div"),x=_(Q),z=h(),K=r("div"),B=_(S),U=h(),F=r("div"),ie=_(J),ue=h(),ne=r("div"),$=r("div"),ae=_(te),ee=h(),G=r("div"),oe=_(pe),he=h(),ye=r("div"),Pe=_(ze),we=h(),Fe=r("div"),Je=r("div"),je=r("h4"),Se=_(Le),fe=h(),_e=r("div"),Ie=r("div"),De=r("div"),ke=_(se),Ee=h(),Ve=r("span"),nt=_(Be),Ne=h(),Qe=r("div"),Ye=r("div"),de=_(ve),Ze=h(),Me=r("span"),Ce=_(Ue),mt=h(),Ge=r("div"),ce=r("div"),Re=_(qe),We=h(),O=r("span"),X=_(He),ft=h(),Ht=r("div"),Ke=r("div"),tt=_(_t),Oe=h(),Xe=r("span"),rt=_(It),gt=h(),wt=r("div"),pt=r("div"),bl=r("h4"),St=_(at),ht=h(),Tt=r("div");for(let xe=0;xe<Ot.length;xe+=1)Ot[xe].c();vl=h(),At=r("div"),hl=r("div"),ml=r("div"),ql=r("h4"),Yl=_(Jt),Yt=h(),Qt=r("button"),Bl=_(Hl),gl=h(),lt&&lt.c(),sl=h(),Ql=r("div"),Ft=r("div"),Ll=r("h4"),Jl=_(Vl),Cl=h(),zt=r("div"),Zl=r("div"),Lt=r("div"),Lt.textContent="1",Pl=h(),jl=r("div"),$l=r("div"),kl=_(xt),es=h(),zl=r("div"),Wl=_(Il),Ls=h(),ol=r("div"),ct&&ct.c(),wl=h(),ll&&ll.c(),nl=h(),Tl&&Tl.c(),Ol=h(),al=r("div"),_l=r("div"),_l.textContent="2",tl=h(),Dl=r("div"),Nl=r("div"),Wt=_(El),Bt=h(),Pt=r("div"),el=_($t),Kt=h(),rl=_(Zt),Xt=h(),ul&&ul.c(),$e=h(),Al=r("div"),ts=r("div"),ts.textContent="3",Xl=h(),xl=r("div"),Ds=_(ls),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(b,"class","stat-title"),o(E,"class","stat-value text-primary"),o(R,"class","stat-desc"),o(g,"class","stat bg-base-200 rounded-lg"),o(Z,"class","stat-title"),o(K,"class","stat-value text-2xl"),o(F,"class","stat-desc"),o(N,"class","stat bg-base-200 rounded-lg"),o($,"class","stat-title"),o(G,"class","stat-value text-sm truncate"),o(G,"title",ge=l[0].path),o(ye,"class","stat-desc"),o(ne,"class","stat bg-base-200 rounded-lg"),o(m,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"),o(je,"class","card-title text-base"),o(De,"class",me=\`badge \${l[2].hasAuth?"badge-success":"badge-ghost"}\`),o(Ve,"class","text-sm"),o(Ie,"class","flex items-center gap-2"),o(Ye,"class",Te=\`badge \${l[2].hasFailover?"badge-success":"badge-ghost"}\`),o(Me,"class","text-sm"),o(Qe,"class","flex items-center gap-2"),o(ce,"class",dt=\`badge \${l[2].hasTransformer?"badge-success":"badge-ghost"}\`),o(O,"class","text-sm"),o(Ge,"class","flex items-center gap-2"),o(Ke,"class",it=\`badge \${l[2].hasPathRewrite?"badge-success":"badge-ghost"}\`),o(Xe,"class","text-sm"),o(Ht,"class","flex items-center gap-2"),o(_e,"class","space-y-2"),o(Je,"class","card-body"),o(Fe,"class","card bg-base-200"),o(bl,"class","card-title text-base"),o(Tt,"class","space-y-2"),o(pt,"class","card-body"),o(wt,"class","card bg-base-200"),o(ql,"class","card-title text-base"),o(Qt,"type","button"),o(Qt,"class","btn btn-sm btn-ghost"),o(ml,"class","flex justify-between items-center"),o(hl,"class","card-body"),o(At,"class","card bg-base-200"),o(Ll,"class","card-title text-base"),o(Lt,"class","badge badge-lg badge-neutral"),o($l,"class","font-medium"),o(zl,"class","text-xs text-gray-500"),o(jl,"class","flex-1"),o(Zl,"class","flex items-center gap-3"),o(_l,"class","badge badge-lg badge-primary"),o(Nl,"class","font-medium"),o(Pt,"class","text-xs text-gray-500"),o(Dl,"class","flex-1"),o(al,"class","flex items-center gap-3"),o(ts,"class","badge badge-lg badge-accent"),o(xl,"class","font-medium"),o(Al,"class","flex items-center gap-3"),o(ol,"class","ml-6 border-l-2 border-base-300 pl-4 space-y-3"),o(zt,"class","flex flex-col gap-3 mt-4"),o(Ft,"class","card-body"),o(Ql,"class","card bg-base-200"),o(s,"class","space-y-6")},m(xe,bt){L(xe,s,bt),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,d),t(s,p),t(s,m),t(m,g),t(g,b),t(b,w),t(g,C),t(g,E),t(E,T),t(g,M),t(g,R),t(R,P),t(R,I),t(R,D),t(m,A),t(m,N),t(N,Z),t(Z,x),t(N,z),t(N,K),t(K,B),t(N,U),t(N,F),t(F,ie),t(m,ue),t(m,ne),t(ne,$),t($,ae),t(ne,ee),t(ne,G),t(G,oe),t(ne,he),t(ne,ye),t(ye,Pe),t(s,we),t(s,Fe),t(Fe,Je),t(Je,je),t(je,Se),t(Je,fe),t(Je,_e),t(_e,Ie),t(Ie,De),t(De,ke),t(Ie,Ee),t(Ie,Ve),t(Ve,nt),t(_e,Ne),t(_e,Qe),t(Qe,Ye),t(Ye,de),t(Qe,Ze),t(Qe,Me),t(Me,Ce),t(_e,mt),t(_e,Ge),t(Ge,ce),t(ce,Re),t(Ge,We),t(Ge,O),t(O,X),t(_e,ft),t(_e,Ht),t(Ht,Ke),t(Ke,tt),t(Ht,Oe),t(Ht,Xe),t(Xe,rt),t(s,gt),t(s,wt),t(wt,pt),t(pt,bl),t(bl,St),t(pt,ht),t(pt,Tt);for(let fl=0;fl<Ot.length;fl+=1)Ot[fl]&&Ot[fl].m(Tt,null);t(s,vl),t(s,At),t(At,hl),t(hl,ml),t(ml,ql),t(ql,Yl),t(ml,Yt),t(ml,Qt),t(Qt,Bl),t(hl,gl),lt&&lt.m(hl,null),t(s,sl),t(s,Ql),t(Ql,Ft),t(Ft,Ll),t(Ll,Jl),t(Ft,Cl),t(Ft,zt),t(zt,Zl),t(Zl,Lt),t(Zl,Pl),t(Zl,jl),t(jl,$l),t($l,kl),t(jl,es),t(jl,zl),t(zl,Wl),t(zt,Ls),t(zt,ol),ct&&ct.m(ol,null),t(ol,wl),ll&&ll.m(ol,null),t(ol,nl),Tl&&Tl.m(ol,null),t(ol,Ol),t(ol,al),t(al,_l),t(al,tl),t(al,Dl),t(Dl,Nl),t(Nl,Wt),t(Dl,Bt),t(Dl,Pt),t(Pt,el),t(Pt,Kt),t(Pt,rl),t(Pt,Xt),ul&&ul.m(Pt,null),t(ol,$e),t(ol,Al),t(Al,ts),t(Al,Xl),t(Al,xl),t(xl,Ds),ss||(Os=V(Qt,"click",l[6]),ss=!0)},p(xe,[bt]){if(bt&16&&a!==(a=xe[4]("routeEditor.preview")+"")&&v(i,a),bt&16&&f!==(f=xe[4]("routeEditor.previewHelp")+"")&&v(d,f),bt&16&&k!==(k=xe[4]("routeEditor.upstreams")+"")&&v(w,k),bt&4&&y!==(y=xe[2].upstreamsCount+"")&&v(T,y),bt&16&&j!==(j=xe[4]("routeEditor.totalWeight")+"")&&v(P,j),bt&4&&q!==(q=xe[2].totalWeight+"")&&v(D,q),bt&16&&Q!==(Q=xe[4]("routeEditor.features")+"")&&v(x,Q),bt&4&&S!==(S=[xe[2].hasAuth,xe[2].hasFailover,xe[2].hasTransformer,xe[2].hasPathRewrite].filter(Boolean).length+"")&&v(B,S),bt&16&&J!==(J=xe[4]("routeEditor.featuresEnabled")+"")&&v(ie,J),bt&16&&te!==(te=xe[4]("routes.path")+"")&&v(ae,te),bt&17&&pe!==(pe=(xe[0].path||xe[4]("routeEditor.notSet"))+"")&&v(oe,pe),bt&1&&ge!==(ge=xe[0].path)&&o(G,"title",ge),bt&16&&ze!==(ze=xe[4]("routeEditor.routePath")+"")&&v(Pe,ze),bt&16&&Le!==(Le=xe[4]("routeEditor.enabledFeatures")+"")&&v(Se,Le),bt&4&&se!==(se=xe[2].hasAuth?"\u2713":"\u25CB")&&v(ke,se),bt&4&&me!==(me=\`badge \${xe[2].hasAuth?"badge-success":"badge-ghost"}\`)&&o(De,"class",me),bt&16&&Be!==(Be=xe[4]("auth.routeAuth")+"")&&v(nt,Be),bt&4&&ve!==(ve=xe[2].hasFailover?"\u2713":"\u25CB")&&v(de,ve),bt&4&&Te!==(Te=\`badge \${xe[2].hasFailover?"badge-success":"badge-ghost"}\`)&&o(Ye,"class",Te),bt&16&&Ue!==(Ue=xe[4]("routeEditor.failoverTitle")+"")&&v(Ce,Ue),bt&4&&qe!==(qe=xe[2].hasTransformer?"\u2713":"\u25CB")&&v(Re,qe),bt&4&&dt!==(dt=\`badge \${xe[2].hasTransformer?"badge-success":"badge-ghost"}\`)&&o(ce,"class",dt),bt&16&&He!==(He=xe[4]("routeEditor.transformer")+"")&&v(X,He),bt&4&&_t!==(_t=xe[2].hasPathRewrite?"\u2713":"\u25CB")&&v(tt,_t),bt&4&&it!==(it=\`badge \${xe[2].hasPathRewrite?"badge-success":"badge-ghost"}\`)&&o(Ke,"class",it),bt&16&&It!==(It=xe[4]("routeEditor.pathRewrite")+"")&&v(rt,It),bt&16&&at!==(at=xe[4]("routeEditor.upstreams")+"")&&v(St,at),bt&17){il=ut(xe[0].upstreams);let fl;for(fl=0;fl<il.length;fl+=1){const xn=Wc(xe,il,fl);Ot[fl]?Ot[fl].p(xn,bt):(Ot[fl]=Kc(xn),Ot[fl].c(),Ot[fl].m(Tt,null))}for(;fl<Ot.length;fl+=1)Ot[fl].d(1);Ot.length=il.length}bt&16&&Jt!==(Jt=xe[4]("routeEditor.jsonConfig")+"")&&v(Yl,Jt),bt&18&&Hl!==(Hl=(xe[1]?xe[4]("common.hide"):xe[4]("common.show"))+"")&&v(Bl,Hl),xe[1]?lt?lt.p(xe,bt):(lt=Yc(xe),lt.c(),lt.m(hl,null)):lt&&(lt.d(1),lt=null),bt&16&&Vl!==(Vl=xe[4]("routeEditor.requestFlow")+"")&&v(Jl,Vl),bt&16&&xt!==(xt=xe[4]("routeEditor.clientRequest")+"")&&v(kl,xt),bt&1&&Il!==(Il=(xe[0].path||"/")+"")&&v(Wl,Il),xe[2].hasAuth?ct?ct.p(xe,bt):(ct=Qc(xe),ct.c(),ct.m(ol,wl)):ct&&(ct.d(1),ct=null),xe[2].hasPathRewrite?ll?ll.p(xe,bt):(ll=Zc(xe),ll.c(),ll.m(ol,nl)):ll&&(ll.d(1),ll=null),xe[2].hasTransformer?Tl?Tl.p(xe,bt):(Tl=Xc(xe),Tl.c(),Tl.m(ol,Ol)):Tl&&(Tl.d(1),Tl=null),bt&16&&El!==(El=xe[4]("routeEditor.selectUpstream")+"")&&v(Wt,El),bt&4&&$t!==($t=xe[2].upstreamsCount+"")&&v(el,$t),bt&16&&Zt!==(Zt=xe[4]("routeEditor.upstreams")+"")&&v(rl,Zt),xe[2].hasFailover?ul?ul.p(xe,bt):(ul=xc(xe),ul.c(),ul.m(Pt,null)):ul&&(ul.d(1),ul=null),bt&16&&ls!==(ls=xe[4]("routeEditor.returnResponse")+"")&&v(Ds,ls)},i:ot,o:ot,d(xe){xe&&H(s),Gt(Ot,xe),lt&&lt.d(),ct&&ct.d(),ll&&ll.d(),Tl&&Tl.d(),ul&&ul.d(),ss=!1,Os()}}}function vm(l,s,e){let n,a,i,u;Dt(l,Rt,m=>e(4,u=m));let{route:c}=s,f=!1;const d=()=>e(1,f=!f),p=()=>{navigator.clipboard.writeText(a),alert(u("common.copied"))};return l.$$set=m=>{"route"in m&&e(0,c=m.route)},l.$$.update=()=>{l.$$.dirty&1&&e(5,n={...c,upstreams:c.upstreams.map(({_uid:m,...g})=>g)}),l.$$.dirty&32&&e(3,a=JSON.stringify(n,null,2)),l.$$.dirty&1&&e(2,i={upstreamsCount:c.upstreams.length,hasAuth:c.auth?.enabled||!1,hasFailover:c.failover?.enabled||!1,hasTransformer:c.plugins&&c.plugins.length>0||!1,hasPathRewrite:c.pathRewrite&&Object.keys(c.pathRewrite).length>0,totalWeight:c.upstreams.reduce((m,g)=>m+(g.weight||100),0)})},[c,f,i,a,u,n,d,p]}class km extends Nt{constructor(s){super(),Ut(this,s,vm,bm,Vt,{route:0})}}function $c(l,s,e){const n=l.slice();return n[52]=s[e],n}function ed(l){let s,e;return{c(){s=r("code"),e=_(l[2]),o(s,"class","px-2 py-1 bg-base-200 rounded text-sm font-mono text-gray-600")},m(n,a){L(n,s,a),t(s,e)},p(n,a){a[0]&4&&v(e,n[2])},d(n){n&&H(s)}}}function wm(l){let s,e,n,a,i,u,c,f,d,p=l[16]("routeEditor.basicInfo")+"",m,g,b,k,w,C,E,y=l[16]("routeEditor.upstreams")+"",T,M,R,j=l[0].upstreams.length+"",P,I,q,D,A,N,Z,Q,x=l[16]("routeEditor.requestModification")+"",z,K,S,B,U,F,J,ie=l[16]("auth.routeAuth")+"",ue,ne,$,te,ae,ee,G,pe,oe=l[16]("routeEditor.failoverTitle")+"",ge,he,ye,ze,Pe,we,Fe,Je,je,Le=l[16]("routeEditor.preview")+"",Se,fe,_e,Ie,De=l[16]("shortcuts.title")+"",se,ke,me,Ee,Ve,Be,nt,Ne,Qe,Ye=l[16]("shortcuts.save")+"",ve,de,Te,Ze,Me,Ue,Ce,mt,Ge=l[16]("shortcuts.switchSection")+"",ce,qe,Re,dt,We,O,He=l[16]("shortcuts.cancel")+"",X,ft,Ht,Ke,_t,tt,it,Oe,Xe,It,rt,gt=l[0].auth?.enabled&&td(),wt=l[0].failover?.enabled&&ld(),pt=!l[1]&&sd(l);const bl=[Rm,Mm,Sm,Tm,Em,Cm],at=[];function St(ht,Tt){return ht[6]==="basic"?0:ht[6]==="upstreams"?1:ht[6]==="modification"?2:ht[6]==="auth"?3:ht[6]==="failover"?4:ht[6]==="preview"?5:-1}return~(it=St(l))&&(Oe=at[it]=bl[it](l)),{c(){s=r("div"),e=r("div"),n=r("div"),a=r("ul"),i=r("li"),u=r("button"),c=re("svg"),f=re("path"),d=h(),m=_(p),g=h(),b=r("li"),k=r("button"),w=re("svg"),C=re("path"),E=h(),T=_(y),M=h(),R=r("span"),P=_(j),q=h(),D=r("li"),A=r("button"),N=re("svg"),Z=re("path"),Q=h(),z=_(x),K=h(),S=r("li"),B=r("button"),U=re("svg"),F=re("path"),J=h(),ue=_(ie),ne=h(),gt&&gt.c(),$=h(),te=r("li"),ae=r("button"),ee=re("svg"),G=re("path"),pe=h(),ge=_(oe),he=h(),wt&&wt.c(),ye=h(),ze=r("li"),Pe=r("button"),we=re("svg"),Fe=re("path"),Je=re("path"),je=h(),Se=_(Le),fe=h(),_e=r("div"),Ie=r("div"),se=_(De),ke=h(),me=r("div"),Ee=r("div"),Ve=r("kbd"),Ve.textContent="\u2318",Be=_(" + "),nt=r("kbd"),nt.textContent="S",Ne=h(),Qe=r("span"),ve=_(Ye),de=h(),Te=r("div"),Ze=r("kbd"),Ze.textContent="Ctrl",Me=_(" + "),Ue=r("kbd"),Ue.textContent="1-6",Ce=h(),mt=r("span"),ce=_(Ge),qe=h(),Re=r("div"),dt=r("kbd"),dt.textContent="Esc",We=h(),O=r("span"),X=_(He),ft=h(),pt&&pt.c(),Ht=h(),Ke=r("div"),_t=r("div"),tt=r("div"),Oe&&Oe.c(),o(f,"stroke-linecap","round"),o(f,"stroke-linejoin","round"),o(f,"stroke-width","2"),o(f,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(c,"xmlns","http://www.w3.org/2000/svg"),o(c,"class","h-5 w-5"),o(c,"fill","none"),o(c,"viewBox","0 0 24 24"),o(c,"stroke","currentColor"),le(u,"active",l[6]==="basic"),o(C,"stroke-linecap","round"),o(C,"stroke-linejoin","round"),o(C,"stroke-width","2"),o(C,"d","M13 10V3L4 14h7v7l9-11h-7z"),o(w,"xmlns","http://www.w3.org/2000/svg"),o(w,"class","h-5 w-5"),o(w,"fill","none"),o(w,"viewBox","0 0 24 24"),o(w,"stroke","currentColor"),o(R,"class","badge badge-sm tooltip tooltip-right"),o(R,"data-tip",I=l[16]("routeEditor.upstreamCountTooltip",{values:{count:l[0].upstreams.length}})),le(k,"active",l[6]==="upstreams"),o(Z,"stroke-linecap","round"),o(Z,"stroke-linejoin","round"),o(Z,"stroke-width","2"),o(Z,"d","M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"),o(N,"xmlns","http://www.w3.org/2000/svg"),o(N,"class","h-5 w-5"),o(N,"fill","none"),o(N,"viewBox","0 0 24 24"),o(N,"stroke","currentColor"),le(A,"active",l[6]==="modification"),o(F,"stroke-linecap","round"),o(F,"stroke-linejoin","round"),o(F,"stroke-width","2"),o(F,"d","M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"),o(U,"xmlns","http://www.w3.org/2000/svg"),o(U,"class","h-5 w-5"),o(U,"fill","none"),o(U,"viewBox","0 0 24 24"),o(U,"stroke","currentColor"),le(B,"active",l[6]==="auth"),o(G,"stroke-linecap","round"),o(G,"stroke-linejoin","round"),o(G,"stroke-width","2"),o(G,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(ee,"xmlns","http://www.w3.org/2000/svg"),o(ee,"class","h-5 w-5"),o(ee,"fill","none"),o(ee,"viewBox","0 0 24 24"),o(ee,"stroke","currentColor"),le(ae,"active",l[6]==="failover"),o(Fe,"stroke-linecap","round"),o(Fe,"stroke-linejoin","round"),o(Fe,"stroke-width","2"),o(Fe,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),o(Je,"stroke-linecap","round"),o(Je,"stroke-linejoin","round"),o(Je,"stroke-width","2"),o(Je,"d","M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"),o(we,"xmlns","http://www.w3.org/2000/svg"),o(we,"class","h-5 w-5"),o(we,"fill","none"),o(we,"viewBox","0 0 24 24"),o(we,"stroke","currentColor"),le(Pe,"active",l[6]==="preview"),o(a,"class","menu bg-base-100 rounded-box shadow-lg gap-1"),o(Ie,"class","font-semibold mb-2"),o(Ve,"class","kbd kbd-xs"),o(nt,"class","kbd kbd-xs"),o(Qe,"class","ml-1"),o(Ze,"class","kbd kbd-xs"),o(Ue,"class","kbd kbd-xs"),o(mt,"class","ml-1"),o(dt,"class","kbd kbd-xs"),o(O,"class","ml-1"),o(me,"class","space-y-1 text-gray-500"),o(_e,"class","mt-4 p-3 bg-base-100 rounded-box shadow-lg text-xs"),o(n,"class","sticky top-24"),o(e,"class","w-56 flex-shrink-0 relative z-10"),o(tt,"class","card-body"),o(_t,"class","card bg-base-100 shadow-md"),o(Ke,"class","flex-1 ml-6 relative"),o(s,"class","max-w-7xl mx-auto flex gap-0 p-6 pb-32")},m(ht,Tt){L(ht,s,Tt),t(s,e),t(e,n),t(n,a),t(a,i),t(i,u),t(u,c),t(c,f),t(u,d),t(u,m),t(a,g),t(a,b),t(b,k),t(k,w),t(w,C),t(k,E),t(k,T),t(k,M),t(k,R),t(R,P),t(a,q),t(a,D),t(D,A),t(A,N),t(N,Z),t(A,Q),t(A,z),t(a,K),t(a,S),t(S,B),t(B,U),t(U,F),t(B,J),t(B,ue),t(B,ne),gt&&gt.m(B,null),t(a,$),t(a,te),t(te,ae),t(ae,ee),t(ee,G),t(ae,pe),t(ae,ge),t(ae,he),wt&&wt.m(ae,null),t(a,ye),t(a,ze),t(ze,Pe),t(Pe,we),t(we,Fe),t(we,Je),t(Pe,je),t(Pe,Se),t(n,fe),t(n,_e),t(_e,Ie),t(Ie,se),t(_e,ke),t(_e,me),t(me,Ee),t(Ee,Ve),t(Ee,Be),t(Ee,nt),t(Ee,Ne),t(Ee,Qe),t(Qe,ve),t(me,de),t(me,Te),t(Te,Ze),t(Te,Me),t(Te,Ue),t(Te,Ce),t(Te,mt),t(mt,ce),t(me,qe),t(me,Re),t(Re,dt),t(Re,We),t(Re,O),t(O,X),t(n,ft),pt&&pt.m(n,null),t(s,Ht),t(s,Ke),t(Ke,_t),t(_t,tt),~it&&at[it].m(tt,null),Xe=!0,It||(rt=[V(u,"click",l[27]),V(k,"click",l[28]),V(A,"click",l[29]),V(B,"click",l[30]),V(ae,"click",l[31]),V(Pe,"click",l[32])],It=!0)},p(ht,Tt){(!Xe||Tt[0]&65536)&&p!==(p=ht[16]("routeEditor.basicInfo")+"")&&v(m,p),(!Xe||Tt[0]&64)&&le(u,"active",ht[6]==="basic"),(!Xe||Tt[0]&65536)&&y!==(y=ht[16]("routeEditor.upstreams")+"")&&v(T,y),(!Xe||Tt[0]&1)&&j!==(j=ht[0].upstreams.length+"")&&v(P,j),(!Xe||Tt[0]&65537&&I!==(I=ht[16]("routeEditor.upstreamCountTooltip",{values:{count:ht[0].upstreams.length}})))&&o(R,"data-tip",I),(!Xe||Tt[0]&64)&&le(k,"active",ht[6]==="upstreams"),(!Xe||Tt[0]&65536)&&x!==(x=ht[16]("routeEditor.requestModification")+"")&&v(z,x),(!Xe||Tt[0]&64)&&le(A,"active",ht[6]==="modification"),(!Xe||Tt[0]&65536)&&ie!==(ie=ht[16]("auth.routeAuth")+"")&&v(ue,ie),ht[0].auth?.enabled?gt||(gt=td(),gt.c(),gt.m(B,null)):gt&&(gt.d(1),gt=null),(!Xe||Tt[0]&64)&&le(B,"active",ht[6]==="auth"),(!Xe||Tt[0]&65536)&&oe!==(oe=ht[16]("routeEditor.failoverTitle")+"")&&v(ge,oe),ht[0].failover?.enabled?wt||(wt=ld(),wt.c(),wt.m(ae,null)):wt&&(wt.d(1),wt=null),(!Xe||Tt[0]&64)&&le(ae,"active",ht[6]==="failover"),(!Xe||Tt[0]&65536)&&Le!==(Le=ht[16]("routeEditor.preview")+"")&&v(Se,Le),(!Xe||Tt[0]&64)&&le(Pe,"active",ht[6]==="preview"),(!Xe||Tt[0]&65536)&&De!==(De=ht[16]("shortcuts.title")+"")&&v(se,De),(!Xe||Tt[0]&65536)&&Ye!==(Ye=ht[16]("shortcuts.save")+"")&&v(ve,Ye),(!Xe||Tt[0]&65536)&&Ge!==(Ge=ht[16]("shortcuts.switchSection")+"")&&v(ce,Ge),(!Xe||Tt[0]&65536)&&He!==(He=ht[16]("shortcuts.cancel")+"")&&v(X,He),ht[1]?pt&&(pt.d(1),pt=null):pt?pt.p(ht,Tt):(pt=sd(ht),pt.c(),pt.m(n,null));let vl=it;it=St(ht),it===vl?~it&&at[it].p(ht,Tt):(Oe&&(Gl(),st(at[vl],1,1,()=>{at[vl]=null}),Kl()),~it?(Oe=at[it],Oe?Oe.p(ht,Tt):(Oe=at[it]=bl[it](ht),Oe.c()),et(Oe,1),Oe.m(tt,null)):Oe=null)},i(ht){Xe||(et(Oe),Xe=!0)},o(ht){st(Oe),Xe=!1},d(ht){ht&&H(s),gt&&gt.d(),wt&&wt.d(),pt&&pt.d(),~it&&at[it].d(),It=!1,vt(rt)}}}function ym(l){let s;return{c(){s=r("div"),s.innerHTML='<span class="loading loading-spinner loading-lg"></span>',o(s,"class","flex justify-center items-center h-64")},m(e,n){L(e,s,n)},p:ot,i:ot,o:ot,d(e){e&&H(s)}}}function td(l){let s;return{c(){s=r("span"),s.textContent="\u2713",o(s,"class","badge badge-success badge-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function ld(l){let s;return{c(){s=r("span"),s.textContent="\u2713",o(s,"class","badge badge-success badge-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function sd(l){let s,e,n,a,i,u=l[16]("routeEditor.useTemplate")+"",c,f,d;return{c(){s=r("div"),e=r("button"),n=re("svg"),a=re("path"),i=h(),c=_(u),o(a,"stroke-linecap","round"),o(a,"stroke-linejoin","round"),o(a,"stroke-width","2"),o(a,"d","M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"class","h-4 w-4"),o(n,"fill","none"),o(n,"viewBox","0 0 24 24"),o(n,"stroke","currentColor"),o(e,"type","button"),o(e,"class","btn btn-sm btn-outline w-full gap-2"),o(s,"class","mt-4")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(n,a),t(e,i),t(e,c),f||(d=V(e,"click",l[33]),f=!0)},p(p,m){m[0]&65536&&u!==(u=p[16]("routeEditor.useTemplate")+"")&&v(c,u)},d(p){p&&H(s),f=!1,d()}}}function Cm(l){let s,e;return s=new km({props:{route:l[0]}}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p(n,a){const i={};a[0]&1&&(i.route=n[0]),s.$set(i)},i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Em(l){let s,e,n;function a(u){l[38](u)}let i={};return l[0]!==void 0&&(i.route=l[0]),s=new _m({props:i}),Sl.push(()=>Ml(s,"route",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};!e&&c[0]&1&&(e=!0,f.route=u[0],Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function Tm(l){let s,e,n;function a(u){l[37](u)}let i={};return l[0]!==void 0&&(i.route=l[0]),s=new cm({props:i}),Sl.push(()=>Ml(s,"route",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};!e&&c[0]&1&&(e=!0,f.route=u[0],Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function Sm(l){let s,e,n;function a(u){l[36](u)}let i={};return l[0]!==void 0&&(i.route=l[0]),s=new im({props:i}),Sl.push(()=>Ml(s,"route",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};!e&&c[0]&1&&(e=!0,f.route=u[0],Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function Mm(l){let s,e,n;function a(u){l[35](u)}let i={errors:l[8],weightErrors:l[9]};return l[0]!==void 0&&(i.route=l[0]),s=new lm({props:i}),Sl.push(()=>Ml(s,"route",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};c[0]&256&&(f.errors=u[8]),c[0]&512&&(f.weightErrors=u[9]),!e&&c[0]&1&&(e=!0,f.route=u[0],Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function Rm(l){let s,e,n;function a(u){l[34](u)}let i={errors:l[8]};return l[0]!==void 0&&(i.route=l[0]),s=new Ih({props:i}),Sl.push(()=>Ml(s,"route",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};c[0]&256&&(f.errors=u[8]),!e&&c[0]&1&&(e=!0,f.route=u[0],Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function od(l){let s,e=l[16]("autosave.lastSaved")+"",n,a,i=l[19](l[12])+"",u;return{c(){s=r("span"),n=_(e),a=_(": "),u=_(i),o(s,"class","text-xs text-gray-500")},m(c,f){L(c,s,f),t(s,n),t(s,a),t(s,u)},p(c,f){f[0]&65536&&e!==(e=c[16]("autosave.lastSaved")+"")&&v(n,e),f[0]&4096&&i!==(i=c[19](c[12])+"")&&v(u,i)},d(c){c&&H(s)}}}function qm(l){let s,e,n,a,i,u=l[16]("validation.allGood")+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-5 w-5"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm font-medium"),o(s,"class","flex items-center gap-2 text-success")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d[0]&65536&&u!==(u=f[16]("validation.allGood")+"")&&v(c,u)},d(f){f&&H(s)}}}function Hm(l){let s,e,n,a,i,u=l[10].length+"",c,f,d=l[16]("validation.errors")+"",p,m,g,b=(l[7]?l[16]("common.hide"):l[16]("common.show"))+"",k,w,C;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),f=h(),p=_(d),m=h(),g=r("button"),k=_(b),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-5 w-5"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm font-medium"),o(g,"class","btn btn-xs btn-ghost"),o(s,"class","flex items-center gap-2 text-error")},m(E,y){L(E,s,y),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c),t(i,f),t(i,p),t(s,m),t(s,g),t(g,k),w||(C=V(g,"click",l[39]),w=!0)},p(E,y){y[0]&1024&&u!==(u=E[10].length+"")&&v(c,u),y[0]&65536&&d!==(d=E[16]("validation.errors")+"")&&v(p,d),y[0]&65664&&b!==(b=(E[7]?E[16]("common.hide"):E[16]("common.show"))+"")&&v(k,b)},d(E){E&&H(s),w=!1,C()}}}function Lm(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-5 w-5"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function Pm(l){let s;return{c(){s=r("span"),o(s,"class","loading loading-spinner loading-sm")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function nd(l){let s,e,n=ut(l[10]),a=[];for(let i=0;i<n.length;i+=1)a[i]=ad($c(l,n,i));return{c(){s=r("div"),e=r("ul");for(let i=0;i<a.length;i+=1)a[i].c();o(e,"class","text-sm space-y-1"),o(s,"class","mt-3 p-3 bg-error/10 rounded-lg border border-error/20")},m(i,u){L(i,s,u),t(s,e);for(let c=0;c<a.length;c+=1)a[c]&&a[c].m(e,null)},p(i,u){if(u[0]&1024){n=ut(i[10]);let c;for(c=0;c<n.length;c+=1){const f=$c(i,n,c);a[c]?a[c].p(f,u):(a[c]=ad(f),a[c].c(),a[c].m(e,null))}for(;c<a.length;c+=1)a[c].d(1);a.length=n.length}},d(i){i&&H(s),Gt(a,i)}}}function ad(l){let s,e,n,a,i=l[52].field+"",u,c,f=l[52].message+"",d,p;return{c(){s=r("li"),e=r("span"),e.textContent="\u2022",n=h(),a=r("span"),u=_(i),c=_(": "),d=_(f),p=h(),o(e,"class","text-error"),o(s,"class","flex items-start gap-2")},m(m,g){L(m,s,g),t(s,e),t(s,n),t(s,a),t(a,u),t(a,c),t(a,d),t(s,p)},p(m,g){g[0]&1024&&i!==(i=m[52].field+"")&&v(u,i),g[0]&1024&&f!==(f=m[52].message+"")&&v(d,f)},d(m){m&&H(s)}}}function jm(l){let s,e,n,a,i,u,c,f=l[16]("breadcrumb.home")+"",d,p,m,g,b=l[16]("breadcrumb.routes")+"",k,w,C,E,y,T=(l[1]?l[16]("breadcrumb.editRoute"):l[16]("breadcrumb.newRoute"))+"",M,R,j,P,I,q,D,A,N,Z,Q,x,z,K,S,B=l[16]("common.cancel")+"",U,F,J,ie,ue=l[16]("common.save")+"",ne,$,te,ae,ee,G,pe,oe,ge,he,ye,ze,Pe,we,Fe,Je,je,Le=l[16]("confirmDialog.no")+"",Se,fe,_e,Ie=l[16]("confirmDialog.yes")+"",De,se,ke,me,Ee,Ve,Be=l[1]&&ed(l);const nt=[ym,wm],Ne=[];function Qe(ce,qe){return ce[3]?0:1}P=Qe(l),I=Ne[P]=nt[P](l);let Ye=l[12]&&!l[1]&&od(l);function ve(ce,qe){if(ce[10].length>0)return Hm;if(ce[11])return qm}let de=ve(l),Te=de&&de(l);function Ze(ce,qe){return ce[4]?Pm:Lm}let Me=Ze(l),Ue=Me(l),Ce=l[7]&&l[10].length>0&&nd(l);function mt(ce){l[40](ce)}let Ge={};return l[5]!==void 0&&(Ge.showTemplates=l[5]),ee=new Th({props:Ge}),Sl.push(()=>Ml(ee,"showTemplates",mt)),ee.$on("select",l[22]),{c(){s=r("div"),e=r("div"),n=r("div"),a=r("div"),i=r("ul"),u=r("li"),c=r("button"),d=_(f),p=h(),m=r("li"),g=r("button"),k=_(b),w=h(),C=r("li"),E=r("span"),y=r("span"),M=_(T),R=h(),Be&&Be.c(),j=h(),I.c(),q=h(),D=r("div"),A=r("div"),N=r("div"),Z=r("div"),Ye&&Ye.c(),Q=h(),x=r("div"),Te&&Te.c(),z=h(),K=r("div"),S=r("button"),U=_(B),F=h(),J=r("button"),Ue.c(),ie=h(),ne=_(ue),te=h(),Ce&&Ce.c(),ae=h(),Et(ee.$$.fragment),pe=h(),oe=r("dialog"),ge=r("div"),he=r("h3"),ye=_(l[14]),ze=h(),Pe=r("p"),we=_(l[15]),Fe=h(),Je=r("div"),je=r("button"),Se=_(Le),fe=h(),_e=r("button"),De=_(Ie),se=h(),ke=r("button"),o(c,"type","button"),o(c,"class","link link-hover"),o(g,"type","button"),o(g,"class","link link-hover"),o(E,"class","flex items-center gap-2"),o(a,"class","breadcrumbs text-sm"),o(n,"class","max-w-7xl mx-auto px-6 py-4"),o(e,"class","bg-base-100 border-b border-base-300"),o(Z,"class","flex items-center gap-4"),o(S,"class","btn btn-outline"),S.disabled=l[4],o(J,"class","btn btn-primary"),J.disabled=$=!l[11]||l[4],o(K,"class","flex gap-3"),o(x,"class","flex items-center gap-4"),o(N,"class","flex justify-between items-center"),o(A,"class","max-w-7xl mx-auto px-6 py-4"),o(D,"class","fixed bottom-0 left-0 right-0 bg-base-100 border-t border-base-300 shadow-2xl z-40"),o(he,"class","font-bold text-lg"),o(Pe,"class","py-4"),o(je,"class","btn btn-ghost"),o(_e,"class","btn btn-primary"),o(Je,"class","modal-action"),o(ge,"class","modal-box"),o(ke,"type","button"),o(ke,"class","modal-backdrop"),o(ke,"aria-label","Close dialog"),o(oe,"class","modal"),le(oe,"modal-open",l[13]),o(s,"class","min-h-screen bg-base-200")},m(ce,qe){L(ce,s,qe),t(s,e),t(e,n),t(n,a),t(a,i),t(i,u),t(u,c),t(c,d),t(i,p),t(i,m),t(m,g),t(g,k),t(i,w),t(i,C),t(C,E),t(E,y),t(y,M),t(E,R),Be&&Be.m(E,null),t(s,j),Ne[P].m(s,null),t(s,q),t(s,D),t(D,A),t(A,N),t(N,Z),Ye&&Ye.m(Z,null),t(N,Q),t(N,x),Te&&Te.m(x,null),t(x,z),t(x,K),t(K,S),t(S,U),t(K,F),t(K,J),Ue.m(J,null),t(J,ie),t(J,ne),t(A,te),Ce&&Ce.m(A,null),t(s,ae),Ct(ee,s,null),t(s,pe),t(s,oe),t(oe,ge),t(ge,he),t(he,ye),t(ge,ze),t(ge,Pe),t(Pe,we),t(ge,Fe),t(ge,Je),t(Je,je),t(je,Se),t(Je,fe),t(Je,_e),t(_e,De),t(oe,se),t(oe,ke),me=!0,Ee||(Ve=[V(c,"click",l[25]),V(g,"click",l[26]),V(S,"click",l[21]),V(J,"click",l[20]),V(je,"click",l[18]),V(_e,"click",l[17]),V(ke,"click",l[18])],Ee=!0)},p(ce,qe){(!me||qe[0]&65536)&&f!==(f=ce[16]("breadcrumb.home")+"")&&v(d,f),(!me||qe[0]&65536)&&b!==(b=ce[16]("breadcrumb.routes")+"")&&v(k,b),(!me||qe[0]&65538)&&T!==(T=(ce[1]?ce[16]("breadcrumb.editRoute"):ce[16]("breadcrumb.newRoute"))+"")&&v(M,T),ce[1]?Be?Be.p(ce,qe):(Be=ed(ce),Be.c(),Be.m(E,null)):Be&&(Be.d(1),Be=null);let Re=P;P=Qe(ce),P===Re?Ne[P].p(ce,qe):(Gl(),st(Ne[Re],1,1,()=>{Ne[Re]=null}),Kl(),I=Ne[P],I?I.p(ce,qe):(I=Ne[P]=nt[P](ce),I.c()),et(I,1),I.m(s,q)),ce[12]&&!ce[1]?Ye?Ye.p(ce,qe):(Ye=od(ce),Ye.c(),Ye.m(Z,null)):Ye&&(Ye.d(1),Ye=null),de===(de=ve(ce))&&Te?Te.p(ce,qe):(Te&&Te.d(1),Te=de&&de(ce),Te&&(Te.c(),Te.m(x,z))),(!me||qe[0]&65536)&&B!==(B=ce[16]("common.cancel")+"")&&v(U,B),(!me||qe[0]&16)&&(S.disabled=ce[4]),Me!==(Me=Ze(ce))&&(Ue.d(1),Ue=Me(ce),Ue&&(Ue.c(),Ue.m(J,ie))),(!me||qe[0]&65536)&&ue!==(ue=ce[16]("common.save")+"")&&v(ne,ue),(!me||qe[0]&2064&&$!==($=!ce[11]||ce[4]))&&(J.disabled=$),ce[7]&&ce[10].length>0?Ce?Ce.p(ce,qe):(Ce=nd(ce),Ce.c(),Ce.m(A,null)):Ce&&(Ce.d(1),Ce=null);const dt={};!G&&qe[0]&32&&(G=!0,dt.showTemplates=ce[5],Rl(()=>G=!1)),ee.$set(dt),(!me||qe[0]&16384)&&v(ye,ce[14]),(!me||qe[0]&32768)&&v(we,ce[15]),(!me||qe[0]&65536)&&Le!==(Le=ce[16]("confirmDialog.no")+"")&&v(Se,Le),(!me||qe[0]&65536)&&Ie!==(Ie=ce[16]("confirmDialog.yes")+"")&&v(De,Ie),(!me||qe[0]&8192)&&le(oe,"modal-open",ce[13])},i(ce){me||(et(I),et(ee.$$.fragment,ce),me=!0)},o(ce){st(I),st(ee.$$.fragment,ce),me=!1},d(ce){ce&&H(s),Be&&Be.d(),Ne[P].d(),Ye&&Ye.d(),Te&&Te.d(),Ue.d(),Ce&&Ce.d(),yt(ee),Ee=!1,vt(Ve)}}}function Dm(l,s,e){let n;Dt(l,Rt,he=>e(16,n=he));let{params:a={}}=s,i=!1,u="",c=!0,f=!1,d=!1,p="basic",m=!1,g={path:"",upstreams:[{_uid:ta(),target:"",weight:100,priority:1}],headers:{add:{},remove:[],default:{}},body:{add:{},remove:[],replace:{},default:{}},query:{add:{},remove:[],replace:{},default:{}}},b=[],k=[],w=[],C=!1,E=null,y=null,T=null,M=!1,R="",j="",P=null;function I(he,ye,ze){e(14,R=he),e(15,j=ye),P=ze,e(13,M=!0)}function q(){e(13,M=!1),P&&(P(),P=null)}function D(){e(13,M=!1),P=null}function A(he){if((he.metaKey||he.ctrlKey)&&he.key==="s"&&(he.preventDefault(),C&&!f&&x()),he.key==="Escape"&&z(),he.key>="1"&&he.key<="6"&&he.ctrlKey&&!he.metaKey&&!he.altKey){const ze=["basic","upstreams","modification","auth","failover","preview"][parseInt(he.key)-1];ze&&(e(6,p=ze),he.preventDefault())}}function N(){if(!i)try{localStorage.setItem("bungee-route-draft",JSON.stringify(g)),e(12,y=Date.now())}catch(he){console.error("Failed to auto-save draft:",he)}}function Z(he){const ye=Math.floor((Date.now()-he)/1e3);return ye<60?n("autosave.justNow"):ye<3600?n("autosave.minutesAgo",{values:{minutes:Math.floor(ye/60)}}):n("autosave.hoursAgo",{values:{hours:Math.floor(ye/3600)}})}async function Q(){try{const he=await mh(g),ye=ph(g.upstreams);e(8,b=he),e(9,k=ye),e(10,w=[...he,...ye]),e(11,C=w.length===0&&g.upstreams.length>0)}catch(he){console.error("Validation failed:",he),e(11,C=!1)}}async function x(){if(!C){jt.show(n("routeEditor.saveFailed",{values:{error:n("common.error")}}),"error");return}try{e(4,f=!0);const he={...g,upstreams:k0(g.upstreams,[ye=>ye.priority??1]).map(({_uid:ye,...ze})=>ze)};i?(await wo.update(u,he),jt.show(n("routeEditor.routeUpdated"),"success")):(await wo.create(he),jt.show(n("routeEditor.routeSaved"),"success"),localStorage.removeItem("bungee-route-draft")),Yr()}catch(he){jt.show(n("routeEditor.saveFailed",{values:{error:he.message}}),"error")}finally{e(4,f=!1)}}function z(){I(n("confirmDialog.cancelTitle"),n("confirmDialog.cancelMessage"),()=>Yr())}function K(he){const ye=he.detail;e(0,g={...g,...ye,headers:ye.headers||g.headers,body:ye.body||g.body,query:ye.query||g.query,upstreams:ye.upstreams?.map(ze=>({...ze,_uid:ta(),headers:ze.headers||{add:{},remove:[],default:{}},body:ze.body||{add:{},remove:[],replace:{},default:{}},query:ze.query||{add:{},remove:[],replace:{},default:{}}}))||g.upstreams}),jt.show(n("routeEditor.templateApplied"),"success")}Hs(async()=>{if(window.addEventListener("keydown",A),T=setInterval(()=>{N()},3e4),a.path){e(1,i=!0),e(2,u=decodeURIComponent(a.path));try{const he=await wo.get(u);he?(e(0,g=he),e(0,g.headers=g.headers||{add:{},remove:[],default:{}},g),e(0,g.body=g.body||{add:{},remove:[],replace:{},default:{}},g),e(0,g.query=g.query||{add:{},remove:[],replace:{},default:{}},g),e(0,g.upstreams=g.upstreams.map(ye=>({...ye,_uid:ta(),headers:ye.headers||{add:{},remove:[],default:{}},body:ye.body||{add:{},remove:[],replace:{},default:{}},query:ye.query||{add:{},remove:[],replace:{},default:{}}})),g)):(jt.show(n("routes.noRoutes"),"error"),Yr())}catch(he){jt.show(n("routeEditor.saveFailed",{values:{error:he.message}}),"error"),Yr()}}else try{const he=localStorage.getItem("bungee-route-draft");if(he){const ye=JSON.parse(he);I(n("confirmDialog.restoreDraftTitle"),n("confirmDialog.restoreDraftMessage"),()=>{e(0,g=ye)})}}catch(he){console.error("Failed to restore draft:",he)}e(3,c=!1)}),Xn(()=>{window.removeEventListener("keydown",A),T&&clearInterval(T)});const S=()=>window.location.hash="/",B=()=>window.location.hash="/routes",U=()=>e(6,p="basic"),F=()=>e(6,p="upstreams"),J=()=>e(6,p="modification"),ie=()=>e(6,p="auth"),ue=()=>e(6,p="failover"),ne=()=>e(6,p="preview"),$=()=>e(5,d=!0);function te(he){g=he,e(0,g)}function ae(he){g=he,e(0,g)}function ee(he){g=he,e(0,g)}function G(he){g=he,e(0,g)}function pe(he){g=he,e(0,g)}const oe=()=>e(7,m=!m);function ge(he){d=he,e(5,d)}return l.$$set=he=>{"params"in he&&e(23,a=he.params)},l.$$.update=()=>{l.$$.dirty[0]&16777217&&g&&(E&&clearTimeout(E),e(24,E=setTimeout(()=>{Q()},300)))},[g,i,u,c,f,d,p,m,b,k,w,C,y,M,R,j,n,q,D,Z,x,z,K,a,E,S,B,U,F,J,ie,ue,ne,$,te,ae,ee,G,pe,oe,ge]}class a0 extends Nt{constructor(s){super(),Ut(this,s,Dm,jm,Vt,{params:23},null,[-1,-1])}}function rd(l,s,e){const n=l.slice();return n[43]=s[e][0],n[44]=s[e][1],n}function id(l,s,e){const n=l.slice();return n[43]=s[e][0],n[44]=s[e][1],n}function ud(l,s,e){const n=l.slice();return n[43]=s[e][0],n[44]=s[e][1],n}function fd(l,s,e){const n=l.slice();n[52]=s[e],n[61]=e;const a=n[51].durations[n[61]];n[53]=a;const i=n[51].relativeTime[n[61]];n[54]=i;const u=n[53]/n[51].totalDuration*100;n[55]=u;const c=n[54]/n[51].totalDuration*100;n[56]=c;const f=kg(n[52].step);n[57]=f;const d=vg(n[52].step);n[58]=d;const p=(n[53]/n[51].totalDuration*100).toFixed(1);return n[59]=p,n}function cd(l,s,e){const n=l.slice();return n[62]=s[e],n}function Su(l){const s=l.slice(),e=s[27]();return s[51]=e,s}function dd(l,s,e){const n=l.slice();return n[52]=s[e],n}function Bm(l){let s,e,n,a,i=l[24]("logs.detail.copyToClipboard")+"",u;return{c(){s=re("svg"),e=re("path"),n=h(),a=r("span"),u=_(i),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor"),o(a,"class","hidden md:inline")},m(c,f){L(c,s,f),t(s,e),L(c,n,f),L(c,a,f),t(a,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("logs.detail.copyToClipboard")+"")&&v(u,i)},d(c){c&&(H(s),H(n),H(a))}}}function Im(l){let s,e=l[24]("logs.detail.copied")+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","text-success")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.copied")+"")&&v(n,e)},d(a){a&&H(s)}}}function Am(l){let s;return{c(){s=r("span"),s.textContent="No steps recorded",o(s,"class","text-sm opacity-40")},m(e,n){L(e,s,n)},p:ot,d(e){e&&H(s)}}}function Fm(l){let s,e,n=ut(l[0].processingSteps.slice(0,3)),a=[];for(let u=0;u<n.length;u+=1)a[u]=pd(dd(l,n,u));let i=l[0].processingSteps.length>3&&hd(l);return{c(){for(let u=0;u<a.length;u+=1)a[u].c();s=h(),i&&i.c(),e=Ul()},m(u,c){for(let f=0;f<a.length;f+=1)a[f]&&a[f].m(u,c);L(u,s,c),i&&i.m(u,c),L(u,e,c)},p(u,c){if(c[0]&67108865){n=ut(u[0].processingSteps.slice(0,3));let f;for(f=0;f<n.length;f+=1){const d=dd(u,n,f);a[f]?a[f].p(d,c):(a[f]=pd(d),a[f].c(),a[f].m(s.parentNode,s))}for(;f<a.length;f+=1)a[f].d(1);a.length=n.length}u[0].processingSteps.length>3?i?i.p(u,c):(i=hd(u),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},d(u){u&&(H(s),H(e)),Gt(a,u),i&&i.d(u)}}}function pd(l){let s,e=l[26](l[52].step)+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-sm badge-outline")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&1&&e!==(e=a[26](a[52].step)+"")&&v(n,e)},d(a){a&&H(s)}}}function hd(l){let s,e,n=l[0].processingSteps.length-3+"",a,i;return{c(){s=r("span"),e=_("+"),a=_(n),i=_(" more"),o(s,"class","badge badge-sm badge-ghost")},m(u,c){L(u,s,c),t(s,e),t(s,a),t(s,i)},p(u,c){c[0]&1&&n!==(n=u[0].processingSteps.length-3+"")&&v(a,n)},d(u){u&&H(s)}}}function md(l){let s,e,n,a,i,u=l[24]("logs.detail.processingTimeline")+"",c,f,d,p=l[24]("logs.detail.totalSteps",{values:{count:l[0].processingSteps.length}})+"",m,g,b=l[24]("logs.detail.totalDuration",{values:{duration:go(l[51].totalDuration)}})+"",k,w,C,E=(l[22]?l[24]("logs.detail.hideTimeline"):l[24]("logs.detail.showTimeline"))+"",y,T,M,R,j=l[22]&&gd(l);return{c(){s=r("div"),e=r("div"),n=r("div"),a=r("div"),i=r("h4"),c=_(u),f=h(),d=r("p"),m=_(p),g=_(\`\uFF0C
21260
+ \`),k=_(b),w=h(),C=r("button"),y=_(E),T=h(),j&&j.c(),o(i,"class","card-title text-base"),o(d,"class","text-xs opacity-60 mt-1"),o(C,"class","btn btn-sm btn-ghost"),o(n,"class","flex items-center justify-between mb-2"),o(e,"class","card-body p-4"),o(s,"class","card bg-base-200")},m(P,I){L(P,s,I),t(s,e),t(e,n),t(n,a),t(a,i),t(i,c),t(a,f),t(a,d),t(d,m),t(d,g),t(d,k),t(n,w),t(n,C),t(C,y),t(e,T),j&&j.m(e,null),M||(R=V(C,"click",l[31]),M=!0)},p(P,I){I[0]&16777216&&u!==(u=P[24]("logs.detail.processingTimeline")+"")&&v(c,u),I[0]&16777217&&p!==(p=P[24]("logs.detail.totalSteps",{values:{count:P[0].processingSteps.length}})+"")&&v(m,p),I[0]&16777216&&b!==(b=P[24]("logs.detail.totalDuration",{values:{duration:go(P[51].totalDuration)}})+"")&&v(k,b),I[0]&20971520&&E!==(E=(P[22]?P[24]("logs.detail.hideTimeline"):P[24]("logs.detail.showTimeline"))+"")&&v(y,E),P[22]?j?j.p(P,I):(j=gd(P),j.c(),j.m(e,null)):j&&(j.d(1),j=null)},d(P){P&&H(s),j&&j.d(),M=!1,R()}}}function gd(l){let s,e,n,a,i,u,c,f,d,p,m=ut(l[0].processingSteps),g=[];for(let b=0;b<m.length;b+=1)g[b]=Ed(fd(l,m,b));return{c(){s=r("div"),e=r("div"),n=r("span"),n.textContent="0ms",a=h(),i=r("div"),u=h(),c=r("span"),c.textContent=\`\${go(l[51].totalDuration)}\`,f=h();for(let b=0;b<g.length;b+=1)g[b].c();d=h(),p=r("div"),p.innerHTML='<div class="flex flex-wrap gap-4 text-xs"><div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-blue-500"></div> <span>Authentication</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-purple-500"></div> <span>Plugin</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-green-500"></div> <span>Upstream</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-orange-500"></div> <span>Transform</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-red-500"></div> <span>Error</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-yellow-500"></div> <span>Retry/Recovery</span></div></div>',o(i,"class","flex-1 border-t border-dashed border-base-content/20"),o(c,"class","mr-32"),o(e,"class","mb-4 flex items-center gap-2 text-xs opacity-50 px-64"),o(s,"class","mt-4"),o(p,"class","mt-6 pt-4 border-t border-base-300")},m(b,k){L(b,s,k),t(s,e),t(e,n),t(e,a),t(e,i),t(e,u),t(e,c),t(s,f);for(let w=0;w<g.length;w+=1)g[w]&&g[w].m(s,null);L(b,d,k),L(b,p,k)},p(b,k){if(k[0]&201326593){m=ut(b[0].processingSteps);let w;for(w=0;w<m.length;w+=1){const C=fd(b,m,w);g[w]?g[w].p(C,k):(g[w]=Ed(C),g[w].c(),g[w].m(s,null))}for(;w<g.length;w+=1)g[w].d(1);g.length=m.length}},d(b){b&&(H(s),H(d),H(p)),Gt(g,b)}}}function _d(l){let s;return{c(){s=r("div"),o(s,"class","w-px bg-base-content opacity-20 flex-1 min-h-[2.5rem]")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function bd(l){let s=l[52].detail.plugins&&Array.isArray(l[52].detail.plugins),e,n,a,i,u=s&&vd(l),c=l[52].detail.target&&wd(l),f=l[52].detail.level&&yd(l),d=l[52].detail.error&&Cd(l);return{c(){u&&u.c(),e=h(),c&&c.c(),n=h(),f&&f.c(),a=h(),d&&d.c(),i=Ul()},m(p,m){u&&u.m(p,m),L(p,e,m),c&&c.m(p,m),L(p,n,m),f&&f.m(p,m),L(p,a,m),d&&d.m(p,m),L(p,i,m)},p(p,m){m[0]&1&&(s=p[52].detail.plugins&&Array.isArray(p[52].detail.plugins)),s?u?u.p(p,m):(u=vd(p),u.c(),u.m(e.parentNode,e)):u&&(u.d(1),u=null),p[52].detail.target?c?c.p(p,m):(c=wd(p),c.c(),c.m(n.parentNode,n)):c&&(c.d(1),c=null),p[52].detail.level?f?f.p(p,m):(f=yd(p),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null),p[52].detail.error?d?d.p(p,m):(d=Cd(p),d.c(),d.m(i.parentNode,i)):d&&(d.d(1),d=null)},d(p){p&&(H(e),H(n),H(a),H(i)),u&&u.d(p),c&&c.d(p),f&&f.d(p),d&&d.d(p)}}}function vd(l){let s,e=ut(l[52].detail.plugins),n=[];for(let a=0;a<e.length;a+=1)n[a]=kd(cd(l,e,a));return{c(){for(let a=0;a<n.length;a+=1)n[a].c();s=Ul()},m(a,i){for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(a,i);L(a,s,i)},p(a,i){if(i[0]&1){e=ut(a[52].detail.plugins);let u;for(u=0;u<e.length;u+=1){const c=cd(a,e,u);n[u]?n[u].p(c,i):(n[u]=kd(c),n[u].c(),n[u].m(s.parentNode,s))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(a){a&&H(s),Gt(n,a)}}}function kd(l){let s,e=l[62]+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-xs badge-primary badge-outline")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&1&&e!==(e=a[62]+"")&&v(n,e)},d(a){a&&H(s)}}}function wd(l){let s,e=l[52].detail.target+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-xs badge-info badge-outline"),o(s,"title","Target upstream")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&1&&e!==(e=a[52].detail.target+"")&&v(n,e)},d(a){a&&H(s)}}}function yd(l){let s,e=l[52].detail.level+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-xs badge-warning badge-outline")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&1&&e!==(e=a[52].detail.level+"")&&v(n,e)},d(a){a&&H(s)}}}function Cd(l){let s,e,n;return{c(){s=r("span"),e=_("Error"),o(s,"class","badge badge-xs badge-error badge-outline"),o(s,"title",n=l[52].detail.error)},m(a,i){L(a,s,i),t(s,e)},p(a,i){i[0]&1&&n!==(n=a[52].detail.error)&&o(s,"title",n)},d(a){a&&H(s)}}}function zm(l){let s;return{c(){s=r("span"),s.textContent=\`\${l[59]}%\`,o(s,"class","text-xs text-white px-2 leading-7")},m(e,n){L(e,s,n)},p:ot,d(e){e&&H(s)}}}function Ed(l){let s,e,n,a,i,u,c,f,d,p=l[26](l[52].step)+"",m,g,b,k,w=l[57]+"",C,E,y,T,M,R,j,P,I,q,D,A,N,Z,Q,x,z=l[61]<l[0].processingSteps.length-1&&_d(),K=l[52].detail&&bd(l),S=l[55]>5&&zm(l);return{c(){s=r("div"),e=r("div"),n=r("div"),a=r("div"),u=h(),z&&z.c(),c=h(),f=r("div"),d=r("div"),m=_(p),g=h(),b=r("div"),k=r("span"),C=_(w),E=h(),K&&K.c(),y=h(),T=r("div"),M=r("div"),R=r("div"),S&&S.c(),I=h(),q=r("div"),D=r("div"),D.textContent=\`+\${l[54]}ms\`,A=h(),N=r("div"),N.textContent=\`\${go(l[53])}\`,Z=h(),Q=r("div"),Q.textContent=\`\${l[59]}%\`,x=h(),o(a,"class",i="w-3 h-3 rounded-full "+l[58]+" z-10"),o(n,"class","flex flex-col items-center"),o(d,"class","text-sm font-medium"),o(k,"class","badge badge-xs badge-ghost"),o(b,"class","text-xs opacity-50 mt-0.5 flex items-center gap-2 flex-wrap"),o(f,"class","flex-1 -mt-0.5"),o(e,"class","flex gap-3 shrink-0 w-64"),o(R,"class",j="absolute h-full "+l[58]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer"),e1(R,"left",l[56]+"%"),e1(R,"width",Math.max(l[55],1)+"%"),o(R,"title",P=l[52].step+": "+go(l[53])+" ("+l[59]+"%)"),o(M,"class","w-full h-7 relative bg-base-300/30 rounded overflow-hidden"),o(T,"class","flex-1 flex items-center"),o(D,"class","opacity-60"),o(N,"class","font-semibold"),o(Q,"class","opacity-40"),o(q,"class","shrink-0 w-32 text-xs space-y-0.5 font-mono"),o(s,"class","flex gap-4 group relative mb-3")},m(B,U){L(B,s,U),t(s,e),t(e,n),t(n,a),t(n,u),z&&z.m(n,null),t(e,c),t(e,f),t(f,d),t(d,m),t(f,g),t(f,b),t(b,k),t(k,C),t(b,E),K&&K.m(b,null),t(s,y),t(s,T),t(T,M),t(M,R),S&&S.m(R,null),t(s,I),t(s,q),t(q,D),t(q,A),t(q,N),t(q,Z),t(q,Q),t(s,x)},p(B,U){U[0]&1&&i!==(i="w-3 h-3 rounded-full "+B[58]+" z-10")&&o(a,"class",i),B[61]<B[0].processingSteps.length-1?z||(z=_d(),z.c(),z.m(n,null)):z&&(z.d(1),z=null),U[0]&1&&p!==(p=B[26](B[52].step)+"")&&v(m,p),U[0]&1&&w!==(w=B[57]+"")&&v(C,w),B[52].detail?K?K.p(B,U):(K=bd(B),K.c(),K.m(b,null)):K&&(K.d(1),K=null),B[55]>5&&S.p(B,U),U[0]&1&&j!==(j="absolute h-full "+B[58]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer")&&o(R,"class",j),U[0]&1&&P!==(P=B[52].step+": "+go(B[53])+" ("+B[59]+"%)")&&o(R,"title",P)},d(B){B&&H(s),z&&z.d(),K&&K.d(),S&&S.d()}}}function Om(l){let s,e,n=l[24]("logs.detail.path")+"",a,i,u,c=l[0].path+"",f;return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),u=r("div"),f=_(c),o(e,"class","text-xs opacity-60 mb-1"),o(u,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),t(s,u),t(u,f)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.path")+"")&&v(a,n),p[0]&1&&c!==(c=d[0].path+"")&&v(f,c)},d(d){d&&H(s)}}}function Nm(l){let s,e,n=l[24]("logs.detail.originalPath")+"",a,i,u,c=l[0].path+"",f,d,p,m,g=l[24]("logs.detail.transformedPath")+"",b,k,w,C=l[0].transformedPath+"",E;return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),u=r("div"),f=_(c),d=h(),p=r("div"),m=r("div"),b=_(g),k=h(),w=r("div"),E=_(C),o(e,"class","text-xs opacity-60 mb-1"),o(u,"class","font-mono text-sm bg-base-300 p-2 rounded break-all"),o(m,"class","text-xs opacity-60 mb-1"),o(w,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(y,T){L(y,s,T),t(s,e),t(e,a),t(s,i),t(s,u),t(u,f),L(y,d,T),L(y,p,T),t(p,m),t(m,b),t(p,k),t(p,w),t(w,E)},p(y,T){T[0]&16777216&&n!==(n=y[24]("logs.detail.originalPath")+"")&&v(a,n),T[0]&1&&c!==(c=y[0].path+"")&&v(f,c),T[0]&16777216&&g!==(g=y[24]("logs.detail.transformedPath")+"")&&v(b,g),T[0]&1&&C!==(C=y[0].transformedPath+"")&&v(E,C)},d(y){y&&(H(s),H(d),H(p))}}}function Td(l){let s,e,n=l[24]("logs.detail.query")+"",a,i,u,c=l[0].query+"",f;return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),u=r("div"),f=_(c),o(e,"class","text-xs opacity-60 mb-1"),o(u,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),t(s,u),t(u,f)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.query")+"")&&v(a,n),p[0]&1&&c!==(c=d[0].query+"")&&v(f,c)},d(d){d&&H(s)}}}function Sd(l){let s,e,n,a=l[24]("logs.detail.routePath")+"",i,u,c,f=l[0].routePath+"",d;return{c(){s=r("div"),e=r("div"),n=r("h4"),i=_(a),u=h(),c=r("div"),d=_(f),o(n,"class","card-title text-base mb-2"),o(c,"class","font-mono text-sm"),o(e,"class","card-body p-4"),o(s,"class","card bg-base-200")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,d)},p(p,m){m[0]&16777216&&a!==(a=p[24]("logs.detail.routePath")+"")&&v(i,a),m[0]&1&&f!==(f=p[0].routePath+"")&&v(d,f)},d(p){p&&H(s)}}}function Md(l){let s,e,n,a=l[24]("logs.detail.upstream")+"",i,u,c,f=l[0].upstream+"",d,p,m=l[0].transformer&&Rd(l);return{c(){s=r("div"),e=r("div"),n=r("h4"),i=_(a),u=h(),c=r("div"),d=_(f),p=h(),m&&m.c(),o(n,"class","card-title text-base mb-2"),o(c,"class","font-mono text-sm mb-2"),o(e,"class","card-body p-4"),o(s,"class","card bg-base-200")},m(g,b){L(g,s,b),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,d),t(e,p),m&&m.m(e,null)},p(g,b){b[0]&16777216&&a!==(a=g[24]("logs.detail.upstream")+"")&&v(i,a),b[0]&1&&f!==(f=g[0].upstream+"")&&v(d,f),g[0].transformer?m?m.p(g,b):(m=Rd(g),m.c(),m.m(e,null)):m&&(m.d(1),m=null)},d(g){g&&H(s),m&&m.d()}}}function Rd(l){let s,e=l[24]("logs.detail.transformer")+"",n,a,i=l[0].transformer+"",u;return{c(){s=r("div"),n=_(e),a=_(": "),u=_(i),o(s,"class","text-xs opacity-60")},m(c,f){L(c,s,f),t(s,n),t(s,a),t(s,u)},p(c,f){f[0]&16777216&&e!==(e=c[24]("logs.detail.transformer")+"")&&v(n,e),f[0]&1&&i!==(i=c[0].transformer+"")&&v(u,i)},d(c){c&&H(s)}}}function qd(l){let s,e,n,a,i,u,c=l[24]("logs.detail.errorInfo")+"",f,d,p,m=l[0].errorMessage+"",g;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("div"),u=r("div"),f=_(c),d=h(),p=r("div"),g=_(m),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(u,"class","font-bold"),o(p,"class","font-mono text-sm"),o(s,"class","alert alert-error")},m(b,k){L(b,s,k),t(s,e),t(e,n),t(s,a),t(s,i),t(i,u),t(u,f),t(i,d),t(i,p),t(p,g)},p(b,k){k[0]&16777216&&c!==(c=b[24]("logs.detail.errorInfo")+"")&&v(f,c),k[0]&1&&m!==(m=b[0].errorMessage+"")&&v(g,m)},d(b){b&&H(s)}}}function Hd(l){let s;function e(i,u){return i[0].originalReqHeaderId||i[0].originalReqBodyId?Vm:Um}let n=e(l),a=n(l);return{c(){s=r("div"),a.c(),o(s,"class","space-y-4")},m(i,u){L(i,s,u),a.m(s,null)},p(i,u){n===(n=e(i))&&a?a.p(i,u):(a.d(1),a=n(i),a&&(a.c(),a.m(s,null)))},d(i){i&&H(s),a.d()}}}function Um(l){let s,e=l[24]("logs.detail.noDataAvailable")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-center py-8 opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noDataAvailable")+"")&&v(n,e)},d(a){a&&H(s)}}}function Vm(l){let s,e,n=l[0].originalReqHeaderId&&Ld(l),a=l[8]&&l[0].originalReqBodyId&&jd(l);return{c(){n&&n.c(),s=h(),a&&a.c(),e=Ul()},m(i,u){n&&n.m(i,u),L(i,s,u),a&&a.m(i,u),L(i,e,u)},p(i,u){i[0].originalReqHeaderId?n?n.p(i,u):(n=Ld(i),n.c(),n.m(s.parentNode,s)):n&&(n.d(1),n=null),i[8]&&i[0].originalReqBodyId?a?a.p(i,u):(a=jd(i),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null)},d(i){i&&(H(s),H(e)),n&&n.d(i),a&&a.d(i)}}}function Ld(l){let s,e,n=l[24]("logs.detail.requestHeaders")+"",a,i;function u(d,p){return d[17]?Km:d[19]?Gm:d[15]!==null?Wm:Jm}let c=u(l),f=c(l);return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),f.m(s,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestHeaders")+"")&&v(a,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(s,null)))},d(d){d&&H(s),f.d()}}}function Jm(l){let s,e=l[24]("logs.detail.noHeaders")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-sm opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noHeaders")+"")&&v(n,e)},d(a){a&&H(s)}}}function Wm(l){let s,e,n,a,i,u=ut(Object.entries(l[15])),c=[];for(let f=0;f<u.length;f+=1)c[f]=Pd(ud(l,u,f));return{c(){s=r("div"),e=r("table"),n=r("thead"),n.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',a=h(),i=r("tbody");for(let f=0;f<c.length;f+=1)c[f].c();o(e,"class","table table-sm table-zebra"),o(s,"class","overflow-x-auto")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(e,a),t(e,i);for(let p=0;p<c.length;p+=1)c[p]&&c[p].m(i,null)},p(f,d){if(d[0]&32768){u=ut(Object.entries(f[15]));let p;for(p=0;p<u.length;p+=1){const m=ud(f,u,p);c[p]?c[p].p(m,d):(c[p]=Pd(m),c[p].c(),c[p].m(i,null))}for(;p<c.length;p+=1)c[p].d(1);c.length=u.length}},d(f){f&&H(s),Gt(c,f)}}}function Gm(l){let s,e,n;return{c(){s=r("div"),e=r("span"),n=_(l[19]),o(e,"class","text-sm"),o(s,"class","alert alert-error")},m(a,i){L(a,s,i),t(s,e),t(e,n)},p(a,i){i[0]&524288&&v(n,a[19])},d(a){a&&H(s)}}}function Km(l){let s,e,n,a,i=l[24]("common.loading")+"",u;return{c(){s=r("div"),e=r("span"),n=h(),a=r("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-2")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&v(u,i)},d(c){c&&H(s)}}}function Pd(l){let s,e,n=l[43]+"",a,i,u,c=l[44]+"",f,d;return{c(){s=r("tr"),e=r("td"),a=_(n),i=h(),u=r("td"),f=_(c),d=h(),o(e,"class","font-mono text-xs"),o(u,"class","font-mono text-xs break-all")},m(p,m){L(p,s,m),t(s,e),t(e,a),t(s,i),t(s,u),t(u,f),t(s,d)},p(p,m){m[0]&32768&&n!==(n=p[43]+"")&&v(a,n),m[0]&32768&&c!==(c=p[44]+"")&&v(f,c)},d(p){p&&H(s)}}}function jd(l){let s,e,n=l[24]("logs.detail.requestBody")+"",a,i;function u(d,p){return d[18]?Xm:d[20]?Zm:d[16]!==null?Qm:Ym}let c=u(l),f=c(l);return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),f.m(s,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestBody")+"")&&v(a,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(s,null)))},d(d){d&&H(s),f.d()}}}function Ym(l){let s,e=l[24]("logs.detail.noBody")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-sm opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noBody")+"")&&v(n,e)},d(a){a&&H(s)}}}function Qm(l){let s,e=Qn(l[16])+"",n;return{c(){s=r("pre"),n=_(e),o(s,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&65536&&e!==(e=Qn(a[16])+"")&&v(n,e)},d(a){a&&H(s)}}}function Zm(l){let s,e,n;return{c(){s=r("div"),e=r("span"),n=_(l[20]),o(e,"class","text-sm"),o(s,"class","alert alert-error")},m(a,i){L(a,s,i),t(s,e),t(e,n)},p(a,i){i[0]&1048576&&v(n,a[20])},d(a){a&&H(s)}}}function Xm(l){let s,e,n,a,i=l[24]("common.loading")+"",u;return{c(){s=r("div"),e=r("span"),n=h(),a=r("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-2")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&v(u,i)},d(c){c&&H(s)}}}function Dd(l){let s;function e(i,u){return i[0].reqHeaderId||i[0].reqBodyId?$m:xm}let n=e(l),a=n(l);return{c(){s=r("div"),a.c(),o(s,"class","space-y-4")},m(i,u){L(i,s,u),a.m(s,null)},p(i,u){n===(n=e(i))&&a?a.p(i,u):(a.d(1),a=n(i),a&&(a.c(),a.m(s,null)))},d(i){i&&H(s),a.d()}}}function xm(l){let s,e=l[24]("logs.detail.noDataAvailable")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-center py-8 opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noDataAvailable")+"")&&v(n,e)},d(a){a&&H(s)}}}function $m(l){let s,e,n=l[0].reqHeaderId&&Bd(l),a=l[8]&&l[0].reqBodyId&&Ad(l);return{c(){n&&n.c(),s=h(),a&&a.c(),e=Ul()},m(i,u){n&&n.m(i,u),L(i,s,u),a&&a.m(i,u),L(i,e,u)},p(i,u){i[0].reqHeaderId?n?n.p(i,u):(n=Bd(i),n.c(),n.m(s.parentNode,s)):n&&(n.d(1),n=null),i[8]&&i[0].reqBodyId?a?a.p(i,u):(a=Ad(i),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null)},d(i){i&&(H(s),H(e)),n&&n.d(i),a&&a.d(i)}}}function Bd(l){let s,e,n=l[24]("logs.detail.requestHeaders")+"",a,i;function u(d,p){return d[11]?sg:d[13]?lg:d[9]!==null?tg:eg}let c=u(l),f=c(l);return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),f.m(s,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestHeaders")+"")&&v(a,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(s,null)))},d(d){d&&H(s),f.d()}}}function eg(l){let s,e=l[24]("logs.detail.noHeaders")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-sm opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noHeaders")+"")&&v(n,e)},d(a){a&&H(s)}}}function tg(l){let s,e,n,a,i,u=ut(Object.entries(l[9])),c=[];for(let f=0;f<u.length;f+=1)c[f]=Id(id(l,u,f));return{c(){s=r("div"),e=r("table"),n=r("thead"),n.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',a=h(),i=r("tbody");for(let f=0;f<c.length;f+=1)c[f].c();o(e,"class","table table-sm table-zebra"),o(s,"class","overflow-x-auto")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(e,a),t(e,i);for(let p=0;p<c.length;p+=1)c[p]&&c[p].m(i,null)},p(f,d){if(d[0]&512){u=ut(Object.entries(f[9]));let p;for(p=0;p<u.length;p+=1){const m=id(f,u,p);c[p]?c[p].p(m,d):(c[p]=Id(m),c[p].c(),c[p].m(i,null))}for(;p<c.length;p+=1)c[p].d(1);c.length=u.length}},d(f){f&&H(s),Gt(c,f)}}}function lg(l){let s,e,n;return{c(){s=r("div"),e=r("span"),n=_(l[13]),o(e,"class","text-sm"),o(s,"class","alert alert-error")},m(a,i){L(a,s,i),t(s,e),t(e,n)},p(a,i){i[0]&8192&&v(n,a[13])},d(a){a&&H(s)}}}function sg(l){let s,e,n,a,i=l[24]("common.loading")+"",u;return{c(){s=r("div"),e=r("span"),n=h(),a=r("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-2")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&v(u,i)},d(c){c&&H(s)}}}function Id(l){let s,e,n=l[43]+"",a,i,u,c=l[44]+"",f,d;return{c(){s=r("tr"),e=r("td"),a=_(n),i=h(),u=r("td"),f=_(c),d=h(),o(e,"class","font-mono text-xs"),o(u,"class","font-mono text-xs break-all")},m(p,m){L(p,s,m),t(s,e),t(e,a),t(s,i),t(s,u),t(u,f),t(s,d)},p(p,m){m[0]&512&&n!==(n=p[43]+"")&&v(a,n),m[0]&512&&c!==(c=p[44]+"")&&v(f,c)},d(p){p&&H(s)}}}function Ad(l){let s,e,n=l[24]("logs.detail.requestBody")+"",a,i;function u(d,p){return d[4]?rg:d[6]?ag:d[2]!==null?ng:og}let c=u(l),f=c(l);return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),f.m(s,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestBody")+"")&&v(a,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(s,null)))},d(d){d&&H(s),f.d()}}}function og(l){let s,e=l[24]("logs.detail.noBody")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-sm opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noBody")+"")&&v(n,e)},d(a){a&&H(s)}}}function ng(l){let s,e=Qn(l[2])+"",n;return{c(){s=r("pre"),n=_(e),o(s,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&4&&e!==(e=Qn(a[2])+"")&&v(n,e)},d(a){a&&H(s)}}}function ag(l){let s,e,n;return{c(){s=r("div"),e=r("span"),n=_(l[6]),o(e,"class","text-sm"),o(s,"class","alert alert-error")},m(a,i){L(a,s,i),t(s,e),t(e,n)},p(a,i){i[0]&64&&v(n,a[6])},d(a){a&&H(s)}}}function rg(l){let s,e,n,a,i=l[24]("common.loading")+"",u;return{c(){s=r("div"),e=r("span"),n=h(),a=r("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-2")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&v(u,i)},d(c){c&&H(s)}}}function Fd(l){let s;function e(i,u){return i[0].respHeaderId||i[0].respBodyId?ug:ig}let n=e(l),a=n(l);return{c(){s=r("div"),a.c(),o(s,"class","space-y-4")},m(i,u){L(i,s,u),a.m(s,null)},p(i,u){n===(n=e(i))&&a?a.p(i,u):(a.d(1),a=n(i),a&&(a.c(),a.m(s,null)))},d(i){i&&H(s),a.d()}}}function ig(l){let s,e=l[24]("logs.detail.noDataAvailable")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-center py-8 opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noDataAvailable")+"")&&v(n,e)},d(a){a&&H(s)}}}function ug(l){let s,e,n=l[0].respHeaderId&&zd(l),a=l[8]&&l[0].respBodyId&&Nd(l);return{c(){n&&n.c(),s=h(),a&&a.c(),e=Ul()},m(i,u){n&&n.m(i,u),L(i,s,u),a&&a.m(i,u),L(i,e,u)},p(i,u){i[0].respHeaderId?n?n.p(i,u):(n=zd(i),n.c(),n.m(s.parentNode,s)):n&&(n.d(1),n=null),i[8]&&i[0].respBodyId?a?a.p(i,u):(a=Nd(i),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null)},d(i){i&&(H(s),H(e)),n&&n.d(i),a&&a.d(i)}}}function zd(l){let s,e,n=l[24]("logs.detail.responseHeaders")+"",a,i;function u(d,p){return d[12]?pg:d[14]?dg:d[10]!==null?cg:fg}let c=u(l),f=c(l);return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),f.m(s,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.responseHeaders")+"")&&v(a,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(s,null)))},d(d){d&&H(s),f.d()}}}function fg(l){let s,e=l[24]("logs.detail.noHeaders")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-sm opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noHeaders")+"")&&v(n,e)},d(a){a&&H(s)}}}function cg(l){let s,e,n,a,i,u=ut(Object.entries(l[10])),c=[];for(let f=0;f<u.length;f+=1)c[f]=Od(rd(l,u,f));return{c(){s=r("div"),e=r("table"),n=r("thead"),n.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',a=h(),i=r("tbody");for(let f=0;f<c.length;f+=1)c[f].c();o(e,"class","table table-sm table-zebra"),o(s,"class","overflow-x-auto")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(e,a),t(e,i);for(let p=0;p<c.length;p+=1)c[p]&&c[p].m(i,null)},p(f,d){if(d[0]&1024){u=ut(Object.entries(f[10]));let p;for(p=0;p<u.length;p+=1){const m=rd(f,u,p);c[p]?c[p].p(m,d):(c[p]=Od(m),c[p].c(),c[p].m(i,null))}for(;p<c.length;p+=1)c[p].d(1);c.length=u.length}},d(f){f&&H(s),Gt(c,f)}}}function dg(l){let s,e,n;return{c(){s=r("div"),e=r("span"),n=_(l[14]),o(e,"class","text-sm"),o(s,"class","alert alert-error")},m(a,i){L(a,s,i),t(s,e),t(e,n)},p(a,i){i[0]&16384&&v(n,a[14])},d(a){a&&H(s)}}}function pg(l){let s,e,n,a,i=l[24]("common.loading")+"",u;return{c(){s=r("div"),e=r("span"),n=h(),a=r("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-2")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&v(u,i)},d(c){c&&H(s)}}}function Od(l){let s,e,n=l[43]+"",a,i,u,c=l[44]+"",f,d;return{c(){s=r("tr"),e=r("td"),a=_(n),i=h(),u=r("td"),f=_(c),d=h(),o(e,"class","font-mono text-xs"),o(u,"class","font-mono text-xs break-all")},m(p,m){L(p,s,m),t(s,e),t(e,a),t(s,i),t(s,u),t(u,f),t(s,d)},p(p,m){m[0]&1024&&n!==(n=p[43]+"")&&v(a,n),m[0]&1024&&c!==(c=p[44]+"")&&v(f,c)},d(p){p&&H(s)}}}function Nd(l){let s,e,n=l[24]("logs.detail.responseBody")+"",a,i;function u(d,p){return d[5]?_g:d[7]?gg:d[3]!==null?mg:hg}let c=u(l),f=c(l);return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),f.m(s,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.responseBody")+"")&&v(a,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(s,null)))},d(d){d&&H(s),f.d()}}}function hg(l){let s,e=l[24]("logs.detail.noBody")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-sm opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noBody")+"")&&v(n,e)},d(a){a&&H(s)}}}function mg(l){let s,e=Qn(l[3])+"",n;return{c(){s=r("pre"),n=_(e),o(s,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&8&&e!==(e=Qn(a[3])+"")&&v(n,e)},d(a){a&&H(s)}}}function gg(l){let s,e,n;return{c(){s=r("div"),e=r("span"),n=_(l[7]),o(e,"class","text-sm"),o(s,"class","alert alert-error")},m(a,i){L(a,s,i),t(s,e),t(e,n)},p(a,i){i[0]&128&&v(n,a[7])},d(a){a&&H(s)}}}function _g(l){let s,e,n,a,i=l[24]("common.loading")+"",u;return{c(){s=r("div"),e=r("span"),n=h(),a=r("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-2")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&v(u,i)},d(c){c&&H(s)}}}function Ud(l){let s,e,n,a=l[24]("logs.detail.authInfo")+"",i,u,c,f,d,p=l[24]("logs.detail.authLevel")+"",m,g,b,k=l[0].authLevel+"",w,C,E,y,T=l[24]("logs.detail.authResult")+"",M,R,j,P=(l[0].authSuccess?l[24]("logs.detail.authSuccess"):l[24]("logs.detail.authFailed"))+"",I,q;return{c(){s=r("div"),e=r("div"),n=r("h4"),i=_(a),u=h(),c=r("div"),f=r("div"),d=r("div"),m=_(p),g=h(),b=r("div"),w=_(k),C=h(),E=r("div"),y=r("div"),M=_(T),R=h(),j=r("span"),I=_(P),o(n,"class","card-title text-base mb-2"),o(d,"class","text-xs opacity-60 mb-1"),o(b,"class","text-sm"),o(y,"class","text-xs opacity-60 mb-1"),o(j,"class",q="badge "+(l[0].authSuccess?"badge-success":"badge-error")),o(c,"class","grid grid-cols-2 gap-4"),o(e,"class","card-body p-4"),o(s,"class","card bg-base-200")},m(D,A){L(D,s,A),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,f),t(f,d),t(d,m),t(f,g),t(f,b),t(b,w),t(c,C),t(c,E),t(E,y),t(y,M),t(E,R),t(E,j),t(j,I)},p(D,A){A[0]&16777216&&a!==(a=D[24]("logs.detail.authInfo")+"")&&v(i,a),A[0]&16777216&&p!==(p=D[24]("logs.detail.authLevel")+"")&&v(m,p),A[0]&1&&k!==(k=D[0].authLevel+"")&&v(w,k),A[0]&16777216&&T!==(T=D[24]("logs.detail.authResult")+"")&&v(M,T),A[0]&16777217&&P!==(P=(D[0].authSuccess?D[24]("logs.detail.authSuccess"):D[24]("logs.detail.authFailed"))+"")&&v(I,P),A[0]&1&&q!==(q="badge "+(D[0].authSuccess?"badge-success":"badge-error"))&&o(j,"class",q)},d(D){D&&H(s)}}}function bg(l){let s,e,n,a,i=l[24]("logs.detail.title")+"",u,c,f,d,p,m,g,b,k,w,C,E=l[24]("logs.detail.downloadJson")+"",y,T,M,R,j,P,I,q,D,A=l[24]("logs.detail.overview")+"",N,Z,Q,x,z,K=l[24]("logs.detail.status")+"",S,B,U,F=l[0].status+"",J,ie,ue,ne,$,te=l[24]("logs.detail.method")+"",ae,ee,G,pe=l[0].method+"",oe,ge,he,ye,ze=l[24]("logs.requestType")+"",Pe,we,Fe,Je=l[25](l[0].requestType)+"",je,Le,Se,fe,_e,Ie,De=l[24]("logs.detail.duration")+"",se,ke,me,Ee=go(l[0].duration)+"",Ve,Be,nt,Ne,Qe=l[24]("logs.detail.timestamp")+"",Ye,ve,de,Te=Vd(l[0].timestamp)+"",Ze,Me,Ue,Ce,mt=l[24]("logs.detail.requestId")+"",Ge,ce,qe,Re=l[0].requestId+"",dt,We,O,He,X=l[24]("logs.detail.processingSteps")+"",ft,Ht,Ke,_t,tt,it,Oe,Xe,It=l[24]("logs.detail.requestInfo")+"",rt,gt,wt,pt,bl,at,St,ht,Tt,vl,At,hl,ml,ql,Jt,Yl,Yt,Qt=l[24]("logs.detail.tabOriginalRequest")+"",Hl,Bl,gl,sl,Ql,Ft,Ll=l[24]("logs.detail.tabFinalRequest")+"",Vl,Jl,Cl,zt,Zl,Lt,Pl=l[24]("logs.detail.tabResponse")+"",jl,$l,xt,kl,es,zl,Il,Wl,Ls;function ol(Xt,$e){return Xt[23]?Im:Bm}let wl=ol(l),nl=wl(l);function Ol(Xt,$e){return Xt[0].processingSteps&&Xt[0].processingSteps.length>0?Fm:Am}let al=Ol(l),_l=al(l),tl=l[0].processingSteps&&l[0].processingSteps.length>0&&md(Su(l));function Dl(Xt,$e){return Xt[0].transformedPath&&Xt[0].transformedPath!==Xt[0].path?Nm:Om}let Nl=Dl(l),El=Nl(l),Wt=l[0].query&&Td(l),Bt=l[0].routePath&&Sd(l),Pt=l[0].upstream&&Md(l),$t=l[0].errorMessage&&qd(l),el=l[21]==="original"&&Hd(l),Kt=l[21]==="transformed"&&Dd(l),Zt=l[21]==="response"&&Fd(l),rl=l[0].authLevel&&Ud(l);return Il=Mu(l[33][0]),{c(){s=r("div"),e=r("div"),n=r("div"),a=r("h3"),u=_(i),c=h(),f=r("div"),d=r("button"),nl.c(),m=h(),g=r("button"),b=re("svg"),k=re("path"),w=h(),C=r("span"),y=_(E),M=h(),R=r("button"),R.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',j=h(),P=r("div"),I=r("div"),q=r("div"),D=r("h4"),N=_(A),Z=h(),Q=r("div"),x=r("div"),z=r("div"),S=_(K),B=h(),U=r("span"),J=_(F),ue=h(),ne=r("div"),$=r("div"),ae=_(te),ee=h(),G=r("span"),oe=_(pe),ge=h(),he=r("div"),ye=r("div"),Pe=_(ze),we=h(),Fe=r("span"),je=_(Je),fe=h(),_e=r("div"),Ie=r("div"),se=_(De),ke=h(),me=r("div"),Ve=_(Ee),Be=h(),nt=r("div"),Ne=r("div"),Ye=_(Qe),ve=h(),de=r("div"),Ze=_(Te),Me=h(),Ue=r("div"),Ce=r("div"),Ge=_(mt),ce=h(),qe=r("div"),dt=_(Re),We=h(),O=r("div"),He=r("div"),ft=_(X),Ht=h(),Ke=r("div"),_l.c(),_t=h(),tl&&tl.c(),tt=h(),it=r("div"),Oe=r("div"),Xe=r("h4"),rt=_(It),gt=h(),wt=r("div"),El.c(),pt=h(),Wt&&Wt.c(),bl=h(),at=r("div"),Bt&&Bt.c(),St=h(),Pt&&Pt.c(),ht=h(),$t&&$t.c(),Tt=h(),vl=r("div"),At=r("div"),hl=r("div"),ml=r("div"),ql=r("label"),Jt=r("input"),Yl=h(),Yt=r("span"),Hl=_(Qt),Bl=h(),gl=r("label"),sl=r("input"),Ql=h(),Ft=r("span"),Vl=_(Ll),Jl=h(),Cl=r("label"),zt=r("input"),Zl=h(),Lt=r("span"),jl=_(Pl),$l=h(),xt=r("div"),el&&el.c(),kl=h(),Kt&&Kt.c(),es=h(),Zt&&Zt.c(),zl=h(),rl&&rl.c(),o(a,"id","modal-title"),o(a,"class","font-bold text-xl"),o(d,"class","btn btn-sm btn-ghost"),o(d,"title",p=l[24]("logs.detail.copyToClipboard")),o(k,"stroke-linecap","round"),o(k,"stroke-linejoin","round"),o(k,"stroke-width","2"),o(k,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(b,"xmlns","http://www.w3.org/2000/svg"),o(b,"class","h-4 w-4"),o(b,"fill","none"),o(b,"viewBox","0 0 24 24"),o(b,"stroke","currentColor"),o(C,"class","hidden md:inline"),o(g,"class","btn btn-sm btn-ghost"),o(g,"title",T=l[24]("logs.detail.downloadJson")),o(R,"class","btn btn-sm btn-circle btn-ghost"),o(f,"class","flex items-center gap-2"),o(n,"class","flex items-center justify-between px-6 py-4 border-b border-base-300"),o(D,"class","card-title text-base mb-3"),o(z,"class","text-xs opacity-60 mb-1"),o(U,"class",ie="badge "+Jd(l[0].status)+" badge-lg"),o($,"class","text-xs opacity-60 mb-1"),o(G,"class","badge badge-lg"),o(ye,"class","text-xs opacity-60 mb-1"),o(Fe,"class",Le="badge "+Wd(l[0].requestType)+" badge-lg"),o(Fe,"title",Se=l[24](\`logs.requestType_\${l[0].requestType}_desc\`)),o(Ie,"class","text-xs opacity-60 mb-1"),o(me,"class","font-semibold"),o(Ne,"class","text-xs opacity-60 mb-1"),o(de,"class","text-sm"),o(Ce,"class","text-xs opacity-60 mb-1"),o(qe,"class","font-mono text-xs break-all"),o(Ue,"class","col-span-2"),o(He,"class","text-xs opacity-60 mb-1"),o(Ke,"class","flex gap-2 flex-wrap"),o(O,"class","col-span-2 md:col-span-3 lg:col-span-6"),o(Q,"class","grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4"),o(q,"class","card-body p-4"),o(I,"class","card bg-base-200"),o(Xe,"class","card-title text-base mb-3"),o(wt,"class","space-y-2"),o(Oe,"class","card-body p-4"),o(it,"class","card bg-base-200"),o(at,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),o(Jt,"class","sr-only"),o(Jt,"type","radio"),o(Jt,"name","activeTab"),Jt.__value="original",Y(Jt,Jt.__value),o(Yt,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(Yt,"bg-primary",l[21]==="original"),le(Yt,"text-primary-content",l[21]==="original"),le(Yt,"shadow",l[21]==="original"),le(Yt,"text-gray-700",l[21]!=="original"),le(Yt,"dark:text-gray-300",l[21]!=="original"),le(Yt,"hover:text-gray-900",l[21]!=="original"),le(Yt,"dark:hover:text-gray-100",l[21]!=="original"),o(ql,"class","cursor-pointer"),o(sl,"class","sr-only"),o(sl,"type","radio"),o(sl,"name","activeTab"),sl.__value="transformed",Y(sl,sl.__value),o(Ft,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(Ft,"bg-primary",l[21]==="transformed"),le(Ft,"text-primary-content",l[21]==="transformed"),le(Ft,"shadow",l[21]==="transformed"),le(Ft,"text-gray-700",l[21]!=="transformed"),le(Ft,"dark:text-gray-300",l[21]!=="transformed"),le(Ft,"hover:text-gray-900",l[21]!=="transformed"),le(Ft,"dark:hover:text-gray-100",l[21]!=="transformed"),o(gl,"class","cursor-pointer"),o(zt,"class","sr-only"),o(zt,"type","radio"),o(zt,"name","activeTab"),zt.__value="response",Y(zt,zt.__value),o(Lt,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(Lt,"bg-primary",l[21]==="response"),le(Lt,"text-primary-content",l[21]==="response"),le(Lt,"shadow",l[21]==="response"),le(Lt,"text-gray-700",l[21]!=="response"),le(Lt,"dark:text-gray-300",l[21]!=="response"),le(Lt,"hover:text-gray-900",l[21]!=="response"),le(Lt,"dark:hover:text-gray-100",l[21]!=="response"),o(Cl,"class","cursor-pointer"),o(ml,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm"),o(hl,"class","p-2 border-b border-base-300 flex justify-center"),o(xt,"class","p-4"),o(At,"class","card-body p-0"),o(vl,"class","card bg-base-200"),o(P,"class","flex-1 overflow-y-auto px-6 py-4 space-y-6"),o(e,"class","modal-box max-w-6xl h-[90vh] flex flex-col p-0"),o(e,"role","dialog"),o(e,"aria-labelledby","modal-title"),o(e,"aria-modal","true"),o(s,"class","modal modal-open"),o(s,"role","presentation"),Il.p(Jt,sl,zt)},m(Xt,$e){L(Xt,s,$e),t(s,e),t(e,n),t(n,a),t(a,u),t(n,c),t(n,f),t(f,d),nl.m(d,null),t(f,m),t(f,g),t(g,b),t(b,k),t(g,w),t(g,C),t(C,y),t(f,M),t(f,R),t(e,j),t(e,P),t(P,I),t(I,q),t(q,D),t(D,N),t(q,Z),t(q,Q),t(Q,x),t(x,z),t(z,S),t(x,B),t(x,U),t(U,J),t(Q,ue),t(Q,ne),t(ne,$),t($,ae),t(ne,ee),t(ne,G),t(G,oe),t(Q,ge),t(Q,he),t(he,ye),t(ye,Pe),t(he,we),t(he,Fe),t(Fe,je),t(Q,fe),t(Q,_e),t(_e,Ie),t(Ie,se),t(_e,ke),t(_e,me),t(me,Ve),t(Q,Be),t(Q,nt),t(nt,Ne),t(Ne,Ye),t(nt,ve),t(nt,de),t(de,Ze),t(Q,Me),t(Q,Ue),t(Ue,Ce),t(Ce,Ge),t(Ue,ce),t(Ue,qe),t(qe,dt),t(Q,We),t(Q,O),t(O,He),t(He,ft),t(O,Ht),t(O,Ke),_l.m(Ke,null),t(P,_t),tl&&tl.m(P,null),t(P,tt),t(P,it),t(it,Oe),t(Oe,Xe),t(Xe,rt),t(Oe,gt),t(Oe,wt),El.m(wt,null),t(wt,pt),Wt&&Wt.m(wt,null),t(P,bl),t(P,at),Bt&&Bt.m(at,null),t(at,St),Pt&&Pt.m(at,null),t(P,ht),$t&&$t.m(P,null),t(P,Tt),t(P,vl),t(vl,At),t(At,hl),t(hl,ml),t(ml,ql),t(ql,Jt),Jt.checked=Jt.__value===l[21],t(ql,Yl),t(ql,Yt),t(Yt,Hl),t(ml,Bl),t(ml,gl),t(gl,sl),sl.checked=sl.__value===l[21],t(gl,Ql),t(gl,Ft),t(Ft,Vl),t(ml,Jl),t(ml,Cl),t(Cl,zt),zt.checked=zt.__value===l[21],t(Cl,Zl),t(Cl,Lt),t(Lt,jl),t(At,$l),t(At,xt),el&&el.m(xt,null),t(xt,kl),Kt&&Kt.m(xt,null),t(xt,es),Zt&&Zt.m(xt,null),t(P,zl),rl&&rl.m(P,null),Wl||(Ls=[V(d,"click",l[29]),V(g,"click",l[30]),V(R,"click",function(){sa(l[1])&&l[1].apply(this,arguments)}),V(Jt,"change",l[32]),V(sl,"change",l[34]),V(zt,"change",l[35]),V(s,"click",l[28]),V(s,"keydown",l[36])],Wl=!0)},p(Xt,$e){l=Xt,$e[0]&16777216&&i!==(i=l[24]("logs.detail.title")+"")&&v(u,i),wl===(wl=ol(l))&&nl?nl.p(l,$e):(nl.d(1),nl=wl(l),nl&&(nl.c(),nl.m(d,null))),$e[0]&16777216&&p!==(p=l[24]("logs.detail.copyToClipboard"))&&o(d,"title",p),$e[0]&16777216&&E!==(E=l[24]("logs.detail.downloadJson")+"")&&v(y,E),$e[0]&16777216&&T!==(T=l[24]("logs.detail.downloadJson"))&&o(g,"title",T),$e[0]&16777216&&A!==(A=l[24]("logs.detail.overview")+"")&&v(N,A),$e[0]&16777216&&K!==(K=l[24]("logs.detail.status")+"")&&v(S,K),$e[0]&1&&F!==(F=l[0].status+"")&&v(J,F),$e[0]&1&&ie!==(ie="badge "+Jd(l[0].status)+" badge-lg")&&o(U,"class",ie),$e[0]&16777216&&te!==(te=l[24]("logs.detail.method")+"")&&v(ae,te),$e[0]&1&&pe!==(pe=l[0].method+"")&&v(oe,pe),$e[0]&16777216&&ze!==(ze=l[24]("logs.requestType")+"")&&v(Pe,ze),$e[0]&1&&Je!==(Je=l[25](l[0].requestType)+"")&&v(je,Je),$e[0]&1&&Le!==(Le="badge "+Wd(l[0].requestType)+" badge-lg")&&o(Fe,"class",Le),$e[0]&16777217&&Se!==(Se=l[24](\`logs.requestType_\${l[0].requestType}_desc\`))&&o(Fe,"title",Se),$e[0]&16777216&&De!==(De=l[24]("logs.detail.duration")+"")&&v(se,De),$e[0]&1&&Ee!==(Ee=go(l[0].duration)+"")&&v(Ve,Ee),$e[0]&16777216&&Qe!==(Qe=l[24]("logs.detail.timestamp")+"")&&v(Ye,Qe),$e[0]&1&&Te!==(Te=Vd(l[0].timestamp)+"")&&v(Ze,Te),$e[0]&16777216&&mt!==(mt=l[24]("logs.detail.requestId")+"")&&v(Ge,mt),$e[0]&1&&Re!==(Re=l[0].requestId+"")&&v(dt,Re),$e[0]&16777216&&X!==(X=l[24]("logs.detail.processingSteps")+"")&&v(ft,X),al===(al=Ol(l))&&_l?_l.p(l,$e):(_l.d(1),_l=al(l),_l&&(_l.c(),_l.m(Ke,null))),l[0].processingSteps&&l[0].processingSteps.length>0?tl?tl.p(Su(l),$e):(tl=md(Su(l)),tl.c(),tl.m(P,tt)):tl&&(tl.d(1),tl=null),$e[0]&16777216&&It!==(It=l[24]("logs.detail.requestInfo")+"")&&v(rt,It),Nl===(Nl=Dl(l))&&El?El.p(l,$e):(El.d(1),El=Nl(l),El&&(El.c(),El.m(wt,pt))),l[0].query?Wt?Wt.p(l,$e):(Wt=Td(l),Wt.c(),Wt.m(wt,null)):Wt&&(Wt.d(1),Wt=null),l[0].routePath?Bt?Bt.p(l,$e):(Bt=Sd(l),Bt.c(),Bt.m(at,St)):Bt&&(Bt.d(1),Bt=null),l[0].upstream?Pt?Pt.p(l,$e):(Pt=Md(l),Pt.c(),Pt.m(at,null)):Pt&&(Pt.d(1),Pt=null),l[0].errorMessage?$t?$t.p(l,$e):($t=qd(l),$t.c(),$t.m(P,Tt)):$t&&($t.d(1),$t=null),$e[0]&2097152&&(Jt.checked=Jt.__value===l[21]),$e[0]&16777216&&Qt!==(Qt=l[24]("logs.detail.tabOriginalRequest")+"")&&v(Hl,Qt),$e[0]&2097152&&le(Yt,"bg-primary",l[21]==="original"),$e[0]&2097152&&le(Yt,"text-primary-content",l[21]==="original"),$e[0]&2097152&&le(Yt,"shadow",l[21]==="original"),$e[0]&2097152&&le(Yt,"text-gray-700",l[21]!=="original"),$e[0]&2097152&&le(Yt,"dark:text-gray-300",l[21]!=="original"),$e[0]&2097152&&le(Yt,"hover:text-gray-900",l[21]!=="original"),$e[0]&2097152&&le(Yt,"dark:hover:text-gray-100",l[21]!=="original"),$e[0]&2097152&&(sl.checked=sl.__value===l[21]),$e[0]&16777216&&Ll!==(Ll=l[24]("logs.detail.tabFinalRequest")+"")&&v(Vl,Ll),$e[0]&2097152&&le(Ft,"bg-primary",l[21]==="transformed"),$e[0]&2097152&&le(Ft,"text-primary-content",l[21]==="transformed"),$e[0]&2097152&&le(Ft,"shadow",l[21]==="transformed"),$e[0]&2097152&&le(Ft,"text-gray-700",l[21]!=="transformed"),$e[0]&2097152&&le(Ft,"dark:text-gray-300",l[21]!=="transformed"),$e[0]&2097152&&le(Ft,"hover:text-gray-900",l[21]!=="transformed"),$e[0]&2097152&&le(Ft,"dark:hover:text-gray-100",l[21]!=="transformed"),$e[0]&2097152&&(zt.checked=zt.__value===l[21]),$e[0]&16777216&&Pl!==(Pl=l[24]("logs.detail.tabResponse")+"")&&v(jl,Pl),$e[0]&2097152&&le(Lt,"bg-primary",l[21]==="response"),$e[0]&2097152&&le(Lt,"text-primary-content",l[21]==="response"),$e[0]&2097152&&le(Lt,"shadow",l[21]==="response"),$e[0]&2097152&&le(Lt,"text-gray-700",l[21]!=="response"),$e[0]&2097152&&le(Lt,"dark:text-gray-300",l[21]!=="response"),$e[0]&2097152&&le(Lt,"hover:text-gray-900",l[21]!=="response"),$e[0]&2097152&&le(Lt,"dark:hover:text-gray-100",l[21]!=="response"),l[21]==="original"?el?el.p(l,$e):(el=Hd(l),el.c(),el.m(xt,kl)):el&&(el.d(1),el=null),l[21]==="transformed"?Kt?Kt.p(l,$e):(Kt=Dd(l),Kt.c(),Kt.m(xt,es)):Kt&&(Kt.d(1),Kt=null),l[21]==="response"?Zt?Zt.p(l,$e):(Zt=Fd(l),Zt.c(),Zt.m(xt,null)):Zt&&(Zt.d(1),Zt=null),l[0].authLevel?rl?rl.p(l,$e):(rl=Ud(l),rl.c(),rl.m(P,null)):rl&&(rl.d(1),rl=null)},i:ot,o:ot,d(Xt){Xt&&H(s),nl.d(),_l.d(),tl&&tl.d(),El.d(),Wt&&Wt.d(),Bt&&Bt.d(),Pt&&Pt.d(),$t&&$t.d(),el&&el.d(),Kt&&Kt.d(),Zt&&Zt.d(),rl&&rl.d(),Il.r(),Wl=!1,vt(Ls)}}}function Vd(l){return new Date(l).toLocaleString()}function go(l){return l<1e3?\`\${l}ms\`:\`\${(l/1e3).toFixed(2)}s\`}function Jd(l){return l<300?"badge-success":l<400?"badge-info":l<500?"badge-warning":"badge-error"}function Wd(l){return l==="final"?"badge-success":l==="retry"?"badge-warning":l==="recovery"?"badge-info":"badge-ghost"}function Qn(l){return JSON.stringify(l,null,2)}function vg(l){const s=l.toLowerCase();return s.includes("auth")?"bg-blue-500":s.includes("plugin")?"bg-purple-500":s.includes("upstream")||s.includes("proxy")||s.includes("selected")?"bg-green-500":s.includes("transform")||s.includes("rewrite")?"bg-orange-500":s.includes("error")||s.includes("failed")?"bg-red-500":s.includes("retry")||s.includes("recover")||s.includes("circuit")?"bg-yellow-500":"bg-base-content/30"}function kg(l){const s=l.toLowerCase();return s.includes("auth")?"Auth":s.includes("plugin")?"Plugin":s.includes("upstream")||s.includes("proxy")||s.includes("selected")?"Upstream":s.includes("transform")||s.includes("rewrite")?"Transform":s.includes("retry")||s.includes("recover")||s.includes("circuit")?"Retry":"Other"}function wg(l,s,e){let n;Dt(l,Rt,G=>e(24,n=G));let{log:a}=s,{onClose:i}=s,u=null,c=null,f=!1,d=!1,p=null,m=null,g=!1,b=null,k=null,w=!1,C=!1,E=null,y=null,T=null,M=null,R=!1,j=!1,P=null,I=null,q="original",D=!1,A=!1;function N(G){return G?n(\`logs.requestType_\${G}\`):"-"}function Z(G){const pe=\`logs.steps.\${G}\`,oe=n(pe);return oe===pe?G.split("_").map(ge=>ge.charAt(0).toUpperCase()+ge.slice(1)).join(" "):oe}function Q(){if(!a.processingSteps||a.processingSteps.length===0)return{durations:[],relativeTime:[],totalDuration:0};const G=a.processingSteps,pe=G[0].timestamp,oe=G.map((ye,ze)=>ze===G.length-1?a.duration-(ye.timestamp-pe):G[ze+1].timestamp-ye.timestamp),ge=G.map(ye=>ye.timestamp-pe),he=a.duration;return{durations:oe,relativeTime:ge,totalDuration:he}}function x(G){G.target===G.currentTarget&&i()}async function z(){const G={requestId:a.requestId,timestamp:a.timestamp,method:a.method,path:a.path,status:a.status,duration:a.duration,originalRequestHeaders:T,originalRequestBody:M,requestHeaders:b,requestBody:u,responseHeaders:k,responseBody:c,processingSteps:a.processingSteps};try{await navigator.clipboard.writeText(JSON.stringify(G,null,2)),e(23,A=!0),setTimeout(()=>{e(23,A=!1)},2e3)}catch(pe){console.error("Failed to copy:",pe)}}async function K(){const G={requestId:a.requestId,timestamp:a.timestamp,method:a.method,path:a.path,status:a.status,duration:a.duration,originalRequestHeaders:T,originalRequestBody:M,requestHeaders:b,requestBody:u,responseHeaders:k,responseBody:c,processingSteps:a.processingSteps},pe=new Blob([JSON.stringify(G,null,2)],{type:"application/json"}),oe=URL.createObjectURL(pe),ge=document.createElement("a");ge.href=oe,ge.download=\`log-\${a.requestId}.json\`,ge.click(),URL.revokeObjectURL(oe)}async function S(){if(!(!a.reqBodyId||u!==null)){e(4,f=!0),e(6,p=null);try{e(2,u=await Eu(a.reqBodyId))}catch(G){e(6,p=G instanceof Error?G.message:"Failed to load request body")}finally{e(4,f=!1)}}}async function B(){if(!(!a.respBodyId||c!==null)){e(5,d=!0),e(7,m=null);try{e(3,c=await Eu(a.respBodyId))}catch(G){e(7,m=G instanceof Error?G.message:"Failed to load response body")}finally{e(5,d=!1)}}}async function U(){if(!(!a.reqHeaderId||b!==null)){e(11,w=!0),e(13,E=null);try{e(9,b=await Tu(a.reqHeaderId))}catch(G){e(13,E=G instanceof Error?G.message:"Failed to load request headers")}finally{e(11,w=!1)}}}async function F(){if(!(!a.respHeaderId||k!==null)){e(12,C=!0),e(14,y=null);try{e(10,k=await Tu(a.respHeaderId))}catch(G){e(14,y=G instanceof Error?G.message:"Failed to load response headers")}finally{e(12,C=!1)}}}async function J(){if(!(!a.originalReqHeaderId||T!==null)){e(17,R=!0),e(19,P=null);try{e(15,T=await Tu(a.originalReqHeaderId))}catch(G){e(19,P=G instanceof Error?G.message:"Failed to load original request headers")}finally{e(17,R=!1)}}}async function ie(){if(!(!a.originalReqBodyId||M!==null)){e(18,j=!0),e(20,I=null);try{e(16,M=await Eu(a.originalReqBodyId))}catch(G){e(20,I=G instanceof Error?G.message:"Failed to load original request body")}finally{e(18,j=!1)}}}Hs(async()=>{try{const G=await Pu();e(8,g=G.logging?.body?.enabled||!1)}catch(G){console.error("Failed to load config:",G),e(8,g=!1)}a.originalReqHeaderId&&J(),a.originalReqBodyId&&ie(),a.reqHeaderId&&U(),a.respHeaderId&&F(),a.reqBodyId&&S(),a.respBodyId&&B()});const ue=[[]],ne=()=>e(22,D=!D);function $(){q=this.__value,e(21,q)}function te(){q=this.__value,e(21,q)}function ae(){q=this.__value,e(21,q)}const ee=G=>G.key==="Escape"&&i();return l.$$set=G=>{"log"in G&&e(0,a=G.log),"onClose"in G&&e(1,i=G.onClose)},[a,i,u,c,f,d,p,m,g,b,k,w,C,E,y,T,M,R,j,P,I,q,D,A,n,N,Z,Q,x,z,K,ne,$,ue,te,ae,ee]}class yg extends Nt{constructor(s){super(),Ut(this,s,wg,bg,Vt,{log:0,onClose:1},null,[-1,-1,-1])}}function Gd(l,s,e){const n=l.slice();return n[104]=s[e],n}function Kd(l){let s,e,n,a,i,u=l[24]("logs.newDataAvailable")+"",c,f,d,p,m=l[24]("common.refresh")+"",g,b,k;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),f=h(),d=r("div"),p=r("button"),g=_(m),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(p,"class","btn btn-sm"),o(d,"class","flex-none"),o(s,"class","alert alert-info shadow-lg mb-4")},m(w,C){L(w,s,C),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c),t(s,f),t(s,d),t(d,p),t(p,g),b||(k=V(p,"click",l[29]),b=!0)},p(w,C){C[0]&16777216&&u!==(u=w[24]("logs.newDataAvailable")+"")&&v(c,u),C[0]&16777216&&m!==(m=w[24]("common.refresh")+"")&&v(g,m)},d(w){w&&H(s),b=!1,k()}}}function Yd(l){let s;return{c(){s=r("span"),s.textContent="1",o(s,"class","badge badge-sm")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function Qd(l){let s;return{c(){s=r("span"),s.textContent="1",o(s,"class","badge badge-sm")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function Zd(l){let s;return{c(){s=r("span"),s.textContent="1",o(s,"class","badge badge-sm")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function Xd(l){let s,e=[l[5],l[8]!=="recent"||l[9]!==1,l[6]!=="timestamp"||l[7]!=="desc"].filter(Boolean).length+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-sm")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&992&&e!==(e=[a[5],a[8]!=="recent"||a[9]!==1,a[6]!=="timestamp"||a[7]!=="desc"].filter(Boolean).length+"")&&v(n,e)},d(a){a&&H(s)}}}function xd(l){let s,e,n,a=l[24]("logs.recentHours")+"",i,u,c,f,d;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","number"),o(c,"min","1"),o(c,"class","input input-bordered input-sm"),o(s,"class","form-control")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),Y(c,l[9]),f||(d=V(c,"input",l[45]),f=!0)},p(p,m){m[0]&16777216&&a!==(a=p[24]("logs.recentHours")+"")&&v(i,a),m[0]&512&&Mt(c.value)!==p[9]&&Y(c,p[9])},d(p){p&&H(s),f=!1,d()}}}function $d(l){let s,e,n,a=l[24]("logs.startTime")+"",i,u,c,f,d,p,m,g=l[24]("logs.endTime")+"",b,k,w,C,E;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("input"),f=h(),d=r("div"),p=r("div"),m=r("span"),b=_(g),k=h(),w=r("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","datetime-local"),o(c,"class","input input-bordered input-sm"),o(s,"class","form-control"),o(m,"class","label-text text-xs font-semibold"),o(p,"class","label py-1"),o(w,"type","datetime-local"),o(w,"class","input input-bordered input-sm"),o(d,"class","form-control")},m(y,T){L(y,s,T),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),Y(c,l[10]),L(y,f,T),L(y,d,T),t(d,p),t(p,m),t(m,b),t(d,k),t(d,w),Y(w,l[11]),C||(E=[V(c,"input",l[46]),V(w,"input",l[47])],C=!0)},p(y,T){T[0]&16777216&&a!==(a=y[24]("logs.startTime")+"")&&v(i,a),T[0]&1024&&Y(c,y[10]),T[0]&16777216&&g!==(g=y[24]("logs.endTime")+"")&&v(b,g),T[0]&2048&&Y(w,y[11])},d(y){y&&(H(s),H(f),H(d)),C=!1,vt(E)}}}function ep(l){let s,e;return{c(){s=r("span"),e=_(l[13]),o(s,"class","badge badge-sm badge-primary")},m(n,a){L(n,s,a),t(s,e)},p(n,a){a[0]&8192&&v(e,n[13])},d(n){n&&H(s)}}}function tp(l){let s,e,n,a=l[24]("logs.refreshInterval")+"",i,u,c,f,d=l[24]("logs.refreshEvery5s")+"",p,m,g=l[24]("logs.refreshEvery10s")+"",b,k,w=l[24]("logs.refreshEvery30s")+"",C,E,y=l[24]("logs.refreshEvery60s")+"",T,M,R;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("select"),f=r("option"),p=_(d),m=r("option"),b=_(g),k=r("option"),C=_(w),E=r("option"),T=_(y),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),f.__value="5s",Y(f,f.__value),m.__value="10s",Y(m,m.__value),k.__value="30s",Y(k,k.__value),E.__value="60s",Y(E,E.__value),o(c,"class","select select-bordered select-sm"),l[13]===void 0&&pl(()=>l[51].call(c)),o(s,"class","form-control")},m(j,P){L(j,s,P),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),t(c,f),t(f,p),t(c,m),t(m,b),t(c,k),t(k,C),t(c,E),t(E,T),kt(c,l[13],!0),M||(R=V(c,"change",l[51]),M=!0)},p(j,P){P[0]&16777216&&a!==(a=j[24]("logs.refreshInterval")+"")&&v(i,a),P[0]&16777216&&d!==(d=j[24]("logs.refreshEvery5s")+"")&&v(p,d),P[0]&16777216&&g!==(g=j[24]("logs.refreshEvery10s")+"")&&v(b,g),P[0]&16777216&&w!==(w=j[24]("logs.refreshEvery30s")+"")&&v(C,w),P[0]&16777216&&y!==(y=j[24]("logs.refreshEvery60s")+"")&&v(T,y),P[0]&8192&&kt(c,j[13])},d(j){j&&H(s),M=!1,R()}}}function lp(l){let s,e,n,a,i=l[24]("logs.clearFilters")+"",u,c,f;return{c(){s=r("button"),e=re("svg"),n=re("path"),a=h(),u=_(i),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M6 18L18 6M6 6l12 12"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-4 w-4"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(s,"type","button"),o(s,"class","btn btn-sm btn-ghost gap-1")},m(d,p){L(d,s,p),t(s,e),t(e,n),t(s,a),t(s,u),c||(f=V(s,"click",l[28]),c=!0)},p(d,p){p[0]&16777216&&i!==(i=d[24]("logs.clearFilters")+"")&&v(u,i)},d(d){d&&H(s),c=!1,f()}}}function sp(l){let s,e=[l[2],l[3],l[4]!==void 0,l[5],l[8]!=="recent"||l[9]!==1,l[6]!=="timestamp"||l[7]!=="desc"].filter(Boolean).length+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-sm")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&1020&&e!==(e=[a[2],a[3],a[4]!==void 0,a[5],a[8]!=="recent"||a[9]!==1,a[6]!=="timestamp"||a[7]!=="desc"].filter(Boolean).length+"")&&v(n,e)},d(a){a&&H(s)}}}function op(l){let s,e,n,a=l[24]("logs.recentHours")+"",i,u,c,f,d;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","number"),o(c,"min","1"),o(c,"class","input input-bordered input-sm"),o(s,"class","form-control")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),Y(c,l[9]),f||(d=V(c,"input",l[59]),f=!0)},p(p,m){m[0]&16777216&&a!==(a=p[24]("logs.recentHours")+"")&&v(i,a),m[0]&512&&Mt(c.value)!==p[9]&&Y(c,p[9])},d(p){p&&H(s),f=!1,d()}}}function np(l){let s,e,n,a=l[24]("logs.startTime")+"",i,u,c,f,d,p,m,g=l[24]("logs.endTime")+"",b,k,w,C,E;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("input"),f=h(),d=r("div"),p=r("div"),m=r("span"),b=_(g),k=h(),w=r("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","datetime-local"),o(c,"class","input input-bordered input-sm"),o(s,"class","form-control"),o(m,"class","label-text text-xs font-semibold"),o(p,"class","label py-1"),o(w,"type","datetime-local"),o(w,"class","input input-bordered input-sm"),o(d,"class","form-control")},m(y,T){L(y,s,T),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),Y(c,l[10]),L(y,f,T),L(y,d,T),t(d,p),t(p,m),t(m,b),t(d,k),t(d,w),Y(w,l[11]),C||(E=[V(c,"input",l[60]),V(w,"input",l[61])],C=!0)},p(y,T){T[0]&16777216&&a!==(a=y[24]("logs.startTime")+"")&&v(i,a),T[0]&1024&&Y(c,y[10]),T[0]&16777216&&g!==(g=y[24]("logs.endTime")+"")&&v(b,g),T[0]&2048&&Y(w,y[11])},d(y){y&&(H(s),H(f),H(d)),C=!1,vt(E)}}}function ap(l){let s,e,n,a=l[24]("logs.refreshInterval")+"",i,u,c,f,d=l[24]("logs.refreshEvery5s")+"",p,m,g=l[24]("logs.refreshEvery10s")+"",b,k,w=l[24]("logs.refreshEvery30s")+"",C,E,y=l[24]("logs.refreshEvery60s")+"",T,M,R;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("select"),f=r("option"),p=_(d),m=r("option"),b=_(g),k=r("option"),C=_(w),E=r("option"),T=_(y),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),f.__value="5s",Y(f,f.__value),m.__value="10s",Y(m,m.__value),k.__value="30s",Y(k,k.__value),E.__value="60s",Y(E,E.__value),o(c,"class","select select-bordered select-sm"),l[13]===void 0&&pl(()=>l[65].call(c)),o(s,"class","form-control")},m(j,P){L(j,s,P),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),t(c,f),t(f,p),t(c,m),t(m,b),t(c,k),t(k,C),t(c,E),t(E,T),kt(c,l[13],!0),M||(R=V(c,"change",l[65]),M=!0)},p(j,P){P[0]&16777216&&a!==(a=j[24]("logs.refreshInterval")+"")&&v(i,a),P[0]&16777216&&d!==(d=j[24]("logs.refreshEvery5s")+"")&&v(p,d),P[0]&16777216&&g!==(g=j[24]("logs.refreshEvery10s")+"")&&v(b,g),P[0]&16777216&&w!==(w=j[24]("logs.refreshEvery30s")+"")&&v(C,w),P[0]&16777216&&y!==(y=j[24]("logs.refreshEvery60s")+"")&&v(T,y),P[0]&8192&&kt(c,j[13])},d(j){j&&H(s),M=!1,R()}}}function rp(l){let s,e=l[24]("logs.lastRefreshed")+"",n,a,i=new Date(l[21]).toLocaleTimeString()+"",u;return{c(){s=r("div"),n=_(e),a=_(": "),u=_(i),o(s,"class","text-xs text-gray-500 text-center")},m(c,f){L(c,s,f),t(s,n),t(s,a),t(s,u)},p(c,f){f[0]&16777216&&e!==(e=c[24]("logs.lastRefreshed")+"")&&v(n,e),f[0]&2097152&&i!==(i=new Date(c[21]).toLocaleTimeString()+"")&&v(u,i)},d(c){c&&H(s)}}}function ip(l){let s,e,n,a,i=l[24]("logs.clearFilters")+"",u,c,f;return{c(){s=r("button"),e=re("svg"),n=re("path"),a=h(),u=_(i),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M6 18L18 6M6 6l12 12"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-4 w-4"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(s,"type","button"),o(s,"class","btn btn-sm btn-ghost gap-1")},m(d,p){L(d,s,p),t(s,e),t(e,n),t(s,a),t(s,u),c||(f=V(s,"click",l[28]),c=!0)},p(d,p){p[0]&16777216&&i!==(i=d[24]("logs.clearFilters")+"")&&v(u,i)},d(d){d&&H(s),c=!1,f()}}}function up(l){let s;return{c(){s=r("span"),o(s,"class","badge badge-sm badge-primary")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function fp(l){let s,e,n,a=l[24]("logs.recentHours")+"",i,u,c,f,d;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","number"),o(c,"min","1"),o(c,"class","input input-bordered input-sm"),o(s,"class","form-control")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),Y(c,l[9]),f||(d=V(c,"input",l[73]),f=!0)},p(p,m){m[0]&16777216&&a!==(a=p[24]("logs.recentHours")+"")&&v(i,a),m[0]&512&&Mt(c.value)!==p[9]&&Y(c,p[9])},d(p){p&&H(s),f=!1,d()}}}function cp(l){let s,e,n,a=l[24]("logs.startTime")+"",i,u,c,f,d,p,m,g=l[24]("logs.endTime")+"",b,k,w,C,E;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("input"),f=h(),d=r("div"),p=r("div"),m=r("span"),b=_(g),k=h(),w=r("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","datetime-local"),o(c,"class","input input-bordered input-sm"),o(s,"class","form-control"),o(m,"class","label-text text-xs font-semibold"),o(p,"class","label py-1"),o(w,"type","datetime-local"),o(w,"class","input input-bordered input-sm"),o(d,"class","form-control")},m(y,T){L(y,s,T),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),Y(c,l[10]),L(y,f,T),L(y,d,T),t(d,p),t(p,m),t(m,b),t(d,k),t(d,w),Y(w,l[11]),C||(E=[V(c,"input",l[74]),V(w,"input",l[75])],C=!0)},p(y,T){T[0]&16777216&&a!==(a=y[24]("logs.startTime")+"")&&v(i,a),T[0]&1024&&Y(c,y[10]),T[0]&16777216&&g!==(g=y[24]("logs.endTime")+"")&&v(b,g),T[0]&2048&&Y(w,y[11])},d(y){y&&(H(s),H(f),H(d)),C=!1,vt(E)}}}function dp(l){let s,e,n,a=l[24]("logs.refreshInterval")+"",i,u,c,f,d=l[24]("logs.refreshEvery5s")+"",p,m,g=l[24]("logs.refreshEvery10s")+"",b,k,w=l[24]("logs.refreshEvery30s")+"",C,E,y=l[24]("logs.refreshEvery60s")+"",T,M,R;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("select"),f=r("option"),p=_(d),m=r("option"),b=_(g),k=r("option"),C=_(w),E=r("option"),T=_(y),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),f.__value="5s",Y(f,f.__value),m.__value="10s",Y(m,m.__value),k.__value="30s",Y(k,k.__value),E.__value="60s",Y(E,E.__value),o(c,"class","select select-bordered select-sm"),l[13]===void 0&&pl(()=>l[79].call(c)),o(s,"class","form-control")},m(j,P){L(j,s,P),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),t(c,f),t(f,p),t(c,m),t(m,b),t(c,k),t(k,C),t(c,E),t(E,T),kt(c,l[13],!0),M||(R=V(c,"change",l[79]),M=!0)},p(j,P){P[0]&16777216&&a!==(a=j[24]("logs.refreshInterval")+"")&&v(i,a),P[0]&16777216&&d!==(d=j[24]("logs.refreshEvery5s")+"")&&v(p,d),P[0]&16777216&&g!==(g=j[24]("logs.refreshEvery10s")+"")&&v(b,g),P[0]&16777216&&w!==(w=j[24]("logs.refreshEvery30s")+"")&&v(C,w),P[0]&16777216&&y!==(y=j[24]("logs.refreshEvery60s")+"")&&v(T,y),P[0]&8192&&kt(c,j[13])},d(j){j&&H(s),M=!1,R()}}}function pp(l){let s,e,n,a,i,u,c=l[24]("logs.clearFilters")+"",f,d,p;return{c(){s=r("div"),e=h(),n=r("button"),a=re("svg"),i=re("path"),u=h(),f=_(c),o(s,"class","divider my-2"),o(i,"stroke-linecap","round"),o(i,"stroke-linejoin","round"),o(i,"stroke-width","2"),o(i,"d","M6 18L18 6M6 6l12 12"),o(a,"xmlns","http://www.w3.org/2000/svg"),o(a,"class","h-4 w-4"),o(a,"fill","none"),o(a,"viewBox","0 0 24 24"),o(a,"stroke","currentColor"),o(n,"type","button"),o(n,"class","btn btn-sm btn-ghost w-full gap-1")},m(m,g){L(m,s,g),L(m,e,g),L(m,n,g),t(n,a),t(a,i),t(n,u),t(n,f),d||(p=V(n,"click",l[28]),d=!0)},p(m,g){g[0]&16777216&&c!==(c=m[24]("logs.clearFilters")+"")&&v(f,c)},d(m){m&&(H(s),H(e),H(n)),d=!1,p()}}}function hp(l){let s,e=l[1].trim(),n,a,i,u,c,f,d,p,m=e&&mp(l),g=l[2]&&gp(l),b=l[3]&&_p(l),k=l[4]!==void 0&&bp(l),w=l[5]&&vp(l),C=l[8]==="recent"&&l[9]!==1&&kp(l),E=l[8]==="custom"&&wp(l),y=l[8]==="all"&&yp(l),T=(l[6]!=="timestamp"||l[7]!=="desc")&&Cp(l);return{c(){s=r("div"),m&&m.c(),n=h(),g&&g.c(),a=h(),b&&b.c(),i=h(),k&&k.c(),u=h(),w&&w.c(),c=h(),C&&C.c(),f=h(),E&&E.c(),d=h(),y&&y.c(),p=h(),T&&T.c(),o(s,"class","flex items-center gap-2 flex-wrap px-1")},m(M,R){L(M,s,R),m&&m.m(s,null),t(s,n),g&&g.m(s,null),t(s,a),b&&b.m(s,null),t(s,i),k&&k.m(s,null),t(s,u),w&&w.m(s,null),t(s,c),C&&C.m(s,null),t(s,f),E&&E.m(s,null),t(s,d),y&&y.m(s,null),t(s,p),T&&T.m(s,null)},p(M,R){R[0]&2&&(e=M[1].trim()),e?m?m.p(M,R):(m=mp(M),m.c(),m.m(s,n)):m&&(m.d(1),m=null),M[2]?g?g.p(M,R):(g=gp(M),g.c(),g.m(s,a)):g&&(g.d(1),g=null),M[3]?b?b.p(M,R):(b=_p(M),b.c(),b.m(s,i)):b&&(b.d(1),b=null),M[4]!==void 0?k?k.p(M,R):(k=bp(M),k.c(),k.m(s,u)):k&&(k.d(1),k=null),M[5]?w?w.p(M,R):(w=vp(M),w.c(),w.m(s,c)):w&&(w.d(1),w=null),M[8]==="recent"&&M[9]!==1?C?C.p(M,R):(C=kp(M),C.c(),C.m(s,f)):C&&(C.d(1),C=null),M[8]==="custom"?E?E.p(M,R):(E=wp(M),E.c(),E.m(s,d)):E&&(E.d(1),E=null),M[8]==="all"?y?y.p(M,R):(y=yp(M),y.c(),y.m(s,p)):y&&(y.d(1),y=null),M[6]!=="timestamp"||M[7]!=="desc"?T?T.p(M,R):(T=Cp(M),T.c(),T.m(s,null)):T&&(T.d(1),T=null)},d(M){M&&H(s),m&&m.d(),g&&g.d(),b&&b.d(),k&&k.d(),w&&w.d(),C&&C.d(),E&&E.d(),y&&y.d(),T&&T.d()}}}function mp(l){let s,e,n=l[24]("logs.searchTerm")+"",a,i,u,c,f,d,p,m,g;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),f=_(l[1]),d=h(),p=r("button"),p.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(p,"type","button"),o(p,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-lg gap-2")},m(b,k){L(b,s,k),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,f),t(s,d),t(s,p),m||(g=V(p,"click",l[82]),m=!0)},p(b,k){k[0]&16777216&&n!==(n=b[24]("logs.searchTerm")+"")&&v(a,n),k[0]&2&&v(f,b[1])},d(b){b&&H(s),m=!1,g()}}}function gp(l){let s,e,n=l[24]("logs.method")+"",a,i,u,c,f,d,p,m,g;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),f=_(l[2]),d=h(),p=r("button"),p.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(p,"type","button"),o(p,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(b,k){L(b,s,k),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,f),t(s,d),t(s,p),m||(g=V(p,"click",l[83]),m=!0)},p(b,k){k[0]&16777216&&n!==(n=b[24]("logs.method")+"")&&v(a,n),k[0]&4&&v(f,b[2])},d(b){b&&H(s),m=!1,g()}}}function _p(l){let s,e,n=l[24]("logs.status")+"",a,i,u,c,f,d,p,m,g;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),f=_(l[3]),d=h(),p=r("button"),p.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(p,"type","button"),o(p,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(b,k){L(b,s,k),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,f),t(s,d),t(s,p),m||(g=V(p,"click",l[84]),m=!0)},p(b,k){k[0]&16777216&&n!==(n=b[24]("logs.status")+"")&&v(a,n),k[0]&8&&v(f,b[3])},d(b){b&&H(s),m=!1,g()}}}function bp(l){let s,e,n=l[24]("logs.result")+"",a,i,u,c,f=(l[4]?l[24]("logs.success"):l[24]("logs.failed"))+"",d,p,m,g,b;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),d=_(f),p=h(),m=r("button"),m.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(k,w){L(k,s,w),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,d),t(s,p),t(s,m),g||(b=V(m,"click",l[85]),g=!0)},p(k,w){w[0]&16777216&&n!==(n=k[24]("logs.result")+"")&&v(a,n),w[0]&16777232&&f!==(f=(k[4]?k[24]("logs.success"):k[24]("logs.failed"))+"")&&v(d,f)},d(k){k&&H(s),g=!1,b()}}}function vp(l){let s,e,n=l[24]("logs.requestType")+"",a,i,u,c,f=l[24](\`logs.requestType_\${l[5]}\`)+"",d,p,m,g,b;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),d=_(f),p=h(),m=r("button"),m.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(k,w){L(k,s,w),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,d),t(s,p),t(s,m),g||(b=V(m,"click",l[86]),g=!0)},p(k,w){w[0]&16777216&&n!==(n=k[24]("logs.requestType")+"")&&v(a,n),w[0]&16777248&&f!==(f=k[24](\`logs.requestType_\${k[5]}\`)+"")&&v(d,f)},d(k){k&&H(s),g=!1,b()}}}function kp(l){let s,e,n=l[24]("logs.timeRange")+"",a,i,u,c,f=l[24]("logs.recentTime")+"",d,p,m,g,b,k,w,C;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),d=_(f),p=h(),m=_(l[9]),g=_("h"),b=h(),k=r("button"),k.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(k,"type","button"),o(k,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(E,y){L(E,s,y),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,d),t(c,p),t(c,m),t(c,g),t(s,b),t(s,k),w||(C=V(k,"click",l[87]),w=!0)},p(E,y){y[0]&16777216&&n!==(n=E[24]("logs.timeRange")+"")&&v(a,n),y[0]&16777216&&f!==(f=E[24]("logs.recentTime")+"")&&v(d,f),y[0]&512&&v(m,E[9])},d(E){E&&H(s),w=!1,C()}}}function wp(l){let s,e,n=l[24]("logs.timeRange")+"",a,i,u,c,f=l[24]("logs.customTime")+"",d,p,m,g,b;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),d=_(f),p=h(),m=r("button"),m.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(k,w){L(k,s,w),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,d),t(s,p),t(s,m),g||(b=V(m,"click",l[88]),g=!0)},p(k,w){w[0]&16777216&&n!==(n=k[24]("logs.timeRange")+"")&&v(a,n),w[0]&16777216&&f!==(f=k[24]("logs.customTime")+"")&&v(d,f)},d(k){k&&H(s),g=!1,b()}}}function yp(l){let s,e,n=l[24]("logs.timeRange")+"",a,i,u,c,f=l[24]("logs.allTime")+"",d,p,m,g,b;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),d=_(f),p=h(),m=r("button"),m.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(k,w){L(k,s,w),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,d),t(s,p),t(s,m),g||(b=V(m,"click",l[89]),g=!0)},p(k,w){w[0]&16777216&&n!==(n=k[24]("logs.timeRange")+"")&&v(a,n),w[0]&16777216&&f!==(f=k[24]("logs.allTime")+"")&&v(d,f)},d(k){k&&H(s),g=!1,b()}}}function Cp(l){let s,e,n=l[24]("logs.sortBy")+"",a,i,u,c,f=l[24](\`logs.sortBy\${l[6].charAt(0).toUpperCase()+l[6].slice(1)}\`)+"",d,p,m=l[7]==="asc"?"\u2191":"\u2193",g,b,k,w,C;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),d=_(f),p=h(),g=_(m),b=h(),k=r("button"),k.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(k,"type","button"),o(k,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(E,y){L(E,s,y),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,d),t(c,p),t(c,g),t(s,b),t(s,k),w||(C=V(k,"click",l[90]),w=!0)},p(E,y){y[0]&16777216&&n!==(n=E[24]("logs.sortBy")+"")&&v(a,n),y[0]&16777280&&f!==(f=E[24](\`logs.sortBy\${E[6].charAt(0).toUpperCase()+E[6].slice(1)}\`)+"")&&v(d,f),y[0]&128&&m!==(m=E[7]==="asc"?"\u2191":"\u2193")&&v(g,m)},d(E){E&&H(s),w=!1,C()}}}function Cg(l){let s,e,n,a,i,u,c,f=l[24]("logs.time")+"",d,p,m,g=l[24]("logs.method")+"",b,k,w,C=l[24]("logs.path")+"",E,y,T,M=l[24]("logs.status")+"",R,j,P,I=l[24]("logs.requestType")+"",q,D,A,N=l[24]("logs.duration")+"",Z,Q,x,z=l[24]("logs.upstream")+"",K,S,B,U=l[24]("logs.actions")+"",F,J,ie,ue=[],ne=new Map,$,te,ae,ee=l[24]("logs.showing",{values:{start:(l[0]-1)*Yn+1,end:Math.min(l[0]*Yn,l[15]),total:l[15]}})+"",G,pe,oe,ge,he,ye,ze,Pe,we=l[24]("logs.page",{values:{page:l[0],totalPages:l[16]}})+"",Fe,Je,je,Le,Se,fe,_e,Ie=ut(l[14]);const De=se=>se[104].requestId;for(let se=0;se<Ie.length;se+=1){let ke=Gd(l,Ie,se),me=De(ke);ne.set(me,ue[se]=Ep(me,ke))}return{c(){s=r("div"),e=r("div"),n=r("div"),a=r("table"),i=r("thead"),u=r("tr"),c=r("th"),d=_(f),p=h(),m=r("th"),b=_(g),k=h(),w=r("th"),E=_(C),y=h(),T=r("th"),R=_(M),j=h(),P=r("th"),q=_(I),D=h(),A=r("th"),Z=_(N),Q=h(),x=r("th"),K=_(z),S=h(),B=r("th"),F=_(U),J=h(),ie=r("tbody");for(let se=0;se<ue.length;se+=1)ue[se].c();$=h(),te=r("div"),ae=r("div"),G=_(ee),pe=h(),oe=r("div"),ge=r("button"),he=_("\xAB"),ze=h(),Pe=r("button"),Fe=_(we),Je=h(),je=r("button"),Le=_("\xBB"),o(a,"class","table table-zebra table-sm"),o(n,"class","overflow-x-auto"),o(ae,"class","text-sm"),o(ge,"class","join-item btn btn-sm"),ge.disabled=ye=l[0]<=1,o(Pe,"class","join-item btn btn-sm"),o(je,"class","join-item btn btn-sm"),je.disabled=Se=l[0]>=l[16],o(oe,"class","join"),o(te,"class","flex justify-between items-center p-4"),o(e,"class","card-body p-0"),o(s,"class","card bg-base-100 shadow-xl")},m(se,ke){L(se,s,ke),t(s,e),t(e,n),t(n,a),t(a,i),t(i,u),t(u,c),t(c,d),t(u,p),t(u,m),t(m,b),t(u,k),t(u,w),t(w,E),t(u,y),t(u,T),t(T,R),t(u,j),t(u,P),t(P,q),t(u,D),t(u,A),t(A,Z),t(u,Q),t(u,x),t(x,K),t(u,S),t(u,B),t(B,F),t(a,J),t(a,ie);for(let me=0;me<ue.length;me+=1)ue[me]&&ue[me].m(ie,null);t(e,$),t(e,te),t(te,ae),t(ae,G),t(te,pe),t(te,oe),t(oe,ge),t(ge,he),t(oe,ze),t(oe,Pe),t(Pe,Fe),t(oe,Je),t(oe,je),t(je,Le),fe||(_e=[V(ge,"click",l[92]),V(je,"click",l[93])],fe=!0)},p(se,ke){ke[0]&16777216&&f!==(f=se[24]("logs.time")+"")&&v(d,f),ke[0]&16777216&&g!==(g=se[24]("logs.method")+"")&&v(b,g),ke[0]&16777216&&C!==(C=se[24]("logs.path")+"")&&v(E,C),ke[0]&16777216&&M!==(M=se[24]("logs.status")+"")&&v(R,M),ke[0]&16777216&&I!==(I=se[24]("logs.requestType")+"")&&v(q,I),ke[0]&16777216&&N!==(N=se[24]("logs.duration")+"")&&v(Z,N),ke[0]&16777216&&z!==(z=se[24]("logs.upstream")+"")&&v(K,z),ke[0]&16777216&&U!==(U=se[24]("logs.actions")+"")&&v(F,U),ke[0]&218120192&&(Ie=ut(se[14]),ue=Ru(ue,ke,De,1,se,Ie,ne,ie,Op,Ep,null,Gd)),ke[0]&16809985&&ee!==(ee=se[24]("logs.showing",{values:{start:(se[0]-1)*Yn+1,end:Math.min(se[0]*Yn,se[15]),total:se[15]}})+"")&&v(G,ee),ke[0]&1&&ye!==(ye=se[0]<=1)&&(ge.disabled=ye),ke[0]&16842753&&we!==(we=se[24]("logs.page",{values:{page:se[0],totalPages:se[16]}})+"")&&v(Fe,we),ke[0]&65537&&Se!==(Se=se[0]>=se[16])&&(je.disabled=Se)},d(se){se&&H(s);for(let ke=0;ke<ue.length;ke+=1)ue[ke].d();fe=!1,vt(_e)}}}function Eg(l){let s,e,n,a,i,u=l[24]("logs.noData")+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(s,"class","alert alert-info")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d[0]&16777216&&u!==(u=f[24]("logs.noData")+"")&&v(c,u)},d(f){f&&H(s)}}}function Tg(l){let s,e,n,a,i,u=l[24]("common.error")+"",c,f,d;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),f=_(": "),d=_(l[18]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(s,"class","alert alert-error")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c),t(i,f),t(i,d)},p(p,m){m[0]&16777216&&u!==(u=p[24]("common.error")+"")&&v(c,u),m[0]&262144&&v(d,p[18])},d(p){p&&H(s)}}}function Sg(l){let s;return{c(){s=r("div"),s.innerHTML='<span class="loading loading-spinner loading-lg"></span>',o(s,"class","flex justify-center items-center h-64")},m(e,n){L(e,s,n)},p:ot,d(e){e&&H(s)}}}function Ep(l,s){let e,n,a=Sp(s[104].timestamp)+"",i,u,c,f,d=s[104].method+"",p,m,g,b=s[104].path+"",k,w,C,E,y,T=s[104].status+"",M,R,j,P,I,q=s[27](s[104].requestType)+"",D,A,N,Z,Q,x=Mp(s[104].duration)+"",z,K,S,B=(s[104].upstream||"-")+"",U,F,J,ie,ue,ne=s[24]("logs.viewDetail")+"",$,te,ae,ee;function G(){return s[91](s[104])}return{key:l,first:null,c(){e=r("tr"),n=r("td"),i=_(a),u=h(),c=r("td"),f=r("span"),p=_(d),m=h(),g=r("td"),k=_(b),C=h(),E=r("td"),y=r("span"),M=_(T),j=h(),P=r("td"),I=r("span"),D=_(q),Z=h(),Q=r("td"),z=_(x),K=h(),S=r("td"),U=_(B),J=h(),ie=r("td"),ue=r("button"),$=_(ne),te=h(),o(n,"class","text-xs"),o(f,"class","badge badge-sm"),o(g,"class","font-mono text-xs truncate max-w-xs"),o(g,"title",w=s[104].path),o(y,"class",R="badge badge-sm "+Rp(s[104].status)),o(I,"class",A="badge badge-sm "+qp(s[104].requestType)),o(I,"title",N=s[24](\`logs.requestType_\${s[104].requestType}_desc\`)),o(Q,"class","text-xs"),o(S,"class","text-xs truncate max-w-xs"),o(S,"title",F=s[104].upstream||"-"),o(ue,"class","btn btn-xs btn-ghost"),o(e,"class","hover"),this.first=e},m(pe,oe){L(pe,e,oe),t(e,n),t(n,i),t(e,u),t(e,c),t(c,f),t(f,p),t(e,m),t(e,g),t(g,k),t(e,C),t(e,E),t(E,y),t(y,M),t(e,j),t(e,P),t(P,I),t(I,D),t(e,Z),t(e,Q),t(Q,z),t(e,K),t(e,S),t(S,U),t(e,J),t(e,ie),t(ie,ue),t(ue,$),t(e,te),ae||(ee=V(ue,"click",G),ae=!0)},p(pe,oe){s=pe,oe[0]&16384&&a!==(a=Sp(s[104].timestamp)+"")&&v(i,a),oe[0]&16384&&d!==(d=s[104].method+"")&&v(p,d),oe[0]&16384&&b!==(b=s[104].path+"")&&v(k,b),oe[0]&16384&&w!==(w=s[104].path)&&o(g,"title",w),oe[0]&16384&&T!==(T=s[104].status+"")&&v(M,T),oe[0]&16384&&R!==(R="badge badge-sm "+Rp(s[104].status))&&o(y,"class",R),oe[0]&16384&&q!==(q=s[27](s[104].requestType)+"")&&v(D,q),oe[0]&16384&&A!==(A="badge badge-sm "+qp(s[104].requestType))&&o(I,"class",A),oe[0]&16793600&&N!==(N=s[24](\`logs.requestType_\${s[104].requestType}_desc\`))&&o(I,"title",N),oe[0]&16384&&x!==(x=Mp(s[104].duration)+"")&&v(z,x),oe[0]&16384&&B!==(B=(s[104].upstream||"-")+"")&&v(U,B),oe[0]&16384&&F!==(F=s[104].upstream||"-")&&o(S,"title",F),oe[0]&16777216&&ne!==(ne=s[24]("logs.viewDetail")+"")&&v($,ne)},d(pe){pe&&H(e),ae=!1,ee()}}}function Tp(l){let s,e;return s=new yg({props:{log:l[19],onClose:l[94]}}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p(n,a){const i={};a[0]&524288&&(i.log=n[19]),a[0]&1572864&&(i.onClose=n[94]),s.$set(i)},i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Mg(l){let s,e,n,a=l[24]("logs.title")+"",i,u,c,f,d,p,m,g,b,k,w,C,E,y=l[24]("logs.method")+"",T,M,R,j,P,I,q,D,A,N,Z=l[24]("logs.allMethods")+"",Q,x,z,K,S,B,U,F,J,ie,ue,ne,$,te,ae,ee,G,pe,oe,ge=l[24]("logs.status")+"",he,ye,ze,Pe,we,Fe,Je,je,Le,Se,fe,_e=l[24]("logs.statusPlaceholder")+"",Ie,De,se,ke,me,Ee,Ve=l[24]("logs.result")+"",Be,nt,Ne,Qe,Ye,ve,de,Te,Ze,Me,Ue=l[24]("logs.allResults")+"",Ce,mt,Ge,ce,qe=l[24]("logs.success")+"",Re,dt,We,O,He=l[24]("logs.failed")+"",X,ft,Ht,Ke,_t=l[24]("logs.moreFilters")+"",tt,it,Oe,Xe,It,rt,gt,wt,pt,bl,at,St,ht=l[24]("logs.requestTypeFilter")+"",Tt,vl,At,hl,ml=l[24]("logs.requestType_all")+"",ql,Jt,Yl=l[24]("logs.requestType_final")+"",Yt,Qt,Hl=l[24]("logs.requestType_retry")+"",Bl,gl,sl=l[24]("logs.requestType_recovery")+"",Ql,Ft,Ll,Vl,Jl,Cl=l[24]("logs.timeRange")+"",zt,Zl,Lt,Pl,jl=l[24]("logs.allTime")+"",$l,xt,kl=l[24]("logs.recentTime")+"",es,zl,Il=l[24]("logs.customTime")+"",Wl,Ls,ol,wl,nl,Ol,al,_l,tl,Dl=l[24]("logs.sortBy")+"",Nl,El,Wt,Bt,Pt,$t=l[24]("logs.sortByTimestamp")+"",el,Kt,Zt=l[24]("logs.sortByDuration")+"",rl,Xt,$e=l[24]("logs.sortByStatus")+"",Al,ts,Xl,xl,ls=l[24]("logs.desc")+"",Ds,ss,Os=l[24]("logs.asc")+"",il,Ot,lt,ct,ll,Tl,ul,xe,bt,fl,xn,Bu,yo,_o,aa,Co,ra,ia=l[24]("logs.autoRefresh")+"",li,Iu,bo,Au,Fu,Ns,Us,Eo,zu,si,ua=l[24]("common.refresh")+"",oi,Ou,To,ao,ro,So,Nu,ni,fa=l[24]("logs.export")+"",ai,Uu,io,ri,ca,Vu,ii,da,Ju,Wu,Bs,Mo,Ps,uo,Ro,Gu,pa=l[24]("logs.filters")+"",ui,Ku,ha,Yu,qo,cl,Ho,ma,ga,_a=l[24]("logs.method")+"",fi,Qu,Es,Lo,ba=l[24]("logs.allMethods")+"",ci,Po,jo,Do,Bo,Io,Zu,Ao,va,ka,wa=l[24]("logs.status")+"",di,Xu,lo,xu,Fo,ya,Ca,Ea=l[24]("logs.result")+"",pi,$u,Vs,zo,Ta=l[24]("logs.allResults")+"",hi,Oo,Sa=l[24]("logs.success")+"",mi,No,Ma=l[24]("logs.failed")+"",gi,ef,_i,tf,Uo,Ra,qa,Ha=l[24]("logs.requestTypeFilter")+"",bi,lf,Is,Vo,La=l[24]("logs.requestType_all")+"",vi,Jo,Pa=l[24]("logs.requestType_final")+"",ki,Wo,ja=l[24]("logs.requestType_retry")+"",wi,Go,Da=l[24]("logs.requestType_recovery")+"",yi,sf,Ko,Ba,Ia,Aa=l[24]("logs.timeRange")+"",Ci,of,Js,Yo,Fa=l[24]("logs.allTime")+"",Ei,Qo,za=l[24]("logs.recentTime")+"",Ti,Zo,Oa=l[24]("logs.customTime")+"",Si,nf,Mi,Ri,qi,af,Xo,Na,Ua,Va=l[24]("logs.sortBy")+"",Hi,rf,xo,Ws,$o,Ja=l[24]("logs.sortByTimestamp")+"",Li,en,Wa=l[24]("logs.sortByDuration")+"",Pi,tn,Ga=l[24]("logs.sortByStatus")+"",ji,uf,so,ln,Ka=l[24]("logs.desc")+"",Di,sn,Ya=l[24]("logs.asc")+"",Bi,ff,on,fo,Gs,nn,cf,Qa=l[24]("common.refresh")+"",Ii,df,an,os,Za,rn,Xa,xa=l[24]("logs.autoRefresh")+"",Ai,pf,vo,hf,Fi,zi,mf,Ks,Ys,un,gf,$a=l[24]("common.refresh")+"",Oi,_f,bf,fn,co,po,cn,vf,er=l[24]("logs.export")+"",Ni,kf,ho,Ui,tr,wf,Vi,lr,yf,Cf,sr,dn,As,mo,pn,Ef,or=l[24]("logs.actions")+"",Ji,Tf,Sf,hn,qt,nr,ar=l[24]("logs.filters")+"",Wi,Mf,mn,rr,ir,ur=l[24]("logs.method")+"",Gi,Rf,Ts,gn,fr=l[24]("logs.allMethods")+"",Ki,_n,bn,vn,kn,wn,qf,yn,cr,dr,pr=l[24]("logs.status")+"",Yi,Hf,oo,Lf,Cn,hr,mr,gr=l[24]("logs.result")+"",Qi,Pf,Qs,En,_r=l[24]("logs.allResults")+"",Zi,Tn,br=l[24]("logs.success")+"",Xi,Sn,vr=l[24]("logs.failed")+"",xi,jf,Mn,kr,wr,yr=l[24]("logs.requestTypeFilter")+"",$i,Df,Fs,Rn,Cr=l[24]("logs.requestType_all")+"",eu,qn,Er=l[24]("logs.requestType_final")+"",tu,Hn,Tr=l[24]("logs.requestType_retry")+"",lu,Ln,Sr=l[24]("logs.requestType_recovery")+"",su,Bf,Pn,Mr,Rr,qr=l[24]("logs.timeRange")+"",ou,If,Zs,jn,Hr=l[24]("logs.allTime")+"",nu,Dn,Lr=l[24]("logs.recentTime")+"",au,Bn,Pr=l[24]("logs.customTime")+"",ru,Af,iu,uu,In,jr,Dr,Br=l[24]("logs.sortBy")+"",fu,Ff,An,Xs,Fn,Ir=l[24]("logs.sortByTimestamp")+"",cu,zn,Ar=l[24]("logs.sortByDuration")+"",du,On,Fr=l[24]("logs.sortByStatus")+"",pu,zf,no,Nn,zr=l[24]("logs.desc")+"",hu,Un,Or=l[24]("logs.asc")+"",mu,Of,gu,Nf,Nr,Ur=l[24]("common.refresh")+"",_u,Uf,Vr,Vn,Jr,Wr=l[24]("logs.autoRefresh")+"",bu,Vf,ko,Jf,vu,xs,$s,Jn,Wf,Gr=l[24]("common.refresh")+"",ku,Gf,wu,Kf,Wn,Gn,Yf,Kn,Qf,Zf,Xf,yu,$n,Ae,Cu,xf,ns=l[22]&&Kd(l),Ss=l[2]&&Yd(),Ms=l[3]&&Qd(),Rs=l[4]!==void 0&&Zd(),as=(l[5]||l[8]!=="recent"||l[9]!==1||l[6]!=="timestamp"||l[7]!=="desc")&&Xd(l),rs=l[8]==="recent"&&xd(l),is=l[8]==="custom"&&$d(l),us=l[12]&&ep(l),fs=l[12]&&tp(l),cs=l[23]>0&&lp(l),ds=(l[2]||l[3]||l[4]!==void 0||l[5]||l[8]!=="recent"||l[9]!==1||l[6]!=="timestamp"||l[7]!=="desc")&&sp(l),ps=l[8]==="recent"&&op(l),hs=l[8]==="custom"&&np(l),ms=l[12]&&ap(l),gs=l[21]>0&&rp(l),_s=l[23]>0&&ip(l),qs=(l[2]||l[3]||l[4]!==void 0||l[5]||l[8]!=="recent"||l[9]!==1||l[6]!=="timestamp"||l[7]!=="desc"||l[12])&&up(),bs=l[8]==="recent"&&fp(l),vs=l[8]==="custom"&&cp(l),ks=l[12]&&dp(l),ws=l[23]>0&&pp(l),ys=l[23]>0&&hp(l);function $f(W,be){return W[17]&&W[14].length===0?Sg:W[18]?Tg:W[14].length===0?Eg:Cg}let Kr=$f(l),eo=Kr(l),Fl=l[20]&&l[19]&&Tp(l);return{c(){s=r("div"),e=r("div"),n=r("h1"),i=_(a),u=h(),ns&&ns.c(),c=h(),f=r("div"),d=r("div"),p=r("div"),m=r("input"),b=h(),k=r("div"),w=r("div"),C=r("div"),E=r("div"),T=_(y),M=h(),Ss&&Ss.c(),R=h(),j=re("svg"),P=re("path"),q=h(),D=r("ul"),A=r("li"),N=r("button"),Q=_(Z),x=h(),z=r("li"),K=r("button"),K.textContent="GET",S=h(),B=r("li"),U=r("button"),U.textContent="POST",F=h(),J=r("li"),ie=r("button"),ie.textContent="PUT",ue=h(),ne=r("li"),$=r("button"),$.textContent="DELETE",te=h(),ae=r("li"),ee=r("button"),ee.textContent="PATCH",G=h(),pe=r("div"),oe=r("div"),he=_(ge),ye=h(),Ms&&Ms.c(),ze=h(),Pe=re("svg"),we=re("path"),Je=h(),je=r("div"),Le=r("div"),Se=r("div"),fe=r("span"),Ie=_(_e),De=h(),se=r("input"),ke=h(),me=r("div"),Ee=r("div"),Be=_(Ve),nt=h(),Rs&&Rs.c(),Ne=h(),Qe=re("svg"),Ye=re("path"),de=h(),Te=r("ul"),Ze=r("li"),Me=r("button"),Ce=_(Ue),mt=h(),Ge=r("li"),ce=r("button"),Re=_(qe),dt=h(),We=r("li"),O=r("button"),X=_(He),ft=h(),Ht=r("div"),Ke=r("div"),tt=_(_t),it=h(),as&&as.c(),Oe=h(),Xe=re("svg"),It=re("path"),gt=h(),wt=r("div"),pt=r("div"),bl=r("div"),at=r("div"),St=r("span"),Tt=_(ht),vl=h(),At=r("select"),hl=r("option"),ql=_(ml),Jt=r("option"),Yt=_(Yl),Qt=r("option"),Bl=_(Hl),gl=r("option"),Ql=_(sl),Ft=h(),Ll=r("div"),Vl=r("div"),Jl=r("span"),zt=_(Cl),Zl=h(),Lt=r("select"),Pl=r("option"),$l=_(jl),xt=r("option"),es=_(kl),zl=r("option"),Wl=_(Il),Ls=h(),rs&&rs.c(),ol=h(),is&&is.c(),wl=h(),nl=r("div"),Ol=h(),al=r("div"),_l=r("div"),tl=r("span"),Nl=_(Dl),El=h(),Wt=r("div"),Bt=r("select"),Pt=r("option"),el=_($t),Kt=r("option"),rl=_(Zt),Xt=r("option"),Al=_($e),ts=h(),Xl=r("select"),xl=r("option"),Ds=_(ls),ss=r("option"),il=_(Os),Ot=h(),lt=r("div"),ct=h(),ll=r("div"),Tl=r("div"),ul=r("div"),xe=re("svg"),bt=re("path"),fl=re("path"),xn=h(),us&&us.c(),Bu=h(),yo=r("div"),_o=r("div"),aa=r("div"),Co=r("label"),ra=r("span"),li=_(ia),Iu=h(),bo=r("input"),Au=h(),fs&&fs.c(),Fu=h(),Ns=r("button"),Us=re("svg"),Eo=re("path"),zu=h(),si=r("span"),oi=_(ua),Ou=h(),To=r("div"),ao=r("div"),ro=re("svg"),So=re("path"),Nu=h(),ni=r("span"),ai=_(fa),Uu=h(),io=r("ul"),ri=r("li"),ca=r("button"),ca.textContent="JSON",Vu=h(),ii=r("li"),da=r("button"),da.textContent="CSV",Ju=h(),cs&&cs.c(),Wu=h(),Bs=r("div"),Mo=r("div"),Ps=r("div"),uo=re("svg"),Ro=re("path"),Gu=h(),ui=_(pa),Ku=h(),ds&&ds.c(),Yu=h(),qo=r("div"),cl=r("div"),Ho=r("div"),ma=r("div"),ga=r("span"),fi=_(_a),Qu=h(),Es=r("select"),Lo=r("option"),ci=_(ba),Po=r("option"),Po.textContent="GET",jo=r("option"),jo.textContent="POST",Do=r("option"),Do.textContent="PUT",Bo=r("option"),Bo.textContent="DELETE",Io=r("option"),Io.textContent="PATCH",Zu=h(),Ao=r("div"),va=r("div"),ka=r("span"),di=_(wa),Xu=h(),lo=r("input"),xu=h(),Fo=r("div"),ya=r("div"),Ca=r("span"),pi=_(Ea),$u=h(),Vs=r("select"),zo=r("option"),hi=_(Ta),Oo=r("option"),mi=_(Sa),No=r("option"),gi=_(Ma),ef=h(),_i=r("div"),tf=h(),Uo=r("div"),Ra=r("div"),qa=r("span"),bi=_(Ha),lf=h(),Is=r("select"),Vo=r("option"),vi=_(La),Jo=r("option"),ki=_(Pa),Wo=r("option"),wi=_(ja),Go=r("option"),yi=_(Da),sf=h(),Ko=r("div"),Ba=r("div"),Ia=r("span"),Ci=_(Aa),of=h(),Js=r("select"),Yo=r("option"),Ei=_(Fa),Qo=r("option"),Ti=_(za),Zo=r("option"),Si=_(Oa),nf=h(),ps&&ps.c(),Mi=h(),hs&&hs.c(),Ri=h(),qi=r("div"),af=h(),Xo=r("div"),Na=r("div"),Ua=r("span"),Hi=_(Va),rf=h(),xo=r("div"),Ws=r("select"),$o=r("option"),Li=_(Ja),en=r("option"),Pi=_(Wa),tn=r("option"),ji=_(Ga),uf=h(),so=r("select"),ln=r("option"),Di=_(Ka),sn=r("option"),Bi=_(Ya),ff=h(),on=r("div"),fo=r("div"),Gs=re("svg"),nn=re("path"),cf=h(),Ii=_(Qa),df=h(),an=r("div"),os=r("div"),Za=r("div"),rn=r("label"),Xa=r("span"),Ai=_(xa),pf=h(),vo=r("input"),hf=h(),ms&&ms.c(),Fi=h(),zi=r("div"),mf=h(),Ks=r("button"),Ys=re("svg"),un=re("path"),gf=h(),Oi=_($a),_f=h(),gs&&gs.c(),bf=h(),fn=r("div"),co=r("div"),po=re("svg"),cn=re("path"),vf=h(),Ni=_(er),kf=h(),ho=r("ul"),Ui=r("li"),tr=r("button"),tr.textContent="JSON",wf=h(),Vi=r("li"),lr=r("button"),lr.textContent="CSV",yf=h(),_s&&_s.c(),Cf=h(),sr=r("div"),dn=r("div"),As=r("div"),mo=re("svg"),pn=re("path"),Ef=h(),Ji=_(or),Tf=h(),qs&&qs.c(),Sf=h(),hn=r("div"),qt=r("div"),nr=r("h3"),Wi=_(ar),Mf=h(),mn=r("div"),rr=r("div"),ir=r("span"),Gi=_(ur),Rf=h(),Ts=r("select"),gn=r("option"),Ki=_(fr),_n=r("option"),_n.textContent="GET",bn=r("option"),bn.textContent="POST",vn=r("option"),vn.textContent="PUT",kn=r("option"),kn.textContent="DELETE",wn=r("option"),wn.textContent="PATCH",qf=h(),yn=r("div"),cr=r("div"),dr=r("span"),Yi=_(pr),Hf=h(),oo=r("input"),Lf=h(),Cn=r("div"),hr=r("div"),mr=r("span"),Qi=_(gr),Pf=h(),Qs=r("select"),En=r("option"),Zi=_(_r),Tn=r("option"),Xi=_(br),Sn=r("option"),xi=_(vr),jf=h(),Mn=r("div"),kr=r("div"),wr=r("span"),$i=_(yr),Df=h(),Fs=r("select"),Rn=r("option"),eu=_(Cr),qn=r("option"),tu=_(Er),Hn=r("option"),lu=_(Tr),Ln=r("option"),su=_(Sr),Bf=h(),Pn=r("div"),Mr=r("div"),Rr=r("span"),ou=_(qr),If=h(),Zs=r("select"),jn=r("option"),nu=_(Hr),Dn=r("option"),au=_(Lr),Bn=r("option"),ru=_(Pr),Af=h(),bs&&bs.c(),iu=h(),vs&&vs.c(),uu=h(),In=r("div"),jr=r("div"),Dr=r("span"),fu=_(Br),Ff=h(),An=r("div"),Xs=r("select"),Fn=r("option"),cu=_(Ir),zn=r("option"),du=_(Ar),On=r("option"),pu=_(Fr),zf=h(),no=r("select"),Nn=r("option"),hu=_(zr),Un=r("option"),mu=_(Or),Of=h(),gu=r("div"),Nf=h(),Nr=r("h3"),_u=_(Ur),Uf=h(),Vr=r("div"),Vn=r("label"),Jr=r("span"),bu=_(Wr),Vf=h(),ko=r("input"),Jf=h(),ks&&ks.c(),vu=h(),xs=r("button"),$s=re("svg"),Jn=re("path"),Wf=h(),ku=_(Gr),Gf=h(),wu=r("div"),Kf=h(),Wn=r("div"),Gn=r("button"),Gn.textContent="JSON",Yf=h(),Kn=r("button"),Kn.textContent="CSV",Qf=h(),ws&&ws.c(),Zf=h(),ys&&ys.c(),Xf=h(),eo.c(),yu=h(),Fl&&Fl.c(),$n=Ul(),o(n,"class","text-2xl lg:text-3xl font-bold"),o(e,"class","mb-6"),o(m,"type","text"),o(m,"placeholder",g=l[24]("logs.searchPlaceholder")),o(m,"class","input input-bordered input-sm w-full"),o(p,"class","flex-1 min-w-[200px] xl:max-w-md"),o(P,"stroke-linecap","round"),o(P,"stroke-linejoin","round"),o(P,"stroke-width","2"),o(P,"d","M19 9l-7 7-7-7"),o(j,"xmlns","http://www.w3.org/2000/svg"),o(j,"class","h-3 w-3"),o(j,"fill","none"),o(j,"viewBox","0 0 24 24"),o(j,"stroke","currentColor"),o(E,"role","button"),o(E,"tabindex","0"),o(E,"class",I="btn btn-sm "+(l[2]?"btn-primary":"btn-ghost")+" gap-1"),le(K,"active",l[2]==="GET"),le(U,"active",l[2]==="POST"),le(ie,"active",l[2]==="PUT"),le($,"active",l[2]==="DELETE"),le(ee,"active",l[2]==="PATCH"),o(D,"role","menu"),o(D,"tabindex","0"),o(D,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-40 z-[1]"),o(C,"class","dropdown dropdown-end"),o(we,"stroke-linecap","round"),o(we,"stroke-linejoin","round"),o(we,"stroke-width","2"),o(we,"d","M19 9l-7 7-7-7"),o(Pe,"xmlns","http://www.w3.org/2000/svg"),o(Pe,"class","h-3 w-3"),o(Pe,"fill","none"),o(Pe,"viewBox","0 0 24 24"),o(Pe,"stroke","currentColor"),o(oe,"role","button"),o(oe,"tabindex","0"),o(oe,"class",Fe="btn btn-sm "+(l[3]?"btn-primary":"btn-ghost")+" gap-1"),o(fe,"class","label-text text-xs"),o(Se,"class","label py-1"),o(se,"type","text"),o(se,"placeholder","200, 404, 500"),o(se,"class","input input-bordered input-sm"),o(Le,"class","form-control"),o(je,"role","menu"),o(je,"tabindex","0"),o(je,"class","dropdown-content bg-base-100 rounded-box p-3 shadow-lg w-48 z-[1]"),o(pe,"class","dropdown dropdown-end"),o(Ye,"stroke-linecap","round"),o(Ye,"stroke-linejoin","round"),o(Ye,"stroke-width","2"),o(Ye,"d","M19 9l-7 7-7-7"),o(Qe,"xmlns","http://www.w3.org/2000/svg"),o(Qe,"class","h-3 w-3"),o(Qe,"fill","none"),o(Qe,"viewBox","0 0 24 24"),o(Qe,"stroke","currentColor"),o(Ee,"role","button"),o(Ee,"tabindex","0"),o(Ee,"class",ve="btn btn-sm "+(l[4]!==void 0?"btn-primary":"btn-ghost")+" gap-1"),le(ce,"active",l[4]===!0),le(O,"active",l[4]===!1),o(Te,"role","menu"),o(Te,"tabindex","0"),o(Te,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-40 z-[1]"),o(me,"class","dropdown dropdown-end"),o(It,"stroke-linecap","round"),o(It,"stroke-linejoin","round"),o(It,"stroke-width","2"),o(It,"d","M19 9l-7 7-7-7"),o(Xe,"xmlns","http://www.w3.org/2000/svg"),o(Xe,"class","h-3 w-3"),o(Xe,"fill","none"),o(Xe,"viewBox","0 0 24 24"),o(Xe,"stroke","currentColor"),o(Ke,"role","button"),o(Ke,"tabindex","0"),o(Ke,"class",rt="btn btn-sm "+(l[5]||l[8]!=="recent"||l[9]!==1||l[6]!=="timestamp"||l[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"),o(St,"class","label-text text-xs font-semibold"),o(at,"class","label py-1"),hl.__value="",Y(hl,hl.__value),Jt.__value="final",Y(Jt,Jt.__value),Qt.__value="retry",Y(Qt,Qt.__value),gl.__value="recovery",Y(gl,gl.__value),o(At,"class","select select-bordered select-sm"),l[5]===void 0&&pl(()=>l[43].call(At)),o(bl,"class","form-control"),o(Jl,"class","label-text text-xs font-semibold"),o(Vl,"class","label py-1"),Pl.__value="all",Y(Pl,Pl.__value),xt.__value="recent",Y(xt,xt.__value),zl.__value="custom",Y(zl,zl.__value),o(Lt,"class","select select-bordered select-sm"),l[8]===void 0&&pl(()=>l[44].call(Lt)),o(Ll,"class","form-control"),o(nl,"class","divider my-2"),o(tl,"class","label-text text-xs font-semibold"),o(_l,"class","label py-1"),Pt.__value="timestamp",Y(Pt,Pt.__value),Kt.__value="duration",Y(Kt,Kt.__value),Xt.__value="status",Y(Xt,Xt.__value),o(Bt,"class","select select-bordered select-sm flex-1"),l[6]===void 0&&pl(()=>l[48].call(Bt)),xl.__value="desc",Y(xl,xl.__value),ss.__value="asc",Y(ss,ss.__value),o(Xl,"class","select select-bordered select-sm w-24"),l[7]===void 0&&pl(()=>l[49].call(Xl)),o(Wt,"class","flex gap-2"),o(al,"class","form-control"),o(pt,"class","space-y-3"),o(wt,"role","menu"),o(wt,"tabindex","0"),o(wt,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-80 z-[1]"),o(Ht,"class","dropdown dropdown-end"),o(w,"class","flex items-center gap-2 flex-wrap"),o(lt,"class","flex-1"),o(bt,"stroke-linecap","round"),o(bt,"stroke-linejoin","round"),o(bt,"stroke-width","2"),o(bt,"d","M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"),o(fl,"stroke-linecap","round"),o(fl,"stroke-linejoin","round"),o(fl,"stroke-width","2"),o(fl,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),o(xe,"xmlns","http://www.w3.org/2000/svg"),o(xe,"class","h-4 w-4"),o(xe,"fill","none"),o(xe,"viewBox","0 0 24 24"),o(xe,"stroke","currentColor"),o(ul,"role","button"),o(ul,"tabindex","0"),o(ul,"class","btn btn-sm btn-outline gap-1"),o(ra,"class","label-text"),o(bo,"type","checkbox"),o(bo,"class","toggle toggle-primary toggle-sm"),o(Co,"class","label cursor-pointer"),o(aa,"class","form-control"),o(_o,"class","space-y-3"),o(yo,"role","menu"),o(yo,"tabindex","0"),o(yo,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-64 z-[1]"),o(Tl,"class","dropdown dropdown-end"),o(Eo,"stroke-linecap","round"),o(Eo,"stroke-linejoin","round"),o(Eo,"stroke-width","2"),o(Eo,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(Us,"xmlns","http://www.w3.org/2000/svg"),o(Us,"class","h-4 w-4"),o(Us,"fill","none"),o(Us,"viewBox","0 0 24 24"),o(Us,"stroke","currentColor"),le(Us,"animate-spin",l[17]),o(Ns,"type","button"),o(Ns,"class","btn btn-sm btn-outline gap-2"),Ns.disabled=l[17],o(So,"stroke-linecap","round"),o(So,"stroke-linejoin","round"),o(So,"stroke-width","2"),o(So,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(ro,"xmlns","http://www.w3.org/2000/svg"),o(ro,"class","h-4 w-4"),o(ro,"fill","none"),o(ro,"viewBox","0 0 24 24"),o(ro,"stroke","currentColor"),o(ao,"role","button"),o(ao,"tabindex","0"),o(ao,"class","btn btn-sm btn-secondary gap-2"),o(io,"role","menu"),o(io,"tabindex","0"),o(io,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-32 z-[1]"),o(To,"class","dropdown dropdown-end"),o(ll,"class","flex items-center gap-2 flex-wrap"),o(k,"class","hidden xl:flex items-center gap-2 flex-wrap flex-1"),o(Ro,"stroke-linecap","round"),o(Ro,"stroke-linejoin","round"),o(Ro,"stroke-width","2"),o(Ro,"d","M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"),o(uo,"xmlns","http://www.w3.org/2000/svg"),o(uo,"class","h-4 w-4"),o(uo,"fill","none"),o(uo,"viewBox","0 0 24 24"),o(uo,"stroke","currentColor"),o(Ps,"role","button"),o(Ps,"tabindex","0"),o(Ps,"class",ha="btn btn-sm "+(l[2]||l[3]||l[4]!==void 0||l[5]||l[8]!=="recent"||l[9]!==1||l[6]!=="timestamp"||l[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"),o(ga,"class","label-text text-xs font-semibold"),o(ma,"class","label py-1"),Lo.__value="",Y(Lo,Lo.__value),Po.__value="GET",Y(Po,Po.__value),jo.__value="POST",Y(jo,jo.__value),Do.__value="PUT",Y(Do,Do.__value),Bo.__value="DELETE",Y(Bo,Bo.__value),Io.__value="PATCH",Y(Io,Io.__value),o(Es,"class","select select-bordered select-sm"),l[2]===void 0&&pl(()=>l[54].call(Es)),o(Ho,"class","form-control"),o(ka,"class","label-text text-xs font-semibold"),o(va,"class","label py-1"),o(lo,"type","text"),o(lo,"placeholder","200, 404, 500"),o(lo,"class","input input-bordered input-sm"),o(Ao,"class","form-control"),o(Ca,"class","label-text text-xs font-semibold"),o(ya,"class","label py-1"),zo.__value=void 0,Y(zo,zo.__value),Oo.__value=!0,Y(Oo,Oo.__value),No.__value=!1,Y(No,No.__value),o(Vs,"class","select select-bordered select-sm"),l[4]===void 0&&pl(()=>l[56].call(Vs)),o(Fo,"class","form-control"),o(_i,"class","divider my-2"),o(qa,"class","label-text text-xs font-semibold"),o(Ra,"class","label py-1"),Vo.__value="",Y(Vo,Vo.__value),Jo.__value="final",Y(Jo,Jo.__value),Wo.__value="retry",Y(Wo,Wo.__value),Go.__value="recovery",Y(Go,Go.__value),o(Is,"class","select select-bordered select-sm"),l[5]===void 0&&pl(()=>l[57].call(Is)),o(Uo,"class","form-control"),o(Ia,"class","label-text text-xs font-semibold"),o(Ba,"class","label py-1"),Yo.__value="all",Y(Yo,Yo.__value),Qo.__value="recent",Y(Qo,Qo.__value),Zo.__value="custom",Y(Zo,Zo.__value),o(Js,"class","select select-bordered select-sm"),l[8]===void 0&&pl(()=>l[58].call(Js)),o(Ko,"class","form-control"),o(qi,"class","divider my-2"),o(Ua,"class","label-text text-xs font-semibold"),o(Na,"class","label py-1"),$o.__value="timestamp",Y($o,$o.__value),en.__value="duration",Y(en,en.__value),tn.__value="status",Y(tn,tn.__value),o(Ws,"class","select select-bordered select-sm flex-1"),l[6]===void 0&&pl(()=>l[62].call(Ws)),ln.__value="desc",Y(ln,ln.__value),sn.__value="asc",Y(sn,sn.__value),o(so,"class","select select-bordered select-sm w-24"),l[7]===void 0&&pl(()=>l[63].call(so)),o(xo,"class","flex gap-2"),o(Xo,"class","form-control"),o(cl,"class","space-y-3"),o(qo,"role","menu"),o(qo,"tabindex","0"),o(qo,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-80 z-[1]"),o(Mo,"class","dropdown dropdown-end"),o(nn,"stroke-linecap","round"),o(nn,"stroke-linejoin","round"),o(nn,"stroke-width","2"),o(nn,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(Gs,"xmlns","http://www.w3.org/2000/svg"),o(Gs,"class","h-4 w-4"),o(Gs,"fill","none"),o(Gs,"viewBox","0 0 24 24"),o(Gs,"stroke","currentColor"),le(Gs,"animate-spin",l[17]),o(fo,"role","button"),o(fo,"tabindex","0"),o(fo,"class","btn btn-sm btn-ghost gap-2"),o(Xa,"class","label-text"),o(vo,"type","checkbox"),o(vo,"class","toggle toggle-primary toggle-sm"),o(rn,"class","label cursor-pointer"),o(Za,"class","form-control"),o(zi,"class","divider my-2"),o(un,"stroke-linecap","round"),o(un,"stroke-linejoin","round"),o(un,"stroke-width","2"),o(un,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(Ys,"xmlns","http://www.w3.org/2000/svg"),o(Ys,"class","h-4 w-4"),o(Ys,"fill","none"),o(Ys,"viewBox","0 0 24 24"),o(Ys,"stroke","currentColor"),le(Ys,"animate-spin",l[17]),o(Ks,"type","button"),o(Ks,"class","btn btn-sm btn-primary w-full gap-2"),Ks.disabled=l[17],o(os,"class","space-y-3"),o(an,"role","menu"),o(an,"tabindex","0"),o(an,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-72 z-[1]"),o(on,"class","dropdown dropdown-end"),o(cn,"stroke-linecap","round"),o(cn,"stroke-linejoin","round"),o(cn,"stroke-width","2"),o(cn,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(po,"xmlns","http://www.w3.org/2000/svg"),o(po,"class","h-4 w-4"),o(po,"fill","none"),o(po,"viewBox","0 0 24 24"),o(po,"stroke","currentColor"),o(co,"role","button"),o(co,"tabindex","0"),o(co,"class","btn btn-sm btn-secondary gap-2"),o(ho,"role","menu"),o(ho,"tabindex","0"),o(ho,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-32 z-[1]"),o(fn,"class","dropdown dropdown-end"),o(Bs,"class","hidden md:flex xl:hidden items-center gap-2"),o(pn,"stroke-linecap","round"),o(pn,"stroke-linejoin","round"),o(pn,"stroke-width","2"),o(pn,"d","M4 6h16M4 12h16M4 18h16"),o(mo,"xmlns","http://www.w3.org/2000/svg"),o(mo,"class","h-4 w-4"),o(mo,"fill","none"),o(mo,"viewBox","0 0 24 24"),o(mo,"stroke","currentColor"),o(As,"role","button"),o(As,"tabindex","0"),o(As,"class","btn btn-sm btn-ghost gap-1"),o(nr,"class","font-semibold text-sm"),o(ir,"class","label-text text-xs font-semibold"),o(rr,"class","label py-1"),gn.__value="",Y(gn,gn.__value),_n.__value="GET",Y(_n,_n.__value),bn.__value="POST",Y(bn,bn.__value),vn.__value="PUT",Y(vn,vn.__value),kn.__value="DELETE",Y(kn,kn.__value),wn.__value="PATCH",Y(wn,wn.__value),o(Ts,"class","select select-bordered select-sm"),l[2]===void 0&&pl(()=>l[68].call(Ts)),o(mn,"class","form-control"),o(dr,"class","label-text text-xs font-semibold"),o(cr,"class","label py-1"),o(oo,"type","text"),o(oo,"placeholder","200, 404, 500"),o(oo,"class","input input-bordered input-sm"),o(yn,"class","form-control"),o(mr,"class","label-text text-xs font-semibold"),o(hr,"class","label py-1"),En.__value=void 0,Y(En,En.__value),Tn.__value=!0,Y(Tn,Tn.__value),Sn.__value=!1,Y(Sn,Sn.__value),o(Qs,"class","select select-bordered select-sm"),l[4]===void 0&&pl(()=>l[70].call(Qs)),o(Cn,"class","form-control"),o(wr,"class","label-text text-xs font-semibold"),o(kr,"class","label py-1"),Rn.__value="",Y(Rn,Rn.__value),qn.__value="final",Y(qn,qn.__value),Hn.__value="retry",Y(Hn,Hn.__value),Ln.__value="recovery",Y(Ln,Ln.__value),o(Fs,"class","select select-bordered select-sm"),l[5]===void 0&&pl(()=>l[71].call(Fs)),o(Mn,"class","form-control"),o(Rr,"class","label-text text-xs font-semibold"),o(Mr,"class","label py-1"),jn.__value="all",Y(jn,jn.__value),Dn.__value="recent",Y(Dn,Dn.__value),Bn.__value="custom",Y(Bn,Bn.__value),o(Zs,"class","select select-bordered select-sm"),l[8]===void 0&&pl(()=>l[72].call(Zs)),o(Pn,"class","form-control"),o(Dr,"class","label-text text-xs font-semibold"),o(jr,"class","label py-1"),Fn.__value="timestamp",Y(Fn,Fn.__value),zn.__value="duration",Y(zn,zn.__value),On.__value="status",Y(On,On.__value),o(Xs,"class","select select-bordered select-sm flex-1"),l[6]===void 0&&pl(()=>l[76].call(Xs)),Nn.__value="desc",Y(Nn,Nn.__value),Un.__value="asc",Y(Un,Un.__value),o(no,"class","select select-bordered select-sm w-24"),l[7]===void 0&&pl(()=>l[77].call(no)),o(An,"class","flex gap-2"),o(In,"class","form-control"),o(gu,"class","divider my-2"),o(Nr,"class","font-semibold text-sm"),o(Jr,"class","label-text"),o(ko,"type","checkbox"),o(ko,"class","toggle toggle-primary toggle-sm"),o(Vn,"class","label cursor-pointer"),o(Vr,"class","form-control"),o(Jn,"stroke-linecap","round"),o(Jn,"stroke-linejoin","round"),o(Jn,"stroke-width","2"),o(Jn,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o($s,"xmlns","http://www.w3.org/2000/svg"),o($s,"class","h-4 w-4"),o($s,"fill","none"),o($s,"viewBox","0 0 24 24"),o($s,"stroke","currentColor"),le($s,"animate-spin",l[17]),o(xs,"type","button"),o(xs,"class","btn btn-sm btn-primary w-full gap-2"),xs.disabled=l[17],o(wu,"class","divider my-2"),o(Gn,"type","button"),o(Gn,"class","btn btn-sm btn-secondary flex-1 gap-2"),o(Kn,"type","button"),o(Kn,"class","btn btn-sm btn-secondary flex-1 gap-2"),o(Wn,"class","flex gap-2"),o(qt,"class","space-y-3"),o(hn,"role","menu"),o(hn,"tabindex","0"),o(hn,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-80 z-[1]"),o(dn,"class","dropdown dropdown-end"),o(sr,"class","flex md:hidden items-center gap-2"),o(d,"class","flex items-center gap-2 mb-3"),o(f,"class","mb-6"),o(s,"class","p-6")},m(W,be){L(W,s,be),t(s,e),t(e,n),t(n,i),t(s,u),ns&&ns.m(s,null),t(s,c),t(s,f),t(f,d),t(d,p),t(p,m),Y(m,l[1]),t(d,b),t(d,k),t(k,w),t(w,C),t(C,E),t(E,T),t(E,M),Ss&&Ss.m(E,null),t(E,R),t(E,j),t(j,P),t(C,q),t(C,D),t(D,A),t(A,N),t(N,Q),t(D,x),t(D,z),t(z,K),t(D,S),t(D,B),t(B,U),t(D,F),t(D,J),t(J,ie),t(D,ue),t(D,ne),t(ne,$),t(D,te),t(D,ae),t(ae,ee),t(w,G),t(w,pe),t(pe,oe),t(oe,he),t(oe,ye),Ms&&Ms.m(oe,null),t(oe,ze),t(oe,Pe),t(Pe,we),t(pe,Je),t(pe,je),t(je,Le),t(Le,Se),t(Se,fe),t(fe,Ie),t(Le,De),t(Le,se),Y(se,l[3]),t(w,ke),t(w,me),t(me,Ee),t(Ee,Be),t(Ee,nt),Rs&&Rs.m(Ee,null),t(Ee,Ne),t(Ee,Qe),t(Qe,Ye),t(me,de),t(me,Te),t(Te,Ze),t(Ze,Me),t(Me,Ce),t(Te,mt),t(Te,Ge),t(Ge,ce),t(ce,Re),t(Te,dt),t(Te,We),t(We,O),t(O,X),t(w,ft),t(w,Ht),t(Ht,Ke),t(Ke,tt),t(Ke,it),as&&as.m(Ke,null),t(Ke,Oe),t(Ke,Xe),t(Xe,It),t(Ht,gt),t(Ht,wt),t(wt,pt),t(pt,bl),t(bl,at),t(at,St),t(St,Tt),t(bl,vl),t(bl,At),t(At,hl),t(hl,ql),t(At,Jt),t(Jt,Yt),t(At,Qt),t(Qt,Bl),t(At,gl),t(gl,Ql),kt(At,l[5],!0),t(pt,Ft),t(pt,Ll),t(Ll,Vl),t(Vl,Jl),t(Jl,zt),t(Ll,Zl),t(Ll,Lt),t(Lt,Pl),t(Pl,$l),t(Lt,xt),t(xt,es),t(Lt,zl),t(zl,Wl),kt(Lt,l[8],!0),t(pt,Ls),rs&&rs.m(pt,null),t(pt,ol),is&&is.m(pt,null),t(pt,wl),t(pt,nl),t(pt,Ol),t(pt,al),t(al,_l),t(_l,tl),t(tl,Nl),t(al,El),t(al,Wt),t(Wt,Bt),t(Bt,Pt),t(Pt,el),t(Bt,Kt),t(Kt,rl),t(Bt,Xt),t(Xt,Al),kt(Bt,l[6],!0),t(Wt,ts),t(Wt,Xl),t(Xl,xl),t(xl,Ds),t(Xl,ss),t(ss,il),kt(Xl,l[7],!0),t(k,Ot),t(k,lt),t(k,ct),t(k,ll),t(ll,Tl),t(Tl,ul),t(ul,xe),t(xe,bt),t(xe,fl),t(ul,xn),us&&us.m(ul,null),t(Tl,Bu),t(Tl,yo),t(yo,_o),t(_o,aa),t(aa,Co),t(Co,ra),t(ra,li),t(Co,Iu),t(Co,bo),bo.checked=l[12],t(_o,Au),fs&&fs.m(_o,null),t(ll,Fu),t(ll,Ns),t(Ns,Us),t(Us,Eo),t(Ns,zu),t(Ns,si),t(si,oi),t(ll,Ou),t(ll,To),t(To,ao),t(ao,ro),t(ro,So),t(ao,Nu),t(ao,ni),t(ni,ai),t(To,Uu),t(To,io),t(io,ri),t(ri,ca),t(io,Vu),t(io,ii),t(ii,da),t(ll,Ju),cs&&cs.m(ll,null),t(d,Wu),t(d,Bs),t(Bs,Mo),t(Mo,Ps),t(Ps,uo),t(uo,Ro),t(Ps,Gu),t(Ps,ui),t(Ps,Ku),ds&&ds.m(Ps,null),t(Mo,Yu),t(Mo,qo),t(qo,cl),t(cl,Ho),t(Ho,ma),t(ma,ga),t(ga,fi),t(Ho,Qu),t(Ho,Es),t(Es,Lo),t(Lo,ci),t(Es,Po),t(Es,jo),t(Es,Do),t(Es,Bo),t(Es,Io),kt(Es,l[2],!0),t(cl,Zu),t(cl,Ao),t(Ao,va),t(va,ka),t(ka,di),t(Ao,Xu),t(Ao,lo),Y(lo,l[3]),t(cl,xu),t(cl,Fo),t(Fo,ya),t(ya,Ca),t(Ca,pi),t(Fo,$u),t(Fo,Vs),t(Vs,zo),t(zo,hi),t(Vs,Oo),t(Oo,mi),t(Vs,No),t(No,gi),kt(Vs,l[4],!0),t(cl,ef),t(cl,_i),t(cl,tf),t(cl,Uo),t(Uo,Ra),t(Ra,qa),t(qa,bi),t(Uo,lf),t(Uo,Is),t(Is,Vo),t(Vo,vi),t(Is,Jo),t(Jo,ki),t(Is,Wo),t(Wo,wi),t(Is,Go),t(Go,yi),kt(Is,l[5],!0),t(cl,sf),t(cl,Ko),t(Ko,Ba),t(Ba,Ia),t(Ia,Ci),t(Ko,of),t(Ko,Js),t(Js,Yo),t(Yo,Ei),t(Js,Qo),t(Qo,Ti),t(Js,Zo),t(Zo,Si),kt(Js,l[8],!0),t(cl,nf),ps&&ps.m(cl,null),t(cl,Mi),hs&&hs.m(cl,null),t(cl,Ri),t(cl,qi),t(cl,af),t(cl,Xo),t(Xo,Na),t(Na,Ua),t(Ua,Hi),t(Xo,rf),t(Xo,xo),t(xo,Ws),t(Ws,$o),t($o,Li),t(Ws,en),t(en,Pi),t(Ws,tn),t(tn,ji),kt(Ws,l[6],!0),t(xo,uf),t(xo,so),t(so,ln),t(ln,Di),t(so,sn),t(sn,Bi),kt(so,l[7],!0),t(Bs,ff),t(Bs,on),t(on,fo),t(fo,Gs),t(Gs,nn),t(fo,cf),t(fo,Ii),t(on,df),t(on,an),t(an,os),t(os,Za),t(Za,rn),t(rn,Xa),t(Xa,Ai),t(rn,pf),t(rn,vo),vo.checked=l[12],t(os,hf),ms&&ms.m(os,null),t(os,Fi),t(os,zi),t(os,mf),t(os,Ks),t(Ks,Ys),t(Ys,un),t(Ks,gf),t(Ks,Oi),t(os,_f),gs&&gs.m(os,null),t(Bs,bf),t(Bs,fn),t(fn,co),t(co,po),t(po,cn),t(co,vf),t(co,Ni),t(fn,kf),t(fn,ho),t(ho,Ui),t(Ui,tr),t(ho,wf),t(ho,Vi),t(Vi,lr),t(Bs,yf),_s&&_s.m(Bs,null),t(d,Cf),t(d,sr),t(sr,dn),t(dn,As),t(As,mo),t(mo,pn),t(As,Ef),t(As,Ji),t(As,Tf),qs&&qs.m(As,null),t(dn,Sf),t(dn,hn),t(hn,qt),t(qt,nr),t(nr,Wi),t(qt,Mf),t(qt,mn),t(mn,rr),t(rr,ir),t(ir,Gi),t(mn,Rf),t(mn,Ts),t(Ts,gn),t(gn,Ki),t(Ts,_n),t(Ts,bn),t(Ts,vn),t(Ts,kn),t(Ts,wn),kt(Ts,l[2],!0),t(qt,qf),t(qt,yn),t(yn,cr),t(cr,dr),t(dr,Yi),t(yn,Hf),t(yn,oo),Y(oo,l[3]),t(qt,Lf),t(qt,Cn),t(Cn,hr),t(hr,mr),t(mr,Qi),t(Cn,Pf),t(Cn,Qs),t(Qs,En),t(En,Zi),t(Qs,Tn),t(Tn,Xi),t(Qs,Sn),t(Sn,xi),kt(Qs,l[4],!0),t(qt,jf),t(qt,Mn),t(Mn,kr),t(kr,wr),t(wr,$i),t(Mn,Df),t(Mn,Fs),t(Fs,Rn),t(Rn,eu),t(Fs,qn),t(qn,tu),t(Fs,Hn),t(Hn,lu),t(Fs,Ln),t(Ln,su),kt(Fs,l[5],!0),t(qt,Bf),t(qt,Pn),t(Pn,Mr),t(Mr,Rr),t(Rr,ou),t(Pn,If),t(Pn,Zs),t(Zs,jn),t(jn,nu),t(Zs,Dn),t(Dn,au),t(Zs,Bn),t(Bn,ru),kt(Zs,l[8],!0),t(qt,Af),bs&&bs.m(qt,null),t(qt,iu),vs&&vs.m(qt,null),t(qt,uu),t(qt,In),t(In,jr),t(jr,Dr),t(Dr,fu),t(In,Ff),t(In,An),t(An,Xs),t(Xs,Fn),t(Fn,cu),t(Xs,zn),t(zn,du),t(Xs,On),t(On,pu),kt(Xs,l[6],!0),t(An,zf),t(An,no),t(no,Nn),t(Nn,hu),t(no,Un),t(Un,mu),kt(no,l[7],!0),t(qt,Of),t(qt,gu),t(qt,Nf),t(qt,Nr),t(Nr,_u),t(qt,Uf),t(qt,Vr),t(Vr,Vn),t(Vn,Jr),t(Jr,bu),t(Vn,Vf),t(Vn,ko),ko.checked=l[12],t(qt,Jf),ks&&ks.m(qt,null),t(qt,vu),t(qt,xs),t(xs,$s),t($s,Jn),t(xs,Wf),t(xs,ku),t(qt,Gf),t(qt,wu),t(qt,Kf),t(qt,Wn),t(Wn,Gn),t(Wn,Yf),t(Wn,Kn),t(qt,Qf),ws&&ws.m(qt,null),t(f,Zf),ys&&ys.m(f,null),t(s,Xf),eo.m(s,null),L(W,yu,be),Fl&&Fl.m(W,be),L(W,$n,be),Ae=!0,Cu||(xf=[V(m,"input",l[32]),V(N,"click",l[33]),V(K,"click",l[34]),V(U,"click",l[35]),V(ie,"click",l[36]),V($,"click",l[37]),V(ee,"click",l[38]),V(se,"input",l[39]),V(Me,"click",l[40]),V(ce,"click",l[41]),V(O,"click",l[42]),V(At,"change",l[43]),V(Lt,"change",l[44]),V(Bt,"change",l[48]),V(Xl,"change",l[49]),V(bo,"change",l[50]),V(Ns,"click",l[29]),V(ca,"click",l[52]),V(da,"click",l[53]),V(Es,"change",l[54]),V(lo,"input",l[55]),V(Vs,"change",l[56]),V(Is,"change",l[57]),V(Js,"change",l[58]),V(Ws,"change",l[62]),V(so,"change",l[63]),V(vo,"change",l[64]),V(Ks,"click",l[29]),V(tr,"click",l[66]),V(lr,"click",l[67]),V(Ts,"change",l[68]),V(oo,"input",l[69]),V(Qs,"change",l[70]),V(Fs,"change",l[71]),V(Zs,"change",l[72]),V(Xs,"change",l[76]),V(no,"change",l[77]),V(ko,"change",l[78]),V(xs,"click",l[29]),V(Gn,"click",l[80]),V(Kn,"click",l[81])],Cu=!0)},p(W,be){(!Ae||be[0]&16777216)&&a!==(a=W[24]("logs.title")+"")&&v(i,a),W[22]?ns?ns.p(W,be):(ns=Kd(W),ns.c(),ns.m(s,c)):ns&&(ns.d(1),ns=null),(!Ae||be[0]&16777216&&g!==(g=W[24]("logs.searchPlaceholder")))&&o(m,"placeholder",g),be[0]&2&&m.value!==W[1]&&Y(m,W[1]),(!Ae||be[0]&16777216)&&y!==(y=W[24]("logs.method")+"")&&v(T,y),W[2]?Ss||(Ss=Yd(),Ss.c(),Ss.m(E,R)):Ss&&(Ss.d(1),Ss=null),(!Ae||be[0]&4&&I!==(I="btn btn-sm "+(W[2]?"btn-primary":"btn-ghost")+" gap-1"))&&o(E,"class",I),(!Ae||be[0]&16777216)&&Z!==(Z=W[24]("logs.allMethods")+"")&&v(Q,Z),(!Ae||be[0]&4)&&le(K,"active",W[2]==="GET"),(!Ae||be[0]&4)&&le(U,"active",W[2]==="POST"),(!Ae||be[0]&4)&&le(ie,"active",W[2]==="PUT"),(!Ae||be[0]&4)&&le($,"active",W[2]==="DELETE"),(!Ae||be[0]&4)&&le(ee,"active",W[2]==="PATCH"),(!Ae||be[0]&16777216)&&ge!==(ge=W[24]("logs.status")+"")&&v(he,ge),W[3]?Ms||(Ms=Qd(),Ms.c(),Ms.m(oe,ze)):Ms&&(Ms.d(1),Ms=null),(!Ae||be[0]&8&&Fe!==(Fe="btn btn-sm "+(W[3]?"btn-primary":"btn-ghost")+" gap-1"))&&o(oe,"class",Fe),(!Ae||be[0]&16777216)&&_e!==(_e=W[24]("logs.statusPlaceholder")+"")&&v(Ie,_e),be[0]&8&&se.value!==W[3]&&Y(se,W[3]),(!Ae||be[0]&16777216)&&Ve!==(Ve=W[24]("logs.result")+"")&&v(Be,Ve),W[4]!==void 0?Rs||(Rs=Zd(),Rs.c(),Rs.m(Ee,Ne)):Rs&&(Rs.d(1),Rs=null),(!Ae||be[0]&16&&ve!==(ve="btn btn-sm "+(W[4]!==void 0?"btn-primary":"btn-ghost")+" gap-1"))&&o(Ee,"class",ve),(!Ae||be[0]&16777216)&&Ue!==(Ue=W[24]("logs.allResults")+"")&&v(Ce,Ue),(!Ae||be[0]&16777216)&&qe!==(qe=W[24]("logs.success")+"")&&v(Re,qe),(!Ae||be[0]&16)&&le(ce,"active",W[4]===!0),(!Ae||be[0]&16777216)&&He!==(He=W[24]("logs.failed")+"")&&v(X,He),(!Ae||be[0]&16)&&le(O,"active",W[4]===!1),(!Ae||be[0]&16777216)&&_t!==(_t=W[24]("logs.moreFilters")+"")&&v(tt,_t),W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?as?as.p(W,be):(as=Xd(W),as.c(),as.m(Ke,Oe)):as&&(as.d(1),as=null),(!Ae||be[0]&992&&rt!==(rt="btn btn-sm "+(W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"))&&o(Ke,"class",rt),(!Ae||be[0]&16777216)&&ht!==(ht=W[24]("logs.requestTypeFilter")+"")&&v(Tt,ht),(!Ae||be[0]&16777216)&&ml!==(ml=W[24]("logs.requestType_all")+"")&&v(ql,ml),(!Ae||be[0]&16777216)&&Yl!==(Yl=W[24]("logs.requestType_final")+"")&&v(Yt,Yl),(!Ae||be[0]&16777216)&&Hl!==(Hl=W[24]("logs.requestType_retry")+"")&&v(Bl,Hl),(!Ae||be[0]&16777216)&&sl!==(sl=W[24]("logs.requestType_recovery")+"")&&v(Ql,sl),be[0]&32&&kt(At,W[5]),(!Ae||be[0]&16777216)&&Cl!==(Cl=W[24]("logs.timeRange")+"")&&v(zt,Cl),(!Ae||be[0]&16777216)&&jl!==(jl=W[24]("logs.allTime")+"")&&v($l,jl),(!Ae||be[0]&16777216)&&kl!==(kl=W[24]("logs.recentTime")+"")&&v(es,kl),(!Ae||be[0]&16777216)&&Il!==(Il=W[24]("logs.customTime")+"")&&v(Wl,Il),be[0]&256&&kt(Lt,W[8]),W[8]==="recent"?rs?rs.p(W,be):(rs=xd(W),rs.c(),rs.m(pt,ol)):rs&&(rs.d(1),rs=null),W[8]==="custom"?is?is.p(W,be):(is=$d(W),is.c(),is.m(pt,wl)):is&&(is.d(1),is=null),(!Ae||be[0]&16777216)&&Dl!==(Dl=W[24]("logs.sortBy")+"")&&v(Nl,Dl),(!Ae||be[0]&16777216)&&$t!==($t=W[24]("logs.sortByTimestamp")+"")&&v(el,$t),(!Ae||be[0]&16777216)&&Zt!==(Zt=W[24]("logs.sortByDuration")+"")&&v(rl,Zt),(!Ae||be[0]&16777216)&&$e!==($e=W[24]("logs.sortByStatus")+"")&&v(Al,$e),be[0]&64&&kt(Bt,W[6]),(!Ae||be[0]&16777216)&&ls!==(ls=W[24]("logs.desc")+"")&&v(Ds,ls),(!Ae||be[0]&16777216)&&Os!==(Os=W[24]("logs.asc")+"")&&v(il,Os),be[0]&128&&kt(Xl,W[7]),W[12]?us?us.p(W,be):(us=ep(W),us.c(),us.m(ul,null)):us&&(us.d(1),us=null),(!Ae||be[0]&16777216)&&ia!==(ia=W[24]("logs.autoRefresh")+"")&&v(li,ia),be[0]&4096&&(bo.checked=W[12]),W[12]?fs?fs.p(W,be):(fs=tp(W),fs.c(),fs.m(_o,null)):fs&&(fs.d(1),fs=null),(!Ae||be[0]&131072)&&le(Us,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&ua!==(ua=W[24]("common.refresh")+"")&&v(oi,ua),(!Ae||be[0]&131072)&&(Ns.disabled=W[17]),(!Ae||be[0]&16777216)&&fa!==(fa=W[24]("logs.export")+"")&&v(ai,fa),W[23]>0?cs?cs.p(W,be):(cs=lp(W),cs.c(),cs.m(ll,null)):cs&&(cs.d(1),cs=null),(!Ae||be[0]&16777216)&&pa!==(pa=W[24]("logs.filters")+"")&&v(ui,pa),W[2]||W[3]||W[4]!==void 0||W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?ds?ds.p(W,be):(ds=sp(W),ds.c(),ds.m(Ps,null)):ds&&(ds.d(1),ds=null),(!Ae||be[0]&1020&&ha!==(ha="btn btn-sm "+(W[2]||W[3]||W[4]!==void 0||W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"))&&o(Ps,"class",ha),(!Ae||be[0]&16777216)&&_a!==(_a=W[24]("logs.method")+"")&&v(fi,_a),(!Ae||be[0]&16777216)&&ba!==(ba=W[24]("logs.allMethods")+"")&&v(ci,ba),be[0]&4&&kt(Es,W[2]),(!Ae||be[0]&16777216)&&wa!==(wa=W[24]("logs.status")+"")&&v(di,wa),be[0]&8&&lo.value!==W[3]&&Y(lo,W[3]),(!Ae||be[0]&16777216)&&Ea!==(Ea=W[24]("logs.result")+"")&&v(pi,Ea),(!Ae||be[0]&16777216)&&Ta!==(Ta=W[24]("logs.allResults")+"")&&v(hi,Ta),(!Ae||be[0]&16777216)&&Sa!==(Sa=W[24]("logs.success")+"")&&v(mi,Sa),(!Ae||be[0]&16777216)&&Ma!==(Ma=W[24]("logs.failed")+"")&&v(gi,Ma),be[0]&16&&kt(Vs,W[4]),(!Ae||be[0]&16777216)&&Ha!==(Ha=W[24]("logs.requestTypeFilter")+"")&&v(bi,Ha),(!Ae||be[0]&16777216)&&La!==(La=W[24]("logs.requestType_all")+"")&&v(vi,La),(!Ae||be[0]&16777216)&&Pa!==(Pa=W[24]("logs.requestType_final")+"")&&v(ki,Pa),(!Ae||be[0]&16777216)&&ja!==(ja=W[24]("logs.requestType_retry")+"")&&v(wi,ja),(!Ae||be[0]&16777216)&&Da!==(Da=W[24]("logs.requestType_recovery")+"")&&v(yi,Da),be[0]&32&&kt(Is,W[5]),(!Ae||be[0]&16777216)&&Aa!==(Aa=W[24]("logs.timeRange")+"")&&v(Ci,Aa),(!Ae||be[0]&16777216)&&Fa!==(Fa=W[24]("logs.allTime")+"")&&v(Ei,Fa),(!Ae||be[0]&16777216)&&za!==(za=W[24]("logs.recentTime")+"")&&v(Ti,za),(!Ae||be[0]&16777216)&&Oa!==(Oa=W[24]("logs.customTime")+"")&&v(Si,Oa),be[0]&256&&kt(Js,W[8]),W[8]==="recent"?ps?ps.p(W,be):(ps=op(W),ps.c(),ps.m(cl,Mi)):ps&&(ps.d(1),ps=null),W[8]==="custom"?hs?hs.p(W,be):(hs=np(W),hs.c(),hs.m(cl,Ri)):hs&&(hs.d(1),hs=null),(!Ae||be[0]&16777216)&&Va!==(Va=W[24]("logs.sortBy")+"")&&v(Hi,Va),(!Ae||be[0]&16777216)&&Ja!==(Ja=W[24]("logs.sortByTimestamp")+"")&&v(Li,Ja),(!Ae||be[0]&16777216)&&Wa!==(Wa=W[24]("logs.sortByDuration")+"")&&v(Pi,Wa),(!Ae||be[0]&16777216)&&Ga!==(Ga=W[24]("logs.sortByStatus")+"")&&v(ji,Ga),be[0]&64&&kt(Ws,W[6]),(!Ae||be[0]&16777216)&&Ka!==(Ka=W[24]("logs.desc")+"")&&v(Di,Ka),(!Ae||be[0]&16777216)&&Ya!==(Ya=W[24]("logs.asc")+"")&&v(Bi,Ya),be[0]&128&&kt(so,W[7]),(!Ae||be[0]&131072)&&le(Gs,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&Qa!==(Qa=W[24]("common.refresh")+"")&&v(Ii,Qa),(!Ae||be[0]&16777216)&&xa!==(xa=W[24]("logs.autoRefresh")+"")&&v(Ai,xa),be[0]&4096&&(vo.checked=W[12]),W[12]?ms?ms.p(W,be):(ms=ap(W),ms.c(),ms.m(os,Fi)):ms&&(ms.d(1),ms=null),(!Ae||be[0]&131072)&&le(Ys,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&$a!==($a=W[24]("common.refresh")+"")&&v(Oi,$a),(!Ae||be[0]&131072)&&(Ks.disabled=W[17]),W[21]>0?gs?gs.p(W,be):(gs=rp(W),gs.c(),gs.m(os,null)):gs&&(gs.d(1),gs=null),(!Ae||be[0]&16777216)&&er!==(er=W[24]("logs.export")+"")&&v(Ni,er),W[23]>0?_s?_s.p(W,be):(_s=ip(W),_s.c(),_s.m(Bs,null)):_s&&(_s.d(1),_s=null),(!Ae||be[0]&16777216)&&or!==(or=W[24]("logs.actions")+"")&&v(Ji,or),W[2]||W[3]||W[4]!==void 0||W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"||W[12]?qs||(qs=up(),qs.c(),qs.m(As,null)):qs&&(qs.d(1),qs=null),(!Ae||be[0]&16777216)&&ar!==(ar=W[24]("logs.filters")+"")&&v(Wi,ar),(!Ae||be[0]&16777216)&&ur!==(ur=W[24]("logs.method")+"")&&v(Gi,ur),(!Ae||be[0]&16777216)&&fr!==(fr=W[24]("logs.allMethods")+"")&&v(Ki,fr),be[0]&4&&kt(Ts,W[2]),(!Ae||be[0]&16777216)&&pr!==(pr=W[24]("logs.status")+"")&&v(Yi,pr),be[0]&8&&oo.value!==W[3]&&Y(oo,W[3]),(!Ae||be[0]&16777216)&&gr!==(gr=W[24]("logs.result")+"")&&v(Qi,gr),(!Ae||be[0]&16777216)&&_r!==(_r=W[24]("logs.allResults")+"")&&v(Zi,_r),(!Ae||be[0]&16777216)&&br!==(br=W[24]("logs.success")+"")&&v(Xi,br),(!Ae||be[0]&16777216)&&vr!==(vr=W[24]("logs.failed")+"")&&v(xi,vr),be[0]&16&&kt(Qs,W[4]),(!Ae||be[0]&16777216)&&yr!==(yr=W[24]("logs.requestTypeFilter")+"")&&v($i,yr),(!Ae||be[0]&16777216)&&Cr!==(Cr=W[24]("logs.requestType_all")+"")&&v(eu,Cr),(!Ae||be[0]&16777216)&&Er!==(Er=W[24]("logs.requestType_final")+"")&&v(tu,Er),(!Ae||be[0]&16777216)&&Tr!==(Tr=W[24]("logs.requestType_retry")+"")&&v(lu,Tr),(!Ae||be[0]&16777216)&&Sr!==(Sr=W[24]("logs.requestType_recovery")+"")&&v(su,Sr),be[0]&32&&kt(Fs,W[5]),(!Ae||be[0]&16777216)&&qr!==(qr=W[24]("logs.timeRange")+"")&&v(ou,qr),(!Ae||be[0]&16777216)&&Hr!==(Hr=W[24]("logs.allTime")+"")&&v(nu,Hr),(!Ae||be[0]&16777216)&&Lr!==(Lr=W[24]("logs.recentTime")+"")&&v(au,Lr),(!Ae||be[0]&16777216)&&Pr!==(Pr=W[24]("logs.customTime")+"")&&v(ru,Pr),be[0]&256&&kt(Zs,W[8]),W[8]==="recent"?bs?bs.p(W,be):(bs=fp(W),bs.c(),bs.m(qt,iu)):bs&&(bs.d(1),bs=null),W[8]==="custom"?vs?vs.p(W,be):(vs=cp(W),vs.c(),vs.m(qt,uu)):vs&&(vs.d(1),vs=null),(!Ae||be[0]&16777216)&&Br!==(Br=W[24]("logs.sortBy")+"")&&v(fu,Br),(!Ae||be[0]&16777216)&&Ir!==(Ir=W[24]("logs.sortByTimestamp")+"")&&v(cu,Ir),(!Ae||be[0]&16777216)&&Ar!==(Ar=W[24]("logs.sortByDuration")+"")&&v(du,Ar),(!Ae||be[0]&16777216)&&Fr!==(Fr=W[24]("logs.sortByStatus")+"")&&v(pu,Fr),be[0]&64&&kt(Xs,W[6]),(!Ae||be[0]&16777216)&&zr!==(zr=W[24]("logs.desc")+"")&&v(hu,zr),(!Ae||be[0]&16777216)&&Or!==(Or=W[24]("logs.asc")+"")&&v(mu,Or),be[0]&128&&kt(no,W[7]),(!Ae||be[0]&16777216)&&Ur!==(Ur=W[24]("common.refresh")+"")&&v(_u,Ur),(!Ae||be[0]&16777216)&&Wr!==(Wr=W[24]("logs.autoRefresh")+"")&&v(bu,Wr),be[0]&4096&&(ko.checked=W[12]),W[12]?ks?ks.p(W,be):(ks=dp(W),ks.c(),ks.m(qt,vu)):ks&&(ks.d(1),ks=null),(!Ae||be[0]&131072)&&le($s,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&Gr!==(Gr=W[24]("common.refresh")+"")&&v(ku,Gr),(!Ae||be[0]&131072)&&(xs.disabled=W[17]),W[23]>0?ws?ws.p(W,be):(ws=pp(W),ws.c(),ws.m(qt,null)):ws&&(ws.d(1),ws=null),W[23]>0?ys?ys.p(W,be):(ys=hp(W),ys.c(),ys.m(f,null)):ys&&(ys.d(1),ys=null),Kr===(Kr=$f(W))&&eo?eo.p(W,be):(eo.d(1),eo=Kr(W),eo&&(eo.c(),eo.m(s,null))),W[20]&&W[19]?Fl?(Fl.p(W,be),be[0]&1572864&&et(Fl,1)):(Fl=Tp(W),Fl.c(),et(Fl,1),Fl.m($n.parentNode,$n)):Fl&&(Gl(),st(Fl,1,1,()=>{Fl=null}),Kl())},i(W){Ae||(et(Fl),Ae=!0)},o(W){st(Fl),Ae=!1},d(W){W&&(H(s),H(yu),H($n)),ns&&ns.d(),Ss&&Ss.d(),Ms&&Ms.d(),Rs&&Rs.d(),as&&as.d(),rs&&rs.d(),is&&is.d(),us&&us.d(),fs&&fs.d(),cs&&cs.d(),ds&&ds.d(),ps&&ps.d(),hs&&hs.d(),ms&&ms.d(),gs&&gs.d(),_s&&_s.d(),qs&&qs.d(),bs&&bs.d(),vs&&vs.d(),ks&&ks.d(),ws&&ws.d(),ys&&ys.d(),eo.d(),Fl&&Fl.d(W),Cu=!1,vt(xf)}}}let Yn=50;function Sp(l){return new Date(l).toLocaleString()}function Mp(l){return l<1e3?\`\${l}ms\`:\`\${(l/1e3).toFixed(2)}s\`}function Rp(l){return l<300?"badge-success":l<400?"badge-info":l<500?"badge-warning":"badge-error"}function qp(l){return l==="final"?"badge-success":l==="retry"?"badge-warning":l==="recovery"?"badge-info":"badge-ghost"}function Rg(l,s,e){let n,a;Dt(l,Rt,at=>e(24,a=at));let i=1,u="",c="",f="",d,p="",m="timestamp",g="desc",b="recent",k=1,w="",C="",E=[],y=0,T=0,M=!0,R=null,j=null,P=!1,I=!0,q="30s",D=null,A=0,N=!1;const Z={"5s":5e3,"10s":1e4,"30s":3e4,"60s":6e4};let Q="",x="";async function z(){try{e(17,M=!0),e(18,R=null);const at={page:i,limit:Yn,sortBy:m,sortOrder:g};u.trim()&&(at.searchTerm=u.trim()),c&&(at.method=c),f&&(at.status=parseInt(f)),d!==void 0&&(at.success=d),p&&(at.requestType=p),b==="recent"?(at.endTime=Date.now(),at.startTime=Date.now()-k*60*60*1e3):b==="custom"&&(w&&(at.startTime=new Date(w).getTime()),C&&(at.endTime=new Date(C).getTime()));const St=await b2(at);e(14,E=St.data),e(15,y=St.total),e(16,T=St.totalPages)}catch(at){e(18,R=at.message)}finally{e(17,M=!1)}}async function K(at){try{const St={};u.trim()&&(St.searchTerm=u.trim()),c&&(St.method=c),f&&(St.status=parseInt(f)),d!==void 0&&(St.success=d),p&&(St.requestType=p),b==="recent"?(St.endTime=Date.now(),St.startTime=Date.now()-k*60*60*1e3):b==="custom"&&(w&&(St.startTime=new Date(w).getTime()),C&&(St.endTime=new Date(C).getTime()));const ht=await v2(St,at),Tt=URL.createObjectURL(ht),vl=document.createElement("a");vl.href=Tt,vl.download=\`access-logs-\${Date.now()}.\${at}\`,vl.click(),URL.revokeObjectURL(Tt)}catch(St){alert(\`Export failed: \${St.message}\`)}}function S(at){e(19,j=at),e(20,P=!0)}function B(at){return at?a(\`logs.requestType_\${at}\`):"-"}function U(){e(1,u=""),e(2,c=""),e(3,f=""),e(4,d=void 0),e(5,p=""),e(8,b="recent"),e(9,k=1),e(10,w=""),e(11,C=""),e(6,m="timestamp"),e(7,g="desc"),e(0,i=1)}function F(){return!!(u||c||f||d!==void 0||p)}function J(){if(D&&clearInterval(D),I){const at=Z[q];D=window.setInterval(()=>{document.visibilityState==="visible"&&(F()?e(22,N=!0):(z(),e(21,A=Date.now()),e(22,N=!1)))},at)}}function ie(){D&&(clearInterval(D),D=null)}async function ue(){await z(),e(21,A=Date.now()),e(22,N=!1)}function ne(){if(document.visibilityState==="visible"){const at=Date.now()-A,St=Z[q];at>=St&&z(),I&&J()}else ie()}Hs(()=>{localStorage.getItem("logsAdvancedFiltersExpanded");const at=localStorage.getItem("logsRefreshInterval");at&&e(13,q=at);const St=localStorage.getItem("logsAutoRefresh");St!==null&&e(12,I=St==="true"),z(),J(),document.addEventListener("visibilitychange",ne)}),Xn(()=>{ie(),document.removeEventListener("visibilitychange",ne)});function $(){u=this.value,e(1,u)}const te=()=>e(2,c=""),ae=()=>e(2,c="GET"),ee=()=>e(2,c="POST"),G=()=>e(2,c="PUT"),pe=()=>e(2,c="DELETE"),oe=()=>e(2,c="PATCH");function ge(){f=this.value,e(3,f)}const he=()=>e(4,d=void 0),ye=()=>e(4,d=!0),ze=()=>e(4,d=!1);function Pe(){p=dl(this),e(5,p)}function we(){b=dl(this),e(8,b)}function Fe(){k=Mt(this.value),e(9,k)}function Je(){w=this.value,e(10,w)}function je(){C=this.value,e(11,C)}function Le(){m=dl(this),e(6,m)}function Se(){g=dl(this),e(7,g)}function fe(){I=this.checked,e(12,I)}function _e(){q=dl(this),e(13,q)}const Ie=()=>K("json"),De=()=>K("csv");function se(){c=dl(this),e(2,c)}function ke(){f=this.value,e(3,f)}function me(){d=dl(this),e(4,d)}function Ee(){p=dl(this),e(5,p)}function Ve(){b=dl(this),e(8,b)}function Be(){k=Mt(this.value),e(9,k)}function nt(){w=this.value,e(10,w)}function Ne(){C=this.value,e(11,C)}function Qe(){m=dl(this),e(6,m)}function Ye(){g=dl(this),e(7,g)}function ve(){I=this.checked,e(12,I)}function de(){q=dl(this),e(13,q)}const Te=()=>K("json"),Ze=()=>K("csv");function Me(){c=dl(this),e(2,c)}function Ue(){f=this.value,e(3,f)}function Ce(){d=dl(this),e(4,d)}function mt(){p=dl(this),e(5,p)}function Ge(){b=dl(this),e(8,b)}function ce(){k=Mt(this.value),e(9,k)}function qe(){w=this.value,e(10,w)}function Re(){C=this.value,e(11,C)}function dt(){m=dl(this),e(6,m)}function We(){g=dl(this),e(7,g)}function O(){I=this.checked,e(12,I)}function He(){q=dl(this),e(13,q)}const X=()=>K("json"),ft=()=>K("csv"),Ht=()=>e(1,u=""),Ke=()=>e(2,c=""),_t=()=>e(3,f=""),tt=()=>e(4,d=void 0),it=()=>e(5,p=""),Oe=()=>e(9,k=1),Xe=()=>{e(8,b="recent"),e(10,w=""),e(11,C="")},It=()=>e(8,b="recent"),rt=()=>{e(6,m="timestamp"),e(7,g="desc")},gt=at=>S(at),wt=()=>e(0,i=i-1),pt=()=>e(0,i=i+1),bl=()=>{e(20,P=!1),e(19,j=null)};return l.$$.update=()=>{if(l.$$.dirty[0]&4096&&(I?J():ie()),l.$$.dirty[0]&12288&&(localStorage.setItem("logsRefreshInterval",q),localStorage.setItem("logsAutoRefresh",String(I))),l.$$.dirty[0]&1022&&e(23,n=[u.trim(),c,f,d!==void 0,p,b!=="all"&&b!=="recent"||k!==1,m!=="timestamp"||g!=="desc"].filter(Boolean).length),l.$$.dirty[0]&1073742846){const at=JSON.stringify({limit:Yn,searchTerm:u,method:c,statusFilter:f,successFilter:d,requestTypeFilter:p,sortBy:m,sortOrder:g,timeRangeType:b,recentHours:k});Q&&at!==Q&&e(0,i=1),e(30,Q=at)}if(l.$$.dirty[0]&3328|l.$$.dirty[1]&1){const at=JSON.stringify({customStartTime:w,customEndTime:C});b==="custom"&&x&&at!==x&&e(0,i=1),e(31,x=at)}l.$$.dirty[0]&4095&&z()},[i,u,c,f,d,p,m,g,b,k,w,C,I,q,E,y,T,M,R,j,P,A,N,n,a,K,S,B,U,ue,Q,x,$,te,ae,ee,G,pe,oe,ge,he,ye,ze,Pe,we,Fe,Je,je,Le,Se,fe,_e,Ie,De,se,ke,me,Ee,Ve,Be,nt,Ne,Qe,Ye,ve,de,Te,Ze,Me,Ue,Ce,mt,Ge,ce,qe,Re,dt,We,O,He,X,ft,Ht,Ke,_t,tt,it,Oe,Xe,It,rt,gt,wt,pt,bl]}class qg extends Nt{constructor(s){super(),Ut(this,s,Rg,Mg,Vt,{},null,[-1,-1,-1,-1])}}async function Hg(l){return yl.post("/auth/login",{token:l})}function Hp(l){let s,e,n;return{c(){s=r("div"),e=r("span"),n=_(l[2]),o(e,"class","label-text-alt text-error"),o(s,"class","label")},m(a,i){L(a,s,i),t(s,e),t(e,n)},p(a,i){i&4&&v(n,a[2])},d(a){a&&H(s)}}}function Lg(l){let s,e,n,a,i,u,c,f,d=l[3]("login.title")+"",p,m,g,b=l[3]("login.subtitle")+"",k,w,C,E,y,T=l[3]("login.token")+"",M,R,j,P,I,q,D,A,N=(l[1]?l[3]("login.loggingIn"):l[3]("login.submit"))+"",Z,Q,x,z,K,S=l[2]&&Hp(l);return{c(){s=r("div"),e=r("div"),n=r("div"),a=r("div"),i=re("svg"),u=re("path"),c=h(),f=r("h1"),p=_(d),m=h(),g=r("p"),k=_(b),w=h(),C=r("div"),E=r("label"),y=r("span"),M=_(T),R=h(),j=r("input"),I=h(),S&&S.c(),q=h(),D=r("div"),A=r("button"),Z=_(N),Q=h(),x=r("div"),x.textContent="Bungee Reverse Proxy",o(u,"stroke-linecap","round"),o(u,"stroke-linejoin","round"),o(u,"stroke-width","2"),o(u,"d","M13 10V3L4 14h7v7l9-11h-7z"),o(i,"xmlns","http://www.w3.org/2000/svg"),o(i,"class","h-16 w-16 text-primary mb-4"),o(i,"fill","none"),o(i,"viewBox","0 0 24 24"),o(i,"stroke","currentColor"),o(f,"class","text-3xl font-bold text-center"),o(g,"class","text-sm text-base-content/60 text-center mt-2"),o(a,"class","flex flex-col items-center mb-6"),o(y,"class","label-text"),o(E,"class","label"),o(E,"for","token-input"),o(j,"id","token-input"),o(j,"type","password"),o(j,"placeholder",P=l[3]("login.tokenPlaceholder")),o(j,"class","input input-bordered w-full"),j.disabled=l[1],o(j,"autocomplete","off"),le(j,"input-error",!!l[2]),o(C,"class","form-control w-full"),o(A,"class","btn btn-primary"),A.disabled=l[1],le(A,"loading",l[1]),o(D,"class","form-control mt-6"),o(x,"class","divider text-xs opacity-50 mt-6"),o(n,"class","card-body"),o(e,"class","card w-full max-w-md bg-base-100 shadow-2xl svelte-1qok2wg"),o(s,"class","min-h-screen bg-base-200 flex items-center justify-center p-4")},m(B,U){L(B,s,U),t(s,e),t(e,n),t(n,a),t(a,i),t(i,u),t(a,c),t(a,f),t(f,p),t(a,m),t(a,g),t(g,k),t(n,w),t(n,C),t(C,E),t(E,y),t(y,M),t(C,R),t(C,j),Y(j,l[0]),t(C,I),S&&S.m(C,null),t(n,q),t(n,D),t(D,A),t(A,Z),t(n,Q),t(n,x),z||(K=[V(j,"input",l[6]),V(j,"keypress",l[5]),V(A,"click",l[4])],z=!0)},p(B,[U]){U&8&&d!==(d=B[3]("login.title")+"")&&v(p,d),U&8&&b!==(b=B[3]("login.subtitle")+"")&&v(k,b),U&8&&T!==(T=B[3]("login.token")+"")&&v(M,T),U&8&&P!==(P=B[3]("login.tokenPlaceholder"))&&o(j,"placeholder",P),U&2&&(j.disabled=B[1]),U&1&&j.value!==B[0]&&Y(j,B[0]),U&4&&le(j,"input-error",!!B[2]),B[2]?S?S.p(B,U):(S=Hp(B),S.c(),S.m(C,null)):S&&(S.d(1),S=null),U&10&&N!==(N=(B[1]?B[3]("login.loggingIn"):B[3]("login.submit"))+"")&&v(Z,N),U&2&&(A.disabled=B[1]),U&2&&le(A,"loading",B[1])},i:ot,o:ot,d(B){B&&H(s),S&&S.d(),z=!1,vt(K)}}}function Pg(l,s,e){let n;Dt(l,Rt,p=>e(3,n=p));let a="",i=!1,u="";async function c(){if(!a.trim()){e(2,u=n("login.required"));return}e(1,i=!0),e(2,u="");try{const p=await Hg(a);p.success?(q0(a),jt.show(n("login.success"),"success"),window.location.hash="#/"):e(2,u=p.error||n("login.unauthorized"))}catch(p){e(2,u=n("login.failed",{values:{error:p.message}}))}finally{e(1,i=!1)}}function f(p){p.key==="Enter"&&!i&&c()}function d(){a=this.value,e(0,a)}return[a,i,u,n,c,f,d]}class jg extends Nt{constructor(s){super(),Ut(this,s,Pg,Lg,Vt,{})}}function Dg(l){let s,e,n=l[0]("notFound.title")+"",a,i,u,c=l[0]("notFound.message")+"",f,d,p,m=l[0]("notFound.goHome")+"",g;return{c(){s=r("div"),e=r("h1"),a=_(n),i=h(),u=r("p"),f=_(c),d=h(),p=r("a"),g=_(m),o(e,"class","text-6xl font-bold mb-4"),o(u,"class","text-2xl mb-8"),o(p,"href","/__ui/#/"),o(p,"class","btn btn-primary"),o(s,"class","flex flex-col items-center justify-center h-screen")},m(b,k){L(b,s,k),t(s,e),t(e,a),t(s,i),t(s,u),t(u,f),t(s,d),t(s,p),t(p,g)},p(b,[k]){k&1&&n!==(n=b[0]("notFound.title")+"")&&v(a,n),k&1&&c!==(c=b[0]("notFound.message")+"")&&v(f,c),k&1&&m!==(m=b[0]("notFound.goHome")+"")&&v(g,m)},i:ot,o:ot,d(b){b&&H(s)}}}function Bg(l,s,e){let n;return Dt(l,Rt,a=>e(0,n=a)),[n]}class Ig extends Nt{constructor(s){super(),Ut(this,s,Bg,Dg,Vt,{})}}function Lp(l,s,e){const n=l.slice();return n[3]=s[e],n}function Pp(l,s){let e,n,a;function i(){return s[2](s[3])}return n=new yh({props:{message:s[3].message,type:s[3].type,duration:s[3].duration}}),n.$on("close",i),{key:l,first:null,c(){e=Ul(),Et(n.$$.fragment),this.first=e},m(u,c){L(u,e,c),Ct(n,u,c),a=!0},p(u,c){s=u;const f={};c&1&&(f.message=s[3].message),c&1&&(f.type=s[3].type),c&1&&(f.duration=s[3].duration),n.$set(f)},i(u){a||(et(n.$$.fragment,u),a=!0)},o(u){st(n.$$.fragment,u),a=!1},d(u){u&&H(e),yt(n,u)}}}function Ag(l){let s=[],e=new Map,n,a,i=ut(l[0]);const u=c=>c[3].id;for(let c=0;c<i.length;c+=1){let f=Lp(l,i,c),d=u(f);e.set(d,s[c]=Pp(d,f))}return{c(){for(let c=0;c<s.length;c+=1)s[c].c();n=Ul()},m(c,f){for(let d=0;d<s.length;d+=1)s[d]&&s[d].m(c,f);L(c,n,f),a=!0},p(c,[f]){f&3&&(i=ut(c[0]),Gl(),s=Ru(s,f,u,1,c,i,e,n.parentNode,d0,Pp,n,Lp),Kl())},i(c){if(!a){for(let f=0;f<i.length;f+=1)et(s[f]);a=!0}},o(c){for(let f=0;f<s.length;f+=1)st(s[f]);a=!1},d(c){c&&H(n);for(let f=0;f<s.length;f+=1)s[f].d(c)}}}function Fg(l,s,e){let n;Dt(l,jt,u=>e(0,n=u));function a(u){jt.remove(u)}return[n,a,u=>a(u.id)]}class zg extends Nt{constructor(s){super(),Ut(this,s,Fg,Ag,Vt,{})}}function jp(l,s,e){const n=l.slice();return n[11]=s[e],n}function Og(l){let s,e,n,a,i,u,c,f,d,p,m,g,b=l[0]("nav.dashboard")+"",k,w,C,E,y,T,M,R,j=l[0]("nav.routes")+"",P,I,q,D,A,N,Z,Q,x=l[0]("nav.logs")+"",z,K,S,B,U,F,J,ie,ue,ne=l[0]("nav.configuration")+"",$,te,ae,ee,G,pe,oe,ge,he=Qr.find(l[8])?.name+"",ye,ze,Pe,we,Fe,Je,je,Le,Se,fe=ut(Qr),_e=[];for(let me=0;me<fe.length;me+=1)_e[me]=Dp(jp(l,fe,me));let Ie=l[4]&&l[5]&&Bp(l);const De=[Qg,Yg,Kg,Gg,Wg,Jg,Vg,Ug],se=[];function ke(me,Ee){return Ee&2&&(Je=null),me[1]==="/login"?0:me[1]==="/"?1:me[1]==="/routes"?2:(Je==null&&(Je=!!me[1].startsWith("/routes/edit/")),Je?3:me[1]==="/routes/new"?4:me[1]==="/logs"?5:me[1]==="/config"?6:7)}return je=ke(l,-1),Le=se[je]=De[je](l),{c(){s=r("div"),e=r("div"),n=r("div"),n.innerHTML='<a href="/__ui/#/" class="flex items-center gap-2 px-4 py-2 hover:bg-base-200 rounded-lg transition-colors"><svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg> <div class="flex flex-col"><span class="text-xl font-bold">Bungee</span> <span class="text-xs text-base-content/60">Reverse Proxy</span></div></a>',a=h(),i=r("div"),u=r("ul"),c=r("li"),f=r("a"),d=re("svg"),p=re("path"),m=h(),g=r("span"),k=_(b),w=h(),C=r("li"),E=r("a"),y=re("svg"),T=re("path"),M=h(),R=r("span"),P=_(j),I=h(),q=r("li"),D=r("a"),A=re("svg"),N=re("path"),Z=h(),Q=r("span"),z=_(x),K=h(),S=r("li"),B=r("a"),U=re("svg"),F=re("path"),J=re("path"),ie=h(),ue=r("span"),$=_(ne),te=h(),ae=r("div"),ee=r("div"),G=re("svg"),pe=re("path"),oe=h(),ge=r("span"),ye=_(he),ze=h(),Pe=r("ul");for(let me=0;me<_e.length;me+=1)_e[me].c();we=h(),Ie&&Ie.c(),Fe=h(),Le.c(),o(n,"class","flex-1"),o(p,"stroke-linecap","round"),o(p,"stroke-linejoin","round"),o(p,"stroke-width","2"),o(p,"d","M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"),o(d,"xmlns","http://www.w3.org/2000/svg"),o(d,"class","h-4 w-4"),o(d,"fill","none"),o(d,"viewBox","0 0 24 24"),o(d,"stroke","currentColor"),o(f,"href","/__ui/#/"),o(f,"class","flex items-center gap-2 svelte-1fgps4v"),le(f,"active",l[1]==="/"),o(T,"stroke-linecap","round"),o(T,"stroke-linejoin","round"),o(T,"stroke-width","2"),o(T,"d","M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"),o(y,"xmlns","http://www.w3.org/2000/svg"),o(y,"class","h-4 w-4"),o(y,"fill","none"),o(y,"viewBox","0 0 24 24"),o(y,"stroke","currentColor"),o(E,"href","/__ui/#/routes"),o(E,"class","flex items-center gap-2 svelte-1fgps4v"),le(E,"active",l[1].startsWith("/routes")),o(N,"stroke-linecap","round"),o(N,"stroke-linejoin","round"),o(N,"stroke-width","2"),o(N,"d","M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"),o(A,"xmlns","http://www.w3.org/2000/svg"),o(A,"class","h-4 w-4"),o(A,"fill","none"),o(A,"viewBox","0 0 24 24"),o(A,"stroke","currentColor"),o(D,"href","/__ui/#/logs"),o(D,"class","flex items-center gap-2 svelte-1fgps4v"),le(D,"active",l[1]==="/logs"),o(F,"stroke-linecap","round"),o(F,"stroke-linejoin","round"),o(F,"stroke-width","2"),o(F,"d","M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"),o(J,"stroke-linecap","round"),o(J,"stroke-linejoin","round"),o(J,"stroke-width","2"),o(J,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),o(U,"xmlns","http://www.w3.org/2000/svg"),o(U,"class","h-4 w-4"),o(U,"fill","none"),o(U,"viewBox","0 0 24 24"),o(U,"stroke","currentColor"),o(B,"href","/__ui/#/config"),o(B,"class","flex items-center gap-2 svelte-1fgps4v"),le(B,"active",l[1]==="/config"),o(u,"class","menu menu-horizontal px-1 gap-1"),o(pe,"stroke-linecap","round"),o(pe,"stroke-linejoin","round"),o(pe,"stroke-width","2"),o(pe,"d","M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"),o(G,"xmlns","http://www.w3.org/2000/svg"),o(G,"class","h-4 w-4"),o(G,"fill","none"),o(G,"viewBox","0 0 24 24"),o(G,"stroke","currentColor"),o(ge,"class","text-xs"),o(ee,"role","button"),o(ee,"tabindex","0"),o(ee,"class","btn btn-ghost btn-sm gap-1"),o(Pe,"role","menu"),o(Pe,"tabindex","0"),o(Pe,"class","dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-32 mt-2 gap-1"),o(ae,"class","dropdown dropdown-end mx-2"),o(i,"class","flex-none"),o(e,"class","navbar bg-base-100 shadow-lg sticky top-0 z-50"),o(s,"class","min-h-screen bg-base-200")},m(me,Ee){L(me,s,Ee),t(s,e),t(e,n),t(e,a),t(e,i),t(i,u),t(u,c),t(c,f),t(f,d),t(d,p),t(f,m),t(f,g),t(g,k),t(u,w),t(u,C),t(C,E),t(E,y),t(y,T),t(E,M),t(E,R),t(R,P),t(u,I),t(u,q),t(q,D),t(D,A),t(A,N),t(D,Z),t(D,Q),t(Q,z),t(u,K),t(u,S),t(S,B),t(B,U),t(U,F),t(U,J),t(B,ie),t(B,ue),t(ue,$),t(i,te),t(i,ae),t(ae,ee),t(ee,G),t(G,pe),t(ee,oe),t(ee,ge),t(ge,ye),t(ae,ze),t(ae,Pe);for(let Ve=0;Ve<_e.length;Ve+=1)_e[Ve]&&_e[Ve].m(Pe,null);t(i,we),Ie&&Ie.m(i,null),t(s,Fe),se[je].m(s,null),Se=!0},p(me,Ee){if((!Se||Ee&1)&&b!==(b=me[0]("nav.dashboard")+"")&&v(k,b),(!Se||Ee&2)&&le(f,"active",me[1]==="/"),(!Se||Ee&1)&&j!==(j=me[0]("nav.routes")+"")&&v(P,j),(!Se||Ee&2)&&le(E,"active",me[1].startsWith("/routes")),(!Se||Ee&1)&&x!==(x=me[0]("nav.logs")+"")&&v(z,x),(!Se||Ee&2)&&le(D,"active",me[1]==="/logs"),(!Se||Ee&1)&&ne!==(ne=me[0]("nav.configuration")+"")&&v($,ne),(!Se||Ee&2)&&le(B,"active",me[1]==="/config"),(!Se||Ee&8)&&he!==(he=Qr.find(me[8])?.name+"")&&v(ye,he),Ee&72){fe=ut(Qr);let Be;for(Be=0;Be<fe.length;Be+=1){const nt=jp(me,fe,Be);_e[Be]?_e[Be].p(nt,Ee):(_e[Be]=Dp(nt),_e[Be].c(),_e[Be].m(Pe,null))}for(;Be<_e.length;Be+=1)_e[Be].d(1);_e.length=fe.length}me[4]&&me[5]?Ie?Ie.p(me,Ee):(Ie=Bp(me),Ie.c(),Ie.m(i,null)):Ie&&(Ie.d(1),Ie=null);let Ve=je;je=ke(me,Ee),je===Ve?se[je].p(me,Ee):(Gl(),st(se[Ve],1,1,()=>{se[Ve]=null}),Kl(),Le=se[je],Le?Le.p(me,Ee):(Le=se[je]=De[je](me),Le.c()),et(Le,1),Le.m(s,null))},i(me){Se||(et(Le),Se=!0)},o(me){st(Le),Se=!1},d(me){me&&H(s),Gt(_e,me),Ie&&Ie.d(),se[je].d()}}}function Ng(l){let s;return{c(){s=r("div"),s.innerHTML='<div class="flex flex-col items-center gap-4"><span class="loading loading-spinner loading-lg"></span> <p class="text-base-content/60">Loading...</p></div>',o(s,"class","min-h-screen bg-base-200 flex items-center justify-center")},m(e,n){L(e,s,n)},p:ot,i:ot,o:ot,d(e){e&&H(s)}}}function Dp(l){let s,e,n,a,i;function u(){return l[9](l[11])}return{c(){s=r("li"),e=r("button"),e.textContent=\`\${l[11].name}\`,n=h(),o(e,"class","svelte-1fgps4v"),le(e,"active",l[3]===l[11].code)},m(c,f){L(c,s,f),t(s,e),t(s,n),a||(i=V(e,"click",u),a=!0)},p(c,f){l=c,f&8&&le(e,"active",l[3]===l[11].code)},d(c){c&&H(s),a=!1,i()}}}function Bp(l){let s,e,n,a,i,u,c=l[0]("login.logout")+"",f,d,p;return{c(){s=r("div"),e=r("button"),n=re("svg"),a=re("path"),i=h(),u=r("span"),f=_(c),o(a,"stroke-linecap","round"),o(a,"stroke-linejoin","round"),o(a,"stroke-width","2"),o(a,"d","M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"class","h-4 w-4"),o(n,"fill","none"),o(n,"viewBox","0 0 24 24"),o(n,"stroke","currentColor"),o(u,"class","text-xs hidden md:inline"),o(e,"class","btn btn-ghost btn-sm gap-1"),o(s,"class","mx-2")},m(m,g){L(m,s,g),t(s,e),t(e,n),t(n,a),t(e,i),t(e,u),t(u,f),d||(p=V(e,"click",l[7]),d=!0)},p(m,g){g&1&&c!==(c=m[0]("login.logout")+"")&&v(f,c)},d(m){m&&H(s),d=!1,p()}}}function Ug(l){let s,e;return s=new Ig({}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p:ot,i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Vg(l){let s,e;return s=new U2({}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p:ot,i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Jg(l){let s,e;return s=new qg({}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p:ot,i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Wg(l){let s,e;return s=new a0({props:{params:{}}}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p:ot,i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Gg(l){let s,e;return s=new a0({props:{params:{path:l[1].replace("/routes/edit/","")}}}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p(n,a){const i={};a&2&&(i.params={path:n[1].replace("/routes/edit/","")}),s.$set(i)},i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Kg(l){let s,e;return s=new ch({}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p:ot,i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Yg(l){let s,e;return s=new p2({}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p:ot,i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Qg(l){let s,e;return s=new jg({}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p:ot,i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Zg(l){let s,e,n,a,i;const u=[Ng,Og],c=[];function f(d,p){return d[2]?0:1}return s=f(l),e=c[s]=u[s](l),a=new zg({}),{c(){e.c(),n=h(),Et(a.$$.fragment)},m(d,p){c[s].m(d,p),L(d,n,p),Ct(a,d,p),i=!0},p(d,[p]){let m=s;s=f(d),s===m?c[s].p(d,p):(Gl(),st(c[m],1,1,()=>{c[m]=null}),Kl(),e=c[s],e?e.p(d,p):(e=c[s]=u[s](d),e.c()),et(e,1),e.m(n.parentNode,n))},i(d){i||(et(e),et(a.$$.fragment,d),i=!0)},o(d){st(e),st(a.$$.fragment,d),i=!1},d(d){d&&H(n),c[s].d(d),yt(a,d)}}}function Xg(l,s,e){let n,a,i,u,c,f;Dt(l,Rt,b=>e(0,n=b)),Dt(l,p0,b=>e(1,a=b)),Dt(l,h0,b=>e(2,i=b)),Dt(l,Ap,b=>e(3,u=b)),Dt(l,l1,b=>e(4,c=b)),Dt(l,ei,b=>e(5,f=b));function d(b){T0(b)}Hs(async()=>{try{const k=(await Pu()).auth?.enabled||!1;if(l1.set(k),k){const w=Yp();ei.set(!!w),!w&&a!=="/login"&&(window.location.hash="#/login")}}catch(b){console.error("Failed to check auth status:",b)}});function p(){confirm(n("login.logoutConfirm"))&&(Kp(),window.location.hash="#/login")}return[n,a,i,u,c,f,d,p,b=>b.code===u,b=>d(b.code)]}class xg extends Nt{constructor(s){super(),Ut(this,s,Xg,Zg,Vt,{})}}new xg({target:document.getElementById("app")});
21261
+ `,
21262
+ "vendor-C5kRSwys.js": 'import{C as Te,L as Tn,D as Sn,B as wn}from"./vendor-charts-Bo4qyjB7.js";function P(){}function N(e,t){for(const n in t)e[n]=t[n];return e}function jt(e){return e()}function yt(){return Object.create(null)}function X(e){e.forEach(jt)}function at(e){return typeof e=="function"}function fe(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Bn(e){return Object.keys(e).length===0}function st(e,...t){if(e==null){for(const r of t)r(void 0);return P}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ra(e){let t;return st(e,n=>t=n)(),t}function ia(e,t,n){e.$$.on_destroy.push(st(t,n))}function G(e){const t={};for(const n in e)n[0]!=="$"&&(t[n]=e[n]);return t}function aa(e,t){e.appendChild(t)}function An(e,t,n){e.insertBefore(t,n||null)}function kt(e){e.parentNode&&e.parentNode.removeChild(e)}function sa(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function On(e){return document.createElement(e)}function oa(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Vt(e){return document.createTextNode(e)}function ua(){return Vt(" ")}function ha(){return Vt("")}function Pn(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function Nn(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}const In=["width","height"];function Mn(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const r in t)t[r]==null?e.removeAttribute(r):r==="style"?e.style.cssText=t[r]:r==="__value"?e.value=e[r]=t[r]:n[r]&&n[r].set&&In.indexOf(r)===-1?e[r]=t[r]:Nn(e,r,t[r])}function fa(e){let t;return{p(...n){t=n,t.forEach(r=>e.push(r))},r(){t.forEach(n=>e.splice(e.indexOf(n),1))}}}function la(e){return e===""?null:+e}function Ln(e){return Array.from(e.childNodes)}function ca(e,t){t=""+t,e.data!==t&&(e.data=t)}function da(e,t){e.value=t??""}function ma(e,t,n,r){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function ga(e,t,n){for(let r=0;r<e.options.length;r+=1){const i=e.options[r];if(i.__value===t){i.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function ba(e){const t=e.querySelector(":checked");return t&&t.__value}function pa(e,t,n){e.classList.toggle(t,!!n)}function Cn(e,t,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:r})}let Q;function se(e){Q=e}function Se(){if(!Q)throw new Error("Function called outside component initialization");return Q}function Xt(e){Se().$$.on_mount.push(e)}function Rn(e){Se().$$.after_update.push(e)}function Yt(e){Se().$$.on_destroy.push(e)}function _a(){const e=Se();return(t,n,{cancelable:r=!1}={})=>{const i=e.$$.callbacks[t];if(i){const a=Cn(t,n,{cancelable:r});return i.slice().forEach(o=>{o.call(e,a)}),!a.defaultPrevented}return!0}}function Un(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach(r=>r.call(this,t))}const z=[],R=[];let q=[];const Ze=[],Zt=Promise.resolve();let We=!1;function Wt(){We||(We=!0,Zt.then(qt))}function zt(){return Wt(),Zt}function ze(e){q.push(e)}function ot(e){Ze.push(e)}const Re=new Set;let Y=0;function qt(){if(Y!==0)return;const e=Q;do{try{for(;Y<z.length;){const t=z[Y];Y++,se(t),Fn(t.$$)}}catch(t){throw z.length=0,Y=0,t}for(se(null),z.length=0,Y=0;R.length;)R.pop()();for(let t=0;t<q.length;t+=1){const n=q[t];Re.has(n)||(Re.add(n),n())}q.length=0}while(z.length);for(;Ze.length;)Ze.pop()();We=!1,Re.clear(),se(e)}function Fn(e){if(e.fragment!==null){e.update(),X(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ze)}}function Dn(e){const t=[],n=[];q.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),q=t}const ye=new Set;let V;function ya(){V={r:0,c:[],p:V}}function xa(){V.r||X(V.c),V=V.p}function le(e,t){e&&e.i&&(ye.delete(e),e.i(t))}function we(e,t,n,r){if(e&&e.o){if(ye.has(e))return;ye.add(e),V.c.push(()=>{ye.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}function Ea(e){return e?.length!==void 0?e:Array.from(e)}function va(e,t){e.d(1),t.delete(e.key)}function Ha(e,t){we(e,1,1,()=>{t.delete(e.key)})}function Ta(e,t,n,r,i,a,o,s,u,h,f,c){let l=e.length,_=a.length,y=l;const v={};for(;y--;)v[e[y].key]=y;const B=[],d=new Map,m=new Map,g=[];for(y=_;y--;){const T=c(i,a,y),M=n(T);let L=o.get(M);L?g.push(()=>L.p(T,t)):(L=h(M,T),L.c()),d.set(M,B[y]=L),M in v&&m.set(M,Math.abs(y-v[M]))}const S=new Set,E=new Set;function I(T){le(T,1),T.m(s,f),o.set(T.key,T),f=T.first,_--}for(;l&&_;){const T=B[_-1],M=e[l-1],L=T.key,me=M.key;T===M?(f=T.first,l--,_--):d.has(me)?!o.has(L)||S.has(L)?I(T):E.has(me)?l--:m.get(L)>m.get(me)?(E.add(L),I(T)):(S.add(me),l--):(u(M,o),l--)}for(;l--;){const T=e[l];d.has(T.key)||u(T,o)}for(;_;)I(B[_-1]);return X(g),B}function ut(e,t){const n={},r={},i={$$scope:1};let a=e.length;for(;a--;){const o=e[a],s=t[a];if(s){for(const u in o)u in s||(r[u]=1);for(const u in s)i[u]||(n[u]=s[u],i[u]=1);e[a]=s}else for(const u in o)i[u]=1}for(const o in r)o in n||(n[o]=void 0);return n}function ht(e){return typeof e=="object"&&e!==null?e:{}}function ft(e,t,n){const r=e.$$.props[t];r!==void 0&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function lt(e){e&&e.c()}function Be(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),ze(()=>{const a=e.$$.on_mount.map(jt).filter(at);e.$$.on_destroy?e.$$.on_destroy.push(...a):X(a),e.$$.on_mount=[]}),i.forEach(ze)}function Ae(e,t){const n=e.$$;n.fragment!==null&&(Dn(n.after_update),X(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Gn(e,t){e.$$.dirty[0]===-1&&(z.push(e),Wt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Oe(e,t,n,r,i,a,o=null,s=[-1]){const u=Q;se(e);const h=e.$$={fragment:null,ctx:[],props:a,update:P,not_equal:i,bound:yt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:yt(),dirty:s,skip_bound:!1,root:t.target||u.$$.root};o&&o(h.root);let f=!1;if(h.ctx=n?n(e,t.props||{},(c,l,..._)=>{const y=_.length?_[0]:l;return h.ctx&&i(h.ctx[c],h.ctx[c]=y)&&(!h.skip_bound&&h.bound[c]&&h.bound[c](y),f&&Gn(e,c)),l}):[],h.update(),f=!0,X(h.before_update),h.fragment=r?r(h.ctx):!1,t.target){if(t.hydrate){const c=Ln(t.target);h.fragment&&h.fragment.l(c),c.forEach(kt)}else h.fragment&&h.fragment.c();t.intro&&le(e.$$.fragment),Be(e,t.target,t.anchor),qt()}se(u)}class Pe{$$=void 0;$$set=void 0;$destroy(){Ae(this,1),this.$destroy=P}$on(t,n){if(!at(n))return P;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!Bn(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const jn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(jn);const Z=[];function Qt(e,t){return{subscribe:Ne(e,t).subscribe}}function Ne(e,t=P){let n;const r=new Set;function i(s){if(fe(e,s)&&(e=s,n)){const u=!Z.length;for(const h of r)h[1](),Z.push(h,e);if(u){for(let h=0;h<Z.length;h+=2)Z[h][0](Z[h+1]);Z.length=0}}}function a(s){i(s(e))}function o(s,u=P){const h=[s,u];return r.add(h),r.size===1&&(n=t(i,a)||P),s(e),()=>{r.delete(h),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}function j(e,t,n){const r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=t.length<2;return Qt(n,(o,s)=>{let u=!1;const h=[];let f=0,c=P;const l=()=>{if(f)return;c();const y=t(r?h[0]:h,o,s);a?o(y):c=at(y)?y:P},_=i.map((y,v)=>st(y,B=>{h[v]=B,f&=~(1<<v),u&&l()},()=>{f|=1<<v}));return u=!0,l(),function(){X(_),c(),u=!1}})}function xt(){const e=window.location.href.indexOf("#/");let t=e>-1?window.location.href.substr(e+1):"/";const n=t.indexOf("?");let r="";return n>-1&&(r=t.substr(n+1),t=t.substr(0,n)),{location:t,querystring:r}}const Jt=Qt(null,function(t){t(xt());const n=()=>{t(xt())};return window.addEventListener("hashchange",n,!1),function(){window.removeEventListener("hashchange",n,!1)}}),Sa=j(Jt,e=>e.location);j(Jt,e=>e.querystring);async function wa(e){if(!e||e.length<1||e.charAt(0)!="/"&&e.indexOf("#/")!==0)throw Error("Invalid parameter location");await zt(),history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=(e.charAt(0)=="#"?"":"#")+e}async function Ba(){await zt(),window.history.back()}function kn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ue,Et;function Vn(){if(Et)return Ue;Et=1;var e=function(m){return t(m)&&!n(m)};function t(d){return!!d&&typeof d=="object"}function n(d){var m=Object.prototype.toString.call(d);return m==="[object RegExp]"||m==="[object Date]"||a(d)}var r=typeof Symbol=="function"&&Symbol.for,i=r?Symbol.for("react.element"):60103;function a(d){return d.$$typeof===i}function o(d){return Array.isArray(d)?[]:{}}function s(d,m){return m.clone!==!1&&m.isMergeableObject(d)?v(o(d),d,m):d}function u(d,m,g){return d.concat(m).map(function(S){return s(S,g)})}function h(d,m){if(!m.customMerge)return v;var g=m.customMerge(d);return typeof g=="function"?g:v}function f(d){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(d).filter(function(m){return Object.propertyIsEnumerable.call(d,m)}):[]}function c(d){return Object.keys(d).concat(f(d))}function l(d,m){try{return m in d}catch{return!1}}function _(d,m){return l(d,m)&&!(Object.hasOwnProperty.call(d,m)&&Object.propertyIsEnumerable.call(d,m))}function y(d,m,g){var S={};return g.isMergeableObject(d)&&c(d).forEach(function(E){S[E]=s(d[E],g)}),c(m).forEach(function(E){_(d,E)||(l(d,E)&&g.isMergeableObject(m[E])?S[E]=h(E,g)(d[E],m[E],g):S[E]=s(m[E],g))}),S}function v(d,m,g){g=g||{},g.arrayMerge=g.arrayMerge||u,g.isMergeableObject=g.isMergeableObject||e,g.cloneUnlessOtherwiseSpecified=s;var S=Array.isArray(m),E=Array.isArray(d),I=S===E;return I?S?g.arrayMerge(d,m,g):y(d,m,g):s(m,g)}v.all=function(m,g){if(!Array.isArray(m))throw new Error("first argument should be an array");return m.reduce(function(S,E){return v(S,E,g)},{})};var B=v;return Ue=B,Ue}var Xn=Vn();const Yn=kn(Xn);var qe=function(e,t){return qe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},qe(e,t)};function Ie(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");qe(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var x=function(){return x=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},x.apply(this,arguments)};function Zn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Fe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function De(e,t){var n=t&&t.cache?t.cache:Kn,r=t&&t.serializer?t.serializer:Jn,i=t&&t.strategy?t.strategy:qn;return i(e,{cache:n,serializer:r})}function Wn(e){return e==null||typeof e=="number"||typeof e=="boolean"}function zn(e,t,n,r){var i=Wn(r)?r:n(r),a=t.get(i);return typeof a>"u"&&(a=e.call(this,r),t.set(i,a)),a}function $t(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,r),t.set(i,a)),a}function Kt(e,t,n,r,i){return n.bind(t,e,r,i)}function qn(e,t){var n=e.length===1?zn:$t;return Kt(e,this,n,t.cache.create(),t.serializer)}function Qn(e,t){return Kt(e,this,$t,t.cache.create(),t.serializer)}var Jn=function(){return JSON.stringify(arguments)},$n=(function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e})(),Kn={create:function(){return new $n}},Ge={variadic:Qn},b;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(b||(b={}));var H;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(H||(H={}));var J;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(J||(J={}));function vt(e){return e.type===H.literal}function er(e){return e.type===H.argument}function en(e){return e.type===H.number}function tn(e){return e.type===H.date}function nn(e){return e.type===H.time}function rn(e){return e.type===H.select}function an(e){return e.type===H.plural}function tr(e){return e.type===H.pound}function sn(e){return e.type===H.tag}function on(e){return!!(e&&typeof e=="object"&&e.type===J.number)}function Qe(e){return!!(e&&typeof e=="object"&&e.type===J.dateTime)}var un=/[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/,nr=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^\']*\'[^\']*\')*[^\']*$)/g;function rr(e){var t={};return e.replace(nr,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var ir=/[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;function ar(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(ir).filter(function(l){return l.length>0}),n=[],r=0,i=t;r<i.length;r++){var a=i[r],o=a.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var s=o[0],u=o.slice(1),h=0,f=u;h<f.length;h++){var c=f[h];if(c.length===0)throw new Error("Invalid number skeleton")}n.push({stem:s,options:u})}return n}function sr(e){return e.replace(/^(.*?)-/,"")}var Ht=/^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g,hn=/^(@+)?(\\+|#+)?[rs]?$/g,or=/(\\*)(0+)|(#+)(0+)|(0+)/g,fn=/^(0+)$/;function Tt(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(hn,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function ln(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function ur(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!fn.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function St(e){var t={},n=ln(e);return n||t}function hr(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=sr(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=x(x(x({},t),{notation:"scientific"}),i.options.reduce(function(u,h){return x(x({},u),St(h))},{}));continue;case"engineering":t=x(x(x({},t),{notation:"engineering"}),i.options.reduce(function(u,h){return x(x({},u),St(h))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(or,function(u,h,f,c,l,_){if(h)t.minimumIntegerDigits=f.length;else{if(c&&l)throw new Error("We currently do not support maximum integer digits");if(_)throw new Error("We currently do not support exact integer digits")}return""});continue}if(fn.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Ht.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Ht,function(u,h,f,c,l,_){return f==="*"?t.minimumFractionDigits=h.length:c&&c[0]==="#"?t.maximumFractionDigits=c.length:l&&_?(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length+_.length):(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length),""});var a=i.options[0];a==="w"?t=x(x({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=x(x({},t),Tt(a)));continue}if(hn.test(i.stem)){t=x(x({},t),Tt(i.stem));continue}var o=ln(i.stem);o&&(t=x(x({},t),o));var s=ur(i.stem);s&&(t=x(x({},t),s))}return t}var ge={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function fr(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var a=0;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;var o=1+(a&1),s=a<2?1:3+(a>>1),u="a",h=lr(t);for((h=="H"||h=="k")&&(s=0);s-- >0;)n+=u;for(;o-- >0;)n=h+n}else i==="J"?n+="H":n+=i}return n}function lr(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=ge[r||""]||ge[n||""]||ge["".concat(n,"-001")]||ge["001"];return i[0]}var je,cr=new RegExp("^".concat(un.source,"*")),dr=new RegExp("".concat(un.source,"*$"));function p(e,t){return{start:e,end:t}}var mr=!!String.prototype.startsWith&&"_a".startsWith("a",1),gr=!!String.fromCodePoint,br=!!Object.fromEntries,pr=!!String.prototype.codePointAt,_r=!!String.prototype.trimStart,yr=!!String.prototype.trimEnd,xr=!!Number.isSafeInteger,Er=xr?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Je=!0;try{var vr=dn("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");Je=((je=vr.exec("a"))===null||je===void 0?void 0:je[0])==="a"}catch{Je=!1}var wt=mr?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},$e=gr?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,a=0,o;i>a;){if(o=t[a++],o>1114111)throw RangeError(o+" is not a valid code point");r+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return r},Bt=br?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var a=i[r],o=a[0],s=a[1];n[o]=s}return n},cn=pr?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),a;return i<55296||i>56319||n+1===r||(a=t.charCodeAt(n+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},Hr=_r?function(t){return t.trimStart()}:function(t){return t.replace(cr,"")},Tr=yr?function(t){return t.trimEnd()}:function(t){return t.replace(dr,"")};function dn(e,t){return new RegExp(e,t)}var Ke;if(Je){var At=dn("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");Ke=function(t,n){var r;At.lastIndex=n;var i=At.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Ke=function(t,n){for(var r=[];;){var i=cn(t,n);if(i===void 0||mn(i)||Ar(i))break;r.push(i),n+=i>=65536?2:1}return $e.apply(void 0,r)};var Sr=(function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var a=this.char();if(a===123){var o=this.parseArgument(t,r);if(o.err)return o;i.push(o.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:H.pound,location:p(s,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(b.UNMATCHED_CLOSING_TAG,p(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&et(this.peek()||0)){var o=this.parseTag(t,n);if(o.err)return o;i.push(o.val)}else{var o=this.parseLiteral(t,n);if(o.err)return o;i.push(o.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:H.literal,value:"<".concat(i,"/>"),location:p(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var o=a.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!et(this.char()))return this.error(b.INVALID_TAG,p(s,this.clonePosition()));var u=this.clonePosition(),h=this.parseTagName();return i!==h?this.error(b.UNMATCHED_CLOSING_TAG,p(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:H.tag,value:i,children:o,location:p(r,this.clonePosition())},err:null}:this.error(b.INVALID_TAG,p(s,this.clonePosition())))}else return this.error(b.UNCLOSED_TAG,p(r,this.clonePosition()))}else return this.error(b.INVALID_TAG,p(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Br(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var a=this.tryParseQuote(n);if(a){i+=a;continue}var o=this.tryParseUnquoted(t,n);if(o){i+=o;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var u=p(r,this.clonePosition());return{val:{type:H.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!wr(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"\'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return $e.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),$e(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(b.EXPECT_ARGUMENT_CLOSING_BRACE,p(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(b.EMPTY_ARGUMENT,p(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(b.MALFORMED_ARGUMENT,p(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(b.EXPECT_ARGUMENT_CLOSING_BRACE,p(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:H.argument,value:i,location:p(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(b.EXPECT_ARGUMENT_CLOSING_BRACE,p(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(b.MALFORMED_ARGUMENT,p(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Ke(this.message,n),i=n+r.length;this.bumpTo(i);var a=this.clonePosition(),o=p(t,a);return{value:r,location:o}},e.prototype.parseArgumentOptions=function(t,n,r,i){var a,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(s){case"":return this.error(b.EXPECT_ARGUMENT_TYPE,p(o,u));case"number":case"date":case"time":{this.bumpSpace();var h=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;var l=Tr(c.val);if(l.length===0)return this.error(b.EXPECT_ARGUMENT_STYLE,p(this.clonePosition(),this.clonePosition()));var _=p(f,this.clonePosition());h={style:l,styleLocation:_}}var y=this.tryParseArgumentClose(i);if(y.err)return y;var v=p(i,this.clonePosition());if(h&&wt(h?.style,"::",0)){var B=Hr(h.style.slice(2));if(s==="number"){var c=this.parseNumberSkeletonFromString(B,h.styleLocation);return c.err?c:{val:{type:H.number,value:r,location:v,style:c.val},err:null}}else{if(B.length===0)return this.error(b.EXPECT_DATE_TIME_SKELETON,v);var d=B;this.locale&&(d=fr(B,this.locale));var l={type:J.dateTime,pattern:d,location:h.styleLocation,parsedOptions:this.shouldParseSkeletons?rr(d):{}},m=s==="date"?H.date:H.time;return{val:{type:m,value:r,location:v,style:l},err:null}}}return{val:{type:s==="number"?H.number:s==="date"?H.date:H.time,value:r,location:v,style:(a=h?.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var g=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(b.EXPECT_SELECT_ARGUMENT_OPTIONS,p(g,x({},g)));this.bumpSpace();var S=this.parseIdentifierIfPossible(),E=0;if(s!=="select"&&S.value==="offset"){if(!this.bumpIf(":"))return this.error(b.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,p(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(b.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,b.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),S=this.parseIdentifierIfPossible(),E=c.val}var I=this.tryParsePluralOrSelectOptions(t,s,n,S);if(I.err)return I;var y=this.tryParseArgumentClose(i);if(y.err)return y;var T=p(i,this.clonePosition());return s==="select"?{val:{type:H.select,value:r,options:Bt(I.val),location:T},err:null}:{val:{type:H.plural,value:r,options:Bt(I.val),offset:E,pluralType:s==="plural"?"cardinal":"ordinal",location:T},err:null}}default:return this.error(b.INVALID_ARGUMENT_TYPE,p(o,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(b.EXPECT_ARGUMENT_CLOSING_BRACE,p(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("\'"))return this.error(b.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,p(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=ar(t)}catch{return this.error(b.INVALID_NUMBER_SKELETON,n)}return{val:{type:J.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?hr(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var a,o=!1,s=[],u=new Set,h=i.value,f=i.location;;){if(h.length===0){var c=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var l=this.tryParseDecimalInteger(b.EXPECT_PLURAL_ARGUMENT_SELECTOR,b.INVALID_PLURAL_ARGUMENT_SELECTOR);if(l.err)return l;f=p(c,this.clonePosition()),h=this.message.slice(c.offset,this.offset())}else break}if(u.has(h))return this.error(n==="select"?b.DUPLICATE_SELECT_ARGUMENT_SELECTOR:b.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);h==="other"&&(o=!0),this.bumpSpace();var _=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?b.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:b.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,p(this.clonePosition(),this.clonePosition()));var y=this.parseMessage(t+1,n,r);if(y.err)return y;var v=this.tryParseArgumentClose(_);if(v.err)return v;s.push([h,{value:y.val,location:p(_,this.clonePosition())}]),u.add(h),this.bumpSpace(),a=this.parseIdentifierIfPossible(),h=a.value,f=a.location}return s.length===0?this.error(n==="select"?b.EXPECT_SELECT_ARGUMENT_SELECTOR:b.EXPECT_PLURAL_ARGUMENT_SELECTOR,p(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(b.MISSING_OTHER_CLAUSE,p(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var a=!1,o=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)a=!0,o=o*10+(s-48),this.bump();else break}var u=p(i,this.clonePosition());return a?(o*=r,Er(o)?{val:o,err:null}:this.error(n,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=cn(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(wt(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&mn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e})();function et(e){return e>=97&&e<=122||e>=65&&e<=90}function wr(e){return et(e)||e===47}function Br(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function mn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Ar(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function tt(e){e.forEach(function(t){if(delete t.location,rn(t)||an(t))for(var n in t.options)delete t.options[n].location,tt(t.options[n].value);else en(t)&&on(t.style)||(tn(t)||nn(t))&&Qe(t.style)?delete t.style.location:sn(t)&&tt(t.children)})}function Or(e,t){t===void 0&&(t={}),t=x({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Sr(e,t).parse();if(n.err){var r=SyntaxError(b[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||tt(n.val),n.val}var $;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})($||($={}));var Me=(function(e){Ie(t,e);function t(n,r,i){var a=e.call(this,n)||this;return a.code=r,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),Ot=(function(e){Ie(t,e);function t(n,r,i,a){return e.call(this,\'Invalid values for "\'.concat(n,\'": "\').concat(r,\'". Options are "\').concat(Object.keys(i).join(\'", "\'),\'"\'),$.INVALID_VALUE,a)||this}return t})(Me),Pr=(function(e){Ie(t,e);function t(n,r,i){return e.call(this,\'Value for "\'.concat(n,\'" must be of type \').concat(r),$.INVALID_VALUE,i)||this}return t})(Me),Nr=(function(e){Ie(t,e);function t(n,r){return e.call(this,\'The intl string context variable "\'.concat(n,\'" was not provided to the string "\').concat(r,\'"\'),$.MISSING_VALUE,r)||this}return t})(Me),A;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(A||(A={}));function Ir(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==A.literal||n.type!==A.literal?t.push(n):r.value+=n.value,t},[])}function Mr(e){return typeof e=="function"}function xe(e,t,n,r,i,a,o){if(e.length===1&&vt(e[0]))return[{type:A.literal,value:e[0].value}];for(var s=[],u=0,h=e;u<h.length;u++){var f=h[u];if(vt(f)){s.push({type:A.literal,value:f.value});continue}if(tr(f)){typeof a=="number"&&s.push({type:A.literal,value:n.getNumberFormat(t).format(a)});continue}var c=f.value;if(!(i&&c in i))throw new Nr(c,o);var l=i[c];if(er(f)){(!l||typeof l=="string"||typeof l=="number")&&(l=typeof l=="string"||typeof l=="number"?String(l):""),s.push({type:typeof l=="string"?A.literal:A.object,value:l});continue}if(tn(f)){var _=typeof f.style=="string"?r.date[f.style]:Qe(f.style)?f.style.parsedOptions:void 0;s.push({type:A.literal,value:n.getDateTimeFormat(t,_).format(l)});continue}if(nn(f)){var _=typeof f.style=="string"?r.time[f.style]:Qe(f.style)?f.style.parsedOptions:r.time.medium;s.push({type:A.literal,value:n.getDateTimeFormat(t,_).format(l)});continue}if(en(f)){var _=typeof f.style=="string"?r.number[f.style]:on(f.style)?f.style.parsedOptions:void 0;_&&_.scale&&(l=l*(_.scale||1)),s.push({type:A.literal,value:n.getNumberFormat(t,_).format(l)});continue}if(sn(f)){var y=f.children,v=f.value,B=i[v];if(!Mr(B))throw new Pr(v,"function",o);var d=xe(y,t,n,r,i,a),m=B(d.map(function(E){return E.value}));Array.isArray(m)||(m=[m]),s.push.apply(s,m.map(function(E){return{type:typeof E=="string"?A.literal:A.object,value:E}}))}if(rn(f)){var g=f.options[l]||f.options.other;if(!g)throw new Ot(f.value,l,Object.keys(f.options),o);s.push.apply(s,xe(g.value,t,n,r,i));continue}if(an(f)){var g=f.options["=".concat(l)];if(!g){if(!Intl.PluralRules)throw new Me(`Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n`,$.MISSING_INTL_API,o);var S=n.getPluralRules(t,{type:f.pluralType}).select(l-(f.offset||0));g=f.options[S]||f.options.other}if(!g)throw new Ot(f.value,l,Object.keys(f.options),o);s.push.apply(s,xe(g.value,t,n,r,i,l-(f.offset||0)));continue}}return Ir(s)}function Lr(e,t){return t?x(x(x({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=x(x({},e[r]),t[r]||{}),n},{})):e}function Cr(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Lr(e[r],t[r]),n},x({},e)):e}function ke(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Rr(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:De(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Fe([void 0],n,!1)))},{cache:ke(e.number),strategy:Ge.variadic}),getDateTimeFormat:De(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Fe([void 0],n,!1)))},{cache:ke(e.dateTime),strategy:Ge.variadic}),getPluralRules:De(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Fe([void 0],n,!1)))},{cache:ke(e.pluralRules),strategy:Ge.variadic})}}var gn=(function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var a=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var h=a.formatToParts(u);if(h.length===1)return h[0].value;var f=h.reduce(function(c,l){return!c.length||l.type!==A.literal||typeof c[c.length-1]!="string"?c.push(l.value):c[c.length-1]+=l.value,c},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return xe(a.ast,a.locales,a.formatters,a.formats,u,void 0,a.message)},this.resolvedOptions=function(){var u;return{locale:((u=a.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var o=i||{};o.formatters;var s=Zn(o,["formatters"]);this.ast=e.__parse(t,x(x({},s),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Cr(e.formats,r),this.formatters=i&&i.formatters||Rr(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Or,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e})();function Ur(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let i=0;i<n.length;i++)if(typeof r=="object"){if(i>0){const a=n.slice(i,n.length).join(".");if(a in r){r=r[a];break}}r=r[n[i]]}else r=void 0;return r}const U={},Fr=(e,t,n)=>n&&(t in U||(U[t]={}),e in U[t]||(U[t][e]=n),n),bn=(e,t)=>{if(t==null)return;if(t in U&&e in U[t])return U[t][e];const n=ce(t);for(let r=0;r<n.length;r++){const i=n[r],a=Gr(i,e);if(a)return Fr(e,t,a)}};let ct;const ee=Ne({});function Dr(e){return ct[e]||null}function dt(e){return e in ct}function Gr(e,t){if(!dt(e))return null;const n=Dr(e);return Ur(n,t)}function jr(e){if(e==null)return;const t=ce(e);for(let n=0;n<t.length;n++){const r=t[n];if(dt(r))return r}}function kr(e,...t){delete U[e],ee.update(n=>(n[e]=Yn.all([n[e]||{},...t]),n))}j([ee],([e])=>Object.keys(e));ee.subscribe(e=>ct=e);const oe={};function Vr(e){oe[e]=new Set}function Xr(e,t){oe[e].delete(t),oe[e].size===0&&delete oe[e]}function ue(e){return oe[e]}function Yr(e){return ce(e).map(t=>{const n=ue(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function Ee(e){return e==null?!1:ce(e).some(t=>{var n;return(n=ue(t))==null?void 0:n.size})}function Zr(e,t){return Promise.all(t.map(r=>(Xr(e,r),r().then(i=>i.default||i)))).then(r=>kr(e,...r))}const re={};function pn(e){if(!Ee(e))return e in re?re[e]:Promise.resolve();const t=Yr(e);return re[e]=Promise.all(t.map(([n,r])=>Zr(n,r))).then(()=>{if(Ee(e))return pn(e);delete re[e]}),re[e]}function Aa(e,t){ue(e)||Vr(e);const n=ue(e);ue(e).has(t)||(dt(e)||ee.update(r=>(r[e]={},r)),n.add(t))}var Pt=Object.getOwnPropertySymbols,Wr=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,qr=(e,t)=>{var n={};for(var r in e)Wr.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Pt)for(var r of Pt(e))t.indexOf(r)<0&&zr.call(e,r)&&(n[r]=e[r]);return n};const Qr={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}};function Jr({locale:e,id:t}){console.warn(`[svelte-i18n] The message "${t}" was not found in "${ce(e).join(\'", "\')}".${Ee(k())?`\n\nNote: there are at least one loader still registered to this locale that wasn\'t executed.`:""}`)}const $r={fallbackLocale:null,loadingDelay:200,formats:Qr,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},ie=$r;function K(){return ie}function Oa(e){const t=e,{formats:n}=t,r=qr(t,["formats"]);let i=e.fallbackLocale;if(e.initialLocale)try{gn.resolveLocale(e.initialLocale)&&(i=e.initialLocale)}catch{console.warn(`[svelte-i18n] The initial locale "${e.initialLocale}" is not a valid locale.`)}return r.warnOnMissingMessages&&(delete r.warnOnMissingMessages,r.handleMissingMessage==null?r.handleMissingMessage=Jr:console.warn(\'[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.\')),Object.assign(ie,r,{initialLocale:i}),n&&("number"in n&&Object.assign(ie.formats.number,n.number),"date"in n&&Object.assign(ie.formats.date,n.date),"time"in n&&Object.assign(ie.formats.time,n.time)),te.set(i)}const Ve=Ne(!1);var Kr=Object.defineProperty,ei=Object.defineProperties,ti=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,ni=Object.prototype.hasOwnProperty,ri=Object.prototype.propertyIsEnumerable,It=(e,t,n)=>t in e?Kr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ii=(e,t)=>{for(var n in t||(t={}))ni.call(t,n)&&It(e,n,t[n]);if(Nt)for(var n of Nt(t))ri.call(t,n)&&It(e,n,t[n]);return e},ai=(e,t)=>ei(e,ti(t));let nt;const ve=Ne(null);function Mt(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function ce(e,t=K().fallbackLocale){const n=Mt(e);return t?[...new Set([...n,...Mt(t)])]:n}function k(){return nt??void 0}ve.subscribe(e=>{nt=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const si=e=>{if(e&&jr(e)&&Ee(e)){const{loadingDelay:t}=K();let n;return typeof window<"u"&&k()!=null&&t?n=window.setTimeout(()=>Ve.set(!0),t):Ve.set(!0),pn(e).then(()=>{ve.set(e)}).finally(()=>{clearTimeout(n),Ve.set(!1)})}return ve.set(e)},te=ai(ii({},ve),{set:si}),Pa=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],Le=e=>{const t=Object.create(null);return r=>{const i=JSON.stringify(r);return i in t?t[i]:t[i]=e(r)}};var oi=Object.defineProperty,He=Object.getOwnPropertySymbols,_n=Object.prototype.hasOwnProperty,yn=Object.prototype.propertyIsEnumerable,Lt=(e,t,n)=>t in e?oi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mt=(e,t)=>{for(var n in t||(t={}))_n.call(t,n)&&Lt(e,n,t[n]);if(He)for(var n of He(t))yn.call(t,n)&&Lt(e,n,t[n]);return e},ne=(e,t)=>{var n={};for(var r in e)_n.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&He)for(var r of He(e))t.indexOf(r)<0&&yn.call(e,r)&&(n[r]=e[r]);return n};const he=(e,t)=>{const{formats:n}=K();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},ui=Le(e=>{var t=e,{locale:n,format:r}=t,i=ne(t,["locale","format"]);if(n==null)throw new Error(\'[svelte-i18n] A "locale" must be set to format numbers\');return r&&(i=he("number",r)),new Intl.NumberFormat(n,i)}),hi=Le(e=>{var t=e,{locale:n,format:r}=t,i=ne(t,["locale","format"]);if(n==null)throw new Error(\'[svelte-i18n] A "locale" must be set to format dates\');return r?i=he("date",r):Object.keys(i).length===0&&(i=he("date","short")),new Intl.DateTimeFormat(n,i)}),fi=Le(e=>{var t=e,{locale:n,format:r}=t,i=ne(t,["locale","format"]);if(n==null)throw new Error(\'[svelte-i18n] A "locale" must be set to format time values\');return r?i=he("time",r):Object.keys(i).length===0&&(i=he("time","short")),new Intl.DateTimeFormat(n,i)}),li=(e={})=>{var t=e,{locale:n=k()}=t,r=ne(t,["locale"]);return ui(mt({locale:n},r))},ci=(e={})=>{var t=e,{locale:n=k()}=t,r=ne(t,["locale"]);return hi(mt({locale:n},r))},di=(e={})=>{var t=e,{locale:n=k()}=t,r=ne(t,["locale"]);return fi(mt({locale:n},r))},mi=Le((e,t=k())=>new gn(e,t,K().formats,{ignoreTag:K().ignoreTag})),gi=(e,t={})=>{var n,r,i,a;let o=t;typeof e=="object"&&(o=e,e=o.id);const{values:s,locale:u=k(),default:h}=o;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=bn(e,u);if(!f)f=(a=(i=(r=(n=K()).handleMissingMessage)==null?void 0:r.call(n,{locale:u,id:e,defaultValue:h}))!=null?i:h)!=null?a:e;else if(typeof f!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),f;if(!s)return f;let c=f;try{c=mi(f,u).format(s)}catch(l){l instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,l.message)}return c},bi=(e,t)=>di(t).format(e),pi=(e,t)=>ci(t).format(e),_i=(e,t)=>li(t).format(e),yi=(e,t=k())=>bn(e,t),Na=j([te,ee],()=>gi);j([te],()=>bi);j([te],()=>pi);j([te],()=>_i);j([te,ee],()=>yi);/*!\n * @kurkle/color v0.3.4\n * https://github.com/kurkle/color#readme\n * (c) 2024 Jukka Kurkela\n * Released under the MIT License\n */function de(e){return e+.5|0}const F=(e,t,n)=>Math.max(Math.min(e,n),t);function ae(e){return F(de(e*2.55),0,255)}function D(e){return F(de(e*255),0,255)}function C(e){return F(de(e/2.55)/100,0,1)}function Ct(e){return F(de(e*100),0,100)}const O={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},rt=[..."0123456789ABCDEF"],xi=e=>rt[e&15],Ei=e=>rt[(e&240)>>4]+rt[e&15],be=e=>(e&240)>>4===(e&15),vi=e=>be(e.r)&&be(e.g)&&be(e.b)&&be(e.a);function Hi(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&O[e[1]]*17,g:255&O[e[2]]*17,b:255&O[e[3]]*17,a:t===5?O[e[4]]*17:255}:(t===7||t===9)&&(n={r:O[e[1]]<<4|O[e[2]],g:O[e[3]]<<4|O[e[4]],b:O[e[5]]<<4|O[e[6]],a:t===9?O[e[7]]<<4|O[e[8]]:255})),n}const Ti=(e,t)=>e<255?t(e):"";function Si(e){var t=vi(e)?xi:Ei;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Ti(e.a,t):void 0}const wi=/^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function xn(e,t,n){const r=t*Math.min(n,1-n),i=(a,o=(a+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function Bi(e,t,n){const r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function Ai(e,t,n){const r=xn(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function Oi(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function gt(e){const n=e.r/255,r=e.g/255,i=e.b/255,a=Math.max(n,r,i),o=Math.min(n,r,i),s=(a+o)/2;let u,h,f;return a!==o&&(f=a-o,h=s>.5?f/(2-a-o):f/(a+o),u=Oi(n,r,i,f,a),u=u*60+.5),[u|0,h||0,s]}function bt(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(D)}function pt(e,t,n){return bt(xn,e,t,n)}function Pi(e,t,n){return bt(Ai,e,t,n)}function Ni(e,t,n){return bt(Bi,e,t,n)}function En(e){return(e%360+360)%360}function Ii(e){const t=wi.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?ae(+t[5]):D(+t[5]));const i=En(+t[2]),a=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=Pi(i,a,o):t[1]==="hsv"?r=Ni(i,a,o):r=pt(i,a,o),{r:r[0],g:r[1],b:r[2],a:n}}function Mi(e,t){var n=gt(e);n[0]=En(n[0]+t),n=pt(n),e.r=n[0],e.g=n[1],e.b=n[2]}function Li(e){if(!e)return;const t=gt(e),n=t[0],r=Ct(t[1]),i=Ct(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${C(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const Rt={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Ut={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Ci(){const e={},t=Object.keys(Ut),n=Object.keys(Rt);let r,i,a,o,s;for(r=0;r<t.length;r++){for(o=s=t[r],i=0;i<n.length;i++)a=n[i],s=s.replace(a,Rt[a]);a=parseInt(Ut[o],16),e[s]=[a>>16&255,a>>8&255,a&255]}return e}let pe;function Ri(e){pe||(pe=Ci(),pe.transparent=[0,0,0,0]);const t=pe[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Ui=/^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function Fi(e){const t=Ui.exec(e);let n=255,r,i,a;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?ae(o):F(o*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?ae(r):F(r,0,255)),i=255&(t[4]?ae(i):F(i,0,255)),a=255&(t[6]?ae(a):F(a,0,255)),{r,g:i,b:a,a:n}}}function Di(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${C(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Xe=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,W=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Gi(e,t,n){const r=W(C(e.r)),i=W(C(e.g)),a=W(C(e.b));return{r:D(Xe(r+n*(W(C(t.r))-r))),g:D(Xe(i+n*(W(C(t.g))-i))),b:D(Xe(a+n*(W(C(t.b))-a))),a:e.a+n*(t.a-e.a)}}function _e(e,t,n){if(e){let r=gt(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=pt(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function vn(e,t){return e&&Object.assign(t||{},e)}function Ft(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=D(e[3]))):(t=vn(e,{r:0,g:0,b:0,a:1}),t.a=D(t.a)),t}function ji(e){return e.charAt(0)==="r"?Fi(e):Ii(e)}class it{constructor(t){if(t instanceof it)return t;const n=typeof t;let r;n==="object"?r=Ft(t):n==="string"&&(r=Hi(t)||Ri(t)||ji(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=vn(this._rgb);return t&&(t.a=C(t.a)),t}set rgb(t){this._rgb=Ft(t)}rgbString(){return this._valid?Di(this._rgb):void 0}hexString(){return this._valid?Si(this._rgb):void 0}hslString(){return this._valid?Li(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let a;const o=n===a?.5:n,s=2*o-1,u=r.a-i.a,h=((s*u===-1?s:(s+u)/(1+s*u))+1)/2;a=1-h,r.r=255&h*r.r+a*i.r+.5,r.g=255&h*r.g+a*i.g+.5,r.b=255&h*r.b+a*i.b+.5,r.a=o*r.a+(1-o)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=Gi(this._rgb,t._rgb,n)),this}clone(){return new it(this.rgb)}alpha(t){return this._rgb.a=D(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=de(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return _e(this._rgb,2,t),this}darken(t){return _e(this._rgb,2,-t),this}saturate(t){return _e(this._rgb,1,t),this}desaturate(t){return _e(this._rgb,1,-t),this}rotate(t){return Mi(this._rgb,t),this}}const Dt=/^on/,Hn=[];Object.keys(globalThis).forEach(e=>{Dt.test(e)&&Hn.push(e.replace(Dt,""))});function Ce(e){const t=Q,n=[];function r(i){Un(t,i)}Xt(()=>{const i=e();Hn.forEach(i instanceof Element?a=>n.push(Pn(i,a,r)):a=>n.push(i.$on(a,r)))}),Yt(()=>{for(;n.length;)n.pop()()})}function ki(e){let t,n=[e[1]],r={};for(let i=0;i<n.length;i+=1)r=N(r,n[i]);return{c(){t=On("canvas"),Mn(t,r)},m(i,a){An(i,t,a),e[8](t)},p:P,i:P,o:P,d(i){i&&kt(t),e[8](null)}}}function Vi(e){let{data:t,type:n,options:r,plugins:i,children:a,$$scope:o,$$slots:s,...u}=e;return u}function Xi(e,t,n){let{type:r}=t,{data:i={datasets:[]}}=t,{options:a={}}=t,{plugins:o=[]}=t,{updateMode:s=void 0}=t,{chart:u=null}=t,h,f=Vi(t);Xt(()=>{n(2,u=new Te(h,{type:r,data:i,options:a,plugins:o}))}),Rn(()=>{u&&(n(2,u.data=i,u),Object.assign(u.options,a),u.update(s))}),Yt(()=>{u&&u.destroy(),n(2,u=null)}),Ce(()=>h);function c(l){R[l?"unshift":"push"](()=>{h=l,n(0,h)})}return e.$$set=l=>{n(9,t=N(N({},t),G(l))),"type"in l&&n(3,r=l.type),"data"in l&&n(4,i=l.data),"options"in l&&n(5,a=l.options),"plugins"in l&&n(6,o=l.plugins),"updateMode"in l&&n(7,s=l.updateMode),"chart"in l&&n(2,u=l.chart)},t=G(t),[h,f,u,r,i,a,o,s,c]}class _t extends Pe{constructor(t){super(),Oe(this,t,Xi,ki,fe,{type:3,data:4,options:5,plugins:6,updateMode:7,chart:2})}}function Yi(e){let t,n,r;const i=[{type:"line"},e[1]];function a(s){e[4](s)}let o={};for(let s=0;s<i.length;s+=1)o=N(o,i[s]);return e[0]!==void 0&&(o.chart=e[0]),t=new _t({props:o}),e[3](t),R.push(()=>ft(t,"chart",a)),{c(){lt(t.$$.fragment)},m(s,u){Be(t,s,u),r=!0},p(s,[u]){const h=u&2?ut(i,[i[0],ht(s[1])]):{};!n&&u&1&&(n=!0,h.chart=s[0],ot(()=>n=!1)),t.$set(h)},i(s){r||(le(t.$$.fragment,s),r=!0)},o(s){we(t.$$.fragment,s),r=!1},d(s){e[3](null),Ae(t,s)}}}function Zi(e,t,n){Te.register(Tn);let{chart:r=null}=t,i,a;Ce(()=>a);function o(u){R[u?"unshift":"push"](()=>{a=u,n(2,a)})}function s(u){r=u,n(0,r)}return e.$$set=u=>{n(5,t=N(N({},t),G(u))),"chart"in u&&n(0,r=u.chart)},e.$$.update=()=>{n(1,i=t)},t=G(t),[r,i,a,o,s]}class Ia extends Pe{constructor(t){super(),Oe(this,t,Zi,Yi,fe,{chart:0})}}function Wi(e){let t,n,r;const i=[{type:"doughnut"},e[1]];function a(s){e[4](s)}let o={};for(let s=0;s<i.length;s+=1)o=N(o,i[s]);return e[0]!==void 0&&(o.chart=e[0]),t=new _t({props:o}),e[3](t),R.push(()=>ft(t,"chart",a)),{c(){lt(t.$$.fragment)},m(s,u){Be(t,s,u),r=!0},p(s,[u]){const h=u&2?ut(i,[i[0],ht(s[1])]):{};!n&&u&1&&(n=!0,h.chart=s[0],ot(()=>n=!1)),t.$set(h)},i(s){r||(le(t.$$.fragment,s),r=!0)},o(s){we(t.$$.fragment,s),r=!1},d(s){e[3](null),Ae(t,s)}}}function zi(e,t,n){Te.register(Sn);let{chart:r=null}=t,i,a;Ce(()=>a);function o(u){R[u?"unshift":"push"](()=>{a=u,n(2,a)})}function s(u){r=u,n(0,r)}return e.$$set=u=>{n(5,t=N(N({},t),G(u))),"chart"in u&&n(0,r=u.chart)},e.$$.update=()=>{n(1,i=t)},t=G(t),[r,i,a,o,s]}class Ma extends Pe{constructor(t){super(),Oe(this,t,zi,Wi,fe,{chart:0})}}function qi(e){let t,n,r;const i=[{type:"bar"},e[1]];function a(s){e[4](s)}let o={};for(let s=0;s<i.length;s+=1)o=N(o,i[s]);return e[0]!==void 0&&(o.chart=e[0]),t=new _t({props:o}),e[3](t),R.push(()=>ft(t,"chart",a)),{c(){lt(t.$$.fragment)},m(s,u){Be(t,s,u),r=!0},p(s,[u]){const h=u&2?ut(i,[i[0],ht(s[1])]):{};!n&&u&1&&(n=!0,h.chart=s[0],ot(()=>n=!1)),t.$set(h)},i(s){r||(le(t.$$.fragment,s),r=!0)},o(s){we(t.$$.fragment,s),r=!1},d(s){e[3](null),Ae(t,s)}}}function Qi(e,t,n){Te.register(wn);let{chart:r=null}=t,i,a;Ce(()=>a);function o(u){R[u?"unshift":"push"](()=>{a=u,n(2,a)})}function s(u){r=u,n(0,r)}return e.$$set=u=>{n(5,t=N(N({},t),G(u))),"chart"in u&&n(0,r=u.chart)},e.$$.update=()=>{n(1,i=t)},t=G(t),[r,i,a,o,s]}class La extends Pe{constructor(t){super(),Oe(this,t,Qi,qi,fe,{chart:0})}}const w=[];for(let e=0;e<256;++e)w.push((e+256).toString(16).slice(1));function Ji(e,t=0){return(w[e[t+0]]+w[e[t+1]]+w[e[t+2]]+w[e[t+3]]+"-"+w[e[t+4]]+w[e[t+5]]+"-"+w[e[t+6]]+w[e[t+7]]+"-"+w[e[t+8]]+w[e[t+9]]+"-"+w[e[t+10]]+w[e[t+11]]+w[e[t+12]]+w[e[t+13]]+w[e[t+14]]+w[e[t+15]]).toLowerCase()}let Ye;const $i=new Uint8Array(16);function Ki(){if(!Ye){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ye=crypto.getRandomValues.bind(crypto)}return Ye($i)}const ea=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Gt={randomUUID:ea};function ta(e,t,n){e=e||{};const r=e.random??e.rng?.()??Ki();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Ji(r)}function Ca(e,t,n){return Gt.randomUUID&&!e?Gt.randomUUID():ta(e)}export{te as $,P as A,La as B,it as C,Ma as D,oa as E,fa as F,X as G,pa as H,Pn as I,da as J,Ea as K,Ia as L,sa as M,_a as N,la as O,ha as P,ba as Q,R,Pe as S,ft as T,ga as U,ot as V,ze as W,at as X,wa as Y,ra as Z,Ta as _,Oe as a,va as a0,Ca as a1,Ba as a2,ma as a3,Ha as a4,Sa as a5,Ve as a6,kt as b,Ae as c,j as d,le as e,An as f,Pa as g,On as h,Oa as i,lt as j,Nn as k,ia as l,Be as m,Yt as n,Xt as o,ca as p,ya as q,Aa as r,fe as s,we as t,xa as u,aa as v,Ne as w,Vt as x,ua as y,Na as z};\n',
21263
+ "zh-CN-wPD53IzZ.js": 'const e={error:"\u9519\u8BEF",loading:"\u52A0\u8F7D\u4E2D...",save:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",edit:"\u7F16\u8F91",add:"\u6DFB\u52A0",confirm:"\u786E\u8BA4",reset:"\u91CD\u7F6E",refresh:"\u5237\u65B0",search:"\u641C\u7D22",filter:"\u7B5B\u9009",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",close:"\u5173\u95ED",show:"\u663E\u793A",hide:"\u9690\u85CF",copy:"\u590D\u5236",copied:"\u5DF2\u590D\u5236"},t={dashboard:"\u4EEA\u8868\u677F",home:"\u9996\u9875",routes:"\u8DEF\u7531\u7BA1\u7406",logs:"\u8BF7\u6C42\u65E5\u5FD7",configuration:"\u914D\u7F6E\u4E2D\u5FC3"},r={home:"\u9996\u9875",routes:"\u8DEF\u7531\u7BA1\u7406",newRoute:"\u65B0\u5EFA\u8DEF\u7531",editRoute:"\u7F16\u8F91\u8DEF\u7531"},a={title:"\u4EEA\u8868\u677F",dataRange:"\u6570\u636E\u65F6\u95F4\u8303\u56F4",totalRequests:"\u603B\u8BF7\u6C42\u6570",requestsPerSec:"\u6BCF\u79D2\u8BF7\u6C42\u6570",requestsPerSecond:"\u6BCF\u79D2\u8BF7\u6C42\u6570",successRate:"\u6210\u529F\u7387",avgResponseTime:"\u5E73\u5747\u54CD\u5E94\u65F6\u95F4",upstreamAnalysis:"\u4E0A\u6E38\u5206\u6790",upstreamDistribution:"\u4E0A\u6E38\u8BF7\u6C42\u5206\u5E03",upstreamFailures:"\u4E0A\u6E38\u5931\u8D25\u7EDF\u8BA1",upstreamStatusCodes:"\u4E0A\u6E38\u72B6\u6001\u7801\u5206\u5E03",noUpstreamData:"\u6240\u9009\u65F6\u95F4\u8303\u56F4\u5185\u6682\u65E0\u4E0A\u6E38\u6570\u636E",noData:"\u6682\u65E0\u6570\u636E"},o={title:"\u76D1\u63A7\u56FE\u8868",range:{"1h":"1\u5C0F\u65F6","12h":"12\u5C0F\u65F6","24h":"24\u5C0F\u65F6",oneHour:"1\u5C0F\u65F6",twelveHours:"12\u5C0F\u65F6",twentyFourHours:"24\u5C0F\u65F6"},charts:{requestsTrend:"\u8BF7\u6C42\u6570\u8D8B\u52BF",periodRequests:"\u65F6\u6BB5\u8BF7\u6C42\u6570",requests:"\u8BF7\u6C42\u6570",responseTimeTrend:"\u54CD\u5E94\u65F6\u95F4\u8D8B\u52BF",avgResponseTime:"\u5E73\u5747\u54CD\u5E94\u65F6\u95F4 (ms)",milliseconds:"\u6BEB\u79D2 (ms)",successRateTrend:"\u6210\u529F\u7387\u8D8B\u52BF",successRate:"\u6210\u529F\u7387 (%)",percentage:"\u767E\u5206\u6BD4 (%)",errorsTrend:"\u9519\u8BEF\u6570\u8D8B\u52BF",periodErrors:"\u65F6\u6BB5\u9519\u8BEF\u6570",errors:"\u9519\u8BEF\u6570"},noData:"\u6682\u65E0\u5386\u53F2\u6570\u636E"},s={title:"\u8DEF\u7531\u7BA1\u7406",subtitle:"\u7BA1\u7406\u60A8\u7684\u53CD\u5411\u4EE3\u7406\u8DEF\u7531\u548C\u4E0A\u6E38\u670D\u52A1\u5668",addRoute:"\u6DFB\u52A0\u8DEF\u7531",newRoute:"+ \u65B0\u5EFA\u8DEF\u7531",createFirstRoute:"\u521B\u5EFA\u7B2C\u4E00\u4E2A\u8DEF\u7531",editRoute:"\u7F16\u8F91\u8DEF\u7531",deleteRoute:"\u5220\u9664\u8DEF\u7531",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",path:"\u8DEF\u5F84",upstreams:"\u4E0A\u6E38\u670D\u52A1\u5668",actions:"\u64CD\u4F5C",searchPlaceholder:"\u641C\u7D22\u8DEF\u7531\u6216\u4E0A\u6E38\u670D\u52A1\u5668...",allTransformers:"\u6240\u6709\u8F6C\u6362\u5668",noRoutes:"\u6682\u65E0\u8DEF\u7531\u914D\u7F6E",noRoutesMessage:"\u521B\u5EFA\u60A8\u7684\u7B2C\u4E00\u4E2A\u8DEF\u7531\u4EE5\u5F00\u59CB\u4EE3\u7406\u8BF7\u6C42",noMatchingRoutes:"\u6CA1\u6709\u5339\u914D\u7684\u8DEF\u7531",noMatchingMessage:"\u8BF7\u5C1D\u8BD5\u8C03\u6574\u641C\u7D22\u6216\u7B5B\u9009\u6761\u4EF6",showingRoutes:"\u663E\u793A {count} / {total} \u4E2A\u8DEF\u7531",confirmDelete:"\u786E\u8BA4\u5220\u9664\u8DEF\u7531",confirmDeleteMessage:\'\u786E\u5B9A\u8981\u5220\u9664\u8DEF\u7531 "{path}" \u5417\uFF1F\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002\',deleted:\'\u8DEF\u7531 "{path}" \u5DF2\u5220\u9664\',deleteFailed:"\u5220\u9664\u5931\u8D25: {error}",duplicated:\'\u8DEF\u7531 "{path}" \u5DF2\u590D\u5236\',duplicateFailed:"\u590D\u5236\u5931\u8D25: {error}",noRoutesToExport:"\u6CA1\u6709\u53EF\u5BFC\u51FA\u7684\u8DEF\u7531",exported:"\u8DEF\u7531\u5DF2\u5BFC\u51FA",importMustBeArray:"\u5BFC\u5165\u6587\u4EF6\u5FC5\u987B\u662F\u8DEF\u7531\u6570\u7EC4",importSuccess:"\u6210\u529F\u5BFC\u5165 {success} \u4E2A\u8DEF\u7531",importPartialSuccess:"\u6210\u529F\u5BFC\u5165 {success} \u4E2A\u8DEF\u7531\uFF0C\u5931\u8D25 {failed} \u4E2A",importFailed:"\u5BFC\u5165\u5931\u8D25: {error}",filterStatus:{all:"\u5168\u90E8\u72B6\u6001",healthy:"\u4EC5\u5065\u5EB7",unhealthy:"\u6709\u5F02\u5E38"}},l={title:"\u914D\u7F6E\u4E2D\u5FC3",subtitle:"\u7F16\u8F91\u548C\u7BA1\u7406\u7CFB\u7EDF\u914D\u7F6E",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",reload:"\u91CD\u65B0\u52A0\u8F7D",restart:"\u91CD\u542F\u670D\u52A1",formEditor:"\u8868\u5355\u7F16\u8F91",jsonEditor:"JSON \u7F16\u8F91",systemSettings:"\u7CFB\u7EDF\u8BBE\u7F6E",serverPort:"\u670D\u52A1\u5668\u7AEF\u53E3",workerProcesses:"\u5DE5\u4F5C\u8FDB\u7A0B\u6570",workerProcessesHelp:"\u8981\u542F\u52A8\u7684\u5DE5\u4F5C\u8FDB\u7A0B\u6570\u91CF",logLevel:"\u65E5\u5FD7\u7EA7\u522B",bodyParserLimit:"\u8BF7\u6C42\u4F53\u5927\u5C0F\u9650\u5236",bodyParserLimitHelp:\'\u6700\u5927\u8BF7\u6C42\u4F53\u5927\u5C0F\uFF08\u4F8B\u5982\uFF1A"50mb"\u3001"100kb"\uFF09\',requiresRestart:"\u6CE8\u610F\uFF1A\u7AEF\u53E3\u3001\u5DE5\u4F5C\u8FDB\u7A0B\u6570\u3001\u65E5\u5FD7\u7EA7\u522B\u548C\u8BF7\u6C42\u4F53\u5927\u5C0F\u9650\u5236\u7684\u66F4\u6539\u9700\u8981\u91CD\u542F\u670D\u52A1\u624D\u80FD\u751F\u6548\u3002",routesConfigured:"{count} \u4E2A\u8DEF\u7531\u5DF2\u914D\u7F6E\u3002",manageRoutes:"\u4F7F\u7528\u8DEF\u7531\u9875\u9762\u7BA1\u7406\u8DEF\u7531\u3002",jsonConfiguration:"JSON \u914D\u7F6E",jsonParseError:"JSON \u89E3\u6790\u9519\u8BEF: {error}",jsonPlaceholder:"\u8F93\u5165 JSON \u914D\u7F6E...",jsonHelp:"\u7F16\u8F91\u539F\u59CB JSON \u914D\u7F6E\u3002\u4FDD\u5B58\u524D\u5C06\u9A8C\u8BC1\u66F4\u6539\u3002",unsavedChanges:"\u60A8\u6709\u672A\u4FDD\u5B58\u7684\u66F4\u6539",reset:"\u91CD\u7F6E",save:"\u4FDD\u5B58\u914D\u7F6E",confirmRestart:"\u786E\u8BA4\u91CD\u542F\u670D\u52A1",restartMessage:"\u786E\u5B9A\u8981\u91CD\u542F\u670D\u52A1\u5417\uFF1F\u8FD9\u5C06\u5BFC\u81F4\u77ED\u6682\u4E2D\u65AD\uFF08\u901A\u5E38 2-3 \u79D2\uFF09\uFF0C\u56E0\u4E3A\u670D\u52A1\u4F1A\u4F18\u96C5\u5730\u91CD\u542F\u3002",restartWarning:"\u6D3B\u52A8\u8FDE\u63A5\u53EF\u80FD\u4F1A\u6682\u65F6\u4E2D\u65AD\u3002",validationFailed:"\u914D\u7F6E\u9A8C\u8BC1\u5931\u8D25: {error}",saved:"\u914D\u7F6E\u5DF2\u4FDD\u5B58",saveFailed:"\u4FDD\u5B58\u5931\u8D25: {error}",exported:"\u914D\u7F6E\u5DF2\u5BFC\u51FA",imported:"\u914D\u7F6E\u5DF2\u5BFC\u5165",importFailed:"\u5BFC\u5165\u5931\u8D25: {error}",reloaded:"\u914D\u7F6E\u5DF2\u6210\u529F\u91CD\u65B0\u52A0\u8F7D",reloadFailed:"\u91CD\u65B0\u52A0\u8F7D\u5931\u8D25: {error}",restartSent:"\u91CD\u542F\u4FE1\u53F7\u5DF2\u53D1\u9001\uFF0C\u670D\u52A1\u5C06\u5728\u51E0\u79D2\u540E\u91CD\u542F",restartDaemonOnly:\'\u91CD\u542F\u529F\u80FD\u4EC5\u5728 daemon \u6A21\u5F0F\u4E0B\u53EF\u7528\u3002\u8BF7\u4F7F\u7528 "bungee restart" \u547D\u4EE4\u6216\u624B\u52A8\u91CD\u542F\u5F00\u53D1\u670D\u52A1\u5668\u3002\',restartFailed:"\u91CD\u542F\u5931\u8D25: {error}"},i={title:"404",message:"\u9875\u9762\u672A\u627E\u5230",goHome:"\u8FD4\u56DE\u9996\u9875"},n={newRoute:"\u65B0\u5EFA\u8DEF\u7531",editRoute:"\u7F16\u8F91\u8DEF\u7531",backToList:"\u8FD4\u56DE\u5217\u8868",routePath:"\u8DEF\u7531\u8DEF\u5F84",pathPlaceholder:"\u4F8B\u5982: /api/*",pathHelp:"\u652F\u6301\u901A\u914D\u7B26 (*) \u548C\u53C2\u6570 (:param)",pathHelpLong:"\u8DEF\u5F84\u652F\u6301\u901A\u914D\u7B26 (*) \u5339\u914D\u4EFB\u610F\u5B57\u7B26\uFF0C\u4EE5\u53CA\u53C2\u6570\u5360\u4F4D\u7B26 (:param) \u6355\u83B7\u8DEF\u5F84\u7247\u6BB5",pathCannotBeChanged:"\u7F16\u8F91\u6A21\u5F0F\u4E0B\u8DEF\u5F84\u4E0D\u53EF\u4FEE\u6539",pathRewrite:"\u8DEF\u5F84\u91CD\u5199",pathRewriteHelp:"\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F\u6A21\u5F0F\u4FEE\u6539\u8BF7\u6C42\u8DEF\u5F84",pathRewriteTooltip:"\u8DEF\u5F84\u91CD\u5199\u5141\u8BB8\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\u548C\u66FF\u6362\u8BF7\u6C42\u8DEF\u5F84\u3002\u4F8B\u5982\uFF1A^/api/v1 \u2192 /api/v2 \u4F1A\u5C06\u6240\u6709 /api/v1 \u5F00\u5934\u7684\u8DEF\u5F84\u91CD\u5199\u4E3A /api/v2",addPathRewriteRule:"\u6DFB\u52A0\u8DEF\u5F84\u91CD\u5199\u89C4\u5219",patternPlaceholder:"\u5339\u914D\u6B63\u5219\u8868\u8FBE\u5F0F (\u5982 ^/test)",replacementPlaceholder:"\u91CD\u5199\u8DEF\u5F84 (\u5982 /v1)",confirmDeleteRule:"\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u6761\u89C4\u5219\u5417\uFF1F",upstreamCountTooltip:"\u5DF2\u914D\u7F6E {count} \u4E2A\u4E0A\u6E38\u670D\u52A1\u5668",upstreams:"\u4E0A\u6E38\u670D\u52A1\u5668",upstreamsHelp:"\u914D\u7F6E\u4E00\u4E2A\u6216\u591A\u4E2A\u4E0A\u6E38\u670D\u52A1\u5668",addUpstream:"\u6DFB\u52A0\u4E0A\u6E38",transformer:"\u8DEF\u7531\u8F6C\u6362\u5668",transformerHelp:"\u5E94\u7528\u4E8E\u6574\u4E2A\u8DEF\u7531\u7684\u8F6C\u6362\u5668\uFF08\u53EF\u9009\uFF09",noPluginsAvailable:"\u5F53\u524D\u65E0\u53EF\u7528\u8DEF\u7531\u8F6C\u6362\u5668\u63D2\u4EF6",optional:"\u53EF\u9009",basicInfo:"\u57FA\u672C\u4FE1\u606F",requestModification:"\u8BF7\u6C42\u4FEE\u6539",requestModificationHelp:"\u4FEE\u6539\u53D1\u9001\u5230\u4E0A\u6E38\u7684\u8BF7\u6C42\u5934\u3001\u8BF7\u6C42\u4F53\u548C\u67E5\u8BE2\u53C2\u6570",routeLevelModificationNote:"\u8FD9\u4E9B\u89C4\u5219\u5E94\u7528\u4E8E\u6240\u6709\u4E0A\u6E38\u670D\u52A1\u5668",preview:"\u914D\u7F6E\u9884\u89C8",previewHelp:"\u67E5\u770B\u8DEF\u7531\u914D\u7F6E\u7684\u53EF\u89C6\u5316\u9884\u89C8",features:"\u529F\u80FD",featuresEnabled:"\u5DF2\u542F\u7528",enabledFeatures:"\u5DF2\u542F\u7528\u529F\u80FD",notSet:"\u672A\u8BBE\u7F6E",totalWeight:"\u603B\u6743\u91CD",jsonConfig:"JSON \u914D\u7F6E",requestFlow:"\u8BF7\u6C42\u6D41\u7A0B",clientRequest:"\u5BA2\u6237\u7AEF\u8BF7\u6C42",selectUpstream:"\u9009\u62E9\u4E0A\u6E38",returnResponse:"\u8FD4\u56DE\u54CD\u5E94",failoverEnabled:"\u6545\u969C\u8F6C\u79FB\u5DF2\u542F\u7528",templateApplied:"\u6A21\u677F\u5DF2\u5E94\u7528",confirmCancel:"\u786E\u5B9A\u8981\u53D6\u6D88\u5417\uFF1F\u672A\u4FDD\u5B58\u7684\u66F4\u6539\u5C06\u4E22\u5931\u3002",failoverTitle:"\u6545\u969C\u8F6C\u79FB",failoverHelp:"\u914D\u7F6E\u81EA\u52A8\u6545\u969C\u8F6C\u79FB\u548C\u5065\u5EB7\u68C0\u67E5\u673A\u5236",enableFailover:"\u542F\u7528\u81EA\u52A8\u6545\u969C\u8F6C\u79FB",retryableStatusCodes:"\u53EF\u91CD\u8BD5\u7684\u72B6\u6001\u7801",retryableStatusCodesPlaceholder:"\u9ED8\u8BA4: 500, 502, 503, 504\uFF08\u670D\u52A1\u5668\u9519\u8BEF\uFF09",retryableStatusCodesHelp:"\u9047\u5230\u8FD9\u4E9B\u72B6\u6001\u7801\u65F6\u5C06\u81EA\u52A8\u91CD\u8BD5\u5176\u4ED6\u4E0A\u6E38",passiveHealthCheck:"\u88AB\u52A8\u5065\u5EB7\u68C0\u67E5",passiveHealthCheckTooltip:"\u901A\u8FC7\u76D1\u63A7\u5B9E\u9645\u8BF7\u6C42\u7684\u6210\u529F\u5931\u8D25\u6765\u5224\u65AD\u4E0A\u6E38\u5065\u5EB7\u72B6\u6001\uFF0C\u65E0\u9700\u989D\u5916\u63A2\u6D4B\u8BF7\u6C42",consecutiveFailuresThreshold:"\u8FDE\u7EED\u5931\u8D25\u9608\u503C",consecutiveFailuresThresholdHelp:"\u8FDE\u7EED\u5931\u8D25\u591A\u5C11\u6B21\u540E\u6807\u8BB0\u4E3A\u4E0D\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A3\uFF09",healthyThreshold:"\u5065\u5EB7\u9608\u503C",healthyThresholdHelp:"\u8FDE\u7EED\u6210\u529F\u591A\u5C11\u6B21\u540E\u6062\u590D\u4E3A\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A2\uFF09",requestTimeoutMs:"\u8BF7\u6C42\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",requestTimeoutMsHelp:"\u6B63\u5E38\u8BF7\u6C42\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A30000ms\uFF09",connectTimeoutMs:"\u8FDE\u63A5\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",connectTimeoutMsHelp:"\u5EFA\u7ACB\u8FDE\u63A5\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A5000ms\uFF09",activeHealthCheck:"\u4E3B\u52A8\u5065\u5EB7\u68C0\u67E5",activeHealthCheckTooltip:"\u5B9A\u671F\u5411\u4E0A\u6E38\u53D1\u9001\u63A2\u6D4B\u8BF7\u6C42\u6765\u4E3B\u52A8\u68C0\u6D4B\u5065\u5EB7\u72B6\u6001\uFF0C\u72EC\u7ACB\u4E8E\u4E1A\u52A1\u6D41\u91CF",enableActiveHealthCheck:"\u542F\u7528\u4E3B\u52A8\u5065\u5EB7\u68C0\u67E5",healthCheckIntervalMs:"\u68C0\u67E5\u95F4\u9694\uFF08\u6BEB\u79D2\uFF09",healthCheckIntervalMsHelp:"\u6BCF\u9694\u591A\u4E45\u6267\u884C\u4E00\u6B21\u5065\u5EB7\u68C0\u67E5\uFF08\u9ED8\u8BA4\uFF1A10000ms\uFF09",healthCheckTimeoutMs:"\u68C0\u67E5\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",healthCheckTimeoutMsHelp:"\u5065\u5EB7\u68C0\u67E5\u8BF7\u6C42\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A3000ms\uFF09",healthCheckPath:"\u68C0\u67E5\u8DEF\u5F84",healthCheckPathHelp:"\u5065\u5EB7\u68C0\u67E5\u7684 HTTP \u8DEF\u5F84\uFF08\u9ED8\u8BA4\uFF1A/health\uFF09",healthCheckMethod:"HTTP \u65B9\u6CD5",healthCheckExpectedStatus:"\u671F\u671B\u72B6\u6001\u7801",healthCheckExpectedStatusHelp:"\u5065\u5EB7\u68C0\u67E5\u671F\u671B\u8FD4\u56DE\u7684\u72B6\u6001\u7801\uFF08\u9ED8\u8BA4\uFF1A200\uFF09",healthCheckUnhealthyThreshold:"\u4E0D\u5065\u5EB7\u9608\u503C",healthCheckUnhealthyThresholdHelp:"\u8FDE\u7EED\u5931\u8D25\u591A\u5C11\u6B21\u6807\u8BB0\u4E3A\u4E0D\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A3\uFF09",healthCheckHealthyThreshold:"\u5065\u5EB7\u9608\u503C",healthCheckHealthyThresholdHelp:"\u8FDE\u7EED\u6210\u529F\u591A\u5C11\u6B21\u6062\u590D\u4E3A\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A2\uFF09",slowStart:"\u6162\u542F\u52A8",slowStartTooltip:"\u6062\u590D\u7684\u4E0A\u6E38\u9010\u6B65\u589E\u52A0\u6D41\u91CF\uFF0C\u907F\u514D\u77AC\u95F4\u538B\u529B\u5BFC\u81F4\u518D\u6B21\u6545\u969C",enableSlowStart:"\u542F\u7528\u6162\u542F\u52A8\u673A\u5236",slowStartDurationMs:"\u6162\u542F\u52A8\u6301\u7EED\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",slowStartDurationMsHelp:"\u4ECE\u4E0D\u5065\u5EB7\u6062\u590D\u540E\u9010\u6B65\u589E\u52A0\u6743\u91CD\u7684\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A30000ms\uFF09",slowStartInitialWeightFactor:"\u521D\u59CB\u6743\u91CD\u56E0\u5B50",slowStartInitialWeightFactorHelp:"\u6062\u590D\u540E\u521D\u59CB\u6743\u91CD\u7684\u6BD4\u4F8B\uFF0C0.1 \u8868\u793A 10%\uFF08\u9ED8\u8BA4\uFF1A0.1\uFF09",failoverInfoNotice:"\u6545\u969C\u8F6C\u79FB\u529F\u80FD\u53EF\u4EE5\u81EA\u52A8\u68C0\u6D4B\u4E0A\u6E38\u5065\u5EB7\u72B6\u6001\uFF0C\u5728\u6545\u969C\u65F6\u5207\u6362\u5230\u5907\u7528\u4E0A\u6E38\uFF0C\u4FDD\u8BC1\u670D\u52A1\u53EF\u7528\u6027\u3002",recoveryIntervalMs:"\u6062\u590D\u68C0\u6D4B\u95F4\u9694\uFF08\u6BEB\u79D2\uFF09",recoveryIntervalPlaceholder:"5000",recoveryIntervalHelp:"\u4E0A\u6E38\u5931\u8D25\u540E\u7B49\u5F85\u591A\u4E45\u5C1D\u8BD5\u6062\u590D",recoveryTimeoutMs:"\u6062\u590D\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",recoveryTimeoutPlaceholder:"3000",recoveryTimeoutHelp:"\u6062\u590D\u8BF7\u6C42\u7684\u8D85\u65F6\u65F6\u95F4\uFF0C\u907F\u514D\u957F\u65F6\u95F4 pending",saveRoute:"\u4FDD\u5B58\u8DEF\u7531",cancel:"\u53D6\u6D88",saving:"\u4FDD\u5B58\u4E2D...",loadingTemplates:"\u52A0\u8F7D\u6A21\u677F\u4E2D...",useTemplate:"\u4F7F\u7528\u6A21\u677F",routeSaved:"\u8DEF\u7531\u5DF2\u4FDD\u5B58",routeUpdated:"\u8DEF\u7531\u5DF2\u66F4\u65B0",saveFailed:"\u4FDD\u5B58\u5931\u8D25: {error}",pathRequired:"\u8DEF\u7531\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A",upstreamRequired:"\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u4E0A\u6E38\u670D\u52A1\u5668"},u={upstreams:"{count} \u4E2A\u4E0A\u6E38",hasTransformer:"\u5E26\u8F6C\u6362\u5668",failover:"\u6545\u969C\u8F6C\u79FB",edit:"\u7F16\u8F91",duplicate:"\u590D\u5236",delete:"\u5220\u9664",duplicating:"\u590D\u5236\u4E2D...",deleting:"\u5220\u9664\u4E2D...",viewAll:"\u67E5\u770B\u5168\u90E8 {count} \u4E2A",moreActions:"\u66F4\u591A\u64CD\u4F5C",tableHeaders:{status:"\u72B6\u6001",target:"\u4E3B\u673A\u5730\u5740",weight:"\u6743\u91CD",priority:"\u4F18\u5148\u7EA7"},pathRewrite:{original:"\u539F\u59CB",rewriteTo:"\u91CD\u5199\u4E3A"}},d={title:"\u4E0A\u6E38\u670D\u52A1\u5668\u5217\u8868",close:"\u5173\u95ED",statusHealthy:"\u5065\u5EB7",statusUnhealthy:"\u5F02\u5E38",statusUnknown:"\u672A\u77E5"},c={title:"\u4E0A\u6E38\u670D\u52A1\u5668 #{index}",priority:"\u4F18\u5148\u7EA7",target:"\u76EE\u6807\u5730\u5740",targetUrl:"\u76EE\u6807\u5730\u5740",targetPlaceholder:"https://api.example.com",targetHelp:"\u4E0A\u6E38\u670D\u52A1\u5668\u7684\u5B8C\u6574 URL",weight:"\u6743\u91CD",weightHelp:"\u8D1F\u8F7D\u5747\u8861\u6743\u91CD\uFF081-100\uFF09",transformer:"\u4E0A\u6E38\u8F6C\u6362\u5668",transformerHelp:"\u4EC5\u5E94\u7528\u4E8E\u6B64\u4E0A\u6E38\u7684\u8F6C\u6362\u5668\uFF08\u53EF\u9009\uFF09",remove:"\u79FB\u9664\u4E0A\u6E38",targetRequired:"\u76EE\u6807\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",invalidUrl:"\u65E0\u6548\u7684 URL \u683C\u5F0F"},p={selectPlugin:"\u9009\u62E9\u63D2\u4EF6",none:"\u65E0\u63D2\u4EF6",description:"\u63D2\u4EF6\u8BF4\u660E",testPlugin:"\u6D4B\u8BD5\u63D2\u4EF6",testing:"\u6D4B\u8BD5\u4E2D...",input:"\u8F93\u5165\uFF08\u539F\u59CB\u683C\u5F0F\uFF09",output:"\u8F93\u51FA\uFF08\u8F6C\u6362\u540E\u683C\u5F0F\uFF09",inputPlaceholder:"\u8F93\u5165\u6D4B\u8BD5\u6570\u636E...",testSuccess:"\u8F6C\u6362\u6210\u529F",testFailed:"\u8F6C\u6362\u5931\u8D25: {error}"},h={title:"\u8BF7\u6C42\u5934",add:"\u6DFB\u52A0",addHeader:"\u6DFB\u52A0\u8BF7\u6C42\u5934",name:"\u540D\u79F0",namePlaceholder:"Content-Type",value:"\u503C",valuePlaceholder:"application/json",remove:"\u79FB\u9664",replace:"\u66FF\u6362",default:"\u9ED8\u8BA4",empty:"\u6682\u65E0\u8BF7\u6C42\u5934"},m={title:"\u8BF7\u6C42\u4F53",bodyType:"\u8BF7\u6C42\u4F53\u7C7B\u578B",json:"JSON",text:"\u7EAF\u6587\u672C",form:"\u8868\u5355\u6570\u636E",none:"\u65E0\u8BF7\u6C42\u4F53",placeholder:"\u8F93\u5165\u8BF7\u6C42\u4F53\u5185\u5BB9...",jsonInvalid:"\u65E0\u6548\u7684 JSON \u683C\u5F0F",add:"\u6DFB\u52A0",remove:"\u79FB\u9664",replace:"\u66FF\u6362",default:"\u9ED8\u8BA4",empty:"\u6682\u65E0\u5B57\u6BB5"},g={title:"\u67E5\u8BE2\u53C2\u6570",name:"\u53C2\u6570\u540D",namePlaceholder:"\u53C2\u6570\u540D\u79F0",value:"\u53C2\u6570\u503C",valuePlaceholder:"\u53C2\u6570\u503C",add:"\u6DFB\u52A0",remove:"\u79FB\u9664",replace:"\u66FF\u6362",default:"\u9ED8\u8BA4",empty:"\u6682\u65E0\u53C2\u6570"},v={title:"\u6761\u4EF6\u8868\u8FBE\u5F0F",placeholder:"request.headers[\'User-Agent\'].includes(\'Mobile\')",help:"\u4F7F\u7528 JavaScript \u8868\u8FBE\u5F0F\uFF0C\u8FD4\u56DE true \u6216 false",examples:"\u793A\u4F8B",example1:"\u68C0\u67E5\u8BF7\u6C42\u5934",example2:"\u68C0\u67E5\u67E5\u8BE2\u53C2\u6570",example3:"\u68C0\u67E5\u8BF7\u6C42\u65B9\u6CD5",test:"\u6D4B\u8BD5\u8868\u8FBE\u5F0F",testResult:"\u6D4B\u8BD5\u7ED3\u679C",resultTrue:"\u6761\u4EF6\u4E3A\u771F",resultFalse:"\u6761\u4EF6\u4E3A\u5047",resultError:"\u8868\u8FBE\u5F0F\u9519\u8BEF: {error}"},y={title:"\u8DEF\u7531\u6A21\u677F",subtitle:"\u5FEB\u901F\u521B\u5EFA\u5E38\u7528\u8DEF\u7531\u914D\u7F6E",useTemplate:"\u4F7F\u7528\u6B64\u6A21\u677F",categories:{api:"API \u4EE3\u7406",static:"\u9759\u6001\u8D44\u6E90",websocket:"WebSocket",auth:"\u8BA4\u8BC1\u4EE3\u7406"},restApi:{name:"REST API \u4EE3\u7406",description:"\u6807\u51C6\u7684 RESTful API \u4EE3\u7406\u914D\u7F6E"},graphql:{name:"GraphQL API",description:"GraphQL \u7AEF\u70B9\u4EE3\u7406"},static:{name:"\u9759\u6001\u6587\u4EF6\u670D\u52A1",description:"\u4EE3\u7406\u9759\u6001\u8D44\u6E90\u6587\u4EF6"},websocket:{name:"WebSocket \u4EE3\u7406",description:"\u5B9E\u65F6\u901A\u4FE1 WebSocket \u4EE3\u7406"},loadBalancing:{name:"\u8D1F\u8F7D\u5747\u8861",description:"\u591A\u4E0A\u6E38\u8D1F\u8F7D\u5747\u8861\u914D\u7F6E"}},T={yes:"\u786E\u5B9A",no:"\u53D6\u6D88",cancelTitle:"\u786E\u8BA4\u53D6\u6D88",cancelMessage:"\u786E\u5B9A\u8981\u53D6\u6D88\u7F16\u8F91\u5E76\u8FD4\u56DE\u5417\uFF1F\u672A\u4FDD\u5B58\u7684\u66F4\u6539\u5C06\u4E22\u5931\u3002",restoreDraftTitle:"\u6062\u590D\u8349\u7A3F",restoreDraftMessage:"\u68C0\u6D4B\u5230\u6709\u672A\u4FDD\u5B58\u7684\u8349\u7A3F\uFF0C\u662F\u5426\u6062\u590D\uFF1F"},f={targetRequired:"\u76EE\u6807\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",targetProtocol:"\u76EE\u6807\u5730\u5740\u5FC5\u987B\u4F7F\u7528 http \u6216 https \u534F\u8BAE",invalidUrl:"\u65E0\u6548\u7684 URL \u683C\u5F0F",weightPositive:"\u6743\u91CD\u5FC5\u987B\u662F\u6B63\u6570",priorityNonNegative:"\u4F18\u5148\u7EA7\u5FC5\u987B\u662F\u975E\u8D1F\u6570",totalWeightPositive:"\u603B\u6743\u91CD\u5FC5\u987B\u5927\u4E8E 0",unknownTransformer:"\u672A\u77E5\u7684\u8F6C\u6362\u5668: {transformer}\u3002\u53EF\u7528\u9009\u9879: {options}",pathRequired:"\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A",pathStartSlash:"\u8DEF\u5F84\u5FC5\u987B\u4EE5 / \u5F00\u5934",upstreamRequired:"\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u4E0A\u6E38\u670D\u52A1\u5668",invalidRegex:"\u65E0\u6548\u7684\u6B63\u5219\u8868\u8FBE\u5F0F: {pattern}",invalidStatusCode:"\u65E0\u6548\u7684\u72B6\u6001\u7801: {code}",recoveryIntervalPositive:"\u6062\u590D\u95F4\u9694\u5FC5\u987B\u5927\u4E8E 0",recoveryTimeoutPositive:"\u6062\u590D\u8D85\u65F6\u65F6\u95F4\u5FC5\u987B\u5927\u4E8E 0",expressionEmpty:"\u8868\u8FBE\u5F0F\u4E0D\u80FD\u4E3A\u7A7A",mismatchedBraces:"{{ }} \u62EC\u53F7\u4E0D\u5339\u914D",mismatchedParentheses:"\u62EC\u53F7\u4E0D\u5339\u914D",mismatchedQuotes:"\u5F15\u53F7\u4E0D\u5339\u914D",valid:"\u914D\u7F6E\u6709\u6548",errors:"\u4E2A\u9519\u8BEF",allGood:"\u914D\u7F6E\u6B63\u786E"},R={title:"\u5FEB\u6377\u952E",save:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",switchSection:"\u5207\u6362\u533A\u57DF"},S={lastSaved:"\u4E0A\u6B21\u4FDD\u5B58",justNow:"\u521A\u521A",minutesAgo:"{minutes} \u5206\u949F\u524D",hoursAgo:"{hours} \u5C0F\u65F6\u524D",restoreDraft:"\u68C0\u6D4B\u5230\u672A\u4FDD\u5B58\u7684\u8349\u7A3F\uFF0C\u662F\u5426\u6062\u590D\uFF1F"},b={globalAuth:"\u5168\u5C40\u8BA4\u8BC1",routeAuth:"\u8DEF\u7531\u8BA4\u8BC1",helpText:"\u4FDD\u62A4\u60A8\u7684 API \u7AEF\u70B9",enableAuth:"\u542F\u7528\u8BA4\u8BC1",enabled:"\u5DF2\u542F\u7528",disabled:"\u5DF2\u7981\u7528",tokens:"\u4EE4\u724C\u5217\u8868",tokenPlaceholder:"\u8F93\u5165 token \u6216\u4F7F\u7528 {{ env.TOKEN_NAME }}",addToken:"\u6DFB\u52A0\u4EE4\u724C",expressionSupport:"\u652F\u6301\u8868\u8FBE\u5F0F\u8BED\u6CD5\u6765\u5F15\u7528\u73AF\u5883\u53D8\u91CF\uFF1A",securityNotice:"\u542F\u7528\u8BA4\u8BC1\u540E\uFF0CAuthorization header \u4F1A\u81EA\u52A8\u79FB\u9664\uFF0C\u4E0D\u4F1A\u8F6C\u53D1\u7ED9\u4E0A\u6E38\u670D\u52A1\u5668\uFF08\u5B89\u5168\u63AA\u65BD\uFF09\u3002",routeAuthHelp:"\u8DEF\u7531\u7EA7\u8BA4\u8BC1\u5C06\u8986\u76D6\u5168\u5C40\u8BA4\u8BC1\u914D\u7F6E\u3002\u5982\u679C\u672A\u914D\u7F6E\uFF0C\u5219\u4F7F\u7528\u5168\u5C40\u8BA4\u8BC1\u8BBE\u7F6E\u3002"},H={title:"\u8BF7\u6C42\u65E5\u5FD7",filters:"\u7B5B\u9009\u5668",autoRefresh:"\u81EA\u52A8\u5237\u65B0",refreshInterval:"\u5237\u65B0\u95F4\u9694",refreshEvery5s:"\u6BCF 5 \u79D2",refreshEvery10s:"\u6BCF 10 \u79D2",refreshEvery30s:"\u6BCF 30 \u79D2",refreshEvery60s:"\u6BCF 60 \u79D2",lastRefreshed:"\u4E0A\u6B21\u5237\u65B0",newDataAvailable:"\u6709\u65B0\u6570\u636E\u53EF\u7528\uFF0C\u70B9\u51FB\u5237\u65B0\u67E5\u770B",searchTerm:"\u641C\u7D22",searchPlaceholder:"\u641C\u7D22\u8DEF\u5F84\u6216\u9519\u8BEF\u4FE1\u606F...",method:"HTTP \u65B9\u6CD5",allMethods:"\u6240\u6709\u65B9\u6CD5",status:"\u72B6\u6001\u7801",statusPlaceholder:"\u4F8B\u5982\uFF1A200\u3001404\u3001500",result:"\u7ED3\u679C",allResults:"\u5168\u90E8",success:"\u6210\u529F",failed:"\u5931\u8D25",timeRange:"\u65F6\u95F4\u8303\u56F4",allTime:"\u5168\u90E8\u65F6\u95F4",recentTime:"\u6700\u8FD1\u65F6\u95F4",customTime:"\u81EA\u5B9A\u4E49\u8303\u56F4",recentHours:"\u6700\u8FD1\u5C0F\u65F6\u6570",startTime:"\u5F00\u59CB\u65F6\u95F4",endTime:"\u7ED3\u675F\u65F6\u95F4",sortBy:"\u6392\u5E8F\u65B9\u5F0F",sortByTimestamp:"\u65F6\u95F4\u6233",sortByDuration:"\u6301\u7EED\u65F6\u95F4",sortByStatus:"\u72B6\u6001\u7801",sortOrder:"\u6392\u5E8F",asc:"\u5347\u5E8F",desc:"\u964D\u5E8F",time:"\u65F6\u95F4",path:"\u8DEF\u5F84",duration:"\u6301\u7EED\u65F6\u95F4",requestType:"\u7C7B\u578B",requestTypeFilter:"\u8BF7\u6C42\u7C7B\u578B",requestType_all:"\u5168\u90E8\u7C7B\u578B",requestType_final:"\u6700\u7EC8\u8BF7\u6C42",requestType_retry:"\u91CD\u8BD5\u8BF7\u6C42",requestType_recovery:"\u6062\u590D\u6D4B\u8BD5",requestType_final_desc:"\u8FD4\u56DE\u5BA2\u6237\u7AEF\u7684\u8BF7\u6C42",requestType_retry_desc:"\u91CD\u8BD5\u5C1D\u8BD5",requestType_recovery_desc:"\u6545\u969C\u6062\u590D\u6D4B\u8BD5",upstream:"\u4E0A\u6E38",actions:"\u64CD\u4F5C",viewDetail:"\u8BE6\u60C5",export:"\u5BFC\u51FA",startStream:"\u542F\u52A8\u6D41",stopStream:"\u505C\u6B62\u6D41",showing:"\u663E\u793A {start}-{end}\uFF0C\u5171 {total} \u6761",page:"\u7B2C {page} \u9875\uFF0C\u5171 {totalPages} \u9875",noData:"\u6682\u65E0\u65E5\u5FD7\u6570\u636E",advancedFilters:"\u9AD8\u7EA7\u7B5B\u9009",activeFilters:"\u4E2A\u7B5B\u9009\u6761\u4EF6",clearFilters:"\u6E05\u9664\u5168\u90E8",moreFilters:"\u66F4\u591A\u7B5B\u9009",detail:{title:"\u8BF7\u6C42\u65E5\u5FD7\u8BE6\u60C5",requestId:"\u8BF7\u6C42 ID",timestamp:"\u65F6\u95F4\u6233",method:"\u65B9\u6CD5",status:"\u72B6\u6001",duration:"\u6301\u7EED\u65F6\u95F4",success:"\u6210\u529F",requestInfo:"\u8BF7\u6C42\u4FE1\u606F",path:"\u8DEF\u5F84",originalPath:"\u539F\u59CB\u8DEF\u5F84",transformedPath:"\u8F6C\u6362\u540E",query:"\u67E5\u8BE2\u5B57\u7B26\u4E32",routePath:"\u5339\u914D\u8DEF\u7531",upstreamInfo:"\u4E0A\u6E38\u4FE1\u606F",upstream:"\u4E0A\u6E38",transformer:"\u8F6C\u6362\u5668",authInfo:"\u8BA4\u8BC1\u4FE1\u606F",authLevel:"\u8BA4\u8BC1\u7EA7\u522B",authResult:"\u7ED3\u679C",authSuccess:"\u5DF2\u8BA4\u8BC1",authFailed:"\u5931\u8D25",processingSteps:"\u5904\u7406\u6B65\u9AA4",errorInfo:"\u9519\u8BEF\u4FE1\u606F",requestBody:"\u8BF7\u6C42\u4F53",responseBody:"\u54CD\u5E94\u4F53",loadRequestBody:"\u52A0\u8F7D\u8BF7\u6C42\u4F53",loadResponseBody:"\u52A0\u8F7D\u54CD\u5E94\u4F53",bodyNotRecorded:"\u6B64\u8BF7\u6C42\u672A\u8BB0\u5F55 Body",bodyNotRecordedReason:"\u53EF\u80FD\u8D85\u8FC7\u5927\u5C0F\u9650\u5236\u6216\u4E3A\u7A7A",originalRequest:"\u539F\u59CB\u8BF7\u6C42\uFF08\u8F6C\u6362\u524D\uFF09",finalRequest:"\u6700\u7EC8\u8BF7\u6C42\uFF08\u53D1\u9001\u7ED9\u4E0A\u6E38\uFF09",responseData:"\u54CD\u5E94\u6570\u636E\uFF08\u4E0A\u6E38\u8FD4\u56DE\uFF09",originalHeaders:"\u539F\u59CB\u8BF7\u6C42\u5934",finalHeaders:"\u6700\u7EC8\u8BF7\u6C42\u5934",requestHeaders:"\u8BF7\u6C42\u5934",responseHeaders:"\u54CD\u5E94\u5934",bodyPreview:"Body \u9884\u89C8",bodyTooLarge:"Body \u8FC7\u5927 ({size})",clickToExpand:"\u70B9\u51FB\u5C55\u5F00",headers:"\u4E2A\u8BF7\u6C42\u5934",noHeaders:"\u6682\u65E0\u8BF7\u6C42\u5934",noBody:"\u6682\u65E0 Body \u6570\u636E",overview:"\u6982\u89C8",routeAndUpstream:"\u8DEF\u7531\u4E0E\u4E0A\u6E38",processingTimeline:"\u5904\u7406\u65F6\u95F4\u7EBF",totalSteps:"\u5171 {count} \u6B65",totalDuration:"\u603B\u8017\u65F6 {duration}",showTimeline:"\u663E\u793A\u65F6\u95F4\u7EBF",hideTimeline:"\u9690\u85CF\u65F6\u95F4\u7EBF",copyToClipboard:"\u590D\u5236",downloadJson:"\u4E0B\u8F7D JSON",copied:"\u5DF2\u590D\u5236\uFF01",tabOriginalRequest:"\u539F\u59CB\u8BF7\u6C42",tabFinalRequest:"\u8F6C\u6362\u540E",tabResponse:"\u54CD\u5E94\u6570\u636E",requestData:"\u8BF7\u6C42\u6570\u636E",noDataAvailable:"\u6682\u65E0\u6570\u636E",step:"\u6B65\u9AA4"},steps:{route_matched:"\u8DEF\u7531\u5339\u914D",request_snapshot_created:"\u8BF7\u6C42\u5FEB\u7167\u521B\u5EFA",auth_failed:"\u8BA4\u8BC1\u5931\u8D25",auth_success:"\u8BA4\u8BC1\u6210\u529F",upstream_selected:"\u4E0A\u6E38\u9009\u62E9",trying_upstream:"\u5C1D\u8BD5\u4E0A\u6E38",circuit_breaker_closed:"\u65AD\u8DEF\u5668\u5173\u95ED",circuit_breaker_opened:"\u65AD\u8DEF\u5668\u6253\u5F00",circuit_breaker_reopened:"\u65AD\u8DEF\u5668\u91CD\u65B0\u6253\u5F00",upstream_recovered:"\u4E0A\u6E38\u6062\u590D",upstream_retry:"\u4E0A\u6E38\u91CD\u8BD5",upstream_failed:"\u4E0A\u6E38\u5931\u8D25",plugin_request_init:"\u63D2\u4EF6\u8BF7\u6C42\u521D\u59CB\u5316",plugin_before_request:"\u63D2\u4EF6\u8BF7\u6C42\u524D\u5904\u7406",plugin_intercepted:"\u63D2\u4EF6\u62E6\u622A\u8BF7\u6C42",plugin_response:"\u63D2\u4EF6\u54CD\u5E94\u5904\u7406",plugin_error:"\u63D2\u4EF6\u9519\u8BEF\u5904\u7406"}},P={title:"\u65E5\u5FD7\u914D\u7F6E",bodyRecording:"\u542F\u7528\u8BF7\u6C42/\u54CD\u5E94\u4F53\u8BB0\u5F55",bodyRecordingHelp:"\u8BB0\u5F55\u8BF7\u6C42\u548C\u54CD\u5E94\u4F53\u7528\u4E8E\u95EE\u9898\u6392\u67E5\u548C\u5206\u6790",maxSize:"\u6700\u5927 Body \u5927\u5C0F",maxSizeHelp:"\u8D85\u8FC7\u6B64\u5927\u5C0F\u7684 Body \u5C06\u88AB\u8DF3\u8FC7\uFF081-100 KB\uFF09",retentionDays:"Body \u4FDD\u7559\u5929\u6570",retentionDaysHelp:"Body \u5C06\u5728\u8FD9\u4E9B\u5929\u6570\u540E\u81EA\u52A8\u5220\u9664",days:"\u5929",hours:"\u5C0F\u65F6",cleanupConfig:"\u6E05\u7406\u914D\u7F6E",cleanupStatus:"\u72B6\u6001",active:"\u6D3B\u8DC3",inactive:"\u672A\u6D3B\u8DC3",cleanupRetention:"\u4FDD\u7559\u65F6\u957F",cleanupInterval:"\u6E05\u7406\u95F4\u9694",manualCleanup:"\u624B\u52A8\u6E05\u7406",confirmCleanup:"\u786E\u5B9A\u8981\u624B\u52A8\u89E6\u53D1\u65E5\u5FD7\u6E05\u7406\u5417\uFF1F\u8FD9\u5C06\u5220\u9664\u6240\u6709\u8D85\u8FC7\u914D\u7F6E\u4FDD\u7559\u671F\u9650\u7684\u65E5\u5FD7\u548C Body\u3002",cleanupSuccess:"\u6E05\u7406\u6210\u529F\u5B8C\u6210",cleanupFailed:"\u6E05\u7406\u5931\u8D25: {error}",lastCleanup:"\u4E0A\u6B21\u6E05\u7406\u7ED3\u679C",deletedSqliteRecords:"\u5DF2\u5220\u9664 SQLite \u8BB0\u5F55",deletedFileLogFiles:"\u5DF2\u5220\u9664\u65E5\u5FD7\u6587\u4EF6",deletedBodyFiles:"\u5DF2\u5220\u9664 Body \u6587\u4EF6",dirs:"\u76EE\u5F55",files:"\u6587\u4EF6",duration:"\u8017\u65F6"},q={title:"\u767B\u5F55",subtitle:"\u8F93\u5165\u8BBF\u95EE\u4EE4\u724C\u4EE5\u7EE7\u7EED",token:"\u8BBF\u95EE\u4EE4\u724C",tokenPlaceholder:"\u8BF7\u8F93\u5165\u8BBF\u95EE\u4EE4\u724C...",submit:"\u767B\u5F55",loggingIn:"\u767B\u5F55\u4E2D...",success:"\u767B\u5F55\u6210\u529F",failed:"\u767B\u5F55\u5931\u8D25\uFF1A{error}",required:"\u8BBF\u95EE\u4EE4\u724C\u4E0D\u80FD\u4E3A\u7A7A",unauthorized:"\u8BBF\u95EE\u4EE4\u724C\u65E0\u6548",logout:"\u9000\u51FA\u767B\u5F55",logoutConfirm:"\u786E\u5B9A\u8981\u9000\u51FA\u767B\u5F55\u5417\uFF1F"},w={common:e,nav:t,breadcrumb:r,dashboard:a,monitoring:o,routes:s,configuration:l,notFound:i,routeEditor:n,routeCard:u,upstreamsModal:d,upstream:c,plugin:p,headers:h,body:m,query:g,expression:v,templates:y,confirmDialog:T,validation:f,shortcuts:R,autosave:S,auth:b,logs:H,logging:P,login:q};export{b as auth,S as autosave,m as body,r as breadcrumb,e as common,l as configuration,T as confirmDialog,a as dashboard,w as default,v as expression,h as headers,P as logging,q as login,H as logs,o as monitoring,t as nav,i as notFound,p as plugin,g as query,u as routeCard,n as routeEditor,s as routes,R as shortcuts,y as templates,c as upstream,d as upstreamsModal,f as validation};\n',
21264
+ "index-D-TPeiTP.css": "*,: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,[data-theme]{background-color:var(--fallback-b1,oklch(var(--b1)/1));color:var(--fallback-bc,oklch(var(--bc)/1))}@supports not (color: oklch(0% 0 0)){:root{color-scheme:light;--fallback-p: #491eff;--fallback-pc: #d4dbff;--fallback-s: #ff41c7;--fallback-sc: #fff9fc;--fallback-a: #00cfbd;--fallback-ac: #00100d;--fallback-n: #2b3440;--fallback-nc: #d7dde4;--fallback-b1: #ffffff;--fallback-b2: #e5e6e6;--fallback-b3: #e5e6e6;--fallback-bc: #1f2937;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--fallback-p: #7582ff;--fallback-pc: #050617;--fallback-s: #ff71cf;--fallback-sc: #190211;--fallback-a: #00c7b5;--fallback-ac: #000e0c;--fallback-n: #2a323c;--fallback-nc: #a6adbb;--fallback-b1: #1d232a;--fallback-b2: #191e24;--fallback-b3: #15191e;--fallback-bc: #a6adbb;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}}}html{-webkit-tap-highlight-color:transparent}*{scrollbar-color:color-mix(in oklch,currentColor 35%,transparent) transparent}*:hover{scrollbar-color:color-mix(in oklch,currentColor 60%,transparent) transparent}:root{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}}[data-theme=light]{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}[data-theme=dark]{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}.alert{display:grid;width:100%;grid-auto-flow:row;align-content:flex-start;align-items:center;justify-items:center;gap:1rem;text-align:center;border-radius:var(--rounded-box, 1rem);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));padding:1rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-b2,oklch(var(--b2)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1));background-color:var(--alert-bg)}@media (min-width: 640px){.alert{grid-auto-flow:column;grid-template-columns:auto minmax(auto,1fr);justify-items:start;text-align:start}}.avatar.placeholder>div{display:flex;align-items:center;justify-content:center}.badge{display:inline-flex;align-items:center;justify-content:center;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;height:1.25rem;font-size:.875rem;line-height:1.25rem;width:-moz-fit-content;width:fit-content;padding-left:.563rem;padding-right:.563rem;border-radius:var(--rounded-badge, 1.9rem);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.breadcrumbs{max-width:100%;overflow-x:auto;padding-top:.5rem;padding-bottom:.5rem}.breadcrumbs>ul,.breadcrumbs>ol{display:flex;align-items:center;white-space:nowrap;min-height:-moz-min-content;min-height:min-content}.breadcrumbs>ul>li,.breadcrumbs>ol>li{display:flex;align-items:center}.breadcrumbs>ul>li>a,.breadcrumbs>ol>li>a{display:flex;cursor:pointer;align-items:center}@media (hover:hover){.breadcrumbs>ul>li>a:hover,.breadcrumbs>ol>li>a:hover{text-decoration-line:underline}.link-hover:hover{text-decoration-line:underline}.label a:hover{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.menu li>*:not(ul,.menu-title,details,.btn):active,.menu li>*:not(ul,.menu-title,details,.btn).active,.menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.tab:hover{--tw-text-opacity: 1}.tabs-boxed :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):hover,.tabs-boxed :is(input:checked):hover{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.table tr.hover:hover,.table tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.hover:hover,.table-zebra tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}}.btn{display:inline-flex;height:3rem;min-height:3rem;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;border-radius:var(--rounded-btn, .5rem);border-color:transparent;border-color:oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity));padding-left:1rem;padding-right:1rem;text-align:center;font-size:.875rem;line-height:1em;gap:.5rem;font-weight:600;text-decoration-line:none;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);border-width:var(--border-btn, 1px);transition-property:color,background-color,border-color,opacity,box-shadow,transform;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--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);outline-color:var(--fallback-bc,oklch(var(--bc)/1));background-color:oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity));--tw-bg-opacity: 1;--tw-border-opacity: 1}.btn-disabled,.btn[disabled],.btn:disabled{pointer-events:none}.btn-square{height:3rem;width:3rem;padding:0}.btn-circle{height:3rem;width:3rem;border-radius:9999px;padding:0}:where(.btn:is(input[type=checkbox])),:where(.btn:is(input[type=radio])){width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none}.btn:is(input[type=checkbox]):after,.btn:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}.card{position:relative;display:flex;flex-direction:column;border-radius:var(--rounded-box, 1rem)}.card:focus{outline:2px solid transparent;outline-offset:2px}.card-body{display:flex;flex:1 1 auto;flex-direction:column;padding:var(--padding-card, 2rem);gap:.5rem}.card-body :where(p){flex-grow:1}.card-actions{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.5rem}.card figure{display:flex;align-items:center;justify-content:center}.card.image-full{display:grid}.card.image-full:before{position:relative;content:\"\";z-index:10;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));opacity:.75}.card.image-full:before,.card.image-full>*{grid-column-start:1;grid-row-start:1}.card.image-full>figure img{height:100%;-o-object-fit:cover;object-fit:cover}.card.image-full>.card-body{position:relative;z-index:20;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.checkbox{flex-shrink:0;--chkbg: var(--fallback-bc,oklch(var(--bc)/1));--chkfg: var(--fallback-b1,oklch(var(--b1)/1));height:1.5rem;width:1.5rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}.collapse:not(td):not(tr):not(colgroup){visibility:visible}.collapse{position:relative;display:grid;overflow:hidden;grid-template-rows:max-content 0fr;transition:grid-template-rows .2s;width:100%;border-radius:var(--rounded-box, 1rem)}.collapse-title,.collapse>input[type=checkbox],.collapse>input[type=radio],.collapse-content{grid-column-start:1;grid-row-start:1}.collapse>input[type=checkbox],.collapse>input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){height:100%;width:100%;z-index:1}.collapse-content{visibility:hidden;grid-column-start:1;grid-row-start:2;min-height:0px;transition:visibility .2s;transition:padding .2s ease-out,background-color .2s ease-out;padding-left:1rem;padding-right:1rem;cursor:unset}.collapse[open],.collapse-open,.collapse:focus:not(.collapse-close){grid-template-rows:max-content 1fr}.collapse:not(.collapse-close):has(>input[type=checkbox]:checked),.collapse:not(.collapse-close):has(>input[type=radio]:checked){grid-template-rows:max-content 1fr}.collapse[open]>.collapse-content,.collapse-open>.collapse-content,.collapse:focus:not(.collapse-close)>.collapse-content,.collapse:not(.collapse-close)>input[type=checkbox]:checked~.collapse-content,.collapse:not(.collapse-close)>input[type=radio]:checked~.collapse-content{visibility:visible;min-height:-moz-fit-content;min-height:fit-content}.divider{display:flex;flex-direction:row;align-items:center;align-self:stretch;margin-top:1rem;margin-bottom:1rem;height:1rem;white-space:nowrap}.divider:before,.divider:after{height:.125rem;width:100%;flex-grow:1;--tw-content: \"\";content:var(--tw-content);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.dropdown{position:relative;display:inline-block}.dropdown>*:not(summary):focus{outline:2px solid transparent;outline-offset:2px}.dropdown .dropdown-content{position:absolute}.dropdown:is(:not(details)) .dropdown-content{visibility:hidden;opacity:0;transform-origin:top;--tw-scale-x: .95;--tw-scale-y: .95;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));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s}.dropdown-end .dropdown-content{inset-inline-end:0px}.dropdown-left .dropdown-content{bottom:auto;inset-inline-end:100%;top:0;transform-origin:right}.dropdown-right .dropdown-content{bottom:auto;inset-inline-start:100%;top:0;transform-origin:left}.dropdown-bottom .dropdown-content{bottom:auto;top:100%;transform-origin:top}.dropdown-top .dropdown-content{bottom:100%;top:auto;transform-origin:bottom}.dropdown-end.dropdown-right .dropdown-content,.dropdown-end.dropdown-left .dropdown-content{bottom:0;top:auto}.dropdown.dropdown-open .dropdown-content,.dropdown:not(.dropdown-hover):focus .dropdown-content,.dropdown:focus-within .dropdown-content{visibility:visible;opacity:1}@media (hover: hover){.dropdown.dropdown-hover:hover .dropdown-content{visibility:visible;opacity:1}.btm-nav>*.disabled:hover,.btm-nav>*[disabled]:hover{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btn:hover{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn:hover{background-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity, 1)) 90%,black);border-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity, 1)) 90%,black)}}@supports not (color: oklch(0% 0 0)){.btn:hover{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}}.btn.glass:hover{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-ghost:hover{border-color:transparent}@supports (color: oklch(0% 0 0)){.btn-ghost:hover{background-color:var(--fallback-bc,oklch(var(--bc)/.2))}}.btn-outline:hover{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary:hover{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary:hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.btn-outline.btn-secondary:hover{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-secondary:hover{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}}.btn-outline.btn-accent:hover{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-accent:hover{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}}.btn-outline.btn-success:hover{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-success:hover{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}}.btn-outline.btn-info:hover{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-info:hover{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}}.btn-outline.btn-warning:hover{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-warning:hover{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}}.btn-outline.btn-error:hover{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-error:hover{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}.btn-disabled:hover,.btn[disabled]:hover,.btn:disabled:hover{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}@supports (color: color-mix(in oklab,black,black)){.btn:is(input[type=checkbox]:checked):hover,.btn:is(input[type=radio]:checked):hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.dropdown.dropdown-hover:hover .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;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))}:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{cursor:pointer;outline:2px solid transparent;outline-offset:2px}@supports (color: oklch(0% 0 0)){:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{background-color:var(--fallback-bc,oklch(var(--bc)/.1))}}.tab[disabled],.tab[disabled]:hover{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}}.dropdown:is(details) summary::-webkit-details-marker{display:none}.form-control{display:flex;flex-direction:column}.label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;justify-content:space-between;padding:.5rem .25rem}.indicator{position:relative;display:inline-flex;width:-moz-max-content;width:max-content}.indicator :where(.indicator-item){z-index:1;position:absolute;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));white-space:nowrap}.input{flex-shrink:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:2;line-height:1.5rem;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.input[type=number]::-webkit-inner-spin-button,.input-md[type=number]::-webkit-inner-spin-button{margin-top:-1rem;margin-bottom:-1rem;margin-inline-end:-1rem}.input-sm[type=number]::-webkit-inner-spin-button{margin-top:0;margin-bottom:0;margin-inline-end:-0px}.join{display:inline-flex;align-items:stretch;border-radius:var(--rounded-btn, .5rem)}.join :where(.join-item){border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:not(:first-child):not(:last-child),.join *:not(:first-child):not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0}.join .dropdown .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .dropdown .join-item{border-start-end-radius:inherit;border-end-end-radius:inherit}.join :where(.join-item:first-child:not(:last-child)),.join :where(*:first-child:not(:last-child) .join-item){border-end-start-radius:inherit;border-start-start-radius:inherit}.join .join-item:last-child:not(:first-child),.join *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0}.join :where(.join-item:last-child:not(:first-child)),.join :where(*:last-child:not(:first-child) .join-item){border-start-end-radius:inherit;border-end-end-radius:inherit}@supports not selector(:has(*)){:where(.join *){border-radius:inherit}}@supports selector(:has(*)){:where(.join *:has(.join-item)){border-radius:inherit}}.kbd{display:inline-flex;align-items:center;justify-content:center;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2;--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:.5rem;padding-right:.5rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));border-bottom-width:2px;min-height:2.2em;min-width:2.2em}.link{cursor:pointer;text-decoration-line:underline}.link-hover{text-decoration-line:none}.menu{display:flex;flex-direction:column;flex-wrap:wrap;font-size:.875rem;line-height:1.25rem;padding:.5rem}.menu :where(li ul){position:relative;white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem}.menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){display:grid;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;grid-auto-columns:minmax(auto,max-content) auto max-content;-webkit-user-select:none;-moz-user-select:none;user-select:none}.menu li.disabled{cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;user-select:none;color:var(--fallback-bc,oklch(var(--bc)/.3))}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}:where(.menu li){position:relative;display:flex;flex-shrink:0;flex-direction:column;flex-wrap:wrap;align-items:stretch}:where(.menu li) .badge{justify-self:end}.mockup-code{position:relative;overflow:hidden;overflow-x:auto;min-width:18rem;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));padding-top:1.25rem;padding-bottom:1.25rem;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)));direction:ltr}.mockup-code pre[data-prefix]:before{content:attr(data-prefix);display:inline-block;text-align:right;width:2rem;opacity:.5}.modal{pointer-events:none;position:fixed;inset:0;margin:0;display:grid;height:100%;max-height:none;width:100%;max-width:none;justify-items:center;padding:0;opacity:0;overscroll-behavior:contain;z-index:999;background-color:transparent;color:inherit;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:transform,opacity,visibility;overflow-y:hidden}:where(.modal){align-items:center}.modal-box{max-height:calc(100vh - 5em);grid-column-start:1;grid-row-start:1;width:91.666667%;max-width:32rem;--tw-scale-x: .9;--tw-scale-y: .9;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));border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem);border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));padding:1.5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;box-shadow:#00000040 0 25px 50px -12px;overflow-y:auto;overscroll-behavior:contain}.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open]{pointer-events:auto;visibility:visible;opacity:1}.modal-action{display:flex;margin-top:1.5rem;justify-content:flex-end}.modal-toggle{position:fixed;height:0px;width:0px;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}:root:has(:is(.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open])){overflow:hidden;scrollbar-gutter:stable}.navbar{display:flex;align-items:center;padding:var(--navbar-padding, .5rem);min-height:4rem;width:100%}:where(.navbar>*:not(script,style)){display:inline-flex;align-items:center}.radio{flex-shrink:0;--chkbg: var(--bc);height:1.5rem;width:1.5rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:9999px;border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}.range{height:1.5rem;width:100%;cursor:pointer;-moz-appearance:none;appearance:none;-webkit-appearance:none;--range-shdw: var(--fallback-bc,oklch(var(--bc)/1));overflow:hidden;border-radius:var(--rounded-box, 1rem);background-color:transparent}.range:focus{outline:none}.select{display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;min-height:3rem;padding-inline-start:1rem;padding-inline-end:2.5rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-size:4px 4px,4px 4px;background-repeat:no-repeat}.select[multiple]{height:auto}.stats{display:inline-grid;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}:where(.stats){grid-auto-flow:column;overflow-x:auto}.stat{display:inline-grid;width:100%;grid-template-columns:repeat(1,1fr);-moz-column-gap:1rem;column-gap:1rem;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .1;padding:1rem 1.5rem}.stat-title{grid-column-start:1;white-space:nowrap;color:var(--fallback-bc,oklch(var(--bc)/.6))}.stat-value{grid-column-start:1;white-space:nowrap;font-size:2.25rem;line-height:2.5rem;font-weight:800}.stat-desc{grid-column-start:1;white-space:nowrap;font-size:.75rem;line-height:1rem;color:var(--fallback-bc,oklch(var(--bc)/.6))}.steps{display:inline-grid;grid-auto-flow:column;overflow:hidden;overflow-x:auto;counter-reset:step;grid-auto-columns:1fr}.steps .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-columns:auto;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-rows:40px 1fr;place-items:center;text-align:center;min-width:4rem}.tabs{display:grid;align-items:flex-end}.tabs-lifted:has(.tab-content[class^=rounded-]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])),.tabs-lifted:has(.tab-content[class*=\" rounded-\"]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])){border-bottom-color:transparent}.tab{position:relative;grid-row-start:1;display:inline-flex;height:2rem;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;flex-wrap:wrap;align-items:center;justify-content:center;text-align:center;font-size:.875rem;line-height:1.25rem;line-height:2;--tab-padding: 1rem;--tw-text-opacity: .5;--tab-color: var(--fallback-bc,oklch(var(--bc)/1));--tab-bg: var(--fallback-b1,oklch(var(--b1)/1));--tab-border-color: var(--fallback-b3,oklch(var(--b3)/1));color:var(--tab-color);padding-inline-start:var(--tab-padding, 1rem);padding-inline-end:var(--tab-padding, 1rem)}.tab:is(input[type=radio]){width:auto;border-bottom-right-radius:0;border-bottom-left-radius:0}.tab:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}.tab:not(input):empty{cursor:default;grid-column-start:span 9999}:checked+.tab-content:nth-child(2),:is(.tab-active,[aria-selected=true])+.tab-content:nth-child(2){border-start-start-radius:0px}input.tab:checked+.tab-content,:is(.tab-active,[aria-selected=true])+.tab-content{display:block}.table{position:relative;width:100%;border-radius:var(--rounded-box, 1rem);text-align:left;font-size:.875rem;line-height:1.25rem}.table :where(.table-pin-rows thead tr){position:sticky;top:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-rows tfoot tr){position:sticky;bottom:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-cols tr th){position:sticky;left:0;right:0;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table-zebra tbody tr:nth-child(2n) :where(.table-pin-cols tr th){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.textarea{min-height:3rem;flex-shrink:1;padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.toast{position:fixed;display:flex;min-width:-moz-fit-content;min-width:fit-content;flex-direction:column;white-space:nowrap;gap:.5rem;padding:1rem}.toggle{flex-shrink:0;--tglbg: var(--fallback-b1,oklch(var(--b1)/1));--handleoffset: 1.5rem;--handleoffsetcalculator: calc(var(--handleoffset) * -1);--togglehandleborder: 0 0;height:1.5rem;width:3rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-badge, 1.9rem);border-width:1px;border-color:currentColor;background-color:currentColor;color:var(--fallback-bc,oklch(var(--bc)/.5));transition:background,box-shadow var(--animation-input, .2s) ease-out;box-shadow:var(--handleoffsetcalculator) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset,var(--togglehandleborder)}.alert-info{border-color:var(--fallback-in,oklch(var(--in)/.2));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-in,oklch(var(--in)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-success{border-color:var(--fallback-su,oklch(var(--su)/.2));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-su,oklch(var(--su)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-warning{border-color:var(--fallback-wa,oklch(var(--wa)/.2));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));--alert-bg: var(--fallback-wa,oklch(var(--wa)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-error{border-color:var(--fallback-er,oklch(var(--er)/.2));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-er,oklch(var(--er)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.badge-neutral{--tw-border-opacity: 1;border-color:var(--fallback-n,oklch(var(--n)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.badge-primary{--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.badge-accent{--tw-border-opacity: 1;border-color:var(--fallback-a,oklch(var(--a)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.badge-info{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.badge-success{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.badge-warning{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.badge-error{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.badge-ghost{--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.badge-outline{border-color:currentColor;--tw-border-opacity: .5;background-color:transparent;color:currentColor}.badge-outline.badge-neutral{--tw-text-opacity: 1;color:var(--fallback-n,oklch(var(--n)/var(--tw-text-opacity)))}.badge-outline.badge-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.badge-outline.badge-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}.badge-outline.badge-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}.badge-outline.badge-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}.badge-outline.badge-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.badge-outline.badge-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}.badge-outline.badge-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btm-nav>*:where(.active){border-top-width:2px;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.btm-nav>*.disabled,.btm-nav>*[disabled]{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btm-nav>* .label{font-size:1rem;line-height:1.5rem}.breadcrumbs>ul>li>a:focus,.breadcrumbs>ol>li>a:focus{outline:2px solid transparent;outline-offset:2px}.breadcrumbs>ul>li>a:focus-visible,.breadcrumbs>ol>li>a:focus-visible{outline:2px solid currentColor;outline-offset:2px}.breadcrumbs>ul>li+*:before,.breadcrumbs>ol>li+*:before{content:\"\";margin-left:.5rem;margin-right:.75rem;display:block;height:.375rem;width:.375rem;--tw-rotate: 45deg;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));opacity:.4;border-top:1px solid;border-right:1px solid;background-color:transparent}[dir=rtl] .breadcrumbs>ul>li+*:before,[dir=rtl] .breadcrumbs>ol>li+*:before{--tw-rotate: -135deg}@media (prefers-reduced-motion: no-preference){.btn{animation:button-pop var(--animation-btn, .25s) ease-out}}.btn:active:hover,.btn:active:focus{animation:button-pop 0s ease-out;transform:scale(var(--btn-focus-scale, .97))}@supports not (color: oklch(0% 0 0)){.btn{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}.btn-primary{--btn-color: var(--fallback-p)}.btn-secondary{--btn-color: var(--fallback-s)}.btn-success{--btn-color: var(--fallback-su)}.btn-warning{--btn-color: var(--fallback-wa)}.btn-error{--btn-color: var(--fallback-er)}}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary.btn-active{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}.btn-outline.btn-secondary.btn-active{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}.btn-outline.btn-accent.btn-active{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}.btn-outline.btn-success.btn-active{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}.btn-outline.btn-info.btn-active{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}.btn-outline.btn-warning.btn-active{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}.btn-outline.btn-error.btn-active{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}.btn:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px}.btn-primary{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));outline-color:var(--fallback-p,oklch(var(--p)/1))}@supports (color: oklch(0% 0 0)){.btn-primary{--btn-color: var(--p)}.btn-secondary{--btn-color: var(--s)}.btn-success{--btn-color: var(--su)}.btn-warning{--btn-color: var(--wa)}.btn-error{--btn-color: var(--er)}}.btn-secondary{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)));outline-color:var(--fallback-s,oklch(var(--s)/1))}.btn-success{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));outline-color:var(--fallback-su,oklch(var(--su)/1))}.btn-warning{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));outline-color:var(--fallback-wa,oklch(var(--wa)/1))}.btn-error{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}.btn.glass{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn.glass.btn-active{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-ghost{border-width:1px;border-color:transparent;background-color:transparent;color:currentColor;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn-ghost.btn-active{border-color:transparent;background-color:var(--fallback-bc,oklch(var(--bc)/.2))}.btn-outline{border-color:currentColor;background-color:transparent;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.btn-outline.btn-active{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.btn-outline.btn-primary.btn-active{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn-outline.btn-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}.btn-outline.btn-secondary.btn-active{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.btn-outline.btn-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}.btn-outline.btn-accent.btn-active{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.btn-outline.btn-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.btn-outline.btn-success.btn-active{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.btn-outline.btn-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}.btn-outline.btn-info.btn-active{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.btn-outline.btn-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}.btn-outline.btn-warning.btn-active{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.btn-outline.btn-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btn-outline.btn-error.btn-active{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.btn.btn-disabled,.btn[disabled],.btn:disabled{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btn:is(input[type=checkbox]:checked),.btn:is(input[type=radio]:checked){--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn:is(input[type=checkbox]:checked):focus-visible,.btn:is(input[type=radio]:checked):focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}@keyframes button-pop{0%{transform:scale(var(--btn-focus-scale, .98))}40%{transform:scale(1.02)}to{transform:scale(1)}}.card :where(figure:first-child){overflow:hidden;border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-start-radius:unset;border-end-end-radius:unset}.card :where(figure:last-child){overflow:hidden;border-start-start-radius:unset;border-start-end-radius:unset;border-end-start-radius:inherit;border-end-end-radius:inherit}.card:focus-visible{outline:2px solid currentColor;outline-offset:2px}.card.bordered{border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.card.compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-title{display:flex;align-items:center;gap:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}.card.image-full :where(figure){overflow:hidden;border-radius:inherit}.checkbox:focus{box-shadow:none}.checkbox:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.checkbox:disabled{border-width:0px;cursor:not-allowed;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.2}.checkbox:checked,.checkbox[aria-checked=true]{background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-color:var(--chkbg);background-image:linear-gradient(-45deg,transparent 65%,var(--chkbg) 65.99%),linear-gradient(45deg,transparent 75%,var(--chkbg) 75.99%),linear-gradient(-45deg,var(--chkbg) 40%,transparent 40.99%),linear-gradient(45deg,var(--chkbg) 30%,var(--chkfg) 30.99%,var(--chkfg) 40%,transparent 40.99%),linear-gradient(-45deg,var(--chkfg) 50%,var(--chkbg) 50.99%)}.checkbox:indeterminate{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-image:linear-gradient(90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(-90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(0deg,var(--chkbg) 43%,var(--chkfg) 43%,var(--chkfg) 57%,var(--chkbg) 57%)}@keyframes checkmark{0%{background-position-y:5px}50%{background-position-y:-2px}to{background-position-y:0}}details.collapse{width:100%}details.collapse summary{position:relative;display:block;outline:2px solid transparent;outline-offset:2px}details.collapse summary::-webkit-details-marker{display:none}.collapse:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse:has(.collapse-title:focus-visible),.collapse:has(>input[type=checkbox]:focus-visible),.collapse:has(>input[type=radio]:focus-visible){outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse-arrow>.collapse-title:after{position:absolute;display:block;height:.5rem;width:.5rem;--tw-translate-y: -100%;--tw-rotate: 45deg;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));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.15s;transition-duration:.2s;top:1.9rem;inset-inline-end:1.4rem;content:\"\";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.collapse-plus>.collapse-title:after{position:absolute;display:block;height:.5rem;width:.5rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.3s;top:.9rem;inset-inline-end:1.4rem;content:\"+\";pointer-events:none}.collapse:not(.collapse-open):not(.collapse-close)>input[type=checkbox],.collapse:not(.collapse-open):not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(.collapse-open):not(.collapse-close)>.collapse-title{cursor:pointer}.collapse:focus:not(.collapse-open):not(.collapse-close):not(.collapse[open])>.collapse-title{cursor:unset}.collapse-title{position:relative}.collapse-title,:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){padding:1rem;padding-inline-end:3rem;min-height:3.75rem;transition:background-color .2s ease-out}.collapse[open]>:where(.collapse-content),.collapse-open>:where(.collapse-content),.collapse:focus:not(.collapse-close)>:where(.collapse-content),.collapse:not(.collapse-close)>:where(input[type=checkbox]:checked~.collapse-content),.collapse:not(.collapse-close)>:where(input[type=radio]:checked~.collapse-content){padding-bottom:1rem;transition:padding .2s ease-out,background-color .2s ease-out}.collapse[open].collapse-arrow>.collapse-title:after,.collapse-open.collapse-arrow>.collapse-title:after,.collapse-arrow:focus:not(.collapse-close)>.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after{--tw-translate-y: -50%;--tw-rotate: 225deg;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))}.collapse[open].collapse-plus>.collapse-title:after,.collapse-open.collapse-plus>.collapse-title:after,.collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after{content:\"\u2212\"}.divider:not(:empty){gap:1rem}.dropdown.dropdown-open .dropdown-content,.dropdown:focus .dropdown-content,.dropdown:focus-within .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;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))}.label-text{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.label-text-alt{font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.input input{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));background-color:transparent}.input input:focus{outline:2px solid transparent;outline-offset:2px}.input[list]::-webkit-calendar-picker-indicator{line-height:1em}.input-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input:focus,.input:focus-within{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input-error{--tw-border-opacity: 1;border-color:var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)))}.input-error:focus,.input-error:focus-within{--tw-border-opacity: 1;border-color:var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}.input:has(>input[disabled]),.input-disabled,.input:disabled,.input[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.input:has(>input[disabled])::-moz-placeholder,.input-disabled::-moz-placeholder,.input:disabled::-moz-placeholder,.input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])::placeholder,.input-disabled::placeholder,.input:disabled::placeholder,.input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.join>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1)}.join-item:focus{isolation:isolate}.link:focus{outline:2px solid transparent;outline-offset:2px}.link:focus-visible{outline:2px solid currentColor;outline-offset:2px}.\\!loading{pointer-events:none!important;display:inline-block!important;aspect-ratio:1 / 1!important;width:1.5rem!important;background-color:currentColor!important;-webkit-mask-size:100%!important;mask-size:100%!important;-webkit-mask-repeat:no-repeat!important;mask-repeat:no-repeat!important;-webkit-mask-position:center!important;mask-position:center!important;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")!important;mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")!important}.loading{pointer-events:none;display:inline-block;aspect-ratio:1 / 1;width:1.5rem;background-color:currentColor;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")}.loading-spinner{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")}.loading-xs{width:1rem}.loading-sm{width:1.25rem}.loading-lg{width:2.5rem}:where(.menu li:empty){--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;margin:.5rem 1rem;height:1px}.menu :where(li ul):before{position:absolute;bottom:.75rem;inset-inline-start:0px;top:.75rem;width:1px;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;content:\"\"}.menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--rounded-btn, .5rem);padding:.5rem 1rem;text-align:start;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;text-wrap:balance}:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):is(summary):not(.active,.btn):focus-visible,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):is(summary):not(.active,.btn):focus-visible{cursor:pointer;background-color:var(--fallback-bc,oklch(var(--bc)/.1));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));outline:2px solid transparent;outline-offset:2px}.menu li>*:not(ul,.menu-title,details,.btn):active,.menu li>*:not(ul,.menu-title,details,.btn).active,.menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.menu :where(li>details>summary)::-webkit-details-marker{display:none}.menu :where(li>details>summary):after,.menu :where(li>.menu-dropdown-toggle):after{justify-self:end;display:block;margin-top:-.5rem;height:.5rem;width:.5rem;transform:rotate(45deg);transition-property:transform,margin-top;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);content:\"\";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{transform:rotate(225deg);margin-top:0}.mockup-code:before{content:\"\";margin-bottom:1rem;display:block;height:.75rem;width:.75rem;border-radius:9999px;opacity:.3;box-shadow:1.4em 0,2.8em 0,4.2em 0}.mockup-code pre{padding-right:1.25rem}.mockup-code pre:before{content:\"\";margin-right:2ch}.mockup-phone .display{overflow:hidden;border-radius:40px;margin-top:-25px}.mockup-browser .mockup-browser-toolbar .input{position:relative;margin-left:auto;margin-right:auto;display:block;height:1.75rem;width:24rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:2rem;direction:ltr}.mockup-browser .mockup-browser-toolbar .input:before{content:\"\";position:absolute;left:.5rem;top:50%;aspect-ratio:1 / 1;height:.75rem;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:2px;border-color:currentColor;opacity:.6}.mockup-browser .mockup-browser-toolbar .input:after{content:\"\";position:absolute;left:1.25rem;top:50%;height:.5rem;--tw-translate-y: 25%;--tw-rotate: -45deg;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));border-radius:9999px;border-width:1px;border-color:currentColor;opacity:.6}.modal:not(dialog:not(.modal-open)),.modal::backdrop{background-color:#0006;animation:modal-pop .2s ease-out}.modal-backdrop{z-index:-1;grid-column-start:1;grid-row-start:1;display:grid;align-self:stretch;justify-self:stretch;color:transparent}.modal-open .modal-box,.modal-toggle:checked+.modal .modal-box,.modal:target .modal-box,.modal[open] .modal-box{--tw-translate-y: 0px;--tw-scale-x: 1;--tw-scale-y: 1;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))}.modal-action>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.modal-action:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}@keyframes modal-pop{0%{opacity:0}}@keyframes progress-loading{50%{background-position-x:-115%}}.radio:focus{box-shadow:none}.radio:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.radio:checked,.radio[aria-checked=true]{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-image:none;animation:radiomark var(--animation-input, .2s) ease-out;box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}.radio:disabled{cursor:not-allowed;opacity:.2}@keyframes radiomark{0%{box-shadow:0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset}50%{box-shadow:0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset}to{box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}}.range:focus-visible::-webkit-slider-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 2rem var(--range-shdw) inset}.range:focus-visible::-moz-range-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 2rem var(--range-shdw) inset}.range::-webkit-slider-runnable-track{height:.5rem;width:100%;border-radius:var(--rounded-box, 1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-moz-range-track{height:.5rem;width:100%;border-radius:var(--rounded-box, 1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-webkit-slider-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box, 1rem);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));appearance:none;-webkit-appearance:none;top:50%;color:var(--range-shdw);transform:translateY(-50%);--filler-size: 100rem;--filler-offset: .6rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}.range::-moz-range-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box, 1rem);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));top:50%;color:var(--range-shdw);--filler-size: 100rem;--filler-offset: .5rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}@keyframes rating-pop{0%{transform:translateY(-.125em)}40%{transform:translateY(-.125em)}to{transform:translateY(0)}}.select-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select-disabled,.select:disabled,.select[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.select-disabled::-moz-placeholder,.select:disabled::-moz-placeholder,.select[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.select-disabled::placeholder,.select:disabled::placeholder,.select[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.select-multiple,.select[multiple],.select[size].select:not([size=\"1\"]){background-image:none;padding-right:1rem}[dir=rtl] .select{background-position:calc(0% + 12px) calc(1px + 50%),calc(0% + 16px) calc(1px + 50%)}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}:where(.stats)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)));--tw-divide-y-reverse: 0;border-top-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(0px * var(--tw-divide-y-reverse))}[dir=rtl] .stats>*:not([hidden])~*:not([hidden]){--tw-divide-x-reverse: 1}.steps .step:before{top:0;grid-column-start:1;grid-row-start:1;height:.5rem;width:100%;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));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));content:\"\";margin-inline-start:-100%}.steps .step:after{content:counter(step);counter-increment:step;z-index:1;position:relative;grid-column-start:1;grid-row-start:1;display:grid;height:2rem;width:2rem;place-items:center;place-self:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.steps .step:first-child:before{content:none}.steps .step[data-content]:after{content:attr(data-content)}.steps .step-neutral+.step-neutral:before,.steps .step-neutral:after{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.steps .step-primary+.step-primary:before,.steps .step-primary:after{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.steps .step-secondary+.step-secondary:before,.steps .step-secondary:after{--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.steps .step-accent+.step-accent:before,.steps .step-accent:after{--tw-bg-opacity: 1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.steps .step-info+.step-info:before{--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)))}.steps .step-info:after{--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.steps .step-success+.step-success:before{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)))}.steps .step-success:after{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.steps .step-warning+.step-warning:before{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)))}.steps .step-warning:after{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.steps .step-error+.step-error:before{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)))}.steps .step-error:after{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.tabs-lifted>.tab:focus-visible{border-end-end-radius:0;border-end-start-radius:0}.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tab:is(input:checked){border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: 1;--tw-text-opacity: 1}.tab:focus{outline:2px solid transparent;outline-offset:2px}.tab:focus-visible{outline:2px solid currentColor;outline-offset:-5px}.tab-disabled,.tab[disabled]{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.tabs-bordered>.tab{border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2;border-style:solid;border-bottom-width:calc(var(--tab-border, 1px) + 1px)}.tabs-lifted>.tab{border:var(--tab-border, 1px) solid transparent;border-width:0 0 var(--tab-border, 1px) 0;border-start-start-radius:var(--tab-radius, .5rem);border-start-end-radius:var(--tab-radius, .5rem);border-bottom-color:var(--tab-border-color);padding-inline-start:var(--tab-padding, 1rem);padding-inline-end:var(--tab-padding, 1rem);padding-top:var(--tab-border, 1px)}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-lifted>.tab:is(input:checked){background-color:var(--tab-bg);border-width:var(--tab-border, 1px) var(--tab-border, 1px) 0 var(--tab-border, 1px);border-inline-start-color:var(--tab-border-color);border-inline-end-color:var(--tab-border-color);border-top-color:var(--tab-border-color);padding-inline-start:calc(var(--tab-padding, 1rem) - var(--tab-border, 1px));padding-inline-end:calc(var(--tab-padding, 1rem) - var(--tab-border, 1px));padding-bottom:var(--tab-border, 1px);padding-top:0}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,.tabs-lifted>.tab:is(input:checked):before{z-index:1;content:\"\";display:block;position:absolute;width:calc(100% + var(--tab-radius, .5rem) * 2);height:var(--tab-radius, .5rem);bottom:0;background-size:var(--tab-radius, .5rem);background-position:top left,top right;background-repeat:no-repeat;--tab-grad: calc(69% - var(--tab-border, 1px));--radius-start: radial-gradient( circle at top left, transparent var(--tab-grad), var(--tab-border-color) calc(var(--tab-grad) + .25px), var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)), var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + .25px) );--radius-end: radial-gradient( circle at top right, transparent var(--tab-grad), var(--tab-border-color) calc(var(--tab-grad) + .25px), var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)), var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + .25px) );background-image:var(--radius-start),var(--radius-end)}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,.tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-end);background-position:top right}[dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,[dir=rtl] .tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-start);background-position:top left}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,.tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-start);background-position:top left}[dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,[dir=rtl] .tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-end);background-position:top right}.tabs-lifted>:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled])+.tabs-lifted :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,.tabs-lifted>.tab:is(input:checked)+.tabs-lifted .tab:is(input:checked):before{background-image:var(--radius-end);background-position:top right}.tabs-boxed{border-radius:var(--rounded-btn, .5rem);--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding:.25rem}.tabs-boxed .tab{border-radius:var(--rounded-btn, .5rem)}.tabs-boxed :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-boxed :is(input:checked){--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.table:where([dir=rtl],[dir=rtl] *){text-align:right}.table :where(th,td){padding:.75rem 1rem;vertical-align:middle}.table tr.active,.table tr.active:nth-child(2n),.table-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.active,.table-zebra tr.active:nth-child(2n),.table-zebra-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}.table :where(thead tr,tbody tr:not(:last-child),tbody tr:first-child:last-child){border-bottom-width:1px;--tw-border-opacity: 1;border-bottom-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.table :where(thead,tfoot){white-space:nowrap;font-size:.75rem;line-height:1rem;font-weight:700;color:var(--fallback-bc,oklch(var(--bc)/.6))}.table :where(tfoot){border-top-width:1px;--tw-border-opacity: 1;border-top-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.textarea-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea-disabled,.textarea:disabled,.textarea[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.textarea-disabled::-moz-placeholder,.textarea:disabled::-moz-placeholder,.textarea[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.textarea-disabled::placeholder,.textarea:disabled::placeholder,.textarea[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.toast>*{animation:toast-pop .25s ease-out}@keyframes toast-pop{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}[dir=rtl] .toggle{--handleoffsetcalculator: calc(var(--handleoffset) * 1)}.toggle:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.toggle:hover{background-color:currentColor}.toggle:checked,.toggle[aria-checked=true]{background-image:none;--handleoffsetcalculator: var(--handleoffset);--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}[dir=rtl] .toggle:checked,[dir=rtl] .toggle[aria-checked=true]{--handleoffsetcalculator: calc(var(--handleoffset) * -1)}.toggle:indeterminate{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));box-shadow:calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}[dir=rtl] .toggle:indeterminate{box-shadow:calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}.toggle-primary:focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}.toggle-primary:checked,.toggle-primary[aria-checked=true]{border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-border-opacity: .1;--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.toggle:disabled{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));background-color:transparent;opacity:.3;--togglehandleborder: 0 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset, var(--handleoffsetcalculator) 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset}.badge-xs{height:.75rem;font-size:.75rem;line-height:.75rem;padding-left:.313rem;padding-right:.313rem}.badge-sm{height:1rem;font-size:.75rem;line-height:1rem;padding-left:.438rem;padding-right:.438rem}.badge-lg{height:1.5rem;font-size:1rem;line-height:1.5rem;padding-left:.688rem;padding-right:.688rem}.btm-nav-xs>*:where(.active){border-top-width:1px}.btm-nav-sm>*:where(.active){border-top-width:2px}.btm-nav-md>*:where(.active){border-top-width:2px}.btm-nav-lg>*:where(.active){border-top-width:4px}.btn-xs{height:1.5rem;min-height:1.5rem;padding-left:.5rem;padding-right:.5rem;font-size:.75rem}.btn-sm{height:2rem;min-height:2rem;padding-left:.75rem;padding-right:.75rem;font-size:.875rem}.btn-square:where(.btn-xs){height:1.5rem;width:1.5rem;padding:0}.btn-square:where(.btn-sm){height:2rem;width:2rem;padding:0}.btn-square:where(.btn-md){height:3rem;width:3rem;padding:0}.btn-square:where(.btn-lg){height:4rem;width:4rem;padding:0}.btn-circle:where(.btn-xs){height:1.5rem;width:1.5rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-sm){height:2rem;width:2rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-md){height:3rem;width:3rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-lg){height:4rem;width:4rem;border-radius:9999px;padding:0}[type=checkbox].checkbox-sm{height:1.25rem;width:1.25rem}.indicator :where(.indicator-item){bottom:auto;inset-inline-end:0px;inset-inline-start:auto;top:0;--tw-translate-y: -50%;--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item):where([dir=rtl],[dir=rtl] *){--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-start){inset-inline-end:auto;inset-inline-start:0px;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-start):where([dir=rtl],[dir=rtl] *){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-center){inset-inline-end:50%;inset-inline-start:50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-center):where([dir=rtl],[dir=rtl] *){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-end){inset-inline-end:0px;inset-inline-start:auto;--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-end):where([dir=rtl],[dir=rtl] *){--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-bottom){bottom:0;top:auto;--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-middle){bottom:50%;top:50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-top){bottom:auto;top:0;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.input-sm{height:2rem;padding-left:.75rem;padding-right:.75rem;font-size:.875rem;line-height:2rem}.join.join-vertical{flex-direction:column}.join.join-vertical .join-item:first-child:not(:last-child),.join.join-vertical *:first-child:not(:last-child) .join-item{border-end-start-radius:0;border-end-end-radius:0;border-start-start-radius:inherit;border-start-end-radius:inherit}.join.join-vertical .join-item:last-child:not(:first-child),.join.join-vertical *:last-child:not(:first-child) .join-item{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:inherit}.join.join-horizontal{flex-direction:row}.join.join-horizontal .join-item:first-child:not(:last-child),.join.join-horizontal *:first-child:not(:last-child) .join-item{border-end-end-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-start-start-radius:inherit}.join.join-horizontal .join-item:last-child:not(:first-child),.join.join-horizontal *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0;border-end-end-radius:inherit;border-start-end-radius:inherit}.kbd-xs{padding-left:.25rem;padding-right:.25rem;font-size:.75rem;line-height:1rem;min-height:1.2em;min-width:1.2em}.menu-horizontal{display:inline-flex;flex-direction:row}.menu-horizontal>li:not(.menu-title)>details>ul{position:absolute}.select-sm{height:2rem;min-height:2rem;padding-left:.75rem;padding-right:2rem;font-size:.875rem;line-height:2rem}[dir=rtl] .select-sm{padding-left:2rem;padding-right:.75rem}.steps-horizontal .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));place-items:center;text-align:center}.steps-vertical .step{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(1,minmax(0,1fr))}.tabs-md :where(.tab){height:2rem;font-size:.875rem;line-height:1.25rem;line-height:2;--tab-padding: 1rem}.tabs-lg :where(.tab){height:3rem;font-size:1.125rem;line-height:1.75rem;line-height:2;--tab-padding: 1.25rem}.tabs-sm :where(.tab){height:1.5rem;font-size:.875rem;line-height:.75rem;--tab-padding: .75rem}.tabs-xs :where(.tab){height:1.25rem;font-size:.75rem;line-height:.75rem;--tab-padding: .5rem}.textarea-sm{padding:.25rem .75rem;font-size:.875rem;line-height:2rem}:where(.toast){bottom:0;inset-inline-end:0px;inset-inline-start:auto;top:auto;--tw-translate-x: 0px;--tw-translate-y: 0px;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))}.toast:where(.toast-start){inset-inline-end:auto;inset-inline-start:0px;--tw-translate-x: 0px;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))}.toast:where(.toast-center){inset-inline-end:50%;inset-inline-start:50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-center):where([dir=rtl],[dir=rtl] *){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-end){inset-inline-end:0px;inset-inline-start:auto;--tw-translate-x: 0px;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))}.toast:where(.toast-bottom){bottom:0;top:auto;--tw-translate-y: 0px;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))}.toast:where(.toast-middle){bottom:auto;top:50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-top){bottom:auto;top:0;--tw-translate-y: 0px;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))}[type=checkbox].toggle-sm{--handleoffset: .75rem;height:1.25rem;width:2rem}.tooltip{position:relative;display:inline-block;--tooltip-offset: calc(100% + 1px + var(--tooltip-tail, 0px))}.tooltip:before{position:absolute;pointer-events:none;z-index:1;content:var(--tw-content);--tw-content: attr(data-tip)}.tooltip:before,.tooltip-top:before{transform:translate(-50%);top:auto;left:50%;right:auto;bottom:var(--tooltip-offset)}.tooltip-right:before{transform:translateY(-50%);top:50%;left:var(--tooltip-offset);right:auto;bottom:auto}.card-compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-compact .card-title{margin-bottom:.25rem}.card-normal .card-body{padding:var(--padding-card, 2rem);font-size:1rem;line-height:1.5rem}.card-normal .card-title{margin-bottom:.75rem}.join.join-vertical>:where(*:not(:first-child)){margin-left:0;margin-right:0;margin-top:-1px}.join.join-vertical>:where(*:not(:first-child)):is(.btn){margin-top:calc(var(--border-btn) * -1)}.join.join-horizontal>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join.join-horizontal>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1);margin-top:0}.menu-horizontal>li:not(.menu-title)>details>ul{margin-inline-start:0px;margin-top:1rem;padding-top:.5rem;padding-bottom:.5rem;padding-inline-end:.5rem}.menu-horizontal>li>details>ul:before{content:none}:where(.menu-horizontal>li:not(.menu-title)>details>ul){border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--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)}.modal-top :where(.modal-box){width:100%;max-width:none;--tw-translate-y: -2.5rem;--tw-scale-x: 1;--tw-scale-y: 1;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));border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem);border-top-left-radius:0;border-top-right-radius:0}.modal-middle :where(.modal-box){width:91.666667%;max-width:32rem;--tw-translate-y: 0px;--tw-scale-x: .9;--tw-scale-y: .9;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));border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem)}.modal-bottom :where(.modal-box){width:100%;max-width:none;--tw-translate-y: 2.5rem;--tw-scale-x: 1;--tw-scale-y: 1;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));border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);border-bottom-right-radius:0;border-bottom-left-radius:0}.steps-horizontal .step{grid-template-rows:40px 1fr;grid-template-columns:auto;min-width:4rem}.steps-horizontal .step:before{height:.5rem;width:100%;--tw-translate-x: 0px;--tw-translate-y: 0px;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));content:\"\";margin-inline-start:-100%}.steps-horizontal .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x: 0px;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))}.steps-vertical .step{gap:.5rem;grid-template-columns:40px 1fr;grid-template-rows:auto;min-height:4rem;justify-items:start}.steps-vertical .step:before{height:100%;width:.5rem;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));margin-inline-start:50%}.steps-vertical .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.table-xs :not(thead):not(tfoot) tr{font-size:.75rem;line-height:1rem}.table-xs :where(th,td){padding:.25rem .5rem}.table-sm :not(thead):not(tfoot) tr{font-size:.875rem;line-height:1.25rem}.table-sm :where(th,td){padding:.5rem .75rem}.tooltip{position:relative;display:inline-block;text-align:center;--tooltip-tail: .1875rem;--tooltip-color: var(--fallback-n,oklch(var(--n)/1));--tooltip-text-color: var(--fallback-nc,oklch(var(--nc)/1));--tooltip-tail-offset: calc(100% + .0625rem - var(--tooltip-tail))}.tooltip:before,.tooltip:after{opacity:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-delay:.1s;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.tooltip:after{position:absolute;content:\"\";border-style:solid;border-width:var(--tooltip-tail, 0);width:0;height:0;display:block}.tooltip:before{max-width:20rem;white-space:normal;border-radius:.25rem;padding:.25rem .5rem;font-size:.875rem;line-height:1.25rem;background-color:var(--tooltip-color);color:var(--tooltip-text-color);width:-moz-max-content;width:max-content}.tooltip.tooltip-open:before{opacity:1;transition-delay:75ms}.tooltip.tooltip-open:after{opacity:1;transition-delay:75ms}.tooltip:hover:before{opacity:1;transition-delay:75ms}.tooltip:hover:after{opacity:1;transition-delay:75ms}.tooltip:has(:focus-visible):after,.tooltip:has(:focus-visible):before{opacity:1;transition-delay:75ms}.tooltip:not([data-tip]):hover:before,.tooltip:not([data-tip]):hover:after{visibility:hidden;opacity:0}.tooltip:after,.tooltip-top:after{transform:translate(-50%);border-color:var(--tooltip-color) transparent transparent transparent;top:auto;left:50%;right:auto;bottom:var(--tooltip-tail-offset)}.tooltip-right:after{transform:translateY(-50%);border-color:transparent var(--tooltip-color) transparent transparent;top:50%;left:calc(var(--tooltip-tail-offset) + .0625rem);right:auto;bottom:auto}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-24{top:6rem}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.col-span-2{grid-column:span 2 / span 2}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-mt-0\\.5{margin-top:-.125rem}.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}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-6{margin-left:1.5rem}.ml-8{margin-left:2rem}.mr-1{margin-right:.25rem}.mr-32{margin-right:8rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-12{height:3rem}.h-16{height:4rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-96{height:24rem}.h-\\[90vh\\]{height:90vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:8rem}.max-h-60{max-height:15rem}.max-h-96{max-height:24rem}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[70vh\\]{max-height:70vh}.min-h-0{min-height:0px}.min-h-\\[2\\.5rem\\]{min-height:2.5rem}.min-h-screen{min-height:100vh}.w-1\\/3{width:33.333333%}.w-11\\/12{width:91.666667%}.w-12{width:3rem}.w-16{width:4rem}.w-2\\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-full{width:100%}.w-px{width:1px}.min-w-\\[200px\\]{min-width:200px}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-\\[2\\]{flex:2}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.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-help{cursor:help}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.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-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-box{border-radius:var(--rounded-box, 1rem)}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-base-300{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity, 1)))}.border-base-content\\/20{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.border-error\\/20{border-color:var(--fallback-er,oklch(var(--er)/.2))}.bg-base-100{--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity, 1)))}.bg-base-200{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}.bg-base-300{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity, 1)))}.bg-base-300\\/30{background-color:var(--fallback-b3,oklch(var(--b3)/.3))}.bg-base-content{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity, 1)))}.bg-base-content\\/30{background-color:var(--fallback-bc,oklch(var(--bc)/.3))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-error{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity, 1)))}.bg-error\\/10{background-color:var(--fallback-er,oklch(var(--er)/.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-primary{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity, 1)))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-success{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity, 1)))}.bg-warning{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity, 1)))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.stroke-current{stroke:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-64{padding-left:16rem;padding-right:16rem}.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-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-32{padding-bottom:8rem}.pl-4{padding-left:1rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-6xl{font-size:3.75rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-7{line-height:1.75rem}.text-base-content{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity, 1)))}.text-base-content\\/60{color:var(--fallback-bc,oklch(var(--bc)/.6))}.text-base-content\\/70{color:var(--fallback-bc,oklch(var(--bc)/.7))}.text-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/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-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity, 1)))}.text-primary-content{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity, 1)))}.text-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity, 1)))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px 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-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.hover\\:bg-base-200:hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}.hover\\:bg-base-300:hover{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity, 1)))}.hover\\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\\:shadow-lg:hover{--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)}.group:hover .group-hover\\:opacity-90{opacity:.9}@media (min-width: 768px){.md\\:col-span-3{grid-column:span 3 / span 3}.md\\:inline{display:inline}.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\\:col-span-2{grid-column:span 2 / span 2}.lg\\:col-span-6{grid-column:span 6 / span 6}.lg\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width: 1280px){.xl\\:flex{display:flex}.xl\\:hidden{display:none}.xl\\:max-w-md{max-width:28rem}}@media (prefers-color-scheme: dark){.dark\\:bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\\:text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\\:hover\\:text-gray-100:hover{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}}.card.svelte-1qok2wg{backdrop-filter:blur(10px)}.active.svelte-1fgps4v{background-color:hsl(var(--p) / .2)}\n",
21265
+ "en-D_EcykrR.js": 'const e={error:"Error",loading:"Loading...",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",confirm:"Confirm",reset:"Reset",refresh:"Refresh",search:"Search",filter:"Filter",export:"Export",import:"Import",close:"Close",show:"Show",hide:"Hide",copy:"Copy",copied:"Copied"},t={dashboard:"Dashboard",home:"Home",routes:"Routes",logs:"Request Logs",configuration:"Configuration"},r={home:"Home",routes:"Route Management",newRoute:"New Route",editRoute:"Edit Route"},a={title:"Dashboard",dataRange:"Data Time Range",totalRequests:"Total Requests",requestsPerSec:"Requests/sec",requestsPerSecond:"Requests/sec",successRate:"Success Rate",avgResponseTime:"Avg Response Time",upstreamAnalysis:"Upstream Analysis",upstreamDistribution:"Upstream Request Distribution",upstreamFailures:"Upstream Failure Statistics",upstreamStatusCodes:"Upstream Status Code Distribution",noUpstreamData:"No upstream data available for the selected time range",noData:"No data available"},o={title:"Monitoring Charts",range:{"1h":"1 Hour","12h":"12 Hours","24h":"24 Hours",oneHour:"1 Hour",twelveHours:"12 Hours",twentyFourHours:"24 Hours"},charts:{requestsTrend:"Requests Trend",periodRequests:"Period Requests",requests:"Requests",responseTimeTrend:"Response Time Trend",avgResponseTime:"Avg Response Time (ms)",milliseconds:"Milliseconds (ms)",successRateTrend:"Success Rate Trend",successRate:"Success Rate (%)",percentage:"Percentage (%)",errorsTrend:"Errors Trend",periodErrors:"Period Errors",errors:"Errors"},noData:"No historical data available"},s={title:"Routes",subtitle:"Manage your reverse proxy routes and upstreams",addRoute:"Add Route",newRoute:"+ New Route",createFirstRoute:"Create First Route",editRoute:"Edit Route",deleteRoute:"Delete Route",export:"Export",import:"Import",path:"Path",upstreams:"Upstreams",actions:"Actions",searchPlaceholder:"Search routes or upstreams...",allTransformers:"All Transformers",noRoutes:"No routes configured",noRoutesMessage:"Create your first route to start proxying requests",noMatchingRoutes:"No matching routes",noMatchingMessage:"Try adjusting your search or filter criteria",showingRoutes:"Showing {count} of {total} route(s)",confirmDelete:"Confirm Delete Route",confirmDeleteMessage:\'Are you sure you want to delete route "{path}"? This action cannot be undone.\',deleted:\'Route "{path}" has been deleted\',deleteFailed:"Delete failed: {error}",duplicated:\'Route "{path}" has been duplicated\',duplicateFailed:"Duplicate failed: {error}",noRoutesToExport:"No routes to export",exported:"Routes exported",importMustBeArray:"Import file must be an array of routes",importSuccess:"Successfully imported {success} route(s)",importPartialSuccess:"Successfully imported {success} route(s), failed {failed}",importFailed:"Import failed: {error}",filterStatus:{all:"All Status",healthy:"Healthy Only",unhealthy:"Has Issues"}},i={title:"Configuration",subtitle:"Edit and manage system configuration",export:"Export",import:"Import",reload:"Reload",restart:"Restart Service",formEditor:"Form Editor",jsonEditor:"JSON Editor",systemSettings:"System Settings",serverPort:"Server Port",workerProcesses:"Worker Processes",workerProcessesHelp:"Number of worker processes to spawn",logLevel:"Log Level",bodyParserLimit:"Body Parser Limit",bodyParserLimitHelp:\'Maximum request body size (e.g., "50mb", "100kb")\',requiresRestart:"Note: Changes to Port, Workers, Log Level, and Body Parser Limit require a service restart to take effect.",routesConfigured:"{count} routes configured.",manageRoutes:"Use the Routes page to manage routes.",jsonConfiguration:"JSON Configuration",jsonParseError:"JSON Parse Error: {error}",jsonPlaceholder:"Enter JSON configuration...",jsonHelp:"Edit the raw JSON configuration. Changes will be validated before saving.",unsavedChanges:"You have unsaved changes",reset:"Reset",save:"Save Configuration",confirmRestart:"Confirm Service Restart",restartMessage:"Are you sure you want to restart the service? This will cause a brief interruption (typically 2-3 seconds) as the service gracefully restarts.",restartWarning:"Active connections may be temporarily interrupted.",validationFailed:"Configuration validation failed: {error}",saved:"Configuration saved",saveFailed:"Save failed: {error}",exported:"Configuration exported",imported:"Configuration imported",importFailed:"Import failed: {error}",reloaded:"Configuration successfully reloaded",reloadFailed:"Reload failed: {error}",restartSent:"Restart signal sent, service will restart in a few seconds",restartDaemonOnly:\'Restart feature is only available in daemon mode. Please use "bungee restart" command or manually restart the development server.\',restartFailed:"Restart failed: {error}"},l={title:"404",message:"Page Not Found",goHome:"Go Home"},n={newRoute:"New Route",editRoute:"Edit Route",backToList:"Back to List",routePath:"Route Path",pathPlaceholder:"e.g.: /api/*",pathHelp:"Supports wildcards (*) and parameters (:param)",pathHelpLong:"Paths support wildcards (*) to match any characters and parameter placeholders (:param) to capture path segments",pathRewrite:"Path Rewrite",pathRewriteHelp:"Regex patterns to modify request paths",pathRewriteTooltip:"Path rewrite allows using regex patterns to match and replace request paths. Example: ^/api/v1 \u2192 /api/v2 will rewrite all paths starting with /api/v1 to /api/v2",addPathRewriteRule:"Add Path Rewrite Rule",patternPlaceholder:"Match regex pattern (e.g. ^/test)",replacementPlaceholder:"Rewrite path (e.g. /v1)",confirmDeleteRule:"Are you sure you want to delete this rule?",upstreamCountTooltip:"Configured {count} upstream server(s)",upstreams:"Upstreams",addUpstream:"Add Upstream",transformer:"Route Transformer",transformerHelp:"Transformer applied to the entire route (optional)",noPluginsAvailable:"No route transformer plugins available",optional:"Optional",failoverTitle:"Failover",failoverHelp:"Configure automatic failover and health check mechanisms",enableFailover:"Enable automatic failover",retryableStatusCodes:"Retryable Status Codes",retryableStatusCodesPlaceholder:"Default: 500, 502, 503, 504 (Server Errors)",retryableStatusCodesHelp:"Automatically retry other upstreams when these status codes occur",passiveHealthCheck:"Passive Health Check",passiveHealthCheckTooltip:"Monitors actual request success/failure to determine upstream health, no extra probe requests",consecutiveFailuresThreshold:"Consecutive Failures Threshold",consecutiveFailuresThresholdHelp:"Mark as unhealthy after this many consecutive failures (default: 3)",healthyThreshold:"Healthy Threshold",healthyThresholdHelp:"Recover to healthy after this many consecutive successes (default: 2)",requestTimeoutMs:"Request Timeout (ms)",requestTimeoutMsHelp:"Timeout for normal requests (default: 30000ms)",connectTimeoutMs:"Connect Timeout (ms)",connectTimeoutMsHelp:"Timeout for establishing connection (default: 5000ms)",activeHealthCheck:"Active Health Check",activeHealthCheckTooltip:"Periodically sends probe requests to actively detect upstream health, independent of business traffic",enableActiveHealthCheck:"Enable active health check",healthCheckIntervalMs:"Check Interval (ms)",healthCheckIntervalMsHelp:"How often to perform health checks (default: 10000ms)",healthCheckTimeoutMs:"Check Timeout (ms)",healthCheckTimeoutMsHelp:"Timeout for health check requests (default: 3000ms)",healthCheckPath:"Check Path",healthCheckPathHelp:"HTTP path for health checks (default: /health)",healthCheckMethod:"HTTP Method",healthCheckExpectedStatus:"Expected Status Codes",healthCheckExpectedStatusHelp:"Expected status codes for health checks (default: 200)",healthCheckUnhealthyThreshold:"Unhealthy Threshold",healthCheckUnhealthyThresholdHelp:"Mark as unhealthy after this many consecutive failures (default: 3)",healthCheckHealthyThreshold:"Healthy Threshold",healthCheckHealthyThresholdHelp:"Recover to healthy after this many consecutive successes (default: 2)",slowStart:"Slow Start",slowStartTooltip:"Gradually increases traffic to recovered upstreams to prevent immediate overload and re-failure",enableSlowStart:"Enable slow start mechanism",slowStartDurationMs:"Slow Start Duration (ms)",slowStartDurationMsHelp:"Duration to gradually increase weight after recovery (default: 30000ms)",slowStartInitialWeightFactor:"Initial Weight Factor",slowStartInitialWeightFactorHelp:"Initial weight ratio after recovery, 0.1 means 10% (default: 0.1)",failoverInfoNotice:"Failover automatically detects upstream health status and switches to backup upstreams on failure to ensure service availability.",recoveryIntervalMs:"Recovery Interval (ms)",recoveryIntervalPlaceholder:"5000",recoveryIntervalHelp:"Wait time before attempting to recover a failed upstream",recoveryTimeoutMs:"Recovery Timeout (ms)",recoveryTimeoutPlaceholder:"3000",recoveryTimeoutHelp:"Timeout for recovery attempts to avoid long pending requests",saveRoute:"Save Route",cancel:"Cancel",saving:"Saving...",loadingTemplates:"Loading templates...",useTemplate:"Use Template",routeSaved:"Route saved",routeUpdated:"Route updated",saveFailed:"Save failed: {error}",pathRequired:"Route path cannot be empty",upstreamRequired:"At least one upstream is required"},u={upstreams:"{count} upstream(s)",hasTransformer:"With transformer",failover:"Failover",edit:"Edit",duplicate:"Duplicate",delete:"Delete",duplicating:"Duplicating...",deleting:"Deleting...",viewAll:"View all {count}",moreActions:"More Actions",tableHeaders:{status:"Status",target:"Target",weight:"Weight",priority:"Priority"},pathRewrite:{original:"Original",rewriteTo:"Rewrite to"}},d={title:"Upstream Servers",close:"Close",statusHealthy:"Healthy",statusUnhealthy:"Unhealthy",statusUnknown:"Unknown"},c={title:"Upstream #{index}",priority:"Priority",target:"Target",targetUrl:"Target URL",targetPlaceholder:"https://api.example.com",targetHelp:"Full URL of the upstream server",weight:"Weight",weightHelp:"Load balancing weight (1-100)",transformer:"Upstream Transformer",transformerHelp:"Transformer applied only to this upstream (optional)",remove:"Remove Upstream",targetRequired:"Target URL cannot be empty",invalidUrl:"Invalid URL format"},p={selectPlugin:"Select Plugin",none:"No Plugin",description:"Plugin Description",testPlugin:"Test Plugin",testing:"Testing...",input:"Input (Original Format)",output:"Output (Transformed Format)",inputPlaceholder:"Enter test data...",testSuccess:"Transform successful",testFailed:"Transform failed: {error}"},h={title:"Request Headers",add:"Add",addHeader:"Add Header",name:"Name",namePlaceholder:"Content-Type",value:"Value",valuePlaceholder:"application/json",remove:"Remove",replace:"Replace",default:"Default",empty:"No headers"},m={title:"Request Body",bodyType:"Body Type",json:"JSON",text:"Plain Text",form:"Form Data",none:"No Body",placeholder:"Enter request body content...",jsonInvalid:"Invalid JSON format",add:"Add",remove:"Remove",replace:"Replace",default:"Default",empty:"No fields"},g={title:"Query Parameters",name:"Name",namePlaceholder:"param_name",value:"Value",valuePlaceholder:"param_value",add:"Add",remove:"Remove",replace:"Replace",default:"Default",empty:"No parameters"},y={title:"Conditional Expression",placeholder:"request.headers[\'User-Agent\'].includes(\'Mobile\')",help:"Use JavaScript expressions that return true or false",examples:"Examples",example1:"Check request headers",example2:"Check query parameters",example3:"Check request method",test:"Test Expression",testResult:"Test Result",resultTrue:"Condition is true",resultFalse:"Condition is false",resultError:"Expression error: {error}"},f={title:"Route Templates",subtitle:"Quickly create common route configurations",useTemplate:"Use This Template",categories:{api:"API Proxy",static:"Static Resources",websocket:"WebSocket",auth:"Auth Proxy"},restApi:{name:"REST API Proxy",description:"Standard RESTful API proxy configuration"},graphql:{name:"GraphQL API",description:"GraphQL endpoint proxy"},static:{name:"Static File Server",description:"Proxy static resource files"},websocket:{name:"WebSocket Proxy",description:"Real-time communication WebSocket proxy"},loadBalancing:{name:"Load Balancing",description:"Multi-upstream load balancing configuration"}},v={yes:"Yes",no:"No",cancelTitle:"Confirm Cancel",cancelMessage:"Are you sure you want to cancel and go back? Any unsaved changes will be lost.",restoreDraftTitle:"Restore Draft",restoreDraftMessage:"An unsaved draft was detected. Would you like to restore it?"},R={targetRequired:"Target URL cannot be empty",targetProtocol:"Target URL must use http or https protocol",invalidUrl:"Invalid URL format",weightPositive:"Weight must be positive",priorityNonNegative:"Priority must be non-negative",totalWeightPositive:"Total weight must be greater than 0",unknownTransformer:"Unknown transformer: {transformer}. Available options: {options}",pathRequired:"Path cannot be empty",pathStartSlash:"Path must start with /",upstreamRequired:"At least one upstream is required",invalidRegex:"Invalid regular expression: {pattern}",invalidStatusCode:"Invalid status code: {code}",recoveryIntervalPositive:"Recovery interval must be greater than 0",recoveryTimeoutPositive:"Recovery timeout must be greater than 0",expressionEmpty:"Expression cannot be empty",mismatchedBraces:"Mismatched {{ }} braces",mismatchedParentheses:"Mismatched parentheses",mismatchedQuotes:"Mismatched quotes"},T={globalAuth:"Global Authentication",routeAuth:"Route Authentication",helpText:"Protect your API endpoints",enableAuth:"Enable Authentication",enabled:"Enabled",disabled:"Disabled",tokens:"Token List",tokenPlaceholder:"Enter token or use {{ env.TOKEN_NAME }}",addToken:"Add Token",expressionSupport:"Expression syntax is supported for referencing environment variables:",securityNotice:"When authentication is enabled, the Authorization header is automatically removed and will not be forwarded to upstream servers (security measure).",routeAuthHelp:"Route-level authentication will override global authentication configuration. If not configured, the global authentication settings will be used."},b={title:"Request Logs",filters:"Filters",autoRefresh:"Auto Refresh",refreshInterval:"Refresh Interval",refreshEvery5s:"Every 5s",refreshEvery10s:"Every 10s",refreshEvery30s:"Every 30s",refreshEvery60s:"Every 60s",lastRefreshed:"Last refreshed",newDataAvailable:"New data available, click refresh to view",searchTerm:"Search",searchPlaceholder:"Search path or error message...",method:"HTTP Method",allMethods:"All Methods",status:"Status Code",statusPlaceholder:"e.g., 200, 404, 500",result:"Result",allResults:"All",success:"Success",failed:"Failed",timeRange:"Time Range",allTime:"All Time",recentTime:"Recent Time",customTime:"Custom Range",recentHours:"Recent Hours",startTime:"Start Time",endTime:"End Time",sortBy:"Sort By",sortByTimestamp:"Timestamp",sortByDuration:"Duration",sortByStatus:"Status Code",sortOrder:"Order",asc:"Ascending",desc:"Descending",time:"Time",path:"Path",duration:"Duration",requestType:"Type",requestTypeFilter:"Request Type",requestType_all:"All Types",requestType_final:"Final",requestType_retry:"Retry",requestType_recovery:"Recovery",requestType_final_desc:"Request returned to client",requestType_retry_desc:"Retry attempt",requestType_recovery_desc:"Failover recovery test",upstream:"Upstream",actions:"Actions",viewDetail:"Details",export:"Export",startStream:"Start Stream",stopStream:"Stop Stream",showing:"Showing {start}-{end} of {total}",page:"Page {page} of {totalPages}",noData:"No log data available",advancedFilters:"Advanced Filters",activeFilters:"active filter(s)",clearFilters:"Clear All",moreFilters:"More Filters",detail:{title:"Request Log Details",requestId:"Request ID",timestamp:"Timestamp",method:"Method",status:"Status",duration:"Duration",success:"Success",requestInfo:"Request Information",path:"Path",originalPath:"Original Path",transformedPath:"Transformed Path",query:"Query String",routePath:"Matched Route",upstreamInfo:"Upstream Information",upstream:"Upstream",transformer:"Transformer",authInfo:"Authentication Information",authLevel:"Auth Level",authResult:"Result",authSuccess:"Authenticated",authFailed:"Failed",processingSteps:"Processing Steps",errorInfo:"Error Information",requestBody:"Request Body",responseBody:"Response Body",loadRequestBody:"Load Request Body",loadResponseBody:"Load Response Body",bodyNotRecorded:"Body not recorded for this request",bodyNotRecordedReason:"May have exceeded size limit or was empty",originalRequest:"Original Request (Before Transform)",finalRequest:"Final Request (To Upstream)",responseData:"Response Data (From Upstream)",originalHeaders:"Original Headers",finalHeaders:"Final Headers",requestHeaders:"Request Headers",responseHeaders:"Response Headers",bodyPreview:"Body Preview",bodyTooLarge:"Body too large ({size})",clickToExpand:"Click to expand",headers:"headers",noHeaders:"No headers available",noBody:"No body data",overview:"Overview",routeAndUpstream:"Route & Upstream",processingTimeline:"Processing Timeline",totalSteps:"{count} steps",totalDuration:"took {duration}",showTimeline:"Show Timeline",hideTimeline:"Hide Timeline",copyToClipboard:"Copy",downloadJson:"Download JSON",copied:"Copied!",tabOriginalRequest:"Original",tabFinalRequest:"Transformed",tabResponse:"Response",requestData:"Request Data",noDataAvailable:"No data available",step:"Step"},steps:{route_matched:"Route Matched",request_snapshot_created:"Request Snapshot Created",auth_failed:"Authentication Failed",auth_success:"Authentication Success",upstream_selected:"Upstream Selected",trying_upstream:"Trying Upstream",circuit_breaker_closed:"Circuit Breaker Closed",circuit_breaker_opened:"Circuit Breaker Opened",circuit_breaker_reopened:"Circuit Breaker Reopened",upstream_recovered:"Upstream Recovered",upstream_retry:"Upstream Retry",upstream_failed:"Upstream Failed",plugin_request_init:"Plugin Request Init",plugin_before_request:"Plugin Before Request",plugin_intercepted:"Plugin Intercepted Request",plugin_response:"Plugin Response",plugin_error:"Plugin Error"}},S={title:"Logging Configuration",bodyRecording:"Enable Request/Response Body Recording",bodyRecordingHelp:"Record request and response bodies for troubleshooting and analysis",maxSize:"Maximum Body Size",maxSizeHelp:"Bodies larger than this will be skipped (1-100 KB)",retentionDays:"Body Retention Days",retentionDaysHelp:"Bodies will be automatically deleted after this many days",days:"days",hours:"hours",cleanupConfig:"Cleanup Configuration",cleanupStatus:"Status",active:"Active",inactive:"Inactive",cleanupRetention:"Retention",cleanupInterval:"Cleanup Interval",manualCleanup:"Manual Cleanup",confirmCleanup:"Are you sure you want to manually trigger log cleanup? This will delete all logs and bodies older than the configured retention period.",cleanupSuccess:"Cleanup completed successfully",cleanupFailed:"Cleanup failed: {error}",lastCleanup:"Last Cleanup Results",deletedSqliteRecords:"Deleted SQLite records",deletedFileLogFiles:"Deleted log files",deletedBodyFiles:"Deleted body files",dirs:"directories",files:"files",duration:"Duration"},P={title:"Login",subtitle:"Enter your access token to continue",token:"Access Token",tokenPlaceholder:"Enter your access token...",submit:"Login",loggingIn:"Logging in...",success:"Login successful",failed:"Login failed: {error}",required:"Access token is required",unauthorized:"Invalid access token",logout:"Logout",logoutConfirm:"Are you sure you want to logout?"},w={common:e,nav:t,breadcrumb:r,dashboard:a,monitoring:o,routes:s,configuration:i,notFound:l,routeEditor:n,routeCard:u,upstreamsModal:d,upstream:c,plugin:p,headers:h,body:m,query:g,expression:y,templates:f,confirmDialog:v,validation:R,auth:T,logs:b,logging:S,login:P};export{T as auth,m as body,r as breadcrumb,e as common,i as configuration,v as confirmDialog,a as dashboard,w as default,y as expression,h as headers,S as logging,P as login,b as logs,o as monitoring,t as nav,l as notFound,p as plugin,g as query,u as routeCard,n as routeEditor,s as routes,f as templates,c as upstream,d as upstreamsModal,R as validation};\n',
21266
+ "vendor-charts-Bo4qyjB7.js": `import{C as ds}from"./vendor-C5kRSwys.js";/*!
21203
21267
  * Chart.js v4.5.0
21204
21268
  * https://www.chartjs.org
21205
21269
  * (c) 2025 Chart.js Contributors
21206
21270
  * Released under the MIT License
21207
- */function Us(){}const Am=(()=>{let t=0;return()=>t++})();function Ft(t){return t==null}function xn(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Ot(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Es(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Ds(t,e){return Es(t)?t:e}function bt(t,e){return typeof t>"u"?e:t}const xm=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,zd=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function an(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Vt(t,e,n,s){let i,l,o;if(xn(t))for(l=t.length,i=0;i<l;i++)e.call(n,t[i],i);else if(Ot(t))for(o=Object.keys(t),l=o.length,i=0;i<l;i++)e.call(n,t[o[i]],o[i])}function _o(t,e){let n,s,i,l;if(!t||!e||t.length!==e.length)return!1;for(n=0,s=t.length;n<s;++n)if(i=t[n],l=e[n],i.datasetIndex!==l.datasetIndex||i.index!==l.index)return!1;return!0}function vo(t){if(xn(t))return t.map(vo);if(Ot(t)){const e=Object.create(null),n=Object.keys(t),s=n.length;let i=0;for(;i<s;++i)e[n[i]]=vo(t[n[i]]);return e}return t}function Ud(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function Om(t,e,n,s){if(!Ud(t))return;const i=e[t],l=n[t];Ot(i)&&Ot(l)?Sl(i,l,s):e[t]=vo(l)}function Sl(t,e,n){const s=xn(e)?e:[e],i=s.length;if(!Ot(t))return t;n=n||{};const l=n.merger||Om;let o;for(let a=0;a<i;++a){if(o=s[a],!Ot(o))continue;const u=Object.keys(o);for(let f=0,h=u.length;f<h;++f)l(u[f],t,o,n)}return t}function gl(t,e){return Sl(t,e,{merger:Rm})}function Rm(t,e,n){if(!Ud(t))return;const s=e[t],i=n[t];Ot(s)&&Ot(i)?gl(s,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=vo(i))}const Ja={"":t=>t,x:t=>t.x,y:t=>t.y};function Dm(t){const e=t.split("."),n=[];let s="";for(const i of e)s+=i,s.endsWith("\\\\")?s=s.slice(0,-1)+".":(n.push(s),s="");return n}function Lm(t){const e=Dm(t);return n=>{for(const s of e){if(s==="")break;n=n&&n[s]}return n}}function Mi(t,e){return(Ja[e]||(Ja[e]=Lm(e)))(t)}function Jr(t){return t.charAt(0).toUpperCase()+t.slice(1)}const El=t=>typeof t<"u",fi=t=>typeof t=="function",Ka=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function Hm(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Wt=Math.PI,kn=2*Wt,Im=kn+Wt,yo=Number.POSITIVE_INFINITY,Bm=Wt/180,On=Wt/2,bi=Wt/4,Za=Wt*2/3,Vd=Math.log10,Bs=Math.sign;function ml(t,e,n){return Math.abs(t-e)<n}function Qa(t){const e=Math.round(t);t=ml(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Vd(t))),s=t/n;return(s<=1?1:s<=2?2:s<=5?5:10)*n}function Fm(t){const e=[],n=Math.sqrt(t);let s;for(s=1;s<n;s++)t%s===0&&(e.push(s),e.push(t/s));return n===(n|0)&&e.push(n),e.sort((i,l)=>i-l).pop(),e}function Nm(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function Tl(t){return!Nm(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function jm(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function zm(t,e,n){let s,i,l;for(s=0,i=t.length;s<i;s++)l=t[s][n],isNaN(l)||(e.min=Math.min(e.min,l),e.max=Math.max(e.max,l))}function Gs(t){return t*(Wt/180)}function Um(t){return t*(180/Wt)}function $a(t){if(!Es(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Wd(t,e){const n=e.x-t.x,s=e.y-t.y,i=Math.sqrt(n*n+s*s);let l=Math.atan2(s,n);return l<-.5*Wt&&(l+=kn),{angle:l,distance:i}}function Mr(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Vm(t,e){return(t-e+Im)%kn-Wt}function Ms(t){return(t%kn+kn)%kn}function Ml(t,e,n,s){const i=Ms(t),l=Ms(e),o=Ms(n),a=Ms(l-i),u=Ms(o-i),f=Ms(i-l),h=Ms(i-o);return i===l||i===o||s&&l===o||a>u&&f<h}function Jn(t,e,n){return Math.max(e,Math.min(n,t))}function Wm(t){return Jn(t,-32768,32767)}function ii(t,e,n,s=1e-6){return t>=Math.min(e,n)-s&&t<=Math.max(e,n)+s}function Kr(t,e,n){n=n||(o=>t[o]<e);let s=t.length-1,i=0,l;for(;s-i>1;)l=i+s>>1,n(l)?i=l:s=l;return{lo:i,hi:s}}const Si=(t,e,n,s)=>Kr(t,n,s?i=>{const l=t[i][e];return l<n||l===n&&t[i+1][e]===n}:i=>t[i][e]<n),qm=(t,e,n)=>Kr(t,n,s=>t[s][e]>=n);function Gm(t,e,n){let s=0,i=t.length;for(;s<i&&t[s]<e;)s++;for(;i>s&&t[i-1]>n;)i--;return s>0||i<t.length?t.slice(s,i):t}const qd=["push","pop","shift","splice","unshift"];function Xm(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),qd.forEach(n=>{const s="_onData"+Jr(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...l){const o=i.apply(this,l);return t._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...l)}),o}})})}function eu(t,e){const n=t._chartjs;if(!n)return;const s=n.listeners,i=s.indexOf(e);i!==-1&&s.splice(i,1),!(s.length>0)&&(qd.forEach(l=>{delete t[l]}),delete t._chartjs)}function Gd(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Xd=(function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame})();function Yd(t,e){let n=[],s=!1;return function(...i){n=i,s||(s=!0,Xd.call(window,()=>{s=!1,t.apply(e,n)}))}}function Ym(t,e){let n;return function(...s){return e?(clearTimeout(n),n=setTimeout(t,e,s)):t.apply(this,s),e}}const Zr=t=>t==="start"?"left":t==="end"?"right":"center",Gn=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,Jm=(t,e,n,s)=>t===(s?"left":"right")?n:t==="center"?(e+n)/2:e;function Km(t,e,n){const s=e.length;let i=0,l=s;if(t._sorted){const{iScale:o,vScale:a,_parsed:u}=t,f=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,h=o.axis,{min:p,max:g,minDefined:m,maxDefined:b}=o.getUserBounds();if(m){if(i=Math.min(Si(u,h,p).lo,n?s:Si(e,h,o.getPixelForValue(p)).lo),f){const _=u.slice(0,i+1).reverse().findIndex(y=>!Ft(y[a.axis]));i-=Math.max(0,_)}i=Jn(i,0,s-1)}if(b){let _=Math.max(Si(u,o.axis,g,!0).hi+1,n?0:Si(e,h,o.getPixelForValue(g),!0).hi+1);if(f){const y=u.slice(_-1).findIndex(k=>!Ft(k[a.axis]));_+=Math.max(0,y)}l=Jn(_,i,s)-i}else l=s-i}return{start:i,count:l}}function Zm(t){const{xScale:e,yScale:n,_scaleRanges:s}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!s)return t._scaleRanges=i,!0;const l=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==n.min||s.ymax!==n.max;return Object.assign(s,i),l}const Gl=t=>t===0||t===1,tu=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*kn/n)),nu=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*kn/n)+1,bl={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*On)+1,easeOutSine:t=>Math.sin(t*On),easeInOutSine:t=>-.5*(Math.cos(Wt*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Gl(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Gl(t)?t:tu(t,.075,.3),easeOutElastic:t=>Gl(t)?t:nu(t,.075,.3),easeInOutElastic(t){return Gl(t)?t:t<.5?.5*tu(t*2,.1125,.45):.5+.5*nu(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-bl.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?bl.easeInBounce(t*2)*.5:bl.easeOutBounce(t*2-1)*.5+.5};function Qr(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function su(t){return Qr(t)?t:new kl(t)}function Zo(t){return Qr(t)?t:new kl(t).saturate(.5).darken(.1).hexString()}const Qm=["x","y","borderWidth","radius","tension"],$m=["color","borderColor","backgroundColor"];function e1(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:$m},numbers:{type:"number",properties:Qm}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function t1(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const iu=new Map;function n1(t,e){e=e||{};const n=t+JSON.stringify(e);let s=iu.get(n);return s||(s=new Intl.NumberFormat(t,e),iu.set(n,s)),s}function $r(t,e,n){return n1(e,n).format(t)}const s1={values(t){return xn(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const s=this.chart.options.locale;let i,l=t;if(n.length>1){const f=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(f<1e-4||f>1e15)&&(i="scientific"),l=i1(t,n)}const o=Vd(Math.abs(l)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),u={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(u,this.options.ticks.format),$r(t,s,u)}};function i1(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Jd={formatters:s1};function l1(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Jd.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Ci=Object.create(null),Cr=Object.create(null);function _l(t,e){if(!e)return t;const n=e.split(".");for(let s=0,i=n.length;s<i;++s){const l=n[s];t=t[l]||(t[l]=Object.create(null))}return t}function Qo(t,e,n){return typeof e=="string"?Sl(_l(t,e),n):Sl(_l(t,""),e)}class o1{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=s=>s.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,i)=>Zo(i.backgroundColor),this.hoverBorderColor=(s,i)=>Zo(i.borderColor),this.hoverColor=(s,i)=>Zo(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return Qo(this,e,n)}get(e){return _l(this,e)}describe(e,n){return Qo(Cr,e,n)}override(e,n){return Qo(Ci,e,n)}route(e,n,s,i){const l=_l(this,e),o=_l(this,s),a="_"+n;Object.defineProperties(l,{[a]:{value:l[n],writable:!0},[n]:{enumerable:!0,get(){const u=this[a],f=o[i];return Ot(u)?Object.assign({},f,u):bt(u,f)},set(u){this[a]=u}}})}apply(e){e.forEach(n=>n(this))}}var En=new o1({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[e1,t1,l1]);function r1(t){return!t||Ft(t.size)||Ft(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function lu(t,e,n,s,i){let l=e[i];return l||(l=e[i]=t.measureText(i).width,n.push(i)),l>s&&(s=l),s}function _i(t,e,n){const s=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*s)/s+i}function ou(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Pr(t,e,n,s){Kd(t,e,n,s,null)}function Kd(t,e,n,s,i){let l,o,a,u,f,h,p,g;const m=e.pointStyle,b=e.rotation,_=e.radius;let y=(b||0)*Bm;if(m&&typeof m=="object"&&(l=m.toString(),l==="[object HTMLImageElement]"||l==="[object HTMLCanvasElement]")){t.save(),t.translate(n,s),t.rotate(y),t.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),t.restore();return}if(!(isNaN(_)||_<=0)){switch(t.beginPath(),m){default:i?t.ellipse(n,s,i/2,_,0,0,kn):t.arc(n,s,_,0,kn),t.closePath();break;case"triangle":h=i?i/2:_,t.moveTo(n+Math.sin(y)*h,s-Math.cos(y)*_),y+=Za,t.lineTo(n+Math.sin(y)*h,s-Math.cos(y)*_),y+=Za,t.lineTo(n+Math.sin(y)*h,s-Math.cos(y)*_),t.closePath();break;case"rectRounded":f=_*.516,u=_-f,o=Math.cos(y+bi)*u,p=Math.cos(y+bi)*(i?i/2-f:u),a=Math.sin(y+bi)*u,g=Math.sin(y+bi)*(i?i/2-f:u),t.arc(n-p,s-a,f,y-Wt,y-On),t.arc(n+g,s-o,f,y-On,y),t.arc(n+p,s+a,f,y,y+On),t.arc(n-g,s+o,f,y+On,y+Wt),t.closePath();break;case"rect":if(!b){u=Math.SQRT1_2*_,h=i?i/2:u,t.rect(n-h,s-u,2*h,2*u);break}y+=bi;case"rectRot":p=Math.cos(y)*(i?i/2:_),o=Math.cos(y)*_,a=Math.sin(y)*_,g=Math.sin(y)*(i?i/2:_),t.moveTo(n-p,s-a),t.lineTo(n+g,s-o),t.lineTo(n+p,s+a),t.lineTo(n-g,s+o),t.closePath();break;case"crossRot":y+=bi;case"cross":p=Math.cos(y)*(i?i/2:_),o=Math.cos(y)*_,a=Math.sin(y)*_,g=Math.sin(y)*(i?i/2:_),t.moveTo(n-p,s-a),t.lineTo(n+p,s+a),t.moveTo(n+g,s-o),t.lineTo(n-g,s+o);break;case"star":p=Math.cos(y)*(i?i/2:_),o=Math.cos(y)*_,a=Math.sin(y)*_,g=Math.sin(y)*(i?i/2:_),t.moveTo(n-p,s-a),t.lineTo(n+p,s+a),t.moveTo(n+g,s-o),t.lineTo(n-g,s+o),y+=bi,p=Math.cos(y)*(i?i/2:_),o=Math.cos(y)*_,a=Math.sin(y)*_,g=Math.sin(y)*(i?i/2:_),t.moveTo(n-p,s-a),t.lineTo(n+p,s+a),t.moveTo(n+g,s-o),t.lineTo(n-g,s+o);break;case"line":o=i?i/2:Math.cos(y)*_,a=Math.sin(y)*_,t.moveTo(n-o,s-a),t.lineTo(n+o,s+a);break;case"dash":t.moveTo(n,s),t.lineTo(n+Math.cos(y)*(i?i/2:_),s+Math.sin(y)*_);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Cl(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function ea(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function ta(t){t.restore()}function a1(t,e,n,s,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const l=(e.x+n.x)/2;t.lineTo(l,e.y),t.lineTo(l,n.y)}else i==="after"!=!!s?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function u1(t,e,n,s){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?n.cp2x:n.cp1x,s?n.cp2y:n.cp1y,n.x,n.y)}function c1(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Ft(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function f1(t,e,n,s,i){if(i.strikethrough||i.underline){const l=t.measureText(s),o=e-l.actualBoundingBoxLeft,a=e+l.actualBoundingBoxRight,u=n-l.actualBoundingBoxAscent,f=n+l.actualBoundingBoxDescent,h=i.strikethrough?(u+f)/2:f;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(o,h),t.lineTo(a,h),t.stroke()}}function h1(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Pl(t,e,n,s,i,l={}){const o=xn(e)?e:[e],a=l.strokeWidth>0&&l.strokeColor!=="";let u,f;for(t.save(),t.font=i.string,c1(t,l),u=0;u<o.length;++u)f=o[u],l.backdrop&&h1(t,l.backdrop),a&&(l.strokeColor&&(t.strokeStyle=l.strokeColor),Ft(l.strokeWidth)||(t.lineWidth=l.strokeWidth),t.strokeText(f,n,s,l.maxWidth)),t.fillText(f,n,s,l.maxWidth),f1(t,n,s,f,l),s+=Number(i.lineHeight);t.restore()}function wo(t,e){const{x:n,y:s,w:i,h:l,radius:o}=e;t.arc(n+o.topLeft,s+o.topLeft,o.topLeft,1.5*Wt,Wt,!0),t.lineTo(n,s+l-o.bottomLeft),t.arc(n+o.bottomLeft,s+l-o.bottomLeft,o.bottomLeft,Wt,On,!0),t.lineTo(n+i-o.bottomRight,s+l),t.arc(n+i-o.bottomRight,s+l-o.bottomRight,o.bottomRight,On,0,!0),t.lineTo(n+i,s+o.topRight),t.arc(n+i-o.topRight,s+o.topRight,o.topRight,0,-On,!0),t.lineTo(n+o.topLeft,s)}const d1=/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/,p1=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function g1(t,e){const n=(""+t).match(d1);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const m1=t=>+t||0;function na(t,e){const n={},s=Ot(e),i=s?Object.keys(e):e,l=Ot(t)?s?o=>bt(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of i)n[o]=m1(l(o));return n}function Zd(t){return na(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Ni(t){return na(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ts(t){const e=Zd(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Kn(t,e){t=t||{},e=e||En.font;let n=bt(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let s=bt(t.style,e.style);s&&!(""+s).match(p1)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const i={family:bt(t.family,e.family),lineHeight:g1(bt(t.lineHeight,e.lineHeight),n),size:n,style:s,weight:bt(t.weight,e.weight),string:""};return i.string=r1(i),i}function Xl(t,e,n,s){let i,l,o;for(i=0,l=t.length;i<l;++i)if(o=t[i],o!==void 0&&o!==void 0)return o}function b1(t,e,n){const{min:s,max:i}=t,l=zd(e,(i-s)/2),o=(a,u)=>n&&a===0?0:a+u;return{min:o(s,-Math.abs(l)),max:o(i,l)}}function xi(t,e){return Object.assign(Object.create(t),e)}function sa(t,e=[""],n,s,i=()=>t[0]){const l=n||t;typeof s>"u"&&(s=tp("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:l,_fallback:s,_getTarget:i,override:a=>sa([a,...t],e,l,s)};return new Proxy(o,{deleteProperty(a,u){return delete a[u],delete a._keys,delete t[0][u],!0},get(a,u){return $d(a,u,()=>T1(u,e,t,a))},getOwnPropertyDescriptor(a,u){return Reflect.getOwnPropertyDescriptor(a._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,u){return au(a).includes(u)},ownKeys(a){return au(a)},set(a,u,f){const h=a._storage||(a._storage=i());return a[u]=h[u]=f,delete a._keys,!0}})}function qi(t,e,n,s){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Qd(t,s),setContext:l=>qi(t,l,n,s),override:l=>qi(t.override(l),e,n,s)};return new Proxy(i,{deleteProperty(l,o){return delete l[o],delete t[o],!0},get(l,o,a){return $d(l,o,()=>v1(l,o,a))},getOwnPropertyDescriptor(l,o){return l._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(l,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(l,o,a){return t[o]=a,delete l[o],!0}})}function Qd(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:s=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:s,isScriptable:fi(n)?n:()=>n,isIndexable:fi(s)?s:()=>s}}const _1=(t,e)=>t?t+Jr(e):e,ia=(t,e)=>Ot(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function $d(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const s=n();return t[e]=s,s}function v1(t,e,n){const{_proxy:s,_context:i,_subProxy:l,_descriptors:o}=t;let a=s[e];return fi(a)&&o.isScriptable(e)&&(a=y1(e,a,t,n)),xn(a)&&a.length&&(a=w1(e,a,t,o.isIndexable)),ia(e,a)&&(a=qi(a,i,l&&l[e],o)),a}function y1(t,e,n,s){const{_proxy:i,_context:l,_subProxy:o,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let u=e(l,o||s);return a.delete(t),ia(t,u)&&(u=la(i._scopes,i,t,u)),u}function w1(t,e,n,s){const{_proxy:i,_context:l,_subProxy:o,_descriptors:a}=n;if(typeof l.index<"u"&&s(t))return e[l.index%e.length];if(Ot(e[0])){const u=e,f=i._scopes.filter(h=>h!==u);e=[];for(const h of u){const p=la(f,i,t,h);e.push(qi(p,l,o&&o[t],a))}}return e}function ep(t,e,n){return fi(t)?t(e,n):t}const k1=(t,e)=>t===!0?e:typeof t=="string"?Mi(e,t):void 0;function S1(t,e,n,s,i){for(const l of e){const o=k1(n,l);if(o){t.add(o);const a=ep(o._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==s)return a}else if(o===!1&&typeof s<"u"&&n!==s)return null}return!1}function la(t,e,n,s){const i=e._rootScopes,l=ep(e._fallback,n,s),o=[...t,...i],a=new Set;a.add(s);let u=ru(a,o,n,l||n,s);return u===null||typeof l<"u"&&l!==n&&(u=ru(a,o,l,u,s),u===null)?!1:sa(Array.from(a),[""],i,l,()=>E1(e,n,s))}function ru(t,e,n,s,i){for(;n;)n=S1(t,e,n,s,i);return n}function E1(t,e,n){const s=t._getTarget();e in s||(s[e]={});const i=s[e];return xn(i)&&Ot(n)?n:i||{}}function T1(t,e,n,s){let i;for(const l of e)if(i=tp(_1(l,t),n),typeof i<"u")return ia(t,i)?la(n,s,t,i):i}function tp(t,e){for(const n of e){if(!n)continue;const s=n[t];if(typeof s<"u")return s}}function au(t){let e=t._keys;return e||(e=t._keys=M1(t._scopes)),e}function M1(t){const e=new Set;for(const n of t)for(const s of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(s);return Array.from(e)}const C1=Number.EPSILON||1e-14,Gi=(t,e)=>e<t.length&&!t[e].skip&&t[e],np=t=>t==="x"?"y":"x";function P1(t,e,n,s){const i=t.skip?e:t,l=e,o=n.skip?e:n,a=Mr(l,i),u=Mr(o,l);let f=a/(a+u),h=u/(a+u);f=isNaN(f)?0:f,h=isNaN(h)?0:h;const p=s*f,g=s*h;return{previous:{x:l.x-p*(o.x-i.x),y:l.y-p*(o.y-i.y)},next:{x:l.x+g*(o.x-i.x),y:l.y+g*(o.y-i.y)}}}function A1(t,e,n){const s=t.length;let i,l,o,a,u,f=Gi(t,0);for(let h=0;h<s-1;++h)if(u=f,f=Gi(t,h+1),!(!u||!f)){if(ml(e[h],0,C1)){n[h]=n[h+1]=0;continue}i=n[h]/e[h],l=n[h+1]/e[h],a=Math.pow(i,2)+Math.pow(l,2),!(a<=9)&&(o=3/Math.sqrt(a),n[h]=i*o*e[h],n[h+1]=l*o*e[h])}}function x1(t,e,n="x"){const s=np(n),i=t.length;let l,o,a,u=Gi(t,0);for(let f=0;f<i;++f){if(o=a,a=u,u=Gi(t,f+1),!a)continue;const h=a[n],p=a[s];o&&(l=(h-o[n])/3,a[\`cp1\${n}\`]=h-l,a[\`cp1\${s}\`]=p-l*e[f]),u&&(l=(u[n]-h)/3,a[\`cp2\${n}\`]=h+l,a[\`cp2\${s}\`]=p+l*e[f])}}function O1(t,e="x"){const n=np(e),s=t.length,i=Array(s).fill(0),l=Array(s);let o,a,u,f=Gi(t,0);for(o=0;o<s;++o)if(a=u,u=f,f=Gi(t,o+1),!!u){if(f){const h=f[e]-u[e];i[o]=h!==0?(f[n]-u[n])/h:0}l[o]=a?f?Bs(i[o-1])!==Bs(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}A1(t,i,l),x1(t,l,e)}function Yl(t,e,n){return Math.max(Math.min(t,n),e)}function R1(t,e){let n,s,i,l,o,a=Cl(t[0],e);for(n=0,s=t.length;n<s;++n)o=l,l=a,a=n<s-1&&Cl(t[n+1],e),l&&(i=t[n],o&&(i.cp1x=Yl(i.cp1x,e.left,e.right),i.cp1y=Yl(i.cp1y,e.top,e.bottom)),a&&(i.cp2x=Yl(i.cp2x,e.left,e.right),i.cp2y=Yl(i.cp2y,e.top,e.bottom)))}function D1(t,e,n,s,i){let l,o,a,u;if(e.spanGaps&&(t=t.filter(f=>!f.skip)),e.cubicInterpolationMode==="monotone")O1(t,i);else{let f=s?t[t.length-1]:t[0];for(l=0,o=t.length;l<o;++l)a=t[l],u=P1(f,a,t[Math.min(l+1,o-(s?0:1))%o],e.tension),a.cp1x=u.previous.x,a.cp1y=u.previous.y,a.cp2x=u.next.x,a.cp2y=u.next.y,f=a}e.capBezierPoints&&R1(t,n)}function oa(){return typeof window<"u"&&typeof document<"u"}function ra(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function ko(t,e,n){let s;return typeof t=="string"?(s=parseInt(t,10),t.indexOf("%")!==-1&&(s=s/100*e.parentNode[n])):s=t,s}const Oo=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function L1(t,e){return Oo(t).getPropertyValue(e)}const H1=["top","right","bottom","left"];function Ti(t,e,n){const s={};n=n?"-"+n:"";for(let i=0;i<4;i++){const l=H1[i];s[l]=parseFloat(t[e+"-"+l+n])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const I1=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function B1(t,e){const n=t.touches,s=n&&n.length?n[0]:t,{offsetX:i,offsetY:l}=s;let o=!1,a,u;if(I1(i,l,t.target))a=i,u=l;else{const f=e.getBoundingClientRect();a=s.clientX-f.left,u=s.clientY-f.top,o=!0}return{x:a,y:u,box:o}}function yi(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:s}=e,i=Oo(n),l=i.boxSizing==="border-box",o=Ti(i,"padding"),a=Ti(i,"border","width"),{x:u,y:f,box:h}=B1(t,n),p=o.left+(h&&a.left),g=o.top+(h&&a.top);let{width:m,height:b}=e;return l&&(m-=o.width+a.width,b-=o.height+a.height),{x:Math.round((u-p)/m*n.width/s),y:Math.round((f-g)/b*n.height/s)}}function F1(t,e,n){let s,i;if(e===void 0||n===void 0){const l=t&&ra(t);if(!l)e=t.clientWidth,n=t.clientHeight;else{const o=l.getBoundingClientRect(),a=Oo(l),u=Ti(a,"border","width"),f=Ti(a,"padding");e=o.width-f.width-u.width,n=o.height-f.height-u.height,s=ko(a.maxWidth,l,"clientWidth"),i=ko(a.maxHeight,l,"clientHeight")}}return{width:e,height:n,maxWidth:s||yo,maxHeight:i||yo}}const Jl=t=>Math.round(t*10)/10;function N1(t,e,n,s){const i=Oo(t),l=Ti(i,"margin"),o=ko(i.maxWidth,t,"clientWidth")||yo,a=ko(i.maxHeight,t,"clientHeight")||yo,u=F1(t,e,n);let{width:f,height:h}=u;if(i.boxSizing==="content-box"){const g=Ti(i,"border","width"),m=Ti(i,"padding");f-=m.width+g.width,h-=m.height+g.height}return f=Math.max(0,f-l.width),h=Math.max(0,s?f/s:h-l.height),f=Jl(Math.min(f,o,u.maxWidth)),h=Jl(Math.min(h,a,u.maxHeight)),f&&!h&&(h=Jl(f/2)),(e!==void 0||n!==void 0)&&s&&u.height&&h>u.height&&(h=u.height,f=Jl(Math.floor(h*s))),{width:f,height:h}}function uu(t,e,n){const s=e||1,i=Math.floor(t.height*s),l=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=\`\${t.height}px\`,o.style.width=\`\${t.width}px\`),t.currentDevicePixelRatio!==s||o.height!==i||o.width!==l?(t.currentDevicePixelRatio=s,o.height=i,o.width=l,t.ctx.setTransform(s,0,0,s,0,0),!0):!1}const j1=(function(){let t=!1;try{const e={get passive(){return t=!0,!1}};oa()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t})();function cu(t,e){const n=L1(t,e),s=n&&n.match(/^(\\d+)(\\.\\d+)?px$/);return s?+s[1]:void 0}function wi(t,e,n,s){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function z1(t,e,n,s){return{x:t.x+n*(e.x-t.x),y:s==="middle"?n<.5?t.y:e.y:s==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function U1(t,e,n,s){const i={x:t.cp2x,y:t.cp2y},l={x:e.cp1x,y:e.cp1y},o=wi(t,i,n),a=wi(i,l,n),u=wi(l,e,n),f=wi(o,a,n),h=wi(a,u,n);return wi(f,h,n)}const V1=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,s){return n-s},leftForLtr(n,s){return n-s}}},W1=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ji(t,e,n){return t?V1(e,n):W1()}function sp(t,e){let n,s;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,s=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=s)}function ip(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function lp(t){return t==="angle"?{between:Ml,compare:Vm,normalize:Ms}:{between:ii,compare:(e,n)=>e-n,normalize:e=>e}}function fu({start:t,end:e,count:n,loop:s,style:i}){return{start:t%n,end:e%n,loop:s&&(e-t+1)%n===0,style:i}}function q1(t,e,n){const{property:s,start:i,end:l}=n,{between:o,normalize:a}=lp(s),u=e.length;let{start:f,end:h,loop:p}=t,g,m;if(p){for(f+=u,h+=u,g=0,m=u;g<m&&o(a(e[f%u][s]),i,l);++g)f--,h--;f%=u,h%=u}return h<f&&(h+=u),{start:f,end:h,loop:p,style:t.style}}function G1(t,e,n){if(!n)return[t];const{property:s,start:i,end:l}=n,o=e.length,{compare:a,between:u,normalize:f}=lp(s),{start:h,end:p,loop:g,style:m}=q1(t,e,n),b=[];let _=!1,y=null,k,w,S;const P=()=>u(i,S,k)&&a(i,S)!==0,M=()=>a(l,k)===0||u(l,S,k),x=()=>_||P(),A=()=>!_||M();for(let O=h,C=h;O<=p;++O)w=e[O%o],!w.skip&&(k=f(w[s]),k!==S&&(_=u(k,i,l),y===null&&x()&&(y=a(k,i)===0?O:C),y!==null&&A()&&(b.push(fu({start:y,end:O,loop:g,count:o,style:m})),y=null),C=O,S=k));return y!==null&&b.push(fu({start:y,end:p,loop:g,count:o,style:m})),b}function X1(t,e){const n=[],s=t.segments;for(let i=0;i<s.length;i++){const l=G1(s[i],t.points,e);l.length&&n.push(...l)}return n}function Y1(t,e,n,s){let i=0,l=e-1;if(n&&!s)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(l+=i);l>i&&t[l%e].skip;)l--;return l%=e,{start:i,end:l}}function J1(t,e,n,s){const i=t.length,l=[];let o=e,a=t[e],u;for(u=e+1;u<=n;++u){const f=t[u%i];f.skip||f.stop?a.skip||(s=!1,l.push({start:e%i,end:(u-1)%i,loop:s}),e=o=f.stop?u:null):(o=u,a.skip&&(e=u)),a=f}return o!==null&&l.push({start:e%i,end:o%i,loop:s}),l}function K1(t,e){const n=t.points,s=t.options.spanGaps,i=n.length;if(!i)return[];const l=!!t._loop,{start:o,end:a}=Y1(n,i,l,s);if(s===!0)return hu(t,[{start:o,end:a,loop:l}],n,e);const u=a<o?a+i:a,f=!!t._fullLoop&&o===0&&a===i-1;return hu(t,J1(n,o,u,f),n,e)}function hu(t,e,n,s){return!s||!s.setContext||!n?e:Z1(t,e,n,s)}function Z1(t,e,n,s){const i=t._chart.getContext(),l=du(t.options),{_datasetIndex:o,options:{spanGaps:a}}=t,u=n.length,f=[];let h=l,p=e[0].start,g=p;function m(b,_,y,k){const w=a?-1:1;if(b!==_){for(b+=u;n[b%u].skip;)b-=w;for(;n[_%u].skip;)_+=w;b%u!==_%u&&(f.push({start:b%u,end:_%u,loop:y,style:k}),h=k,p=_%u)}}for(const b of e){p=a?p:b.start;let _=n[p%u],y;for(g=p+1;g<=b.end;g++){const k=n[g%u];y=du(s.setContext(xi(i,{type:"segment",p0:_,p1:k,p0DataIndex:(g-1)%u,p1DataIndex:g%u,datasetIndex:o}))),Q1(y,h)&&m(p,g-1,b.loop,h),_=k,h=y}p<g-1&&m(p,g-1,b.loop,h)}return f}function du(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Q1(t,e){if(!e)return!1;const n=[],s=function(i,l){return Qr(l)?(n.includes(l)||n.push(l),n.indexOf(l)):l};return JSON.stringify(t,s)!==JSON.stringify(e,s)}function Kl(t,e,n){return t.options.clip?t[n]:e[n]}function $1(t,e){const{xScale:n,yScale:s}=t;return n&&s?{left:Kl(n,e,"left"),right:Kl(n,e,"right"),top:Kl(s,e,"top"),bottom:Kl(s,e,"bottom")}:e}function eb(t,e){const n=e._clip;if(n.disabled)return!1;const s=$1(e,t.chartArea);return{left:n.left===!1?0:s.left-(n.left===!0?0:n.left),right:n.right===!1?t.width:s.right+(n.right===!0?0:n.right),top:n.top===!1?0:s.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?t.height:s.bottom+(n.bottom===!0?0:n.bottom)}}/*!
21271
+ */function ot(){}const Gs=(()=>{let i=0;return()=>i++})();function T(i){return i==null}function H(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function A(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function J(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function et(i,t){return J(i)?i:t}function P(i,t){return typeof i>"u"?t:i}const qs=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,us=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function E(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function R(i,t,e,s){let n,o,r;if(H(i))for(o=i.length,n=0;n<o;n++)t.call(e,i[n],n);else if(A(i))for(r=Object.keys(i),o=r.length,n=0;n<o;n++)t.call(e,i[r[n]],r[n])}function fe(i,t){let e,s,n,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,s=i.length;e<s;++e)if(n=i[e],o=t[e],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function ge(i){if(H(i))return i.map(ge);if(A(i)){const t=Object.create(null),e=Object.keys(i),s=e.length;let n=0;for(;n<s;++n)t[e[n]]=ge(i[e[n]]);return t}return i}function fs(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function Js(i,t,e,s){if(!fs(i))return;const n=t[i],o=e[i];A(n)&&A(o)?Ut(n,o,s):t[i]=ge(o)}function Ut(i,t,e){const s=H(t)?t:[t],n=s.length;if(!A(i))return i;e=e||{};const o=e.merger||Js;let r;for(let a=0;a<n;++a){if(r=s[a],!A(r))continue;const l=Object.keys(r);for(let c=0,h=l.length;c<h;++c)o(l[c],i,r,e)}return i}function Vt(i,t){return Ut(i,t,{merger:Qs})}function Qs(i,t,e){if(!fs(i))return;const s=t[i],n=e[i];A(s)&&A(n)?Vt(s,n):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=ge(n))}const ei={"":i=>i,x:i=>i.x,y:i=>i.y};function Zs(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function tn(i){const t=Zs(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function Mt(i,t){return(ei[t]||(ei[t]=tn(t)))(i)}function Ne(i){return i.charAt(0).toUpperCase()+i.slice(1)}const Xt=i=>typeof i<"u",ut=i=>typeof i=="function",ii=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function en(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const L=Math.PI,F=2*L,sn=F+L,pe=Number.POSITIVE_INFINITY,nn=L/180,N=L/2,pt=L/4,si=L*2/3,gs=Math.log10,nt=Math.sign;function jt(i,t,e){return Math.abs(i-t)<e}function ni(i){const t=Math.round(i);i=jt(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(gs(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function on(i){const t=[],e=Math.sqrt(i);let s;for(s=1;s<e;s++)i%s===0&&(t.push(s),t.push(i/s));return e===(e|0)&&t.push(e),t.sort((n,o)=>n-o).pop(),t}function rn(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function Kt(i){return!rn(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function an(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function ln(i,t,e){let s,n,o;for(s=0,n=i.length;s<n;s++)o=i[s][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function lt(i){return i*(L/180)}function cn(i){return i*(180/L)}function oi(i){if(!J(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function ps(i,t){const e=t.x-i.x,s=t.y-i.y,n=Math.sqrt(e*e+s*s);let o=Math.atan2(s,e);return o<-.5*L&&(o+=F),{angle:o,distance:n}}function Ee(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function hn(i,t){return(i-t+sn)%F-L}function tt(i){return(i%F+F)%F}function Gt(i,t,e,s){const n=tt(i),o=tt(t),r=tt(e),a=tt(o-n),l=tt(r-n),c=tt(n-o),h=tt(n-r);return n===o||n===r||s&&o===r||a>l&&c<h}function Y(i,t,e){return Math.max(t,Math.min(e,i))}function dn(i){return Y(i,-32768,32767)}function ht(i,t,e,s=1e-6){return i>=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function Ve(i,t,e){e=e||(r=>i[r]<t);let s=i.length-1,n=0,o;for(;s-n>1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const yt=(i,t,e,s)=>Ve(i,e,s?n=>{const o=i[n][t];return o<e||o===e&&i[n+1][t]===e}:n=>i[n][t]<e),un=(i,t,e)=>Ve(i,e,s=>i[s][t]>=e);function fn(i,t,e){let s=0,n=i.length;for(;s<n&&i[s]<t;)s++;for(;n>s&&i[n-1]>e;)n--;return s>0||n<i.length?i.slice(s,n):i}const ms=["push","pop","shift","splice","unshift"];function gn(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),ms.forEach(e=>{const s="_onData"+Ne(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const r=n.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function ri(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(ms.forEach(o=>{delete i[o]}),delete i._chartjs)}function bs(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const _s=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function xs(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,_s.call(window,()=>{s=!1,i.apply(t,e)}))}}function pn(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const je=i=>i==="start"?"left":i==="end"?"right":"center",$=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,mn=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function bn(i,t,e){const s=t.length;let n=0,o=s;if(i._sorted){const{iScale:r,vScale:a,_parsed:l}=i,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null,h=r.axis,{min:d,max:u,minDefined:f,maxDefined:p}=r.getUserBounds();if(f){if(n=Math.min(yt(l,h,d).lo,e?s:yt(t,h,r.getPixelForValue(d)).lo),c){const g=l.slice(0,n+1).reverse().findIndex(m=>!T(m[a.axis]));n-=Math.max(0,g)}n=Y(n,0,s-1)}if(p){let g=Math.max(yt(l,r.axis,u,!0).hi+1,e?0:yt(t,h,r.getPixelForValue(u),!0).hi+1);if(c){const m=l.slice(g-1).findIndex(b=>!T(b[a.axis]));g+=Math.max(0,m)}o=Y(g,n,s)-n}else o=s-n}return{start:n,count:o}}function _n(i){const{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;const o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}const te=i=>i===0||i===1,ai=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*F/e)),li=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*F/e)+1,$t={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*N)+1,easeOutSine:i=>Math.sin(i*N),easeInOutSine:i=>-.5*(Math.cos(L*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>te(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>te(i)?i:ai(i,.075,.3),easeOutElastic:i=>te(i)?i:li(i,.075,.3),easeInOutElastic(i){return te(i)?i:i<.5?.5*ai(i*2,.1125,.45):.5+.5*li(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-$t.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?$t.easeInBounce(i*2)*.5:$t.easeOutBounce(i*2-1)*.5+.5};function $e(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ci(i){return $e(i)?i:new ds(i)}function Se(i){return $e(i)?i:new ds(i).saturate(.5).darken(.1).hexString()}const xn=["x","y","borderWidth","radius","tension"],yn=["color","borderColor","backgroundColor"];function vn(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:yn},numbers:{type:"number",properties:xn}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Mn(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const hi=new Map;function kn(i,t){t=t||{};const e=i+JSON.stringify(t);let s=hi.get(e);return s||(s=new Intl.NumberFormat(i,t),hi.set(e,s)),s}function Ye(i,t,e){return kn(t,e).format(i)}const Sn={values(i){return H(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const s=this.chart.options.locale;let n,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=wn(i,e)}const r=gs(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Ye(i,s,l)}};function wn(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var ys={formatters:Sn};function Cn(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ys.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const kt=Object.create(null),ze=Object.create(null);function Yt(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;s<n;++s){const o=e[s];i=i[o]||(i[o]=Object.create(null))}return i}function we(i,t,e){return typeof t=="string"?Ut(Yt(i,t),e):Ut(Yt(i,""),t)}class Pn{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=s=>s.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>Se(n.backgroundColor),this.hoverBorderColor=(s,n)=>Se(n.borderColor),this.hoverColor=(s,n)=>Se(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return we(this,t,e)}get(t){return Yt(this,t)}describe(t,e){return we(ze,t,e)}override(t,e){return we(kt,t,e)}route(t,e,s,n){const o=Yt(this,t),r=Yt(this,s),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],c=r[n];return A(l)?Object.assign({},c,l):P(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}}var W=new Pn({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[vn,Mn,Cn]);function Dn(i){return!i||T(i.size)||T(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function di(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function mt(i,t,e){const s=i.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*s)/s+n}function ui(i,t){!t&&!i||(t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore())}function Fe(i,t,e,s){vs(i,t,e,s,null)}function vs(i,t,e,s,n){let o,r,a,l,c,h,d,u;const f=t.pointStyle,p=t.rotation,g=t.radius;let m=(p||0)*nn;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,s),i.rotate(m),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(g)||g<=0)){switch(i.beginPath(),f){default:n?i.ellipse(e,s,n/2,g,0,0,F):i.arc(e,s,g,0,F),i.closePath();break;case"triangle":h=n?n/2:g,i.moveTo(e+Math.sin(m)*h,s-Math.cos(m)*g),m+=si,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*g),m+=si,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*g),i.closePath();break;case"rectRounded":c=g*.516,l=g-c,r=Math.cos(m+pt)*l,d=Math.cos(m+pt)*(n?n/2-c:l),a=Math.sin(m+pt)*l,u=Math.sin(m+pt)*(n?n/2-c:l),i.arc(e-d,s-a,c,m-L,m-N),i.arc(e+u,s-r,c,m-N,m),i.arc(e+d,s+a,c,m,m+N),i.arc(e-u,s+r,c,m+N,m+L),i.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,h=n?n/2:l,i.rect(e-h,s-l,2*h,2*l);break}m+=pt;case"rectRot":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+u,s-r),i.lineTo(e+d,s+a),i.lineTo(e-u,s+r),i.closePath();break;case"crossRot":m+=pt;case"cross":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+u,s-r),i.lineTo(e-u,s+r);break;case"star":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+u,s-r),i.lineTo(e-u,s+r),m+=pt,d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+u,s-r),i.lineTo(e-u,s+r);break;case"line":r=n?n/2:Math.cos(m)*g,a=Math.sin(m)*g,i.moveTo(e-r,s-a),i.lineTo(e+r,s+a);break;case"dash":i.moveTo(e,s),i.lineTo(e+Math.cos(m)*(n?n/2:g),s+Math.sin(m)*g);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function qt(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function Ue(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function Xe(i){i.restore()}function On(i,t,e,s,n){if(!t)return i.lineTo(e.x,e.y);if(n==="middle"){const o=(t.x+e.x)/2;i.lineTo(o,t.y),i.lineTo(o,e.y)}else n==="after"!=!!s?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function An(i,t,e,s){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(s?t.cp1x:t.cp2x,s?t.cp1y:t.cp2y,s?e.cp2x:e.cp1x,s?e.cp2y:e.cp1y,e.x,e.y)}function Tn(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),T(t.rotation)||i.rotate(t.rotation),t.color&&(i.fillStyle=t.color),t.textAlign&&(i.textAlign=t.textAlign),t.textBaseline&&(i.textBaseline=t.textBaseline)}function Rn(i,t,e,s,n){if(n.strikethrough||n.underline){const o=i.measureText(s),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,h=n.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=n.decorationWidth||2,i.moveTo(r,h),i.lineTo(a,h),i.stroke()}}function Ln(i,t){const e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function Jt(i,t,e,s,n,o={}){const r=H(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,Tn(i,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&Ln(i,o.backdrop),a&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),T(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,s,o.maxWidth)),i.fillText(c,e,s,o.maxWidth),Rn(i,e,s,c,o),s+=Number(n.lineHeight);i.restore()}function me(i,t){const{x:e,y:s,w:n,h:o,radius:r}=t;i.arc(e+r.topLeft,s+r.topLeft,r.topLeft,1.5*L,L,!0),i.lineTo(e,s+o-r.bottomLeft),i.arc(e+r.bottomLeft,s+o-r.bottomLeft,r.bottomLeft,L,N,!0),i.lineTo(e+n-r.bottomRight,s+o),i.arc(e+n-r.bottomRight,s+o-r.bottomRight,r.bottomRight,N,0,!0),i.lineTo(e+n,s+r.topRight),i.arc(e+n-r.topRight,s+r.topRight,r.topRight,0,-N,!0),i.lineTo(e+r.topLeft,s)}const In=/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/,En=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function zn(i,t){const e=(""+i).match(In);if(!e||e[1]==="normal")return t*1.2;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100;break}return t*i}const Fn=i=>+i||0;function Ke(i,t){const e={},s=A(t),n=s?Object.keys(t):t,o=A(i)?s?r=>P(i[r],i[t[r]]):r=>i[r]:()=>i;for(const r of n)e[r]=Fn(o(r));return e}function Ms(i){return Ke(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Dt(i){return Ke(i,["topLeft","topRight","bottomLeft","bottomRight"])}function Q(i){const t=Ms(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function U(i,t){i=i||{},t=t||W.font;let e=P(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=P(i.style,t.style);s&&!(""+s).match(En)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:P(i.family,t.family),lineHeight:zn(P(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:P(i.weight,t.weight),string:""};return n.string=Dn(n),n}function ee(i,t,e,s){let n,o,r;for(n=0,o=i.length;n<o;++n)if(r=i[n],r!==void 0&&r!==void 0)return r}function Bn(i,t,e){const{min:s,max:n}=i,o=us(t,(n-s)/2),r=(a,l)=>e&&a===0?0:a+l;return{min:r(s,-Math.abs(o)),max:r(n,o)}}function St(i,t){return Object.assign(Object.create(i),t)}function Ge(i,t=[""],e,s,n=()=>i[0]){const o=e||i;typeof s>"u"&&(s=Cs("_fallback",i));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:a=>Ge([a,...i],t,o,s)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return Ss(a,l,()=>Un(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return gi(a).includes(l)},ownKeys(a){return gi(a)},set(a,l,c){const h=a._storage||(a._storage=n());return a[l]=h[l]=c,delete a._keys,!0}})}function At(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:ks(i,s),setContext:o=>At(i,o,e,s),override:o=>At(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return Ss(o,r,()=>Hn(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,a){return i[r]=a,delete o[r],!0}})}function ks(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:ut(e)?e:()=>e,isIndexable:ut(s)?s:()=>s}}const Wn=(i,t)=>i?i+Ne(t):t,qe=(i,t)=>A(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Ss(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];const s=e();return i[t]=s,s}function Hn(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:r}=i;let a=s[t];return ut(a)&&r.isScriptable(t)&&(a=Nn(t,a,i,e)),H(a)&&a.length&&(a=Vn(t,a,i,r.isIndexable)),qe(t,a)&&(a=At(a,n,o&&o[t],r)),a}function Nn(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(o,r||s);return a.delete(i),qe(i,l)&&(l=Je(n._scopes,n,i,l)),l}function Vn(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&s(i))return t[o.index%t.length];if(A(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=Je(c,n,i,h);t.push(At(d,o,r&&r[i],a))}}return t}function ws(i,t,e){return ut(i)?i(t,e):i}const jn=(i,t)=>i===!0?t:typeof i=="string"?Mt(t,i):void 0;function $n(i,t,e,s,n){for(const o of t){const r=jn(e,o);if(r){i.add(r);const a=ws(r._fallback,e,n);if(typeof a<"u"&&a!==e&&a!==s)return a}else if(r===!1&&typeof s<"u"&&e!==s)return null}return!1}function Je(i,t,e,s){const n=t._rootScopes,o=ws(t._fallback,e,s),r=[...i,...n],a=new Set;a.add(s);let l=fi(a,r,e,o||e,s);return l===null||typeof o<"u"&&o!==e&&(l=fi(a,r,o,l,s),l===null)?!1:Ge(Array.from(a),[""],n,o,()=>Yn(t,e,s))}function fi(i,t,e,s,n){for(;e;)e=$n(i,t,e,s,n);return e}function Yn(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return H(n)&&A(e)?e:n||{}}function Un(i,t,e,s){let n;for(const o of t)if(n=Cs(Wn(o,i),e),typeof n<"u")return qe(i,n)?Je(e,s,i,n):n}function Cs(i,t){for(const e of t){if(!e)continue;const s=e[i];if(typeof s<"u")return s}}function gi(i){let t=i._keys;return t||(t=i._keys=Xn(i._scopes)),t}function Xn(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}const Kn=Number.EPSILON||1e-14,Tt=(i,t)=>t<i.length&&!i[t].skip&&i[t],Ps=i=>i==="x"?"y":"x";function Gn(i,t,e,s){const n=i.skip?t:i,o=t,r=e.skip?t:e,a=Ee(o,n),l=Ee(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=s*c,u=s*h;return{previous:{x:o.x-d*(r.x-n.x),y:o.y-d*(r.y-n.y)},next:{x:o.x+u*(r.x-n.x),y:o.y+u*(r.y-n.y)}}}function qn(i,t,e){const s=i.length;let n,o,r,a,l,c=Tt(i,0);for(let h=0;h<s-1;++h)if(l=c,c=Tt(i,h+1),!(!l||!c)){if(jt(t[h],0,Kn)){e[h]=e[h+1]=0;continue}n=e[h]/t[h],o=e[h+1]/t[h],a=Math.pow(n,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),e[h]=n*r*t[h],e[h+1]=o*r*t[h])}}function Jn(i,t,e="x"){const s=Ps(e),n=i.length;let o,r,a,l=Tt(i,0);for(let c=0;c<n;++c){if(r=a,a=l,l=Tt(i,c+1),!a)continue;const h=a[e],d=a[s];r&&(o=(h-r[e])/3,a[\`cp1\${e}\`]=h-o,a[\`cp1\${s}\`]=d-o*t[c]),l&&(o=(l[e]-h)/3,a[\`cp2\${e}\`]=h+o,a[\`cp2\${s}\`]=d+o*t[c])}}function Qn(i,t="x"){const e=Ps(t),s=i.length,n=Array(s).fill(0),o=Array(s);let r,a,l,c=Tt(i,0);for(r=0;r<s;++r)if(a=l,l=c,c=Tt(i,r+1),!!l){if(c){const h=c[t]-l[t];n[r]=h!==0?(c[e]-l[e])/h:0}o[r]=a?c?nt(n[r-1])!==nt(n[r])?0:(n[r-1]+n[r])/2:n[r-1]:n[r]}qn(i,n,o),Jn(i,o,t)}function ie(i,t,e){return Math.max(Math.min(i,e),t)}function Zn(i,t){let e,s,n,o,r,a=qt(i[0],t);for(e=0,s=i.length;e<s;++e)r=o,o=a,a=e<s-1&&qt(i[e+1],t),o&&(n=i[e],r&&(n.cp1x=ie(n.cp1x,t.left,t.right),n.cp1y=ie(n.cp1y,t.top,t.bottom)),a&&(n.cp2x=ie(n.cp2x,t.left,t.right),n.cp2y=ie(n.cp2y,t.top,t.bottom)))}function to(i,t,e,s,n){let o,r,a,l;if(t.spanGaps&&(i=i.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")Qn(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,r=i.length;o<r;++o)a=i[o],l=Gn(c,a,i[Math.min(o+1,r-(s?0:1))%r],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&Zn(i,e)}function Qe(){return typeof window<"u"&&typeof document<"u"}function Ze(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function be(i,t,e){let s;return typeof i=="string"?(s=parseInt(i,10),i.indexOf("%")!==-1&&(s=s/100*t.parentNode[e])):s=i,s}const ye=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function eo(i,t){return ye(i).getPropertyValue(t)}const io=["top","right","bottom","left"];function vt(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=io[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const so=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function no(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let r=!1,a,l;if(so(n,o,i.target))a=n,l=o;else{const c=t.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function _t(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=ye(e),o=n.boxSizing==="border-box",r=vt(n,"padding"),a=vt(n,"border","width"),{x:l,y:c,box:h}=no(i,e),d=r.left+(h&&a.left),u=r.top+(h&&a.top);let{width:f,height:p}=t;return o&&(f-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-d)/f*e.width/s),y:Math.round((c-u)/p*e.height/s)}}function oo(i,t,e){let s,n;if(t===void 0||e===void 0){const o=i&&Ze(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const r=o.getBoundingClientRect(),a=ye(o),l=vt(a,"border","width"),c=vt(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,s=be(a.maxWidth,o,"clientWidth"),n=be(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||pe,maxHeight:n||pe}}const se=i=>Math.round(i*10)/10;function ro(i,t,e,s){const n=ye(i),o=vt(n,"margin"),r=be(n.maxWidth,i,"clientWidth")||pe,a=be(n.maxHeight,i,"clientHeight")||pe,l=oo(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const u=vt(n,"border","width"),f=vt(n,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=se(Math.min(c,r,l.maxWidth)),h=se(Math.min(h,a,l.maxHeight)),c&&!h&&(h=se(c/2)),(t!==void 0||e!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=se(Math.floor(h*s))),{width:c,height:h}}function pi(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const r=i.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=\`\${i.height}px\`,r.style.width=\`\${i.width}px\`),i.currentDevicePixelRatio!==s||r.height!==n||r.width!==o?(i.currentDevicePixelRatio=s,r.height=n,r.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const ao=(function(){let i=!1;try{const t={get passive(){return i=!0,!1}};Qe()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i})();function mi(i,t){const e=eo(i,t),s=e&&e.match(/^(\\d+)(\\.\\d+)?px$/);return s?+s[1]:void 0}function xt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function lo(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function co(i,t,e,s){const n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},r=xt(i,n,e),a=xt(n,o,e),l=xt(o,t,e),c=xt(r,a,e),h=xt(a,l,e);return xt(c,h,e)}const ho=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},uo=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function Ot(i,t,e){return i?ho(t,e):uo()}function Ds(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function Os(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function As(i){return i==="angle"?{between:Gt,compare:hn,normalize:tt}:{between:ht,compare:(t,e)=>t-e,normalize:t=>t}}function bi({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function fo(i,t,e){const{property:s,start:n,end:o}=e,{between:r,normalize:a}=As(s),l=t.length;let{start:c,end:h,loop:d}=i,u,f;if(d){for(c+=l,h+=l,u=0,f=l;u<f&&r(a(t[c%l][s]),n,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:i.style}}function go(i,t,e){if(!e)return[i];const{property:s,start:n,end:o}=e,r=t.length,{compare:a,between:l,normalize:c}=As(s),{start:h,end:d,loop:u,style:f}=fo(i,t,e),p=[];let g=!1,m=null,b,_,y;const v=()=>l(n,y,b)&&a(n,y)!==0,x=()=>a(o,b)===0||l(o,y,b),k=()=>g||v(),S=()=>!g||x();for(let M=h,w=h;M<=d;++M)_=t[M%r],!_.skip&&(b=c(_[s]),b!==y&&(g=l(b,n,o),m===null&&k()&&(m=a(b,n)===0?M:w),m!==null&&S()&&(p.push(bi({start:m,end:M,loop:u,count:r,style:f})),m=null),w=M,y=b));return m!==null&&p.push(bi({start:m,end:d,loop:u,count:r,style:f})),p}function po(i,t){const e=[],s=i.segments;for(let n=0;n<s.length;n++){const o=go(s[n],i.points,t);o.length&&e.push(...o)}return e}function mo(i,t,e,s){let n=0,o=t-1;if(e&&!s)for(;n<t&&!i[n].skip;)n++;for(;n<t&&i[n].skip;)n++;for(n%=t,e&&(o+=n);o>n&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function bo(i,t,e,s){const n=i.length,o=[];let r=t,a=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%n];c.skip||c.stop?a.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%n,end:r%n,loop:s}),o}function _o(i,t){const e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];const o=!!i._loop,{start:r,end:a}=mo(e,n,o,s);if(s===!0)return _i(i,[{start:r,end:a,loop:o}],e,t);const l=a<r?a+n:a,c=!!i._fullLoop&&r===0&&a===n-1;return _i(i,bo(e,r,l,c),e,t)}function _i(i,t,e,s){return!s||!s.setContext||!e?t:xo(i,t,e,s)}function xo(i,t,e,s){const n=i._chart.getContext(),o=xi(i.options),{_datasetIndex:r,options:{spanGaps:a}}=i,l=e.length,c=[];let h=o,d=t[0].start,u=d;function f(p,g,m,b){const _=a?-1:1;if(p!==g){for(p+=l;e[p%l].skip;)p-=_;for(;e[g%l].skip;)g+=_;p%l!==g%l&&(c.push({start:p%l,end:g%l,loop:m,style:b}),h=b,d=g%l)}}for(const p of t){d=a?d:p.start;let g=e[d%l],m;for(u=d+1;u<=p.end;u++){const b=e[u%l];m=xi(s.setContext(St(n,{type:"segment",p0:g,p1:b,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),yo(m,h)&&f(d,u-1,p.loop,h),g=b,h=m}d<u-1&&f(d,u-1,p.loop,h)}return c}function xi(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function yo(i,t){if(!t)return!1;const e=[],s=function(n,o){return $e(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(i,s)!==JSON.stringify(t,s)}function ne(i,t,e){return i.options.clip?i[e]:t[e]}function vo(i,t){const{xScale:e,yScale:s}=i;return e&&s?{left:ne(e,t,"left"),right:ne(e,t,"right"),top:ne(s,t,"top"),bottom:ne(s,t,"bottom")}:t}function Mo(i,t){const e=t._clip;if(e.disabled)return!1;const s=vo(t,i.chartArea);return{left:e.left===!1?0:s.left-(e.left===!0?0:e.left),right:e.right===!1?i.width:s.right+(e.right===!0?0:e.right),top:e.top===!1?0:s.top-(e.top===!0?0:e.top),bottom:e.bottom===!1?i.height:s.bottom+(e.bottom===!0?0:e.bottom)}}/*!
21208
21272
  * Chart.js v4.5.0
21209
21273
  * https://www.chartjs.org
21210
21274
  * (c) 2025 Chart.js Contributors
21211
21275
  * Released under the MIT License
21212
- */class tb{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,s,i){const l=n.listeners[i],o=n.duration;l.forEach(a=>a({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(s-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Xd.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((s,i)=>{if(!s.running||!s.items.length)return;const l=s.items;let o=l.length-1,a=!1,u;for(;o>=0;--o)u=l[o],u._active?(u._total>s.duration&&(s.duration=u._total),u.tick(e),a=!0):(l[o]=l[l.length-1],l.pop());a&&(i.draw(),this._notify(i,s,e,"progress")),l.length||(s.running=!1,this._notify(i,s,e,"complete"),s.initial=!1),n+=l.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let s=n.get(e);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,s)),s}listen(e,n,s){this._getAnims(e).listeners[n].push(s)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((s,i)=>Math.max(s,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const s=n.items;let i=s.length-1;for(;i>=0;--i)s[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Vs=new tb;const pu="transparent",nb={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const s=su(t||pu),i=s.valid&&su(e||pu);return i&&i.valid?i.mix(s,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class sb{constructor(e,n,s,i){const l=n[s];i=Xl([e.to,i,l,e.from]);const o=Xl([e.from,l,i]);this._active=!0,this._fn=e.fn||nb[e.type||typeof o],this._easing=bl[e.easing]||bl.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=s,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,s){if(this._active){this._notify(!1);const i=this._target[this._prop],l=s-this._start,o=this._duration-l;this._start=s,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Xl([e.to,n,i,e.from]),this._from=Xl([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,s=this._duration,i=this._prop,l=this._from,o=this._loop,a=this._to;let u;if(this._active=l!==a&&(o||n<s),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=l;return}u=n/s%2,u=o&&u>1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[i]=this._fn(l,a,u)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,s)=>{e.push({res:n,rej:s})})}_notify(e){const n=e?"res":"rej",s=this._promises||[];for(let i=0;i<s.length;i++)s[i][n]()}}class op{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!Ot(e))return;const n=Object.keys(En.animation),s=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const l=e[i];if(!Ot(l))return;const o={};for(const a of n)o[a]=l[a];(xn(l.properties)&&l.properties||[i]).forEach(a=>{(a===i||!s.has(a))&&s.set(a,o)})})}_animateOptions(e,n){const s=n.options,i=lb(e,s);if(!i)return[];const l=this._createAnimations(i,s);return s.$shared&&ib(e.options.$animations,s).then(()=>{e.options=s},()=>{}),l}_createAnimations(e,n){const s=this._properties,i=[],l=e.$animations||(e.$animations={}),o=Object.keys(n),a=Date.now();let u;for(u=o.length-1;u>=0;--u){const f=o[u];if(f.charAt(0)==="$")continue;if(f==="options"){i.push(...this._animateOptions(e,n));continue}const h=n[f];let p=l[f];const g=s.get(f);if(p)if(g&&p.active()){p.update(g,h,a);continue}else p.cancel();if(!g||!g.duration){e[f]=h;continue}l[f]=p=new sb(g,e,f,h),i.push(p)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const s=this._createAnimations(e,n);if(s.length)return Vs.add(this._chart,s),!0}}function ib(t,e){const n=[],s=Object.keys(e);for(let i=0;i<s.length;i++){const l=t[s[i]];l&&l.active()&&n.push(l.wait())}return Promise.all(n)}function lb(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function gu(t,e){const n=t&&t.options||{},s=n.reverse,i=n.min===void 0?e:0,l=n.max===void 0?e:0;return{start:s?l:i,end:s?i:l}}function ob(t,e,n){if(n===!1)return!1;const s=gu(t,n),i=gu(e,n);return{top:i.end,right:s.end,bottom:i.start,left:s.start}}function rb(t){let e,n,s,i;return Ot(t)?(e=t.top,n=t.right,s=t.bottom,i=t.left):e=n=s=i=t,{top:e,right:n,bottom:s,left:i,disabled:t===!1}}function rp(t,e){const n=[],s=t._getSortedDatasetMetas(e);let i,l;for(i=0,l=s.length;i<l;++i)n.push(s[i].index);return n}function mu(t,e,n,s={}){const i=t.keys,l=s.mode==="single";let o,a,u,f;if(e===null)return;let h=!1;for(o=0,a=i.length;o<a;++o){if(u=+i[o],u===n){if(h=!0,s.all)continue;break}f=t.values[u],Es(f)&&(l||e===0||Bs(e)===Bs(f))&&(e+=f)}return!h&&!s.all?0:e}function ab(t,e){const{iScale:n,vScale:s}=e,i=n.axis==="x"?"x":"y",l=s.axis==="x"?"x":"y",o=Object.keys(t),a=new Array(o.length);let u,f,h;for(u=0,f=o.length;u<f;++u)h=o[u],a[u]={[i]:h,[l]:t[h]};return a}function $o(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function ub(t,e,n){return\`\${t.id}.\${e.id}.\${n.stack||n.type}\`}function cb(t){const{min:e,max:n,minDefined:s,maxDefined:i}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function fb(t,e,n){const s=t[e]||(t[e]={});return s[n]||(s[n]={})}function bu(t,e,n,s){for(const i of e.getMatchingVisibleMetas(s).reverse()){const l=t[i.index];if(n&&l>0||!n&&l<0)return i.index}return null}function _u(t,e){const{chart:n,_cachedMeta:s}=t,i=n._stacks||(n._stacks={}),{iScale:l,vScale:o,index:a}=s,u=l.axis,f=o.axis,h=ub(l,o,s),p=e.length;let g;for(let m=0;m<p;++m){const b=e[m],{[u]:_,[f]:y}=b,k=b._stacks||(b._stacks={});g=k[f]=fb(i,h,_),g[a]=y,g._top=bu(g,o,!0,s.type),g._bottom=bu(g,o,!1,s.type);const w=g._visualValues||(g._visualValues={});w[a]=y}}function er(t,e){const n=t.scales;return Object.keys(n).filter(s=>n[s].axis===e).shift()}function hb(t,e){return xi(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function db(t,e,n){return xi(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function el(t,e){const n=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const i of e){const l=i._stacks;if(!l||l[s]===void 0||l[s][n]===void 0)return;delete l[s][n],l[s]._visualValues!==void 0&&l[s]._visualValues[n]!==void 0&&delete l[s]._visualValues[n]}}}const tr=t=>t==="reset"||t==="none",vu=(t,e)=>e?t:Object.assign({},t),pb=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:rp(n,!0),values:null};class Ro{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=$o(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&el(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,s=this.getDataset(),i=(p,g,m,b)=>p==="x"?g:p==="r"?b:m,l=n.xAxisID=bt(s.xAxisID,er(e,"x")),o=n.yAxisID=bt(s.yAxisID,er(e,"y")),a=n.rAxisID=bt(s.rAxisID,er(e,"r")),u=n.indexAxis,f=n.iAxisID=i(u,l,o,a),h=n.vAxisID=i(u,o,l,a);n.xScale=this.getScaleForId(l),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(f),n.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&eu(this._data,this),e._stacked&&el(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),s=this._data;if(Ot(n)){const i=this._cachedMeta;this._data=ab(n,i)}else if(s!==n){if(s){eu(s,this);const i=this._cachedMeta;el(i),i._parsed=[]}n&&Object.isExtensible(n)&&Xm(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,s=this.getDataset();let i=!1;this._dataCheck();const l=n._stacked;n._stacked=$o(n.vScale,n),n.stack!==s.stack&&(i=!0,el(n),n.stack=s.stack),this._resyncElements(e),(i||l!==n._stacked)&&(_u(this,n._parsed),n._stacked=$o(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),s=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:s,_data:i}=this,{iScale:l,_stacked:o}=s,a=l.axis;let u=e===0&&n===i.length?!0:s._sorted,f=e>0&&s._parsed[e-1],h,p,g;if(this._parsing===!1)s._parsed=i,s._sorted=!0,g=i;else{xn(i[e])?g=this.parseArrayData(s,i,e,n):Ot(i[e])?g=this.parseObjectData(s,i,e,n):g=this.parsePrimitiveData(s,i,e,n);const m=()=>p[a]===null||f&&p[a]<f[a];for(h=0;h<n;++h)s._parsed[h+e]=p=g[h],u&&(m()&&(u=!1),f=p);s._sorted=u}o&&_u(this,g)}parsePrimitiveData(e,n,s,i){const{iScale:l,vScale:o}=e,a=l.axis,u=o.axis,f=l.getLabels(),h=l===o,p=new Array(i);let g,m,b;for(g=0,m=i;g<m;++g)b=g+s,p[g]={[a]:h||l.parse(f[b],b),[u]:o.parse(n[b],b)};return p}parseArrayData(e,n,s,i){const{xScale:l,yScale:o}=e,a=new Array(i);let u,f,h,p;for(u=0,f=i;u<f;++u)h=u+s,p=n[h],a[u]={x:l.parse(p[0],h),y:o.parse(p[1],h)};return a}parseObjectData(e,n,s,i){const{xScale:l,yScale:o}=e,{xAxisKey:a="x",yAxisKey:u="y"}=this._parsing,f=new Array(i);let h,p,g,m;for(h=0,p=i;h<p;++h)g=h+s,m=n[g],f[h]={x:l.parse(Mi(m,a),g),y:o.parse(Mi(m,u),g)};return f}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,s){const i=this.chart,l=this._cachedMeta,o=n[e.axis],a={keys:rp(i,!0),values:n._stacks[e.axis]._visualValues};return mu(a,o,l.index,{mode:s})}updateRangeFromParsed(e,n,s,i){const l=s[n.axis];let o=l===null?NaN:l;const a=i&&s._stacks[n.axis];i&&a&&(i.values=a,o=mu(i,l,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,n){const s=this._cachedMeta,i=s._parsed,l=s._sorted&&e===s.iScale,o=i.length,a=this._getOtherScale(e),u=pb(n,s,this.chart),f={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:p}=cb(a);let g,m;function b(){m=i[g];const _=m[a.axis];return!Es(m[e.axis])||h>_||p<_}for(g=0;g<o&&!(!b()&&(this.updateRangeFromParsed(f,e,m,u),l));++g);if(l){for(g=o-1;g>=0;--g)if(!b()){this.updateRangeFromParsed(f,e,m,u);break}}return f}getAllParsedValues(e){const n=this._cachedMeta._parsed,s=[];let i,l,o;for(i=0,l=n.length;i<l;++i)o=n[i][e.axis],Es(o)&&s.push(o);return s}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,s=n.iScale,i=n.vScale,l=this.getParsed(e);return{label:s?""+s.getLabelForValue(l[s.axis]):"",value:i?""+i.getLabelForValue(l[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=rb(bt(this.options.clip,ob(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,s=this._cachedMeta,i=s.data||[],l=n.chartArea,o=[],a=this._drawStart||0,u=this._drawCount||i.length-a,f=this.options.drawActiveElementsOnTop;let h;for(s.dataset&&s.dataset.draw(e,l,a,u),h=a;h<a+u;++h){const p=i[h];p.hidden||(p.active&&f?o.push(p):p.draw(e,l))}for(h=0;h<o.length;++h)o[h].draw(e,l)}getStyle(e,n){const s=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(e||0,s)}getContext(e,n,s){const i=this.getDataset();let l;if(e>=0&&e<this._cachedMeta.data.length){const o=this._cachedMeta.data[e];l=o.$context||(o.$context=db(this.getContext(),e,o)),l.parsed=this.getParsed(e),l.raw=i.data[e],l.index=l.dataIndex=e}else l=this.$context||(this.$context=hb(this.chart.getContext(),this.index)),l.dataset=i,l.index=l.datasetIndex=this.index;return l.active=!!n,l.mode=s,l}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",s){const i=n==="active",l=this._cachedDataOpts,o=e+"-"+n,a=l[o],u=this.enableOptionSharing&&El(s);if(a)return vu(a,u);const f=this.chart.config,h=f.datasetElementScopeKeys(this._type,e),p=i?[\`\${e}Hover\`,"hover",e,""]:[e,""],g=f.getOptionScopes(this.getDataset(),h),m=Object.keys(En.elements[e]),b=()=>this.getContext(s,i,n),_=f.resolveNamedOptions(g,m,b,p);return _.$shared&&(_.$shared=u,l[o]=Object.freeze(vu(_,u))),_}_resolveAnimations(e,n,s){const i=this.chart,l=this._cachedDataOpts,o=\`animation-\${n}\`,a=l[o];if(a)return a;let u;if(i.options.animation!==!1){const h=this.chart.config,p=h.datasetAnimationScopeKeys(this._type,n),g=h.getOptionScopes(this.getDataset(),p);u=h.createResolver(g,this.getContext(e,s,n))}const f=new op(i,u&&u.animations);return u&&u._cacheable&&(l[o]=Object.freeze(f)),f}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||tr(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const s=this.resolveDataElementOptions(e,n),i=this._sharedOptions,l=this.getSharedOptions(s),o=this.includeOptions(n,l)||l!==i;return this.updateSharedOptions(l,n,s),{sharedOptions:l,includeOptions:o}}updateElement(e,n,s,i){tr(i)?Object.assign(e,s):this._resolveAnimations(n,i).update(e,s)}updateSharedOptions(e,n,s){e&&!tr(n)&&this._resolveAnimations(void 0,n).update(e,s)}_setStyle(e,n,s,i){e.active=i;const l=this.getStyle(n,i);this._resolveAnimations(n,s,i).update(e,{options:!i&&this.getSharedOptions(l)||l})}removeHoverStyle(e,n,s){this._setStyle(e,s,"active",!1)}setHoverStyle(e,n,s){this._setStyle(e,s,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,s=this._cachedMeta.data;for(const[a,u,f]of this._syncList)this[a](u,f);this._syncList=[];const i=s.length,l=n.length,o=Math.min(l,i);o&&this.parse(0,o),l>i?this._insertElements(i,l-i,e):l<i&&this._removeElements(l,i-l)}_insertElements(e,n,s=!0){const i=this._cachedMeta,l=i.data,o=e+n;let a;const u=f=>{for(f.length+=n,a=f.length-1;a>=o;a--)f[a]=f[a-n]};for(u(l),a=e;a<o;++a)l[a]=new this.dataElementType;this._parsing&&u(i._parsed),this.parse(e,n),s&&this.updateElements(l,e,n,"reset")}updateElements(e,n,s,i){}_removeElements(e,n){const s=this._cachedMeta;if(this._parsing){const i=s._parsed.splice(e,n);s._stacked&&el(s,i)}s.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,s,i]=e;this[n](s,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const s=arguments.length-2;s&&this._sync(["_insertElements",e,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function gb(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let s=[];for(let i=0,l=n.length;i<l;i++)s=s.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=Gd(s.sort((i,l)=>i-l))}return t._cache.$bar}function mb(t){const e=t.iScale,n=gb(e,t.type);let s=e._length,i,l,o,a;const u=()=>{o===32767||o===-32768||(El(a)&&(s=Math.min(s,Math.abs(o-a)||s)),a=o)};for(i=0,l=n.length;i<l;++i)o=e.getPixelForValue(n[i]),u();for(a=void 0,i=0,l=e.ticks.length;i<l;++i)o=e.getPixelForTick(i),u();return s}function bb(t,e,n,s){const i=n.barThickness;let l,o;return Ft(i)?(l=e.min*n.categoryPercentage,o=n.barPercentage):(l=i*s,o=1),{chunk:l/s,ratio:o,start:e.pixels[t]-l/2}}function _b(t,e,n,s){const i=e.pixels,l=i[t];let o=t>0?i[t-1]:null,a=t<i.length-1?i[t+1]:null;const u=n.categoryPercentage;o===null&&(o=l-(a===null?e.end-e.start:a-l)),a===null&&(a=l+l-o);const f=l-(l-Math.min(o,a))/2*u;return{chunk:Math.abs(a-o)/2*u/s,ratio:n.barPercentage,start:f}}function vb(t,e,n,s){const i=n.parse(t[0],s),l=n.parse(t[1],s),o=Math.min(i,l),a=Math.max(i,l);let u=o,f=a;Math.abs(o)>Math.abs(a)&&(u=a,f=o),e[n.axis]=f,e._custom={barStart:u,barEnd:f,start:i,end:l,min:o,max:a}}function ap(t,e,n,s){return xn(t)?vb(t,e,n,s):e[n.axis]=n.parse(t,s),e}function yu(t,e,n,s){const i=t.iScale,l=t.vScale,o=i.getLabels(),a=i===l,u=[];let f,h,p,g;for(f=n,h=n+s;f<h;++f)g=e[f],p={},p[i.axis]=a||i.parse(o[f],f),u.push(ap(g,p,l,f));return u}function nr(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function yb(t,e,n){return t!==0?Bs(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function wb(t){let e,n,s,i,l;return t.horizontal?(e=t.base>t.x,n="left",s="right"):(e=t.base<t.y,n="bottom",s="top"),e?(i="end",l="start"):(i="start",l="end"),{start:n,end:s,reverse:e,top:i,bottom:l}}function kb(t,e,n,s){let i=e.borderSkipped;const l={};if(!i){t.borderSkipped=l;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:a,reverse:u,top:f,bottom:h}=wb(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===s?i=f:(n._bottom||0)===s?i=h:(l[wu(h,o,a,u)]=!0,i=f)),l[wu(i,o,a,u)]=!0,t.borderSkipped=l}function wu(t,e,n,s){return s?(t=Sb(t,e,n),t=ku(t,n,e)):t=ku(t,e,n),t}function Sb(t,e,n){return t===e?n:t===n?e:t}function ku(t,e,n){return t==="start"?e:t==="end"?n:t}function Eb(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class Tb extends Ro{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,n,s,i){return yu(e,n,s,i)}parseArrayData(e,n,s,i){return yu(e,n,s,i)}parseObjectData(e,n,s,i){const{iScale:l,vScale:o}=e,{xAxisKey:a="x",yAxisKey:u="y"}=this._parsing,f=l.axis==="x"?a:u,h=o.axis==="x"?a:u,p=[];let g,m,b,_;for(g=s,m=s+i;g<m;++g)_=n[g],b={},b[l.axis]=l.parse(Mi(_,f),g),p.push(ap(Mi(_,h),b,o,g));return p}updateRangeFromParsed(e,n,s,i){super.updateRangeFromParsed(e,n,s,i);const l=s._custom;l&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,l.min),e.max=Math.max(e.max,l.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:s,vScale:i}=n,l=this.getParsed(e),o=l._custom,a=nr(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(l[i.axis]);return{label:""+s.getLabelForValue(l[s.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,s,i){const l=i==="reset",{index:o,_cachedMeta:{vScale:a}}=this,u=a.getBasePixel(),f=a.isHorizontal(),h=this._getRuler(),{sharedOptions:p,includeOptions:g}=this._getSharedOptions(n,i);for(let m=n;m<n+s;m++){const b=this.getParsed(m),_=l||Ft(b[a.axis])?{base:u,head:u}:this._calculateBarValuePixels(m),y=this._calculateBarIndexPixels(m,h),k=(b._stacks||{})[a.axis],w={horizontal:f,base:_.base,enableBorderRadius:!k||nr(b._custom)||o===k._top||o===k._bottom,x:f?_.head:y.center,y:f?y.center:_.head,height:f?y.size:Math.abs(_.size),width:f?Math.abs(_.size):y.size};g&&(w.options=p||this.resolveDataElementOptions(m,e[m].active?"active":i));const S=w.options||e[m].options;kb(w,S,k,o),Eb(w,S,h.ratio),this.updateElement(e[m],m,w,i)}}_getStacks(e,n){const{iScale:s}=this._cachedMeta,i=s.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),l=s.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),u=a&&a[s.axis],f=h=>{const p=h._parsed.find(m=>m[s.axis]===u),g=p&&p[h.vScale.axis];if(Ft(g)||isNaN(g))return!0};for(const h of i)if(!(n!==void 0&&f(h))&&((l===!1||o.indexOf(h.stack)===-1||l===void 0&&h.stack===void 0)&&o.push(h.stack),h.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(e).filter(s=>e[s].axis===n).shift()}_getAxis(){const e={},n=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)e[bt(this.chart.options.indexAxis==="x"?s.xAxisID:s.yAxisID,n)]=!0;return Object.keys(e)}_getStackIndex(e,n,s){const i=this._getStacks(e,s),l=n!==void 0?i.indexOf(n):-1;return l===-1?i.length-1:l}_getRuler(){const e=this.options,n=this._cachedMeta,s=n.iScale,i=[];let l,o;for(l=0,o=n.data.length;l<o;++l)i.push(s.getPixelForValue(this.getParsed(l)[s.axis],l));const a=e.barThickness;return{min:a||mb(n),pixels:i,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:s,index:i},options:{base:l,minBarLength:o}}=this,a=l||0,u=this.getParsed(e),f=u._custom,h=nr(f);let p=u[n.axis],g=0,m=s?this.applyStack(n,u,s):p,b,_;m!==p&&(g=m-p,m=p),h&&(p=f.barStart,m=f.barEnd-f.barStart,p!==0&&Bs(p)!==Bs(f.barEnd)&&(g=0),g+=p);const y=!Ft(l)&&!h?l:g;let k=n.getPixelForValue(y);if(this.chart.getDataVisibility(e)?b=n.getPixelForValue(g+m):b=k,_=b-k,Math.abs(_)<o){_=yb(_,n,a)*o,p===a&&(k-=_/2);const w=n.getPixelForDecimal(0),S=n.getPixelForDecimal(1),P=Math.min(w,S),M=Math.max(w,S);k=Math.max(Math.min(k,M),P),b=k+_,s&&!h&&(u._stacks[n.axis]._visualValues[i]=n.getValueForPixel(b)-n.getValueForPixel(k))}if(k===n.getPixelForValue(a)){const w=Bs(_)*n.getLineWidthForValue(a)/2;k+=w,_-=w}return{size:_,base:k,head:b,center:b+_/2}}_calculateBarIndexPixels(e,n){const s=n.scale,i=this.options,l=i.skipNull,o=bt(i.maxBarThickness,1/0);let a,u;const f=this._getAxisCount();if(n.grouped){const h=l?this._getStackCount(e):n.stackCount,p=i.barThickness==="flex"?_b(e,n,i,h*f):bb(e,n,i,h*f),g=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,m=this._getAxis().indexOf(bt(g,this.getFirstScaleIdForIndexAxis())),b=this._getStackIndex(this.index,this._cachedMeta.stack,l?e:void 0)+m;a=p.start+p.chunk*b+p.chunk/2,u=Math.min(o,p.chunk*p.ratio)}else a=s.getPixelForValue(this.getParsed(e)[s.axis],e),u=Math.min(o,n.min*n.ratio);return{base:a-u/2,head:a+u/2,center:a,size:u}}draw(){const e=this._cachedMeta,n=e.vScale,s=e.data,i=s.length;let l=0;for(;l<i;++l)this.getParsed(l)[n.axis]!==null&&!s[l].hidden&&s[l].draw(this._ctx)}}function Mb(t,e,n){let s=1,i=1,l=0,o=0;if(e<kn){const a=t,u=a+e,f=Math.cos(a),h=Math.sin(a),p=Math.cos(u),g=Math.sin(u),m=(S,P,M)=>Ml(S,a,u,!0)?1:Math.max(P,P*n,M,M*n),b=(S,P,M)=>Ml(S,a,u,!0)?-1:Math.min(P,P*n,M,M*n),_=m(0,f,p),y=m(On,h,g),k=b(Wt,f,p),w=b(Wt+On,h,g);s=(_-k)/2,i=(y-w)/2,l=-(_+k)/2,o=-(y+w)/2}return{ratioX:s,ratioY:i,offsetX:l,offsetY:o}}class Cb extends Ro{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:s,color:i}}=e.legend.options;return n.labels.map((l,o)=>{const u=e.getDatasetMeta(0).controller.getStyle(o);return{text:l,fillStyle:u.backgroundColor,strokeStyle:u.borderColor,fontColor:i,lineWidth:u.borderWidth,pointStyle:s,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}}};constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const s=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=s;else{let l=u=>+s[u];if(Ot(s[e])){const{key:u="value"}=this._parsing;l=f=>+Mi(s[f],u)}let o,a;for(o=e,a=e+n;o<a;++o)i._parsed[o]=l(o)}}_getRotation(){return Gs(this.options.rotation-90)}_getCircumference(){return Gs(this.options.circumference)}_getRotationExtents(){let e=kn,n=-kn;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const i=this.chart.getDatasetMeta(s).controller,l=i._getRotation(),o=i._getCircumference();e=Math.min(e,l),n=Math.max(n,l+o)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:s}=n,i=this._cachedMeta,l=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(l)+this.options.spacing,a=Math.max((Math.min(s.width,s.height)-o)/2,0),u=Math.min(xm(this.options.cutout,a),1),f=this._getRingWeight(this.index),{circumference:h,rotation:p}=this._getRotationExtents(),{ratioX:g,ratioY:m,offsetX:b,offsetY:_}=Mb(p,h,u),y=(s.width-o)/g,k=(s.height-o)/m,w=Math.max(Math.min(y,k)/2,0),S=zd(this.options.radius,w),P=Math.max(S*u,0),M=(S-P)/this._getVisibleDatasetWeightTotal();this.offsetX=b*S,this.offsetY=_*S,i.total=this.calculateTotal(),this.outerRadius=S-M*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-M*f,0),this.updateElements(l,0,l.length,e)}_circumference(e,n){const s=this.options,i=this._cachedMeta,l=this._getCircumference();return n&&s.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*l/kn)}updateElements(e,n,s,i){const l=i==="reset",o=this.chart,a=o.chartArea,f=o.options.animation,h=(a.left+a.right)/2,p=(a.top+a.bottom)/2,g=l&&f.animateScale,m=g?0:this.innerRadius,b=g?0:this.outerRadius,{sharedOptions:_,includeOptions:y}=this._getSharedOptions(n,i);let k=this._getRotation(),w;for(w=0;w<n;++w)k+=this._circumference(w,l);for(w=n;w<n+s;++w){const S=this._circumference(w,l),P=e[w],M={x:h+this.offsetX,y:p+this.offsetY,startAngle:k,endAngle:k+S,circumference:S,outerRadius:b,innerRadius:m};y&&(M.options=_||this.resolveDataElementOptions(w,P.active?"active":i)),k+=S,this.updateElement(P,w,M,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let s=0,i;for(i=0;i<n.length;i++){const l=e._parsed[i];l!==null&&!isNaN(l)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(s+=Math.abs(l))}return s}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?kn*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,s=this.chart,i=s.data.labels||[],l=$r(n._parsed[e],s.options.locale);return{label:i[e]||"",value:l}}getMaxBorderWidth(e){let n=0;const s=this.chart;let i,l,o,a,u;if(!e){for(i=0,l=s.data.datasets.length;i<l;++i)if(s.isDatasetVisible(i)){o=s.getDatasetMeta(i),e=o.data,a=o.controller;break}}if(!e)return 0;for(i=0,l=e.length;i<l;++i)u=a.resolveDataElementOptions(i),u.borderAlign!=="inner"&&(n=Math.max(n,u.borderWidth||0,u.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let s=0,i=e.length;s<i;++s){const l=this.resolveDataElementOptions(s);n=Math.max(n,l.offset||0,l.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let s=0;s<e;++s)this.chart.isDatasetVisible(s)&&(n+=this._getRingWeight(s));return n}_getRingWeight(e){return Math.max(bt(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Pb extends Ro{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:s,data:i=[],_dataset:l}=n,o=this.chart._animationsDisabled;let{start:a,count:u}=Km(n,i,o);this._drawStart=a,this._drawCount=u,Zm(n)&&(a=0,u=i.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=i;const f=this.resolveDatasetElementOptions(e);this.options.showLine||(f.borderWidth=0),f.segment=this.options.segment,this.updateElement(s,void 0,{animated:!o,options:f},e),this.updateElements(i,a,u,e)}updateElements(e,n,s,i){const l=i==="reset",{iScale:o,vScale:a,_stacked:u,_dataset:f}=this._cachedMeta,{sharedOptions:h,includeOptions:p}=this._getSharedOptions(n,i),g=o.axis,m=a.axis,{spanGaps:b,segment:_}=this.options,y=Tl(b)?b:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||l||i==="none",w=n+s,S=e.length;let P=n>0&&this.getParsed(n-1);for(let M=0;M<S;++M){const x=e[M],A=k?x:{};if(M<n||M>=w){A.skip=!0;continue}const O=this.getParsed(M),C=Ft(O[m]),R=A[g]=o.getPixelForValue(O[g],M),L=A[m]=l||C?a.getBasePixel():a.getPixelForValue(u?this.applyStack(a,O,u):O[m],M);A.skip=isNaN(R)||isNaN(L)||C,A.stop=M>0&&Math.abs(O[g]-P[g])>y,_&&(A.parsed=O,A.raw=f.data[M]),p&&(A.options=h||this.resolveDataElementOptions(M,x.active?"active":i)),k||this.updateElement(x,M,A,i),P=O}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,s=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return s;const l=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(s,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}function vi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class aa{static override(e){Object.assign(aa.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return vi()}parse(){return vi()}format(){return vi()}add(){return vi()}diff(){return vi()}startOf(){return vi()}endOf(){return vi()}}var Ab={_date:aa};function xb(t,e,n,s){const{controller:i,data:l,_sorted:o}=t,a=i._cachedMeta.iScale,u=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(a&&e===a.axis&&e!=="r"&&o&&l.length){const f=a._reversePixels?qm:Si;if(s){if(i._sharedOptions){const h=l[0],p=typeof h.getRange=="function"&&h.getRange(e);if(p){const g=f(l,e,n-p),m=f(l,e,n+p);return{lo:g.lo,hi:m.hi}}}}else{const h=f(l,e,n);if(u){const{vScale:p}=i._cachedMeta,{_parsed:g}=t,m=g.slice(0,h.lo+1).reverse().findIndex(_=>!Ft(_[p.axis]));h.lo-=Math.max(0,m);const b=g.slice(h.hi).findIndex(_=>!Ft(_[p.axis]));h.hi+=Math.max(0,b)}return h}}return{lo:0,hi:l.length-1}}function Do(t,e,n,s,i){const l=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,u=l.length;a<u;++a){const{index:f,data:h}=l[a],{lo:p,hi:g}=xb(l[a],e,o,i);for(let m=p;m<=g;++m){const b=h[m];b.skip||s(b,f,m)}}}function Ob(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(s,i){const l=e?Math.abs(s.x-i.x):0,o=n?Math.abs(s.y-i.y):0;return Math.sqrt(Math.pow(l,2)+Math.pow(o,2))}}function sr(t,e,n,s,i){const l=[];return!i&&!t.isPointInArea(e)||Do(t,n,e,function(a,u,f){!i&&!Cl(a,t.chartArea,0)||a.inRange(e.x,e.y,s)&&l.push({element:a,datasetIndex:u,index:f})},!0),l}function Rb(t,e,n,s){let i=[];function l(o,a,u){const{startAngle:f,endAngle:h}=o.getProps(["startAngle","endAngle"],s),{angle:p}=Wd(o,{x:e.x,y:e.y});Ml(p,f,h)&&i.push({element:o,datasetIndex:a,index:u})}return Do(t,n,e,l),i}function Db(t,e,n,s,i,l){let o=[];const a=Ob(n);let u=Number.POSITIVE_INFINITY;function f(h,p,g){const m=h.inRange(e.x,e.y,i);if(s&&!m)return;const b=h.getCenterPoint(i);if(!(!!l||t.isPointInArea(b))&&!m)return;const y=a(e,b);y<u?(o=[{element:h,datasetIndex:p,index:g}],u=y):y===u&&o.push({element:h,datasetIndex:p,index:g})}return Do(t,n,e,f),o}function ir(t,e,n,s,i,l){return!l&&!t.isPointInArea(e)?[]:n==="r"&&!s?Rb(t,e,n,i):Db(t,e,n,s,i,l)}function Su(t,e,n,s,i){const l=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Do(t,n,e,(u,f,h)=>{u[o]&&u[o](e[n],i)&&(l.push({element:u,datasetIndex:f,index:h}),a=a||u.inRange(e.x,e.y,i))}),s&&!a?[]:l}var Lb={modes:{index(t,e,n,s){const i=yi(e,t),l=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?sr(t,i,l,s,o):ir(t,i,l,!1,s,o),u=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(f=>{const h=a[0].index,p=f.data[h];p&&!p.skip&&u.push({element:p,datasetIndex:f.index,index:h})}),u):[]},dataset(t,e,n,s){const i=yi(e,t),l=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?sr(t,i,l,s,o):ir(t,i,l,!1,s,o);if(a.length>0){const u=a[0].datasetIndex,f=t.getDatasetMeta(u).data;a=[];for(let h=0;h<f.length;++h)a.push({element:f[h],datasetIndex:u,index:h})}return a},point(t,e,n,s){const i=yi(e,t),l=n.axis||"xy",o=n.includeInvisible||!1;return sr(t,i,l,s,o)},nearest(t,e,n,s){const i=yi(e,t),l=n.axis||"xy",o=n.includeInvisible||!1;return ir(t,i,l,n.intersect,s,o)},x(t,e,n,s){const i=yi(e,t);return Su(t,i,"x",n.intersect,s)},y(t,e,n,s){const i=yi(e,t);return Su(t,i,"y",n.intersect,s)}}};const up=["left","top","right","bottom"];function tl(t,e){return t.filter(n=>n.pos===e)}function Eu(t,e){return t.filter(n=>up.indexOf(n.pos)===-1&&n.box.axis===e)}function nl(t,e){return t.sort((n,s)=>{const i=e?s:n,l=e?n:s;return i.weight===l.weight?i.index-l.index:i.weight-l.weight})}function Hb(t){const e=[];let n,s,i,l,o,a;for(n=0,s=(t||[]).length;n<s;++n)i=t[n],{position:l,options:{stack:o,stackWeight:a=1}}=i,e.push({index:n,box:i,pos:l,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&l+o,stackWeight:a});return e}function Ib(t){const e={};for(const n of t){const{stack:s,pos:i,stackWeight:l}=n;if(!s||!up.includes(i))continue;const o=e[s]||(e[s]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=l}return e}function Bb(t,e){const n=Ib(t),{vBoxMaxWidth:s,hBoxMaxHeight:i}=e;let l,o,a;for(l=0,o=t.length;l<o;++l){a=t[l];const{fullSize:u}=a.box,f=n[a.stack],h=f&&a.stackWeight/f.weight;a.horizontal?(a.width=h?h*s:u&&e.availableWidth,a.height=i):(a.width=s,a.height=h?h*i:u&&e.availableHeight)}return n}function Fb(t){const e=Hb(t),n=nl(e.filter(f=>f.box.fullSize),!0),s=nl(tl(e,"left"),!0),i=nl(tl(e,"right")),l=nl(tl(e,"top"),!0),o=nl(tl(e,"bottom")),a=Eu(e,"x"),u=Eu(e,"y");return{fullSize:n,leftAndTop:s.concat(l),rightAndBottom:i.concat(u).concat(o).concat(a),chartArea:tl(e,"chartArea"),vertical:s.concat(i).concat(u),horizontal:l.concat(o).concat(a)}}function Tu(t,e,n,s){return Math.max(t[n],e[n])+Math.max(t[s],e[s])}function cp(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Nb(t,e,n,s){const{pos:i,box:l}=n,o=t.maxPadding;if(!Ot(i)){n.size&&(t[i]-=n.size);const p=s[n.stack]||{size:0,count:1};p.size=Math.max(p.size,n.horizontal?l.height:l.width),n.size=p.size/p.count,t[i]+=n.size}l.getPadding&&cp(o,l.getPadding());const a=Math.max(0,e.outerWidth-Tu(o,t,"left","right")),u=Math.max(0,e.outerHeight-Tu(o,t,"top","bottom")),f=a!==t.w,h=u!==t.h;return t.w=a,t.h=u,n.horizontal?{same:f,other:h}:{same:h,other:f}}function jb(t){const e=t.maxPadding;function n(s){const i=Math.max(e[s]-t[s],0);return t[s]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function zb(t,e){const n=e.maxPadding;function s(i){const l={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{l[o]=Math.max(e[o],n[o])}),l}return s(t?["left","right"]:["top","bottom"])}function ul(t,e,n,s){const i=[];let l,o,a,u,f,h;for(l=0,o=t.length,f=0;l<o;++l){a=t[l],u=a.box,u.update(a.width||e.w,a.height||e.h,zb(a.horizontal,e));const{same:p,other:g}=Nb(e,n,a,s);f|=p&&i.length,h=h||g,u.fullSize||i.push(a)}return f&&ul(i,e,n,s)||h}function Zl(t,e,n,s,i){t.top=n,t.left=e,t.right=e+s,t.bottom=n+i,t.width=s,t.height=i}function Mu(t,e,n,s){const i=n.padding;let{x:l,y:o}=e;for(const a of t){const u=a.box,f=s[a.stack]||{placed:0,weight:1},h=a.stackWeight/f.weight||1;if(a.horizontal){const p=e.w*h,g=f.size||u.height;El(f.start)&&(o=f.start),u.fullSize?Zl(u,i.left,o,n.outerWidth-i.right-i.left,g):Zl(u,e.left+f.placed,o,p,g),f.start=o,f.placed+=p,o=u.bottom}else{const p=e.h*h,g=f.size||u.width;El(f.start)&&(l=f.start),u.fullSize?Zl(u,l,i.top,g,n.outerHeight-i.bottom-i.top):Zl(u,l,e.top+f.placed,g,p),f.start=l,f.placed+=p,l=u.right}}e.x=l,e.y=o}var ks={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,s){if(!t)return;const i=Ts(t.options.layout.padding),l=Math.max(e-i.width,0),o=Math.max(n-i.height,0),a=Fb(t.boxes),u=a.vertical,f=a.horizontal;Vt(t.boxes,_=>{typeof _.beforeLayout=="function"&&_.beforeLayout()});const h=u.reduce((_,y)=>y.box.options&&y.box.options.display===!1?_:_+1,0)||1,p=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/h,hBoxMaxHeight:o/2}),g=Object.assign({},i);cp(g,Ts(s));const m=Object.assign({maxPadding:g,w:l,h:o,x:i.left,y:i.top},i),b=Bb(u.concat(f),p);ul(a.fullSize,m,p,b),ul(u,m,p,b),ul(f,m,p,b)&&ul(u,m,p,b),jb(m),Mu(a.leftAndTop,m,p,b),m.x+=m.w,m.y+=m.h,Mu(a.rightAndBottom,m,p,b),t.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},Vt(a.chartArea,_=>{const y=_.box;Object.assign(y,t.chartArea),y.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class fp{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,s){}removeEventListener(e,n,s){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,s,i){return n=Math.max(0,n||e.width),s=s||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):s)}}isAttached(e){return!0}updateConfig(e){}}class Ub extends fp{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const uo="$chartjs",Vb={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Cu=t=>t===null||t==="";function Wb(t,e){const n=t.style,s=t.getAttribute("height"),i=t.getAttribute("width");if(t[uo]={initial:{height:s,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Cu(i)){const l=cu(t,"width");l!==void 0&&(t.width=l)}if(Cu(s))if(t.style.height==="")t.height=t.width/(e||2);else{const l=cu(t,"height");l!==void 0&&(t.height=l)}return t}const hp=j1?{passive:!0}:!1;function qb(t,e,n){t&&t.addEventListener(e,n,hp)}function Gb(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,hp)}function Xb(t,e){const n=Vb[t.type]||t.type,{x:s,y:i}=yi(t,e);return{type:n,chart:e,native:t,x:s!==void 0?s:null,y:i!==void 0?i:null}}function So(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Yb(t,e,n){const s=t.canvas,i=new MutationObserver(l=>{let o=!1;for(const a of l)o=o||So(a.addedNodes,s),o=o&&!So(a.removedNodes,s);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Jb(t,e,n){const s=t.canvas,i=new MutationObserver(l=>{let o=!1;for(const a of l)o=o||So(a.removedNodes,s),o=o&&!So(a.addedNodes,s);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Al=new Map;let Pu=0;function dp(){const t=window.devicePixelRatio;t!==Pu&&(Pu=t,Al.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Kb(t,e){Al.size||window.addEventListener("resize",dp),Al.set(t,e)}function Zb(t){Al.delete(t),Al.size||window.removeEventListener("resize",dp)}function Qb(t,e,n){const s=t.canvas,i=s&&ra(s);if(!i)return;const l=Yd((a,u)=>{const f=i.clientWidth;n(a,u),f<i.clientWidth&&n()},window),o=new ResizeObserver(a=>{const u=a[0],f=u.contentRect.width,h=u.contentRect.height;f===0&&h===0||l(f,h)});return o.observe(i),Kb(t,l),o}function lr(t,e,n){n&&n.disconnect(),e==="resize"&&Zb(t)}function $b(t,e,n){const s=t.canvas,i=Yd(l=>{t.ctx!==null&&n(Xb(l,t))},t);return qb(s,e,i),i}class e2 extends fp{acquireContext(e,n){const s=e&&e.getContext&&e.getContext("2d");return s&&s.canvas===e?(Wb(e,n),s):null}releaseContext(e){const n=e.canvas;if(!n[uo])return!1;const s=n[uo].initial;["height","width"].forEach(l=>{const o=s[l];Ft(o)?n.removeAttribute(l):n.setAttribute(l,o)});const i=s.style||{};return Object.keys(i).forEach(l=>{n.style[l]=i[l]}),n.width=n.width,delete n[uo],!0}addEventListener(e,n,s){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),o={attach:Yb,detach:Jb,resize:Qb}[n]||$b;i[n]=o(e,n,s)}removeEventListener(e,n){const s=e.$proxies||(e.$proxies={}),i=s[n];if(!i)return;({attach:lr,detach:lr,resize:lr}[n]||Gb)(e,n,i),s[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,s,i){return N1(e,n,s,i)}isAttached(e){const n=e&&ra(e);return!!(n&&n.isConnected)}}function t2(t){return!oa()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?Ub:e2}let Ks=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}hasValue(){return Tl(this.x)&&Tl(this.y)}getProps(e,n){const s=this.$animations;if(!n||!s)return this;const i={};return e.forEach(l=>{i[l]=s[l]&&s[l].active()?s[l]._to:this[l]}),i}};function n2(t,e){const n=t.options.ticks,s=s2(t),i=Math.min(n.maxTicksLimit||s,s),l=n.major.enabled?l2(e):[],o=l.length,a=l[0],u=l[o-1],f=[];if(o>i)return o2(e,f,l,o/i),f;const h=i2(l,e,i);if(o>0){let p,g;const m=o>1?Math.round((u-a)/(o-1)):null;for(Ql(e,f,h,Ft(m)?0:a-m,a),p=0,g=o-1;p<g;p++)Ql(e,f,h,l[p],l[p+1]);return Ql(e,f,h,u,Ft(m)?e.length:u+m),f}return Ql(e,f,h),f}function s2(t){const e=t.options.offset,n=t._tickSize(),s=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(s,i))}function i2(t,e,n){const s=r2(t),i=e.length/n;if(!s)return Math.max(i,1);const l=Fm(s);for(let o=0,a=l.length-1;o<a;o++){const u=l[o];if(u>i)return u}return Math.max(i,1)}function l2(t){const e=[];let n,s;for(n=0,s=t.length;n<s;n++)t[n].major&&e.push(n);return e}function o2(t,e,n,s){let i=0,l=n[0],o;for(s=Math.ceil(s),o=0;o<t.length;o++)o===l&&(e.push(t[o]),i++,l=n[i*s])}function Ql(t,e,n,s,i){const l=bt(s,0),o=Math.min(bt(i,t.length),t.length);let a=0,u,f,h;for(n=Math.ceil(n),i&&(u=i-s,n=u/Math.floor(u/n)),h=l;h<0;)a++,h=Math.round(l+a*n);for(f=Math.max(l,0);f<o;f++)f===h&&(e.push(t[f]),a++,h=Math.round(l+a*n))}function r2(t){const e=t.length;let n,s;if(e<2)return!1;for(s=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==s)return!1;return s}const a2=t=>t==="left"?"right":t==="right"?"left":t,Au=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,xu=(t,e)=>Math.min(e||t,t);function Ou(t,e){const n=[],s=t.length/e,i=t.length;let l=0;for(;l<i;l+=s)n.push(t[Math.floor(l)]);return n}function u2(t,e,n){const s=t.ticks.length,i=Math.min(e,s-1),l=t._startPixel,o=t._endPixel,a=1e-6;let u=t.getPixelForTick(i),f;if(!(n&&(s===1?f=Math.max(u-l,o-u):e===0?f=(t.getPixelForTick(1)-u)/2:f=(u-t.getPixelForTick(i-1))/2,u+=i<e?f:-f,u<l-a||u>o+a)))return u}function c2(t,e){Vt(t,n=>{const s=n.gc,i=s.length/2;let l;if(i>e){for(l=0;l<i;++l)delete n.data[s[l]];s.splice(0,i)}})}function sl(t){return t.drawTicks?t.tickLength:0}function Ru(t,e){if(!t.display)return 0;const n=Kn(t.font,e),s=Ts(t.padding);return(xn(t.text)?t.text.length:1)*n.lineHeight+s.height}function f2(t,e){return xi(t,{scale:e,type:"scale"})}function h2(t,e,n){return xi(t,{tick:n,index:e,type:"tick"})}function d2(t,e,n){let s=Zr(t);return(n&&e!=="right"||!n&&e==="right")&&(s=a2(s)),s}function p2(t,e,n,s){const{top:i,left:l,bottom:o,right:a,chart:u}=t,{chartArea:f,scales:h}=u;let p=0,g,m,b;const _=o-i,y=a-l;if(t.isHorizontal()){if(m=Gn(s,l,a),Ot(n)){const k=Object.keys(n)[0],w=n[k];b=h[k].getPixelForValue(w)+_-e}else n==="center"?b=(f.bottom+f.top)/2+_-e:b=Au(t,n,e);g=a-l}else{if(Ot(n)){const k=Object.keys(n)[0],w=n[k];m=h[k].getPixelForValue(w)-y+e}else n==="center"?m=(f.left+f.right)/2-y+e:m=Au(t,n,e);b=Gn(s,o,i),p=n==="left"?-On:On}return{titleX:m,titleY:b,maxWidth:g,rotation:p}}class Zi extends Ks{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:s,_suggestedMax:i}=this;return e=Ds(e,Number.POSITIVE_INFINITY),n=Ds(n,Number.NEGATIVE_INFINITY),s=Ds(s,Number.POSITIVE_INFINITY),i=Ds(i,Number.NEGATIVE_INFINITY),{min:Ds(e,s),max:Ds(n,i),minDefined:Es(e),maxDefined:Es(n)}}getMinMax(e){let{min:n,max:s,minDefined:i,maxDefined:l}=this.getUserBounds(),o;if(i&&l)return{min:n,max:s};const a=this.getMatchingVisibleMetas();for(let u=0,f=a.length;u<f;++u)o=a[u].controller.getMinMax(this,e),i||(n=Math.min(n,o.min)),l||(s=Math.max(s,o.max));return n=l&&n>s?s:n,s=i&&n>s?n:s,{min:Ds(n,Ds(s,n)),max:Ds(s,Ds(n,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){an(this.options.beforeUpdate,[this])}update(e,n,s){const{beginAtZero:i,grace:l,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=b1(this,l,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const u=a<this.ticks.length;this._convertTicksToLabels(u?Ou(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=n2(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),u&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,s;this.isHorizontal()?(n=this.left,s=this.right):(n=this.top,s=this.bottom,e=!e),this._startPixel=n,this._endPixel=s,this._reversePixels=e,this._length=s-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){an(this.options.afterUpdate,[this])}beforeSetDimensions(){an(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){an(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),an(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){an(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let s,i,l;for(s=0,i=e.length;s<i;s++)l=e[s],l.label=an(n.callback,[l.value,s,e],this)}afterTickToLabelConversion(){an(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){an(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,s=xu(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,l=n.maxRotation;let o=i,a,u,f;if(!this._isVisible()||!n.display||i>=l||s<=1||!this.isHorizontal()){this.labelRotation=i;return}const h=this._getLabelSizes(),p=h.widest.width,g=h.highest.height,m=Jn(this.chart.width-p,0,this.maxWidth);a=e.offset?this.maxWidth/s:m/(s-1),p+6>a&&(a=m/(s-(e.offset?.5:1)),u=this.maxHeight-sl(e.grid)-n.padding-Ru(e.title,this.chart.options.font),f=Math.sqrt(p*p+g*g),o=Um(Math.min(Math.asin(Jn((h.highest.height+6)/a,-1,1)),Math.asin(Jn(u/f,-1,1))-Math.asin(Jn(g/f,-1,1)))),o=Math.max(i,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){an(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){an(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:s,title:i,grid:l}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const u=Ru(i,n.options.font);if(a?(e.width=this.maxWidth,e.height=sl(l)+u):(e.height=this.maxHeight,e.width=sl(l)+u),s.display&&this.ticks.length){const{first:f,last:h,widest:p,highest:g}=this._getLabelSizes(),m=s.padding*2,b=Gs(this.labelRotation),_=Math.cos(b),y=Math.sin(b);if(a){const k=s.mirror?0:y*p.width+_*g.height;e.height=Math.min(this.maxHeight,e.height+k+m)}else{const k=s.mirror?0:_*p.width+y*g.height;e.width=Math.min(this.maxWidth,e.width+k+m)}this._calculatePadding(f,h,y,_)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,s,i){const{ticks:{align:l,padding:o},position:a}=this.options,u=this.labelRotation!==0,f=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1);let g=0,m=0;u?f?(g=i*e.width,m=s*n.height):(g=s*e.height,m=i*n.width):l==="start"?m=n.width:l==="end"?g=e.width:l!=="inner"&&(g=e.width/2,m=n.width/2),this.paddingLeft=Math.max((g-h+o)*this.width/(this.width-h),0),this.paddingRight=Math.max((m-p+o)*this.width/(this.width-p),0)}else{let h=n.height/2,p=e.height/2;l==="start"?(h=0,p=e.height):l==="end"&&(h=n.height,p=0),this.paddingTop=h+o,this.paddingBottom=p+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){an(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,s;for(n=0,s=e.length;n<s;n++)Ft(e[n].label)&&(e.splice(n,1),s--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let s=this.ticks;n<s.length&&(s=Ou(s,n)),this._labelSizes=e=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,s){const{ctx:i,_longestTextCache:l}=this,o=[],a=[],u=Math.floor(n/xu(n,s));let f=0,h=0,p,g,m,b,_,y,k,w,S,P,M;for(p=0;p<n;p+=u){if(b=e[p].label,_=this._resolveTickFontOptions(p),i.font=y=_.string,k=l[y]=l[y]||{data:{},gc:[]},w=_.lineHeight,S=P=0,!Ft(b)&&!xn(b))S=lu(i,k.data,k.gc,S,b),P=w;else if(xn(b))for(g=0,m=b.length;g<m;++g)M=b[g],!Ft(M)&&!xn(M)&&(S=lu(i,k.data,k.gc,S,M),P+=w);o.push(S),a.push(P),f=Math.max(S,f),h=Math.max(P,h)}c2(l,n);const x=o.indexOf(f),A=a.indexOf(h),O=C=>({width:o[C]||0,height:a[C]||0});return{first:O(0),last:O(n-1),widest:O(x),highest:O(A),widths:o,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Wm(this._alignToPixels?_i(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const s=n[e];return s.$context||(s.$context=h2(this.getContext(),e,s))}return this.$context||(this.$context=f2(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Gs(this.labelRotation),s=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),l=this._getLabelSizes(),o=e.autoSkipPadding||0,a=l?l.widest.width+o:0,u=l?l.highest.height+o:0;return this.isHorizontal()?u*s>a*i?a/s:u/i:u*i<a*s?u/s:a/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,s=this.chart,i=this.options,{grid:l,position:o,border:a}=i,u=l.offset,f=this.isHorizontal(),p=this.ticks.length+(u?1:0),g=sl(l),m=[],b=a.setContext(this.getContext()),_=b.display?b.width:0,y=_/2,k=function(F){return _i(s,F,_)};let w,S,P,M,x,A,O,C,R,L,D,z;if(o==="top")w=k(this.bottom),A=this.bottom-g,C=w-y,L=k(e.top)+y,z=e.bottom;else if(o==="bottom")w=k(this.top),L=e.top,z=k(e.bottom)-y,A=w+y,C=this.top+g;else if(o==="left")w=k(this.right),x=this.right-g,O=w-y,R=k(e.left)+y,D=e.right;else if(o==="right")w=k(this.left),R=e.left,D=k(e.right)-y,x=w+y,O=this.left+g;else if(n==="x"){if(o==="center")w=k((e.top+e.bottom)/2+.5);else if(Ot(o)){const F=Object.keys(o)[0],V=o[F];w=k(this.chart.scales[F].getPixelForValue(V))}L=e.top,z=e.bottom,A=w+y,C=A+g}else if(n==="y"){if(o==="center")w=k((e.left+e.right)/2);else if(Ot(o)){const F=Object.keys(o)[0],V=o[F];w=k(this.chart.scales[F].getPixelForValue(V))}x=w-y,O=x-g,R=e.left,D=e.right}const B=bt(i.ticks.maxTicksLimit,p),U=Math.max(1,Math.ceil(p/B));for(S=0;S<p;S+=U){const F=this.getContext(S),V=l.setContext(F),Y=a.setContext(F),j=V.lineWidth,q=V.color,Q=Y.dash||[],X=Y.dashOffset,re=V.tickWidth,K=V.tickColor,W=V.tickBorderDash||[],G=V.tickBorderDashOffset;P=u2(this,S,u),P!==void 0&&(M=_i(s,P,j),f?x=O=R=D=M:A=C=L=z=M,m.push({tx1:x,ty1:A,tx2:O,ty2:C,x1:R,y1:L,x2:D,y2:z,width:j,color:q,borderDash:Q,borderDashOffset:X,tickWidth:re,tickColor:K,tickBorderDash:W,tickBorderDashOffset:G}))}return this._ticksLength=p,this._borderValue=w,m}_computeLabelItems(e){const n=this.axis,s=this.options,{position:i,ticks:l}=s,o=this.isHorizontal(),a=this.ticks,{align:u,crossAlign:f,padding:h,mirror:p}=l,g=sl(s.grid),m=g+h,b=p?-h:m,_=-Gs(this.labelRotation),y=[];let k,w,S,P,M,x,A,O,C,R,L,D,z="middle";if(i==="top")x=this.bottom-b,A=this._getXAxisLabelAlignment();else if(i==="bottom")x=this.top+b,A=this._getXAxisLabelAlignment();else if(i==="left"){const U=this._getYAxisLabelAlignment(g);A=U.textAlign,M=U.x}else if(i==="right"){const U=this._getYAxisLabelAlignment(g);A=U.textAlign,M=U.x}else if(n==="x"){if(i==="center")x=(e.top+e.bottom)/2+m;else if(Ot(i)){const U=Object.keys(i)[0],F=i[U];x=this.chart.scales[U].getPixelForValue(F)+m}A=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")M=(e.left+e.right)/2-m;else if(Ot(i)){const U=Object.keys(i)[0],F=i[U];M=this.chart.scales[U].getPixelForValue(F)}A=this._getYAxisLabelAlignment(g).textAlign}n==="y"&&(u==="start"?z="top":u==="end"&&(z="bottom"));const B=this._getLabelSizes();for(k=0,w=a.length;k<w;++k){S=a[k],P=S.label;const U=l.setContext(this.getContext(k));O=this.getPixelForTick(k)+l.labelOffset,C=this._resolveTickFontOptions(k),R=C.lineHeight,L=xn(P)?P.length:1;const F=L/2,V=U.color,Y=U.textStrokeColor,j=U.textStrokeWidth;let q=A;o?(M=O,A==="inner"&&(k===w-1?q=this.options.reverse?"left":"right":k===0?q=this.options.reverse?"right":"left":q="center"),i==="top"?f==="near"||_!==0?D=-L*R+R/2:f==="center"?D=-B.highest.height/2-F*R+R:D=-B.highest.height+R/2:f==="near"||_!==0?D=R/2:f==="center"?D=B.highest.height/2-F*R:D=B.highest.height-L*R,p&&(D*=-1),_!==0&&!U.showLabelBackdrop&&(M+=R/2*Math.sin(_))):(x=O,D=(1-L)*R/2);let Q;if(U.showLabelBackdrop){const X=Ts(U.backdropPadding),re=B.heights[k],K=B.widths[k];let W=D-X.top,G=0-X.left;switch(z){case"middle":W-=re/2;break;case"bottom":W-=re;break}switch(A){case"center":G-=K/2;break;case"right":G-=K;break;case"inner":k===w-1?G-=K:k>0&&(G-=K/2);break}Q={left:G,top:W,width:K+X.width,height:re+X.height,color:U.backdropColor}}y.push({label:P,font:C,textOffset:D,options:{rotation:_,color:V,strokeColor:Y,strokeWidth:j,textAlign:q,textBaseline:z,translation:[M,x],backdrop:Q}})}return y}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Gs(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:s,mirror:i,padding:l}}=this.options,o=this._getLabelSizes(),a=e+l,u=o.widest.width;let f,h;return n==="left"?i?(h=this.right+l,s==="near"?f="left":s==="center"?(f="center",h+=u/2):(f="right",h+=u)):(h=this.right-a,s==="near"?f="right":s==="center"?(f="center",h-=u/2):(f="left",h=this.left)):n==="right"?i?(h=this.left+l,s==="near"?f="right":s==="center"?(f="center",h-=u/2):(f="left",h-=u)):(h=this.left+a,s==="near"?f="left":s==="center"?(f="center",h+=u/2):(f="right",h=this.right)):f="right",{textAlign:f,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:s,top:i,width:l,height:o}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(s,i,l,o),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(l=>l.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,s=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const a=(u,f,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(u.x,u.y),s.lineTo(f.x,f.y),s.stroke(),s.restore())};if(n.display)for(l=0,o=i.length;l<o;++l){const u=i[l];n.drawOnChartArea&&a({x:u.x1,y:u.y1},{x:u.x2,y:u.y2},u),n.drawTicks&&a({x:u.tx1,y:u.ty1},{x:u.tx2,y:u.ty2},{color:u.tickColor,width:u.tickWidth,borderDash:u.tickBorderDash,borderDashOffset:u.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:s,grid:i}}=this,l=s.setContext(this.getContext()),o=s.display?l.width:0;if(!o)return;const a=i.setContext(this.getContext(0)).lineWidth,u=this._borderValue;let f,h,p,g;this.isHorizontal()?(f=_i(e,this.left,o)-o/2,h=_i(e,this.right,a)+a/2,p=g=u):(p=_i(e,this.top,o)-o/2,g=_i(e,this.bottom,a)+a/2,f=h=u),n.save(),n.lineWidth=l.width,n.strokeStyle=l.color,n.beginPath(),n.moveTo(f,p),n.lineTo(h,g),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const s=this.ctx,i=this._computeLabelArea();i&&ea(s,i);const l=this.getLabelItems(e);for(const o of l){const a=o.options,u=o.font,f=o.label,h=o.textOffset;Pl(s,f,0,h,u,a)}i&&ta(s)}drawTitle(){const{ctx:e,options:{position:n,title:s,reverse:i}}=this;if(!s.display)return;const l=Kn(s.font),o=Ts(s.padding),a=s.align;let u=l.lineHeight/2;n==="bottom"||n==="center"||Ot(n)?(u+=o.bottom,xn(s.text)&&(u+=l.lineHeight*(s.text.length-1))):u+=o.top;const{titleX:f,titleY:h,maxWidth:p,rotation:g}=p2(this,u,n,a);Pl(e,s.text,0,0,l,{color:s.color,maxWidth:p,rotation:g,textAlign:d2(a,n,i),textBaseline:"middle",translation:[f,h]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,s=bt(e.grid&&e.grid.z,-1),i=bt(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Zi.prototype.draw?[{z:n,draw:l=>{this.draw(l)}}]:[{z:s,draw:l=>{this.drawBackground(),this.drawGrid(l),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:l=>{this.drawLabels(l)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",i=[];let l,o;for(l=0,o=n.length;l<o;++l){const a=n[l];a[s]===this.id&&(!e||a.type===e)&&i.push(a)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return Kn(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class $l{constructor(e,n,s){this.type=e,this.scope=n,this.override=s,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let s;b2(n)&&(s=this.register(n));const i=this.items,l=e.id,o=this.scope+"."+l;if(!l)throw new Error("class does not have id: "+e);return l in i||(i[l]=e,g2(e,o,s),this.override&&En.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const n=this.items,s=e.id,i=this.scope;s in n&&delete n[s],i&&s in En[i]&&(delete En[i][s],this.override&&delete Ci[s])}}function g2(t,e,n){const s=Sl(Object.create(null),[n?En.get(n):{},En.get(e),t.defaults]);En.set(e,s),t.defaultRoutes&&m2(e,t.defaultRoutes),t.descriptors&&En.describe(e,t.descriptors)}function m2(t,e){Object.keys(e).forEach(n=>{const s=n.split("."),i=s.pop(),l=[t].concat(s).join("."),o=e[n].split("."),a=o.pop(),u=o.join(".");En.route(l,i,u,a)})}function b2(t){return"id"in t&&"defaults"in t}class _2{constructor(){this.controllers=new $l(Ro,"datasets",!0),this.elements=new $l(Ks,"elements"),this.plugins=new $l(Object,"plugins"),this.scales=new $l(Zi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,s){[...n].forEach(i=>{const l=s||this._getRegistryForType(i);s||l.isForType(i)||l===this.plugins&&i.id?this._exec(e,l,i):Vt(i,o=>{const a=s||this._getRegistryForType(o);this._exec(e,a,o)})})}_exec(e,n,s){const i=Jr(e);an(s["before"+i],[],s),n[e](s),an(s["after"+i],[],s)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const s=this._typedRegistries[n];if(s.isForType(e))return s}return this.plugins}_get(e,n,s){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+s+".");return i}}var Hs=new _2;class v2{constructor(){this._init=[]}notify(e,n,s,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const l=i?this._descriptors(e).filter(i):this._descriptors(e),o=this._notify(l,e,n,s);return n==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,n,s,i){i=i||{};for(const l of e){const o=l.plugin,a=o[s],u=[n,i,l.options];if(an(a,u,o)===!1&&i.cancelable)return!1}return!0}invalidate(){Ft(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const s=e&&e.config,i=bt(s.options&&s.options.plugins,{}),l=y2(s);return i===!1&&!n?[]:k2(e,l,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],s=this._cache,i=(l,o)=>l.filter(a=>!o.some(u=>a.plugin.id===u.plugin.id));this._notify(i(n,s),e,"stop"),this._notify(i(s,n),e,"start")}}function y2(t){const e={},n=[],s=Object.keys(Hs.plugins.items);for(let l=0;l<s.length;l++)n.push(Hs.getPlugin(s[l]));const i=t.plugins||[];for(let l=0;l<i.length;l++){const o=i[l];n.indexOf(o)===-1&&(n.push(o),e[o.id]=!0)}return{plugins:n,localIds:e}}function w2(t,e){return!e&&t===!1?null:t===!0?{}:t}function k2(t,{plugins:e,localIds:n},s,i){const l=[],o=t.getContext();for(const a of e){const u=a.id,f=w2(s[u],i);f!==null&&l.push({plugin:a,options:S2(t.config,{plugin:a,local:n[u]},f,o)})}return l}function S2(t,{plugin:e,local:n},s,i){const l=t.pluginScopeKeys(e),o=t.getOptionScopes(s,l);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ar(t,e){const n=En.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function E2(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function T2(t,e){return t===e?"_index_":"_value_"}function Du(t){if(t==="x"||t==="y"||t==="r")return t}function M2(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function xr(t,...e){if(Du(t))return t;for(const n of e){const s=n.axis||M2(n.position)||t.length>1&&Du(t[0].toLowerCase());if(s)return s}throw new Error(\`Cannot determine type of '\${t}' axis. Please provide 'axis' or 'position' option.\`)}function Lu(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function C2(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(s=>s.xAxisID===t||s.yAxisID===t);if(n.length)return Lu(t,"x",n[0])||Lu(t,"y",n[0])}return{}}function P2(t,e){const n=Ci[t.type]||{scales:{}},s=e.scales||{},i=Ar(t.type,e),l=Object.create(null);return Object.keys(s).forEach(o=>{const a=s[o];if(!Ot(a))return console.error(\`Invalid scale configuration for scale: \${o}\`);if(a._proxy)return console.warn(\`Ignoring resolver passed as options for scale: \${o}\`);const u=xr(o,a,C2(o,t),En.scales[a.type]),f=T2(u,i),h=n.scales||{};l[o]=gl(Object.create(null),[{axis:u},a,h[u],h[f]])}),t.data.datasets.forEach(o=>{const a=o.type||t.type,u=o.indexAxis||Ar(a,e),h=(Ci[a]||{}).scales||{};Object.keys(h).forEach(p=>{const g=E2(p,u),m=o[g+"AxisID"]||g;l[m]=l[m]||Object.create(null),gl(l[m],[{axis:g},s[m],h[p]])})}),Object.keys(l).forEach(o=>{const a=l[o];gl(a,[En.scales[a.type],En.scale])}),l}function pp(t){const e=t.options||(t.options={});e.plugins=bt(e.plugins,{}),e.scales=P2(t,e)}function gp(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function A2(t){return t=t||{},t.data=gp(t.data),pp(t),t}const Hu=new Map,mp=new Set;function eo(t,e){let n=Hu.get(t);return n||(n=e(),Hu.set(t,n),mp.add(n)),n}const il=(t,e,n)=>{const s=Mi(e,n);s!==void 0&&t.add(s)};class x2{constructor(e){this._config=A2(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=gp(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),pp(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return eo(e,()=>[[\`datasets.\${e}\`,""]])}datasetAnimationScopeKeys(e,n){return eo(\`\${e}.transition.\${n}\`,()=>[[\`datasets.\${e}.transitions.\${n}\`,\`transitions.\${n}\`],[\`datasets.\${e}\`,""]])}datasetElementScopeKeys(e,n){return eo(\`\${e}-\${n}\`,()=>[[\`datasets.\${e}.elements.\${n}\`,\`datasets.\${e}\`,\`elements.\${n}\`,""]])}pluginScopeKeys(e){const n=e.id,s=this.type;return eo(\`\${s}-plugin-\${n}\`,()=>[[\`plugins.\${n}\`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const s=this._scopeCache;let i=s.get(e);return(!i||n)&&(i=new Map,s.set(e,i)),i}getOptionScopes(e,n,s){const{options:i,type:l}=this,o=this._cachedScopes(e,s),a=o.get(n);if(a)return a;const u=new Set;n.forEach(h=>{e&&(u.add(e),h.forEach(p=>il(u,e,p))),h.forEach(p=>il(u,i,p)),h.forEach(p=>il(u,Ci[l]||{},p)),h.forEach(p=>il(u,En,p)),h.forEach(p=>il(u,Cr,p))});const f=Array.from(u);return f.length===0&&f.push(Object.create(null)),mp.has(n)&&o.set(n,f),f}chartOptionScopes(){const{options:e,type:n}=this;return[e,Ci[n]||{},En.datasets[n]||{},{type:n},En,Cr]}resolveNamedOptions(e,n,s,i=[""]){const l={$shared:!0},{resolver:o,subPrefixes:a}=Iu(this._resolverCache,e,i);let u=o;if(R2(o,n)){l.$shared=!1,s=fi(s)?s():s;const f=this.createResolver(e,s,a);u=qi(o,s,f)}for(const f of n)l[f]=u[f];return l}createResolver(e,n,s=[""],i){const{resolver:l}=Iu(this._resolverCache,e,s);return Ot(n)?qi(l,n,void 0,i):l}}function Iu(t,e,n){let s=t.get(e);s||(s=new Map,t.set(e,s));const i=n.join();let l=s.get(i);return l||(l={resolver:sa(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},s.set(i,l)),l}const O2=t=>Ot(t)&&Object.getOwnPropertyNames(t).some(e=>fi(t[e]));function R2(t,e){const{isScriptable:n,isIndexable:s}=Qd(t);for(const i of e){const l=n(i),o=s(i),a=(o||l)&&t[i];if(l&&(fi(a)||O2(a))||o&&xn(a))return!0}return!1}var D2="4.5.0";const L2=["top","bottom","left","right","chartArea"];function Bu(t,e){return t==="top"||t==="bottom"||L2.indexOf(t)===-1&&e==="x"}function Fu(t,e){return function(n,s){return n[t]===s[t]?n[e]-s[e]:n[t]-s[t]}}function Nu(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),an(n&&n.onComplete,[t],e)}function H2(t){const e=t.chart,n=e.options.animation;an(n&&n.onProgress,[t],e)}function bp(t){return oa()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const co={},ju=t=>{const e=bp(t);return Object.values(co).filter(n=>n.canvas===e).pop()};function I2(t,e,n){const s=Object.keys(t);for(const i of s){const l=+i;if(l>=e){const o=t[i];delete t[i],(n>0||l>e)&&(t[l+n]=o)}}}function B2(t,e,n,s){return!n||t.type==="mouseout"?null:s?e:t}let pi=class{static defaults=En;static instances=co;static overrides=Ci;static registry=Hs;static version=D2;static getChart=ju;static register(...e){Hs.add(...e),zu()}static unregister(...e){Hs.remove(...e),zu()}constructor(e,n){const s=this.config=new x2(n),i=bp(e),l=ju(i);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");const o=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||t2(i)),this.platform.updateConfig(s);const a=this.platform.acquireContext(i,o.aspectRatio),u=a&&a.canvas,f=u&&u.height,h=u&&u.width;if(this.id=Am(),this.ctx=a,this.canvas=u,this.width=h,this.height=f,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new v2,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ym(p=>this.update(p),o.resizeDelay||0),this._dataChanges=[],co[this.id]=this,!a||!u){console.error("Failed to create chart: can't acquire context from the given item");return}Vs.listen(this,"complete",Nu),Vs.listen(this,"progress",H2),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:s,height:i,_aspectRatio:l}=this;return Ft(e)?n&&l?l:i?s/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Hs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():uu(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ou(this.canvas,this.ctx),this}stop(){return Vs.stop(this),this}resize(e,n){Vs.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const s=this.options,i=this.canvas,l=s.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,e,n,l),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),u=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,uu(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),an(s.onResize,[this,o],this),this.attached&&this._doResize(u)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Vt(n,(s,i)=>{s.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,s=this.scales,i=Object.keys(s).reduce((o,a)=>(o[a]=!1,o),{});let l=[];n&&(l=l.concat(Object.keys(n).map(o=>{const a=n[o],u=xr(o,a),f=u==="r",h=u==="x";return{options:a,dposition:f?"chartArea":h?"bottom":"left",dtype:f?"radialLinear":h?"category":"linear"}}))),Vt(l,o=>{const a=o.options,u=a.id,f=xr(u,a),h=bt(a.type,o.dtype);(a.position===void 0||Bu(a.position,f)!==Bu(o.dposition))&&(a.position=o.dposition),i[u]=!0;let p=null;if(u in s&&s[u].type===h)p=s[u];else{const g=Hs.getScale(h);p=new g({id:u,type:h,ctx:this.ctx,chart:this}),s[p.id]=p}p.init(a,e)}),Vt(i,(o,a)=>{o||delete s[a]}),Vt(s,o=>{ks.configure(this,o,o.options),ks.addBox(this,o)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,s=e.length;if(e.sort((i,l)=>i.index-l.index),s>n){for(let i=n;i<s;++i)this._destroyDatasetMeta(i);e.splice(n,s-n)}this._sortedMetasets=e.slice(0).sort(Fu("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((s,i)=>{n.filter(l=>l===s._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let s,i;for(this._removeUnreferencedMetasets(),s=0,i=n.length;s<i;s++){const l=n[s];let o=this.getDatasetMeta(s);const a=l.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(s),o=this.getDatasetMeta(s)),o.type=a,o.indexAxis=l.indexAxis||Ar(a,this.options),o.order=l.order||0,o.index=s,o.label=""+l.label,o.visible=this.isDatasetVisible(s),o.controller)o.controller.updateIndex(s),o.controller.linkScales();else{const u=Hs.getController(a),{datasetElementType:f,dataElementType:h}=En.datasets[a];Object.assign(u,{dataElementType:Hs.getElement(h),datasetElementType:f&&Hs.getElement(f)}),o.controller=new u(this,s),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){Vt(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const s=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const l=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let f=0,h=this.data.datasets.length;f<h;f++){const{controller:p}=this.getDatasetMeta(f),g=!i&&l.indexOf(p)===-1;p.buildOrUpdateElements(g),o=Math.max(+p.getMaxOverflow(),o)}o=this._minPadding=s.layout.autoPadding?o:0,this._updateLayout(o),i||Vt(l,f=>{f.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Fu("z","_idx"));const{_active:a,_lastEvent:u}=this;u?this._eventHandler(u,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Vt(this.scales,e=>{ks.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),s=new Set(e.events);(!Ka(n,s)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:s,start:i,count:l}of n){const o=s==="_removeElements"?-l:l;I2(e,i,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,s=l=>new Set(e.filter(o=>o[0]===l).map((o,a)=>a+","+o.splice(1).join(","))),i=s(0);for(let l=1;l<n;l++)if(!Ka(i,s(l)))return;return Array.from(i).map(l=>l.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ks.update(this,this.width,this.height,e);const n=this.chartArea,s=n.width<=0||n.height<=0;this._layers=[],Vt(this.boxes,i=>{s&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,l)=>{i._idx=l}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,s=this.data.datasets.length;n<s;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,s=this.data.datasets.length;n<s;++n)this._updateDataset(n,fi(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const s=this.getDatasetMeta(e),i={meta:s,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(s.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Vs.has(this)?this.attached&&!Vs.running(this)&&Vs.start(this):(this.draw(),Nu({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:s,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,s=[];let i,l;for(i=0,l=n.length;i<l;++i){const o=n[i];(!e||o.visible)&&s.push(o)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,s={meta:e,index:e.index,cancelable:!0},i=eb(this,e);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&ea(n,i),e.controller.draw(),i&&ta(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return Cl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,s,i){const l=Lb.modes[n];return typeof l=="function"?l(this,e,s,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],s=this._metasets;let i=s.filter(l=>l&&l._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},s.push(i)),i}getContext(){return this.$context||(this.$context=xi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const s=this.getDatasetMeta(e);return typeof s.hidden=="boolean"?!s.hidden:!n.hidden}setDatasetVisibility(e,n){const s=this.getDatasetMeta(e);s.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,s){const i=s?"show":"hide",l=this.getDatasetMeta(e),o=l.controller._resolveAnimations(void 0,i);El(n)?(l.data[n].hidden=!s,this.update()):(this.setDatasetVisibility(e,s),o.update(l,{visible:s}),this.update(a=>a.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Vs.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),ou(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete co[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,s=(l,o)=>{n.addEventListener(this,l,o),e[l]=o},i=(l,o,a)=>{l.offsetX=o,l.offsetY=a,this._eventHandler(l)};Vt(this.options.events,l=>s(l,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,s=(u,f)=>{n.addEventListener(this,u,f),e[u]=f},i=(u,f)=>{e[u]&&(n.removeEventListener(this,u,f),delete e[u])},l=(u,f)=>{this.canvas&&this.resize(u,f)};let o;const a=()=>{i("attach",a),this.attached=!0,this.resize(),s("resize",l),s("detach",o)};o=()=>{this.attached=!1,i("resize",l),this._stop(),this._resize(0,0),s("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Vt(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Vt(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,s){const i=s?"set":"remove";let l,o,a,u;for(n==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+i+"DatasetHoverStyle"]()),a=0,u=e.length;a<u;++a){o=e[a];const f=o&&this.getDatasetMeta(o.datasetIndex).controller;f&&f[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],s=e.map(({datasetIndex:l,index:o})=>{const a=this.getDatasetMeta(l);if(!a)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:a.data[o],index:o}});!_o(s,n)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,n))}notifyPlugins(e,n,s){return this._plugins.notify(this,e,n,s)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,s){const i=this.options.hover,l=(u,f)=>u.filter(h=>!f.some(p=>h.datasetIndex===p.datasetIndex&&h.index===p.index)),o=l(n,e),a=s?e:l(e,n);o.length&&this.updateHoverStyle(o,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(e,n){const s={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",s,i)===!1)return;const l=this._handleEvent(e,n,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,i),(l||s.changed)&&this.render(),this}_handleEvent(e,n,s){const{_active:i=[],options:l}=this,o=n,a=this._getActiveElements(e,i,s,o),u=Hm(e),f=B2(e,this._lastEvent,s,u);s&&(this._lastEvent=null,an(l.onHover,[e,a,this],this),u&&an(l.onClick,[e,a,this],this));const h=!_o(a,i);return(h||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=f,h}_getActiveElements(e,n,s,i){if(e.type==="mouseout")return[];if(!s)return n;const l=this.options.hover;return this.getElementsAtEventForMode(e,l.mode,l,i)}};function zu(){return Vt(pi.instances,t=>t._plugins.invalidate())}function F2(t,e,n){const{startAngle:s,x:i,y:l,outerRadius:o,innerRadius:a,options:u}=e,{borderWidth:f,borderJoinStyle:h}=u,p=Math.min(f/o,Ms(s-n));if(t.beginPath(),t.arc(i,l,o-f/2,s+p/2,n-p/2),a>0){const g=Math.min(f/a,Ms(s-n));t.arc(i,l,a+f/2,n-g/2,s+g/2,!0)}else{const g=Math.min(f/2,o*Ms(s-n));if(h==="round")t.arc(i,l,g,n-Wt/2,s+Wt/2,!0);else if(h==="bevel"){const m=2*g*g,b=-m*Math.cos(n+Wt/2)+i,_=-m*Math.sin(n+Wt/2)+l,y=m*Math.cos(s+Wt/2)+i,k=m*Math.sin(s+Wt/2)+l;t.lineTo(b,_),t.lineTo(y,k)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function N2(t,e,n){const{startAngle:s,pixelMargin:i,x:l,y:o,outerRadius:a,innerRadius:u}=e;let f=i/a;t.beginPath(),t.arc(l,o,a,s-f,n+f),u>i?(f=i/u,t.arc(l,o,u,n+f,s-f,!0)):t.arc(l,o,i,n+On,s-On),t.closePath(),t.clip()}function j2(t){return na(t,["outerStart","outerEnd","innerStart","innerEnd"])}function z2(t,e,n,s){const i=j2(t.options.borderRadius),l=(n-e)/2,o=Math.min(l,s*e/2),a=u=>{const f=(n-Math.min(l,u))*s/2;return Jn(u,0,Math.min(l,f))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:Jn(i.innerStart,0,o),innerEnd:Jn(i.innerEnd,0,o)}}function Ii(t,e,n,s){return{x:n+t*Math.cos(e),y:s+t*Math.sin(e)}}function Eo(t,e,n,s,i,l){const{x:o,y:a,startAngle:u,pixelMargin:f,innerRadius:h}=e,p=Math.max(e.outerRadius+s+n-f,0),g=h>0?h+s+n+f:0;let m=0;const b=i-u;if(s){const U=h>0?h-s:0,F=p>0?p-s:0,V=(U+F)/2,Y=V!==0?b*V/(V+s):b;m=(b-Y)/2}const _=Math.max(.001,b*p-n/Wt)/p,y=(b-_)/2,k=u+y+m,w=i-y-m,{outerStart:S,outerEnd:P,innerStart:M,innerEnd:x}=z2(e,g,p,w-k),A=p-S,O=p-P,C=k+S/A,R=w-P/O,L=g+M,D=g+x,z=k+M/L,B=w-x/D;if(t.beginPath(),l){const U=(C+R)/2;if(t.arc(o,a,p,C,U),t.arc(o,a,p,U,R),P>0){const j=Ii(O,R,o,a);t.arc(j.x,j.y,P,R,w+On)}const F=Ii(D,w,o,a);if(t.lineTo(F.x,F.y),x>0){const j=Ii(D,B,o,a);t.arc(j.x,j.y,x,w+On,B+Math.PI)}const V=(w-x/g+(k+M/g))/2;if(t.arc(o,a,g,w-x/g,V,!0),t.arc(o,a,g,V,k+M/g,!0),M>0){const j=Ii(L,z,o,a);t.arc(j.x,j.y,M,z+Math.PI,k-On)}const Y=Ii(A,k,o,a);if(t.lineTo(Y.x,Y.y),S>0){const j=Ii(A,C,o,a);t.arc(j.x,j.y,S,k-On,C)}}else{t.moveTo(o,a);const U=Math.cos(C)*p+o,F=Math.sin(C)*p+a;t.lineTo(U,F);const V=Math.cos(R)*p+o,Y=Math.sin(R)*p+a;t.lineTo(V,Y)}t.closePath()}function U2(t,e,n,s,i){const{fullCircles:l,startAngle:o,circumference:a}=e;let u=e.endAngle;if(l){Eo(t,e,n,s,u,i);for(let f=0;f<l;++f)t.fill();isNaN(a)||(u=o+(a%kn||kn))}return Eo(t,e,n,s,u,i),t.fill(),u}function V2(t,e,n,s,i){const{fullCircles:l,startAngle:o,circumference:a,options:u}=e,{borderWidth:f,borderJoinStyle:h,borderDash:p,borderDashOffset:g,borderRadius:m}=u,b=u.borderAlign==="inner";if(!f)return;t.setLineDash(p||[]),t.lineDashOffset=g,b?(t.lineWidth=f*2,t.lineJoin=h||"round"):(t.lineWidth=f,t.lineJoin=h||"bevel");let _=e.endAngle;if(l){Eo(t,e,n,s,_,i);for(let y=0;y<l;++y)t.stroke();isNaN(a)||(_=o+(a%kn||kn))}b&&N2(t,e,_),u.selfJoin&&_-o>=Wt&&m===0&&h!=="miter"&&F2(t,e,_),l||(Eo(t,e,n,s,_,i),t.stroke())}class W2 extends Ks{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,s){const i=this.getProps(["x","y"],s),{angle:l,distance:o}=Wd(i,{x:e,y:n}),{startAngle:a,endAngle:u,innerRadius:f,outerRadius:h,circumference:p}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),g=(this.options.spacing+this.options.borderWidth)/2,m=bt(p,u-a),b=Ml(l,a,u)&&a!==u,_=m>=kn||b,y=ii(o,f+g,h+g);return _&&y}getCenterPoint(e){const{x:n,y:s,startAngle:i,endAngle:l,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:u,spacing:f}=this.options,h=(i+l)/2,p=(o+a+f+u)/2;return{x:n+Math.cos(h)*p,y:s+Math.sin(h)*p}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:s}=this,i=(n.offset||0)/4,l=(n.spacing||0)/2,o=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>kn?Math.floor(s/kn):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*i,Math.sin(a)*i);const u=1-Math.sin(Math.min(Wt,s||0)),f=i*u;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,U2(e,this,f,l,o),V2(e,this,f,l,o),e.restore()}}function _p(t,e,n=e){t.lineCap=bt(n.borderCapStyle,e.borderCapStyle),t.setLineDash(bt(n.borderDash,e.borderDash)),t.lineDashOffset=bt(n.borderDashOffset,e.borderDashOffset),t.lineJoin=bt(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=bt(n.borderWidth,e.borderWidth),t.strokeStyle=bt(n.borderColor,e.borderColor)}function q2(t,e,n){t.lineTo(n.x,n.y)}function G2(t){return t.stepped?a1:t.tension||t.cubicInterpolationMode==="monotone"?u1:q2}function vp(t,e,n={}){const s=t.length,{start:i=0,end:l=s-1}=n,{start:o,end:a}=e,u=Math.max(i,o),f=Math.min(l,a),h=i<o&&l<o||i>a&&l>a;return{count:s,start:u,loop:e.loop,ilen:f<u&&!h?s+f-u:f-u}}function X2(t,e,n,s){const{points:i,options:l}=e,{count:o,start:a,loop:u,ilen:f}=vp(i,n,s),h=G2(l);let{move:p=!0,reverse:g}=s||{},m,b,_;for(m=0;m<=f;++m)b=i[(a+(g?f-m:m))%o],!b.skip&&(p?(t.moveTo(b.x,b.y),p=!1):h(t,_,b,g,l.stepped),_=b);return u&&(b=i[(a+(g?f:0))%o],h(t,_,b,g,l.stepped)),!!u}function Y2(t,e,n,s){const i=e.points,{count:l,start:o,ilen:a}=vp(i,n,s),{move:u=!0,reverse:f}=s||{};let h=0,p=0,g,m,b,_,y,k;const w=P=>(o+(f?a-P:P))%l,S=()=>{_!==y&&(t.lineTo(h,y),t.lineTo(h,_),t.lineTo(h,k))};for(u&&(m=i[w(0)],t.moveTo(m.x,m.y)),g=0;g<=a;++g){if(m=i[w(g)],m.skip)continue;const P=m.x,M=m.y,x=P|0;x===b?(M<_?_=M:M>y&&(y=M),h=(p*h+P)/++p):(S(),t.lineTo(P,M),b=x,p=0,_=y=M),k=M}S()}function Or(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Y2:X2}function J2(t){return t.stepped?z1:t.tension||t.cubicInterpolationMode==="monotone"?U1:wi}function K2(t,e,n,s){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,s)&&i.closePath()),_p(t,e.options),t.stroke(i)}function Z2(t,e,n,s){const{segments:i,options:l}=e,o=Or(e);for(const a of i)_p(t,l,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+s-1})&&t.closePath(),t.stroke()}const Q2=typeof Path2D=="function";function $2(t,e,n,s){Q2&&!e.options.segment?K2(t,e,n,s):Z2(t,e,n,s)}class e_ extends Ks{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const i=s.spanGaps?this._loop:this._fullLoop;D1(this._points,s,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=K1(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,s=e.length;return s&&n[e[s-1].end]}interpolate(e,n){const s=this.options,i=e[n],l=this.points,o=X1(this,{property:n,start:i,end:i});if(!o.length)return;const a=[],u=J2(s);let f,h;for(f=0,h=o.length;f<h;++f){const{start:p,end:g}=o[f],m=l[p],b=l[g];if(m===b){a.push(m);continue}const _=Math.abs((i-m[n])/(b[n]-m[n])),y=u(m,b,_,s.stepped);y[n]=e[n],a.push(y)}return a.length===1?a[0]:a}pathSegment(e,n,s){return Or(this)(e,this,n,s)}path(e,n,s){const i=this.segments,l=Or(this);let o=this._loop;n=n||0,s=s||this.points.length-n;for(const a of i)o&=l(e,this,a,{start:n,end:n+s-1});return!!o}draw(e,n,s,i){const l=this.options||{};(this.points||[]).length&&l.borderWidth&&(e.save(),$2(e,this,s,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Uu(t,e,n,s){const i=t.options,{[n]:l}=t.getProps([n],s);return Math.abs(e-l)<i.radius+i.hitRadius}class t_ extends Ks{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,s){const i=this.options,{x:l,y:o}=this.getProps(["x","y"],s);return Math.pow(e-l,2)+Math.pow(n-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(e,n){return Uu(this,e,"x",n)}inYRange(e,n){return Uu(this,e,"y",n)}getCenterPoint(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);const s=n&&e.borderWidth||0;return(n+s)*2}draw(e,n){const s=this.options;this.skip||s.radius<.1||!Cl(this,n,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,Pr(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function yp(t,e){const{x:n,y:s,base:i,width:l,height:o}=t.getProps(["x","y","base","width","height"],e);let a,u,f,h,p;return t.horizontal?(p=o/2,a=Math.min(n,i),u=Math.max(n,i),f=s-p,h=s+p):(p=l/2,a=n-p,u=n+p,f=Math.min(s,i),h=Math.max(s,i)),{left:a,top:f,right:u,bottom:h}}function li(t,e,n,s){return t?0:Jn(e,n,s)}function n_(t,e,n){const s=t.options.borderWidth,i=t.borderSkipped,l=Zd(s);return{t:li(i.top,l.top,0,n),r:li(i.right,l.right,0,e),b:li(i.bottom,l.bottom,0,n),l:li(i.left,l.left,0,e)}}function s_(t,e,n){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,l=Ni(i),o=Math.min(e,n),a=t.borderSkipped,u=s||Ot(i);return{topLeft:li(!u||a.top||a.left,l.topLeft,0,o),topRight:li(!u||a.top||a.right,l.topRight,0,o),bottomLeft:li(!u||a.bottom||a.left,l.bottomLeft,0,o),bottomRight:li(!u||a.bottom||a.right,l.bottomRight,0,o)}}function i_(t){const e=yp(t),n=e.right-e.left,s=e.bottom-e.top,i=n_(t,n/2,s/2),l=s_(t,n/2,s/2);return{outer:{x:e.left,y:e.top,w:n,h:s,radius:l},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:s-i.t-i.b,radius:{topLeft:Math.max(0,l.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,l.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,l.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,l.bottomRight-Math.max(i.b,i.r))}}}}function or(t,e,n,s){const i=e===null,l=n===null,a=t&&!(i&&l)&&yp(t,s);return a&&(i||ii(e,a.left,a.right))&&(l||ii(n,a.top,a.bottom))}function l_(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function o_(t,e){t.rect(e.x,e.y,e.w,e.h)}function rr(t,e,n={}){const s=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,l=(t.x+t.w!==n.x+n.w?e:0)-s,o=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+s,y:t.y+i,w:t.w+l,h:t.h+o,radius:t.radius}}class r_ extends Ks{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:s,backgroundColor:i}}=this,{inner:l,outer:o}=i_(this),a=l_(o.radius)?wo:o_;e.save(),(o.w!==l.w||o.h!==l.h)&&(e.beginPath(),a(e,rr(o,n,l)),e.clip(),a(e,rr(l,-n,o)),e.fillStyle=s,e.fill("evenodd")),e.beginPath(),a(e,rr(l,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,s){return or(this,e,n,s)}inXRange(e,n){return or(this,e,null,n)}inYRange(e,n){return or(this,null,e,n)}getCenterPoint(e){const{x:n,y:s,base:i,horizontal:l}=this.getProps(["x","y","base","horizontal"],e);return{x:l?(n+i)/2:n,y:l?s:(s+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}const Vu=(t,e)=>{let{boxHeight:n=e,boxWidth:s=e}=t;return t.usePointStyle&&(n=Math.min(n,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:n,itemHeight:Math.max(e,n)}},a_=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Wu extends Ks{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,s){this.maxWidth=e,this.maxHeight=n,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=an(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(s=>e.filter(s,this.chart.data))),e.sort&&(n=n.sort((s,i)=>e.sort(s,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const s=e.labels,i=Kn(s.font),l=i.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:u}=Vu(s,l);let f,h;n.font=i.string,this.isHorizontal()?(f=this.maxWidth,h=this._fitRows(o,l,a,u)+10):(h=this.maxHeight,f=this._fitCols(o,i,a,u)+10),this.width=Math.min(f,e.maxWidth||this.maxWidth),this.height=Math.min(h,e.maxHeight||this.maxHeight)}_fitRows(e,n,s,i){const{ctx:l,maxWidth:o,options:{labels:{padding:a}}}=this,u=this.legendHitBoxes=[],f=this.lineWidths=[0],h=i+a;let p=e;l.textAlign="left",l.textBaseline="middle";let g=-1,m=-h;return this.legendItems.forEach((b,_)=>{const y=s+n/2+l.measureText(b.text).width;(_===0||f[f.length-1]+y+2*a>o)&&(p+=h,f[f.length-(_>0?0:1)]=0,m+=h,g++),u[_]={left:0,top:m,row:g,width:y,height:i},f[f.length-1]+=y+a}),p}_fitCols(e,n,s,i){const{ctx:l,maxHeight:o,options:{labels:{padding:a}}}=this,u=this.legendHitBoxes=[],f=this.columnSizes=[],h=o-e;let p=a,g=0,m=0,b=0,_=0;return this.legendItems.forEach((y,k)=>{const{itemWidth:w,itemHeight:S}=u_(s,n,l,y,i);k>0&&m+S+2*a>h&&(p+=g+a,f.push({width:g,height:m}),b+=g+a,_++,g=m=0),u[k]={left:b,top:m,col:_,width:w,height:S},g=Math.max(g,w),m+=S+a}),p+=g,f.push({width:g,height:m}),p}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:s,labels:{padding:i},rtl:l}}=this,o=ji(l,this.left,this.width);if(this.isHorizontal()){let a=0,u=Gn(s,this.left+i,this.right-this.lineWidths[a]);for(const f of n)a!==f.row&&(a=f.row,u=Gn(s,this.left+i,this.right-this.lineWidths[a])),f.top+=this.top+e+i,f.left=o.leftForLtr(o.x(u),f.width),u+=f.width+i}else{let a=0,u=Gn(s,this.top+e+i,this.bottom-this.columnSizes[a].height);for(const f of n)f.col!==a&&(a=f.col,u=Gn(s,this.top+e+i,this.bottom-this.columnSizes[a].height)),f.top=u,f.left+=this.left+i,f.left=o.leftForLtr(o.x(f.left),f.width),u+=f.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;ea(e,this),this._draw(),ta(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:s,ctx:i}=this,{align:l,labels:o}=e,a=En.color,u=ji(e.rtl,this.left,this.width),f=Kn(o.font),{padding:h}=o,p=f.size,g=p/2;let m;this.drawTitle(),i.textAlign=u.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=f.string;const{boxWidth:b,boxHeight:_,itemHeight:y}=Vu(o,p),k=function(x,A,O){if(isNaN(b)||b<=0||isNaN(_)||_<0)return;i.save();const C=bt(O.lineWidth,1);if(i.fillStyle=bt(O.fillStyle,a),i.lineCap=bt(O.lineCap,"butt"),i.lineDashOffset=bt(O.lineDashOffset,0),i.lineJoin=bt(O.lineJoin,"miter"),i.lineWidth=C,i.strokeStyle=bt(O.strokeStyle,a),i.setLineDash(bt(O.lineDash,[])),o.usePointStyle){const R={radius:_*Math.SQRT2/2,pointStyle:O.pointStyle,rotation:O.rotation,borderWidth:C},L=u.xPlus(x,b/2),D=A+g;Kd(i,R,L,D,o.pointStyleWidth&&b)}else{const R=A+Math.max((p-_)/2,0),L=u.leftForLtr(x,b),D=Ni(O.borderRadius);i.beginPath(),Object.values(D).some(z=>z!==0)?wo(i,{x:L,y:R,w:b,h:_,radius:D}):i.rect(L,R,b,_),i.fill(),C!==0&&i.stroke()}i.restore()},w=function(x,A,O){Pl(i,O.text,x,A+y/2,f,{strikethrough:O.hidden,textAlign:u.textAlign(O.textAlign)})},S=this.isHorizontal(),P=this._computeTitleHeight();S?m={x:Gn(l,this.left+h,this.right-s[0]),y:this.top+h+P,line:0}:m={x:this.left+h,y:Gn(l,this.top+P+h,this.bottom-n[0].height),line:0},sp(this.ctx,e.textDirection);const M=y+h;this.legendItems.forEach((x,A)=>{i.strokeStyle=x.fontColor,i.fillStyle=x.fontColor;const O=i.measureText(x.text).width,C=u.textAlign(x.textAlign||(x.textAlign=o.textAlign)),R=b+g+O;let L=m.x,D=m.y;u.setWidth(this.width),S?A>0&&L+R+h>this.right&&(D=m.y+=M,m.line++,L=m.x=Gn(l,this.left+h,this.right-s[m.line])):A>0&&D+M>this.bottom&&(L=m.x=L+n[m.line].width+h,m.line++,D=m.y=Gn(l,this.top+P+h,this.bottom-n[m.line].height));const z=u.x(L);if(k(z,D,x),L=Jm(C,L+b+g,S?L+R:this.right,e.rtl),w(u.x(L),D,x),S)m.x+=R+h;else if(typeof x.text!="string"){const B=f.lineHeight;m.y+=wp(x,B)+h}else m.y+=M}),ip(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,s=Kn(n.font),i=Ts(n.padding);if(!n.display)return;const l=ji(e.rtl,this.left,this.width),o=this.ctx,a=n.position,u=s.size/2,f=i.top+u;let h,p=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),h=this.top+f,p=Gn(e.align,p,this.right-g);else{const b=this.columnSizes.reduce((_,y)=>Math.max(_,y.height),0);h=f+Gn(e.align,this.top,this.bottom-b-e.labels.padding-this._computeTitleHeight())}const m=Gn(a,p,p+g);o.textAlign=l.textAlign(Zr(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=s.string,Pl(o,n.text,m,h,s)}_computeTitleHeight(){const e=this.options.title,n=Kn(e.font),s=Ts(e.padding);return e.display?n.lineHeight+s.height:0}_getLegendItemAt(e,n){let s,i,l;if(ii(e,this.left,this.right)&&ii(n,this.top,this.bottom)){for(l=this.legendHitBoxes,s=0;s<l.length;++s)if(i=l[s],ii(e,i.left,i.left+i.width)&&ii(n,i.top,i.top+i.height))return this.legendItems[s]}return null}handleEvent(e){const n=this.options;if(!h_(e.type,n))return;const s=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,l=a_(i,s);i&&!l&&an(n.onLeave,[e,i,this],this),this._hoveredItem=s,s&&!l&&an(n.onHover,[e,s,this],this)}else s&&an(n.onClick,[e,s,this],this)}}function u_(t,e,n,s,i){const l=c_(s,t,e,n),o=f_(i,s,e.lineHeight);return{itemWidth:l,itemHeight:o}}function c_(t,e,n,s){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((l,o)=>l.length>o.length?l:o)),e+n.size/2+s.measureText(i).width}function f_(t,e,n){let s=t;return typeof e.text!="string"&&(s=wp(e,n)),s}function wp(t,e){const n=t.text?t.text.length:0;return e*n}function h_(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var ua={id:"legend",_element:Wu,start(t,e,n){const s=t.legend=new Wu({ctx:t.ctx,options:n,chart:t});ks.configure(t,s,n),ks.addBox(t,s)},stop(t){ks.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const s=t.legend;ks.configure(t,s,n),s.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const s=e.datasetIndex,i=n.chart;i.isDatasetVisible(s)?(i.hide(s),e.hidden=!0):(i.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:s,textAlign:i,color:l,useBorderRadius:o,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(u=>{const f=u.controller.getStyle(n?0:void 0),h=Ts(f.borderWidth);return{text:e[u.index].label,fillStyle:f.backgroundColor,fontColor:l,hidden:!u.visible,lineCap:f.borderCapStyle,lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:f.borderColor,pointStyle:s||f.pointStyle,rotation:f.rotation,textAlign:i||f.textAlign,borderRadius:o&&(a||f.borderRadius),datasetIndex:u.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class kp extends Ks{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=xn(s.text)?s.text.length:1;this._padding=Ts(s.padding);const l=i*Kn(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=l:this.width=l}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:s,bottom:i,right:l,options:o}=this,a=o.align;let u=0,f,h,p;return this.isHorizontal()?(h=Gn(a,s,l),p=n+e,f=l-s):(o.position==="left"?(h=s+e,p=Gn(a,i,n),u=Wt*-.5):(h=l-e,p=Gn(a,n,i),u=Wt*.5),f=i-n),{titleX:h,titleY:p,maxWidth:f,rotation:u}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const s=Kn(n.font),l=s.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:u,rotation:f}=this._drawArgs(l);Pl(e,n.text,0,0,s,{color:n.color,maxWidth:u,rotation:f,textAlign:Zr(n.align),textBaseline:"middle",translation:[o,a]})}}function d_(t,e){const n=new kp({ctx:t.ctx,options:e,chart:t});ks.configure(t,n,e),ks.addBox(t,n),t.titleBlock=n}var p_={id:"title",_element:kp,start(t,e,n){d_(t,n)},stop(t){const e=t.titleBlock;ks.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const s=t.titleBlock;ks.configure(t,s,n),s.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const cl={average(t){if(!t.length)return!1;let e,n,s=new Set,i=0,l=0;for(e=0,n=t.length;e<n;++e){const a=t[e].element;if(a&&a.hasValue()){const u=a.tooltipPosition();s.add(u.x),i+=u.y,++l}}return l===0||s.size===0?!1:{x:[...s].reduce((a,u)=>a+u)/s.size,y:i/l}},nearest(t,e){if(!t.length)return!1;let n=e.x,s=e.y,i=Number.POSITIVE_INFINITY,l,o,a;for(l=0,o=t.length;l<o;++l){const u=t[l].element;if(u&&u.hasValue()){const f=u.getCenterPoint(),h=Mr(e,f);h<i&&(i=h,a=u)}}if(a){const u=a.tooltipPosition();n=u.x,s=u.y}return{x:n,y:s}}};function Ls(t,e){return e&&(xn(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ws(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(\`
21213
- \`)>-1?t.split(\`
21214
- \`):t}function g_(t,e){const{element:n,datasetIndex:s,index:i}=e,l=t.getDatasetMeta(s).controller,{label:o,value:a}=l.getLabelAndValue(i);return{chart:t,label:o,parsed:l.getParsed(i),raw:t.data.datasets[s].data[i],formattedValue:a,dataset:l.getDataset(),dataIndex:i,datasetIndex:s,element:n}}function qu(t,e){const n=t.chart.ctx,{body:s,footer:i,title:l}=t,{boxWidth:o,boxHeight:a}=e,u=Kn(e.bodyFont),f=Kn(e.titleFont),h=Kn(e.footerFont),p=l.length,g=i.length,m=s.length,b=Ts(e.padding);let _=b.height,y=0,k=s.reduce((P,M)=>P+M.before.length+M.lines.length+M.after.length,0);if(k+=t.beforeBody.length+t.afterBody.length,p&&(_+=p*f.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),k){const P=e.displayColors?Math.max(a,u.lineHeight):u.lineHeight;_+=m*P+(k-m)*u.lineHeight+(k-1)*e.bodySpacing}g&&(_+=e.footerMarginTop+g*h.lineHeight+(g-1)*e.footerSpacing);let w=0;const S=function(P){y=Math.max(y,n.measureText(P).width+w)};return n.save(),n.font=f.string,Vt(t.title,S),n.font=u.string,Vt(t.beforeBody.concat(t.afterBody),S),w=e.displayColors?o+2+e.boxPadding:0,Vt(s,P=>{Vt(P.before,S),Vt(P.lines,S),Vt(P.after,S)}),w=0,n.font=h.string,Vt(t.footer,S),n.restore(),y+=b.width,{width:y,height:_}}function m_(t,e){const{y:n,height:s}=e;return n<s/2?"top":n>t.height-s/2?"bottom":"center"}function b_(t,e,n,s){const{x:i,width:l}=s,o=n.caretSize+n.caretPadding;if(t==="left"&&i+l+o>e.width||t==="right"&&i-l-o<0)return!0}function __(t,e,n,s){const{x:i,width:l}=n,{width:o,chartArea:{left:a,right:u}}=t;let f="center";return s==="center"?f=i<=(a+u)/2?"left":"right":i<=l/2?f="left":i>=o-l/2&&(f="right"),b_(f,t,e,n)&&(f="center"),f}function Gu(t,e,n){const s=n.yAlign||e.yAlign||m_(t,n);return{xAlign:n.xAlign||e.xAlign||__(t,e,n,s),yAlign:s}}function v_(t,e){let{x:n,width:s}=t;return e==="right"?n-=s:e==="center"&&(n-=s/2),n}function y_(t,e,n){let{y:s,height:i}=t;return e==="top"?s+=n:e==="bottom"?s-=i+n:s-=i/2,s}function Xu(t,e,n,s){const{caretSize:i,caretPadding:l,cornerRadius:o}=t,{xAlign:a,yAlign:u}=n,f=i+l,{topLeft:h,topRight:p,bottomLeft:g,bottomRight:m}=Ni(o);let b=v_(e,a);const _=y_(e,u,f);return u==="center"?a==="left"?b+=f:a==="right"&&(b-=f):a==="left"?b-=Math.max(h,g)+i:a==="right"&&(b+=Math.max(p,m)+i),{x:Jn(b,0,s.width-e.width),y:Jn(_,0,s.height-e.height)}}function to(t,e,n){const s=Ts(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-s.right:t.x+s.left}function Yu(t){return Ls([],Ws(t))}function w_(t,e,n){return xi(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Ju(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Sp={beforeTitle:Us,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,s=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return n[e.dataIndex]}return""},afterTitle:Us,beforeBody:Us,beforeLabel:Us,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Ft(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Us,afterBody:Us,beforeFooter:Us,footer:Us,afterFooter:Us};function ds(t,e,n,s){const i=t[e].call(n,s);return typeof i>"u"?Sp[e].call(n,s):i}class Ku extends Ks{static positioners=cl;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,s=this.options.setContext(this.getContext()),i=s.enabled&&n.options.animation&&s.animations,l=new op(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=w_(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:s}=n,i=ds(s,"beforeTitle",this,e),l=ds(s,"title",this,e),o=ds(s,"afterTitle",this,e);let a=[];return a=Ls(a,Ws(i)),a=Ls(a,Ws(l)),a=Ls(a,Ws(o)),a}getBeforeBody(e,n){return Yu(ds(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:s}=n,i=[];return Vt(e,l=>{const o={before:[],lines:[],after:[]},a=Ju(s,l);Ls(o.before,Ws(ds(a,"beforeLabel",this,l))),Ls(o.lines,ds(a,"label",this,l)),Ls(o.after,Ws(ds(a,"afterLabel",this,l))),i.push(o)}),i}getAfterBody(e,n){return Yu(ds(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:s}=n,i=ds(s,"beforeFooter",this,e),l=ds(s,"footer",this,e),o=ds(s,"afterFooter",this,e);let a=[];return a=Ls(a,Ws(i)),a=Ls(a,Ws(l)),a=Ls(a,Ws(o)),a}_createItems(e){const n=this._active,s=this.chart.data,i=[],l=[],o=[];let a=[],u,f;for(u=0,f=n.length;u<f;++u)a.push(g_(this.chart,n[u]));return e.filter&&(a=a.filter((h,p,g)=>e.filter(h,p,g,s))),e.itemSort&&(a=a.sort((h,p)=>e.itemSort(h,p,s))),Vt(a,h=>{const p=Ju(e.callbacks,h);i.push(ds(p,"labelColor",this,h)),l.push(ds(p,"labelPointStyle",this,h)),o.push(ds(p,"labelTextColor",this,h))}),this.labelColors=i,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=a,a}update(e,n){const s=this.options.setContext(this.getContext()),i=this._active;let l,o=[];if(!i.length)this.opacity!==0&&(l={opacity:0});else{const a=cl[s.position].call(this,i,this._eventPosition);o=this._createItems(s),this.title=this.getTitle(o,s),this.beforeBody=this.getBeforeBody(o,s),this.body=this.getBody(o,s),this.afterBody=this.getAfterBody(o,s),this.footer=this.getFooter(o,s);const u=this._size=qu(this,s),f=Object.assign({},a,u),h=Gu(this.chart,s,f),p=Xu(s,f,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,l={opacity:1,x:p.x,y:p.y,width:u.width,height:u.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,l&&this._resolveAnimations().update(this,l),e&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,s,i){const l=this.getCaretPosition(e,s,i);n.lineTo(l.x1,l.y1),n.lineTo(l.x2,l.y2),n.lineTo(l.x3,l.y3)}getCaretPosition(e,n,s){const{xAlign:i,yAlign:l}=this,{caretSize:o,cornerRadius:a}=s,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:p}=Ni(a),{x:g,y:m}=e,{width:b,height:_}=n;let y,k,w,S,P,M;return l==="center"?(P=m+_/2,i==="left"?(y=g,k=y-o,S=P+o,M=P-o):(y=g+b,k=y+o,S=P-o,M=P+o),w=y):(i==="left"?k=g+Math.max(u,h)+o:i==="right"?k=g+b-Math.max(f,p)-o:k=this.caretX,l==="top"?(S=m,P=S-o,y=k-o,w=k+o):(S=m+_,P=S+o,y=k+o,w=k-o),M=S),{x1:y,x2:k,x3:w,y1:S,y2:P,y3:M}}drawTitle(e,n,s){const i=this.title,l=i.length;let o,a,u;if(l){const f=ji(s.rtl,this.x,this.width);for(e.x=to(this,s.titleAlign,s),n.textAlign=f.textAlign(s.titleAlign),n.textBaseline="middle",o=Kn(s.titleFont),a=s.titleSpacing,n.fillStyle=s.titleColor,n.font=o.string,u=0;u<l;++u)n.fillText(i[u],f.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+a,u+1===l&&(e.y+=s.titleMarginBottom-a)}}_drawColorBox(e,n,s,i,l){const o=this.labelColors[s],a=this.labelPointStyles[s],{boxHeight:u,boxWidth:f}=l,h=Kn(l.bodyFont),p=to(this,"left",l),g=i.x(p),m=u<h.lineHeight?(h.lineHeight-u)/2:0,b=n.y+m;if(l.usePointStyle){const _={radius:Math.min(f,u)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},y=i.leftForLtr(g,f)+f/2,k=b+u/2;e.strokeStyle=l.multiKeyBackground,e.fillStyle=l.multiKeyBackground,Pr(e,_,y,k),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,Pr(e,_,y,k)}else{e.lineWidth=Ot(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const _=i.leftForLtr(g,f),y=i.leftForLtr(i.xPlus(g,1),f-2),k=Ni(o.borderRadius);Object.values(k).some(w=>w!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,wo(e,{x:_,y:b,w:f,h:u,radius:k}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),wo(e,{x:y,y:b+1,w:f-2,h:u-2,radius:k}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(_,b,f,u),e.strokeRect(_,b,f,u),e.fillStyle=o.backgroundColor,e.fillRect(y,b+1,f-2,u-2))}e.fillStyle=this.labelTextColors[s]}drawBody(e,n,s){const{body:i}=this,{bodySpacing:l,bodyAlign:o,displayColors:a,boxHeight:u,boxWidth:f,boxPadding:h}=s,p=Kn(s.bodyFont);let g=p.lineHeight,m=0;const b=ji(s.rtl,this.x,this.width),_=function(O){n.fillText(O,b.x(e.x+m),e.y+g/2),e.y+=g+l},y=b.textAlign(o);let k,w,S,P,M,x,A;for(n.textAlign=o,n.textBaseline="middle",n.font=p.string,e.x=to(this,y,s),n.fillStyle=s.bodyColor,Vt(this.beforeBody,_),m=a&&y!=="right"?o==="center"?f/2+h:f+2+h:0,P=0,x=i.length;P<x;++P){for(k=i[P],w=this.labelTextColors[P],n.fillStyle=w,Vt(k.before,_),S=k.lines,a&&S.length&&(this._drawColorBox(n,e,P,b,s),g=Math.max(p.lineHeight,u)),M=0,A=S.length;M<A;++M)_(S[M]),g=p.lineHeight;Vt(k.after,_)}m=0,g=p.lineHeight,Vt(this.afterBody,_),e.y-=l}drawFooter(e,n,s){const i=this.footer,l=i.length;let o,a;if(l){const u=ji(s.rtl,this.x,this.width);for(e.x=to(this,s.footerAlign,s),e.y+=s.footerMarginTop,n.textAlign=u.textAlign(s.footerAlign),n.textBaseline="middle",o=Kn(s.footerFont),n.fillStyle=s.footerColor,n.font=o.string,a=0;a<l;++a)n.fillText(i[a],u.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+s.footerSpacing}}drawBackground(e,n,s,i){const{xAlign:l,yAlign:o}=this,{x:a,y:u}=e,{width:f,height:h}=s,{topLeft:p,topRight:g,bottomLeft:m,bottomRight:b}=Ni(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+p,u),o==="top"&&this.drawCaret(e,n,s,i),n.lineTo(a+f-g,u),n.quadraticCurveTo(a+f,u,a+f,u+g),o==="center"&&l==="right"&&this.drawCaret(e,n,s,i),n.lineTo(a+f,u+h-b),n.quadraticCurveTo(a+f,u+h,a+f-b,u+h),o==="bottom"&&this.drawCaret(e,n,s,i),n.lineTo(a+m,u+h),n.quadraticCurveTo(a,u+h,a,u+h-m),o==="center"&&l==="left"&&this.drawCaret(e,n,s,i),n.lineTo(a,u+p),n.quadraticCurveTo(a,u,a+p,u),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,s=this.$animations,i=s&&s.x,l=s&&s.y;if(i||l){const o=cl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=qu(this,e),u=Object.assign({},o,this._size),f=Gu(n,e,u),h=Xu(e,u,f,n);(i._to!==h.x||l._to!==h.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},l={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const o=Ts(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=s,this.drawBackground(l,e,i,n),sp(e,n.textDirection),l.y+=o.top,this.drawTitle(l,e,n),this.drawBody(l,e,n),this.drawFooter(l,e,n),ip(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const s=this._active,i=e.map(({datasetIndex:a,index:u})=>{const f=this.chart.getDatasetMeta(a);if(!f)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:f.data[u],index:u}}),l=!_o(s,i),o=this._positionChanged(i,n);(l||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,s=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,l=this._active||[],o=this._getActiveElements(e,l,n,s),a=this._positionChanged(o,e),u=n||!_o(o,l)||a;return u&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),u}_getActiveElements(e,n,s,i){const l=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,l.mode,l,s);return l.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:s,caretY:i,options:l}=this,o=cl[l.position].call(this,e,n);return o!==!1&&(s!==o.x||i!==o.y)}}var ca={id:"tooltip",_element:Ku,positioners:cl,afterInit(t,e,n){n&&(t.tooltip=new Ku({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Sp},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const k_=(t,e,n,s)=>(typeof e=="string"?(n=t.push(e)-1,s.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function S_(t,e,n,s){const i=t.indexOf(e);if(i===-1)return k_(t,e,n,s);const l=t.lastIndexOf(e);return i!==l?n:i}const E_=(t,e)=>t===null?null:Jn(Math.round(t),0,e);function Zu(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Ep extends Zi{static id="category";static defaults={ticks:{callback:Zu}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const s=this.getLabels();for(const{index:i,label:l}of n)s[i]===l&&s.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(Ft(e))return null;const s=this.getLabels();return n=isFinite(n)&&s[n]===e?n:S_(s,e,bt(n,e),this._addedLabels),E_(n,s.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:s,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(s=0),n||(i=this.getLabels().length-1)),this.min=s,this.max=i}buildTicks(){const e=this.min,n=this.max,s=this.options.offset,i=[];let l=this.getLabels();l=e===0&&n===l.length-1?l:l.slice(e,n+1),this._valueRange=Math.max(l.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let o=e;o<=n;o++)i.push({value:o});return i}getLabelForValue(e){return Zu.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function T_(t,e){const n=[],{bounds:i,step:l,min:o,max:a,precision:u,count:f,maxTicks:h,maxDigits:p,includeBounds:g}=t,m=l||1,b=h-1,{min:_,max:y}=e,k=!Ft(o),w=!Ft(a),S=!Ft(f),P=(y-_)/(p+1);let M=Qa((y-_)/b/m)*m,x,A,O,C;if(M<1e-14&&!k&&!w)return[{value:_},{value:y}];C=Math.ceil(y/M)-Math.floor(_/M),C>b&&(M=Qa(C*M/b/m)*m),Ft(u)||(x=Math.pow(10,u),M=Math.ceil(M*x)/x),i==="ticks"?(A=Math.floor(_/M)*M,O=Math.ceil(y/M)*M):(A=_,O=y),k&&w&&l&&jm((a-o)/l,M/1e3)?(C=Math.round(Math.min((a-o)/M,h)),M=(a-o)/C,A=o,O=a):S?(A=k?o:A,O=w?a:O,C=f-1,M=(O-A)/C):(C=(O-A)/M,ml(C,Math.round(C),M/1e3)?C=Math.round(C):C=Math.ceil(C));const R=Math.max($a(M),$a(A));x=Math.pow(10,Ft(u)?R:u),A=Math.round(A*x)/x,O=Math.round(O*x)/x;let L=0;for(k&&(g&&A!==o?(n.push({value:o}),A<o&&L++,ml(Math.round((A+L*M)*x)/x,o,Qu(o,P,t))&&L++):A<o&&L++);L<C;++L){const D=Math.round((A+L*M)*x)/x;if(w&&D>a)break;n.push({value:D})}return w&&g&&O!==a?n.length&&ml(n[n.length-1].value,a,Qu(a,P,t))?n[n.length-1].value=a:n.push({value:a}):(!w||O===a)&&n.push({value:O}),n}function Qu(t,e,{horizontal:n,minRotation:s}){const i=Gs(s),l=(n?Math.sin(i):Math.cos(i))||.001,o=.75*e*(""+t).length;return Math.min(e/l,o)}class M_ extends Zi{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return Ft(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:s}=this.getUserBounds();let{min:i,max:l}=this;const o=u=>i=n?i:u,a=u=>l=s?l:u;if(e){const u=Bs(i),f=Bs(l);u<0&&f<0?a(0):u>0&&f>0&&o(0)}if(i===l){let u=l===0?1:Math.abs(l*.05);a(l+u),e||o(i-u)}this.min=i,this.max=l}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:s}=e,i;return s?(i=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,i>1e3&&(console.warn(\`scales.\${this.id}.ticks.stepSize: \${s} would result generating up to \${i} ticks. Limiting to 1000.\`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let s=this.getTickLimit();s=Math.max(2,s);const i={maxTicks:s,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},l=this._range||this,o=T_(i,l);return e.bounds==="ticks"&&zm(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,s=this.max;if(super.configure(),this.options.offset&&e.length){const i=(s-n)/Math.max(e.length-1,1)/2;n-=i,s+=i}this._startValue=n,this._endValue=s,this._valueRange=s-n}getLabelForValue(e){return $r(e,this.chart.options.locale,this.options.ticks.format)}}class Tp extends M_{static id="linear";static defaults={ticks:{callback:Jd.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Es(e)?e:0,this.max=Es(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,s=Gs(this.options.ticks.minRotation),i=(e?Math.sin(s):Math.cos(s))||.001,l=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,l.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const Lo={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},gs=Object.keys(Lo);function $u(t,e){return t-e}function ec(t,e){if(Ft(e))return null;const n=t._adapter,{parser:s,round:i,isoWeekday:l}=t._parseOpts;let o=e;return typeof s=="function"&&(o=s(o)),Es(o)||(o=typeof s=="string"?n.parse(o,s):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(Tl(l)||l===!0)?n.startOf(o,"isoWeek",l):n.startOf(o,i)),+o)}function tc(t,e,n,s){const i=gs.length;for(let l=gs.indexOf(t);l<i-1;++l){const o=Lo[gs[l]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-e)/(a*o.size))<=s)return gs[l]}return gs[i-1]}function C_(t,e,n,s,i){for(let l=gs.length-1;l>=gs.indexOf(n);l--){const o=gs[l];if(Lo[o].common&&t._adapter.diff(i,s,o)>=e-1)return o}return gs[n?gs.indexOf(n):0]}function P_(t){for(let e=gs.indexOf(t)+1,n=gs.length;e<n;++e)if(Lo[gs[e]].common)return gs[e]}function nc(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:s,hi:i}=Kr(n,e),l=n[s]>=e?n[s]:n[i];t[l]=!0}}function A_(t,e,n,s){const i=t._adapter,l=+i.startOf(e[0].value,s),o=e[e.length-1].value;let a,u;for(a=l;a<=o;a=+i.add(a,1,s))u=n[a],u>=0&&(e[u].major=!0);return e}function sc(t,e,n){const s=[],i={},l=e.length;let o,a;for(o=0;o<l;++o)a=e[o],i[a]=o,s.push({value:a,major:!1});return l===0||!n?s:A_(t,s,i,n)}class ic extends Zi{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const s=e.time||(e.time={}),i=this._adapter=new Ab._date(e.adapters.date);i.init(n),gl(s.displayFormats,i.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:ec(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,s=e.time.unit||"day";let{min:i,max:l,minDefined:o,maxDefined:a}=this.getUserBounds();function u(f){!o&&!isNaN(f.min)&&(i=Math.min(i,f.min)),!a&&!isNaN(f.max)&&(l=Math.max(l,f.max))}(!o||!a)&&(u(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&u(this.getMinMax(!1))),i=Es(i)&&!isNaN(i)?i:+n.startOf(Date.now(),s),l=Es(l)&&!isNaN(l)?l:+n.endOf(Date.now(),s)+1,this.min=Math.min(i,l-1),this.max=Math.max(i+1,l)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],s=e[e.length-1]),{min:n,max:s}}buildTicks(){const e=this.options,n=e.time,s=e.ticks,i=s.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const l=this.min,o=this.max,a=Gm(i,l,o);return this._unit=n.unit||(s.autoSkip?tc(n.minUnit,this.min,this.max,this._getLabelCapacity(l)):C_(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:P_(this._unit),this.initOffsets(i),e.reverse&&a.reverse(),sc(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,s=0,i,l;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,l=this.getDecimalForValue(e[e.length-1]),e.length===1?s=l:s=(l-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=Jn(n,0,o),s=Jn(s,0,o),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){const e=this._adapter,n=this.min,s=this.max,i=this.options,l=i.time,o=l.unit||tc(l.minUnit,n,s,this._getLabelCapacity(n)),a=bt(i.ticks.stepSize,1),u=o==="week"?l.isoWeekday:!1,f=Tl(u)||u===!0,h={};let p=n,g,m;if(f&&(p=+e.startOf(p,"isoWeek",u)),p=+e.startOf(p,f?"day":o),e.diff(s,n,o)>1e5*a)throw new Error(n+" and "+s+" are too far apart with stepSize of "+a+" "+o);const b=i.ticks.source==="data"&&this.getDataTimestamps();for(g=p,m=0;g<s;g=+e.add(g,a,o),m++)nc(h,g,b);return(g===s||i.bounds==="ticks"||m===1)&&nc(h,g,b),Object.keys(h).sort($u).map(_=>+_)}getLabelForValue(e){const n=this._adapter,s=this.options.time;return s.tooltipFormat?n.format(e,s.tooltipFormat):n.format(e,s.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,l=this._unit,o=n||i[l];return this._adapter.format(e,o)}_tickFormatFunction(e,n,s,i){const l=this.options,o=l.ticks.callback;if(o)return an(o,[e,n,s],this);const a=l.time.displayFormats,u=this._unit,f=this._majorUnit,h=u&&a[u],p=f&&a[f],g=s[n],m=f&&p&&g&&g.major;return this._adapter.format(e,i||(m?p:h))}generateTickLabels(e){let n,s,i;for(n=0,s=e.length;n<s;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,s=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+s)*n.factor)}getValueForPixel(e){const n=this._offsets,s=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+s*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,s=this.ctx.measureText(e).width,i=Gs(this.isHorizontal()?n.maxRotation:n.minRotation),l=Math.cos(i),o=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:s*l+a*o,h:s*o+a*l}}_getLabelCapacity(e){const n=this.options.time,s=n.displayFormats,i=s[n.unit]||s.millisecond,l=this._tickFormatFunction(e,0,sc(this,[e],this._majorUnit),i),o=this._getLabelSize(l),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,s;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,s=i.length;n<s;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,s;if(e.length)return e;const i=this.getLabels();for(n=0,s=i.length;n<s;++n)e.push(ec(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Gd(e.sort($u))}}function no(t,e,n){let s=0,i=t.length-1,l,o,a,u;n?(e>=t[s].pos&&e<=t[i].pos&&({lo:s,hi:i}=Si(t,"pos",e)),{pos:l,time:a}=t[s],{pos:o,time:u}=t[i]):(e>=t[s].time&&e<=t[i].time&&({lo:s,hi:i}=Si(t,"time",e)),{time:l,pos:a}=t[s],{time:o,pos:u}=t[i]);const f=o-l;return f?a+(u-a)*(e-l)/f:a}class nS extends ic{static id="timeseries";static defaults=ic.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=no(n,this.min),this._tableRange=no(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:s}=this,i=[],l=[];let o,a,u,f,h;for(o=0,a=e.length;o<a;++o)f=e[o],f>=n&&f<=s&&i.push(f);if(i.length<2)return[{time:n,pos:0},{time:s,pos:1}];for(o=0,a=i.length;o<a;++o)h=i[o+1],u=i[o-1],f=i[o],Math.round((h+u)/2)!==f&&l.push({time:f,pos:o/(a-1)});return l}_generate(){const e=this.min,n=this.max;let s=super.getDataTimestamps();return(!s.includes(e)||!s.length)&&s.splice(0,0,e),(!s.includes(n)||s.length===1)&&s.push(n),s.sort((i,l)=>i-l)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),s=this.getLabelTimestamps();return n.length&&s.length?e=this.normalize(n.concat(s)):e=n.length?n:s,e=this._cache.all=e,e}getDecimalForValue(e){return(no(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,s=this.getDecimalForPixel(e)/n.factor-n.end;return no(this._table,s*this._tableRange+this._minPos,!0)}}const lc=/^on/,Mp=[];Object.keys(globalThis).forEach(t=>{lc.test(t)&&Mp.push(t.replace(lc,""))});function Ho(t){const e=zi,n=[];function s(i){og(e,i)}ls(()=>{const i=t();Mp.forEach(i instanceof Element?l=>n.push(ee(i,l,s)):l=>n.push(i.$on(l,s)))}),Ai(()=>{for(;n.length;)n.pop()()})}function x_(t){let e,n=[t[1]],s={};for(let i=0;i<n.length;i+=1)s=Ss(s,n[i]);return{c(){e=d("canvas"),ng(e,s)},m(i,l){I(i,e,l),t[8](e)},p:Ae,i:Ae,o:Ae,d(i){i&&H(e),t[8](null)}}}function O_(t){let{data:e,type:n,options:s,plugins:i,children:l,$$scope:o,$$slots:a,...u}=t;return u}function R_(t,e,n){let{type:s}=e,{data:i={datasets:[]}}=e,{options:l={}}=e,{plugins:o=[]}=e,{updateMode:a=void 0}=e,{chart:u=null}=e,f,h=O_(e);ls(()=>{n(2,u=new pi(f,{type:s,data:i,options:l,plugins:o}))}),lg(()=>{u&&(n(2,u.data=i,u),Object.assign(u.options,l),u.update(a))}),Ai(()=>{u&&u.destroy(),n(2,u=null)}),Ho(()=>f);function p(g){wn[g?"unshift":"push"](()=>{f=g,n(0,f)})}return t.$$set=g=>{n(9,e=Ss(Ss({},e),ci(g))),"type"in g&&n(3,s=g.type),"data"in g&&n(4,i=g.data),"options"in g&&n(5,l=g.options),"plugins"in g&&n(6,o=g.plugins),"updateMode"in g&&n(7,a=g.updateMode),"chart"in g&&n(2,u=g.chart)},e=ci(e),[f,h,u,s,i,l,o,a,p]}class fa extends Gt{constructor(e){super(),qt(this,e,R_,x_,Nt,{type:3,data:4,options:5,plugins:6,updateMode:7,chart:2})}}function D_(t){let e,n,s;const i=[{type:"line"},t[1]];function l(a){t[4](a)}let o={};for(let a=0;a<i.length;a+=1)o=Ss(o,i[a]);return t[0]!==void 0&&(o.chart=t[0]),e=new fa({props:o}),t[3](e),wn.push(()=>Yn(e,"chart",l)),{c(){_t(e.$$.fragment)},m(a,u){pt(e,a,u),s=!0},p(a,[u]){const f=u&2?jr(i,[i[0],zr(a[1])]):{};!n&&u&1&&(n=!0,f.chart=a[0],Xn(()=>n=!1)),e.$set(f)},i(a){s||(ze(e.$$.fragment,a),s=!0)},o(a){Ue(e.$$.fragment,a),s=!1},d(a){t[3](null),gt(e,a)}}}function L_(t,e,n){pi.register(Pb);let{chart:s=null}=e,i,l;Ho(()=>l);function o(u){wn[u?"unshift":"push"](()=>{l=u,n(2,l)})}function a(u){s=u,n(0,s)}return t.$$set=u=>{n(5,e=Ss(Ss({},e),ci(u))),"chart"in u&&n(0,s=u.chart)},t.$$.update=()=>{n(1,i=e)},e=ci(e),[s,i,l,o,a]}class H_ extends Gt{constructor(e){super(),qt(this,e,L_,D_,Nt,{chart:0})}}function I_(t){let e,n,s;const i=[{type:"doughnut"},t[1]];function l(a){t[4](a)}let o={};for(let a=0;a<i.length;a+=1)o=Ss(o,i[a]);return t[0]!==void 0&&(o.chart=t[0]),e=new fa({props:o}),t[3](e),wn.push(()=>Yn(e,"chart",l)),{c(){_t(e.$$.fragment)},m(a,u){pt(e,a,u),s=!0},p(a,[u]){const f=u&2?jr(i,[i[0],zr(a[1])]):{};!n&&u&1&&(n=!0,f.chart=a[0],Xn(()=>n=!1)),e.$set(f)},i(a){s||(ze(e.$$.fragment,a),s=!0)},o(a){Ue(e.$$.fragment,a),s=!1},d(a){t[3](null),gt(e,a)}}}function B_(t,e,n){pi.register(Cb);let{chart:s=null}=e,i,l;Ho(()=>l);function o(u){wn[u?"unshift":"push"](()=>{l=u,n(2,l)})}function a(u){s=u,n(0,s)}return t.$$set=u=>{n(5,e=Ss(Ss({},e),ci(u))),"chart"in u&&n(0,s=u.chart)},t.$$.update=()=>{n(1,i=e)},e=ci(e),[s,i,l,o,a]}class F_ extends Gt{constructor(e){super(),qt(this,e,B_,I_,Nt,{chart:0})}}function N_(t){let e,n,s;const i=[{type:"bar"},t[1]];function l(a){t[4](a)}let o={};for(let a=0;a<i.length;a+=1)o=Ss(o,i[a]);return t[0]!==void 0&&(o.chart=t[0]),e=new fa({props:o}),t[3](e),wn.push(()=>Yn(e,"chart",l)),{c(){_t(e.$$.fragment)},m(a,u){pt(e,a,u),s=!0},p(a,[u]){const f=u&2?jr(i,[i[0],zr(a[1])]):{};!n&&u&1&&(n=!0,f.chart=a[0],Xn(()=>n=!1)),e.$set(f)},i(a){s||(ze(e.$$.fragment,a),s=!0)},o(a){Ue(e.$$.fragment,a),s=!1},d(a){t[3](null),gt(e,a)}}}function j_(t,e,n){pi.register(Tb);let{chart:s=null}=e,i,l;Ho(()=>l);function o(u){wn[u?"unshift":"push"](()=>{l=u,n(2,l)})}function a(u){s=u,n(0,s)}return t.$$set=u=>{n(5,e=Ss(Ss({},e),ci(u))),"chart"in u&&n(0,s=u.chart)},t.$$.update=()=>{n(1,i=e)},e=ci(e),[s,i,l,o,a]}class z_ extends Gt{constructor(e){super(),qt(this,e,j_,N_,Nt,{chart:0})}}const oc=typeof window<"u";function U_(){const{subscribe:t,set:e}=Ns({textColor:"rgba(255, 255, 255, 0.9)",gridColor:"rgba(255, 255, 255, 0.1)"});let n=null,s=null,i=!1;function l(){if(!oc)return;const u=document.createElement("div");u.className="text-base-content",u.style.position="absolute",u.style.visibility="hidden",document.body.appendChild(u);const f=getComputedStyle(u).color;document.body.removeChild(u);const h=f.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*[\\d.]+)?\\)/);if(h){const p=parseInt(h[1]),g=parseInt(h[2]),m=parseInt(h[3]),_=(p*299+g*587+m*114)/1e3<128?.2:.15,y=\`rgba(\${p}, \${g}, \${m}, \${_})\`;e({textColor:f,gridColor:y})}else e({textColor:"rgba(100, 100, 100, 0.9)",gridColor:"rgba(100, 100, 100, 0.2)"})}function o(){if(!oc||i)return;i=!0,l(),n=new MutationObserver(()=>{l()}),n.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class"]}),s=window.matchMedia("(prefers-color-scheme: dark)");const u=()=>l();s.addEventListener("change",u),typeof window<"u"&&window.addEventListener("beforeunload",()=>{a()})}function a(){n&&(n.disconnect(),n=null),s&&(s.removeEventListener("change",l),s=null),i=!1}return{subscribe:t,init:o,cleanup:a}}const Cs=U_();js(Cs,t=>t.textColor);js(Cs,t=>t.gridColor);function ha(t,e,n=!0){return{display:n&&!!t,text:t,color:e,font:{size:16,weight:"bold"}}}function V_(t,e={}){const{position:n="top",display:s=!0,padding:i=15,fontSize:l=11}=e;return{display:s,position:n,labels:{padding:i,font:{size:l},color:t}}}function To(t,e,n={}){const{stacked:s=!1,beginAtZero:i=!0,fontSize:l=11,maxRotation:o,minRotation:a,title:u}=n,f={stacked:s,beginAtZero:i,ticks:{font:{size:l},color:t},grid:{color:e}};return u&&(f.title={display:u.display,text:u.text,color:t}),o!==void 0&&(f.ticks.maxRotation=o),a!==void 0&&(f.ticks.minRotation=a),f}function Cp(t="index",e=!1){return{mode:t,intersect:e}}const fo=new Map,vl=new Map;function Pp(t){return fo.has(t)||fo.set(t,Ns({activeIndex:null})),fo.get(t)}function W_(t,e){vl.has(t)||vl.set(t,new Set),vl.get(t).add(e)}function q_(t,e){const n=vl.get(t);n&&(n.delete(e),n.size===0&&(vl.delete(t),fo.delete(t)))}function rc(t,e,n){Pp(t).set({activeIndex:e,sourceChartId:n})}function G_(t){let e=null,n=!1;return{id:\`chartSync-\${t}-\${Math.random().toString(36).substring(2,11)}\`,afterInit(i){W_(t,i),e=Pp(t).subscribe(o=>{n||(o.activeIndex!==null&&o.sourceChartId!==i.id?X_(i,o.activeIndex):o.activeIndex===null&&Y_(i))})},afterEvent(i,l){const o=l.event;if(o.type==="mousemove"){const a=i.getElementsAtEventForMode(o,"index",{axis:"x",intersect:!1},!1);if(a.length>0){const u=a[0].index;rc(t,u,i.id),l.changed=!0}}else o.type==="mouseout"&&(rc(t,null,i.id),l.changed=!0)},destroy(i){n=!0,e&&(e(),e=null),q_(t,i)}}}function X_(t,e){try{if(!t||!t.ctx||!t.tooltip||!t.data.datasets||t.data.datasets.length===0)return;const n=[];for(let s=0;s<t.data.datasets.length;s++){const i=t.data.datasets[s];if(!i.data||e<0||e>=i.data.length)continue;const l=t.getDatasetMeta(s);!l||!l.controller||!l.data||!l.data[e]||n.push({datasetIndex:s,index:e})}if(n.length===0)return;t.tooltip.setActiveElements(n,{x:0,y:0}),t.update("none")}catch(n){console.debug("Chart sync: tooltip update failed (chart may be destroying)",n)}}function Y_(t){try{if(!t||!t.ctx||!t.tooltip)return;t.tooltip.setActiveElements([],{x:0,y:0}),t.update("none")}catch(e){console.debug("Chart sync: tooltip hide failed (chart may be destroying)",e)}}function J_(t){let e,n,s;return n=new H_({props:{data:t[2],options:t[1],plugins:t[0]}}),{c(){e=d("div"),_t(n.$$.fragment),c(e,"class","w-full h-full")},m(i,l){I(i,e,l),pt(n,e,null),s=!0},p(i,[l]){const o={};l&4&&(o.data=i[2]),l&2&&(o.options=i[1]),l&1&&(o.plugins=i[0]),n.$set(o)},i(i){s||(ze(n.$$.fragment,i),s=!0)},o(i){Ue(n.$$.fragment,i),s=!1},d(i){i&&H(e),gt(n)}}}function K_(t,e,n){let s,i,l,o;Zt(t,Cs,g=>n(8,o=g)),pi.register(Ep,Tp,t_,e_,p_,ca,ua);let{title:a}=e,{labels:u}=e,{datasets:f}=e,{yAxisLabel:h=""}=e,{syncGroup:p=void 0}=e;return ls(()=>{Cs.init()}),Ai(()=>{Cs.cleanup()}),t.$$set=g=>{"title"in g&&n(3,a=g.title),"labels"in g&&n(4,u=g.labels),"datasets"in g&&n(5,f=g.datasets),"yAxisLabel"in g&&n(6,h=g.yAxisLabel),"syncGroup"in g&&n(7,p=g.syncGroup)},t.$$.update=()=>{t.$$.dirty&48&&n(2,s={labels:u,datasets:f.map(g=>({...g,borderColor:g.borderColor||"rgb(75, 192, 192)",backgroundColor:g.backgroundColor||"rgba(75, 192, 192, 0.2)",tension:g.tension??.4}))}),t.$$.dirty&360&&n(1,i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:f.length>1,position:"top",labels:{color:o.textColor}},title:ha(a,o.textColor,!0),tooltip:Cp("index",!1)},scales:{y:To(o.textColor,o.gridColor,{beginAtZero:!0,title:h?{display:!0,text:h}:void 0}),x:{...To(o.textColor,o.gridColor),ticks:{maxRotation:45,minRotation:0,autoSkip:!0,maxTicksLimit:10,color:o.textColor}}},interaction:{mode:"index",axis:"x",intersect:!1}}),t.$$.dirty&128&&n(0,l=p?[G_(p)]:[])},[l,i,s,a,u,f,h,p,o]}class so extends Gt{constructor(e){super(),qt(this,e,K_,J_,Nt,{title:3,labels:4,datasets:5,yAxisLabel:6,syncGroup:7})}}function Z_(t){let e,n,s;return n=new F_({props:{data:t[1],options:t[0]}}),{c(){e=d("div"),_t(n.$$.fragment),c(e,"class","w-full h-full")},m(i,l){I(i,e,l),pt(n,e,null),s=!0},p(i,[l]){const o={};l&2&&(o.data=i[1]),l&1&&(o.options=i[0]),n.$set(o)},i(i){s||(ze(n.$$.fragment,i),s=!0)},o(i){Ue(n.$$.fragment,i),s=!1},d(i){i&&H(e),gt(n)}}}function Q_(t,e,n){let s,i,l;Zt(t,Cs,u=>n(4,l=u)),pi.register(W2,ca,ua);let{data:o=[]}=e,{title:a=""}=e;return ls(()=>{Cs.init()}),Ai(()=>{Cs.cleanup()}),t.$$set=u=>{"data"in u&&n(2,o=u.data),"title"in u&&n(3,a=u.title)},t.$$.update=()=>{t.$$.dirty&20&&n(1,s={labels:o.map(u=>u.label),datasets:[{data:o.map(u=>u.value),backgroundColor:["rgba(59, 130, 246, 0.8)","rgba(16, 185, 129, 0.8)","rgba(245, 158, 11, 0.8)","rgba(239, 68, 68, 0.8)","rgba(168, 85, 247, 0.8)","rgba(236, 72, 153, 0.8)","rgba(20, 184, 166, 0.8)","rgba(251, 146, 60, 0.8)","rgba(132, 204, 22, 0.8)","rgba(148, 163, 184, 0.8)"],borderColor:l.gridColor,borderWidth:1}]}),t.$$.dirty&28&&n(0,i={responsive:!0,maintainAspectRatio:!1,plugins:{title:ha(a,l.textColor),legend:{position:"right",labels:{padding:10,font:{size:11},color:l.textColor,generateLabels:u=>{const h=u.data.datasets[0].backgroundColor,p=u.getDatasetMeta(0);return u.data.labels?.map((g,m)=>{const b=p.data[m],_=b&&typeof b.hidden<"u"?b.hidden:!1;return{text:\`\${g} (\${o[m]?.percentage||0}%)\`,fillStyle:h[m],strokeStyle:h[m],fontColor:l.textColor,hidden:_,index:m,datasetIndex:0}})||[]}},onClick:(u,f,h)=>{const p=f.index,g=h.chart,m=g.getDatasetMeta(0);m.data[p].hidden=!m.data[p].hidden,g.update()}},tooltip:{callbacks:{label:u=>{const f=u.label||"",h=u.parsed||0,p=o[u.dataIndex]?.percentage||0;return\`\${f}: \${h} (\${p}%)\`}}}}})},[i,s,o,a,l]}class Ap extends Gt{constructor(e){super(),qt(this,e,Q_,Z_,Nt,{data:2,title:3})}}function $_(t){let e,n,s;return n=new z_({props:{data:t[1],options:t[0]}}),{c(){e=d("div"),_t(n.$$.fragment),c(e,"class","w-full h-full")},m(i,l){I(i,e,l),pt(n,e,null),s=!0},p(i,[l]){const o={};l&2&&(o.data=i[1]),l&1&&(o.options=i[0]),n.$set(o)},i(i){s||(ze(n.$$.fragment,i),s=!0)},o(i){Ue(n.$$.fragment,i),s=!1},d(i){i&&H(e),gt(n)}}}function ev(t,e,n){let s,i,l;Zt(t,Cs,u=>n(4,l=u)),pi.register(r_,Ep,Tp,ca,ua);let{data:o=[]}=e,{title:a=""}=e;return ls(()=>{Cs.init()}),Ai(()=>{Cs.cleanup()}),t.$$set=u=>{"data"in u&&n(2,o=u.data),"title"in u&&n(3,a=u.title)},t.$$.update=()=>{t.$$.dirty&4&&n(1,s={labels:o.map(u=>u.label),datasets:[{label:"2xx",data:o.map(u=>u.status2xx),backgroundColor:"rgba(16, 185, 129, 0.8)",borderColor:"rgba(16, 185, 129, 1)",borderWidth:1},{label:"3xx",data:o.map(u=>u.status3xx),backgroundColor:"rgba(59, 130, 246, 0.8)",borderColor:"rgba(59, 130, 246, 1)",borderWidth:1},{label:"4xx",data:o.map(u=>u.status4xx),backgroundColor:"rgba(245, 158, 11, 0.8)",borderColor:"rgba(245, 158, 11, 1)",borderWidth:1},{label:"5xx",data:o.map(u=>u.status5xx),backgroundColor:"rgba(239, 68, 68, 0.8)",borderColor:"rgba(239, 68, 68, 1)",borderWidth:1}]}),t.$$.dirty&24&&n(0,i={responsive:!0,maintainAspectRatio:!1,scales:{x:To(l.textColor,l.gridColor,{stacked:!0,fontSize:10,maxRotation:45,minRotation:45}),y:To(l.textColor,l.gridColor,{stacked:!0,beginAtZero:!0,fontSize:11})},plugins:{title:ha(a,l.textColor),legend:V_(l.textColor,{position:"top",padding:15,fontSize:11}),tooltip:Cp("index",!1)}})},[i,s,o,a,l]}class tv extends Gt{constructor(e){super(),qt(this,e,ev,$_,Nt,{data:2,title:3})}}function nv(t){let e,n,s,i,l,o=t[11]("monitoring.noData")+"",a;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"class","stroke-current shrink-0 w-6 h-6"),c(e,"class","alert alert-info")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a)},p(u,f){f&2048&&o!==(o=u[11]("monitoring.noData")+"")&&T(a,o)},i:Ae,o:Ae,d(u){u&&H(e)}}}function sv(t){let e,n,s,i,l=t[11]("monitoring.charts.requestsTrend")+"",o,a,u,f,h,p,g,m,b=t[11]("monitoring.charts.responseTimeTrend")+"",_,y,k,w,S,P,M,x,A=t[11]("monitoring.charts.successRateTrend")+"",O,C,R,L,D,z,B,U,F=t[11]("monitoring.charts.errorsTrend")+"",V,Y,j,q,Q,X,re,K,W,G,J,le,se,N,te,Z,oe=t[11]("dashboard.upstreamFailures")+"",Se,me,Ee,ye,ge,be,He,Te,Pe,_e=t[11]("dashboard.upstreamStatusCodes")+"",De,ke,$,ae,ue,de;f=new so({props:{labels:t[10],datasets:[{label:t[11]("monitoring.charts.periodRequests"),data:t[9],borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.requests"),syncGroup:"monitoring-trends"}}),w=new so({props:{labels:t[10],datasets:[{label:t[11]("monitoring.charts.avgResponseTime"),data:t[7],borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.milliseconds"),syncGroup:"monitoring-trends"}}),L=new so({props:{labels:t[10],datasets:[{label:t[11]("monitoring.charts.successRate"),data:t[6],borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.percentage"),syncGroup:"monitoring-trends"}}),q=new so({props:{labels:t[10],datasets:[{label:t[11]("monitoring.charts.periodErrors"),data:t[8],borderColor:"rgb(239, 68, 68)",backgroundColor:"rgba(239, 68, 68, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.errors"),syncGroup:"monitoring-trends"}});const fe=[rv,ov],Be=[];function Qe(he,Re){return he[5].length>0?0:1}J=Qe(t),le=Be[J]=fe[J](t);const We=[uv,av],Ye=[];function nt(he,Re){return he[4].length>0?0:1}ye=nt(t),ge=Ye[ye]=We[ye](t);const Je=[fv,cv],rt=[];function lt(he,Re){return he[3].length>0?0:1}return ae=lt(t),ue=rt[ae]=Je[ae](t),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h3"),o=E(l),a=v(),u=d("div"),_t(f.$$.fragment),h=v(),p=d("div"),g=d("div"),m=d("h3"),_=E(b),y=v(),k=d("div"),_t(w.$$.fragment),S=v(),P=d("div"),M=d("div"),x=d("h3"),O=E(A),C=v(),R=d("div"),_t(L.$$.fragment),D=v(),z=d("div"),B=d("div"),U=d("h3"),V=E(F),Y=v(),j=d("div"),_t(q.$$.fragment),Q=v(),X=d("div"),re=d("div"),K=d("h3"),K.textContent="\u4E0A\u6E38\u6210\u529F\u7EDF\u8BA1",W=v(),G=d("div"),le.c(),se=v(),N=d("div"),te=d("div"),Z=d("h3"),Se=E(oe),me=v(),Ee=d("div"),ge.c(),be=v(),He=d("div"),Te=d("div"),Pe=d("h3"),De=E(_e),ke=v(),$=d("div"),ue.c(),c(i,"class","text-base font-semibold mb-3"),c(u,"class","h-64"),c(s,"class","card-body p-4"),c(n,"class","card bg-base-100 shadow-xl"),c(m,"class","text-base font-semibold mb-3"),c(k,"class","h-64"),c(g,"class","card-body p-4"),c(p,"class","card bg-base-100 shadow-xl"),c(x,"class","text-base font-semibold mb-3"),c(R,"class","h-64"),c(M,"class","card-body p-4"),c(P,"class","card bg-base-100 shadow-xl"),c(U,"class","text-base font-semibold mb-3"),c(j,"class","h-64"),c(B,"class","card-body p-4"),c(z,"class","card bg-base-100 shadow-xl"),c(K,"class","text-base font-semibold mb-3"),c(G,"class","h-64"),c(re,"class","card-body p-4"),c(X,"class","card bg-base-100 shadow-xl"),c(Z,"class","text-base font-semibold mb-3"),c(Ee,"class","h-64"),c(te,"class","card-body p-4"),c(N,"class","card bg-base-100 shadow-xl"),c(Pe,"class","text-base font-semibold mb-3"),c($,"class","h-64"),c(Te,"class","card-body p-4"),c(He,"class","card bg-base-100 shadow-xl lg:col-span-2"),c(e,"class","grid grid-cols-1 lg:grid-cols-2 gap-6")},m(he,Re){I(he,e,Re),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),pt(f,u,null),r(e,h),r(e,p),r(p,g),r(g,m),r(m,_),r(g,y),r(g,k),pt(w,k,null),r(e,S),r(e,P),r(P,M),r(M,x),r(x,O),r(M,C),r(M,R),pt(L,R,null),r(e,D),r(e,z),r(z,B),r(B,U),r(U,V),r(B,Y),r(B,j),pt(q,j,null),r(e,Q),r(e,X),r(X,re),r(re,K),r(re,W),r(re,G),Be[J].m(G,null),r(e,se),r(e,N),r(N,te),r(te,Z),r(Z,Se),r(te,me),r(te,Ee),Ye[ye].m(Ee,null),r(e,be),r(e,He),r(He,Te),r(Te,Pe),r(Pe,De),r(Te,ke),r(Te,$),rt[ae].m($,null),de=!0},p(he,Re){(!de||Re&2048)&&l!==(l=he[11]("monitoring.charts.requestsTrend")+"")&&T(o,l);const Le={};Re&1024&&(Le.labels=he[10]),Re&2560&&(Le.datasets=[{label:he[11]("monitoring.charts.periodRequests"),data:he[9],borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)"}]),Re&2048&&(Le.yAxisLabel=he[11]("monitoring.charts.requests")),f.$set(Le),(!de||Re&2048)&&b!==(b=he[11]("monitoring.charts.responseTimeTrend")+"")&&T(_,b);const ot={};Re&1024&&(ot.labels=he[10]),Re&2176&&(ot.datasets=[{label:he[11]("monitoring.charts.avgResponseTime"),data:he[7],borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)"}]),Re&2048&&(ot.yAxisLabel=he[11]("monitoring.charts.milliseconds")),w.$set(ot),(!de||Re&2048)&&A!==(A=he[11]("monitoring.charts.successRateTrend")+"")&&T(O,A);const Ge={};Re&1024&&(Ge.labels=he[10]),Re&2112&&(Ge.datasets=[{label:he[11]("monitoring.charts.successRate"),data:he[6],borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)"}]),Re&2048&&(Ge.yAxisLabel=he[11]("monitoring.charts.percentage")),L.$set(Ge),(!de||Re&2048)&&F!==(F=he[11]("monitoring.charts.errorsTrend")+"")&&T(V,F);const Ie={};Re&1024&&(Ie.labels=he[10]),Re&2304&&(Ie.datasets=[{label:he[11]("monitoring.charts.periodErrors"),data:he[8],borderColor:"rgb(239, 68, 68)",backgroundColor:"rgba(239, 68, 68, 0.1)"}]),Re&2048&&(Ie.yAxisLabel=he[11]("monitoring.charts.errors")),q.$set(Ie);let Ve=J;J=Qe(he),J===Ve?Be[J].p(he,Re):(ms(),Ue(Be[Ve],1,1,()=>{Be[Ve]=null}),bs(),le=Be[J],le?le.p(he,Re):(le=Be[J]=fe[J](he),le.c()),ze(le,1),le.m(G,null)),(!de||Re&2048)&&oe!==(oe=he[11]("dashboard.upstreamFailures")+"")&&T(Se,oe);let we=ye;ye=nt(he),ye===we?Ye[ye].p(he,Re):(ms(),Ue(Ye[we],1,1,()=>{Ye[we]=null}),bs(),ge=Ye[ye],ge?ge.p(he,Re):(ge=Ye[ye]=We[ye](he),ge.c()),ze(ge,1),ge.m(Ee,null)),(!de||Re&2048)&&_e!==(_e=he[11]("dashboard.upstreamStatusCodes")+"")&&T(De,_e);let Ke=ae;ae=lt(he),ae===Ke?rt[ae].p(he,Re):(ms(),Ue(rt[Ke],1,1,()=>{rt[Ke]=null}),bs(),ue=rt[ae],ue?ue.p(he,Re):(ue=rt[ae]=Je[ae](he),ue.c()),ze(ue,1),ue.m($,null))},i(he){de||(ze(f.$$.fragment,he),ze(w.$$.fragment,he),ze(L.$$.fragment,he),ze(q.$$.fragment,he),ze(le),ze(ge),ze(ue),de=!0)},o(he){Ue(f.$$.fragment,he),Ue(w.$$.fragment,he),Ue(L.$$.fragment,he),Ue(q.$$.fragment,he),Ue(le),Ue(ge),Ue(ue),de=!1},d(he){he&&H(e),gt(f),gt(w),gt(L),gt(q),Be[J].d(),Ye[ye].d(),rt[ae].d()}}}function iv(t){let e,n,s,i,l,o=t[11]("common.error")+"",a,u,f;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),u=E(": "),f=E(t[1]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){I(h,e,p),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a),r(l,u),r(l,f)},p(h,p){p&2048&&o!==(o=h[11]("common.error")+"")&&T(a,o),p&2&&T(f,h[1])},i:Ae,o:Ae,d(h){h&&H(e)}}}function lv(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){I(n,e,s)},p:Ae,i:Ae,o:Ae,d(n){n&&H(e)}}}function ov(t){let e,n,s,i,l,o=t[11]("dashboard.noData")+"",a;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","1.5"),c(s,"d","M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","h-12 w-12"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"stroke","currentColor"),c(l,"class","text-sm"),c(e,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a)},p(u,f){f&2048&&o!==(o=u[11]("dashboard.noData")+"")&&T(a,o)},i:Ae,o:Ae,d(u){u&&H(e)}}}function rv(t){let e,n;return e=new Ap({props:{data:t[5]}}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p(s,i){const l={};i&32&&(l.data=s[5]),e.$set(l)},i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function av(t){let e,n,s,i,l,o=t[11]("dashboard.noData")+"",a;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","1.5"),c(s,"d","M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","h-12 w-12"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"stroke","currentColor"),c(l,"class","text-sm"),c(e,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a)},p(u,f){f&2048&&o!==(o=u[11]("dashboard.noData")+"")&&T(a,o)},i:Ae,o:Ae,d(u){u&&H(e)}}}function uv(t){let e,n;return e=new Ap({props:{data:t[4]}}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p(s,i){const l={};i&16&&(l.data=s[4]),e.$set(l)},i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function cv(t){let e,n,s,i,l,o=t[11]("dashboard.noData")+"",a;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","1.5"),c(s,"d","M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","h-12 w-12"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"stroke","currentColor"),c(l,"class","text-sm"),c(e,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a)},p(u,f){f&2048&&o!==(o=u[11]("dashboard.noData")+"")&&T(a,o)},i:Ae,o:Ae,d(u){u&&H(e)}}}function fv(t){let e,n;return e=new tv({props:{data:t[3]}}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p(s,i){const l={};i&8&&(l.data=s[3]),e.$set(l)},i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function hv(t){let e,n,s,i=t[11]("monitoring.title")+"",l,o,a,u,f;const h=[lv,iv,sv,nv],p=[];function g(m,b){return m[2]&&!m[0]?0:m[1]?1:m[0]&&m[0].timestamps.length>0?2:3}return a=g(t),u=p[a]=h[a](t),{c(){e=d("div"),n=d("div"),s=d("h2"),l=E(i),o=v(),u.c(),c(s,"class","text-2xl font-bold"),c(e,"class","space-y-6")},m(m,b){I(m,e,b),r(e,n),r(n,s),r(s,l),r(e,o),p[a].m(e,null),f=!0},p(m,[b]){(!f||b&2048)&&i!==(i=m[11]("monitoring.title")+"")&&T(l,i);let _=a;a=g(m),a===_?p[a].p(m,b):(ms(),Ue(p[_],1,1,()=>{p[_]=null}),bs(),u=p[a],u?u.p(m,b):(u=p[a]=h[a](m),u.c()),ze(u,1),u.m(e,null))},i(m){f||(ze(u),f=!0)},o(m){Ue(u),f=!1},d(m){m&&H(e),p[a].d()}}}function dv(t,e,n){let s,i,l,o,a,u,f,h,p;Zt(t,xt,O=>n(11,p=O));let{selectedRange:g="1h"}=e,{onDataLoaded:m=()=>{}}=e,b=null,_=!0,y=null,k,w=[],S=[],P=[];async function M(){try{n(2,_=!0),n(0,b=await lm(g)),n(1,y=null)}catch(O){n(1,y=O.message)}finally{n(2,_=!1)}}async function x(){try{const[O,C,R]=await Promise.all([Wa(g,"success"),Wa(g,"failure"),om(g)]);n(14,w=O.data),n(15,S=C.data),n(16,P=R.data)}catch(O){console.error("Failed to load upstream stats:",O)}finally{}}async function A(){await Promise.all([M(),x()])}return ls(()=>{A(),k=setInterval(A,3e4)}),Ai(()=>{k&&clearInterval(k)}),t.$$set=O=>{"selectedRange"in O&&n(12,g=O.selectedRange),"onDataLoaded"in O&&n(13,m=O.onDataLoaded)},t.$$.update=()=>{t.$$.dirty&4096&&g&&A(),t.$$.dirty&8195&&(b!==null||y!==null)&&m(y?null:b),t.$$.dirty&4097&&n(10,s=b?.timestamps.map(O=>{const C=new Date(O);switch(g){case"1h":return C.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});case"12h":return C.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});case"24h":return C.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit"});default:return C.toLocaleTimeString("zh-CN")}})||[]),t.$$.dirty&1&&n(9,i=b?.requests||[]),t.$$.dirty&1&&n(8,l=b?.errors||[]),t.$$.dirty&1&&n(7,o=b?.responseTime||[]),t.$$.dirty&1&&n(6,a=b?.successRate||[]),t.$$.dirty&16384&&n(5,u=w.map(O=>({label:new URL(O.upstream).host,value:O.count,percentage:O.percentage}))),t.$$.dirty&32768&&n(4,f=S.filter(O=>O.failedRequests>0).sort((O,C)=>C.failedRequests-O.failedRequests).map(O=>({label:new URL(O.upstream).host,value:O.failedRequests,percentage:O.percentage}))),t.$$.dirty&65536&&n(3,h=P.map(O=>({label:new URL(O.upstream).host,status2xx:O.status2xx,status3xx:O.status3xx,status4xx:O.status4xx,status5xx:O.status5xx})))},[b,y,_,h,f,u,a,o,l,i,s,p,g,m,w,S,P]}class pv extends Gt{constructor(e){super(),qt(this,e,dv,hv,Nt,{selectedRange:12,onDataLoaded:13})}}function gv(t){let e,n,s,i,l=t[2]("dashboard.totalRequests")+"",o,a,u,f,h,p,g,m=t[2]("dashboard.requestsPerSecond")+"",b,_,y,k,w,S,P,M=t[2]("dashboard.successRate")+"",x,A,O,C,R,L,D,z=t[2]("dashboard.avgResponseTime")+"",B,U,F;return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h2"),o=E(l),a=v(),u=d("p"),u.textContent="-",f=v(),h=d("div"),p=d("div"),g=d("h2"),b=E(m),_=v(),y=d("p"),y.textContent="-",k=v(),w=d("div"),S=d("div"),P=d("h2"),x=E(M),A=v(),O=d("p"),O.textContent="-",C=v(),R=d("div"),L=d("div"),D=d("h2"),B=E(z),U=v(),F=d("p"),F.textContent="-",c(i,"class","card-title text-sm"),c(u,"class","text-3xl font-bold"),c(s,"class","card-body"),c(n,"class","card bg-base-100 shadow-xl"),c(g,"class","card-title text-sm"),c(y,"class","text-3xl font-bold"),c(p,"class","card-body"),c(h,"class","card bg-base-100 shadow-xl"),c(P,"class","card-title text-sm"),c(O,"class","text-3xl font-bold"),c(S,"class","card-body"),c(w,"class","card bg-base-100 shadow-xl"),c(D,"class","card-title text-sm"),c(F,"class","text-3xl font-bold"),c(L,"class","card-body"),c(R,"class","card bg-base-100 shadow-xl"),c(e,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(V,Y){I(V,e,Y),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(e,f),r(e,h),r(h,p),r(p,g),r(g,b),r(p,_),r(p,y),r(e,k),r(e,w),r(w,S),r(S,P),r(P,x),r(S,A),r(S,O),r(e,C),r(e,R),r(R,L),r(L,D),r(D,B),r(L,U),r(L,F)},p(V,Y){Y&4&&l!==(l=V[2]("dashboard.totalRequests")+"")&&T(o,l),Y&4&&m!==(m=V[2]("dashboard.requestsPerSecond")+"")&&T(b,m),Y&4&&M!==(M=V[2]("dashboard.successRate")+"")&&T(x,M),Y&4&&z!==(z=V[2]("dashboard.avgResponseTime")+"")&&T(B,z)},d(V){V&&H(e)}}}function mv(t){let e,n,s,i,l=t[2]("dashboard.totalRequests")+"",o,a,u,f=t[1].totalRequests+"",h,p,g,m,b,_=t[2]("dashboard.requestsPerSecond")+"",y,k,w,S=t[1].requestsPerSecond.toFixed(2)+"",P,M,x,A,O,C=t[2]("dashboard.successRate")+"",R,L,D,z=t[1].successRate.toFixed(1)+"",B,U,F,V,Y,j,q=t[2]("dashboard.avgResponseTime")+"",Q,X,re,K=t[1].avgResponseTime.toFixed(0)+"",W,G;return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h2"),o=E(l),a=v(),u=d("p"),h=E(f),p=v(),g=d("div"),m=d("div"),b=d("h2"),y=E(_),k=v(),w=d("p"),P=E(S),M=v(),x=d("div"),A=d("div"),O=d("h2"),R=E(C),L=v(),D=d("p"),B=E(z),U=E("%"),F=v(),V=d("div"),Y=d("div"),j=d("h2"),Q=E(q),X=v(),re=d("p"),W=E(K),G=E("ms"),c(i,"class","card-title text-sm"),c(u,"class","text-3xl font-bold"),c(s,"class","card-body"),c(n,"class","card bg-base-100 shadow-xl"),c(b,"class","card-title text-sm"),c(w,"class","text-3xl font-bold"),c(m,"class","card-body"),c(g,"class","card bg-base-100 shadow-xl"),c(O,"class","card-title text-sm"),c(D,"class","text-3xl font-bold"),c(A,"class","card-body"),c(x,"class","card bg-base-100 shadow-xl"),c(j,"class","card-title text-sm"),c(re,"class","text-3xl font-bold"),c(Y,"class","card-body"),c(V,"class","card bg-base-100 shadow-xl"),c(e,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(J,le){I(J,e,le),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(u,h),r(e,p),r(e,g),r(g,m),r(m,b),r(b,y),r(m,k),r(m,w),r(w,P),r(e,M),r(e,x),r(x,A),r(A,O),r(O,R),r(A,L),r(A,D),r(D,B),r(D,U),r(e,F),r(e,V),r(V,Y),r(Y,j),r(j,Q),r(Y,X),r(Y,re),r(re,W),r(re,G)},p(J,le){le&4&&l!==(l=J[2]("dashboard.totalRequests")+"")&&T(o,l),le&2&&f!==(f=J[1].totalRequests+"")&&T(h,f),le&4&&_!==(_=J[2]("dashboard.requestsPerSecond")+"")&&T(y,_),le&2&&S!==(S=J[1].requestsPerSecond.toFixed(2)+"")&&T(P,S),le&4&&C!==(C=J[2]("dashboard.successRate")+"")&&T(R,C),le&2&&z!==(z=J[1].successRate.toFixed(1)+"")&&T(B,z),le&4&&q!==(q=J[2]("dashboard.avgResponseTime")+"")&&T(Q,q),le&2&&K!==(K=J[1].avgResponseTime.toFixed(0)+"")&&T(W,K)},d(J){J&&H(e)}}}function bv(t){let e,n,s=t[2]("dashboard.title")+"",i,l,o,a,u=t[2]("dashboard.dataRange")+"",f,h,p=t[2]("monitoring.range."+t[0])+"",g,m,b,_,y,k,w,S=t[2]("monitoring.range.oneHour")+"",P,M,x,A,O,C,R=t[2]("monitoring.range.twelveHours")+"",L,D,z,B,U,F,V=t[2]("monitoring.range.twentyFourHours")+"",Y,j,q,Q,X,re,K,W;function G(se,N){return se[1]?mv:gv}let J=G(t),le=J(t);return Q=new pv({props:{selectedRange:t[0],onDataLoaded:t[3]}}),re=Fr(t[5][0]),{c(){e=d("div"),n=d("h1"),i=E(s),l=v(),o=d("div"),a=d("p"),f=E(u),h=E(": "),g=E(p),m=v(),b=d("div"),_=d("label"),y=d("input"),k=v(),w=d("span"),P=E(S),M=v(),x=d("label"),A=d("input"),O=v(),C=d("span"),L=E(R),D=v(),z=d("label"),B=d("input"),U=v(),F=d("span"),Y=E(V),j=v(),le.c(),q=v(),_t(Q.$$.fragment),c(n,"class","text-3xl font-bold mb-6"),c(a,"class","text-sm text-gray-500"),c(y,"class","sr-only"),c(y,"type","radio"),c(y,"name","range"),y.__value="1h",ne(y,y.__value),c(w,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(w,"bg-primary",t[0]==="1h"),ie(w,"text-primary-content",t[0]==="1h"),ie(w,"shadow",t[0]==="1h"),ie(w,"text-gray-700",t[0]!=="1h"),ie(w,"dark:text-gray-300",t[0]!=="1h"),ie(w,"hover:text-gray-900",t[0]!=="1h"),ie(w,"dark:hover:text-gray-100",t[0]!=="1h"),c(_,"class","cursor-pointer"),c(A,"class","sr-only"),c(A,"type","radio"),c(A,"name","range"),A.__value="12h",ne(A,A.__value),c(C,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(C,"bg-primary",t[0]==="12h"),ie(C,"text-primary-content",t[0]==="12h"),ie(C,"shadow",t[0]==="12h"),ie(C,"text-gray-700",t[0]!=="12h"),ie(C,"dark:text-gray-300",t[0]!=="12h"),ie(C,"hover:text-gray-900",t[0]!=="12h"),ie(C,"dark:hover:text-gray-100",t[0]!=="12h"),c(x,"class","cursor-pointer"),c(B,"class","sr-only"),c(B,"type","radio"),c(B,"name","range"),B.__value="24h",ne(B,B.__value),c(F,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(F,"bg-primary",t[0]==="24h"),ie(F,"text-primary-content",t[0]==="24h"),ie(F,"shadow",t[0]==="24h"),ie(F,"text-gray-700",t[0]!=="24h"),ie(F,"dark:text-gray-300",t[0]!=="24h"),ie(F,"hover:text-gray-900",t[0]!=="24h"),ie(F,"dark:hover:text-gray-100",t[0]!=="24h"),c(z,"class","cursor-pointer"),c(b,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm"),c(o,"class","flex justify-between items-center mb-6"),c(e,"class","p-6"),re.p(y,A,B)},m(se,N){I(se,e,N),r(e,n),r(n,i),r(e,l),r(e,o),r(o,a),r(a,f),r(a,h),r(a,g),r(o,m),r(o,b),r(b,_),r(_,y),y.checked=y.__value===t[0],r(_,k),r(_,w),r(w,P),r(b,M),r(b,x),r(x,A),A.checked=A.__value===t[0],r(x,O),r(x,C),r(C,L),r(b,D),r(b,z),r(z,B),B.checked=B.__value===t[0],r(z,U),r(z,F),r(F,Y),r(e,j),le.m(e,null),r(e,q),pt(Q,e,null),X=!0,K||(W=[ee(y,"change",t[4]),ee(A,"change",t[6]),ee(B,"change",t[7])],K=!0)},p(se,[N]){(!X||N&4)&&s!==(s=se[2]("dashboard.title")+"")&&T(i,s),(!X||N&4)&&u!==(u=se[2]("dashboard.dataRange")+"")&&T(f,u),(!X||N&5)&&p!==(p=se[2]("monitoring.range."+se[0])+"")&&T(g,p),N&1&&(y.checked=y.__value===se[0]),(!X||N&4)&&S!==(S=se[2]("monitoring.range.oneHour")+"")&&T(P,S),(!X||N&1)&&ie(w,"bg-primary",se[0]==="1h"),(!X||N&1)&&ie(w,"text-primary-content",se[0]==="1h"),(!X||N&1)&&ie(w,"shadow",se[0]==="1h"),(!X||N&1)&&ie(w,"text-gray-700",se[0]!=="1h"),(!X||N&1)&&ie(w,"dark:text-gray-300",se[0]!=="1h"),(!X||N&1)&&ie(w,"hover:text-gray-900",se[0]!=="1h"),(!X||N&1)&&ie(w,"dark:hover:text-gray-100",se[0]!=="1h"),N&1&&(A.checked=A.__value===se[0]),(!X||N&4)&&R!==(R=se[2]("monitoring.range.twelveHours")+"")&&T(L,R),(!X||N&1)&&ie(C,"bg-primary",se[0]==="12h"),(!X||N&1)&&ie(C,"text-primary-content",se[0]==="12h"),(!X||N&1)&&ie(C,"shadow",se[0]==="12h"),(!X||N&1)&&ie(C,"text-gray-700",se[0]!=="12h"),(!X||N&1)&&ie(C,"dark:text-gray-300",se[0]!=="12h"),(!X||N&1)&&ie(C,"hover:text-gray-900",se[0]!=="12h"),(!X||N&1)&&ie(C,"dark:hover:text-gray-100",se[0]!=="12h"),N&1&&(B.checked=B.__value===se[0]),(!X||N&4)&&V!==(V=se[2]("monitoring.range.twentyFourHours")+"")&&T(Y,V),(!X||N&1)&&ie(F,"bg-primary",se[0]==="24h"),(!X||N&1)&&ie(F,"text-primary-content",se[0]==="24h"),(!X||N&1)&&ie(F,"shadow",se[0]==="24h"),(!X||N&1)&&ie(F,"text-gray-700",se[0]!=="24h"),(!X||N&1)&&ie(F,"dark:text-gray-300",se[0]!=="24h"),(!X||N&1)&&ie(F,"hover:text-gray-900",se[0]!=="24h"),(!X||N&1)&&ie(F,"dark:hover:text-gray-100",se[0]!=="24h"),J===(J=G(se))&&le?le.p(se,N):(le.d(1),le=J(se),le&&(le.c(),le.m(e,q)));const te={};N&1&&(te.selectedRange=se[0]),Q.$set(te)},i(se){X||(ze(Q.$$.fragment,se),X=!0)},o(se){Ue(Q.$$.fragment,se),X=!1},d(se){se&&H(e),le.d(),gt(Q),re.r(),K=!1,ht(W)}}}function _v(t){switch(t){case"1h":return 3600;case"12h":return 43200;case"24h":return 86400;default:return 3600}}function vv(t,e,n){let s;Zt(t,xt,g=>n(2,s=g));let i="1h",l=null;function o(g){n(1,l=a(g))}function a(g){if(!g||g.requests.length===0)return null;const m=g.requests.reduce((S,P)=>S+P,0),b=_v(i),_=m/b,y=g.errors.reduce((S,P)=>S+P,0),k=m>0?(m-y)/m*100:100,w=g.responseTime.length>0?g.responseTime.reduce((S,P)=>S+P,0)/g.responseTime.length:0;return{totalRequests:m,requestsPerSecond:_,successRate:k,avgResponseTime:w}}const u=[[]];function f(){i=this.__value,n(0,i)}function h(){i=this.__value,n(0,i)}function p(){i=this.__value,n(0,i)}return[i,l,s,o,f,u,h,p]}class yv extends Gt{constructor(e){super(),qt(this,e,vv,bv,Nt,{})}}async function wv(){return yn.post("/system/reload",{})}async function kv(){return yn.post("/system/restart",{})}function fl(){const{subscribe:t,update:e}=Ns([]);let n=0;return{subscribe:t,show:(s,i="info",l=3e3)=>{const o=n++,a={id:o,message:s,type:i,duration:l};return e(u=>[...u,a]),l>0&&setTimeout(()=>{e(u=>u.filter(f=>f.id!==o))},l),o},success:(s,i=3e3)=>fl().show(s,"success",i),error:(s,i=4e3)=>fl().show(s,"error",i),warning:(s,i=3500)=>fl().show(s,"warning",i),info:(s,i=3e3)=>fl().show(s,"info",i),remove:s=>{e(i=>i.filter(l=>l.id!==s))},clear:()=>{e(()=>[])}}}const Et=fl();function ac(t,e,n){const s=t.slice();return s[13]=e[n],s[14]=e,s[15]=n,s}function uc(t){let e,n=t[5]("auth.helpText")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","label-text-alt text-xs")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l&32&&n!==(n=i[5]("auth.helpText")+"")&&T(s,n)},d(i){i&&H(e)}}}function cc(t){let e,n,s,i,l=t[5]("auth.tokens")+"",o,a,u=t[3].length+"",f,h,p,g,m,b,_,y,k,w,S=t[5]("auth.expressionSupport")+"",P,M,x,A,O,C,R,L,D=t[5]("auth.addToken")+"",z,B,U,F,V,Y,j,q=t[5]("auth.securityNotice")+"",Q,X,re,K=tt(t[3]),W=[];for(let G=0;G<K.length;G+=1)W[G]=fc(ac(t,K,G));return{c(){e=d("div"),n=d("input"),s=v(),i=d("div"),o=E(l),a=E(" ("),f=E(u),h=E(")"),p=v(),g=d("div"),m=d("div"),b=pe("svg"),_=pe("path"),y=v(),k=d("div"),w=d("div"),P=E(S),M=v(),x=d("div"),A=d("code"),A.textContent="{{ env.API_TOKEN }}",O=v();for(let G=0;G<W.length;G+=1)W[G].c();C=v(),R=d("button"),L=E("+ "),z=E(D),B=v(),U=d("div"),F=pe("svg"),V=pe("path"),Y=v(),j=d("div"),Q=E(q),c(n,"type","checkbox"),n.checked=!0,c(i,"class","collapse-title text-sm font-medium"),c(_,"stroke-linecap","round"),c(_,"stroke-linejoin","round"),c(_,"stroke-width","2"),c(_,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(b,"xmlns","http://www.w3.org/2000/svg"),c(b,"fill","none"),c(b,"viewBox","0 0 24 24"),c(b,"class","stroke-current shrink-0 w-4 h-4 opacity-60"),c(A,"class","text-xs bg-base-300 px-1 rounded"),c(x,"class","mt-1"),c(m,"class","text-xs text-base-content/60 bg-base-200 rounded p-3 flex gap-2"),c(R,"type","button"),c(R,"class","btn btn-sm btn-ghost"),c(g,"class","collapse-content space-y-2"),c(e,"class","collapse collapse-arrow bg-base-200 collapse-open"),c(V,"stroke-linecap","round"),c(V,"stroke-linejoin","round"),c(V,"stroke-width","2"),c(V,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),c(F,"xmlns","http://www.w3.org/2000/svg"),c(F,"fill","none"),c(F,"viewBox","0 0 24 24"),c(F,"class","stroke-current shrink-0 w-4 h-4"),c(U,"class","alert alert-warning shadow-sm text-xs")},m(G,J){I(G,e,J),r(e,n),r(e,s),r(e,i),r(i,o),r(i,a),r(i,f),r(i,h),r(e,p),r(e,g),r(g,m),r(m,b),r(b,_),r(m,y),r(m,k),r(k,w),r(w,P),r(k,M),r(k,x),r(x,A),r(g,O);for(let le=0;le<W.length;le+=1)W[le]&&W[le].m(g,null);r(g,C),r(g,R),r(R,L),r(R,z),I(G,B,J),I(G,U,J),r(U,F),r(F,V),r(U,Y),r(U,j),r(j,Q),X||(re=ee(R,"click",t[6]),X=!0)},p(G,J){if(J&32&&l!==(l=G[5]("auth.tokens")+"")&&T(o,l),J&8&&u!==(u=G[3].length+"")&&T(f,u),J&32&&S!==(S=G[5]("auth.expressionSupport")+"")&&T(P,S),J&168){K=tt(G[3]);let le;for(le=0;le<K.length;le+=1){const se=ac(G,K,le);W[le]?W[le].p(se,J):(W[le]=fc(se),W[le].c(),W[le].m(g,C))}for(;le<W.length;le+=1)W[le].d(1);W.length=K.length}J&32&&D!==(D=G[5]("auth.addToken")+"")&&T(z,D),J&32&&q!==(q=G[5]("auth.securityNotice")+"")&&T(Q,q)},d(G){G&&(H(e),H(B),H(U)),Tn(W,G),X=!1,re()}}}function fc(t){let e,n,s,i,l,o,a;function u(){t[11].call(n,t[15])}function f(){return t[12](t[15])}return{c(){e=d("div"),n=d("input"),i=v(),l=d("button"),l.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[5]("auth.tokenPlaceholder")),c(n,"class","input input-bordered input-sm flex-1 font-mono text-xs"),c(l,"type","button"),c(l,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(h,p){I(h,e,p),r(e,n),ne(n,t[3][t[15]]),r(e,i),r(e,l),o||(a=[ee(n,"input",u),ee(l,"click",f)],o=!0)},p(h,p){t=h,p&32&&s!==(s=t[5]("auth.tokenPlaceholder"))&&c(n,"placeholder",s),p&8&&n.value!==t[3][t[15]]&&ne(n,t[3][t[15]])},d(h){h&&H(e),o=!1,ht(a)}}}function Sv(t){let e,n,s,i,l,o,a,u,f,h,p,g,m=t[5]("auth.enableAuth")+"",b,_,y,k,w=t[1]&&uc(t),S=t[2]&&cc(t);return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=v(),w&&w.c(),o=v(),a=d("div"),u=d("div"),f=d("label"),h=d("input"),p=v(),g=d("span"),b=E(m),_=v(),S&&S.c(),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(h,"type","checkbox"),c(h,"class","checkbox"),c(g,"class","label-text"),c(f,"class","label cursor-pointer justify-start gap-4"),c(u,"class","form-control"),c(a,"class","space-y-4"),c(e,"class","form-control w-full")},m(P,M){I(P,e,M),r(e,n),r(n,s),r(s,i),r(n,l),w&&w.m(n,null),r(e,o),r(e,a),r(a,u),r(u,f),r(f,h),h.checked=t[2],r(f,p),r(f,g),r(g,b),r(a,_),S&&S.m(a,null),y||(k=[ee(h,"change",t[9]),ee(h,"change",t[10])],y=!0)},p(P,[M]){M&1&&T(i,P[0]),P[1]?w?w.p(P,M):(w=uc(P),w.c(),w.m(n,null)):w&&(w.d(1),w=null),M&4&&(h.checked=P[2]),M&32&&m!==(m=P[5]("auth.enableAuth")+"")&&T(b,m),P[2]?S?S.p(P,M):(S=cc(P),S.c(),S.m(a,null)):S&&(S.d(1),S=null)},i:Ae,o:Ae,d(P){P&&H(e),w&&w.d(),S&&S.d(),y=!1,ht(k)}}}function Ev(t,e,n){let s;Zt(t,xt,y=>n(5,s=y));let{value:i=void 0}=e,{label:l="Authentication"}=e,{showHelp:o=!0}=e,a=!1,u=[],f=!1;function h(){n(3,u=[...u,""]),n(4,f=!0)}function p(y){n(3,u=u.filter((k,w)=>w!==y))}function g(){a=this.checked,n(2,a),n(4,f),n(8,i),n(3,u)}const m=()=>{a&&u.length===0&&n(3,u=[""]),n(4,f=!0)};function b(y){u[y]=this.value,n(3,u),n(4,f),n(8,i),n(2,a)}const _=y=>p(y);return t.$$set=y=>{"value"in y&&n(8,i=y.value),"label"in y&&n(0,l=y.label),"showHelp"in y&&n(1,o=y.showHelp)},t.$$.update=()=>{if(t.$$.dirty&284)if(!f&&i&&(n(2,a=i.enabled||!1),n(3,u=i.tokens?[...i.tokens]:[]),n(4,f=!0)),a){const y=u.filter(k=>k.trim()!=="");i?(n(8,i.enabled=!0,i),n(8,i.tokens=y,i)):n(8,i={enabled:!0,tokens:y})}else i&&(n(8,i.enabled=!1,i),n(8,i.tokens=[],i))},[l,o,a,u,f,s,h,p,i,g,m,b,_]}class xp extends Gt{constructor(e){super(),qt(this,e,Ev,Sv,Nt,{value:8,label:0,showHelp:1})}}async function Tv(t={}){const e=new URLSearchParams;return Object.entries(t).forEach(([n,s])=>{s!=null&&(Array.isArray(s)?s.forEach(i=>e.append(n,String(i))):e.append(n,String(s)))}),yn.get(\`/logs?\${e.toString()}\`)}async function Mv(t={},e="json"){const n=new URLSearchParams;Object.entries(t).forEach(([i,l])=>{l!=null&&n.append(i,String(l))}),n.append("format",e);const s=await fetch(\`/__ui/api/logs/export?\${n.toString()}\`);if(!s.ok)throw new Error("Failed to export logs");return s.blob()}function Cv(t=1e3){return new EventSource(\`/__ui/api/logs/stream?interval=\${t}\`)}async function ar(t){return(await yn.get(\`/logs/body/\${t}\`)).content}async function ur(t){return yn.get(\`/logs/headers/\${t}\`)}async function Pv(){return yn.get("/logs/cleanup/config")}async function Av(){return yn.post("/logs/cleanup")}function hc(t){let e,n;return{c(){e=d("h3"),n=E(t[1]),c(e,"class","text-lg font-semibold")},m(s,i){I(s,e,i),r(e,n)},p(s,i){i&2&&T(n,s[1])},d(s){s&&H(e)}}}function dc(t){let e,n,s,i,l=t[6]("logging.maxSize")+"",o,a,u,f,h,p,g,m,b,_=t[6]("logging.maxSizeHelp")+"",y,k,w,S,P,M=t[6]("logging.retentionDays")+"",x,A,O,C,R,L,D=t[6]("logging.days")+"",z,B,U,F,V=t[6]("logging.retentionDaysHelp")+"",Y,j,q;return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),o=E(l),a=v(),u=d("div"),f=d("input"),h=v(),p=d("span"),p.textContent="KB",g=v(),m=d("div"),b=d("span"),y=E(_),k=v(),w=d("div"),S=d("label"),P=d("span"),x=E(M),A=v(),O=d("div"),C=d("input"),R=v(),L=d("span"),z=E(D),B=v(),U=d("div"),F=d("span"),Y=E(V),c(i,"class","label-text"),c(s,"class","label"),c(s,"for","logging-max-size"),c(f,"id","logging-max-size"),c(f,"type","number"),c(f,"class","input input-bordered flex-1"),c(f,"min","1024"),c(f,"max","102400"),c(f,"step","1024"),c(p,"class","text-sm text-gray-500"),c(u,"class","flex gap-2 items-center"),c(b,"class","label-text-alt"),c(m,"class","label"),c(n,"class","form-control"),c(P,"class","label-text"),c(S,"class","label"),c(S,"for","logging-retention-days"),c(C,"id","logging-retention-days"),c(C,"type","number"),c(C,"class","input input-bordered flex-1"),c(C,"min","1"),c(C,"max","30"),c(L,"class","text-sm text-gray-500"),c(O,"class","flex gap-2 items-center"),c(F,"class","label-text-alt"),c(U,"class","label"),c(w,"class","form-control"),c(e,"class","ml-8 space-y-4")},m(Q,X){I(Q,e,X),r(e,n),r(n,s),r(s,i),r(i,o),r(n,a),r(n,u),r(u,f),ne(f,t[0].body.maxSize),r(u,h),r(u,p),r(n,g),r(n,m),r(m,b),r(b,y),r(e,k),r(e,w),r(w,S),r(S,P),r(P,x),r(w,A),r(w,O),r(O,C),ne(C,t[0].body.retentionDays),r(O,R),r(O,L),r(L,z),r(w,B),r(w,U),r(U,F),r(F,Y),j||(q=[ee(f,"input",t[10]),ee(f,"input",t[7]),ee(C,"input",t[11]),ee(C,"input",t[7])],j=!0)},p(Q,X){X&64&&l!==(l=Q[6]("logging.maxSize")+"")&&T(o,l),X&1&&yt(f.value)!==Q[0].body.maxSize&&ne(f,Q[0].body.maxSize),X&64&&_!==(_=Q[6]("logging.maxSizeHelp")+"")&&T(y,_),X&64&&M!==(M=Q[6]("logging.retentionDays")+"")&&T(x,M),X&1&&yt(C.value)!==Q[0].body.retentionDays&&ne(C,Q[0].body.retentionDays),X&64&&D!==(D=Q[6]("logging.days")+"")&&T(z,D),X&64&&V!==(V=Q[6]("logging.retentionDaysHelp")+"")&&T(Y,V)},d(Q){Q&&H(e),j=!1,ht(q)}}}function xv(t){let e,n,s,i=t[6]("logging.cleanupStatus")+"",l,o,a,u=(t[2].isActive?t[6]("logging.active"):t[6]("logging.inactive"))+"",f,h,p,g,m,b=t[6]("logging.cleanupRetention")+"",_,y,k,w=t[2].retentionDays+"",S,P,M=t[6]("logging.days")+"",x,A,O,C,R=t[6]("logging.cleanupInterval")+"",L,D,z,B=t[2].scheduleIntervalHours+"",U,F,V=t[6]("logging.hours")+"",Y,j,q,Q,X=t[6]("logging.manualCleanup")+"",re,K,W,G,J;function le(Z,oe){return Z[4]?Dv:Rv}let se=le(t),N=se(t),te=t[5]&&pc(t);return{c(){e=d("div"),n=d("div"),s=d("span"),l=E(i),o=v(),a=d("span"),f=E(u),p=v(),g=d("div"),m=d("span"),_=E(b),y=v(),k=d("span"),S=E(w),P=v(),x=E(M),A=v(),O=d("div"),C=d("span"),L=E(R),D=v(),z=d("span"),U=E(B),F=v(),Y=E(V),j=v(),q=d("button"),N.c(),Q=v(),re=E(X),K=v(),te&&te.c(),W=Zn(),c(s,"class","text-gray-500"),c(a,"class",h="font-semibold "+(t[2].isActive?"text-success":"text-error")),c(n,"class","flex justify-between text-sm"),c(m,"class","text-gray-500"),c(k,"class","font-semibold"),c(g,"class","flex justify-between text-sm"),c(C,"class","text-gray-500"),c(z,"class","font-semibold"),c(O,"class","flex justify-between text-sm"),c(e,"class","bg-base-200 p-4 rounded-lg space-y-2"),c(q,"class","btn btn-outline btn-sm w-full"),q.disabled=t[4]},m(Z,oe){I(Z,e,oe),r(e,n),r(n,s),r(s,l),r(n,o),r(n,a),r(a,f),r(e,p),r(e,g),r(g,m),r(m,_),r(g,y),r(g,k),r(k,S),r(k,P),r(k,x),r(e,A),r(e,O),r(O,C),r(C,L),r(O,D),r(O,z),r(z,U),r(z,F),r(z,Y),I(Z,j,oe),I(Z,q,oe),N.m(q,null),r(q,Q),r(q,re),I(Z,K,oe),te&&te.m(Z,oe),I(Z,W,oe),G||(J=ee(q,"click",t[8]),G=!0)},p(Z,oe){oe&64&&i!==(i=Z[6]("logging.cleanupStatus")+"")&&T(l,i),oe&68&&u!==(u=(Z[2].isActive?Z[6]("logging.active"):Z[6]("logging.inactive"))+"")&&T(f,u),oe&4&&h!==(h="font-semibold "+(Z[2].isActive?"text-success":"text-error"))&&c(a,"class",h),oe&64&&b!==(b=Z[6]("logging.cleanupRetention")+"")&&T(_,b),oe&4&&w!==(w=Z[2].retentionDays+"")&&T(S,w),oe&64&&M!==(M=Z[6]("logging.days")+"")&&T(x,M),oe&64&&R!==(R=Z[6]("logging.cleanupInterval")+"")&&T(L,R),oe&4&&B!==(B=Z[2].scheduleIntervalHours+"")&&T(U,B),oe&64&&V!==(V=Z[6]("logging.hours")+"")&&T(Y,V),se!==(se=le(Z))&&(N.d(1),N=se(Z),N&&(N.c(),N.m(q,Q))),oe&64&&X!==(X=Z[6]("logging.manualCleanup")+"")&&T(re,X),oe&16&&(q.disabled=Z[4]),Z[5]?te?te.p(Z,oe):(te=pc(Z),te.c(),te.m(W.parentNode,W)):te&&(te.d(1),te=null)},d(Z){Z&&(H(e),H(j),H(q),H(K),H(W)),N.d(),te&&te.d(Z),G=!1,J()}}}function Ov(t){let e,n,s,i,l=t[6]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=v(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i),r(i,o)},p(a,u){u&64&&l!==(l=a[6]("common.loading")+"")&&T(o,l)},d(a){a&&H(e)}}}function Rv(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function Dv(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){I(n,e,s)},d(n){n&&H(e)}}}function pc(t){let e,n,s,i,l,o,a=t[6]("logging.lastCleanup")+"",u,f,h,p,g=t[6]("logging.deletedSqliteRecords")+"",m,b,_=t[5].deletedSqliteRecords+"",y,k,w,S=t[6]("logging.deletedFileLogFiles")+"",P,M,x=t[5].deletedFileLogFiles+"",A,O,C,R=t[6]("logging.deletedBodyFiles")+"",L,D,z=t[5].deletedBodyDirs+"",B,U,F=t[6]("logging.dirs")+"",V,Y,j=t[5].deletedBodyFiles+"",q,Q,X=t[6]("logging.files")+"",re,K,W,G=t[6]("logging.duration")+"",J,le,se=t[5].durationMs+"",N,te;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("div"),o=d("div"),u=E(a),f=v(),h=d("div"),p=d("div"),m=E(g),b=E(": "),y=E(_),k=v(),w=d("div"),P=E(S),M=E(": "),A=E(x),O=v(),C=d("div"),L=E(R),D=E(": "),B=E(z),U=v(),V=E(F),Y=E(", "),q=E(j),Q=v(),re=E(X),K=v(),W=d("div"),J=E(G),le=E(": "),N=E(se),te=E("ms"),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(o,"class","font-semibold"),c(h,"class","mt-1 space-y-1"),c(l,"class","text-sm"),c(e,"class","alert alert-success")},m(Z,oe){I(Z,e,oe),r(e,n),r(n,s),r(e,i),r(e,l),r(l,o),r(o,u),r(l,f),r(l,h),r(h,p),r(p,m),r(p,b),r(p,y),r(h,k),r(h,w),r(w,P),r(w,M),r(w,A),r(h,O),r(h,C),r(C,L),r(C,D),r(C,B),r(C,U),r(C,V),r(C,Y),r(C,q),r(C,Q),r(C,re),r(h,K),r(h,W),r(W,J),r(W,le),r(W,N),r(W,te)},p(Z,oe){oe&64&&a!==(a=Z[6]("logging.lastCleanup")+"")&&T(u,a),oe&64&&g!==(g=Z[6]("logging.deletedSqliteRecords")+"")&&T(m,g),oe&32&&_!==(_=Z[5].deletedSqliteRecords+"")&&T(y,_),oe&64&&S!==(S=Z[6]("logging.deletedFileLogFiles")+"")&&T(P,S),oe&32&&x!==(x=Z[5].deletedFileLogFiles+"")&&T(A,x),oe&64&&R!==(R=Z[6]("logging.deletedBodyFiles")+"")&&T(L,R),oe&32&&z!==(z=Z[5].deletedBodyDirs+"")&&T(B,z),oe&64&&F!==(F=Z[6]("logging.dirs")+"")&&T(V,F),oe&32&&j!==(j=Z[5].deletedBodyFiles+"")&&T(q,j),oe&64&&X!==(X=Z[6]("logging.files")+"")&&T(re,X),oe&64&&G!==(G=Z[6]("logging.duration")+"")&&T(J,G),oe&32&&se!==(se=Z[5].durationMs+"")&&T(N,se)},d(Z){Z&&H(e)}}}function Lv(t){let e,n,s,i,l,o,a,u,f=t[6]("logging.bodyRecording")+"",h,p,g,m=t[6]("logging.bodyRecordingHelp")+"",b,_,y,k,w,S,P=t[6]("logging.cleanupConfig")+"",M,x,A,O,C=t[1]&&hc(t),R=t[0].body.enabled&&dc(t);function L(B,U){if(B[3])return Ov;if(B[2])return xv}let D=L(t),z=D&&D(t);return{c(){e=d("div"),C&&C.c(),n=v(),s=d("div"),i=d("label"),l=d("input"),o=v(),a=d("div"),u=d("span"),h=E(f),p=v(),g=d("p"),b=E(m),_=v(),R&&R.c(),y=v(),k=d("div"),w=v(),S=d("h4"),M=E(P),x=v(),z&&z.c(),c(l,"type","checkbox"),c(l,"class","checkbox"),c(u,"class","label-text font-semibold"),c(g,"class","text-xs text-gray-500 mt-1"),c(a,"class","flex-1"),c(i,"class","label cursor-pointer justify-start gap-4"),c(s,"class","form-control"),c(k,"class","divider"),c(S,"class","font-semibold"),c(e,"class","space-y-4")},m(B,U){I(B,e,U),C&&C.m(e,null),r(e,n),r(e,s),r(s,i),r(i,l),l.checked=t[0].body.enabled,r(i,o),r(i,a),r(a,u),r(u,h),r(a,p),r(a,g),r(g,b),r(e,_),R&&R.m(e,null),r(e,y),r(e,k),r(e,w),r(e,S),r(S,M),r(e,x),z&&z.m(e,null),A||(O=[ee(l,"change",t[9]),ee(l,"change",t[7])],A=!0)},p(B,[U]){B[1]?C?C.p(B,U):(C=hc(B),C.c(),C.m(e,n)):C&&(C.d(1),C=null),U&1&&(l.checked=B[0].body.enabled),U&64&&f!==(f=B[6]("logging.bodyRecording")+"")&&T(h,f),U&64&&m!==(m=B[6]("logging.bodyRecordingHelp")+"")&&T(b,m),B[0].body.enabled?R?R.p(B,U):(R=dc(B),R.c(),R.m(e,y)):R&&(R.d(1),R=null),U&64&&P!==(P=B[6]("logging.cleanupConfig")+"")&&T(M,P),D===(D=L(B))&&z?z.p(B,U):(z&&z.d(1),z=D&&D(B),z&&(z.c(),z.m(e,null)))},i:Ae,o:Ae,d(B){B&&H(e),C&&C.d(),R&&R.d(),z&&z.d(),A=!1,ht(O)}}}function Hv(t,e,n){let s;Zt(t,xt,k=>n(6,s=k));let{value:i=null}=e,{label:l=""}=e;const o=Dl();let a=null,u=!1,f=!1,h=null;function p(){o("input")}async function g(){n(3,u=!0);try{n(2,a=await Pv())}catch(k){console.error("Failed to load cleanup config:",k),Et.show(s("common.error")+": "+(k instanceof Error?k.message:"Unknown error"),"error")}finally{n(3,u=!1)}}async function m(){if(confirm(s("logging.confirmCleanup"))){n(4,f=!0);try{n(5,h=await Av()),Et.show(s("logging.cleanupSuccess"),"success"),await g()}catch(k){console.error("Failed to trigger cleanup:",k),Et.show(s("logging.cleanupFailed",{values:{error:k instanceof Error?k.message:"Unknown error"}}),"error")}finally{n(4,f=!1)}}}ls(()=>{g()});function b(){i.body.enabled=this.checked,n(0,i)}function _(){i.body.maxSize=yt(this.value),n(0,i)}function y(){i.body.retentionDays=yt(this.value),n(0,i)}return t.$$set=k=>{"value"in k&&n(0,i=k.value),"label"in k&&n(1,l=k.label)},t.$$.update=()=>{t.$$.dirty&1&&(i||n(0,i={body:{enabled:!1,maxSize:5120,retentionDays:1}})),t.$$.dirty&1&&i&&!i.body&&n(0,i.body={enabled:!1,maxSize:5120,retentionDays:1},i)},[i,l,a,u,f,h,s,p,m,b,_,y]}class Iv extends Gt{constructor(e){super(),qt(this,e,Hv,Lv,Nt,{value:0,label:1})}}function Bv(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function Fv(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){I(n,e,s)},d(n){n&&H(e)}}}function Nv(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function jv(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){I(n,e,s)},d(n){n&&H(e)}}}function zv(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function Uv(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){I(n,e,s)},d(n){n&&H(e)}}}function Vv(t){let e,n,s,i,l,o=t[11]("configuration.formEditor")+"",a,u,f,h,p,g,m=t[11]("configuration.jsonEditor")+"",b,_,y,k,w,S,P,M,x;const A=[Xv,Gv],O=[];function C(R,L){return R[7]==="form"?0:1}return y=C(t),k=O[y]=A[y](t),P=Fr(t[20][0]),{c(){e=d("div"),n=d("label"),s=d("input"),i=v(),l=d("span"),a=E(o),u=v(),f=d("label"),h=d("input"),p=v(),g=d("span"),b=E(m),_=v(),k.c(),w=Zn(),c(s,"class","sr-only"),c(s,"type","radio"),c(s,"name","editMode"),s.__value="form",ne(s,s.__value),c(l,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(l,"bg-primary",t[7]==="form"),ie(l,"text-primary-content",t[7]==="form"),ie(l,"shadow",t[7]==="form"),ie(l,"text-gray-700",t[7]!=="form"),ie(l,"dark:text-gray-300",t[7]!=="form"),ie(l,"hover:text-gray-900",t[7]!=="form"),ie(l,"dark:hover:text-gray-100",t[7]!=="form"),c(n,"class","cursor-pointer"),c(h,"class","sr-only"),c(h,"type","radio"),c(h,"name","editMode"),h.__value="json",ne(h,h.__value),c(g,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(g,"bg-primary",t[7]==="json"),ie(g,"text-primary-content",t[7]==="json"),ie(g,"shadow",t[7]==="json"),ie(g,"text-gray-700",t[7]!=="json"),ie(g,"dark:text-gray-300",t[7]!=="json"),ie(g,"hover:text-gray-900",t[7]!=="json"),ie(g,"dark:hover:text-gray-100",t[7]!=="json"),c(f,"class","cursor-pointer"),c(e,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm mb-4"),P.p(s,h)},m(R,L){I(R,e,L),r(e,n),r(n,s),s.checked=s.__value===t[7],r(n,i),r(n,l),r(l,a),r(e,u),r(e,f),r(f,h),h.checked=h.__value===t[7],r(f,p),r(f,g),r(g,b),I(R,_,L),O[y].m(R,L),I(R,w,L),S=!0,M||(x=[ee(s,"change",t[19]),ee(h,"change",t[21])],M=!0)},p(R,L){L[0]&128&&(s.checked=s.__value===R[7]),(!S||L[0]&2048)&&o!==(o=R[11]("configuration.formEditor")+"")&&T(a,o),(!S||L[0]&128)&&ie(l,"bg-primary",R[7]==="form"),(!S||L[0]&128)&&ie(l,"text-primary-content",R[7]==="form"),(!S||L[0]&128)&&ie(l,"shadow",R[7]==="form"),(!S||L[0]&128)&&ie(l,"text-gray-700",R[7]!=="form"),(!S||L[0]&128)&&ie(l,"dark:text-gray-300",R[7]!=="form"),(!S||L[0]&128)&&ie(l,"hover:text-gray-900",R[7]!=="form"),(!S||L[0]&128)&&ie(l,"dark:hover:text-gray-100",R[7]!=="form"),L[0]&128&&(h.checked=h.__value===R[7]),(!S||L[0]&2048)&&m!==(m=R[11]("configuration.jsonEditor")+"")&&T(b,m),(!S||L[0]&128)&&ie(g,"bg-primary",R[7]==="json"),(!S||L[0]&128)&&ie(g,"text-primary-content",R[7]==="json"),(!S||L[0]&128)&&ie(g,"shadow",R[7]==="json"),(!S||L[0]&128)&&ie(g,"text-gray-700",R[7]!=="json"),(!S||L[0]&128)&&ie(g,"dark:text-gray-300",R[7]!=="json"),(!S||L[0]&128)&&ie(g,"hover:text-gray-900",R[7]!=="json"),(!S||L[0]&128)&&ie(g,"dark:hover:text-gray-100",R[7]!=="json");let D=y;y=C(R),y===D?O[y].p(R,L):(ms(),Ue(O[D],1,1,()=>{O[D]=null}),bs(),k=O[y],k?k.p(R,L):(k=O[y]=A[y](R),k.c()),ze(k,1),k.m(w.parentNode,w))},i(R){S||(ze(k),S=!0)},o(R){Ue(k),S=!1},d(R){R&&(H(e),H(_),H(w)),O[y].d(R),P.r(),M=!1,ht(x)}}}function Wv(t){let e,n,s,i,l,o=t[11]("common.error")+"",a,u,f;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),u=E(": "),f=E(t[2]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){I(h,e,p),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a),r(l,u),r(l,f)},p(h,p){p[0]&2048&&o!==(o=h[11]("common.error")+"")&&T(a,o),p[0]&4&&T(f,h[2])},i:Ae,o:Ae,d(h){h&&H(e)}}}function qv(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){I(n,e,s)},p:Ae,i:Ae,o:Ae,d(n){n&&H(e)}}}function Gv(t){let e,n,s,i=t[11]("configuration.jsonConfiguration")+"",l,o,a,u,f,h,p,g=t[11]("configuration.jsonHelp")+"",m,b,_,y=t[9]&&gc(t);return{c(){e=d("div"),n=d("div"),s=d("h2"),l=E(i),o=v(),y&&y.c(),a=v(),u=d("textarea"),h=v(),p=d("p"),m=E(g),c(s,"class","card-title"),c(u,"class","textarea textarea-bordered font-mono text-sm h-96"),c(u,"placeholder",f=t[11]("configuration.jsonPlaceholder")),c(p,"class","text-sm text-gray-500 mt-2"),c(n,"class","card-body"),c(e,"class","card bg-base-100 shadow-xl")},m(k,w){I(k,e,w),r(e,n),r(n,s),r(s,l),r(n,o),y&&y.m(n,null),r(n,a),r(n,u),ne(u,t[8]),r(n,h),r(n,p),r(p,m),b||(_=[ee(u,"input",t[28]),ee(u,"input",t[12])],b=!0)},p(k,w){w[0]&2048&&i!==(i=k[11]("configuration.jsonConfiguration")+"")&&T(l,i),k[9]?y?y.p(k,w):(y=gc(k),y.c(),y.m(n,a)):y&&(y.d(1),y=null),w[0]&2048&&f!==(f=k[11]("configuration.jsonPlaceholder"))&&c(u,"placeholder",f),w[0]&256&&ne(u,k[8]),w[0]&2048&&g!==(g=k[11]("configuration.jsonHelp")+"")&&T(m,g)},i:Ae,o:Ae,d(k){k&&H(e),y&&y.d(),b=!1,ht(_)}}}function Xv(t){let e,n,s,i=t[11]("configuration.systemSettings")+"",l,o,a,u,f,h=t[11]("configuration.serverPort")+"",p,g,m,b,_,y,k,w=t[11]("configuration.workerProcesses")+"",S,P,M,x,A,O,C=t[11]("configuration.workerProcessesHelp")+"",R,L,D,z,B,U=t[11]("configuration.logLevel")+"",F,V,Y,j,q,Q,X,re,K,W,G,J=t[11]("configuration.bodyParserLimit")+"",le,se,N,te,Z,oe,Se=t[11]("configuration.bodyParserLimitHelp")+"",me,Ee,ye,ge,be,He,Te,Pe,_e,De,ke,$,ae,ue,de=t[11]("configuration.requiresRestart")+"",fe,Be,Qe,We,Ye,nt=t[11]("logging.title")+"",Je,rt,lt,he,Re,Le,ot,Ge,Ie=t[11]("routes.title")+"",Ve,we,Ke,ve,Xe,Ct,$e,je=t[11]("configuration.routesConfigured",{values:{count:t[1].routes.length}})+"",At,it,mt=t[11]("configuration.manageRoutes")+"",Lt,xe,at,Ne;function st(Fe){t[26](Fe)}let jt={label:t[11]("auth.globalAuth")};t[1].auth!==void 0&&(jt.value=t[1].auth),be=new xp({props:jt}),wn.push(()=>Yn(be,"value",st));function Rn(Fe){t[27](Fe)}let gn={};return t[1].logging!==void 0&&(gn.value=t[1].logging),lt=new Iv({props:gn}),wn.push(()=>Yn(lt,"value",Rn)),{c(){e=d("div"),n=d("div"),s=d("h2"),l=E(i),o=v(),a=d("div"),u=d("label"),f=d("span"),p=E(h),g=v(),m=d("input"),b=v(),_=d("div"),y=d("label"),k=d("span"),S=E(w),P=v(),M=d("input"),x=v(),A=d("div"),O=d("span"),R=E(C),L=v(),D=d("div"),z=d("label"),B=d("span"),F=E(U),V=v(),Y=d("select"),j=d("option"),j.textContent="Debug",q=d("option"),q.textContent="Info",Q=d("option"),Q.textContent="Warning",X=d("option"),X.textContent="Error",re=v(),K=d("div"),W=d("label"),G=d("span"),le=E(J),se=v(),N=d("input"),te=v(),Z=d("div"),oe=d("span"),me=E(Se),Ee=v(),ye=d("div"),ge=v(),_t(be.$$.fragment),Te=v(),Pe=d("div"),_e=v(),De=d("div"),ke=pe("svg"),$=pe("path"),ae=v(),ue=d("span"),fe=E(de),Be=v(),Qe=d("div"),We=d("div"),Ye=d("h2"),Je=E(nt),rt=v(),_t(lt.$$.fragment),Re=v(),Le=d("div"),ot=d("div"),Ge=d("h2"),Ve=E(Ie),we=v(),Ke=d("div"),ve=pe("svg"),Xe=pe("path"),Ct=v(),$e=d("span"),At=E(je),it=v(),Lt=E(mt),c(s,"class","card-title"),c(f,"class","label-text"),c(u,"class","label"),c(u,"for","config-port"),c(m,"id","config-port"),c(m,"type","number"),c(m,"class","input input-bordered"),c(m,"placeholder","8088"),c(a,"class","form-control"),c(k,"class","label-text"),c(y,"class","label"),c(y,"for","config-workers"),c(M,"id","config-workers"),c(M,"type","number"),c(M,"class","input input-bordered"),c(M,"min","1"),c(M,"placeholder","2"),c(O,"class","label-text-alt"),c(A,"class","label"),c(_,"class","form-control"),c(B,"class","label-text"),c(z,"class","label"),c(z,"for","config-log-level"),j.__value="debug",ne(j,j.__value),q.__value="info",ne(q,q.__value),Q.__value="warn",ne(Q,Q.__value),X.__value="error",ne(X,X.__value),c(Y,"id","config-log-level"),c(Y,"class","select select-bordered"),t[1].logLevel===void 0&&vs(()=>t[24].call(Y)),c(D,"class","form-control"),c(G,"class","label-text"),c(W,"class","label"),c(W,"for","config-body-limit"),c(N,"id","config-body-limit"),c(N,"type","text"),c(N,"class","input input-bordered"),c(N,"placeholder","50mb"),c(oe,"class","label-text-alt"),c(Z,"class","label"),c(K,"class","form-control"),c(ye,"class","divider"),c(Pe,"class","divider"),c($,"stroke-linecap","round"),c($,"stroke-linejoin","round"),c($,"stroke-width","2"),c($,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),c(ke,"xmlns","http://www.w3.org/2000/svg"),c(ke,"class","stroke-current shrink-0 h-6 w-6"),c(ke,"fill","none"),c(ke,"viewBox","0 0 24 24"),c(De,"class","alert alert-warning"),c(n,"class","card-body"),c(e,"class","card bg-base-100 shadow-xl mb-4"),c(Ye,"class","card-title"),c(We,"class","card-body"),c(Qe,"class","card bg-base-100 shadow-xl mb-4"),c(Ge,"class","card-title"),c(Xe,"stroke-linecap","round"),c(Xe,"stroke-linejoin","round"),c(Xe,"stroke-width","2"),c(Xe,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(ve,"xmlns","http://www.w3.org/2000/svg"),c(ve,"fill","none"),c(ve,"viewBox","0 0 24 24"),c(ve,"class","stroke-current shrink-0 w-6 h-6"),c(Ke,"class","alert alert-info"),c(ot,"class","card-body"),c(Le,"class","card bg-base-100 shadow-xl")},m(Fe,ut){I(Fe,e,ut),r(e,n),r(n,s),r(s,l),r(n,o),r(n,a),r(a,u),r(u,f),r(f,p),r(a,g),r(a,m),ne(m,t[1].port),r(n,b),r(n,_),r(_,y),r(y,k),r(k,S),r(_,P),r(_,M),ne(M,t[1].workers),r(_,x),r(_,A),r(A,O),r(O,R),r(n,L),r(n,D),r(D,z),r(z,B),r(B,F),r(D,V),r(D,Y),r(Y,j),r(Y,q),r(Y,Q),r(Y,X),Cn(Y,t[1].logLevel,!0),r(n,re),r(n,K),r(K,W),r(W,G),r(G,le),r(K,se),r(K,N),ne(N,t[1].bodyParserLimit),r(K,te),r(K,Z),r(Z,oe),r(oe,me),r(n,Ee),r(n,ye),r(n,ge),pt(be,n,null),r(n,Te),r(n,Pe),r(n,_e),r(n,De),r(De,ke),r(ke,$),r(De,ae),r(De,ue),r(ue,fe),I(Fe,Be,ut),I(Fe,Qe,ut),r(Qe,We),r(We,Ye),r(Ye,Je),r(We,rt),pt(lt,We,null),I(Fe,Re,ut),I(Fe,Le,ut),r(Le,ot),r(ot,Ge),r(Ge,Ve),r(ot,we),r(ot,Ke),r(Ke,ve),r(ve,Xe),r(Ke,Ct),r(Ke,$e),r($e,At),r($e,it),r($e,Lt),xe=!0,at||(Ne=[ee(m,"input",t[22]),ee(M,"input",t[23]),ee(Y,"change",t[24]),ee(N,"input",t[25])],at=!0)},p(Fe,ut){(!xe||ut[0]&2048)&&i!==(i=Fe[11]("configuration.systemSettings")+"")&&T(l,i),(!xe||ut[0]&2048)&&h!==(h=Fe[11]("configuration.serverPort")+"")&&T(p,h),ut[0]&2&&yt(m.value)!==Fe[1].port&&ne(m,Fe[1].port),(!xe||ut[0]&2048)&&w!==(w=Fe[11]("configuration.workerProcesses")+"")&&T(S,w),ut[0]&2&&yt(M.value)!==Fe[1].workers&&ne(M,Fe[1].workers),(!xe||ut[0]&2048)&&C!==(C=Fe[11]("configuration.workerProcessesHelp")+"")&&T(R,C),(!xe||ut[0]&2048)&&U!==(U=Fe[11]("configuration.logLevel")+"")&&T(F,U),ut[0]&2&&Cn(Y,Fe[1].logLevel),(!xe||ut[0]&2048)&&J!==(J=Fe[11]("configuration.bodyParserLimit")+"")&&T(le,J),ut[0]&2&&N.value!==Fe[1].bodyParserLimit&&ne(N,Fe[1].bodyParserLimit),(!xe||ut[0]&2048)&&Se!==(Se=Fe[11]("configuration.bodyParserLimitHelp")+"")&&T(me,Se);const un={};ut[0]&2048&&(un.label=Fe[11]("auth.globalAuth")),!He&&ut[0]&2&&(He=!0,un.value=Fe[1].auth,Xn(()=>He=!1)),be.$set(un),(!xe||ut[0]&2048)&&de!==(de=Fe[11]("configuration.requiresRestart")+"")&&T(fe,de),(!xe||ut[0]&2048)&&nt!==(nt=Fe[11]("logging.title")+"")&&T(Je,nt);const Rt={};!he&&ut[0]&2&&(he=!0,Rt.value=Fe[1].logging,Xn(()=>he=!1)),lt.$set(Rt),(!xe||ut[0]&2048)&&Ie!==(Ie=Fe[11]("routes.title")+"")&&T(Ve,Ie),(!xe||ut[0]&2050)&&je!==(je=Fe[11]("configuration.routesConfigured",{values:{count:Fe[1].routes.length}})+"")&&T(At,je),(!xe||ut[0]&2048)&&mt!==(mt=Fe[11]("configuration.manageRoutes")+"")&&T(Lt,mt)},i(Fe){xe||(ze(be.$$.fragment,Fe),ze(lt.$$.fragment,Fe),xe=!0)},o(Fe){Ue(be.$$.fragment,Fe),Ue(lt.$$.fragment,Fe),xe=!1},d(Fe){Fe&&(H(e),H(Be),H(Qe),H(Re),H(Le)),gt(be),gt(lt),at=!1,ht(Ne)}}}function gc(t){let e,n,s,i,l,o=t[11]("configuration.jsonParseError",{values:{error:t[9]}})+"",a;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error mb-4")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a)},p(u,f){f[0]&2560&&o!==(o=u[11]("configuration.jsonParseError",{values:{error:u[9]}})+"")&&T(a,o)},d(u){u&&H(e)}}}function Yv(t){let e,n,s,i,l=t[11]("configuration.title")+"",o,a,u,f=t[11]("configuration.subtitle")+"",h,p,g,m,b,_,y,k=t[11]("configuration.export")+"",w,S,P,M,x,A,O,C=t[11]("configuration.import")+"",R,L,D,z,B=t[11]("configuration.save")+"",U,F,V,Y,j,q=t[11]("configuration.reload")+"",Q,X,re,K,W,G=t[11]("configuration.restart")+"",J,le,se,N,te,Z,oe,Se,me,Ee,ye,ge=t[11]("configuration.confirmRestart")+"",be,He,Te,Pe=t[11]("configuration.restartMessage")+"",_e,De,ke,$,ae,ue,de,fe=t[11]("configuration.restartWarning")+"",Be,Qe,We,Ye,nt=t[11]("common.cancel")+"",Je,rt,lt,he,Re,Le,ot=t[11]("configuration.restart")+"",Ge,Ie,Ve,we;function Ke(Ne,st){return Ne[6]?Fv:Bv}let ve=Ke(t),Xe=ve(t);function Ct(Ne,st){return Ne[4]?jv:Nv}let $e=Ct(t),je=$e(t);function At(Ne,st){return Ne[5]?Uv:zv}let it=At(t),mt=it(t);const Lt=[qv,Wv,Vv],xe=[];function at(Ne,st){return Ne[3]?0:Ne[2]?1:Ne[1]?2:-1}return~(N=at(t))&&(te=xe[N]=Lt[N](t)),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h1"),o=E(l),a=v(),u=d("p"),h=E(f),p=v(),g=d("div"),m=d("button"),b=pe("svg"),_=pe("path"),y=v(),w=E(k),P=v(),M=d("button"),x=pe("svg"),A=pe("path"),O=v(),R=E(C),L=v(),D=d("button"),Xe.c(),z=v(),U=E(B),V=v(),Y=d("button"),je.c(),j=v(),Q=E(q),re=v(),K=d("button"),mt.c(),W=v(),J=E(G),se=v(),te&&te.c(),Z=v(),oe=d("input"),Se=v(),me=d("div"),Ee=d("div"),ye=d("h3"),be=E(ge),He=v(),Te=d("p"),_e=E(Pe),De=v(),ke=d("div"),$=pe("svg"),ae=pe("path"),ue=v(),de=d("span"),Be=E(fe),Qe=v(),We=d("div"),Ye=d("button"),Je=E(nt),rt=v(),lt=d("button"),he=pe("svg"),Re=pe("path"),Le=v(),Ge=E(ot),c(i,"class","text-3xl font-bold"),c(u,"class","text-sm text-gray-500 mt-1"),c(_,"stroke-linecap","round"),c(_,"stroke-linejoin","round"),c(_,"stroke-width","2"),c(_,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(b,"xmlns","http://www.w3.org/2000/svg"),c(b,"class","h-4 w-4"),c(b,"fill","none"),c(b,"viewBox","0 0 24 24"),c(b,"stroke","currentColor"),c(m,"class","btn btn-outline btn-sm"),m.disabled=S=t[3]||!t[0],c(A,"stroke-linecap","round"),c(A,"stroke-linejoin","round"),c(A,"stroke-width","2"),c(A,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),c(x,"xmlns","http://www.w3.org/2000/svg"),c(x,"class","h-4 w-4"),c(x,"fill","none"),c(x,"viewBox","0 0 24 24"),c(x,"stroke","currentColor"),c(M,"class","btn btn-outline btn-sm"),M.disabled=t[3],c(D,"class","btn btn-success btn-sm"),D.disabled=F=t[6]||t[3]||!!t[9],c(Y,"class","btn btn-primary btn-sm"),Y.disabled=X=t[4]||t[3],c(K,"class","btn btn-warning btn-sm"),K.disabled=le=t[5]||t[3],c(g,"class","flex gap-2"),c(n,"class","flex justify-between items-center mb-6"),c(oe,"type","checkbox"),c(oe,"class","modal-toggle"),c(ye,"class","font-bold text-lg"),c(Te,"class","py-4"),c(ae,"stroke-linecap","round"),c(ae,"stroke-linejoin","round"),c(ae,"stroke-width","2"),c(ae,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),c($,"xmlns","http://www.w3.org/2000/svg"),c($,"class","stroke-current shrink-0 h-6 w-6"),c($,"fill","none"),c($,"viewBox","0 0 24 24"),c(ke,"class","alert alert-warning"),c(Ye,"class","btn btn-ghost"),c(Re,"stroke-linecap","round"),c(Re,"stroke-linejoin","round"),c(Re,"stroke-width","2"),c(Re,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),c(he,"xmlns","http://www.w3.org/2000/svg"),c(he,"class","h-4 w-4 mr-1"),c(he,"fill","none"),c(he,"viewBox","0 0 24 24"),c(he,"stroke","currentColor"),c(lt,"class","btn btn-warning"),c(We,"class","modal-action"),c(Ee,"class","modal-box"),c(me,"class","modal"),ie(me,"modal-open",t[10]),c(e,"class","p-6")},m(Ne,st){I(Ne,e,st),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(u,h),r(n,p),r(n,g),r(g,m),r(m,b),r(b,_),r(m,y),r(m,w),r(g,P),r(g,M),r(M,x),r(x,A),r(M,O),r(M,R),r(g,L),r(g,D),Xe.m(D,null),r(D,z),r(D,U),r(g,V),r(g,Y),je.m(Y,null),r(Y,j),r(Y,Q),r(g,re),r(g,K),mt.m(K,null),r(K,W),r(K,J),r(e,se),~N&&xe[N].m(e,null),r(e,Z),r(e,oe),oe.checked=t[10],r(e,Se),r(e,me),r(me,Ee),r(Ee,ye),r(ye,be),r(Ee,He),r(Ee,Te),r(Te,_e),r(Ee,De),r(Ee,ke),r(ke,$),r($,ae),r(ke,ue),r(ke,de),r(de,Be),r(Ee,Qe),r(Ee,We),r(We,Ye),r(Ye,Je),r(We,rt),r(We,lt),r(lt,he),r(he,Re),r(lt,Le),r(lt,Ge),Ie=!0,Ve||(we=[ee(m,"click",t[14]),ee(M,"click",t[15]),ee(D,"click",t[13]),ee(Y,"click",t[16]),ee(K,"click",t[18]),ee(oe,"change",t[29]),ee(Ye,"click",t[30]),ee(lt,"click",t[17])],Ve=!0)},p(Ne,st){(!Ie||st[0]&2048)&&l!==(l=Ne[11]("configuration.title")+"")&&T(o,l),(!Ie||st[0]&2048)&&f!==(f=Ne[11]("configuration.subtitle")+"")&&T(h,f),(!Ie||st[0]&2048)&&k!==(k=Ne[11]("configuration.export")+"")&&T(w,k),(!Ie||st[0]&9&&S!==(S=Ne[3]||!Ne[0]))&&(m.disabled=S),(!Ie||st[0]&2048)&&C!==(C=Ne[11]("configuration.import")+"")&&T(R,C),(!Ie||st[0]&8)&&(M.disabled=Ne[3]),ve!==(ve=Ke(Ne))&&(Xe.d(1),Xe=ve(Ne),Xe&&(Xe.c(),Xe.m(D,z))),(!Ie||st[0]&2048)&&B!==(B=Ne[11]("configuration.save")+"")&&T(U,B),(!Ie||st[0]&584&&F!==(F=Ne[6]||Ne[3]||!!Ne[9]))&&(D.disabled=F),$e!==($e=Ct(Ne))&&(je.d(1),je=$e(Ne),je&&(je.c(),je.m(Y,j))),(!Ie||st[0]&2048)&&q!==(q=Ne[11]("configuration.reload")+"")&&T(Q,q),(!Ie||st[0]&24&&X!==(X=Ne[4]||Ne[3]))&&(Y.disabled=X),it!==(it=At(Ne))&&(mt.d(1),mt=it(Ne),mt&&(mt.c(),mt.m(K,W))),(!Ie||st[0]&2048)&&G!==(G=Ne[11]("configuration.restart")+"")&&T(J,G),(!Ie||st[0]&40&&le!==(le=Ne[5]||Ne[3]))&&(K.disabled=le);let jt=N;N=at(Ne),N===jt?~N&&xe[N].p(Ne,st):(te&&(ms(),Ue(xe[jt],1,1,()=>{xe[jt]=null}),bs()),~N?(te=xe[N],te?te.p(Ne,st):(te=xe[N]=Lt[N](Ne),te.c()),ze(te,1),te.m(e,Z)):te=null),st[0]&1024&&(oe.checked=Ne[10]),(!Ie||st[0]&2048)&&ge!==(ge=Ne[11]("configuration.confirmRestart")+"")&&T(be,ge),(!Ie||st[0]&2048)&&Pe!==(Pe=Ne[11]("configuration.restartMessage")+"")&&T(_e,Pe),(!Ie||st[0]&2048)&&fe!==(fe=Ne[11]("configuration.restartWarning")+"")&&T(Be,fe),(!Ie||st[0]&2048)&&nt!==(nt=Ne[11]("common.cancel")+"")&&T(Je,nt),(!Ie||st[0]&2048)&&ot!==(ot=Ne[11]("configuration.restart")+"")&&T(Ge,ot),(!Ie||st[0]&1024)&&ie(me,"modal-open",Ne[10])},i(Ne){Ie||(ze(te),Ie=!0)},o(Ne){Ue(te),Ie=!1},d(Ne){Ne&&H(e),Xe.d(),je.d(),mt.d(),~N&&xe[N].d(),Ve=!1,ht(we)}}}function Jv(t,e,n){let s;Zt(t,xt,j=>n(11,s=j));let i=null,l=null,o=null,a=!0,u=!1,f=!1,h=!1,p="form",g="",m=null,b=!1;async function _(){try{n(0,i=await qr()),n(1,l=JSON.parse(JSON.stringify(i))),n(8,g=JSON.stringify(i,null,2)),n(2,o=null)}catch(j){n(2,o=j.message)}finally{n(3,a=!1)}}function y(){n(9,m=null);try{n(1,l=JSON.parse(g))}catch(j){n(9,m=j.message)}}async function k(){if(l){n(6,h=!0);try{const j=await im(l);if(!j.valid){Et.show(s("configuration.validationFailed",{values:{error:j.error}}),"error");return}const q=await sm(l);q.success?(Et.show(s("configuration.saved"),"success"),n(0,i=JSON.parse(JSON.stringify(l)))):Et.show(s("configuration.saveFailed",{values:{error:q.message}}),"error")}catch(j){Et.show(s("configuration.saveFailed",{values:{error:j.message}}),"error")}finally{n(6,h=!1)}}}function w(){if(!i)return;const j=JSON.stringify(i,null,2),q="data:application/json;charset=utf-8,"+encodeURIComponent(j),Q=\`bungee-config-\${new Date().toISOString().split("T")[0]}.json\`,X=document.createElement("a");X.setAttribute("href",q),X.setAttribute("download",Q),X.click(),Et.show(s("configuration.exported"),"success")}function S(){const j=document.createElement("input");j.type="file",j.accept=".json",j.onchange=async q=>{const Q=q.target.files[0];if(Q)try{const X=await Q.text(),re=JSON.parse(X);n(1,l=re),n(8,g=JSON.stringify(re,null,2)),Et.show(s("configuration.imported"),"success")}catch(X){Et.show(s("configuration.importFailed",{values:{error:X.message}}),"error")}},j.click()}async function P(){n(4,u=!0);try{const j=await wv();j.success?(Et.show(s("configuration.reloaded"),"success"),await _()):Et.show(s("configuration.reloadFailed",{values:{error:j.message}}),"error")}catch(j){Et.show(s("configuration.reloadFailed",{values:{error:j.message}}),"error")}finally{n(4,u=!1)}}async function M(){n(10,b=!1),n(5,f=!0);try{const j=await kv();j.success?Et.show(s("configuration.restartSent"),"success"):j.error&&j.error.includes("daemon mode")?Et.show(s("configuration.restartDaemonOnly"),"error",8e3):Et.show(s("configuration.restartFailed",{values:{error:j.error||j.message}}),"error")}catch(j){Et.show(s("configuration.restartFailed",{values:{error:j.message}}),"error")}finally{n(5,f=!1)}}ls(()=>{_()});const x=[[]],A=()=>n(10,b=!0);function O(){p=this.__value,n(7,p)}function C(){p=this.__value,n(7,p)}function R(){l.port=yt(this.value),n(1,l)}function L(){l.workers=yt(this.value),n(1,l)}function D(){l.logLevel=Is(this),n(1,l)}function z(){l.bodyParserLimit=this.value,n(1,l)}function B(j){t.$$.not_equal(l.auth,j)&&(l.auth=j,n(1,l))}function U(j){t.$$.not_equal(l.logging,j)&&(l.logging=j,n(1,l))}function F(){g=this.value,n(8,g)}function V(){b=this.checked,n(10,b)}return[i,l,o,a,u,f,h,p,g,m,b,s,y,k,w,S,P,M,A,O,x,C,R,L,D,z,B,U,F,V,()=>n(10,b=!1)]}class Kv extends Gt{constructor(e){super(),qt(this,e,Jv,Yv,Nt,{},null,[-1,-1])}}class Ei{static async list(){return await yn.get("/routes")}static async get(e){return(await this.list()).find(s=>s.path===e)||null}static async create(e){const n=await yn.get("/config");if(n.routes?.some(s=>s.path===e.path))throw new Error(\`Route with path "\${e.path}" already exists\`);n.routes=n.routes||[],n.routes.push(e),await yn.put("/config",n)}static async update(e,n){const s=await yn.get("/config"),i=s.routes?.findIndex(l=>l.path===e);if(i===void 0||i===-1)throw new Error(\`Route with path "\${e}" not found\`);if(e!==n.path&&s.routes?.some(l=>l.path===n.path))throw new Error(\`Route with path "\${n.path}" already exists\`);s.routes[i]=n,await yn.put("/config",s)}static async delete(e){const n=await yn.get("/config"),s=n.routes?.findIndex(i=>i.path===e);if(s===void 0||s===-1)throw new Error(\`Route with path "\${e}" not found\`);n.routes.splice(s,1),await yn.put("/config",n)}static async validateRoute(e){const n={routes:[e]};return await yn.post("/config/validate",n)}static async duplicate(e){const n=await this.get(e);if(!n)throw new Error(\`Route with path "\${e}" not found\`);const s={...n};let i=1,l=\`\${e}-copy\`;const o=await this.list();for(;o.some(a=>a.path===l);)i++,l=\`\${e}-copy-\${i}\`;s.path=l,await this.create(s)}}function mc(t,e,n){const s=t.slice();return s[7]=e[n][0],s[8]=e[n][1],s}function bc(t,e,n){const s=t.slice();return s[11]=e[n],s[13]=n,s}function _c(t){let e,n=t[5]("routeCard.hasTransformer")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-sm badge-info")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l&32&&n!==(n=i[5]("routeCard.hasTransformer")+"")&&T(s,n)},d(i){i&&H(e)}}}function vc(t){let e,n=t[5]("routeCard.failover")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-sm badge-success")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l&32&&n!==(n=i[5]("routeCard.failover")+"")&&T(s,n)},d(i){i&&H(e)}}}function yc(t){let e,n=t[5]("upstream.weight")+"",s,i,l=t[11].weight+"",o;return{c(){e=d("span"),s=E(n),i=E(": "),o=E(l),c(e,"class","badge badge-xs")},m(a,u){I(a,e,u),r(e,s),r(e,i),r(e,o)},p(a,u){u&32&&n!==(n=a[5]("upstream.weight")+"")&&T(s,n),u&1&&l!==(l=a[11].weight+"")&&T(o,l)},d(a){a&&H(e)}}}function wc(t){let e,n,s=t[11].priority+"",i;return{c(){e=d("span"),n=E("P: "),i=E(s),c(e,"class","badge badge-xs")},m(l,o){I(l,e,o),r(e,n),r(e,i)},p(l,o){o&1&&s!==(s=l[11].priority+"")&&T(i,s)},d(l){l&&H(e)}}}function kc(t){let e,n,s,i,l,o=t[11].target+"",a,u,f,h,p=t[11].weight&&yc(t),g=t[11].priority!==void 0&&wc(t);return{c(){e=d("div"),n=d("div"),i=v(),l=d("code"),a=E(o),u=v(),p&&p.c(),f=v(),g&&g.c(),h=v(),c(n,"class","w-2 h-2 rounded-full tooltip tooltip-right"),c(n,"data-tip",s=t[11].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${Tc(t[11].lastFailureTime)}\`:ei(t[11])),ie(n,"bg-success",ei(t[11])==="healthy"),ie(n,"bg-error",ei(t[11])==="unhealthy"),ie(n,"bg-warning",ei(t[11])==="unknown"),c(l,"class","text-xs flex-1 truncate"),c(e,"class","flex items-center gap-2 text-sm")},m(m,b){I(m,e,b),r(e,n),r(e,i),r(e,l),r(l,a),r(e,u),p&&p.m(e,null),r(e,f),g&&g.m(e,null),r(e,h)},p(m,b){b&1&&s!==(s=m[11].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${Tc(m[11].lastFailureTime)}\`:ei(m[11]))&&c(n,"data-tip",s),b&1&&ie(n,"bg-success",ei(m[11])==="healthy"),b&1&&ie(n,"bg-error",ei(m[11])==="unhealthy"),b&1&&ie(n,"bg-warning",ei(m[11])==="unknown"),b&1&&o!==(o=m[11].target+"")&&T(a,o),m[11].weight?p?p.p(m,b):(p=yc(m),p.c(),p.m(e,f)):p&&(p.d(1),p=null),m[11].priority!==void 0?g?g.p(m,b):(g=wc(m),g.c(),g.m(e,h)):g&&(g.d(1),g=null)},d(m){m&&H(e),p&&p.d(),g&&g.d()}}}function Sc(t){let e,n,s,i,l=tt(Object.entries(t[0].pathRewrite)),o=[];for(let a=0;a<l.length;a+=1)o[a]=Ec(mc(t,l,a));return{c(){e=d("div"),n=d("p"),n.textContent="Path Rewrite:",s=v(),i=d("div");for(let a=0;a<o.length;a+=1)o[a].c();c(n,"class","text-sm font-semibold"),c(i,"class","text-xs text-gray-500"),c(e,"class","mt-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i);for(let f=0;f<o.length;f+=1)o[f]&&o[f].m(i,null)},p(a,u){if(u&1){l=tt(Object.entries(a[0].pathRewrite));let f;for(f=0;f<l.length;f+=1){const h=mc(a,l,f);o[f]?o[f].p(h,u):(o[f]=Ec(h),o[f].c(),o[f].m(i,null))}for(;f<o.length;f+=1)o[f].d(1);o.length=l.length}},d(a){a&&H(e),Tn(o,a)}}}function Ec(t){let e,n,s=t[7]+"",i,l,o,a=t[8]+"",u;return{c(){e=d("div"),n=d("code"),i=E(s),l=E(" \u2192 "),o=d("code"),u=E(a)},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u)},p(f,h){h&1&&s!==(s=f[7]+"")&&T(i,s),h&1&&a!==(a=f[8]+"")&&T(u,a)},d(f){f&&H(e)}}}function Zv(t){let e,n,s,i=t[5]("routeCard.duplicate")+"",l;return{c(){e=pe("svg"),n=pe("path"),s=v(),l=E(i),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(o,a){I(o,e,a),r(e,n),I(o,s,a),I(o,l,a)},p(o,a){a&32&&i!==(i=o[5]("routeCard.duplicate")+"")&&T(l,i)},d(o){o&&(H(e),H(s),H(l))}}}function Qv(t){let e,n,s=t[5]("routeCard.duplicating")+"",i;return{c(){e=d("span"),n=v(),i=E(s),c(e,"class","loading loading-spinner loading-xs")},m(l,o){I(l,e,o),I(l,n,o),I(l,i,o)},p(l,o){o&32&&s!==(s=l[5]("routeCard.duplicating")+"")&&T(i,s)},d(l){l&&(H(e),H(n),H(i))}}}function $v(t){let e,n,s,i=t[5]("routeCard.delete")+"",l;return{c(){e=pe("svg"),n=pe("path"),s=v(),l=E(i),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(o,a){I(o,e,a),r(e,n),I(o,s,a),I(o,l,a)},p(o,a){a&32&&i!==(i=o[5]("routeCard.delete")+"")&&T(l,i)},d(o){o&&(H(e),H(s),H(l))}}}function ey(t){let e,n,s=t[5]("routeCard.deleting")+"",i;return{c(){e=d("span"),n=v(),i=E(s),c(e,"class","loading loading-spinner loading-xs")},m(l,o){I(l,e,o),I(l,n,o),I(l,i,o)},p(l,o){o&32&&s!==(s=l[5]("routeCard.deleting")+"")&&T(i,s)},d(l){l&&(H(e),H(n),H(i))}}}function ty(t){let e,n,s,i,l,o,a=t[0].path+"",u,f,h,p,g=t[5]("routeCard.upstreams",{values:{count:t[0].upstreams.length}})+"",m,b,_,y,k,w,S=t[5]("routeEditor.upstreams")+"",P,M,x,A,O,C,R,L,D,z,B,U=t[5]("routeCard.edit")+"",F,V,Y,j,q,Q,X,re=t[0].transformer&&_c(t),K=t[0].failover?.enabled&&vc(t),W=tt(t[0].upstreams),G=[];for(let Se=0;Se<W.length;Se+=1)G[Se]=kc(bc(t,W,Se));let J=t[0].pathRewrite&&Sc(t);function le(Se,me){return Se[4]?Qv:Zv}let se=le(t),N=se(t);function te(Se,me){return Se[3]?ey:$v}let Z=te(t),oe=Z(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),l=d("h2"),o=d("code"),u=E(a),f=v(),h=d("div"),p=d("span"),m=E(g),b=v(),re&&re.c(),_=v(),K&&K.c(),y=v(),k=d("div"),w=d("p"),P=E(S),M=E(":"),x=v(),A=d("div");for(let Se=0;Se<G.length;Se+=1)G[Se].c();O=v(),J&&J.c(),C=v(),R=d("div"),L=d("button"),D=pe("svg"),z=pe("path"),B=v(),F=E(U),V=v(),Y=d("button"),N.c(),j=v(),q=d("button"),oe.c(),c(o,"class","text-primary"),c(l,"class","card-title text-lg"),c(p,"class","badge badge-sm"),c(h,"class","flex gap-2 mt-2 flex-wrap"),c(i,"class","flex-1"),c(s,"class","flex justify-between items-start"),c(w,"class","text-sm font-semibold mb-2"),c(A,"class","space-y-2"),c(k,"class","mt-4"),c(z,"stroke-linecap","round"),c(z,"stroke-linejoin","round"),c(z,"stroke-width","2"),c(z,"d","M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"),c(D,"xmlns","http://www.w3.org/2000/svg"),c(D,"class","h-4 w-4"),c(D,"fill","none"),c(D,"viewBox","0 0 24 24"),c(D,"stroke","currentColor"),c(L,"class","btn btn-sm btn-primary btn-outline"),c(Y,"class","btn btn-sm btn-secondary btn-outline"),Y.disabled=t[4],c(q,"class","btn btn-sm btn-error btn-outline"),q.disabled=t[3],c(R,"class","card-actions justify-end mt-auto pt-4"),c(n,"class","card-body flex flex-col"),c(e,"class","card bg-base-100 shadow-md hover:shadow-lg transition-shadow")},m(Se,me){I(Se,e,me),r(e,n),r(n,s),r(s,i),r(i,l),r(l,o),r(o,u),r(i,f),r(i,h),r(h,p),r(p,m),r(h,b),re&&re.m(h,null),r(h,_),K&&K.m(h,null),r(n,y),r(n,k),r(k,w),r(w,P),r(w,M),r(k,x),r(k,A);for(let Ee=0;Ee<G.length;Ee+=1)G[Ee]&&G[Ee].m(A,null);r(n,O),J&&J.m(n,null),r(n,C),r(n,R),r(R,L),r(L,D),r(D,z),r(L,B),r(L,F),r(R,V),r(R,Y),N.m(Y,null),r(R,j),r(R,q),oe.m(q,null),Q||(X=[ee(L,"click",t[6]),ee(Y,"click",function(){ui(t[2])&&t[2].apply(this,arguments)}),ee(q,"click",function(){ui(t[1])&&t[1].apply(this,arguments)})],Q=!0)},p(Se,[me]){if(t=Se,me&1&&a!==(a=t[0].path+"")&&T(u,a),me&33&&g!==(g=t[5]("routeCard.upstreams",{values:{count:t[0].upstreams.length}})+"")&&T(m,g),t[0].transformer?re?re.p(t,me):(re=_c(t),re.c(),re.m(h,_)):re&&(re.d(1),re=null),t[0].failover?.enabled?K?K.p(t,me):(K=vc(t),K.c(),K.m(h,null)):K&&(K.d(1),K=null),me&32&&S!==(S=t[5]("routeEditor.upstreams")+"")&&T(P,S),me&33){W=tt(t[0].upstreams);let Ee;for(Ee=0;Ee<W.length;Ee+=1){const ye=bc(t,W,Ee);G[Ee]?G[Ee].p(ye,me):(G[Ee]=kc(ye),G[Ee].c(),G[Ee].m(A,null))}for(;Ee<G.length;Ee+=1)G[Ee].d(1);G.length=W.length}t[0].pathRewrite?J?J.p(t,me):(J=Sc(t),J.c(),J.m(n,C)):J&&(J.d(1),J=null),me&32&&U!==(U=t[5]("routeCard.edit")+"")&&T(F,U),se===(se=le(t))&&N?N.p(t,me):(N.d(1),N=se(t),N&&(N.c(),N.m(Y,null))),me&16&&(Y.disabled=t[4]),Z===(Z=te(t))&&oe?oe.p(t,me):(oe.d(1),oe=Z(t),oe&&(oe.c(),oe.m(q,null))),me&8&&(q.disabled=t[3])},i:Ae,o:Ae,d(Se){Se&&H(e),re&&re.d(),K&&K.d(),Tn(G,Se),J&&J.d(),N.d(),oe.d(),Q=!1,ht(X)}}}function ei(t){return t.status?t.status==="HEALTHY"?"healthy":"unhealthy":"unknown"}function Tc(t){if(!t)return"";const e=new Date(t),s=new Date().getTime()-e.getTime(),i=Math.floor(s/1e3),l=Math.floor(i/60),o=Math.floor(l/60);return i<60?\`\${i}\u79D2\u524D\`:l<60?\`\${l}\u5206\u949F\u524D\`:o<24?\`\${o}\u5C0F\u65F6\u524D\`:e.toLocaleString("zh-CN")}function ny(t,e,n){let s;Zt(t,xt,h=>n(5,s=h));let{route:i}=e,{onDelete:l}=e,{onDuplicate:o}=e,{isDeleting:a=!1}=e,{isDuplicating:u=!1}=e;function f(){ud(\`/routes/edit/\${encodeURIComponent(i.path)}\`)}return t.$$set=h=>{"route"in h&&n(0,i=h.route),"onDelete"in h&&n(1,l=h.onDelete),"onDuplicate"in h&&n(2,o=h.onDuplicate),"isDeleting"in h&&n(3,a=h.isDeleting),"isDuplicating"in h&&n(4,u=h.isDuplicating)},[i,l,o,a,u,s,f]}class sy extends Gt{constructor(e){super(),qt(this,e,ny,ty,Nt,{route:0,onDelete:1,onDuplicate:2,isDeleting:3,isDuplicating:4})}}function Mc(t){let e,n,s,i,l,o,a,u,f,h,p,g,m,b,_,y,k;return{c(){e=d("dialog"),n=d("div"),s=d("h3"),i=E(t[5]),l=v(),o=d("p"),a=E(t[4]),u=v(),f=d("div"),h=d("button"),p=E(t[2]),g=v(),m=d("button"),b=E(t[3]),c(s,"class","font-bold text-lg"),c(o,"class","py-4"),c(h,"class","btn"),c(m,"class",_="btn "+t[1]),c(f,"class","modal-action"),c(n,"class","modal-box"),c(e,"class","modal modal-open")},m(w,S){I(w,e,S),r(e,n),r(n,s),r(s,i),r(n,l),r(n,o),r(o,a),r(n,u),r(n,f),r(f,h),r(h,p),r(f,g),r(f,m),r(m,b),y||(k=[ee(h,"click",t[7]),ee(m,"click",t[6]),ee(e,"click",t[8])],y=!0)},p(w,S){S&32&&T(i,w[5]),S&16&&T(a,w[4]),S&4&&T(p,w[2]),S&8&&T(b,w[3]),S&2&&_!==(_="btn "+w[1])&&c(m,"class",_)},d(w){w&&H(e),y=!1,ht(k)}}}function iy(t){let e,n=t[0]&&Mc(t);return{c(){n&&n.c(),e=Zn()},m(s,i){n&&n.m(s,i),I(s,e,i)},p(s,[i]){s[0]?n?n.p(s,i):(n=Mc(s),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Ae,o:Ae,d(s){s&&H(e),n&&n.d(s)}}}function ly(t,e,n){let s,i,l,o,a;Zt(t,xt,w=>n(13,a=w));let{open:u=!1}=e,{title:f=""}=e,{message:h=""}=e,{confirmText:p=""}=e,{cancelText:g=""}=e,{confirmClass:m="btn-error"}=e;const b=Dl();function _(){b("confirm"),n(0,u=!1)}function y(){b("cancel"),n(0,u=!1)}function k(w){w.target===w.currentTarget&&y()}return t.$$set=w=>{"open"in w&&n(0,u=w.open),"title"in w&&n(9,f=w.title),"message"in w&&n(10,h=w.message),"confirmText"in w&&n(11,p=w.confirmText),"cancelText"in w&&n(12,g=w.cancelText),"confirmClass"in w&&n(1,m=w.confirmClass)},t.$$.update=()=>{t.$$.dirty&8704&&n(5,s=f||a("confirmDialog.title")),t.$$.dirty&1024&&n(4,i=h),t.$$.dirty&10240&&n(3,l=p||a("confirmDialog.confirm")),t.$$.dirty&12288&&n(2,o=g||a("confirmDialog.cancel"))},[u,m,o,l,i,s,_,y,k,f,h,p,g,a]}class oy extends Gt{constructor(e){super(),qt(this,e,ly,iy,Nt,{open:0,title:9,message:10,confirmText:11,cancelText:12,confirmClass:1})}}function Cc(t,e,n){const s=t.slice();return s[27]=e[n],s}function Pc(t,e,n){const s=t.slice();return s[30]=e[n],s}function ry(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function ay(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){I(n,e,s)},d(n){n&&H(e)}}}function Ac(t){let e,n=t[30]+"",s,i;return{c(){e=d("option"),s=E(n),e.__value=i=t[30],ne(e,e.__value)},m(l,o){I(l,e,o),r(e,s)},p(l,o){o[0]&1024&&n!==(n=l[30]+"")&&T(s,n),o[0]&1024&&i!==(i=l[30])&&(e.__value=i,ne(e,e.__value))},d(l){l&&H(e)}}}function uy(t){let e,n,s=tt(t[11]),i=[];for(let o=0;o<s.length;o+=1)i[o]=xc(Cc(t,s,o));const l=o=>Ue(i[o],1,1,()=>{i[o]=null});return{c(){e=d("div");for(let o=0;o<i.length;o+=1)i[o].c();c(e,"class","grid grid-cols-1 lg:grid-cols-2 gap-4")},m(o,a){I(o,e,a);for(let u=0;u<i.length;u+=1)i[u]&&i[u].m(e,null);n=!0},p(o,a){if(a[0]&76160){s=tt(o[11]);let u;for(u=0;u<s.length;u+=1){const f=Cc(o,s,u);i[u]?(i[u].p(f,a),ze(i[u],1)):(i[u]=xc(f),i[u].c(),ze(i[u],1),i[u].m(e,null))}for(ms(),u=s.length;u<i.length;u+=1)l(u);bs()}},i(o){if(!n){for(let a=0;a<s.length;a+=1)ze(i[a]);n=!0}},o(o){i=i.filter(Boolean);for(let a=0;a<i.length;a+=1)Ue(i[a]);n=!1},d(o){o&&H(e),Tn(i,o)}}}function cy(t){let e;function n(l,o){return l[0].length===0?py:dy}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","text-center py-12")},m(l,o){I(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},i:Ae,o:Ae,d(l){l&&H(e),i.d()}}}function fy(t){let e,n,s,i,l,o=t[12]("common.error")+"",a,u,f;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),u=E(": "),f=E(t[4]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){I(h,e,p),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a),r(l,u),r(l,f)},p(h,p){p[0]&4096&&o!==(o=h[12]("common.error")+"")&&T(a,o),p[0]&16&&T(f,h[4])},i:Ae,o:Ae,d(h){h&&H(e)}}}function hy(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){I(n,e,s)},p:Ae,i:Ae,o:Ae,d(n){n&&H(e)}}}function xc(t){let e,n;function s(){return t[22](t[27])}function i(){return t[23](t[27])}return e=new sy({props:{route:t[27],onDelete:s,onDuplicate:i,isDeleting:t[7].has(t[27].path),isDuplicating:t[8].has(t[27].path)}}),{c(){_t(e.$$.fragment)},m(l,o){pt(e,l,o),n=!0},p(l,o){t=l;const a={};o[0]&2048&&(a.route=t[27]),o[0]&2048&&(a.onDelete=s),o[0]&2048&&(a.onDuplicate=i),o[0]&2176&&(a.isDeleting=t[7].has(t[27].path)),o[0]&2304&&(a.isDuplicating=t[8].has(t[27].path)),e.$set(a)},i(l){n||(ze(e.$$.fragment,l),n=!0)},o(l){Ue(e.$$.fragment,l),n=!1},d(l){gt(e,l)}}}function dy(t){let e,n,s,i=t[12]("routes.noMatchingRoutes")+"",l,o,a,u=t[12]("routes.noMatchingMessage")+"",f;return{c(){e=d("div"),e.textContent="\uD83D\uDD0D",n=v(),s=d("h3"),l=E(i),o=v(),a=d("p"),f=E(u),c(e,"class","text-6xl mb-4"),c(s,"class","text-xl font-semibold mb-2"),c(a,"class","text-gray-500")},m(h,p){I(h,e,p),I(h,n,p),I(h,s,p),r(s,l),I(h,o,p),I(h,a,p),r(a,f)},p(h,p){p[0]&4096&&i!==(i=h[12]("routes.noMatchingRoutes")+"")&&T(l,i),p[0]&4096&&u!==(u=h[12]("routes.noMatchingMessage")+"")&&T(f,u)},d(h){h&&(H(e),H(n),H(s),H(o),H(a))}}}function py(t){let e,n,s,i=t[12]("routes.noRoutes")+"",l,o,a,u=t[12]("routes.noRoutesMessage")+"",f,h,p,g=t[12]("routes.createFirstRoute")+"",m,b,_;return{c(){e=d("div"),e.textContent="\uD83D\uDE80",n=v(),s=d("h3"),l=E(i),o=v(),a=d("p"),f=E(u),h=v(),p=d("button"),m=E(g),c(e,"class","text-6xl mb-4"),c(s,"class","text-xl font-semibold mb-2"),c(a,"class","text-gray-500 mb-4"),c(p,"class","btn btn-primary")},m(y,k){I(y,e,k),I(y,n,k),I(y,s,k),r(s,l),I(y,o,k),I(y,a,k),r(a,f),I(y,h,k),I(y,p,k),r(p,m),b||(_=ee(p,"click",t[17]),b=!0)},p(y,k){k[0]&4096&&i!==(i=y[12]("routes.noRoutes")+"")&&T(l,i),k[0]&4096&&u!==(u=y[12]("routes.noRoutesMessage")+"")&&T(f,u),k[0]&4096&&g!==(g=y[12]("routes.createFirstRoute")+"")&&T(m,g)},d(y){y&&(H(e),H(n),H(s),H(o),H(a),H(h),H(p)),b=!1,_()}}}function Oc(t){let e,n=t[12]("routes.showingRoutes",{values:{count:t[11].length,total:t[0].length}})+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","mt-6 text-sm text-gray-500 text-center")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&6145&&n!==(n=i[12]("routes.showingRoutes",{values:{count:i[11].length,total:i[0].length}})+"")&&T(s,n)},d(i){i&&H(e)}}}function gy(t){let e,n,s,i,l=t[12]("routes.title")+"",o,a,u,f=t[12]("routes.subtitle")+"",h,p,g,m,b,_,y,k=t[12]("routes.export")+"",w,S,P,M,x,A=t[12]("routes.import")+"",O,C,R,L,D=t[12]("routes.newRoute")+"",z,B,U,F,V,Y,j,q,Q,X,re=t[12]("routes.allTransformers")+"",K,W,G,J,le,se,N,te,Z,oe,Se;function me($,ae){return $[9]?ay:ry}let Ee=me(t),ye=Ee(t),ge=tt(t[10]),be=[];for(let $=0;$<ge.length;$+=1)be[$]=Ac(Pc(t,ge,$));const He=[hy,fy,cy,uy],Te=[];function Pe($,ae){return $[3]?0:$[4]?1:$[11].length===0?2:3}G=Pe(t),J=Te[G]=He[G](t);let _e=!t[3]&&t[0].length>0&&Oc(t);function De($){t[24]($)}let ke={title:t[12]("routes.confirmDelete"),message:t[6]?t[12]("routes.confirmDeleteMessage",{values:{path:t[6].path}}):"",confirmText:t[12]("common.delete"),cancelText:t[12]("common.cancel"),confirmClass:"btn-error"};return t[5]!==void 0&&(ke.open=t[5]),N=new oy({props:ke}),wn.push(()=>Yn(N,"open",De)),N.$on("confirm",t[14]),N.$on("cancel",t[15]),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h1"),o=E(l),a=v(),u=d("p"),h=E(f),p=v(),g=d("div"),m=d("button"),b=pe("svg"),_=pe("path"),y=v(),w=E(k),P=v(),M=d("button"),ye.c(),x=v(),O=E(A),R=v(),L=d("button"),z=E(D),B=v(),U=d("div"),F=d("div"),V=d("input"),j=v(),q=d("div"),Q=d("select"),X=d("option"),K=E(re);for(let $=0;$<be.length;$+=1)be[$].c();W=v(),J.c(),le=v(),_e&&_e.c(),se=v(),_t(N.$$.fragment),c(i,"class","text-3xl font-bold"),c(u,"class","text-sm text-gray-500 mt-1"),c(_,"stroke-linecap","round"),c(_,"stroke-linejoin","round"),c(_,"stroke-width","2"),c(_,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(b,"xmlns","http://www.w3.org/2000/svg"),c(b,"class","h-4 w-4"),c(b,"fill","none"),c(b,"viewBox","0 0 24 24"),c(b,"stroke","currentColor"),c(m,"class","btn btn-sm btn-outline"),m.disabled=S=t[3]||t[0].length===0,c(M,"class","btn btn-sm btn-outline"),M.disabled=C=t[3]||t[9],c(L,"class","btn btn-primary btn-sm"),c(g,"class","flex gap-2"),c(n,"class","flex justify-between items-center mb-6"),c(V,"type","text"),c(V,"placeholder",Y=t[12]("routes.searchPlaceholder")),c(V,"class","input input-bordered"),c(F,"class","form-control flex-1"),X.__value="",ne(X,X.__value),c(Q,"class","select select-bordered"),t[2]===void 0&&vs(()=>t[21].call(Q)),c(q,"class","form-control w-64"),c(U,"class","flex gap-4 mb-6"),c(e,"class","p-6")},m($,ae){I($,e,ae),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(u,h),r(n,p),r(n,g),r(g,m),r(m,b),r(b,_),r(m,y),r(m,w),r(g,P),r(g,M),ye.m(M,null),r(M,x),r(M,O),r(g,R),r(g,L),r(L,z),r(e,B),r(e,U),r(U,F),r(F,V),ne(V,t[1]),r(U,j),r(U,q),r(q,Q),r(Q,X),r(X,K);for(let ue=0;ue<be.length;ue+=1)be[ue]&&be[ue].m(Q,null);Cn(Q,t[2],!0),r(e,W),Te[G].m(e,null),r(e,le),_e&&_e.m(e,null),r(e,se),pt(N,e,null),Z=!0,oe||(Se=[ee(m,"click",t[18]),ee(M,"click",t[19]),ee(L,"click",t[17]),ee(V,"input",t[20]),ee(Q,"change",t[21])],oe=!0)},p($,ae){if((!Z||ae[0]&4096)&&l!==(l=$[12]("routes.title")+"")&&T(o,l),(!Z||ae[0]&4096)&&f!==(f=$[12]("routes.subtitle")+"")&&T(h,f),(!Z||ae[0]&4096)&&k!==(k=$[12]("routes.export")+"")&&T(w,k),(!Z||ae[0]&9&&S!==(S=$[3]||$[0].length===0))&&(m.disabled=S),Ee!==(Ee=me($))&&(ye.d(1),ye=Ee($),ye&&(ye.c(),ye.m(M,x))),(!Z||ae[0]&4096)&&A!==(A=$[12]("routes.import")+"")&&T(O,A),(!Z||ae[0]&520&&C!==(C=$[3]||$[9]))&&(M.disabled=C),(!Z||ae[0]&4096)&&D!==(D=$[12]("routes.newRoute")+"")&&T(z,D),(!Z||ae[0]&4096&&Y!==(Y=$[12]("routes.searchPlaceholder")))&&c(V,"placeholder",Y),ae[0]&2&&V.value!==$[1]&&ne(V,$[1]),(!Z||ae[0]&4096)&&re!==(re=$[12]("routes.allTransformers")+"")&&T(K,re),ae[0]&1024){ge=tt($[10]);let fe;for(fe=0;fe<ge.length;fe+=1){const Be=Pc($,ge,fe);be[fe]?be[fe].p(Be,ae):(be[fe]=Ac(Be),be[fe].c(),be[fe].m(Q,null))}for(;fe<be.length;fe+=1)be[fe].d(1);be.length=ge.length}ae[0]&1028&&Cn(Q,$[2]);let ue=G;G=Pe($),G===ue?Te[G].p($,ae):(ms(),Ue(Te[ue],1,1,()=>{Te[ue]=null}),bs(),J=Te[G],J?J.p($,ae):(J=Te[G]=He[G]($),J.c()),ze(J,1),J.m(e,le)),!$[3]&&$[0].length>0?_e?_e.p($,ae):(_e=Oc($),_e.c(),_e.m(e,se)):_e&&(_e.d(1),_e=null);const de={};ae[0]&4096&&(de.title=$[12]("routes.confirmDelete")),ae[0]&4160&&(de.message=$[6]?$[12]("routes.confirmDeleteMessage",{values:{path:$[6].path}}):""),ae[0]&4096&&(de.confirmText=$[12]("common.delete")),ae[0]&4096&&(de.cancelText=$[12]("common.cancel")),!te&&ae[0]&32&&(te=!0,de.open=$[5],Xn(()=>te=!1)),N.$set(de)},i($){Z||(ze(J),ze(N.$$.fragment,$),Z=!0)},o($){Ue(J),Ue(N.$$.fragment,$),Z=!1},d($){$&&H(e),ye.d(),Tn(be,$),Te[G].d(),_e&&_e.d(),gt(N),oe=!1,ht(Se)}}}function my(t,e,n){let s,i,l;Zt(t,xt,B=>n(12,l=B));let o=[],a=!0,u=null,f="",h="",p=!0,g=!1,m=null,b=new Set,_=new Set,y=!1;async function k(B=!1){const U=!B&&p;try{U&&n(3,a=!0),n(0,o=await Ei.list()),n(4,u=null),p=!1}catch(F){n(4,u=F.message),B||Et.show(F.message,"error")}finally{U&&n(3,a=!1)}}async function w(B){n(6,m=B),n(5,g=!0)}async function S(){if(m){b.add(m.path),n(7,b);try{await Ei.delete(m.path),Et.show(l("routes.deleted",{values:{path:m.path}}),"success"),await k()}catch(B){Et.show(l("routes.deleteFailed",{values:{error:B.message}}),"error")}finally{b.delete(m.path),n(7,b),n(6,m=null)}}}function P(){n(6,m=null)}async function M(B){_.add(B.path),n(8,_);try{await Ei.duplicate(B.path),Et.show(l("routes.duplicated",{values:{path:B.path}}),"success"),await k()}catch(U){Et.show(l("routes.duplicateFailed",{values:{error:U.message}}),"error")}finally{_.delete(B.path),n(8,_)}}function x(){ud("/routes/new")}function A(){if(o.length===0){Et.show(l("routes.noRoutesToExport"),"warning");return}const B=JSON.stringify(o,null,2),U="data:application/json;charset=utf-8,"+encodeURIComponent(B),F=\`bungee-routes-\${new Date().toISOString().split("T")[0]}.json\`,V=document.createElement("a");V.setAttribute("href",U),V.setAttribute("download",F),V.click(),Et.show(l("routes.exported"),"success")}function O(){const B=document.createElement("input");B.type="file",B.accept=".json",B.onchange=async U=>{const F=U.target.files[0];if(F){n(9,y=!0);try{const V=await F.text(),Y=JSON.parse(V);if(!Array.isArray(Y))throw new Error(l("routes.importMustBeArray"));let j=0,q=0;for(const Q of Y)try{await Ei.create(Q),j++}catch(X){q++,console.error(\`Failed to import route \${Q.path}:\`,X)}if(j>0){const Q=q>0?l("routes.importPartialSuccess",{values:{success:j,failed:q}}):l("routes.importSuccess",{values:{success:j}});Et.show(Q,"success"),await k()}else Et.show(l("routes.importFailed",{values:{error:\`\${q} routes failed\`}}),"error")}catch(V){Et.show(l("routes.importFailed",{values:{error:V.message}}),"error")}finally{n(9,y=!1)}}},B.click()}ls(()=>{k();const B=setInterval(()=>{k(!0)},5e3);return()=>{clearInterval(B)}});function C(){f=this.value,n(1,f)}function R(){h=Is(this),n(2,h),n(10,i),n(0,o)}const L=B=>w(B),D=B=>M(B);function z(B){g=B,n(5,g)}return t.$$.update=()=>{t.$$.dirty[0]&7&&n(11,s=o.filter(B=>{const U=B.path.toLowerCase().includes(f.toLowerCase())||B.upstreams.some(V=>V.target.toLowerCase().includes(f.toLowerCase())),F=!h||typeof B.transformer=="string"&&B.transformer===h||B.upstreams.some(V=>typeof V.transformer=="string"&&V.transformer===h);return U&&F})),t.$$.dirty[0]&1&&n(10,i=Array.from(new Set(o.flatMap(B=>{const U=[];return typeof B.transformer=="string"&&U.push(B.transformer),B.upstreams.forEach(F=>{typeof F.transformer=="string"&&U.push(F.transformer)}),U}))))},[o,f,h,a,u,g,m,b,_,y,i,s,l,w,S,P,M,x,A,O,C,R,L,D,z]}class by extends Gt{constructor(e){super(),qt(this,e,my,gy,Nt,{},null,[-1,-1])}}var Op=typeof global=="object"&&global&&global.Object===Object&&global,_y=typeof self=="object"&&self&&self.Object===Object&&self,Zs=Op||_y||Function("return this")(),Fs=Zs.Symbol,Rp=Object.prototype,vy=Rp.hasOwnProperty,yy=Rp.toString,ll=Fs?Fs.toStringTag:void 0;function wy(t){var e=vy.call(t,ll),n=t[ll];try{t[ll]=void 0;var s=!0}catch{}var i=yy.call(t);return s&&(e?t[ll]=n:delete t[ll]),i}var ky=Object.prototype,Sy=ky.toString;function Ey(t){return Sy.call(t)}var Ty="[object Null]",My="[object Undefined]",Rc=Fs?Fs.toStringTag:void 0;function Qi(t){return t==null?t===void 0?My:Ty:Rc&&Rc in Object(t)?wy(t):Ey(t)}function Xi(t){return t!=null&&typeof t=="object"}var Cy="[object Symbol]";function xl(t){return typeof t=="symbol"||Xi(t)&&Qi(t)==Cy}function ho(t,e){for(var n=-1,s=t==null?0:t.length,i=Array(s);++n<s;)i[n]=e(t[n],n,t);return i}var Ps=Array.isArray,Dc=Fs?Fs.prototype:void 0,Lc=Dc?Dc.toString:void 0;function Dp(t){if(typeof t=="string")return t;if(Ps(t))return ho(t,Dp)+"";if(xl(t))return Lc?Lc.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Io(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Bo(t){return t}var Py="[object AsyncFunction]",Ay="[object Function]",xy="[object GeneratorFunction]",Oy="[object Proxy]";function Lp(t){if(!Io(t))return!1;var e=Qi(t);return e==Ay||e==xy||e==Py||e==Oy}var cr=Zs["__core-js_shared__"],Hc=(function(){var t=/[^.]+$/.exec(cr&&cr.keys&&cr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Ry(t){return!!Hc&&Hc in t}var Dy=Function.prototype,Ly=Dy.toString;function Oi(t){if(t!=null){try{return Ly.call(t)}catch{}try{return t+""}catch{}}return""}var Hy=/[\\\\^$.*+?()[\\]{}|]/g,Iy=/^\\[object .+?Constructor\\]$/,By=Function.prototype,Fy=Object.prototype,Ny=By.toString,jy=Fy.hasOwnProperty,zy=RegExp("^"+Ny.call(jy).replace(Hy,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$");function Uy(t){if(!Io(t)||Ry(t))return!1;var e=Lp(t)?zy:Iy;return e.test(Oi(t))}function Vy(t,e){return t?.[e]}function Ri(t,e){var n=Vy(t,e);return Uy(n)?n:void 0}var Rr=Ri(Zs,"WeakMap");function Wy(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var qy=800,Gy=16,Xy=Date.now;function Yy(t){var e=0,n=0;return function(){var s=Xy(),i=Gy-(s-n);if(n=s,i>0){if(++e>=qy)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Jy(t){return function(){return t}}var Ic=(function(){try{var t=Ri(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Ky=Ic?function(t,e){return Ic(t,"toString",{configurable:!0,enumerable:!1,value:Jy(e),writable:!0})}:Bo,Zy=Yy(Ky),Qy=9007199254740991,$y=/^(?:0|[1-9]\\d*)$/;function da(t,e){var n=typeof t;return e=e??Qy,!!e&&(n=="number"||n!="symbol"&&$y.test(t))&&t>-1&&t%1==0&&t<e}function pa(t,e){return t===e||t!==t&&e!==e}var Bc=Math.max;function e4(t,e,n){return e=Bc(e===void 0?t.length-1:e,0),function(){for(var s=arguments,i=-1,l=Bc(s.length-e,0),o=Array(l);++i<l;)o[i]=s[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=s[i];return a[e]=n(o),Wy(t,this,a)}}function t4(t,e){return Zy(e4(t,e,Bo),t+"")}var n4=9007199254740991;function ga(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=n4}function Fo(t){return t!=null&&ga(t.length)&&!Lp(t)}function Fc(t,e,n){if(!Io(n))return!1;var s=typeof e;return(s=="number"?Fo(n)&&da(e,n.length):s=="string"&&e in n)?pa(n[e],t):!1}var s4=Object.prototype;function i4(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||s4;return t===n}function l4(t,e){for(var n=-1,s=Array(t);++n<t;)s[n]=e(n);return s}var o4="[object Arguments]";function Nc(t){return Xi(t)&&Qi(t)==o4}var Hp=Object.prototype,r4=Hp.hasOwnProperty,a4=Hp.propertyIsEnumerable,ma=Nc((function(){return arguments})())?Nc:function(t){return Xi(t)&&r4.call(t,"callee")&&!a4.call(t,"callee")};function u4(){return!1}var Ip=typeof Xs=="object"&&Xs&&!Xs.nodeType&&Xs,jc=Ip&&typeof Ys=="object"&&Ys&&!Ys.nodeType&&Ys,c4=jc&&jc.exports===Ip,zc=c4?Zs.Buffer:void 0,f4=zc?zc.isBuffer:void 0,Dr=f4||u4,h4="[object Arguments]",d4="[object Array]",p4="[object Boolean]",g4="[object Date]",m4="[object Error]",b4="[object Function]",_4="[object Map]",v4="[object Number]",y4="[object Object]",w4="[object RegExp]",k4="[object Set]",S4="[object String]",E4="[object WeakMap]",T4="[object ArrayBuffer]",M4="[object DataView]",C4="[object Float32Array]",P4="[object Float64Array]",A4="[object Int8Array]",x4="[object Int16Array]",O4="[object Int32Array]",R4="[object Uint8Array]",D4="[object Uint8ClampedArray]",L4="[object Uint16Array]",H4="[object Uint32Array]",rn={};rn[C4]=rn[P4]=rn[A4]=rn[x4]=rn[O4]=rn[R4]=rn[D4]=rn[L4]=rn[H4]=!0;rn[h4]=rn[d4]=rn[T4]=rn[p4]=rn[M4]=rn[g4]=rn[m4]=rn[b4]=rn[_4]=rn[v4]=rn[y4]=rn[w4]=rn[k4]=rn[S4]=rn[E4]=!1;function I4(t){return Xi(t)&&ga(t.length)&&!!rn[Qi(t)]}function Bp(t){return function(e){return t(e)}}var Fp=typeof Xs=="object"&&Xs&&!Xs.nodeType&&Xs,yl=Fp&&typeof Ys=="object"&&Ys&&!Ys.nodeType&&Ys,B4=yl&&yl.exports===Fp,fr=B4&&Op.process,Uc=(function(){try{var t=yl&&yl.require&&yl.require("util").types;return t||fr&&fr.binding&&fr.binding("util")}catch{}})(),Vc=Uc&&Uc.isTypedArray,Np=Vc?Bp(Vc):I4,F4=Object.prototype,N4=F4.hasOwnProperty;function j4(t,e){var n=Ps(t),s=!n&&ma(t),i=!n&&!s&&Dr(t),l=!n&&!s&&!i&&Np(t),o=n||s||i||l,a=o?l4(t.length,String):[],u=a.length;for(var f in t)N4.call(t,f)&&!(o&&(f=="length"||i&&(f=="offset"||f=="parent")||l&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||da(f,u)))&&a.push(f);return a}function z4(t,e){return function(n){return t(e(n))}}var U4=z4(Object.keys,Object),V4=Object.prototype,W4=V4.hasOwnProperty;function q4(t){if(!i4(t))return U4(t);var e=[];for(var n in Object(t))W4.call(t,n)&&n!="constructor"&&e.push(n);return e}function ba(t){return Fo(t)?j4(t):q4(t)}var G4=/\\.|\\[(?:[^[\\]]*|(["'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,X4=/^\\w*$/;function _a(t,e){if(Ps(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||xl(t)?!0:X4.test(t)||!G4.test(t)||e!=null&&t in Object(e)}var Ol=Ri(Object,"create");function Y4(){this.__data__=Ol?Ol(null):{},this.size=0}function J4(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var K4="__lodash_hash_undefined__",Z4=Object.prototype,Q4=Z4.hasOwnProperty;function $4(t){var e=this.__data__;if(Ol){var n=e[t];return n===K4?void 0:n}return Q4.call(e,t)?e[t]:void 0}var ew=Object.prototype,tw=ew.hasOwnProperty;function nw(t){var e=this.__data__;return Ol?e[t]!==void 0:tw.call(e,t)}var sw="__lodash_hash_undefined__";function iw(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ol&&e===void 0?sw:e,this}function Pi(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}Pi.prototype.clear=Y4;Pi.prototype.delete=J4;Pi.prototype.get=$4;Pi.prototype.has=nw;Pi.prototype.set=iw;function lw(){this.__data__=[],this.size=0}function No(t,e){for(var n=t.length;n--;)if(pa(t[n][0],e))return n;return-1}var ow=Array.prototype,rw=ow.splice;function aw(t){var e=this.__data__,n=No(e,t);if(n<0)return!1;var s=e.length-1;return n==s?e.pop():rw.call(e,n,1),--this.size,!0}function uw(t){var e=this.__data__,n=No(e,t);return n<0?void 0:e[n][1]}function cw(t){return No(this.__data__,t)>-1}function fw(t,e){var n=this.__data__,s=No(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,this}function Qs(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}Qs.prototype.clear=lw;Qs.prototype.delete=aw;Qs.prototype.get=uw;Qs.prototype.has=cw;Qs.prototype.set=fw;var Rl=Ri(Zs,"Map");function hw(){this.size=0,this.__data__={hash:new Pi,map:new(Rl||Qs),string:new Pi}}function dw(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function jo(t,e){var n=t.__data__;return dw(e)?n[typeof e=="string"?"string":"hash"]:n.map}function pw(t){var e=jo(this,t).delete(t);return this.size-=e?1:0,e}function gw(t){return jo(this,t).get(t)}function mw(t){return jo(this,t).has(t)}function bw(t,e){var n=jo(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this}function $s(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}$s.prototype.clear=hw;$s.prototype.delete=pw;$s.prototype.get=gw;$s.prototype.has=mw;$s.prototype.set=bw;var _w="Expected a function";function va(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(_w);var n=function(){var s=arguments,i=e?e.apply(this,s):s[0],l=n.cache;if(l.has(i))return l.get(i);var o=t.apply(this,s);return n.cache=l.set(i,o)||l,o};return n.cache=new(va.Cache||$s),n}va.Cache=$s;var vw=500;function yw(t){var e=va(t,function(s){return n.size===vw&&n.clear(),s}),n=e.cache;return e}var ww=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,kw=/\\\\(\\\\)?/g,Sw=yw(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(ww,function(n,s,i,l){e.push(i?l.replace(kw,"$1"):s||n)}),e});function Ew(t){return t==null?"":Dp(t)}function jp(t,e){return Ps(t)?t:_a(t,e)?[t]:Sw(Ew(t))}function zo(t){if(typeof t=="string"||xl(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ya(t,e){e=jp(e,t);for(var n=0,s=e.length;t!=null&&n<s;)t=t[zo(e[n++])];return n&&n==s?t:void 0}function Tw(t,e,n){var s=t==null?void 0:ya(t,e);return s===void 0?n:s}function zp(t,e){for(var n=-1,s=e.length,i=t.length;++n<s;)t[i+n]=e[n];return t}var Wc=Fs?Fs.isConcatSpreadable:void 0;function Mw(t){return Ps(t)||ma(t)||!!(Wc&&t&&t[Wc])}function Cw(t,e,n,s,i){var l=-1,o=t.length;for(n||(n=Mw),i||(i=[]);++l<o;){var a=t[l];n(a)?zp(i,a):i[i.length]=a}return i}function Pw(){this.__data__=new Qs,this.size=0}function Aw(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function xw(t){return this.__data__.get(t)}function Ow(t){return this.__data__.has(t)}var Rw=200;function Dw(t,e){var n=this.__data__;if(n instanceof Qs){var s=n.__data__;if(!Rl||s.length<Rw-1)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new $s(s)}return n.set(t,e),this.size=n.size,this}function Js(t){var e=this.__data__=new Qs(t);this.size=e.size}Js.prototype.clear=Pw;Js.prototype.delete=Aw;Js.prototype.get=xw;Js.prototype.has=Ow;Js.prototype.set=Dw;function Lw(t,e){for(var n=-1,s=t==null?0:t.length,i=0,l=[];++n<s;){var o=t[n];e(o,n,t)&&(l[i++]=o)}return l}function Hw(){return[]}var Iw=Object.prototype,Bw=Iw.propertyIsEnumerable,qc=Object.getOwnPropertySymbols,Fw=qc?function(t){return t==null?[]:(t=Object(t),Lw(qc(t),function(e){return Bw.call(t,e)}))}:Hw;function Nw(t,e,n){var s=e(t);return Ps(t)?s:zp(s,n(t))}function Gc(t){return Nw(t,ba,Fw)}var Lr=Ri(Zs,"DataView"),Hr=Ri(Zs,"Promise"),Ir=Ri(Zs,"Set"),Xc="[object Map]",jw="[object Object]",Yc="[object Promise]",Jc="[object Set]",Kc="[object WeakMap]",Zc="[object DataView]",zw=Oi(Lr),Uw=Oi(Rl),Vw=Oi(Hr),Ww=Oi(Ir),qw=Oi(Rr),ti=Qi;(Lr&&ti(new Lr(new ArrayBuffer(1)))!=Zc||Rl&&ti(new Rl)!=Xc||Hr&&ti(Hr.resolve())!=Yc||Ir&&ti(new Ir)!=Jc||Rr&&ti(new Rr)!=Kc)&&(ti=function(t){var e=Qi(t),n=e==jw?t.constructor:void 0,s=n?Oi(n):"";if(s)switch(s){case zw:return Zc;case Uw:return Xc;case Vw:return Yc;case Ww:return Jc;case qw:return Kc}return e});var Qc=Zs.Uint8Array,Gw="__lodash_hash_undefined__";function Xw(t){return this.__data__.set(t,Gw),this}function Yw(t){return this.__data__.has(t)}function Mo(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new $s;++e<n;)this.add(t[e])}Mo.prototype.add=Mo.prototype.push=Xw;Mo.prototype.has=Yw;function Jw(t,e){for(var n=-1,s=t==null?0:t.length;++n<s;)if(e(t[n],n,t))return!0;return!1}function Kw(t,e){return t.has(e)}var Zw=1,Qw=2;function Up(t,e,n,s,i,l){var o=n&Zw,a=t.length,u=e.length;if(a!=u&&!(o&&u>a))return!1;var f=l.get(t),h=l.get(e);if(f&&h)return f==e&&h==t;var p=-1,g=!0,m=n&Qw?new Mo:void 0;for(l.set(t,e),l.set(e,t);++p<a;){var b=t[p],_=e[p];if(s)var y=o?s(_,b,p,e,t,l):s(b,_,p,t,e,l);if(y!==void 0){if(y)continue;g=!1;break}if(m){if(!Jw(e,function(k,w){if(!Kw(m,w)&&(b===k||i(b,k,n,s,l)))return m.push(w)})){g=!1;break}}else if(!(b===_||i(b,_,n,s,l))){g=!1;break}}return l.delete(t),l.delete(e),g}function $w(t){var e=-1,n=Array(t.size);return t.forEach(function(s,i){n[++e]=[i,s]}),n}function ek(t){var e=-1,n=Array(t.size);return t.forEach(function(s){n[++e]=s}),n}var tk=1,nk=2,sk="[object Boolean]",ik="[object Date]",lk="[object Error]",ok="[object Map]",rk="[object Number]",ak="[object RegExp]",uk="[object Set]",ck="[object String]",fk="[object Symbol]",hk="[object ArrayBuffer]",dk="[object DataView]",$c=Fs?Fs.prototype:void 0,hr=$c?$c.valueOf:void 0;function pk(t,e,n,s,i,l,o){switch(n){case dk:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case hk:return!(t.byteLength!=e.byteLength||!l(new Qc(t),new Qc(e)));case sk:case ik:case rk:return pa(+t,+e);case lk:return t.name==e.name&&t.message==e.message;case ak:case ck:return t==e+"";case ok:var a=$w;case uk:var u=s&tk;if(a||(a=ek),t.size!=e.size&&!u)return!1;var f=o.get(t);if(f)return f==e;s|=nk,o.set(t,e);var h=Up(a(t),a(e),s,i,l,o);return o.delete(t),h;case fk:if(hr)return hr.call(t)==hr.call(e)}return!1}var gk=1,mk=Object.prototype,bk=mk.hasOwnProperty;function _k(t,e,n,s,i,l){var o=n&gk,a=Gc(t),u=a.length,f=Gc(e),h=f.length;if(u!=h&&!o)return!1;for(var p=u;p--;){var g=a[p];if(!(o?g in e:bk.call(e,g)))return!1}var m=l.get(t),b=l.get(e);if(m&&b)return m==e&&b==t;var _=!0;l.set(t,e),l.set(e,t);for(var y=o;++p<u;){g=a[p];var k=t[g],w=e[g];if(s)var S=o?s(w,k,g,e,t,l):s(k,w,g,t,e,l);if(!(S===void 0?k===w||i(k,w,n,s,l):S)){_=!1;break}y||(y=g=="constructor")}if(_&&!y){var P=t.constructor,M=e.constructor;P!=M&&"constructor"in t&&"constructor"in e&&!(typeof P=="function"&&P instanceof P&&typeof M=="function"&&M instanceof M)&&(_=!1)}return l.delete(t),l.delete(e),_}var vk=1,ef="[object Arguments]",tf="[object Array]",io="[object Object]",yk=Object.prototype,nf=yk.hasOwnProperty;function wk(t,e,n,s,i,l){var o=Ps(t),a=Ps(e),u=o?tf:ti(t),f=a?tf:ti(e);u=u==ef?io:u,f=f==ef?io:f;var h=u==io,p=f==io,g=u==f;if(g&&Dr(t)){if(!Dr(e))return!1;o=!0,h=!1}if(g&&!h)return l||(l=new Js),o||Np(t)?Up(t,e,n,s,i,l):pk(t,e,u,n,s,i,l);if(!(n&vk)){var m=h&&nf.call(t,"__wrapped__"),b=p&&nf.call(e,"__wrapped__");if(m||b){var _=m?t.value():t,y=b?e.value():e;return l||(l=new Js),i(_,y,n,s,l)}}return g?(l||(l=new Js),_k(t,e,n,s,i,l)):!1}function wa(t,e,n,s,i){return t===e?!0:t==null||e==null||!Xi(t)&&!Xi(e)?t!==t&&e!==e:wk(t,e,n,s,wa,i)}var kk=1,Sk=2;function Ek(t,e,n,s){var i=n.length,l=i;if(t==null)return!l;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<l;){o=n[i];var a=o[0],u=t[a],f=o[1];if(o[2]){if(u===void 0&&!(a in t))return!1}else{var h=new Js,p;if(!(p===void 0?wa(f,u,kk|Sk,s,h):p))return!1}}return!0}function Vp(t){return t===t&&!Io(t)}function Tk(t){for(var e=ba(t),n=e.length;n--;){var s=e[n],i=t[s];e[n]=[s,i,Vp(i)]}return e}function Wp(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function Mk(t){var e=Tk(t);return e.length==1&&e[0][2]?Wp(e[0][0],e[0][1]):function(n){return n===t||Ek(n,t,e)}}function Ck(t,e){return t!=null&&e in Object(t)}function Pk(t,e,n){e=jp(e,t);for(var s=-1,i=e.length,l=!1;++s<i;){var o=zo(e[s]);if(!(l=t!=null&&n(t,o)))break;t=t[o]}return l||++s!=i?l:(i=t==null?0:t.length,!!i&&ga(i)&&da(o,i)&&(Ps(t)||ma(t)))}function Ak(t,e){return t!=null&&Pk(t,e,Ck)}var xk=1,Ok=2;function Rk(t,e){return _a(t)&&Vp(e)?Wp(zo(t),e):function(n){var s=Tw(n,t);return s===void 0&&s===e?Ak(n,t):wa(e,s,xk|Ok)}}function Dk(t){return function(e){return e?.[t]}}function Lk(t){return function(e){return ya(e,t)}}function Hk(t){return _a(t)?Dk(zo(t)):Lk(t)}function Ik(t){return typeof t=="function"?t:t==null?Bo:typeof t=="object"?Ps(t)?Rk(t[0],t[1]):Mk(t):Hk(t)}function Bk(t){return function(e,n,s){for(var i=-1,l=Object(e),o=s(e),a=o.length;a--;){var u=o[++i];if(n(l[u],u,l)===!1)break}return e}}var Fk=Bk();function Nk(t,e){return t&&Fk(t,e,ba)}function jk(t,e){return function(n,s){if(n==null)return n;if(!Fo(n))return t(n,s);for(var i=n.length,l=-1,o=Object(n);++l<i&&s(o[l],l,o)!==!1;);return n}}var zk=jk(Nk);function Uk(t,e){var n=-1,s=Fo(t)?Array(t.length):[];return zk(t,function(i,l,o){s[++n]=e(i,l,o)}),s}function Vk(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function Wk(t,e){if(t!==e){var n=t!==void 0,s=t===null,i=t===t,l=xl(t),o=e!==void 0,a=e===null,u=e===e,f=xl(e);if(!a&&!f&&!l&&t>e||l&&o&&u&&!a&&!f||s&&o&&u||!n&&u||!i)return 1;if(!s&&!l&&!f&&t<e||f&&n&&i&&!s&&!l||a&&n&&i||!o&&i||!u)return-1}return 0}function qk(t,e,n){for(var s=-1,i=t.criteria,l=e.criteria,o=i.length,a=n.length;++s<o;){var u=Wk(i[s],l[s]);if(u){if(s>=a)return u;var f=n[s];return u*(f=="desc"?-1:1)}}return t.index-e.index}function Gk(t,e,n){e.length?e=ho(e,function(l){return Ps(l)?function(o){return ya(o,l.length===1?l[0]:l)}:l}):e=[Bo];var s=-1;e=ho(e,Bp(Ik));var i=Uk(t,function(l,o,a){var u=ho(e,function(f){return f(l)});return{criteria:u,index:++s,value:l}});return Vk(i,function(l,o){return qk(l,o,n)})}var Xk=t4(function(t,e){if(t==null)return[];var n=e.length;return n>1&&Fc(t,e[0],e[1])?e=[]:n>2&&Fc(e[0],e[1],e[2])&&(e=[e[0]]),Gk(t,Cw(e),[])});const sf="/__ui/api";class qp{static async getAll(){const e=await fetch(\`\${sf}/transformers\`);if(!e.ok)throw new Error(\`HTTP \${e.status}: \${e.statusText}\`);const n=await e.json();return n.plugins||n.transformers||[]}static async getById(e){const n=await fetch(\`\${sf}/transformers/\${encodeURIComponent(e)}\`);if(!n.ok)throw new Error(\`HTTP \${n.status}: \${n.statusText}\`);return await n.json()}}let lo=null;async function Yk(){if(lo===null)try{lo=await qp.getAll()}catch(t){console.warn("Failed to fetch transformers from API, using fallback:",t),lo=["openai-to-anthropic","anthropic-to-openai","anthropic-to-gemini"]}return lo}function Gp(t,e){const n=[],s=\`upstreams[\${e}]\`;if(!t.target)n.push({field:\`\${s}.target\`,message:ps(xt)("validation.targetRequired")});else try{const i=new URL(t.target);["http:","https:"].includes(i.protocol)||n.push({field:\`\${s}.target\`,message:ps(xt)("validation.targetProtocol")})}catch{n.push({field:\`\${s}.target\`,message:ps(xt)("validation.invalidUrl")})}return t.weight!==void 0&&(typeof t.weight!="number"||t.weight<=0)&&n.push({field:\`\${s}.weight\`,message:ps(xt)("validation.weightPositive")}),t.priority!==void 0&&(typeof t.priority!="number"||t.priority<0)&&n.push({field:\`\${s}.priority\`,message:ps(xt)("validation.priorityNonNegative")}),n}function Jk(t){const e=[];return t.some(s=>s.weight!==void 0)&&t.reduce((i,l)=>i+(l.weight||0),0)===0&&e.push({field:"upstreams",message:ps(xt)("validation.totalWeightPositive")}),e}async function Kk(t,e){const n=Gp(t,e),s=\`upstreams[\${e}]\`;if(t.plugins&&t.plugins.length>0){const i=t.plugins[0];if(typeof i=="string")try{const l=await Yk();if(!l.includes(i)){const o=ps(xt);n.push({field:\`\${s}.plugins\`,message:o("validation.unknownTransformer",{values:{transformer:i,options:l.join(", ")}})})}}catch(l){console.warn("Failed to validate plugin:",l)}}return n}async function Zk(t){const e=[];if(t.path?t.path.startsWith("/")||e.push({field:"path",message:ps(xt)("validation.pathStartSlash")}):e.push({field:"path",message:ps(xt)("validation.pathRequired")}),!t.upstreams||t.upstreams.length===0)e.push({field:"upstreams",message:ps(xt)("validation.upstreamRequired")});else{const n=t.upstreams.map((i,l)=>Kk(i,l));(await Promise.all(n)).forEach(i=>e.push(...i))}return t.pathRewrite&&Object.keys(t.pathRewrite).forEach(n=>{try{new RegExp(n)}catch{const s=ps(xt);e.push({field:\`pathRewrite.\${n}\`,message:s("validation.invalidRegex",{values:{pattern:n}})})}}),t.failover?.enabled&&(t.failover.retryableStatusCodes&&t.failover.retryableStatusCodes.forEach(n=>{if(n<100||n>599){const s=ps(xt);e.push({field:"failover.retryableStatusCodes",message:s("validation.invalidStatusCode",{values:{code:n}})})}}),t.failover.recoveryIntervalMs!==void 0&&t.failover.recoveryIntervalMs<=0&&e.push({field:"failover.recoveryIntervalMs",message:ps(xt)("validation.recoveryIntervalPositive")}),t.failover.recoveryTimeoutMs!==void 0&&t.failover.recoveryTimeoutMs<=0&&e.push({field:"failover.recoveryTimeoutMs",message:ps(xt)("validation.recoveryTimeoutPositive")})),e}function lf(t,e,n){const s=t.slice();return s[19]=e[n],s[20]=e,s[21]=n,s}function of(t,e,n){const s=t.slice();return s[19]=e[n],s[22]=e,s[21]=n,s}function rf(t){let e,n,s;return{c(){e=d("span"),n=E("Support dynamic expressions: "),s=d("code"),s.textContent="{{ expression }}",c(s,"class","text-xs"),c(e,"class","label-text-alt text-xs")},m(i,l){I(i,e,l),r(e,n),r(e,s)},d(i){i&&H(e)}}}function af(t){let e,n,s,i,l,o,a,u,f,h;function p(){t[12].call(n,t[22],t[21])}function g(){t[13].call(l,t[22],t[21])}function m(){return t[14](t[21])}return{c(){e=d("div"),n=d("input"),i=v(),l=d("input"),a=v(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[5]("headers.namePlaceholder")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[5]("headers.valuePlaceholder")),c(l,"class","input input-bordered input-sm flex-1"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(b,_){I(b,e,_),r(e,n),ne(n,t[19].key),r(e,i),r(e,l),ne(l,t[19].value),r(e,a),r(e,u),f||(h=[ee(n,"input",p),ee(l,"input",g),ee(u,"click",m)],f=!0)},p(b,_){t=b,_&32&&s!==(s=t[5]("headers.namePlaceholder"))&&c(n,"placeholder",s),_&4&&n.value!==t[19].key&&ne(n,t[19].key),_&32&&o!==(o=t[5]("headers.valuePlaceholder"))&&c(l,"placeholder",o),_&4&&l.value!==t[19].value&&ne(l,t[19].value)},d(b){b&&H(e),f=!1,ht(h)}}}function uf(t){let e,n,s,i,l,o,a,u,f,h;function p(){t[16].call(n,t[20],t[21])}function g(){t[17].call(l,t[20],t[21])}function m(){return t[18](t[21])}return{c(){e=d("div"),n=d("input"),i=v(),l=d("input"),a=v(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[5]("headers.namePlaceholder")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[5]("headers.valuePlaceholder")),c(l,"class","input input-bordered input-sm flex-1"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(b,_){I(b,e,_),r(e,n),ne(n,t[19].key),r(e,i),r(e,l),ne(l,t[19].value),r(e,a),r(e,u),f||(h=[ee(n,"input",p),ee(l,"input",g),ee(u,"click",m)],f=!0)},p(b,_){t=b,_&32&&s!==(s=t[5]("headers.namePlaceholder"))&&c(n,"placeholder",s),_&16&&n.value!==t[19].key&&ne(n,t[19].key),_&32&&o!==(o=t[5]("headers.valuePlaceholder"))&&c(l,"placeholder",o),_&16&&l.value!==t[19].value&&ne(l,t[19].value)},d(b){b&&H(e),f=!1,ht(h)}}}function Qk(t){let e,n,s,i,l,o,a,u,f,h,p,g=t[5]("headers.addHeader")+"",m,b,_=t[2].length+"",y,k,w,S,P,M,x=t[5]("headers.addHeader")+"",A,O,C,R,L,D,z=t[5]("headers.remove")+"",B,U,F,V,Y,j,q,Q=t[5]("headers.empty")+"",X,re,K,W,G,J,le=t[5]("headers.default")+"",se,N,te=t[4].length+"",Z,oe,Se,me,Ee,ye,ge=t[5]("headers.addHeader")+"",be,He,Te,Pe=t[1]&&rf(),_e=tt(t[2]),De=[];for(let ae=0;ae<_e.length;ae+=1)De[ae]=af(of(t,_e,ae));let ke=tt(t[4]),$=[];for(let ae=0;ae<ke.length;ae+=1)$[ae]=uf(lf(t,ke,ae));return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=v(),Pe&&Pe.c(),o=v(),a=d("div"),u=d("div"),f=d("input"),h=v(),p=d("div"),m=E(g),b=E(" ("),y=E(_),k=E(")"),w=v(),S=d("div");for(let ae=0;ae<De.length;ae+=1)De[ae].c();P=v(),M=d("button"),A=E(x),O=v(),C=d("div"),R=d("input"),L=v(),D=d("div"),B=E(z),U=v(),F=d("div"),V=d("input"),j=v(),q=d("p"),X=E(Q),re=v(),K=d("div"),W=d("input"),G=v(),J=d("div"),se=E(le),N=E(" ("),Z=E(te),oe=E(")"),Se=v(),me=d("div");for(let ae=0;ae<$.length;ae+=1)$[ae].c();Ee=v(),ye=d("button"),be=E(ge),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(f,"type","checkbox"),f.checked=!0,c(p,"class","collapse-title text-sm font-medium"),c(M,"type","button"),c(M,"class","btn btn-sm btn-ghost"),c(S,"class","collapse-content space-y-2"),c(u,"class","collapse collapse-arrow bg-base-200"),c(R,"type","checkbox"),c(D,"class","collapse-title text-sm font-medium"),c(V,"type","text"),c(V,"placeholder",Y=t[5]("headers.namePlaceholder")),c(V,"class","input input-bordered input-sm w-full"),c(q,"class","text-xs text-gray-500 mt-1"),c(F,"class","collapse-content"),c(C,"class","collapse collapse-arrow bg-base-200"),c(W,"type","checkbox"),c(J,"class","collapse-title text-sm font-medium"),c(ye,"type","button"),c(ye,"class","btn btn-sm btn-ghost"),c(me,"class","collapse-content space-y-2"),c(K,"class","collapse collapse-arrow bg-base-200"),c(a,"class","space-y-4"),c(e,"class","form-control w-full")},m(ae,ue){I(ae,e,ue),r(e,n),r(n,s),r(s,i),r(n,l),Pe&&Pe.m(n,null),r(e,o),r(e,a),r(a,u),r(u,f),r(u,h),r(u,p),r(p,m),r(p,b),r(p,y),r(p,k),r(u,w),r(u,S);for(let de=0;de<De.length;de+=1)De[de]&&De[de].m(S,null);r(S,P),r(S,M),r(M,A),r(a,O),r(a,C),r(C,R),r(C,L),r(C,D),r(D,B),r(C,U),r(C,F),r(F,V),ne(V,t[3]),r(F,j),r(F,q),r(q,X),r(a,re),r(a,K),r(K,W),r(K,G),r(K,J),r(J,se),r(J,N),r(J,Z),r(J,oe),r(K,Se),r(K,me);for(let de=0;de<$.length;de+=1)$[de]&&$[de].m(me,null);r(me,Ee),r(me,ye),r(ye,be),He||(Te=[ee(M,"click",t[6]),ee(V,"input",t[15]),ee(ye,"click",t[8])],He=!0)},p(ae,[ue]){if(ue&1&&T(i,ae[0]),ae[1]?Pe||(Pe=rf(),Pe.c(),Pe.m(n,null)):Pe&&(Pe.d(1),Pe=null),ue&32&&g!==(g=ae[5]("headers.addHeader")+"")&&T(m,g),ue&4&&_!==(_=ae[2].length+"")&&T(y,_),ue&164){_e=tt(ae[2]);let de;for(de=0;de<_e.length;de+=1){const fe=of(ae,_e,de);De[de]?De[de].p(fe,ue):(De[de]=af(fe),De[de].c(),De[de].m(S,P))}for(;de<De.length;de+=1)De[de].d(1);De.length=_e.length}if(ue&32&&x!==(x=ae[5]("headers.addHeader")+"")&&T(A,x),ue&32&&z!==(z=ae[5]("headers.remove")+"")&&T(B,z),ue&32&&Y!==(Y=ae[5]("headers.namePlaceholder"))&&c(V,"placeholder",Y),ue&8&&V.value!==ae[3]&&ne(V,ae[3]),ue&32&&Q!==(Q=ae[5]("headers.empty")+"")&&T(X,Q),ue&32&&le!==(le=ae[5]("headers.default")+"")&&T(se,le),ue&16&&te!==(te=ae[4].length+"")&&T(Z,te),ue&560){ke=tt(ae[4]);let de;for(de=0;de<ke.length;de+=1){const fe=lf(ae,ke,de);$[de]?$[de].p(fe,ue):($[de]=uf(fe),$[de].c(),$[de].m(me,Ee))}for(;de<$.length;de+=1)$[de].d(1);$.length=ke.length}ue&32&&ge!==(ge=ae[5]("headers.addHeader")+"")&&T(be,ge)},i:Ae,o:Ae,d(ae){ae&&H(e),Pe&&Pe.d(),Tn(De,ae),Tn($,ae),He=!1,ht(Te)}}}function $k(t,e,n){let s;Zt(t,xt,x=>n(5,s=x));let{value:i={}}=e,{label:l="Headers"}=e,{showHelp:o=!0}=e,a=[],u="",f=[],h=!1;function p(){n(2,a=[...a,{key:"",value:""}]),n(11,h=!0)}function g(x){n(2,a=a.filter((A,O)=>O!==x))}function m(){n(4,f=[...f,{key:"",value:""}]),n(11,h=!0)}function b(x){n(4,f=f.filter((A,O)=>O!==x))}function _(x,A){x[A].key=this.value,n(2,a),n(11,h),n(10,i),n(3,u),n(4,f)}function y(x,A){x[A].value=this.value,n(2,a),n(11,h),n(10,i),n(3,u),n(4,f)}const k=x=>g(x);function w(){u=this.value,n(3,u),n(11,h),n(10,i),n(2,a),n(4,f)}function S(x,A){x[A].key=this.value,n(4,f),n(11,h),n(10,i),n(2,a),n(3,u)}function P(x,A){x[A].value=this.value,n(4,f),n(11,h),n(10,i),n(2,a),n(3,u)}const M=x=>b(x);return t.$$set=x=>{"value"in x&&n(10,i=x.value),"label"in x&&n(0,l=x.label),"showHelp"in x&&n(1,o=x.showHelp)},t.$$.update=()=>{if(t.$$.dirty&3100){!h&&(i.add||i.remove||i.default)&&(n(2,a=Object.entries(i.add||{}).map(([C,R])=>({key:C,value:String(R)}))),n(3,u=(i.remove||[]).join(", ")),n(4,f=Object.entries(i.default||{}).map(([C,R])=>({key:C,value:String(R)}))),n(11,h=!0));const x={};a.filter(C=>C.key.trim()).forEach(C=>{x[C.key]=C.value}),n(10,i.add=Object.keys(x).length>0?x:void 0,i);const A=u.split(",").map(C=>C.trim()).filter(C=>C);n(10,i.remove=A.length>0?A:void 0,i);const O={};f.filter(C=>C.key.trim()).forEach(C=>{O[C.key]=C.value}),n(10,i.default=Object.keys(O).length>0?O:void 0,i)}},[l,o,a,u,f,s,p,g,m,b,i,h,_,y,k,w,S,P,M]}class Xp extends Gt{constructor(e){super(),qt(this,e,$k,Qk,Nt,{value:10,label:0,showHelp:1})}}function cf(t,e,n){const s=t.slice();return s[25]=e[n],s[26]=e,s[27]=n,s}function ff(t,e,n){const s=t.slice();return s[25]=e[n],s[28]=e,s[27]=n,s}function hf(t,e,n){const s=t.slice();return s[25]=e[n],s[29]=e,s[27]=n,s}function df(t){let e;return{c(){e=d("span"),e.textContent="Support JSON values and dynamic expressions",c(e,"class","label-text-alt text-xs")},m(n,s){I(n,e,s)},d(n){n&&H(e)}}}function pf(t){let e,n,s,i,l,o,a,u,f,h;function p(){t[15].call(n,t[29],t[27])}function g(){t[16].call(l,t[29],t[27])}function m(){return t[17](t[27])}return{c(){e=d("div"),n=d("input"),i=v(),l=d("input"),a=v(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[6]("headers.name")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[6]("headers.value")),c(l,"class","input input-bordered input-sm flex-[2]"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(b,_){I(b,e,_),r(e,n),ne(n,t[25].key),r(e,i),r(e,l),ne(l,t[25].value),r(e,a),r(e,u),f||(h=[ee(n,"input",p),ee(l,"input",g),ee(u,"click",m)],f=!0)},p(b,_){t=b,_&64&&s!==(s=t[6]("headers.name"))&&c(n,"placeholder",s),_&4&&n.value!==t[25].key&&ne(n,t[25].key),_&64&&o!==(o=t[6]("headers.value"))&&c(l,"placeholder",o),_&4&&l.value!==t[25].value&&ne(l,t[25].value)},d(b){b&&H(e),f=!1,ht(h)}}}function gf(t){let e,n,s,i,l,o,a,u,f,h;function p(){t[19].call(n,t[28],t[27])}function g(){t[20].call(l,t[28],t[27])}function m(){return t[21](t[27])}return{c(){e=d("div"),n=d("input"),i=v(),l=d("input"),a=v(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[6]("headers.name")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[6]("headers.value")),c(l,"class","input input-bordered input-sm flex-[2]"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(b,_){I(b,e,_),r(e,n),ne(n,t[25].key),r(e,i),r(e,l),ne(l,t[25].value),r(e,a),r(e,u),f||(h=[ee(n,"input",p),ee(l,"input",g),ee(u,"click",m)],f=!0)},p(b,_){t=b,_&64&&s!==(s=t[6]("headers.name"))&&c(n,"placeholder",s),_&16&&n.value!==t[25].key&&ne(n,t[25].key),_&64&&o!==(o=t[6]("headers.value"))&&c(l,"placeholder",o),_&16&&l.value!==t[25].value&&ne(l,t[25].value)},d(b){b&&H(e),f=!1,ht(h)}}}function mf(t){let e,n,s,i,l,o,a,u,f,h;function p(){t[22].call(n,t[26],t[27])}function g(){t[23].call(l,t[26],t[27])}function m(){return t[24](t[27])}return{c(){e=d("div"),n=d("input"),i=v(),l=d("input"),a=v(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[6]("headers.name")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[6]("headers.value")),c(l,"class","input input-bordered input-sm flex-[2]"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(b,_){I(b,e,_),r(e,n),ne(n,t[25].key),r(e,i),r(e,l),ne(l,t[25].value),r(e,a),r(e,u),f||(h=[ee(n,"input",p),ee(l,"input",g),ee(u,"click",m)],f=!0)},p(b,_){t=b,_&64&&s!==(s=t[6]("headers.name"))&&c(n,"placeholder",s),_&32&&n.value!==t[25].key&&ne(n,t[25].key),_&64&&o!==(o=t[6]("headers.value"))&&c(l,"placeholder",o),_&32&&l.value!==t[25].value&&ne(l,t[25].value)},d(b){b&&H(e),f=!1,ht(h)}}}function e3(t){let e,n,s,i,l,o,a,u,f,h,p,g=t[6]("common.add")+"",m,b,_=t[2].length+"",y,k,w,S,P,M,x=t[6]("common.add")+"",A,O,C,R,L,D,z=t[6]("headers.remove")+"",B,U,F,V,Y,j,q,Q=t[6]("headers.empty")+"",X,re,K,W,G,J,le=t[6]("body.replace")+"",se,N,te=t[4].length+"",Z,oe,Se,me,Ee,ye,ge=t[6]("common.add")+"",be,He,Te,Pe,_e,De,ke=t[6]("body.default")+"",$,ae,ue=t[5].length+"",de,fe,Be,Qe,We,Ye,nt=t[6]("common.add")+"",Je,rt,lt,he=t[1]&&df(),Re=tt(t[2]),Le=[];for(let we=0;we<Re.length;we+=1)Le[we]=pf(hf(t,Re,we));let ot=tt(t[4]),Ge=[];for(let we=0;we<ot.length;we+=1)Ge[we]=gf(ff(t,ot,we));let Ie=tt(t[5]),Ve=[];for(let we=0;we<Ie.length;we+=1)Ve[we]=mf(cf(t,Ie,we));return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=v(),he&&he.c(),o=v(),a=d("div"),u=d("div"),f=d("input"),h=v(),p=d("div"),m=E(g),b=E(" ("),y=E(_),k=E(")"),w=v(),S=d("div");for(let we=0;we<Le.length;we+=1)Le[we].c();P=v(),M=d("button"),A=E(x),O=v(),C=d("div"),R=d("input"),L=v(),D=d("div"),B=E(z),U=v(),F=d("div"),V=d("input"),j=v(),q=d("p"),X=E(Q),re=v(),K=d("div"),W=d("input"),G=v(),J=d("div"),se=E(le),N=E(" ("),Z=E(te),oe=E(")"),Se=v(),me=d("div");for(let we=0;we<Ge.length;we+=1)Ge[we].c();Ee=v(),ye=d("button"),be=E(ge),He=v(),Te=d("div"),Pe=d("input"),_e=v(),De=d("div"),$=E(ke),ae=E(" ("),de=E(ue),fe=E(")"),Be=v(),Qe=d("div");for(let we=0;we<Ve.length;we+=1)Ve[we].c();We=v(),Ye=d("button"),Je=E(nt),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(f,"type","checkbox"),f.checked=!0,c(p,"class","collapse-title text-sm font-medium"),c(M,"type","button"),c(M,"class","btn btn-sm btn-ghost"),c(S,"class","collapse-content space-y-2"),c(u,"class","collapse collapse-arrow bg-base-200"),c(R,"type","checkbox"),c(D,"class","collapse-title text-sm font-medium"),c(V,"type","text"),c(V,"placeholder",Y=t[6]("body.placeholder")),c(V,"class","input input-bordered input-sm w-full"),c(q,"class","text-xs text-gray-500 mt-1"),c(F,"class","collapse-content"),c(C,"class","collapse collapse-arrow bg-base-200"),c(W,"type","checkbox"),c(J,"class","collapse-title text-sm font-medium"),c(ye,"type","button"),c(ye,"class","btn btn-sm btn-ghost"),c(me,"class","collapse-content space-y-2"),c(K,"class","collapse collapse-arrow bg-base-200"),c(Pe,"type","checkbox"),c(De,"class","collapse-title text-sm font-medium"),c(Ye,"type","button"),c(Ye,"class","btn btn-sm btn-ghost"),c(Qe,"class","collapse-content space-y-2"),c(Te,"class","collapse collapse-arrow bg-base-200"),c(a,"class","space-y-4"),c(e,"class","form-control w-full")},m(we,Ke){I(we,e,Ke),r(e,n),r(n,s),r(s,i),r(n,l),he&&he.m(n,null),r(e,o),r(e,a),r(a,u),r(u,f),r(u,h),r(u,p),r(p,m),r(p,b),r(p,y),r(p,k),r(u,w),r(u,S);for(let ve=0;ve<Le.length;ve+=1)Le[ve]&&Le[ve].m(S,null);r(S,P),r(S,M),r(M,A),r(a,O),r(a,C),r(C,R),r(C,L),r(C,D),r(D,B),r(C,U),r(C,F),r(F,V),ne(V,t[3]),r(F,j),r(F,q),r(q,X),r(a,re),r(a,K),r(K,W),r(K,G),r(K,J),r(J,se),r(J,N),r(J,Z),r(J,oe),r(K,Se),r(K,me);for(let ve=0;ve<Ge.length;ve+=1)Ge[ve]&&Ge[ve].m(me,null);r(me,Ee),r(me,ye),r(ye,be),r(a,He),r(a,Te),r(Te,Pe),r(Te,_e),r(Te,De),r(De,$),r(De,ae),r(De,de),r(De,fe),r(Te,Be),r(Te,Qe);for(let ve=0;ve<Ve.length;ve+=1)Ve[ve]&&Ve[ve].m(Qe,null);r(Qe,We),r(Qe,Ye),r(Ye,Je),rt||(lt=[ee(M,"click",t[7]),ee(V,"input",t[18]),ee(ye,"click",t[9]),ee(Ye,"click",t[11])],rt=!0)},p(we,[Ke]){if(Ke&1&&T(i,we[0]),we[1]?he||(he=df(),he.c(),he.m(n,null)):he&&(he.d(1),he=null),Ke&64&&g!==(g=we[6]("common.add")+"")&&T(m,g),Ke&4&&_!==(_=we[2].length+"")&&T(y,_),Ke&324){Re=tt(we[2]);let ve;for(ve=0;ve<Re.length;ve+=1){const Xe=hf(we,Re,ve);Le[ve]?Le[ve].p(Xe,Ke):(Le[ve]=pf(Xe),Le[ve].c(),Le[ve].m(S,P))}for(;ve<Le.length;ve+=1)Le[ve].d(1);Le.length=Re.length}if(Ke&64&&x!==(x=we[6]("common.add")+"")&&T(A,x),Ke&64&&z!==(z=we[6]("headers.remove")+"")&&T(B,z),Ke&64&&Y!==(Y=we[6]("body.placeholder"))&&c(V,"placeholder",Y),Ke&8&&V.value!==we[3]&&ne(V,we[3]),Ke&64&&Q!==(Q=we[6]("headers.empty")+"")&&T(X,Q),Ke&64&&le!==(le=we[6]("body.replace")+"")&&T(se,le),Ke&16&&te!==(te=we[4].length+"")&&T(Z,te),Ke&1104){ot=tt(we[4]);let ve;for(ve=0;ve<ot.length;ve+=1){const Xe=ff(we,ot,ve);Ge[ve]?Ge[ve].p(Xe,Ke):(Ge[ve]=gf(Xe),Ge[ve].c(),Ge[ve].m(me,Ee))}for(;ve<Ge.length;ve+=1)Ge[ve].d(1);Ge.length=ot.length}if(Ke&64&&ge!==(ge=we[6]("common.add")+"")&&T(be,ge),Ke&64&&ke!==(ke=we[6]("body.default")+"")&&T($,ke),Ke&32&&ue!==(ue=we[5].length+"")&&T(de,ue),Ke&4192){Ie=tt(we[5]);let ve;for(ve=0;ve<Ie.length;ve+=1){const Xe=cf(we,Ie,ve);Ve[ve]?Ve[ve].p(Xe,Ke):(Ve[ve]=mf(Xe),Ve[ve].c(),Ve[ve].m(Qe,We))}for(;ve<Ve.length;ve+=1)Ve[ve].d(1);Ve.length=Ie.length}Ke&64&&nt!==(nt=we[6]("common.add")+"")&&T(Je,nt)},i:Ae,o:Ae,d(we){we&&H(e),he&&he.d(),Tn(Le,we),Tn(Ge,we),Tn(Ve,we),rt=!1,ht(lt)}}}function t3(t,e,n){let s;Zt(t,xt,D=>n(6,s=D));let{value:i={}}=e,{label:l="Body"}=e,{showHelp:o=!0}=e,a=[],u="",f=[],h=[],p=!1;function g(){n(2,a=[...a,{key:"",value:""}]),n(14,p=!0)}function m(D){n(2,a=a.filter((z,B)=>B!==D))}function b(){n(4,f=[...f,{key:"",value:""}]),n(14,p=!0)}function _(D){n(4,f=f.filter((z,B)=>B!==D))}function y(){n(5,h=[...h,{key:"",value:""}]),n(14,p=!0)}function k(D){n(5,h=h.filter((z,B)=>B!==D))}function w(D,z){D[z].key=this.value,n(2,a),n(14,p),n(13,i),n(3,u),n(4,f),n(5,h)}function S(D,z){D[z].value=this.value,n(2,a),n(14,p),n(13,i),n(3,u),n(4,f),n(5,h)}const P=D=>m(D);function M(){u=this.value,n(3,u),n(14,p),n(13,i),n(2,a),n(4,f),n(5,h)}function x(D,z){D[z].key=this.value,n(4,f),n(14,p),n(13,i),n(2,a),n(3,u),n(5,h)}function A(D,z){D[z].value=this.value,n(4,f),n(14,p),n(13,i),n(2,a),n(3,u),n(5,h)}const O=D=>_(D);function C(D,z){D[z].key=this.value,n(5,h),n(14,p),n(13,i),n(2,a),n(3,u),n(4,f)}function R(D,z){D[z].value=this.value,n(5,h),n(14,p),n(13,i),n(2,a),n(3,u),n(4,f)}const L=D=>k(D);return t.$$set=D=>{"value"in D&&n(13,i=D.value),"label"in D&&n(0,l=D.label),"showHelp"in D&&n(1,o=D.showHelp)},t.$$.update=()=>{if(t.$$.dirty&24636){!p&&(i.add||i.remove||i.replace||i.default)&&(n(2,a=Object.entries(i.add||{}).map(([F,V])=>({key:F,value:typeof V=="string"?V:JSON.stringify(V)}))),n(3,u=(i.remove||[]).join(", ")),n(4,f=Object.entries(i.replace||{}).map(([F,V])=>({key:F,value:typeof V=="string"?V:JSON.stringify(V)}))),n(5,h=Object.entries(i.default||{}).map(([F,V])=>({key:F,value:typeof V=="string"?V:JSON.stringify(V)}))),n(14,p=!0));const D={};a.filter(F=>F.key.trim()).forEach(F=>{try{D[F.key]=JSON.parse(F.value)}catch{D[F.key]=F.value}}),n(13,i.add=Object.keys(D).length>0?D:void 0,i);const z=u.split(",").map(F=>F.trim()).filter(F=>F);n(13,i.remove=z.length>0?z:void 0,i);const B={};f.filter(F=>F.key.trim()).forEach(F=>{try{B[F.key]=JSON.parse(F.value)}catch{B[F.key]=F.value}}),n(13,i.replace=Object.keys(B).length>0?B:void 0,i);const U={};h.filter(F=>F.key.trim()).forEach(F=>{try{U[F.key]=JSON.parse(F.value)}catch{U[F.key]=F.value}}),n(13,i.default=Object.keys(U).length>0?U:void 0,i)}},[l,o,a,u,f,h,s,g,m,b,_,y,k,i,p,w,S,P,M,x,A,O,C,R,L]}class Yp extends Gt{constructor(e){super(),qt(this,e,t3,e3,Nt,{value:13,label:0,showHelp:1})}}function bf(t,e,n){const s=t.slice();return s[16]=e[n],s}function _f(t){let e,n=t[16].name+"",s,i;return{c(){e=d("option"),s=E(n),e.__value=i=t[16].id,ne(e,e.__value)},m(l,o){I(l,e,o),r(e,s)},p(l,o){o&64&&n!==(n=l[16].name+"")&&T(s,n),o&64&&i!==(i=l[16].id)&&(e.__value=i,ne(e,e.__value))},d(l){l&&H(e)}}}function vf(t){let e,n,s=t[6].find(t[12])?.description+"",i;return{c(){e=d("div"),n=d("span"),i=E(s),c(n,"class","label-text-alt text-gray-500"),c(e,"class","label")},m(l,o){I(l,e,o),r(e,n),r(n,i)},p(l,o){o&65&&s!==(s=l[6].find(l[12])?.description+"")&&T(i,s)},d(l){l&&H(e)}}}function yf(t){let e,n,s=t[2]?"Hide":"Show",i,l,o,a,u,f,h=t[2]&&wf(t);return{c(){e=d("div"),n=d("button"),i=E(s),l=E(" Preview"),o=v(),h&&h.c(),a=Zn(),c(n,"type","button"),c(n,"class","btn btn-xs btn-outline"),c(e,"class","flex items-center gap-2")},m(p,g){I(p,e,g),r(e,n),r(n,i),r(n,l),I(p,o,g),h&&h.m(p,g),I(p,a,g),u||(f=ee(n,"click",t[13]),u=!0)},p(p,g){g&4&&s!==(s=p[2]?"Hide":"Show")&&T(i,s),p[2]?h?h.p(p,g):(h=wf(p),h.c(),h.m(a.parentNode,a)):h&&(h.d(1),h=null)},d(p){p&&(H(e),H(o),H(a)),h&&h.d(p),u=!1,f()}}}function wf(t){let e,n,s,i=t[7]("plugin.testPlugin")+"",l,o,a,u,f,h,p=t[7]("plugin.input")+"",g,m,b,_,y,k,w,S,P=t[7]("plugin.output")+"",M,x,A,O,C,R,L,D,z,B,U=t[7]("plugin.testPlugin")+"",F,V,Y,j,q,Q=(t[4]||t[5])&&kf(t),X=t[5]&&Sf(t);return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=v(),a=d("div"),u=d("div"),f=d("label"),h=d("span"),g=E(p),m=v(),b=d("textarea"),y=v(),k=d("div"),w=d("label"),S=d("span"),M=E(P),x=v(),A=d("textarea"),C=v(),R=d("div"),L=d("button"),D=pe("svg"),z=pe("path"),B=v(),F=E(U),V=v(),Q&&Q.c(),Y=v(),X&&X.c(),c(s,"class","font-semibold text-sm"),c(h,"class","label-text text-xs"),c(f,"class","label py-1"),c(f,"for","plugin-input"),c(b,"id","plugin-input"),c(b,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full"),c(b,"placeholder",_=t[7]("plugin.inputPlaceholder")),c(b,"rows","10"),c(S,"class","label-text text-xs"),c(w,"class","label py-1"),c(w,"for","plugin-output"),c(A,"id","plugin-output"),c(A,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full bg-base-100"),A.value=t[4],A.readOnly=!0,c(A,"rows","10"),c(A,"placeholder",O=t[7]("plugin.outputPlaceholder")),c(a,"class","grid grid-cols-2 gap-4"),c(z,"stroke-linecap","round"),c(z,"stroke-linejoin","round"),c(z,"stroke-width","2"),c(z,"d","M14 5l7 7m0 0l-7 7m7-7H3"),c(D,"xmlns","http://www.w3.org/2000/svg"),c(D,"class","h-3 w-3"),c(D,"fill","none"),c(D,"viewBox","0 0 24 24"),c(D,"stroke","currentColor"),c(L,"type","button"),c(L,"class","btn btn-xs btn-primary"),c(R,"class","flex gap-2"),c(n,"class","card-body p-4 space-y-3"),c(e,"class","card bg-base-200")},m(re,K){I(re,e,K),r(e,n),r(n,s),r(s,l),r(n,o),r(n,a),r(a,u),r(u,f),r(f,h),r(h,g),r(u,m),r(u,b),ne(b,t[3]),r(a,y),r(a,k),r(k,w),r(w,S),r(S,M),r(k,x),r(k,A),r(n,C),r(n,R),r(R,L),r(L,D),r(D,z),r(L,B),r(L,F),r(R,V),Q&&Q.m(R,null),r(n,Y),X&&X.m(n,null),j||(q=[ee(b,"input",t[14]),ee(L,"click",t[9])],j=!0)},p(re,K){K&128&&i!==(i=re[7]("plugin.testPlugin")+"")&&T(l,i),K&128&&p!==(p=re[7]("plugin.input")+"")&&T(g,p),K&128&&_!==(_=re[7]("plugin.inputPlaceholder"))&&c(b,"placeholder",_),K&8&&ne(b,re[3]),K&128&&P!==(P=re[7]("plugin.output")+"")&&T(M,P),K&16&&(A.value=re[4]),K&128&&O!==(O=re[7]("plugin.outputPlaceholder"))&&c(A,"placeholder",O),K&128&&U!==(U=re[7]("plugin.testPlugin")+"")&&T(F,U),re[4]||re[5]?Q?Q.p(re,K):(Q=kf(re),Q.c(),Q.m(R,null)):Q&&(Q.d(1),Q=null),re[5]?X?X.p(re,K):(X=Sf(re),X.c(),X.m(n,null)):X&&(X.d(1),X=null)},d(re){re&&H(e),Q&&Q.d(),X&&X.d(),j=!1,ht(q)}}}function kf(t){let e,n=t[7]("common.reset")+"",s,i,l;return{c(){e=d("button"),s=E(n),c(e,"type","button"),c(e,"class","btn btn-xs btn-ghost")},m(o,a){I(o,e,a),r(e,s),i||(l=ee(e,"click",t[10]),i=!0)},p(o,a){a&128&&n!==(n=o[7]("common.reset")+"")&&T(s,n)},d(o){o&&H(e),i=!1,l()}}}function Sf(t){let e,n,s,i,l,o=t[7]("common.error")+"",a,u,f;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),u=E(": "),f=E(t[5]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-4 w-4"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(l,"class","text-xs"),c(e,"class","alert alert-error py-2")},m(h,p){I(h,e,p),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a),r(l,u),r(l,f)},p(h,p){p&128&&o!==(o=h[7]("common.error")+"")&&T(a,o),p&32&&T(f,h[5])},d(h){h&&H(e)}}}function n3(t){let e,n,s,i,l,o,a,u,f=t[7]("plugin.none")+"",h,p,g,m,b,_=tt(t[6]),y=[];for(let S=0;S<_.length;S+=1)y[S]=_f(bf(t,_,S));let k=t[0]&&vf(t),w=t[0]&&yf(t);return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),l=E(t[1]),o=v(),a=d("select"),u=d("option"),h=E(f);for(let S=0;S<y.length;S+=1)y[S].c();p=v(),k&&k.c(),g=v(),w&&w.c(),c(i,"class","label-text font-semibold"),c(s,"class","label"),c(s,"for","plugin-select"),u.__value=null,ne(u,u.__value),c(a,"id","plugin-select"),c(a,"class","select select-bordered"),t[0]===void 0&&vs(()=>t[11].call(a)),c(n,"class","form-control"),c(e,"class","space-y-3")},m(S,P){I(S,e,P),r(e,n),r(n,s),r(s,i),r(i,l),r(n,o),r(n,a),r(a,u),r(u,h);for(let M=0;M<y.length;M+=1)y[M]&&y[M].m(a,null);Cn(a,t[0],!0),r(n,p),k&&k.m(n,null),r(e,g),w&&w.m(e,null),m||(b=[ee(a,"change",t[11]),ee(a,"change",t[8])],m=!0)},p(S,[P]){if(P&2&&T(l,S[1]),P&128&&f!==(f=S[7]("plugin.none")+"")&&T(h,f),P&64){_=tt(S[6]);let M;for(M=0;M<_.length;M+=1){const x=bf(S,_,M);y[M]?y[M].p(x,P):(y[M]=_f(x),y[M].c(),y[M].m(a,null))}for(;M<y.length;M+=1)y[M].d(1);y.length=_.length}P&65&&Cn(a,S[0]),S[0]?k?k.p(S,P):(k=vf(S),k.c(),k.m(n,null)):k&&(k.d(1),k=null),S[0]?w?w.p(S,P):(w=yf(S),w.c(),w.m(e,null)):w&&(w.d(1),w=null)},i:Ae,o:Ae,d(S){S&&H(e),Tn(y,S),k&&k.d(),w&&w.d(),m=!1,ht(b)}}}function Jp(t){return t.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" \u2192 ")}function s3(t){const e=t.split("-to-");if(e.length===2){const[n,s]=e;return\`Convert \${n.charAt(0).toUpperCase()+n.slice(1)} API format to \${s.charAt(0).toUpperCase()+s.slice(1)} format\`}return\`\${Jp(t)} plugin\`}function i3(t,e,n){let s;Zt(t,xt,S=>n(7,s=S));let{plugin:i=null}=e,{label:l="Plugin"}=e;const o=Dl();let a=!1,u=\`{
21215
- "model": "claude-3-5-sonnet-20241022",
21216
- "messages": [
21217
- {
21218
- "role": "user",
21219
- "content": "Hello"
21220
- }
21221
- ]
21222
- }\`,f="",h=null,p=[];ls(async()=>{try{const S=await qp.getAll();n(6,p=S.map(P=>({id:P,name:Jp(P),description:s3(P)})))}catch(S){console.warn("Failed to load plugins from API, using fallback:",S),n(6,p=[{id:"openai-to-anthropic",name:"OpenAI \u2192 Anthropic",description:"Convert OpenAI API format to Anthropic format"},{id:"anthropic-to-openai",name:"Anthropic \u2192 OpenAI",description:"Convert Anthropic API format to OpenAI format"},{id:"anthropic-to-gemini",name:"Anthropic \u2192 Gemini",description:"Convert Anthropic API format to Google Gemini format"}])}});function g(){o("change",i),n(4,f=""),n(5,h=null)}function m(){if(!i||!u){n(5,h=s("plugin.testFailed",{values:{error:"Invalid input"}}));return}try{const S=JSON.parse(u);let P;i==="anthropic-to-gemini"?P={contents:S.messages?.map(M=>({role:M.role==="user"?"user":"model",parts:[{text:M.content}]})),generationConfig:{temperature:S.temperature||1,maxOutputTokens:S.max_tokens||8192}}:i==="anthropic-to-openai"?P={model:S.model?.replace("claude","gpt-4"),messages:S.messages,temperature:S.temperature,max_tokens:S.max_tokens}:P={...S,_transformed:!0},n(4,f=JSON.stringify(P,null,2)),n(5,h=null)}catch(S){n(5,h=S.message),n(4,f="")}}function b(){n(4,f=""),n(5,h=null)}function _(){i=Is(this),n(0,i),n(6,p)}const y=S=>S.id===i,k=()=>n(2,a=!a);function w(){u=this.value,n(3,u)}return t.$$set=S=>{"plugin"in S&&n(0,i=S.plugin),"label"in S&&n(1,l=S.label)},[i,l,a,u,f,h,p,s,g,m,b,_,y,k,w]}class Kp extends Gt{constructor(e){super(),qt(this,e,i3,n3,Nt,{plugin:0,label:1})}}function Ef(t){let e,n,s=t[6].find(Cf)?.message+"",i,l;return{c(){e=d("label"),n=d("span"),i=E(s),c(n,"class","label-text-alt text-error"),c(e,"class","label"),c(e,"for",l="upstream-target-"+t[2])},m(o,a){I(o,e,a),r(e,n),r(n,i)},p(o,a){a&64&&s!==(s=o[6].find(Cf)?.message+"")&&T(i,s),a&4&&l!==(l="upstream-target-"+o[2])&&c(e,"for",l)},d(o){o&&H(e)}}}function l3(t){let e,n,s,i,l=t[7]("upstream.title",{values:{index:t[2]+1}})+"",o,a,u,f,h,p,g,m,b,_,y,k,w,S,P,M,x=t[7]("upstream.targetUrl")+"",A,O,C,R,L,D,z,B,U,F=t[6].some(Tf),V,Y,j,q,Q,X=t[7]("upstream.weight")+"",re,K,W,G=t[7]("upstream.weightHelp")+"",J,le,se,N,te,Z,oe,Se,me,Ee,ye,ge,be,He,Te,Pe,_e,De,ke,$,ae,ue,de,fe=t[7]("upstream.transformerHelp")+"",Be,Qe,We,Ye,nt,Je,rt,lt,he,Re,Le,ot,Ge,Ie=F&&Ef(t);function Ve($e){t[11]($e)}let we={label:t[7]("upstream.transformer")};t[5]!==void 0&&(we.plugin=t[5]),_e=new Kp({props:we}),wn.push(()=>Yn(_e,"plugin",Ve));function Ke($e){t[13]($e)}let ve={label:t[7]("headers.title")};t[0].headers!==void 0&&(ve.value=t[0].headers),Ye=new Xp({props:ve}),wn.push(()=>Yn(Ye,"value",Ke));function Xe($e){t[14]($e)}let Ct={label:t[7]("body.title")};return t[0].body!==void 0&&(Ct.value=t[0].body),he=new Yp({props:Ct}),wn.push(()=>Yn(he,"value",Xe)),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h3"),o=E(l),a=v(),u=d("div"),f=d("button"),h=pe("svg"),p=pe("path"),m=v(),b=d("button"),_=E("\u2715"),k=v(),w=d("div"),S=d("div"),P=d("label"),M=d("span"),A=E(x),O=v(),C=d("span"),C.textContent="*",L=v(),D=d("input"),U=v(),Ie&&Ie.c(),V=v(),Y=d("div"),j=d("div"),q=d("label"),Q=d("span"),re=E(X),K=v(),W=d("span"),J=E(G),se=v(),N=d("input"),Z=v(),oe=d("div"),Se=d("label"),me=d("span"),me.textContent="Priority",Ee=v(),ye=d("span"),ye.textContent="Failover order",be=v(),He=d("input"),Pe=v(),_t(_e.$$.fragment),ke=v(),$=d("div"),ae=d("input"),ue=v(),de=d("div"),Be=E(fe),Qe=v(),We=d("div"),_t(Ye.$$.fragment),Je=v(),rt=d("div"),lt=v(),_t(he.$$.fragment),c(i,"class","font-semibold"),c(p,"stroke-linecap","round"),c(p,"stroke-linejoin","round"),c(p,"stroke-width","2"),c(p,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),c(h,"xmlns","http://www.w3.org/2000/svg"),c(h,"class","h-4 w-4"),c(h,"fill","none"),c(h,"viewBox","0 0 24 24"),c(h,"stroke","currentColor"),c(f,"type","button"),c(f,"class","btn btn-sm btn-outline btn-square"),c(f,"title",g=t[7]("routeCard.duplicate")),c(b,"type","button"),c(b,"class","btn btn-sm btn-error btn-square"),c(b,"title",y=t[7]("upstream.remove")),c(u,"class","flex gap-2"),c(s,"class","flex justify-between items-center mb-4"),c(C,"class","text-error"),c(M,"class","label-text font-semibold"),c(P,"class","label"),c(P,"for",R="upstream-target-"+t[2]),c(D,"id",z="upstream-target-"+t[2]),c(D,"type","url"),c(D,"placeholder",B=t[7]("upstream.targetPlaceholder")),c(D,"class","input input-bordered"),D.required=!0,ie(D,"input-error",t[6].some(Mf)),c(S,"class","form-control"),c(Q,"class","label-text"),c(W,"class","label-text-alt text-xs"),c(q,"class","label"),c(q,"for",le="upstream-weight-"+t[2]),c(N,"id",te="upstream-weight-"+t[2]),c(N,"type","number"),c(N,"placeholder","100"),c(N,"class","input input-bordered"),c(N,"min","1"),c(j,"class","form-control"),c(me,"class","label-text"),c(ye,"class","label-text-alt text-xs"),c(Se,"class","label"),c(Se,"for",ge="upstream-priority-"+t[2]),c(He,"id",Te="upstream-priority-"+t[2]),c(He,"type","number"),c(He,"placeholder","1"),c(He,"class","input input-bordered"),c(He,"min","0"),c(oe,"class","form-control"),c(Y,"class","grid grid-cols-2 gap-4"),c(ae,"type","checkbox"),c(de,"class","collapse-title text-sm font-medium"),c(rt,"class","divider"),c(We,"class","collapse-content space-y-6"),c($,"class","collapse collapse-arrow bg-base-200"),c(w,"class","grid grid-cols-1 gap-4"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-100 shadow-sm border border-base-300")},m($e,je){I($e,e,je),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(u,f),r(f,h),r(h,p),r(u,m),r(u,b),r(b,_),r(n,k),r(n,w),r(w,S),r(S,P),r(P,M),r(M,A),r(M,O),r(M,C),r(S,L),r(S,D),ne(D,t[0].target),r(S,U),Ie&&Ie.m(S,null),r(w,V),r(w,Y),r(Y,j),r(j,q),r(q,Q),r(Q,re),r(q,K),r(q,W),r(W,J),r(j,se),r(j,N),ne(N,t[0].weight),r(Y,Z),r(Y,oe),r(oe,Se),r(Se,me),r(Se,Ee),r(Se,ye),r(oe,be),r(oe,He),ne(He,t[0].priority),r(w,Pe),pt(_e,w,null),r(w,ke),r(w,$),r($,ae),ae.checked=t[1],r($,ue),r($,de),r(de,Be),r($,Qe),r($,We),pt(Ye,We,null),r(We,Je),r(We,rt),r(We,lt),pt(he,We,null),Le=!0,ot||(Ge=[ee(f,"click",function(){ui(t[4])&&t[4].apply(this,arguments)}),ee(b,"click",function(){ui(t[3])&&t[3].apply(this,arguments)}),ee(D,"input",t[8]),ee(N,"input",t[9]),ee(He,"input",t[10]),ee(ae,"change",t[12])],ot=!0)},p($e,[je]){t=$e,(!Le||je&132)&&l!==(l=t[7]("upstream.title",{values:{index:t[2]+1}})+"")&&T(o,l),(!Le||je&128&&g!==(g=t[7]("routeCard.duplicate")))&&c(f,"title",g),(!Le||je&128&&y!==(y=t[7]("upstream.remove")))&&c(b,"title",y),(!Le||je&128)&&x!==(x=t[7]("upstream.targetUrl")+"")&&T(A,x),(!Le||je&4&&R!==(R="upstream-target-"+t[2]))&&c(P,"for",R),(!Le||je&4&&z!==(z="upstream-target-"+t[2]))&&c(D,"id",z),(!Le||je&128&&B!==(B=t[7]("upstream.targetPlaceholder")))&&c(D,"placeholder",B),je&1&&D.value!==t[0].target&&ne(D,t[0].target),(!Le||je&64)&&ie(D,"input-error",t[6].some(Mf)),je&64&&(F=t[6].some(Tf)),F?Ie?Ie.p(t,je):(Ie=Ef(t),Ie.c(),Ie.m(S,null)):Ie&&(Ie.d(1),Ie=null),(!Le||je&128)&&X!==(X=t[7]("upstream.weight")+"")&&T(re,X),(!Le||je&128)&&G!==(G=t[7]("upstream.weightHelp")+"")&&T(J,G),(!Le||je&4&&le!==(le="upstream-weight-"+t[2]))&&c(q,"for",le),(!Le||je&4&&te!==(te="upstream-weight-"+t[2]))&&c(N,"id",te),je&1&&yt(N.value)!==t[0].weight&&ne(N,t[0].weight),(!Le||je&4&&ge!==(ge="upstream-priority-"+t[2]))&&c(Se,"for",ge),(!Le||je&4&&Te!==(Te="upstream-priority-"+t[2]))&&c(He,"id",Te),je&1&&yt(He.value)!==t[0].priority&&ne(He,t[0].priority);const At={};je&128&&(At.label=t[7]("upstream.transformer")),!De&&je&32&&(De=!0,At.plugin=t[5],Xn(()=>De=!1)),_e.$set(At),je&2&&(ae.checked=t[1]),(!Le||je&128)&&fe!==(fe=t[7]("upstream.transformerHelp")+"")&&T(Be,fe);const it={};je&128&&(it.label=t[7]("headers.title")),!nt&&je&1&&(nt=!0,it.value=t[0].headers,Xn(()=>nt=!1)),Ye.$set(it);const mt={};je&128&&(mt.label=t[7]("body.title")),!Re&&je&1&&(Re=!0,mt.value=t[0].body,Xn(()=>Re=!1)),he.$set(mt)},i($e){Le||(ze(_e.$$.fragment,$e),ze(Ye.$$.fragment,$e),ze(he.$$.fragment,$e),Le=!0)},o($e){Ue(_e.$$.fragment,$e),Ue(Ye.$$.fragment,$e),Ue(he.$$.fragment,$e),Le=!1},d($e){$e&&H(e),Ie&&Ie.d(),gt(_e),gt(Ye),gt(he),ot=!1,ht(Ge)}}}const Tf=t=>t.field.includes("target"),Mf=t=>t.field.includes("target"),Cf=t=>t.field.includes("target");function o3(t,e,n){let s,i;Zt(t,xt,w=>n(7,i=w));let{upstream:l}=e,{index:o}=e,{onRemove:a}=e,{onDuplicate:u}=e,{showAdvanced:f=!1}=e,h=l.plugins?.[0]||null;function p(){l.target=this.value,n(0,l),n(5,h)}function g(){l.weight=yt(this.value),n(0,l),n(5,h)}function m(){l.priority=yt(this.value),n(0,l),n(5,h)}function b(w){h=w,n(5,h)}function _(){f=this.checked,n(1,f)}function y(w){t.$$.not_equal(l.headers,w)&&(l.headers=w,n(0,l),n(5,h))}function k(w){t.$$.not_equal(l.body,w)&&(l.body=w,n(0,l),n(5,h))}return t.$$set=w=>{"upstream"in w&&n(0,l=w.upstream),"index"in w&&n(2,o=w.index),"onRemove"in w&&n(3,a=w.onRemove),"onDuplicate"in w&&n(4,u=w.onDuplicate),"showAdvanced"in w&&n(1,f=w.showAdvanced)},t.$$.update=()=>{t.$$.dirty&1&&(n(0,l.headers=l.headers||{add:{},remove:[],default:{}},l),n(0,l.body=l.body||{add:{},remove:[],replace:{},default:{}},l)),t.$$.dirty&32&&n(0,l.plugins=h?[h]:void 0,l),t.$$.dirty&5&&n(6,s=Gp(l,o))},[l,f,o,a,u,h,s,i,p,g,m,b,_,y,k]}class r3 extends Gt{constructor(e){super(),qt(this,e,o3,l3,Nt,{upstream:0,index:2,onRemove:3,onDuplicate:4,showAdvanced:1})}}function Pf(t,e,n){const s=t.slice();return s[7]=e[n],s}function Af(t){let e,n,s,i,l,o,a,u,f,h,p,g,m=tt(t[1]),b=[];for(let _=0;_<m.length;_+=1)b[_]=xf(Pf(t,m,_));return{c(){e=d("div"),n=d("div"),s=d("h3"),s.textContent="Select Route Template",i=v(),l=d("div");for(let _=0;_<b.length;_+=1)b[_].c();o=v(),a=d("div"),u=d("button"),u.textContent="Close",f=v(),h=d("button"),c(s,"class","font-bold text-lg mb-4"),c(l,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),c(u,"type","button"),c(u,"class","btn btn-sm"),c(a,"class","modal-action"),c(n,"class","modal-box max-w-4xl"),c(h,"type","button"),c(h,"class","modal-backdrop"),c(h,"aria-label","Close modal"),c(e,"class","modal modal-open")},m(_,y){I(_,e,y),r(e,n),r(n,s),r(n,i),r(n,l);for(let k=0;k<b.length;k+=1)b[k]&&b[k].m(l,null);r(n,o),r(n,a),r(a,u),r(e,f),r(e,h),p||(g=[ee(u,"click",t[4]),ee(h,"click",t[5])],p=!0)},p(_,y){if(y&6){m=tt(_[1]);let k;for(k=0;k<m.length;k+=1){const w=Pf(_,m,k);b[k]?b[k].p(w,y):(b[k]=xf(w),b[k].c(),b[k].m(l,null))}for(;k<b.length;k+=1)b[k].d(1);b.length=m.length}},d(_){_&&H(e),Tn(b,_),p=!1,ht(g)}}}function xf(t){let e,n,s,i,l,o,a,u,f,h,p;function g(){return t[3](t[7])}return{c(){e=d("button"),n=d("div"),s=d("h4"),s.textContent=\`\${t[7].name}\`,i=v(),l=d("p"),l.textContent=\`\${t[7].description}\`,o=v(),a=d("div"),u=d("div"),u.textContent=\`\${JSON.stringify(t[7].template,null,2)}\`,f=v(),c(s,"class","card-title text-base"),c(l,"class","text-sm text-gray-600"),c(u,"class","text-xs font-mono bg-base-100 p-2 rounded max-h-32 overflow-auto"),c(a,"class","mt-2"),c(n,"class","card-body"),c(e,"type","button"),c(e,"class","card card-compact bg-base-200 hover:bg-base-300 cursor-pointer text-left")},m(m,b){I(m,e,b),r(e,n),r(n,s),r(n,i),r(n,l),r(n,o),r(n,a),r(a,u),r(e,f),h||(p=ee(e,"click",g),h=!0)},p(m,b){t=m},d(m){m&&H(e),h=!1,p()}}}function a3(t){let e,n=t[0]&&Af(t);return{c(){n&&n.c(),e=Zn()},m(s,i){n&&n.m(s,i),I(s,e,i)},p(s,[i]){s[0]?n?n.p(s,i):(n=Af(s),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Ae,o:Ae,d(s){s&&H(e),n&&n.d(s)}}}function u3(t,e,n){let{showTemplates:s=!1}=e;const i=Dl(),l=[{name:"Simple Proxy",description:"Basic reverse proxy to a single upstream",template:{path:"/api",upstreams:[{target:"https://api.example.com",weight:100,priority:1}]}},{name:"Load Balanced",description:"Multiple upstreams with load balancing",template:{path:"/api",upstreams:[{target:"https://api1.example.com",weight:100,priority:1},{target:"https://api2.example.com",weight:100,priority:1}]}},{name:"Failover Setup",description:"Primary and backup upstreams with failover",template:{path:"/api",upstreams:[{target:"https://primary.example.com",weight:200,priority:1},{target:"https://backup.example.com",weight:100,priority:2}],failover:{enabled:!0,retryableStatusCodes:[500,502,503,504]}}},{name:"Anthropic to Gemini",description:"Convert Anthropic API to Google Gemini format",template:{path:"/v1/messages",transformer:"anthropic-to-gemini",upstreams:[{target:"https://generativelanguage.googleapis.com",weight:100,priority:1}]}},{name:"Anthropic to OpenAI",description:"Convert Anthropic API to OpenAI format",template:{path:"/v1/messages",transformer:"anthropic-to-openai",upstreams:[{target:"https://api.openai.com",weight:100,priority:1}]}},{name:"Health Checked API",description:"API with health checks enabled",template:{path:"/api",upstreams:[{target:"https://api.example.com",weight:100,priority:1}],healthCheck:{enabled:!0,interval:3e4,timeout:5e3,path:"/health"}}},{name:"Path Rewrite",description:"Route with path rewriting",template:{path:"/api/v2",upstreams:[{target:"https://api.example.com",weight:100,priority:1}],pathRewrite:{"^/api/v2":"/v1"}}}];function o(h){i("select",h.template),n(0,s=!1)}const a=h=>o(h),u=()=>n(0,s=!1),f=()=>n(0,s=!1);return t.$$set=h=>{"showTemplates"in h&&n(0,s=h.showTemplates)},[s,l,o,a,u,f]}class c3 extends Gt{constructor(e){super(),qt(this,e,u3,a3,Nt,{showTemplates:0})}}function Of(t){let e,n=t[22]("routeEditor.failoverHelp")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","label-text-alt text-xs")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&4194304&&n!==(n=i[22]("routeEditor.failoverHelp")+"")&&T(s,n)},d(i){i&&H(e)}}}function Rf(t){let e,n,s,i=t[22]("routeEditor.retryableStatusCodes")+"",l,o,a,u,f,h,p,g=t[22]("routeEditor.retryableStatusCodesHelp")+"",m,b,_,y,k,w,S=t[22]("routeEditor.passiveHealthCheck")+"",P,M,x,A,O,C,R,L,D=t[22]("routeEditor.passiveHealthCheckTooltip")+"",z,B,U,F,V,Y,j=t[22]("routeEditor.consecutiveFailuresThreshold")+"",q,Q,X,re,K,W,G=t[22]("routeEditor.consecutiveFailuresThresholdHelp")+"",J,le,se,N,te,Z=t[22]("routeEditor.healthyThreshold")+"",oe,Se,me,Ee,ye,ge,be=t[22]("routeEditor.healthyThresholdHelp")+"",He,Te,Pe,_e,De,ke=t[22]("routeEditor.requestTimeoutMs")+"",$,ae,ue,de,fe,Be,Qe=t[22]("routeEditor.requestTimeoutMsHelp")+"",We,Ye,nt,Je,rt,lt=t[22]("routeEditor.connectTimeoutMs")+"",he,Re,Le,ot,Ge,Ie,Ve=t[22]("routeEditor.connectTimeoutMsHelp")+"",we,Ke,ve,Xe,Ct,$e=t[22]("routeEditor.recoveryIntervalMs")+"",je,At,it,mt,Lt,xe,at=t[22]("routeEditor.recoveryIntervalHelp")+"",Ne,st,jt,Rn,gn,Fe=t[22]("routeEditor.recoveryTimeoutMs")+"",ut,un,Rt,os,Mn,Un,zt=t[22]("routeEditor.recoveryTimeoutHelp")+"",mn,Dn,cn,Ln,Sn,Pn,Ut=t[22]("routeEditor.activeHealthCheck")+"",rs,Ht,sn,An,Fn,ln,Xt,Qn,Tt=t[22]("routeEditor.activeHealthCheckTooltip")+"",bn,$n,as,Yt,vt,es,It,ct=t[22]("routeEditor.enableActiveHealthCheck")+"",Vn,ys,wt,on,Qt,dn,Hn,ts=t[22]("routeEditor.slowStart")+"",Jt,_s,_n,fn,Nn,Wn,Kt,$t,ns=t[22]("routeEditor.slowStartTooltip")+"",us,pn,en,Bt,dt,kt,ce,Me=t[22]("routeEditor.enableSlowStart")+"",ft,tn,nn,Ce,ss,vn,qn,As,zs=t[22]("routeEditor.failoverInfoNotice")+"",gi,xs,mi,In=t[11]&&Df(t),jn=t[19]&&Lf(t);return{c(){e=d("div"),n=d("label"),s=d("span"),l=E(i),o=v(),a=d("input"),f=v(),h=d("div"),p=d("span"),m=E(g),b=v(),_=d("div"),y=d("input"),k=v(),w=d("div"),P=E(S),M=v(),x=d("div"),A=d("div"),O=pe("svg"),C=pe("path"),R=v(),L=d("span"),z=E(D),B=v(),U=d("div"),F=d("div"),V=d("label"),Y=d("span"),q=E(j),Q=v(),X=d("input"),re=v(),K=d("div"),W=d("span"),J=E(G),le=v(),se=d("div"),N=d("label"),te=d("span"),oe=E(Z),Se=v(),me=d("input"),Ee=v(),ye=d("div"),ge=d("span"),He=E(be),Te=v(),Pe=d("div"),_e=d("label"),De=d("span"),$=E(ke),ae=v(),ue=d("input"),de=v(),fe=d("div"),Be=d("span"),We=E(Qe),Ye=v(),nt=d("div"),Je=d("label"),rt=d("span"),he=E(lt),Re=v(),Le=d("input"),ot=v(),Ge=d("div"),Ie=d("span"),we=E(Ve),Ke=v(),ve=d("div"),Xe=d("label"),Ct=d("span"),je=E($e),At=v(),it=d("input"),mt=v(),Lt=d("div"),xe=d("span"),Ne=E(at),st=v(),jt=d("div"),Rn=d("label"),gn=d("span"),ut=E(Fe),un=v(),Rt=d("input"),os=v(),Mn=d("div"),Un=d("span"),mn=E(zt),Dn=v(),cn=d("div"),Ln=d("input"),Sn=v(),Pn=d("div"),rs=E(Ut),Ht=v(),sn=d("div"),An=d("div"),Fn=pe("svg"),ln=pe("path"),Xt=v(),Qn=d("span"),bn=E(Tt),$n=v(),as=d("div"),Yt=d("label"),vt=d("input"),es=v(),It=d("span"),Vn=E(ct),ys=v(),In&&In.c(),wt=v(),on=d("div"),Qt=d("input"),dn=v(),Hn=d("div"),Jt=E(ts),_s=v(),_n=d("div"),fn=d("div"),Nn=pe("svg"),Wn=pe("path"),Kt=v(),$t=d("span"),us=E(ns),pn=v(),en=d("div"),Bt=d("label"),dt=d("input"),kt=v(),ce=d("span"),ft=E(Me),tn=v(),jn&&jn.c(),nn=v(),Ce=d("div"),ss=pe("svg"),vn=pe("path"),qn=v(),As=d("div"),gi=E(zs),c(s,"class","label-text"),c(n,"class","label"),c(n,"for","failover-status-codes"),c(a,"id","failover-status-codes"),c(a,"type","text"),c(a,"placeholder",u=t[22]("routeEditor.retryableStatusCodesPlaceholder")),c(a,"class","input input-bordered input-sm"),c(p,"class","label-text-alt text-xs"),c(h,"class","label"),c(e,"class","form-control"),c(y,"type","checkbox"),c(w,"class","collapse-title text-sm font-medium"),c(C,"stroke-linecap","round"),c(C,"stroke-linejoin","round"),c(C,"stroke-width","2"),c(C,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(O,"xmlns","http://www.w3.org/2000/svg"),c(O,"fill","none"),c(O,"viewBox","0 0 24 24"),c(O,"class","stroke-current shrink-0 w-4 h-4"),c(A,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),c(Y,"class","label-text"),c(V,"class","label"),c(V,"for","consecutive-failures-threshold"),c(X,"id","consecutive-failures-threshold"),c(X,"type","number"),c(X,"placeholder","3"),c(X,"class","input input-bordered input-sm"),c(X,"min","1"),c(W,"class","label-text-alt text-xs"),c(K,"class","label"),c(F,"class","form-control"),c(te,"class","label-text"),c(N,"class","label"),c(N,"for","healthy-threshold"),c(me,"id","healthy-threshold"),c(me,"type","number"),c(me,"placeholder","2"),c(me,"class","input input-bordered input-sm"),c(me,"min","1"),c(ge,"class","label-text-alt text-xs"),c(ye,"class","label"),c(se,"class","form-control"),c(De,"class","label-text"),c(_e,"class","label"),c(_e,"for","request-timeout-ms"),c(ue,"id","request-timeout-ms"),c(ue,"type","number"),c(ue,"placeholder","30000"),c(ue,"class","input input-bordered input-sm"),c(ue,"min","100"),c(Be,"class","label-text-alt text-xs"),c(fe,"class","label"),c(Pe,"class","form-control"),c(rt,"class","label-text"),c(Je,"class","label"),c(Je,"for","connect-timeout-ms"),c(Le,"id","connect-timeout-ms"),c(Le,"type","number"),c(Le,"placeholder","5000"),c(Le,"class","input input-bordered input-sm"),c(Le,"min","100"),c(Ie,"class","label-text-alt text-xs"),c(Ge,"class","label"),c(nt,"class","form-control"),c(Ct,"class","label-text"),c(Xe,"class","label"),c(Xe,"for","recovery-interval-ms"),c(it,"id","recovery-interval-ms"),c(it,"type","number"),c(it,"placeholder","5000"),c(it,"class","input input-bordered input-sm"),c(it,"min","1000"),c(xe,"class","label-text-alt text-xs"),c(Lt,"class","label"),c(ve,"class","form-control"),c(gn,"class","label-text"),c(Rn,"class","label"),c(Rn,"for","recovery-timeout-ms"),c(Rt,"id","recovery-timeout-ms"),c(Rt,"type","number"),c(Rt,"placeholder","3000"),c(Rt,"class","input input-bordered input-sm"),c(Rt,"min","100"),c(Un,"class","label-text-alt text-xs"),c(Mn,"class","label"),c(jt,"class","form-control"),c(U,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),c(x,"class","collapse-content space-y-4"),c(_,"class","collapse collapse-arrow bg-base-200"),c(Ln,"type","checkbox"),c(Pn,"class","collapse-title text-sm font-medium"),c(ln,"stroke-linecap","round"),c(ln,"stroke-linejoin","round"),c(ln,"stroke-width","2"),c(ln,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(Fn,"xmlns","http://www.w3.org/2000/svg"),c(Fn,"fill","none"),c(Fn,"viewBox","0 0 24 24"),c(Fn,"class","stroke-current shrink-0 w-4 h-4"),c(An,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),c(vt,"type","checkbox"),c(vt,"class","checkbox checkbox-sm"),c(It,"class","label-text"),c(Yt,"class","label cursor-pointer justify-start gap-4"),c(as,"class","form-control"),c(sn,"class","collapse-content space-y-4"),c(cn,"class","collapse collapse-arrow bg-base-200"),c(Qt,"type","checkbox"),c(Hn,"class","collapse-title text-sm font-medium"),c(Wn,"stroke-linecap","round"),c(Wn,"stroke-linejoin","round"),c(Wn,"stroke-width","2"),c(Wn,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(Nn,"xmlns","http://www.w3.org/2000/svg"),c(Nn,"fill","none"),c(Nn,"viewBox","0 0 24 24"),c(Nn,"class","stroke-current shrink-0 w-4 h-4"),c(fn,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),c(dt,"type","checkbox"),c(dt,"class","checkbox checkbox-sm"),c(ce,"class","label-text"),c(Bt,"class","label cursor-pointer justify-start gap-4"),c(en,"class","form-control"),c(_n,"class","collapse-content space-y-4"),c(on,"class","collapse collapse-arrow bg-base-200"),c(vn,"stroke-linecap","round"),c(vn,"stroke-linejoin","round"),c(vn,"stroke-width","2"),c(vn,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(ss,"xmlns","http://www.w3.org/2000/svg"),c(ss,"fill","none"),c(ss,"viewBox","0 0 24 24"),c(ss,"class","stroke-current shrink-0 w-4 h-4"),c(Ce,"class","alert alert-info shadow-sm text-xs")},m(qe,et){I(qe,e,et),r(e,n),r(n,s),r(s,l),r(e,o),r(e,a),ne(a,t[4]),r(e,f),r(e,h),r(h,p),r(p,m),I(qe,b,et),I(qe,_,et),r(_,y),r(_,k),r(_,w),r(w,P),r(_,M),r(_,x),r(x,A),r(A,O),r(O,C),r(A,R),r(A,L),r(L,z),r(x,B),r(x,U),r(U,F),r(F,V),r(V,Y),r(Y,q),r(F,Q),r(F,X),ne(X,t[5]),r(F,re),r(F,K),r(K,W),r(W,J),r(U,le),r(U,se),r(se,N),r(N,te),r(te,oe),r(se,Se),r(se,me),ne(me,t[6]),r(se,Ee),r(se,ye),r(ye,ge),r(ge,He),r(U,Te),r(U,Pe),r(Pe,_e),r(_e,De),r(De,$),r(Pe,ae),r(Pe,ue),ne(ue,t[7]),r(Pe,de),r(Pe,fe),r(fe,Be),r(Be,We),r(U,Ye),r(U,nt),r(nt,Je),r(Je,rt),r(rt,he),r(nt,Re),r(nt,Le),ne(Le,t[8]),r(nt,ot),r(nt,Ge),r(Ge,Ie),r(Ie,we),r(U,Ke),r(U,ve),r(ve,Xe),r(Xe,Ct),r(Ct,je),r(ve,At),r(ve,it),ne(it,t[9]),r(ve,mt),r(ve,Lt),r(Lt,xe),r(xe,Ne),r(U,st),r(U,jt),r(jt,Rn),r(Rn,gn),r(gn,ut),r(jt,un),r(jt,Rt),ne(Rt,t[10]),r(jt,os),r(jt,Mn),r(Mn,Un),r(Un,mn),I(qe,Dn,et),I(qe,cn,et),r(cn,Ln),r(cn,Sn),r(cn,Pn),r(Pn,rs),r(cn,Ht),r(cn,sn),r(sn,An),r(An,Fn),r(Fn,ln),r(An,Xt),r(An,Qn),r(Qn,bn),r(sn,$n),r(sn,as),r(as,Yt),r(Yt,vt),vt.checked=t[11],r(Yt,es),r(Yt,It),r(It,Vn),r(sn,ys),In&&In.m(sn,null),I(qe,wt,et),I(qe,on,et),r(on,Qt),r(on,dn),r(on,Hn),r(Hn,Jt),r(on,_s),r(on,_n),r(_n,fn),r(fn,Nn),r(Nn,Wn),r(fn,Kt),r(fn,$t),r($t,us),r(_n,pn),r(_n,en),r(en,Bt),r(Bt,dt),dt.checked=t[19],r(Bt,kt),r(Bt,ce),r(ce,ft),r(_n,tn),jn&&jn.m(_n,null),I(qe,nn,et),I(qe,Ce,et),r(Ce,ss),r(ss,vn),r(Ce,qn),r(Ce,As),r(As,gi),xs||(mi=[ee(a,"input",t[28]),ee(X,"input",t[29]),ee(me,"input",t[30]),ee(ue,"input",t[31]),ee(Le,"input",t[32]),ee(it,"input",t[33]),ee(Rt,"input",t[34]),ee(vt,"change",t[35]),ee(dt,"change",t[43])],xs=!0)},p(qe,et){et[0]&4194304&&i!==(i=qe[22]("routeEditor.retryableStatusCodes")+"")&&T(l,i),et[0]&4194304&&u!==(u=qe[22]("routeEditor.retryableStatusCodesPlaceholder"))&&c(a,"placeholder",u),et[0]&16&&a.value!==qe[4]&&ne(a,qe[4]),et[0]&4194304&&g!==(g=qe[22]("routeEditor.retryableStatusCodesHelp")+"")&&T(m,g),et[0]&4194304&&S!==(S=qe[22]("routeEditor.passiveHealthCheck")+"")&&T(P,S),et[0]&4194304&&D!==(D=qe[22]("routeEditor.passiveHealthCheckTooltip")+"")&&T(z,D),et[0]&4194304&&j!==(j=qe[22]("routeEditor.consecutiveFailuresThreshold")+"")&&T(q,j),et[0]&32&&yt(X.value)!==qe[5]&&ne(X,qe[5]),et[0]&4194304&&G!==(G=qe[22]("routeEditor.consecutiveFailuresThresholdHelp")+"")&&T(J,G),et[0]&4194304&&Z!==(Z=qe[22]("routeEditor.healthyThreshold")+"")&&T(oe,Z),et[0]&64&&yt(me.value)!==qe[6]&&ne(me,qe[6]),et[0]&4194304&&be!==(be=qe[22]("routeEditor.healthyThresholdHelp")+"")&&T(He,be),et[0]&4194304&&ke!==(ke=qe[22]("routeEditor.requestTimeoutMs")+"")&&T($,ke),et[0]&128&&yt(ue.value)!==qe[7]&&ne(ue,qe[7]),et[0]&4194304&&Qe!==(Qe=qe[22]("routeEditor.requestTimeoutMsHelp")+"")&&T(We,Qe),et[0]&4194304&&lt!==(lt=qe[22]("routeEditor.connectTimeoutMs")+"")&&T(he,lt),et[0]&256&&yt(Le.value)!==qe[8]&&ne(Le,qe[8]),et[0]&4194304&&Ve!==(Ve=qe[22]("routeEditor.connectTimeoutMsHelp")+"")&&T(we,Ve),et[0]&4194304&&$e!==($e=qe[22]("routeEditor.recoveryIntervalMs")+"")&&T(je,$e),et[0]&512&&yt(it.value)!==qe[9]&&ne(it,qe[9]),et[0]&4194304&&at!==(at=qe[22]("routeEditor.recoveryIntervalHelp")+"")&&T(Ne,at),et[0]&4194304&&Fe!==(Fe=qe[22]("routeEditor.recoveryTimeoutMs")+"")&&T(ut,Fe),et[0]&1024&&yt(Rt.value)!==qe[10]&&ne(Rt,qe[10]),et[0]&4194304&&zt!==(zt=qe[22]("routeEditor.recoveryTimeoutHelp")+"")&&T(mn,zt),et[0]&4194304&&Ut!==(Ut=qe[22]("routeEditor.activeHealthCheck")+"")&&T(rs,Ut),et[0]&4194304&&Tt!==(Tt=qe[22]("routeEditor.activeHealthCheckTooltip")+"")&&T(bn,Tt),et[0]&2048&&(vt.checked=qe[11]),et[0]&4194304&&ct!==(ct=qe[22]("routeEditor.enableActiveHealthCheck")+"")&&T(Vn,ct),qe[11]?In?In.p(qe,et):(In=Df(qe),In.c(),In.m(sn,null)):In&&(In.d(1),In=null),et[0]&4194304&&ts!==(ts=qe[22]("routeEditor.slowStart")+"")&&T(Jt,ts),et[0]&4194304&&ns!==(ns=qe[22]("routeEditor.slowStartTooltip")+"")&&T(us,ns),et[0]&524288&&(dt.checked=qe[19]),et[0]&4194304&&Me!==(Me=qe[22]("routeEditor.enableSlowStart")+"")&&T(ft,Me),qe[19]?jn?jn.p(qe,et):(jn=Lf(qe),jn.c(),jn.m(_n,null)):jn&&(jn.d(1),jn=null),et[0]&4194304&&zs!==(zs=qe[22]("routeEditor.failoverInfoNotice")+"")&&T(gi,zs)},d(qe){qe&&(H(e),H(b),H(_),H(Dn),H(cn),H(wt),H(on),H(nn),H(Ce)),In&&In.d(),jn&&jn.d(),xs=!1,ht(mi)}}}function Df(t){let e,n,s,i,l=t[22]("routeEditor.healthCheckIntervalMs")+"",o,a,u,f,h,p,g=t[22]("routeEditor.healthCheckIntervalMsHelp")+"",m,b,_,y,k,w=t[22]("routeEditor.healthCheckTimeoutMs")+"",S,P,M,x,A,O,C=t[22]("routeEditor.healthCheckTimeoutMsHelp")+"",R,L,D,z,B,U=t[22]("routeEditor.healthCheckPath")+"",F,V,Y,j,q,Q,X=t[22]("routeEditor.healthCheckPathHelp")+"",re,K,W,G,J,le=t[22]("routeEditor.healthCheckMethod")+"",se,N,te,Z,oe,Se,me,Ee,ye,ge,be,He=t[22]("routeEditor.healthCheckExpectedStatus")+"",Te,Pe,_e,De,ke,$,ae=t[22]("routeEditor.healthCheckExpectedStatusHelp")+"",ue,de,fe,Be,Qe,We=t[22]("routeEditor.healthCheckUnhealthyThreshold")+"",Ye,nt,Je,rt,lt,he,Re=t[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"",Le,ot,Ge,Ie,Ve,we=t[22]("routeEditor.healthCheckHealthyThreshold")+"",Ke,ve,Xe,Ct,$e,je,At=t[22]("routeEditor.healthCheckHealthyThresholdHelp")+"",it,mt,Lt;return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),o=E(l),a=v(),u=d("input"),f=v(),h=d("div"),p=d("span"),m=E(g),b=v(),_=d("div"),y=d("label"),k=d("span"),S=E(w),P=v(),M=d("input"),x=v(),A=d("div"),O=d("span"),R=E(C),L=v(),D=d("div"),z=d("label"),B=d("span"),F=E(U),V=v(),Y=d("input"),j=v(),q=d("div"),Q=d("span"),re=E(X),K=v(),W=d("div"),G=d("label"),J=d("span"),se=E(le),N=v(),te=d("select"),Z=d("option"),Z.textContent="GET (default)",oe=d("option"),oe.textContent="GET",Se=d("option"),Se.textContent="POST",me=d("option"),me.textContent="HEAD",Ee=v(),ye=d("div"),ge=d("label"),be=d("span"),Te=E(He),Pe=v(),_e=d("input"),De=v(),ke=d("div"),$=d("span"),ue=E(ae),de=v(),fe=d("div"),Be=d("label"),Qe=d("span"),Ye=E(We),nt=v(),Je=d("input"),rt=v(),lt=d("div"),he=d("span"),Le=E(Re),ot=v(),Ge=d("div"),Ie=d("label"),Ve=d("span"),Ke=E(we),ve=v(),Xe=d("input"),Ct=v(),$e=d("div"),je=d("span"),it=E(At),c(i,"class","label-text"),c(s,"class","label"),c(s,"for","health-check-interval-ms"),c(u,"id","health-check-interval-ms"),c(u,"type","number"),c(u,"placeholder","10000"),c(u,"class","input input-bordered input-sm"),c(u,"min","1000"),c(p,"class","label-text-alt text-xs"),c(h,"class","label"),c(n,"class","form-control"),c(k,"class","label-text"),c(y,"class","label"),c(y,"for","health-check-timeout-ms"),c(M,"id","health-check-timeout-ms"),c(M,"type","number"),c(M,"placeholder","3000"),c(M,"class","input input-bordered input-sm"),c(M,"min","100"),c(O,"class","label-text-alt text-xs"),c(A,"class","label"),c(_,"class","form-control"),c(B,"class","label-text"),c(z,"class","label"),c(z,"for","health-check-path"),c(Y,"id","health-check-path"),c(Y,"type","text"),c(Y,"placeholder","/health"),c(Y,"class","input input-bordered input-sm"),c(Q,"class","label-text-alt text-xs"),c(q,"class","label"),c(D,"class","form-control"),c(J,"class","label-text"),c(G,"class","label"),c(G,"for","health-check-method"),Z.__value="",ne(Z,Z.__value),oe.__value="GET",ne(oe,oe.__value),Se.__value="POST",ne(Se,Se.__value),me.__value="HEAD",ne(me,me.__value),c(te,"id","health-check-method"),c(te,"class","select select-bordered select-sm"),t[15]===void 0&&vs(()=>t[39].call(te)),c(W,"class","form-control"),c(be,"class","label-text"),c(ge,"class","label"),c(ge,"for","health-check-expected-status"),c(_e,"id","health-check-expected-status"),c(_e,"type","text"),c(_e,"placeholder","200"),c(_e,"class","input input-bordered input-sm"),c($,"class","label-text-alt text-xs"),c(ke,"class","label"),c(ye,"class","form-control"),c(Qe,"class","label-text"),c(Be,"class","label"),c(Be,"for","health-check-unhealthy-threshold"),c(Je,"id","health-check-unhealthy-threshold"),c(Je,"type","number"),c(Je,"placeholder","3"),c(Je,"class","input input-bordered input-sm"),c(Je,"min","1"),c(he,"class","label-text-alt text-xs"),c(lt,"class","label"),c(fe,"class","form-control"),c(Ve,"class","label-text"),c(Ie,"class","label"),c(Ie,"for","health-check-healthy-threshold"),c(Xe,"id","health-check-healthy-threshold"),c(Xe,"type","number"),c(Xe,"placeholder","2"),c(Xe,"class","input input-bordered input-sm"),c(Xe,"min","1"),c(je,"class","label-text-alt text-xs"),c($e,"class","label"),c(Ge,"class","form-control"),c(e,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(xe,at){I(xe,e,at),r(e,n),r(n,s),r(s,i),r(i,o),r(n,a),r(n,u),ne(u,t[12]),r(n,f),r(n,h),r(h,p),r(p,m),r(e,b),r(e,_),r(_,y),r(y,k),r(k,S),r(_,P),r(_,M),ne(M,t[13]),r(_,x),r(_,A),r(A,O),r(O,R),r(e,L),r(e,D),r(D,z),r(z,B),r(B,F),r(D,V),r(D,Y),ne(Y,t[14]),r(D,j),r(D,q),r(q,Q),r(Q,re),r(e,K),r(e,W),r(W,G),r(G,J),r(J,se),r(W,N),r(W,te),r(te,Z),r(te,oe),r(te,Se),r(te,me),Cn(te,t[15],!0),r(e,Ee),r(e,ye),r(ye,ge),r(ge,be),r(be,Te),r(ye,Pe),r(ye,_e),ne(_e,t[16]),r(ye,De),r(ye,ke),r(ke,$),r($,ue),r(e,de),r(e,fe),r(fe,Be),r(Be,Qe),r(Qe,Ye),r(fe,nt),r(fe,Je),ne(Je,t[17]),r(fe,rt),r(fe,lt),r(lt,he),r(he,Le),r(e,ot),r(e,Ge),r(Ge,Ie),r(Ie,Ve),r(Ve,Ke),r(Ge,ve),r(Ge,Xe),ne(Xe,t[18]),r(Ge,Ct),r(Ge,$e),r($e,je),r(je,it),mt||(Lt=[ee(u,"input",t[36]),ee(M,"input",t[37]),ee(Y,"input",t[38]),ee(te,"change",t[39]),ee(_e,"input",t[40]),ee(Je,"input",t[41]),ee(Xe,"input",t[42])],mt=!0)},p(xe,at){at[0]&4194304&&l!==(l=xe[22]("routeEditor.healthCheckIntervalMs")+"")&&T(o,l),at[0]&4096&&yt(u.value)!==xe[12]&&ne(u,xe[12]),at[0]&4194304&&g!==(g=xe[22]("routeEditor.healthCheckIntervalMsHelp")+"")&&T(m,g),at[0]&4194304&&w!==(w=xe[22]("routeEditor.healthCheckTimeoutMs")+"")&&T(S,w),at[0]&8192&&yt(M.value)!==xe[13]&&ne(M,xe[13]),at[0]&4194304&&C!==(C=xe[22]("routeEditor.healthCheckTimeoutMsHelp")+"")&&T(R,C),at[0]&4194304&&U!==(U=xe[22]("routeEditor.healthCheckPath")+"")&&T(F,U),at[0]&16384&&Y.value!==xe[14]&&ne(Y,xe[14]),at[0]&4194304&&X!==(X=xe[22]("routeEditor.healthCheckPathHelp")+"")&&T(re,X),at[0]&4194304&&le!==(le=xe[22]("routeEditor.healthCheckMethod")+"")&&T(se,le),at[0]&32768&&Cn(te,xe[15]),at[0]&4194304&&He!==(He=xe[22]("routeEditor.healthCheckExpectedStatus")+"")&&T(Te,He),at[0]&65536&&_e.value!==xe[16]&&ne(_e,xe[16]),at[0]&4194304&&ae!==(ae=xe[22]("routeEditor.healthCheckExpectedStatusHelp")+"")&&T(ue,ae),at[0]&4194304&&We!==(We=xe[22]("routeEditor.healthCheckUnhealthyThreshold")+"")&&T(Ye,We),at[0]&131072&&yt(Je.value)!==xe[17]&&ne(Je,xe[17]),at[0]&4194304&&Re!==(Re=xe[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"")&&T(Le,Re),at[0]&4194304&&we!==(we=xe[22]("routeEditor.healthCheckHealthyThreshold")+"")&&T(Ke,we),at[0]&262144&&yt(Xe.value)!==xe[18]&&ne(Xe,xe[18]),at[0]&4194304&&At!==(At=xe[22]("routeEditor.healthCheckHealthyThresholdHelp")+"")&&T(it,At)},d(xe){xe&&H(e),mt=!1,ht(Lt)}}}function Lf(t){let e,n,s,i,l=t[22]("routeEditor.slowStartDurationMs")+"",o,a,u,f,h,p,g=t[22]("routeEditor.slowStartDurationMsHelp")+"",m,b,_,y,k,w=t[22]("routeEditor.slowStartInitialWeightFactor")+"",S,P,M,x,A,O,C=t[22]("routeEditor.slowStartInitialWeightFactorHelp")+"",R,L,D;return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),o=E(l),a=v(),u=d("input"),f=v(),h=d("div"),p=d("span"),m=E(g),b=v(),_=d("div"),y=d("label"),k=d("span"),S=E(w),P=v(),M=d("input"),x=v(),A=d("div"),O=d("span"),R=E(C),c(i,"class","label-text"),c(s,"class","label"),c(s,"for","slow-start-duration-ms"),c(u,"id","slow-start-duration-ms"),c(u,"type","number"),c(u,"placeholder","30000"),c(u,"class","input input-bordered input-sm"),c(u,"min","1000"),c(p,"class","label-text-alt text-xs"),c(h,"class","label"),c(n,"class","form-control"),c(k,"class","label-text"),c(y,"class","label"),c(y,"for","slow-start-initial-weight-factor"),c(M,"id","slow-start-initial-weight-factor"),c(M,"type","number"),c(M,"placeholder","0.1"),c(M,"class","input input-bordered input-sm"),c(M,"min","0.01"),c(M,"max","1"),c(M,"step","0.01"),c(O,"class","label-text-alt text-xs"),c(A,"class","label"),c(_,"class","form-control"),c(e,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(z,B){I(z,e,B),r(e,n),r(n,s),r(s,i),r(i,o),r(n,a),r(n,u),ne(u,t[20]),r(n,f),r(n,h),r(h,p),r(p,m),r(e,b),r(e,_),r(_,y),r(y,k),r(k,S),r(_,P),r(_,M),ne(M,t[21]),r(_,x),r(_,A),r(A,O),r(O,R),L||(D=[ee(u,"input",t[44]),ee(M,"input",t[45])],L=!0)},p(z,B){B[0]&4194304&&l!==(l=z[22]("routeEditor.slowStartDurationMs")+"")&&T(o,l),B[0]&1048576&&yt(u.value)!==z[20]&&ne(u,z[20]),B[0]&4194304&&g!==(g=z[22]("routeEditor.slowStartDurationMsHelp")+"")&&T(m,g),B[0]&4194304&&w!==(w=z[22]("routeEditor.slowStartInitialWeightFactor")+"")&&T(S,w),B[0]&2097152&&yt(M.value)!==z[21]&&ne(M,z[21]),B[0]&4194304&&C!==(C=z[22]("routeEditor.slowStartInitialWeightFactorHelp")+"")&&T(R,C)},d(z){z&&H(e),L=!1,ht(D)}}}function f3(t){let e,n,s,i,l,o,a,u,f,h,p,g,m=t[22]("routeEditor.enableFailover")+"",b,_,y,k,w=t[1]&&Of(t),S=t[2]&&Rf(t);return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=v(),w&&w.c(),o=v(),a=d("div"),u=d("div"),f=d("label"),h=d("input"),p=v(),g=d("span"),b=E(m),_=v(),S&&S.c(),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(h,"type","checkbox"),c(h,"class","checkbox"),c(g,"class","label-text"),c(f,"class","label cursor-pointer justify-start gap-4"),c(u,"class","form-control"),c(a,"class","space-y-4"),c(e,"class","form-control w-full")},m(P,M){I(P,e,M),r(e,n),r(n,s),r(s,i),r(n,l),w&&w.m(n,null),r(e,o),r(e,a),r(a,u),r(u,f),r(f,h),h.checked=t[2],r(f,p),r(f,g),r(g,b),r(a,_),S&&S.m(a,null),y||(k=[ee(h,"change",t[26]),ee(h,"change",t[27])],y=!0)},p(P,M){M[0]&1&&T(i,P[0]),P[1]?w?w.p(P,M):(w=Of(P),w.c(),w.m(n,null)):w&&(w.d(1),w=null),M[0]&4&&(h.checked=P[2]),M[0]&4194304&&m!==(m=P[22]("routeEditor.enableFailover")+"")&&T(b,m),P[2]?S?S.p(P,M):(S=Rf(P),S.c(),S.m(a,null)):S&&(S.d(1),S=null)},i:Ae,o:Ae,d(P){P&&H(e),w&&w.d(),S&&S.d(),y=!1,ht(k)}}}function Hf(t){return t.split(",").map(e=>parseInt(e.trim())).filter(e=>!isNaN(e)&&e>=100&&e<600)}function h3(t,e,n){let s;Zt(t,xt,oe=>n(22,s=oe));let{value:i=void 0}=e,{label:l="Failover"}=e,{showHelp:o=!0}=e,a=!1,u=!1,f=[],h="",p,g,m,b,_,y,k=!1,w,S,P,M,x=[],A="",O,C,R=!1,L,D;function z(){a=this.checked,n(2,a),n(3,u),n(23,i),n(24,f),n(25,x),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}const B=()=>{n(3,u=!0)};function U(){h=this.value,n(4,h),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(16,A)}function F(){p=yt(this.value),n(5,p),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function V(){g=yt(this.value),n(6,g),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function Y(){m=yt(this.value),n(7,m),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function j(){b=yt(this.value),n(8,b),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function q(){_=yt(this.value),n(9,_),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function Q(){y=yt(this.value),n(10,y),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function X(){k=this.checked,n(11,k),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function re(){w=yt(this.value),n(12,w),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function K(){S=yt(this.value),n(13,S),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function W(){P=this.value,n(14,P),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function G(){M=Is(this),n(15,M),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function J(){A=this.value,n(16,A),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h)}function le(){O=yt(this.value),n(17,O),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function se(){C=yt(this.value),n(18,C),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function N(){R=this.checked,n(19,R),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(20,L),n(21,D),n(4,h),n(16,A)}function te(){L=yt(this.value),n(20,L),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(21,D),n(4,h),n(16,A)}function Z(){D=yt(this.value),n(21,D),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(4,h),n(16,A)}return t.$$set=oe=>{"value"in oe&&n(23,i=oe.value),"label"in oe&&n(0,l=oe.label),"showHelp"in oe&&n(1,o=oe.showHelp)},t.$$.update=()=>{t.$$.dirty[0]&62849004&&(!u&&i&&(n(2,a=i.enabled||!1),n(24,f=i.retryableStatusCodes||[500,502,503,504]),n(4,h=f.join(", ")),n(5,p=i.consecutiveFailuresThreshold),n(6,g=i.healthyThreshold),n(7,m=i.requestTimeoutMs),n(8,b=i.connectTimeoutMs),n(9,_=i.recoveryIntervalMs),n(10,y=i.recoveryTimeoutMs),i.healthCheck&&(n(11,k=i.healthCheck.enabled||!1),n(12,w=i.healthCheck.intervalMs),n(13,S=i.healthCheck.timeoutMs),n(14,P=i.healthCheck.path),n(15,M=i.healthCheck.method),n(25,x=i.healthCheck.expectedStatus||[200]),n(16,A=x.join(", ")),n(17,O=i.healthCheck.unhealthyThreshold),n(18,C=i.healthCheck.healthyThreshold)),i.slowStart&&(n(19,R=i.slowStart.enabled||!1),n(20,L=i.slowStart.durationMs),n(21,D=i.slowStart.initialWeightFactor)),n(3,u=!0)),a?i?(n(23,i.enabled=!0,i),n(23,i.retryableStatusCodes=f.length>0?f:[500,502,503,504],i),p!==void 0&&n(23,i.consecutiveFailuresThreshold=p,i),g!==void 0&&n(23,i.healthyThreshold=g,i),m!==void 0&&n(23,i.requestTimeoutMs=m,i),b!==void 0&&n(23,i.connectTimeoutMs=b,i),_!==void 0&&n(23,i.recoveryIntervalMs=_,i),y!==void 0&&n(23,i.recoveryTimeoutMs=y,i),k?n(23,i.healthCheck={enabled:!0,intervalMs:w,timeoutMs:S,path:P,method:M,expectedStatus:x.length>0?x:[200],unhealthyThreshold:O,healthyThreshold:C},i):n(23,i.healthCheck=void 0,i),R?n(23,i.slowStart={enabled:!0,durationMs:L,initialWeightFactor:D},i):n(23,i.slowStart=void 0,i)):n(23,i={enabled:!0,retryableStatusCodes:f.length>0?f:[500,502,503,504]}):n(23,i=void 0)),t.$$.dirty[0]&16&&n(24,f=Hf(h)),t.$$.dirty[0]&65536&&n(25,x=Hf(A))},[l,o,a,u,h,p,g,m,b,_,y,k,w,S,P,M,A,O,C,R,L,D,s,i,f,x,z,B,U,F,V,Y,j,q,Q,X,re,K,W,G,J,le,se,N,te,Z]}class d3 extends Gt{constructor(e){super(),qt(this,e,h3,f3,Nt,{value:23,label:0,showHelp:1},null,[-1,-1])}}const zn=[];for(let t=0;t<256;++t)zn.push((t+256).toString(16).slice(1));function p3(t,e=0){return(zn[t[e+0]]+zn[t[e+1]]+zn[t[e+2]]+zn[t[e+3]]+"-"+zn[t[e+4]]+zn[t[e+5]]+"-"+zn[t[e+6]]+zn[t[e+7]]+"-"+zn[t[e+8]]+zn[t[e+9]]+"-"+zn[t[e+10]]+zn[t[e+11]]+zn[t[e+12]]+zn[t[e+13]]+zn[t[e+14]]+zn[t[e+15]]).toLowerCase()}let dr;const g3=new Uint8Array(16);function m3(){if(!dr){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");dr=crypto.getRandomValues.bind(crypto)}return dr(g3)}const b3=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),If={randomUUID:b3};function _3(t,e,n){t=t||{};const s=t.random??t.rng?.()??m3();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,p3(s)}function ol(t,e,n){return If.randomUUID&&!t?If.randomUUID():_3(t)}function Bf(t,e,n){const s=t.slice();return s[38]=e[n],s}function Ff(t,e,n){const s=t.slice();return s[41]=e[n],s[42]=e,s[43]=n,s}function Nf(t,e,n){const s=t.slice();return s[44]=e[n],s[45]=e,s[43]=n,s}function jf(t){let e,n,s,i,l=t[12]("routeEditor.useTemplate")+"",o,a,u;return{c(){e=d("button"),n=pe("svg"),s=pe("path"),i=v(),o=E(l),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","h-4 w-4"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"stroke","currentColor"),c(e,"type","button"),c(e,"class","btn btn-sm btn-outline")},m(f,h){I(f,e,h),r(e,n),r(n,s),r(e,i),r(e,o),a||(u=ee(e,"click",t[23]),a=!0)},p(f,h){h[0]&4096&&l!==(l=f[12]("routeEditor.useTemplate")+"")&&T(o,l)},d(f){f&&H(e),a=!1,u()}}}function v3(t){let e,n,s,i,l=t[12]("routeEditor.routePath")+"",o,a,u,f,h,p=t[12]("routes.path")+"",g,m,b,_,y,k=t[12]("routeEditor.pathHelp")+"",w,S,P,M,x,A=t[8].some(Jf),O,C,R,L,D=t[12]("routeEditor.pathRewrite")+"",z,B,U=t[12]("routeEditor.optional")+"",F,V,Y,j,q=t[12]("routeEditor.pathRewriteHelp")+"",Q,X,re,K,W,G=t[12]("routeEditor.addPathRewriteRule")+"",J,le,se,N,te,Z,oe=t[12]("routeEditor.upstreams")+"",Se,me,Ee,ye,ge,be=t[12]("routeEditor.addUpstream")+"",He,Te,Pe=t[8].some(Yf),_e,De,ke=[],$=new Map,ae,ue,de,fe,Be,Qe=t[12]("routeEditor.transformer")+"",We,Ye,nt,Je=t[12]("routeEditor.transformerHelp")+"",rt,lt,he,Re,Le,ot,Ge,Ie,Ve,we,Ke,ve,Xe,Ct,$e,je,At,it,mt,Lt=t[12]("auth.routeAuth")+"",xe,at,Ne=t[12]("routeEditor.optional")+"",st,jt,Rn,gn,Fe=t[12]("auth.routeAuthHelp")+"",ut,un,Rt,os,Mn,Un,zt,mn,Dn=t[12]("routeEditor.failoverTitle")+"",cn,Ln,Sn=t[12]("routeEditor.optional")+"",Pn,Ut,rs,Ht,sn=t[12]("routeEditor.failoverHelp")+"",An,Fn,ln,Xt,Qn,Tt,bn,$n=t[12]("routeEditor.cancel")+"",as,Yt,vt,es,It,ct,Vn,ys,wt=A&&zf(t),on=tt(t[1]),Qt=[];for(let ce=0;ce<on.length;ce+=1)Qt[ce]=Uf(Nf(t,on,ce));let dn=Pe&&Vf(t),Hn=tt(t[0].upstreams);const ts=ce=>ce[41]._uid;for(let ce=0;ce<Hn.length;ce+=1){let Me=Ff(t,Hn,ce),ft=ts(Me);$.set(ft,ke[ce]=Wf(ft,Me))}let Jt=t[9].length>0&&qf(t);function _s(ce){t[31](ce)}let _n={label:t[12]("routeEditor.transformer")};t[2]!==void 0&&(_n.plugin=t[2]),Re=new Kp({props:_n}),wn.push(()=>Yn(Re,"plugin",_s));function fn(ce){t[32](ce)}let Nn={label:t[12]("headers.title")};t[0].headers!==void 0&&(Nn.value=t[0].headers),Ve=new Xp({props:Nn}),wn.push(()=>Yn(Ve,"value",fn));function Wn(ce){t[33](ce)}let Kt={label:t[12]("body.title")};t[0].body!==void 0&&(Kt.value=t[0].body),Ct=new Yp({props:Kt}),wn.push(()=>Yn(Ct,"value",Wn));function $t(ce){t[34](ce)}let ns={label:t[12]("auth.routeAuth"),showHelp:!1};t[0].auth!==void 0&&(ns.value=t[0].auth),Rt=new xp({props:ns}),wn.push(()=>Yn(Rt,"value",$t));function us(ce){t[35](ce)}let pn={label:t[12]("routeEditor.failoverTitle"),showHelp:!1};t[0].failover!==void 0&&(pn.value=t[0].failover),ln=new d3({props:pn}),wn.push(()=>Yn(ln,"value",us));function en(ce,Me){return ce[6]?k3:w3}let Bt=en(t),dt=Bt(t),kt=t[10].length>0&&Gf(t);return{c(){e=d("form"),n=d("div"),s=d("div"),i=d("h2"),o=E(l),a=v(),u=d("div"),f=d("label"),h=d("span"),g=E(p),m=v(),b=d("span"),b.textContent="*",_=v(),y=d("span"),w=E(k),S=v(),P=d("input"),x=v(),wt&&wt.c(),O=v(),C=d("div"),R=d("label"),L=d("span"),z=E(D),B=E(" ("),F=E(U),V=E(")"),Y=v(),j=d("span"),Q=E(q),X=v(),re=d("div");for(let ce=0;ce<Qt.length;ce+=1)Qt[ce].c();K=v(),W=d("button"),J=E(G),le=v(),se=d("div"),N=d("div"),te=d("div"),Z=d("h2"),Se=E(oe),me=v(),Ee=d("span"),Ee.textContent="*",ye=v(),ge=d("button"),He=E(be),Te=v(),dn&&dn.c(),_e=v(),De=d("div");for(let ce=0;ce<ke.length;ce+=1)ke[ce].c();ae=v(),Jt&&Jt.c(),ue=v(),de=d("div"),fe=d("div"),Be=d("h2"),We=E(Qe),Ye=v(),nt=d("p"),rt=E(Je),lt=v(),he=d("div"),_t(Re.$$.fragment),ot=v(),Ge=d("div"),Ie=v(),_t(Ve.$$.fragment),Ke=v(),ve=d("div"),Xe=v(),_t(Ct.$$.fragment),je=v(),At=d("div"),it=d("div"),mt=d("h2"),xe=E(Lt),at=E(" ("),st=E(Ne),jt=E(")"),Rn=v(),gn=d("p"),ut=E(Fe),un=v(),_t(Rt.$$.fragment),Mn=v(),Un=d("div"),zt=d("div"),mn=d("h2"),cn=E(Dn),Ln=E(" ("),Pn=E(Sn),Ut=E(")"),rs=v(),Ht=d("p"),An=E(sn),Fn=v(),_t(ln.$$.fragment),Qn=v(),Tt=d("div"),bn=d("button"),as=E($n),Yt=v(),vt=d("button"),dt.c(),It=v(),kt&&kt.c(),c(i,"class","card-title"),c(b,"class","text-error"),c(h,"class","label-text font-semibold"),c(y,"class","label-text-alt text-xs"),c(f,"class","label"),c(f,"for","route-path"),c(P,"id","route-path"),c(P,"type","text"),c(P,"placeholder",M=t[12]("routeEditor.pathPlaceholder")),c(P,"class","input input-bordered"),P.required=!0,ie(P,"input-error",t[8].some(Kf)),c(u,"class","form-control"),c(L,"class","label-text font-semibold"),c(j,"class","label-text-alt text-xs"),c(R,"class","label"),c(R,"for","path-rewrite-pattern-0"),c(W,"type","button"),c(W,"class","btn btn-sm btn-ghost"),c(re,"class","space-y-2"),c(C,"class","form-control"),c(s,"class","card-body"),c(n,"class","card bg-base-100 shadow-md"),c(Ee,"class","text-error"),c(Z,"class","card-title"),c(ge,"type","button"),c(ge,"class","btn btn-sm btn-primary"),c(te,"class","flex justify-between items-center"),c(De,"class","space-y-4 mt-4"),c(N,"class","card-body"),c(se,"class","card bg-base-100 shadow-md"),c(Be,"class","card-title"),c(nt,"class","text-sm text-gray-500 mb-4"),c(Ge,"class","divider"),c(ve,"class","divider"),c(he,"class","space-y-6"),c(fe,"class","card-body"),c(de,"class","card bg-base-100 shadow-md"),c(mt,"class","card-title"),c(gn,"class","text-sm text-gray-500 mb-4"),c(it,"class","card-body"),c(At,"class","card bg-base-100 shadow-md"),c(mn,"class","card-title"),c(Ht,"class","text-sm text-gray-500 mb-4"),c(zt,"class","card-body"),c(Un,"class","card bg-base-100 shadow-md"),c(bn,"type","button"),c(bn,"class","btn btn-ghost"),bn.disabled=t[6],c(vt,"type","submit"),c(vt,"class","btn btn-primary"),vt.disabled=es=!t[11]||t[6],c(Tt,"class","flex justify-end gap-4"),c(e,"class","space-y-8")},m(ce,Me){I(ce,e,Me),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(u,f),r(f,h),r(h,g),r(h,m),r(h,b),r(f,_),r(f,y),r(y,w),r(u,S),r(u,P),ne(P,t[0].path),r(u,x),wt&&wt.m(u,null),r(s,O),r(s,C),r(C,R),r(R,L),r(L,z),r(L,B),r(L,F),r(L,V),r(R,Y),r(R,j),r(j,Q),r(C,X),r(C,re);for(let ft=0;ft<Qt.length;ft+=1)Qt[ft]&&Qt[ft].m(re,null);r(re,K),r(re,W),r(W,J),r(e,le),r(e,se),r(se,N),r(N,te),r(te,Z),r(Z,Se),r(Z,me),r(Z,Ee),r(te,ye),r(te,ge),r(ge,He),r(N,Te),dn&&dn.m(N,null),r(N,_e),r(N,De);for(let ft=0;ft<ke.length;ft+=1)ke[ft]&&ke[ft].m(De,null);r(N,ae),Jt&&Jt.m(N,null),r(e,ue),r(e,de),r(de,fe),r(fe,Be),r(Be,We),r(fe,Ye),r(fe,nt),r(nt,rt),r(fe,lt),r(fe,he),pt(Re,he,null),r(he,ot),r(he,Ge),r(he,Ie),pt(Ve,he,null),r(he,Ke),r(he,ve),r(he,Xe),pt(Ct,he,null),r(e,je),r(e,At),r(At,it),r(it,mt),r(mt,xe),r(mt,at),r(mt,st),r(mt,jt),r(it,Rn),r(it,gn),r(gn,ut),r(it,un),pt(Rt,it,null),r(e,Mn),r(e,Un),r(Un,zt),r(zt,mn),r(mn,cn),r(mn,Ln),r(mn,Pn),r(mn,Ut),r(zt,rs),r(zt,Ht),r(Ht,An),r(zt,Fn),pt(ln,zt,null),r(e,Qn),r(e,Tt),r(Tt,bn),r(bn,as),r(Tt,Yt),r(Tt,vt),dt.m(vt,null),r(e,It),kt&&kt.m(e,null),ct=!0,Vn||(ys=[ee(P,"input",t[24]),ee(W,"click",t[13]),ee(ge,"click",t[15]),ee(bn,"click",t[19]),ee(e,"submit",eg(t[18]))],Vn=!0)},p(ce,Me){if((!ct||Me[0]&4096)&&l!==(l=ce[12]("routeEditor.routePath")+"")&&T(o,l),(!ct||Me[0]&4096)&&p!==(p=ce[12]("routes.path")+"")&&T(g,p),(!ct||Me[0]&4096)&&k!==(k=ce[12]("routeEditor.pathHelp")+"")&&T(w,k),(!ct||Me[0]&4096&&M!==(M=ce[12]("routeEditor.pathPlaceholder")))&&c(P,"placeholder",M),Me[0]&1&&P.value!==ce[0].path&&ne(P,ce[0].path),(!ct||Me[0]&256)&&ie(P,"input-error",ce[8].some(Kf)),Me[0]&256&&(A=ce[8].some(Jf)),A?wt?wt.p(ce,Me):(wt=zf(ce),wt.c(),wt.m(u,null)):wt&&(wt.d(1),wt=null),(!ct||Me[0]&4096)&&D!==(D=ce[12]("routeEditor.pathRewrite")+"")&&T(z,D),(!ct||Me[0]&4096)&&U!==(U=ce[12]("routeEditor.optional")+"")&&T(F,U),(!ct||Me[0]&4096)&&q!==(q=ce[12]("routeEditor.pathRewriteHelp")+"")&&T(Q,q),Me[0]&20482){on=tt(ce[1]);let vn;for(vn=0;vn<on.length;vn+=1){const qn=Nf(ce,on,vn);Qt[vn]?Qt[vn].p(qn,Me):(Qt[vn]=Uf(qn),Qt[vn].c(),Qt[vn].m(re,K))}for(;vn<Qt.length;vn+=1)Qt[vn].d(1);Qt.length=on.length}(!ct||Me[0]&4096)&&G!==(G=ce[12]("routeEditor.addPathRewriteRule")+"")&&T(J,G),(!ct||Me[0]&4096)&&oe!==(oe=ce[12]("routeEditor.upstreams")+"")&&T(Se,oe),(!ct||Me[0]&4096)&&be!==(be=ce[12]("routeEditor.addUpstream")+"")&&T(He,be),Me[0]&256&&(Pe=ce[8].some(Yf)),Pe?dn?dn.p(ce,Me):(dn=Vf(ce),dn.c(),dn.m(N,_e)):dn&&(dn.d(1),dn=null),Me[0]&196609&&(Hn=tt(ce[0].upstreams),ms(),ke=Nr(ke,Me,ts,1,ce,Hn,$,De,od,Wf,null,Ff),bs()),ce[9].length>0?Jt?Jt.p(ce,Me):(Jt=qf(ce),Jt.c(),Jt.m(N,null)):Jt&&(Jt.d(1),Jt=null),(!ct||Me[0]&4096)&&Qe!==(Qe=ce[12]("routeEditor.transformer")+"")&&T(We,Qe),(!ct||Me[0]&4096)&&Je!==(Je=ce[12]("routeEditor.transformerHelp")+"")&&T(rt,Je);const ft={};Me[0]&4096&&(ft.label=ce[12]("routeEditor.transformer")),!Le&&Me[0]&4&&(Le=!0,ft.plugin=ce[2],Xn(()=>Le=!1)),Re.$set(ft);const tn={};Me[0]&4096&&(tn.label=ce[12]("headers.title")),!we&&Me[0]&1&&(we=!0,tn.value=ce[0].headers,Xn(()=>we=!1)),Ve.$set(tn);const nn={};Me[0]&4096&&(nn.label=ce[12]("body.title")),!$e&&Me[0]&1&&($e=!0,nn.value=ce[0].body,Xn(()=>$e=!1)),Ct.$set(nn),(!ct||Me[0]&4096)&&Lt!==(Lt=ce[12]("auth.routeAuth")+"")&&T(xe,Lt),(!ct||Me[0]&4096)&&Ne!==(Ne=ce[12]("routeEditor.optional")+"")&&T(st,Ne),(!ct||Me[0]&4096)&&Fe!==(Fe=ce[12]("auth.routeAuthHelp")+"")&&T(ut,Fe);const Ce={};Me[0]&4096&&(Ce.label=ce[12]("auth.routeAuth")),!os&&Me[0]&1&&(os=!0,Ce.value=ce[0].auth,Xn(()=>os=!1)),Rt.$set(Ce),(!ct||Me[0]&4096)&&Dn!==(Dn=ce[12]("routeEditor.failoverTitle")+"")&&T(cn,Dn),(!ct||Me[0]&4096)&&Sn!==(Sn=ce[12]("routeEditor.optional")+"")&&T(Pn,Sn),(!ct||Me[0]&4096)&&sn!==(sn=ce[12]("routeEditor.failoverHelp")+"")&&T(An,sn);const ss={};Me[0]&4096&&(ss.label=ce[12]("routeEditor.failoverTitle")),!Xt&&Me[0]&1&&(Xt=!0,ss.value=ce[0].failover,Xn(()=>Xt=!1)),ln.$set(ss),(!ct||Me[0]&4096)&&$n!==($n=ce[12]("routeEditor.cancel")+"")&&T(as,$n),(!ct||Me[0]&64)&&(bn.disabled=ce[6]),Bt===(Bt=en(ce))&&dt?dt.p(ce,Me):(dt.d(1),dt=Bt(ce),dt&&(dt.c(),dt.m(vt,null))),(!ct||Me[0]&2112&&es!==(es=!ce[11]||ce[6]))&&(vt.disabled=es),ce[10].length>0?kt?kt.p(ce,Me):(kt=Gf(ce),kt.c(),kt.m(e,null)):kt&&(kt.d(1),kt=null)},i(ce){if(!ct){for(let Me=0;Me<Hn.length;Me+=1)ze(ke[Me]);ze(Re.$$.fragment,ce),ze(Ve.$$.fragment,ce),ze(Ct.$$.fragment,ce),ze(Rt.$$.fragment,ce),ze(ln.$$.fragment,ce),ct=!0}},o(ce){for(let Me=0;Me<ke.length;Me+=1)Ue(ke[Me]);Ue(Re.$$.fragment,ce),Ue(Ve.$$.fragment,ce),Ue(Ct.$$.fragment,ce),Ue(Rt.$$.fragment,ce),Ue(ln.$$.fragment,ce),ct=!1},d(ce){ce&&H(e),wt&&wt.d(),Tn(Qt,ce),dn&&dn.d();for(let Me=0;Me<ke.length;Me+=1)ke[Me].d();Jt&&Jt.d(),gt(Re),gt(Ve),gt(Ct),gt(Rt),gt(ln),dt.d(),kt&&kt.d(),Vn=!1,ht(ys)}}}function y3(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){I(n,e,s)},p:Ae,i:Ae,o:Ae,d(n){n&&H(e)}}}function zf(t){let e,n,s=t[8].find(Zf)?.message+"",i;return{c(){e=d("label"),n=d("span"),i=E(s),c(n,"class","label-text-alt text-error"),c(e,"class","label"),c(e,"for","route-path")},m(l,o){I(l,e,o),r(e,n),r(n,i)},p(l,o){o[0]&256&&s!==(s=l[8].find(Zf)?.message+"")&&T(i,s)},d(l){l&&H(e)}}}function Uf(t){let e,n,s,i,l,o,a,u,f,h;function p(){t[25].call(n,t[45],t[43])}function g(){t[26].call(l,t[45],t[43])}function m(){return t[27](t[43])}return{c(){e=d("div"),n=d("input"),i=v(),l=d("input"),a=v(),u=d("button"),u.textContent="\u2715",c(n,"id",\`path-rewrite-pattern-\${t[43]}\`),c(n,"type","text"),c(n,"placeholder",s=t[12]("routeEditor.patternPlaceholder")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"id",\`path-rewrite-replacement-\${t[43]}\`),c(l,"type","text"),c(l,"placeholder",o=t[12]("routeEditor.replacementPlaceholder")),c(l,"class","input input-bordered input-sm flex-1"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(b,_){I(b,e,_),r(e,n),ne(n,t[44].pattern),r(e,i),r(e,l),ne(l,t[44].replacement),r(e,a),r(e,u),f||(h=[ee(n,"input",p),ee(l,"input",g),ee(u,"click",m)],f=!0)},p(b,_){t=b,_[0]&4096&&s!==(s=t[12]("routeEditor.patternPlaceholder"))&&c(n,"placeholder",s),_[0]&2&&n.value!==t[44].pattern&&ne(n,t[44].pattern),_[0]&4096&&o!==(o=t[12]("routeEditor.replacementPlaceholder"))&&c(l,"placeholder",o),_[0]&2&&l.value!==t[44].replacement&&ne(l,t[44].replacement)},d(b){b&&H(e),f=!1,ht(h)}}}function Vf(t){let e,n,s=t[8].find(Qf)?.message+"",i;return{c(){e=d("div"),n=d("span"),i=E(s),c(e,"class","alert alert-error")},m(l,o){I(l,e,o),r(e,n),r(n,i)},p(l,o){o[0]&256&&s!==(s=l[8].find(Qf)?.message+"")&&T(i,s)},d(l){l&&H(e)}}}function Wf(t,e){let n,s,i,l;function o(){return e[28](e[43])}function a(){return e[29](e[43])}function u(h){e[30](h,e[43])}let f={index:e[43],onRemove:o,onDuplicate:a};return e[0].upstreams[e[43]]!==void 0&&(f.upstream=e[0].upstreams[e[43]]),s=new r3({props:f}),wn.push(()=>Yn(s,"upstream",u)),{key:t,first:null,c(){n=Zn(),_t(s.$$.fragment),this.first=n},m(h,p){I(h,n,p),pt(s,h,p),l=!0},p(h,p){e=h;const g={};p[0]&1&&(g.index=e[43]),p[0]&1&&(g.onRemove=o),p[0]&1&&(g.onDuplicate=a),!i&&p[0]&1&&(i=!0,g.upstream=e[0].upstreams[e[43]],Xn(()=>i=!1)),s.$set(g)},i(h){l||(ze(s.$$.fragment,h),l=!0)},o(h){Ue(s.$$.fragment,h),l=!1},d(h){h&&H(n),gt(s,h)}}}function qf(t){let e,n,s=t[9][0].message+"",i;return{c(){e=d("div"),n=d("span"),i=E(s),c(e,"class","alert alert-warning mt-4")},m(l,o){I(l,e,o),r(e,n),r(n,i)},p(l,o){o[0]&512&&s!==(s=l[9][0].message+"")&&T(i,s)},d(l){l&&H(e)}}}function w3(t){let e=t[12]("routeEditor.saveRoute")+"",n;return{c(){n=E(e)},m(s,i){I(s,n,i)},p(s,i){i[0]&4096&&e!==(e=s[12]("routeEditor.saveRoute")+"")&&T(n,e)},d(s){s&&H(n)}}}function k3(t){let e,n,s=t[12]("routeEditor.saving")+"",i;return{c(){e=d("span"),n=v(),i=E(s),c(e,"class","loading loading-spinner")},m(l,o){I(l,e,o),I(l,n,o),I(l,i,o)},p(l,o){o[0]&4096&&s!==(s=l[12]("routeEditor.saving")+"")&&T(i,s)},d(l){l&&(H(e),H(n),H(i))}}}function Gf(t){let e,n,s,i,l,o,a=t[12]("common.error")+"",u,f,h,p=tt(t[10]),g=[];for(let m=0;m<p.length;m+=1)g[m]=Xf(Bf(t,p,m));return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("div"),o=d("h3"),u=E(a),f=v(),h=d("ul");for(let m=0;m<g.length;m+=1)g[m].c();c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(o,"class","font-bold"),c(h,"class","text-xs list-disc list-inside"),c(e,"class","alert alert-warning")},m(m,b){I(m,e,b),r(e,n),r(n,s),r(e,i),r(e,l),r(l,o),r(o,u),r(l,f),r(l,h);for(let _=0;_<g.length;_+=1)g[_]&&g[_].m(h,null)},p(m,b){if(b[0]&4096&&a!==(a=m[12]("common.error")+"")&&T(u,a),b[0]&1024){p=tt(m[10]);let _;for(_=0;_<p.length;_+=1){const y=Bf(m,p,_);g[_]?g[_].p(y,b):(g[_]=Xf(y),g[_].c(),g[_].m(h,null))}for(;_<g.length;_+=1)g[_].d(1);g.length=p.length}},d(m){m&&H(e),Tn(g,m)}}}function Xf(t){let e,n=t[38].field+"",s,i,l=t[38].message+"",o;return{c(){e=d("li"),s=E(n),i=E(": "),o=E(l)},m(a,u){I(a,e,u),r(e,s),r(e,i),r(e,o)},p(a,u){u[0]&1024&&n!==(n=a[38].field+"")&&T(s,n),u[0]&1024&&l!==(l=a[38].message+"")&&T(o,l)},d(a){a&&H(e)}}}function S3(t){let e,n,s,i,l=(t[3]?t[12]("routeEditor.editRoute"):t[12]("routeEditor.newRoute"))+"",o,a,u,f=(t[3]?\`\${t[12]("routeEditor.editRoute")}: \${t[4]}\`:t[12]("routes.subtitle"))+"",h,p,g,m,b,_,y,k,w,S=!t[3]&&jf(t);const P=[y3,v3],M=[];function x(C,R){return C[5]?0:1}m=x(t),b=M[m]=P[m](t);function A(C){t[36](C)}let O={};return t[7]!==void 0&&(O.showTemplates=t[7]),y=new c3({props:O}),wn.push(()=>Yn(y,"showTemplates",A)),y.$on("select",t[20]),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h1"),o=E(l),a=v(),u=d("p"),h=E(f),p=v(),S&&S.c(),g=v(),b.c(),_=v(),_t(y.$$.fragment),c(i,"class","text-3xl font-bold"),c(u,"class","text-sm text-gray-500 mt-1"),c(n,"class","mb-6 flex justify-between items-start"),c(e,"class","p-6 max-w-6xl mx-auto")},m(C,R){I(C,e,R),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(u,h),r(n,p),S&&S.m(n,null),r(e,g),M[m].m(e,null),r(e,_),pt(y,e,null),w=!0},p(C,R){(!w||R[0]&4104)&&l!==(l=(C[3]?C[12]("routeEditor.editRoute"):C[12]("routeEditor.newRoute"))+"")&&T(o,l),(!w||R[0]&4120)&&f!==(f=(C[3]?\`\${C[12]("routeEditor.editRoute")}: \${C[4]}\`:C[12]("routes.subtitle"))+"")&&T(h,f),C[3]?S&&(S.d(1),S=null):S?S.p(C,R):(S=jf(C),S.c(),S.m(n,null));let L=m;m=x(C),m===L?M[m].p(C,R):(ms(),Ue(M[L],1,1,()=>{M[L]=null}),bs(),b=M[m],b?b.p(C,R):(b=M[m]=P[m](C),b.c()),ze(b,1),b.m(e,_));const D={};!k&&R[0]&128&&(k=!0,D.showTemplates=C[7],Xn(()=>k=!1)),y.$set(D)},i(C){w||(ze(b),ze(y.$$.fragment,C),w=!0)},o(C){Ue(b),Ue(y.$$.fragment,C),w=!1},d(C){C&&H(e),S&&S.d(),M[m].d(),gt(y)}}}const Yf=t=>t.field==="upstreams",Jf=t=>t.field==="path",Kf=t=>t.field==="path",Zf=t=>t.field==="path",Qf=t=>t.field==="upstreams";function E3(t,e,n){let s;Zt(t,xt,W=>n(12,s=W));let{params:i={}}=e,l=!1,o="",a=!0,u=!1,f=!1,h={path:"",upstreams:[{_uid:ol(),target:"",weight:100,priority:1}],headers:{add:{},remove:[],default:{}},body:{add:{},remove:[],replace:{},default:{}}},p=[],g=[],m=[],b=!1,_=null;async function y(){try{const W=await Zk(h),G=Jk(h.upstreams);n(8,p=W),n(9,g=G),n(10,m=[...W,...G]),n(11,b=m.length===0&&h.upstreams.length>0)}catch(W){console.error("Validation failed:",W),n(11,b=!1)}}let k=[],w=h.plugins?.[0]||null;function S(){n(1,k=[...k,{pattern:"",replacement:""}])}function P(W){n(1,k=k.filter((G,J)=>J!==W))}function M(){n(0,h.upstreams=[...h.upstreams,{_uid:ol(),target:"",weight:100,priority:h.upstreams.length+1}],h)}function x(W){if(h.upstreams.length<=1){alert(s("routeEditor.upstreamRequired"));return}n(0,h.upstreams=h.upstreams.filter((G,J)=>J!==W),h)}function A(W){const G=h.upstreams[W],J=JSON.parse(JSON.stringify(G));if(J._uid=ol(),J.target){const le=J.target.match(/^(.+?)(-\\d+)?$/);if(le){const[,se,N]=le;if(N){const te=parseInt(N.slice(1))+1;J.target=\`\${se}-\${te}\`}else J.target=\`\${se}-copy\`}else J.target=\`\${J.target}-copy\`}J.priority!==void 0&&(J.priority=Math.max(...h.upstreams.map(le=>le.priority||1))+1),n(0,h.upstreams=[...h.upstreams.slice(0,W+1),J,...h.upstreams.slice(W+1)],h)}async function O(){if(!b){Et.show(s("routeEditor.saveFailed",{values:{error:s("common.error")}}),"error");return}try{n(6,u=!0);const W={...h,upstreams:Xk(h.upstreams,[G=>G.priority??1]).map(({_uid:G,...J})=>J)};l?(await Ei.update(o,W),Et.show(s("routeEditor.routeUpdated"),"success")):(await Ei.create(W),Et.show(s("routeEditor.routeSaved"),"success")),Nl()}catch(W){Et.show(s("routeEditor.saveFailed",{values:{error:W.message}}),"error")}finally{n(6,u=!1)}}function C(){confirm(s("routeEditor.cancel")+"?")&&Nl()}function R(W){const G=W.detail;n(0,h={...h,...G,headers:G.headers||h.headers,body:G.body||h.body,upstreams:G.upstreams?.map(J=>({...J,_uid:ol(),headers:J.headers||{add:{},remove:[],default:{}},body:J.body||{add:{},remove:[],replace:{},default:{}}}))||h.upstreams}),n(2,w=h.plugins?.[0]||null),h.pathRewrite?n(1,k=Object.entries(h.pathRewrite).map(([J,le])=>({pattern:J,replacement:le}))):n(1,k=[]),Et.show(s("routeEditor.routeSaved"),"success")}ls(async()=>{if(i.path){n(3,l=!0),n(4,o=decodeURIComponent(i.path));try{const W=await Ei.get(o);W?(n(0,h=W),n(0,h.headers=h.headers||{add:{},remove:[],default:{}},h),n(0,h.body=h.body||{add:{},remove:[],replace:{},default:{}},h),n(0,h.upstreams=h.upstreams.map(G=>({...G,_uid:ol(),headers:G.headers||{add:{},remove:[],default:{}},body:G.body||{add:{},remove:[],replace:{},default:{}}})),h),h.pathRewrite&&n(1,k=Object.entries(h.pathRewrite).map(([G,J])=>({pattern:G,replacement:J}))),n(2,w=h.plugins?.[0]||null)):(Et.show(s("routes.noRoutes"),"error"),Nl())}catch(W){Et.show(s("routeEditor.saveFailed",{values:{error:W.message}}),"error"),Nl()}}n(5,a=!1)});const L=()=>n(7,f=!0);function D(){h.path=this.value,n(0,h),n(1,k),n(2,w)}function z(W,G){W[G].pattern=this.value,n(1,k),n(0,h),n(2,w)}function B(W,G){W[G].replacement=this.value,n(1,k),n(0,h),n(2,w)}const U=W=>P(W),F=W=>x(W),V=W=>A(W);function Y(W,G){t.$$.not_equal(h.upstreams[G],W)&&(h.upstreams[G]=W,n(0,h),n(1,k),n(2,w))}function j(W){w=W,n(2,w)}function q(W){t.$$.not_equal(h.headers,W)&&(h.headers=W,n(0,h),n(1,k),n(2,w))}function Q(W){t.$$.not_equal(h.body,W)&&(h.body=W,n(0,h),n(1,k),n(2,w))}function X(W){t.$$.not_equal(h.auth,W)&&(h.auth=W,n(0,h),n(1,k),n(2,w))}function re(W){t.$$.not_equal(h.failover,W)&&(h.failover=W,n(0,h),n(1,k),n(2,w))}function K(W){f=W,n(7,f)}return t.$$set=W=>{"params"in W&&n(21,i=W.params)},t.$$.update=()=>{if(t.$$.dirty[0]&3){!k.length&&h.pathRewrite&&n(1,k=Object.entries(h.pathRewrite||{}).map(([G,J])=>({pattern:G,replacement:J})));const W={};k.filter(G=>G.pattern.trim()).forEach(G=>{W[G.pattern]=G.replacement}),n(0,h.pathRewrite=Object.keys(W).length>0?W:void 0,h)}t.$$.dirty[0]&4&&n(0,h.plugins=w?[w]:void 0,h),t.$$.dirty[0]&4194305&&h&&(_&&clearTimeout(_),n(22,_=setTimeout(()=>{y()},300)))},[h,k,w,l,o,a,u,f,p,g,m,b,s,S,P,M,x,A,O,C,R,i,_,L,D,z,B,U,F,V,Y,j,q,Q,X,re,K]}class Zp extends Gt{constructor(e){super(),qt(this,e,E3,S3,Nt,{params:21},null,[-1,-1])}}function $f(t,e,n){const s=t.slice();return s[43]=e[n][0],s[44]=e[n][1],s}function eh(t,e,n){const s=t.slice();return s[43]=e[n][0],s[44]=e[n][1],s}function th(t,e,n){const s=t.slice();return s[43]=e[n][0],s[44]=e[n][1],s}function nh(t,e,n){const s=t.slice();s[52]=e[n],s[61]=n;const i=s[51].durations[s[61]];s[53]=i;const l=s[51].relativeTime[s[61]];s[54]=l;const o=s[53]/s[51].totalDuration*100;s[55]=o;const a=s[54]/s[51].totalDuration*100;s[56]=a;const u=c5(s[52].step);s[57]=u;const f=u5(s[52].step);s[58]=f;const h=(s[53]/s[51].totalDuration*100).toFixed(1);return s[59]=h,s}function sh(t,e,n){const s=t.slice();return s[62]=e[n],s}function pr(t){const e=t.slice(),n=e[27]();return e[51]=n,e}function ih(t,e,n){const s=t.slice();return s[52]=e[n],s}function T3(t){let e,n,s,i,l=t[24]("logs.detail.copyToClipboard")+"",o;return{c(){e=pe("svg"),n=pe("path"),s=v(),i=d("span"),o=E(l),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor"),c(i,"class","hidden md:inline")},m(a,u){I(a,e,u),r(e,n),I(a,s,u),I(a,i,u),r(i,o)},p(a,u){u[0]&16777216&&l!==(l=a[24]("logs.detail.copyToClipboard")+"")&&T(o,l)},d(a){a&&(H(e),H(s),H(i))}}}function M3(t){let e,n=t[24]("logs.detail.copied")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","text-success")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.copied")+"")&&T(s,n)},d(i){i&&H(e)}}}function C3(t){let e;return{c(){e=d("span"),e.textContent="No steps recorded",c(e,"class","text-sm opacity-40")},m(n,s){I(n,e,s)},p:Ae,d(n){n&&H(e)}}}function P3(t){let e,n,s=tt(t[0].processingSteps.slice(0,3)),i=[];for(let o=0;o<s.length;o+=1)i[o]=lh(ih(t,s,o));let l=t[0].processingSteps.length>3&&oh(t);return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=v(),l&&l.c(),n=Zn()},m(o,a){for(let u=0;u<i.length;u+=1)i[u]&&i[u].m(o,a);I(o,e,a),l&&l.m(o,a),I(o,n,a)},p(o,a){if(a[0]&67108865){s=tt(o[0].processingSteps.slice(0,3));let u;for(u=0;u<s.length;u+=1){const f=ih(o,s,u);i[u]?i[u].p(f,a):(i[u]=lh(f),i[u].c(),i[u].m(e.parentNode,e))}for(;u<i.length;u+=1)i[u].d(1);i.length=s.length}o[0].processingSteps.length>3?l?l.p(o,a):(l=oh(o),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},d(o){o&&(H(e),H(n)),Tn(i,o),l&&l.d(o)}}}function lh(t){let e,n=t[26](t[52].step)+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-sm badge-outline")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&1&&n!==(n=i[26](i[52].step)+"")&&T(s,n)},d(i){i&&H(e)}}}function oh(t){let e,n,s=t[0].processingSteps.length-3+"",i,l;return{c(){e=d("span"),n=E("+"),i=E(s),l=E(" more"),c(e,"class","badge badge-sm badge-ghost")},m(o,a){I(o,e,a),r(e,n),r(e,i),r(e,l)},p(o,a){a[0]&1&&s!==(s=o[0].processingSteps.length-3+"")&&T(i,s)},d(o){o&&H(e)}}}function rh(t){let e,n,s,i,l,o=t[24]("logs.detail.processingTimeline")+"",a,u,f,h=t[24]("logs.detail.totalSteps",{values:{count:t[0].processingSteps.length}})+"",p,g,m=t[24]("logs.detail.totalDuration",{values:{duration:ai(t[51].totalDuration)}})+"",b,_,y,k=(t[22]?t[24]("logs.detail.hideTimeline"):t[24]("logs.detail.showTimeline"))+"",w,S,P,M,x=t[22]&&ah(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),l=d("h4"),a=E(o),u=v(),f=d("p"),p=E(h),g=E(\`\uFF0C
21223
- \`),b=E(m),_=v(),y=d("button"),w=E(k),S=v(),x&&x.c(),c(l,"class","card-title text-base"),c(f,"class","text-xs opacity-60 mt-1"),c(y,"class","btn btn-sm btn-ghost"),c(s,"class","flex items-center justify-between mb-2"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(A,O){I(A,e,O),r(e,n),r(n,s),r(s,i),r(i,l),r(l,a),r(i,u),r(i,f),r(f,p),r(f,g),r(f,b),r(s,_),r(s,y),r(y,w),r(n,S),x&&x.m(n,null),P||(M=ee(y,"click",t[31]),P=!0)},p(A,O){O[0]&16777216&&o!==(o=A[24]("logs.detail.processingTimeline")+"")&&T(a,o),O[0]&16777217&&h!==(h=A[24]("logs.detail.totalSteps",{values:{count:A[0].processingSteps.length}})+"")&&T(p,h),O[0]&16777216&&m!==(m=A[24]("logs.detail.totalDuration",{values:{duration:ai(A[51].totalDuration)}})+"")&&T(b,m),O[0]&20971520&&k!==(k=(A[22]?A[24]("logs.detail.hideTimeline"):A[24]("logs.detail.showTimeline"))+"")&&T(w,k),A[22]?x?x.p(A,O):(x=ah(A),x.c(),x.m(n,null)):x&&(x.d(1),x=null)},d(A){A&&H(e),x&&x.d(),P=!1,M()}}}function ah(t){let e,n,s,i,l,o,a,u,f,h,p=tt(t[0].processingSteps),g=[];for(let m=0;m<p.length;m+=1)g[m]=mh(nh(t,p,m));return{c(){e=d("div"),n=d("div"),s=d("span"),s.textContent="0ms",i=v(),l=d("div"),o=v(),a=d("span"),a.textContent=\`\${ai(t[51].totalDuration)}\`,u=v();for(let m=0;m<g.length;m+=1)g[m].c();f=v(),h=d("div"),h.innerHTML='<div class="flex flex-wrap gap-4 text-xs"><div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-blue-500"></div> <span>Authentication</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-purple-500"></div> <span>Plugin</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-green-500"></div> <span>Upstream</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-orange-500"></div> <span>Transform</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-red-500"></div> <span>Error</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-yellow-500"></div> <span>Retry/Recovery</span></div></div>',c(l,"class","flex-1 border-t border-dashed border-base-content/20"),c(a,"class","mr-32"),c(n,"class","mb-4 flex items-center gap-2 text-xs opacity-50 px-64"),c(e,"class","mt-4"),c(h,"class","mt-6 pt-4 border-t border-base-300")},m(m,b){I(m,e,b),r(e,n),r(n,s),r(n,i),r(n,l),r(n,o),r(n,a),r(e,u);for(let _=0;_<g.length;_+=1)g[_]&&g[_].m(e,null);I(m,f,b),I(m,h,b)},p(m,b){if(b[0]&201326593){p=tt(m[0].processingSteps);let _;for(_=0;_<p.length;_+=1){const y=nh(m,p,_);g[_]?g[_].p(y,b):(g[_]=mh(y),g[_].c(),g[_].m(e,null))}for(;_<g.length;_+=1)g[_].d(1);g.length=p.length}},d(m){m&&(H(e),H(f),H(h)),Tn(g,m)}}}function uh(t){let e;return{c(){e=d("div"),c(e,"class","w-px bg-base-content opacity-20 flex-1 min-h-[2.5rem]")},m(n,s){I(n,e,s)},d(n){n&&H(e)}}}function ch(t){let e=t[52].detail.plugins&&Array.isArray(t[52].detail.plugins),n,s,i,l,o=e&&fh(t),a=t[52].detail.target&&dh(t),u=t[52].detail.level&&ph(t),f=t[52].detail.error&&gh(t);return{c(){o&&o.c(),n=v(),a&&a.c(),s=v(),u&&u.c(),i=v(),f&&f.c(),l=Zn()},m(h,p){o&&o.m(h,p),I(h,n,p),a&&a.m(h,p),I(h,s,p),u&&u.m(h,p),I(h,i,p),f&&f.m(h,p),I(h,l,p)},p(h,p){p[0]&1&&(e=h[52].detail.plugins&&Array.isArray(h[52].detail.plugins)),e?o?o.p(h,p):(o=fh(h),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null),h[52].detail.target?a?a.p(h,p):(a=dh(h),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),h[52].detail.level?u?u.p(h,p):(u=ph(h),u.c(),u.m(i.parentNode,i)):u&&(u.d(1),u=null),h[52].detail.error?f?f.p(h,p):(f=gh(h),f.c(),f.m(l.parentNode,l)):f&&(f.d(1),f=null)},d(h){h&&(H(n),H(s),H(i),H(l)),o&&o.d(h),a&&a.d(h),u&&u.d(h),f&&f.d(h)}}}function fh(t){let e,n=tt(t[52].detail.plugins),s=[];for(let i=0;i<n.length;i+=1)s[i]=hh(sh(t,n,i));return{c(){for(let i=0;i<s.length;i+=1)s[i].c();e=Zn()},m(i,l){for(let o=0;o<s.length;o+=1)s[o]&&s[o].m(i,l);I(i,e,l)},p(i,l){if(l[0]&1){n=tt(i[52].detail.plugins);let o;for(o=0;o<n.length;o+=1){const a=sh(i,n,o);s[o]?s[o].p(a,l):(s[o]=hh(a),s[o].c(),s[o].m(e.parentNode,e))}for(;o<s.length;o+=1)s[o].d(1);s.length=n.length}},d(i){i&&H(e),Tn(s,i)}}}function hh(t){let e,n=t[62]+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-xs badge-primary badge-outline")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&1&&n!==(n=i[62]+"")&&T(s,n)},d(i){i&&H(e)}}}function dh(t){let e,n=t[52].detail.target+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-xs badge-info badge-outline"),c(e,"title","Target upstream")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&1&&n!==(n=i[52].detail.target+"")&&T(s,n)},d(i){i&&H(e)}}}function ph(t){let e,n=t[52].detail.level+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-xs badge-warning badge-outline")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&1&&n!==(n=i[52].detail.level+"")&&T(s,n)},d(i){i&&H(e)}}}function gh(t){let e,n,s;return{c(){e=d("span"),n=E("Error"),c(e,"class","badge badge-xs badge-error badge-outline"),c(e,"title",s=t[52].detail.error)},m(i,l){I(i,e,l),r(e,n)},p(i,l){l[0]&1&&s!==(s=i[52].detail.error)&&c(e,"title",s)},d(i){i&&H(e)}}}function A3(t){let e;return{c(){e=d("span"),e.textContent=\`\${t[59]}%\`,c(e,"class","text-xs text-white px-2 leading-7")},m(n,s){I(n,e,s)},p:Ae,d(n){n&&H(e)}}}function mh(t){let e,n,s,i,l,o,a,u,f,h=t[26](t[52].step)+"",p,g,m,b,_=t[57]+"",y,k,w,S,P,M,x,A,O,C,R,L,D,z,B,U,F=t[61]<t[0].processingSteps.length-1&&uh(),V=t[52].detail&&ch(t),Y=t[55]>5&&A3(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),o=v(),F&&F.c(),a=v(),u=d("div"),f=d("div"),p=E(h),g=v(),m=d("div"),b=d("span"),y=E(_),k=v(),V&&V.c(),w=v(),S=d("div"),P=d("div"),M=d("div"),Y&&Y.c(),O=v(),C=d("div"),R=d("div"),R.textContent=\`+\${t[54]}ms\`,L=v(),D=d("div"),D.textContent=\`\${ai(t[53])}\`,z=v(),B=d("div"),B.textContent=\`\${t[59]}%\`,U=v(),c(i,"class",l="w-3 h-3 rounded-full "+t[58]+" z-10"),c(s,"class","flex flex-col items-center"),c(f,"class","text-sm font-medium"),c(b,"class","badge badge-xs badge-ghost"),c(m,"class","text-xs opacity-50 mt-0.5 flex items-center gap-2 flex-wrap"),c(u,"class","flex-1 -mt-0.5"),c(n,"class","flex gap-3 shrink-0 w-64"),c(M,"class",x="absolute h-full "+t[58]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer"),Ma(M,"left",t[56]+"%"),Ma(M,"width",Math.max(t[55],1)+"%"),c(M,"title",A=t[52].step+": "+ai(t[53])+" ("+t[59]+"%)"),c(P,"class","w-full h-7 relative bg-base-300/30 rounded overflow-hidden"),c(S,"class","flex-1 flex items-center"),c(R,"class","opacity-60"),c(D,"class","font-semibold"),c(B,"class","opacity-40"),c(C,"class","shrink-0 w-32 text-xs space-y-0.5 font-mono"),c(e,"class","flex gap-4 group relative mb-3")},m(j,q){I(j,e,q),r(e,n),r(n,s),r(s,i),r(s,o),F&&F.m(s,null),r(n,a),r(n,u),r(u,f),r(f,p),r(u,g),r(u,m),r(m,b),r(b,y),r(m,k),V&&V.m(m,null),r(e,w),r(e,S),r(S,P),r(P,M),Y&&Y.m(M,null),r(e,O),r(e,C),r(C,R),r(C,L),r(C,D),r(C,z),r(C,B),r(e,U)},p(j,q){q[0]&1&&l!==(l="w-3 h-3 rounded-full "+j[58]+" z-10")&&c(i,"class",l),j[61]<j[0].processingSteps.length-1?F||(F=uh(),F.c(),F.m(s,null)):F&&(F.d(1),F=null),q[0]&1&&h!==(h=j[26](j[52].step)+"")&&T(p,h),q[0]&1&&_!==(_=j[57]+"")&&T(y,_),j[52].detail?V?V.p(j,q):(V=ch(j),V.c(),V.m(m,null)):V&&(V.d(1),V=null),j[55]>5&&Y.p(j,q),q[0]&1&&x!==(x="absolute h-full "+j[58]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer")&&c(M,"class",x),q[0]&1&&A!==(A=j[52].step+": "+ai(j[53])+" ("+j[59]+"%)")&&c(M,"title",A)},d(j){j&&H(e),F&&F.d(),V&&V.d(),Y&&Y.d()}}}function x3(t){let e,n,s=t[24]("logs.detail.path")+"",i,l,o,a=t[0].path+"",u;return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),o=d("div"),u=E(a),c(n,"class","text-xs opacity-60 mb-1"),c(o,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.path")+"")&&T(i,s),h[0]&1&&a!==(a=f[0].path+"")&&T(u,a)},d(f){f&&H(e)}}}function O3(t){let e,n,s=t[24]("logs.detail.originalPath")+"",i,l,o,a=t[0].path+"",u,f,h,p,g=t[24]("logs.detail.transformedPath")+"",m,b,_,y=t[0].transformedPath+"",k;return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),o=d("div"),u=E(a),f=v(),h=d("div"),p=d("div"),m=E(g),b=v(),_=d("div"),k=E(y),c(n,"class","text-xs opacity-60 mb-1"),c(o,"class","font-mono text-sm bg-base-300 p-2 rounded break-all"),c(p,"class","text-xs opacity-60 mb-1"),c(_,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(w,S){I(w,e,S),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u),I(w,f,S),I(w,h,S),r(h,p),r(p,m),r(h,b),r(h,_),r(_,k)},p(w,S){S[0]&16777216&&s!==(s=w[24]("logs.detail.originalPath")+"")&&T(i,s),S[0]&1&&a!==(a=w[0].path+"")&&T(u,a),S[0]&16777216&&g!==(g=w[24]("logs.detail.transformedPath")+"")&&T(m,g),S[0]&1&&y!==(y=w[0].transformedPath+"")&&T(k,y)},d(w){w&&(H(e),H(f),H(h))}}}function bh(t){let e,n,s=t[24]("logs.detail.query")+"",i,l,o,a=t[0].query+"",u;return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),o=d("div"),u=E(a),c(n,"class","text-xs opacity-60 mb-1"),c(o,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.query")+"")&&T(i,s),h[0]&1&&a!==(a=f[0].query+"")&&T(u,a)},d(f){f&&H(e)}}}function _h(t){let e,n,s,i=t[24]("logs.detail.routePath")+"",l,o,a,u=t[0].routePath+"",f;return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=v(),a=d("div"),f=E(u),c(s,"class","card-title text-base mb-2"),c(a,"class","font-mono text-sm"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(h,p){I(h,e,p),r(e,n),r(n,s),r(s,l),r(n,o),r(n,a),r(a,f)},p(h,p){p[0]&16777216&&i!==(i=h[24]("logs.detail.routePath")+"")&&T(l,i),p[0]&1&&u!==(u=h[0].routePath+"")&&T(f,u)},d(h){h&&H(e)}}}function vh(t){let e,n,s,i=t[24]("logs.detail.upstream")+"",l,o,a,u=t[0].upstream+"",f,h,p=t[0].transformer&&yh(t);return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=v(),a=d("div"),f=E(u),h=v(),p&&p.c(),c(s,"class","card-title text-base mb-2"),c(a,"class","font-mono text-sm mb-2"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(g,m){I(g,e,m),r(e,n),r(n,s),r(s,l),r(n,o),r(n,a),r(a,f),r(n,h),p&&p.m(n,null)},p(g,m){m[0]&16777216&&i!==(i=g[24]("logs.detail.upstream")+"")&&T(l,i),m[0]&1&&u!==(u=g[0].upstream+"")&&T(f,u),g[0].transformer?p?p.p(g,m):(p=yh(g),p.c(),p.m(n,null)):p&&(p.d(1),p=null)},d(g){g&&H(e),p&&p.d()}}}function yh(t){let e,n=t[24]("logs.detail.transformer")+"",s,i,l=t[0].transformer+"",o;return{c(){e=d("div"),s=E(n),i=E(": "),o=E(l),c(e,"class","text-xs opacity-60")},m(a,u){I(a,e,u),r(e,s),r(e,i),r(e,o)},p(a,u){u[0]&16777216&&n!==(n=a[24]("logs.detail.transformer")+"")&&T(s,n),u[0]&1&&l!==(l=a[0].transformer+"")&&T(o,l)},d(a){a&&H(e)}}}function wh(t){let e,n,s,i,l,o,a=t[24]("logs.detail.errorInfo")+"",u,f,h,p=t[0].errorMessage+"",g;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("div"),o=d("div"),u=E(a),f=v(),h=d("div"),g=E(p),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(o,"class","font-bold"),c(h,"class","font-mono text-sm"),c(e,"class","alert alert-error")},m(m,b){I(m,e,b),r(e,n),r(n,s),r(e,i),r(e,l),r(l,o),r(o,u),r(l,f),r(l,h),r(h,g)},p(m,b){b[0]&16777216&&a!==(a=m[24]("logs.detail.errorInfo")+"")&&T(u,a),b[0]&1&&p!==(p=m[0].errorMessage+"")&&T(g,p)},d(m){m&&H(e)}}}function kh(t){let e;function n(l,o){return l[0].originalReqHeaderId||l[0].originalReqBodyId?D3:R3}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","space-y-4")},m(l,o){I(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},d(l){l&&H(e),i.d()}}}function R3(t){let e,n=t[24]("logs.detail.noDataAvailable")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noDataAvailable")+"")&&T(s,n)},d(i){i&&H(e)}}}function D3(t){let e,n,s=t[0].originalReqHeaderId&&Sh(t),i=t[8]&&t[0].originalReqBodyId&&Th(t);return{c(){s&&s.c(),e=v(),i&&i.c(),n=Zn()},m(l,o){s&&s.m(l,o),I(l,e,o),i&&i.m(l,o),I(l,n,o)},p(l,o){l[0].originalReqHeaderId?s?s.p(l,o):(s=Sh(l),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),l[8]&&l[0].originalReqBodyId?i?i.p(l,o):(i=Th(l),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(l){l&&(H(e),H(n)),s&&s.d(l),i&&i.d(l)}}}function Sh(t){let e,n,s=t[24]("logs.detail.requestHeaders")+"",i,l;function o(f,h){return f[17]?B3:f[19]?I3:f[15]!==null?H3:L3}let a=o(t),u=a(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestHeaders")+"")&&T(i,s),a===(a=o(f))&&u?u.p(f,h):(u.d(1),u=a(f),u&&(u.c(),u.m(e,null)))},d(f){f&&H(e),u.d()}}}function L3(t){let e,n=t[24]("logs.detail.noHeaders")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noHeaders")+"")&&T(s,n)},d(i){i&&H(e)}}}function H3(t){let e,n,s,i,l,o=tt(Object.entries(t[15])),a=[];for(let u=0;u<o.length;u+=1)a[u]=Eh(th(t,o,u));return{c(){e=d("div"),n=d("table"),s=d("thead"),s.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',i=v(),l=d("tbody");for(let u=0;u<a.length;u+=1)a[u].c();c(n,"class","table table-sm table-zebra"),c(e,"class","overflow-x-auto")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(n,i),r(n,l);for(let h=0;h<a.length;h+=1)a[h]&&a[h].m(l,null)},p(u,f){if(f[0]&32768){o=tt(Object.entries(u[15]));let h;for(h=0;h<o.length;h+=1){const p=th(u,o,h);a[h]?a[h].p(p,f):(a[h]=Eh(p),a[h].c(),a[h].m(l,null))}for(;h<a.length;h+=1)a[h].d(1);a.length=o.length}},d(u){u&&H(e),Tn(a,u)}}}function I3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[19]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){I(i,e,l),r(e,n),r(n,s)},p(i,l){l[0]&524288&&T(s,i[19])},d(i){i&&H(e)}}}function B3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=v(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i),r(i,o)},p(a,u){u[0]&16777216&&l!==(l=a[24]("common.loading")+"")&&T(o,l)},d(a){a&&H(e)}}}function Eh(t){let e,n,s=t[43]+"",i,l,o,a=t[44]+"",u,f;return{c(){e=d("tr"),n=d("td"),i=E(s),l=v(),o=d("td"),u=E(a),f=v(),c(n,"class","font-mono text-xs"),c(o,"class","font-mono text-xs break-all")},m(h,p){I(h,e,p),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u),r(e,f)},p(h,p){p[0]&32768&&s!==(s=h[43]+"")&&T(i,s),p[0]&32768&&a!==(a=h[44]+"")&&T(u,a)},d(h){h&&H(e)}}}function Th(t){let e,n,s=t[24]("logs.detail.requestBody")+"",i,l;function o(f,h){return f[18]?z3:f[20]?j3:f[16]!==null?N3:F3}let a=o(t),u=a(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestBody")+"")&&T(i,s),a===(a=o(f))&&u?u.p(f,h):(u.d(1),u=a(f),u&&(u.c(),u.m(e,null)))},d(f){f&&H(e),u.d()}}}function F3(t){let e,n=t[24]("logs.detail.noBody")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noBody")+"")&&T(s,n)},d(i){i&&H(e)}}}function N3(t){let e,n=Yi(t[16])+"",s;return{c(){e=d("pre"),s=E(n),c(e,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&65536&&n!==(n=Yi(i[16])+"")&&T(s,n)},d(i){i&&H(e)}}}function j3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[20]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){I(i,e,l),r(e,n),r(n,s)},p(i,l){l[0]&1048576&&T(s,i[20])},d(i){i&&H(e)}}}function z3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=v(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i),r(i,o)},p(a,u){u[0]&16777216&&l!==(l=a[24]("common.loading")+"")&&T(o,l)},d(a){a&&H(e)}}}function Mh(t){let e;function n(l,o){return l[0].reqHeaderId||l[0].reqBodyId?V3:U3}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","space-y-4")},m(l,o){I(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},d(l){l&&H(e),i.d()}}}function U3(t){let e,n=t[24]("logs.detail.noDataAvailable")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noDataAvailable")+"")&&T(s,n)},d(i){i&&H(e)}}}function V3(t){let e,n,s=t[0].reqHeaderId&&Ch(t),i=t[8]&&t[0].reqBodyId&&Ah(t);return{c(){s&&s.c(),e=v(),i&&i.c(),n=Zn()},m(l,o){s&&s.m(l,o),I(l,e,o),i&&i.m(l,o),I(l,n,o)},p(l,o){l[0].reqHeaderId?s?s.p(l,o):(s=Ch(l),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),l[8]&&l[0].reqBodyId?i?i.p(l,o):(i=Ah(l),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(l){l&&(H(e),H(n)),s&&s.d(l),i&&i.d(l)}}}function Ch(t){let e,n,s=t[24]("logs.detail.requestHeaders")+"",i,l;function o(f,h){return f[11]?X3:f[13]?G3:f[9]!==null?q3:W3}let a=o(t),u=a(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestHeaders")+"")&&T(i,s),a===(a=o(f))&&u?u.p(f,h):(u.d(1),u=a(f),u&&(u.c(),u.m(e,null)))},d(f){f&&H(e),u.d()}}}function W3(t){let e,n=t[24]("logs.detail.noHeaders")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noHeaders")+"")&&T(s,n)},d(i){i&&H(e)}}}function q3(t){let e,n,s,i,l,o=tt(Object.entries(t[9])),a=[];for(let u=0;u<o.length;u+=1)a[u]=Ph(eh(t,o,u));return{c(){e=d("div"),n=d("table"),s=d("thead"),s.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',i=v(),l=d("tbody");for(let u=0;u<a.length;u+=1)a[u].c();c(n,"class","table table-sm table-zebra"),c(e,"class","overflow-x-auto")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(n,i),r(n,l);for(let h=0;h<a.length;h+=1)a[h]&&a[h].m(l,null)},p(u,f){if(f[0]&512){o=tt(Object.entries(u[9]));let h;for(h=0;h<o.length;h+=1){const p=eh(u,o,h);a[h]?a[h].p(p,f):(a[h]=Ph(p),a[h].c(),a[h].m(l,null))}for(;h<a.length;h+=1)a[h].d(1);a.length=o.length}},d(u){u&&H(e),Tn(a,u)}}}function G3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[13]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){I(i,e,l),r(e,n),r(n,s)},p(i,l){l[0]&8192&&T(s,i[13])},d(i){i&&H(e)}}}function X3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=v(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i),r(i,o)},p(a,u){u[0]&16777216&&l!==(l=a[24]("common.loading")+"")&&T(o,l)},d(a){a&&H(e)}}}function Ph(t){let e,n,s=t[43]+"",i,l,o,a=t[44]+"",u,f;return{c(){e=d("tr"),n=d("td"),i=E(s),l=v(),o=d("td"),u=E(a),f=v(),c(n,"class","font-mono text-xs"),c(o,"class","font-mono text-xs break-all")},m(h,p){I(h,e,p),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u),r(e,f)},p(h,p){p[0]&512&&s!==(s=h[43]+"")&&T(i,s),p[0]&512&&a!==(a=h[44]+"")&&T(u,a)},d(h){h&&H(e)}}}function Ah(t){let e,n,s=t[24]("logs.detail.requestBody")+"",i,l;function o(f,h){return f[4]?Z3:f[6]?K3:f[2]!==null?J3:Y3}let a=o(t),u=a(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestBody")+"")&&T(i,s),a===(a=o(f))&&u?u.p(f,h):(u.d(1),u=a(f),u&&(u.c(),u.m(e,null)))},d(f){f&&H(e),u.d()}}}function Y3(t){let e,n=t[24]("logs.detail.noBody")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noBody")+"")&&T(s,n)},d(i){i&&H(e)}}}function J3(t){let e,n=Yi(t[2])+"",s;return{c(){e=d("pre"),s=E(n),c(e,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&4&&n!==(n=Yi(i[2])+"")&&T(s,n)},d(i){i&&H(e)}}}function K3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[6]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){I(i,e,l),r(e,n),r(n,s)},p(i,l){l[0]&64&&T(s,i[6])},d(i){i&&H(e)}}}function Z3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=v(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i),r(i,o)},p(a,u){u[0]&16777216&&l!==(l=a[24]("common.loading")+"")&&T(o,l)},d(a){a&&H(e)}}}function xh(t){let e;function n(l,o){return l[0].respHeaderId||l[0].respBodyId?$3:Q3}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","space-y-4")},m(l,o){I(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},d(l){l&&H(e),i.d()}}}function Q3(t){let e,n=t[24]("logs.detail.noDataAvailable")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noDataAvailable")+"")&&T(s,n)},d(i){i&&H(e)}}}function $3(t){let e,n,s=t[0].respHeaderId&&Oh(t),i=t[8]&&t[0].respBodyId&&Dh(t);return{c(){s&&s.c(),e=v(),i&&i.c(),n=Zn()},m(l,o){s&&s.m(l,o),I(l,e,o),i&&i.m(l,o),I(l,n,o)},p(l,o){l[0].respHeaderId?s?s.p(l,o):(s=Oh(l),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),l[8]&&l[0].respBodyId?i?i.p(l,o):(i=Dh(l),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(l){l&&(H(e),H(n)),s&&s.d(l),i&&i.d(l)}}}function Oh(t){let e,n,s=t[24]("logs.detail.responseHeaders")+"",i,l;function o(f,h){return f[12]?s5:f[14]?n5:f[10]!==null?t5:e5}let a=o(t),u=a(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.responseHeaders")+"")&&T(i,s),a===(a=o(f))&&u?u.p(f,h):(u.d(1),u=a(f),u&&(u.c(),u.m(e,null)))},d(f){f&&H(e),u.d()}}}function e5(t){let e,n=t[24]("logs.detail.noHeaders")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noHeaders")+"")&&T(s,n)},d(i){i&&H(e)}}}function t5(t){let e,n,s,i,l,o=tt(Object.entries(t[10])),a=[];for(let u=0;u<o.length;u+=1)a[u]=Rh($f(t,o,u));return{c(){e=d("div"),n=d("table"),s=d("thead"),s.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',i=v(),l=d("tbody");for(let u=0;u<a.length;u+=1)a[u].c();c(n,"class","table table-sm table-zebra"),c(e,"class","overflow-x-auto")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(n,i),r(n,l);for(let h=0;h<a.length;h+=1)a[h]&&a[h].m(l,null)},p(u,f){if(f[0]&1024){o=tt(Object.entries(u[10]));let h;for(h=0;h<o.length;h+=1){const p=$f(u,o,h);a[h]?a[h].p(p,f):(a[h]=Rh(p),a[h].c(),a[h].m(l,null))}for(;h<a.length;h+=1)a[h].d(1);a.length=o.length}},d(u){u&&H(e),Tn(a,u)}}}function n5(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[14]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){I(i,e,l),r(e,n),r(n,s)},p(i,l){l[0]&16384&&T(s,i[14])},d(i){i&&H(e)}}}function s5(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=v(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i),r(i,o)},p(a,u){u[0]&16777216&&l!==(l=a[24]("common.loading")+"")&&T(o,l)},d(a){a&&H(e)}}}function Rh(t){let e,n,s=t[43]+"",i,l,o,a=t[44]+"",u,f;return{c(){e=d("tr"),n=d("td"),i=E(s),l=v(),o=d("td"),u=E(a),f=v(),c(n,"class","font-mono text-xs"),c(o,"class","font-mono text-xs break-all")},m(h,p){I(h,e,p),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u),r(e,f)},p(h,p){p[0]&1024&&s!==(s=h[43]+"")&&T(i,s),p[0]&1024&&a!==(a=h[44]+"")&&T(u,a)},d(h){h&&H(e)}}}function Dh(t){let e,n,s=t[24]("logs.detail.responseBody")+"",i,l;function o(f,h){return f[5]?r5:f[7]?o5:f[3]!==null?l5:i5}let a=o(t),u=a(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.responseBody")+"")&&T(i,s),a===(a=o(f))&&u?u.p(f,h):(u.d(1),u=a(f),u&&(u.c(),u.m(e,null)))},d(f){f&&H(e),u.d()}}}function i5(t){let e,n=t[24]("logs.detail.noBody")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noBody")+"")&&T(s,n)},d(i){i&&H(e)}}}function l5(t){let e,n=Yi(t[3])+"",s;return{c(){e=d("pre"),s=E(n),c(e,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&8&&n!==(n=Yi(i[3])+"")&&T(s,n)},d(i){i&&H(e)}}}function o5(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[7]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){I(i,e,l),r(e,n),r(n,s)},p(i,l){l[0]&128&&T(s,i[7])},d(i){i&&H(e)}}}function r5(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=v(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i),r(i,o)},p(a,u){u[0]&16777216&&l!==(l=a[24]("common.loading")+"")&&T(o,l)},d(a){a&&H(e)}}}function Lh(t){let e,n,s,i=t[24]("logs.detail.authInfo")+"",l,o,a,u,f,h=t[24]("logs.detail.authLevel")+"",p,g,m,b=t[0].authLevel+"",_,y,k,w,S=t[24]("logs.detail.authResult")+"",P,M,x,A=(t[0].authSuccess?t[24]("logs.detail.authSuccess"):t[24]("logs.detail.authFailed"))+"",O,C;return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=v(),a=d("div"),u=d("div"),f=d("div"),p=E(h),g=v(),m=d("div"),_=E(b),y=v(),k=d("div"),w=d("div"),P=E(S),M=v(),x=d("span"),O=E(A),c(s,"class","card-title text-base mb-2"),c(f,"class","text-xs opacity-60 mb-1"),c(m,"class","text-sm"),c(w,"class","text-xs opacity-60 mb-1"),c(x,"class",C="badge "+(t[0].authSuccess?"badge-success":"badge-error")),c(a,"class","grid grid-cols-2 gap-4"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(R,L){I(R,e,L),r(e,n),r(n,s),r(s,l),r(n,o),r(n,a),r(a,u),r(u,f),r(f,p),r(u,g),r(u,m),r(m,_),r(a,y),r(a,k),r(k,w),r(w,P),r(k,M),r(k,x),r(x,O)},p(R,L){L[0]&16777216&&i!==(i=R[24]("logs.detail.authInfo")+"")&&T(l,i),L[0]&16777216&&h!==(h=R[24]("logs.detail.authLevel")+"")&&T(p,h),L[0]&1&&b!==(b=R[0].authLevel+"")&&T(_,b),L[0]&16777216&&S!==(S=R[24]("logs.detail.authResult")+"")&&T(P,S),L[0]&16777217&&A!==(A=(R[0].authSuccess?R[24]("logs.detail.authSuccess"):R[24]("logs.detail.authFailed"))+"")&&T(O,A),L[0]&1&&C!==(C="badge "+(R[0].authSuccess?"badge-success":"badge-error"))&&c(x,"class",C)},d(R){R&&H(e)}}}function a5(t){let e,n,s,i,l=t[24]("logs.detail.title")+"",o,a,u,f,h,p,g,m,b,_,y,k=t[24]("logs.detail.downloadJson")+"",w,S,P,M,x,A,O,C,R,L=t[24]("logs.detail.overview")+"",D,z,B,U,F,V=t[24]("logs.detail.status")+"",Y,j,q,Q=t[0].status+"",X,re,K,W,G,J=t[24]("logs.detail.method")+"",le,se,N,te=t[0].method+"",Z,oe,Se,me,Ee=t[24]("logs.requestType")+"",ye,ge,be,He=t[25](t[0].requestType)+"",Te,Pe,_e,De,ke,$,ae=t[24]("logs.detail.duration")+"",ue,de,fe,Be=ai(t[0].duration)+"",Qe,We,Ye,nt,Je=t[24]("logs.detail.timestamp")+"",rt,lt,he,Re=Hh(t[0].timestamp)+"",Le,ot,Ge,Ie,Ve=t[24]("logs.detail.requestId")+"",we,Ke,ve,Xe=t[0].requestId+"",Ct,$e,je,At,it=t[24]("logs.detail.processingSteps")+"",mt,Lt,xe,at,Ne,st,jt,Rn,gn=t[24]("logs.detail.requestInfo")+"",Fe,ut,un,Rt,os,Mn,Un,zt,mn,Dn,cn,Ln,Sn,Pn,Ut,rs,Ht,sn=t[24]("logs.detail.tabOriginalRequest")+"",An,Fn,ln,Xt,Qn,Tt,bn=t[24]("logs.detail.tabFinalRequest")+"",$n,as,Yt,vt,es,It,ct=t[24]("logs.detail.tabResponse")+"",Vn,ys,wt,on,Qt,dn,Hn,ts,Jt;function _s(nn,Ce){return nn[23]?M3:T3}let _n=_s(t),fn=_n(t);function Nn(nn,Ce){return nn[0].processingSteps&&nn[0].processingSteps.length>0?P3:C3}let Wn=Nn(t),Kt=Wn(t),$t=t[0].processingSteps&&t[0].processingSteps.length>0&&rh(pr(t));function ns(nn,Ce){return nn[0].transformedPath&&nn[0].transformedPath!==nn[0].path?O3:x3}let us=ns(t),pn=us(t),en=t[0].query&&bh(t),Bt=t[0].routePath&&_h(t),dt=t[0].upstream&&vh(t),kt=t[0].errorMessage&&wh(t),ce=t[21]==="original"&&kh(t),Me=t[21]==="transformed"&&Mh(t),ft=t[21]==="response"&&xh(t),tn=t[0].authLevel&&Lh(t);return Hn=Fr(t[33][0]),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h3"),o=E(l),a=v(),u=d("div"),f=d("button"),fn.c(),p=v(),g=d("button"),m=pe("svg"),b=pe("path"),_=v(),y=d("span"),w=E(k),P=v(),M=d("button"),M.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',x=v(),A=d("div"),O=d("div"),C=d("div"),R=d("h4"),D=E(L),z=v(),B=d("div"),U=d("div"),F=d("div"),Y=E(V),j=v(),q=d("span"),X=E(Q),K=v(),W=d("div"),G=d("div"),le=E(J),se=v(),N=d("span"),Z=E(te),oe=v(),Se=d("div"),me=d("div"),ye=E(Ee),ge=v(),be=d("span"),Te=E(He),De=v(),ke=d("div"),$=d("div"),ue=E(ae),de=v(),fe=d("div"),Qe=E(Be),We=v(),Ye=d("div"),nt=d("div"),rt=E(Je),lt=v(),he=d("div"),Le=E(Re),ot=v(),Ge=d("div"),Ie=d("div"),we=E(Ve),Ke=v(),ve=d("div"),Ct=E(Xe),$e=v(),je=d("div"),At=d("div"),mt=E(it),Lt=v(),xe=d("div"),Kt.c(),at=v(),$t&&$t.c(),Ne=v(),st=d("div"),jt=d("div"),Rn=d("h4"),Fe=E(gn),ut=v(),un=d("div"),pn.c(),Rt=v(),en&&en.c(),os=v(),Mn=d("div"),Bt&&Bt.c(),Un=v(),dt&&dt.c(),zt=v(),kt&&kt.c(),mn=v(),Dn=d("div"),cn=d("div"),Ln=d("div"),Sn=d("div"),Pn=d("label"),Ut=d("input"),rs=v(),Ht=d("span"),An=E(sn),Fn=v(),ln=d("label"),Xt=d("input"),Qn=v(),Tt=d("span"),$n=E(bn),as=v(),Yt=d("label"),vt=d("input"),es=v(),It=d("span"),Vn=E(ct),ys=v(),wt=d("div"),ce&&ce.c(),on=v(),Me&&Me.c(),Qt=v(),ft&&ft.c(),dn=v(),tn&&tn.c(),c(i,"id","modal-title"),c(i,"class","font-bold text-xl"),c(f,"class","btn btn-sm btn-ghost"),c(f,"title",h=t[24]("logs.detail.copyToClipboard")),c(b,"stroke-linecap","round"),c(b,"stroke-linejoin","round"),c(b,"stroke-width","2"),c(b,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(m,"xmlns","http://www.w3.org/2000/svg"),c(m,"class","h-4 w-4"),c(m,"fill","none"),c(m,"viewBox","0 0 24 24"),c(m,"stroke","currentColor"),c(y,"class","hidden md:inline"),c(g,"class","btn btn-sm btn-ghost"),c(g,"title",S=t[24]("logs.detail.downloadJson")),c(M,"class","btn btn-sm btn-circle btn-ghost"),c(u,"class","flex items-center gap-2"),c(s,"class","flex items-center justify-between px-6 py-4 border-b border-base-300"),c(R,"class","card-title text-base mb-3"),c(F,"class","text-xs opacity-60 mb-1"),c(q,"class",re="badge "+Ih(t[0].status)+" badge-lg"),c(G,"class","text-xs opacity-60 mb-1"),c(N,"class","badge badge-lg"),c(me,"class","text-xs opacity-60 mb-1"),c(be,"class",Pe="badge "+Bh(t[0].requestType)+" badge-lg"),c(be,"title",_e=t[24](\`logs.requestType_\${t[0].requestType}_desc\`)),c($,"class","text-xs opacity-60 mb-1"),c(fe,"class","font-semibold"),c(nt,"class","text-xs opacity-60 mb-1"),c(he,"class","text-sm"),c(Ie,"class","text-xs opacity-60 mb-1"),c(ve,"class","font-mono text-xs break-all"),c(Ge,"class","col-span-2"),c(At,"class","text-xs opacity-60 mb-1"),c(xe,"class","flex gap-2 flex-wrap"),c(je,"class","col-span-2 md:col-span-3 lg:col-span-6"),c(B,"class","grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4"),c(C,"class","card-body p-4"),c(O,"class","card bg-base-200"),c(Rn,"class","card-title text-base mb-3"),c(un,"class","space-y-2"),c(jt,"class","card-body p-4"),c(st,"class","card bg-base-200"),c(Mn,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),c(Ut,"class","sr-only"),c(Ut,"type","radio"),c(Ut,"name","activeTab"),Ut.__value="original",ne(Ut,Ut.__value),c(Ht,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(Ht,"bg-primary",t[21]==="original"),ie(Ht,"text-primary-content",t[21]==="original"),ie(Ht,"shadow",t[21]==="original"),ie(Ht,"text-gray-700",t[21]!=="original"),ie(Ht,"dark:text-gray-300",t[21]!=="original"),ie(Ht,"hover:text-gray-900",t[21]!=="original"),ie(Ht,"dark:hover:text-gray-100",t[21]!=="original"),c(Pn,"class","cursor-pointer"),c(Xt,"class","sr-only"),c(Xt,"type","radio"),c(Xt,"name","activeTab"),Xt.__value="transformed",ne(Xt,Xt.__value),c(Tt,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(Tt,"bg-primary",t[21]==="transformed"),ie(Tt,"text-primary-content",t[21]==="transformed"),ie(Tt,"shadow",t[21]==="transformed"),ie(Tt,"text-gray-700",t[21]!=="transformed"),ie(Tt,"dark:text-gray-300",t[21]!=="transformed"),ie(Tt,"hover:text-gray-900",t[21]!=="transformed"),ie(Tt,"dark:hover:text-gray-100",t[21]!=="transformed"),c(ln,"class","cursor-pointer"),c(vt,"class","sr-only"),c(vt,"type","radio"),c(vt,"name","activeTab"),vt.__value="response",ne(vt,vt.__value),c(It,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(It,"bg-primary",t[21]==="response"),ie(It,"text-primary-content",t[21]==="response"),ie(It,"shadow",t[21]==="response"),ie(It,"text-gray-700",t[21]!=="response"),ie(It,"dark:text-gray-300",t[21]!=="response"),ie(It,"hover:text-gray-900",t[21]!=="response"),ie(It,"dark:hover:text-gray-100",t[21]!=="response"),c(Yt,"class","cursor-pointer"),c(Sn,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm"),c(Ln,"class","p-2 border-b border-base-300 flex justify-center"),c(wt,"class","p-4"),c(cn,"class","card-body p-0"),c(Dn,"class","card bg-base-200"),c(A,"class","flex-1 overflow-y-auto px-6 py-4 space-y-6"),c(n,"class","modal-box max-w-6xl h-[90vh] flex flex-col p-0"),c(n,"role","dialog"),c(n,"aria-labelledby","modal-title"),c(n,"aria-modal","true"),c(e,"class","modal modal-open"),c(e,"role","presentation"),Hn.p(Ut,Xt,vt)},m(nn,Ce){I(nn,e,Ce),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(u,f),fn.m(f,null),r(u,p),r(u,g),r(g,m),r(m,b),r(g,_),r(g,y),r(y,w),r(u,P),r(u,M),r(n,x),r(n,A),r(A,O),r(O,C),r(C,R),r(R,D),r(C,z),r(C,B),r(B,U),r(U,F),r(F,Y),r(U,j),r(U,q),r(q,X),r(B,K),r(B,W),r(W,G),r(G,le),r(W,se),r(W,N),r(N,Z),r(B,oe),r(B,Se),r(Se,me),r(me,ye),r(Se,ge),r(Se,be),r(be,Te),r(B,De),r(B,ke),r(ke,$),r($,ue),r(ke,de),r(ke,fe),r(fe,Qe),r(B,We),r(B,Ye),r(Ye,nt),r(nt,rt),r(Ye,lt),r(Ye,he),r(he,Le),r(B,ot),r(B,Ge),r(Ge,Ie),r(Ie,we),r(Ge,Ke),r(Ge,ve),r(ve,Ct),r(B,$e),r(B,je),r(je,At),r(At,mt),r(je,Lt),r(je,xe),Kt.m(xe,null),r(A,at),$t&&$t.m(A,null),r(A,Ne),r(A,st),r(st,jt),r(jt,Rn),r(Rn,Fe),r(jt,ut),r(jt,un),pn.m(un,null),r(un,Rt),en&&en.m(un,null),r(A,os),r(A,Mn),Bt&&Bt.m(Mn,null),r(Mn,Un),dt&&dt.m(Mn,null),r(A,zt),kt&&kt.m(A,null),r(A,mn),r(A,Dn),r(Dn,cn),r(cn,Ln),r(Ln,Sn),r(Sn,Pn),r(Pn,Ut),Ut.checked=Ut.__value===t[21],r(Pn,rs),r(Pn,Ht),r(Ht,An),r(Sn,Fn),r(Sn,ln),r(ln,Xt),Xt.checked=Xt.__value===t[21],r(ln,Qn),r(ln,Tt),r(Tt,$n),r(Sn,as),r(Sn,Yt),r(Yt,vt),vt.checked=vt.__value===t[21],r(Yt,es),r(Yt,It),r(It,Vn),r(cn,ys),r(cn,wt),ce&&ce.m(wt,null),r(wt,on),Me&&Me.m(wt,null),r(wt,Qt),ft&&ft.m(wt,null),r(A,dn),tn&&tn.m(A,null),ts||(Jt=[ee(f,"click",t[29]),ee(g,"click",t[30]),ee(M,"click",function(){ui(t[1])&&t[1].apply(this,arguments)}),ee(Ut,"change",t[32]),ee(Xt,"change",t[34]),ee(vt,"change",t[35]),ee(e,"click",t[28]),ee(e,"keydown",t[36])],ts=!0)},p(nn,Ce){t=nn,Ce[0]&16777216&&l!==(l=t[24]("logs.detail.title")+"")&&T(o,l),_n===(_n=_s(t))&&fn?fn.p(t,Ce):(fn.d(1),fn=_n(t),fn&&(fn.c(),fn.m(f,null))),Ce[0]&16777216&&h!==(h=t[24]("logs.detail.copyToClipboard"))&&c(f,"title",h),Ce[0]&16777216&&k!==(k=t[24]("logs.detail.downloadJson")+"")&&T(w,k),Ce[0]&16777216&&S!==(S=t[24]("logs.detail.downloadJson"))&&c(g,"title",S),Ce[0]&16777216&&L!==(L=t[24]("logs.detail.overview")+"")&&T(D,L),Ce[0]&16777216&&V!==(V=t[24]("logs.detail.status")+"")&&T(Y,V),Ce[0]&1&&Q!==(Q=t[0].status+"")&&T(X,Q),Ce[0]&1&&re!==(re="badge "+Ih(t[0].status)+" badge-lg")&&c(q,"class",re),Ce[0]&16777216&&J!==(J=t[24]("logs.detail.method")+"")&&T(le,J),Ce[0]&1&&te!==(te=t[0].method+"")&&T(Z,te),Ce[0]&16777216&&Ee!==(Ee=t[24]("logs.requestType")+"")&&T(ye,Ee),Ce[0]&1&&He!==(He=t[25](t[0].requestType)+"")&&T(Te,He),Ce[0]&1&&Pe!==(Pe="badge "+Bh(t[0].requestType)+" badge-lg")&&c(be,"class",Pe),Ce[0]&16777217&&_e!==(_e=t[24](\`logs.requestType_\${t[0].requestType}_desc\`))&&c(be,"title",_e),Ce[0]&16777216&&ae!==(ae=t[24]("logs.detail.duration")+"")&&T(ue,ae),Ce[0]&1&&Be!==(Be=ai(t[0].duration)+"")&&T(Qe,Be),Ce[0]&16777216&&Je!==(Je=t[24]("logs.detail.timestamp")+"")&&T(rt,Je),Ce[0]&1&&Re!==(Re=Hh(t[0].timestamp)+"")&&T(Le,Re),Ce[0]&16777216&&Ve!==(Ve=t[24]("logs.detail.requestId")+"")&&T(we,Ve),Ce[0]&1&&Xe!==(Xe=t[0].requestId+"")&&T(Ct,Xe),Ce[0]&16777216&&it!==(it=t[24]("logs.detail.processingSteps")+"")&&T(mt,it),Wn===(Wn=Nn(t))&&Kt?Kt.p(t,Ce):(Kt.d(1),Kt=Wn(t),Kt&&(Kt.c(),Kt.m(xe,null))),t[0].processingSteps&&t[0].processingSteps.length>0?$t?$t.p(pr(t),Ce):($t=rh(pr(t)),$t.c(),$t.m(A,Ne)):$t&&($t.d(1),$t=null),Ce[0]&16777216&&gn!==(gn=t[24]("logs.detail.requestInfo")+"")&&T(Fe,gn),us===(us=ns(t))&&pn?pn.p(t,Ce):(pn.d(1),pn=us(t),pn&&(pn.c(),pn.m(un,Rt))),t[0].query?en?en.p(t,Ce):(en=bh(t),en.c(),en.m(un,null)):en&&(en.d(1),en=null),t[0].routePath?Bt?Bt.p(t,Ce):(Bt=_h(t),Bt.c(),Bt.m(Mn,Un)):Bt&&(Bt.d(1),Bt=null),t[0].upstream?dt?dt.p(t,Ce):(dt=vh(t),dt.c(),dt.m(Mn,null)):dt&&(dt.d(1),dt=null),t[0].errorMessage?kt?kt.p(t,Ce):(kt=wh(t),kt.c(),kt.m(A,mn)):kt&&(kt.d(1),kt=null),Ce[0]&2097152&&(Ut.checked=Ut.__value===t[21]),Ce[0]&16777216&&sn!==(sn=t[24]("logs.detail.tabOriginalRequest")+"")&&T(An,sn),Ce[0]&2097152&&ie(Ht,"bg-primary",t[21]==="original"),Ce[0]&2097152&&ie(Ht,"text-primary-content",t[21]==="original"),Ce[0]&2097152&&ie(Ht,"shadow",t[21]==="original"),Ce[0]&2097152&&ie(Ht,"text-gray-700",t[21]!=="original"),Ce[0]&2097152&&ie(Ht,"dark:text-gray-300",t[21]!=="original"),Ce[0]&2097152&&ie(Ht,"hover:text-gray-900",t[21]!=="original"),Ce[0]&2097152&&ie(Ht,"dark:hover:text-gray-100",t[21]!=="original"),Ce[0]&2097152&&(Xt.checked=Xt.__value===t[21]),Ce[0]&16777216&&bn!==(bn=t[24]("logs.detail.tabFinalRequest")+"")&&T($n,bn),Ce[0]&2097152&&ie(Tt,"bg-primary",t[21]==="transformed"),Ce[0]&2097152&&ie(Tt,"text-primary-content",t[21]==="transformed"),Ce[0]&2097152&&ie(Tt,"shadow",t[21]==="transformed"),Ce[0]&2097152&&ie(Tt,"text-gray-700",t[21]!=="transformed"),Ce[0]&2097152&&ie(Tt,"dark:text-gray-300",t[21]!=="transformed"),Ce[0]&2097152&&ie(Tt,"hover:text-gray-900",t[21]!=="transformed"),Ce[0]&2097152&&ie(Tt,"dark:hover:text-gray-100",t[21]!=="transformed"),Ce[0]&2097152&&(vt.checked=vt.__value===t[21]),Ce[0]&16777216&&ct!==(ct=t[24]("logs.detail.tabResponse")+"")&&T(Vn,ct),Ce[0]&2097152&&ie(It,"bg-primary",t[21]==="response"),Ce[0]&2097152&&ie(It,"text-primary-content",t[21]==="response"),Ce[0]&2097152&&ie(It,"shadow",t[21]==="response"),Ce[0]&2097152&&ie(It,"text-gray-700",t[21]!=="response"),Ce[0]&2097152&&ie(It,"dark:text-gray-300",t[21]!=="response"),Ce[0]&2097152&&ie(It,"hover:text-gray-900",t[21]!=="response"),Ce[0]&2097152&&ie(It,"dark:hover:text-gray-100",t[21]!=="response"),t[21]==="original"?ce?ce.p(t,Ce):(ce=kh(t),ce.c(),ce.m(wt,on)):ce&&(ce.d(1),ce=null),t[21]==="transformed"?Me?Me.p(t,Ce):(Me=Mh(t),Me.c(),Me.m(wt,Qt)):Me&&(Me.d(1),Me=null),t[21]==="response"?ft?ft.p(t,Ce):(ft=xh(t),ft.c(),ft.m(wt,null)):ft&&(ft.d(1),ft=null),t[0].authLevel?tn?tn.p(t,Ce):(tn=Lh(t),tn.c(),tn.m(A,null)):tn&&(tn.d(1),tn=null)},i:Ae,o:Ae,d(nn){nn&&H(e),fn.d(),Kt.d(),$t&&$t.d(),pn.d(),en&&en.d(),Bt&&Bt.d(),dt&&dt.d(),kt&&kt.d(),ce&&ce.d(),Me&&Me.d(),ft&&ft.d(),tn&&tn.d(),Hn.r(),ts=!1,ht(Jt)}}}function Hh(t){return new Date(t).toLocaleString()}function ai(t){return t<1e3?\`\${t}ms\`:\`\${(t/1e3).toFixed(2)}s\`}function Ih(t){return t<300?"badge-success":t<400?"badge-info":t<500?"badge-warning":"badge-error"}function Bh(t){return t==="final"?"badge-success":t==="retry"?"badge-warning":t==="recovery"?"badge-info":"badge-ghost"}function Yi(t){return JSON.stringify(t,null,2)}function u5(t){const e=t.toLowerCase();return e.includes("auth")?"bg-blue-500":e.includes("plugin")?"bg-purple-500":e.includes("upstream")||e.includes("proxy")||e.includes("selected")?"bg-green-500":e.includes("transform")||e.includes("rewrite")?"bg-orange-500":e.includes("error")||e.includes("failed")?"bg-red-500":e.includes("retry")||e.includes("recover")||e.includes("circuit")?"bg-yellow-500":"bg-base-content/30"}function c5(t){const e=t.toLowerCase();return e.includes("auth")?"Auth":e.includes("plugin")?"Plugin":e.includes("upstream")||e.includes("proxy")||e.includes("selected")?"Upstream":e.includes("transform")||e.includes("rewrite")?"Transform":e.includes("retry")||e.includes("recover")||e.includes("circuit")?"Retry":"Other"}function f5(t,e,n){let s;Zt(t,xt,N=>n(24,s=N));let{log:i}=e,{onClose:l}=e,o=null,a=null,u=!1,f=!1,h=null,p=null,g=!1,m=null,b=null,_=!1,y=!1,k=null,w=null,S=null,P=null,M=!1,x=!1,A=null,O=null,C="original",R=!1,L=!1;function D(N){return N?s(\`logs.requestType_\${N}\`):"-"}function z(N){const te=\`logs.steps.\${N}\`,Z=s(te);return Z===te?N.split("_").map(oe=>oe.charAt(0).toUpperCase()+oe.slice(1)).join(" "):Z}function B(){if(!i.processingSteps||i.processingSteps.length===0)return{durations:[],relativeTime:[],totalDuration:0};const N=i.processingSteps,te=N[0].timestamp,Z=N.map((me,Ee)=>Ee===N.length-1?i.duration-(me.timestamp-te):N[Ee+1].timestamp-me.timestamp),oe=N.map(me=>me.timestamp-te),Se=i.duration;return{durations:Z,relativeTime:oe,totalDuration:Se}}function U(N){N.target===N.currentTarget&&l()}async function F(){const N={requestId:i.requestId,timestamp:i.timestamp,method:i.method,path:i.path,status:i.status,duration:i.duration,originalRequestHeaders:S,originalRequestBody:P,requestHeaders:m,requestBody:o,responseHeaders:b,responseBody:a,processingSteps:i.processingSteps};try{await navigator.clipboard.writeText(JSON.stringify(N,null,2)),n(23,L=!0),setTimeout(()=>{n(23,L=!1)},2e3)}catch(te){console.error("Failed to copy:",te)}}async function V(){const N={requestId:i.requestId,timestamp:i.timestamp,method:i.method,path:i.path,status:i.status,duration:i.duration,originalRequestHeaders:S,originalRequestBody:P,requestHeaders:m,requestBody:o,responseHeaders:b,responseBody:a,processingSteps:i.processingSteps},te=new Blob([JSON.stringify(N,null,2)],{type:"application/json"}),Z=URL.createObjectURL(te),oe=document.createElement("a");oe.href=Z,oe.download=\`log-\${i.requestId}.json\`,oe.click(),URL.revokeObjectURL(Z)}async function Y(){if(!(!i.reqBodyId||o!==null)){n(4,u=!0),n(6,h=null);try{n(2,o=await ar(i.reqBodyId))}catch(N){n(6,h=N instanceof Error?N.message:"Failed to load request body")}finally{n(4,u=!1)}}}async function j(){if(!(!i.respBodyId||a!==null)){n(5,f=!0),n(7,p=null);try{n(3,a=await ar(i.respBodyId))}catch(N){n(7,p=N instanceof Error?N.message:"Failed to load response body")}finally{n(5,f=!1)}}}async function q(){if(!(!i.reqHeaderId||m!==null)){n(11,_=!0),n(13,k=null);try{n(9,m=await ur(i.reqHeaderId))}catch(N){n(13,k=N instanceof Error?N.message:"Failed to load request headers")}finally{n(11,_=!1)}}}async function Q(){if(!(!i.respHeaderId||b!==null)){n(12,y=!0),n(14,w=null);try{n(10,b=await ur(i.respHeaderId))}catch(N){n(14,w=N instanceof Error?N.message:"Failed to load response headers")}finally{n(12,y=!1)}}}async function X(){if(!(!i.originalReqHeaderId||S!==null)){n(17,M=!0),n(19,A=null);try{n(15,S=await ur(i.originalReqHeaderId))}catch(N){n(19,A=N instanceof Error?N.message:"Failed to load original request headers")}finally{n(17,M=!1)}}}async function re(){if(!(!i.originalReqBodyId||P!==null)){n(18,x=!0),n(20,O=null);try{n(16,P=await ar(i.originalReqBodyId))}catch(N){n(20,O=N instanceof Error?N.message:"Failed to load original request body")}finally{n(18,x=!1)}}}ls(async()=>{try{const N=await qr();n(8,g=N.logging?.body?.enabled||!1)}catch(N){console.error("Failed to load config:",N),n(8,g=!1)}i.originalReqHeaderId&&X(),i.originalReqBodyId&&re(),i.reqHeaderId&&q(),i.respHeaderId&&Q(),i.reqBodyId&&Y(),i.respBodyId&&j()});const K=[[]],W=()=>n(22,R=!R);function G(){C=this.__value,n(21,C)}function J(){C=this.__value,n(21,C)}function le(){C=this.__value,n(21,C)}const se=N=>N.key==="Escape"&&l();return t.$$set=N=>{"log"in N&&n(0,i=N.log),"onClose"in N&&n(1,l=N.onClose)},[i,l,o,a,u,f,h,p,g,m,b,_,y,k,w,S,P,M,x,A,O,C,R,L,s,D,z,B,U,F,V,W,G,K,J,le,se]}class h5 extends Gt{constructor(e){super(),qt(this,e,f5,a5,Nt,{log:0,onClose:1},null,[-1,-1,-1])}}function Fh(t,e,n){const s=t.slice();return s[51]=e[n],s}function d5(t){let e,n,s,i,l=t[22]("logs.startStream")+"",o;return{c(){e=pe("svg"),n=pe("path"),s=pe("path"),i=v(),o=E(l),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(a,u){I(a,e,u),r(e,n),r(e,s),I(a,i,u),I(a,o,u)},p(a,u){u[0]&4194304&&l!==(l=a[22]("logs.startStream")+"")&&T(o,l)},d(a){a&&(H(e),H(i),H(o))}}}function p5(t){let e,n,s,i,l=t[22]("logs.stopStream")+"",o;return{c(){e=pe("svg"),n=pe("path"),s=pe("path"),i=v(),o=E(l),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(a,u){I(a,e,u),r(e,n),r(e,s),I(a,i,u),I(a,o,u)},p(a,u){u[0]&4194304&&l!==(l=a[22]("logs.stopStream")+"")&&T(o,l)},d(a){a&&(H(e),H(i),H(o))}}}function Nh(t){let e,n,s,i=t[22]("logs.activeFilters")+"",l;return{c(){e=d("span"),n=E(t[21]),s=v(),l=E(i),c(e,"class","badge badge-primary badge-sm")},m(o,a){I(o,e,a),r(e,n),r(e,s),r(e,l)},p(o,a){a[0]&2097152&&T(n,o[21]),a[0]&4194304&&i!==(i=o[22]("logs.activeFilters")+"")&&T(l,i)},d(o){o&&H(e)}}}function jh(t){let e,n,s,i=t[22]("logs.recentHours")+"",l,o,a,u,f;return{c(){e=d("div"),n=d("label"),s=d("span"),l=E(i),o=v(),a=d("input"),c(s,"class","label-text"),c(n,"class","label"),c(n,"for","logs-recent-hours"),c(a,"id","logs-recent-hours"),c(a,"type","number"),c(a,"min","1"),c(a,"class","input input-bordered input-sm"),c(e,"class","form-control")},m(h,p){I(h,e,p),r(e,n),r(n,s),r(s,l),r(e,o),r(e,a),ne(a,t[9]),u||(f=ee(a,"input",t[40]),u=!0)},p(h,p){p[0]&4194304&&i!==(i=h[22]("logs.recentHours")+"")&&T(l,i),p[0]&512&&yt(a.value)!==h[9]&&ne(a,h[9])},d(h){h&&H(e),u=!1,f()}}}function zh(t){let e,n,s,i=t[22]("logs.startTime")+"",l,o,a,u,f,h,p,g=t[22]("logs.endTime")+"",m,b,_,y,k;return{c(){e=d("div"),n=d("label"),s=d("span"),l=E(i),o=v(),a=d("input"),u=v(),f=d("div"),h=d("label"),p=d("span"),m=E(g),b=v(),_=d("input"),c(s,"class","label-text"),c(n,"class","label"),c(n,"for","logs-start-time"),c(a,"id","logs-start-time"),c(a,"type","datetime-local"),c(a,"class","input input-bordered input-sm"),c(e,"class","form-control"),c(p,"class","label-text"),c(h,"class","label"),c(h,"for","logs-end-time"),c(_,"id","logs-end-time"),c(_,"type","datetime-local"),c(_,"class","input input-bordered input-sm"),c(f,"class","form-control")},m(w,S){I(w,e,S),r(e,n),r(n,s),r(s,l),r(e,o),r(e,a),ne(a,t[10]),I(w,u,S),I(w,f,S),r(f,h),r(h,p),r(p,m),r(f,b),r(f,_),ne(_,t[11]),y||(k=[ee(a,"input",t[41]),ee(_,"input",t[42])],y=!0)},p(w,S){S[0]&4194304&&i!==(i=w[22]("logs.startTime")+"")&&T(l,i),S[0]&1024&&ne(a,w[10]),S[0]&4194304&&g!==(g=w[22]("logs.endTime")+"")&&T(m,g),S[0]&2048&&ne(_,w[11])},d(w){w&&(H(e),H(u),H(f)),y=!1,ht(k)}}}function g5(t){let e,n,s,i,l,o,a,u=t[22]("logs.time")+"",f,h,p,g=t[22]("logs.method")+"",m,b,_,y=t[22]("logs.path")+"",k,w,S,P=t[22]("logs.status")+"",M,x,A,O=t[22]("logs.requestType")+"",C,R,L,D=t[22]("logs.duration")+"",z,B,U,F=t[22]("logs.upstream")+"",V,Y,j,q=t[22]("logs.actions")+"",Q,X,re,K=[],W=new Map,G,J,le,se=t[22]("logs.showing",{values:{start:(t[0]-1)*oi+1,end:Math.min(t[0]*oi,t[13]),total:t[13]}})+"",N,te,Z,oe,Se,me,Ee,ye,ge=t[22]("logs.page",{values:{page:t[0],totalPages:t[14]}})+"",be,He,Te,Pe,_e,De,ke,$=tt(t[12]);const ae=ue=>ue[51].requestId;for(let ue=0;ue<$.length;ue+=1){let de=Fh(t,$,ue),fe=ae(de);W.set(fe,K[ue]=Uh(fe,de))}return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("table"),l=d("thead"),o=d("tr"),a=d("th"),f=E(u),h=v(),p=d("th"),m=E(g),b=v(),_=d("th"),k=E(y),w=v(),S=d("th"),M=E(P),x=v(),A=d("th"),C=E(O),R=v(),L=d("th"),z=E(D),B=v(),U=d("th"),V=E(F),Y=v(),j=d("th"),Q=E(q),X=v(),re=d("tbody");for(let ue=0;ue<K.length;ue+=1)K[ue].c();G=v(),J=d("div"),le=d("div"),N=E(se),te=v(),Z=d("div"),oe=d("button"),Se=E("\xAB"),Ee=v(),ye=d("button"),be=E(ge),He=v(),Te=d("button"),Pe=E("\xBB"),c(i,"class","table table-zebra table-sm"),c(s,"class","overflow-x-auto"),c(le,"class","text-sm"),c(oe,"class","join-item btn btn-sm"),oe.disabled=me=t[0]<=1,c(ye,"class","join-item btn btn-sm"),c(Te,"class","join-item btn btn-sm"),Te.disabled=_e=t[0]>=t[14],c(Z,"class","join"),c(J,"class","flex justify-between items-center p-4"),c(n,"class","card-body p-0"),c(e,"class","card bg-base-100 shadow-xl")},m(ue,de){I(ue,e,de),r(e,n),r(n,s),r(s,i),r(i,l),r(l,o),r(o,a),r(a,f),r(o,h),r(o,p),r(p,m),r(o,b),r(o,_),r(_,k),r(o,w),r(o,S),r(S,M),r(o,x),r(o,A),r(A,C),r(o,R),r(o,L),r(L,z),r(o,B),r(o,U),r(U,V),r(o,Y),r(o,j),r(j,Q),r(i,X),r(i,re);for(let fe=0;fe<K.length;fe+=1)K[fe]&&K[fe].m(re,null);r(n,G),r(n,J),r(J,le),r(le,N),r(J,te),r(J,Z),r(Z,oe),r(oe,Se),r(Z,Ee),r(Z,ye),r(ye,be),r(Z,He),r(Z,Te),r(Te,Pe),De||(ke=[ee(oe,"click",t[46]),ee(Te,"click",t[47])],De=!0)},p(ue,de){de[0]&4194304&&u!==(u=ue[22]("logs.time")+"")&&T(f,u),de[0]&4194304&&g!==(g=ue[22]("logs.method")+"")&&T(m,g),de[0]&4194304&&y!==(y=ue[22]("logs.path")+"")&&T(k,y),de[0]&4194304&&P!==(P=ue[22]("logs.status")+"")&&T(M,P),de[0]&4194304&&O!==(O=ue[22]("logs.requestType")+"")&&T(C,O),de[0]&4194304&&D!==(D=ue[22]("logs.duration")+"")&&T(z,D),de[0]&4194304&&F!==(F=ue[22]("logs.upstream")+"")&&T(V,F),de[0]&4194304&&q!==(q=ue[22]("logs.actions")+"")&&T(Q,q),de[0]&104861696&&($=tt(ue[12]),K=Nr(K,de,ae,1,ue,$,W,re,ug,Uh,null,Fh)),de[0]&4202497&&se!==(se=ue[22]("logs.showing",{values:{start:(ue[0]-1)*oi+1,end:Math.min(ue[0]*oi,ue[13]),total:ue[13]}})+"")&&T(N,se),de[0]&1&&me!==(me=ue[0]<=1)&&(oe.disabled=me),de[0]&4210689&&ge!==(ge=ue[22]("logs.page",{values:{page:ue[0],totalPages:ue[14]}})+"")&&T(be,ge),de[0]&16385&&_e!==(_e=ue[0]>=ue[14])&&(Te.disabled=_e)},d(ue){ue&&H(e);for(let de=0;de<K.length;de+=1)K[de].d();De=!1,ht(ke)}}}function m5(t){let e,n,s,i,l,o=t[22]("logs.noData")+"",a;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"class","stroke-current shrink-0 w-6 h-6"),c(e,"class","alert alert-info")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a)},p(u,f){f[0]&4194304&&o!==(o=u[22]("logs.noData")+"")&&T(a,o)},d(u){u&&H(e)}}}function b5(t){let e,n,s,i,l,o=t[22]("common.error")+"",a,u,f;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),u=E(": "),f=E(t[16]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){I(h,e,p),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a),r(l,u),r(l,f)},p(h,p){p[0]&4194304&&o!==(o=h[22]("common.error")+"")&&T(a,o),p[0]&65536&&T(f,h[16])},d(h){h&&H(e)}}}function _5(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){I(n,e,s)},p:Ae,d(n){n&&H(e)}}}function Uh(t,e){let n,s,i=Wh(e[51].timestamp)+"",l,o,a,u,f=e[51].method+"",h,p,g,m=e[51].path+"",b,_,y,k,w,S=e[51].status+"",P,M,x,A,O,C=e[26](e[51].requestType)+"",R,L,D,z,B,U=qh(e[51].duration)+"",F,V,Y,j=(e[51].upstream||"-")+"",q,Q,X,re,K,W=e[22]("logs.viewDetail")+"",G,J,le,se;function N(){return e[45](e[51])}return{key:t,first:null,c(){n=d("tr"),s=d("td"),l=E(i),o=v(),a=d("td"),u=d("span"),h=E(f),p=v(),g=d("td"),b=E(m),y=v(),k=d("td"),w=d("span"),P=E(S),x=v(),A=d("td"),O=d("span"),R=E(C),z=v(),B=d("td"),F=E(U),V=v(),Y=d("td"),q=E(j),X=v(),re=d("td"),K=d("button"),G=E(W),J=v(),c(s,"class","text-xs"),c(u,"class","badge badge-sm"),c(g,"class","font-mono text-xs truncate max-w-xs"),c(g,"title",_=e[51].path),c(w,"class",M="badge badge-sm "+Gh(e[51].status)),c(O,"class",L="badge badge-sm "+Xh(e[51].requestType)),c(O,"title",D=e[22](\`logs.requestType_\${e[51].requestType}_desc\`)),c(B,"class","text-xs"),c(Y,"class","text-xs truncate max-w-xs"),c(Y,"title",Q=e[51].upstream||"-"),c(K,"class","btn btn-xs btn-ghost"),c(n,"class","hover"),this.first=n},m(te,Z){I(te,n,Z),r(n,s),r(s,l),r(n,o),r(n,a),r(a,u),r(u,h),r(n,p),r(n,g),r(g,b),r(n,y),r(n,k),r(k,w),r(w,P),r(n,x),r(n,A),r(A,O),r(O,R),r(n,z),r(n,B),r(B,F),r(n,V),r(n,Y),r(Y,q),r(n,X),r(n,re),r(re,K),r(K,G),r(n,J),le||(se=ee(K,"click",N),le=!0)},p(te,Z){e=te,Z[0]&4096&&i!==(i=Wh(e[51].timestamp)+"")&&T(l,i),Z[0]&4096&&f!==(f=e[51].method+"")&&T(h,f),Z[0]&4096&&m!==(m=e[51].path+"")&&T(b,m),Z[0]&4096&&_!==(_=e[51].path)&&c(g,"title",_),Z[0]&4096&&S!==(S=e[51].status+"")&&T(P,S),Z[0]&4096&&M!==(M="badge badge-sm "+Gh(e[51].status))&&c(w,"class",M),Z[0]&4096&&C!==(C=e[26](e[51].requestType)+"")&&T(R,C),Z[0]&4096&&L!==(L="badge badge-sm "+Xh(e[51].requestType))&&c(O,"class",L),Z[0]&4198400&&D!==(D=e[22](\`logs.requestType_\${e[51].requestType}_desc\`))&&c(O,"title",D),Z[0]&4096&&U!==(U=qh(e[51].duration)+"")&&T(F,U),Z[0]&4096&&j!==(j=(e[51].upstream||"-")+"")&&T(q,j),Z[0]&4096&&Q!==(Q=e[51].upstream||"-")&&c(Y,"title",Q),Z[0]&4194304&&W!==(W=e[22]("logs.viewDetail")+"")&&T(G,W)},d(te){te&&H(n),le=!1,se()}}}function Vh(t){let e,n;return e=new h5({props:{log:t[17],onClose:t[48]}}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p(s,i){const l={};i[0]&131072&&(l.log=s[17]),i[0]&393216&&(l.onClose=s[48]),e.$set(l)},i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function v5(t){let e,n,s,i=t[22]("logs.title")+"",l,o,a,u,f,h,p,g,m,b,_,y=t[22]("logs.export")+"",k,w,S,P,M,x,A,O,C,R,L,D,z,B,U=t[22]("logs.filters")+"",F,V,Y,j,q=t[22]("logs.clearFilters")+"",Q,X,re,K,W,G,J,le=t[22]("logs.searchTerm")+"",se,N,te,Z,oe,Se,me,Ee,ye=t[22]("logs.method")+"",ge,be,He,Te,Pe=t[22]("logs.allMethods")+"",_e,De,ke,$,ae,ue,de,fe,Be,Qe,We=t[22]("logs.status")+"",Ye,nt,Je,rt,lt,he,Re,Le,ot=t[22]("logs.result")+"",Ge,Ie,Ve,we,Ke=t[22]("logs.allResults")+"",ve,Xe,Ct=t[22]("logs.success")+"",$e,je,At=t[22]("logs.failed")+"",it,mt,Lt,xe,at,Ne,st=t[22]("logs.advancedFilters")+"",jt,Rn,gn,Fe,ut,un,Rt,os=t[22]("logs.requestTypeFilter")+"",Mn,Un,zt,mn,Dn=t[22]("logs.requestType_all")+"",cn,Ln,Sn=t[22]("logs.requestType_final")+"",Pn,Ut,rs=t[22]("logs.requestType_retry")+"",Ht,sn,An=t[22]("logs.requestType_recovery")+"",Fn,ln,Xt,Qn,Tt,bn=t[22]("logs.timeRange")+"",$n,as,Yt,vt,es=t[22]("logs.allTime")+"",It,ct,Vn=t[22]("logs.recentTime")+"",ys,wt,on=t[22]("logs.customTime")+"",Qt,dn,Hn,ts,Jt,_s,_n,fn=t[22]("logs.sortBy")+"",Nn,Wn,Kt,$t,ns=t[22]("logs.sortByTimestamp")+"",us,pn,en=t[22]("logs.sortByDuration")+"",Bt,dt,kt=t[22]("logs.sortByStatus")+"",ce,Me,ft,tn,nn,Ce=t[22]("logs.sortOrder")+"",ss,vn,qn,As,zs=t[22]("logs.desc")+"",gi,xs,mi=t[22]("logs.asc")+"",In,jn,qe,et,St,Uo,ka;function Sa(Oe,Ze){return Oe[19]?p5:d5}let Bl=Sa(t),Os=Bl(t),cs=t[21]>0&&Nh(t),fs=t[8]==="recent"&&jh(t),hs=t[8]==="custom"&&zh(t);function Ea(Oe,Ze){return Oe[15]&&Oe[12].length===0?_5:Oe[16]?b5:Oe[12].length===0?m5:g5}let Fl=Ea(t),Rs=Fl(t),Bn=t[18]&&t[17]&&Vh(t);return{c(){e=d("div"),n=d("div"),s=d("h1"),l=E(i),o=v(),a=d("div"),u=d("button"),Os.c(),h=v(),p=d("div"),g=d("div"),m=pe("svg"),b=pe("path"),_=v(),k=E(y),w=v(),S=d("ul"),P=d("li"),M=d("button"),M.textContent="JSON",x=v(),A=d("li"),O=d("button"),O.textContent="CSV",C=v(),R=d("div"),L=d("div"),D=d("div"),z=d("div"),B=d("h2"),F=E(U),V=v(),cs&&cs.c(),Y=v(),j=d("button"),Q=E(q),re=v(),K=d("div"),W=d("div"),G=d("label"),J=d("span"),se=E(le),N=v(),te=d("input"),oe=v(),Se=d("div"),me=d("label"),Ee=d("span"),ge=E(ye),be=v(),He=d("select"),Te=d("option"),_e=E(Pe),De=d("option"),De.textContent="GET",ke=d("option"),ke.textContent="POST",$=d("option"),$.textContent="PUT",ae=d("option"),ae.textContent="DELETE",ue=d("option"),ue.textContent="PATCH",de=v(),fe=d("div"),Be=d("label"),Qe=d("span"),Ye=E(We),nt=v(),Je=d("input"),lt=v(),he=d("div"),Re=d("label"),Le=d("span"),Ge=E(ot),Ie=v(),Ve=d("select"),we=d("option"),ve=E(Ke),Xe=d("option"),$e=E(Ct),je=d("option"),it=E(At),mt=v(),Lt=d("div"),xe=d("input"),at=v(),Ne=d("div"),jt=E(st),Rn=v(),gn=d("div"),Fe=d("div"),ut=d("div"),un=d("label"),Rt=d("span"),Mn=E(os),Un=v(),zt=d("select"),mn=d("option"),cn=E(Dn),Ln=d("option"),Pn=E(Sn),Ut=d("option"),Ht=E(rs),sn=d("option"),Fn=E(An),ln=v(),Xt=d("div"),Qn=d("label"),Tt=d("span"),$n=E(bn),as=v(),Yt=d("select"),vt=d("option"),It=E(es),ct=d("option"),ys=E(Vn),wt=d("option"),Qt=E(on),dn=v(),fs&&fs.c(),Hn=v(),hs&&hs.c(),ts=v(),Jt=d("div"),_s=d("label"),_n=d("span"),Nn=E(fn),Wn=v(),Kt=d("select"),$t=d("option"),us=E(ns),pn=d("option"),Bt=E(en),dt=d("option"),ce=E(kt),Me=v(),ft=d("div"),tn=d("label"),nn=d("span"),ss=E(Ce),vn=v(),qn=d("select"),As=d("option"),gi=E(zs),xs=d("option"),In=E(mi),jn=v(),Rs.c(),qe=v(),Bn&&Bn.c(),et=Zn(),c(s,"class","text-3xl font-bold"),c(u,"class",f="btn btn-sm "+(t[19]?"btn-error":"btn-primary")),c(b,"stroke-linecap","round"),c(b,"stroke-linejoin","round"),c(b,"stroke-width","2"),c(b,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(m,"xmlns","http://www.w3.org/2000/svg"),c(m,"class","h-4 w-4"),c(m,"fill","none"),c(m,"viewBox","0 0 24 24"),c(m,"stroke","currentColor"),c(g,"role","button"),c(g,"tabindex","0"),c(g,"class","btn btn-sm btn-secondary"),c(S,"role","menu"),c(S,"tabindex","0"),c(S,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-32 top-[3em]"),c(p,"class","dropdown dropdown-end z-[1]"),c(a,"class","flex gap-2"),c(n,"class","flex justify-between items-center mb-6"),c(B,"class","card-title text-lg"),c(z,"class","flex items-center gap-2"),c(j,"class","btn btn-sm btn-ghost"),j.disabled=X=t[21]===0,c(D,"class","flex justify-between items-center mb-4"),c(J,"class","label-text"),c(G,"class","label"),c(G,"for","logs-search"),c(te,"id","logs-search"),c(te,"type","text"),c(te,"placeholder",Z=t[22]("logs.searchPlaceholder")),c(te,"class","input input-bordered input-sm"),c(W,"class","form-control"),c(Ee,"class","label-text"),c(me,"class","label"),c(me,"for","logs-method"),Te.__value="",ne(Te,Te.__value),De.__value="GET",ne(De,De.__value),ke.__value="POST",ne(ke,ke.__value),$.__value="PUT",ne($,$.__value),ae.__value="DELETE",ne(ae,ae.__value),ue.__value="PATCH",ne(ue,ue.__value),c(He,"id","logs-method"),c(He,"class","select select-bordered select-sm"),t[2]===void 0&&vs(()=>t[34].call(He)),c(Se,"class","form-control"),c(Qe,"class","label-text"),c(Be,"class","label"),c(Be,"for","logs-status"),c(Je,"id","logs-status"),c(Je,"type","text"),c(Je,"placeholder",rt=t[22]("logs.statusPlaceholder")),c(Je,"class","input input-bordered input-sm"),c(fe,"class","form-control"),c(Le,"class","label-text"),c(Re,"class","label"),c(Re,"for","logs-result"),we.__value=void 0,ne(we,we.__value),Xe.__value=!0,ne(Xe,Xe.__value),je.__value=!1,ne(je,je.__value),c(Ve,"id","logs-result"),c(Ve,"class","select select-bordered select-sm"),t[4]===void 0&&vs(()=>t[36].call(Ve)),c(he,"class","form-control"),c(K,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-4"),c(xe,"type","checkbox"),c(xe,"class","peer"),c(Ne,"class","collapse-title text-sm font-medium"),c(Rt,"class","label-text"),c(un,"class","label"),c(un,"for","logs-request-type"),mn.__value="",ne(mn,mn.__value),Ln.__value="final",ne(Ln,Ln.__value),Ut.__value="retry",ne(Ut,Ut.__value),sn.__value="recovery",ne(sn,sn.__value),c(zt,"id","logs-request-type"),c(zt,"class","select select-bordered select-sm"),t[5]===void 0&&vs(()=>t[38].call(zt)),c(ut,"class","form-control"),c(Tt,"class","label-text"),c(Qn,"class","label"),c(Qn,"for","logs-time-range"),vt.__value="all",ne(vt,vt.__value),ct.__value="recent",ne(ct,ct.__value),wt.__value="custom",ne(wt,wt.__value),c(Yt,"id","logs-time-range"),c(Yt,"class","select select-bordered select-sm"),t[8]===void 0&&vs(()=>t[39].call(Yt)),c(Xt,"class","form-control"),c(_n,"class","label-text"),c(_s,"class","label"),c(_s,"for","logs-sort-by"),$t.__value="timestamp",ne($t,$t.__value),pn.__value="duration",ne(pn,pn.__value),dt.__value="status",ne(dt,dt.__value),c(Kt,"id","logs-sort-by"),c(Kt,"class","select select-bordered select-sm"),t[6]===void 0&&vs(()=>t[43].call(Kt)),c(Jt,"class","form-control"),c(nn,"class","label-text"),c(tn,"class","label"),c(tn,"for","logs-sort-order"),As.__value="desc",ne(As,As.__value),xs.__value="asc",ne(xs,xs.__value),c(qn,"id","logs-sort-order"),c(qn,"class","select select-bordered select-sm"),t[7]===void 0&&vs(()=>t[44].call(qn)),c(ft,"class","form-control"),c(Fe,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 pt-4"),c(gn,"class","collapse-content"),c(Lt,"class","collapse collapse-arrow bg-base-200"),c(L,"class","card-body"),c(R,"class","card bg-base-100 shadow-xl mb-6"),c(e,"class","p-6")},m(Oe,Ze){I(Oe,e,Ze),r(e,n),r(n,s),r(s,l),r(n,o),r(n,a),r(a,u),Os.m(u,null),r(a,h),r(a,p),r(p,g),r(g,m),r(m,b),r(g,_),r(g,k),r(p,w),r(p,S),r(S,P),r(P,M),r(S,x),r(S,A),r(A,O),r(e,C),r(e,R),r(R,L),r(L,D),r(D,z),r(z,B),r(B,F),r(z,V),cs&&cs.m(z,null),r(D,Y),r(D,j),r(j,Q),r(L,re),r(L,K),r(K,W),r(W,G),r(G,J),r(J,se),r(W,N),r(W,te),ne(te,t[1]),r(K,oe),r(K,Se),r(Se,me),r(me,Ee),r(Ee,ge),r(Se,be),r(Se,He),r(He,Te),r(Te,_e),r(He,De),r(He,ke),r(He,$),r(He,ae),r(He,ue),Cn(He,t[2],!0),r(K,de),r(K,fe),r(fe,Be),r(Be,Qe),r(Qe,Ye),r(fe,nt),r(fe,Je),ne(Je,t[3]),r(K,lt),r(K,he),r(he,Re),r(Re,Le),r(Le,Ge),r(he,Ie),r(he,Ve),r(Ve,we),r(we,ve),r(Ve,Xe),r(Xe,$e),r(Ve,je),r(je,it),Cn(Ve,t[4],!0),r(L,mt),r(L,Lt),r(Lt,xe),xe.checked=t[20],r(Lt,at),r(Lt,Ne),r(Ne,jt),r(Lt,Rn),r(Lt,gn),r(gn,Fe),r(Fe,ut),r(ut,un),r(un,Rt),r(Rt,Mn),r(ut,Un),r(ut,zt),r(zt,mn),r(mn,cn),r(zt,Ln),r(Ln,Pn),r(zt,Ut),r(Ut,Ht),r(zt,sn),r(sn,Fn),Cn(zt,t[5],!0),r(Fe,ln),r(Fe,Xt),r(Xt,Qn),r(Qn,Tt),r(Tt,$n),r(Xt,as),r(Xt,Yt),r(Yt,vt),r(vt,It),r(Yt,ct),r(ct,ys),r(Yt,wt),r(wt,Qt),Cn(Yt,t[8],!0),r(Fe,dn),fs&&fs.m(Fe,null),r(Fe,Hn),hs&&hs.m(Fe,null),r(Fe,ts),r(Fe,Jt),r(Jt,_s),r(_s,_n),r(_n,Nn),r(Jt,Wn),r(Jt,Kt),r(Kt,$t),r($t,us),r(Kt,pn),r(pn,Bt),r(Kt,dt),r(dt,ce),Cn(Kt,t[6],!0),r(Fe,Me),r(Fe,ft),r(ft,tn),r(tn,nn),r(nn,ss),r(ft,vn),r(ft,qn),r(qn,As),r(As,gi),r(qn,xs),r(xs,In),Cn(qn,t[7],!0),r(e,jn),Rs.m(e,null),I(Oe,qe,Ze),Bn&&Bn.m(Oe,Ze),I(Oe,et,Ze),St=!0,Uo||(ka=[ee(u,"click",t[24]),ee(M,"click",t[31]),ee(O,"click",t[32]),ee(j,"click",t[27]),ee(te,"input",t[33]),ee(He,"change",t[34]),ee(Je,"input",t[35]),ee(Ve,"change",t[36]),ee(xe,"change",t[37]),ee(xe,"change",t[28]),ee(zt,"change",t[38]),ee(Yt,"change",t[39]),ee(Kt,"change",t[43]),ee(qn,"change",t[44])],Uo=!0)},p(Oe,Ze){(!St||Ze[0]&4194304)&&i!==(i=Oe[22]("logs.title")+"")&&T(l,i),Bl===(Bl=Sa(Oe))&&Os?Os.p(Oe,Ze):(Os.d(1),Os=Bl(Oe),Os&&(Os.c(),Os.m(u,null))),(!St||Ze[0]&524288&&f!==(f="btn btn-sm "+(Oe[19]?"btn-error":"btn-primary")))&&c(u,"class",f),(!St||Ze[0]&4194304)&&y!==(y=Oe[22]("logs.export")+"")&&T(k,y),(!St||Ze[0]&4194304)&&U!==(U=Oe[22]("logs.filters")+"")&&T(F,U),Oe[21]>0?cs?cs.p(Oe,Ze):(cs=Nh(Oe),cs.c(),cs.m(z,null)):cs&&(cs.d(1),cs=null),(!St||Ze[0]&4194304)&&q!==(q=Oe[22]("logs.clearFilters")+"")&&T(Q,q),(!St||Ze[0]&2097152&&X!==(X=Oe[21]===0))&&(j.disabled=X),(!St||Ze[0]&4194304)&&le!==(le=Oe[22]("logs.searchTerm")+"")&&T(se,le),(!St||Ze[0]&4194304&&Z!==(Z=Oe[22]("logs.searchPlaceholder")))&&c(te,"placeholder",Z),Ze[0]&2&&te.value!==Oe[1]&&ne(te,Oe[1]),(!St||Ze[0]&4194304)&&ye!==(ye=Oe[22]("logs.method")+"")&&T(ge,ye),(!St||Ze[0]&4194304)&&Pe!==(Pe=Oe[22]("logs.allMethods")+"")&&T(_e,Pe),Ze[0]&4&&Cn(He,Oe[2]),(!St||Ze[0]&4194304)&&We!==(We=Oe[22]("logs.status")+"")&&T(Ye,We),(!St||Ze[0]&4194304&&rt!==(rt=Oe[22]("logs.statusPlaceholder")))&&c(Je,"placeholder",rt),Ze[0]&8&&Je.value!==Oe[3]&&ne(Je,Oe[3]),(!St||Ze[0]&4194304)&&ot!==(ot=Oe[22]("logs.result")+"")&&T(Ge,ot),(!St||Ze[0]&4194304)&&Ke!==(Ke=Oe[22]("logs.allResults")+"")&&T(ve,Ke),(!St||Ze[0]&4194304)&&Ct!==(Ct=Oe[22]("logs.success")+"")&&T($e,Ct),(!St||Ze[0]&4194304)&&At!==(At=Oe[22]("logs.failed")+"")&&T(it,At),Ze[0]&16&&Cn(Ve,Oe[4]),Ze[0]&1048576&&(xe.checked=Oe[20]),(!St||Ze[0]&4194304)&&st!==(st=Oe[22]("logs.advancedFilters")+"")&&T(jt,st),(!St||Ze[0]&4194304)&&os!==(os=Oe[22]("logs.requestTypeFilter")+"")&&T(Mn,os),(!St||Ze[0]&4194304)&&Dn!==(Dn=Oe[22]("logs.requestType_all")+"")&&T(cn,Dn),(!St||Ze[0]&4194304)&&Sn!==(Sn=Oe[22]("logs.requestType_final")+"")&&T(Pn,Sn),(!St||Ze[0]&4194304)&&rs!==(rs=Oe[22]("logs.requestType_retry")+"")&&T(Ht,rs),(!St||Ze[0]&4194304)&&An!==(An=Oe[22]("logs.requestType_recovery")+"")&&T(Fn,An),Ze[0]&32&&Cn(zt,Oe[5]),(!St||Ze[0]&4194304)&&bn!==(bn=Oe[22]("logs.timeRange")+"")&&T($n,bn),(!St||Ze[0]&4194304)&&es!==(es=Oe[22]("logs.allTime")+"")&&T(It,es),(!St||Ze[0]&4194304)&&Vn!==(Vn=Oe[22]("logs.recentTime")+"")&&T(ys,Vn),(!St||Ze[0]&4194304)&&on!==(on=Oe[22]("logs.customTime")+"")&&T(Qt,on),Ze[0]&256&&Cn(Yt,Oe[8]),Oe[8]==="recent"?fs?fs.p(Oe,Ze):(fs=jh(Oe),fs.c(),fs.m(Fe,Hn)):fs&&(fs.d(1),fs=null),Oe[8]==="custom"?hs?hs.p(Oe,Ze):(hs=zh(Oe),hs.c(),hs.m(Fe,ts)):hs&&(hs.d(1),hs=null),(!St||Ze[0]&4194304)&&fn!==(fn=Oe[22]("logs.sortBy")+"")&&T(Nn,fn),(!St||Ze[0]&4194304)&&ns!==(ns=Oe[22]("logs.sortByTimestamp")+"")&&T(us,ns),(!St||Ze[0]&4194304)&&en!==(en=Oe[22]("logs.sortByDuration")+"")&&T(Bt,en),(!St||Ze[0]&4194304)&&kt!==(kt=Oe[22]("logs.sortByStatus")+"")&&T(ce,kt),Ze[0]&64&&Cn(Kt,Oe[6]),(!St||Ze[0]&4194304)&&Ce!==(Ce=Oe[22]("logs.sortOrder")+"")&&T(ss,Ce),(!St||Ze[0]&4194304)&&zs!==(zs=Oe[22]("logs.desc")+"")&&T(gi,zs),(!St||Ze[0]&4194304)&&mi!==(mi=Oe[22]("logs.asc")+"")&&T(In,mi),Ze[0]&128&&Cn(qn,Oe[7]),Fl===(Fl=Ea(Oe))&&Rs?Rs.p(Oe,Ze):(Rs.d(1),Rs=Fl(Oe),Rs&&(Rs.c(),Rs.m(e,null))),Oe[18]&&Oe[17]?Bn?(Bn.p(Oe,Ze),Ze[0]&393216&&ze(Bn,1)):(Bn=Vh(Oe),Bn.c(),ze(Bn,1),Bn.m(et.parentNode,et)):Bn&&(ms(),Ue(Bn,1,1,()=>{Bn=null}),bs())},i(Oe){St||(ze(Bn),St=!0)},o(Oe){Ue(Bn),St=!1},d(Oe){Oe&&(H(e),H(qe),H(et)),Os.d(),cs&&cs.d(),fs&&fs.d(),hs&&hs.d(),Rs.d(),Bn&&Bn.d(Oe),Uo=!1,ht(ka)}}}let oi=50;function Wh(t){return new Date(t).toLocaleString()}function qh(t){return t<1e3?\`\${t}ms\`:\`\${(t/1e3).toFixed(2)}s\`}function Gh(t){return t<300?"badge-success":t<400?"badge-info":t<500?"badge-warning":"badge-error"}function Xh(t){return t==="final"?"badge-success":t==="retry"?"badge-warning":t==="recovery"?"badge-info":"badge-ghost"}function y5(t,e,n){let s,i;Zt(t,xt,ge=>n(22,i=ge));let l=1,o="",a="",u="",f,h="",p="timestamp",g="desc",m="recent",b=1,_="",y="",k=[],w=0,S=0,P=!0,M=null,x=null,A=!1,O=!1,C=null,R="",L="",D=!1;async function z(){try{n(15,P=!0),n(16,M=null);const ge={page:l,limit:oi,sortBy:p,sortOrder:g};o.trim()&&(ge.searchTerm=o.trim()),a&&(ge.method=a),u&&(ge.status=parseInt(u)),f!==void 0&&(ge.success=f),h&&(ge.requestType=h),m==="recent"?(ge.endTime=Date.now(),ge.startTime=Date.now()-b*60*60*1e3):m==="custom"&&(_&&(ge.startTime=new Date(_).getTime()),y&&(ge.endTime=new Date(y).getTime()));const be=await Tv(ge);n(12,k=be.data),n(13,w=be.total),n(14,S=be.totalPages)}catch(ge){n(16,M=ge.message)}finally{n(15,P=!1)}}async function B(ge){try{const be={};o.trim()&&(be.searchTerm=o.trim()),a&&(be.method=a),u&&(be.status=parseInt(u)),f!==void 0&&(be.success=f),h&&(be.requestType=h),m==="recent"?(be.endTime=Date.now(),be.startTime=Date.now()-b*60*60*1e3):m==="custom"&&(_&&(be.startTime=new Date(_).getTime()),y&&(be.endTime=new Date(y).getTime()));const He=await Mv(be,ge),Te=URL.createObjectURL(He),Pe=document.createElement("a");Pe.href=Te,Pe.download=\`access-logs-\${Date.now()}.\${ge}\`,Pe.click(),URL.revokeObjectURL(Te)}catch(be){alert(\`Export failed: \${be.message}\`)}}function U(){O?(C&&(C.close(),C=null),n(19,O=!1)):(C=Cv(1e3),C.onmessage=ge=>{const be=JSON.parse(ge.data);n(12,k=[be,...k]),k.length>oi&&n(12,k=k.slice(0,oi))},C.onerror=()=>{console.error("Stream connection error"),U()},n(19,O=!0))}function F(ge){n(17,x=ge),n(18,A=!0)}function V(ge){return ge?i(\`logs.requestType_\${ge}\`):"-"}function Y(){n(1,o=""),n(2,a=""),n(3,u=""),n(4,f=void 0),n(5,h=""),n(8,m="recent"),n(9,b=1),n(10,_=""),n(11,y=""),n(6,p="timestamp"),n(7,g="desc"),n(0,l=1)}function j(){localStorage.setItem("logsAdvancedFiltersExpanded",String(D))}ls(()=>{const ge=localStorage.getItem("logsAdvancedFiltersExpanded");ge!==null&&n(20,D=ge==="true"),z(),U()}),Ai(()=>{C&&C.close()});const q=()=>B("json"),Q=()=>B("csv");function X(){o=this.value,n(1,o)}function re(){a=Is(this),n(2,a)}function K(){u=this.value,n(3,u)}function W(){f=Is(this),n(4,f)}function G(){D=this.checked,n(20,D)}function J(){h=Is(this),n(5,h)}function le(){m=Is(this),n(8,m)}function se(){b=yt(this.value),n(9,b)}function N(){_=this.value,n(10,_)}function te(){y=this.value,n(11,y)}function Z(){p=Is(this),n(6,p)}function oe(){g=Is(this),n(7,g)}const Se=ge=>F(ge),me=()=>n(0,l=l-1),Ee=()=>n(0,l=l+1),ye=()=>{n(18,A=!1),n(17,x=null)};return t.$$.update=()=>{if(t.$$.dirty[0]&1022&&n(21,s=[o.trim(),a,u,f!==void 0,h,m!=="all"&&m!=="recent"||b!==1,p!=="timestamp"||g!=="desc"].filter(Boolean).length),t.$$.dirty[0]&536871934){const ge=JSON.stringify({limit:oi,searchTerm:o,method:a,statusFilter:u,successFilter:f,requestTypeFilter:h,sortBy:p,sortOrder:g,timeRangeType:m,recentHours:b});R&&ge!==R&&n(0,l=1),n(29,R=ge)}if(t.$$.dirty[0]&1073745152){const ge=JSON.stringify({customStartTime:_,customEndTime:y});m==="custom"&&L&&ge!==L&&n(0,l=1),n(30,L=ge)}t.$$.dirty[0]&4095&&z()},[l,o,a,u,f,h,p,g,m,b,_,y,k,w,S,P,M,x,A,O,D,s,i,B,U,F,V,Y,j,R,L,q,Q,X,re,K,W,G,J,le,se,N,te,Z,oe,Se,me,Ee,ye]}class w5 extends Gt{constructor(e){super(),qt(this,e,y5,v5,Nt,{},null,[-1,-1])}}async function k5(t){return yn.post("/auth/login",{token:t})}function Yh(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[2]),c(n,"class","label-text-alt text-error"),c(e,"class","label")},m(i,l){I(i,e,l),r(e,n),r(n,s)},p(i,l){l&4&&T(s,i[2])},d(i){i&&H(e)}}}function S5(t){let e,n,s,i,l,o,a,u,f=t[3]("login.title")+"",h,p,g,m=t[3]("login.subtitle")+"",b,_,y,k,w,S=t[3]("login.token")+"",P,M,x,A,O,C,R,L,D=(t[1]?t[3]("login.loggingIn"):t[3]("login.submit"))+"",z,B,U,F,V,Y=t[2]&&Yh(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),l=pe("svg"),o=pe("path"),a=v(),u=d("h1"),h=E(f),p=v(),g=d("p"),b=E(m),_=v(),y=d("div"),k=d("label"),w=d("span"),P=E(S),M=v(),x=d("input"),O=v(),Y&&Y.c(),C=v(),R=d("div"),L=d("button"),z=E(D),B=v(),U=d("div"),U.textContent="Bungee Reverse Proxy",c(o,"stroke-linecap","round"),c(o,"stroke-linejoin","round"),c(o,"stroke-width","2"),c(o,"d","M13 10V3L4 14h7v7l9-11h-7z"),c(l,"xmlns","http://www.w3.org/2000/svg"),c(l,"class","h-16 w-16 text-primary mb-4"),c(l,"fill","none"),c(l,"viewBox","0 0 24 24"),c(l,"stroke","currentColor"),c(u,"class","text-3xl font-bold text-center"),c(g,"class","text-sm text-base-content/60 text-center mt-2"),c(i,"class","flex flex-col items-center mb-6"),c(w,"class","label-text"),c(k,"class","label"),c(k,"for","token-input"),c(x,"id","token-input"),c(x,"type","password"),c(x,"placeholder",A=t[3]("login.tokenPlaceholder")),c(x,"class","input input-bordered w-full"),x.disabled=t[1],c(x,"autocomplete","off"),ie(x,"input-error",!!t[2]),c(y,"class","form-control w-full"),c(L,"class","btn btn-primary"),L.disabled=t[1],ie(L,"loading",t[1]),c(R,"class","form-control mt-6"),c(U,"class","divider text-xs opacity-50 mt-6"),c(s,"class","card-body"),c(n,"class","card w-full max-w-md bg-base-100 shadow-2xl svelte-1qok2wg"),c(e,"class","min-h-screen bg-base-200 flex items-center justify-center p-4")},m(j,q){I(j,e,q),r(e,n),r(n,s),r(s,i),r(i,l),r(l,o),r(i,a),r(i,u),r(u,h),r(i,p),r(i,g),r(g,b),r(s,_),r(s,y),r(y,k),r(k,w),r(w,P),r(y,M),r(y,x),ne(x,t[0]),r(y,O),Y&&Y.m(y,null),r(s,C),r(s,R),r(R,L),r(L,z),r(s,B),r(s,U),F||(V=[ee(x,"input",t[6]),ee(x,"keypress",t[5]),ee(L,"click",t[4])],F=!0)},p(j,[q]){q&8&&f!==(f=j[3]("login.title")+"")&&T(h,f),q&8&&m!==(m=j[3]("login.subtitle")+"")&&T(b,m),q&8&&S!==(S=j[3]("login.token")+"")&&T(P,S),q&8&&A!==(A=j[3]("login.tokenPlaceholder"))&&c(x,"placeholder",A),q&2&&(x.disabled=j[1]),q&1&&x.value!==j[0]&&ne(x,j[0]),q&4&&ie(x,"input-error",!!j[2]),j[2]?Y?Y.p(j,q):(Y=Yh(j),Y.c(),Y.m(y,null)):Y&&(Y.d(1),Y=null),q&10&&D!==(D=(j[1]?j[3]("login.loggingIn"):j[3]("login.submit"))+"")&&T(z,D),q&2&&(L.disabled=j[1]),q&2&&ie(L,"loading",j[1])},i:Ae,o:Ae,d(j){j&&H(e),Y&&Y.d(),F=!1,ht(V)}}}function E5(t,e,n){let s;Zt(t,xt,h=>n(3,s=h));let i="",l=!1,o="";async function a(){if(!i.trim()){n(2,o=s("login.required"));return}n(1,l=!0),n(2,o="");try{const h=await k5(i);h.success?(tm(i),Et.show(s("login.success"),"success"),window.location.hash="#/"):n(2,o=h.error||s("login.unauthorized"))}catch(h){n(2,o=s("login.failed",{values:{error:h.message}}))}finally{n(1,l=!1)}}function u(h){h.key==="Enter"&&!l&&a()}function f(){i=this.value,n(0,i)}return[i,l,o,s,a,u,f]}class T5 extends Gt{constructor(e){super(),qt(this,e,E5,S5,Nt,{})}}function M5(t){let e,n,s=t[0]("notFound.title")+"",i,l,o,a=t[0]("notFound.message")+"",u,f,h,p=t[0]("notFound.goHome")+"",g;return{c(){e=d("div"),n=d("h1"),i=E(s),l=v(),o=d("p"),u=E(a),f=v(),h=d("a"),g=E(p),c(n,"class","text-6xl font-bold mb-4"),c(o,"class","text-2xl mb-8"),c(h,"href","/__ui/#/"),c(h,"class","btn btn-primary"),c(e,"class","flex flex-col items-center justify-center h-screen")},m(m,b){I(m,e,b),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u),r(e,f),r(e,h),r(h,g)},p(m,[b]){b&1&&s!==(s=m[0]("notFound.title")+"")&&T(i,s),b&1&&a!==(a=m[0]("notFound.message")+"")&&T(u,a),b&1&&p!==(p=m[0]("notFound.goHome")+"")&&T(g,p)},i:Ae,o:Ae,d(m){m&&H(e)}}}function C5(t,e,n){let s;return Zt(t,xt,i=>n(0,s=i)),[s]}class P5 extends Gt{constructor(e){super(),qt(this,e,C5,M5,Nt,{})}}function Jh(t){let e,n,s,i,l,o,a,u,f,h,p;function g(_,y){return _[2]==="success"?R5:_[2]==="error"?O5:_[2]==="warning"?x5:A5}let m=g(t),b=m(t);return{c(){e=d("div"),n=d("div"),s=d("div"),b.c(),i=v(),l=d("span"),o=E(t[1]),a=v(),u=d("button"),u.textContent="\u2715",c(u,"class","btn btn-sm btn-ghost"),c(n,"class",f="alert "+t[3]+" shadow-lg"),c(e,"class","toast toast-end toast-top z-50")},m(_,y){I(_,e,y),r(e,n),r(n,s),b.m(s,null),r(s,i),r(s,l),r(l,o),r(n,a),r(n,u),h||(p=ee(u,"click",t[4]),h=!0)},p(_,y){m!==(m=g(_))&&(b.d(1),b=m(_),b&&(b.c(),b.m(s,i))),y&2&&T(o,_[1]),y&8&&f!==(f="alert "+_[3]+" shadow-lg")&&c(n,"class",f)},d(_){_&&H(e),b.d(),h=!1,p()}}}function A5(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"class","stroke-current shrink-0 w-6 h-6")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function x5(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","stroke-current shrink-0 h-6 w-6"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function O5(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","stroke-current shrink-0 h-6 w-6"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function R5(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","stroke-current shrink-0 h-6 w-6"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function D5(t){let e,n=t[0]&&Jh(t);return{c(){n&&n.c(),e=Zn()},m(s,i){n&&n.m(s,i),I(s,e,i)},p(s,[i]){s[0]?n?n.p(s,i):(n=Jh(s),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Ae,o:Ae,d(s){s&&H(e),n&&n.d(s)}}}function L5(t,e,n){let s,{message:i}=e,{type:l="info"}=e,{duration:o=3e3}=e,{visible:a=!0}=e;const u=Dl();let f;ls(()=>(o>0&&(f=setTimeout(()=>{n(0,a=!1),u("close")},o)),()=>{f&&clearTimeout(f)}));function h(){n(0,a=!1),u("close"),f&&clearTimeout(f)}return t.$$set=p=>{"message"in p&&n(1,i=p.message),"type"in p&&n(2,l=p.type),"duration"in p&&n(5,o=p.duration),"visible"in p&&n(0,a=p.visible)},t.$$.update=()=>{t.$$.dirty&4&&n(3,s={success:"alert-success",error:"alert-error",warning:"alert-warning",info:"alert-info"}[l])},[a,i,l,s,h,o]}class H5 extends Gt{constructor(e){super(),qt(this,e,L5,D5,Nt,{message:1,type:2,duration:5,visible:0})}}function Kh(t,e,n){const s=t.slice();return s[3]=e[n],s}function Zh(t,e){let n,s,i;function l(){return e[2](e[3])}return s=new H5({props:{message:e[3].message,type:e[3].type,duration:e[3].duration}}),s.$on("close",l),{key:t,first:null,c(){n=Zn(),_t(s.$$.fragment),this.first=n},m(o,a){I(o,n,a),pt(s,o,a),i=!0},p(o,a){e=o;const u={};a&1&&(u.message=e[3].message),a&1&&(u.type=e[3].type),a&1&&(u.duration=e[3].duration),s.$set(u)},i(o){i||(ze(s.$$.fragment,o),i=!0)},o(o){Ue(s.$$.fragment,o),i=!1},d(o){o&&H(n),gt(s,o)}}}function I5(t){let e=[],n=new Map,s,i,l=tt(t[0]);const o=a=>a[3].id;for(let a=0;a<l.length;a+=1){let u=Kh(t,l,a),f=o(u);n.set(f,e[a]=Zh(f,u))}return{c(){for(let a=0;a<e.length;a+=1)e[a].c();s=Zn()},m(a,u){for(let f=0;f<e.length;f+=1)e[f]&&e[f].m(a,u);I(a,s,u),i=!0},p(a,[u]){u&3&&(l=tt(a[0]),ms(),e=Nr(e,u,o,1,a,l,n,s.parentNode,od,Zh,s,Kh),bs())},i(a){if(!i){for(let u=0;u<l.length;u+=1)ze(e[u]);i=!0}},o(a){for(let u=0;u<e.length;u+=1)Ue(e[u]);i=!1},d(a){a&&H(s);for(let u=0;u<e.length;u+=1)e[u].d(a)}}}function B5(t,e,n){let s;Zt(t,Et,o=>n(0,s=o));function i(o){Et.remove(o)}return[s,i,o=>i(o.id)]}class F5 extends Gt{constructor(e){super(),qt(this,e,B5,I5,Nt,{})}}function Qh(t,e,n){const s=t.slice();return s[11]=e[n],s}function N5(t){let e,n,s,i,l,o,a,u,f,h,p,g,m=t[0]("nav.dashboard")+"",b,_,y,k,w,S,P,M,x=t[0]("nav.routes")+"",A,O,C,R,L,D,z,B,U=t[0]("nav.logs")+"",F,V,Y,j,q,Q,X,re,K,W=t[0]("nav.configuration")+"",G,J,le,se,N,te,Z,oe,Se=zl.find(t[8])?.name+"",me,Ee,ye,ge,be,He,Te,Pe,_e,De=tt(zl),ke=[];for(let fe=0;fe<De.length;fe+=1)ke[fe]=$h(Qh(t,De,fe));let $=t[4]&&t[5]&&ed(t);const ae=[Y5,X5,G5,q5,W5,V5,U5,z5],ue=[];function de(fe,Be){return Be&2&&(He=null),fe[1]==="/login"?0:fe[1]==="/"?1:fe[1]==="/routes"?2:(He==null&&(He=!!fe[1].startsWith("/routes/edit/")),He?3:fe[1]==="/routes/new"?4:fe[1]==="/logs"?5:fe[1]==="/config"?6:7)}return Te=de(t,-1),Pe=ue[Te]=ae[Te](t),{c(){e=d("div"),n=d("div"),s=d("div"),s.innerHTML='<a href="/__ui/#/" class="flex items-center gap-2 px-4 py-2 hover:bg-base-200 rounded-lg transition-colors"><svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg> <div class="flex flex-col"><span class="text-xl font-bold">Bungee</span> <span class="text-xs text-base-content/60">Reverse Proxy</span></div></a>',i=v(),l=d("div"),o=d("ul"),a=d("li"),u=d("a"),f=pe("svg"),h=pe("path"),p=v(),g=d("span"),b=E(m),_=v(),y=d("li"),k=d("a"),w=pe("svg"),S=pe("path"),P=v(),M=d("span"),A=E(x),O=v(),C=d("li"),R=d("a"),L=pe("svg"),D=pe("path"),z=v(),B=d("span"),F=E(U),V=v(),Y=d("li"),j=d("a"),q=pe("svg"),Q=pe("path"),X=pe("path"),re=v(),K=d("span"),G=E(W),J=v(),le=d("div"),se=d("div"),N=pe("svg"),te=pe("path"),Z=v(),oe=d("span"),me=E(Se),Ee=v(),ye=d("ul");for(let fe=0;fe<ke.length;fe+=1)ke[fe].c();ge=v(),$&&$.c(),be=v(),Pe.c(),c(s,"class","flex-1"),c(h,"stroke-linecap","round"),c(h,"stroke-linejoin","round"),c(h,"stroke-width","2"),c(h,"d","M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"),c(f,"xmlns","http://www.w3.org/2000/svg"),c(f,"class","h-4 w-4"),c(f,"fill","none"),c(f,"viewBox","0 0 24 24"),c(f,"stroke","currentColor"),c(u,"href","/__ui/#/"),c(u,"class","flex items-center gap-2 svelte-1fgps4v"),ie(u,"active",t[1]==="/"),c(S,"stroke-linecap","round"),c(S,"stroke-linejoin","round"),c(S,"stroke-width","2"),c(S,"d","M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"),c(w,"xmlns","http://www.w3.org/2000/svg"),c(w,"class","h-4 w-4"),c(w,"fill","none"),c(w,"viewBox","0 0 24 24"),c(w,"stroke","currentColor"),c(k,"href","/__ui/#/routes"),c(k,"class","flex items-center gap-2 svelte-1fgps4v"),ie(k,"active",t[1].startsWith("/routes")),c(D,"stroke-linecap","round"),c(D,"stroke-linejoin","round"),c(D,"stroke-width","2"),c(D,"d","M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"),c(L,"xmlns","http://www.w3.org/2000/svg"),c(L,"class","h-4 w-4"),c(L,"fill","none"),c(L,"viewBox","0 0 24 24"),c(L,"stroke","currentColor"),c(R,"href","/__ui/#/logs"),c(R,"class","flex items-center gap-2 svelte-1fgps4v"),ie(R,"active",t[1]==="/logs"),c(Q,"stroke-linecap","round"),c(Q,"stroke-linejoin","round"),c(Q,"stroke-width","2"),c(Q,"d","M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"),c(X,"stroke-linecap","round"),c(X,"stroke-linejoin","round"),c(X,"stroke-width","2"),c(X,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),c(q,"xmlns","http://www.w3.org/2000/svg"),c(q,"class","h-4 w-4"),c(q,"fill","none"),c(q,"viewBox","0 0 24 24"),c(q,"stroke","currentColor"),c(j,"href","/__ui/#/config"),c(j,"class","flex items-center gap-2 svelte-1fgps4v"),ie(j,"active",t[1]==="/config"),c(o,"class","menu menu-horizontal px-1 gap-1"),c(te,"stroke-linecap","round"),c(te,"stroke-linejoin","round"),c(te,"stroke-width","2"),c(te,"d","M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"),c(N,"xmlns","http://www.w3.org/2000/svg"),c(N,"class","h-4 w-4"),c(N,"fill","none"),c(N,"viewBox","0 0 24 24"),c(N,"stroke","currentColor"),c(oe,"class","text-xs"),c(se,"role","button"),c(se,"tabindex","0"),c(se,"class","btn btn-ghost btn-sm gap-1"),c(ye,"role","menu"),c(ye,"tabindex","0"),c(ye,"class","dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-32 mt-2 gap-1"),c(le,"class","dropdown dropdown-end mx-2"),c(l,"class","flex-none"),c(n,"class","navbar bg-base-100 shadow-lg sticky top-0 z-50"),c(e,"class","min-h-screen bg-base-200")},m(fe,Be){I(fe,e,Be),r(e,n),r(n,s),r(n,i),r(n,l),r(l,o),r(o,a),r(a,u),r(u,f),r(f,h),r(u,p),r(u,g),r(g,b),r(o,_),r(o,y),r(y,k),r(k,w),r(w,S),r(k,P),r(k,M),r(M,A),r(o,O),r(o,C),r(C,R),r(R,L),r(L,D),r(R,z),r(R,B),r(B,F),r(o,V),r(o,Y),r(Y,j),r(j,q),r(q,Q),r(q,X),r(j,re),r(j,K),r(K,G),r(l,J),r(l,le),r(le,se),r(se,N),r(N,te),r(se,Z),r(se,oe),r(oe,me),r(le,Ee),r(le,ye);for(let Qe=0;Qe<ke.length;Qe+=1)ke[Qe]&&ke[Qe].m(ye,null);r(l,ge),$&&$.m(l,null),r(e,be),ue[Te].m(e,null),_e=!0},p(fe,Be){if((!_e||Be&1)&&m!==(m=fe[0]("nav.dashboard")+"")&&T(b,m),(!_e||Be&2)&&ie(u,"active",fe[1]==="/"),(!_e||Be&1)&&x!==(x=fe[0]("nav.routes")+"")&&T(A,x),(!_e||Be&2)&&ie(k,"active",fe[1].startsWith("/routes")),(!_e||Be&1)&&U!==(U=fe[0]("nav.logs")+"")&&T(F,U),(!_e||Be&2)&&ie(R,"active",fe[1]==="/logs"),(!_e||Be&1)&&W!==(W=fe[0]("nav.configuration")+"")&&T(G,W),(!_e||Be&2)&&ie(j,"active",fe[1]==="/config"),(!_e||Be&8)&&Se!==(Se=zl.find(fe[8])?.name+"")&&T(me,Se),Be&72){De=tt(zl);let We;for(We=0;We<De.length;We+=1){const Ye=Qh(fe,De,We);ke[We]?ke[We].p(Ye,Be):(ke[We]=$h(Ye),ke[We].c(),ke[We].m(ye,null))}for(;We<ke.length;We+=1)ke[We].d(1);ke.length=De.length}fe[4]&&fe[5]?$?$.p(fe,Be):($=ed(fe),$.c(),$.m(l,null)):$&&($.d(1),$=null);let Qe=Te;Te=de(fe,Be),Te===Qe?ue[Te].p(fe,Be):(ms(),Ue(ue[Qe],1,1,()=>{ue[Qe]=null}),bs(),Pe=ue[Te],Pe?Pe.p(fe,Be):(Pe=ue[Te]=ae[Te](fe),Pe.c()),ze(Pe,1),Pe.m(e,null))},i(fe){_e||(ze(Pe),_e=!0)},o(fe){Ue(Pe),_e=!1},d(fe){fe&&H(e),Tn(ke,fe),$&&$.d(),ue[Te].d()}}}function j5(t){let e;return{c(){e=d("div"),e.innerHTML='<div class="flex flex-col items-center gap-4"><span class="loading loading-spinner loading-lg"></span> <p class="text-base-content/60">Loading...</p></div>',c(e,"class","min-h-screen bg-base-200 flex items-center justify-center")},m(n,s){I(n,e,s)},p:Ae,i:Ae,o:Ae,d(n){n&&H(e)}}}function $h(t){let e,n,s,i,l;function o(){return t[9](t[11])}return{c(){e=d("li"),n=d("button"),n.textContent=\`\${t[11].name}\`,s=v(),c(n,"class","svelte-1fgps4v"),ie(n,"active",t[3]===t[11].code)},m(a,u){I(a,e,u),r(e,n),r(e,s),i||(l=ee(n,"click",o),i=!0)},p(a,u){t=a,u&8&&ie(n,"active",t[3]===t[11].code)},d(a){a&&H(e),i=!1,l()}}}function ed(t){let e,n,s,i,l,o,a=t[0]("login.logout")+"",u,f,h;return{c(){e=d("div"),n=d("button"),s=pe("svg"),i=pe("path"),l=v(),o=d("span"),u=E(a),c(i,"stroke-linecap","round"),c(i,"stroke-linejoin","round"),c(i,"stroke-width","2"),c(i,"d","M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"),c(s,"xmlns","http://www.w3.org/2000/svg"),c(s,"class","h-4 w-4"),c(s,"fill","none"),c(s,"viewBox","0 0 24 24"),c(s,"stroke","currentColor"),c(o,"class","text-xs hidden md:inline"),c(n,"class","btn btn-ghost btn-sm gap-1"),c(e,"class","mx-2")},m(p,g){I(p,e,g),r(e,n),r(n,s),r(s,i),r(n,l),r(n,o),r(o,u),f||(h=ee(n,"click",t[7]),f=!0)},p(p,g){g&1&&a!==(a=p[0]("login.logout")+"")&&T(u,a)},d(p){p&&H(e),f=!1,h()}}}function z5(t){let e,n;return e=new P5({}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p:Ae,i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function U5(t){let e,n;return e=new Kv({}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p:Ae,i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function V5(t){let e,n;return e=new w5({}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p:Ae,i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function W5(t){let e,n;return e=new Zp({props:{params:{}}}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p:Ae,i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function q5(t){let e,n;return e=new Zp({props:{params:{path:t[1].replace("/routes/edit/","")}}}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p(s,i){const l={};i&2&&(l.params={path:s[1].replace("/routes/edit/","")}),e.$set(l)},i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function G5(t){let e,n;return e=new by({}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p:Ae,i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function X5(t){let e,n;return e=new yv({}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p:Ae,i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function Y5(t){let e,n;return e=new T5({}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p:Ae,i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function J5(t){let e,n,s,i,l;const o=[j5,N5],a=[];function u(f,h){return f[2]?0:1}return e=u(t),n=a[e]=o[e](t),i=new F5({}),{c(){n.c(),s=v(),_t(i.$$.fragment)},m(f,h){a[e].m(f,h),I(f,s,h),pt(i,f,h),l=!0},p(f,[h]){let p=e;e=u(f),e===p?a[e].p(f,h):(ms(),Ue(a[p],1,1,()=>{a[p]=null}),bs(),n=a[e],n?n.p(f,h):(n=a[e]=o[e](f),n.c()),ze(n,1),n.m(s.parentNode,s))},i(f){l||(ze(n),ze(i.$$.fragment,f),l=!0)},o(f){Ue(n),Ue(i.$$.fragment,f),l=!1},d(f){f&&H(s),a[e].d(f),gt(i,f)}}}function K5(t,e,n){let s,i,l,o,a,u;Zt(t,xt,m=>n(0,s=m)),Zt(t,hg,m=>n(1,i=m)),Zt(t,ao,m=>n(2,l=m)),Zt(t,di,m=>n(3,o=m)),Zt(t,Va,m=>n(4,a=m)),Zt(t,bo,m=>n(5,u=m));function f(m){Z0(m)}ls(async()=>{try{const b=(await qr()).auth?.enabled||!1;if(Va.set(b),b){const _=Bd();bo.set(!!_),!_&&i!=="/login"&&(window.location.hash="#/login")}}catch(m){console.error("Failed to check auth status:",m)}});function h(){confirm(s("login.logoutConfirm"))&&(Id(),window.location.hash="#/login")}return[s,i,l,o,a,u,f,h,m=>m.code===o,m=>f(m.code)]}class Z5 extends Gt{constructor(e){super(),qt(this,e,K5,J5,Nt,{})}}new Z5({target:document.getElementById("app")})});export default Q5();
21276
+ */class ko{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,s,n){const o=e.listeners[n],r=e.duration;o.forEach(a=>a({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(s-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=_s.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var rt=new ko;const yi="transparent",So={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=ci(i||yi),n=s.valid&&ci(t||yi);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class wo{constructor(t,e,s,n){const o=e[s];n=ee([t.to,n,o,t.from]);const r=ee([t.from,o,n]);this._active=!0,this._fn=t.fn||So[t.type||typeof r],this._easing=$t[t.easing]||$t.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,r=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=ee([t.to,e,n,t.from]),this._from=ee([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||e<s),!this._active){this._target[n]=a,this._notify(!0);return}if(e<0){this._target[n]=o;return}l=e/s%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n<s.length;n++)s[n][e]()}}class Ts{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!A(t))return;const e=Object.keys(W.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const o=t[n];if(!A(o))return;const r={};for(const a of e)r[a]=o[a];(H(o.properties)&&o.properties||[n]).forEach(a=>{(a===n||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,e){const s=e.options,n=Po(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&Co(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const u=s.get(c);if(d)if(u&&d.active()){d.update(u,h,a);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new wo(u,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return rt.add(this._chart,s),!0}}function Co(i,t){const e=[],s=Object.keys(t);for(let n=0;n<s.length;n++){const o=i[s[n]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function Po(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function vi(i,t){const e=i&&i.options||{},s=e.reverse,n=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:s?o:n,end:s?n:o}}function Do(i,t,e){if(e===!1)return!1;const s=vi(i,e),n=vi(t,e);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}function Oo(i){let t,e,s,n;return A(i)?(t=i.top,e=i.right,s=i.bottom,n=i.left):t=e=s=n=i,{top:t,right:e,bottom:s,left:n,disabled:i===!1}}function Rs(i,t){const e=[],s=i._getSortedDatasetMetas(t);let n,o;for(n=0,o=s.length;n<o;++n)e.push(s[n].index);return e}function Mi(i,t,e,s={}){const n=i.keys,o=s.mode==="single";let r,a,l,c;if(t===null)return;let h=!1;for(r=0,a=n.length;r<a;++r){if(l=+n[r],l===e){if(h=!0,s.all)continue;break}c=i.values[l],J(c)&&(o||t===0||nt(t)===nt(c))&&(t+=c)}return!h&&!s.all?0:t}function Ao(i,t){const{iScale:e,vScale:s}=t,n=e.axis==="x"?"x":"y",o=s.axis==="x"?"x":"y",r=Object.keys(i),a=new Array(r.length);let l,c,h;for(l=0,c=r.length;l<c;++l)h=r[l],a[l]={[n]:h,[o]:i[h]};return a}function Ce(i,t){const e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function To(i,t,e){return\`\${i.id}.\${t.id}.\${e.stack||e.type}\`}function Ro(i){const{min:t,max:e,minDefined:s,maxDefined:n}=i.getUserBounds();return{min:s?t:Number.NEGATIVE_INFINITY,max:n?e:Number.POSITIVE_INFINITY}}function Lo(i,t,e){const s=i[t]||(i[t]={});return s[e]||(s[e]={})}function ki(i,t,e,s){for(const n of t.getMatchingVisibleMetas(s).reverse()){const o=i[n.index];if(e&&o>0||!e&&o<0)return n.index}return null}function Si(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,c=r.axis,h=To(o,r,s),d=t.length;let u;for(let f=0;f<d;++f){const p=t[f],{[l]:g,[c]:m}=p,b=p._stacks||(p._stacks={});u=b[c]=Lo(n,h,g),u[a]=m,u._top=ki(u,r,!0,s.type),u._bottom=ki(u,r,!1,s.type);const _=u._visualValues||(u._visualValues={});_[a]=m}}function Pe(i,t){const e=i.scales;return Object.keys(e).filter(s=>e[s].axis===t).shift()}function Io(i,t){return St(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Eo(i,t,e){return St(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Et(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}const De=i=>i==="reset"||i==="none",wi=(i,t)=>t?i:Object.assign({},i),zo=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:Rs(e,!0),values:null};class ve{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ce(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Et(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,u,f,p)=>d==="x"?u:d==="r"?p:f,o=e.xAxisID=P(s.xAxisID,Pe(t,"x")),r=e.yAxisID=P(s.yAxisID,Pe(t,"y")),a=e.rAxisID=P(s.rAxisID,Pe(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,r,a),h=e.vAxisID=n(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ri(this._data,this),t._stacked&&Et(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(A(e)){const n=this._cachedMeta;this._data=Ao(e,n)}else if(s!==e){if(s){ri(s,this);const n=this._cachedMeta;Et(n),n._parsed=[]}e&&Object.isExtensible(e)&&gn(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Ce(e.vScale,e),e.stack!==s.stack&&(n=!0,Et(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&(Si(this,e._parsed),e._stacked=Ce(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:r}=s,a=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,u;if(this._parsing===!1)s._parsed=n,s._sorted=!0,u=n;else{H(n[t])?u=this.parseArrayData(s,n,t,e):A(n[t])?u=this.parseObjectData(s,n,t,e):u=this.parsePrimitiveData(s,n,t,e);const f=()=>d[a]===null||c&&d[a]<c[a];for(h=0;h<e;++h)s._parsed[h+t]=d=u[h],l&&(f()&&(l=!1),c=d);s._sorted=l}r&&Si(this,u)}parsePrimitiveData(t,e,s,n){const{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),h=o===r,d=new Array(n);let u,f,p;for(u=0,f=n;u<f;++u)p=u+s,d[u]={[a]:h||o.parse(c[p],p),[l]:r.parse(e[p],p)};return d}parseArrayData(t,e,s,n){const{xScale:o,yScale:r}=t,a=new Array(n);let l,c,h,d;for(l=0,c=n;l<c;++l)h=l+s,d=e[h],a[l]={x:o.parse(d[0],h),y:r.parse(d[1],h)};return a}parseObjectData(t,e,s,n){const{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(n);let h,d,u,f;for(h=0,d=n;h<d;++h)u=h+s,f=e[u],c[h]={x:o.parse(Mt(f,a),u),y:r.parse(Mt(f,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,s){const n=this.chart,o=this._cachedMeta,r=e[t.axis],a={keys:Rs(n,!0),values:e._stacks[t.axis]._visualValues};return Mi(a,r,o.index,{mode:s})}updateRangeFromParsed(t,e,s,n){const o=s[e.axis];let r=o===null?NaN:o;const a=n&&s._stacks[e.axis];n&&a&&(n.values=a,r=Mi(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){const s=this._cachedMeta,n=s._parsed,o=s._sorted&&t===s.iScale,r=n.length,a=this._getOtherScale(t),l=zo(e,s,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=Ro(a);let u,f;function p(){f=n[u];const g=f[a.axis];return!J(f[t.axis])||h>g||d<g}for(u=0;u<r&&!(!p()&&(this.updateRangeFromParsed(c,t,f,l),o));++u);if(o){for(u=r-1;u>=0;--u)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,r;for(n=0,o=e.length;n<o;++n)r=e[n][t.axis],J(r)&&s.push(r);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,s=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:s?""+s.getLabelForValue(o[s.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=Oo(P(this.options.clip,Do(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,s=this._cachedMeta,n=s.data||[],o=e.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||n.length-a,c=this.options.drawActiveElementsOnTop;let h;for(s.dataset&&s.dataset.draw(t,o,a,l),h=a;h<a+l;++h){const d=n[h];d.hidden||(d.active&&c?r.push(d):d.draw(t,o))}for(h=0;h<r.length;++h)r[h].draw(t,o)}getStyle(t,e){const s=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,e,s){const n=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];o=r.$context||(r.$context=Eo(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Io(this.chart.getContext(),this.index)),o.dataset=n,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=s,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",s){const n=e==="active",o=this._cachedDataOpts,r=t+"-"+e,a=o[r],l=this.enableOptionSharing&&Xt(s);if(a)return wi(a,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),d=n?[\`\${t}Hover\`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),h),f=Object.keys(W.elements[t]),p=()=>this.getContext(s,n,e),g=c.resolveNamedOptions(u,f,p,d);return g.$shared&&(g.$shared=l,o[r]=Object.freeze(wi(g,l))),g}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,r=\`animation-\${e}\`,a=o[r];if(a)return a;let l;if(n.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,s,e))}const c=new Ts(n,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||De(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),r=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:r}}updateElement(t,e,s,n){De(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!De(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const n=s.length,o=e.length,r=Math.min(o,n);r&&this.parse(0,r),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,e,s=!0){const n=this._cachedMeta,o=n.data,r=t+e;let a;const l=c=>{for(c.length+=e,a=c.length-1;a>=r;a--)c[a]=c[a-e]};for(l(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(n._parsed),this.parse(t,e),s&&this.updateElements(o,t,e,"reset")}updateElements(t,e,s,n){}_removeElements(t,e){const s=this._cachedMeta;if(this._parsing){const n=s._parsed.splice(t,e);s._stacked&&Et(s,n)}s.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,s,n]=t;this[e](s,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Fo(i,t){if(!i._cache.$bar){const e=i.getMatchingVisibleMetas(t);let s=[];for(let n=0,o=e.length;n<o;n++)s=s.concat(e[n].controller.getAllParsedValues(i));i._cache.$bar=bs(s.sort((n,o)=>n-o))}return i._cache.$bar}function Bo(i){const t=i.iScale,e=Fo(t,i.type);let s=t._length,n,o,r,a;const l=()=>{r===32767||r===-32768||(Xt(a)&&(s=Math.min(s,Math.abs(r-a)||s)),a=r)};for(n=0,o=e.length;n<o;++n)r=t.getPixelForValue(e[n]),l();for(a=void 0,n=0,o=t.ticks.length;n<o;++n)r=t.getPixelForTick(n),l();return s}function Wo(i,t,e,s){const n=e.barThickness;let o,r;return T(n)?(o=t.min*e.categoryPercentage,r=e.barPercentage):(o=n*s,r=1),{chunk:o/s,ratio:r,start:t.pixels[i]-o/2}}function Ho(i,t,e,s){const n=t.pixels,o=n[i];let r=i>0?n[i-1]:null,a=i<n.length-1?n[i+1]:null;const l=e.categoryPercentage;r===null&&(r=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-r);const c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/s,ratio:e.barPercentage,start:c}}function No(i,t,e,s){const n=e.parse(i[0],s),o=e.parse(i[1],s),r=Math.min(n,o),a=Math.max(n,o);let l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:r,max:a}}function Ls(i,t,e,s){return H(i)?No(i,t,e,s):t[e.axis]=e.parse(i,s),t}function Ci(i,t,e,s){const n=i.iScale,o=i.vScale,r=n.getLabels(),a=n===o,l=[];let c,h,d,u;for(c=e,h=e+s;c<h;++c)u=t[c],d={},d[n.axis]=a||n.parse(r[c],c),l.push(Ls(u,d,o,c));return l}function Oe(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function Vo(i,t,e){return i!==0?nt(i):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function jo(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.base<i.y,e="bottom",s="top"),t?(n="end",o="start"):(n="start",o="end"),{start:e,end:s,reverse:t,top:n,bottom:o}}function $o(i,t,e,s){let n=t.borderSkipped;const o={};if(!n){i.borderSkipped=o;return}if(n===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:a,reverse:l,top:c,bottom:h}=jo(i);n==="middle"&&e&&(i.enableBorderRadius=!0,(e._top||0)===s?n=c:(e._bottom||0)===s?n=h:(o[Pi(h,r,a,l)]=!0,n=c)),o[Pi(n,r,a,l)]=!0,i.borderSkipped=o}function Pi(i,t,e,s){return s?(i=Yo(i,t,e),i=Di(i,e,t)):i=Di(i,t,e),i}function Yo(i,t,e){return i===t?e:i===e?t:i}function Di(i,t,e){return i==="start"?t:i==="end"?e:i}function Uo(i,{inflateAmount:t},e){i.inflateAmount=t==="auto"?e===1?.33:0:t}class Ua extends ve{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,s,n){return Ci(t,e,s,n)}parseArrayData(t,e,s,n){return Ci(t,e,s,n)}parseObjectData(t,e,s,n){const{iScale:o,vScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,h=r.axis==="x"?a:l,d=[];let u,f,p,g;for(u=s,f=s+n;u<f;++u)g=e[u],p={},p[o.axis]=o.parse(Mt(g,c),u),d.push(Ls(Mt(g,h),p,r,u));return d}updateRangeFromParsed(t,e,s,n){super.updateRangeFromParsed(t,e,s,n);const o=s._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:s,vScale:n}=e,o=this.getParsed(t),r=o._custom,a=Oe(r)?"["+r.start+", "+r.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+s.getLabelForValue(o[s.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,s,n){const o=n==="reset",{index:r,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,n);for(let f=e;f<e+s;f++){const p=this.getParsed(f),g=o||T(p[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,h),b=(p._stacks||{})[a.axis],_={horizontal:c,base:g.base,enableBorderRadius:!b||Oe(p._custom)||r===b._top||r===b._bottom,x:c?g.head:m.center,y:c?m.center:g.head,height:c?m.size:Math.abs(g.size),width:c?Math.abs(g.size):m.size};u&&(_.options=d||this.resolveDataElementOptions(f,t[f].active?"active":n));const y=_.options||t[f].options;$o(_,y,b,r),Uo(_,y,h.ratio),this.updateElement(t[f],f,_,n)}}_getStacks(t,e){const{iScale:s}=this._cachedMeta,n=s.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),o=s.options.stacked,r=[],a=this._cachedMeta.controller.getParsed(e),l=a&&a[s.axis],c=h=>{const d=h._parsed.find(f=>f[s.axis]===l),u=d&&d[h.vScale.axis];if(T(u)||isNaN(u))return!0};for(const h of n)if(!(e!==void 0&&c(h))&&((o===!1||r.indexOf(h.stack)===-1||o===void 0&&h.stack===void 0)&&r.push(h.stack),h.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(s=>t[s].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)t[P(this.chart.options.indexAxis==="x"?s.xAxisID:s.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,s){const n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,s=e.iScale,n=[];let o,r;for(o=0,r=e.data.length;o<r;++o)n.push(s.getPixelForValue(this.getParsed(o)[s.axis],o));const a=t.barThickness;return{min:a||Bo(e),pixels:n,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:s,index:n},options:{base:o,minBarLength:r}}=this,a=o||0,l=this.getParsed(t),c=l._custom,h=Oe(c);let d=l[e.axis],u=0,f=s?this.applyStack(e,l,s):d,p,g;f!==d&&(u=f-d,f=d),h&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&nt(d)!==nt(c.barEnd)&&(u=0),u+=d);const m=!T(o)&&!h?o:u;let b=e.getPixelForValue(m);if(this.chart.getDataVisibility(t)?p=e.getPixelForValue(u+f):p=b,g=p-b,Math.abs(g)<r){g=Vo(g,e,a)*r,d===a&&(b-=g/2);const _=e.getPixelForDecimal(0),y=e.getPixelForDecimal(1),v=Math.min(_,y),x=Math.max(_,y);b=Math.max(Math.min(b,x),v),p=b+g,s&&!h&&(l._stacks[e.axis]._visualValues[n]=e.getValueForPixel(p)-e.getValueForPixel(b))}if(b===e.getPixelForValue(a)){const _=nt(g)*e.getLineWidthForValue(a)/2;b+=_,g-=_}return{size:g,base:b,head:p,center:p+g/2}}_calculateBarIndexPixels(t,e){const s=e.scale,n=this.options,o=n.skipNull,r=P(n.maxBarThickness,1/0);let a,l;const c=this._getAxisCount();if(e.grouped){const h=o?this._getStackCount(t):e.stackCount,d=n.barThickness==="flex"?Ho(t,e,n,h*c):Wo(t,e,n,h*c),u=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,f=this._getAxis().indexOf(P(u,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+f;a=d.start+d.chunk*p+d.chunk/2,l=Math.min(r,d.chunk*d.ratio)}else a=s.getPixelForValue(this.getParsed(t)[s.axis],t),l=Math.min(r,e.min*e.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,s=t.data,n=s.length;let o=0;for(;o<n;++o)this.getParsed(o)[e.axis]!==null&&!s[o].hidden&&s[o].draw(this._ctx)}}function Xo(i,t,e){let s=1,n=1,o=0,r=0;if(t<F){const a=i,l=a+t,c=Math.cos(a),h=Math.sin(a),d=Math.cos(l),u=Math.sin(l),f=(y,v,x)=>Gt(y,a,l,!0)?1:Math.max(v,v*e,x,x*e),p=(y,v,x)=>Gt(y,a,l,!0)?-1:Math.min(v,v*e,x,x*e),g=f(0,c,d),m=f(N,h,u),b=p(L,c,d),_=p(L+N,h,u);s=(g-b)/2,n=(m-_)/2,o=-(g+b)/2,r=-(m+_)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:r}}class Xa extends ve{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:s,color:n}}=t.legend.options;return e.labels.map((o,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:n,lineWidth:l.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let o=l=>+s[l];if(A(s[t])){const{key:l="value"}=this._parsing;o=c=>+Mt(s[c],l)}let r,a;for(r=t,a=t+e;r<a;++r)n._parsed[r]=o(r)}}_getRotation(){return lt(this.options.rotation-90)}_getCircumference(){return lt(this.options.circumference)}_getRotationExtents(){let t=F,e=-F;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const n=this.chart.getDatasetMeta(s).controller,o=n._getRotation(),r=n._getCircumference();t=Math.min(t,o),e=Math.max(e,o+r)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:s}=e,n=this._cachedMeta,o=n.data,r=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(s.width,s.height)-r)/2,0),l=Math.min(qs(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:p,offsetY:g}=Xo(d,h,l),m=(s.width-r)/u,b=(s.height-r)/f,_=Math.max(Math.min(m,b)/2,0),y=us(this.options.radius,_),v=Math.max(y*l,0),x=(y-v)/this._getVisibleDatasetWeightTotal();this.offsetX=p*y,this.offsetY=g*y,n.total=this.calculateTotal(),this.outerRadius=y-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const s=this.options,n=this._cachedMeta,o=this._getCircumference();return e&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/F)}updateElements(t,e,s,n){const o=n==="reset",r=this.chart,a=r.chartArea,c=r.options.animation,h=(a.left+a.right)/2,d=(a.top+a.bottom)/2,u=o&&c.animateScale,f=u?0:this.innerRadius,p=u?0:this.outerRadius,{sharedOptions:g,includeOptions:m}=this._getSharedOptions(e,n);let b=this._getRotation(),_;for(_=0;_<e;++_)b+=this._circumference(_,o);for(_=e;_<e+s;++_){const y=this._circumference(_,o),v=t[_],x={x:h+this.offsetX,y:d+this.offsetY,startAngle:b,endAngle:b+y,circumference:y,outerRadius:p,innerRadius:f};m&&(x.options=g||this.resolveDataElementOptions(_,v.active?"active":n)),b+=y,this.updateElement(v,_,x,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let s=0,n;for(n=0;n<e.length;n++){const o=t._parsed[n];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(n)&&!e[n].hidden&&(s+=Math.abs(o))}return s}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?F*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=Ye(e._parsed[t],s.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const s=this.chart;let n,o,r,a,l;if(!t){for(n=0,o=s.data.datasets.length;n<o;++n)if(s.isDatasetVisible(n)){r=s.getDatasetMeta(n),t=r.data,a=r.controller;break}}if(!t)return 0;for(n=0,o=t.length;n<o;++n)l=a.resolveDataElementOptions(n),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let s=0,n=t.length;s<n;++s){const o=this.resolveDataElementOptions(s);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(e+=this._getRingWeight(s));return e}_getRingWeight(t){return Math.max(P(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Ka extends ve{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:s,data:n=[],_dataset:o}=e,r=this.chart._animationsDisabled;let{start:a,count:l}=bn(e,n,r);this._drawStart=a,this._drawCount=l,_n(e)&&(a=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=n;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!r,options:c},t),this.updateElements(n,a,l,t)}updateElements(t,e,s,n){const o=n==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,n),u=r.axis,f=a.axis,{spanGaps:p,segment:g}=this.options,m=Kt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||n==="none",_=e+s,y=t.length;let v=e>0&&this.getParsed(e-1);for(let x=0;x<y;++x){const k=t[x],S=b?k:{};if(x<e||x>=_){S.skip=!0;continue}const M=this.getParsed(x),w=T(M[f]),D=S[u]=r.getPixelForValue(M[u],x),C=S[f]=o||w?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,M,l):M[f],x);S.skip=isNaN(D)||isNaN(C)||w,S.stop=x>0&&Math.abs(M[u]-v[u])>m,g&&(S.parsed=M,S.raw=c.data[x]),d&&(S.options=h||this.resolveDataElementOptions(x,k.active?"active":n)),b||this.updateElement(k,x,S,n),v=M}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function bt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ti{static override(t){Object.assign(ti.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return bt()}parse(){return bt()}format(){return bt()}add(){return bt()}diff(){return bt()}startOf(){return bt()}endOf(){return bt()}}var Ko={_date:ti};function Go(i,t,e,s){const{controller:n,data:o,_sorted:r}=i,a=n._cachedMeta.iScale,l=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const c=a._reversePixels?un:yt;if(s){if(n._sharedOptions){const h=o[0],d=typeof h.getRange=="function"&&h.getRange(t);if(d){const u=c(o,t,e-d),f=c(o,t,e+d);return{lo:u.lo,hi:f.hi}}}}else{const h=c(o,t,e);if(l){const{vScale:d}=n._cachedMeta,{_parsed:u}=i,f=u.slice(0,h.lo+1).reverse().findIndex(g=>!T(g[d.axis]));h.lo-=Math.max(0,f);const p=u.slice(h.hi).findIndex(g=>!T(g[d.axis]));h.hi+=Math.max(0,p)}return h}}return{lo:0,hi:o.length-1}}function Me(i,t,e,s,n){const o=i.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:h}=o[a],{lo:d,hi:u}=Go(o[a],t,r,n);for(let f=d;f<=u;++f){const p=h[f];p.skip||s(p,c,f)}}}function qo(i){const t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(s,n){const o=t?Math.abs(s.x-n.x):0,r=e?Math.abs(s.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function Ae(i,t,e,s,n){const o=[];return!n&&!i.isPointInArea(t)||Me(i,e,t,function(a,l,c){!n&&!qt(a,i.chartArea,0)||a.inRange(t.x,t.y,s)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function Jo(i,t,e,s){let n=[];function o(r,a,l){const{startAngle:c,endAngle:h}=r.getProps(["startAngle","endAngle"],s),{angle:d}=ps(r,{x:t.x,y:t.y});Gt(d,c,h)&&n.push({element:r,datasetIndex:a,index:l})}return Me(i,e,t,o),n}function Qo(i,t,e,s,n,o){let r=[];const a=qo(e);let l=Number.POSITIVE_INFINITY;function c(h,d,u){const f=h.inRange(t.x,t.y,n);if(s&&!f)return;const p=h.getCenterPoint(n);if(!(!!o||i.isPointInArea(p))&&!f)return;const m=a(t,p);m<l?(r=[{element:h,datasetIndex:d,index:u}],l=m):m===l&&r.push({element:h,datasetIndex:d,index:u})}return Me(i,e,t,c),r}function Te(i,t,e,s,n,o){return!o&&!i.isPointInArea(t)?[]:e==="r"&&!s?Jo(i,t,e,n):Qo(i,t,e,s,n,o)}function Oi(i,t,e,s,n){const o=[],r=e==="x"?"inXRange":"inYRange";let a=!1;return Me(i,e,t,(l,c,h)=>{l[r]&&l[r](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,n))}),s&&!a?[]:o}var Zo={modes:{index(i,t,e,s){const n=_t(t,i),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?Ae(i,n,o,s,r):Te(i,n,o,!1,s,r),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){const n=_t(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;let a=e.intersect?Ae(i,n,o,s,r):Te(i,n,o,!1,s,r);if(a.length>0){const l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let h=0;h<c.length;++h)a.push({element:c[h],datasetIndex:l,index:h})}return a},point(i,t,e,s){const n=_t(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return Ae(i,n,o,s,r)},nearest(i,t,e,s){const n=_t(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return Te(i,n,o,e.intersect,s,r)},x(i,t,e,s){const n=_t(t,i);return Oi(i,n,"x",e.intersect,s)},y(i,t,e,s){const n=_t(t,i);return Oi(i,n,"y",e.intersect,s)}}};const Is=["left","top","right","bottom"];function zt(i,t){return i.filter(e=>e.pos===t)}function Ai(i,t){return i.filter(e=>Is.indexOf(e.pos)===-1&&e.box.axis===t)}function Ft(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function tr(i){const t=[];let e,s,n,o,r,a;for(e=0,s=(i||[]).length;e<s;++e)n=i[e],{position:o,options:{stack:r,stackWeight:a=1}}=n,t.push({index:e,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:r&&o+r,stackWeight:a});return t}function er(i){const t={};for(const e of i){const{stack:s,pos:n,stackWeight:o}=e;if(!s||!Is.includes(n))continue;const r=t[s]||(t[s]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function ir(i,t){const e=er(i),{vBoxMaxWidth:s,hBoxMaxHeight:n}=t;let o,r,a;for(o=0,r=i.length;o<r;++o){a=i[o];const{fullSize:l}=a.box,c=e[a.stack],h=c&&a.stackWeight/c.weight;a.horizontal?(a.width=h?h*s:l&&t.availableWidth,a.height=n):(a.width=s,a.height=h?h*n:l&&t.availableHeight)}return e}function sr(i){const t=tr(i),e=Ft(t.filter(c=>c.box.fullSize),!0),s=Ft(zt(t,"left"),!0),n=Ft(zt(t,"right")),o=Ft(zt(t,"top"),!0),r=Ft(zt(t,"bottom")),a=Ai(t,"x"),l=Ai(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(r).concat(a),chartArea:zt(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(r).concat(a)}}function Ti(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function Es(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function nr(i,t,e,s){const{pos:n,box:o}=e,r=i.maxPadding;if(!A(n)){e.size&&(i[n]-=e.size);const d=s[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[n]+=e.size}o.getPadding&&Es(r,o.getPadding());const a=Math.max(0,t.outerWidth-Ti(r,i,"left","right")),l=Math.max(0,t.outerHeight-Ti(r,i,"top","bottom")),c=a!==i.w,h=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function or(i){const t=i.maxPadding;function e(s){const n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function rr(i,t){const e=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return s(i?["left","right"]:["top","bottom"])}function Ht(i,t,e,s){const n=[];let o,r,a,l,c,h;for(o=0,r=i.length,c=0;o<r;++o){a=i[o],l=a.box,l.update(a.width||t.w,a.height||t.h,rr(a.horizontal,t));const{same:d,other:u}=nr(t,e,a,s);c|=d&&n.length,h=h||u,l.fullSize||n.push(a)}return c&&Ht(n,t,e,s)||h}function oe(i,t,e,s,n){i.top=e,i.left=t,i.right=t+s,i.bottom=e+n,i.width=s,i.height=n}function Ri(i,t,e,s){const n=e.padding;let{x:o,y:r}=t;for(const a of i){const l=a.box,c=s[a.stack]||{placed:0,weight:1},h=a.stackWeight/c.weight||1;if(a.horizontal){const d=t.w*h,u=c.size||l.height;Xt(c.start)&&(r=c.start),l.fullSize?oe(l,n.left,r,e.outerWidth-n.right-n.left,u):oe(l,t.left+c.placed,r,d,u),c.start=r,c.placed+=d,r=l.bottom}else{const d=t.h*h,u=c.size||l.width;Xt(c.start)&&(o=c.start),l.fullSize?oe(l,o,n.top,u,e.outerHeight-n.bottom-n.top):oe(l,o,t.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=r}var q={addBox(i,t){i.boxes||(i.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},i.boxes.push(t)},removeBox(i,t){const e=i.boxes?i.boxes.indexOf(t):-1;e!==-1&&i.boxes.splice(e,1)},configure(i,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(i,t,e,s){if(!i)return;const n=Q(i.options.layout.padding),o=Math.max(t-n.width,0),r=Math.max(e-n.height,0),a=sr(i.boxes),l=a.vertical,c=a.horizontal;R(i.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),u=Object.assign({},n);Es(u,Q(s));const f=Object.assign({maxPadding:u,w:o,h:r,x:n.left,y:n.top},n),p=ir(l.concat(c),d);Ht(a.fullSize,f,d,p),Ht(l,f,d,p),Ht(c,f,d,p)&&Ht(l,f,d,p),or(f),Ri(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,Ri(a.rightAndBottom,f,d,p),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},R(a.chartArea,g=>{const m=g.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class zs{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class ar extends zs{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const de="$chartjs",lr={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Li=i=>i===null||i==="";function cr(i,t){const e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[de]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Li(n)){const o=mi(i,"width");o!==void 0&&(i.width=o)}if(Li(s))if(i.style.height==="")i.height=i.width/(t||2);else{const o=mi(i,"height");o!==void 0&&(i.height=o)}return i}const Fs=ao?{passive:!0}:!1;function hr(i,t,e){i&&i.addEventListener(t,e,Fs)}function dr(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,Fs)}function ur(i,t){const e=lr[i.type]||i.type,{x:s,y:n}=_t(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function _e(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function fr(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||_e(a.addedNodes,s),r=r&&!_e(a.removedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function gr(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||_e(a.removedNodes,s),r=r&&!_e(a.addedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const Qt=new Map;let Ii=0;function Bs(){const i=window.devicePixelRatio;i!==Ii&&(Ii=i,Qt.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function pr(i,t){Qt.size||window.addEventListener("resize",Bs),Qt.set(i,t)}function mr(i){Qt.delete(i),Qt.size||window.removeEventListener("resize",Bs)}function br(i,t,e){const s=i.canvas,n=s&&Ze(s);if(!n)return;const o=xs((a,l)=>{const c=n.clientWidth;e(a,l),c<n.clientWidth&&e()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return r.observe(n),pr(i,o),r}function Re(i,t,e){e&&e.disconnect(),t==="resize"&&mr(i)}function _r(i,t,e){const s=i.canvas,n=xs(o=>{i.ctx!==null&&e(ur(o,i))},i);return hr(s,t,n),n}class xr extends zs{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(cr(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[de])return!1;const s=e[de].initial;["height","width"].forEach(o=>{const r=s[o];T(r)?e.removeAttribute(o):e.setAttribute(o,r)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[de],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:fr,detach:gr,resize:br}[e]||_r;n[e]=r(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:Re,detach:Re,resize:Re}[e]||dr)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return ro(t,e,s,n)}isAttached(t){const e=t&&Ze(t);return!!(e&&e.isConnected)}}function yr(i){return!Qe()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?ar:xr}class ct{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return Kt(this.x)&&Kt(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}function vr(i,t){const e=i.options.ticks,s=Mr(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?Sr(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>n)return wr(t,c,o,r/n),c;const h=kr(o,t,n);if(r>0){let d,u;const f=r>1?Math.round((l-a)/(r-1)):null;for(re(t,c,h,T(f)?0:a-f,a),d=0,u=r-1;d<u;d++)re(t,c,h,o[d],o[d+1]);return re(t,c,h,l,T(f)?t.length:l+f),c}return re(t,c,h),c}function Mr(i){const t=i.options.offset,e=i._tickSize(),s=i._length/e+(t?0:1),n=i._maxLength/e;return Math.floor(Math.min(s,n))}function kr(i,t,e){const s=Cr(i),n=t.length/e;if(!s)return Math.max(n,1);const o=on(s);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>n)return l}return Math.max(n,1)}function Sr(i){const t=[];let e,s;for(e=0,s=i.length;e<s;e++)i[e].major&&t.push(e);return t}function wr(i,t,e,s){let n=0,o=e[0],r;for(s=Math.ceil(s),r=0;r<i.length;r++)r===o&&(t.push(i[r]),n++,o=e[n*s])}function re(i,t,e,s,n){const o=P(s,0),r=Math.min(P(n,i.length),i.length);let a=0,l,c,h;for(e=Math.ceil(e),n&&(l=n-s,e=l/Math.floor(l/e)),h=o;h<0;)a++,h=Math.round(o+a*e);for(c=Math.max(o,0);c<r;c++)c===h&&(t.push(i[c]),a++,h=Math.round(o+a*e))}function Cr(i){const t=i.length;let e,s;if(t<2)return!1;for(s=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==s)return!1;return s}const Pr=i=>i==="left"?"right":i==="right"?"left":i,Ei=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,zi=(i,t)=>Math.min(t||i,i);function Fi(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;o<n;o+=s)e.push(i[Math.floor(o)]);return e}function Dr(i,t,e){const s=i.ticks.length,n=Math.min(t,s-1),o=i._startPixel,r=i._endPixel,a=1e-6;let l=i.getPixelForTick(n),c;if(!(e&&(s===1?c=Math.max(l-o,r-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(n-1))/2,l+=n<t?c:-c,l<o-a||l>r+a)))return l}function Or(i,t){R(i,e=>{const s=e.gc,n=s.length/2;let o;if(n>t){for(o=0;o<n;++o)delete e.data[s[o]];s.splice(0,n)}})}function Bt(i){return i.drawTicks?i.tickLength:0}function Bi(i,t){if(!i.display)return 0;const e=U(i.font,t),s=Q(i.padding);return(H(i.text)?i.text.length:1)*e.lineHeight+s.height}function Ar(i,t){return St(i,{scale:t,type:"scale"})}function Tr(i,t,e){return St(i,{tick:e,index:t,type:"tick"})}function Rr(i,t,e){let s=je(i);return(e&&t!=="right"||!e&&t==="right")&&(s=Pr(s)),s}function Lr(i,t,e,s){const{top:n,left:o,bottom:r,right:a,chart:l}=i,{chartArea:c,scales:h}=l;let d=0,u,f,p;const g=r-n,m=a-o;if(i.isHorizontal()){if(f=$(s,o,a),A(e)){const b=Object.keys(e)[0],_=e[b];p=h[b].getPixelForValue(_)+g-t}else e==="center"?p=(c.bottom+c.top)/2+g-t:p=Ei(i,e,t);u=a-o}else{if(A(e)){const b=Object.keys(e)[0],_=e[b];f=h[b].getPixelForValue(_)-m+t}else e==="center"?f=(c.left+c.right)/2-m+t:f=Ei(i,e,t);p=$(s,r,n),d=e==="left"?-N:N}return{titleX:f,titleY:p,maxWidth:u,rotation:d}}class Rt extends ct{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:s,_suggestedMax:n}=this;return t=et(t,Number.POSITIVE_INFINITY),e=et(e,Number.NEGATIVE_INFINITY),s=et(s,Number.POSITIVE_INFINITY),n=et(n,Number.NEGATIVE_INFINITY),{min:et(t,s),max:et(e,n),minDefined:J(t),maxDefined:J(e)}}getMinMax(t){let{min:e,max:s,minDefined:n,maxDefined:o}=this.getUserBounds(),r;if(n&&o)return{min:e,max:s};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,t),n||(e=Math.min(e,r.min)),o||(s=Math.max(s,r.max));return e=o&&e>s?s:e,s=n&&e>s?e:s,{min:et(e,et(s,e)),max:et(s,et(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){E(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:n,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Bn(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Fi(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=vr(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,s;this.isHorizontal()?(e=this.left,s=this.right):(e=this.top,s=this.bottom,t=!t),this._startPixel=e,this._endPixel=s,this._reversePixels=t,this._length=s-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){E(this.options.afterUpdate,[this])}beforeSetDimensions(){E(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){E(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),E(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){E(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s],o.label=E(e.callback,[o.value,s,t],this)}afterTickToLabelConversion(){E(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){E(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,s=zi(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,o=e.maxRotation;let r=n,a,l,c;if(!this._isVisible()||!e.display||n>=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Y(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/s:f/(s-1),d+6>a&&(a=f/(s-(t.offset?.5:1)),l=this.maxHeight-Bt(t.grid)-e.padding-Bi(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),r=cn(Math.min(Math.asin(Y((h.highest.height+6)/a,-1,1)),Math.asin(Y(l/c,-1,1))-Math.asin(Y(u/c,-1,1)))),r=Math.max(n,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){E(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){E(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=Bi(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=Bt(o)+l):(t.height=this.maxHeight,t.width=Bt(o)+l),s.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=s.padding*2,p=lt(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(a){const b=s.mirror?0:m*d.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{const b=s.mirror?0:g*d.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?c?(u=n*t.width,f=s*e.height):(u=s*t.height,f=n*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+r)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+r,this.paddingBottom=d+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){E(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e<s;e++)T(t[e].label)&&(t.splice(e,1),s--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let s=this.ticks;e<s.length&&(s=Fi(s,e)),this._labelSizes=t=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,s){const{ctx:n,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(e/zi(e,s));let c=0,h=0,d,u,f,p,g,m,b,_,y,v,x;for(d=0;d<e;d+=l){if(p=t[d].label,g=this._resolveTickFontOptions(d),n.font=m=g.string,b=o[m]=o[m]||{data:{},gc:[]},_=g.lineHeight,y=v=0,!T(p)&&!H(p))y=di(n,b.data,b.gc,y,p),v=_;else if(H(p))for(u=0,f=p.length;u<f;++u)x=p[u],!T(x)&&!H(x)&&(y=di(n,b.data,b.gc,y,x),v+=_);r.push(y),a.push(v),c=Math.max(y,c),h=Math.max(v,h)}Or(o,e);const k=r.indexOf(c),S=a.indexOf(h),M=w=>({width:r[w]||0,height:a[w]||0});return{first:M(0),last:M(e-1),widest:M(k),highest:M(S),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return dn(this._alignToPixels?mt(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const s=e[t];return s.$context||(s.$context=Tr(this.getContext(),t,s))}return this.$context||(this.$context=Ar(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=lt(this.labelRotation),s=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*s>a*n?a/s:l/n:l*n<a*s?l/s:a/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:r,border:a}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=Bt(o),f=[],p=a.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(z){return mt(s,z,g)};let _,y,v,x,k,S,M,w,D,C,O,V;if(r==="top")_=b(this.bottom),S=this.bottom-u,w=_-m,C=b(t.top)+m,V=t.bottom;else if(r==="bottom")_=b(this.top),C=t.top,V=b(t.bottom)-m,S=_+m,w=this.top+u;else if(r==="left")_=b(this.right),k=this.right-u,M=_-m,D=b(t.left)+m,O=t.right;else if(r==="right")_=b(this.left),D=t.left,O=b(t.right)-m,k=_+m,M=this.left+u;else if(e==="x"){if(r==="center")_=b((t.top+t.bottom)/2+.5);else if(A(r)){const z=Object.keys(r)[0],B=r[z];_=b(this.chart.scales[z].getPixelForValue(B))}C=t.top,V=t.bottom,S=_+m,w=S+u}else if(e==="y"){if(r==="center")_=b((t.left+t.right)/2);else if(A(r)){const z=Object.keys(r)[0],B=r[z];_=b(this.chart.scales[z].getPixelForValue(B))}k=_-m,M=k-u,D=t.left,O=t.right}const G=P(n.ticks.maxTicksLimit,d),I=Math.max(1,Math.ceil(d/G));for(y=0;y<d;y+=I){const z=this.getContext(y),B=o.setContext(z),Z=a.setContext(z),j=B.lineWidth,wt=B.color,Zt=Z.dash||[],Ct=Z.dashOffset,Lt=B.tickWidth,ft=B.tickColor,It=B.tickBorderDash||[],gt=B.tickBorderDashOffset;v=Dr(this,y,l),v!==void 0&&(x=mt(s,v,j),c?k=M=D=O=x:S=w=C=V=x,f.push({tx1:k,ty1:S,tx2:M,ty2:w,x1:D,y1:C,x2:O,y2:V,width:j,color:wt,borderDash:Zt,borderDashOffset:Ct,tickWidth:Lt,tickColor:ft,tickBorderDash:It,tickBorderDashOffset:gt}))}return this._ticksLength=d,this._borderValue=_,f}_computeLabelItems(t){const e=this.axis,s=this.options,{position:n,ticks:o}=s,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=Bt(s.grid),f=u+h,p=d?-h:f,g=-lt(this.labelRotation),m=[];let b,_,y,v,x,k,S,M,w,D,C,O,V="middle";if(n==="top")k=this.bottom-p,S=this._getXAxisLabelAlignment();else if(n==="bottom")k=this.top+p,S=this._getXAxisLabelAlignment();else if(n==="left"){const I=this._getYAxisLabelAlignment(u);S=I.textAlign,x=I.x}else if(n==="right"){const I=this._getYAxisLabelAlignment(u);S=I.textAlign,x=I.x}else if(e==="x"){if(n==="center")k=(t.top+t.bottom)/2+f;else if(A(n)){const I=Object.keys(n)[0],z=n[I];k=this.chart.scales[I].getPixelForValue(z)+f}S=this._getXAxisLabelAlignment()}else if(e==="y"){if(n==="center")x=(t.left+t.right)/2-f;else if(A(n)){const I=Object.keys(n)[0],z=n[I];x=this.chart.scales[I].getPixelForValue(z)}S=this._getYAxisLabelAlignment(u).textAlign}e==="y"&&(l==="start"?V="top":l==="end"&&(V="bottom"));const G=this._getLabelSizes();for(b=0,_=a.length;b<_;++b){y=a[b],v=y.label;const I=o.setContext(this.getContext(b));M=this.getPixelForTick(b)+o.labelOffset,w=this._resolveTickFontOptions(b),D=w.lineHeight,C=H(v)?v.length:1;const z=C/2,B=I.color,Z=I.textStrokeColor,j=I.textStrokeWidth;let wt=S;r?(x=M,S==="inner"&&(b===_-1?wt=this.options.reverse?"left":"right":b===0?wt=this.options.reverse?"right":"left":wt="center"),n==="top"?c==="near"||g!==0?O=-C*D+D/2:c==="center"?O=-G.highest.height/2-z*D+D:O=-G.highest.height+D/2:c==="near"||g!==0?O=D/2:c==="center"?O=G.highest.height/2-z*D:O=G.highest.height-C*D,d&&(O*=-1),g!==0&&!I.showLabelBackdrop&&(x+=D/2*Math.sin(g))):(k=M,O=(1-C)*D/2);let Zt;if(I.showLabelBackdrop){const Ct=Q(I.backdropPadding),Lt=G.heights[b],ft=G.widths[b];let It=O-Ct.top,gt=0-Ct.left;switch(V){case"middle":It-=Lt/2;break;case"bottom":It-=Lt;break}switch(S){case"center":gt-=ft/2;break;case"right":gt-=ft;break;case"inner":b===_-1?gt-=ft:b>0&&(gt-=ft/2);break}Zt={left:gt,top:It,width:ft+Ct.width,height:Lt+Ct.height,color:I.backdropColor}}m.push({label:v,font:w,textOffset:O,options:{rotation:g,color:B,strokeColor:Z,strokeWidth:j,textAlign:wt,textBaseline:V,translation:[x,k],backdrop:Zt}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-lt(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,h;return e==="left"?n?(h=this.right+o,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-a,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?n?(h=this.left+o,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+a,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:s,top:n,width:o,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,n,o,r),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,r=n.length;o<r;++o){const l=n[o];e.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:s,grid:n}}=this,o=s.setContext(this.getContext()),r=s.display?o.width:0;if(!r)return;const a=n.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,d,u;this.isHorizontal()?(c=mt(t,this.left,r)-r/2,h=mt(t,this.right,a)+a/2,d=u=l):(d=mt(t,this.top,r)-r/2,u=mt(t,this.bottom,a)+a/2,c=h=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(c,d),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const s=this.ctx,n=this._computeLabelArea();n&&Ue(s,n);const o=this.getLabelItems(t);for(const r of o){const a=r.options,l=r.font,c=r.label,h=r.textOffset;Jt(s,c,0,h,l,a)}n&&Xe(s)}drawTitle(){const{ctx:t,options:{position:e,title:s,reverse:n}}=this;if(!s.display)return;const o=U(s.font),r=Q(s.padding),a=s.align;let l=o.lineHeight/2;e==="bottom"||e==="center"||A(e)?(l+=r.bottom,H(s.text)&&(l+=o.lineHeight*(s.text.length-1))):l+=r.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=Lr(this,l,e,a);Jt(t,s.text,0,0,o,{color:s.color,maxWidth:d,rotation:u,textAlign:Rr(a,e,n),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,s=P(t.grid&&t.grid.z,-1),n=P(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Rt.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,r;for(o=0,r=e.length;o<r;++o){const a=e[o];a[s]===this.id&&(!t||a.type===t)&&n.push(a)}return n}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return U(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ae{constructor(t,e,s){this.type=t,this.scope=e,this.override=s,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let s;zr(e)&&(s=this.register(e));const n=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,Ir(t,r,s),this.override&&W.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const e=this.items,s=t.id,n=this.scope;s in e&&delete e[s],n&&s in W[n]&&(delete W[n][s],this.override&&delete kt[s])}}function Ir(i,t,e){const s=Ut(Object.create(null),[e?W.get(e):{},W.get(t),i.defaults]);W.set(t,s),i.defaultRoutes&&Er(t,i.defaultRoutes),i.descriptors&&W.describe(t,i.descriptors)}function Er(i,t){Object.keys(t).forEach(e=>{const s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),r=t[e].split("."),a=r.pop(),l=r.join(".");W.route(o,n,l,a)})}function zr(i){return"id"in i&&"defaults"in i}class Fr{constructor(){this.controllers=new ae(ve,"datasets",!0),this.elements=new ae(ct,"elements"),this.plugins=new ae(Object,"plugins"),this.scales=new ae(Rt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):R(n,r=>{const a=s||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,s){const n=Ne(t);E(s["before"+n],[],s),e[t](s),E(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const s=this._typedRegistries[e];if(s.isForType(t))return s}return this.plugins}_get(t,e,s){const n=e.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+s+".");return n}}var st=new Fr;class Br{constructor(){this._init=[]}notify(t,e,s,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=n?this._descriptors(t).filter(n):this._descriptors(t),r=this._notify(o,t,e,s);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,e,s,n){n=n||{};for(const o of t){const r=o.plugin,a=r[s],l=[e,n,o.options];if(E(a,l,r)===!1&&n.cancelable)return!1}return!0}invalidate(){T(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const s=t&&t.config,n=P(s.options&&s.options.plugins,{}),o=Wr(s);return n===!1&&!e?[]:Nr(t,o,n,e)}_notifyStateChanges(t){const e=this._oldCache||[],s=this._cache,n=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function Wr(i){const t={},e=[],s=Object.keys(st.plugins.items);for(let o=0;o<s.length;o++)e.push(st.getPlugin(s[o]));const n=i.plugins||[];for(let o=0;o<n.length;o++){const r=n[o];e.indexOf(r)===-1&&(e.push(r),t[r.id]=!0)}return{plugins:e,localIds:t}}function Hr(i,t){return!t&&i===!1?null:i===!0?{}:i}function Nr(i,{plugins:t,localIds:e},s,n){const o=[],r=i.getContext();for(const a of t){const l=a.id,c=Hr(s[l],n);c!==null&&o.push({plugin:a,options:Vr(i.config,{plugin:a,local:e[l]},c,r)})}return o}function Vr(i,{plugin:t,local:e},s,n){const o=i.pluginScopeKeys(t),r=i.getOptionScopes(s,o);return e&&t.defaults&&r.push(t.defaults),i.createResolver(r,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Be(i,t){const e=W.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function jr(i,t){let e=i;return i==="_index_"?e=t:i==="_value_"&&(e=t==="x"?"y":"x"),e}function $r(i,t){return i===t?"_index_":"_value_"}function Wi(i){if(i==="x"||i==="y"||i==="r")return i}function Yr(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function We(i,...t){if(Wi(i))return i;for(const e of t){const s=e.axis||Yr(e.position)||i.length>1&&Wi(i[0].toLowerCase());if(s)return s}throw new Error(\`Cannot determine type of '\${i}' axis. Please provide 'axis' or 'position' option.\`)}function Hi(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function Ur(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(e.length)return Hi(i,"x",e[0])||Hi(i,"y",e[0])}return{}}function Xr(i,t){const e=kt[i.type]||{scales:{}},s=t.scales||{},n=Be(i.type,t),o=Object.create(null);return Object.keys(s).forEach(r=>{const a=s[r];if(!A(a))return console.error(\`Invalid scale configuration for scale: \${r}\`);if(a._proxy)return console.warn(\`Ignoring resolver passed as options for scale: \${r}\`);const l=We(r,a,Ur(r,i),W.scales[a.type]),c=$r(l,n),h=e.scales||{};o[r]=Vt(Object.create(null),[{axis:l},a,h[l],h[c]])}),i.data.datasets.forEach(r=>{const a=r.type||i.type,l=r.indexAxis||Be(a,t),h=(kt[a]||{}).scales||{};Object.keys(h).forEach(d=>{const u=jr(d,l),f=r[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),Vt(o[f],[{axis:u},s[f],h[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];Vt(a,[W.scales[a.type],W.scale])}),o}function Ws(i){const t=i.options||(i.options={});t.plugins=P(t.plugins,{}),t.scales=Xr(i,t)}function Hs(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Kr(i){return i=i||{},i.data=Hs(i.data),Ws(i),i}const Ni=new Map,Ns=new Set;function le(i,t){let e=Ni.get(i);return e||(e=t(),Ni.set(i,e),Ns.add(e)),e}const Wt=(i,t,e)=>{const s=Mt(t,e);s!==void 0&&i.add(s)};class Gr{constructor(t){this._config=Kr(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Hs(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Ws(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return le(t,()=>[[\`datasets.\${t}\`,""]])}datasetAnimationScopeKeys(t,e){return le(\`\${t}.transition.\${e}\`,()=>[[\`datasets.\${t}.transitions.\${e}\`,\`transitions.\${e}\`],[\`datasets.\${t}\`,""]])}datasetElementScopeKeys(t,e){return le(\`\${t}-\${e}\`,()=>[[\`datasets.\${t}.elements.\${e}\`,\`datasets.\${t}\`,\`elements.\${e}\`,""]])}pluginScopeKeys(t){const e=t.id,s=this.type;return le(\`\${s}-plugin-\${e}\`,()=>[[\`plugins.\${e}\`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,r=this._cachedScopes(t,s),a=r.get(e);if(a)return a;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>Wt(l,t,d))),h.forEach(d=>Wt(l,n,d)),h.forEach(d=>Wt(l,kt[o]||{},d)),h.forEach(d=>Wt(l,W,d)),h.forEach(d=>Wt(l,ze,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Ns.has(e)&&r.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,kt[e]||{},W.datasets[e]||{},{type:e},W,ze]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=Vi(this._resolverCache,t,n);let l=r;if(Jr(r,e)){o.$shared=!1,s=ut(s)?s():s;const c=this.createResolver(t,s,a);l=At(r,s,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){const{resolver:o}=Vi(this._resolverCache,t,s);return A(e)?At(o,e,void 0,n):o}}function Vi(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);return o||(o={resolver:Ge(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},s.set(n,o)),o}const qr=i=>A(i)&&Object.getOwnPropertyNames(i).some(t=>ut(i[t]));function Jr(i,t){const{isScriptable:e,isIndexable:s}=ks(i);for(const n of t){const o=e(n),r=s(n),a=(r||o)&&i[n];if(o&&(ut(a)||qr(a))||r&&H(a))return!0}return!1}var Qr="4.5.0";const Zr=["top","bottom","left","right","chartArea"];function ji(i,t){return i==="top"||i==="bottom"||Zr.indexOf(i)===-1&&t==="x"}function $i(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function Yi(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),E(e&&e.onComplete,[i],t)}function ta(i){const t=i.chart,e=t.options.animation;E(e&&e.onProgress,[i],t)}function Vs(i){return Qe()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const ue={},Ui=i=>{const t=Vs(i);return Object.values(ue).filter(e=>e.canvas===t).pop()};function ea(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const r=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=r)}}}function ia(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}class sa{static defaults=W;static instances=ue;static overrides=kt;static registry=st;static version=Qr;static getChart=Ui;static register(...t){st.add(...t),Xi()}static unregister(...t){st.remove(...t),Xi()}constructor(t,e){const s=this.config=new Gr(e),n=Vs(t),o=Ui(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||yr(n)),this.platform.updateConfig(s);const a=this.platform.acquireContext(n,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Gs(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Br,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=pn(d=>this.update(d),r.resizeDelay||0),this._dataChanges=[],ue[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}rt.listen(this,"complete",Yi),rt.listen(this,"progress",ta),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return T(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return st}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():pi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ui(this.canvas,this.ctx),this}stop(){return rt.stop(this),this}resize(t,e){rt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(n,t,e,o),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,pi(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),E(s.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};R(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((r,a)=>(r[a]=!1,r),{});let o=[];e&&(o=o.concat(Object.keys(e).map(r=>{const a=e[r],l=We(r,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),R(o,r=>{const a=r.options,l=a.id,c=We(l,a),h=P(a.type,r.dtype);(a.position===void 0||ji(a.position,c)!==ji(r.dposition))&&(a.position=r.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{const u=st.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(a,t)}),R(n,(r,a)=>{r||delete s[a]}),R(s,r=>{q.configure(this,r,r.options),q.addBox(this,r)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;n<s;++n)this._destroyDatasetMeta(n);t.splice(e,s-e)}this._sortedMetasets=t.slice(0).sort($i("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s<n;s++){const o=e[s];let r=this.getDatasetMeta(s);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(s),r=this.getDatasetMeta(s)),r.type=a,r.indexAxis=o.indexAxis||Be(a,this.options),r.order=o.order||0,r.index=s,r.label=""+o.label,r.visible=this.isDatasetVisible(s),r.controller)r.controller.updateIndex(s),r.controller.linkScales();else{const l=st.getController(a),{datasetElementType:c,dataElementType:h}=W.datasets[a];Object.assign(l,{dataElementType:st.getElement(h),datasetElementType:c&&st.getElement(c)}),r.controller=new l(this,s),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){R(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,h=this.data.datasets.length;c<h;c++){const{controller:d}=this.getDatasetMeta(c),u=!n&&o.indexOf(d)===-1;d.buildOrUpdateElements(u),r=Math.max(+d.getMaxOverflow(),r)}r=this._minPadding=s.layout.autoPadding?r:0,this._updateLayout(r),n||R(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort($i("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){R(this.scales,t=>{q.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!ii(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e){const r=s==="_removeElements"?-o:o;ea(t,n,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),n=s(0);for(let o=1;o<e;o++)if(!ii(n,s(o)))return;return Array.from(n).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;q.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],R(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e<s;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,s=this.data.datasets.length;e<s;++e)this._updateDataset(e,ut(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const s=this.getDatasetMeta(t),n={meta:s,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(s.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(rt.has(this)?this.attached&&!rt.running(this)&&rt.start(this):(this.draw(),Yi({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:s,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,n)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,s=[];let n,o;for(n=0,o=e.length;n<o;++n){const r=e[n];(!t||r.visible)&&s.push(r)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,s={meta:t,index:t.index,cancelable:!0},n=Mo(this,t);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(n&&Ue(e,n),t.controller.draw(),n&&Xe(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return qt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){const o=Zo.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=St(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){const s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,n);Xt(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),r.update(o,{visible:s}),this.update(a=>a.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),rt.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ui(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete ue[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,s=(o,r)=>{e.addEventListener(this,o,r),t[o]=r},n=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};R(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{n("attach",a),this.attached=!0,this.resize(),s("resize",o),s("detach",r)};r=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){R(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},R(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const n=s?"set":"remove";let o,r,a,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){r=t[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[n+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],s=t.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!fe(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){const n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),r=o(e,t),a=s?t:o(t,e);r.length&&this.updateHoverStyle(r,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,r=e,a=this._getActiveElements(t,n,s,r),l=en(t),c=ia(t,this._lastEvent,s,l);s&&(this._lastEvent=null,E(o.onHover,[t,a,this],this),l&&E(o.onClick,[t,a,this],this));const h=!fe(a,n);return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}function Xi(){return R(sa.instances,i=>i._plugins.invalidate())}function na(i,t,e){const{startAngle:s,x:n,y:o,outerRadius:r,innerRadius:a,options:l}=t,{borderWidth:c,borderJoinStyle:h}=l,d=Math.min(c/r,tt(s-e));if(i.beginPath(),i.arc(n,o,r-c/2,s+d/2,e-d/2),a>0){const u=Math.min(c/a,tt(s-e));i.arc(n,o,a+c/2,e-u/2,s+u/2,!0)}else{const u=Math.min(c/2,r*tt(s-e));if(h==="round")i.arc(n,o,u,e-L/2,s+L/2,!0);else if(h==="bevel"){const f=2*u*u,p=-f*Math.cos(e+L/2)+n,g=-f*Math.sin(e+L/2)+o,m=f*Math.cos(s+L/2)+n,b=f*Math.sin(s+L/2)+o;i.lineTo(p,g),i.lineTo(m,b)}}i.closePath(),i.moveTo(0,0),i.rect(0,0,i.canvas.width,i.canvas.height),i.clip("evenodd")}function oa(i,t,e){const{startAngle:s,pixelMargin:n,x:o,y:r,outerRadius:a,innerRadius:l}=t;let c=n/a;i.beginPath(),i.arc(o,r,a,s-c,e+c),l>n?(c=n/l,i.arc(o,r,l,e+c,s-c,!0)):i.arc(o,r,n,e+N,s-N),i.closePath(),i.clip()}function ra(i){return Ke(i,["outerStart","outerEnd","innerStart","innerEnd"])}function aa(i,t,e,s){const n=ra(i.options.borderRadius),o=(e-t)/2,r=Math.min(o,s*t/2),a=l=>{const c=(e-Math.min(o,l))*s/2;return Y(l,0,Math.min(o,c))};return{outerStart:a(n.outerStart),outerEnd:a(n.outerEnd),innerStart:Y(n.innerStart,0,r),innerEnd:Y(n.innerEnd,0,r)}}function Pt(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function xe(i,t,e,s,n,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+s+e-c,0),u=h>0?h+s+e+c:0;let f=0;const p=n-l;if(s){const I=h>0?h-s:0,z=d>0?d-s:0,B=(I+z)/2,Z=B!==0?p*B/(B+s):p;f=(p-Z)/2}const g=Math.max(.001,p*d-e/L)/d,m=(p-g)/2,b=l+m+f,_=n-m-f,{outerStart:y,outerEnd:v,innerStart:x,innerEnd:k}=aa(t,u,d,_-b),S=d-y,M=d-v,w=b+y/S,D=_-v/M,C=u+x,O=u+k,V=b+x/C,G=_-k/O;if(i.beginPath(),o){const I=(w+D)/2;if(i.arc(r,a,d,w,I),i.arc(r,a,d,I,D),v>0){const j=Pt(M,D,r,a);i.arc(j.x,j.y,v,D,_+N)}const z=Pt(O,_,r,a);if(i.lineTo(z.x,z.y),k>0){const j=Pt(O,G,r,a);i.arc(j.x,j.y,k,_+N,G+Math.PI)}const B=(_-k/u+(b+x/u))/2;if(i.arc(r,a,u,_-k/u,B,!0),i.arc(r,a,u,B,b+x/u,!0),x>0){const j=Pt(C,V,r,a);i.arc(j.x,j.y,x,V+Math.PI,b-N)}const Z=Pt(S,b,r,a);if(i.lineTo(Z.x,Z.y),y>0){const j=Pt(S,w,r,a);i.arc(j.x,j.y,y,b-N,w)}}else{i.moveTo(r,a);const I=Math.cos(w)*d+r,z=Math.sin(w)*d+a;i.lineTo(I,z);const B=Math.cos(D)*d+r,Z=Math.sin(D)*d+a;i.lineTo(B,Z)}i.closePath()}function la(i,t,e,s,n){const{fullCircles:o,startAngle:r,circumference:a}=t;let l=t.endAngle;if(o){xe(i,t,e,s,l,n);for(let c=0;c<o;++c)i.fill();isNaN(a)||(l=r+(a%F||F))}return xe(i,t,e,s,l,n),i.fill(),l}function ca(i,t,e,s,n){const{fullCircles:o,startAngle:r,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:u,borderRadius:f}=l,p=l.borderAlign==="inner";if(!c)return;i.setLineDash(d||[]),i.lineDashOffset=u,p?(i.lineWidth=c*2,i.lineJoin=h||"round"):(i.lineWidth=c,i.lineJoin=h||"bevel");let g=t.endAngle;if(o){xe(i,t,e,s,g,n);for(let m=0;m<o;++m)i.stroke();isNaN(a)||(g=r+(a%F||F))}p&&oa(i,t,g),l.selfJoin&&g-r>=L&&f===0&&h!=="miter"&&na(i,t,g),o||(xe(i,t,e,s,g,n),i.stroke())}class Ga extends ct{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,s){const n=this.getProps(["x","y"],s),{angle:o,distance:r}=ps(n,{x:t,y:e}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),u=(this.options.spacing+this.options.borderWidth)/2,f=P(d,l-a),p=Gt(o,a,l)&&a!==l,g=f>=F||p,m=ht(r,c+u,h+u);return g&&m}getCenterPoint(t){const{x:e,y:s,startAngle:n,endAngle:o,innerRadius:r,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,h=(n+o)/2,d=(r+a+c+l)/2;return{x:e+Math.cos(h)*d,y:s+Math.sin(h)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:s}=this,n=(e.offset||0)/4,o=(e.spacing||0)/2,r=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=s>F?Math.floor(s/F):0,s===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*n,Math.sin(a)*n);const l=1-Math.sin(Math.min(L,s||0)),c=n*l;t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,la(t,this,c,o,r),ca(t,this,c,o,r),t.restore()}}function js(i,t,e=t){i.lineCap=P(e.borderCapStyle,t.borderCapStyle),i.setLineDash(P(e.borderDash,t.borderDash)),i.lineDashOffset=P(e.borderDashOffset,t.borderDashOffset),i.lineJoin=P(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=P(e.borderWidth,t.borderWidth),i.strokeStyle=P(e.borderColor,t.borderColor)}function ha(i,t,e){i.lineTo(e.x,e.y)}function da(i){return i.stepped?On:i.tension||i.cubicInterpolationMode==="monotone"?An:ha}function $s(i,t,e={}){const s=i.length,{start:n=0,end:o=s-1}=e,{start:r,end:a}=t,l=Math.max(n,r),c=Math.min(o,a),h=n<r&&o<r||n>a&&o>a;return{count:s,start:l,loop:t.loop,ilen:c<l&&!h?s+c-l:c-l}}function ua(i,t,e,s){const{points:n,options:o}=t,{count:r,start:a,loop:l,ilen:c}=$s(n,e,s),h=da(o);let{move:d=!0,reverse:u}=s||{},f,p,g;for(f=0;f<=c;++f)p=n[(a+(u?c-f:f))%r],!p.skip&&(d?(i.moveTo(p.x,p.y),d=!1):h(i,g,p,u,o.stepped),g=p);return l&&(p=n[(a+(u?c:0))%r],h(i,g,p,u,o.stepped)),!!l}function fa(i,t,e,s){const n=t.points,{count:o,start:r,ilen:a}=$s(n,e,s),{move:l=!0,reverse:c}=s||{};let h=0,d=0,u,f,p,g,m,b;const _=v=>(r+(c?a-v:v))%o,y=()=>{g!==m&&(i.lineTo(h,m),i.lineTo(h,g),i.lineTo(h,b))};for(l&&(f=n[_(0)],i.moveTo(f.x,f.y)),u=0;u<=a;++u){if(f=n[_(u)],f.skip)continue;const v=f.x,x=f.y,k=v|0;k===p?(x<g?g=x:x>m&&(m=x),h=(d*h+v)/++d):(y(),i.lineTo(v,x),p=k,d=0,g=m=x),b=x}y()}function He(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?fa:ua}function ga(i){return i.stepped?lo:i.tension||i.cubicInterpolationMode==="monotone"?co:xt}function pa(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),js(i,t.options),i.stroke(n)}function ma(i,t,e,s){const{segments:n,options:o}=t,r=He(t);for(const a of n)js(i,o,a.style),i.beginPath(),r(i,t,a,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}const ba=typeof Path2D=="function";function _a(i,t,e,s){ba&&!t.options.segment?pa(i,t,e,s):ma(i,t,e,s)}class qa extends ct{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const n=s.spanGaps?this._loop:this._fullLoop;to(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=_o(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){const s=this.options,n=t[e],o=this.points,r=po(this,{property:e,start:n,end:n});if(!r.length)return;const a=[],l=ga(s);let c,h;for(c=0,h=r.length;c<h;++c){const{start:d,end:u}=r[c],f=o[d],p=o[u];if(f===p){a.push(f);continue}const g=Math.abs((n-f[e])/(p[e]-f[e])),m=l(f,p,g,s.stepped);m[e]=t[e],a.push(m)}return a.length===1?a[0]:a}pathSegment(t,e,s){return He(this)(t,this,e,s)}path(t,e,s){const n=this.segments,o=He(this);let r=this._loop;e=e||0,s=s||this.points.length-e;for(const a of n)r&=o(t,this,a,{start:e,end:e+s-1});return!!r}draw(t,e,s,n){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),_a(t,this,s,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Ki(i,t,e,s){const n=i.options,{[e]:o}=i.getProps([e],s);return Math.abs(t-o)<n.radius+n.hitRadius}class Ja extends ct{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,s){const n=this.options,{x:o,y:r}=this.getProps(["x","y"],s);return Math.pow(t-o,2)+Math.pow(e-r,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Ki(this,t,"x",e)}inYRange(t,e){return Ki(this,t,"y",e)}getCenterPoint(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);const s=e&&t.borderWidth||0;return(e+s)*2}draw(t,e){const s=this.options;this.skip||s.radius<.1||!qt(this,e,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,Fe(t,s,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Ys(i,t){const{x:e,y:s,base:n,width:o,height:r}=i.getProps(["x","y","base","width","height"],t);let a,l,c,h,d;return i.horizontal?(d=r/2,a=Math.min(e,n),l=Math.max(e,n),c=s-d,h=s+d):(d=o/2,a=e-d,l=e+d,c=Math.min(s,n),h=Math.max(s,n)),{left:a,top:c,right:l,bottom:h}}function dt(i,t,e,s){return i?0:Y(t,e,s)}function xa(i,t,e){const s=i.options.borderWidth,n=i.borderSkipped,o=Ms(s);return{t:dt(n.top,o.top,0,e),r:dt(n.right,o.right,0,t),b:dt(n.bottom,o.bottom,0,e),l:dt(n.left,o.left,0,t)}}function ya(i,t,e){const{enableBorderRadius:s}=i.getProps(["enableBorderRadius"]),n=i.options.borderRadius,o=Dt(n),r=Math.min(t,e),a=i.borderSkipped,l=s||A(n);return{topLeft:dt(!l||a.top||a.left,o.topLeft,0,r),topRight:dt(!l||a.top||a.right,o.topRight,0,r),bottomLeft:dt(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:dt(!l||a.bottom||a.right,o.bottomRight,0,r)}}function va(i){const t=Ys(i),e=t.right-t.left,s=t.bottom-t.top,n=xa(i,e/2,s/2),o=ya(i,e/2,s/2);return{outer:{x:t.left,y:t.top,w:e,h:s,radius:o},inner:{x:t.left+n.l,y:t.top+n.t,w:e-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}function Le(i,t,e,s){const n=t===null,o=e===null,a=i&&!(n&&o)&&Ys(i,s);return a&&(n||ht(t,a.left,a.right))&&(o||ht(e,a.top,a.bottom))}function Ma(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function ka(i,t){i.rect(t.x,t.y,t.w,t.h)}function Ie(i,t,e={}){const s=i.x!==e.x?-t:0,n=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-s,r=(i.y+i.h!==e.y+e.h?t:0)-n;return{x:i.x+s,y:i.y+n,w:i.w+o,h:i.h+r,radius:i.radius}}class Qa extends ct{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:s,backgroundColor:n}}=this,{inner:o,outer:r}=va(this),a=Ma(r.radius)?me:ka;t.save(),(r.w!==o.w||r.h!==o.h)&&(t.beginPath(),a(t,Ie(r,e,o)),t.clip(),a(t,Ie(o,-e,r)),t.fillStyle=s,t.fill("evenodd")),t.beginPath(),a(t,Ie(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,s){return Le(this,t,e,s)}inXRange(t,e){return Le(this,t,null,e)}inYRange(t,e){return Le(this,null,t,e)}getCenterPoint(t){const{x:e,y:s,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?s:(s+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const Gi=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},Sa=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class qi extends ct{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=E(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels,n=U(s.font),o=n.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Gi(s,o);let c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,n,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+a;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((p,g)=>{const m=s+e/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*a>r)&&(d+=h,c[c.length-(g>0?0:1)]=0,f+=h,u++),l[g]={left:0,top:f,row:u,width:m,height:n},c[c.length-1]+=m+a}),d}_fitCols(t,e,s,n){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-t;let d=a,u=0,f=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:_,itemHeight:y}=wa(s,e,o,m,n);b>0&&f+y+2*a>h&&(d+=u+a,c.push({width:u,height:f}),p+=u+a,g++,u=f=0),l[b]={left:p,top:f,col:g,width:_,height:y},u=Math.max(u,_),f+=y+a}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,r=Ot(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=$(s,this.left+n,this.right-this.lineWidths[a]);for(const c of e)a!==c.row&&(a=c.row,l=$(s,this.left+n,this.right-this.lineWidths[a])),c.top+=this.top+t+n,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+n}else{let a=0,l=$(s,this.top+t+n,this.bottom-this.columnSizes[a].height);for(const c of e)c.col!==a&&(a=c.col,l=$(s,this.top+t+n,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+n,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ue(t,this),this._draw(),Xe(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:r}=t,a=W.color,l=Ot(t.rtl,this.left,this.width),c=U(r.font),{padding:h}=r,d=c.size,u=d/2;let f;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=Gi(r,d),b=function(k,S,M){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const w=P(M.lineWidth,1);if(n.fillStyle=P(M.fillStyle,a),n.lineCap=P(M.lineCap,"butt"),n.lineDashOffset=P(M.lineDashOffset,0),n.lineJoin=P(M.lineJoin,"miter"),n.lineWidth=w,n.strokeStyle=P(M.strokeStyle,a),n.setLineDash(P(M.lineDash,[])),r.usePointStyle){const D={radius:g*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:w},C=l.xPlus(k,p/2),O=S+u;vs(n,D,C,O,r.pointStyleWidth&&p)}else{const D=S+Math.max((d-g)/2,0),C=l.leftForLtr(k,p),O=Dt(M.borderRadius);n.beginPath(),Object.values(O).some(V=>V!==0)?me(n,{x:C,y:D,w:p,h:g,radius:O}):n.rect(C,D,p,g),n.fill(),w!==0&&n.stroke()}n.restore()},_=function(k,S,M){Jt(n,M.text,k,S+m/2,c,{strikethrough:M.hidden,textAlign:l.textAlign(M.textAlign)})},y=this.isHorizontal(),v=this._computeTitleHeight();y?f={x:$(o,this.left+h,this.right-s[0]),y:this.top+h+v,line:0}:f={x:this.left+h,y:$(o,this.top+v+h,this.bottom-e[0].height),line:0},Ds(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach((k,S)=>{n.strokeStyle=k.fontColor,n.fillStyle=k.fontColor;const M=n.measureText(k.text).width,w=l.textAlign(k.textAlign||(k.textAlign=r.textAlign)),D=p+u+M;let C=f.x,O=f.y;l.setWidth(this.width),y?S>0&&C+D+h>this.right&&(O=f.y+=x,f.line++,C=f.x=$(o,this.left+h,this.right-s[f.line])):S>0&&O+x>this.bottom&&(C=f.x=C+e[f.line].width+h,f.line++,O=f.y=$(o,this.top+v+h,this.bottom-e[f.line].height));const V=l.x(C);if(b(V,O,k),C=mn(w,C+p+u,y?C+D:this.right,t.rtl),_(l.x(C),O,k),y)f.x+=D+h;else if(typeof k.text!="string"){const G=c.lineHeight;f.y+=Us(k,G)+h}else f.y+=x}),Os(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,s=U(e.font),n=Q(e.padding);if(!e.display)return;const o=Ot(t.rtl,this.left,this.width),r=this.ctx,a=e.position,l=s.size/2,c=n.top+l;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=$(t.align,d,this.right-u);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+$(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const f=$(a,d,d+u);r.textAlign=o.textAlign(je(a)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=s.string,Jt(r,e.text,f,h,s)}_computeTitleHeight(){const t=this.options.title,e=U(t.font),s=Q(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(ht(t,this.left,this.right)&&ht(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;s<o.length;++s)if(n=o[s],ht(t,n.left,n.left+n.width)&&ht(e,n.top,n.top+n.height))return this.legendItems[s]}return null}handleEvent(t){const e=this.options;if(!Da(t.type,e))return;const s=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,o=Sa(n,s);n&&!o&&E(e.onLeave,[t,n,this],this),this._hoveredItem=s,s&&!o&&E(e.onHover,[t,s,this],this)}else s&&E(e.onClick,[t,s,this],this)}}function wa(i,t,e,s,n){const o=Ca(s,i,t,e),r=Pa(n,s,t.lineHeight);return{itemWidth:o,itemHeight:r}}function Ca(i,t,e,s){let n=i.text;return n&&typeof n!="string"&&(n=n.reduce((o,r)=>o.length>r.length?o:r)),t+e.size/2+s.measureText(n).width}function Pa(i,t,e){let s=i;return typeof t.text!="string"&&(s=Us(t,e)),s}function Us(i,t){const e=i.text?i.text.length:0;return t*e}function Da(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var Za={id:"legend",_element:qi,start(i,t,e){const s=i.legend=new qi({ctx:i.ctx,options:e,chart:i});q.configure(i,s,e),q.addBox(i,s)},stop(i){q.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const s=i.legend;q.configure(i,s,e),s.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o,useBorderRadius:r,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=Q(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class Xs extends ct{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=H(s.text)?s.text.length:1;this._padding=Q(s.padding);const o=n*U(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:s,bottom:n,right:o,options:r}=this,a=r.align;let l=0,c,h,d;return this.isHorizontal()?(h=$(a,s,o),d=e+t,c=o-s):(r.position==="left"?(h=s+t,d=$(a,n,e),l=L*-.5):(h=o-t,d=$(a,e,n),l=L*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const s=U(e.font),o=s.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Jt(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:je(e.align),textBaseline:"middle",translation:[r,a]})}}function Oa(i,t){const e=new Xs({ctx:i.ctx,options:t,chart:i});q.configure(i,e,t),q.addBox(i,e),i.titleBlock=e}var tl={id:"title",_element:Xs,start(i,t,e){Oa(i,e)},stop(i){const t=i.titleBlock;q.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const s=i.titleBlock;q.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Nt={average(i){if(!i.length)return!1;let t,e,s=new Set,n=0,o=0;for(t=0,e=i.length;t<e;++t){const a=i[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();s.add(l.x),n+=l.y,++o}}return o===0||s.size===0?!1:{x:[...s].reduce((a,l)=>a+l)/s.size,y:n/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,s=t.y,n=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=i.length;o<r;++o){const l=i[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),h=Ee(t,c);h<n&&(n=h,a=l)}}if(a){const l=a.tooltipPosition();e=l.x,s=l.y}return{x:e,y:s}}};function it(i,t){return t&&(H(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function at(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(\`
21277
+ \`)>-1?i.split(\`
21278
+ \`):i}function Aa(i,t){const{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(n);return{chart:i,label:r,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:a,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function Ji(i,t){const e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:r,boxHeight:a}=t,l=U(t.bodyFont),c=U(t.titleFont),h=U(t.footerFont),d=o.length,u=n.length,f=s.length,p=Q(t.padding);let g=p.height,m=0,b=s.reduce((v,x)=>v+x.before.length+x.lines.length+x.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const v=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=f*v+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}u&&(g+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let _=0;const y=function(v){m=Math.max(m,e.measureText(v).width+_)};return e.save(),e.font=c.string,R(i.title,y),e.font=l.string,R(i.beforeBody.concat(i.afterBody),y),_=t.displayColors?r+2+t.boxPadding:0,R(s,v=>{R(v.before,y),R(v.lines,y),R(v.after,y)}),_=0,e.font=h.string,R(i.footer,y),e.restore(),m+=p.width,{width:m,height:g}}function Ta(i,t){const{y:e,height:s}=t;return e<s/2?"top":e>i.height-s/2?"bottom":"center"}function Ra(i,t,e,s){const{x:n,width:o}=s,r=e.caretSize+e.caretPadding;if(i==="left"&&n+o+r>t.width||i==="right"&&n-o-r<0)return!0}function La(i,t,e,s){const{x:n,width:o}=e,{width:r,chartArea:{left:a,right:l}}=i;let c="center";return s==="center"?c=n<=(a+l)/2?"left":"right":n<=o/2?c="left":n>=r-o/2&&(c="right"),Ra(c,i,t,e)&&(c="center"),c}function Qi(i,t,e){const s=e.yAlign||t.yAlign||Ta(i,e);return{xAlign:e.xAlign||t.xAlign||La(i,t,e,s),yAlign:s}}function Ia(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function Ea(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function Zi(i,t,e,s){const{caretSize:n,caretPadding:o,cornerRadius:r}=i,{xAlign:a,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Dt(r);let p=Ia(t,a);const g=Ea(t,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(h,u)+n:a==="right"&&(p+=Math.max(d,f)+n),{x:Y(p,0,s.width-t.width),y:Y(g,0,s.height-t.height)}}function ce(i,t,e){const s=Q(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function ts(i){return it([],at(i))}function za(i,t,e){return St(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function es(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const Ks={beforeTitle:ot,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return e[t.dataIndex]}return""},afterTitle:ot,beforeBody:ot,beforeLabel:ot,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");const e=i.formattedValue;return T(e)||(t+=e),t},labelColor(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:ot,afterBody:ot,beforeFooter:ot,footer:ot,afterFooter:ot};function X(i,t,e,s){const n=i[t].call(e,s);return typeof n>"u"?Ks[t].call(e,s):n}class is extends ct{static positioners=Nt;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new Ts(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=za(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:s}=e,n=X(s,"beforeTitle",this,t),o=X(s,"title",this,t),r=X(s,"afterTitle",this,t);let a=[];return a=it(a,at(n)),a=it(a,at(o)),a=it(a,at(r)),a}getBeforeBody(t,e){return ts(X(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:s}=e,n=[];return R(t,o=>{const r={before:[],lines:[],after:[]},a=es(s,o);it(r.before,at(X(a,"beforeLabel",this,o))),it(r.lines,X(a,"label",this,o)),it(r.after,at(X(a,"afterLabel",this,o))),n.push(r)}),n}getAfterBody(t,e){return ts(X(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:s}=e,n=X(s,"beforeFooter",this,t),o=X(s,"footer",this,t),r=X(s,"afterFooter",this,t);let a=[];return a=it(a,at(n)),a=it(a,at(o)),a=it(a,at(r)),a}_createItems(t){const e=this._active,s=this.chart.data,n=[],o=[],r=[];let a=[],l,c;for(l=0,c=e.length;l<c;++l)a.push(Aa(this.chart,e[l]));return t.filter&&(a=a.filter((h,d,u)=>t.filter(h,d,u,s))),t.itemSort&&(a=a.sort((h,d)=>t.itemSort(h,d,s))),R(a,h=>{const d=es(t.callbacks,h);n.push(X(d,"labelColor",this,h)),o.push(X(d,"labelPointStyle",this,h)),r.push(X(d,"labelTextColor",this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,e){const s=this.options.setContext(this.getContext()),n=this._active;let o,r=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const a=Nt[s.position].call(this,n,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);const l=this._size=Ji(this,s),c=Object.assign({},a,l),h=Qi(this.chart,s,c),d=Zi(s,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){const o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){const{xAlign:n,yAlign:o}=this,{caretSize:r,cornerRadius:a}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=Dt(a),{x:u,y:f}=t,{width:p,height:g}=e;let m,b,_,y,v,x;return o==="center"?(v=f+g/2,n==="left"?(m=u,b=m-r,y=v+r,x=v-r):(m=u+p,b=m+r,y=v-r,x=v+r),_=m):(n==="left"?b=u+Math.max(l,h)+r:n==="right"?b=u+p-Math.max(c,d)-r:b=this.caretX,o==="top"?(y=f,v=y-r,m=b-r,_=b+r):(y=f+g,v=y+r,m=b+r,_=b-r),x=y),{x1:m,x2:b,x3:_,y1:y,y2:v,y3:x}}drawTitle(t,e,s){const n=this.title,o=n.length;let r,a,l;if(o){const c=Ot(s.rtl,this.x,this.width);for(t.x=ce(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",r=U(s.titleFont),a=s.titleSpacing,e.fillStyle=s.titleColor,e.font=r.string,l=0;l<o;++l)e.fillText(n[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=s.titleMarginBottom-a)}}_drawColorBox(t,e,s,n,o){const r=this.labelColors[s],a=this.labelPointStyles[s],{boxHeight:l,boxWidth:c}=o,h=U(o.bodyFont),d=ce(this,"left",o),u=n.x(d),f=l<h.lineHeight?(h.lineHeight-l)/2:0,p=e.y+f;if(o.usePointStyle){const g={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=n.leftForLtr(u,c)+c/2,b=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Fe(t,g,m,b),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Fe(t,g,m,b)}else{t.lineWidth=A(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const g=n.leftForLtr(u,c),m=n.leftForLtr(n.xPlus(u,1),c-2),b=Dt(r.borderRadius);Object.values(b).some(_=>_!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,me(t,{x:g,y:p,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),me(t,{x:m,y:p+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,c,l),t.strokeRect(g,p,c,l),t.fillStyle=r.backgroundColor,t.fillRect(m,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){const{body:n}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=s,d=U(s.bodyFont);let u=d.lineHeight,f=0;const p=Ot(s.rtl,this.x,this.width),g=function(M){e.fillText(M,p.x(t.x+f),t.y+u/2),t.y+=u+o},m=p.textAlign(r);let b,_,y,v,x,k,S;for(e.textAlign=r,e.textBaseline="middle",e.font=d.string,t.x=ce(this,m,s),e.fillStyle=s.bodyColor,R(this.beforeBody,g),f=a&&m!=="right"?r==="center"?c/2+h:c+2+h:0,v=0,k=n.length;v<k;++v){for(b=n[v],_=this.labelTextColors[v],e.fillStyle=_,R(b.before,g),y=b.lines,a&&y.length&&(this._drawColorBox(e,t,v,p,s),u=Math.max(d.lineHeight,l)),x=0,S=y.length;x<S;++x)g(y[x]),u=d.lineHeight;R(b.after,g)}f=0,u=d.lineHeight,R(this.afterBody,g),t.y-=o}drawFooter(t,e,s){const n=this.footer,o=n.length;let r,a;if(o){const l=Ot(s.rtl,this.x,this.width);for(t.x=ce(this,s.footerAlign,s),t.y+=s.footerMarginTop,e.textAlign=l.textAlign(s.footerAlign),e.textBaseline="middle",r=U(s.footerFont),e.fillStyle=s.footerColor,e.font=r.string,a=0;a<o;++a)e.fillText(n[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+s.footerSpacing}}drawBackground(t,e,s,n){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:h}=s,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:p}=Dt(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(a+d,l),r==="top"&&this.drawCaret(t,e,s,n),e.lineTo(a+c-u,l),e.quadraticCurveTo(a+c,l,a+c,l+u),r==="center"&&o==="right"&&this.drawCaret(t,e,s,n),e.lineTo(a+c,l+h-p),e.quadraticCurveTo(a+c,l+h,a+c-p,l+h),r==="bottom"&&this.drawCaret(t,e,s,n),e.lineTo(a+f,l+h),e.quadraticCurveTo(a,l+h,a,l+h-f),r==="center"&&o==="left"&&this.drawCaret(t,e,s,n),e.lineTo(a,l+d),e.quadraticCurveTo(a,l,a+d,l),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){const r=Nt[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=Ji(this,t),l=Object.assign({},r,this._size),c=Qi(e,t,l),h=Zi(t,l,c,e);(n._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const r=Q(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),Ds(t,e.textDirection),o.y+=r.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Os(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const s=this._active,n=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!fe(s,n),r=this._positionChanged(n,e);(o||r)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],r=this._getActiveElements(t,o,e,s),a=this._positionChanged(r,t),l=e||!fe(r,o)||a;return l&&(this._active=r,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:s,caretY:n,options:o}=this,r=Nt[o.position].call(this,t,e);return r!==!1&&(s!==r.x||n!==r.y)}}var el={id:"tooltip",_element:is,positioners:Nt,afterInit(i,t,e){e&&(i.tooltip=new is({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Ks},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Fa=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Ba(i,t,e,s){const n=i.indexOf(t);if(n===-1)return Fa(i,t,e,s);const o=i.lastIndexOf(t);return n!==o?e:n}const Wa=(i,t)=>i===null?null:Y(Math.round(i),0,t);function ss(i){const t=this.getLabels();return i>=0&&i<t.length?t[i]:i}class il extends Rt{static id="category";static defaults={ticks:{callback:ss}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const s=this.getLabels();for(const{index:n,label:o}of e)s[n]===o&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(T(t))return null;const s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:Ba(s,t,P(e,t),this._addedLabels),Wa(e,s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),e||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){const t=this.min,e=this.max,s=this.options.offset,n=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let r=t;r<=e;r++)n.push({value:r});return n}getLabelForValue(t){return ss.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Ha(i,t){const e=[],{bounds:n,step:o,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,p=h-1,{min:g,max:m}=t,b=!T(r),_=!T(a),y=!T(c),v=(m-g)/(d+1);let x=ni((m-g)/p/f)*f,k,S,M,w;if(x<1e-14&&!b&&!_)return[{value:g},{value:m}];w=Math.ceil(m/x)-Math.floor(g/x),w>p&&(x=ni(w*x/p/f)*f),T(l)||(k=Math.pow(10,l),x=Math.ceil(x*k)/k),n==="ticks"?(S=Math.floor(g/x)*x,M=Math.ceil(m/x)*x):(S=g,M=m),b&&_&&o&&an((a-r)/o,x/1e3)?(w=Math.round(Math.min((a-r)/x,h)),x=(a-r)/w,S=r,M=a):y?(S=b?r:S,M=_?a:M,w=c-1,x=(M-S)/w):(w=(M-S)/x,jt(w,Math.round(w),x/1e3)?w=Math.round(w):w=Math.ceil(w));const D=Math.max(oi(x),oi(S));k=Math.pow(10,T(l)?D:l),S=Math.round(S*k)/k,M=Math.round(M*k)/k;let C=0;for(b&&(u&&S!==r?(e.push({value:r}),S<r&&C++,jt(Math.round((S+C*x)*k)/k,r,ns(r,v,i))&&C++):S<r&&C++);C<w;++C){const O=Math.round((S+C*x)*k)/k;if(_&&O>a)break;e.push({value:O})}return _&&u&&M!==a?e.length&&jt(e[e.length-1].value,a,ns(a,v,i))?e[e.length-1].value=a:e.push({value:a}):(!_||M===a)&&e.push({value:M}),e}function ns(i,t,{horizontal:e,minRotation:s}){const n=lt(s),o=(e?Math.sin(n):Math.cos(n))||.001,r=.75*t*(""+i).length;return Math.min(t/o,r)}class Na extends Rt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return T(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const r=l=>n=e?n:l,a=l=>o=s?o:l;if(t){const l=nt(n),c=nt(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(\`scales.\${this.id}.ticks.stepSize: \${s} would result generating up to \${n} ticks. Limiting to 1000.\`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,r=Ha(n,o);return t.bounds==="ticks"&&ln(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return Ye(t,this.chart.options.locale,this.options.ticks.format)}}class sl extends Na{static id="linear";static defaults={ticks:{callback:ys.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=J(t)?t:0,this.max=J(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=lt(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const ke={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},K=Object.keys(ke);function os(i,t){return i-t}function rs(i,t){if(T(t))return null;const e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts;let r=t;return typeof s=="function"&&(r=s(r)),J(r)||(r=typeof s=="string"?e.parse(r,s):e.parse(r)),r===null?null:(n&&(r=n==="week"&&(Kt(o)||o===!0)?e.startOf(r,"isoWeek",o):e.startOf(r,n)),+r)}function as(i,t,e,s){const n=K.length;for(let o=K.indexOf(i);o<n-1;++o){const r=ke[K[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((e-t)/(a*r.size))<=s)return K[o]}return K[n-1]}function Va(i,t,e,s,n){for(let o=K.length-1;o>=K.indexOf(e);o--){const r=K[o];if(ke[r].common&&i._adapter.diff(n,s,r)>=t-1)return r}return K[e?K.indexOf(e):0]}function ja(i){for(let t=K.indexOf(i)+1,e=K.length;t<e;++t)if(ke[K[t]].common)return K[t]}function ls(i,t,e){if(!e)i[t]=!0;else if(e.length){const{lo:s,hi:n}=Ve(e,t),o=e[s]>=t?e[s]:e[n];i[o]=!0}}function $a(i,t,e,s){const n=i._adapter,o=+n.startOf(t[0].value,s),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+n.add(a,1,s))l=e[a],l>=0&&(t[l].major=!0);return t}function cs(i,t,e){const s=[],n={},o=t.length;let r,a;for(r=0;r<o;++r)a=t[r],n[a]=r,s.push({value:a,major:!1});return o===0||!e?s:$a(i,s,n,e)}class hs extends Rt{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const s=t.time||(t.time={}),n=this._adapter=new Ko._date(t.adapters.date);n.init(e),Vt(s.displayFormats,n.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:rs(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,s=t.time.unit||"day";let{min:n,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(n=Math.min(n,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),n=J(n)&&!isNaN(n)?n:+e.startOf(Date.now(),s),o=J(o)&&!isNaN(o)?o:+e.endOf(Date.now(),s)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],s=t[t.length-1]),{min:e,max:s}}buildTicks(){const t=this.options,e=t.time,s=t.ticks,n=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const o=this.min,r=this.max,a=fn(n,o,r);return this._unit=e.unit||(s.autoSkip?as(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Va(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:ja(this._unit),this.initOffsets(n),t.reverse&&a.reverse(),cs(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;e=Y(e,0,r),s=Y(s,0,r),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){const t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,r=o.unit||as(o.minUnit,e,s,this._getLabelCapacity(e)),a=P(n.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=Kt(l)||l===!0,h={};let d=e,u,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":r),t.diff(s,e,r)>1e5*a)throw new Error(e+" and "+s+" are too far apart with stepSize of "+a+" "+r);const p=n.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;u<s;u=+t.add(u,a,r),f++)ls(h,u,p);return(u===s||n.bounds==="ticks"||f===1)&&ls(h,u,p),Object.keys(h).sort(os).map(g=>+g)}getLabelForValue(t){const e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,r=e||n[o];return this._adapter.format(t,r)}_tickFormatFunction(t,e,s,n){const o=this.options,r=o.ticks.callback;if(r)return E(r,[t,e,s],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&a[l],d=c&&a[c],u=s[e],f=c&&d&&u&&u.major;return this._adapter.format(t,n||(f?d:h))}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e<s;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+s)*e.factor)}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,s=this.ctx.measureText(t).width,n=lt(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),r=Math.sin(n),a=this._resolveTickFontOptions(0).size;return{w:s*o+a*r,h:s*r+a*o}}_getLabelCapacity(t){const e=this.options.time,s=e.displayFormats,n=s[e.unit]||s.millisecond,o=this._tickFormatFunction(t,0,cs(this,[t],this._majorUnit),n),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e<s;++e)t=t.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,s;if(t.length)return t;const n=this.getLabels();for(e=0,s=n.length;e<s;++e)t.push(rs(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return bs(t.sort(os))}}function he(i,t,e){let s=0,n=i.length-1,o,r,a,l;e?(t>=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=yt(i,"pos",t)),{pos:o,time:a}=i[s],{pos:r,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=yt(i,"time",t)),{time:o,pos:a}=i[s],{time:r,pos:l}=i[n]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class nl extends hs{static id="timeseries";static defaults=hs.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=he(e,this.min),this._tableRange=he(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:s}=this,n=[],o=[];let r,a,l,c,h;for(r=0,a=t.length;r<a;++r)c=t[r],c>=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(r=0,a=n.length;r<a;++r)h=n[r+1],l=n[r-1],c=n[r],Math.round((h+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){const t=this.min,e=this.max;let s=super.getDataTimestamps();return(!s.includes(t)||!s.length)&&s.splice(0,0,t),(!s.includes(e)||s.length===1)&&s.push(e),s.sort((n,o)=>n-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(he(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return he(this._table,s*this._tableRange+this._minPos,!0)}}export{Ga as A,Ua as B,sa as C,Xa as D,Ka as L,Ja as P,il as a,sl as b,qa as c,el as d,Za as e,Qa as f,tl as p};
21224
21279
  `,
21225
- "index-Chy1BWYs.css": "*,: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,[data-theme]{background-color:var(--fallback-b1,oklch(var(--b1)/1));color:var(--fallback-bc,oklch(var(--bc)/1))}@supports not (color: oklch(0% 0 0)){:root{color-scheme:light;--fallback-p: #491eff;--fallback-pc: #d4dbff;--fallback-s: #ff41c7;--fallback-sc: #fff9fc;--fallback-a: #00cfbd;--fallback-ac: #00100d;--fallback-n: #2b3440;--fallback-nc: #d7dde4;--fallback-b1: #ffffff;--fallback-b2: #e5e6e6;--fallback-b3: #e5e6e6;--fallback-bc: #1f2937;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--fallback-p: #7582ff;--fallback-pc: #050617;--fallback-s: #ff71cf;--fallback-sc: #190211;--fallback-a: #00c7b5;--fallback-ac: #000e0c;--fallback-n: #2a323c;--fallback-nc: #a6adbb;--fallback-b1: #1d232a;--fallback-b2: #191e24;--fallback-b3: #15191e;--fallback-bc: #a6adbb;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}}}html{-webkit-tap-highlight-color:transparent}*{scrollbar-color:color-mix(in oklch,currentColor 35%,transparent) transparent}*:hover{scrollbar-color:color-mix(in oklch,currentColor 60%,transparent) transparent}:root{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}}[data-theme=light]{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}[data-theme=dark]{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}.alert{display:grid;width:100%;grid-auto-flow:row;align-content:flex-start;align-items:center;justify-items:center;gap:1rem;text-align:center;border-radius:var(--rounded-box, 1rem);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));padding:1rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-b2,oklch(var(--b2)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1));background-color:var(--alert-bg)}@media (min-width: 640px){.alert{grid-auto-flow:column;grid-template-columns:auto minmax(auto,1fr);justify-items:start;text-align:start}}.avatar.placeholder>div{display:flex;align-items:center;justify-content:center}.badge{display:inline-flex;align-items:center;justify-content:center;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;height:1.25rem;font-size:.875rem;line-height:1.25rem;width:-moz-fit-content;width:fit-content;padding-left:.563rem;padding-right:.563rem;border-radius:var(--rounded-badge, 1.9rem);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}@media (hover:hover){.label a:hover{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.menu li>*:not(ul,.menu-title,details,.btn):active,.menu li>*:not(ul,.menu-title,details,.btn).active,.menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.table tr.hover:hover,.table tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.hover:hover,.table-zebra tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}}.btn{display:inline-flex;height:3rem;min-height:3rem;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;border-radius:var(--rounded-btn, .5rem);border-color:transparent;border-color:oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity));padding-left:1rem;padding-right:1rem;text-align:center;font-size:.875rem;line-height:1em;gap:.5rem;font-weight:600;text-decoration-line:none;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);border-width:var(--border-btn, 1px);transition-property:color,background-color,border-color,opacity,box-shadow,transform;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--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);outline-color:var(--fallback-bc,oklch(var(--bc)/1));background-color:oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity));--tw-bg-opacity: 1;--tw-border-opacity: 1}.btn-disabled,.btn[disabled],.btn:disabled{pointer-events:none}.btn-square{height:3rem;width:3rem;padding:0}.btn-circle{height:3rem;width:3rem;border-radius:9999px;padding:0}:where(.btn:is(input[type=checkbox])),:where(.btn:is(input[type=radio])){width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none}.btn:is(input[type=checkbox]):after,.btn:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}.card{position:relative;display:flex;flex-direction:column;border-radius:var(--rounded-box, 1rem)}.card:focus{outline:2px solid transparent;outline-offset:2px}.card-body{display:flex;flex:1 1 auto;flex-direction:column;padding:var(--padding-card, 2rem);gap:.5rem}.card-body :where(p){flex-grow:1}.card-actions{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.5rem}.card figure{display:flex;align-items:center;justify-content:center}.card.image-full{display:grid}.card.image-full:before{position:relative;content:\"\";z-index:10;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));opacity:.75}.card.image-full:before,.card.image-full>*{grid-column-start:1;grid-row-start:1}.card.image-full>figure img{height:100%;-o-object-fit:cover;object-fit:cover}.card.image-full>.card-body{position:relative;z-index:20;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.checkbox{flex-shrink:0;--chkbg: var(--fallback-bc,oklch(var(--bc)/1));--chkfg: var(--fallback-b1,oklch(var(--b1)/1));height:1.5rem;width:1.5rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}.collapse:not(td):not(tr):not(colgroup){visibility:visible}.collapse{position:relative;display:grid;overflow:hidden;grid-template-rows:max-content 0fr;transition:grid-template-rows .2s;width:100%;border-radius:var(--rounded-box, 1rem)}.collapse-title,.collapse>input[type=checkbox],.collapse>input[type=radio],.collapse-content{grid-column-start:1;grid-row-start:1}.collapse>input[type=checkbox],.collapse>input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){height:100%;width:100%;z-index:1}.collapse-content{visibility:hidden;grid-column-start:1;grid-row-start:2;min-height:0px;transition:visibility .2s;transition:padding .2s ease-out,background-color .2s ease-out;padding-left:1rem;padding-right:1rem;cursor:unset}.collapse[open],.collapse-open,.collapse:focus:not(.collapse-close){grid-template-rows:max-content 1fr}.collapse:not(.collapse-close):has(>input[type=checkbox]:checked),.collapse:not(.collapse-close):has(>input[type=radio]:checked){grid-template-rows:max-content 1fr}.collapse[open]>.collapse-content,.collapse-open>.collapse-content,.collapse:focus:not(.collapse-close)>.collapse-content,.collapse:not(.collapse-close)>input[type=checkbox]:checked~.collapse-content,.collapse:not(.collapse-close)>input[type=radio]:checked~.collapse-content{visibility:visible;min-height:-moz-fit-content;min-height:fit-content}.divider{display:flex;flex-direction:row;align-items:center;align-self:stretch;margin-top:1rem;margin-bottom:1rem;height:1rem;white-space:nowrap}.divider:before,.divider:after{height:.125rem;width:100%;flex-grow:1;--tw-content: \"\";content:var(--tw-content);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.dropdown{position:relative;display:inline-block}.dropdown>*:not(summary):focus{outline:2px solid transparent;outline-offset:2px}.dropdown .dropdown-content{position:absolute}.dropdown:is(:not(details)) .dropdown-content{visibility:hidden;opacity:0;transform-origin:top;--tw-scale-x: .95;--tw-scale-y: .95;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));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s}.dropdown-end .dropdown-content{inset-inline-end:0px}.dropdown-left .dropdown-content{bottom:auto;inset-inline-end:100%;top:0;transform-origin:right}.dropdown-right .dropdown-content{bottom:auto;inset-inline-start:100%;top:0;transform-origin:left}.dropdown-bottom .dropdown-content{bottom:auto;top:100%;transform-origin:top}.dropdown-top .dropdown-content{bottom:100%;top:auto;transform-origin:bottom}.dropdown-end.dropdown-right .dropdown-content,.dropdown-end.dropdown-left .dropdown-content{bottom:0;top:auto}.dropdown.dropdown-open .dropdown-content,.dropdown:not(.dropdown-hover):focus .dropdown-content,.dropdown:focus-within .dropdown-content{visibility:visible;opacity:1}@media (hover: hover){.dropdown.dropdown-hover:hover .dropdown-content{visibility:visible;opacity:1}.btm-nav>*.disabled:hover,.btm-nav>*[disabled]:hover{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btn:hover{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn:hover{background-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity, 1)) 90%,black);border-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity, 1)) 90%,black)}}@supports not (color: oklch(0% 0 0)){.btn:hover{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}}.btn.glass:hover{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-ghost:hover{border-color:transparent}@supports (color: oklch(0% 0 0)){.btn-ghost:hover{background-color:var(--fallback-bc,oklch(var(--bc)/.2))}}.btn-outline:hover{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary:hover{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary:hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.btn-outline.btn-secondary:hover{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-secondary:hover{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}}.btn-outline.btn-accent:hover{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-accent:hover{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}}.btn-outline.btn-success:hover{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-success:hover{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}}.btn-outline.btn-info:hover{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-info:hover{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}}.btn-outline.btn-warning:hover{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-warning:hover{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}}.btn-outline.btn-error:hover{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-error:hover{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}.btn-disabled:hover,.btn[disabled]:hover,.btn:disabled:hover{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}@supports (color: color-mix(in oklab,black,black)){.btn:is(input[type=checkbox]:checked):hover,.btn:is(input[type=radio]:checked):hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.dropdown.dropdown-hover:hover .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;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))}:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{cursor:pointer;outline:2px solid transparent;outline-offset:2px}@supports (color: oklch(0% 0 0)){:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{background-color:var(--fallback-bc,oklch(var(--bc)/.1))}}}.dropdown:is(details) summary::-webkit-details-marker{display:none}.form-control{display:flex;flex-direction:column}.label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;justify-content:space-between;padding:.5rem .25rem}.input{flex-shrink:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:2;line-height:1.5rem;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.input[type=number]::-webkit-inner-spin-button,.input-md[type=number]::-webkit-inner-spin-button{margin-top:-1rem;margin-bottom:-1rem;margin-inline-end:-1rem}.input-sm[type=number]::-webkit-inner-spin-button{margin-top:0;margin-bottom:0;margin-inline-end:-0px}.join{display:inline-flex;align-items:stretch;border-radius:var(--rounded-btn, .5rem)}.join :where(.join-item){border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:not(:first-child):not(:last-child),.join *:not(:first-child):not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0}.join .dropdown .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .dropdown .join-item{border-start-end-radius:inherit;border-end-end-radius:inherit}.join :where(.join-item:first-child:not(:last-child)),.join :where(*:first-child:not(:last-child) .join-item){border-end-start-radius:inherit;border-start-start-radius:inherit}.join .join-item:last-child:not(:first-child),.join *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0}.join :where(.join-item:last-child:not(:first-child)),.join :where(*:last-child:not(:first-child) .join-item){border-start-end-radius:inherit;border-end-end-radius:inherit}@supports not selector(:has(*)){:where(.join *){border-radius:inherit}}@supports selector(:has(*)){:where(.join *:has(.join-item)){border-radius:inherit}}.menu{display:flex;flex-direction:column;flex-wrap:wrap;font-size:.875rem;line-height:1.25rem;padding:.5rem}.menu :where(li ul){position:relative;white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem}.menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){display:grid;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;grid-auto-columns:minmax(auto,max-content) auto max-content;-webkit-user-select:none;-moz-user-select:none;user-select:none}.menu li.disabled{cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;user-select:none;color:var(--fallback-bc,oklch(var(--bc)/.3))}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}:where(.menu li){position:relative;display:flex;flex-shrink:0;flex-direction:column;flex-wrap:wrap;align-items:stretch}:where(.menu li) .badge{justify-self:end}.modal{pointer-events:none;position:fixed;inset:0;margin:0;display:grid;height:100%;max-height:none;width:100%;max-width:none;justify-items:center;padding:0;opacity:0;overscroll-behavior:contain;z-index:999;background-color:transparent;color:inherit;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:transform,opacity,visibility;overflow-y:hidden}:where(.modal){align-items:center}.modal-box{max-height:calc(100vh - 5em);grid-column-start:1;grid-row-start:1;width:91.666667%;max-width:32rem;--tw-scale-x: .9;--tw-scale-y: .9;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));border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem);border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));padding:1.5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;box-shadow:#00000040 0 25px 50px -12px;overflow-y:auto;overscroll-behavior:contain}.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open]{pointer-events:auto;visibility:visible;opacity:1}.modal-action{display:flex;margin-top:1.5rem;justify-content:flex-end}.modal-toggle{position:fixed;height:0px;width:0px;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}:root:has(:is(.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open])){overflow:hidden;scrollbar-gutter:stable}.navbar{display:flex;align-items:center;padding:var(--navbar-padding, .5rem);min-height:4rem;width:100%}:where(.navbar>*:not(script,style)){display:inline-flex;align-items:center}.radio{flex-shrink:0;--chkbg: var(--bc);height:1.5rem;width:1.5rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:9999px;border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}.range{height:1.5rem;width:100%;cursor:pointer;-moz-appearance:none;appearance:none;-webkit-appearance:none;--range-shdw: var(--fallback-bc,oklch(var(--bc)/1));overflow:hidden;border-radius:var(--rounded-box, 1rem);background-color:transparent}.range:focus{outline:none}.select{display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;min-height:3rem;padding-inline-start:1rem;padding-inline-end:2.5rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-size:4px 4px,4px 4px;background-repeat:no-repeat}.select[multiple]{height:auto}.stats{display:inline-grid;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}:where(.stats){grid-auto-flow:column;overflow-x:auto}.steps{display:inline-grid;grid-auto-flow:column;overflow:hidden;overflow-x:auto;counter-reset:step;grid-auto-columns:1fr}.steps .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-columns:auto;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-rows:40px 1fr;place-items:center;text-align:center;min-width:4rem}.table{position:relative;width:100%;border-radius:var(--rounded-box, 1rem);text-align:left;font-size:.875rem;line-height:1.25rem}.table :where(.table-pin-rows thead tr){position:sticky;top:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-rows tfoot tr){position:sticky;bottom:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-cols tr th){position:sticky;left:0;right:0;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table-zebra tbody tr:nth-child(2n) :where(.table-pin-cols tr th){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.textarea{min-height:3rem;flex-shrink:1;padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.toast{position:fixed;display:flex;min-width:-moz-fit-content;min-width:fit-content;flex-direction:column;white-space:nowrap;gap:.5rem;padding:1rem}.alert-info{border-color:var(--fallback-in,oklch(var(--in)/.2));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-in,oklch(var(--in)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-success{border-color:var(--fallback-su,oklch(var(--su)/.2));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-su,oklch(var(--su)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-warning{border-color:var(--fallback-wa,oklch(var(--wa)/.2));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));--alert-bg: var(--fallback-wa,oklch(var(--wa)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-error{border-color:var(--fallback-er,oklch(var(--er)/.2));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-er,oklch(var(--er)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.badge-primary{--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.badge-info{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.badge-success{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.badge-warning{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.badge-error{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.badge-ghost{--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.badge-outline{border-color:currentColor;--tw-border-opacity: .5;background-color:transparent;color:currentColor}.badge-outline.badge-neutral{--tw-text-opacity: 1;color:var(--fallback-n,oklch(var(--n)/var(--tw-text-opacity)))}.badge-outline.badge-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.badge-outline.badge-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}.badge-outline.badge-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}.badge-outline.badge-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}.badge-outline.badge-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.badge-outline.badge-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}.badge-outline.badge-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btm-nav>*:where(.active){border-top-width:2px;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.btm-nav>*.disabled,.btm-nav>*[disabled]{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btm-nav>* .label{font-size:1rem;line-height:1.5rem}@media (prefers-reduced-motion: no-preference){.btn{animation:button-pop var(--animation-btn, .25s) ease-out}}.btn:active:hover,.btn:active:focus{animation:button-pop 0s ease-out;transform:scale(var(--btn-focus-scale, .97))}@supports not (color: oklch(0% 0 0)){.btn{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}.btn-primary{--btn-color: var(--fallback-p)}.btn-secondary{--btn-color: var(--fallback-s)}.btn-success{--btn-color: var(--fallback-su)}.btn-warning{--btn-color: var(--fallback-wa)}.btn-error{--btn-color: var(--fallback-er)}}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary.btn-active{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}.btn-outline.btn-secondary.btn-active{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}.btn-outline.btn-accent.btn-active{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}.btn-outline.btn-success.btn-active{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}.btn-outline.btn-info.btn-active{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}.btn-outline.btn-warning.btn-active{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}.btn-outline.btn-error.btn-active{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}.btn:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px}.btn-primary{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));outline-color:var(--fallback-p,oklch(var(--p)/1))}@supports (color: oklch(0% 0 0)){.btn-primary{--btn-color: var(--p)}.btn-secondary{--btn-color: var(--s)}.btn-success{--btn-color: var(--su)}.btn-warning{--btn-color: var(--wa)}.btn-error{--btn-color: var(--er)}}.btn-secondary{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)));outline-color:var(--fallback-s,oklch(var(--s)/1))}.btn-success{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));outline-color:var(--fallback-su,oklch(var(--su)/1))}.btn-warning{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));outline-color:var(--fallback-wa,oklch(var(--wa)/1))}.btn-error{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}.btn.glass{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn.glass.btn-active{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-ghost{border-width:1px;border-color:transparent;background-color:transparent;color:currentColor;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn-ghost.btn-active{border-color:transparent;background-color:var(--fallback-bc,oklch(var(--bc)/.2))}.btn-outline{border-color:currentColor;background-color:transparent;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.btn-outline.btn-active{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.btn-outline.btn-primary.btn-active{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn-outline.btn-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}.btn-outline.btn-secondary.btn-active{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.btn-outline.btn-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}.btn-outline.btn-accent.btn-active{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.btn-outline.btn-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.btn-outline.btn-success.btn-active{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.btn-outline.btn-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}.btn-outline.btn-info.btn-active{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.btn-outline.btn-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}.btn-outline.btn-warning.btn-active{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.btn-outline.btn-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btn-outline.btn-error.btn-active{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.btn.btn-disabled,.btn[disabled],.btn:disabled{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btn:is(input[type=checkbox]:checked),.btn:is(input[type=radio]:checked){--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn:is(input[type=checkbox]:checked):focus-visible,.btn:is(input[type=radio]:checked):focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}@keyframes button-pop{0%{transform:scale(var(--btn-focus-scale, .98))}40%{transform:scale(1.02)}to{transform:scale(1)}}.card :where(figure:first-child){overflow:hidden;border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-start-radius:unset;border-end-end-radius:unset}.card :where(figure:last-child){overflow:hidden;border-start-start-radius:unset;border-start-end-radius:unset;border-end-start-radius:inherit;border-end-end-radius:inherit}.card:focus-visible{outline:2px solid currentColor;outline-offset:2px}.card.bordered{border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.card.compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-title{display:flex;align-items:center;gap:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}.card.image-full :where(figure){overflow:hidden;border-radius:inherit}.checkbox:focus{box-shadow:none}.checkbox:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.checkbox:disabled{border-width:0px;cursor:not-allowed;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.2}.checkbox:checked,.checkbox[aria-checked=true]{background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-color:var(--chkbg);background-image:linear-gradient(-45deg,transparent 65%,var(--chkbg) 65.99%),linear-gradient(45deg,transparent 75%,var(--chkbg) 75.99%),linear-gradient(-45deg,var(--chkbg) 40%,transparent 40.99%),linear-gradient(45deg,var(--chkbg) 30%,var(--chkfg) 30.99%,var(--chkfg) 40%,transparent 40.99%),linear-gradient(-45deg,var(--chkfg) 50%,var(--chkbg) 50.99%)}.checkbox:indeterminate{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-image:linear-gradient(90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(-90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(0deg,var(--chkbg) 43%,var(--chkfg) 43%,var(--chkfg) 57%,var(--chkbg) 57%)}@keyframes checkmark{0%{background-position-y:5px}50%{background-position-y:-2px}to{background-position-y:0}}details.collapse{width:100%}details.collapse summary{position:relative;display:block;outline:2px solid transparent;outline-offset:2px}details.collapse summary::-webkit-details-marker{display:none}.collapse:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse:has(.collapse-title:focus-visible),.collapse:has(>input[type=checkbox]:focus-visible),.collapse:has(>input[type=radio]:focus-visible){outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse-arrow>.collapse-title:after{position:absolute;display:block;height:.5rem;width:.5rem;--tw-translate-y: -100%;--tw-rotate: 45deg;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));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.15s;transition-duration:.2s;top:1.9rem;inset-inline-end:1.4rem;content:\"\";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.collapse-plus>.collapse-title:after{position:absolute;display:block;height:.5rem;width:.5rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.3s;top:.9rem;inset-inline-end:1.4rem;content:\"+\";pointer-events:none}.collapse:not(.collapse-open):not(.collapse-close)>input[type=checkbox],.collapse:not(.collapse-open):not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(.collapse-open):not(.collapse-close)>.collapse-title{cursor:pointer}.collapse:focus:not(.collapse-open):not(.collapse-close):not(.collapse[open])>.collapse-title{cursor:unset}.collapse-title{position:relative}.collapse-title,:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){padding:1rem;padding-inline-end:3rem;min-height:3.75rem;transition:background-color .2s ease-out}.collapse[open]>:where(.collapse-content),.collapse-open>:where(.collapse-content),.collapse:focus:not(.collapse-close)>:where(.collapse-content),.collapse:not(.collapse-close)>:where(input[type=checkbox]:checked~.collapse-content),.collapse:not(.collapse-close)>:where(input[type=radio]:checked~.collapse-content){padding-bottom:1rem;transition:padding .2s ease-out,background-color .2s ease-out}.collapse[open].collapse-arrow>.collapse-title:after,.collapse-open.collapse-arrow>.collapse-title:after,.collapse-arrow:focus:not(.collapse-close)>.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after{--tw-translate-y: -50%;--tw-rotate: 225deg;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))}.collapse[open].collapse-plus>.collapse-title:after,.collapse-open.collapse-plus>.collapse-title:after,.collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after{content:\"\u2212\"}.divider:not(:empty){gap:1rem}.dropdown.dropdown-open .dropdown-content,.dropdown:focus .dropdown-content,.dropdown:focus-within .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;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))}.label-text{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.label-text-alt{font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.input input{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));background-color:transparent}.input input:focus{outline:2px solid transparent;outline-offset:2px}.input[list]::-webkit-calendar-picker-indicator{line-height:1em}.input-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input:focus,.input:focus-within{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input-error{--tw-border-opacity: 1;border-color:var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)))}.input-error:focus,.input-error:focus-within{--tw-border-opacity: 1;border-color:var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}.input:has(>input[disabled]),.input-disabled,.input:disabled,.input[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.input:has(>input[disabled])::-moz-placeholder,.input-disabled::-moz-placeholder,.input:disabled::-moz-placeholder,.input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])::placeholder,.input-disabled::placeholder,.input:disabled::placeholder,.input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.join>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1)}.join-item:focus{isolation:isolate}.\\!loading{pointer-events:none!important;display:inline-block!important;aspect-ratio:1 / 1!important;width:1.5rem!important;background-color:currentColor!important;-webkit-mask-size:100%!important;mask-size:100%!important;-webkit-mask-repeat:no-repeat!important;mask-repeat:no-repeat!important;-webkit-mask-position:center!important;mask-position:center!important;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")!important;mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")!important}.loading{pointer-events:none;display:inline-block;aspect-ratio:1 / 1;width:1.5rem;background-color:currentColor;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")}.loading-spinner{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")}.loading-xs{width:1rem}.loading-sm{width:1.25rem}.loading-lg{width:2.5rem}:where(.menu li:empty){--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;margin:.5rem 1rem;height:1px}.menu :where(li ul):before{position:absolute;bottom:.75rem;inset-inline-start:0px;top:.75rem;width:1px;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;content:\"\"}.menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--rounded-btn, .5rem);padding:.5rem 1rem;text-align:start;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;text-wrap:balance}:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):is(summary):not(.active,.btn):focus-visible,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):is(summary):not(.active,.btn):focus-visible{cursor:pointer;background-color:var(--fallback-bc,oklch(var(--bc)/.1));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));outline:2px solid transparent;outline-offset:2px}.menu li>*:not(ul,.menu-title,details,.btn):active,.menu li>*:not(ul,.menu-title,details,.btn).active,.menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.menu :where(li>details>summary)::-webkit-details-marker{display:none}.menu :where(li>details>summary):after,.menu :where(li>.menu-dropdown-toggle):after{justify-self:end;display:block;margin-top:-.5rem;height:.5rem;width:.5rem;transform:rotate(45deg);transition-property:transform,margin-top;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);content:\"\";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{transform:rotate(225deg);margin-top:0}.mockup-phone .display{overflow:hidden;border-radius:40px;margin-top:-25px}.mockup-browser .mockup-browser-toolbar .input{position:relative;margin-left:auto;margin-right:auto;display:block;height:1.75rem;width:24rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:2rem;direction:ltr}.mockup-browser .mockup-browser-toolbar .input:before{content:\"\";position:absolute;left:.5rem;top:50%;aspect-ratio:1 / 1;height:.75rem;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:2px;border-color:currentColor;opacity:.6}.mockup-browser .mockup-browser-toolbar .input:after{content:\"\";position:absolute;left:1.25rem;top:50%;height:.5rem;--tw-translate-y: 25%;--tw-rotate: -45deg;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));border-radius:9999px;border-width:1px;border-color:currentColor;opacity:.6}.modal:not(dialog:not(.modal-open)),.modal::backdrop{background-color:#0006;animation:modal-pop .2s ease-out}.modal-backdrop{z-index:-1;grid-column-start:1;grid-row-start:1;display:grid;align-self:stretch;justify-self:stretch;color:transparent}.modal-open .modal-box,.modal-toggle:checked+.modal .modal-box,.modal:target .modal-box,.modal[open] .modal-box{--tw-translate-y: 0px;--tw-scale-x: 1;--tw-scale-y: 1;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))}.modal-action>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.modal-action:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}@keyframes modal-pop{0%{opacity:0}}@keyframes progress-loading{50%{background-position-x:-115%}}.radio:focus{box-shadow:none}.radio:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.radio:checked,.radio[aria-checked=true]{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-image:none;animation:radiomark var(--animation-input, .2s) ease-out;box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}.radio:disabled{cursor:not-allowed;opacity:.2}@keyframes radiomark{0%{box-shadow:0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset}50%{box-shadow:0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset}to{box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}}.range:focus-visible::-webkit-slider-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 2rem var(--range-shdw) inset}.range:focus-visible::-moz-range-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 2rem var(--range-shdw) inset}.range::-webkit-slider-runnable-track{height:.5rem;width:100%;border-radius:var(--rounded-box, 1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-moz-range-track{height:.5rem;width:100%;border-radius:var(--rounded-box, 1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-webkit-slider-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box, 1rem);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));appearance:none;-webkit-appearance:none;top:50%;color:var(--range-shdw);transform:translateY(-50%);--filler-size: 100rem;--filler-offset: .6rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}.range::-moz-range-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box, 1rem);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));top:50%;color:var(--range-shdw);--filler-size: 100rem;--filler-offset: .5rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}@keyframes rating-pop{0%{transform:translateY(-.125em)}40%{transform:translateY(-.125em)}to{transform:translateY(0)}}.select-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select-disabled,.select:disabled,.select[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.select-disabled::-moz-placeholder,.select:disabled::-moz-placeholder,.select[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.select-disabled::placeholder,.select:disabled::placeholder,.select[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.select-multiple,.select[multiple],.select[size].select:not([size=\"1\"]){background-image:none;padding-right:1rem}[dir=rtl] .select{background-position:calc(0% + 12px) calc(1px + 50%),calc(0% + 16px) calc(1px + 50%)}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}:where(.stats)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)));--tw-divide-y-reverse: 0;border-top-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(0px * var(--tw-divide-y-reverse))}[dir=rtl] .stats>*:not([hidden])~*:not([hidden]){--tw-divide-x-reverse: 1}.steps .step:before{top:0;grid-column-start:1;grid-row-start:1;height:.5rem;width:100%;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));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));content:\"\";margin-inline-start:-100%}.steps .step:after{content:counter(step);counter-increment:step;z-index:1;position:relative;grid-column-start:1;grid-row-start:1;display:grid;height:2rem;width:2rem;place-items:center;place-self:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.steps .step:first-child:before{content:none}.steps .step[data-content]:after{content:attr(data-content)}.steps .step-neutral+.step-neutral:before,.steps .step-neutral:after{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.steps .step-primary+.step-primary:before,.steps .step-primary:after{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.steps .step-secondary+.step-secondary:before,.steps .step-secondary:after{--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.steps .step-accent+.step-accent:before,.steps .step-accent:after{--tw-bg-opacity: 1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.steps .step-info+.step-info:before{--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)))}.steps .step-info:after{--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.steps .step-success+.step-success:before{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)))}.steps .step-success:after{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.steps .step-warning+.step-warning:before{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)))}.steps .step-warning:after{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.steps .step-error+.step-error:before{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)))}.steps .step-error:after{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.table:where([dir=rtl],[dir=rtl] *){text-align:right}.table :where(th,td){padding:.75rem 1rem;vertical-align:middle}.table tr.active,.table tr.active:nth-child(2n),.table-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.active,.table-zebra tr.active:nth-child(2n),.table-zebra-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}.table :where(thead tr,tbody tr:not(:last-child),tbody tr:first-child:last-child){border-bottom-width:1px;--tw-border-opacity: 1;border-bottom-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.table :where(thead,tfoot){white-space:nowrap;font-size:.75rem;line-height:1rem;font-weight:700;color:var(--fallback-bc,oklch(var(--bc)/.6))}.table :where(tfoot){border-top-width:1px;--tw-border-opacity: 1;border-top-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.textarea-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea-disabled,.textarea:disabled,.textarea[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.textarea-disabled::-moz-placeholder,.textarea:disabled::-moz-placeholder,.textarea[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.textarea-disabled::placeholder,.textarea:disabled::placeholder,.textarea[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.toast>*{animation:toast-pop .25s ease-out}@keyframes toast-pop{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.badge-xs{height:.75rem;font-size:.75rem;line-height:.75rem;padding-left:.313rem;padding-right:.313rem}.badge-sm{height:1rem;font-size:.75rem;line-height:1rem;padding-left:.438rem;padding-right:.438rem}.badge-lg{height:1.5rem;font-size:1rem;line-height:1.5rem;padding-left:.688rem;padding-right:.688rem}.btm-nav-xs>*:where(.active){border-top-width:1px}.btm-nav-sm>*:where(.active){border-top-width:2px}.btm-nav-md>*:where(.active){border-top-width:2px}.btm-nav-lg>*:where(.active){border-top-width:4px}.btn-xs{height:1.5rem;min-height:1.5rem;padding-left:.5rem;padding-right:.5rem;font-size:.75rem}.btn-sm{height:2rem;min-height:2rem;padding-left:.75rem;padding-right:.75rem;font-size:.875rem}.btn-square:where(.btn-xs){height:1.5rem;width:1.5rem;padding:0}.btn-square:where(.btn-sm){height:2rem;width:2rem;padding:0}.btn-square:where(.btn-md){height:3rem;width:3rem;padding:0}.btn-square:where(.btn-lg){height:4rem;width:4rem;padding:0}.btn-circle:where(.btn-xs){height:1.5rem;width:1.5rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-sm){height:2rem;width:2rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-md){height:3rem;width:3rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-lg){height:4rem;width:4rem;border-radius:9999px;padding:0}[type=checkbox].checkbox-sm{height:1.25rem;width:1.25rem}.input-sm{height:2rem;padding-left:.75rem;padding-right:.75rem;font-size:.875rem;line-height:2rem}.join.join-vertical{flex-direction:column}.join.join-vertical .join-item:first-child:not(:last-child),.join.join-vertical *:first-child:not(:last-child) .join-item{border-end-start-radius:0;border-end-end-radius:0;border-start-start-radius:inherit;border-start-end-radius:inherit}.join.join-vertical .join-item:last-child:not(:first-child),.join.join-vertical *:last-child:not(:first-child) .join-item{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:inherit}.join.join-horizontal{flex-direction:row}.join.join-horizontal .join-item:first-child:not(:last-child),.join.join-horizontal *:first-child:not(:last-child) .join-item{border-end-end-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-start-start-radius:inherit}.join.join-horizontal .join-item:last-child:not(:first-child),.join.join-horizontal *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0;border-end-end-radius:inherit;border-start-end-radius:inherit}.menu-horizontal{display:inline-flex;flex-direction:row}.menu-horizontal>li:not(.menu-title)>details>ul{position:absolute}.select-sm{height:2rem;min-height:2rem;padding-left:.75rem;padding-right:2rem;font-size:.875rem;line-height:2rem}[dir=rtl] .select-sm{padding-left:2rem;padding-right:.75rem}.steps-horizontal .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));place-items:center;text-align:center}.steps-vertical .step{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(1,minmax(0,1fr))}.textarea-sm{padding:.25rem .75rem;font-size:.875rem;line-height:2rem}:where(.toast){bottom:0;inset-inline-end:0px;inset-inline-start:auto;top:auto;--tw-translate-x: 0px;--tw-translate-y: 0px;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))}.toast:where(.toast-start){inset-inline-end:auto;inset-inline-start:0px;--tw-translate-x: 0px;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))}.toast:where(.toast-center){inset-inline-end:50%;inset-inline-start:50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-center):where([dir=rtl],[dir=rtl] *){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-end){inset-inline-end:0px;inset-inline-start:auto;--tw-translate-x: 0px;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))}.toast:where(.toast-bottom){bottom:0;top:auto;--tw-translate-y: 0px;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))}.toast:where(.toast-middle){bottom:auto;top:50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-top){bottom:auto;top:0;--tw-translate-y: 0px;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))}.tooltip{position:relative;display:inline-block;--tooltip-offset: calc(100% + 1px + var(--tooltip-tail, 0px))}.tooltip:before{position:absolute;pointer-events:none;z-index:1;content:var(--tw-content);--tw-content: attr(data-tip)}.tooltip:before,.tooltip-top:before{transform:translate(-50%);top:auto;left:50%;right:auto;bottom:var(--tooltip-offset)}.tooltip-right:before{transform:translateY(-50%);top:50%;left:var(--tooltip-offset);right:auto;bottom:auto}.card-compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-compact .card-title{margin-bottom:.25rem}.card-normal .card-body{padding:var(--padding-card, 2rem);font-size:1rem;line-height:1.5rem}.card-normal .card-title{margin-bottom:.75rem}.join.join-vertical>:where(*:not(:first-child)){margin-left:0;margin-right:0;margin-top:-1px}.join.join-vertical>:where(*:not(:first-child)):is(.btn){margin-top:calc(var(--border-btn) * -1)}.join.join-horizontal>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join.join-horizontal>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1);margin-top:0}.menu-horizontal>li:not(.menu-title)>details>ul{margin-inline-start:0px;margin-top:1rem;padding-top:.5rem;padding-bottom:.5rem;padding-inline-end:.5rem}.menu-horizontal>li>details>ul:before{content:none}:where(.menu-horizontal>li:not(.menu-title)>details>ul){border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--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)}.modal-top :where(.modal-box){width:100%;max-width:none;--tw-translate-y: -2.5rem;--tw-scale-x: 1;--tw-scale-y: 1;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));border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem);border-top-left-radius:0;border-top-right-radius:0}.modal-middle :where(.modal-box){width:91.666667%;max-width:32rem;--tw-translate-y: 0px;--tw-scale-x: .9;--tw-scale-y: .9;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));border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem)}.modal-bottom :where(.modal-box){width:100%;max-width:none;--tw-translate-y: 2.5rem;--tw-scale-x: 1;--tw-scale-y: 1;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));border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);border-bottom-right-radius:0;border-bottom-left-radius:0}.steps-horizontal .step{grid-template-rows:40px 1fr;grid-template-columns:auto;min-width:4rem}.steps-horizontal .step:before{height:.5rem;width:100%;--tw-translate-x: 0px;--tw-translate-y: 0px;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));content:\"\";margin-inline-start:-100%}.steps-horizontal .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x: 0px;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))}.steps-vertical .step{gap:.5rem;grid-template-columns:40px 1fr;grid-template-rows:auto;min-height:4rem;justify-items:start}.steps-vertical .step:before{height:100%;width:.5rem;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));margin-inline-start:50%}.steps-vertical .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.table-sm :not(thead):not(tfoot) tr{font-size:.875rem;line-height:1.25rem}.table-sm :where(th,td){padding:.5rem .75rem}.tooltip{position:relative;display:inline-block;text-align:center;--tooltip-tail: .1875rem;--tooltip-color: var(--fallback-n,oklch(var(--n)/1));--tooltip-text-color: var(--fallback-nc,oklch(var(--nc)/1));--tooltip-tail-offset: calc(100% + .0625rem - var(--tooltip-tail))}.tooltip:before,.tooltip:after{opacity:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-delay:.1s;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.tooltip:after{position:absolute;content:\"\";border-style:solid;border-width:var(--tooltip-tail, 0);width:0;height:0;display:block}.tooltip:before{max-width:20rem;white-space:normal;border-radius:.25rem;padding:.25rem .5rem;font-size:.875rem;line-height:1.25rem;background-color:var(--tooltip-color);color:var(--tooltip-text-color);width:-moz-max-content;width:max-content}.tooltip.tooltip-open:before{opacity:1;transition-delay:75ms}.tooltip.tooltip-open:after{opacity:1;transition-delay:75ms}.tooltip:hover:before{opacity:1;transition-delay:75ms}.tooltip:hover:after{opacity:1;transition-delay:75ms}.tooltip:has(:focus-visible):after,.tooltip:has(:focus-visible):before{opacity:1;transition-delay:75ms}.tooltip:not([data-tip]):hover:before,.tooltip:not([data-tip]):hover:after{visibility:hidden;opacity:0}.tooltip:after,.tooltip-top:after{transform:translate(-50%);border-color:var(--tooltip-color) transparent transparent transparent;top:auto;left:50%;right:auto;bottom:var(--tooltip-tail-offset)}.tooltip-right:after{transform:translateY(-50%);border-color:transparent var(--tooltip-color) transparent transparent;top:50%;left:calc(var(--tooltip-tail-offset) + .0625rem);right:auto;bottom:auto}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.top-\\[3em\\]{top:3em}.z-10{z-index:10}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.col-span-2{grid-column:span 2 / span 2}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-mt-0\\.5{margin-top:-.125rem}.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}.mb-8{margin-bottom:2rem}.ml-8{margin-left:2rem}.mr-1{margin-right:.25rem}.mr-32{margin-right:8rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-96{height:24rem}.h-\\[90vh\\]{height:90vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:8rem}.max-h-60{max-height:15rem}.max-h-96{max-height:24rem}.min-h-\\[2\\.5rem\\]{min-height:2.5rem}.min-h-screen{min-height:100vh}.w-1\\/3{width:33.333333%}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-full{width:100%}.w-px{width:1px}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-\\[2\\]{flex:2}.flex-none{flex:none}.shrink-0{flex-shrink:0}.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))}.cursor-pointer{cursor:pointer}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.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-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-box{border-radius:var(--rounded-box, 1rem)}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-base-300{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity, 1)))}.border-base-content\\/20{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.bg-base-100{--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity, 1)))}.bg-base-200{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}.bg-base-300{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity, 1)))}.bg-base-300\\/30{background-color:var(--fallback-b3,oklch(var(--b3)/.3))}.bg-base-content{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity, 1)))}.bg-base-content\\/30{background-color:var(--fallback-bc,oklch(var(--bc)/.3))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-error{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/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-primary{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity, 1)))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-success{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity, 1)))}.bg-warning{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity, 1)))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.stroke-current{stroke:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-64{padding-left:16rem;padding-right:16rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-6xl{font-size:3.75rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-7{line-height:1.75rem}.text-base-content{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity, 1)))}.text-base-content\\/60{color:var(--fallback-bc,oklch(var(--bc)/.6))}.text-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/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-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity, 1)))}.text-primary-content{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity, 1)))}.text-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity, 1)))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px 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-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.hover\\:bg-base-200:hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}.hover\\:bg-base-300:hover{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity, 1)))}.hover\\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\\:shadow-lg:hover{--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)}.group:hover .group-hover\\:opacity-90{opacity:.9}@media (min-width: 768px){.md\\:col-span-3{grid-column:span 3 / span 3}.md\\:inline{display:inline}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\\:col-span-2{grid-column:span 2 / span 2}.lg\\:col-span-6{grid-column:span 6 / span 6}.lg\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media (prefers-color-scheme: dark){.dark\\:bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\\:text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\\:hover\\:text-gray-100:hover{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}}.card.svelte-1qok2wg{backdrop-filter:blur(10px)}.active.svelte-1fgps4v{background-color:hsl(var(--p) / .2)}\n",
21226
- "zh-CN-bARHc6B8.js": 'const e={error:"\u9519\u8BEF",loading:"\u52A0\u8F7D\u4E2D...",save:"\u4FDD\uFFFD\uFFFD",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",edit:"\u7F16\u8F91",add:"\u6DFB\u52A0",confirm:"\u786E\u8BA4",reset:"\u91CD\u7F6E",search:"\u641C\u7D22",filter:"\u7B5B\u9009",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",close:"\u5173\u95ED"},t={dashboard:"\u4EEA\u8868\u677F",routes:"\u8DEF\u7531\u7BA1\u7406",logs:"\u8BF7\u6C42\u65E5\u5FD7",configuration:"\u914D\u7F6E\u4E2D\u5FC3"},r={title:"\u4EEA\u8868\u677F",dataRange:"\u6570\u636E\u65F6\u95F4\u8303\u56F4",totalRequests:"\u603B\u8BF7\u6C42\u6570",requestsPerSec:"\u6BCF\u79D2\u8BF7\u6C42\u6570",requestsPerSecond:"\u6BCF\u79D2\u8BF7\u6C42\u6570",successRate:"\u6210\u529F\u7387",avgResponseTime:"\u5E73\u5747\u54CD\u5E94\u65F6\u95F4",upstreamAnalysis:"\u4E0A\u6E38\u5206\u6790",upstreamDistribution:"\u4E0A\u6E38\u8BF7\u6C42\u5206\u5E03",upstreamFailures:"\u4E0A\u6E38\u5931\u8D25\u7EDF\u8BA1",upstreamStatusCodes:"\u4E0A\u6E38\u72B6\u6001\u7801\u5206\u5E03",noUpstreamData:"\u6240\u9009\u65F6\u95F4\u8303\u56F4\u5185\u6682\u65E0\u4E0A\u6E38\u6570\u636E",noData:"\u6682\u65E0\u6570\u636E"},a={title:"\u76D1\u63A7\u56FE\u8868",range:{"1h":"1\u5C0F\u65F6","12h":"12\u5C0F\u65F6","24h":"24\u5C0F\u65F6",oneHour:"1\u5C0F\u65F6",twelveHours:"12\u5C0F\u65F6",twentyFourHours:"24\u5C0F\u65F6"},charts:{requestsTrend:"\u8BF7\u6C42\u6570\u8D8B\u52BF",periodRequests:"\u65F6\u6BB5\u8BF7\u6C42\u6570",requests:"\u8BF7\u6C42\u6570",responseTimeTrend:"\u54CD\u5E94\u65F6\u95F4\u8D8B\u52BF",avgResponseTime:"\u5E73\u5747\u54CD\u5E94\u65F6\u95F4 (ms)",milliseconds:"\u6BEB\u79D2 (ms)",successRateTrend:"\u6210\u529F\u7387\u8D8B\u52BF",successRate:"\u6210\u529F\u7387 (%)",percentage:"\u767E\u5206\u6BD4 (%)",errorsTrend:"\u9519\u8BEF\u6570\u8D8B\u52BF",periodErrors:"\u65F6\u6BB5\u9519\u8BEF\u6570",errors:"\u9519\u8BEF\u6570"},noData:"\u6682\u65E0\u5386\u53F2\u6570\u636E"},o={title:"\u8DEF\u7531\u7BA1\u7406",subtitle:"\u7BA1\u7406\u60A8\u7684\u53CD\u5411\u4EE3\u7406\u8DEF\u7531\u548C\u4E0A\u6E38\u670D\u52A1\u5668",addRoute:"\u6DFB\u52A0\u8DEF\u7531",newRoute:"+ \u65B0\u5EFA\u8DEF\u7531",createFirstRoute:"\u521B\u5EFA\u7B2C\u4E00\u4E2A\u8DEF\u7531",editRoute:"\u7F16\u8F91\u8DEF\u7531",deleteRoute:"\u5220\u9664\u8DEF\u7531",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",path:"\u8DEF\u5F84",upstreams:"\u4E0A\u6E38\u670D\u52A1\u5668",actions:"\u64CD\u4F5C",searchPlaceholder:"\u641C\u7D22\u8DEF\u7531\u6216\u4E0A\u6E38\u670D\u52A1\u5668...",allTransformers:"\u6240\u6709\u8F6C\u6362\u5668",noRoutes:"\u6682\u65E0\u8DEF\u7531\u914D\u7F6E",noRoutesMessage:"\u521B\u5EFA\u60A8\u7684\u7B2C\u4E00\u4E2A\u8DEF\u7531\u4EE5\u5F00\u59CB\u4EE3\u7406\u8BF7\u6C42",noMatchingRoutes:"\u6CA1\u6709\u5339\u914D\u7684\u8DEF\u7531",noMatchingMessage:"\u8BF7\u5C1D\u8BD5\u8C03\u6574\u641C\u7D22\u6216\u7B5B\u9009\u6761\u4EF6",showingRoutes:"\u663E\u793A {count} / {total} \u4E2A\u8DEF\u7531",confirmDelete:"\u786E\u8BA4\u5220\u9664\u8DEF\u7531",confirmDeleteMessage:\'\u786E\u5B9A\u8981\u5220\u9664\u8DEF\u7531 "{path}" \u5417\uFF1F\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002\',deleted:\'\u8DEF\u7531 "{path}" \u5DF2\u5220\u9664\',deleteFailed:"\u5220\u9664\u5931\u8D25: {error}",duplicated:\'\u8DEF\u7531 "{path}" \u5DF2\u590D\u5236\',duplicateFailed:"\u590D\u5236\u5931\u8D25: {error}",noRoutesToExport:"\u6CA1\u6709\u53EF\u5BFC\u51FA\u7684\u8DEF\u7531",exported:"\u8DEF\u7531\u5DF2\u5BFC\u51FA",importMustBeArray:"\u5BFC\u5165\u6587\u4EF6\u5FC5\u987B\u662F\u8DEF\u7531\u6570\u7EC4",importSuccess:"\u6210\u529F\u5BFC\u5165 {success} \u4E2A\u8DEF\u7531",importPartialSuccess:"\u6210\u529F\u5BFC\u5165 {success} \u4E2A\u8DEF\u7531\uFF0C\u5931\u8D25 {failed} \u4E2A",importFailed:"\u5BFC\u5165\u5931\u8D25: {error}"},s={title:"\u914D\u7F6E\u4E2D\u5FC3",subtitle:"\u7F16\u8F91\u548C\u7BA1\u7406\u7CFB\u7EDF\u914D\u7F6E",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",reload:"\u91CD\u65B0\u52A0\u8F7D",restart:"\u91CD\u542F\u670D\u52A1",formEditor:"\u8868\u5355\u7F16\u8F91",jsonEditor:"JSON \u7F16\u8F91",systemSettings:"\u7CFB\u7EDF\u8BBE\u7F6E",serverPort:"\u670D\u52A1\u5668\u7AEF\u53E3",workerProcesses:"\u5DE5\u4F5C\u8FDB\u7A0B\u6570",workerProcessesHelp:"\u8981\u542F\u52A8\u7684\u5DE5\u4F5C\u8FDB\u7A0B\u6570\u91CF",logLevel:"\u65E5\u5FD7\u7EA7\u522B",bodyParserLimit:"\u8BF7\u6C42\u4F53\u5927\u5C0F\u9650\u5236",bodyParserLimitHelp:\'\u6700\u5927\u8BF7\u6C42\u4F53\u5927\u5C0F\uFF08\u4F8B\u5982\uFF1A"50mb"\u3001"100kb"\uFF09\',requiresRestart:"\u6CE8\u610F\uFF1A\u7AEF\u53E3\u3001\u5DE5\u4F5C\u8FDB\u7A0B\u6570\u3001\u65E5\u5FD7\u7EA7\u522B\u548C\u8BF7\u6C42\u4F53\u5927\u5C0F\u9650\u5236\u7684\u66F4\u6539\u9700\u8981\u91CD\u542F\u670D\u52A1\u624D\u80FD\u751F\u6548\u3002",routesConfigured:"{count} \u4E2A\u8DEF\u7531\u5DF2\u914D\u7F6E\u3002",manageRoutes:"\u4F7F\u7528\u8DEF\u7531\u9875\u9762\u7BA1\u7406\u8DEF\u7531\u3002",jsonConfiguration:"JSON \u914D\u7F6E",jsonParseError:"JSON \u89E3\u6790\u9519\u8BEF: {error}",jsonPlaceholder:"\u8F93\u5165 JSON \u914D\u7F6E...",jsonHelp:"\u7F16\u8F91\u539F\u59CB JSON \u914D\u7F6E\u3002\u4FDD\u5B58\u524D\u5C06\u9A8C\u8BC1\u66F4\u6539\u3002",unsavedChanges:"\u60A8\u6709\u672A\u4FDD\u5B58\u7684\u66F4\u6539",reset:"\u91CD\u7F6E",save:"\u4FDD\u5B58\u914D\u7F6E",confirmRestart:"\u786E\u8BA4\u91CD\u542F\u670D\u52A1",restartMessage:"\u786E\u5B9A\u8981\u91CD\u542F\u670D\u52A1\u5417\uFF1F\u8FD9\u5C06\u5BFC\u81F4\u77ED\u6682\u4E2D\u65AD\uFF08\u901A\u5E38 2-3 \u79D2\uFF09\uFF0C\u56E0\u4E3A\u670D\u52A1\u4F1A\u4F18\u96C5\u5730\u91CD\u542F\u3002",restartWarning:"\u6D3B\u52A8\u8FDE\u63A5\u53EF\u80FD\u4F1A\u6682\u65F6\u4E2D\u65AD\u3002",validationFailed:"\u914D\u7F6E\u9A8C\u8BC1\u5931\u8D25: {error}",saved:"\u914D\u7F6E\u5DF2\u4FDD\u5B58",saveFailed:"\u4FDD\u5B58\u5931\u8D25: {error}",exported:"\u914D\u7F6E\u5DF2\u5BFC\u51FA",imported:"\u914D\u7F6E\u5DF2\u5BFC\u5165",importFailed:"\u5BFC\u5165\u5931\u8D25: {error}",reloaded:"\u914D\u7F6E\u5DF2\u6210\u529F\u91CD\u65B0\u52A0\u8F7D",reloadFailed:"\u91CD\u65B0\u52A0\u8F7D\u5931\u8D25: {error}",restartSent:"\u91CD\u542F\u4FE1\u53F7\u5DF2\u53D1\u9001\uFF0C\u670D\u52A1\u5C06\u5728\u51E0\u79D2\u540E\u91CD\u542F",restartDaemonOnly:\'\u91CD\u542F\u529F\u80FD\u4EC5\u5728 daemon \u6A21\u5F0F\u4E0B\u53EF\u7528\u3002\u8BF7\u4F7F\u7528 "bungee restart" \u547D\u4EE4\u6216\u624B\u52A8\u91CD\u542F\u5F00\u53D1\u670D\u52A1\u5668\u3002\',restartFailed:"\u91CD\u542F\u5931\u8D25: {error}"},l={title:"404",message:"\u9875\u9762\u672A\u627E\u5230",goHome:"\u8FD4\u56DE\u9996\u9875"},i={newRoute:"\u65B0\u5EFA\u8DEF\u7531",editRoute:"\u7F16\u8F91\u8DEF\u7531",backToList:"\u8FD4\u56DE\u5217\u8868",routePath:"\u8DEF\u7531\u8DEF\u5F84",pathPlaceholder:"\u4F8B\u5982: /api/*",pathHelp:"\u652F\u6301\u901A\u914D\u7B26 (*) \u548C\u53C2\u6570 (:param)",pathRewrite:"\u8DEF\u5F84\u91CD\u5199",pathRewriteHelp:"\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F\u6A21\u5F0F\u4FEE\u6539\u8BF7\u6C42\u8DEF\u5F84",addPathRewriteRule:"\u6DFB\u52A0\u8DEF\u5F84\u91CD\u5199\u89C4\u5219",patternPlaceholder:"^/api",replacementPlaceholder:"/v1",upstreams:"\u4E0A\u6E38\u670D\u52A1\u5668",addUpstream:"\u6DFB\u52A0\u4E0A\u6E38",transformer:"\u8DEF\u7531\u8F6C\u6362\u5668",transformerHelp:"\u5E94\u7528\u4E8E\u6574\u4E2A\u8DEF\u7531\u7684\u8F6C\u6362\u5668\uFF08\u53EF\u9009\uFF09",optional:"\u53EF\u9009",failoverTitle:"\u6545\u969C\u8F6C\u79FB",failoverHelp:"\u914D\u7F6E\u81EA\u52A8\u6545\u969C\u8F6C\u79FB\u548C\u5065\u5EB7\u68C0\u67E5\u673A\u5236",enableFailover:"\u542F\u7528\u81EA\u52A8\u6545\u969C\u8F6C\u79FB",retryableStatusCodes:"\u53EF\u91CD\u8BD5\u7684\u72B6\u6001\u7801",retryableStatusCodesPlaceholder:"\u9ED8\u8BA4: 500, 502, 503, 504\uFF08\u670D\u52A1\u5668\u9519\u8BEF\uFF09",retryableStatusCodesHelp:"\u9047\u5230\u8FD9\u4E9B\u72B6\u6001\u7801\u65F6\u5C06\u81EA\u52A8\u91CD\u8BD5\u5176\u4ED6\u4E0A\u6E38",passiveHealthCheck:"\u88AB\u52A8\u5065\u5EB7\u68C0\u67E5",passiveHealthCheckTooltip:"\u901A\u8FC7\u76D1\u63A7\u5B9E\u9645\u8BF7\u6C42\u7684\u6210\u529F\u5931\u8D25\u6765\u5224\u65AD\u4E0A\u6E38\u5065\u5EB7\u72B6\u6001\uFF0C\u65E0\u9700\u989D\u5916\u63A2\u6D4B\u8BF7\u6C42",consecutiveFailuresThreshold:"\u8FDE\u7EED\u5931\u8D25\u9608\u503C",consecutiveFailuresThresholdHelp:"\u8FDE\u7EED\u5931\u8D25\u591A\u5C11\u6B21\u540E\u6807\u8BB0\u4E3A\u4E0D\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A3\uFF09",healthyThreshold:"\u5065\u5EB7\u9608\u503C",healthyThresholdHelp:"\u8FDE\u7EED\u6210\u529F\u591A\u5C11\u6B21\u540E\u6062\u590D\u4E3A\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A2\uFF09",requestTimeoutMs:"\u8BF7\u6C42\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",requestTimeoutMsHelp:"\u6B63\u5E38\u8BF7\u6C42\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A30000ms\uFF09",connectTimeoutMs:"\u8FDE\u63A5\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",connectTimeoutMsHelp:"\u5EFA\u7ACB\u8FDE\u63A5\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A5000ms\uFF09",activeHealthCheck:"\u4E3B\u52A8\u5065\u5EB7\u68C0\u67E5",activeHealthCheckTooltip:"\u5B9A\u671F\u5411\u4E0A\u6E38\u53D1\u9001\u63A2\u6D4B\u8BF7\u6C42\u6765\u4E3B\u52A8\u68C0\u6D4B\u5065\u5EB7\u72B6\u6001\uFF0C\u72EC\u7ACB\u4E8E\u4E1A\u52A1\u6D41\u91CF",enableActiveHealthCheck:"\u542F\u7528\u4E3B\u52A8\u5065\u5EB7\u68C0\u67E5",healthCheckIntervalMs:"\u68C0\u67E5\u95F4\u9694\uFF08\u6BEB\u79D2\uFF09",healthCheckIntervalMsHelp:"\u6BCF\u9694\u591A\u4E45\u6267\u884C\u4E00\u6B21\u5065\u5EB7\u68C0\u67E5\uFF08\u9ED8\u8BA4\uFF1A10000ms\uFF09",healthCheckTimeoutMs:"\u68C0\u67E5\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",healthCheckTimeoutMsHelp:"\u5065\u5EB7\u68C0\u67E5\u8BF7\u6C42\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A3000ms\uFF09",healthCheckPath:"\u68C0\u67E5\u8DEF\u5F84",healthCheckPathHelp:"\u5065\u5EB7\u68C0\u67E5\u7684 HTTP \u8DEF\u5F84\uFF08\u9ED8\u8BA4\uFF1A/health\uFF09",healthCheckMethod:"HTTP \u65B9\u6CD5",healthCheckExpectedStatus:"\u671F\u671B\u72B6\u6001\u7801",healthCheckExpectedStatusHelp:"\u5065\u5EB7\u68C0\u67E5\u671F\u671B\u8FD4\u56DE\u7684\u72B6\u6001\u7801\uFF08\u9ED8\u8BA4\uFF1A200\uFF09",healthCheckUnhealthyThreshold:"\u4E0D\u5065\u5EB7\u9608\u503C",healthCheckUnhealthyThresholdHelp:"\u8FDE\u7EED\u5931\u8D25\u591A\u5C11\u6B21\u6807\u8BB0\u4E3A\u4E0D\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A3\uFF09",healthCheckHealthyThreshold:"\u5065\u5EB7\u9608\u503C",healthCheckHealthyThresholdHelp:"\u8FDE\u7EED\u6210\u529F\u591A\u5C11\u6B21\u6062\u590D\u4E3A\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A2\uFF09",slowStart:"\u6162\u542F\u52A8",slowStartTooltip:"\u6062\u590D\u7684\u4E0A\u6E38\u9010\u6B65\u589E\u52A0\u6D41\u91CF\uFF0C\u907F\u514D\u77AC\u95F4\u538B\u529B\u5BFC\u81F4\u518D\u6B21\u6545\u969C",enableSlowStart:"\u542F\u7528\u6162\u542F\u52A8\u673A\u5236",slowStartDurationMs:"\u6162\u542F\u52A8\u6301\u7EED\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",slowStartDurationMsHelp:"\u4ECE\u4E0D\u5065\u5EB7\u6062\u590D\u540E\u9010\u6B65\u589E\u52A0\u6743\u91CD\u7684\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A30000ms\uFF09",slowStartInitialWeightFactor:"\u521D\u59CB\u6743\u91CD\u56E0\u5B50",slowStartInitialWeightFactorHelp:"\u6062\u590D\u540E\u521D\u59CB\u6743\u91CD\u7684\u6BD4\u4F8B\uFF0C0.1 \u8868\u793A 10%\uFF08\u9ED8\u8BA4\uFF1A0.1\uFF09",failoverInfoNotice:"\u6545\u969C\u8F6C\u79FB\u529F\u80FD\u53EF\u4EE5\u81EA\u52A8\u68C0\u6D4B\u4E0A\u6E38\u5065\u5EB7\u72B6\u6001\uFF0C\u5728\u6545\u969C\u65F6\u5207\u6362\u5230\u5907\u7528\u4E0A\u6E38\uFF0C\u4FDD\u8BC1\u670D\u52A1\u53EF\u7528\u6027\u3002",recoveryIntervalMs:"\u6062\u590D\u68C0\u6D4B\u95F4\u9694\uFF08\u6BEB\u79D2\uFF09",recoveryIntervalPlaceholder:"5000",recoveryIntervalHelp:"\u4E0A\u6E38\u5931\u8D25\u540E\u7B49\u5F85\u591A\u4E45\u5C1D\u8BD5\u6062\u590D",recoveryTimeoutMs:"\u6062\u590D\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",recoveryTimeoutPlaceholder:"3000",recoveryTimeoutHelp:"\u6062\u590D\u8BF7\u6C42\u7684\u8D85\u65F6\u65F6\u95F4\uFF0C\u907F\u514D\u957F\u65F6\u95F4 pending",saveRoute:"\u4FDD\u5B58\u8DEF\u7531",cancel:"\u53D6\u6D88",saving:"\u4FDD\u5B58\u4E2D...",loadingTemplates:"\u52A0\u8F7D\u6A21\u677F\u4E2D...",useTemplate:"\u4F7F\u7528\u6A21\u677F",routeSaved:"\u8DEF\u7531\u5DF2\u4FDD\u5B58",routeUpdated:"\u8DEF\u7531\u5DF2\u66F4\u65B0",saveFailed:"\u4FDD\u5B58\u5931\u8D25: {error}",pathRequired:"\u8DEF\u7531\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A",upstreamRequired:"\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u4E0A\u6E38\u670D\u52A1\u5668"},n={upstreams:"{count} \u4E2A\u4E0A\u6E38",hasTransformer:"\u5E26\u8F6C\u6362\u5668",failover:"\u6545\u969C\u8F6C\u79FB",edit:"\u7F16\u8F91",duplicate:"\u590D\u5236",delete:"\u5220\u9664",duplicating:"\u590D\u5236\u4E2D...",deleting:"\u5220\u9664\u4E2D..."},d={title:"\u4E0A\u6E38\u670D\u52A1\u5668 #{index}",targetUrl:"\u76EE\u6807\u5730\u5740",targetPlaceholder:"https://api.example.com",targetHelp:"\u4E0A\u6E38\u670D\u52A1\u5668\u7684\u5B8C\u6574 URL",weight:"\u6743\u91CD",weightHelp:"\u8D1F\u8F7D\u5747\u8861\u6743\u91CD\uFF081-100\uFF09",transformer:"\u4E0A\u6E38\u8F6C\u6362\u5668",transformerHelp:"\u4EC5\u5E94\u7528\u4E8E\u6B64\u4E0A\u6E38\u7684\u8F6C\u6362\u5668\uFF08\u53EF\u9009\uFF09",remove:"\u79FB\u9664\u4E0A\u6E38",targetRequired:"\u76EE\u6807\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",invalidUrl:"\u65E0\u6548\u7684 URL \u683C\u5F0F"},u={selectPlugin:"\u9009\u62E9\u63D2\u4EF6",none:"\u65E0\u63D2\u4EF6",description:"\u63D2\u4EF6\u8BF4\u660E",testPlugin:"\u6D4B\u8BD5\u63D2\u4EF6",testing:"\u6D4B\u8BD5\u4E2D...",input:"\u8F93\u5165\uFF08\u539F\u59CB\u683C\u5F0F\uFF09",output:"\u8F93\u51FA\uFF08\u8F6C\u6362\u540E\u683C\u5F0F\uFF09",inputPlaceholder:"\u8F93\u5165\u6D4B\u8BD5\u6570\u636E...",testSuccess:"\u8F6C\u6362\u6210\u529F",testFailed:"\u8F6C\u6362\u5931\u8D25: {error}"},c={title:"\u8BF7\u6C42\u5934",addHeader:"\u6DFB\u52A0\u8BF7\u6C42\u5934",name:"\u540D\u79F0",namePlaceholder:"Content-Type",value:"\u503C",valuePlaceholder:"application/json",remove:"\u79FB\u9664",empty:"\u6682\u65E0\u8BF7\u6C42\u5934",default:"\u9ED8\u8BA4\u8BF7\u6C42\u5934"},p={title:"\u8BF7\u6C42\u4F53",bodyType:"\u8BF7\u6C42\u4F53\u7C7B\u578B",json:"JSON",text:"\u7EAF\u6587\u672C",form:"\u8868\u5355\u6570\u636E",none:"\u65E0\u8BF7\u6C42\u4F53",placeholder:"\u8F93\u5165\u8BF7\u6C42\u4F53\u5185\u5BB9...",jsonInvalid:"\u65E0\u6548\u7684 JSON \u683C\u5F0F",replace:"\u66FF\u6362",default:"\u9ED8\u8BA4\u503C"},h={title:"\u6761\u4EF6\u8868\u8FBE\u5F0F",placeholder:"request.headers[\'User-Agent\'].includes(\'Mobile\')",help:"\u4F7F\u7528 JavaScript \u8868\u8FBE\u5F0F\uFF0C\u8FD4\u56DE true \u6216 false",examples:"\u793A\u4F8B",example1:"\u68C0\u67E5\u8BF7\u6C42\u5934",example2:"\u68C0\u67E5\u67E5\u8BE2\u53C2\u6570",example3:"\u68C0\u67E5\u8BF7\u6C42\u65B9\u6CD5",test:"\u6D4B\u8BD5\u8868\u8FBE\u5F0F",testResult:"\u6D4B\u8BD5\u7ED3\u679C",resultTrue:"\u6761\u4EF6\u4E3A\u771F",resultFalse:"\u6761\u4EF6\u4E3A\u5047",resultError:"\u8868\u8FBE\u5F0F\u9519\u8BEF: {error}"},m={title:"\u8DEF\u7531\u6A21\u677F",subtitle:"\u5FEB\u901F\u521B\u5EFA\u5E38\u7528\u8DEF\u7531\u914D\u7F6E",useTemplate:"\u4F7F\u7528\u6B64\u6A21\u677F",categories:{api:"API \u4EE3\u7406",static:"\u9759\u6001\u8D44\u6E90",websocket:"WebSocket",auth:"\u8BA4\u8BC1\u4EE3\u7406"},restApi:{name:"REST API \u4EE3\u7406",description:"\u6807\u51C6\u7684 RESTful API \u4EE3\u7406\u914D\u7F6E"},graphql:{name:"GraphQL API",description:"GraphQL \u7AEF\u70B9\u4EE3\u7406"},static:{name:"\u9759\u6001\u6587\u4EF6\u670D\u52A1",description:"\u4EE3\u7406\u9759\u6001\u8D44\u6E90\u6587\u4EF6"},websocket:{name:"WebSocket \u4EE3\u7406",description:"\u5B9E\u65F6\u901A\u4FE1 WebSocket \u4EE3\u7406"},loadBalancing:{name:"\u8D1F\u8F7D\u5747\u8861",description:"\u591A\u4E0A\u6E38\u8D1F\u8F7D\u5747\u8861\u914D\u7F6E"}},g={title:"\u786E\u8BA4\u64CD\u4F5C",confirm:"\u786E\u8BA4",cancel:"\u53D6\u6D88"},y={targetRequired:"\u76EE\u6807\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",targetProtocol:"\u76EE\u6807\u5730\u5740\u5FC5\u987B\u4F7F\u7528 http \u6216 https \u534F\u8BAE",invalidUrl:"\u65E0\u6548\u7684 URL \u683C\u5F0F",weightPositive:"\u6743\u91CD\u5FC5\u987B\u662F\u6B63\u6570",priorityNonNegative:"\u4F18\u5148\u7EA7\u5FC5\u987B\u662F\u975E\u8D1F\u6570",totalWeightPositive:"\u603B\u6743\u91CD\u5FC5\u987B\u5927\u4E8E 0",unknownTransformer:"\u672A\u77E5\u7684\u8F6C\u6362\u5668: {transformer}\u3002\u53EF\u7528\u9009\u9879: {options}",pathRequired:"\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A",pathStartSlash:"\u8DEF\u5F84\u5FC5\u987B\u4EE5 / \u5F00\u5934",upstreamRequired:"\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u4E0A\u6E38\u670D\u52A1\u5668",invalidRegex:"\u65E0\u6548\u7684\u6B63\u5219\u8868\u8FBE\u5F0F: {pattern}",invalidStatusCode:"\u65E0\u6548\u7684\u72B6\u6001\u7801: {code}",recoveryIntervalPositive:"\u6062\u590D\u95F4\u9694\u5FC5\u987B\u5927\u4E8E 0",recoveryTimeoutPositive:"\u6062\u590D\u8D85\u65F6\u65F6\u95F4\u5FC5\u987B\u5927\u4E8E 0",expressionEmpty:"\u8868\u8FBE\u5F0F\u4E0D\u80FD\u4E3A\u7A7A",mismatchedBraces:"{{ }} \u62EC\u53F7\u4E0D\u5339\u914D",mismatchedParentheses:"\u62EC\u53F7\u4E0D\u5339\u914D",mismatchedQuotes:"\u5F15\u53F7\u4E0D\u5339\u914D"},v={globalAuth:"\u5168\u5C40\u8BA4\u8BC1",routeAuth:"\u8DEF\u7531\u8BA4\u8BC1",helpText:"\u4FDD\u62A4\u60A8\u7684 API \u7AEF\u70B9",enableAuth:"\u542F\u7528\u8BA4\u8BC1",enabled:"\u5DF2\u542F\u7528",disabled:"\u5DF2\u7981\u7528",tokens:"\u4EE4\u724C\u5217\u8868",tokenPlaceholder:"\u8F93\u5165 token \u6216\u4F7F\u7528 {{ env.TOKEN_NAME }}",addToken:"\u6DFB\u52A0\u4EE4\u724C",expressionSupport:"\u652F\u6301\u8868\u8FBE\u5F0F\u8BED\u6CD5\u6765\u5F15\u7528\u73AF\u5883\u53D8\u91CF\uFF1A",securityNotice:"\u542F\u7528\u8BA4\u8BC1\u540E\uFF0CAuthorization header \u4F1A\u81EA\u52A8\u79FB\u9664\uFF0C\u4E0D\u4F1A\u8F6C\u53D1\u7ED9\u4E0A\u6E38\u670D\u52A1\u5668\uFF08\u5B89\u5168\u63AA\u65BD\uFF09\u3002",routeAuthHelp:"\u8DEF\u7531\u7EA7\u8BA4\u8BC1\u5C06\u8986\u76D6\u5168\u5C40\u8BA4\u8BC1\u914D\u7F6E\u3002\u5982\u679C\u672A\u914D\u7F6E\uFF0C\u5219\u4F7F\u7528\u5168\u5C40\u8BA4\u8BC1\u8BBE\u7F6E\u3002"},T={title:"\u8BF7\u6C42\u65E5\u5FD7",filters:"\u7B5B\u9009\u5668",searchTerm:"\u641C\u7D22",searchPlaceholder:"\u641C\u7D22\u8DEF\u5F84\u6216\u9519\u8BEF\u4FE1\u606F...",method:"HTTP \u65B9\u6CD5",allMethods:"\u6240\u6709\u65B9\u6CD5",status:"\u72B6\u6001\u7801",statusPlaceholder:"\u4F8B\u5982\uFF1A200\u3001404\u3001500",result:"\u7ED3\u679C",allResults:"\u5168\u90E8",success:"\u6210\u529F",failed:"\u5931\u8D25",timeRange:"\u65F6\u95F4\u8303\u56F4",allTime:"\u5168\u90E8\u65F6\u95F4",recentTime:"\u6700\u8FD1\u65F6\u95F4",customTime:"\u81EA\u5B9A\u4E49\u8303\u56F4",recentHours:"\u6700\u8FD1\u5C0F\u65F6\u6570",startTime:"\u5F00\u59CB\u65F6\u95F4",endTime:"\u7ED3\u675F\u65F6\u95F4",sortBy:"\u6392\u5E8F\u65B9\u5F0F",sortByTimestamp:"\u65F6\u95F4\u6233",sortByDuration:"\u6301\u7EED\u65F6\u95F4",sortByStatus:"\u72B6\u6001\u7801",sortOrder:"\u6392\u5E8F",asc:"\u5347\u5E8F",desc:"\u964D\u5E8F",time:"\u65F6\u95F4",path:"\u8DEF\u5F84",duration:"\u6301\u7EED\u65F6\u95F4",requestType:"\u7C7B\u578B",requestTypeFilter:"\u8BF7\u6C42\u7C7B\u578B",requestType_all:"\u5168\u90E8\u7C7B\u578B",requestType_final:"\u6700\u7EC8\u8BF7\u6C42",requestType_retry:"\u91CD\u8BD5\u8BF7\u6C42",requestType_recovery:"\u6062\u590D\u6D4B\u8BD5",requestType_final_desc:"\u8FD4\u56DE\u5BA2\u6237\u7AEF\u7684\u8BF7\u6C42",requestType_retry_desc:"\u91CD\u8BD5\u5C1D\u8BD5",requestType_recovery_desc:"\u6545\u969C\u6062\u590D\u6D4B\u8BD5",upstream:"\u4E0A\u6E38",actions:"\u64CD\u4F5C",viewDetail:"\u8BE6\u60C5",export:"\u5BFC\u51FA",startStream:"\u542F\u52A8\u6D41",stopStream:"\u505C\u6B62\u6D41",showing:"\u663E\u793A {start}-{end}\uFF0C\u5171 {total} \u6761",page:"\u7B2C {page} \u9875\uFF0C\u5171 {totalPages} \u9875",noData:"\u6682\u65E0\u65E5\u5FD7\u6570\u636E",advancedFilters:"\u9AD8\u7EA7\u7B5B\u9009",activeFilters:"\u4E2A\u7B5B\u9009\u6761\u4EF6",clearFilters:"\u6E05\u9664\u5168\u90E8",detail:{title:"\u8BF7\u6C42\u65E5\u5FD7\u8BE6\u60C5",requestId:"\u8BF7\u6C42 ID",timestamp:"\u65F6\u95F4\u6233",method:"\u65B9\u6CD5",status:"\u72B6\u6001",duration:"\u6301\u7EED\u65F6\u95F4",success:"\u6210\u529F",requestInfo:"\u8BF7\u6C42\u4FE1\u606F",path:"\u8DEF\u5F84",originalPath:"\u539F\u59CB\u8DEF\u5F84",transformedPath:"\u8F6C\u6362\u540E",query:"\u67E5\u8BE2\u5B57\u7B26\u4E32",routePath:"\u5339\u914D\u8DEF\u7531",upstreamInfo:"\u4E0A\u6E38\u4FE1\u606F",upstream:"\u4E0A\u6E38",transformer:"\u8F6C\u6362\u5668",authInfo:"\u8BA4\u8BC1\u4FE1\u606F",authLevel:"\u8BA4\u8BC1\u7EA7\u522B",authResult:"\u7ED3\u679C",authSuccess:"\u5DF2\u8BA4\u8BC1",authFailed:"\u5931\u8D25",processingSteps:"\u5904\u7406\u6B65\u9AA4",errorInfo:"\u9519\u8BEF\u4FE1\u606F",requestBody:"\u8BF7\u6C42\u4F53",responseBody:"\u54CD\u5E94\u4F53",loadRequestBody:"\u52A0\u8F7D\u8BF7\u6C42\u4F53",loadResponseBody:"\u52A0\u8F7D\u54CD\u5E94\u4F53",bodyNotRecorded:"\u6B64\u8BF7\u6C42\u672A\u8BB0\u5F55 Body",bodyNotRecordedReason:"\u53EF\u80FD\u8D85\u8FC7\u5927\u5C0F\u9650\u5236\u6216\u4E3A\u7A7A",originalRequest:"\u539F\u59CB\u8BF7\u6C42\uFF08\u8F6C\u6362\u524D\uFF09",finalRequest:"\u6700\u7EC8\u8BF7\u6C42\uFF08\u53D1\u9001\u7ED9\u4E0A\u6E38\uFF09",responseData:"\u54CD\u5E94\u6570\u636E\uFF08\u4E0A\u6E38\u8FD4\u56DE\uFF09",originalHeaders:"\u539F\u59CB\u8BF7\u6C42\u5934",finalHeaders:"\u6700\u7EC8\u8BF7\u6C42\u5934",requestHeaders:"\u8BF7\u6C42\u5934",responseHeaders:"\u54CD\u5E94\u5934",bodyPreview:"Body \u9884\u89C8",bodyTooLarge:"Body \u8FC7\u5927 ({size})",clickToExpand:"\u70B9\u51FB\u5C55\u5F00",headers:"\u4E2A\u8BF7\u6C42\u5934",noHeaders:"\u6682\u65E0\u8BF7\u6C42\u5934",noBody:"\u6682\u65E0 Body \u6570\u636E",overview:"\u6982\u89C8",routeAndUpstream:"\u8DEF\u7531\u4E0E\u4E0A\u6E38",processingTimeline:"\u5904\u7406\u65F6\u95F4\u7EBF",totalSteps:"\u5171 {count} \u6B65",totalDuration:"\u603B\u8017\u65F6 {duration}",showTimeline:"\u663E\u793A\u65F6\u95F4\u7EBF",hideTimeline:"\u9690\u85CF\u65F6\u95F4\u7EBF",copyToClipboard:"\u590D\u5236",downloadJson:"\u4E0B\u8F7D JSON",copied:"\u5DF2\u590D\u5236\uFF01",tabOriginalRequest:"\u539F\u59CB\u8BF7\u6C42",tabFinalRequest:"\u8F6C\u6362\u540E",tabResponse:"\u54CD\u5E94\u6570\u636E",requestData:"\u8BF7\u6C42\u6570\u636E",noDataAvailable:"\u6682\u65E0\u6570\u636E",step:"\u6B65\u9AA4"},steps:{route_matched:"\u8DEF\u7531\u5339\u914D",request_snapshot_created:"\u8BF7\u6C42\u5FEB\u7167\u521B\u5EFA",auth_failed:"\u8BA4\u8BC1\u5931\u8D25",auth_success:"\u8BA4\u8BC1\u6210\u529F",upstream_selected:"\u4E0A\u6E38\u9009\u62E9",trying_upstream:"\u5C1D\u8BD5\u4E0A\u6E38",circuit_breaker_closed:"\u65AD\u8DEF\u5668\u5173\u95ED",circuit_breaker_opened:"\u65AD\u8DEF\u5668\u6253\u5F00",circuit_breaker_reopened:"\u65AD\u8DEF\u5668\u91CD\u65B0\u6253\u5F00",upstream_recovered:"\u4E0A\u6E38\u6062\u590D",upstream_retry:"\u4E0A\u6E38\u91CD\u8BD5",upstream_failed:"\u4E0A\u6E38\u5931\u8D25",plugin_request_init:"\u63D2\u4EF6\u8BF7\u6C42\u521D\u59CB\u5316",plugin_before_request:"\u63D2\u4EF6\u8BF7\u6C42\u524D\u5904\u7406",plugin_intercepted:"\u63D2\u4EF6\u62E6\u622A\u8BF7\u6C42",plugin_response:"\u63D2\u4EF6\u54CD\u5E94\u5904\u7406",plugin_error:"\u63D2\u4EF6\u9519\u8BEF\u5904\u7406"}},R={title:"\u65E5\u5FD7\u914D\u7F6E",bodyRecording:"\u542F\u7528\u8BF7\u6C42/\u54CD\u5E94\u4F53\u8BB0\u5F55",bodyRecordingHelp:"\u8BB0\u5F55\u8BF7\u6C42\u548C\u54CD\u5E94\u4F53\u7528\u4E8E\u95EE\u9898\u6392\u67E5\u548C\u5206\u6790",maxSize:"\u6700\u5927 Body \u5927\u5C0F",maxSizeHelp:"\u8D85\u8FC7\u6B64\u5927\u5C0F\u7684 Body \u5C06\u88AB\u8DF3\u8FC7\uFF081-100 KB\uFF09",retentionDays:"Body \u4FDD\u7559\u5929\u6570",retentionDaysHelp:"Body \u5C06\u5728\u8FD9\u4E9B\u5929\u6570\u540E\u81EA\u52A8\u5220\u9664",days:"\u5929",hours:"\u5C0F\u65F6",cleanupConfig:"\u6E05\u7406\u914D\u7F6E",cleanupStatus:"\u72B6\u6001",active:"\u6D3B\u8DC3",inactive:"\u672A\u6D3B\u8DC3",cleanupRetention:"\u4FDD\u7559\u65F6\u957F",cleanupInterval:"\u6E05\u7406\u95F4\u9694",manualCleanup:"\u624B\u52A8\u6E05\u7406",confirmCleanup:"\u786E\u5B9A\u8981\u624B\u52A8\u89E6\u53D1\u65E5\u5FD7\u6E05\u7406\u5417\uFF1F\u8FD9\u5C06\u5220\u9664\u6240\u6709\u8D85\u8FC7\u914D\u7F6E\u4FDD\u7559\u671F\u9650\u7684\u65E5\u5FD7\u548C Body\u3002",cleanupSuccess:"\u6E05\u7406\u6210\u529F\u5B8C\u6210",cleanupFailed:"\u6E05\u7406\u5931\u8D25: {error}",lastCleanup:"\u4E0A\u6B21\u6E05\u7406\u7ED3\u679C",deletedSqliteRecords:"\u5DF2\u5220\u9664 SQLite \u8BB0\u5F55",deletedFileLogFiles:"\u5DF2\u5220\u9664\u65E5\u5FD7\u6587\u4EF6",deletedBodyFiles:"\u5DF2\u5220\u9664 Body \u6587\u4EF6",dirs:"\u76EE\u5F55",files:"\u6587\u4EF6",duration:"\u8017\u65F6"},f={title:"\u767B\u5F55",subtitle:"\u8F93\u5165\u8BBF\u95EE\u4EE4\u724C\u4EE5\u7EE7\u7EED",token:"\u8BBF\u95EE\u4EE4\u724C",tokenPlaceholder:"\u8BF7\u8F93\u5165\u8BBF\u95EE\u4EE4\u724C...",submit:"\u767B\u5F55",loggingIn:"\u767B\u5F55\u4E2D...",success:"\u767B\u5F55\u6210\u529F",failed:"\u767B\u5F55\u5931\u8D25\uFF1A{error}",required:"\u8BBF\u95EE\u4EE4\u724C\u4E0D\u80FD\u4E3A\u7A7A",unauthorized:"\u8BBF\u95EE\u4EE4\u724C\u65E0\u6548",logout:"\u9000\u51FA\u767B\u5F55",logoutConfirm:"\u786E\u5B9A\u8981\u9000\u51FA\u767B\u5F55\u5417\uFF1F"},S={common:e,nav:t,dashboard:r,monitoring:a,routes:o,configuration:s,notFound:l,routeEditor:i,routeCard:n,upstream:d,plugin:u,headers:c,body:p,expression:h,templates:m,confirmDialog:g,validation:y,auth:v,logs:T,logging:R,login:f};export{v as auth,p as body,e as common,s as configuration,g as confirmDialog,r as dashboard,S as default,h as expression,c as headers,R as logging,f as login,T as logs,a as monitoring,t as nav,l as notFound,u as plugin,n as routeCard,i as routeEditor,o as routes,m as templates,d as upstream,y as validation};\n'
21280
+ "vendor-lodash-CRdCilnf.js": 'var Ir=typeof global=="object"&&global&&global.Object===Object&&global,Qr=typeof self=="object"&&self&&self.Object===Object&&self,T=Ir||Qr||Function("return this")(),y=T.Symbol,Gr=Object.prototype,Vr=Gr.hasOwnProperty,kr=Gr.toString,j=y?y.toStringTag:void 0;function rn(r){var n=Vr.call(r,j),t=r[j];try{r[j]=void 0;var e=!0}catch{}var i=kr.call(r);return e&&(n?r[j]=t:delete r[j]),i}var nn=Object.prototype,tn=nn.toString;function en(r){return tn.call(r)}var an="[object Null]",un="[object Undefined]",pr=y?y.toStringTag:void 0;function M(r){return r==null?r===void 0?un:an:pr&&pr in Object(r)?rn(r):en(r)}function C(r){return r!=null&&typeof r=="object"}var on="[object Symbol]";function L(r){return typeof r=="symbol"||C(r)&&M(r)==on}function B(r,n){for(var t=-1,e=r==null?0:r.length,i=Array(e);++t<e;)i[t]=n(r[t],t,r);return i}var _=Array.isArray,gr=y?y.prototype:void 0,dr=gr?gr.toString:void 0;function zr(r){if(typeof r=="string")return r;if(_(r))return B(r,zr)+"";if(L(r))return dr?dr.call(r):"";var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}function U(r){var n=typeof r;return r!=null&&(n=="object"||n=="function")}function H(r){return r}var fn="[object AsyncFunction]",sn="[object Function]",cn="[object GeneratorFunction]",ln="[object Proxy]";function Br(r){if(!U(r))return!1;var n=M(r);return n==sn||n==cn||n==fn||n==ln}var W=T["__core-js_shared__"],hr=(function(){var r=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function pn(r){return!!hr&&hr in r}var gn=Function.prototype,dn=gn.toString;function E(r){if(r!=null){try{return dn.call(r)}catch{}try{return r+""}catch{}}return""}var hn=/[\\\\^$.*+?()[\\]{}|]/g,_n=/^\\[object .+?Constructor\\]$/,yn=Function.prototype,vn=Object.prototype,bn=yn.toString,Tn=vn.hasOwnProperty,An=RegExp("^"+bn.call(Tn).replace(hn,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$");function wn(r){if(!U(r)||pn(r))return!1;var n=Br(r)?An:_n;return n.test(E(r))}function On(r,n){return r?.[n]}function x(r,n){var t=On(r,n);return wn(t)?t:void 0}var Q=x(T,"WeakMap");function Pn(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}var $n=800,mn=16,Sn=Date.now;function En(r){var n=0,t=0;return function(){var e=Sn(),i=mn-(e-t);if(t=e,i>0){if(++n>=$n)return arguments[0]}else n=0;return r.apply(void 0,arguments)}}function xn(r){return function(){return r}}var _r=(function(){try{var r=x(Object,"defineProperty");return r({},"",{}),r}catch{}})(),Cn=_r?function(r,n){return _r(r,"toString",{configurable:!0,enumerable:!1,value:xn(n),writable:!0})}:H,Mn=En(Cn),jn=9007199254740991,Rn=/^(?:0|[1-9]\\d*)$/;function tr(r,n){var t=typeof r;return n=n??jn,!!n&&(t=="number"||t!="symbol"&&Rn.test(r))&&r>-1&&r%1==0&&r<n}function er(r,n){return r===n||r!==r&&n!==n}var yr=Math.max;function Ln(r,n,t){return n=yr(n===void 0?r.length-1:n,0),function(){for(var e=arguments,i=-1,a=yr(e.length-n,0),u=Array(a);++i<a;)u[i]=e[n+i];i=-1;for(var o=Array(n+1);++i<n;)o[i]=e[i];return o[n]=t(u),Pn(r,this,o)}}function Fn(r,n){return Mn(Ln(r,n,H),r+"")}var Dn=9007199254740991;function ar(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Dn}function K(r){return r!=null&&ar(r.length)&&!Br(r)}function vr(r,n,t){if(!U(t))return!1;var e=typeof n;return(e=="number"?K(t)&&tr(n,t.length):e=="string"&&n in t)?er(t[n],r):!1}var In=Object.prototype;function Gn(r){var n=r&&r.constructor,t=typeof n=="function"&&n.prototype||In;return r===t}function zn(r,n){for(var t=-1,e=Array(r);++t<r;)e[t]=n(t);return e}var Bn="[object Arguments]";function br(r){return C(r)&&M(r)==Bn}var Nr=Object.prototype,Nn=Nr.hasOwnProperty,Un=Nr.propertyIsEnumerable,ir=br((function(){return arguments})())?br:function(r){return C(r)&&Nn.call(r,"callee")&&!Un.call(r,"callee")};function Hn(){return!1}var Ur=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tr=Ur&&typeof module=="object"&&module&&!module.nodeType&&module,Kn=Tr&&Tr.exports===Ur,Ar=Kn?T.Buffer:void 0,Xn=Ar?Ar.isBuffer:void 0,V=Xn||Hn,qn="[object Arguments]",Zn="[object Array]",Wn="[object Boolean]",Jn="[object Date]",Yn="[object Error]",Qn="[object Function]",Vn="[object Map]",kn="[object Number]",rt="[object Object]",nt="[object RegExp]",tt="[object Set]",et="[object String]",at="[object WeakMap]",it="[object ArrayBuffer]",ut="[object DataView]",ot="[object Float32Array]",ft="[object Float64Array]",st="[object Int8Array]",ct="[object Int16Array]",lt="[object Int32Array]",pt="[object Uint8Array]",gt="[object Uint8ClampedArray]",dt="[object Uint16Array]",ht="[object Uint32Array]",c={};c[ot]=c[ft]=c[st]=c[ct]=c[lt]=c[pt]=c[gt]=c[dt]=c[ht]=!0;c[qn]=c[Zn]=c[it]=c[Wn]=c[ut]=c[Jn]=c[Yn]=c[Qn]=c[Vn]=c[kn]=c[rt]=c[nt]=c[tt]=c[et]=c[at]=!1;function _t(r){return C(r)&&ar(r.length)&&!!c[M(r)]}function Hr(r){return function(n){return r(n)}}var Kr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,R=Kr&&typeof module=="object"&&module&&!module.nodeType&&module,yt=R&&R.exports===Kr,J=yt&&Ir.process,wr=(function(){try{var r=R&&R.require&&R.require("util").types;return r||J&&J.binding&&J.binding("util")}catch{}})(),Or=wr&&wr.isTypedArray,Xr=Or?Hr(Or):_t,vt=Object.prototype,bt=vt.hasOwnProperty;function Tt(r,n){var t=_(r),e=!t&&ir(r),i=!t&&!e&&V(r),a=!t&&!e&&!i&&Xr(r),u=t||e||i||a,o=u?zn(r.length,String):[],f=o.length;for(var s in r)bt.call(r,s)&&!(u&&(s=="length"||i&&(s=="offset"||s=="parent")||a&&(s=="buffer"||s=="byteLength"||s=="byteOffset")||tr(s,f)))&&o.push(s);return o}function At(r,n){return function(t){return r(n(t))}}var wt=At(Object.keys,Object),Ot=Object.prototype,Pt=Ot.hasOwnProperty;function $t(r){if(!Gn(r))return wt(r);var n=[];for(var t in Object(r))Pt.call(r,t)&&t!="constructor"&&n.push(t);return n}function ur(r){return K(r)?Tt(r):$t(r)}var mt=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,St=/^\\w*$/;function or(r,n){if(_(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||L(r)?!0:St.test(r)||!mt.test(r)||n!=null&&r in Object(n)}var F=x(Object,"create");function Et(){this.__data__=F?F(null):{},this.size=0}function xt(r){var n=this.has(r)&&delete this.__data__[r];return this.size-=n?1:0,n}var Ct="__lodash_hash_undefined__",Mt=Object.prototype,jt=Mt.hasOwnProperty;function Rt(r){var n=this.__data__;if(F){var t=n[r];return t===Ct?void 0:t}return jt.call(n,r)?n[r]:void 0}var Lt=Object.prototype,Ft=Lt.hasOwnProperty;function Dt(r){var n=this.__data__;return F?n[r]!==void 0:Ft.call(n,r)}var It="__lodash_hash_undefined__";function Gt(r,n){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=F&&n===void 0?It:n,this}function S(r){var n=-1,t=r==null?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}S.prototype.clear=Et;S.prototype.delete=xt;S.prototype.get=Rt;S.prototype.has=Dt;S.prototype.set=Gt;function zt(){this.__data__=[],this.size=0}function X(r,n){for(var t=r.length;t--;)if(er(r[t][0],n))return t;return-1}var Bt=Array.prototype,Nt=Bt.splice;function Ut(r){var n=this.__data__,t=X(n,r);if(t<0)return!1;var e=n.length-1;return t==e?n.pop():Nt.call(n,t,1),--this.size,!0}function Ht(r){var n=this.__data__,t=X(n,r);return t<0?void 0:n[t][1]}function Kt(r){return X(this.__data__,r)>-1}function Xt(r,n){var t=this.__data__,e=X(t,r);return e<0?(++this.size,t.push([r,n])):t[e][1]=n,this}function A(r){var n=-1,t=r==null?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}A.prototype.clear=zt;A.prototype.delete=Ut;A.prototype.get=Ht;A.prototype.has=Kt;A.prototype.set=Xt;var D=x(T,"Map");function qt(){this.size=0,this.__data__={hash:new S,map:new(D||A),string:new S}}function Zt(r){var n=typeof r;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?r!=="__proto__":r===null}function q(r,n){var t=r.__data__;return Zt(n)?t[typeof n=="string"?"string":"hash"]:t.map}function Wt(r){var n=q(this,r).delete(r);return this.size-=n?1:0,n}function Jt(r){return q(this,r).get(r)}function Yt(r){return q(this,r).has(r)}function Qt(r,n){var t=q(this,r),e=t.size;return t.set(r,n),this.size+=t.size==e?0:1,this}function w(r){var n=-1,t=r==null?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}w.prototype.clear=qt;w.prototype.delete=Wt;w.prototype.get=Jt;w.prototype.has=Yt;w.prototype.set=Qt;var Vt="Expected a function";function fr(r,n){if(typeof r!="function"||n!=null&&typeof n!="function")throw new TypeError(Vt);var t=function(){var e=arguments,i=n?n.apply(this,e):e[0],a=t.cache;if(a.has(i))return a.get(i);var u=r.apply(this,e);return t.cache=a.set(i,u)||a,u};return t.cache=new(fr.Cache||w),t}fr.Cache=w;var kt=500;function re(r){var n=fr(r,function(e){return t.size===kt&&t.clear(),e}),t=n.cache;return n}var ne=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,te=/\\\\(\\\\)?/g,ee=re(function(r){var n=[];return r.charCodeAt(0)===46&&n.push(""),r.replace(ne,function(t,e,i,a){n.push(i?a.replace(te,"$1"):e||t)}),n});function ae(r){return r==null?"":zr(r)}function qr(r,n){return _(r)?r:or(r,n)?[r]:ee(ae(r))}function Z(r){if(typeof r=="string"||L(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}function sr(r,n){n=qr(n,r);for(var t=0,e=n.length;r!=null&&t<e;)r=r[Z(n[t++])];return t&&t==e?r:void 0}function ie(r,n,t){var e=r==null?void 0:sr(r,n);return e===void 0?t:e}function Zr(r,n){for(var t=-1,e=n.length,i=r.length;++t<e;)r[i+t]=n[t];return r}var Pr=y?y.isConcatSpreadable:void 0;function ue(r){return _(r)||ir(r)||!!(Pr&&r&&r[Pr])}function oe(r,n,t,e,i){var a=-1,u=r.length;for(t||(t=ue),i||(i=[]);++a<u;){var o=r[a];t(o)?Zr(i,o):i[i.length]=o}return i}function fe(){this.__data__=new A,this.size=0}function se(r){var n=this.__data__,t=n.delete(r);return this.size=n.size,t}function ce(r){return this.__data__.get(r)}function le(r){return this.__data__.has(r)}var pe=200;function ge(r,n){var t=this.__data__;if(t instanceof A){var e=t.__data__;if(!D||e.length<pe-1)return e.push([r,n]),this.size=++t.size,this;t=this.__data__=new w(e)}return t.set(r,n),this.size=t.size,this}function b(r){var n=this.__data__=new A(r);this.size=n.size}b.prototype.clear=fe;b.prototype.delete=se;b.prototype.get=ce;b.prototype.has=le;b.prototype.set=ge;function de(r,n){for(var t=-1,e=r==null?0:r.length,i=0,a=[];++t<e;){var u=r[t];n(u,t,r)&&(a[i++]=u)}return a}function he(){return[]}var _e=Object.prototype,ye=_e.propertyIsEnumerable,$r=Object.getOwnPropertySymbols,ve=$r?function(r){return r==null?[]:(r=Object(r),de($r(r),function(n){return ye.call(r,n)}))}:he;function be(r,n,t){var e=n(r);return _(r)?e:Zr(e,t(r))}function mr(r){return be(r,ur,ve)}var k=x(T,"DataView"),rr=x(T,"Promise"),nr=x(T,"Set"),Sr="[object Map]",Te="[object Object]",Er="[object Promise]",xr="[object Set]",Cr="[object WeakMap]",Mr="[object DataView]",Ae=E(k),we=E(D),Oe=E(rr),Pe=E(nr),$e=E(Q),P=M;(k&&P(new k(new ArrayBuffer(1)))!=Mr||D&&P(new D)!=Sr||rr&&P(rr.resolve())!=Er||nr&&P(new nr)!=xr||Q&&P(new Q)!=Cr)&&(P=function(r){var n=M(r),t=n==Te?r.constructor:void 0,e=t?E(t):"";if(e)switch(e){case Ae:return Mr;case we:return Sr;case Oe:return Er;case Pe:return xr;case $e:return Cr}return n});var jr=T.Uint8Array,me="__lodash_hash_undefined__";function Se(r){return this.__data__.set(r,me),this}function Ee(r){return this.__data__.has(r)}function N(r){var n=-1,t=r==null?0:r.length;for(this.__data__=new w;++n<t;)this.add(r[n])}N.prototype.add=N.prototype.push=Se;N.prototype.has=Ee;function xe(r,n){for(var t=-1,e=r==null?0:r.length;++t<e;)if(n(r[t],t,r))return!0;return!1}function Ce(r,n){return r.has(n)}var Me=1,je=2;function Wr(r,n,t,e,i,a){var u=t&Me,o=r.length,f=n.length;if(o!=f&&!(u&&f>o))return!1;var s=a.get(r),g=a.get(n);if(s&&g)return s==n&&g==r;var p=-1,l=!0,v=t&je?new N:void 0;for(a.set(r,n),a.set(n,r);++p<o;){var d=r[p],h=n[p];if(e)var O=u?e(h,d,p,n,r,a):e(d,h,p,r,n,a);if(O!==void 0){if(O)continue;l=!1;break}if(v){if(!xe(n,function($,m){if(!Ce(v,m)&&(d===$||i(d,$,t,e,a)))return v.push(m)})){l=!1;break}}else if(!(d===h||i(d,h,t,e,a))){l=!1;break}}return a.delete(r),a.delete(n),l}function Re(r){var n=-1,t=Array(r.size);return r.forEach(function(e,i){t[++n]=[i,e]}),t}function Le(r){var n=-1,t=Array(r.size);return r.forEach(function(e){t[++n]=e}),t}var Fe=1,De=2,Ie="[object Boolean]",Ge="[object Date]",ze="[object Error]",Be="[object Map]",Ne="[object Number]",Ue="[object RegExp]",He="[object Set]",Ke="[object String]",Xe="[object Symbol]",qe="[object ArrayBuffer]",Ze="[object DataView]",Rr=y?y.prototype:void 0,Y=Rr?Rr.valueOf:void 0;function We(r,n,t,e,i,a,u){switch(t){case Ze:if(r.byteLength!=n.byteLength||r.byteOffset!=n.byteOffset)return!1;r=r.buffer,n=n.buffer;case qe:return!(r.byteLength!=n.byteLength||!a(new jr(r),new jr(n)));case Ie:case Ge:case Ne:return er(+r,+n);case ze:return r.name==n.name&&r.message==n.message;case Ue:case Ke:return r==n+"";case Be:var o=Re;case He:var f=e&Fe;if(o||(o=Le),r.size!=n.size&&!f)return!1;var s=u.get(r);if(s)return s==n;e|=De,u.set(r,n);var g=Wr(o(r),o(n),e,i,a,u);return u.delete(r),g;case Xe:if(Y)return Y.call(r)==Y.call(n)}return!1}var Je=1,Ye=Object.prototype,Qe=Ye.hasOwnProperty;function Ve(r,n,t,e,i,a){var u=t&Je,o=mr(r),f=o.length,s=mr(n),g=s.length;if(f!=g&&!u)return!1;for(var p=f;p--;){var l=o[p];if(!(u?l in n:Qe.call(n,l)))return!1}var v=a.get(r),d=a.get(n);if(v&&d)return v==n&&d==r;var h=!0;a.set(r,n),a.set(n,r);for(var O=u;++p<f;){l=o[p];var $=r[l],m=n[l];if(e)var lr=u?e(m,$,l,n,r,a):e($,m,l,r,n,a);if(!(lr===void 0?$===m||i($,m,t,e,a):lr)){h=!1;break}O||(O=l=="constructor")}if(h&&!O){var I=r.constructor,G=n.constructor;I!=G&&"constructor"in r&&"constructor"in n&&!(typeof I=="function"&&I instanceof I&&typeof G=="function"&&G instanceof G)&&(h=!1)}return a.delete(r),a.delete(n),h}var ke=1,Lr="[object Arguments]",Fr="[object Array]",z="[object Object]",ra=Object.prototype,Dr=ra.hasOwnProperty;function na(r,n,t,e,i,a){var u=_(r),o=_(n),f=u?Fr:P(r),s=o?Fr:P(n);f=f==Lr?z:f,s=s==Lr?z:s;var g=f==z,p=s==z,l=f==s;if(l&&V(r)){if(!V(n))return!1;u=!0,g=!1}if(l&&!g)return a||(a=new b),u||Xr(r)?Wr(r,n,t,e,i,a):We(r,n,f,t,e,i,a);if(!(t&ke)){var v=g&&Dr.call(r,"__wrapped__"),d=p&&Dr.call(n,"__wrapped__");if(v||d){var h=v?r.value():r,O=d?n.value():n;return a||(a=new b),i(h,O,t,e,a)}}return l?(a||(a=new b),Ve(r,n,t,e,i,a)):!1}function cr(r,n,t,e,i){return r===n?!0:r==null||n==null||!C(r)&&!C(n)?r!==r&&n!==n:na(r,n,t,e,cr,i)}var ta=1,ea=2;function aa(r,n,t,e){var i=t.length,a=i;if(r==null)return!a;for(r=Object(r);i--;){var u=t[i];if(u[2]?u[1]!==r[u[0]]:!(u[0]in r))return!1}for(;++i<a;){u=t[i];var o=u[0],f=r[o],s=u[1];if(u[2]){if(f===void 0&&!(o in r))return!1}else{var g=new b,p;if(!(p===void 0?cr(s,f,ta|ea,e,g):p))return!1}}return!0}function Jr(r){return r===r&&!U(r)}function ia(r){for(var n=ur(r),t=n.length;t--;){var e=n[t],i=r[e];n[t]=[e,i,Jr(i)]}return n}function Yr(r,n){return function(t){return t==null?!1:t[r]===n&&(n!==void 0||r in Object(t))}}function ua(r){var n=ia(r);return n.length==1&&n[0][2]?Yr(n[0][0],n[0][1]):function(t){return t===r||aa(t,r,n)}}function oa(r,n){return r!=null&&n in Object(r)}function fa(r,n,t){n=qr(n,r);for(var e=-1,i=n.length,a=!1;++e<i;){var u=Z(n[e]);if(!(a=r!=null&&t(r,u)))break;r=r[u]}return a||++e!=i?a:(i=r==null?0:r.length,!!i&&ar(i)&&tr(u,i)&&(_(r)||ir(r)))}function sa(r,n){return r!=null&&fa(r,n,oa)}var ca=1,la=2;function pa(r,n){return or(r)&&Jr(n)?Yr(Z(r),n):function(t){var e=ie(t,r);return e===void 0&&e===n?sa(t,r):cr(n,e,ca|la)}}function ga(r){return function(n){return n?.[r]}}function da(r){return function(n){return sr(n,r)}}function ha(r){return or(r)?ga(Z(r)):da(r)}function _a(r){return typeof r=="function"?r:r==null?H:typeof r=="object"?_(r)?pa(r[0],r[1]):ua(r):ha(r)}function ya(r){return function(n,t,e){for(var i=-1,a=Object(n),u=e(n),o=u.length;o--;){var f=u[++i];if(t(a[f],f,a)===!1)break}return n}}var va=ya();function ba(r,n){return r&&va(r,n,ur)}function Ta(r,n){return function(t,e){if(t==null)return t;if(!K(t))return r(t,e);for(var i=t.length,a=-1,u=Object(t);++a<i&&e(u[a],a,u)!==!1;);return t}}var Aa=Ta(ba);function wa(r,n){var t=-1,e=K(r)?Array(r.length):[];return Aa(r,function(i,a,u){e[++t]=n(i,a,u)}),e}function Oa(r,n){var t=r.length;for(r.sort(n);t--;)r[t]=r[t].value;return r}function Pa(r,n){if(r!==n){var t=r!==void 0,e=r===null,i=r===r,a=L(r),u=n!==void 0,o=n===null,f=n===n,s=L(n);if(!o&&!s&&!a&&r>n||a&&u&&f&&!o&&!s||e&&u&&f||!t&&f||!i)return 1;if(!e&&!a&&!s&&r<n||s&&t&&i&&!e&&!a||o&&t&&i||!u&&i||!f)return-1}return 0}function $a(r,n,t){for(var e=-1,i=r.criteria,a=n.criteria,u=i.length,o=t.length;++e<u;){var f=Pa(i[e],a[e]);if(f){if(e>=o)return f;var s=t[e];return f*(s=="desc"?-1:1)}}return r.index-n.index}function ma(r,n,t){n.length?n=B(n,function(a){return _(a)?function(u){return sr(u,a.length===1?a[0]:a)}:a}):n=[H];var e=-1;n=B(n,Hr(_a));var i=wa(r,function(a,u,o){var f=B(n,function(s){return s(a)});return{criteria:f,index:++e,value:a}});return Oa(i,function(a,u){return $a(a,u,t)})}var Sa=Fn(function(r,n){if(r==null)return[];var t=n.length;return t>1&&vr(r,n[0],n[1])?n=[]:t>2&&vr(n[0],n[1],n[2])&&(n=[n[0]]),ma(r,oe(n),[])});export{Sa as s};\n'
21227
21281
  }
21228
21282
  };
21229
21283
  });
@@ -21339,7 +21393,8 @@ class ConfigHandler {
21339
21393
  static sanitizeModificationRules(obj) {
21340
21394
  return {
21341
21395
  ...obj.headers && { headers: obj.headers },
21342
- ...obj.body && { body: obj.body }
21396
+ ...obj.body && { body: obj.body },
21397
+ ...obj.query && { query: obj.query }
21343
21398
  };
21344
21399
  }
21345
21400
  static sanitizeAuth(auth) {