tarsk 0.5.80 → 0.5.81
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.
- package/dist/bundled-skills/skill-creator/scripts/quick_validate.js +28 -14
- package/dist/index.js +3272 -1604
- package/dist/public/assets/{account-view-DVfacvrH.js → account-view-CkeaK8vk.js} +1 -1
- package/dist/public/assets/{alert-dialog-DTxl_mXc.js → alert-dialog-Jje1F97D.js} +1 -1
- package/dist/public/assets/api-BnJTzqjz.js +2 -0
- package/dist/public/assets/{async-error-boundary-DmJy8jgz.js → async-error-boundary-BqVpxDC8.js} +1 -1
- package/dist/public/assets/{browser-tab-BZSxX4fR.js → browser-tab-DjtkGpuv.js} +2 -2
- package/dist/public/assets/{button-DhxraVUW.js → button-CltOBnLJ.js} +1 -1
- package/dist/public/assets/{card-DZy9jCWQ.js → card-F7mD70yN.js} +1 -1
- package/dist/public/assets/chat-dock-context-BHq1_jtf.js +1 -0
- package/dist/public/assets/{commit-dialog-D0z3emO_.js → commit-dialog-Cl3V3kAa.js} +1 -1
- package/dist/public/assets/{commit-error-dialog-CVSOwpqp.js → commit-error-dialog-DiBCAGnv.js} +1 -1
- package/dist/public/assets/{commit-method-fields-C7Du43jy.js → commit-method-fields-CX9hg6Je.js} +1 -1
- package/dist/public/assets/conversation-history-view-Ev79lcal.js +1 -0
- package/dist/public/assets/create-project-dialog-C-5wed95.js +2 -0
- package/dist/public/assets/{create-repo-dialog-lS-Tko1c.js → create-repo-dialog-nEwcPXH1.js} +1 -1
- package/dist/public/assets/{delete-confirm-dialog-Ciwqi6ts.js → delete-confirm-dialog-BJljYiX_.js} +1 -1
- package/dist/public/assets/diff-view-DKfdgmNU.js +4 -0
- package/dist/public/assets/{dist-aB1qUwWW.js → dist-5hESBP4d.js} +1 -1
- package/dist/public/assets/{dist-Bihbg_hO.js → dist-BW2D7v35.js} +1 -1
- package/dist/public/assets/{dist-CA_zFhwJ.js → dist-BuAo47a7.js} +1 -1
- package/dist/public/assets/{dist-BZmr2Qex.js → dist-CnoazagX.js} +1 -1
- package/dist/public/assets/dist-DFsjr0PN.js +2 -0
- package/dist/public/assets/{dist-iDwSbcD5.js → dist-DjsjvpPB.js} +1 -1
- package/dist/public/assets/{dist-BkOEUrQf.js → dist-pqOQhr7q.js} +1 -1
- package/dist/public/assets/{dist-Dj1qT-gv.js → dist-s8kCZECe.js} +1 -1
- package/dist/public/assets/{es2015-B0KHrBGH.js → es2015-CqjklqcF.js} +1 -1
- package/dist/public/assets/{explorer-monaco-editor-YoaTqh0f.js → explorer-monaco-editor-JexQ2hDA.js} +1 -1
- package/dist/public/assets/{explorer-tab-view-DlBIsvNp.js → explorer-tab-view-ib2FX8Ak.js} +2 -2
- package/dist/public/assets/explorer-tree-u1IiLEmZ.js +1 -0
- package/dist/public/assets/explorer-view-D2cPTIXP.js +76 -0
- package/dist/public/assets/{git-history-dialog-DOcupC-P.js → git-history-dialog-URTkxCPe.js} +1 -1
- package/dist/public/assets/index-8x-2e2HM.js +114 -0
- package/dist/public/assets/index-WbZmmRUY.css +1 -0
- package/dist/public/assets/{model-list-controls-DOpHpzG8.js → model-list-controls-RfXuDYC4.js} +1 -1
- package/dist/public/assets/onboarding-dialog-q06UP-U0.js +1 -0
- package/dist/public/assets/{pill-tabs-CiONEGsi.js → pill-tabs-BWLL8Iix.js} +1 -1
- package/dist/public/assets/{progress-indicator-C7Kj9U3t.js → progress-indicator-4LUNdJet.js} +1 -1
- package/dist/public/assets/project-coding-view-Di-O7V7a.js +1 -0
- package/dist/public/assets/{project-danger-zone-view-BfHTp5LI.js → project-danger-zone-view-CUb4CrIM.js} +1 -1
- package/dist/public/assets/{project-env-vars-view-QrpeAxIt.js → project-env-vars-view-CROExO3i.js} +1 -1
- package/dist/public/assets/{project-model-aliases-view-D_pamHsA.js → project-model-aliases-view-BYA1-lFu.js} +1 -1
- package/dist/public/assets/project-settings-view-CU5sfXzs.js +1 -0
- package/dist/public/assets/{project-tools-view-0j2uWvRy.js → project-tools-view-BCvoIfnn.js} +1 -1
- package/dist/public/assets/providers-list-view-D-D_UgD0.js +1 -0
- package/dist/public/assets/pull-request-dialog-DWdtDJYH.js +1 -0
- package/dist/public/assets/{pull-with-changes-dialog-CFLl2SQP.js → pull-with-changes-dialog-DXtvq4Fx.js} +1 -1
- package/dist/public/assets/{push-before-pr-dialog-CD1rZKan.js → push-before-pr-dialog-D0KZVQuR.js} +1 -1
- package/dist/public/assets/{scroll-area-BQ9bdsVQ.js → scroll-area-DO1A2oHC.js} +1 -1
- package/dist/public/assets/{settings-general-tabs-view-CKaL-A9_.js → settings-general-tabs-view-C4Nue6Ff.js} +2 -2
- package/dist/public/assets/settings-general-view-DTrynmWh.js +1 -0
- package/dist/public/assets/{settings-list-n-CrPPNl.js → settings-list-DZLFM-rH.js} +1 -1
- package/dist/public/assets/{settings-logs-view-CFD-_MKT.js → settings-logs-view-qde-vyal.js} +3 -3
- package/dist/public/assets/settings-mcp-servers-view-DFs6AOqK.js +5 -0
- package/dist/public/assets/settings-models-view-hLa1R5be.js +1 -0
- package/dist/public/assets/{settings-plugins-view-fSxDPjsF.js → settings-plugins-view-_kjrR6md.js} +2 -2
- package/dist/public/assets/{settings-providers-view-Bj4-iemE.js → settings-providers-view-BqPmGz1Y.js} +2 -2
- package/dist/public/assets/{settings-setup-view-ORNCF3ma.js → settings-setup-view-Bg46oj29.js} +2 -2
- package/dist/public/assets/settings-skills-view-BU0yn3R0.js +2 -0
- package/dist/public/assets/{settings-slack-view-Dx4Pdxjq.js → settings-slack-view-BVjt8x5q.js} +1 -1
- package/dist/public/assets/settings-slash-commands-view-mUb6a_t0.js +1 -0
- package/dist/public/assets/{settings-statistics-view-B8YLP2Nb.js → settings-statistics-view-ZVHzmpsK.js} +1 -1
- package/dist/public/assets/{settings-storage-view-Cnmt9-0H.js → settings-storage-view-DRnLbCfi.js} +1 -1
- package/dist/public/assets/{settings-subagents-view-Be7aa0Va.js → settings-subagents-view-BXN3XXXf.js} +2 -2
- package/dist/public/assets/{settings-system-prompt-view-KlPFbkat.js → settings-system-prompt-view-DI4aDJNk.js} +1 -1
- package/dist/public/assets/{settings-tab-bar-BJtpuIky.js → settings-tab-bar-nPxI45ho.js} +1 -1
- package/dist/public/assets/{settings-view-dchqYhRC.js → settings-view-BkmrqO5_.js} +2 -2
- package/dist/public/assets/{slug-utils-Ccbyp4Mu.js → slug-utils-DTRz-IX4.js} +1 -1
- package/dist/public/assets/store-N5DWaLPi.js +9 -0
- package/dist/public/assets/{table-DCmeRDBK.js → table-D0dYDkHb.js} +1 -1
- package/dist/public/assets/tasks-view-4x-tbVtX.js +1 -0
- package/dist/public/assets/{terminal-panel-DlfAu8U1.js → terminal-panel-k2OuCLTs.js} +1 -1
- package/dist/public/assets/{toggle-group-Dl5P_F6a.js → toggle-group-Db9wT9wS.js} +1 -1
- package/dist/public/assets/{tooltip-Cg_EhO9M.js → tooltip-JvDw-QDI.js} +1 -1
- package/dist/public/assets/{use-active-dock-panel-instance-iaFSG9kX.js → use-active-dock-panel-instance-CloupQ34.js} +1 -1
- package/dist/public/assets/{use-git-check-BfkMHX3g.js → use-git-check-CLdZVT2V.js} +1 -1
- package/dist/public/assets/{use-installed-ai-files-BtR-wIuu.js → use-installed-ai-files-DaBcwgRE.js} +1 -1
- package/dist/public/assets/{useBaseQuery-ChJtNS_3.js → useBaseQuery-DRTrohmA.js} +1 -1
- package/dist/public/assets/{utils-BCj_kT9l.js → utils-Buz2Fe6i.js} +1 -1
- package/dist/public/assets/{web-C5YunZdw.js → web-BpYQ1fL9.js} +1 -1
- package/dist/public/assets/{web-BC7Gc4bP.js → web-DK5m5VSU.js} +1 -1
- package/dist/public/assets/{web-BGZnt3gU.js → web-DM_gKD8p.js} +1 -1
- package/dist/public/assets/{web-BdHVYPFA.js → web-V17M9fvX.js} +1 -1
- package/dist/public/index.html +21 -21
- package/package.json +1 -1
- package/dist/public/assets/api-B_ZIptgC.js +0 -2
- package/dist/public/assets/chat-dock-context-DhO-jYMh.js +0 -1
- package/dist/public/assets/conversation-history-view-CkI6-Hvt.js +0 -1
- package/dist/public/assets/create-project-dialog-Ciiyx0LH.js +0 -2
- package/dist/public/assets/diff-view-DKEDlvjR.js +0 -4
- package/dist/public/assets/dist-DZtmmQ-F.js +0 -2
- package/dist/public/assets/explorer-tree-BWb4wB5M.js +0 -1
- package/dist/public/assets/explorer-view-qOBi4ACi.js +0 -76
- package/dist/public/assets/index-B3oaBks2.css +0 -1
- package/dist/public/assets/index-DdJcjvu2.js +0 -112
- package/dist/public/assets/onboarding-dialog-CfkWB6ST.js +0 -1
- package/dist/public/assets/project-coding-view-CrOGfL2D.js +0 -1
- package/dist/public/assets/project-settings-view-C04tQu0x.js +0 -1
- package/dist/public/assets/providers-list-view-4pcZxBFJ.js +0 -1
- package/dist/public/assets/pull-request-dialog-HXBislex.js +0 -1
- package/dist/public/assets/settings-general-view-ybttpP37.js +0 -1
- package/dist/public/assets/settings-mcp-servers-view-kTpnzhrf.js +0 -5
- package/dist/public/assets/settings-models-view-RmIvRn-i.js +0 -1
- package/dist/public/assets/settings-skills-view-Dl38QbWw.js +0 -2
- package/dist/public/assets/settings-slash-commands-view-CSm-ZqwM.js +0 -1
- package/dist/public/assets/store-D4D62vkY.js +0 -9
- package/dist/public/assets/tasks-view-CRBklv4O.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-aKtaBQYM.js";Object.entries({"VS Code":{name:`VS Code`,appName:[`Visual Studio Code`,`code`]},Cursor:{name:`Cursor`,appName:[`Cursor`,`cursor`]},Windsurf:{name:`Windsurf`,appName:[`Windsurf`,`windsurf`]},Xcode:{name:`Xcode`,appName:`Xcode`},"Android Studio":{name:`Android Studio`,appName:[`Android Studio`,`studio`]},Kiro:{name:`Kiro`,appName:[`Kiro`,`kiro`]},Terminal:{name:`Terminal`,appName:`Terminal`},"Devin Desktop":{name:`Devin Desktop`,appName:[`Devin`,`Devin Desktop`]},Antigravity:{name:`Antigravity`,appName:[`com.google.antigravity-ide`,`Antigravity IDE`]}}).reduce((e,[t,n])=>(e[t]=n.appName,e),{});var t=new Set([`minimal`,`low`,`medium`,`high`,`xhigh`,`max`]);function n(e){return t.has(e)}function r(e){return e===`off`||n(e)}function i(e){return e?e.reasoningEffort===void 0?e.reasoning===void 0?{reasoningEffort:`off`}:{reasoningEffort:e.reasoning?`medium`:`off`}:{reasoningEffort:e.reasoningEffort}:{reasoningEffort:`off`}}function a(e){return e===`off`?`Off`:e===`xhigh`?`Extra high`:e===`max`?`Max`:e.charAt(0).toUpperCase()+e.slice(1)}function o(e,t){return e===`off`||t.length===0?`off`:t.includes(e)?e:t.includes(`medium`)?`medium`:t[0]??`off`}function s(e){return e?e.reasoningEffort!==void 0||e.reasoning!==void 0:!1}function c(e){return e.length===0?`off`:e.includes(`medium`)?`medium`:e[0]??`off`}function l(e,t){return!s(e)&&t.length>0?c(t):o(i(e).reasoningEffort??`off`,t)}var u=[`default`,`fast`,`local`,`cheap`,`smart`],d={default:`Default`,fast:`Fast`,local:`Local`,cheap:`Cheap`,smart:`Smart`},f={default:`Default model for new chats`,fast:`Quick responses for lightweight tasks`,local:`On-device or local inference`,cheap:`Lower-cost models for routine work`,smart:`Most capable models for complex tasks`},p=new Set(u);function m(e){return p.has(e)}function ee(e){return`${e.provider}::${e.model}`}function h(e){let t=e.indexOf(`::`);if(t<=0||t>=e.length-2)return null;let n=e.slice(0,t).trim(),r=e.slice(t+2).trim();return!n||!r?null:{provider:n,model:r}}function g(e,t){return m(e)?t?.[e]??null:null}function _(e){return!e?.model?.trim()||!e.provider?.trim()?null:e}function v(e){return _(g(`default`,e))!==null}function y(e){return _(g(`cheap`,e))!==null}function te(e){return _(g(`fast`,e))??_(g(`cheap`,e))}function ne(e){return te(e)!==null}function re(e){return g(`smart`,e)}function b(e,t){let n=e.toLowerCase();return t[n]?t[n]:Object.entries(t).find(([e])=>e.toLowerCase()===n)?.[1]??[]}function ie(e,t){return b(e.provider,t).includes(e.model)}function ae(e,t){for(let n of u){let r=e[n];if(r&&!ie(r,t))throw Error(`Model alias '${n}' must reference an enabled model. '${r.provider}/${r.model}' is not enabled.`)}}var oe=[`build`,`plan`,`image`,`orchestrate`],se={build:`Agent`,plan:`Plan Agent`,image:`Image Agent`,orchestrate:`Orchestrator Agent`};function ce(e){return e.orchestrateMode?`orchestrate`:e.planMode?`plan`:e.imageMode?`image`:`build`}function le(e){return e?se[e]:se.build}var ue=[`auto`,...oe],de=`auto`,fe=new Set(ue);function pe(e){return typeof e==`string`&&fe.has(e)}function me(e){return e.autoMode?`auto`:ce(e)}function he(e){return{autoMode:e===`auto`,planMode:e===`plan`,imageMode:e===`image`,ralphMode:!1,orchestrateMode:e===`orchestrate`}}function ge(e,t,n){return`The pull request for branch ${e} was merged and fresh branch from ${t} was created called ${n}.`}function _e(e){return`The pull request for branch ${e} was merged, but the fresh branch was not created because this workspace has uncommitted changes. Commit or stash the changes, then try again.`}var ve=[`cheap`,`smart`,`default`],ye=`Picking a model...`,be={cheap:`Cheap`,smart:`Smart`,default:`Default`};new Set(ve),RegExp(`\\b(${ve.join(`|`)})\\b`);var x;(function(e){e.PullRequest=`pull-request`,e.Direct=`direct`})(x||={}),x.PullRequest,x.PullRequest,x.Direct,x.Direct;var S={bun:{id:`bun`,label:`bun`},npm:{id:`npm`,label:`npm`},yarn:{id:`yarn`,label:`yarn`},pnpm:{id:`pnpm`,label:`pnpm`}};function xe(e,t=0,n=0){let r=Number.isFinite(e)&&e>0?e:0,i=(Number.isFinite(t)&&t>0?t:0)+(Number.isFinite(n)&&n>0?n:0);return r>=i?r:r+i}function Se(e,t){return!Number.isFinite(e)||!Number.isFinite(t)||t<=0||e<=0?0:Math.min(1,e/t)}function Ce(e){return e==null||e<=0?`~$0.00`:`~$${(Math.round(e*100)/100).toFixed(2)}`}function we(e){return e==null||!Number.isFinite(e)||e<=0?`$0.00`:`$${(Math.round(e*100)/100).toFixed(2)}`}function Te(e){if(e==null||!Number.isFinite(e)||e<=0)return`0`;let t=Math.round(e);return t>=1e6?`${(t/1e6).toFixed(1)}mil`:`${(t/1e3).toFixed(1)}K`}function Ee(e){if(e==null||!Number.isFinite(e)||e<=0)return`0 tokens`;let t=Math.round(e/4);return t<1e3?`${t} tokens`:t<1e6?`${(t/1e3).toFixed(1)}K tokens`:`${(t/1e6).toFixed(1)}M tokens`}function De(e){return e?Math.ceil(e.length/4):0}var Oe=2.5;function ke(e){return e?Math.ceil(e.length/Oe):0}function Ae(e){let t=new Map;for(let n of e){if(!n.server)continue;let e=t.get(n.server)??[];e.push(n),t.set(n.server,e)}return Array.from(t,([e,t])=>({server:e,tokens:t.reduce((e,t)=>e+t.tokens,0),tools:t})).sort((e,t)=>t.tokens-e.tokens)}function je(e){let t=(e??``).replace(/\s+/g,` `).trim().replace(/^["'“”‘’]+|["'“”‘’]+$/g,``).trim();return t?t.length>100?`${t.slice(0,100).trimEnd()}…`:t:``}var Me=`order`,Ne=`updated`,Pe=`obs_`,Fe=2e3;RegExp(`${Pe}[a-f0-9]{64}`,`i`);function Ie(e){return RegExp(`^${Pe}[a-f0-9]{64}$`).test(e)}function Le(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.id==`string`&&Ie(t.id)&&typeof t.byteLength==`number`&&typeof t.lineCount==`number`&&typeof t.previewByteLength==`number`}function Re(e){return e!==void 0&&e<.05}new Set([`read`,`bash`,`grep`,`find`,`ls`,`web_search`,`fetch`,`edit`,`write`,`browser`,`get_observation`]);var ze=`Processing...`,Be=`Thinking...`,Ve=3e3,He=[`Loading...`,`Brewing...`,`Summoning...`,`Searching...`,`Generating...`,`Herding...`,`Scanning...`,`Following...`,`Building...`,`Finishing...`],Ue=2e3,We=3e4;function C(e){return typeof e==`string`&&e.startsWith(`data:image`)}function Ge(e){let t=e.indexOf(`,`);return t===-1?{imageUrl:e}:{imageUrl:e,imageData:e.slice(t+1)}}function w(e){let t=typeof e.imageUrl==`string`?e.imageUrl:void 0,n=typeof e.imageData==`string`?e.imageData:void 0;return!t&&!n?null:t&&C(t)&&!n?Ge(t):{imageUrl:t,imageData:n}}function Ke(e){if(typeof e==`string`)return[e];if(!Array.isArray(e))return[];let t=[];for(let n of e)typeof n==`object`&&n&&`text`in n&&typeof n.text==`string`&&t.push(n.text);return t}function T(e){for(let t of e){let e=t.trim();if(!e.startsWith(`{`)){if(C(e))return Ge(e);continue}try{let t=qe(JSON.parse(e));if(t)return t}catch{}}return null}function qe(e){if(e==null)return null;if(typeof e==`object`&&!Array.isArray(e)){let t=w(e);if(t)return t}let t=Ke(e);return t.length>0?T(t):null}function Je(e){let t={...e};return delete t.imageData,delete t.image_data,typeof t.imageUrl==`string`&&C(t.imageUrl)&&delete t.imageUrl,t}var Ye=/^(localhost|127\.0\.0\.1)$/i;function Xe(e){return Ye.test(e)}function Ze(e){return!e||e.startsWith(`data:`)||/^https?:\/\//i.test(e)}function Qe(e,t){let n=e.trim();if(!n||n.startsWith(`data:`)||!/^https?:\/\//i.test(n))return e;let r;try{r=new URL(n)}catch{return e}if(!Xe(r.hostname))return e;let i;try{i=new URL(t)}catch{return e}return`${i.origin}${r.pathname}${r.search}${r.hash}`}function E(e,t){return Ze(e)?e:`${t.replace(/\/$/,``)}${e.startsWith(`/`)?e:`/${e}`}`}function $e(e){try{let t=new URL(e,`http://localhost`),n=t.searchParams.get(`path`);if(n){let e=n.split(/[/\\]/).pop();if(e)return e}let r=t.pathname.split(`/`).pop();if(r?.includes(`.`))return r}catch{}}var et={pageTitle:`text-3xl font-bold`,pageSubtitle:`text-base text-muted-foreground`,sectionTitle:`text-xl font-semibold`,subSectionTitle:`text-lg font-semibold`,sectionSubtitle:`text-base font-medium`,emptyStateTitle:`text-base font-semibold text-muted-foreground`,body:`text-base`,bodyMuted:`text-base text-muted-foreground`,conversationBody:`text-sm`,caption:`text-sm text-muted-foreground`,compact:`text-xs`,captionForeground:`text-sm`,dropdownGroupHeading:`text-xs font-semibold text-muted-foreground`,mono:`font-mono text-base`,error:`text-base text-destructive`,dialogTitle:`text-xl font-semibold leading-none tracking-tight`,dialogDescription:`text-base text-muted-foreground`,label:`text-base font-medium leading-none`,labelNormal:`text-base font-normal leading-none`,labelMuted:`text-base font-normal leading-none text-muted-foreground`,stat:`text-2xl font-bold`,infoBanner:`text-base text-muted-foreground bg-muted rounded-md px-3 py-2 mb-4`,hintBanner:`text-sm text-muted-foreground bg-muted rounded-md px-3 py-2 mb-4`},tt={settingsPage:`@container/settings-page w-full px-6 pb-6`,accountPage:`max-w-2xl mx-auto px-6 pb-6 pt-6`,formPage:`max-w-2xl mx-auto px-6 pb-6 pt-6`,tableWrapper:`overflow-hidden rounded-md border border-table-border`,settingsFieldRow:`flex w-full flex-col gap-2 @md/settings-page:flex-row @md/settings-page:items-center @md/settings-page:gap-4`,settingsFieldLabel:`flex min-w-0 flex-col justify-center @md/settings-page:min-h-10 @md/settings-page:w-44 @md/settings-page:shrink-0 @min-[52rem]/settings-page:w-52`,settingsFieldControl:`flex min-w-0 w-full flex-1 flex-col items-stretch`,settingsFieldStack:`flex w-full flex-col gap-4`};function nt(e,t){return t?e*1:e}function rt(e,t){return nt(e,t)/100*100}var it=[{name:`agent`,enabled:!0,displayName:`Subagent`,activeDisplayName:`Subagent`},{name:`ask_user`,enabled:!0,displayName:`Ask`,activeDisplayName:`Asking`},{name:`propose_branch`,enabled:!0,displayName:`Propose Branch`,activeDisplayName:`Proposing Branch`},{name:`bash`,enabled:!0,displayName:`Run`,activeDisplayName:`Running`},{name:`browser`,enabled:!0,displayName:`Browser`,activeDisplayName:`Browsing`},{name:`chat_title`,enabled:!0,displayName:`Chat Title`,activeDisplayName:`Titling Chat`},{name:`edit`,enabled:!0,displayName:`Edit`,activeDisplayName:`Editing`},{name:`execute_skill_script`,enabled:!0,displayName:`Run Skill Script`,activeDisplayName:`Running Script`},{name:`fetch`,enabled:!0,displayName:`Fetch`,activeDisplayName:`Fetching`},{name:`find`,enabled:!0,displayName:`Find`,activeDisplayName:`Finding`},{name:`find_images`,enabled:!0,displayName:`Find Images`,activeDisplayName:`Finding Images`},{name:`generate_image`,enabled:!0,displayName:`Make Image`,activeDisplayName:`Making Image`},{name:`get_observation`,enabled:!0,displayName:`Observe`,activeDisplayName:`Observing`},{name:`grep`,enabled:!0,displayName:`Search`,activeDisplayName:`Searching`},{name:`history`,enabled:!0,displayName:`History`,activeDisplayName:`Searching History`},{name:`ls`,enabled:!1,displayName:`List`,activeDisplayName:`Listing`},{name:`mcp`,enabled:!0,displayName:`MCP Tool`,activeDisplayName:`Tool`},{name:`notes`,enabled:!0,displayName:`Notes`,activeDisplayName:`Updating Notes`},{name:`projects`,enabled:!0,defaultEnabled:!1,displayName:`Projects`,activeDisplayName:`Getting Projects`},{name:`prompt_project`,enabled:!0,defaultEnabled:!1,displayName:`Prompt`,activeDisplayName:`Prompting`},{name:`read`,enabled:!0,displayName:`Read`,activeDisplayName:`Reading`},{name:`read_skill`,enabled:!0,displayName:`Read Skill`,activeDisplayName:`Reading Skill`},{name:`read_skill_reference`,enabled:!0,displayName:`Read Reference`,activeDisplayName:`Reading Reference`},{name:`run_js`,enabled:!0,displayName:`Run JS`,activeDisplayName:`Running JS`},{name:`todo`,enabled:!0,displayName:`Todo`,activeDisplayName:`Updating`},{name:`tasks`,enabled:!0,displayName:`Tasks`,activeDisplayName:`Managing Tasks`},{name:`tool_search`,enabled:!0,displayName:`Find Tools`,activeDisplayName:`Finding Tools`},{name:`web_search`,enabled:!0,displayName:`Web Search`,activeDisplayName:`Searching Web`},{name:`write`,enabled:!0,displayName:`Write`,activeDisplayName:`Writing`}],at=new Map(it.map(e=>[e.name,e]));function ot(e){return e.charAt(0).toUpperCase()+e.slice(1)}var D=new Map([[`run_web_worker`,`run_js`],[`file_read`,`read`],[`ast_grep`,`grep`]]);function O(e){if(e.includes(`bash`)||e.includes(`terminal`)||e.includes(`shell`))return at.get(`bash`);if(e.includes(`web_fetch`))return at.get(`fetch`);if(e.includes(`read`))return at.get(`read`)}function st(e){let t=e.toLowerCase(),n=at.get(t);if(n)return n;let r=D.get(t);return r?at.get(r):void 0}function ct(e){return st(e)??O(e.toLowerCase())}function k(e){return ct(e)?.displayName??ot(e)}function lt(e){return st(e)?.displayName??e}function ut(e){let t=ct(e);return t?t.activeDisplayName:k(e)}function A(e,t,n){return`${e} ${e===1?t:n}`}function dt(e,t){let n=e.toLowerCase();return n===`agent`||n.includes(`subagent`)?!0:!!(t&&typeof t==`object`&&`description`in t&&(`prompt`in t||`agentName`in t))}function ft(e){return`${A(e,`subagent`,`subagents`)} working`}function j(e,t,n){return{formatPhrase:r=>e===null?A(r,t,n):`${e} ${A(r,t,n)}`,formatNeutral:e=>A(e,t,n)}}var pt={id:`other`,toolNames:[],...j(null,`tool call`,`tool calls`)},mt=[{id:`files`,toolNames:[`edit`,`write`],...j(`edited`,`file`,`files`)},{id:`commands`,toolNames:[`bash`,`execute_skill_script`,`run_js`],...j(`ran`,`command`,`commands`)},{id:`reads`,toolNames:[`read`,`get_observation`],...j(`read`,`file`,`files`)},{id:`notes`,toolNames:[`notes`],formatPhrase:e=>`${A(e,`note`,`notes`)} captured`,formatNeutral:e=>A(e,`note`,`notes`)},{id:`history`,toolNames:[`history`],formatPhrase:e=>`${A(e,`note`,`notes`)} recalled`,formatNeutral:e=>A(e,`note`,`notes`)},{id:`searches`,toolNames:[`grep`,`find`],...j(null,`search`,`searches`)},{id:`webSearches`,toolNames:[`web_search`],...j(null,`web search`,`web searches`)},{id:`pages`,toolNames:[`fetch`],...j(`fetched`,`page`,`pages`)},{id:`browserActions`,toolNames:[`browser`],...j(null,`browser action`,`browser actions`)},{id:`images`,toolNames:[`generate_image`],...j(`generated`,`image`,`images`)},{id:`subagents`,toolNames:[`agent`],...j(null,`subagent`,`subagents`)},{id:`projects`,toolNames:[`projects`],formatPhrase:()=>`got projects`,formatNeutral:e=>A(e,`project list`,`project lists`)},{id:`prompts`,toolNames:[`prompt_project`],formatPhrase:e=>`${A(e,`prompt`,`prompts`)} sent`,formatNeutral:e=>A(e,`prompt`,`prompts`)},{id:`chatTitle`,toolNames:[`chat_title`],formatPhrase:e=>`${A(e,`chat title`,`chat titles`)} set`,formatNeutral:e=>A(e,`chat title`,`chat titles`)},pt],ht={file_read:`read`,run_web_worker:`run_js`,ast_grep:`grep`,get_projects:`projects`},gt=new Map(mt.flatMap(e=>e.toolNames.map(t=>[t,e])));function _t(e){let t=e.toLowerCase(),n=ht[t]??t;return gt.get(n)??pt}function vt(e){return mt.find(t=>t.id===e)??pt}var yt=new Set([`tool_search`]),M=it.filter(e=>e.enabled&&!yt.has(e.name)).map(e=>e.name),N=new Set(M);function bt(e){if(!Array.isArray(e))return[];let t=new Set,n=[];for(let r of e){if(typeof r!=`string`)continue;let e=r.trim().toLowerCase();!e||!N.has(e)||t.has(e)||(t.add(e),n.push(e))}return n.sort()}function xt(){return M.map(e=>({name:e,displayName:lt(e)})).sort((e,t)=>e.displayName.localeCompare(t.displayName))}var St=new Set([`tool_search`]),Ct=it.filter(e=>e.enabled&&!St.has(e.name)).map(e=>e.name),wt=`standard`,Tt=[`ask_user`,`projects`,`prompt_project`,`read_skill`,`web_search`,`execute_skill_script`],Et=[`projects`,`prompt_project`];function Dt(e){return e===`bot`?`bot`:wt}function P(e){return Dt(e.type)===`bot`}function Ot(e){return Dt(e.type)===wt}function F(){let e=new Set(Tt);return Ct.filter(t=>!e.has(t)).sort()}function kt(e){return P(e)?F():bt([...e.disabledTools??[],...Et])}new Set([`version`,`name`,`setupScript`,`runCommand`,`commitMethod`,`disabledTools`,`commands`]),new TextEncoder,new TextDecoder;var I=[`run_js`,`ask_user`,`agent`,`tool_search`];new Set(I);var L={defaultMaxChars:16e3,stepMaxChars:4e3,minMaxChars:512,maxMaxChars:64e3,defaultLimit:40,maxDepth:50,maxCaptureBytes:64*1024*1024,maxStepIdChars:256},R=Object.freeze({maxSteps:100,maxCalls:500,maxConcurrency:8,defaultMaxChars:16e3,maxOutputChars:64e3,minOutputChars:128,minSmartOutputChars:L.minMaxChars,maxStepIdChars:L.maxStepIdChars,maxNesting:50,maxErrorChars:500,blockedTools:I}),At=[`steps`,`return`,`maxChars`],jt=[`id`,`tool`,`args`,`foreach`,`dependsOn`,`select`,`limit`,`maxChars`,`query`,`dedupe`];function Mt(e){let t=new Set;function n(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function r(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&Number.isFinite(e)}function i(e){if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function a(e,t){if(Array.isArray(e)&&t.length!==e.length+1)throw Error(`Plan arrays must be dense without extra properties`)}function o(e,t){return typeof e==`string`&&t.enumerable===!0&&Object.prototype.hasOwnProperty.call(t,`value`)}function s(e){return e===`__proto__`||e===`prototype`||e===`constructor`}function c(e,t){return/^(0|[1-9]\d*)$/.test(e)&&Number(e)<t.length}function l(e,t,n,r){if(n&&t===`length`)return;let i=Object.getOwnPropertyDescriptor(e,t);if(!o(t,i))throw Error(`Plan must contain enumerable JSON data properties`);if(s(t))throw Error(`Unsafe plan property`);if(n&&!c(t,e))throw Error(`Plan arrays cannot have extra properties`);u(i.value,r+1)}function u(e,n){if(n>R.maxNesting)throw Error(`Plan nesting limit exceeded`);if(r(e))return;if(typeof e!=`object`||!e)throw Error(`Plan must contain only JSON data`);if(!i(e))throw Error(`Plan must contain plain JSON objects`);if(t.has(e))throw Error(`Cyclic plan`);t.add(e);let o=Reflect.ownKeys(e);a(e,o);let s=Array.isArray(e);for(let t of o)l(e,t,s,n);t.delete(e)}function d(e){if(!n(e)||!Array.isArray(e.steps)||!e.steps.length||e.steps.length>R.maxSteps)throw Error(`Plan must have a nonempty steps array within the step limit`);for(let t of Object.keys(e))if(!At.includes(t))throw Error(`Unknown plan field: ${t}`);return{steps:e.steps,maxChars:e.maxChars}}function f(e){if(e!==void 0&&(typeof e!=`number`||!Number.isInteger(e)||e<R.minOutputChars||e>R.maxOutputChars))throw Error(`Invalid plan maxChars`)}function p(e){if(!n(e)||typeof e.id!=`string`||!e.id||typeof e.tool!=`string`||!e.tool.trim())throw Error(`Plan steps require id and tool`);return e}function m(e){for(let t of Object.keys(e))if(!jt.includes(t))throw Error(`Unknown step field: ${t}`)}function ee(e){if(e.args!==void 0&&!n(e.args))throw Error(`Step args must be an object`)}function h(e){return typeof e!=`string`}function g(e){if(e.dependsOn!==void 0&&(!Array.isArray(e.dependsOn)||e.dependsOn.some(h)))throw Error(`Step dependsOn must be an array of ids`)}function _(e){if(!Object.prototype.hasOwnProperty.call(e,`foreach`))return;let t=e.foreach;if(!Array.isArray(t)&&!(typeof t==`string`&&t.startsWith(`$`)&&!t.startsWith(`$$`)))throw Error(`Step foreach must be an array or reference`)}function v(e){for(let t of e){let e=p(t);m(e),ee(e),g(e),_(e)}}u(e,0);let y=d(e);return f(y.maxChars),v(y.steps),`return await runPlan(${JSON.stringify(e)});`}function z(e){if(typeof e!=`object`||!e||Array.isArray(e))return null;let t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return null;let n=Object.getOwnPropertyDescriptor(e,`code`),r=Object.getOwnPropertyDescriptor(e,`plan`);if(!!n==!!r||r&&Object.getOwnPropertyDescriptor(e,`patches`))return null;if(n)return typeof n.value==`string`&&n.value.trim()?n.value:null;try{return Mt(r.value)}catch{return null}}var Nt=`local`,Pt=`http://127.0.0.1:8000/v1`,Ft=`LOCAL_API_URL`;function It(e){return e[Ft]?.trim()||Pt}function Lt(e){return e.toLowerCase()===Nt}var Rt=[{value:`providers`,label:`Providers`},{value:`model-aliases`,label:`Default Models`},{value:`models`,label:`List`}];function zt(e){let t=e.replace(/\/+$/,``);return t===`/settings/providers`||t.startsWith(`/settings/providers/`)?`providers`:t===`/settings/models`?`models`:t===`/settings/model-aliases`?`model-aliases`:null}var Bt=[{value:`general`,label:`General`},{value:`history`,label:`History`},{value:`storage`,label:`Storage`},{value:`statistics`,label:`Statistics`},{value:`logs`,label:`Logs`},{value:`slack`,label:`Slack`}];function Vt(e){let t=e.replace(/\/+$/,``);if(t===`/settings/general`)return`general`;for(let e of Bt)if(t===`/settings/general/${e.value}`||e.value!==`general`&&t===`/settings/${e.value}`)return e.value;return null}var Ht={darwin:`macOS`,win32:`Windows`,linux:`Linux`,unknown:`System`},Ut=[{value:`skills`,label:`Skills`},{value:`mcp-servers`,label:`MCP`},{value:`system-prompt`,label:`System Prompt`},{value:`tools`,label:`Tools`},{value:`slash-commands`,label:`Slash Commands`},{value:`subagents`,label:`Subagents`}];function Wt(e){let t=e.replace(/\/+$/,``);if(/^\/settings\/project\/[^/]+\/plugins$/.test(t)||t===`/settings/plugins`)return`skills`;if(/^\/settings\/project\/[^/]+\/tools$/.test(t))return`tools`;for(let e of Ut)if(RegExp(`^/settings/project/[^/]+/plugins/${e.value}$`).test(t)||t===`/settings/plugins/${e.value}`||e.value!==`tools`&&t===`/settings/${e.value}`)return e.value;return null}var Gt=[{value:`setup`,label:`Setup`},{value:`commands`,label:`Commands`}];function Kt(e){let t=e.replace(/\/+$/,``);return/^\/settings\/project\/[^/]+\/coding$/.test(t)?`setup`:/^\/settings\/project\/[^/]+\/coding\/commands$/.test(t)?`commands`:null}var qt=`User declined to run this command:`,Jt=`User declined to fetch from this domain:`,Yt=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`,`ico`,`bmp`,`tiff`,`tif`]),Xt=new Set([`mp4`,`webm`,`mov`,`avi`]),Zt=new Set([`mp3`,`wav`,`ogg`,`m4a`,`aac`,`flac`]),Qt={png:`image/png`,jpg:`image/jpeg`,jpeg:`image/jpeg`,gif:`image/gif`,webp:`image/webp`,svg:`image/svg+xml`,ico:`image/x-icon`,bmp:`image/bmp`,tiff:`image/tiff`,tif:`image/tiff`,mp4:`video/mp4`,webm:`video/webm`,mov:`video/quicktime`,avi:`video/x-msvideo`,mp3:`audio/mpeg`,wav:`audio/wav`,ogg:`audio/ogg`,m4a:`audio/mp4`,aac:`audio/aac`,flac:`audio/flac`};function $t(e){if(!e)return``;let t=e.trim(),n=t.split(/[/\\]/).pop()??t,r=n.lastIndexOf(`.`);return r<=0||r===n.length-1?``:n.slice(r+1).toLowerCase()}function en(e,t){let n=$t(e)||(t?$t(t):``);return n?Yt.has(n)?`image`:Xt.has(n)?`video`:Zt.has(n)?`audio`:null:null}function tn(e,t){return t?.trim()||(Qt[$t(e)]??`application/octet-stream`)}var nn={md:{name:`text`,className:`text-sky-500`},mdc:{name:`text`,className:`text-sky-500`},mdx:{name:`text`,className:`text-sky-500`},txt:{name:`document`,className:`text-muted-foreground`},pdf:{name:`text`,className:`text-red-500`},doc:{name:`text`,className:`text-blue-500`},docx:{name:`text`,className:`text-blue-500`},rtf:{name:`text`,className:`text-blue-500`},csv:{name:`spreadsheet`,className:`text-emerald-600`},tsv:{name:`spreadsheet`,className:`text-emerald-600`},xls:{name:`spreadsheet`,className:`text-emerald-600`},xlsx:{name:`spreadsheet`,className:`text-emerald-600`},ppt:{name:`presentation`,className:`text-orange-500`},pptx:{name:`presentation`,className:`text-orange-500`},key:{name:`presentation`,className:`text-orange-500`},json:{name:`json`,className:`text-amber-500`},jsonc:{name:`json`,className:`text-amber-500`},json5:{name:`json`,className:`text-amber-500`},yaml:{name:`code`,className:`text-violet-500`},yml:{name:`code`,className:`text-violet-500`},toml:{name:`config`,className:`text-zinc-500`},ini:{name:`config`,className:`text-zinc-500`},env:{name:`security`,className:`text-lime-600`},lock:{name:`security`,className:`text-lime-600`},ts:{name:`code`,className:`text-blue-500`},tsx:{name:`code`,className:`text-cyan-500`},js:{name:`code`,className:`text-yellow-500`},jsx:{name:`code`,className:`text-sky-500`},mjs:{name:`code`,className:`text-yellow-500`},cjs:{name:`code`,className:`text-yellow-500`},py:{name:`code`,className:`text-green-600`},rb:{name:`code`,className:`text-red-500`},php:{name:`code`,className:`text-indigo-500`},java:{name:`code`,className:`text-orange-600`},kt:{name:`code`,className:`text-purple-500`},swift:{name:`code`,className:`text-orange-500`},go:{name:`code`,className:`text-cyan-600`},rs:{name:`code`,className:`text-orange-700`},c:{name:`code`,className:`text-slate-500`},h:{name:`code`,className:`text-slate-500`},cpp:{name:`code`,className:`text-blue-600`},cxx:{name:`code`,className:`text-blue-600`},cc:{name:`code`,className:`text-blue-600`},hpp:{name:`code`,className:`text-blue-600`},cs:{name:`code`,className:`text-violet-600`},sh:{name:`config`,className:`text-emerald-500`},bash:{name:`config`,className:`text-emerald-500`},zsh:{name:`config`,className:`text-emerald-500`},fish:{name:`config`,className:`text-emerald-500`},sql:{name:`data`,className:`text-fuchsia-500`},html:{name:`web`,className:`text-orange-500`},htm:{name:`web`,className:`text-orange-500`},css:{name:`code`,className:`text-blue-500`},scss:{name:`code`,className:`text-pink-500`},sass:{name:`code`,className:`text-pink-500`},less:{name:`code`,className:`text-indigo-500`},xml:{name:`code`,className:`text-orange-500`},zip:{name:`archive`,className:`text-amber-700`},tar:{name:`archive`,className:`text-amber-700`},gz:{name:`archive`,className:`text-amber-700`},tgz:{name:`archive`,className:`text-amber-700`},rar:{name:`archive`,className:`text-amber-700`},"7z":{name:`archive`,className:`text-amber-700`}};function rn(e){let t=$t(e);return nn[t]||(Yt.has(t)?{name:`image`,className:`text-pink-500`}:Xt.has(t)?{name:`video`,className:`text-purple-500`}:Zt.has(t)?{name:`audio`,className:`text-green-500`}:{name:`file`,className:`text-muted-foreground`})}function an(e){let t=e.toLowerCase();return t.includes(`token`)||t.includes(`password`)||t.includes(`key`)}var on=`https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens`,sn=`https://docs.gitlab.com/user/profile/personal_access_tokens/`,cn=`https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/`,ln=`https://git-scm.com/docs/gitcredentials`;function un(e){let t=e.trim().toLowerCase();return t===`github.com`||t.endsWith(`.github.com`)?{host:e,name:`GitHub`,secretLabel:`Personal Access Token (Classic)`,secretHelpTitle:`How to get a Personal Access Token`,secretHelpUrl:on}:t===`gitlab.com`||t.endsWith(`.gitlab.com`)?{host:e,name:`GitLab`,secretLabel:`Personal Access Token`,secretHelpTitle:`How to get a Personal Access Token`,secretHelpUrl:sn}:t===`bitbucket.org`||t.endsWith(`.bitbucket.org`)?{host:e,name:`Bitbucket`,secretLabel:`App Password`,secretHelpTitle:`How to get an App Password`,secretHelpUrl:cn}:{host:e,name:e,secretLabel:`Password / Token`,secretHelpTitle:`How to get a Personal Access Token`,secretHelpUrl:ln}}var B=`primary`;function dn(e){if(!e||typeof e.closest!=`function`)return!1;let t=e;return t.closest(`.electrobun-webkit-app-region-drag`)!==null&&t.closest(`.electrobun-webkit-app-region-no-drag`)===null}var V=[{from:`#FCD1F5`,to:`#EFBBF0`},{from:`#EFBBF0`,to:`#B795E4`},{from:`#B795E4`,to:`#97A5EE`},{from:`#97A5EE`,to:`#95DFF2`},{from:`#B7EDF7`,to:`#B4DAF9`},{from:`#B4DAF9`,to:`#FEDBEC`},{from:`#FEDBEC`,to:`#F8B1D3`},{from:`#F8B1D3`,to:`#FFF1C2`},{from:`#CEFFC4`,to:`#B3F9FF`},{from:`#B3F9FF`,to:`#B9D4FF`},{from:`#B9D4FF`,to:`#FFD1FF`},{from:`#F770E5`,to:`#FF8ECC`},{from:`#FF8ECC`,to:`#FFAEBD`},{from:`#FFAEBD`,to:`#FFC897`},{from:`#FFC897`,to:`#FFE791`},{from:`#B1E0F3`,to:`#72DDF7`},{from:`#72DDF7`,to:`#79B8F4`},{from:`#79B8F4`,to:`#8093F1`},{from:`#D8CAF6`,to:`#C2A9EF`},{from:`#C2A9EF`,to:`#AC88E8`},{from:`#AC88E8`,to:`#9667E0`},{from:`#9BF6FF`,to:`#CAFFBF`},{from:`#CAFFBF`,to:`#FDFFB6`},{from:`#FDFFB6`,to:`#FFD6A5`},{from:`#FFD6A5`,to:`#FFADAD`},{from:`#FFAAFF`,to:`#7FB0FF`}],H={from:`#B2FFA3`,to:`#94F6FF`};function fn(e){let t=e.trim();if(!t)return H;let n=t.charCodeAt(0),r=n>=97&&n<=122?n-32:n;return r>=65&&r<=90?V[r-65]??H:V[n%V.length]??H}function pn(e){let{from:t,to:n}=fn(e);return`linear-gradient(145deg, ${t}, ${n})`}var mn=[`security`,`feature`,`fix`,`important`],hn=[`#EF4444`,`#F97316`,`#EAB308`,`#22C55E`,`#14B8A6`,`#06B6D4`,`#3B82F6`,`#8B5CF6`,`#EC4899`,`#78716C`],gn=/[\p{Cc}\p{Cf}]/u;function _n(e){return e.trim().replace(/\s+/g,` `)}function vn(e){return e.toLowerCase()}function yn(e){return e?Array.from(e).length>40?`Tag name must be 40 characters or fewer`:gn.test(e)?`Tag name must not contain control characters`:null:`Tag name is required`}function bn(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function xn(e){return hn[bn(e)%hn.length]??hn[0]}var Sn=[`reload`,`go_back`,`go_forward`,`get_state`,`set_viewport`];function Cn(e){return Sn.includes(e)}function wn(e){return e===`changes`||e===`open-pr`||e===`update-pr`||e===`no-pr`?e:e===!0?`changes`:!1}function Tn(e){return e===`open-pr`||e===`update-pr`||e===`no-pr`}function En(e){return e===`open-pr`||e===`update-pr`}function Dn(e){switch(e){case`changes`:return`Uncommitted changes on this branch`;case`open-pr`:return`Open pull request`;case`update-pr`:return`Unpushed commits on open pull request`;case`no-pr`:return`Committed changes, no pull request yet`;default:return}}var On=`custom-`;function kn(e){return e.startsWith(On)}function An(e,t){return typeof e==`string`?{stack:e}:t?{stack:t}:{}}function jn(e,t){return typeof e==`string`?e:t}function Mn(e){let t=e.toJSON;if(typeof t!=`function`)return null;let n=t.call(e);return typeof n==`object`&&n&&!Array.isArray(n)?n:null}function Nn(e,t){return{...t,name:jn(t.name,e.name),message:jn(t.message,e.message),...An(t.stack,e.stack)}}function Pn(e){return{name:e.name,message:e.message,...An(void 0,e.stack)}}function Fn(e){let t=Mn(e);return t?Nn(e,t):Pn(e)}function In(){let e=new WeakSet;return function(t,n){if(n instanceof Error)return Fn(n);if(typeof n==`object`&&n){if(e.has(n))return`[circular]`;e.add(n)}return n}}function Ln(e,t=new WeakMap){if(e instanceof Error)return Fn(e);if(typeof e!=`object`||!e)return e;let n=t.get(e);if(n!==void 0)return n;if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(Ln(r,t));return n}let r={};t.set(e,r);for(let[n,i]of Object.entries(e))r[n]=Ln(i,t);return r}var U;(function(e){e[e.DEBUG=0]=`DEBUG`,e[e.INFO=1]=`INFO`,e[e.WARN=2]=`WARN`,e[e.ERROR=3]=`ERROR`,e[e.SILENT=4]=`SILENT`})(U||={});var Rn=5e3,zn=U.INFO,Bn={[U.DEBUG]:`DEBUG`,[U.INFO]:`INFO`,[U.WARN]:`WARN`,[U.ERROR]:`ERROR`};function Vn(e){return e===U.DEBUG||e===U.INFO||e===U.WARN||e===U.ERROR?Bn[e]:`UNKNOWN`}var Hn=U.INFO,Un=[],Wn=1,Gn=[],Kn=new Set;function qn(e){Un.push(e)}function Jn(e){for(let t of Kn)try{t(e)}catch{}}function Yn(e){if(e.level<zn||e.level>=U.SILENT)return;let t={...e,id:Wn++};Gn.push(t),Gn.length>5e3&&Gn.splice(0,Gn.length-Rn),Jn({type:`entry`,entry:t})}function Xn(e){try{return JSON.stringify(e,In())}catch{return`[non-serializable]`}}var Zn={[U.DEBUG]:`debug`,[U.INFO]:`info`,[U.WARN]:`warn`,[U.ERROR]:`error`};function Qn(e){let t=Zn[e.level],n=`[${e.event}]`;e.data===void 0?console[t](n,e.message):console[t](n,e.message,typeof e.data==`string`?e.data:Xn(e.data));for(let t of Un)try{t(e)}catch{}}function $n(e){return e instanceof Error?{error:Fn(e)}:Ln(e)}function er(e){function t(t,n,r){let i=t>=zn&&t<U.SILENT,a=t>=Hn;if(!i&&!a)return;let o={ts:new Date().toISOString(),level:t,event:e,message:n,...r===void 0?{}:{data:$n(r)}};i&&Yn(o),a&&Qn(o)}return{debug:(e,n)=>t(U.DEBUG,e,n),info:(e,n)=>t(U.INFO,e,n),warn:(e,n)=>t(U.WARN,e,n),error:(e,n)=>t(U.ERROR,e,n)}}U.DEBUG,U.INFO,U.WARN,U.ERROR;function tr(e){let t=Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function nr(){let e=globalThis.crypto;if(!e?.getRandomValues)throw Error(`crypto.getRandomValues is unavailable`);let t=new Uint8Array(16);return e.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128,tr(t)}function rr(){let e=globalThis.crypto?.randomUUID;return typeof e==`function`?e.call(globalThis.crypto):nr()}var ir=`projectPath`,ar=`vscode`;function or(e){let t=e.startsWith(`?`)?e.slice(1):e;return new URLSearchParams(t).get(`host`)===`vscode`?ar:null}function sr(e){let t=e.startsWith(`?`)?e.slice(1):e;return new URLSearchParams(t).get(ir)||null}var cr=`STREAM_REPETITION`,lr=`The model was stuck repeating itself, so the run was stopped.`,ur=`TOOL_MARKUP_LEAK`,W=`The model's output broke down (it leaked raw tool-call markup), so the run was stopped.`;Math.max(...[`<arg_key>`,`</arg_key>`,`<arg_value>`,`</arg_value>`,`<tool_call>`,`</tool_call>`,`<|tool▁calls▁begin|>`,`<|tool▁call▁begin|>`,`<|tool▁sep|>`,`<|tool_calls_section_begin|>`,`<|tool_call_begin|>`,`<|im_start|>`,`<|im_end|>`].map(e=>e.length));var dr=Object.entries({stopped:`stopped before it replied.`,stream_repetition:`stopped because the model was stuck repeating.`,failed:`failed before it replied.`,empty:`finished with no reply.`}),fr=/^(.+?) \(`([^`]+)`(?:, (.+))?\)$/;function G(e){return e.outcome===`answer`?`${e.projectName} returned a response`:e.outcome===`stopped`?`${e.projectName} stopped before it replied`:e.outcome===`stream_repetition`?`${e.projectName} stopped (stuck repeating)`:e.outcome===`failed`?`${e.projectName} failed before it replied`:`${e.projectName} finished with no reply`}function pr(e){if(typeof e!=`string`)return null;let t=e.trim(),n=t.indexOf(`**:`);if(!t.startsWith(`From **`)||n===-1)return null;let r=t.slice(7,n),i=fr.exec(r);if(!i)return null;let[,a,o,s]=i,c=t.slice(n+3).trim(),l={projectName:a,conversationId:o,label:s??null};if(!c)return{outcome:`empty`,...l,answerText:``};for(let[e,t]of dr)if(c===t)return{outcome:e,...l,answerText:``};return{outcome:`answer`,...l,answerText:c}}var K=/^(\d{3})\s*:\s*([\s\S]+)$/,mr=new Set([`provider returned error`,`error`]);function hr(e){let t=e.trim();if(!t)return t;let n=gr(t);if(n)return n;let r=t.match(K);if(r){let e=r[1],t=q(vr(r[2]?.trim()??``));if(t)return t;if(e===`429`)return`This model is temporarily rate-limited. Please retry shortly.`}return q(vr(t))||t}function gr(e){let t=e.lastIndexOf(`}`);if(t===-1||t>=e.length-1)return;let n=e.slice(t+1).trim();if(!n||n.startsWith(`{`)||n.startsWith(`[`))return;let r=e.slice(0,t+1).trim();if(!K.test(r))return;let i=r.match(K);if(!(!i||vr(i[2]?.trim()??``)===void 0))return n}function q(e){if(!e||typeof e!=`object`)return;let t=e,n=_r(t.metadata);if(n)return n;if(t.error&&typeof t.error==`object`){let e=q(t.error);if(e)return e}if(typeof t.message==`string`){let e=t.message.trim();if(e&&!mr.has(e.toLowerCase()))return e}if(t.code===429||t.code===`429`)return`This model is temporarily rate-limited. Please retry shortly.`}function _r(e){if(!e||typeof e!=`object`)return;let t=e;if(typeof t.raw==`string`&&t.raw.trim())return t.raw.trim();if(Array.isArray(t.previouserrors))for(let e of t.previouserrors){if(!e||typeof e!=`object`)continue;let t=e.raw;if(typeof t==`string`&&t.trim())return t.trim()}}function vr(e){if(e)try{return JSON.parse(e)}catch{return}}var yr=e((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),J=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronField=void 0,e.CronField=class e{#e=!1;#t=!1;#n=!1;#r=[];options={rawValue:``};static get min(){throw Error(`min must be overridden`)}static get max(){throw Error(`max must be overridden`)}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}constructor(t,n={rawValue:``}){if(!Array.isArray(t))throw Error(`${this.constructor.name} Validation error, values is not an array`);if(!(t.length>0))throw Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...n,rawValue:n.rawValue??``},this.#r=[...t].sort(e.sorter),this.#n=this.options.wildcard===void 0?this.#i():this.options.wildcard,this.#e=this.options.rawValue.includes(`L`)||t.includes(`L`),this.#t=this.options.rawValue.includes(`?`)||t.includes(`?`)}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return this.#e}get hasQuestionMarkChar(){return this.#t}get isWildcard(){return this.#n}get values(){return this.#r}static sorter(e,t){let n=typeof e==`number`,r=typeof t==`number`;return n&&r?e-t:!n&&!r?e.localeCompare(t):n?-1:1}static findNearestValueInList(e,t,n){if(n){for(let n=e.length-1;n>=0;n--)if(e[n]<t)return e[n];return null}for(let n=0;n<e.length;n++)if(e[n]>t)return e[n];return null}findNearestValue(e,t){return this.constructor.findNearestValueInList(this.values,e,t)}serialize(){return{wildcard:this.#n,values:this.#r}}validate(){let e,t=this.chars.length>0?` or chars ${this.chars.join(``)}`:``,n=e=>t=>RegExp(`^\\d{0,2}${t}$`).test(e);if(!this.#r.every(t=>(e=t,typeof t==`number`?t>=this.min&&t<=this.max:this.chars.some(n(t)))))throw Error(`${this.constructor.name} Validation error, got value ${e} expected range ${this.min}-${this.max}${t}`);let r=this.#r.find((e,t)=>this.#r.indexOf(e)!==t);if(r)throw Error(`${this.constructor.name} Validation error, duplicate values found: ${r}`)}#i(){return this.options.rawValue.length>0?[`*`,`?`].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(e,t)=>t+this.min).every(e=>this.#r.includes(e))}}})),br=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDayOfMonth=void 0;var t=J(),n=1,r=31,i=Object.freeze([`L`]);e.CronDayOfMonth=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),xr=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDayOfWeek=void 0;var t=J(),n=0,r=7,i=Object.freeze([`L`]);e.CronDayOfWeek=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){if(super(e,t),this.validate(),this.values.some(e=>e===`L`))throw Error(`${this.constructor.name} Validation error, unexpected standalone L`)}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}}})),Sr=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronHour=void 0;var t=J(),n=0,r=23,i=Object.freeze([]);e.CronHour=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Cr=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronMinute=void 0;var t=J(),n=0,r=59,i=Object.freeze([]);e.CronMinute=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Y=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=class extends Error{},n=class extends t{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},r=class extends t{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},i=class extends t{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},a=class extends t{},o=class extends t{constructor(e){super(`Invalid unit ${e}`)}},s=class extends t{},c=class extends t{constructor(){super(`Zone is an abstract class`)}},l=`numeric`,u=`short`,d=`long`,f={year:l,month:l,day:l},p={year:l,month:u,day:l},m={year:l,month:u,day:l,weekday:u},ee={year:l,month:d,day:l},h={year:l,month:d,day:l,weekday:d},g={hour:l,minute:l},_={hour:l,minute:l,second:l},v={hour:l,minute:l,second:l,timeZoneName:u},y={hour:l,minute:l,second:l,timeZoneName:d},te={hour:l,minute:l,hourCycle:`h23`},ne={hour:l,minute:l,second:l,hourCycle:`h23`},re={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:u},b={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:d},ie={year:l,month:l,day:l,hour:l,minute:l},ae={year:l,month:l,day:l,hour:l,minute:l,second:l},oe={year:l,month:u,day:l,hour:l,minute:l},se={year:l,month:u,day:l,hour:l,minute:l,second:l},ce={year:l,month:u,day:l,weekday:u,hour:l,minute:l},le={year:l,month:d,day:l,hour:l,minute:l,timeZoneName:u},ue={year:l,month:d,day:l,hour:l,minute:l,second:l,timeZoneName:u},de={year:l,month:d,day:l,weekday:d,hour:l,minute:l,timeZoneName:d},fe={year:l,month:d,day:l,weekday:d,hour:l,minute:l,second:l,timeZoneName:d},pe=class{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}},me=null,he=class e extends pe{static get instance(){return me===null&&(me=new e),me}get type(){return`system`}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Rt(e,t,n)}formatOffset(e,t){return Ht(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type===`system`}get isValid(){return!0}},ge=new Map;function _e(e){let t=ge.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(`en-US`,{hour12:!1,timeZone:e,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,era:`short`}),ge.set(e,t)),t}var ve={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ye(e,t){let n=e.format(t).replace(/\u200E/g,``),[,r,i,a,o,s,c,l]=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n);return[a,r,i,o,s,c,l]}function be(e,t){let n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){let{type:t,value:i}=n[e],a=ve[t];t===`era`?r[a]=i:M(a)||(r[a]=parseInt(i,10))}return r}var x=new Map,S=class e extends pe{static create(t){let n=x.get(t);return n===void 0&&x.set(t,n=new e(t)),n}static resetCache(){x.clear(),ge.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat(`en-US`,{timeZone:e}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=e.isValidZone(t)}get type(){return`iana`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Rt(e,t,n,this.name)}formatOffset(e,t){return Ht(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let n=_e(this.name),[r,i,a,o,s,c,l]=n.formatToParts?be(n,t):ye(n,t);o===`BC`&&(r=-Math.abs(r)+1);let u=Pt({year:r,month:i,day:a,hour:s===24?0:s,minute:c,second:l,millisecond:0}),d=+t,f=d%1e3;return d-=f>=0?f:1e3+f,(u-d)/(60*1e3)}equals(e){return e.type===`iana`&&e.name===this.name}get isValid(){return this.valid}},xe={};function Se(e,t={}){let n=JSON.stringify([e,t]),r=xe[n];return r||(r=new Intl.ListFormat(e,t),xe[n]=r),r}var Ce=new Map;function we(e,t={}){let n=JSON.stringify([e,t]),r=Ce.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,t),Ce.set(n,r)),r}var Te=new Map;function Ee(e,t={}){let n=JSON.stringify([e,t]),r=Te.get(n);return r===void 0&&(r=new Intl.NumberFormat(e,t),Te.set(n,r)),r}var De=new Map;function Oe(e,t={}){let{base:n,...r}=t,i=JSON.stringify([e,r]),a=De.get(i);return a===void 0&&(a=new Intl.RelativeTimeFormat(e,t),De.set(i,a)),a}var ke=null;function Ae(){return ke||(ke=new Intl.DateTimeFormat().resolvedOptions().locale,ke)}var je=new Map;function Me(e){let t=je.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),je.set(e,t)),t}var Ne=new Map;function Pe(e){let t=Ne.get(e);if(!t){let n=new Intl.Locale(e);t=`getWeekInfo`in n?n.getWeekInfo():n.weekInfo,`minimalDays`in t||(t={...We,...t}),Ne.set(e,t)}return t}function Fe(e){let t=e.indexOf(`-x-`);t!==-1&&(e=e.substring(0,t));let n=e.indexOf(`-u-`);if(n===-1)return[e];{let t,r;try{t=we(e).resolvedOptions(),r=e}catch{let i=e.substring(0,n);t=we(i).resolvedOptions(),r=i}let{numberingSystem:i,calendar:a}=t;return[r,i,a]}}function Ie(e,t,n){return n||t?(e.includes(`-u-`)||(e+=`-u`),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}function Le(e){let t=[];for(let n=1;n<=12;n++){let r=$.utc(2009,n,1);t.push(e(r))}return t}function Re(e){let t=[];for(let n=1;n<=7;n++){let r=$.utc(2016,11,13+n);t.push(e(r))}return t}function ze(e,t,n,r){let i=e.listingMode();return i===`error`?null:i===`en`?n(t):r(t)}function Be(e){return e.numberingSystem&&e.numberingSystem!==`latn`?!1:e.numberingSystem===`latn`||!e.locale||e.locale.startsWith(`en`)||Me(e.locale).numberingSystem===`latn`}var Ve=class{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:r,floor:i,...a}=n;if(!t||Object.keys(a).length>0){let t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=Ee(e,t)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}else return I(this.floor?Math.floor(e):jt(e,3),this.padTo)}},He=class{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=e;else if(e.zone.type===`fixed`){let t=-1*(e.offset/60),n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;e.offset!==0&&S.create(n).valid?(r=n,this.dt=e):(r=`UTC`,this.dt=e.offset===0?e:e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type===`system`?this.dt=e:e.zone.type===`iana`?(this.dt=e,r=e.zone.name):(r=`UTC`,this.dt=e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone);let i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=we(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(``):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if(e.type===`timeZoneName`){let t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}else return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},Ue=class{constructor(e,t,n){this.opts={style:`long`,...n},!t&&Ct()&&(this.rtf=Oe(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):cn(t,e,this.opts.numeric,this.opts.style!==`long`)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},We={firstDay:1,minimalDays:4,weekend:[6,7]},C=class e{static fromOpts(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,i,a=!1){let o=t||D.defaultLocale;return new e(o||(a?`en-US`:Ae()),n||D.defaultNumberingSystem,r||D.defaultOutputCalendar,Ot(i)||D.defaultWeekSettings,o)}static resetCache(){ke=null,Ce.clear(),Te.clear(),De.clear(),je.clear(),Ne.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return e.create(t,n,r,i)}constructor(e,t,n,r,i){let[a,o,s]=Fe(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=n||s||null,this.weekSettings=r,this.intl=Ie(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached??=Be(this),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem===`latn`)&&(this.outputCalendar===null||this.outputCalendar===`gregory`);return e&&t?`en`:`intl`}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Ot(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return ze(this,e,qt,()=>{let n=this.intl===`ja`||this.intl.startsWith(`ja-`);t&=!n;let r=t?{month:e,day:`numeric`}:{month:e},i=t?`format`:`standalone`;if(!this.monthsCache[i][e]){let t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,`month`);this.monthsCache[i][e]=Le(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return ze(this,e,Zt,()=>{let n=t?{weekday:e,year:`numeric`,month:`long`,day:`numeric`}:{weekday:e},r=t?`format`:`standalone`;return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=Re(e=>this.extract(e,n,`weekday`))),this.weekdaysCache[r][e]})}meridiems(){return ze(this,void 0,()=>Qt,()=>{if(!this.meridiemCache){let e={hour:`numeric`,hourCycle:`h12`};this.meridiemCache=[$.utc(2016,11,13,9),$.utc(2016,11,13,19)].map(t=>this.extract(t,e,`dayperiod`))}return this.meridiemCache})}eras(e){return ze(this,e,nn,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[$.utc(-40,1,1),$.utc(2017,1,1)].map(e=>this.extract(e,t,`era`))),this.eraCache[e]})}extract(e,t,n){let r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new Ve(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new He(e,this.intl,t)}relFormatter(e={}){return new Ue(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Se(this.intl,e)}isEnglish(){return this.locale===`en`||this.locale.toLowerCase()===`en-us`||Me(this.intl).locale.startsWith(`en-us`)}getWeekSettings(){return this.weekSettings?this.weekSettings:wt()?Pe(this.locale):We}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},Ge=null,w=class e extends pe{static get utcInstance(){return Ge===null&&(Ge=new e(0)),Ge}static instance(t){return t===0?e.utcInstance:new e(t)}static parseSpecifier(t){if(t){let n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new e(zt(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return`fixed`}get name(){return this.fixed===0?`UTC`:`UTC${Ht(this.fixed,`narrow`)}`}get ianaName(){return this.fixed===0?`Etc/UTC`:`Etc/GMT${Ht(-this.fixed,`narrow`)}`}offsetName(){return this.name}formatOffset(e,t){return Ht(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type===`fixed`&&e.fixed===this.fixed}get isValid(){return!0}},Ke=class extends pe{constructor(e){super(),this.zoneName=e}get type(){return`invalid`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return``}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function T(e,t){if(M(e)||e===null)return t;if(e instanceof pe)return e;if(xt(e)){let n=e.toLowerCase();return n==="default"?t:n===`local`||n===`system`?he.instance:n===`utc`||n===`gmt`?w.utcInstance:w.parseSpecifier(n)||S.create(e)}else if(N(e))return w.instance(e);else if(typeof e==`object`&&`offset`in e&&typeof e.offset==`function`)return e;else return new Ke(e)}var qe={arab:`[٠-٩]`,arabext:`[۰-۹]`,bali:`[᭐-᭙]`,beng:`[০-৯]`,deva:`[०-९]`,fullwide:`[0-9]`,gujr:`[૦-૯]`,hanidec:`[〇|一|二|三|四|五|六|七|八|九]`,khmr:`[០-៩]`,knda:`[೦-೯]`,laoo:`[໐-໙]`,limb:`[᥆-᥏]`,mlym:`[൦-൯]`,mong:`[᠐-᠙]`,mymr:`[၀-၉]`,orya:`[୦-୯]`,tamldec:`[௦-௯]`,telu:`[౦-౯]`,thai:`[๐-๙]`,tibt:`[༠-༩]`,latn:`\\d`},Je={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Ye=qe.hanidec.replace(/[\[|\]]/g,``).split(``);function Xe(e){let t=parseInt(e,10);if(isNaN(t)){t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(e[n].search(qe.hanidec)!==-1)t+=Ye.indexOf(e[n]);else for(let e in Je){let[n,i]=Je[e];r>=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}else return t}var Ze=new Map;function Qe(){Ze.clear()}function E({numberingSystem:e},t=``){let n=e||`latn`,r=Ze.get(n);r===void 0&&(r=new Map,Ze.set(n,r));let i=r.get(t);return i===void 0&&(i=RegExp(`${qe[n]}${t}`),r.set(t,i)),i}var $e=()=>Date.now(),et=`system`,tt=null,nt=null,rt=null,it=60,at,ot=null,D=class{static get now(){return $e}static set now(e){$e=e}static set defaultZone(e){et=e}static get defaultZone(){return T(et,he.instance)}static get defaultLocale(){return tt}static set defaultLocale(e){tt=e}static get defaultNumberingSystem(){return nt}static set defaultNumberingSystem(e){nt=e}static get defaultOutputCalendar(){return rt}static set defaultOutputCalendar(e){rt=e}static get defaultWeekSettings(){return ot}static set defaultWeekSettings(e){ot=Ot(e)}static get twoDigitCutoffYear(){return it}static set twoDigitCutoffYear(e){it=e%100}static get throwOnInvalid(){return at}static set throwOnInvalid(e){at=e}static resetCaches(){C.resetCache(),S.resetCache(),$.resetCache(),Qe()}},O=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},st=[0,31,59,90,120,151,181,212,243,273,304,334],ct=[0,31,60,91,121,152,182,213,244,274,305,335];function k(e,t){return new O(`unit out of range`,`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function lt(e,t,n){let r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);let i=r.getUTCDay();return i===0?7:i}function ut(e,t,n){return n+(Mt(e)?ct:st)[t-1]}function A(e,t){let n=Mt(e)?ct:st,r=n.findIndex(e=>e<t),i=t-n[r];return{month:r+1,day:i}}function dt(e,t){return(e-t+7)%7+1}function ft(e,t=4,n=1){let{year:r,month:i,day:a}=e,o=ut(r,i,a),s=dt(lt(r,i,a),n),c=Math.floor((o-s+14-t)/7),l;return c<1?(l=r-1,c=It(l,t,n)):c>It(r,t,n)?(l=r+1,c=1):l=r,{weekYear:l,weekNumber:c,weekday:s,...Ut(e)}}function j(e,t=4,n=1){let{weekYear:r,weekNumber:i,weekday:a}=e,o=dt(lt(r,1,t),n),s=z(r),c=i*7+a-o-7+t,l;c<1?(l=r-1,c+=z(l)):c>s?(l=r+1,c-=z(r)):l=r;let{month:u,day:d}=A(l,c);return{year:l,month:u,day:d,...Ut(e)}}function pt(e){let{year:t,month:n,day:r}=e;return{year:t,ordinal:ut(t,n,r),...Ut(e)}}function mt(e){let{year:t,ordinal:n}=e,{month:r,day:i}=A(t,n);return{year:t,month:r,day:i,...Ut(e)}}function ht(e,t){if(!M(e.localWeekday)||!M(e.localWeekNumber)||!M(e.localWeekYear)){if(!M(e.weekday)||!M(e.weekNumber)||!M(e.weekYear))throw new a(`Cannot mix locale-based week fields with ISO-based week fields`);return M(e.localWeekday)||(e.weekday=e.localWeekday),M(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),M(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function gt(e,t=4,n=1){let r=bt(e.weekYear),i=F(e.weekNumber,1,It(e.weekYear,t,n)),a=F(e.weekday,1,7);return r?i?a?!1:k(`weekday`,e.weekday):k(`week`,e.weekNumber):k(`weekYear`,e.weekYear)}function _t(e){let t=bt(e.year),n=F(e.ordinal,1,z(e.year));return t?n?!1:k(`ordinal`,e.ordinal):k(`year`,e.year)}function vt(e){let t=bt(e.year),n=F(e.month,1,12),r=F(e.day,1,Nt(e.year,e.month));return t?n?r?!1:k(`day`,e.day):k(`month`,e.month):k(`year`,e.year)}function yt(e){let{hour:t,minute:n,second:r,millisecond:i}=e,a=F(t,0,23)||t===24&&n===0&&r===0&&i===0,o=F(n,0,59),s=F(r,0,59),c=F(i,0,999);return a?o?s?c?!1:k(`millisecond`,i):k(`second`,r):k(`minute`,n):k(`hour`,t)}function M(e){return e===void 0}function N(e){return typeof e==`number`}function bt(e){return typeof e==`number`&&e%1==0}function xt(e){return typeof e==`string`}function St(e){return Object.prototype.toString.call(e)===`[object Date]`}function Ct(){try{return typeof Intl<`u`&&!!Intl.RelativeTimeFormat}catch{return!1}}function wt(){try{return typeof Intl<`u`&&!!Intl.Locale&&(`weekInfo`in Intl.Locale.prototype||`getWeekInfo`in Intl.Locale.prototype)}catch{return!1}}function Tt(e){return Array.isArray(e)?e:[e]}function Et(e,t,n){if(e.length!==0)return e.reduce((e,r)=>{let i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function Dt(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ot(e){if(e==null)return null;if(typeof e!=`object`)throw new s(`Week settings must be an object`);if(!F(e.firstDay,1,7)||!F(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!F(e,1,7)))throw new s(`Invalid week settings`);return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function F(e,t,n){return bt(e)&&e>=t&&e<=n}function kt(e,t){return e-t*Math.floor(e/t)}function I(e,t=2){let n=e<0,r;return r=n?`-`+(``+-e).padStart(t,`0`):(``+e).padStart(t,`0`),r}function L(e){if(!(M(e)||e===null||e===``))return parseInt(e,10)}function R(e){if(!(M(e)||e===null||e===``))return parseFloat(e)}function At(e){if(!(M(e)||e===null||e===``)){let t=parseFloat(`0.`+e)*1e3;return Math.floor(t)}}function jt(e,t,n=`round`){let r=10**t;switch(n){case`expand`:return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case`trunc`:return Math.trunc(e*r)/r;case`round`:return Math.round(e*r)/r;case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:throw RangeError(`Value rounding ${n} is out of range`)}}function Mt(e){return e%4==0&&(e%100!=0||e%400==0)}function z(e){return Mt(e)?366:365}function Nt(e,t){let n=kt(t-1,12)+1,r=e+(t-n)/12;return n===2?Mt(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Pt(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Ft(e,t,n){return-dt(lt(e,1,t),n)+t-1}function It(e,t=4,n=1){let r=Ft(e,t,n),i=Ft(e+1,t,n);return(z(e)-r+i)/7}function Lt(e){return e>99?e:e>D.twoDigitCutoffYear?1900+e:2e3+e}function Rt(e,t,n,r=null){let i=new Date(e),a={hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`};r&&(a.timeZone=r);let o={timeZoneName:t,...a},s=new Intl.DateTimeFormat(n,o).formatToParts(i).find(e=>e.type.toLowerCase()===`timezonename`);return s?s.value:null}function zt(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);let r=parseInt(t,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function Bt(e){let t=Number(e);if(typeof e==`boolean`||e===``||!Number.isFinite(t))throw new s(`Invalid unit value ${e}`);return t}function Vt(e,t){let n={};for(let r in e)if(P(e,r)){let i=e[r];if(i==null)continue;n[t(r)]=Bt(i)}return n}function Ht(e,t){let n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?`+`:`-`;switch(t){case`short`:return`${i}${I(n,2)}:${I(r,2)}`;case`narrow`:return`${i}${n}${r>0?`:${r}`:``}`;case`techie`:return`${i}${I(n,2)}${I(r,2)}`;default:throw RangeError(`Value format ${t} is out of range for property format`)}}function Ut(e){return Dt(e,[`hour`,`minute`,`second`,`millisecond`])}var Wt=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],Gt=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],Kt=[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`];function qt(e){switch(e){case`narrow`:return[...Kt];case`short`:return[...Gt];case`long`:return[...Wt];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`];case`2-digit`:return[`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`,`12`];default:return null}}var Jt=[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`],Yt=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`],Xt=[`M`,`T`,`W`,`T`,`F`,`S`,`S`];function Zt(e){switch(e){case`narrow`:return[...Xt];case`short`:return[...Yt];case`long`:return[...Jt];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`];default:return null}}var Qt=[`AM`,`PM`],$t=[`Before Christ`,`Anno Domini`],en=[`BC`,`AD`],tn=[`B`,`A`];function nn(e){switch(e){case`narrow`:return[...tn];case`short`:return[...en];case`long`:return[...$t];default:return null}}function rn(e){return Qt[e.hour<12?0:1]}function an(e,t){return Zt(t)[e.weekday-1]}function on(e,t){return qt(t)[e.month-1]}function sn(e,t){return nn(t)[e.year<0?0:1]}function cn(e,t,n=`always`,r=!1){let i={years:[`year`,`yr.`],quarters:[`quarter`,`qtr.`],months:[`month`,`mo.`],weeks:[`week`,`wk.`],days:[`day`,`day`,`days`],hours:[`hour`,`hr.`],minutes:[`minute`,`min.`],seconds:[`second`,`sec.`]},a=[`hours`,`minutes`,`seconds`].indexOf(e)===-1;if(n===`auto`&&a){let n=e===`days`;switch(t){case 1:return n?`tomorrow`:`next ${i[e][0]}`;case-1:return n?`yesterday`:`last ${i[e][0]}`;case 0:return n?`today`:`this ${i[e][0]}`}}let o=Object.is(t,-0)||t<0,s=Math.abs(t),c=s===1,l=i[e],u=r?c?l[1]:l[2]||l[1]:c?i[e][0]:e;return o?`${s} ${u} ago`:`in ${s} ${u}`}function ln(e,t){let n=``;for(let r of e)r.literal?n+=r.val:n+=t(r.val);return n}var un={D:f,DD:p,DDD:ee,DDDD:h,t:g,tt:_,ttt:v,tttt:y,T:te,TT:ne,TTT:re,TTTT:b,f:ie,ff:oe,fff:le,ffff:de,F:ae,FF:se,FFF:ue,FFFF:fe},B=class e{static create(t,n={}){return new e(t,n)}static parseFormat(e){let t=null,n=``,r=!1,i=[];for(let a=0;a<e.length;a++){let o=e.charAt(a);o===`'`?((n.length>0||r)&&i.push({literal:r||/^\s+$/.test(n),val:n===``?`'`:n}),t=null,n=``,r=!r):r||o===t?n+=o:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=o,t=o)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return un[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return I(e,t);let r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(t,n){let r=this.loc.listingMode()===`en`,i=this.loc.outputCalendar&&this.loc.outputCalendar!==`gregory`,a=(e,n)=>this.loc.extract(t,e,n),o=e=>t.isOffsetFixed&&t.offset===0&&e.allowZ?`Z`:t.isValid?t.zone.formatOffset(t.ts,e.format):``,s=()=>r?rn(t):a({hour:`numeric`,hourCycle:`h12`},`dayperiod`),c=(e,n)=>r?on(t,e):a(n?{month:e}:{month:e,day:`numeric`},`month`),l=(e,n)=>r?an(t,e):a(n?{weekday:e}:{weekday:e,month:`long`,day:`numeric`},`weekday`),u=n=>{let r=e.macroTokenToFormatOpts(n);return r?this.formatWithSystemDefault(t,r):n},d=e=>r?sn(t,e):a({era:e},`era`);return ln(e.parseFormat(n),e=>{switch(e){case`S`:return this.num(t.millisecond);case`u`:case`SSS`:return this.num(t.millisecond,3);case`s`:return this.num(t.second);case`ss`:return this.num(t.second,2);case`uu`:return this.num(Math.floor(t.millisecond/10),2);case`uuu`:return this.num(Math.floor(t.millisecond/100));case`m`:return this.num(t.minute);case`mm`:return this.num(t.minute,2);case`h`:return this.num(t.hour%12==0?12:t.hour%12);case`hh`:return this.num(t.hour%12==0?12:t.hour%12,2);case`H`:return this.num(t.hour);case`HH`:return this.num(t.hour,2);case`Z`:return o({format:`narrow`,allowZ:this.opts.allowZ});case`ZZ`:return o({format:`short`,allowZ:this.opts.allowZ});case`ZZZ`:return o({format:`techie`,allowZ:this.opts.allowZ});case`ZZZZ`:return t.zone.offsetName(t.ts,{format:`short`,locale:this.loc.locale});case`ZZZZZ`:return t.zone.offsetName(t.ts,{format:`long`,locale:this.loc.locale});case`z`:return t.zoneName;case`a`:return s();case`d`:return i?a({day:`numeric`},`day`):this.num(t.day);case`dd`:return i?a({day:`2-digit`},`day`):this.num(t.day,2);case`c`:return this.num(t.weekday);case`ccc`:return l(`short`,!0);case`cccc`:return l(`long`,!0);case`ccccc`:return l(`narrow`,!0);case`E`:return this.num(t.weekday);case`EEE`:return l(`short`,!1);case`EEEE`:return l(`long`,!1);case`EEEEE`:return l(`narrow`,!1);case`L`:return i?a({month:`numeric`,day:`numeric`},`month`):this.num(t.month);case`LL`:return i?a({month:`2-digit`,day:`numeric`},`month`):this.num(t.month,2);case`LLL`:return c(`short`,!0);case`LLLL`:return c(`long`,!0);case`LLLLL`:return c(`narrow`,!0);case`M`:return i?a({month:`numeric`},`month`):this.num(t.month);case`MM`:return i?a({month:`2-digit`},`month`):this.num(t.month,2);case`MMM`:return c(`short`,!1);case`MMMM`:return c(`long`,!1);case`MMMMM`:return c(`narrow`,!1);case`y`:return i?a({year:`numeric`},`year`):this.num(t.year);case`yy`:return i?a({year:`2-digit`},`year`):this.num(t.year.toString().slice(-2),2);case`yyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,4);case`yyyyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,6);case`G`:return d(`short`);case`GG`:return d(`long`);case`GGGGG`:return d(`narrow`);case`kk`:return this.num(t.weekYear.toString().slice(-2),2);case`kkkk`:return this.num(t.weekYear,4);case`W`:return this.num(t.weekNumber);case`WW`:return this.num(t.weekNumber,2);case`n`:return this.num(t.localWeekNumber);case`nn`:return this.num(t.localWeekNumber,2);case`ii`:return this.num(t.localWeekYear.toString().slice(-2),2);case`iiii`:return this.num(t.localWeekYear,4);case`o`:return this.num(t.ordinal);case`ooo`:return this.num(t.ordinal,3);case`q`:return this.num(t.quarter);case`qq`:return this.num(t.quarter,2);case`X`:return this.num(Math.floor(t.ts/1e3));case`x`:return this.num(t.ts);default:return u(e)}})}formatDurationFromString(t,n){let r=this.opts.signMode===`negativeLargestOnly`?-1:1,i=e=>{switch(e[0]){case`S`:return`milliseconds`;case`s`:return`seconds`;case`m`:return`minutes`;case`h`:return`hours`;case`d`:return`days`;case`w`:return`weeks`;case`M`:return`months`;case`y`:return`years`;default:return null}},a=(e,t)=>n=>{let a=i(n);if(a){let i=t.isNegativeDuration&&a!==t.largestUnit?r:1,o;return o=this.opts.signMode===`negativeLargestOnly`&&a!==t.largestUnit?`never`:this.opts.signMode===`all`?`always`:`auto`,this.num(e.get(a)*i,n.length,o)}else return n},o=e.parseFormat(n),s=o.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),c=t.shiftTo(...s.map(i).filter(e=>e));return ln(o,a(c,{isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]}))}},dn=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function V(...e){let t=e.reduce((e,t)=>e+t.source,``);return RegExp(`^${t}$`)}function H(...e){return t=>e.reduce(([e,n,r],i)=>{let[a,o,s]=i(t,r);return[{...e,...a},o||n,s]},[{},null,1]).slice(0,2)}function fn(e,...t){if(e==null)return[null,null];for(let[n,r]of t){let t=n.exec(e);if(t)return r(t)}return[null,null]}function pn(...e){return(t,n)=>{let r={},i;for(i=0;i<e.length;i++)r[e[i]]=L(t[n+i]);return[r,null,n+i]}}var mn=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,hn=`(?:${mn.source}?(?:\\[(${dn.source})\\])?)?`,gn=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,_n=RegExp(`${gn.source}${hn}`),vn=RegExp(`(?:[Tt]${_n.source})?`),yn=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,bn=/(\d{4})-?W(\d\d)(?:-?(\d))?/,xn=/(\d{4})-?(\d{3})/,Sn=pn(`weekYear`,`weekNumber`,`weekDay`),Cn=pn(`year`,`ordinal`),wn=/(\d{4})-(\d\d)-(\d\d)/,Tn=RegExp(`${gn.source} ?(?:${mn.source}|(${dn.source}))?`),En=RegExp(`(?: ${Tn.source})?`);function Dn(e,t,n){let r=e[t];return M(r)?n:L(r)}function On(e,t){return[{year:Dn(e,t),month:Dn(e,t+1,1),day:Dn(e,t+2,1)},null,t+3]}function kn(e,t){return[{hours:Dn(e,t,0),minutes:Dn(e,t+1,0),seconds:Dn(e,t+2,0),milliseconds:At(e[t+3])},null,t+4]}function An(e,t){let n=!e[t]&&!e[t+1],r=zt(e[t+1],e[t+2]);return[{},n?null:w.instance(r),t+3]}function jn(e,t){return[{},e[t]?S.create(e[t]):null,t+1]}var Mn=RegExp(`^T?${gn.source}$`),Nn=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Pn(e){let[t,n,r,i,a,o,s,c,l]=e,u=t[0]===`-`,d=c&&c[0]===`-`,f=(e,t=!1)=>e!==void 0&&(t||e&&u)?-e:e;return[{years:f(R(n)),months:f(R(r)),weeks:f(R(i)),days:f(R(a)),hours:f(R(o)),minutes:f(R(s)),seconds:f(R(c),c===`-0`),milliseconds:f(At(l),d)}]}var Fn={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function In(e,t,n,r,i,a,o){let s={year:t.length===2?Lt(L(t)):L(t),month:Gt.indexOf(n)+1,day:L(r),hour:L(i),minute:L(a)};return o&&(s.second=L(o)),e&&(s.weekday=e.length>3?Jt.indexOf(e)+1:Yt.indexOf(e)+1),s}var Ln=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function U(e){let[,t,n,r,i,a,o,s,c,l,u,d]=e,f=In(t,i,r,n,a,o,s),p;return p=c?Fn[c]:l?0:zt(u,d),[f,new w(p)]}function Rn(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).trim()}var zn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Bn=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Vn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Hn(e){let[,t,n,r,i,a,o,s]=e;return[In(t,i,r,n,a,o,s),w.utcInstance]}function Un(e){let[,t,n,r,i,a,o,s]=e;return[In(t,s,n,r,i,a,o),w.utcInstance]}var Wn=V(yn,vn),Gn=V(bn,vn),Kn=V(xn,vn),qn=V(_n),Jn=H(On,kn,An,jn),Yn=H(Sn,kn,An,jn),Xn=H(Cn,kn,An,jn),Zn=H(kn,An,jn);function Qn(e){return fn(e,[Wn,Jn],[Gn,Yn],[Kn,Xn],[qn,Zn])}function $n(e){return fn(Rn(e),[Ln,U])}function er(e){return fn(e,[zn,Hn],[Bn,Hn],[Vn,Un])}function tr(e){return fn(e,[Nn,Pn])}var nr=H(kn);function rr(e){return fn(e,[Mn,nr])}var ir=V(wn,En),ar=V(Tn),or=H(kn,An,jn);function sr(e){return fn(e,[ir,Jn],[ar,or])}var cr=`Invalid Duration`,lr={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},ur={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...lr},W=146097/400,dr=146097/4800,fr={years:{quarters:4,months:12,weeks:W/7,days:W,hours:W*24,minutes:W*24*60,seconds:W*24*60*60,milliseconds:W*24*60*60*1e3},quarters:{months:3,weeks:W/28,days:W/4,hours:W*24/4,minutes:W*24*60/4,seconds:W*24*60*60/4,milliseconds:W*24*60*60*1e3/4},months:{weeks:dr/7,days:dr,hours:dr*24,minutes:dr*24*60,seconds:dr*24*60*60,milliseconds:dr*24*60*60*1e3},...lr},G=[`years`,`quarters`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`],pr=G.slice(0).reverse();function K(e,t,n=!1){return new q({values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix})}function mr(e,t){let n=t.milliseconds??0;for(let r of pr.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function hr(e,t){let n=mr(e,t)<0?-1:1;G.reduceRight((r,i)=>{if(M(t[i]))return r;if(r){let a=t[r]*n,o=e[i][r],s=Math.floor(a/o);t[i]+=s*n,t[r]-=s*o*n}return i},null),G.reduce((n,r)=>{if(M(t[r]))return n;if(n){let i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function gr(e){let t={};for(let[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}var q=class e{constructor(e){let t=e.conversionAccuracy===`longterm`||!1,n=t?fr:ur;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||C.create(),this.conversionAccuracy=t?`longterm`:`casual`,this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,n){return e.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(typeof t!=`object`||!t)throw new s(`Duration.fromObject: argument expected to be an object, got ${t===null?`null`:typeof t}`);return new e({values:Vt(t,e.normalizeUnit),loc:C.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(N(t))return e.fromMillis(t);if(e.isDuration(t))return t;if(typeof t==`object`)return e.fromObject(t);throw new s(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){let[r]=tr(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){let[r]=rr(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new s(`need to specify a reason the Duration is invalid`);let r=t instanceof O?t:new O(t,n);if(D.throwOnInvalid)throw new i(r);return new e({invalid:r})}static normalizeUnit(e){let t={year:`years`,years:`years`,quarter:`quarters`,quarters:`quarters`,month:`months`,months:`months`,week:`weeks`,weeks:`weeks`,day:`days`,days:`days`,hour:`hours`,hours:`hours`,minute:`minutes`,minutes:`minutes`,second:`seconds`,seconds:`seconds`,millisecond:`milliseconds`,milliseconds:`milliseconds`}[e&&e.toLowerCase()];if(!t)throw new o(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){let n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?B.create(this.loc,n).formatDurationFromString(this,e):cr}toHuman(e={}){if(!this.isValid)return cr;let t=e.showZeros!==!1,n=G.map(n=>{let r=this.values[n];return M(r)||r===0&&!t?null:this.loc.numberFormatter({style:`unit`,unitDisplay:`long`,...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:`conjunction`,style:e.listStyle||`narrow`,...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e=`P`;return this.years!==0&&(e+=this.years+`Y`),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+`M`),this.weeks!==0&&(e+=this.weeks+`W`),this.days!==0&&(e+=this.days+`D`),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+=`T`),this.hours!==0&&(e+=this.hours+`H`),this.minutes!==0&&(e+=this.minutes+`M`),(this.seconds!==0||this.milliseconds!==0)&&(e+=jt(this.seconds+this.milliseconds/1e3,3)+`S`),e===`P`&&(e+=`T0S`),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:`extended`,...e,includeOffset:!1},$.fromMillis(t,{zone:`UTC`}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?mr(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t),r={};for(let e of G)(P(n.values,e)||P(this.values,e))&&(r[e]=n.get(e)+this.get(e));return K(this,{values:r},!0)}minus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let n of Object.keys(this.values))t[n]=Bt(e(this.values[n],n));return K(this,{values:t},!0)}get(t){return this[e.normalizeUnit(t)]}set(t){if(!this.isValid)return this;let n={...this.values,...Vt(t,e.normalizeUnit)};return K(this,{values:n})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){let i={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n};return K(this,i)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return hr(this.matrix,e),K(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=gr(this.normalize().shiftToAll().toObject());return K(this,{values:e},!0)}shiftTo(...t){if(!this.isValid||t.length===0)return this;t=t.map(t=>e.normalizeUnit(t));let n={},r={},i=this.toObject(),a;for(let e of G)if(t.indexOf(e)>=0){a=e;let t=0;for(let n in r)t+=this.matrix[n][e]*r[n],r[n]=0;N(i[e])&&(t+=i[e]);let o=Math.trunc(t);n[e]=o,r[e]=(t*1e3-o*1e3)/1e3}else N(i[e])&&(r[e]=i[e]);for(let e in r)r[e]!==0&&(n[a]+=e===a?r[e]:r[e]/this.matrix[a][e]);return hr(this.matrix,n),K(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo(`years`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`):this}negate(){if(!this.isValid)return this;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return K(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=gr(this.values);return K(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(e,t){return e===void 0||e===0?t===void 0||t===0:e===t}for(let n of G)if(!t(this.values[n],e.values[n]))return!1;return!0}},_r=`Invalid Interval`;function vr(e,t){return!e||!e.isValid?yr.invalid(`missing or invalid start`):!t||!t.isValid?yr.invalid(`missing or invalid end`):t<e?yr.invalid(`end before start`,`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}var yr=class e{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new s(`need to specify a reason the Interval is invalid`);let i=t instanceof O?t:new O(t,n);if(D.throwOnInvalid)throw new r(i);return new e({invalid:i})}static fromDateTimes(t,n){let r=_i(t),i=_i(n);return vr(r,i)??new e({start:r,end:i})}static after(t,n){let r=q.fromDurationLike(n),i=_i(t);return e.fromDateTimes(i,i.plus(r))}static before(t,n){let r=q.fromDurationLike(n),i=_i(t);return e.fromDateTimes(i.minus(r),i)}static fromISO(t,n){let[r,i]=(t||``).split(`/`,2);if(r&&i){let t,a;try{t=$.fromISO(r,n),a=t.isValid}catch{a=!1}let o,s;try{o=$.fromISO(i,n),s=o.isValid}catch{s=!1}if(a&&s)return e.fromDateTimes(t,o);if(a){let r=q.fromISO(i,n);if(r.isValid)return e.after(t,r)}else if(s){let t=q.fromISO(r,n);if(t.isValid)return e.before(o,t)}}return e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e=`milliseconds`){return this.isValid?this.toDuration(e).get(e):NaN}count(e=`milliseconds`,t){if(!this.isValid)return NaN;let n=this.start.startOf(e,t),r;return r=t!=null&&t.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:t,end:n}={}){return this.isValid?e.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];let n=t.map(_i).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),r=[],{s:i}=this,a=0;for(;i<this.e;){let t=n[a]||this.e,o=+t>+this.e?this.e:t;r.push(e.fromDateTimes(i,o)),i=o,a+=1}return r}splitBy(t){let n=q.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as(`milliseconds`)===0)return[];let{s:r}=this,i=1,a,o=[];for(;r<this.e;){let t=this.start.plus(n.mapUnits(e=>e*i));a=+t>+this.e?this.e:t,o.push(e.fromDateTimes(r,a)),r=a,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(t){if(!this.isValid)return this;let n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:e.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;let n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return e.fromDateTimes(n,r)}static merge(e){let[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(t){let n=null,r=0,i=[],a=t.map(e=>[{time:e.s,type:`s`},{time:e.e,type:`e`}]),o=Array.prototype.concat(...a).sort((e,t)=>e.time-t.time);for(let t of o)r+=t.type===`s`?1:-1,r===1?n=t.time:(n&&+n!=+t.time&&i.push(e.fromDateTimes(n,t.time)),n=null);return e.merge(i)}difference(...t){return e.xor([this].concat(t)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:_r}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=f,t={}){return this.isValid?B.create(this.s.loc.clone(t),e).formatInterval(this):_r}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:_r}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:_r}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:_r}toFormat(e,{separator:t=` – `}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:_r}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):q.invalid(this.invalidReason)}mapEndpoints(t){return e.fromDateTimes(t(this.s),t(this.e))}},J=class{static hasDST(e=D.defaultZone){let t=$.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return S.isValidZone(e)}static normalizeZone(e){return T(e,D.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||C.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||C.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||C.create(e)).getWeekendDays().slice()}static months(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||C.create(t,n,i)).months(e)}static monthsFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||C.create(t,n,i)).months(e,!0)}static weekdays(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||C.create(t,n,null)).weekdays(e)}static weekdaysFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||C.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return C.create(e).meridiems()}static eras(e=`short`,{locale:t=null}={}){return C.create(t,null,`gregory`).eras(e)}static features(){return{relative:Ct(),localeWeek:wt()}}};function br(e,t){let n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf(`day`).valueOf(),r=n(t)-n(e);return Math.floor(q.fromMillis(r).as(`days`))}function xr(e,t,n){let r=[[`years`,(e,t)=>t.year-e.year],[`quarters`,(e,t)=>t.quarter-e.quarter+(t.year-e.year)*4],[`months`,(e,t)=>t.month-e.month+(t.year-e.year)*12],[`weeks`,(e,t)=>{let n=br(e,t);return(n-n%7)/7}],[`days`,br]],i={},a=e,o,s;for(let[c,l]of r)n.indexOf(c)>=0&&(o=c,i[c]=l(e,t),s=a.plus(i),s>t?(i[c]--,e=a.plus(i),e>t&&(s=e,i[c]--,e=a.plus(i))):e=s);return[e,i,s,o]}function Sr(e,t,n,r){let[i,a,o,s]=xr(e,t,n),c=t-i,l=n.filter(e=>[`hours`,`minutes`,`seconds`,`milliseconds`].indexOf(e)>=0);l.length===0&&(o<t&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+c/(o-i)));let u=q.fromObject(a,r);return l.length>0?q.fromMillis(c,r).shiftTo(...l).plus(u):u}var Cr=`missing Intl.DateTimeFormat.formatToParts support`;function Y(e,t=e=>e){return{regex:e,deser:([e])=>t(Xe(e))}}var wr=`[ \xA0]`,Tr=new RegExp(wr,`g`);function Er(e){return e.replace(/\./g,`\\.?`).replace(Tr,wr)}function Dr(e){return e.replace(/\./g,``).replace(Tr,` `).toLowerCase()}function X(e,t){return e===null?null:{regex:RegExp(e.map(Er).join(`|`)),deser:([n])=>e.findIndex(e=>Dr(n)===Dr(e))+t}}function Or(e,t){return{regex:e,deser:([,e,t])=>zt(e,t),groups:t}}function kr(e){return{regex:e,deser:([e])=>e}}function Ar(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,`\\$&`)}function jr(e,t){let n=E(t),r=E(t,`{2}`),i=E(t,`{3}`),a=E(t,`{4}`),o=E(t,`{6}`),s=E(t,`{1,2}`),c=E(t,`{1,3}`),l=E(t,`{1,6}`),u=E(t,`{1,9}`),d=E(t,`{2,4}`),f=E(t,`{4,6}`),p=e=>({regex:RegExp(Ar(e.val)),deser:([e])=>e,literal:!0}),m=(m=>{if(e.literal)return p(m);switch(m.val){case`G`:return X(t.eras(`short`),0);case`GG`:return X(t.eras(`long`),0);case`y`:return Y(l);case`yy`:return Y(d,Lt);case`yyyy`:return Y(a);case`yyyyy`:return Y(f);case`yyyyyy`:return Y(o);case`M`:return Y(s);case`MM`:return Y(r);case`MMM`:return X(t.months(`short`,!0),1);case`MMMM`:return X(t.months(`long`,!0),1);case`L`:return Y(s);case`LL`:return Y(r);case`LLL`:return X(t.months(`short`,!1),1);case`LLLL`:return X(t.months(`long`,!1),1);case`d`:return Y(s);case`dd`:return Y(r);case`o`:return Y(c);case`ooo`:return Y(i);case`HH`:return Y(r);case`H`:return Y(s);case`hh`:return Y(r);case`h`:return Y(s);case`mm`:return Y(r);case`m`:return Y(s);case`q`:return Y(s);case`qq`:return Y(r);case`s`:return Y(s);case`ss`:return Y(r);case`S`:return Y(c);case`SSS`:return Y(i);case`u`:return kr(u);case`uu`:return kr(s);case`uuu`:return Y(n);case`a`:return X(t.meridiems(),0);case`kkkk`:return Y(a);case`kk`:return Y(d,Lt);case`W`:return Y(s);case`WW`:return Y(r);case`E`:case`c`:return Y(n);case`EEE`:return X(t.weekdays(`short`,!1),1);case`EEEE`:return X(t.weekdays(`long`,!1),1);case`ccc`:return X(t.weekdays(`short`,!0),1);case`cccc`:return X(t.weekdays(`long`,!0),1);case`Z`:case`ZZ`:return Or(RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case`ZZZ`:return Or(RegExp(`([+-]${s.source})(${r.source})?`),2);case`z`:return kr(/[a-z_+-/]{1,256}?/i);case` `:return kr(/[^\S\n\r]/);default:return p(m)}})(e)||{invalidReason:Cr};return m.token=e,m}var Mr={year:{"2-digit":`yy`,numeric:`yyyyy`},month:{numeric:`M`,"2-digit":`MM`,short:`MMM`,long:`MMMM`},day:{numeric:`d`,"2-digit":`dd`},weekday:{short:`EEE`,long:`EEEE`},dayperiod:`a`,dayPeriod:`a`,hour12:{numeric:`h`,"2-digit":`hh`},hour24:{numeric:`H`,"2-digit":`HH`},minute:{numeric:`m`,"2-digit":`mm`},second:{numeric:`s`,"2-digit":`ss`},timeZoneName:{long:`ZZZZZ`,short:`ZZZ`}};function Nr(e,t,n){let{type:r,value:i}=e;if(r===`literal`){let e=/^\s+$/.test(i);return{literal:!e,val:e?` `:i}}let a=t[r],o=r;r===`hour`&&(o=t.hour12==null?t.hourCycle==null?n.hour12?`hour12`:`hour24`:t.hourCycle===`h11`||t.hourCycle===`h12`?`hour12`:`hour24`:t.hour12?`hour12`:`hour24`);let s=Mr[o];if(typeof s==`object`&&(s=s[a]),s)return{literal:!1,val:s}}function Pr(e){return[`^${e.map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,``)}$`,e]}function Fr(e,t,n){let r=e.match(t);if(r){let e={},t=1;for(let i in n)if(P(n,i)){let a=n[i],o=a.groups?a.groups+1:1;!a.literal&&a.token&&(e[a.token.val[0]]=a.deser(r.slice(t,t+o))),t+=o}return[r,e]}else return[r,{}]}function Ir(e){let t=e=>{switch(e){case`S`:return`millisecond`;case`s`:return`second`;case`m`:return`minute`;case`h`:case`H`:return`hour`;case`d`:return`day`;case`o`:return`ordinal`;case`L`:case`M`:return`month`;case`y`:return`year`;case`E`:case`c`:return`weekday`;case`W`:return`weekNumber`;case`k`:return`weekYear`;case`q`:return`quarter`;default:return null}},n=null,r;return M(e.z)||(n=S.create(e.z)),M(e.Z)||(n||=new w(e.Z),r=e.Z),M(e.q)||(e.M=(e.q-1)*3+1),M(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),M(e.u)||(e.S=At(e.u)),[Object.keys(e).reduce((n,r)=>{let i=t(r);return i&&(n[i]=e[r]),n},{}),n,r]}var Lr=null;function Rr(){return Lr||=$.fromMillis(1555555555555),Lr}function zr(e,t){if(e.literal)return e;let n=Wr(B.macroTokenToFormatOpts(e.val),t);return n==null||n.includes(void 0)?e:n}function Br(e,t){return Array.prototype.concat(...e.map(e=>zr(e,t)))}var Vr=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Br(B.parseFormat(t),e),this.units=this.tokens.map(t=>jr(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){let[e,t]=Pr(this.units);this.regex=RegExp(e,`i`),this.handlers=t}}explainFromTokens(e){if(this.isValid){let[t,n]=Fr(e,this.regex,this.handlers),[r,i,o]=n?Ir(n):[null,null,void 0];if(P(n,`a`)&&P(n,`H`))throw new a(`Can't include meridiem when specifying 24-hour format`);return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:o}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function Hr(e,t,n){return new Vr(e,n).explainFromTokens(t)}function Ur(e,t,n){let{result:r,zone:i,specificOffset:a,invalidReason:o}=Hr(e,t,n);return[r,i,a,o]}function Wr(e,t){if(!e)return null;let n=B.create(t,e).dtFormatter(Rr()),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>Nr(t,e,i))}var Gr=`Invalid DateTime`,Kr=864e13;function qr(e){return new O(`unsupported zone`,`the zone "${e.name}" is not supported`)}function Jr(e){return e.weekData===null&&(e.weekData=ft(e.c)),e.weekData}function Yr(e){return e.localWeekData===null&&(e.localWeekData=ft(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Z(e,t){let n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new $({...n,...t,old:n})}function Xr(e,t,n){let r=e-t*60*1e3,i=n.offset(r);if(t===i)return[r,t];r-=(i-t)*60*1e3;let a=n.offset(r);return i===a?[r,i]:[e-Math.min(i,a)*60*1e3,Math.max(i,a)]}function Zr(e,t){e+=t*60*1e3;let n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Qr(e,t,n){return Xr(Pt(e),t,n)}function $r(e,t){let n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,a={...e.c,year:r,month:i,day:Math.min(e.c.day,Nt(r,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=q.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as(`milliseconds`),[s,c]=Xr(Pt(a),n,e.zone);return o!==0&&(s+=o,c=e.zone.offset(s)),{ts:s,o:c}}function Q(e,t,n,r,i,a){let{setZone:o,zone:s}=n;if(e&&Object.keys(e).length!==0||t){let r=t||s,i=$.fromObject(e,{...n,zone:r,specificOffset:a});return o?i:i.setZone(s)}else return $.invalid(new O(`unparsable`,`the input "${i}" can't be parsed as ${r}`))}function ei(e,t,n=!0){return e.isValid?B.create(C.create(`en-US`),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ti(e,t,n){let r=e.c.year>9999||e.c.year<0,i=``;if(r&&e.c.year>=0&&(i+=`+`),i+=I(e.c.year,r?6:4),n===`year`)return i;if(t){if(i+=`-`,i+=I(e.c.month),n===`month`)return i;i+=`-`}else if(i+=I(e.c.month),n===`month`)return i;return i+=I(e.c.day),i}function ni(e,t,n,r,i,a,o){let s=!n||e.c.millisecond!==0||e.c.second!==0,c=``;switch(o){case`day`:case`month`:case`year`:break;default:if(c+=I(e.c.hour),o===`hour`)break;if(t){if(c+=`:`,c+=I(e.c.minute),o===`minute`)break;s&&(c+=`:`,c+=I(e.c.second))}else{if(c+=I(e.c.minute),o===`minute`)break;s&&(c+=I(e.c.second))}if(o===`second`)break;s&&(!r||e.c.millisecond!==0)&&(c+=`.`,c+=I(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&e.offset===0&&!a?c+=`Z`:e.o<0?(c+=`-`,c+=I(Math.trunc(-e.o/60)),c+=`:`,c+=I(Math.trunc(-e.o%60))):(c+=`+`,c+=I(Math.trunc(e.o/60)),c+=`:`,c+=I(Math.trunc(e.o%60)))),a&&(c+=`[`+e.zone.ianaName+`]`),c}var ri={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ii={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ai={ordinal:1,hour:0,minute:0,second:0,millisecond:0},oi=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],si=[`weekYear`,`weekNumber`,`weekday`,`hour`,`minute`,`second`,`millisecond`],ci=[`year`,`ordinal`,`hour`,`minute`,`second`,`millisecond`];function li(e){let t={year:`year`,years:`year`,month:`month`,months:`month`,day:`day`,days:`day`,hour:`hour`,hours:`hour`,minute:`minute`,minutes:`minute`,quarter:`quarter`,quarters:`quarter`,second:`second`,seconds:`second`,millisecond:`millisecond`,milliseconds:`millisecond`,weekday:`weekday`,weekdays:`weekday`,weeknumber:`weekNumber`,weeksnumber:`weekNumber`,weeknumbers:`weekNumber`,weekyear:`weekYear`,weekyears:`weekYear`,ordinal:`ordinal`}[e.toLowerCase()];if(!t)throw new o(e);return t}function ui(e){switch(e.toLowerCase()){case`localweekday`:case`localweekdays`:return`localWeekday`;case`localweeknumber`:case`localweeknumbers`:return`localWeekNumber`;case`localweekyear`:case`localweekyears`:return`localWeekYear`;default:return li(e)}}function di(e){if(hi===void 0&&(hi=D.now()),e.type!==`iana`)return e.offset(hi);let t=e.name,n=gi.get(t);return n===void 0&&(n=e.offset(hi),gi.set(t,n)),n}function fi(e,t){let n=T(t.zone,D.defaultZone);if(!n.isValid)return $.invalid(qr(n));let r=C.fromObject(t),i,a;if(M(e.year))i=D.now();else{for(let t of oi)M(e[t])&&(e[t]=ri[t]);let t=vt(e)||yt(e);if(t)return $.invalid(t);let r=di(n);[i,a]=Qr(e,r,n)}return new $({ts:i,zone:n,loc:r,o:a})}function pi(e,t,n){let r=M(n.round)?!0:n.round,i=M(n.rounding)?`trunc`:n.rounding,a=(e,a)=>(e=jt(e,r||n.calendary?0:2,n.calendary?`round`:i),t.loc.clone(n).relFormatter(n).format(e,a)),o=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return a(o(n.unit),n.unit);for(let e of n.units){let t=o(e);if(Math.abs(t)>=1)return a(t,e)}return a(e>t?-0:0,n.units[n.units.length-1])}function mi(e){let t={},n;return e.length>0&&typeof e[e.length-1]==`object`?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}var hi,gi=new Map,$=class e{constructor(e){let t=e.zone||D.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new O(`invalid input`):null)||(t.isValid?null:qr(t));this.ts=M(e.ts)?D.now():e.ts;let r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{let a=N(e.o)&&!e.old?e.o:t.offset(this.ts);r=Zr(this.ts,a),n=Number.isNaN(r.year)?new O(`invalid input`):null,r=n?null:r,i=n?null:a}this._zone=t,this.loc=e.loc||C.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new e({})}static local(){let[e,t]=mi(arguments),[n,r,i,a,o,s,c]=t;return fi({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static utc(){let[e,t]=mi(arguments),[n,r,i,a,o,s,c]=t;return e.zone=w.utcInstance,fi({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static fromJSDate(t,n={}){let r=St(t)?t.valueOf():NaN;if(Number.isNaN(r))return e.invalid(`invalid input`);let i=T(n.zone,D.defaultZone);return i.isValid?new e({ts:r,zone:i,loc:C.fromObject(n)}):e.invalid(qr(i))}static fromMillis(t,n={}){if(!N(t))throw new s(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`);return t<-864e13||t>Kr?e.invalid(`Timestamp out of range`):new e({ts:t,zone:T(n.zone,D.defaultZone),loc:C.fromObject(n)})}static fromSeconds(t,n={}){if(N(t))return new e({ts:t*1e3,zone:T(n.zone,D.defaultZone),loc:C.fromObject(n)});throw new s(`fromSeconds requires a numerical input`)}static fromObject(t,n={}){t||={};let r=T(n.zone,D.defaultZone);if(!r.isValid)return e.invalid(qr(r));let i=C.fromObject(n),o=Vt(t,ui),{minDaysInFirstWeek:s,startOfWeek:c}=ht(o,i),l=D.now(),u=M(n.specificOffset)?r.offset(l):n.specificOffset,d=!M(o.ordinal),f=!M(o.year),p=!M(o.month)||!M(o.day),m=f||p,ee=o.weekYear||o.weekNumber;if((m||d)&&ee)throw new a(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(p&&d)throw new a(`Can't mix ordinal dates with month/day`);let h=ee||o.weekday&&!m,g,_,v=Zr(l,u);h?(g=si,_=ii,v=ft(v,s,c)):d?(g=ci,_=ai,v=pt(v)):(g=oi,_=ri);let y=!1;for(let e of g){let t=o[e];M(t)?y?o[e]=_[e]:o[e]=v[e]:y=!0}let te=(h?gt(o,s,c):d?_t(o):vt(o))||yt(o);if(te)return e.invalid(te);let[ne,re]=Qr(h?j(o,s,c):d?mt(o):o,u,r),b=new e({ts:ne,zone:r,o:re,loc:i});return o.weekday&&m&&t.weekday!==b.weekday?e.invalid(`mismatched weekday`,`you can't specify both a weekday of ${o.weekday} and a date of ${b.toISO()}`):b.isValid?b:e.invalid(b.invalid)}static fromISO(e,t={}){let[n,r]=Qn(e);return Q(n,r,t,`ISO 8601`,e)}static fromRFC2822(e,t={}){let[n,r]=$n(e);return Q(n,r,t,`RFC 2822`,e)}static fromHTTP(e,t={}){let[n,r]=er(e);return Q(n,r,t,`HTTP`,t)}static fromFormat(t,n,r={}){if(M(t)||M(n))throw new s(`fromFormat requires an input string and a format`);let{locale:i=null,numberingSystem:a=null}=r,[o,c,l,u]=Ur(C.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),t,n);return u?e.invalid(u):Q(o,c,r,`format ${n}`,t,l)}static fromString(t,n,r={}){return e.fromFormat(t,n,r)}static fromSQL(e,t={}){let[n,r]=sr(e);return Q(n,r,t,`SQL`,e)}static invalid(t,r=null){if(!t)throw new s(`need to specify a reason the DateTime is invalid`);let i=t instanceof O?t:new O(t,r);if(D.throwOnInvalid)throw new n(i);return new e({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let n=Wr(e,C.fromObject(t));return n?n.map(e=>e?e.val:null).join(``):null}static expandFormat(e,t={}){return Br(B.parseFormat(e),C.fromObject(t)).map(e=>e.val).join(``)}static resetCache(){hi=void 0,gi.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Jr(this).weekYear:NaN}get weekNumber(){return this.isValid?Jr(this).weekNumber:NaN}get weekday(){return this.isValid?Jr(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Yr(this).weekday:NaN}get localWeekNumber(){return this.isValid?Yr(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Yr(this).weekYear:NaN}get ordinal(){return this.isValid?pt(this.c).ordinal:NaN}get monthShort(){return this.isValid?J.months(`short`,{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?J.months(`long`,{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?J.weekdays(`short`,{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?J.weekdays(`long`,{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:`short`,locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:`long`,locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,n=Pt(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),a=this.zone.offset(n-r*t),o=this.zone.offset(n-i*t);if(a===o)return[this];let s=n-a*t,c=n-o*t,l=Zr(s,a),u=Zr(c,o);return l.hour===u.hour&&l.minute===u.minute&&l.second===u.second&&l.millisecond===u.millisecond?[Z(this,{ts:s}),Z(this,{ts:c})]:[this]}get isInLeapYear(){return Mt(this.year)}get daysInMonth(){return Nt(this.year,this.month)}get daysInYear(){return this.isValid?z(this.year):NaN}get weeksInWeekYear(){return this.isValid?It(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?It(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:n,calendar:r}=B.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(w.instance(e),t)}toLocal(){return this.setZone(D.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=T(t,D.defaultZone),t.equals(this.zone))return this;if(t.isValid){let e=this.ts;if(n||r){let n=t.offset(this.ts),r=this.toObject();[e]=Qr(r,n,t)}return Z(this,{ts:e,zone:t})}else return e.invalid(qr(t))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){let r=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return Z(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=Vt(e,ui),{minDaysInFirstWeek:n,startOfWeek:r}=ht(t,this.loc),i=!M(t.weekYear)||!M(t.weekNumber)||!M(t.weekday),o=!M(t.ordinal),s=!M(t.year),c=!M(t.month)||!M(t.day),l=s||c,u=t.weekYear||t.weekNumber;if((l||o)&&u)throw new a(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(c&&o)throw new a(`Can't mix ordinal dates with month/day`);let d;i?d=j({...ft(this.c,n,r),...t},n,r):M(t.ordinal)?(d={...this.toObject(),...t},M(t.day)&&(d.day=Math.min(Nt(d.year,d.month),d.day))):d=mt({...pt(this.c),...t});let[f,p]=Qr(d,this.o,this.zone);return Z(this,{ts:f,o:p})}plus(e){if(!this.isValid)return this;let t=q.fromDurationLike(e);return Z(this,$r(this,t))}minus(e){if(!this.isValid)return this;let t=q.fromDurationLike(e).negate();return Z(this,$r(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let n={},r=q.normalizeUnit(e);switch(r){case`years`:n.month=1;case`quarters`:case`months`:n.day=1;case`weeks`:case`days`:n.hour=0;case`hours`:n.minute=0;case`minutes`:n.second=0;case`seconds`:n.millisecond=0;break}if(r===`weeks`)if(t){let e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;return r===`quarters`&&(n.month=(Math.ceil(this.month/3)-1)*3+1),this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?B.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Gr}toLocaleString(e=f,t={}){return this.isValid?B.create(this.loc.clone(t),e).formatDateTime(this):Gr}toLocaleParts(e={}){return this.isValid?B.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e=`extended`,suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:i=!1,precision:a=`milliseconds`}={}){if(!this.isValid)return null;a=li(a);let o=e===`extended`,s=ti(this,o,a);return oi.indexOf(a)>=3&&(s+=`T`),s+=ni(this,o,t,n,r,i,a),s}toISODate({format:e=`extended`,precision:t=`day`}={}){return this.isValid?ti(this,e===`extended`,li(t)):null}toISOWeekDate(){return ei(this,`kkkk-'W'WW-c`)}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:a=`extended`,precision:o=`milliseconds`}={}){return this.isValid?(o=li(o),(r&&oi.indexOf(o)>=3?`T`:``)+ni(this,a===`extended`,t,e,n,i,o)):null}toRFC2822(){return ei(this,`EEE, dd LLL yyyy HH:mm:ss ZZZ`,!1)}toHTTP(){return ei(this.toUTC(),`EEE, dd LLL yyyy HH:mm:ss 'GMT'`)}toSQLDate(){return this.isValid?ti(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r=`HH:mm:ss.SSS`;return(t||e)&&(n&&(r+=` `),t?r+=`z`:e&&(r+=`ZZ`)),ei(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Gr}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t=`milliseconds`,n={}){if(!this.isValid||!e.isValid)return q.invalid(`created by diffing an invalid DateTime`);let r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=Tt(t).map(q.normalizeUnit),a=e.valueOf()>this.valueOf(),o=Sr(a?this:e,a?e:this,i,r);return a?o.negate():o}diffNow(t=`milliseconds`,n={}){return this.diff(e.now(),t,n)}until(e){return this.isValid?yr.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;let r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(t={}){if(!this.isValid)return null;let n=t.base||e.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0,i=[`years`,`months`,`days`,`hours`,`minutes`,`seconds`],a=t.unit;return Array.isArray(t.unit)&&(i=t.unit,a=void 0),pi(n,this.plus(r),{...t,numeric:`always`,units:i,unit:a})}toRelativeCalendar(t={}){return this.isValid?pi(t.base||e.fromObject({},{zone:this.zone}),this,{...t,numeric:`auto`,units:[`years`,`months`,`days`],calendary:!0}):null}static min(...t){if(!t.every(e.isDateTime))throw new s(`min requires all arguments be DateTimes`);return Et(t,e=>e.valueOf(),Math.min)}static max(...t){if(!t.every(e.isDateTime))throw new s(`max requires all arguments be DateTimes`);return Et(t,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){let{locale:r=null,numberingSystem:i=null}=n;return Hr(C.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(t,n,r={}){return e.fromFormatExplain(t,n,r)}static buildFormatParser(e,t={}){let{locale:n=null,numberingSystem:r=null}=t;return new Vr(C.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),e)}static fromFormatParser(t,n,r={}){if(M(t)||M(n))throw new s(`fromFormatParser requires an input string and a format parser`);let{locale:i=null,numberingSystem:a=null}=r,o=C.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});if(!o.equals(n.locale))throw new s(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);let{result:c,zone:l,specificOffset:u,invalidReason:d}=n.explainFromTokens(t);return d?e.invalid(d):Q(c,l,r,`format ${n.format}`,t,u)}static get DATE_SHORT(){return f}static get DATE_MED(){return p}static get DATE_MED_WITH_WEEKDAY(){return m}static get DATE_FULL(){return ee}static get DATE_HUGE(){return h}static get TIME_SIMPLE(){return g}static get TIME_WITH_SECONDS(){return _}static get TIME_WITH_SHORT_OFFSET(){return v}static get TIME_WITH_LONG_OFFSET(){return y}static get TIME_24_SIMPLE(){return te}static get TIME_24_WITH_SECONDS(){return ne}static get TIME_24_WITH_SHORT_OFFSET(){return re}static get TIME_24_WITH_LONG_OFFSET(){return b}static get DATETIME_SHORT(){return ie}static get DATETIME_SHORT_WITH_SECONDS(){return ae}static get DATETIME_MED(){return oe}static get DATETIME_MED_WITH_SECONDS(){return se}static get DATETIME_MED_WITH_WEEKDAY(){return ce}static get DATETIME_FULL(){return le}static get DATETIME_FULL_WITH_SECONDS(){return ue}static get DATETIME_HUGE(){return de}static get DATETIME_HUGE_WITH_SECONDS(){return fe}};function _i(e){if($.isDateTime(e))return e;if(e&&e.valueOf&&N(e.valueOf()))return $.fromJSDate(e);if(e&&typeof e==`object`)return $.fromObject(e);throw new s(`Unknown datetime argument: ${e}, of type ${typeof e}`)}e.DateTime=$,e.Duration=q,e.FixedOffsetZone=w,e.IANAZone=S,e.Info=J,e.Interval=yr,e.InvalidZone=Ke,e.Settings=D,e.SystemZone=he,e.VERSION=`3.7.2`,e.Zone=pe})),wr=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDate=e.DAYS_IN_MONTH=e.DateMathOp=e.TimeUnit=void 0;var t=Y(),n;(function(e){e.Second=`Second`,e.Minute=`Minute`,e.Hour=`Hour`,e.Day=`Day`,e.Month=`Month`,e.Year=`Year`})(n||(e.TimeUnit=n={}));var r;(function(e){e.Add=`Add`,e.Subtract=`Subtract`})(r||(e.DateMathOp=r={})),e.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);var i=class i{#e;#t=null;#n=null;constructor(e,n){let r={zone:n};if(e?e instanceof i?(this.#e=e.#e,this.#t=e.#t,this.#n=e.#n):e instanceof Date?this.#e=t.DateTime.fromJSDate(e,r):typeof e==`number`?this.#e=t.DateTime.fromMillis(e,r):(this.#e=t.DateTime.fromISO(e,r),this.#e.isValid||(this.#e=t.DateTime.fromRFC2822(e,r)),this.#e.isValid||(this.#e=t.DateTime.fromSQL(e,r)),this.#e.isValid||(this.#e=t.DateTime.fromFormat(e,`EEE, d MMM yyyy HH:mm:ss`,r))):this.#e=t.DateTime.local(),!this.#e.isValid)throw Error(`CronDate: unhandled timestamp: ${e}`);n&&n!==this.#e.zoneName&&(this.#e=this.#e.setZone(n))}static#r(e){return e%4==0&&e%100!=0||e%400==0}get dstStart(){return this.#t}set dstStart(e){this.#t=e}get dstEnd(){return this.#n}set dstEnd(e){this.#n=e}addYear(){this.#e=this.#e.plus({years:1})}addMonth(){this.#e=this.#e.plus({months:1}).startOf(`month`)}addDay(){this.#e=this.#e.plus({days:1}).startOf(`day`)}addHour(){this.#e=this.#e.plus({hours:1}).startOf(`hour`)}addMinute(){this.#e=this.#e.plus({minutes:1}).startOf(`minute`)}addSecond(){this.#e=this.#e.plus({seconds:1})}subtractYear(){this.#e=this.#e.minus({years:1})}subtractMonth(){this.#e=this.#e.minus({months:1}).endOf(`month`).startOf(`second`)}subtractDay(){this.#e=this.#e.minus({days:1}).endOf(`day`).startOf(`second`)}subtractHour(){this.#e=this.#e.minus({hours:1}).endOf(`hour`).startOf(`second`)}subtractMinute(){this.#e=this.#e.minus({minutes:1}).endOf(`minute`).startOf(`second`)}subtractSecond(){this.#e=this.#e.minus({seconds:1})}addUnit(e){switch(e){case n.Year:return this.addYear();case n.Month:return this.addMonth();case n.Day:return this.addDay();case n.Hour:return this.addHour();case n.Minute:return this.addMinute();case n.Second:return this.addSecond()}}subtractUnit(e){switch(e){case n.Year:return this.subtractYear();case n.Month:return this.subtractMonth();case n.Day:return this.subtractDay();case n.Hour:return this.subtractHour();case n.Minute:return this.subtractMinute();case n.Second:return this.subtractSecond()}}invokeDateOperation(e,t){if(e===r.Add){this.addUnit(t);return}if(e===r.Subtract){this.subtractUnit(t);return}throw Error(`Invalid verb: ${e}`)}getDate(){return this.#e.day}getFullYear(){return this.#e.year}getDay(){let e=this.#e.weekday;return e===7?0:e}getMonth(){return this.#e.month-1}getHours(){return this.#e.hour}getMinutes(){return this.#e.minute}getSeconds(){return this.#e.second}getMilliseconds(){return this.#e.millisecond}getUTCOffset(){return this.#e.offset}setStartOfDay(){this.#e=this.#e.startOf(`day`)}setEndOfDay(){this.#e=this.#e.endOf(`day`)}getTime(){return this.#e.valueOf()}getUTCDate(){return this.#i().day}getUTCFullYear(){return this.#i().year}getUTCDay(){let e=this.#i().weekday;return e===7?0:e}getUTCMonth(){return this.#i().month-1}getUTCHours(){return this.#i().hour}getUTCMinutes(){return this.#i().minute}getUTCSeconds(){return this.#i().second}toISOString(){return this.#e.toUTC().toISO()}toJSON(){return this.#e.toJSON()}setDate(e){this.#e=this.#e.set({day:e})}setFullYear(e){this.#e=this.#e.set({year:e})}setDay(e){this.#e=this.#e.set({weekday:e})}setMonth(e){this.#e=this.#e.set({month:e+1})}setHours(e){this.#e=this.#e.set({hour:e})}setMinutes(e){this.#e=this.#e.set({minute:e})}setSeconds(e){this.#e=this.#e.set({second:e})}setMilliseconds(e){this.#e=this.#e.set({millisecond:e})}toString(){return this.toDate().toString()}toDate(){return this.#e.toJSDate()}isLastDayOfMonth(){let{day:t,month:n}=this.#e;if(n===2){let r=i.#r(this.#e.year);return t===e.DAYS_IN_MONTH[n-1]-+!r}return t===e.DAYS_IN_MONTH[n-1]}isLastWeekdayOfMonth(){let{day:t,month:n}=this.#e,r;return r=n===2?e.DAYS_IN_MONTH[n-1]-+!i.#r(this.#e.year):e.DAYS_IN_MONTH[n-1],t>r-7}applyDateOperation(e,t,r){if(t===n.Month||t===n.Day){this.invokeDateOperation(e,t);return}let i=this.getHours();this.invokeDateOperation(e,t);let a=this.getHours(),o=a-i;o===2?r!==24&&(this.dstStart=i+1):o===0&&this.getMinutes()===0&&this.getSeconds()===0&&r!==24&&(this.dstEnd=a)}#i(){return this.#e.toUTC()}};e.CronDate=i,e.default=i})),Tr=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronMonth=void 0;var t=wr(),n=J(),r=1,i=12,a=Object.freeze([]);e.CronMonth=class extends n.CronField{static get min(){return r}static get max(){return i}static get chars(){return a}static get daysInMonth(){return t.DAYS_IN_MONTH}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Er=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronSecond=void 0;var t=J(),n=0,r=59,i=Object.freeze([]);e.CronSecond=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Dr=e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(yr(),e),n(br(),e),n(xr(),e),n(J(),e),n(Sr(),e),n(Cr(),e),n(Tr(),e),n(Er(),e)})),X=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronFieldCollection=void 0;var t=Dr();e.CronFieldCollection=class e{#e;#t;#n;#r;#i;#a;static from(n,r){return new e({second:this.resolveField(t.CronSecond,n.second,r.second),minute:this.resolveField(t.CronMinute,n.minute,r.minute),hour:this.resolveField(t.CronHour,n.hour,r.hour),dayOfMonth:this.resolveField(t.CronDayOfMonth,n.dayOfMonth,r.dayOfMonth),month:this.resolveField(t.CronMonth,n.month,r.month),dayOfWeek:this.resolveField(t.CronDayOfWeek,n.dayOfWeek,r.dayOfWeek)})}static resolveField(e,n,r){return r?r instanceof t.CronField?r:new e(r):n}constructor({second:e,minute:n,hour:r,dayOfMonth:i,month:a,dayOfWeek:o}){if(!e)throw Error(`Validation error, Field second is missing`);if(!n)throw Error(`Validation error, Field minute is missing`);if(!r)throw Error(`Validation error, Field hour is missing`);if(!i)throw Error(`Validation error, Field dayOfMonth is missing`);if(!a)throw Error(`Validation error, Field month is missing`);if(!o)throw Error(`Validation error, Field dayOfWeek is missing`);if(a.values.length===1&&!i.hasLastChar&&o.isWildcard&&!(parseInt(i.values[0],10)<=t.CronMonth.daysInMonth[a.values[0]-1]))throw Error(`Invalid explicit day of month definition`);this.#e=e,this.#t=n,this.#n=r,this.#i=a,this.#a=o,this.#r=i}get second(){return this.#e}get minute(){return this.#t}get hour(){return this.#n}get dayOfMonth(){return this.#r}get month(){return this.#i}get dayOfWeek(){return this.#a}static compactField(e){if(e.length===0)return[];let t=[],n;return e.forEach((e,r,i)=>{if(n===void 0){n={start:e,count:1};return}let a=i[r-1]||n.start,o=i[r+1];if(e===`L`||e===`W`){t.push(n),t.push({start:e,count:1}),n=void 0;return}if(n.step===void 0&&o!==void 0){let t=e-a;if(t<=o-e){n={...n,count:2,end:e,step:t};return}n.step=1}e-(n.end??0)===n.step?(n.count++,n.end=e):(n.count===1?t.push({start:n.start,count:1}):n.count===2?(t.push({start:n.start,count:1}),t.push({start:n.end??a,count:1})):t.push(n),n={start:e,count:1})}),n&&t.push(n),t}static#o(e,t,n){let r=t.step;return r?r===1&&t.start===e.min&&t.end&&t.end>=n?e.hasQuestionMarkChar?`?`:`*`:r!==1&&t.start===e.min&&t.end&&t.end>=n-r+1?`*/${r}`:null:null}static#s(e,t){let n=e.step;if(n===1)return`${e.start}-${e.end}`;let r=e.start===0?e.count-1:e.count;if(!n)throw Error(`Unexpected range step`);if(!e.end)throw Error(`Unexpected range end`);if(n*r>e.end){let t=(t,r)=>{if(typeof e.start!=`number`)throw Error(`Unexpected range start`);return r%n===0?e.start+r:null};if(typeof e.start!=`number`)throw Error(`Unexpected range start`);let r={length:e.end-e.start+1};return Array.from(r,t).filter(e=>e!==null).join(`,`)}return e.end===t-n+1?`${e.start}/${n}`:`${e.start}-${e.end}/${n}`}stringifyField(n){let r=n.max,i=n.values;if(n instanceof t.CronDayOfWeek){r=6;let e=this.#a.values;i=e[e.length-1]===7?e.slice(0,-1):e}n instanceof t.CronDayOfMonth&&(r=this.#i.values.length===1?t.CronMonth.daysInMonth[this.#i.values[0]-1]:n.max);let a=e.compactField(i);if(a.length===1){let t=e.#o(n,a[0],r);if(t)return t}return a.map(i=>{let a=i.count===1?i.start.toString():e.#s(i,r);return n instanceof t.CronDayOfWeek&&n.nthDay>0?`${a}#${n.nthDay}`:a}).join(`,`)}stringify(e=!1){let t=[];return e&&t.push(this.stringifyField(this.#e)),t.push(this.stringifyField(this.#t),this.stringifyField(this.#n),this.stringifyField(this.#r),this.stringifyField(this.#i),this.stringifyField(this.#a)),t.join(` `)}serialize(){return{second:this.#e.serialize(),minute:this.#t.serialize(),hour:this.#n.serialize(),dayOfMonth:this.#r.serialize(),month:this.#i.serialize(),dayOfWeek:this.#a.serialize()}}}})),Or=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronExpression=e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;var t=wr();e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=`Out of the time span range`,e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=`Invalid expression, loop limit exceeded`;var n=1e4,r=class r{#e;#t;#n;#r;#i;#a;#o=null;#s=!1;constructor(e,n){this.#e=n,this.#t=n.tz,this.#r=n.startDate?new t.CronDate(n.startDate,this.#t):null,this.#i=n.endDate?new t.CronDate(n.endDate,this.#t):null;let r=n.currentDate??n.startDate;if(r){let e=new t.CronDate(r,this.#t);this.#r&&e.getTime()<this.#r.getTime()?r=this.#r:this.#i&&e.getTime()>this.#i.getTime()&&(r=this.#i)}this.#n=new t.CronDate(r,this.#t),this.#a=e}get fields(){return this.#a}static fieldsToExpression(e,t){return new r(e,t||{})}static#c(e,t){return t.some(t=>t===e)}#l(e,t){return e[t?e.length-1:0]}#u(e){let n=`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`;if(this.#o===n)return this.#s;let r=new t.CronDate(e);r.setStartOfDay();let i=new t.CronDate(e);return i.setEndOfDay(),this.#o=n,this.#s=r.getUTCOffset()!==i.getUTCOffset(),this.#s}#d(e,n,r){let i=this.#a.second.values,a=e.getSeconds(),o=this.#a.second.findNearestValue(a,r);if(o!==null){e.setSeconds(o);return}e.applyDateOperation(n,t.TimeUnit.Minute,this.#a.hour.values.length),e.setSeconds(this.#l(i,r))}#f(e,n,r){let i=this.#a.minute.values,a=this.#a.second.values,o=e.getMinutes(),s=this.#a.minute.findNearestValue(o,r);if(s!==null){e.setMinutes(s),e.setSeconds(this.#l(a,r));return}e.applyDateOperation(n,t.TimeUnit.Hour,this.#a.hour.values.length),e.setMinutes(this.#l(i,r)),e.setSeconds(this.#l(a,r))}static#p(e,t){if(!t.isLastWeekdayOfMonth())return!1;let n=t.getDay();return e.some(e=>n===parseInt(e.toString().charAt(0),10)%7)}static#m(e,t){return e<=0||Math.ceil(t.getDate()/7)===e}next(){return this.#v()}prev(){return this.#v(!0)}hasNext(){let e=this.#n;try{return this.#v(),!0}catch{return!1}finally{this.#n=e}}hasPrev(){let e=this.#n;try{return this.#v(!0),!0}catch{return!1}finally{this.#n=e}}take(e){let t=[];if(e>=0)for(let n=0;n<e;n++)try{t.push(this.next())}catch{return t}else for(let n=0;n>e;n--)try{t.push(this.prev())}catch{return t}return t}reset(e){this.#n=new t.CronDate(e||this.#e.currentDate,this.#t)}stringify(e=!1){return this.#a.stringify(e)}includesDate(e){let{second:n,minute:r,hour:i,month:a}=this.#a,o=new t.CronDate(e,this.#t);return!(!n.values.includes(o.getSeconds())||!r.values.includes(o.getMinutes())||!i.values.includes(o.getHours())||!a.values.includes(o.getMonth()+1)||!this.#h(o))}toString(){return this.#e.expression||this.stringify(!0)}#h(e){let t=this.#a.dayOfMonth.isWildcard,n=!t,i=this.#a.dayOfWeek.isWildcard,a=!i,o=r.#c(e.getDate(),this.#a.dayOfMonth.values)||this.#a.dayOfMonth.hasLastChar&&e.isLastDayOfMonth(),s=this.#a.dayOfWeek.nthDay,c=r.#c(e.getDay(),this.#a.dayOfWeek.values)&&r.#m(s,e)||this.#a.dayOfWeek.hasLastChar&&r.#p(this.#a.dayOfWeek.values,e);return!!(n&&a&&(o||c)||o&&!a||t&&!i&&c)}#g(e,n,i){let a=this.#a.hour.values,o=a,s=e.getHours(),c=r.#c(s,a),l=e.dstEnd===s;if(e.dstStart!==null&&e.dstStart===s-1&&r.#c(e.dstStart,a))return!0;if(l&&!i)return e.dstEnd=null,e.applyDateOperation(t.DateMathOp.Add,t.TimeUnit.Hour,o.length),!1;if(c)return!0;e.dstStart=null;let u=this.#a.hour.findNearestValue(s,i);if(u===null)return e.applyDateOperation(n,t.TimeUnit.Day,o.length),!1;if(this.#u(e)){let r=i?s-u:u-s;for(let a=0;a<r&&(e.applyDateOperation(n,t.TimeUnit.Hour,o.length),!(!i&&e.getHours()>=u||i&&e.getHours()<=u));a++);}else e.setHours(u);return e.setMinutes(this.#l(this.#a.minute.values,i)),e.setSeconds(this.#l(this.#a.second.values,i)),!1}#_(t){if(!this.#r&&!this.#i)return;let n=t.getTime();if(this.#r&&n<this.#r.getTime()||this.#i&&n>this.#i.getTime())throw Error(e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)}#v(i=!1){let a=i?t.DateMathOp.Subtract:t.DateMathOp.Add,o=new t.CronDate(this.#n),s=o.getTime(),c=0;for(;++c<n;){if(this.#_(o),!this.#h(o)){o.applyDateOperation(a,t.TimeUnit.Day,this.#a.hour.values.length);continue}if(!r.#c(o.getMonth()+1,this.#a.month.values)){o.applyDateOperation(a,t.TimeUnit.Month,this.#a.hour.values.length);continue}if(this.#g(o,a,i)){if(!r.#c(o.getMinutes(),this.#a.minute.values)){this.#f(o,a,i);continue}if(!r.#c(o.getSeconds(),this.#a.second.values)){this.#d(o,a,i);continue}if(s===o.getTime()&&(a===`Add`||o.getMilliseconds()===0)){o.applyDateOperation(a,t.TimeUnit.Second,this.#a.hour.values.length);continue}break}}if(c>=n)throw Error(e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return o.getMilliseconds()!==0&&o.setMilliseconds(0),this.#n=o,o}[Symbol.iterator](){return{next:()=>{try{return{value:this.#v(),done:!1}}catch{return{value:void 0,done:!0}}}}}};e.CronExpression=r,e.default=r})),kr=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.seededRandom=r;function t(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return()=>t>>>0}function n(e){return()=>{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function r(e){return n(e?t(e)():Math.floor(Math.random()*1e10))}})),Ar=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronExpressionParser=e.DayOfWeek=e.Months=e.CronUnit=e.PredefinedExpressions=void 0;var t=X(),n=Or(),r=kr(),i=Dr(),a;(function(e){e[`@yearly`]=`0 0 0 1 1 *`,e[`@annually`]=`0 0 0 1 1 *`,e[`@monthly`]=`0 0 0 1 * *`,e[`@weekly`]=`0 0 0 * * 0`,e[`@daily`]=`0 0 0 * * *`,e[`@hourly`]=`0 0 * * * *`,e[`@minutely`]=`0 * * * * *`,e[`@secondly`]=`* * * * * *`,e[`@weekdays`]=`0 0 0 * * 1-5`,e[`@weekends`]=`0 0 0 * * 0,6`})(a||(e.PredefinedExpressions=a={}));var o;(function(e){e.Second=`Second`,e.Minute=`Minute`,e.Hour=`Hour`,e.DayOfMonth=`DayOfMonth`,e.Month=`Month`,e.DayOfWeek=`DayOfWeek`})(o||(e.CronUnit=o={}));var s;(function(e){e[e.jan=1]=`jan`,e[e.feb=2]=`feb`,e[e.mar=3]=`mar`,e[e.apr=4]=`apr`,e[e.may=5]=`may`,e[e.jun=6]=`jun`,e[e.jul=7]=`jul`,e[e.aug=8]=`aug`,e[e.sep=9]=`sep`,e[e.oct=10]=`oct`,e[e.nov=11]=`nov`,e[e.dec=12]=`dec`})(s||(e.Months=s={}));var c;(function(e){e[e.sun=0]=`sun`,e[e.mon=1]=`mon`,e[e.tue=2]=`tue`,e[e.wed=3]=`wed`,e[e.thu=4]=`thu`,e[e.fri=5]=`fri`,e[e.sat=6]=`sat`})(c||(e.DayOfWeek=c={})),e.CronExpressionParser=class e{static parse(s,c={}){let{strict:l=!1,hashSeed:u}=c,d=(0,r.seededRandom)(u);s=a[s]||s;let f=e.#e(s,l);if(!(f.dayOfMonth===`*`||f.dayOfWeek===`*`||!l))throw Error(`Cannot use both dayOfMonth and dayOfWeek together in strict mode!`);let p=e.#t(o.Second,f.second,i.CronSecond.constraints,d),m=e.#t(o.Minute,f.minute,i.CronMinute.constraints,d),ee=e.#t(o.Hour,f.hour,i.CronHour.constraints,d),h=e.#t(o.Month,f.month,i.CronMonth.constraints,d),g=e.#t(o.DayOfMonth,f.dayOfMonth,i.CronDayOfMonth.constraints,d),{dayOfWeek:_,nthDayOfWeek:v}=e.#u(f.dayOfWeek),y=e.#t(o.DayOfWeek,_,i.CronDayOfWeek.constraints,d),te=new t.CronFieldCollection({second:new i.CronSecond(p,{rawValue:f.second}),minute:new i.CronMinute(m,{rawValue:f.minute}),hour:new i.CronHour(ee,{rawValue:f.hour}),dayOfMonth:new i.CronDayOfMonth(g,{rawValue:f.dayOfMonth}),month:new i.CronMonth(h,{rawValue:f.month}),dayOfWeek:new i.CronDayOfWeek(y,{rawValue:f.dayOfWeek,nthDayOfWeek:v})});return new n.CronExpression(te,{...c,expression:s})}static#e(e,t){if(t&&!e.length)throw Error(`Invalid cron expression`);e||=`0 * * * * *`;let n=e.trim().split(/\s+/);if(t&&n.length<6)throw Error(`Invalid cron expression, expected 6 fields`);if(n.length>6)throw Error(`Invalid cron expression, too many fields`);let r=[`*`,`*`,`*`,`*`,`*`,`0`];n.length<r.length&&n.unshift(...r.slice(n.length));let[i,a,o,s,c,l]=n;return{second:i,minute:a,hour:o,dayOfMonth:s,month:c,dayOfWeek:l}}static#t(e,t,n,r){if((e===o.Month||e===o.DayOfWeek)&&(t=t.replace(/[a-z]{3}/gi,e=>{e=e.toLowerCase();let t=s[e]||c[e];if(t===void 0)throw Error(`Validation error, cannot resolve alias "${e}"`);return t.toString()})),!n.validChars.test(t))throw Error(`Invalid characters, got value: ${t}`);return t=this.#n(t,n),t=this.#r(t,n,r),this.#i(e,t,n)}static#n(e,t){return e.replace(/[*?]/g,t.min+`-`+t.max)}static#r(e,t,n){let r=n();return e.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(e,n,i,a)=>{if(n&&i&&a){let e=parseInt(n,10),o=parseInt(i,10),s=parseInt(a,10);if(e>o)throw Error(`Invalid range: ${e}-${o}, min > max`);if(s<=0)throw Error(`Invalid step: ${s}, must be positive`);let c=Math.max(e,t.min),l=Math.floor(r*s),u=[];for(let e=Math.floor(c/s)*s+l;e<=o;e+=s)e>=c&&u.push(e);return u.join(`,`)}else if(n&&i){let e=parseInt(n,10),t=parseInt(i,10);if(e>t)throw Error(`Invalid range: ${e}-${t}, min > max`);return String(Math.floor(r*(t-e+1))+e)}else if(a){let e=parseInt(a,10);if(e<=0)throw Error(`Invalid step: ${e}, must be positive`);let n=Math.floor(r*e),i=[];for(let r=Math.floor(t.min/e)*e+n;r<=t.max;r+=e)r>=t.min&&i.push(r);return i.join(`,`)}else return String(Math.floor(r*(t.max-t.min+1)+t.min))})}static#i(t,n,r){let i=[];function a(n,r){if(Array.isArray(n))i.push(...n);else if(e.#d(r,n))i.push(n);else{let e=parseInt(n.toString(),10);if(!(e>=r.min&&e<=r.max))throw Error(`Constraint error, got value ${n} expected range ${r.min}-${r.max}`);i.push(t===o.DayOfWeek?e%7:n)}}return n.split(`,`).forEach(n=>{if(!(n.length>0))throw Error(`Invalid list value format`);a(e.#a(t,n,r),r)}),i}static#a(t,n,r){let i=n.split(`/`);if(i.length>2)throw Error(`Invalid repeat: ${n}`);return i.length===2?(i[0].includes(`-`)||(i[0]=`${i[0]}-${r.max}`),e.#l(t,i[0],parseInt(i[1],10),r)):e.#l(t,n,1,r)}static#o(e,t,n){if(!(!isNaN(e)&&!isNaN(t)&&e>=n.min&&t<=n.max))throw Error(`Constraint error, got range ${e}-${t} expected range ${n.min}-${n.max}`);if(e>t)throw Error(`Invalid range: ${e}-${t}, min(${e}) > max(${t})`)}static#s(e){if(!(!isNaN(e)&&e>0))throw Error(`Constraint error, cannot repeat at every ${e} time.`)}static#c(e,t,n,r){let i=[];e===o.DayOfWeek&&n%7==0&&i.push(0);for(let e=t;e<=n;e+=r)i.indexOf(e)===-1&&i.push(e);return i}static#l(e,t,n,r){let i=t.split(`-`);if(i.length<=1)return isNaN(+t)?t:+t;let[a,o]=i.map(e=>parseInt(e,10));return this.#o(a,o,r),this.#s(n),this.#c(e,a,o,n)}static#u(e){let t=e.split(`#`);if(t.length<=1)return{dayOfWeek:t[0]};let n=+t[t.length-1],r=e.match(/([,\-/])/);if(r!==null)throw Error(`Constraint error, invalid dayOfWeek \`#\` and \`${r?.[0]}\` special characters are incompatible`);if(!(t.length<=2&&!isNaN(n)&&n>=1&&n<=5))throw Error(`Constraint error, invalid dayOfWeek occurrence number (#)`);return{dayOfWeek:t[0],nthDayOfWeek:n}}static#d(e,t){return e.chars.some(e=>t.toString().includes(e))}}})),jr=e(((e,t)=>{t.exports={}})),Mr=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronFileParser=void 0;var t=Ar();e.CronFileParser=class e{static async parseFile(t){let{readFile:n}=jr(),r=await n(t,`utf8`);return e.#e(r)}static parseFileSync(t){let{readFileSync:n}=jr(),r=n(t,`utf8`);return e.#e(r)}static#e(t){let n=t.split(`
|
|
2
|
+
`),r={variables:{},expressions:[],errors:{}};for(let t of n){let n=t.trim();if(n.length===0||n.startsWith(`#`))continue;let i=n.match(/^(.*)=(.*)$/);if(i){let[,e,t]=i;r.variables[e]=t.replace(/["']/g,``);continue}try{let t=e.#t(n);r.expressions.push(t.interval)}catch(e){r.errors[n]=e}}return r}static#t(e){let n=e.split(` `);return{interval:t.CronExpressionParser.parse(n.slice(0,5).join(` `)),command:n.slice(5,n.length)}}}})),Nr=e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.CronFileParser=e.CronExpressionParser=e.CronExpression=e.CronFieldCollection=e.CronDate=void 0;var r=Ar(),i=wr();Object.defineProperty(e,"CronDate",{enumerable:!0,get:function(){return i.CronDate}});var a=X();Object.defineProperty(e,"CronFieldCollection",{enumerable:!0,get:function(){return a.CronFieldCollection}});var o=Or();Object.defineProperty(e,"CronExpression",{enumerable:!0,get:function(){return o.CronExpression}});var s=Ar();Object.defineProperty(e,"CronExpressionParser",{enumerable:!0,get:function(){return s.CronExpressionParser}});var c=Mr();Object.defineProperty(e,"CronFileParser",{enumerable:!0,get:function(){return c.CronFileParser}}),n(Dr(),e),e.default=r.CronExpressionParser}))(),Pr=/^([01]\d|2[0-3]):([0-5]\d)$/,Fr=1e3,Ir=`@interval:`;function Lr(e){return Number.isInteger(e)&&e>=0&&e<=59}function Rr(e){return Number.isInteger(e)&&e>=1&&e<=1e3}function zr(e){if(!Rr(e))throw Error(`interval minutes must be an integer between 1 and ${Fr}`);return`${Ir}${e}`}function Br(e){let t=/^@interval:(\d+)$/.exec(e);if(!t)return null;let n=Number(t[1]);return Rr(n)?n:null}function Vr(e){if(!Lr(e))throw Error(`minute must be an integer between 0 and 59`);return`${e} * * * *`}function Hr(e){let t=e.trim();if(!t)return!1;try{return Intl.DateTimeFormat(void 0,{timeZone:t}),!0}catch{return!1}}function Ur(){return Intl.DateTimeFormat().resolvedOptions().timeZone}function Wr(e,t,n=new Date().getDay()){if(e===`interval`)throw Error(`interval presets must be compiled with compileIntervalCron`);if(e===`hourly`)return Vr(0);let r=t.trim().match(Pr);if(!r)throw Error(`time must be HH:mm`);let i=Number(r[1]),a=Number(r[2]);return e===`daily`?`${a} ${i} * * *`:e===`weekdays`?`${a} ${i} * * 1-5`:`${a} ${i} * * ${n}`}function Gr(e){let t=e.trim(),n=Br(t);if(n!==null)return{preset:`interval`,time:``,intervalMinutes:n};let r=t.match(/^(\d{1,2}) \* \* \* \*$/);if(r){let e=Number(r[1]);return Lr(e)?{preset:`hourly`,time:``,minute:e}:null}let i=t.match(/^(\d{1,2}) (\d{1,2}) \* \* (\*|[0-6]|1-5)$/);if(!i)return null;let a=Number(i[1]),o=Number(i[2]),s=i[3],c=`${String(o).padStart(2,`0`)}:${String(a).padStart(2,`0`)}`;return s===`*`?{preset:`daily`,time:c}:s===`1-5`?{preset:`weekdays`,time:c}:{preset:`weekly`,time:c,dayOfWeek:Number(s)}}function Kr(e){let t=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],n=qr(e.time);if(e.preset===`interval`){let t=e.intervalMinutes??5;return t===1?`Every minute`:`Every ${t} minutes`}if(e.preset===`hourly`){let t=e.minute??0;return t>0?`Every hour at :${String(t).padStart(2,`0`)}`:`Every hour`}return e.preset===`daily`?`Every day at ${n}`:e.preset===`weekdays`?`Every weekday at ${n}`:`Every ${t[e.dayOfWeek??0]??`Sunday`} at ${n}`}function qr(e){let t=e.match(Pr);if(!t)return e;let n=Number(t[1]),r=t[2],i=n>=12?`PM`:`AM`;return`${n%12==0?12:n%12}:${r} ${i}`}function Jr(e){return e*6e4}function Yr(e,t){let n=Jr(e);return(Math.floor(t.getTime()/n)+1)*n}function Z(e,t,n=new Date){if(!Hr(t))return null;let r=Br(e);if(r!==null)return new Date(Yr(r,n));try{return Nr.CronExpressionParser.parse(e,{tz:t,currentDate:n}).next().toDate()}catch{return null}}function Xr(e,t=new Date){let n=e.getTime()-t.getTime();if(n<=0)return`Next run soon`;let r=Math.round(n/6e4);if(r<60)return`Next run in ${r} min`;let i=Math.round(r/60);return i<48?`Next run in ${i} hours`:`Next run in ${Math.round(i/24)} days`}var Zr=`Set a Default model alias in Settings → Default Models before scheduling a task`,Qr=/^[a-zA-Z0-9._:-]+$/;function $r(e){let t=e.trim();return t?t.length>100?`eventKey must be 100 characters or fewer`:Qr.test(t)?null:`eventKey may only contain letters, numbers, dots, colons, underscores, and hyphens`:`eventKey is required for event triggers`}function Q(e){return e!=null&&e.trim()!==``}function ei(e){return Q(e.scheduledAt)?`scheduledAt requires triggerType 'schedule'`:Q(e.scheduleCron)?`scheduleCron requires triggerType 'schedule'`:Q(e.timezone)?`timezone requires triggerType 'schedule'`:Q(e.eventKey)?`eventKey requires triggerType 'event'`:null}function ti(e){let t=e.scheduledAt?.trim()??null,n=e.scheduleCron?.trim()??null,r=e.timezone?.trim()??null;return t&&n?`Provide either scheduledAt or scheduleCron, not both`:!t&&!n?`scheduledAt or scheduleCron is required for schedule triggers`:r?Hr(r)?t&&Number.isNaN(Date.parse(t))?`scheduledAt must be an ISO timestamp`:Q(e.eventKey)?`eventKey is only allowed for event triggers`:null:`timezone must be a valid IANA timezone`:`timezone is required for schedule triggers`}function ni(e){return $r(e.eventKey??``)||(Q(e.scheduledAt)?`scheduledAt is only allowed for schedule triggers`:Q(e.scheduleCron)?`scheduleCron is only allowed for schedule triggers`:Q(e.timezone)?`timezone is only allowed for schedule triggers`:null)}function ri(e,t){return e===`schedule`?v(t)?null:Zr:null}function ii(e){let t=e.triggerType??null;return t===null?ei(e):t===`schedule`?ti(e):ni(e)}var ai=`{tarsk}`;function oi(e,t){let n=e.replace(/\/$/,``);if(t===n)return ai;let r=`${n}/`;return t.startsWith(r)?`${ai}/${t.slice(r.length)}`:t}var si=3e4,ci=2e3;function li(e){return typeof process<`u`&&process.platform===`win32`?`for /f "tokens=5" %a in ('netstat -aon ^| findstr :${e}') do taskkill /F /PID %a`:`lsof -ti :${e} | xargs kill -9`}function ui(e){return e.replace(/\x1b\[[0-9;]*m/g,``)}var di=[{pattern:/https?:\/\/localhost[:/](\d+)/i},{pattern:/https?:\/\/127\.0\.0\.1:(\d+)/i},{pattern:/localhost:(\d+)/i,portGroup:1},{pattern:/127\.0\.0\.1:(\d+)/i,portGroup:1},{pattern:/https?:\/\/(0\.0\.0\.0|\[::?\]):(\d+)/i,portGroup:2},{pattern:/https?:\/\/(192\.168\.\d+\.\d+):(\d+)/i,portGroup:2},{pattern:/https?:\/\/\[::1\]:(\d+)/i}];function fi(e){let t=e[0];return t.includes(`://`)?t.replace(/\/+$/,``):t.startsWith(`127.0.0.1:`)?`http://${t}`:`http://localhost:${e[1]}`}function pi(e){let t=ui(e);for(let{pattern:e,portGroup:n}of di){let r=t.match(e);if(r)return n!=null&&r[n]&&r[0].includes(`://`),fi(r)}}var mi=`tarsk://`,hi=`https://tarsk.io`,gi=`/redirect`,$=`tarsk.invalid`,_i=`/chat`;function vi(e){let t=new URLSearchParams;e.projectId&&t.set(`project`,e.projectId),e.threadId&&t.set(`thread`,e.threadId),e.conversationId&&t.set(`conversation`,e.conversationId);let n=t.toString();return`${mi}chat${n?`?${n}`:``}`}function yi(e){if(!e.startsWith(mi))return null;let t=e.slice(8);try{let e=new URL(`https://${$}/${t}`);return e.pathname.replace(/\/+$/,``)===_i?{projectId:e.searchParams.get(`project`)??void 0,threadId:e.searchParams.get(`thread`)??void 0,conversationId:e.searchParams.get(`conversation`)??void 0}:null}catch{return null}}function bi(e){let t=e.trim(),n=yi(t);if(n)return n;try{let e=new URL(t);if(e.origin!==hi||e.pathname!==gi)return null;let n=e.searchParams.get(`url`);return n?yi(n):null}catch{return null}}var xi=`home.tarsk.io`,Si=`https://home.tarsk.io`,Ci=`Sign in with the account that owns this Tarsk.`,wi=`abcdefghijkmnpqrstuvwxyz23456789`,Ti=10;function Ei(e){return e.trim().toLowerCase().replace(/:\d+$/,``)===xi}function Di(e){if(e.length!==Ti)return!1;for(let t of e)if(!wi.includes(t))return!1;return!0}function Oi(e){return Di(e)?`${Si}/${e}`:null}function ki(e){let t=e.split(`/`).filter(Boolean)[0];return!t||!Di(t)?null:t}var Ai=[`paused`,`blocked`,`awaiting-human`];function ji(e){return Ai.some(t=>t===e)}function Mi(e){let t=Math.max(0,Math.floor(e/1e3)),n=t%60,r=Math.floor(t/60)%60,i=Math.floor(t/3600),a=e=>String(e).padStart(2,`0`);return i>0?`${i}:${a(r)}:${a(n)}`:`${r}:${a(n)}`}function Ni(e){let t=Pi(e);if(!t)throw Error(!e||typeof e!=`object`?`ask_user question must be an object`:"ask_user question requires a non-empty `question` string");return t}function Pi(e){if(!e||typeof e!=`object`)return null;let t=e;if(typeof t.question!=`string`||!t.question.trim())return null;let n=Fi(t.options);return{question:t.question,header:typeof t.header==`string`?t.header:void 0,options:n.length>0?n:void 0,multiple:typeof t.multiple==`boolean`?t.multiple:void 0}}function Fi(e){if(!Array.isArray(e))return[];let t=[];for(let n of e)if(typeof n==`string`&&n.trim())t.push({label:n,description:``});else if(n&&typeof n==`object`){let e=n;typeof e.label==`string`&&e.label.trim()&&t.push({label:e.label,description:typeof e.description==`string`?e.description:``})}return t}function Ii(e){if(!e||typeof e!=`object`)throw Error("ask_user requires an object containing `questions` or `question`");let t=e;if(Array.isArray(t.questions)){if(t.questions.length===0)throw Error("ask_user `questions` must contain at least one question");return t.questions.map(Ni)}if(typeof t.question==`string`&&t.question.trim())return[{question:t.question,header:typeof t.context==`string`?t.context:void 0,options:Fi(t.options)}];throw Error("ask_user requires `questions` (array) or `question` (string)")}export{_n as $,Ve as $t,pr as A,u as An,xt as At,U as B,r as Bn,tt as Bt,Xr as C,le as Cn,It as Ct,Gr as D,he as Dn,P as Dt,Rr as E,me as En,Et,ar as F,te as Fn,mt as Ft,Dn as G,E as Gt,er as H,$e as Ht,or as I,g as In,ut as It,wn as J,Je as Jt,En as K,Qe as Kt,sr as L,re as Ln,k as Lt,W as M,ee as Mn,_t as Mt,cr as N,ne as Nn,vt as Nt,hr as O,f as On,Ot,lr as P,y as Pn,dt as Pt,vn as Q,He as Qt,rr as R,ae as Rn,lt as Rt,Kr as S,de as Sn,Lt as St,Z as T,ce as Tn,wt as Tt,Vn as U,Ze as Ut,qn as V,l as Vn,et as Vt,kn as W,Xe as Wt,mn as X,We as Xt,Cn as Y,Ue as Yt,xn as Z,ze as Zt,ii as _,x as _n,Bt as _t,Ei as a,Me as an,an as at,zr as b,_e as bn,zt as bt,vi as c,Se as cn,$t as ct,pi as d,Ee as dn,Jt as dt,Be as en,yn as et,ci as f,we as fn,Gt as ft,ri as g,S as gn,Ht as gt,oi as h,Ae as hn,Wt as ht,Ci as i,Ne as in,un as it,ur as j,h as jn,ft as jt,G as k,d as kn,kt,yi as l,ke as ln,tn as lt,li as m,Ce as mn,Ut as mt,Mi as n,Fe as nn,dn as nt,ki as o,je as on,rn as ot,si as p,Te as pn,Kt as pt,Tn as q,qe as qt,ji as r,Le as rn,B as rt,Oi as s,xe as sn,en as st,Ii as t,Re as tn,pn as tt,bi as u,De as un,qt as ut,Fr as v,ye as vn,Vt as vt,Ur as w,pe as wn,z as wt,Wr as x,ge as xn,Ft as xt,Vr as y,be as yn,Rt as yt,Rn as z,a as zn,rt as zt};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,o as n,t as r}from"./react-vendor-Ee0-5T4I.js";import{o as i,s as a}from"./utils-BCj_kT9l.js";var o=e(n(),1),s=r();typeof window<`u`&&window.document&&window.document.createElement;function c(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function l(e,t){let n=o.createContext(t),r=e=>{let{children:t,...r}=e,i=o.useMemo(()=>r,Object.values(r));return(0,s.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=o.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function u(e,t=[]){let n=[];function r(t,r){let i=o.createContext(r),a=n.length;n=[...n,r];let c=t=>{let{scope:n,children:r,...c}=t,l=n?.[e]?.[a]||i,u=o.useMemo(()=>c,Object.values(c));return(0,s.jsx)(l.Provider,{value:u,children:r})};c.displayName=t+`Provider`;function l(n,s){let c=s?.[e]?.[a]||i,l=o.useContext(c);if(l)return l;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[c,l]}let i=()=>{let t=n.map(e=>o.createContext(e));return function(n){let r=n?.[e]||t;return o.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,d(i,...t)]}function d(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var f=e(t(),1);function p(e){let t=m(e),n=o.forwardRef((e,n)=>{let{children:r,...i}=e,a=o.Children.toArray(r),c=a.find(_);if(c){let e=c.props.children,r=a.map(t=>t===c?o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null:t);return(0,s.jsx)(t,{...i,ref:n,children:o.isValidElement(e)?o.cloneElement(e,void 0,r):null})}return(0,s.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function m(e){let t=o.forwardRef((e,t)=>{let{children:n,...r}=e;if(o.isValidElement(n)){let e=y(n),a=v(r,n.props);return n.type!==o.Fragment&&(a.ref=t?i(t,e):e),o.cloneElement(n,a)}return o.Children.count(n)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var h=Symbol(`radix.slottable`);function g(e){let t=({children:e})=>(0,s.jsx)(s.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=h,t}function _(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===h}function v(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function y(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var b=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=p(`Primitive.${t}`),r=o.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,s.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function x(e,t){e&&f.flushSync(()=>e.dispatchEvent(t))}function S(e){let t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...e)=>t.current?.(...e),[])}function C(e,t=globalThis?.document){let n=S(e);o.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var w=`DismissableLayer`,T=`dismissableLayer.update`,E=`dismissableLayer.pointerDownOutside`,D=`dismissableLayer.focusOutside`,O,k=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),A=o.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...f}=e,p=o.useContext(k),[m,h]=o.useState(null),g=m?.ownerDocument??globalThis?.document,[,_]=o.useState({}),v=a(t,e=>h(e)),y=Array.from(p.layers),[x]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),S=y.indexOf(x),w=m?y.indexOf(m):-1,E=p.layersWithOutsidePointerEventsDisabled.size>0,D=w>=S,A=N(e=>{let t=e.target,n=[...p.branches].some(e=>e.contains(t));!D||n||(i?.(e),u?.(e),e.defaultPrevented||d?.())},g),j=P(e=>{let t=e.target;[...p.branches].some(e=>e.contains(t))||(l?.(e),u?.(e),e.defaultPrevented||d?.())},g);return C(e=>{w===p.layers.size-1&&(r?.(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))},g),o.useEffect(()=>{if(m)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(O=g.body.style.pointerEvents,g.body.style.pointerEvents=`none`),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),F(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=O)}},[m,g,n,p]),o.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),F())},[m,p]),o.useEffect(()=>{let e=()=>_({});return document.addEventListener(T,e),()=>document.removeEventListener(T,e)},[]),(0,s.jsx)(b.div,{...f,ref:v,style:{pointerEvents:E?D?`auto`:`none`:void 0,...e.style},onFocusCapture:c(e.onFocusCapture,j.onFocusCapture),onBlurCapture:c(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:c(e.onPointerDownCapture,A.onPointerDownCapture)})});A.displayName=w;var j=`DismissableLayerBranch`,M=o.forwardRef((e,t)=>{let n=o.useContext(k),r=o.useRef(null),i=a(t,r);return o.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,s.jsx)(b.div,{...e,ref:i})});M.displayName=j;function N(e,t=globalThis?.document){let n=S(e),r=o.useRef(!1),i=o.useRef(()=>{});return o.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){I(E,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function P(e,t=globalThis?.document){let n=S(e),r=o.useRef(!1);return o.useEffect(()=>{let e=e=>{e.target&&!r.current&&I(D,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function F(){let e=new CustomEvent(T);document.dispatchEvent(e)}function I(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?x(i,a):i.dispatchEvent(a)}var L=A,R=M,z=globalThis?.document?o.useLayoutEffect:()=>{},B=o.useId||(()=>void 0),V=0;function H(e){let[t,n]=o.useState(B());return z(()=>{e||n(e=>e??String(V++))},[e]),e||(t?`radix-${t}`:``)}var U=`Portal`,W=o.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=o.useState(!1);z(()=>a(!0),[]);let c=n||i&&globalThis?.document?.body;return c?f.createPortal((0,s.jsx)(b.div,{...r,ref:t}),c):null});W.displayName=U;function G(e,t){return o.useReducer((e,n)=>t[e][n]??e,e)}var K=e=>{let{present:t,children:n}=e,r=q(t),i=typeof n==`function`?n({present:r.isPresent}):o.Children.only(n),s=a(r.ref,Y(i));return typeof n==`function`||r.isPresent?o.cloneElement(i,{ref:s}):null};K.displayName=`Presence`;function q(e){let[t,n]=o.useState(),r=o.useRef(null),i=o.useRef(e),a=o.useRef(`none`),[s,c]=G(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return o.useEffect(()=>{let e=J(r.current);a.current=s===`mounted`?e:`none`},[s]),z(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=J(t);e?c(`MOUNT`):o===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),z(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=J(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=J(r.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:o.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function J(e){return e?.animationName||`none`}function Y(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var X=o.useInsertionEffect||z;function Z({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,s]=Q({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:i;{let t=o.useRef(e!==void 0);o.useEffect(()=>{let e=t.current;e!==c&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${c?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=c},[c,r])}return[l,o.useCallback(t=>{if(c){let n=$(t)?t(e):t;n!==e&&s.current?.(n)}else a(t)},[c,e,a,s])]}function Q({defaultProp:e,onChange:t}){let[n,r]=o.useState(e),i=o.useRef(n),a=o.useRef(t);return X(()=>{a.current=t},[t]),o.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function $(e){return typeof e==`function`}export{z as a,L as c,x as d,p as f,c as g,u as h,H as i,S as l,l as m,K as n,R as o,g as p,W as r,A as s,Z as t,b as u};
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,o as n,t as r}from"./react-vendor-Ee0-5T4I.js";import{o as i,s as a}from"./utils-Buz2Fe6i.js";var o=e(n(),1),s=r();typeof window<`u`&&window.document&&window.document.createElement;function c(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function l(e,t){let n=o.createContext(t),r=e=>{let{children:t,...r}=e,i=o.useMemo(()=>r,Object.values(r));return(0,s.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=o.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function u(e,t=[]){let n=[];function r(t,r){let i=o.createContext(r),a=n.length;n=[...n,r];let c=t=>{let{scope:n,children:r,...c}=t,l=n?.[e]?.[a]||i,u=o.useMemo(()=>c,Object.values(c));return(0,s.jsx)(l.Provider,{value:u,children:r})};c.displayName=t+`Provider`;function l(n,s){let c=s?.[e]?.[a]||i,l=o.useContext(c);if(l)return l;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[c,l]}let i=()=>{let t=n.map(e=>o.createContext(e));return function(n){let r=n?.[e]||t;return o.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,d(i,...t)]}function d(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var f=e(t(),1);function p(e){let t=m(e),n=o.forwardRef((e,n)=>{let{children:r,...i}=e,a=o.Children.toArray(r),c=a.find(_);if(c){let e=c.props.children,r=a.map(t=>t===c?o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null:t);return(0,s.jsx)(t,{...i,ref:n,children:o.isValidElement(e)?o.cloneElement(e,void 0,r):null})}return(0,s.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function m(e){let t=o.forwardRef((e,t)=>{let{children:n,...r}=e;if(o.isValidElement(n)){let e=y(n),a=v(r,n.props);return n.type!==o.Fragment&&(a.ref=t?i(t,e):e),o.cloneElement(n,a)}return o.Children.count(n)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var h=Symbol(`radix.slottable`);function g(e){let t=({children:e})=>(0,s.jsx)(s.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=h,t}function _(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===h}function v(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function y(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var b=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=p(`Primitive.${t}`),r=o.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,s.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function x(e,t){e&&f.flushSync(()=>e.dispatchEvent(t))}function S(e){let t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...e)=>t.current?.(...e),[])}function C(e,t=globalThis?.document){let n=S(e);o.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var w=`DismissableLayer`,T=`dismissableLayer.update`,E=`dismissableLayer.pointerDownOutside`,D=`dismissableLayer.focusOutside`,O,k=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),A=o.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...f}=e,p=o.useContext(k),[m,h]=o.useState(null),g=m?.ownerDocument??globalThis?.document,[,_]=o.useState({}),v=a(t,e=>h(e)),y=Array.from(p.layers),[x]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),S=y.indexOf(x),w=m?y.indexOf(m):-1,E=p.layersWithOutsidePointerEventsDisabled.size>0,D=w>=S,A=N(e=>{let t=e.target,n=[...p.branches].some(e=>e.contains(t));!D||n||(i?.(e),u?.(e),e.defaultPrevented||d?.())},g),j=P(e=>{let t=e.target;[...p.branches].some(e=>e.contains(t))||(l?.(e),u?.(e),e.defaultPrevented||d?.())},g);return C(e=>{w===p.layers.size-1&&(r?.(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))},g),o.useEffect(()=>{if(m)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(O=g.body.style.pointerEvents,g.body.style.pointerEvents=`none`),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),F(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=O)}},[m,g,n,p]),o.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),F())},[m,p]),o.useEffect(()=>{let e=()=>_({});return document.addEventListener(T,e),()=>document.removeEventListener(T,e)},[]),(0,s.jsx)(b.div,{...f,ref:v,style:{pointerEvents:E?D?`auto`:`none`:void 0,...e.style},onFocusCapture:c(e.onFocusCapture,j.onFocusCapture),onBlurCapture:c(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:c(e.onPointerDownCapture,A.onPointerDownCapture)})});A.displayName=w;var j=`DismissableLayerBranch`,M=o.forwardRef((e,t)=>{let n=o.useContext(k),r=o.useRef(null),i=a(t,r);return o.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,s.jsx)(b.div,{...e,ref:i})});M.displayName=j;function N(e,t=globalThis?.document){let n=S(e),r=o.useRef(!1),i=o.useRef(()=>{});return o.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){I(E,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function P(e,t=globalThis?.document){let n=S(e),r=o.useRef(!1);return o.useEffect(()=>{let e=e=>{e.target&&!r.current&&I(D,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function F(){let e=new CustomEvent(T);document.dispatchEvent(e)}function I(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?x(i,a):i.dispatchEvent(a)}var L=A,R=M,z=globalThis?.document?o.useLayoutEffect:()=>{},B=o.useId||(()=>void 0),V=0;function H(e){let[t,n]=o.useState(B());return z(()=>{e||n(e=>e??String(V++))},[e]),e||(t?`radix-${t}`:``)}var U=`Portal`,W=o.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=o.useState(!1);z(()=>a(!0),[]);let c=n||i&&globalThis?.document?.body;return c?f.createPortal((0,s.jsx)(b.div,{...r,ref:t}),c):null});W.displayName=U;function G(e,t){return o.useReducer((e,n)=>t[e][n]??e,e)}var K=e=>{let{present:t,children:n}=e,r=q(t),i=typeof n==`function`?n({present:r.isPresent}):o.Children.only(n),s=a(r.ref,Y(i));return typeof n==`function`||r.isPresent?o.cloneElement(i,{ref:s}):null};K.displayName=`Presence`;function q(e){let[t,n]=o.useState(),r=o.useRef(null),i=o.useRef(e),a=o.useRef(`none`),[s,c]=G(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return o.useEffect(()=>{let e=J(r.current);a.current=s===`mounted`?e:`none`},[s]),z(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=J(t);e?c(`MOUNT`):o===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),z(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=J(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=J(r.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:o.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function J(e){return e?.animationName||`none`}function Y(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var X=o.useInsertionEffect||z;function Z({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,s]=Q({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:i;{let t=o.useRef(e!==void 0);o.useEffect(()=>{let e=t.current;e!==c&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${c?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=c},[c,r])}return[l,o.useCallback(t=>{if(c){let n=$(t)?t(e):t;n!==e&&s.current?.(n)}else a(t)},[c,e,a,s])]}function Q({defaultProp:e,onChange:t}){let[n,r]=o.useState(e),i=o.useRef(n),a=o.useRef(t);return X(()=>{a.current=t},[t]),o.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function $(e){return typeof e==`function`}export{z as a,L as c,x as d,p as f,c as g,u as h,H as i,S as l,l as m,K as n,R as o,g as p,W as r,A as s,Z as t,b as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,t as n}from"./react-vendor-Ee0-5T4I.js";import{s as r}from"./utils-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,t as n}from"./react-vendor-Ee0-5T4I.js";import{s as r}from"./utils-Buz2Fe6i.js";import{f as i,g as a,h as o,i as s,m as c,n as l,r as u,s as d,t as f,u as p}from"./dist-DjsjvpPB.js";import{i as m,n as h,r as g,t as _}from"./es2015-CqjklqcF.js";var v=e(t(),1),y=n(),b=`Dialog`,[x,S]=o(b),[C,w]=x(b),T=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,c=v.useRef(null),l=v.useRef(null),[u,d]=f({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:c,contentRef:l,contentId:s(),titleId:s(),descriptionId:s(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:o,children:n})};T.displayName=b;var E=`DialogTrigger`,D=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,o=w(E,n),s=r(t,o.triggerRef);return(0,y.jsx)(p.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":o.open,"aria-controls":o.contentId,"data-state":K(o.open),...i,ref:s,onClick:a(e.onClick,o.onOpenToggle)})});D.displayName=E;var O=`DialogPortal`,[k,A]=x(O,{forceMount:void 0}),j=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=w(O,t);return(0,y.jsx)(k,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(l,{present:n||a.open,children:(0,y.jsx)(u,{asChild:!0,container:i,children:e})}))})};j.displayName=O;var M=`DialogOverlay`,N=v.forwardRef((e,t)=>{let n=A(M,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(M,e.__scopeDialog);return a.modal?(0,y.jsx)(l,{present:r||a.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=i(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(M,n);return(0,y.jsx)(h,{as:P,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(p.div,{"data-state":K(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),I=`DialogContent`,L=v.forwardRef((e,t)=>{let n=A(I,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(I,e.__scopeDialog);return(0,y.jsx)(l,{present:r||a.open,children:a.modal?(0,y.jsx)(R,{...i,ref:t}):(0,y.jsx)(ee,{...i,ref:t})})});L.displayName=I;var R=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),i=v.useRef(null),o=r(t,n.contentRef,i);return v.useEffect(()=>{let e=i.current;if(e)return _(e)},[]),(0,y.jsx)(z,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:a(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:a(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:a(e.onFocusOutside,e=>e.preventDefault())})}),ee=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(z,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),z=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,...s}=e,c=w(I,n),l=v.useRef(null),u=r(t,l);return g(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(m,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,y.jsx)(d,{role:`dialog`,id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":K(c.open),...s,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(X,{titleId:c.titleId}),(0,y.jsx)(Q,{contentRef:l,descriptionId:c.descriptionId})]})]})}),B=`DialogTitle`,V=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(B,n);return(0,y.jsx)(p.h2,{id:i.titleId,...r,ref:t})});V.displayName=B;var H=`DialogDescription`,U=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(H,n);return(0,y.jsx)(p.p,{id:i.descriptionId,...r,ref:t})});U.displayName=H;var W=`DialogClose`,G=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(W,n);return(0,y.jsx)(p.button,{type:`button`,...r,ref:t,onClick:a(e.onClick,()=>i.onOpenChange(!1))})});G.displayName=W;function K(e){return e?`open`:`closed`}var q=`DialogTitleWarning`,[J,Y]=c(q,{contentName:I,titleName:B,docsSlug:`dialog`}),X=({titleId:e})=>{let t=Y(q),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,t as n}from"./react-vendor-Ee0-5T4I.js";import{s as r}from"./utils-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,t as n}from"./react-vendor-Ee0-5T4I.js";import{s as r}from"./utils-Buz2Fe6i.js";import{f as i,h as a}from"./dist-DjsjvpPB.js";var o=e(t(),1),s=n();function c(e){let t=e+`CollectionProvider`,[n,c]=a(t),[l,u]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,r=o.useRef(null),i=o.useRef(new Map).current;return(0,s.jsx)(l,{scope:t,itemMap:i,collectionRef:r,children:n})};d.displayName=t;let f=e+`CollectionSlot`,p=i(f),m=o.forwardRef((e,t)=>{let{scope:n,children:i}=e;return(0,s.jsx)(p,{ref:r(t,u(f,n).collectionRef),children:i})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=i(h),v=o.forwardRef((e,t)=>{let{scope:n,children:i,...a}=e,c=o.useRef(null),l=r(t,c),d=u(h,n);return o.useEffect(()=>(d.itemMap.set(c,{ref:c,...a}),()=>void d.itemMap.delete(c))),(0,s.jsx)(_,{[g]:``,ref:l,children:i})});v.displayName=h;function y(t){let n=u(e+`CollectionConsumer`,t);return o.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:d,Slot:m,ItemSlot:v},y,c]}export{c as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,t as n}from"./react-vendor-Ee0-5T4I.js";import{s as r}from"./utils-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,t as n}from"./react-vendor-Ee0-5T4I.js";import{s as r}from"./utils-Buz2Fe6i.js";import{l as i,u as a}from"./dist-DjsjvpPB.js";var o=e(t(),1),s=n(),c=`focusScope.autoFocusOnMount`,l=`focusScope.autoFocusOnUnmount`,u={bubbles:!1,cancelable:!0},d=`FocusScope`,f=o.forwardRef((e,t)=>{let{loop:n=!1,trapped:d=!1,onMountAutoFocus:f,onUnmountAutoFocus:g,..._}=e,[v,x]=o.useState(null),S=i(f),w=i(g),T=o.useRef(null),E=r(t,e=>x(e)),D=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(d){let e=function(e){if(D.paused||!v)return;let t=e.target;v.contains(t)?T.current=t:y(T.current,{select:!0})},t=function(e){if(D.paused||!v)return;let t=e.relatedTarget;t!==null&&(v.contains(t)||y(T.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&y(v)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return v&&r.observe(v,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[d,v,D.paused]),o.useEffect(()=>{if(v){b.add(D);let e=document.activeElement;if(!v.contains(e)){let t=new CustomEvent(c,u);v.addEventListener(c,S),v.dispatchEvent(t),t.defaultPrevented||(p(C(h(v)),{select:!0}),document.activeElement===e&&y(v))}return()=>{v.removeEventListener(c,S),setTimeout(()=>{let t=new CustomEvent(l,u);v.addEventListener(l,w),v.dispatchEvent(t),t.defaultPrevented||y(e??document.body,{select:!0}),v.removeEventListener(l,w),b.remove(D)},0)}}},[v,S,w,D]);let O=o.useCallback(e=>{if(!n&&!d||D.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){let t=e.currentTarget,[i,a]=m(t);i&&a?!e.shiftKey&&r===a?(e.preventDefault(),n&&y(i,{select:!0})):e.shiftKey&&r===i&&(e.preventDefault(),n&&y(a,{select:!0})):r===t&&e.preventDefault()}},[n,d,D.paused]);return(0,s.jsx)(a.div,{tabIndex:-1,..._,ref:E,onKeyDown:O})});f.displayName=d;function p(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(y(r,{select:t}),document.activeElement!==n)return}function m(e){let t=h(e);return[g(t,e),g(t.reverse(),e)]}function h(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function g(e,t){for(let n of e)if(!_(n,{upTo:t}))return n}function _(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function v(e){return e instanceof HTMLInputElement&&`select`in e}function y(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&v(e)&&t&&e.select()}}var b=x();function x(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=S(e,t),e.unshift(t)},remove(t){e=S(e,t),e[0]?.resume()}}}function S(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function C(e){return e.filter(e=>e.tagName!==`A`)}var w=0;function T(){o.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??E()),document.body.insertAdjacentElement(`beforeend`,e[1]??E()),w++,()=>{w===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),w--}},[])}function E(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var D=function(){return D=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},D.apply(this,arguments)};function O(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 ee(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var k=`right-scroll-bar-position`,A=`width-before-scroll-bar`,te=`with-scroll-bars-hidden`,ne=`--removed-body-scroll-bar-size`;function j(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function re(e,t){var n=(0,o.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var ie=typeof window<`u`?o.useLayoutEffect:o.useEffect,M=new WeakMap;function ae(e,t){var n=re(t||null,function(t){return e.forEach(function(e){return j(e,t)})});return ie(function(){var t=M.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||j(e,null)}),i.forEach(function(e){r.has(e)||j(e,a)})}M.set(n,e)},[e]),n}function oe(e){return e}function se(e,t){t===void 0&&(t=oe);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function ce(e){e===void 0&&(e={});var t=se(null);return t.options=D({async:!0,ssr:!1},e),t}var N=function(e){var t=e.sideCar,n=O(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return o.createElement(r,D({},n))};N.isSideCarExport=!0;function le(e,t){return e.useMedium(t),N}var P=ce(),F=function(){},I=o.forwardRef(function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:F,onWheelCapture:F,onTouchMoveCapture:F}),i=r[0],a=r[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=O(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=ae([n,t]),w=D(D({},x),i);return o.createElement(o.Fragment,null,d&&o.createElement(S,{sideCar:P,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),s?o.cloneElement(o.Children.only(c),D(D({},w),{ref:C})):o.createElement(y,D({},w,{className:l,ref:C}),c))});I.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},I.classNames={fullWidth:A,zeroRight:k};var L,ue=function(){if(L)return L;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function de(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=ue();return t&&e.setAttribute(`nonce`,t),e}function fe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function pe(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var me=function(){var e=0,t=null;return{add:function(n){e==0&&(t=de())&&(fe(t,n),pe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},he=function(){var e=me();return function(t,n){o.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},R=function(){var e=he();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ge={left:0,top:0,right:0,gap:0},z=function(e){return parseInt(e||``,10)||0},_e=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[z(n),z(r),z(i)]},ve=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ge;var t=_e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ye=R(),B=`data-scroll-locked`,be=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
2
|
.${te} {
|
|
3
3
|
overflow: hidden ${r};
|
|
4
4
|
padding-right: ${s}px ${r};
|
package/dist/public/assets/{explorer-monaco-editor-YoaTqh0f.js → explorer-monaco-editor-JexQ2hDA.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,t as n}from"./react-vendor-Ee0-5T4I.js";import"./dist-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,t as n}from"./react-vendor-Ee0-5T4I.js";import"./dist-DFsjr0PN.js";import{t as r}from"./monaco-setup-DU2h1v3K.js";var i=e(t(),1),a=n();function o(e){e?.getModel()?.dispose(),e?.dispose()}function s(e,t,n){!t||!e||(e.focus(),n?.())}function c({language:e,value:t,theme:n,autoFocus:c=!1,onChange:l,onReady:u}){let d=(0,i.useRef)(null),f=(0,i.useRef)(u);f.current=u,(0,i.useEffect)(()=>()=>{o(d.current),d.current=null},[]),(0,i.useEffect)(()=>{s(d.current,c,f.current)},[c]);function p(e){d.current=e,s(e,c,f.current)}return(0,a.jsx)(r,{height:`100%`,language:e,value:t,onChange:function(e){l(e??``)},onMount:p,theme:n,options:{minimap:{enabled:!1},scrollBeyondLastLine:!1,wordWrap:`on`,automaticLayout:!0,fontSize:14,lineNumbers:`on`,renderLineHighlight:`line`,scrollbar:{vertical:`auto`,horizontal:`auto`}}})}export{c as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/explorer-tree-
|
|
2
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,r as n,t as r}from"./react-vendor-Ee0-5T4I.js";import{
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/explorer-tree-u1IiLEmZ.js","assets/rolldown-runtime-aKtaBQYM.js","assets/index-8x-2e2HM.js","assets/react-vendor-Ee0-5T4I.js","assets/progress-indicator-4LUNdJet.js","assets/utils-Buz2Fe6i.js","assets/dist-DFsjr0PN.js","assets/alert-dialog-Jje1F97D.js","assets/button-CltOBnLJ.js","assets/use-browser-overlay-block-DyprQSIG.js","assets/browser-overlay-block-CiDtkfup.js","assets/dist-DjsjvpPB.js","assets/dist-pqOQhr7q.js","assets/es2015-CqjklqcF.js","assets/scroll-area-DO1A2oHC.js","assets/dist-OixawqbU.js","assets/tooltip-JvDw-QDI.js","assets/dist-BuAo47a7.js","assets/use-toast-xpb5jNtN.js","assets/chat-dock-context-BHq1_jtf.js","assets/api-BnJTzqjz.js","assets/store-N5DWaLPi.js","assets/explorer-tab-context-BxUVwWQQ.js","assets/main-tab-context-CNgxXqnH.js","assets/terminal-output-activity-B1bjjsl7.js","assets/suspense-resource-DzlMlIgR.js","assets/dist-s8kCZECe.js","assets/dist-5hESBP4d.js","assets/dist-BW2D7v35.js","assets/dist-CnoazagX.js","assets/dist-CSssbxDI.js","assets/useBaseQuery-DRTrohmA.js","assets/lucide-react-CNNzKD4G.js","assets/chunk-QFMPRPBF-COsSkB7x.js","assets/index-WbZmmRUY.css","assets/async-error-boundary-BqVpxDC8.js","assets/card-F7mD70yN.js","assets/explorer-view-D2cPTIXP.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,r as n,t as r}from"./react-vendor-Ee0-5T4I.js";import{Vt as i}from"./dist-DFsjr0PN.js";import{r as a}from"./store-N5DWaLPi.js";import{t as o}from"./utils-Buz2Fe6i.js";import{c as ee}from"./lucide-react-CNNzKD4G.js";import{n as s}from"./scroll-area-DO1A2oHC.js";import{n as c}from"./explorer-tab-context-BxUVwWQQ.js";import{t as l}from"./progress-indicator-4LUNdJet.js";import{t as u}from"./use-toast-xpb5jNtN.js";import{Bn as d,G as f,Hn as p,J as te,K as ne,P as m,Vn as h,Y as g,q as _,rn as v,tr as y}from"./index-8x-2e2HM.js";import{t as b}from"./async-error-boundary-BqVpxDC8.js";var x=e(t(),1),S=r(),C=(0,x.lazy)(()=>n(()=>import(`./explorer-tree-u1IiLEmZ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]))),re=(0,x.lazy)(()=>n(()=>import(`./explorer-view-D2cPTIXP.js`),__vite__mapDeps([37,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36])));function w({instanceId:e}){let t=a(e=>e.selectedThreadId),n=y(),[r,w]=(0,x.useState)(null),[T,E]=(0,x.useState)(!0),[D,O]=(0,x.useState)(null),[k,A]=(0,x.useState)(!1),[j,M]=(0,x.useState)(!1),N=(0,x.useRef)(0),{pendingExplorerPath:P,setPendingExplorerPath:F,explorerClearPath:I,setExplorerClearPath:L,triggerExplorerRefresh:R}=c();(0,x.useEffect)(()=>{function e(e){g(e.dataTransfer)&&e.preventDefault()}return window.addEventListener(`dragover`,e),window.addEventListener(`drop`,e),()=>{window.removeEventListener(`dragover`,e),window.removeEventListener(`drop`,e)}},[]),(0,x.useEffect)(()=>{E(!0)},[t]);let z=(0,x.useCallback)(e=>{w(e),n&&E(!1)},[n]),B=(0,x.useCallback)(()=>{E(!0)},[]),V=(0,x.useCallback)(e=>{w(e),n&&E(!1)},[n]);(0,x.useEffect)(()=>{P&&(w({name:P.split(`/`).pop()??P,path:P,type:`file`}),n&&E(!1),F(null))},[n,P,F]),(0,x.useEffect)(()=>{I&&(r&&(r.path===I||r.path.startsWith(I+`/`))&&(w(null),n&&E(!0)),L(null))},[I,n,r,L]);function H(){N.current=0,M(!1)}function U(e){g(e.dataTransfer)&&(N.current+=1,M(!0))}function W(e){g(e.dataTransfer)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)}function G(e){g(e.dataTransfer)&&(N.current=Math.max(0,N.current-1),N.current===0&&M(!1))}function K(e){if(!g(e.dataTransfer))return;e.preventDefault(),H();let{files:t,skippedFolders:n}=te(e.dataTransfer);n>0&&u({title:`Folders skipped`,description:`Only files can be copied. Drop individual files instead of folders.`}),t.length!==0&&O({files:t,dirPath:``})}let q=(0,x.useCallback)((e,t)=>{N.current=0,M(!1),O({files:e,dirPath:t})},[]);async function J(){if(!(!D||!t||k)){A(!0);try{let{copied:e,failures:n}=await _(t,D.dirPath,D.files);e.length>0&&R(),u(ne(D,e.length,n))}finally{A(!1),O(null)}}}let Y={onDragEnter:U,onDragOver:W,onDragLeave:G,onDrop:K},X=j?(0,S.jsx)(`div`,{className:`pointer-events-none absolute inset-0 z-50 flex items-center justify-center bg-background/70`,children:(0,S.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border-2 border-dashed border-primary bg-background px-6 py-4`,children:[(0,S.jsx)(ee,{className:`h-4 w-4 text-primary`}),(0,S.jsx)(`span`,{className:i.label,children:`Drop files to copy them into the repository`})]})}):null,Z=(0,S.jsx)(s,{className:`h-full`,children:t?(0,S.jsx)(v,{threadId:t,children:(0,S.jsx)(b,{fallbackTitle:`Failed to load files`,children:(0,S.jsx)(x.Suspense,{fallback:(0,S.jsx)(m,{}),children:(0,S.jsx)(C,{instanceId:e,threadId:t,selectedPath:r?.path??null,onNodeSelect:z,onFilesDrop:q})})})}):(0,S.jsx)(`p`,{className:o(i.caption,`px-3 py-4 text-center`),children:`No thread selected.`})}),Q=(0,S.jsx)(x.Suspense,{fallback:(0,S.jsx)(l,{centered:!0,label:`Loading file viewer...`}),children:(0,S.jsx)(re,{selectedFile:r,showTreeBackButton:n&&!T,onShowTree:B,onFileCreated:V})}),$=(0,S.jsx)(f,{pendingDrop:D,dropCopying:k,onConfirm:()=>{J()},onDismiss:()=>{O(null)}});return n?(0,S.jsxs)(`div`,{className:`relative flex h-full flex-col overflow-hidden`,...Y,children:[X,$,(0,S.jsx)(`div`,{className:o(`flex-1 min-h-0 overflow-hidden`,!T&&`hidden`),children:Z}),(0,S.jsx)(`div`,{className:o(`flex-1 min-h-0 overflow-hidden`,T&&`hidden`),children:Q})]}):(0,S.jsxs)(`div`,{className:`relative flex h-full flex-col overflow-hidden`,...Y,children:[X,$,(0,S.jsxs)(p,{direction:`horizontal`,className:`flex-1 overflow-hidden`,children:[(0,S.jsx)(h,{defaultSize:25,minSize:15,maxSize:50,className:`overflow-hidden border-r border-border`,children:Z}),(0,S.jsx)(d,{withHandle:!0}),(0,S.jsx)(h,{className:`overflow-hidden`,children:Q})]})]})}export{w as default};
|