@workflow/web 4.0.1-beta.20 → 4.0.1-beta.21
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/fallback-build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +2 -2
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page/server-reference-manifest.json +17 -17
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page/server-reference-manifest.json +32 -17
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/run/[runId]/page/server-reference-manifest.json +32 -17
- package/.next/server/app/run/[runId]/page.js.nft.json +1 -1
- package/.next/server/app/run/[runId]/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1365a866._.js +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__1365a866._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__2168651f._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__2168651f._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__25c4ca9a._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__25c4ca9a._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__d416fa5e._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__d416fa5e._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__e576a2e1._.js +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__e576a2e1._.js.map +1 -1
- package/.next/server/chunks/ssr/_af28dabd._.js +1 -1
- package/.next/server/chunks/ssr/_af28dabd._.js.map +1 -1
- package/.next/server/chunks/ssr/_bff7cae2._.js +9 -0
- package/.next/server/chunks/ssr/_bff7cae2._.js.map +1 -0
- package/.next/server/chunks/ssr/_c8bf1458._.js +9 -0
- package/.next/server/chunks/ssr/_c8bf1458._.js.map +1 -0
- package/.next/server/chunks/ssr/{node_modules__pnpm_604882ab._.js → node_modules__pnpm_1053b681._.js} +2 -2
- package/.next/server/chunks/ssr/node_modules__pnpm_9ac28e5c._.js +3 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_9ac28e5c._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_c6ddcd47._.js +1 -1
- package/.next/server/chunks/ssr/node_modules__pnpm_c6ddcd47._.js.map +1 -1
- package/.next/server/chunks/ssr/node_modules__pnpm_ecc06f40._.js +3 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_ecc06f40._.js.map +1 -0
- package/.next/server/chunks/ssr/packages_web_src_app_page_tsx_cd282e82._.js +5 -1
- package/.next/server/chunks/ssr/packages_web_src_app_page_tsx_cd282e82._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_web_src_app_run_[runId]_page_tsx_c7d0b139._.js +6 -6
- package/.next/server/chunks/ssr/packages_web_src_app_run_[runId]_page_tsx_c7d0b139._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_web_src_components_ui_select_tsx_7c5238ef._.js +1 -1
- package/.next/server/chunks/ssr/packages_web_src_components_ui_select_tsx_7c5238ef._.js.map +1 -1
- package/.next/server/pages/500.html +2 -2
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +40 -18
- package/.next/static/chunks/080d73f6a8a7055f.js +1 -0
- package/.next/static/chunks/0bf0e3b66b375058.js +2 -0
- package/.next/static/chunks/1633a4677cb7eacd.js +7 -0
- package/.next/static/chunks/19288057adbbaf16.css +2 -0
- package/.next/static/chunks/7993564ea9cd3862.js +60 -0
- package/.next/static/chunks/826c531268249b18.js +1 -0
- package/.next/static/chunks/915c48af605695f8.js +5 -0
- package/.next/static/chunks/a2fdd31ef7d1ed50.js +154 -0
- package/.next/static/chunks/b39dd1bd2af229c0.css +3 -0
- package/.next/static/chunks/{f860cef1a19defc2.js → c41b2f1bfdc5f91e.js} +1 -1
- package/.next/static/chunks/d3781b000675e89a.js +7 -0
- package/.next/static/chunks/ebaf4c277606b4fc.js +14 -0
- package/.next/trace +1 -1
- package/.next/trace-build +1 -1
- package/package.json +4 -4
- package/.next/server/chunks/ssr/_5587a26a._.js +0 -3
- package/.next/server/chunks/ssr/_5587a26a._.js.map +0 -1
- package/.next/server/chunks/ssr/_905b4948._.js +0 -3
- package/.next/server/chunks/ssr/_905b4948._.js.map +0 -1
- package/.next/static/chunks/0ba5474f4ed4a8c8.js +0 -154
- package/.next/static/chunks/3cf543bacb44cfb5.js +0 -1
- package/.next/static/chunks/65a1beec565c5452.js +0 -1
- package/.next/static/chunks/74dc45834647aebe.css +0 -3
- package/.next/static/chunks/a6a14ee8e38e3e97.js +0 -14
- package/.next/static/chunks/e1532e8c78b14240.js +0 -1
- package/.next/static/chunks/e834043d5d00c377.js +0 -60
- package/.next/static/chunks/ed676821fd9c42fe.js +0 -1
- package/.next/static/chunks/f00878722fec5692.js +0 -2
- /package/.next/server/chunks/ssr/{node_modules__pnpm_604882ab._.js.map → node_modules__pnpm_1053b681._.js.map} +0 -0
- /package/.next/static/{kDel5ryx8YzI2wcHKGqt0 → 1Gd0u_mHFXgTr2DR4OTNR}/_buildManifest.js +0 -0
- /package/.next/static/{kDel5ryx8YzI2wcHKGqt0 → 1Gd0u_mHFXgTr2DR4OTNR}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{kDel5ryx8YzI2wcHKGqt0 → 1Gd0u_mHFXgTr2DR4OTNR}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,610062,349011,e=>{"use strict";e.i(113971);var t=e.i(686107);let r=function(){try{let e="nuqs-localStorage-test";if("undefined"==typeof localStorage)return!1;localStorage.setItem(e,e);let t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem("debug")||"").includes("nuqs")}catch{return!1}}();function n(e,...t){if(!r)return;let a=function(e,...t){return e.replace(/%[sfdO]/g,e=>{let r=t.shift();return"%O"===e&&r?JSON.stringify(r).replace(/"([^"]+)":/g,"$1:"):String(r)})}(e,...t);performance.mark(a);try{console.log(e,...t)}catch{console.log(a)}}function a(e,...t){r&&console.warn(e,...t)}let i={303:"Multiple adapter contexts detected. This might happen in monorepos.",404:"nuqs requires an adapter to work with your framework.",409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:"Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.",422:"Invalid options combination: `limitUrlUpdates: debounce` should be used in SSR scenarios, with `shallow: false`",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:"Empty search params cache. Search params can't be accessed in Layouts.",501:"Search params cache already populated. Have you called `parse` twice?"};function o(e){return`[nuqs] ${i[e]}
|
|
2
|
+
See https://nuqs.dev/NUQS-${e}`}function s(e){if(0===e.size)return"";let t=[];for(let[r,n]of e.entries()){let e=r.replace(/#/g,"%23").replace(/&/g,"%26").replace(/\+/g,"%2B").replace(/=/g,"%3D").replace(/\?/g,"%3F");t.push(`${e}=${n.replace(/%/g,"%25").replace(/\+/g,"%2B").replace(/ /g,"+").replace(/#/g,"%23").replace(/&/g,"%26").replace(/"/g,"%22").replace(/'/g,"%27").replace(/`/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/[\x00-\x1F]/g,e=>encodeURIComponent(e))}`)}return"?"+t.join("&")}let l=(0,t.createContext)({useAdapter(){throw Error(o(404))}});function c(e){return({children:r,defaultOptions:n,processUrlSearchParams:a,...i})=>(0,t.createElement)(l.Provider,{...i,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:a}},r)}function u(e){let r=(0,t.useContext)(l);if(!("useAdapter"in r))throw Error(o(404));return r.useAdapter(e)}l.displayName="NuqsAdapterContext",r&&"undefined"!=typeof window&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==l&&console.error(o(303)),window.__NuqsAdapterContext=l);let d=()=>(0,t.useContext)(l).defaultOptions,p=()=>(0,t.useContext)(l).processUrlSearchParams;function h(e){return{method:"throttle",timeMs:e}}function f(e){return{method:"debounce",timeMs:e}}e.s(["a",()=>p,"c",()=>n,"i",()=>d,"l",()=>a,"n",()=>c,"o",()=>s,"r",()=>u,"s",()=>o],349011);let m=h(function(){if("undefined"==typeof window||!window.GestureEvent)return 50;try{let e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}());function g(e){return null===e||Array.isArray(e)&&0===e.length}function y(e,t,r){if("string"==typeof e)r.set(t,e);else{for(let n of(r.delete(t),e))r.append(t,n);r.has(t)||r.set(t,"")}return r}function E(){let e=new Map;return{on(t,r){let n=e.get(t)||[];return n.push(r),e.set(t,n),()=>this.off(t,r)},off(t,r){let n=e.get(t);n&&e.set(t,n.filter(e=>e!==r))},emit(t,r){e.get(t)?.forEach(e=>e(r))}}}function b(e,t,r){let n=setTimeout(function(){e(),r.removeEventListener("abort",a)},t);function a(){clearTimeout(n),r.removeEventListener("abort",a)}r.addEventListener("abort",a)}function v(){let e=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let t=()=>{},r=()=>{};return{promise:new e((e,n)=>{t=e,r=n}),resolve:t,reject:r}}function T(){return new URLSearchParams(location.search)}var _=class{updateMap=new Map;options={history:"replace",scroll:!1,shallow:!0};timeMs=m.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:r},a=m.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),n("[nuqs gtq] Enqueueing %s=%s %O",e,t,r),this.updateMap.set(e,t),"push"===r.history&&(this.options.history="push"),r.scroll&&(this.options.scroll=!0),!1===r.shallow&&(this.options.shallow=!1),r.startTransition&&this.transitions.add(r.startTransition),(!Number.isFinite(this.timeMs)||a>this.timeMs)&&(this.timeMs=a)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=T}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=T,rateLimitFactor:t=1,...r},a){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return n("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=v();let i=()=>{this.lastFlushedAt=performance.now();let[t,n]=this.applyPendingUpdates({...r,autoResetQueueOnUpdate:r.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},a);null===n?(this.resolvers.resolve(t),this.resetQueueOnNextPush=!0):this.resolvers.reject(t),this.resolvers=null},o=()=>{let e=performance.now()-this.lastFlushedAt,r=this.timeMs,a=t*Math.max(0,r-e);n("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",a,r,t),0===a?i():b(i,a,this.controller.signal)};return b(o,0,this.controller.signal),this.resolvers.promise}abort(){return this.controller?.abort(),this.controller=new AbortController,this.resolvers?.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){let e=Array.from(this.updateMap.keys());return n("[nuqs gtq] Resetting queue %s",JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:"replace",scroll:!1,shallow:!0},this.timeMs=m.timeMs,e}applyPendingUpdates(e,t){let{updateUrl:r,getSearchParamsSnapshot:a}=e,i=a();if(n("[nuqs gtq] Applying %d pending update(s) on top of %s",this.updateMap.size,i.toString()),0===this.updateMap.size)return[i,null];let s=Array.from(this.updateMap.entries()),l={...this.options},c=Array.from(this.transitions);for(let[t,r]of(e.autoResetQueueOnUpdate&&this.reset(),n("[nuqs gtq] Flushing queue %O with options %O",s,l),s))null===r?i.delete(t):i=y(r,t,i);t&&(i=t(i));try{return!function(e,t){let r=t;for(let t=e.length-1;t>=0;t--){let n=e[t];if(!n)continue;let a=r;r=()=>n(a)}r()}(c,()=>{r(i,l)}),[i,null]}catch(e){return console.error(o(429),s.map(([e])=>e).join(),e),[i,e]}}};let A=new _;var k=class{callback;resolvers=v();controller=new AbortController;queuedValue=void 0;constructor(e){this.callback=e}abort(){this.controller.abort(),this.queuedValue=void 0}push(e,t){return this.queuedValue=e,this.controller.abort(),this.controller=new AbortController,b(()=>{let t=this.resolvers;try{n("[nuqs dq] Flushing debounce queue",e);let r=this.callback(e);n("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=v(),r.then(e=>t.resolve(e)).catch(e=>t.reject(e))}catch(e){this.queuedValue=void 0,t.reject(e)}},t,this.controller.signal),this.resolvers.promise}};let w=new class{throttleQueue;queues=new Map;queuedQuerySync=E();constructor(e=new _){this.throttleQueue=e}useQueuedQueries(e){var r,n;let a,i;return r=(e,t)=>this.queuedQuerySync.on(e,t),n=e=>this.getQueuedQuery(e),a=(0,t.useCallback)(()=>{let t=Object.fromEntries(e.map(e=>[e,n(e)]));return[JSON.stringify(t),t]},[e.join(","),n]),null===(i=(0,t.useRef)(null)).current&&(i.current=a()),(0,t.useSyncExternalStore)((0,t.useCallback)(t=>{let n=e.map(e=>r(e,t));return()=>n.forEach(e=>e())},[e.join(","),r]),()=>{let[e,t]=a();return i.current[0]===e?i.current[1]:(i.current=[e,t],t)},()=>i.current[1])}push(e,t,r,a){if(!Number.isFinite(t))return Promise.resolve((r.getSearchParamsSnapshot??T)());let i=e.key;if(!this.queues.has(i)){n("[nuqs dqc] Creating debounce queue for `%s`",i);let e=new k(e=>(this.throttleQueue.push(e),this.throttleQueue.flush(r,a).finally(()=>{this.queues.get(e.key)?.queuedValue===void 0&&(n("[nuqs dqc] Cleaning up empty queue for `%s`",e.key),this.queues.delete(e.key)),this.queuedQuerySync.emit(e.key)})));this.queues.set(i,e)}n("[nuqs dqc] Enqueueing debounce update %O",e);let o=this.queues.get(i).push(e,t);return this.queuedQuerySync.emit(i),o}abort(e){let t=this.queues.get(e);return t?(n("[nuqs dqc] Aborting debounce queue %s=%s",e,t.queuedValue?.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),e=>(e.then(t.resolvers.resolve,t.resolvers.reject),e)):e=>e}abortAll(){for(let[e,t]of this.queues.entries())n("[nuqs dqc] Aborting debounce queue %s=%s",e,t.queuedValue?.query),t.abort(),t.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(e);this.queues.clear()}getQueuedQuery(e){let t=this.queues.get(e)?.queuedValue?.query;return void 0!==t?t:this.throttleQueue.getQueuedQuery(e)}}(A);e.s(["a",()=>y,"c",()=>h,"i",()=>g,"n",()=>A,"o",()=>f,"r",()=>E,"s",()=>m,"t",()=>w],610062)},868924,(e,t,r)=>{t.exports=e.r(220096)},291967,e=>{"use strict";function t(e,r,{checkForDefaultPrevented:n=!0}={}){return function(t){if(e?.(t),!1===n||!t.defaultPrevented)return r?.(t)}}"undefined"!=typeof window&&window.document&&window.document.createElement,e.s(["composeEventHandlers",()=>t])},221588,e=>{"use strict";var t=e.i(686107);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return t=>{let n=!1,a=e.map(e=>{let a=r(e,t);return n||"function"!=typeof a||(n=!0),a});if(n)return()=>{for(let t=0;t<a.length;t++){let n=a[t];"function"==typeof n?n():r(e[t],null)}}}}function a(...e){return t.useCallback(n(...e),e)}e.s(["composeRefs",()=>n,"useComposedRefs",()=>a])},810096,e=>{"use strict";var t=e.i(686107),r=e.i(666426);function n(e,n){let a=t.createContext(n),i=e=>{let{children:n,...i}=e,o=t.useMemo(()=>i,Object.values(i));return(0,r.jsx)(a.Provider,{value:o,children:n})};return i.displayName=e+"Provider",[i,function(r){let i=t.useContext(a);if(i)return i;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${e}\``)}]}function a(e,n=[]){let i=[],o=()=>{let r=i.map(e=>t.createContext(e));return function(n){let a=n?.[e]||r;return t.useMemo(()=>({[`__scope${e}`]:{...n,[e]:a}}),[n,a])}};return o.scopeName=e,[function(n,a){let o=t.createContext(a),s=i.length;i=[...i,a];let l=n=>{let{scope:a,children:i,...l}=n,c=a?.[e]?.[s]||o,u=t.useMemo(()=>l,Object.values(l));return(0,r.jsx)(c.Provider,{value:u,children:i})};return l.displayName=n+"Provider",[l,function(r,i){let l=i?.[e]?.[s]||o,c=t.useContext(l);if(c)return c;if(void 0!==a)return a;throw Error(`\`${r}\` must be used within \`${n}\``)}]},function(...e){let r=e[0];if(1===e.length)return r;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let a=n.reduce((t,{useScope:r,scopeName:n})=>{let a=r(e)[`__scope${n}`];return{...t,...a}},{});return t.useMemo(()=>({[`__scope${r.scopeName}`]:a}),[a])}};return n.scopeName=r.scopeName,n}(o,...n)]}e.s(["createContext",()=>n,"createContextScope",()=>a])},545136,e=>{"use strict";var t=e.i(686107),r=e.i(221588),n=e.i(666426);function a(e){var a;let i,o=(a=e,(i=t.forwardRef((e,n)=>{let{children:a,...i}=e;if(t.isValidElement(a)){var o;let e,s,l=(o=a,(s=(e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(s=(e=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref),c=function(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}(i,a.props);return a.type!==t.Fragment&&(c.ref=n?(0,r.composeRefs)(n,l):l),t.cloneElement(a,c)}return t.Children.count(a)>1?t.Children.only(null):null})).displayName=`${a}.SlotClone`,i),l=t.forwardRef((e,r)=>{let{children:a,...i}=e,l=t.Children.toArray(a),c=l.find(s);if(c){let e=c.props.children,a=l.map(r=>r!==c?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,n.jsx)(o,{...i,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,a):null})}return(0,n.jsx)(o,{...i,ref:r,children:a})});return l.displayName=`${e}.Slot`,l}var i=Symbol("radix.slottable");function o(e){let t=({children:e})=>(0,n.jsx)(n.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=i,t}function s(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===i}e.s(["createSlot",()=>a,"createSlottable",()=>o])},692792,852947,e=>{"use strict";var t=e.i(686107),r=e.i(571577),n=e.i(545136),a=e.i(666426),i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{let i=(0,n.createSlot)(`Primitive.${r}`),o=t.forwardRef((e,t)=>{let{asChild:n,...o}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,a.jsx)(n?i:r,{...o,ref:t})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{});function o(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}function s(e){let r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>r.current?.(...e),[])}e.s(["Primitive",()=>i,"dispatchDiscreteCustomEvent",()=>o],692792),e.s(["useCallbackRef",()=>s],852947)},975287,e=>{"use strict";var t,r=e.i(686107),n=e.i(291967),a=e.i(692792),i=e.i(221588),o=e.i(852947),s=e.i(666426),l="dismissableLayer.update",c=r.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),u=r.forwardRef((e,u)=>{let{disableOutsidePointerEvents:h=!1,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:y,onDismiss:E,...b}=e,v=r.useContext(c),[T,_]=r.useState(null),A=T?.ownerDocument??globalThis?.document,[,k]=r.useState({}),w=(0,i.useComposedRefs)(u,e=>_(e)),x=Array.from(v.layers),[S]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),C=x.indexOf(S),N=T?x.indexOf(T):-1,I=v.layersWithOutsidePointerEventsDisabled.size>0,R=N>=C,D=function(e,t=globalThis?.document){let n=(0,o.useCallbackRef)(e),a=r.useRef(!1),i=r.useRef(()=>{});return r.useEffect(()=>{let e=e=>{if(e.target&&!a.current){let r=function(){p("dismissableLayer.pointerDownOutside",n,a,{discrete:!0})},a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=r,t.addEventListener("click",i.current,{once:!0})):r()}else t.removeEventListener("click",i.current);a.current=!1},r=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(r),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}(e=>{let t=e.target,r=[...v.branches].some(e=>e.contains(t));R&&!r&&(m?.(e),y?.(e),e.defaultPrevented||E?.())},A),L=function(e,t=globalThis?.document){let n=(0,o.useCallbackRef)(e),a=r.useRef(!1);return r.useEffect(()=>{let e=e=>{e.target&&!a.current&&p("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}(e=>{let t=e.target;![...v.branches].some(e=>e.contains(t))&&(g?.(e),y?.(e),e.defaultPrevented||E?.())},A);return!function(e,t=globalThis?.document){let n=(0,o.useCallbackRef)(e);r.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{N===v.layers.size-1&&(f?.(e),!e.defaultPrevented&&E&&(e.preventDefault(),E()))},A),r.useEffect(()=>{if(T)return h&&(0===v.layersWithOutsidePointerEventsDisabled.size&&(t=A.body.style.pointerEvents,A.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(T)),v.layers.add(T),d(),()=>{h&&1===v.layersWithOutsidePointerEventsDisabled.size&&(A.body.style.pointerEvents=t)}},[T,A,h,v]),r.useEffect(()=>()=>{T&&(v.layers.delete(T),v.layersWithOutsidePointerEventsDisabled.delete(T),d())},[T,v]),r.useEffect(()=>{let e=()=>k({});return document.addEventListener(l,e),()=>document.removeEventListener(l,e)},[]),(0,s.jsx)(a.Primitive.div,{...b,ref:w,style:{pointerEvents:I?R?"auto":"none":void 0,...e.style},onFocusCapture:(0,n.composeEventHandlers)(e.onFocusCapture,L.onFocusCapture),onBlurCapture:(0,n.composeEventHandlers)(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:(0,n.composeEventHandlers)(e.onPointerDownCapture,D.onPointerDownCapture)})});function d(){let e=new CustomEvent(l);document.dispatchEvent(e)}function p(e,t,r,{discrete:n}){let i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?(0,a.dispatchDiscreteCustomEvent)(i,o):i.dispatchEvent(o)}u.displayName="DismissableLayer",r.forwardRef((e,t)=>{let n=r.useContext(c),o=r.useRef(null),l=(0,i.useComposedRefs)(t,o);return r.useEffect(()=>{let e=o.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,s.jsx)(a.Primitive.div,{...e,ref:l})}).displayName="DismissableLayerBranch",e.s(["DismissableLayer",()=>u],975287)},244107,225088,e=>{"use strict";var t=e.i(686107),r=globalThis?.document?t.useLayoutEffect:()=>{};e.s(["useLayoutEffect",()=>r],225088);var n=t[" useId ".trim().toString()]||(()=>void 0),a=0;function i(e){let[i,o]=t.useState(n());return r(()=>{e||o(e=>e??String(a++))},[e]),e||(i?`radix-${i}`:"")}e.s(["useId",()=>i],244107)},50346,422957,e=>{"use strict";let t=["top","right","bottom","left"],r=t.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]),n=Math.min,a=Math.max,i=Math.round,o=Math.floor,s=e=>({x:e,y:e}),l={left:"right",right:"left",bottom:"top",top:"bottom"},c={start:"end",end:"start"};function u(e,t){return"function"==typeof e?e(t):e}function d(e){return e.split("-")[0]}function p(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function f(e){return"y"===e?"height":"width"}let m=new Set(["top","bottom"]);function g(e){return m.has(d(e))?"y":"x"}function y(e,t,r){void 0===r&&(r=!1);let n=p(e),a=h(g(e)),i=f(a),o="x"===a?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=A(o)),[o,A(o)]}function E(e){return e.replace(/start|end/g,e=>c[e])}let b=["left","right"],v=["right","left"],T=["top","bottom"],_=["bottom","top"];function A(e){return e.replace(/left|right|bottom|top/g,e=>l[e])}function k(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function w(e){let{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function x(e,t,r){let n,{reference:a,floating:i}=e,o=g(t),s=h(g(t)),l=f(s),c=d(t),u="y"===o,m=a.x+a.width/2-i.width/2,y=a.y+a.height/2-i.height/2,E=a[l]/2-i[l]/2;switch(c){case"top":n={x:m,y:a.y-i.height};break;case"bottom":n={x:m,y:a.y+a.height};break;case"right":n={x:a.x+a.width,y:y};break;case"left":n={x:a.x-i.width,y:y};break;default:n={x:a.x,y:a.y}}switch(p(t)){case"start":n[s]-=E*(r&&u?-1:1);break;case"end":n[s]+=E*(r&&u?-1:1)}return n}let S=async(e,t,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:o}=r,s=i.filter(Boolean),l=await (null==o.isRTL?void 0:o.isRTL(t)),c=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=x(c,n,l),p=n,h={},f=0;for(let r=0;r<s.length;r++){let{name:i,fn:m}=s[r],{x:g,y:y,data:E,reset:b}=await m({x:u,y:d,initialPlacement:n,placement:p,strategy:a,middlewareData:h,rects:c,platform:o,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,h={...h,[i]:{...h[i],...E}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await o.getElementRects({reference:e,floating:t,strategy:a}):b.rects),{x:u,y:d}=x(c,p,l)),r=-1)}return{x:u,y:d,placement:p,strategy:a,middlewareData:h}};async function C(e,t){var r;void 0===t&&(t={});let{x:n,y:a,platform:i,rects:o,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:f=0}=u(t,e),m=k(f),g=s[h?"floating"===p?"reference":"floating":p],y=w(await i.getClippingRect({element:null==(r=await (null==i.isElement?void 0:i.isElement(g)))||r?g:g.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),E="floating"===p?{x:n,y:a,width:o.floating.width,height:o.floating.height}:o.reference,b=await (null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),v=await (null==i.isElement?void 0:i.isElement(b))&&await (null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},T=w(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:E,offsetParent:b,strategy:l}):E);return{top:(y.top-T.top+m.top)/v.y,bottom:(T.bottom-y.bottom+m.bottom)/v.y,left:(y.left-T.left+m.left)/v.x,right:(T.right-y.right+m.right)/v.x}}function N(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function I(e){return t.some(t=>e[t]>=0)}function R(e){let t=n(...e.map(e=>e.left)),r=n(...e.map(e=>e.top));return{x:t,y:r,width:a(...e.map(e=>e.right))-t,height:a(...e.map(e=>e.bottom))-r}}let D=new Set(["left","top"]);async function L(e,t){let{placement:r,platform:n,elements:a}=e,i=await (null==n.isRTL?void 0:n.isRTL(a.floating)),o=d(r),s=p(r),l="y"===g(r),c=D.has(o)?-1:1,h=i&&l?-1:1,f=u(t,e),{mainAxis:m,crossAxis:y,alignmentAxis:E}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&"number"==typeof E&&(y="end"===s?-1*E:E),l?{x:y*h,y:m*c}:{x:m*c,y:y*h}}function O(){return"undefined"!=typeof window}function P(e){return B(e)?(e.nodeName||"").toLowerCase():"#document"}function M(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function F(e){var t;return null==(t=(B(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function B(e){return!!O()&&(e instanceof Node||e instanceof M(e).Node)}function j(e){return!!O()&&(e instanceof Element||e instanceof M(e).Element)}function U(e){return!!O()&&(e instanceof HTMLElement||e instanceof M(e).HTMLElement)}function H(e){return!!O()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof M(e).ShadowRoot)}let G=new Set(["inline","contents"]);function $(e){let{overflow:t,overflowX:r,overflowY:n,display:a}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!G.has(a)}let z=new Set(["table","td","th"]),W=[":popover-open",":modal"];function q(e){return W.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let V=["transform","translate","scale","rotate","perspective"],Y=["transform","translate","scale","rotate","perspective","filter"],Q=["paint","layout","strict","content"];function K(e){let t=X(),r=j(e)?ee(e):e;return V.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||Y.some(e=>(r.willChange||"").includes(e))||Q.some(e=>(r.contain||"").includes(e))}function X(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let J=new Set(["html","body","#document"]);function Z(e){return J.has(P(e))}function ee(e){return M(e).getComputedStyle(e)}function et(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function er(e){if("html"===P(e))return e;let t=e.assignedSlot||e.parentNode||H(e)&&e.host||F(e);return H(t)?t.host:t}function en(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let a=function e(t){let r=er(t);return Z(r)?t.ownerDocument?t.ownerDocument.body:t.body:U(r)&&$(r)?r:e(r)}(e),i=a===(null==(n=e.ownerDocument)?void 0:n.body),o=M(a);if(i){let e=ea(o);return t.concat(o,o.visualViewport||[],$(a)?a:[],e&&r?en(e):[])}return t.concat(a,en(a,[],r))}function ea(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ei(e){let t=ee(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=U(e),o=a?e.offsetWidth:r,s=a?e.offsetHeight:n,l=i(r)!==o||i(n)!==s;return l&&(r=o,n=s),{width:r,height:n,$:l}}function eo(e){return j(e)?e:e.contextElement}function es(e){let t=eo(e);if(!U(t))return s(1);let r=t.getBoundingClientRect(),{width:n,height:a,$:o}=ei(t),l=(o?i(r.width):r.width)/n,c=(o?i(r.height):r.height)/a;return l&&Number.isFinite(l)||(l=1),c&&Number.isFinite(c)||(c=1),{x:l,y:c}}let el=s(0);function ec(e){let t=M(e);return X()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:el}function eu(e,t,r,n){var a;void 0===t&&(t=!1),void 0===r&&(r=!1);let i=e.getBoundingClientRect(),o=eo(e),l=s(1);t&&(n?j(n)&&(l=es(n)):l=es(e));let c=(void 0===(a=r)&&(a=!1),n&&(!a||n===M(o))&&a)?ec(o):s(0),u=(i.left+c.x)/l.x,d=(i.top+c.y)/l.y,p=i.width/l.x,h=i.height/l.y;if(o){let e=M(o),t=n&&j(n)?M(n):n,r=e,a=ea(r);for(;a&&n&&t!==r;){let e=es(a),t=a.getBoundingClientRect(),n=ee(a),i=t.left+(a.clientLeft+parseFloat(n.paddingLeft))*e.x,o=t.top+(a.clientTop+parseFloat(n.paddingTop))*e.y;u*=e.x,d*=e.y,p*=e.x,h*=e.y,u+=i,d+=o,a=ea(r=M(a))}}return w({width:p,height:h,x:u,y:d})}function ed(e,t){let r=et(e).scrollLeft;return t?t.left+r:eu(F(e)).left+r}function ep(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-ed(e,r),y:r.top+t.scrollTop}}let eh=new Set(["absolute","fixed"]);function ef(e,t,r){var n;let i;if("viewport"===t)i=function(e,t){let r=M(e),n=F(e),a=r.visualViewport,i=n.clientWidth,o=n.clientHeight,s=0,l=0;if(a){i=a.width,o=a.height;let e=X();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}let c=ed(n);if(c<=0){let e=n.ownerDocument,t=e.body,r=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,o=Math.abs(n.clientWidth-t.clientWidth-a);o<=25&&(i-=o)}else c<=25&&(i+=c);return{width:i,height:o,x:s,y:l}}(e,r);else if("document"===t){let t,r,o,s,l,c,u;n=F(e),t=F(n),r=et(n),o=n.ownerDocument.body,s=a(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=a(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),c=-r.scrollLeft+ed(n),u=-r.scrollTop,"rtl"===ee(o).direction&&(c+=a(t.clientWidth,o.clientWidth)-s),i={width:s,height:l,x:c,y:u}}else if(j(t)){let e,n,a,o,l,c;n=(e=eu(t,!0,"fixed"===r)).top+t.clientTop,a=e.left+t.clientLeft,o=U(t)?es(t):s(1),l=t.clientWidth*o.x,c=t.clientHeight*o.y,i={width:l,height:c,x:a*o.x,y:n*o.y}}else{let r=ec(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return w(i)}function em(e){return"static"===ee(e).position}function eg(e,t){if(!U(e)||"fixed"===ee(e).position)return null;if(t)return t(e);let r=e.offsetParent;return F(e)===r&&(r=r.ownerDocument.body),r}function ey(e,t){var r;let n=M(e);if(q(e))return n;if(!U(e)){let t=er(e);for(;t&&!Z(t);){if(j(t)&&!em(t))return t;t=er(t)}return n}let a=eg(e,t);for(;a&&(r=a,z.has(P(r)))&&em(a);)a=eg(a,t);return a&&Z(a)&&em(a)&&!K(a)?n:a||function(e){let t=er(e);for(;U(t)&&!Z(t);){if(K(t))return t;if(q(t))break;t=er(t)}return null}(e)||n}let eE=async function(e){let t=this.getOffsetParent||ey,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=U(t),a=F(t),i="fixed"===r,o=eu(e,!0,i,t),l={scrollLeft:0,scrollTop:0},c=s(0);if(n||!n&&!i)if(("body"!==P(t)||$(a))&&(l=et(t)),n){let e=eu(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else a&&(c.x=ed(a));i&&!n&&a&&(c.x=ed(a));let u=!a||n||i?s(0):ep(a,l);return{x:o.left+l.scrollLeft-c.x-u.x,y:o.top+l.scrollTop-c.y-u.y,width:o.width,height:o.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},eb={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e,i="fixed"===a,o=F(n),l=!!t&&q(t.floating);if(n===o||l&&i)return r;let c={scrollLeft:0,scrollTop:0},u=s(1),d=s(0),p=U(n);if((p||!p&&!i)&&(("body"!==P(n)||$(o))&&(c=et(n)),U(n))){let e=eu(n);u=es(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}let h=!o||p||i?s(0):ep(o,c);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:r.y*u.y-c.scrollTop*u.y+d.y+h.y}},getDocumentElement:F,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:i,strategy:o}=e,s=[..."clippingAncestors"===r?q(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=en(e,[],!1).filter(e=>j(e)&&"body"!==P(e)),a=null,i="fixed"===ee(e).position,o=i?er(e):e;for(;j(o)&&!Z(o);){let t=ee(o),r=K(o);r||"fixed"!==t.position||(a=null),(i?!r&&!a:!r&&"static"===t.position&&!!a&&eh.has(a.position)||$(o)&&!r&&function e(t,r){let n=er(t);return!(n===r||!j(n)||Z(n))&&("fixed"===ee(n).position||e(n,r))}(e,o))?n=n.filter(e=>e!==o):a=t,o=er(o)}return t.set(e,n),n}(t,this._c):[].concat(r),i],l=s[0],c=s.reduce((e,r)=>{let i=ef(t,r,o);return e.top=a(i.top,e.top),e.right=n(i.right,e.right),e.bottom=n(i.bottom,e.bottom),e.left=a(i.left,e.left),e},ef(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:ey,getElementRects:eE,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=ei(e);return{width:t,height:r}},getScale:es,isElement:j,isRTL:function(e){return"rtl"===ee(e).direction}};function ev(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eT(e,t,r,i){let s;void 0===i&&(i={});let{ancestorScroll:l=!0,ancestorResize:c=!0,elementResize:u="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:p=!1}=i,h=eo(e),f=l||c?[...h?en(h):[],...en(t)]:[];f.forEach(e=>{l&&e.addEventListener("scroll",r,{passive:!0}),c&&e.addEventListener("resize",r)});let m=h&&d?function(e,t){let r,i=null,s=F(e);function l(){var e;clearTimeout(r),null==(e=i)||e.disconnect(),i=null}return!function c(u,d){void 0===u&&(u=!1),void 0===d&&(d=1),l();let p=e.getBoundingClientRect(),{left:h,top:f,width:m,height:g}=p;if(u||t(),!m||!g)return;let y={rootMargin:-o(f)+"px "+-o(s.clientWidth-(h+m))+"px "+-o(s.clientHeight-(f+g))+"px "+-o(h)+"px",threshold:a(0,n(1,d))||1},E=!0;function b(t){let n=t[0].intersectionRatio;if(n!==d){if(!E)return c();n?c(!1,n):r=setTimeout(()=>{c(!1,1e-7)},1e3)}1!==n||ev(p,e.getBoundingClientRect())||c(),E=!1}try{i=new IntersectionObserver(b,{...y,root:s.ownerDocument})}catch(e){i=new IntersectionObserver(b,y)}i.observe(e)}(!0),l}(h,r):null,g=-1,y=null;u&&(y=new ResizeObserver(e=>{let[n]=e;n&&n.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),r()}),h&&!p&&y.observe(h),y.observe(t));let E=p?eu(e):null;return p&&function t(){let n=eu(e);E&&!ev(E,n)&&r(),E=n,s=requestAnimationFrame(t)}(),r(),()=>{var e;f.forEach(e=>{l&&e.removeEventListener("scroll",r),c&&e.removeEventListener("resize",r)}),null==m||m(),null==(e=y)||e.disconnect(),y=null,p&&cancelAnimationFrame(s)}}let e_=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:a,y:i,placement:o,middlewareData:s}=t,l=await L(t,e);return o===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:a+l.x,y:i+l.y,data:{...l,placement:o}}}}},eA=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,a,i,o;let{rects:s,middlewareData:l,placement:c,platform:h,elements:f}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:b=r,autoAlignment:v=!0,...T}=u(e,t),_=void 0!==g||b===r?((o=g||null)?[...b.filter(e=>p(e)===o),...b.filter(e=>p(e)!==o)]:b.filter(e=>d(e)===e)).filter(e=>!o||p(e)===o||!!v&&E(e)!==e):b,A=await C(t,T),k=(null==(n=l.autoPlacement)?void 0:n.index)||0,w=_[k];if(null==w)return{};let x=y(w,s,await (null==h.isRTL?void 0:h.isRTL(f.floating)));if(c!==w)return{reset:{placement:_[0]}};let S=[A[d(w)],A[x[0]],A[x[1]]],N=[...(null==(a=l.autoPlacement)?void 0:a.overflows)||[],{placement:w,overflows:S}],I=_[k+1];if(I)return{data:{index:k+1,overflows:N},reset:{placement:I}};let R=N.map(e=>{let t=p(e.placement);return[e.placement,t&&m?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),D=(null==(i=R.filter(e=>e[2].slice(0,p(e[0])?2:3).every(e=>e<=0))[0])?void 0:i[0])||R[0][0];return D!==c?{data:{index:k+1,overflows:N},reset:{placement:D}}:{}}}},ek=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:i,placement:o}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...p}=u(e,t),f={x:r,y:i},m=await C(t,p),y=g(d(o)),E=h(y),b=f[E],v=f[y];if(s){let e="y"===E?"top":"left",t="y"===E?"bottom":"right",r=b+m[e],i=b-m[t];b=a(r,n(b,i))}if(l){let e="y"===y?"top":"left",t="y"===y?"bottom":"right",r=v+m[e],i=v-m[t];v=a(r,n(v,i))}let T=c.fn({...t,[E]:b,[y]:v});return{...T,data:{x:T.x-r,y:T.y-i,enabled:{[E]:s,[y]:l}}}}}},ew=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n,a,i,o;let s,l,c,{placement:h,middlewareData:f,rects:m,initialPlacement:k,platform:w,elements:x}=t,{mainAxis:S=!0,crossAxis:N=!0,fallbackPlacements:I,fallbackStrategy:R="bestFit",fallbackAxisSideDirection:D="none",flipAlignment:L=!0,...O}=u(e,t);if(null!=(r=f.arrow)&&r.alignmentOffset)return{};let P=d(h),M=g(k),F=d(k)===k,B=await (null==w.isRTL?void 0:w.isRTL(x.floating)),j=I||(F||!L?[A(k)]:(s=A(k),[E(k),s,E(s)])),U="none"!==D;!I&&U&&j.push(...(l=p(k),c=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?v:b;return t?b:v;case"left":case"right":return t?T:_;default:return[]}}(d(k),"start"===D,B),l&&(c=c.map(e=>e+"-"+l),L&&(c=c.concat(c.map(E)))),c));let H=[k,...j],G=await C(t,O),$=[],z=(null==(n=f.flip)?void 0:n.overflows)||[];if(S&&$.push(G[P]),N){let e=y(h,m,B);$.push(G[e[0]],G[e[1]])}if(z=[...z,{placement:h,overflows:$}],!$.every(e=>e<=0)){let e=((null==(a=f.flip)?void 0:a.index)||0)+1,t=H[e];if(t&&("alignment"!==N||M===g(t)||z.every(e=>g(e.placement)!==M||e.overflows[0]>0)))return{data:{index:e,overflows:z},reset:{placement:t}};let r=null==(i=z.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!r)switch(R){case"bestFit":{let e=null==(o=z.filter(e=>{if(U){let t=g(e.placement);return t===M||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0];e&&(r=e);break}case"initialPlacement":r=k}if(h!==r)return{reset:{placement:r}}}return{}}}},ex=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,i;let o,s,{placement:l,rects:c,platform:h,elements:f}=t,{apply:m=()=>{},...y}=u(e,t),E=await C(t,y),b=d(l),v=p(l),T="y"===g(l),{width:_,height:A}=c.floating;"top"===b||"bottom"===b?(o=b,s=v===(await (null==h.isRTL?void 0:h.isRTL(f.floating))?"start":"end")?"left":"right"):(s=b,o="end"===v?"top":"bottom");let k=A-E.top-E.bottom,w=_-E.left-E.right,x=n(A-E[o],k),S=n(_-E[s],w),N=!t.middlewareData.shift,I=x,R=S;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(R=w),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(I=k),N&&!v){let e=a(E.left,0),t=a(E.right,0),r=a(E.top,0),n=a(E.bottom,0);T?R=_-2*(0!==e||0!==t?e+t:a(E.left,E.right)):I=A-2*(0!==r||0!==n?r+n:a(E.top,E.bottom))}await m({...t,availableWidth:R,availableHeight:I});let D=await h.getDimensions(f.floating);return _!==D.width||A!==D.height?{reset:{rects:!0}}:{}}}},eS=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...a}=u(e,t);switch(n){case"referenceHidden":{let e=N(await C(t,{...a,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:I(e)}}}case"escaped":{let e=N(await C(t,{...a,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:I(e)}}}default:return{}}}}},eC=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:i,placement:o,rects:s,platform:l,elements:c,middlewareData:d}=t,{element:m,padding:y=0}=u(e,t)||{};if(null==m)return{};let E=k(y),b={x:r,y:i},v=h(g(o)),T=f(v),_=await l.getDimensions(m),A="y"===v,w=A?"clientHeight":"clientWidth",x=s.reference[T]+s.reference[v]-b[v]-s.floating[T],S=b[v]-s.reference[v],C=await (null==l.getOffsetParent?void 0:l.getOffsetParent(m)),N=C?C[w]:0;N&&await (null==l.isElement?void 0:l.isElement(C))||(N=c.floating[w]||s.floating[T]);let I=N/2-_[T]/2-1,R=n(E[A?"top":"left"],I),D=n(E[A?"bottom":"right"],I),L=N-_[T]-D,O=N/2-_[T]/2+(x/2-S/2),P=a(R,n(O,L)),M=!d.arrow&&null!=p(o)&&O!==P&&s.reference[T]/2-(O<R?R:D)-_[T]/2<0,F=M?O<R?O-R:O-L:0;return{[v]:b[v]+F,data:{[v]:P,centerOffset:O-P-F,...M&&{alignmentOffset:F}},reset:M}}}),eN=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){let{placement:r,elements:i,rects:o,platform:s,strategy:l}=t,{padding:c=2,x:p,y:h}=u(e,t),f=Array.from(await (null==s.getClientRects?void 0:s.getClientRects(i.reference))||[]),m=function(e){let t=e.slice().sort((e,t)=>e.y-t.y),r=[],n=null;for(let e=0;e<t.length;e++){let a=t[e];!n||a.y-n.y>n.height/2?r.push([a]):r[r.length-1].push(a),n=a}return r.map(e=>w(R(e)))}(f),y=w(R(f)),E=k(c),b=await s.getElementRects({reference:{getBoundingClientRect:function(){if(2===m.length&&m[0].left>m[1].right&&null!=p&&null!=h)return m.find(e=>p>e.left-E.left&&p<e.right+E.right&&h>e.top-E.top&&h<e.bottom+E.bottom)||y;if(m.length>=2){if("y"===g(r)){let e=m[0],t=m[m.length-1],n="top"===d(r),a=e.top,i=t.bottom,o=n?e.left:t.left,s=n?e.right:t.right;return{top:a,bottom:i,left:o,right:s,width:s-o,height:i-a,x:o,y:a}}let e="left"===d(r),t=a(...m.map(e=>e.right)),i=n(...m.map(e=>e.left)),o=m.filter(r=>e?r.left===i:r.right===t),s=o[0].top,l=o[o.length-1].bottom;return{top:s,bottom:l,left:i,right:t,width:t-i,height:l-s,x:i,y:s}}return y}},floating:i.floating,strategy:l});return o.reference.x!==b.reference.x||o.reference.y!==b.reference.y||o.reference.width!==b.reference.width||o.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}},eI=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:a,rects:i,middlewareData:o}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=u(e,t),p={x:r,y:n},f=g(a),m=h(f),y=p[m],E=p[f],b=u(s,t),v="number"==typeof b?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){let e="y"===m?"height":"width",t=i.reference[m]-i.floating[e]+v.mainAxis,r=i.reference[m]+i.reference[e]-v.mainAxis;y<t?y=t:y>r&&(y=r)}if(c){var T,_;let e="y"===m?"width":"height",t=D.has(d(a)),r=i.reference[f]-i.floating[e]+(t&&(null==(T=o.offset)?void 0:T[f])||0)+(t?0:v.crossAxis),n=i.reference[f]+i.reference[e]+(t?0:(null==(_=o.offset)?void 0:_[f])||0)-(t?v.crossAxis:0);E<r?E=r:E>n&&(E=n)}return{[m]:y,[f]:E}}}},eR=(e,t,r)=>{let n=new Map,a={platform:eb,...r},i={...a.platform,_c:n};return S(e,t,{...a,platform:i})};e.s(["arrow",()=>eC,"autoPlacement",()=>eA,"autoUpdate",()=>eT,"computePosition",()=>eR,"flip",()=>ew,"hide",()=>eS,"inline",()=>eN,"limitShift",()=>eI,"offset",()=>e_,"shift",()=>ek,"size",()=>ex],422957);var eD=e.i(686107),eL=e.i(571577),eO="undefined"!=typeof document?eD.useLayoutEffect:function(){};function eP(e,t){let r,n,a;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!eP(e[n],t[n]))return!1;return!0}if((r=(a=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,a[n]))return!1;for(n=r;0!=n--;){let r=a[n];if(("_owner"!==r||!e.$$typeof)&&!eP(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function eM(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eF(e,t){let r=eM(e);return Math.round(t*r)/r}function eB(e){let t=eD.useRef(e);return eO(()=>{t.current=e}),t}function ej(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:i,floating:o}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=eD.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=eD.useState(n);eP(p,n)||h(n);let[f,m]=eD.useState(null),[g,y]=eD.useState(null),E=eD.useCallback(e=>{e!==_.current&&(_.current=e,m(e))},[]),b=eD.useCallback(e=>{e!==A.current&&(A.current=e,y(e))},[]),v=i||f,T=o||g,_=eD.useRef(null),A=eD.useRef(null),k=eD.useRef(u),w=null!=l,x=eB(l),S=eB(a),C=eB(c),N=eD.useCallback(()=>{if(!_.current||!A.current)return;let e={placement:t,strategy:r,middleware:p};S.current&&(e.platform=S.current),eR(_.current,A.current,e).then(e=>{let t={...e,isPositioned:!1!==C.current};I.current&&!eP(k.current,t)&&(k.current=t,eL.flushSync(()=>{d(t)}))})},[p,t,r,S,C]);eO(()=>{!1===c&&k.current.isPositioned&&(k.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);let I=eD.useRef(!1);eO(()=>(I.current=!0,()=>{I.current=!1}),[]),eO(()=>{if(v&&(_.current=v),T&&(A.current=T),v&&T){if(x.current)return x.current(v,T,N);N()}},[v,T,N,x,w]);let R=eD.useMemo(()=>({reference:_,floating:A,setReference:E,setFloating:b}),[E,b]),D=eD.useMemo(()=>({reference:v,floating:T}),[v,T]),L=eD.useMemo(()=>{let e={position:r,left:0,top:0};if(!D.floating)return e;let t=eF(D.floating,u.x),n=eF(D.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...eM(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,s,D.floating,u.x,u.y]);return eD.useMemo(()=>({...u,update:N,refs:R,elements:D,floatingStyles:L}),[u,N,R,D,L])}let eU=(e,t)=>({...e_(e),options:[e,t]}),eH=(e,t)=>({...ek(e),options:[e,t]}),eG=(e,t)=>({...eI(e),options:[e,t]}),e$=(e,t)=>({...ew(e),options:[e,t]}),ez=(e,t)=>({...ex(e),options:[e,t]}),eW=(e,t)=>({...eS(e),options:[e,t]}),eq=(e,t)=>({name:"arrow",options:e,fn(t){let{element:r,padding:n}="function"==typeof e?e(t):e;return r&&({}).hasOwnProperty.call(r,"current")?null!=r.current?eC({element:r.current,padding:n}).fn(t):{}:r?eC({element:r,padding:n}).fn(t):{}},options:[e,t]});e.s(["arrow",()=>eq,"flip",()=>e$,"hide",()=>eW,"limitShift",()=>eG,"offset",()=>eU,"shift",()=>eH,"size",()=>ez,"useFloating",()=>ej],50346)},509377,153840,e=>{"use strict";var t=e.i(686107),r=e.i(50346),n=e.i(422957),a=e.i(692792),i=e.i(666426),o=t.forwardRef((e,t)=>{let{children:r,width:n=10,height:o=5,...s}=e;return(0,i.jsx)(a.Primitive.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,i.jsx)("polygon",{points:"0,0 30,0 15,10"})})});o.displayName="Arrow";var s=e.i(221588),l=e.i(810096),c=e.i(852947),u=e.i(225088),d="Popper",[p,h]=(0,l.createContextScope)(d),[f,m]=p(d),g=e=>{let{__scopePopper:r,children:n}=e,[a,o]=t.useState(null);return(0,i.jsx)(f,{scope:r,anchor:a,onAnchorChange:o,children:n})};g.displayName=d;var y="PopperAnchor",E=t.forwardRef((e,r)=>{let{__scopePopper:n,virtualRef:o,...l}=e,c=m(y,n),u=t.useRef(null),d=(0,s.useComposedRefs)(r,u),p=t.useRef(null);return t.useEffect(()=>{let e=p.current;p.current=o?.current||u.current,e!==p.current&&c.onAnchorChange(p.current)}),o?null:(0,i.jsx)(a.Primitive.div,{...l,ref:d})});E.displayName=y;var b="PopperContent",[v,T]=p(b),_=t.forwardRef((e,o)=>{let{__scopePopper:l,side:d="bottom",sideOffset:p=0,align:h="center",alignOffset:f=0,arrowPadding:g=0,avoidCollisions:y=!0,collisionBoundary:E=[],collisionPadding:T=0,sticky:_="partial",hideWhenDetached:A=!1,updatePositionStrategy:k="optimized",onPlaced:w,...N}=e,I=m(b,l),[R,D]=t.useState(null),L=(0,s.useComposedRefs)(o,e=>D(e)),[O,P]=t.useState(null),M=function(e){let[r,n]=t.useState(void 0);return(0,u.useLayoutEffect)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,a;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,a=t.blockSize}else r=e.offsetWidth,a=e.offsetHeight;n({width:r,height:a})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),r}(O),F=M?.width??0,B=M?.height??0,j="number"==typeof T?T:{top:0,right:0,bottom:0,left:0,...T},U=Array.isArray(E)?E:[E],H=U.length>0,G={padding:j,boundary:U.filter(x),altBoundary:H},{refs:$,floatingStyles:z,placement:W,isPositioned:q,middlewareData:V}=(0,r.useFloating)({strategy:"fixed",placement:d+("center"!==h?"-"+h:""),whileElementsMounted:(...e)=>(0,n.autoUpdate)(...e,{animationFrame:"always"===k}),elements:{reference:I.anchor},middleware:[(0,r.offset)({mainAxis:p+B,alignmentAxis:f}),y&&(0,r.shift)({mainAxis:!0,crossAxis:!1,limiter:"partial"===_?(0,r.limitShift)():void 0,...G}),y&&(0,r.flip)({...G}),(0,r.size)({...G,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:a,height:i}=t.reference,o=e.floating.style;o.setProperty("--radix-popper-available-width",`${r}px`),o.setProperty("--radix-popper-available-height",`${n}px`),o.setProperty("--radix-popper-anchor-width",`${a}px`),o.setProperty("--radix-popper-anchor-height",`${i}px`)}}),O&&(0,r.arrow)({element:O,padding:g}),S({arrowWidth:F,arrowHeight:B}),A&&(0,r.hide)({strategy:"referenceHidden",...G})]}),[Y,Q]=C(W),K=(0,c.useCallbackRef)(w);(0,u.useLayoutEffect)(()=>{q&&K?.()},[q,K]);let X=V.arrow?.x,J=V.arrow?.y,Z=V.arrow?.centerOffset!==0,[ee,et]=t.useState();return(0,u.useLayoutEffect)(()=>{R&&et(window.getComputedStyle(R).zIndex)},[R]),(0,i.jsx)("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:q?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,i.jsx)(v,{scope:l,placedSide:Y,onArrowChange:P,arrowX:X,arrowY:J,shouldHideArrow:Z,children:(0,i.jsx)(a.Primitive.div,{"data-side":Y,"data-align":Q,...N,ref:L,style:{...N.style,animation:q?void 0:"none"}})})})});_.displayName=b;var A="PopperArrow",k={top:"bottom",right:"left",bottom:"top",left:"right"},w=t.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,a=T(A,r),s=k[a.placedSide];return(0,i.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,i.jsx)(o,{...n,ref:t,style:{...n.style,display:"block"}})})});function x(e){return null!==e}w.displayName=A;var S=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:a}=t,i=a.arrow?.centerOffset!==0,o=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=C(r),u={start:"0%",center:"50%",end:"100%"}[c],d=(a.arrow?.x??0)+o/2,p=(a.arrow?.y??0)+s/2,h="",f="";return"bottom"===l?(h=i?u:`${d}px`,f=`${-s}px`):"top"===l?(h=i?u:`${d}px`,f=`${n.floating.height+s}px`):"right"===l?(h=`${-s}px`,f=i?u:`${p}px`):"left"===l&&(h=`${n.floating.width+s}px`,f=i?u:`${p}px`),{data:{x:h,y:f}}}});function C(e){let[t,r="center"]=e.split("-");return[t,r]}e.s(["Anchor",()=>E,"Arrow",()=>w,"Content",()=>_,"Root",()=>g,"createPopperScope",()=>h],509377);var N=e.i(571577),I=t.forwardRef((e,r)=>{let{container:n,...o}=e,[s,l]=t.useState(!1);(0,u.useLayoutEffect)(()=>l(!0),[]);let c=n||s&&globalThis?.document?.body;return c?N.default.createPortal((0,i.jsx)(a.Primitive.div,{...o,ref:r}),c):null});I.displayName="Portal",e.s(["Portal",()=>I],153840)},110515,e=>{"use strict";var t=e.i(686107),r=e.i(221588),n=e.i(225088),a=e=>{var a;let o,s,{present:l,children:c}=e,u=function(e){var r,a;let[o,s]=t.useState(),l=t.useRef(null),c=t.useRef(e),u=t.useRef("none"),[d,p]=(r=e?"mounted":"unmounted",a={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,t)=>a[e][t]??e,r));return t.useEffect(()=>{let e=i(l.current);u.current="mounted"===d?e:"none"},[d]),(0,n.useLayoutEffect)(()=>{let t=l.current,r=c.current;if(r!==e){let n=u.current,a=i(t);e?p("MOUNT"):"none"===a||t?.display==="none"?p("UNMOUNT"):r&&n!==a?p("ANIMATION_OUT"):p("UNMOUNT"),c.current=e}},[e,p]),(0,n.useLayoutEffect)(()=>{if(o){let e,t=o.ownerDocument.defaultView??window,r=r=>{let n=i(l.current).includes(CSS.escape(r.animationName));if(r.target===o&&n&&(p("ANIMATION_END"),!c.current)){let r=o.style.animationFillMode;o.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===o.style.animationFillMode&&(o.style.animationFillMode=r)})}},n=e=>{e.target===o&&(u.current=i(l.current))};return o.addEventListener("animationstart",n),o.addEventListener("animationcancel",r),o.addEventListener("animationend",r),()=>{t.clearTimeout(e),o.removeEventListener("animationstart",n),o.removeEventListener("animationcancel",r),o.removeEventListener("animationend",r)}}p("ANIMATION_END")},[o,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:t.useCallback(e=>{l.current=e?getComputedStyle(e):null,s(e)},[])}}(l),d="function"==typeof c?c({present:u.isPresent}):t.Children.only(c),p=(0,r.useComposedRefs)(u.ref,(a=d,(s=(o=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?a.ref:(s=(o=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?a.props.ref:a.props.ref||a.ref));return"function"==typeof c||u.isPresent?t.cloneElement(d,{ref:p}):null};function i(e){return e?.animationName||"none"}a.displayName="Presence",e.s(["Presence",()=>a])},802313,e=>{"use strict";var t=e.i(686107),r=e.i(225088);t[" useEffectEvent ".trim().toString()],t[" useInsertionEffect ".trim().toString()];var n=t[" useInsertionEffect ".trim().toString()]||r.useLayoutEffect;function a({prop:e,defaultProp:r,onChange:a=()=>{},caller:i}){let[o,s,l]=function({defaultProp:e,onChange:r}){let[a,i]=t.useState(e),o=t.useRef(a),s=t.useRef(r);return n(()=>{s.current=r},[r]),t.useEffect(()=>{o.current!==a&&(s.current?.(a),o.current=a)},[a,o]),[a,i,s]}({defaultProp:r,onChange:a}),c=void 0!==e,u=c?e:o;{let r=t.useRef(void 0!==e);t.useEffect(()=>{let e=r.current;if(e!==c){let t=c?"controlled":"uncontrolled";console.warn(`${i} is changing from ${e?"controlled":"uncontrolled"} to ${t}. 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.`)}r.current=c},[c,i])}return[u,t.useCallback(t=>{if(c){let r="function"==typeof t?t(e):t;r!==e&&l.current?.(r)}else s(t)},[c,e,s,l])]}Symbol("RADIX:SYNC_STATE"),e.s(["useControllableState",()=>a],802313)},912738,962687,e=>{"use strict";var t=e.i(686107),r=e.i(291967),n=e.i(221588),a=e.i(810096),i=e.i(975287),o=e.i(244107),s=e.i(509377),l=(e.i(153840),e.i(110515)),c=e.i(692792),u=e.i(545136),d=e.i(802313),p=e.i(666426),h=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),f=t.forwardRef((e,t)=>(0,p.jsx)(c.Primitive.span,{...e,ref:t,style:{...h,...e.style}}));f.displayName="VisuallyHidden",e.s(["Root",()=>f,"VISUALLY_HIDDEN_STYLES",()=>h],962687);var[m,g]=(0,a.createContextScope)("Tooltip",[s.createPopperScope]),y=(0,s.createPopperScope)(),E="TooltipProvider",b="tooltip.open",[v,T]=m(E),_=e=>{let{__scopeTooltip:r,delayDuration:n=700,skipDelayDuration:a=300,disableHoverableContent:i=!1,children:o}=e,s=t.useRef(!0),l=t.useRef(!1),c=t.useRef(0);return t.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,p.jsx)(v,{scope:r,isOpenDelayedRef:s,delayDuration:n,onOpen:t.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:t.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,a)},[a]),isPointerInTransitRef:l,onPointerInTransitChange:t.useCallback(e=>{l.current=e},[]),disableHoverableContent:i,children:o})};_.displayName=E;var A="Tooltip",[k,w]=m(A),x=e=>{let{__scopeTooltip:r,children:n,open:a,defaultOpen:i,onOpenChange:l,disableHoverableContent:c,delayDuration:u}=e,h=T(A,e.__scopeTooltip),f=y(r),[m,g]=t.useState(null),E=(0,o.useId)(),v=t.useRef(0),_=c??h.disableHoverableContent,w=u??h.delayDuration,x=t.useRef(!1),[S,C]=(0,d.useControllableState)({prop:a,defaultProp:i??!1,onChange:e=>{e?(h.onOpen(),document.dispatchEvent(new CustomEvent(b))):h.onClose(),l?.(e)},caller:A}),N=t.useMemo(()=>S?x.current?"delayed-open":"instant-open":"closed",[S]),I=t.useCallback(()=>{window.clearTimeout(v.current),v.current=0,x.current=!1,C(!0)},[C]),R=t.useCallback(()=>{window.clearTimeout(v.current),v.current=0,C(!1)},[C]),D=t.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{x.current=!0,C(!0),v.current=0},w)},[w,C]);return t.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),(0,p.jsx)(s.Root,{...f,children:(0,p.jsx)(k,{scope:r,contentId:E,open:S,stateAttribute:N,trigger:m,onTriggerChange:g,onTriggerEnter:t.useCallback(()=>{h.isOpenDelayedRef.current?D():I()},[h.isOpenDelayedRef,D,I]),onTriggerLeave:t.useCallback(()=>{_?R():(window.clearTimeout(v.current),v.current=0)},[R,_]),onOpen:I,onClose:R,disableHoverableContent:_,children:n})})};x.displayName=A;var S="TooltipTrigger",C=t.forwardRef((e,a)=>{let{__scopeTooltip:i,...o}=e,l=w(S,i),u=T(S,i),d=y(i),h=t.useRef(null),f=(0,n.useComposedRefs)(a,h,l.onTriggerChange),m=t.useRef(!1),g=t.useRef(!1),E=t.useCallback(()=>m.current=!1,[]);return t.useEffect(()=>()=>document.removeEventListener("pointerup",E),[E]),(0,p.jsx)(s.Anchor,{asChild:!0,...d,children:(0,p.jsx)(c.Primitive.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...o,ref:f,onPointerMove:(0,r.composeEventHandlers)(e.onPointerMove,e=>{"touch"!==e.pointerType&&(g.current||u.isPointerInTransitRef.current||(l.onTriggerEnter(),g.current=!0))}),onPointerLeave:(0,r.composeEventHandlers)(e.onPointerLeave,()=>{l.onTriggerLeave(),g.current=!1}),onPointerDown:(0,r.composeEventHandlers)(e.onPointerDown,()=>{l.open&&l.onClose(),m.current=!0,document.addEventListener("pointerup",E,{once:!0})}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>{m.current||l.onOpen()}),onBlur:(0,r.composeEventHandlers)(e.onBlur,l.onClose),onClick:(0,r.composeEventHandlers)(e.onClick,l.onClose)})})});C.displayName=S;var[N,I]=m("TooltipPortal",{forceMount:void 0}),R="TooltipContent",D=t.forwardRef((e,t)=>{let r=I(R,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...i}=e,o=w(R,e.__scopeTooltip);return(0,p.jsx)(l.Presence,{present:n||o.open,children:o.disableHoverableContent?(0,p.jsx)(F,{side:a,...i,ref:t}):(0,p.jsx)(L,{side:a,...i,ref:t})})}),L=t.forwardRef((e,r)=>{let a=w(R,e.__scopeTooltip),i=T(R,e.__scopeTooltip),o=t.useRef(null),s=(0,n.useComposedRefs)(r,o),[l,c]=t.useState(null),{trigger:u,onClose:d}=a,h=o.current,{onPointerInTransitChange:f}=i,m=t.useCallback(()=>{c(null),f(!1)},[f]),g=t.useCallback((e,t)=>{let r,n=e.currentTarget,a={x:e.clientX,y:e.clientY},i=function(e,t){let r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,a,i)){case i:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw Error("unreachable")}}(a,n.getBoundingClientRect());c(((r=[...function(e,t,r=5){let n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r})}return n}(a,i),...function(e){let{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}(t.getBoundingClientRect())].slice()).sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:1*!!(e.y>t.y)),function(e){if(e.length<=1)return e.slice();let t=[];for(let r=0;r<e.length;r++){let n=e[r];for(;t.length>=2;){let e=t[t.length-1],r=t[t.length-2];if((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x))t.pop();else break}t.push(n)}t.pop();let r=[];for(let t=e.length-1;t>=0;t--){let n=e[t];for(;r.length>=2;){let e=r[r.length-1],t=r[r.length-2];if((e.x-t.x)*(n.y-t.y)>=(e.y-t.y)*(n.x-t.x))r.pop();else break}r.push(n)}return(r.pop(),1===t.length&&1===r.length&&t[0].x===r[0].x&&t[0].y===r[0].y)?t:t.concat(r)}(r))),f(!0)},[f]);return t.useEffect(()=>()=>m(),[m]),t.useEffect(()=>{if(u&&h){let e=e=>g(e,h),t=e=>g(e,u);return u.addEventListener("pointerleave",e),h.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),h.removeEventListener("pointerleave",t)}}},[u,h,g,m]),t.useEffect(()=>{if(l){let e=e=>{let t=e.target,r={x:e.clientX,y:e.clientY},n=u?.contains(t)||h?.contains(t),a=!function(e,t){let{x:r,y:n}=e,a=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){let o=t[e],s=t[i],l=o.x,c=o.y,u=s.x,d=s.y;c>n!=d>n&&r<(u-l)*(n-c)/(d-c)+l&&(a=!a)}return a}(r,l);n?m():a&&(m(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[u,h,l,d,m]),(0,p.jsx)(F,{...e,ref:s})}),[O,P]=m(A,{isInside:!1}),M=(0,u.createSlottable)("TooltipContent"),F=t.forwardRef((e,r)=>{let{__scopeTooltip:n,children:a,"aria-label":o,onEscapeKeyDown:l,onPointerDownOutside:c,...u}=e,d=w(R,n),h=y(n),{onClose:m}=d;return t.useEffect(()=>(document.addEventListener(b,m),()=>document.removeEventListener(b,m)),[m]),t.useEffect(()=>{if(d.trigger){let e=e=>{let t=e.target;t?.contains(d.trigger)&&m()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[d.trigger,m]),(0,p.jsx)(i.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:m,children:(0,p.jsxs)(s.Content,{"data-state":d.stateAttribute,...h,...u,ref:r,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,p.jsx)(M,{children:a}),(0,p.jsx)(O,{scope:n,isInside:!0,children:(0,p.jsx)(f,{id:d.contentId,role:"tooltip",children:o||a})})]})})});D.displayName=R;var B="TooltipArrow";t.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,a=y(r);return P(B,r).isInside?null:(0,p.jsx)(s.Arrow,{...a,...n,ref:t})}).displayName=B,e.s(["Content",()=>D,"Provider",()=>_,"Root",()=>x,"TooltipProvider",()=>_,"Trigger",()=>C],912738)},933172,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});function i(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,o(e));else t.set(r,o(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},860081,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(744066)._(e.r(933172)),o=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",s=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(i.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==c?(c="//"+(c||""),a&&"/"!==a[0]&&(a="/"+a)):c||(c=""),s&&"#"!==s[0]&&(s="#"+s),u&&"?"!==u[0]&&(u="?"+u),a=a.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${a}${u}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return s(e)}},325201,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(686107);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=i(e,n)),t&&(a.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},212727,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return T},MissingStaticPage:function(){return v},NormalizeError:function(){return E},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return i},execOnce:function(){return o},getDisplayName:function(){return d},getLocationOrigin:function(){return c},getURL:function(){return u},isAbsoluteUrl:function(){return l},isResSent:function(){return p},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return _}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>s.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=c();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function p(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&p(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let m="undefined"!=typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class E extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class v extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class T extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function _(e){return JSON.stringify({message:e.message,stack:e.stack})}},487532,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let n=e.r(212727),a=e.r(675751);function i(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},788282,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},414576,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return b}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(744066),o=e.r(666426),s=i._(e.r(686107)),l=e.r(860081),c=e.r(211115),u=e.r(325201),d=e.r(212727),p=e.r(184464);e.r(170349);let h=e.r(562579),f=e.r(487532),m=e.r(198164);function g(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}function y(t){var r;let n,a,i,[l,y]=(0,s.useOptimistic)(h.IDLE_LINK_STATUS),b=(0,s.useRef)(null),{href:v,as:T,children:_,prefetch:A=null,passHref:k,replace:w,shallow:x,scroll:S,onClick:C,onMouseEnter:N,onTouchStart:I,legacyBehavior:R=!1,onNavigate:D,ref:L,unstable_dynamicOnHover:O,...P}=t;n=_,R&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let M=s.default.useContext(c.AppRouterContext),F=!1!==A,B=!1!==A?null===(r=A)||"auto"===r?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,{href:j,as:U}=s.default.useMemo(()=>{let e=g(v);return{href:e,as:T?g(T):e}},[v,T]);if(R){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=s.default.Children.only(n)}let H=R?a&&"object"==typeof a&&a.ref:L,G=s.default.useCallback(e=>(null!==M&&(b.current=(0,h.mountLinkInstance)(e,j,M,B,F,y)),()=>{b.current&&((0,h.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,h.unmountPrefetchableInstance)(e)}),[F,j,M,B,y]),$={ref:(0,u.useMergedRef)(G,H),onClick(t){R||"function"!=typeof C||C(t),R&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!M||t.defaultPrevented||function(t,r,n,a,i,o,l){if("undefined"!=typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,f.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(80755);s.default.startTransition(()=>{d(n||r,i?"replace":"push",o??!0,a.current)})}}(t,j,U,b,w,S,D)},onMouseEnter(e){R||"function"!=typeof N||N(e),R&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),M&&F&&(0,h.onNavigationIntent)(e.currentTarget,!0===O)},onTouchStart:function(e){R||"function"!=typeof I||I(e),R&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),M&&F&&(0,h.onNavigationIntent)(e.currentTarget,!0===O)}};return(0,d.isAbsoluteUrl)(U)?$.href=U:R&&!k&&("a"!==a.type||"href"in a.props)||($.href=(0,p.addBasePath)(U)),i=R?s.default.cloneElement(a,$):(0,o.jsx)("a",{...P,...$,children:n}),(0,o.jsx)(E.Provider,{value:l,children:i})}e.r(788282);let E=(0,s.createContext)(h.IDLE_LINK_STATUS),b=()=>(0,s.useContext)(E);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},886288,e=>{"use strict";var t=e.i(686107);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,t.forwardRef)(({color:e="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:s="",children:l,iconNode:c,...u},d)=>(0,t.createElement)("svg",{ref:d,...n,width:a,height:a,stroke:e,strokeWidth:o?24*Number(i)/Number(a):i,className:r("lucide",s),...u},[...c.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(l)?l:[l]])),i=(e,n)=>{let i=(0,t.forwardRef)(({className:i,...o},s)=>(0,t.createElement)(a,{ref:s,iconNode:n,className:r(`lucide-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,i),...o}));return i.displayName=`${e}`,i};e.s(["default",()=>i],886288)},695018,(e,t,r)=>{function n(e,t,r,n){return Math.round(e/r)+" "+n+(t>=1.5*r?"s":"")}t.exports=function(e,t){t=t||{};var r,a,i,o,s=typeof e;if("string"===s&&e.length>0){var l=e;if(!((l=String(l)).length>100)){var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(c){var u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*u;case"weeks":case"week":case"w":return 6048e5*u;case"days":case"day":case"d":return 864e5*u;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*u;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*u;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:break}}}return}if("number"===s&&isFinite(e)){return t.long?(a=Math.abs(r=e))>=864e5?n(r,a,864e5,"day"):a>=36e5?n(r,a,36e5,"hour"):a>=6e4?n(r,a,6e4,"minute"):a>=1e3?n(r,a,1e3,"second"):r+" ms":(o=Math.abs(i=e))>=864e5?Math.round(i/864e5)+"d":o>=36e5?Math.round(i/36e5)+"h":o>=6e4?Math.round(i/6e4)+"m":o>=1e3?Math.round(i/1e3)+"s":i+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},202311,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={callServer:function(){return i.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(448597),o=e.r(241752),s=e.r(143432)},360088,329242,885636,413862,504295,384405,531875,e=>{"use strict";function t(e,t){if("string"!=typeof t)return null;let[r,n,...a]=t.split("//");if(r!==e||!n||0===a.length)return null;let i=a.at(-1)??"",o=a.join("//"),s=(n.split("/").at(-1)??"").split(".").at(0)??"";return["default","__default"].includes(i)&&s&&(i=s),{shortName:i,path:n,functionName:o}}function r(e){return t("workflow",e)}function n(e){return t("step",e)}e.s(["parseStepName",()=>n,"parseWorkflowName",()=>r],360088),e.i(695018);var a=e.i(686107),i=e.i(356089);function o(e){if("string"==typeof e&&(e=new Date(e)),!e||!(e instanceof Date))return[0,0];let t=e.getTime();return[Math.floor(t/1e3),t%1e3*1e6]}function s(e){return 1e3*e[0]+e[1]/1e6}function l(e,t){if("string"==typeof e&&(e=new Date(e)),"string"==typeof t&&(t=new Date(t)),!e||!(e instanceof Date))return[0,0];let r=(t&&t instanceof Date?t:new Date).getTime()-e.getTime();return[Math.floor(r/1e3),r%1e3*1e6]}e.s(["calculateDuration",()=>l,"dateToOtelTime",()=>o,"otelTimeToMs",()=>s],329242);let c={name:"workflow-development-kit",version:"4.0.0"},u=new Set(["hook_created","hook_received","hook_disposed","step_started","step_retrying","step_failed","workflow_failed","wait_created","wait_completed"]);function d(e,t=!0){return e.filter(e=>!t||u.has(e.eventType)).map(e=>{var t;return{name:e.eventType,timestamp:o(e.createdAt),attributes:{eventId:e.eventId,correlationId:e.correlationId,eventData:"eventData"in e?e.eventData:void 0},showVerticalLine:"hook_created"===(t=e.eventType)||"hook_received"===t||"hook_disposed"===t}})}let p=e=>{let t=e.find(e=>"wait_created"===e.eventType);if(!t)return null;let r=e.find(e=>"wait_completed"===e.eventType);return{waitId:t.correlationId,runId:t.runId,createdAt:t.createdAt,resumeAt:t.eventData?.resumeAt,completedAt:r?.createdAt}};function h(e,t,r){let n=p(e);if(!n)return null;let a=new Date(t.completedAt||r)??r,i=n?.createdAt??r,s=n?.completedAt??a,u=o(i),h=o(s),f=l(i,s),m=d(e);return{spanId:n.waitId,name:"sleep",kind:1,resource:"sleep",library:c,status:{code:0},traceFlags:1,attributes:{resource:"sleep",data:n},links:[],events:m,duration:f,startTime:u,endTime:h}}function f(e,t,r){let a=r??new Date,i=n(String(e.stepName)),s=new Date(e.completedAt??a),u=d(t),p=new Date(e.createdAt),h=e.startedAt?new Date(e.startedAt):void 0,f=t.find(e=>"step_started"===e.eventType);return f&&(h=new Date(f.createdAt)),{spanId:String(e.stepId),name:i?.shortName??"",kind:1,resource:"step",library:c,status:{code:0},traceFlags:1,attributes:{resource:"step",data:e},links:[],events:u,startTime:o(p),endTime:o(s),duration:l(p,s),activeStartTime:h&&h.getTime()>p.getTime()?o(h):void 0}}let m=e=>{let t=e.find(e=>"hook_created"===e.eventType);if(!t)return null;let r=e.filter(e=>"hook_received"===e.eventType),n=e.filter(e=>"hook_disposed"===e.eventType),a=r.at(-1);return{hookId:t.correlationId,runId:t.runId,createdAt:t.createdAt,receivedCount:r.length,lastReceivedAt:a?.createdAt||void 0,disposedAt:n.at(-1)?.createdAt||void 0}};function g(e,t,r){let n=m(e);if(!n)return null;let a=d(e),i=new Date(t.completedAt||r)??r,s=n.disposedAt||i;return{spanId:String(n.hookId),name:String(n.hookId),kind:1,resource:"hook",library:c,status:{code:1},traceFlags:1,attributes:{resource:"hook",data:n},links:[],events:a,startTime:o(n.createdAt),endTime:o(s),duration:l(n.createdAt,s)}}function y(e,t,n){let a=n??new Date,i=new Date(e.createdAt),s=e.startedAt?new Date(e.startedAt):void 0,u=e.completedAt??a,p=d(t);return{spanId:String(e.runId),name:String(r(e.workflowName)?.shortName??"?"),kind:1,resource:"run",library:c,status:{code:0},traceFlags:1,attributes:{resource:"run",data:e},links:[],events:p,startTime:o(i),endTime:o(u),duration:l(i,u),activeStartTime:s&&s.getTime()>i.getTime()?o(s):void 0}}e.s(["WORKFLOW_LIBRARY",0,c,"convertEventsToSpanEvents",()=>d,"hookEventsToHookEntity",0,m,"hookToSpan",()=>g,"runToSpan",()=>y,"stepToSpan",()=>f,"waitEventsToWaitEntity",0,p,"waitToSpan",()=>h],885636);var E=e.i(202311),b=(0,E.createServerReference)("60d475755e65f2d083f0a65f3cc0f94a46705ac86b",E.callServer,void 0,E.findSourceMapURL,"cancelRun"),v=(0,E.createServerReference)("70f91dbd9f46aefc4dc991fcd5df1d6fde348b9461",E.callServer,void 0,E.findSourceMapURL,"fetchEvents");e.s(["fetchEvents",()=>v],413862);var T=(0,E.createServerReference)("70a88aa27a7c293c608b126fc545e4297e8bb137f5",E.callServer,void 0,E.findSourceMapURL,"fetchEventsByCorrelationId");e.s(["fetchEventsByCorrelationId",()=>T],504295);var _=(0,E.createServerReference)("70cf8fadb1c8f0e691bd5c05615763524dc331bce7",E.callServer,void 0,E.findSourceMapURL,"fetchHook"),A=(0,E.createServerReference)("601a27ede3500e6752721d52159fa02a4f651737e4",E.callServer,void 0,E.findSourceMapURL,"fetchHooks"),k=(0,E.createServerReference)("7030edd123acf2239e1a1b722b178e82047a2cb29d",E.callServer,void 0,E.findSourceMapURL,"fetchRun");e.s(["fetchRun",()=>k],384405);var w=(0,E.createServerReference)("601f12671778058299d2a76437f0c693277d05165c",E.callServer,void 0,E.findSourceMapURL,"fetchRuns"),x=(0,E.createServerReference)("786825094f43db8e9e500c10342d99b08ca4f62597",E.callServer,void 0,E.findSourceMapURL,"fetchStep"),S=(0,E.createServerReference)("7030ac6b0572eb87b81871cba4d7aac44041423f2f",E.callServer,void 0,E.findSourceMapURL,"fetchSteps"),C=(0,E.createServerReference)("6079f4d9b24f09e7dac3da314529199fdb9689e252",E.callServer,void 0,E.findSourceMapURL,"fetchStreams"),N=(0,E.createServerReference)("709c0a162da94f1b1c2ae787cb408682c406588dd4",E.callServer,void 0,E.findSourceMapURL,"readStreamServerAction"),I=(0,E.createServerReference)("60137315ec1bc51742bf9509f1b6780de0df3471e9",E.callServer,void 0,E.findSourceMapURL,"recreateRun"),R=(0,E.createServerReference)("600b727938b5ecd6373b9c24ac11ac27383bba2627",E.callServer,void 0,E.findSourceMapURL,"reenqueueRun"),D=(0,E.createServerReference)("702d28b8c76ba1156ad063406cfdd9dd7e3fc530e9",E.callServer,void 0,E.findSourceMapURL,"resumeHook"),L=(0,E.createServerReference)("7057a7038844c0d8ebc1ea7aef1cb50115b5c46f97",E.callServer,void 0,E.findSourceMapURL,"wakeUpRun");async function O(e){let t;try{t=await e}catch(e){t={success:!1,error:e}}if(!t.success){var r;return(console.error("[web-api-client] error",t.error),t.error)?{error:new P((r=t.error).message,{cause:r.cause,request:r.request,layer:r.layer}),result:null}:{error:new P("Unknown error occurred",{layer:"client"}),result:null}}return{error:null,result:t.data}}class P extends Error{request;layer;constructor(e,t){super(e,{cause:t?.cause}),this.name="WorkflowWebAPIError",this.request=t?.request,this.layer=t?.layer,t?.cause instanceof Error&&(this.stack=`${this.stack}
|
|
3
|
+
Caused by: ${t.cause.stack}`)}}function M(e,t){let{workflowName:r,status:n,limit:o=10,sortOrder:s="desc"}=t,[l,c]=(0,a.useState)(void 0),[u,d]=(0,a.useState)(!1),[p,h]=(0,a.useState)(0),[f,m]=(0,a.useState)([void 0]),[g,y]=(0,a.useState)(1),[E,b]=(0,a.useState)(new Map([[0,{data:null,isLoading:!0,error:null}]])),v=(0,a.useRef)(new Map),T=(0,a.useCallback)(async(t,a,i=!1)=>{let l=a??"initial";if(b(e=>{let r=new Map(e);return r.set(t,{data:e.get(t)?.data??null,isLoading:!0,error:null}),r}),!i&&v.current.has(l)){let e=v.current.get(l);if(e){b(r=>{let n=new Map(r);return n.set(t,{data:e.data,isLoading:!1,error:null}),n}),c(e.cursor),d(e.hasMore);return}}let{error:u,result:p}=await O(w(e,{cursor:a,sortOrder:s,limit:o,workflowName:r,status:n}));u?b(e=>{let r=new Map(e);return r.set(t,{data:e.get(t)?.data??null,isLoading:!1,error:u}),r}):(v.current.set(l,{data:p.data,cursor:p.cursor,hasMore:p.hasMore}),b(e=>{let r=new Map(e);return r.set(t,{data:p.data,isLoading:!1,error:null}),r}),c(p.cursor),d(p.hasMore))},[e,r,o,s,n]);(0,a.useEffect)(()=>{T(0,void 0,!0)},[T,s,e,o,r,n]);let _=(0,a.useCallback)(()=>{if(u&&l){let e=p+1;m(e=>[...e,l]),h(e),y(t=>Math.max(t,e+1)),E.has(e)||b(t=>{let r=new Map(t);return r.set(e,{data:null,isLoading:!0,error:null}),r}),T(e,l)}},[u,l,T,p,E]),A=(0,a.useCallback)(()=>{if(p>0){let e=p-1,t=f[e];h(e),T(e,t)}},[p,f,T]),k=(0,a.useCallback)(()=>{v.current.clear(),b(new Map([[0,{data:null,isLoading:!0,error:null}]])),h(0),m([void 0]),y(1),T(0,void 0,!0)},[T]),x=E.get(p)??{data:null,isLoading:!0,error:null},S=Array.from(E.values()).find(e=>e.error)?.error??null,C=Array.from(E.values()).some(e=>e.isLoading),N=u?p+2:p+1,I=p+1,R=(0,i.getPaginationDisplay)(I,g,I===g&&u);return{data:x,allData:Array.from(E.values()),error:S,isLoading:C,currentPage:p,totalPages:N,nextPage:_,previousPage:A,hasNextPage:u,hasPreviousPage:p>0,reload:k,pageInfo:R}}function F(e,t){let{runId:r,limit:n=10,sortOrder:o="desc"}=t,[s,l]=(0,a.useState)(void 0),[c,u]=(0,a.useState)(!1),[d,p]=(0,a.useState)(0),[h,f]=(0,a.useState)([void 0]),[m,g]=(0,a.useState)(1),[y,E]=(0,a.useState)(new Map([[0,{data:null,isLoading:!0,error:null}]])),b=(0,a.useRef)(new Map),v=(0,a.useCallback)(async(t,a,i=!1)=>{let s=a??"initial";if(E(e=>{let r=new Map(e);return r.set(t,{data:e.get(t)?.data??null,isLoading:!0,error:null}),r}),!i&&b.current.has(s)){let e=b.current.get(s);if(e){E(r=>{let n=new Map(r);return n.set(t,{data:e.data,isLoading:!1,error:null}),n}),l(e.cursor),u(e.hasMore);return}}let{error:c,result:d}=await O(A(e,{runId:r,cursor:a,sortOrder:o,limit:n}));c?E(e=>{let r=new Map(e);return r.set(t,{data:e.get(t)?.data??null,isLoading:!1,error:c}),r}):(b.current.set(s,{data:d.data,cursor:d.cursor,hasMore:d.hasMore}),E(e=>{let r=new Map(e);return r.set(t,{data:d.data,isLoading:!1,error:null}),r}),l(d.cursor),u(d.hasMore))},[e,r,n,o]);(0,a.useEffect)(()=>{v(0,void 0)},[v]);let T=(0,a.useCallback)(()=>{if(c&&s){let e=d+1;f(e=>[...e,s]),p(e),g(t=>Math.max(t,e+1)),y.has(e)||E(t=>{let r=new Map(t);return r.set(e,{data:null,isLoading:!0,error:null}),r}),v(e,s)}},[c,s,v,d,y]),_=(0,a.useCallback)(()=>{if(d>0){let e=d-1,t=h[e];p(e),v(e,t)}},[d,h,v]),k=(0,a.useCallback)(()=>{b.current.clear(),E(new Map([[0,{data:null,isLoading:!0,error:null}]])),p(0),f([void 0]),g(1),v(0,void 0,!0)},[v]),w=y.get(d)??{data:null,isLoading:!0,error:null},x=Array.from(y.values()).find(e=>e.error)?.error??null,S=Array.from(y.values()).some(e=>e.isLoading),C=c?d+2:d+1,N=d+1,I=(0,i.getPaginationDisplay)(N,m,N===m&&c);return{data:w,allData:Array.from(y.values()),error:x,isLoading:S,currentPage:d,totalPages:C,nextPage:T,previousPage:_,hasNextPage:c,hasPreviousPage:d>0,reload:k,pageInfo:I}}async function B(e,t){let r,n=[];for(;;){let{error:a,result:i}=await O(S(e,t,{cursor:r,sortOrder:"asc",limit:100}));if(a||(n=[...n,...i.data],!i.hasMore||!i.cursor||n.length>=1e3))break;r=i.cursor}return{data:n,cursor:r}}async function j(e,t){let r,n=[];for(;;){let{error:a,result:i}=await O(A(e,{runId:t,cursor:r,sortOrder:"asc",limit:100}));if(a||(n=[...n,...i.data],!i.hasMore||!i.cursor||n.length>=1e3))break;r=i.cursor}return{data:n,cursor:r}}async function U(e,t){let r,n=[];for(;;){let{error:a,result:i}=await O(v(e,t,{cursor:r,sortOrder:"asc",limit:1e3}));if(a||(n=[...n,...i.data],!i.hasMore||!i.cursor||n.length>=1e3))break;r=i.cursor}return{data:n,cursor:r}}function H(e,t,r={}){let{live:n=!1}=r,[i,o]=(0,a.useState)(null),[s,l]=(0,a.useState)([]),[c,u]=(0,a.useState)([]),[d,p]=(0,a.useState)([]),[h,f]=(0,a.useState)(!0),[m,g]=(0,a.useState)(!1),[y,E]=(0,a.useState)(null),[b,T]=(0,a.useState)(),[_,w]=(0,a.useState)(),[x,C]=(0,a.useState)(),N=(0,a.useRef)(!1),[I,R]=(0,a.useState)(!1),D=(0,a.useCallback)(async()=>{if(N.current)return;N.current=!0,f(!0),g(!0),E(null);let r=[O(k(e,t)).then(({error:e,result:t})=>e?void E(e):(o(t),t)),B(e,t).then(e=>{l(e.data),T(e.cursor)}),j(e,t).then(e=>{u(e.data),w(e.cursor)}),U(e,t).then(e=>{p(e.data),C(e.cursor)})],n=await Promise.allSettled(r);f(!1),g(!1),R(!0),N.current=!1;let a=n.find(e=>"rejected"===e.status)?.reason;if(a)return void E(a)},[e,t]),L=(0,a.useCallback)((e,t)=>Array.from(new Map([...e,...t].map(e=>[e.stepId,e])).values()),[]),P=(0,a.useCallback)((e,t)=>Array.from(new Map([...e,...t].map(e=>[e.hookId,e])).values()),[]),M=(0,a.useCallback)((e,t)=>Array.from(new Map([...e,...t].map(e=>[e.eventId,e])).values()),[]),F=(0,a.useCallback)(async()=>{if(i?.completedAt)return!1;let{error:r,result:n}=await O(k(e,t));return r?(E(r),!1):(o(n),!0)},[e,t,i?.completedAt]),G=(0,a.useCallback)(async()=>{let{error:r,result:n}=await O(S(e,t,{cursor:b,sortOrder:"asc",limit:10}));return r?(E(r),!1):n.data.length>0&&(l(e=>L(e,n.data)),n.cursor&&n.hasMore&&T(n.cursor),!0)},[e,t,b,L]),$=(0,a.useCallback)(async()=>{let{error:r,result:n}=await O(A(e,{runId:t,cursor:_,sortOrder:"asc",limit:10}));return r?(E(r),!1):n.data.length>0&&(u(e=>P(e,n.data)),n.cursor&&w(n.cursor),!0)},[e,t,_,P]),z=(0,a.useCallback)(async()=>{let{error:r,result:n}=await O(v(e,t,{cursor:x,sortOrder:"asc",limit:10}));return r?(E(r),!1):n.data.length>0&&(p(e=>M(e,n.data)),n.cursor&&C(n.cursor),!0)},[e,t,x,M]),W=(0,a.useCallback)(async(e=!1)=>{if(N.current||!I)return{foundNewItems:!1};let t=!1;try{let[r,n,a,i]=await Promise.all([e?Promise.resolve(!1):F(),G(),e?Promise.resolve(!1):$(),e?Promise.resolve(!1):z()]);t=n||a||i}catch(e){console.error("Update error:",e)}return{foundNewItems:t}},[G,$,z,I,F]);return(0,a.useEffect)(()=>{D()},[D]),(0,a.useEffect)(()=>{if(!n||!I||i?.completedAt)return;let e=setInterval(()=>{W()},5e3),t=setInterval(()=>{W(!0)},2e3);return()=>{clearInterval(e),clearInterval(t)}},[n,I,W,i?.completedAt]),{run:i??{},steps:s,hooks:c,events:d,loading:h,auxiliaryDataLoading:m,error:y,update:W}}async function G(e,t,r,n={}){let a,i,o=n.resolveData??"all";if("run"===t){let{error:t,result:n}=await O(k(e,r,o));if(t)throw t;i=(a=n).runId}else if("step"===t){let{runId:t}=n;if(!t)throw new P("runId is required for step resource",{layer:"client"});let{error:s,result:l}=await O(x(e,t,r,o));if(s)throw s;i=(a=l).stepId}else if("hook"===t){let{error:t,result:n}=await O(_(e,r,o));if(t)throw t;i=(a=n).hookId}else throw new P(`Unknown resource type: ${t}`,{layer:"client"});return{data:a,correlationId:i}}function $(e,t,r,n={}){let{refreshInterval:i=0,runId:o}=n,[s,l]=(0,a.useState)(null),[c,u]=(0,a.useState)(!0),[d,h]=(0,a.useState)(null),f=(0,a.useCallback)(async()=>{if(l(null),h(null),"hook"===t||"sleep"===t){let{error:n,result:a}=await O(T(e,r,{sortOrder:"asc",limit:100,withData:!0}));if(n)return void h(n);let i=a.data,o="hook"===t?m(i):p(i);return null===o?void h(Error(`Failed to load ${t} details: missing required event data`)):void l(o)}u(!0);try{let{data:n}=await G(e,t,r,{runId:o});l(n)}catch(e){e instanceof Error?h(e):h(Error(String(e)));return}finally{u(!1)}},[e,t,r,o]);return(0,a.useEffect)(()=>{f()},[f]),(0,a.useEffect)(()=>{if(!i||i<=0)return;let e=setInterval(f,i);return()=>clearInterval(e)},[i,f]),{data:s,loading:c,error:d,refresh:f}}async function z(e,t){let{error:r}=await O(b(e,t));if(r)throw r}async function W(e,t){let{error:r,result:n}=await O(I(e,t));if(r)throw r;return n}async function q(e,t){let{error:r}=await O(R(e,t));if(r)throw r}async function V(e,t,r){let{error:n,result:a}=await O(L(e,t,r));if(n)throw n;return a}async function Y(e,t,r){let{error:n,result:a}=await O(D(e,t,r));if(n)throw n;return a}async function Q(e,t,r){try{let n=await N(e,t,r);if(!n)throw new P("Failed to read stream",{layer:"client"});if("object"==typeof n&&null!==n&&"message"in n&&"layer"in n&&"cause"in n&&"request"in n)throw new P(n.message,{layer:"client",cause:n.cause,request:n.request});return n}catch(e){if(e instanceof P)throw e;throw new P("Failed to read stream",{layer:"client",cause:e})}}async function K(e,t){let{error:r,result:n}=await O(C(e,t));if(r)throw r;return n}function X(e,t,r=1e4){let[n,i]=(0,a.useState)([]),[o,s]=(0,a.useState)(!0),[l,c]=(0,a.useState)(null),u=(0,a.useCallback)(async()=>{s(!0),c(null);try{let r=await K(e,t);i(r)}catch(e){c(e instanceof Error?e:Error(String(e)))}finally{s(!1)}},[e,t]);return(0,a.useEffect)(()=>{u()},[u]),(0,a.useEffect)(()=>{if(!r||r<=0)return;let e=setInterval(u,r);return()=>clearInterval(e)},[r,u]),{streams:n,loading:o,error:l,refresh:u}}e.s(["WorkflowWebAPIError",()=>P,"cancelRun",()=>z,"getErrorMessage",0,e=>"layer"in e&&e.layer?e instanceof P&&e.request?.status===403?"Your current vercel account does not have access to this resource. Use `vercel login` or `vercel switch` to ensure you are linked to the right account. You might need to run `vercel env pull` to use the latest environment variables.":e.message:e instanceof Error?e.message:"An error occurred","readStream",()=>Q,"recreateRun",()=>W,"reenqueueRun",()=>q,"resumeHook",()=>Y,"unwrapServerActionResult",()=>O,"useWorkflowHooks",()=>F,"useWorkflowResourceData",()=>$,"useWorkflowRuns",()=>M,"useWorkflowStreams",()=>X,"useWorkflowTraceViewerData",()=>H,"wakeUpRun",()=>V],531875)},64016,(e,t,r)=>{"use strict";var n=e.r(686107),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,o=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!a(e,r)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=i({inst:{value:r,getSnapshot:t}}),a=n[0].inst,u=n[1];return s(function(){a.value=r,a.getSnapshot=t,c(a)&&u({inst:a})},[e,r,t]),o(function(){return c(a)&&u({inst:a}),e(function(){c(a)&&u({inst:a})})},[e]),l(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u},483309,(e,t,r)=>{"use strict";t.exports=e.r(64016)},175974,(e,t,r)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,a=/\n/g,i=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,u=/^\s+|\s+$/g;function d(e){return e?e.replace(u,""):""}t.exports=function(e,t){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,u=1;function p(e){var t=e.match(a);t&&(r+=t.length);var n=e.lastIndexOf("\n");u=~n?e.length-n:u+e.length}function h(){var e={line:r,column:u};return function(t){return t.position=new f(e),y(i),t}}function f(e){this.start=e,this.end={line:r,column:u},this.source=t.source}f.prototype.content=e;var m=[];function g(n){var a=Error(t.source+":"+r+":"+u+": "+n);if(a.reason=n,a.filename=t.source,a.line=r,a.column=u,a.source=e,t.silent)m.push(a);else throw a}function y(t){var r=t.exec(e);if(r){var n=r[0];return p(n),e=e.slice(n.length),r}}function E(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;""!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return g("End of comment missing");var n=e.slice(2,r-2);return u+=2,p(n),e=e.slice(r),u+=2,t({type:"comment",comment:n})}}y(i);var v,T=[];for(E(T);v=function(){var e=h(),t=y(o);if(t){if(b(),!y(s))return g("property missing ':'");var r=y(l),a=e({type:"declaration",property:d(t[0].replace(n,"")),value:r?d(r[0].replace(n,"")):""});return y(c),a}}();)!1!==v&&(T.push(v),E(T));return T}},388441,(e,t,r)=>{"use strict";var n=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){var r=null;if(!e||"string"!=typeof e)return r;var n=(0,a.default)(e),i="function"==typeof t;return n.forEach(function(e){if("declaration"===e.type){var n=e.property,a=e.value;i?t(n,a,e):a&&((r=r||{})[n]=a)}}),r};var a=n(e.r(175974))},133945,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,a=/-([a-z])/g,i=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(e,t){return t.toUpperCase()},c=function(e,t){return"".concat(t,"-")};r.camelCase=function(e,t){var r;return(void 0===t&&(t={}),!(r=e)||i.test(r)||n.test(r))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,c):e.replace(o,c)).replace(a,l))}},411341,(e,t,r)=>{"use strict";var n=(e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(e.r(388441)),a=e.r(133945);function i(e,t){var r={};return e&&"string"==typeof e&&(0,n.default)(e,function(e,n){e&&n&&(r[(0,a.camelCase)(e,t)]=n)}),r}i.default=i,t.exports=i},975609,(e,t,r)=>{"use strict";var n=Object.prototype.hasOwnProperty,a=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===a.call(e)},l=function(e){if(!e||"[object Object]"!==a.call(e))return!1;var t,r=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;for(t in e);return void 0===t||n.call(e,t)},c=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;else if(o)return o(e,t).value}return e[t]};t.exports=function e(){var t,r,n,a,i,o,d=arguments[0],p=1,h=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<h;++p)if(t=arguments[p],null!=t)for(r in t)n=u(d,r),d!==(a=u(t,r))&&(f&&a&&(l(a)||(i=s(a)))?(i?(i=!1,o=n&&s(n)?n:[]):o=n&&l(n)?n:{},c(d,{name:r,newValue:e(f,o,a)})):void 0!==a&&c(d,{name:r,newValue:a}));return d}},284922,(e,t,r)=>{var n={675:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,i=l(e),o=i[0],s=i[1],c=new a((o+s)*3/4-s),u=0,d=s>0?o-4:o;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,a=n%3,i=[],o=0,s=n-a;o<s;o+=16383)i.push(function(e,t,n){for(var a,i=[],o=t;o<n;o+=3)a=(e[o]<<16&0xff0000)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(r[a>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return i.join("")}(e,o,o+16383>s?s:o+16383));return 1===a?i.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===a&&i.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),i.join("")};for(var r=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=i.length;o<s;++o)r[o]=i[o],n[i.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},72:function(e,t,r){"use strict";var n=r(675),a=r(783),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var n=e,a=t;if(("string"!=typeof a||""===a)&&(a="utf8"),!s.isEncoding(a))throw TypeError("Unknown encoding: "+a);var i=0|h(n,a),l=o(i),c=l.write(n,a);return c!==i&&(l=l.slice(0,c)),l}if(ArrayBuffer.isView(e))return d(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(N(e,ArrayBuffer)||e&&N(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(N(e,SharedArrayBuffer)||e&&N(e.buffer,SharedArrayBuffer)))return function(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),s.prototype),n}(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var u=e.valueOf&&e.valueOf();if(null!=u&&u!==e)return s.from(u,t,r);var f=function(e){if(s.isBuffer(e)){var t=0|p(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?o(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(f)return f;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),o(e<0?0:0|p(e))}function d(e){for(var t=e.length<0?0:0|p(e.length),r=o(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return(c(e),e<=0)?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)},s.allocUnsafe=function(e){return u(e)},s.allocUnsafeSlow=function(e){return u(e)};function p(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||N(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return w(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return S(e).length;default:if(a)return n?-1:w(e).length;t=(""+t).toLowerCase(),a=!0}}function f(e,t,r){var a,i,o,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var a="",i=t;i<r;++i)a+=I[e[i]];return a}(this,t,r);case"utf8":case"utf-8":return E(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(127&e[a]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(e[a]);return n}(this,t,r);case"base64":return a=this,i=t,o=r,0===i&&o===a.length?n.fromByteArray(a):n.fromByteArray(a.slice(i,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),a="",i=0;i<n.length;i+=2)a+=String.fromCharCode(n[i]+256*n[i+1]);return a}(this,t,r);default:if(s)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,a){var i;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(i=r*=1)!=i&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(a)return -1;else r=e.length-1;else if(r<0)if(!a)return -1;else r=0;if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,a);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(a)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return y(e,[t],r,n,a)}throw TypeError("val must be string, number or Buffer")}function y(e,t,r,n,a){var i,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;o=2,s/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var u=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*o}else -1!==u&&(i-=i-u),u=-1}else for(r+l>s&&(r=s-l),i=r;i>=0;i--){for(var d=!0,p=0;p<l;p++)if(c(e,i+p)!==c(t,p)){d=!1;break}if(d)return i}return -1}s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(N(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),N(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a<i;++a)if(e[a]!==t[a]){r=e[a],n=t[a];break}return r<n?-1:+(n<r)},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=s.allocUnsafe(t),a=0;for(r=0;r<e.length;++r){var i=e[r];if(N(i,Uint8Array)&&(i=s.from(i)),!s.isBuffer(i))throw TypeError('"list" argument must be an Array of Buffers');i.copy(n,a),a+=i.length}return n},s.byteLength=h,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?E(this,0,e):f.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,a){if(N(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,a>>>=0,this===e)return 0;for(var i=a-n,o=r-t,l=Math.min(i,o),c=this.slice(n,a),u=e.slice(t,r),d=0;d<l;++d)if(c[d]!==u[d]){i=c[d],o=u[d];break}return i<o?-1:+(o<i)},s.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)};function E(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a<r;){var i,o,s,l,c=e[a],u=null,d=c>239?4:c>223?3:c>191?2:1;if(a+d<=r)switch(d){case 1:c<128&&(u=c);break;case 2:(192&(i=e[a+1]))==128&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=e[a+1],o=e[a+2],(192&i)==128&&(192&o)==128&&(l=(15&c)<<12|(63&i)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=e[a+1],o=e[a+2],s=e[a+3],(192&i)==128&&(192&o)==128&&(192&s)==128&&(l=(15&c)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),a+=d}var p=n,h=p.length;if(h<=4096)return String.fromCharCode.apply(String,p);for(var f="",m=0;m<h;)f+=String.fromCharCode.apply(String,p.slice(m,m+=4096));return f}function b(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function v(e,t,r,n,a,i){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<i)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function T(e,t,r,n,a,i){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function _(e,t,r,n,i){return t*=1,r>>>=0,i||T(e,t,r,4,34028234663852886e22,-34028234663852886e22),a.write(e,t,r,n,23,4),r+4}function A(e,t,r,n,i){return t*=1,r>>>=0,i||T(e,t,r,8,17976931348623157e292,-17976931348623157e292),a.write(e,t,r,n,52,8),r+8}s.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var a,i,o,s,l,c,u,d,p=this.length-t;if((void 0===r||r>p)&&(r=p),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var h=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var a=e.length-r;n?(n=Number(n))>a&&(n=a):n=a;var i=t.length;n>i/2&&(n=i/2);for(var o=0;o<n;++o){var s,l=parseInt(t.substr(2*o,2),16);if((s=l)!=s)break;e[r+o]=l}return o}(this,e,t,r);case"utf8":case"utf-8":return a=t,i=r,C(w(e,this.length-a),this,a,i);case"ascii":return o=t,s=r,C(x(e),this,o,s);case"latin1":case"binary":return function(e,t,r,n){return C(x(t),e,r,n)}(this,e,t,r);case"base64":return l=t,c=r,C(S(e),this,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u=t,d=r,C(function(e,t){for(var r,n,a=[],i=0;i<e.length&&!((t-=2)<0);++i)n=(r=e.charCodeAt(i))>>8,a.push(r%256),a.push(n);return a}(e,this.length-u),this,u,d);default:if(h)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),h=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return n},s.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e+--t],a=1;t>0&&(a*=256);)n+=this[e+--t]*a;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return n>=(a*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=t,a=1,i=this[e+--n];n>0&&(a*=256);)i+=this[e+--n]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return(e>>>=0,t||b(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),a.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),a.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),a.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),a.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var a=Math.pow(2,8*r)-1;v(this,e,t,r,a,0)}var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},s.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var a=Math.pow(2,8*r)-1;v(this,e,t,r,a,0)}var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},s.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var a=Math.pow(2,8*r-1);v(this,e,t,r,a-1,-a)}var i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var a=Math.pow(2,8*r-1);v(this,e,t,r,a-1,-a)}var i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return _(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return _(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return A(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return A(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var a=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var i=a-1;i>=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return a},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var a,i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=s.isBuffer(e)?e:s.from(e,n),l=o.length;if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<r-t;++a)this[a+t]=o[a%l]}return this};var k=/[^+/0-9A-Za-z-_]/g;function w(e,t){t=t||1/0;for(var r,n=e.length,a=null,i=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!a){if(r>56319||o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=(a-55296<<10|r-56320)+65536}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return i}function x(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function S(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(k,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function C(e,t,r,n){for(var a=0;a<n&&!(a+r>=t.length)&&!(a>=e.length);++a)t[a+r]=e[a];return a}function N(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var I=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,a=0;a<16;++a)t[n+a]=e[r]+e[a];return t}()},783:function(e,t){t.read=function(e,t,r,n,a){var i,o,s=8*a-n-1,l=(1<<s)-1,c=l>>1,u=-7,d=r?a-1:0,p=r?-1:1,h=e[t+d];for(d+=p,i=h&(1<<-u)-1,h>>=-u,u+=s;u>0;i=256*i+e[t+d],d+=p,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=n;u>0;o=256*o+e[t+d],d+=p,u-=8);if(0===i)i=1-c;else{if(i===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),i-=c}return(h?-1:1)*o*Math.pow(2,i-n)},t.write=function(e,t,r,n,a,i){var o,s,l,c=8*i-a-1,u=(1<<c)-1,d=u>>1,p=5960464477539062e-23*(23===a),h=n?0:i-1,f=n?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?t+=p/l:t+=p*Math.pow(2,1-d),t*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*l-1)*Math.pow(2,a),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,a),o=0));a>=8;e[r+h]=255&s,h+=f,s/=256,a-=8);for(o=o<<a|s,c+=a;c>0;e[r+h]=255&o,h+=f,o/=256,c-=8);e[r+h-f]|=128*m}}},a={};function i(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}},o=!0;try{n[e](r,r.exports,i),o=!1}finally{o&&delete a[e]}return r.exports}i.ab="/ROOT/node_modules/.pnpm/next@16.0.10_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/compiled/buffer/",t.exports=i(72)},345342,e=>{e.v({alignEnd:"trace-viewer-module__m4L2Da__alignEnd",alignStart:"trace-viewer-module__m4L2Da__alignStart",ancestorDuration:"trace-viewer-module__m4L2Da__ancestorDuration",ancestorLine:"trace-viewer-module__m4L2Da__ancestorLine",ancestorLineContainer:"trace-viewer-module__m4L2Da__ancestorLineContainer",ancestorName:"trace-viewer-module__m4L2Da__ancestorName",ancestorNode:"trace-viewer-module__m4L2Da__ancestorNode",ancestorText:"trace-viewer-module__m4L2Da__ancestorText",buttonLink:"trace-viewer-module__m4L2Da__buttonLink",childRow:"trace-viewer-module__m4L2Da__childRow",collapsed:"trace-viewer-module__m4L2Da__collapsed",color0:"trace-viewer-module__m4L2Da__color0",color1:"trace-viewer-module__m4L2Da__color1",color2:"trace-viewer-module__m4L2Da__color2",color3:"trace-viewer-module__m4L2Da__color3",color4:"trace-viewer-module__m4L2Da__color4",colorHighlight:"trace-viewer-module__m4L2Da__colorHighlight",colorVercel:"trace-viewer-module__m4L2Da__colorVercel",cursorMarker:"trace-viewer-module__m4L2Da__cursorMarker",cursorMarkerContainer:"trace-viewer-module__m4L2Da__cursorMarkerContainer",cursorMarkerLabel:"trace-viewer-module__m4L2Da__cursorMarkerLabel",cursorMarkerLabelContainer:"trace-viewer-module__m4L2Da__cursorMarkerLabelContainer",cursorMarkerStickyParent:"trace-viewer-module__m4L2Da__cursorMarkerStickyParent",cursorSelection:"trace-viewer-module__m4L2Da__cursorSelection",customEventColor:"trace-viewer-module__m4L2Da__customEventColor",detailGroup:"trace-viewer-module__m4L2Da__detailGroup",detailHeading:"trace-viewer-module__m4L2Da__detailHeading",detailHeadingIcon:"trace-viewer-module__m4L2Da__detailHeadingIcon",divider:"trace-viewer-module__m4L2Da__divider",eventDefault:"trace-viewer-module__m4L2Da__eventDefault",eventDiamond:"trace-viewer-module__m4L2Da__eventDiamond",eventFailed:"trace-viewer-module__m4L2Da__eventFailed",eventHook:"trace-viewer-module__m4L2Da__eventHook",eventMarker:"trace-viewer-module__m4L2Da__eventMarker",eventMarkers:"trace-viewer-module__m4L2Da__eventMarkers",eventMarkersContainer:"trace-viewer-module__m4L2Da__eventMarkersContainer",eventName:"trace-viewer-module__m4L2Da__eventName",eventRetrying:"trace-viewer-module__m4L2Da__eventRetrying",eventTimestamp:"trace-viewer-module__m4L2Da__eventTimestamp",hasQueuedTime:"trace-viewer-module__m4L2Da__hasQueuedTime",hidden:"trace-viewer-module__m4L2Da__hidden",hoverInfo:"trace-viewer-module__m4L2Da__hoverInfo",huge:"trace-viewer-module__m4L2Da__huge",inert:"trace-viewer-module__m4L2Da__inert",infraSpanDescription:"trace-viewer-module__m4L2Da__infraSpanDescription",mapCanvas:"trace-viewer-module__m4L2Da__mapCanvas",mapContainer:"trace-viewer-module__m4L2Da__mapContainer",mapThumb:"trace-viewer-module__m4L2Da__mapThumb",marker:"trace-viewer-module__m4L2Da__marker",markerLabel:"trace-viewer-module__m4L2Da__markerLabel",markers:"trace-viewer-module__m4L2Da__markers",markersContainer:"trace-viewer-module__m4L2Da__markersContainer",mobile:"trace-viewer-module__m4L2Da__mobile",notch:"trace-viewer-module__m4L2Da__notch",note:"trace-viewer-module__m4L2Da__note",searchBar:"trace-viewer-module__m4L2Da__searchBar",searchInput:"trace-viewer-module__m4L2Da__searchInput",searchInputLabel:"trace-viewer-module__m4L2Da__searchInputLabel",searchInputPrefix:"trace-viewer-module__m4L2Da__searchInputPrefix",selected:"trace-viewer-module__m4L2Da__selected",skeleton:"trace-viewer-module__m4L2Da__skeleton",skeletonRounded:"trace-viewer-module__m4L2Da__skeletonRounded",small:"trace-viewer-module__m4L2Da__small","span-skeleton":"trace-viewer-module__m4L2Da__span-skeleton",spanCancelled:"trace-viewer-module__m4L2Da__spanCancelled",spanCompleted:"trace-viewer-module__m4L2Da__spanCompleted",spanDetailPanel:"trace-viewer-module__m4L2Da__spanDetailPanel",spanDetailPanelAttribute:"trace-viewer-module__m4L2Da__spanDetailPanelAttribute",spanDetailPanelAttributeKey:"trace-viewer-module__m4L2Da__spanDetailPanelAttributeKey",spanDetailPanelAttributeValue:"trace-viewer-module__m4L2Da__spanDetailPanelAttributeValue",spanDetailPanelBody:"trace-viewer-module__m4L2Da__spanDetailPanelBody",spanDetailPanelClose:"trace-viewer-module__m4L2Da__spanDetailPanelClose",spanDetailPanelCloseVerticalRule:"trace-viewer-module__m4L2Da__spanDetailPanelCloseVerticalRule",spanDetailPanelCorner:"trace-viewer-module__m4L2Da__spanDetailPanelCorner",spanDetailPanelCornerInner:"trace-viewer-module__m4L2Da__spanDetailPanelCornerInner",spanDetailPanelDuration:"trace-viewer-module__m4L2Da__spanDetailPanelDuration",spanDetailPanelName:"trace-viewer-module__m4L2Da__spanDetailPanelName",spanDetailPanelQuickLink:"trace-viewer-module__m4L2Da__spanDetailPanelQuickLink",spanDetailPanelQuickLinkLabel:"trace-viewer-module__m4L2Da__spanDetailPanelQuickLinkLabel",spanDetailPanelResizer:"trace-viewer-module__m4L2Da__spanDetailPanelResizer",spanDetailPanelTop:"trace-viewer-module__m4L2Da__spanDetailPanelTop",spanDetailPanelTopInfo:"trace-viewer-module__m4L2Da__spanDetailPanelTopInfo",spanDetailPanelTraceViewer:"trace-viewer-module__m4L2Da__spanDetailPanelTraceViewer",spanDetailPanelTruncatedHeading:"trace-viewer-module__m4L2Da__spanDetailPanelTruncatedHeading",spanDuration:"trace-viewer-module__m4L2Da__spanDuration",spanFailed:"trace-viewer-module__m4L2Da__spanFailed",spanHook:"trace-viewer-module__m4L2Da__spanHook",spanName:"trace-viewer-module__m4L2Da__spanName",spanNameDetailPanel:"trace-viewer-module__m4L2Da__spanNameDetailPanel",spanNode:"trace-viewer-module__m4L2Da__spanNode",spanNodeEvent:"trace-viewer-module__m4L2Da__spanNodeEvent",spanPaused:"trace-viewer-module__m4L2Da__spanPaused",spanPending:"trace-viewer-module__m4L2Da__spanPending",spanPendingStriped:"trace-viewer-module__m4L2Da__spanPendingStriped",spanRunning:"trace-viewer-module__m4L2Da__spanRunning",spanSleep:"trace-viewer-module__m4L2Da__spanSleep",spanSpacer:"trace-viewer-module__m4L2Da__spanSpacer",timeline:"trace-viewer-module__m4L2Da__timeline",traceNode:"trace-viewer-module__m4L2Da__traceNode",traceViewer:"trace-viewer-module__m4L2Da__traceViewer",traceViewerContent:"trace-viewer-module__m4L2Da__traceViewerContent",unlit:"trace-viewer-module__m4L2Da__unlit",xHover:"trace-viewer-module__m4L2Da__xHover","zoom-buttons-fade-in":"trace-viewer-module__m4L2Da__zoom-buttons-fade-in",zoomButton:"trace-viewer-module__m4L2Da__zoomButton",zoomButtonGroup:"trace-viewer-module__m4L2Da__zoomButtonGroup",zoomButtonTraceViewer:"trace-viewer-module__m4L2Da__zoomButtonTraceViewer"})},403222,e=>{e.v(e.b(["static/chunks/998975f01526efbb.js","static/chunks/4cc8e6fbfadefe1c.js","static/chunks/turbopack-fcbada14c092d574.js"]))},169764,687602,294237,545030,806746,897884,259280,932671,257151,545739,335468,195547,742334,e=>{"use strict";let t,r,n,a,i,o;var s,l,c,u,d,p,h,f,m,g,y,E,b,v,T,_,A,k,w,x,S,C,N,I,R,D,L,O,P,M,F,B,j,U,H=e.i(360088),G=e.i(531875),$=e.i(666426),z=e.i(886288);let W=(0,z.default)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",()=>W],687602);var q=e.i(686107),V=e.i(7284);let Y=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Q=V.clsx,K=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return Q(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(e=>{let t=null==r?void 0:r[e],n=null==i?void 0:i[e];if(null===t)return null;let o=Y(t)||Y(n);return a[e][o]}),s=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return Q(e,o,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...s}[t]):({...i,...s})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)};e.s(["cva",0,K],294237);var X=e.i(356089);let J=K("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Z=q.forwardRef(({className:e,variant:t,...r},n)=>(0,$.jsx)("div",{ref:n,role:"alert",className:(0,X.cn)(J({variant:t}),e),...r}));Z.displayName="Alert";let ee=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("h5",{ref:r,className:(0,X.cn)("mb-1 font-medium leading-none tracking-tight",e),...t}));ee.displayName="AlertTitle";let et=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:(0,X.cn)("text-sm [&_p]:leading-relaxed",e),...t}));et.displayName="AlertDescription";let er=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:(0,X.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));er.displayName="Card";let en=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:(0,X.cn)("flex flex-col space-y-1.5 p-6",e),...t}));en.displayName="CardHeader";let ea=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:(0,X.cn)("text-2xl font-semibold leading-none tracking-tight",e),...t}));ea.displayName="CardTitle",q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:(0,X.cn)("text-sm text-muted-foreground",e),...t})).displayName="CardDescription";let ei=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:(0,X.cn)("p-6 pt-0",e),...t}));ei.displayName="CardContent",q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:(0,X.cn)("flex items-center p-6 pt-0",e),...t})).displayName="CardFooter";class eo extends q.default.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("Error caught by boundary:",e,t)}handleReset=()=>{this.setState({hasError:!1,error:null})};render(){return this.state.hasError&&this.state.error?this.props.fallback?this.props.fallback(this.state.error,this.handleReset):(0,$.jsxs)(er,{className:"border-destructive/50 bg-destructive/5",children:[(0,$.jsx)(en,{children:(0,$.jsxs)(ea,{className:"flex items-center gap-2 text-destructive",children:[(0,$.jsx)(W,{className:"h-5 w-5"}),this.props.title||"Error"]})}),(0,$.jsxs)(ei,{className:"space-y-4",children:[(0,$.jsxs)(Z,{variant:"destructive",children:[(0,$.jsx)(W,{className:"h-4 w-4"}),(0,$.jsx)(ee,{children:"Something went wrong"}),(0,$.jsx)(et,{children:this.props.description||"An unexpected error occurred in this section."})]}),(0,$.jsxs)("div",{className:"bg-muted p-3 rounded-md text-sm font-mono text-muted-foreground overflow-auto max-h-48",children:[(0,$.jsx)("div",{className:"text-xs font-semibold mb-2",children:"Error details:"}),(0,$.jsx)("div",{className:"whitespace-pre-wrap break-words text-xs",children:this.state.error.message}),this.state.error.stack&&(0,$.jsx)("div",{className:"mt-2 opacity-60 text-xs",children:this.state.error.stack})]})]})]}):this.props.children}}e.s(["ErrorBoundary",()=>eo],545030);let es=(0,z.default)("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);var el=e.i(571577);let ec=Array(12).fill(0),eu=({visible:e,className:t})=>q.default.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},q.default.createElement("div",{className:"sonner-spinner"},ec.map((e,t)=>q.default.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),ed=q.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},q.default.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ep=q.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},q.default.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),eh=q.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},q.default.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),ef=q.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},q.default.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),em=q.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},q.default.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),q.default.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),eg=1,ey=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,a="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:eg++,i=this.toasts.find(e=>e.id===a),o=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(t=>t.id===a?(this.publish({...t,...e,id:a,title:r}),{...t,...e,id:a,dismissible:o,title:r}):t):this.addToast({title:r,...n,dismissible:o,id:a}),a},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{let r,n;if(!t)return;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));let a=Promise.resolve(e instanceof Function?e():e),i=void 0!==n,o=a.then(async e=>{if(r=["resolve",e],q.default.isValidElement(e))i=!1,this.create({id:n,type:"default",message:e});else if(eE(e)&&!e.ok){i=!1;let r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,a="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,o="object"!=typeof r||q.default.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:a,...o})}else if(e instanceof Error){i=!1;let r="function"==typeof t.error?await t.error(e):t.error,a="function"==typeof t.description?await t.description(e):t.description,o="object"!=typeof r||q.default.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:a,...o})}else if(void 0!==t.success){i=!1;let r="function"==typeof t.success?await t.success(e):t.success,a="function"==typeof t.description?await t.description(e):t.description,o="object"!=typeof r||q.default.isValidElement(r)?{message:r}:r;this.create({id:n,type:"success",description:a,...o})}}).catch(async e=>{if(r=["reject",e],void 0!==t.error){i=!1;let r="function"==typeof t.error?await t.error(e):t.error,a="function"==typeof t.description?await t.description(e):t.description,o="object"!=typeof r||q.default.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),null==t.finally||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>"reject"===r[0]?t(r[1]):e(r[1])).catch(t));return"string"!=typeof n&&"number"!=typeof n?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let r=(null==t?void 0:t.id)||eg++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},eE=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,eb=Object.assign((e,t)=>{let r=(null==t?void 0:t.id)||eg++;return ey.addToast({title:e,...t,id:r}),r},{success:ey.success,info:ey.info,warning:ey.warning,error:ey.error,custom:ey.custom,message:ey.message,promise:ey.promise,dismiss:ey.dismiss,loading:ey.loading},{getHistory:()=>ey.toasts,getToasts:()=>ey.getActiveToasts()});function ev(e){return void 0!==e.label}function eT(...e){return e.filter(Boolean).join(" ")}!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");let e_=e=>{var t,r,n,a,i,o,s,l,c,u,d,p,h;let{invert:f,toast:m,unstyled:g,interacting:y,setHeights:E,visibleToasts:b,heights:v,index:T,toasts:_,expanded:A,removeToast:k,defaultRichColors:w,closeButton:x,style:S,cancelButtonStyle:C,actionButtonStyle:N,className:I="",descriptionClassName:R="",duration:D,position:L,gap:O,expandByDefault:P,classNames:M,icons:F,closeButtonAriaLabel:B="Close toast"}=e,[j,U]=q.default.useState(null),[H,G]=q.default.useState(null),[$,z]=q.default.useState(!1),[W,V]=q.default.useState(!1),[Y,Q]=q.default.useState(!1),[K,X]=q.default.useState(!1),[J,Z]=q.default.useState(!1),[ee,et]=q.default.useState(0),[er,en]=q.default.useState(0),ea=q.default.useRef(m.duration||D||4e3),ei=q.default.useRef(null),eo=q.default.useRef(null),es=0===T,el=T+1<=b,ec=m.type,eg=!1!==m.dismissible,ey=m.className||"",eE=m.descriptionClassName||"",eb=q.default.useMemo(()=>v.findIndex(e=>e.toastId===m.id)||0,[v,m.id]),e_=q.default.useMemo(()=>{var e;return null!=(e=m.closeButton)?e:x},[m.closeButton,x]),eA=q.default.useMemo(()=>m.duration||D||4e3,[m.duration,D]),ek=q.default.useRef(0),ew=q.default.useRef(0),ex=q.default.useRef(0),eS=q.default.useRef(null),[eC,eN]=L.split("-"),eI=q.default.useMemo(()=>v.reduce((e,t,r)=>r>=eb?e:e+t.height,0),[v,eb]),eR=(()=>{let[e,t]=q.default.useState(document.hidden);return q.default.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),eD=m.invert||f,eL="loading"===ec;ew.current=q.default.useMemo(()=>eb*O+eI,[eb,eI]),q.default.useEffect(()=>{ea.current=eA},[eA]),q.default.useEffect(()=>{z(!0)},[]),q.default.useEffect(()=>{let e=eo.current;if(e){let t=e.getBoundingClientRect().height;return en(t),E(e=>[{toastId:m.id,height:t,position:m.position},...e]),()=>E(e=>e.filter(e=>e.toastId!==m.id))}},[E,m.id]),q.default.useLayoutEffect(()=>{if(!$)return;let e=eo.current,t=e.style.height;e.style.height="auto";let r=e.getBoundingClientRect().height;e.style.height=t,en(r),E(e=>e.find(e=>e.toastId===m.id)?e.map(e=>e.toastId===m.id?{...e,height:r}:e):[{toastId:m.id,height:r,position:m.position},...e])},[$,m.title,m.description,E,m.id,m.jsx,m.action,m.cancel]);let eO=q.default.useCallback(()=>{V(!0),et(ew.current),E(e=>e.filter(e=>e.toastId!==m.id)),setTimeout(()=>{k(m)},200)},[m,k,E,ew]);q.default.useEffect(()=>{let e;if((!m.promise||"loading"!==ec)&&m.duration!==1/0&&"loading"!==m.type){if(A||y||eR){if(ex.current<ek.current){let e=new Date().getTime()-ek.current;ea.current=ea.current-e}ex.current=new Date().getTime()}else ea.current!==1/0&&(ek.current=new Date().getTime(),e=setTimeout(()=>{null==m.onAutoClose||m.onAutoClose.call(m,m),eO()},ea.current));return()=>clearTimeout(e)}},[A,y,m,ec,eR,eO]),q.default.useEffect(()=>{m.delete&&(eO(),null==m.onDismiss||m.onDismiss.call(m,m))},[eO,m.delete]);let eP=m.icon||(null==F?void 0:F[ec])||(e=>{switch(e){case"success":return ed;case"info":return eh;case"warning":return ep;case"error":return ef;default:return null}})(ec);return q.default.createElement("li",{tabIndex:0,ref:eo,className:eT(I,ey,null==M?void 0:M.toast,null==m||null==(t=m.classNames)?void 0:t.toast,null==M?void 0:M.default,null==M?void 0:M[ec],null==m||null==(r=m.classNames)?void 0:r[ec]),"data-sonner-toast":"","data-rich-colors":null!=(u=m.richColors)?u:w,"data-styled":!(m.jsx||m.unstyled||g),"data-mounted":$,"data-promise":!!m.promise,"data-swiped":J,"data-removed":W,"data-visible":el,"data-y-position":eC,"data-x-position":eN,"data-index":T,"data-front":es,"data-swiping":Y,"data-dismissible":eg,"data-type":ec,"data-invert":eD,"data-swipe-out":K,"data-swipe-direction":H,"data-expanded":!!(A||P&&$),"data-testid":m.testId,style:{"--index":T,"--toasts-before":T,"--z-index":_.length-T,"--offset":`${W?ee:ew.current}px`,"--initial-height":P?"auto":`${er}px`,...S,...m.style},onDragEnd:()=>{Q(!1),U(null),eS.current=null},onPointerDown:e=>{2===e.button||eL||!eg||(ei.current=new Date,et(ew.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(Q(!0),eS.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,r,n,a;if(K||!eg)return;eS.current=null;let i=Number((null==(e=eo.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),o=Number((null==(t=eo.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),s=new Date().getTime()-(null==(r=ei.current)?void 0:r.getTime()),l="x"===j?i:o,c=Math.abs(l)/s;if(Math.abs(l)>=45||c>.11){et(ew.current),null==m.onDismiss||m.onDismiss.call(m,m),"x"===j?G(i>0?"right":"left"):G(o>0?"down":"up"),eO(),X(!0);return}null==(n=eo.current)||n.style.setProperty("--swipe-amount-x","0px"),null==(a=eo.current)||a.style.setProperty("--swipe-amount-y","0px"),Z(!1),Q(!1),U(null)},onPointerMove:t=>{var r,n,a,i;if(!eS.current||!eg||(null==(r=window.getSelection())?void 0:r.toString().length)>0)return;let o=t.clientY-eS.current.y,s=t.clientX-eS.current.x,l=null!=(i=e.swipeDirections)?i:function(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}(L);!j&&(Math.abs(s)>1||Math.abs(o)>1)&&U(Math.abs(s)>Math.abs(o)?"x":"y");let c={x:0,y:0},u=e=>1/(1.5+Math.abs(e)/20);if("y"===j){if(l.includes("top")||l.includes("bottom"))if(l.includes("top")&&o<0||l.includes("bottom")&&o>0)c.y=o;else{let e=o*u(o);c.y=Math.abs(e)<Math.abs(o)?e:o}}else if("x"===j&&(l.includes("left")||l.includes("right")))if(l.includes("left")&&s<0||l.includes("right")&&s>0)c.x=s;else{let e=s*u(s);c.x=Math.abs(e)<Math.abs(s)?e:s}(Math.abs(c.x)>0||Math.abs(c.y)>0)&&Z(!0),null==(n=eo.current)||n.style.setProperty("--swipe-amount-x",`${c.x}px`),null==(a=eo.current)||a.style.setProperty("--swipe-amount-y",`${c.y}px`)}},e_&&!m.jsx&&"loading"!==ec?q.default.createElement("button",{"aria-label":B,"data-disabled":eL,"data-close-button":!0,onClick:eL||!eg?()=>{}:()=>{eO(),null==m.onDismiss||m.onDismiss.call(m,m)},className:eT(null==M?void 0:M.closeButton,null==m||null==(n=m.classNames)?void 0:n.closeButton)},null!=(d=null==F?void 0:F.close)?d:em):null,(ec||m.icon||m.promise)&&null!==m.icon&&((null==F?void 0:F[ec])!==null||m.icon)?q.default.createElement("div",{"data-icon":"",className:eT(null==M?void 0:M.icon,null==m||null==(a=m.classNames)?void 0:a.icon)},m.promise||"loading"===m.type&&!m.icon?m.icon||((null==F?void 0:F.loading)?q.default.createElement("div",{className:eT(null==M?void 0:M.loader,null==m||null==(h=m.classNames)?void 0:h.loader,"sonner-loader"),"data-visible":"loading"===ec},F.loading):q.default.createElement(eu,{className:eT(null==M?void 0:M.loader,null==m||null==(p=m.classNames)?void 0:p.loader),visible:"loading"===ec})):null,"loading"!==m.type?eP:null):null,q.default.createElement("div",{"data-content":"",className:eT(null==M?void 0:M.content,null==m||null==(i=m.classNames)?void 0:i.content)},q.default.createElement("div",{"data-title":"",className:eT(null==M?void 0:M.title,null==m||null==(o=m.classNames)?void 0:o.title)},m.jsx?m.jsx:"function"==typeof m.title?m.title():m.title),m.description?q.default.createElement("div",{"data-description":"",className:eT(R,eE,null==M?void 0:M.description,null==m||null==(s=m.classNames)?void 0:s.description)},"function"==typeof m.description?m.description():m.description):null),q.default.isValidElement(m.cancel)?m.cancel:m.cancel&&ev(m.cancel)?q.default.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||C,onClick:e=>{!ev(m.cancel)||eg&&(null==m.cancel.onClick||m.cancel.onClick.call(m.cancel,e),eO())},className:eT(null==M?void 0:M.cancelButton,null==m||null==(l=m.classNames)?void 0:l.cancelButton)},m.cancel.label):null,q.default.isValidElement(m.action)?m.action:m.action&&ev(m.action)?q.default.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||N,onClick:e=>{!ev(m.action)||(null==m.action.onClick||m.action.onClick.call(m.action,e),e.defaultPrevented||eO())},className:eT(null==M?void 0:M.actionButton,null==m||null==(c=m.classNames)?void 0:c.actionButton)},m.action.label):null)};function eA(){if("undefined"==typeof window||"undefined"==typeof document)return"ltr";let e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}let ek=q.default.forwardRef(function(e,t){let{id:r,invert:n,position:a="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:s,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:p,duration:h,style:f,visibleToasts:m=3,toastOptions:g,dir:y=eA(),gap:E=14,icons:b,containerAriaLabel:v="Notifications"}=e,[T,_]=q.default.useState([]),A=q.default.useMemo(()=>r?T.filter(e=>e.toasterId===r):T.filter(e=>!e.toasterId),[T,r]),k=q.default.useMemo(()=>Array.from(new Set([a].concat(A.filter(e=>e.position).map(e=>e.position)))),[A,a]),[w,x]=q.default.useState([]),[S,C]=q.default.useState(!1),[N,I]=q.default.useState(!1),[R,D]=q.default.useState("system"!==d?d:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),L=q.default.useRef(null),O=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=q.default.useRef(null),M=q.default.useRef(!1),F=q.default.useCallback(e=>{_(t=>{var r;return(null==(r=t.find(t=>t.id===e.id))?void 0:r.delete)||ey.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return q.default.useEffect(()=>ey.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{_(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{el.default.flushSync(()=>{_(t=>{let r=t.findIndex(t=>t.id===e.id);return -1!==r?[...t.slice(0,r),{...t[r],...e},...t.slice(r+1)]:[e,...t]})})})}),[T]),q.default.useEffect(()=>{if("system"!==d)return void D(d);if("system"===d&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),"undefined"==typeof window)return;let e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{e?D("dark"):D("light")})}catch(t){e.addListener(({matches:e})=>{try{e?D("dark"):D("light")}catch(e){console.error(e)}})}},[d]),q.default.useEffect(()=>{T.length<=1&&C(!1)},[T]),q.default.useEffect(()=>{let e=e=>{var t,r;i.every(t=>e[t]||e.code===t)&&(C(!0),null==(r=L.current)||r.focus()),"Escape"===e.code&&(document.activeElement===L.current||(null==(t=L.current)?void 0:t.contains(document.activeElement)))&&C(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[i]),q.default.useEffect(()=>{if(L.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,M.current=!1)}},[L.current]),q.default.createElement("section",{ref:t,"aria-label":`${v} ${O}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((t,r)=>{var a;let i,[d,v]=t.split("-");return A.length?q.default.createElement("ol",{key:t,dir:"auto"===y?eA():y,tabIndex:-1,ref:L,className:l,"data-sonner-toaster":!0,"data-sonner-theme":R,"data-y-position":d,"data-x-position":v,style:{"--front-toast-height":`${(null==(a=w[0])?void 0:a.height)||0}px`,"--width":"356px","--gap":`${E}px`,...f,...(i={},[c,u].forEach((e,t)=>{let r=1===t,n=r?"--mobile-offset":"--offset",a=r?"16px":"24px";function o(e){["top","right","bottom","left"].forEach(t=>{i[`${n}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?o(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?i[`${n}-${t}`]=a:i[`${n}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):o(a)}),i)},onBlur:e=>{M.current&&!e.currentTarget.contains(e.relatedTarget)&&(M.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:e=>{!(e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible)&&(M.current||(M.current=!0,P.current=e.relatedTarget))},onMouseEnter:()=>C(!0),onMouseMove:()=>C(!0),onMouseLeave:()=>{N||C(!1)},onDragEnd:()=>C(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||I(!0)},onPointerUp:()=>I(!1)},A.filter(e=>!e.position&&0===r||e.position===t).map((r,a)=>{var i,l;return q.default.createElement(e_,{key:r.id,icons:b,index:a,toast:r,defaultRichColors:p,duration:null!=(i=null==g?void 0:g.duration)?i:h,className:null==g?void 0:g.className,descriptionClassName:null==g?void 0:g.descriptionClassName,invert:n,visibleToasts:m,closeButton:null!=(l=null==g?void 0:g.closeButton)?l:s,interacting:N,position:t,style:null==g?void 0:g.style,unstyled:null==g?void 0:g.unstyled,classNames:null==g?void 0:g.classNames,cancelButtonStyle:null==g?void 0:g.cancelButtonStyle,actionButtonStyle:null==g?void 0:g.actionButtonStyle,closeButtonAriaLabel:null==g?void 0:g.closeButtonAriaLabel,removeToast:F,toasts:A.filter(e=>e.position==r.position),heights:w.filter(e=>e.position==r.position),setHeights:x,expandByDefault:o,gap:E,expanded:S,swipeDirections:e.swipeDirections})})):null}))});e.s(["Toaster",()=>ek,"toast",()=>eb],806746);let ew=(0,z.default)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function ex({isOpen:e,onClose:t,onSubmit:r,isSubmitting:n=!1}){let[a,i]=(0,q.useState)(""),[o,s]=(0,q.useState)(null),l=(0,q.useRef)(null);(0,q.useEffect)(()=>{e&&l.current&&l.current.focus()},[e]),(0,q.useEffect)(()=>{e||(i(""),s(null))},[e]),(0,q.useEffect)(()=>{let r=r=>{"Escape"===r.key&&e&&!n&&t()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,n,t]);let c=(0,q.useCallback)(async e=>{let t;e.preventDefault(),s(null);try{t=""===a.trim()?null:JSON.parse(a)}catch{s("Invalid JSON. Please check your input.");return}await r(t)},[a,r]),u=(0,q.useCallback)(e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&!n&&(e.preventDefault(),c(e))},[c,n]);return e?(0,$.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"resolve-hook-modal-title",children:[(0,$.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:n?void 0:t}),(0,$.jsxs)("div",{className:(0,V.default)("relative z-10 w-full max-w-lg mx-4","bg-white dark:bg-gray-900 rounded-lg shadow-xl","border border-gray-200 dark:border-gray-700"),children:[(0,$.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:[(0,$.jsx)("h2",{id:"resolve-hook-modal-title",className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:"Resolve Hook"}),(0,$.jsx)("button",{type:"button",onClick:t,disabled:n,className:(0,V.default)("p-1 rounded-md transition-colors","text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Close modal",children:(0,$.jsx)(ew,{className:"h-5 w-5"})})]}),(0,$.jsxs)("form",{onSubmit:c,children:[(0,$.jsxs)("div",{className:"px-4 py-4",children:[(0,$.jsx)("label",{htmlFor:"json-payload",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"JSON Payload"}),(0,$.jsxs)("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-3",children:["Enter a JSON value to send to the hook. Leave empty to send"," ",(0,$.jsx)("code",{className:"px-1 py-0.5 bg-gray-100 dark:bg-gray-800 rounded text-xs",children:"null"}),"."]}),(0,$.jsx)("textarea",{ref:l,id:"json-payload",value:a,onChange:e=>{i(e.target.value),s(null)},onKeyDown:u,disabled:n,placeholder:'{"key": "value"}',className:(0,V.default)("w-full h-40 px-3 py-2 font-mono text-sm","bg-gray-50 dark:bg-gray-800","border rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed","placeholder:text-gray-400 dark:placeholder:text-gray-500",o?"border-red-500 dark:border-red-400":"border-gray-300 dark:border-gray-600")}),o&&(0,$.jsx)("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:o}),(0,$.jsxs)("p",{className:"mt-2 text-xs text-gray-500 dark:text-gray-400",children:["Press"," ",(0,$.jsx)("kbd",{className:"px-1.5 py-0.5 text-xs bg-gray-100 dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded",children:"⌘"})," ","+"," ",(0,$.jsx)("kbd",{className:"px-1.5 py-0.5 text-xs bg-gray-100 dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded",children:"Enter"})," ","to submit"]})]}),(0,$.jsxs)("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-gray-200 dark:border-gray-700",children:[(0,$.jsx)("button",{type:"button",onClick:t,disabled:n,className:(0,V.default)("px-4 py-2 text-sm font-medium rounded-md transition-colors","text-gray-700 dark:text-gray-300","bg-gray-100 dark:bg-gray-800","hover:bg-gray-200 dark:hover:bg-gray-700","disabled:opacity-50 disabled:cursor-not-allowed"),children:"Cancel"}),(0,$.jsxs)("button",{type:"submit",disabled:n,className:(0,V.default)("flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md transition-colors","text-white bg-blue-600 hover:bg-blue-700","dark:bg-blue-500 dark:hover:bg-blue-600","disabled:opacity-50 disabled:cursor-not-allowed"),children:[(0,$.jsx)(es,{className:"h-4 w-4"}),n?"Sending...":"Send Payload"]})]})]})]})]}):null}function eS({env:e,callbacks:t}){let[r,n]=(0,q.useState)(!1),[a,i]=(0,q.useState)(null),o=(0,q.useCallback)(e=>{i(e)},[]),s=(0,q.useCallback)(()=>{i(null)},[]),l=(0,q.useCallback)(async o=>{if(!r&&a)try{n(!0),await (0,G.resumeHook)(e,a.token,o),eb.success("Hook resolved",{description:"The payload has been sent and the hook resolved."}),i(null),t?.onSuccess?.()}catch(e){console.error("Failed to resolve hook:",e),eb.error("Failed to resolve hook",{description:e instanceof Error?e.message:"An unknown error occurred"})}finally{n(!1)}},[e,a,r,t]);return{isResolving:r,selectedHook:a,openResolveModal:o,closeResolveModal:s,handleResolve:l}}function eC({hook:e,stopPropagation:t=!1,onResolveClick:r,DropdownMenuItem:n}){return(0,$.jsxs)(n,{onClick:n=>{t&&n.stopPropagation(),r(e)},children:[(0,$.jsx)(es,{className:"h-4 w-4 mr-2"}),"Resolve Hook"]})}function eN({hookActions:e}){let{selectedHook:t,closeResolveModal:r,handleResolve:n,isResolving:a}=e;return(0,$.jsx)(ex,{isOpen:null!==t,onClose:r,onSubmit:n,isSubmitting:a})}function eI(e){if(!e||0===e.length)return{hasPendingSleeps:!1,hasPendingSteps:!1,hasPendingHooks:!1,pendingSleepIds:[],pendingStepIds:[],pendingHookIds:[],lastStepActivityAt:null,lastStepCompletionAt:null};let t=new Map,r=new Set,n=new Map,a=new Set,i=new Map,o=new Set,s=null,l=null;for(let c of e){let e=c.correlationId;if(e)switch(c.eventType){case"wait_created":t.set(e,c);break;case"wait_completed":r.add(e);break;case"step_started":n.set(e,c),(!s||new Date(c.createdAt)>s)&&(s=new Date(c.createdAt));break;case"step_retrying":(!s||new Date(c.createdAt)>s)&&(s=new Date(c.createdAt));break;case"step_completed":case"step_failed":a.add(e),(!l||new Date(c.createdAt)>l)&&(l=new Date(c.createdAt));break;case"hook_created":i.set(e,c);break;case"hook_disposed":o.add(e)}}let c=Array.from(t.keys()).filter(e=>!r.has(e)),u=Array.from(n.keys()).filter(e=>!a.has(e)),d=Array.from(i.keys()).filter(e=>!o.has(e));return{hasPendingSleeps:c.length>0,hasPendingSteps:u.length>0,hasPendingHooks:d.length>0,pendingSleepIds:c,pendingStepIds:u,pendingHookIds:d,lastStepActivityAt:s,lastStepCompletionAt:l}}function eR(e,t){if("completed"===t||"failed"===t||"cancelled"===t)return!1;let r=eI(e);if(r.hasPendingSleeps||r.hasPendingHooks)return!1;let n=Date.now();return!!(r.lastStepActivityAt&&n-r.lastStepActivityAt.getTime()>18e5||!r.hasPendingSteps&&r.lastStepCompletionAt&&n-r.lastStepCompletionAt.getTime()>3e5)||!r.lastStepActivityAt&&!r.hasPendingSteps&&!r.hasPendingSleeps&&!r.hasPendingHooks}function eD({className:e,...t}){return(0,$.jsx)("div",{className:(0,X.cn)("animate-pulse rounded-md bg-muted",e),...t})}e.s(["default",()=>ew],897884),e.s(["X",()=>ew],259280),e.s(["HookResolveModalWrapper",()=>eN,"ResolveHookDropdownItem",()=>eC,"useHookActions",()=>eS],932671),e.s(["analyzeEvents",()=>eI,"shouldShowReenqueueButton",()=>eR],257151);let eL=(0,z.default)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["Zap",()=>eL],545739);var eO=e.i(483309);e.s(["ERROR_REVALIDATE_EVENT",()=>3,"FOCUS_EVENT",()=>0,"MUTATE_EVENT",()=>2,"RECONNECT_EVENT",()=>1],387876);var eP=Object.prototype.hasOwnProperty;let eM=new WeakMap,eF=()=>{},eB=eF(),ej=Object,eU=e=>e===eB,eH=(e,t)=>({...e,...t}),eG={},e$={},ez="undefined",eW=typeof window!=ez,eq=typeof document!=ez,eV=eW&&"Deno"in window,eY=(e,t)=>{let r=eM.get(e);return[()=>!eU(t)&&e.get(t)||eG,n=>{if(!eU(t)){let a=e.get(t);t in e$||(e$[t]=a),r[5](t,eH(a,n),a||eG)}},r[6],()=>!eU(t)&&t in e$?e$[t]:!eU(t)&&e.get(t)||eG]},eQ=!0,[eK,eX]=eW&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[eF,eF],eJ={initFocus:e=>(eq&&document.addEventListener("visibilitychange",e),eK("focus",e),()=>{eq&&document.removeEventListener("visibilitychange",e),eX("focus",e)}),initReconnect:e=>{let t=()=>{eQ=!0,e()},r=()=>{eQ=!1};return eK("online",t),eK("offline",r),()=>{eX("online",t),eX("offline",r)}}},eZ=!q.default.useId,e0=!eW||eV,e1=e0?q.useEffect:q.useLayoutEffect,e2="undefined"!=typeof navigator&&navigator.connection,e5=!e0&&e2&&(["slow-2g","2g"].includes(e2.effectiveType)||e2.saveData),e3=new WeakMap,e4=(e,t)=>e===`[object ${t}]`,e6=0,e8=e=>{let t,r,n=typeof e,a=ej.prototype.toString.call(e),i=e4(a,"Date"),o=e4(a,"RegExp"),s=e4(a,"Object");if(ej(e)!==e||i||o)t=i?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=e3.get(e))return t;if(t=++e6+"~",e3.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=e8(e[r])+",";e3.set(e,t)}if(s){t="#";let n=ej.keys(e).sort();for(;!eU(r=n.pop());)eU(e[r])||(t+=r+":"+e8(e[r])+",");e3.set(e,t)}}return t},e9=e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?e8(e):"",t]},e7=0,te=()=>++e7;async function tt(...e){let[t,r,n,a]=e,i=eH({populateCache:!0,throwOnError:!0},"boolean"==typeof a?{revalidate:a}:a||{}),o=i.populateCache,s=i.rollbackOnError,l=i.optimisticData,c=i.throwOnError;if("function"==typeof r){let e=[];for(let n of t.keys())!/^\$(inf|sub)\$/.test(n)&&r(t.get(n)._k)&&e.push(n);return Promise.all(e.map(u))}return u(r);async function u(r){let a,[u]=e9(r);if(!u)return;let[d,p]=eY(t,u),[h,f,m,g]=eM.get(t),y=()=>{let e=h[u];return("function"==typeof i.revalidate?i.revalidate(d().data,r):!1!==i.revalidate)&&(delete m[u],delete g[u],e&&e[0])?e[0](2).then(()=>d().data):d().data};if(e.length<3)return y();let E=n,b=!1,v=te();f[u]=[v,0];let T=!eU(l),_=d(),A=_.data,k=_._c,w=eU(k)?A:k;if(T&&p({data:l="function"==typeof l?l(w,A):l,_c:w}),"function"==typeof E)try{E=E(w)}catch(e){a=e,b=!0}if(E&&"function"==typeof E.then){let e;if(E=await E.catch(e=>{a=e,b=!0}),v!==f[u][0]){if(b)throw a;return E}b&&T&&(e=a,"function"==typeof s?s(e):!1!==s)&&(o=!0,p({data:w,_c:eB}))}if(o&&!b&&("function"==typeof o?p({data:o(E,w),error:eB,_c:eB}):p({data:E,error:eB,_c:eB})),f[u][1]=te(),Promise.resolve(y()).then(()=>{p({_c:eB})}),b){if(c)throw a;return}return E}}let tr=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},tn=(e,t)=>{if(!eM.has(e)){let r=eH(eJ,t),n=Object.create(null),a=tt.bind(eB,e),i=eF,o=Object.create(null),s=(e,t)=>{let r=o[e]||[];return o[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},l=(t,r,n)=>{e.set(t,r);let a=o[t];if(a)for(let e of a)e(r,n)},c=()=>{if(!eM.has(e)&&(eM.set(e,[n,Object.create(null),Object.create(null),Object.create(null),a,l,s]),!e0)){let t=r.initFocus(setTimeout.bind(eB,tr.bind(eB,n,0))),a=r.initReconnect(setTimeout.bind(eB,tr.bind(eB,n,1)));i=()=>{t&&t(),a&&a(),eM.delete(e)}}};return c(),[e,a,c,i]}return[e,eM.get(e)[4]]},[ta,ti]=tn(new Map),to=eH({onLoadingSlow:eF,onSuccess:eF,onError:eF,onErrorRetry:(e,t,r,n,a)=>{let i=r.errorRetryCount,o=a.retryCount,s=~~((Math.random()+.5)*(1<<(o<8?o:8)))*r.errorRetryInterval;(eU(i)||!(o>i))&&setTimeout(n,s,a)},onDiscarded:eF,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:e5?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:e5?5e3:3e3,compare:function e(t,r){var n,a;if(t===r)return!0;if(t&&r&&(n=t.constructor)===r.constructor){if(n===Date)return t.getTime()===r.getTime();if(n===RegExp)return t.toString()===r.toString();if(n===Array){if((a=t.length)===r.length)for(;a--&&e(t[a],r[a]););return -1===a}if(!n||"object"==typeof t){for(n in a=0,t)if(eP.call(t,n)&&++a&&!eP.call(r,n)||!(n in r)||!e(t[n],r[n]))return!1;return Object.keys(r).length===a}}return t!=t&&r!=r},isPaused:()=>!1,cache:ta,mutate:ti,fallback:{}},{isOnline:()=>eQ,isVisible:()=>{let e=eq&&document.visibilityState;return eU(e)||"hidden"!==e}}),ts=(e,t)=>{let r=eH(e,t);if(t){let{use:n,fallback:a}=e,{use:i,fallback:o}=t;n&&i&&(r.use=n.concat(i)),a&&o&&(r.fallback=eH(a,o))}return r},tl=(0,q.createContext)({});var tc=e.i(387876);let tu=eW&&window.__SWR_DEVTOOLS_USE__,td=(tu?window.__SWR_DEVTOOLS_USE__:[]).concat(e=>(t,r,n)=>{let a=r&&((...e)=>{let[n]=e9(t),[,,,a]=eM.get(ta);if(n.startsWith("$inf$"))return r(...e);let i=a[n];return eU(i)?r(...e):(delete a[n],i)});return e(t,a,n)});tu&&(window.__SWR_DEVTOOLS_REACT__=q.default);let tp=()=>{},th=tp(),tf=(new WeakMap,q.default.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}})),tm={dedupe:!0},tg=Promise.resolve(eB);ej.defineProperty(e=>{let{value:t}=e,r=(0,q.useContext)(tl),n="function"==typeof t,a=(0,q.useMemo)(()=>n?t(r):t,[n,r,t]),i=(0,q.useMemo)(()=>n?a:ts(r,a),[n,r,a]),o=a&&a.provider,s=(0,q.useRef)(eB);o&&!s.current&&(s.current=tn(o(i.cache||ta),a));let l=s.current;return l&&(i.cache=l[0],i.mutate=l[1]),e1(()=>{if(l)return l[2]&&l[2](),l[3]},[]),(0,q.createElement)(tl.Provider,eH(e,{value:i}))},"defaultValue",{value:to});let ty=(n=(e,t,r)=>{let{cache:n,compare:a,suspense:i,fallbackData:o,revalidateOnMount:s,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:d,keepPreviousData:p}=r,[h,f,m,g]=eM.get(n),[y,E]=e9(e),b=(0,q.useRef)(!1),v=(0,q.useRef)(!1),T=(0,q.useRef)(y),_=(0,q.useRef)(t),A=(0,q.useRef)(r),k=()=>A.current.isVisible()&&A.current.isOnline(),[w,x,S,C]=eY(n,y),N=(0,q.useRef)({}).current,I=eU(o)?eU(r.fallback)?eB:r.fallback[y]:o,R=(e,t)=>{for(let r in N)if("data"===r){if(!a(e[r],t[r])&&(!eU(e[r])||!a(U,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},D=(0,q.useMemo)(()=>{let e=!!y&&!!t&&(eU(s)?!A.current.isPaused()&&!i&&!1!==l:s),r=t=>{let r=eH(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=w(),a=C(),o=r(n),c=n===a?o:r(a),u=o;return[()=>{let e=r(w());return R(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>c]},[n,y]),L=(0,eO.useSyncExternalStore)((0,q.useCallback)(e=>S(y,(t,r)=>{R(r,t)||e()}),[n,y]),D[0],D[1]),O=!b.current,P=h[y]&&h[y].length>0,M=L.data,F=eU(M)?I&&"function"==typeof I.then?tf(I):I:M,B=L.error,j=(0,q.useRef)(F),U=p?eU(M)?eU(j.current)?F:j.current:M:F,H=(!P||!!eU(B))&&(O&&!eU(s)?s:!A.current.isPaused()&&(i?!eU(F)&&l:eU(F)||l)),G=!!(y&&t&&O&&H),$=eU(L.isValidating)?G:L.isValidating,z=eU(L.isLoading)?G:L.isLoading,W=(0,q.useCallback)(async e=>{let t,n,i=_.current;if(!y||!i||v.current||A.current.isPaused())return!1;let o=!0,s=e||{},l=!m[y]||!s.dedupe,c=()=>eZ?!v.current&&y===T.current&&b.current:y===T.current,u={isValidating:!1,isLoading:!1},d=()=>{x(u)},p=()=>{let e=m[y];e&&e[1]===n&&delete m[y]},g={isValidating:!0};eU(w().data)&&(g.isLoading=!0);try{if(l&&(x(g),r.loadingTimeout&&eU(w().data)&&setTimeout(()=>{o&&c()&&A.current.onLoadingSlow(y,r)},r.loadingTimeout),m[y]=[i(E),te()]),[t,n]=m[y],t=await t,l&&setTimeout(p,r.dedupingInterval),!m[y]||m[y][1]!==n)return l&&c()&&A.current.onDiscarded(y),!1;u.error=eB;let e=f[y];if(!eU(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return d(),l&&c()&&A.current.onDiscarded(y),!1;let s=w().data;u.data=a(s,t)?s:t,l&&c()&&A.current.onSuccess(t,y,r)}catch(r){p();let e=A.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(u.error=r,l&&c())&&(e.onError(r,y,e),(!0===t||"function"==typeof t&&t(r))&&(!A.current.revalidateOnFocus||!A.current.revalidateOnReconnect||k())&&e.onErrorRetry(r,y,e,e=>{let t=h[y];t&&t[0]&&t[0](tc.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0}))}return o=!1,d(),!0},[y,n]),V=(0,q.useCallback)((...e)=>tt(n,T.current,...e),[]);if(e1(()=>{_.current=t,A.current=r,eU(M)||(j.current=M)}),e1(()=>{var e;let t;if(!y)return;let r=W.bind(eB,tm),n=0;A.current.revalidateOnFocus&&(n=Date.now()+A.current.focusThrottleInterval);let a=(e=(e,t={})=>{if(e==tc.FOCUS_EVENT){let e=Date.now();A.current.revalidateOnFocus&&e>n&&k()&&(n=e+A.current.focusThrottleInterval,r())}else if(e==tc.RECONNECT_EVENT)A.current.revalidateOnReconnect&&k()&&r();else if(e==tc.MUTATE_EVENT)return W();else if(e==tc.ERROR_REVALIDATE_EVENT)return W(t)},(t=h[y]||(h[y]=[])).push(e),()=>{let r=t.indexOf(e);r>=0&&(t[r]=t[t.length-1],t.pop())});if(v.current=!1,T.current=y,b.current=!0,x({_k:E}),H&&!m[y])if(eU(F)||e0)r();else eW&&typeof window.requestAnimationFrame!=ez?window.requestAnimationFrame(r):setTimeout(r,1);return()=>{v.current=!0,a()}},[y]),e1(()=>{let e;function t(){let t="function"==typeof c?c(w().data):c;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!w().error&&(u||A.current.isVisible())&&(d||A.current.isOnline())?W(tm).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[c,u,d,y]),(0,q.useDebugValue)(U),i){let e=y&&eU(F);if(!eZ&&e0&&e)throw Error("Fallback data is required when using Suspense in SSR.");e&&(_.current=t,A.current=r,v.current=!1);let n=g[y];if(tf(!eU(n)&&e?V(n):tg),!eU(B)&&e)throw B;let a=e?W(tm):tg;!eU(U)&&e&&(a.status="fulfilled",a.value=!0),tf(a)}return{mutate:V,get data(){return N.data=!0,U},get error(){return N.error=!0,B},get isValidating(){return N.isValidating=!0,$},get isLoading(){return N.isLoading=!0,z}}},function(...e){let t,r=(t=(0,q.useContext)(tl),(0,q.useMemo)(()=>eH(to,t),[t])),[a,i,o]="function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],s=ts(r,o),l=n,{use:c}=s,u=(c||[]).concat(td);for(let e=u.length;e--;)l=u[e](l);return l(a,i||s.fetcher||null,s)});e.s(["default",()=>ty],335468);var tE=e.i(504295),tb=e.i(885636);function tv(){}function tT(){}function t_(e){let t=[],r=String(e||""),n=r.indexOf(","),a=0,i=!1;for(;!i;){-1===n&&(n=r.length,i=!0);let e=r.slice(a,n).trim();(e||!i)&&t.push(e),a=n+1,n=r.indexOf(",",a)}return t}function tA(e,t){let r=t||{};return(""===e[e.length-1]?[...e,""]:e).join((r.padRight?" ":"")+","+(!1===r.padLeft?"":" ")).trim()}let tk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tx={};function tS(e,t){return((t||tx).jsx?tw:tk).test(e)}let tC=/[ \t\n\f\r]/g;function tN(e){return"object"==typeof e?"text"===e.type&&tI(e.value):tI(e)}function tI(e){return""===e.replace(tC,"")}class tR{constructor(e,t){this.attribute=t,this.property=e}}tR.prototype.attribute="",tR.prototype.booleanish=!1,tR.prototype.boolean=!1,tR.prototype.commaOrSpaceSeparated=!1,tR.prototype.commaSeparated=!1,tR.prototype.defined=!1,tR.prototype.mustUseProperty=!1,tR.prototype.number=!1,tR.prototype.overloadedBoolean=!1,tR.prototype.property="",tR.prototype.spaceSeparated=!1,tR.prototype.space=void 0;let tD=0,tL=tU(),tO=tU(),tP=tU(),tM=tU(),tF=tU(),tB=tU(),tj=tU();function tU(){return 2**++tD}e.s(["boolean",0,tL,"booleanish",0,tO,"commaOrSpaceSeparated",0,tj,"commaSeparated",0,tB,"number",0,tM,"overloadedBoolean",0,tP,"spaceSeparated",0,tF],383954);var tH=e.i(383954);let tG=Object.keys(tH);class t$ extends tR{constructor(e,t,r,n){let a=-1;if(super(e,t),function(e,t,r){r&&(e[t]=r)}(this,"space",n),"number"==typeof r)for(;++a<tG.length;){const e=tG[a];!function(e,t,r){r&&(e[t]=r)}(this,tG[a],(r&tH[e])===tH[e])}}}function tz(e){return e.toLowerCase()}t$.prototype.defined=!0;let tW=/[A-Z]/g,tq=/-[a-z]/g,tV=/^data[-\w.:]+$/i;function tY(e,t){let r=tz(t),n=t,a=tR;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&"data"===r.slice(0,4)&&tV.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(tq,tK);n="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!tq.test(e)){let r=e.replace(tW,tQ);"-"!==r.charAt(0)&&(r="-"+r),t="data"+r}}a=t$}return new a(n,t)}function tQ(e){return"-"+e.toLowerCase()}function tK(e){return e.charAt(1).toUpperCase()}let tX={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};class tJ{constructor(e,t,r){this.normal=t,this.property=e,r&&(this.space=r)}}function tZ(e,t){let r={},n={};for(let t of e)Object.assign(r,t.property),Object.assign(n,t.normal);return new tJ(r,n,t)}function t0(e){let t={},r={};for(let[n,a]of Object.entries(e.properties)){let i=new t$(n,e.transform(e.attributes||{},n),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,r[tz(n)]=n,r[tz(i.attribute)]=n}return new tJ(t,r,e.space)}tJ.prototype.normal={},tJ.prototype.property={},tJ.prototype.space=void 0;let t1=t0({properties:{ariaActiveDescendant:null,ariaAtomic:tO,ariaAutoComplete:null,ariaBusy:tO,ariaChecked:tO,ariaColCount:tM,ariaColIndex:tM,ariaColSpan:tM,ariaControls:tF,ariaCurrent:null,ariaDescribedBy:tF,ariaDetails:null,ariaDisabled:tO,ariaDropEffect:tF,ariaErrorMessage:null,ariaExpanded:tO,ariaFlowTo:tF,ariaGrabbed:tO,ariaHasPopup:null,ariaHidden:tO,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:tF,ariaLevel:tM,ariaLive:null,ariaModal:tO,ariaMultiLine:tO,ariaMultiSelectable:tO,ariaOrientation:null,ariaOwns:tF,ariaPlaceholder:null,ariaPosInSet:tM,ariaPressed:tO,ariaReadOnly:tO,ariaRelevant:null,ariaRequired:tO,ariaRoleDescription:tF,ariaRowCount:tM,ariaRowIndex:tM,ariaRowSpan:tM,ariaSelected:tO,ariaSetSize:tM,ariaSort:null,ariaValueMax:tM,ariaValueMin:tM,ariaValueNow:tM,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function t2(e,t){return t in e?e[t]:t}function t5(e,t){return t2(e,t.toLowerCase())}let t3=t0({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:tB,acceptCharset:tF,accessKey:tF,action:null,allow:null,allowFullScreen:tL,allowPaymentRequest:tL,allowUserMedia:tL,alt:null,as:null,async:tL,autoCapitalize:null,autoComplete:tF,autoFocus:tL,autoPlay:tL,blocking:tF,capture:null,charSet:null,checked:tL,cite:null,className:tF,cols:tM,colSpan:null,content:null,contentEditable:tO,controls:tL,controlsList:tF,coords:tM|tB,crossOrigin:null,data:null,dateTime:null,decoding:null,default:tL,defer:tL,dir:null,dirName:null,disabled:tL,download:tP,draggable:tO,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:tL,formTarget:null,headers:tF,height:tM,hidden:tP,high:tM,href:null,hrefLang:null,htmlFor:tF,httpEquiv:tF,id:null,imageSizes:null,imageSrcSet:null,inert:tL,inputMode:null,integrity:null,is:null,isMap:tL,itemId:null,itemProp:tF,itemRef:tF,itemScope:tL,itemType:tF,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:tL,low:tM,manifest:null,max:null,maxLength:tM,media:null,method:null,min:null,minLength:tM,multiple:tL,muted:tL,name:null,nonce:null,noModule:tL,noValidate:tL,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:tL,optimum:tM,pattern:null,ping:tF,placeholder:null,playsInline:tL,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:tL,referrerPolicy:null,rel:tF,required:tL,reversed:tL,rows:tM,rowSpan:tM,sandbox:tF,scope:null,scoped:tL,seamless:tL,selected:tL,shadowRootClonable:tL,shadowRootDelegatesFocus:tL,shadowRootMode:null,shape:null,size:tM,sizes:null,slot:null,span:tM,spellCheck:tO,src:null,srcDoc:null,srcLang:null,srcSet:null,start:tM,step:null,style:null,tabIndex:tM,target:null,title:null,translate:null,type:null,typeMustMatch:tL,useMap:null,value:tO,width:tM,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:tF,axis:null,background:null,bgColor:null,border:tM,borderColor:null,bottomMargin:tM,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:tL,declare:tL,event:null,face:null,frame:null,frameBorder:null,hSpace:tM,leftMargin:tM,link:null,longDesc:null,lowSrc:null,marginHeight:tM,marginWidth:tM,noResize:tL,noHref:tL,noShade:tL,noWrap:tL,object:null,profile:null,prompt:null,rev:null,rightMargin:tM,rules:null,scheme:null,scrolling:tO,standby:null,summary:null,text:null,topMargin:tM,valueType:null,version:null,vAlign:null,vLink:null,vSpace:tM,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:tL,disableRemotePlayback:tL,prefix:null,property:null,results:tM,security:null,unselectable:null},space:"html",transform:t5}),t4=t0({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:tj,accentHeight:tM,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:tM,amplitude:tM,arabicForm:null,ascent:tM,attributeName:null,attributeType:null,azimuth:tM,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:tM,by:null,calcMode:null,capHeight:tM,className:tF,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:tM,diffuseConstant:tM,direction:null,display:null,dur:null,divisor:tM,dominantBaseline:null,download:tL,dx:null,dy:null,edgeMode:null,editable:null,elevation:tM,enableBackground:null,end:null,event:null,exponent:tM,externalResourcesRequired:null,fill:null,fillOpacity:tM,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:tB,g2:tB,glyphName:tB,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:tM,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:tM,horizOriginX:tM,horizOriginY:tM,id:null,ideographic:tM,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:tM,k:tM,k1:tM,k2:tM,k3:tM,k4:tM,kernelMatrix:tj,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:tM,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:tM,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:tM,overlineThickness:tM,paintOrder:null,panose1:null,path:null,pathLength:tM,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:tF,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:tM,pointsAtY:tM,pointsAtZ:tM,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:tj,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:tj,rev:tj,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:tj,requiredFeatures:tj,requiredFonts:tj,requiredFormats:tj,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:tM,specularExponent:tM,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:tM,strikethroughThickness:tM,string:null,stroke:null,strokeDashArray:tj,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:tM,strokeOpacity:tM,strokeWidth:null,style:null,surfaceScale:tM,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:tj,tabIndex:tM,tableValues:null,target:null,targetX:tM,targetY:tM,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:tj,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:tM,underlineThickness:tM,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:tM,values:null,vAlphabetic:tM,vMathematical:tM,vectorEffect:null,vHanging:tM,vIdeographic:tM,version:null,vertAdvY:tM,vertOriginX:tM,vertOriginY:tM,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:tM,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:t2}),t6=t0({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),t8=t0({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:t5}),t9=t0({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),t7=tZ([t1,t3,t6,t8,t9],"html"),re=tZ([t1,t4,t6,t8,t9],"svg");function rt(e){let t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function rr(e){return e.join(" ").trim()}var rn=e.i(411341);let ra=ro("end"),ri=ro("start");function ro(e){return function(t){let r=t&&t.position&&t.position[e]||{};if("number"==typeof r.line&&r.line>0&&"number"==typeof r.column&&r.column>0)return{line:r.line,column:r.column,offset:"number"==typeof r.offset&&r.offset>-1?r.offset:void 0}}}function rs(e){return e&&"object"==typeof e?"position"in e||"type"in e?rc(e.position):"start"in e||"end"in e?rc(e):"line"in e||"column"in e?rl(e):"":""}function rl(e){return ru(e&&e.line)+":"+ru(e&&e.column)}function rc(e){return rl(e&&e.start)+"-"+rl(e&&e.end)}function ru(e){return e&&"number"==typeof e?e:1}class rd extends Error{constructor(e,t,r){super(),"string"==typeof t&&(r=t,t=void 0);let n="",a={},i=!1;if(t&&(a="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?n=e:!a.cause&&e&&(i=!0,n=e.message,a.cause=e),!a.ruleId&&!a.source&&"string"==typeof r){const e=r.indexOf(":");-1===e?a.ruleId=r:(a.source=r.slice(0,e),a.ruleId=r.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){const e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=o?o.line:void 0,this.name=rs(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=i&&a.cause&&"string"==typeof a.cause.stack?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}rd.prototype.file="",rd.prototype.name="",rd.prototype.reason="",rd.prototype.message="",rd.prototype.stack="",rd.prototype.column=void 0,rd.prototype.line=void 0,rd.prototype.ancestors=void 0,rd.prototype.cause=void 0,rd.prototype.fatal=void 0,rd.prototype.place=void 0,rd.prototype.ruleId=void 0,rd.prototype.source=void 0;let rp={}.hasOwnProperty,rh=new Map,rf=/[A-Z]/g,rm=new Set(["table","tbody","thead","tfoot","tr"]),rg=new Set(["td","th"]),ry="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function rE(e,t,r){var n,a,i,o,s,l,c,u,d;let p,h,f,m,g,y,E,b,v,T,_;return"element"===t.type?(n=e,a=t,i=r,h=p=n.schema,"svg"===a.tagName.toLowerCase()&&"html"===p.space&&(n.schema=re),n.ancestors.push(a),f=r_(n,a.tagName,!1),m=function(e,t){let r,n,a={};for(n in t.properties)if("children"!==n&&rp.call(t.properties,n)){let i=function(e,t,r){let n=tY(e.schema,t);if(!(null==r||"number"==typeof r&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?tA(r):rr(r)),"style"===n.property){let t="object"==typeof r?r:function(e,t){try{return(0,rn.default)(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};let t=new rd("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=ry+"#cannot-parse-style-attribute",t}}(e,String(r));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,r={};for(t in e)rp.call(e,t)&&(r[function(e){let t=e.replace(rf,rk);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return r}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&n.space?tX[n.property]||n.property:n.attribute,r]}}(e,n,t.properties[n]);if(i){let[n,o]=i;e.tableCellAlignToStyle&&"align"===n&&"string"==typeof o&&rg.has(t.tagName)?r=o:a[n]=o}}return r&&((a.style||(a.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r),a}(n,a),g=rT(n,a),rm.has(a.tagName)&&(g=g.filter(function(e){return"string"!=typeof e||!tN(e)})),rb(n,m,f,a),rv(m,g),n.ancestors.pop(),n.schema=p,n.create(a,f,m,i)):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){let r=t.data.estree.body[0];return tv("ExpressionStatement"===r.type),e.evaluater.evaluateExpression(r.expression)}rA(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?(o=e,s=t,l=r,E=y=o.schema,"svg"===s.name&&"html"===y.space&&(o.schema=re),o.ancestors.push(s),b=null===s.name?o.Fragment:r_(o,s.name,!0),v=function(e,t){let r={};for(let n of t.attributes)if("mdxJsxExpressionAttribute"===n.type)if(n.data&&n.data.estree&&e.evaluater){let t=n.data.estree.body[0];tv("ExpressionStatement"===t.type);let a=t.expression;tv("ObjectExpression"===a.type);let i=a.properties[0];tv("SpreadElement"===i.type),Object.assign(r,e.evaluater.evaluateExpression(i.argument))}else rA(e,t.position);else{let a,i=n.name;if(n.value&&"object"==typeof n.value)if(n.value.data&&n.value.data.estree&&e.evaluater){let t=n.value.data.estree.body[0];tv("ExpressionStatement"===t.type),a=e.evaluater.evaluateExpression(t.expression)}else rA(e,t.position);else a=null===n.value||n.value;r[i]=a}return r}(o,s),T=rT(o,s),rb(o,v,b,s),rv(v,T),o.ancestors.pop(),o.schema=y,o.create(s,b,v,l)):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);rA(e,t.position)}(e,t):"root"===t.type?(c=e,u=t,d=r,rv(_={},rT(c,u)),c.create(u,c.Fragment,_,d)):"text"===t.type?t.value:void 0}function rb(e,t,r,n){"string"!=typeof r&&r!==e.Fragment&&e.passNode&&(t.node=n)}function rv(e,t){if(t.length>0){let r=t.length>1?t:t[0];r&&(e.children=r)}}function rT(e,t){let r=[],n=-1,a=e.passKeys?new Map:rh;for(;++n<t.children.length;){let i,o=t.children[n];if(e.passKeys){let e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){let t=a.get(e)||0;i=e+"-"+t,a.set(e,t+1)}}let s=rE(e,o,i);void 0!==s&&r.push(s)}return r}function r_(e,t,r){let n;if(r)if(t.includes(".")){let e,r=t.split("."),a=-1;for(;++a<r.length;){let t=tS(r[a])?{type:"Identifier",name:r[a]}:{type:"Literal",value:r[a]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(a&&"Literal"===t.type),optional:!1}:t}tv(e,"always a result"),n=e}else n=tS(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else n={type:"Literal",value:t};if("Literal"===n.type){let t=n.value;return rp.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(n);rA(e)}function rA(e,t){let r=new rd("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=ry+"#cannot-handle-mdx-estrees-without-createevaluater",r}function rk(e){return"-"+e.toLowerCase()}let rw={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},rx={};function rS(e,t){let r=t||rx;return rC(e,"boolean"!=typeof r.includeImageAlt||r.includeImageAlt,"boolean"!=typeof r.includeHtml||r.includeHtml)}function rC(e,t,r){var n;if((n=e)&&"object"==typeof n){if("value"in e)return"html"!==e.type||r?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return rN(e.children,t,r)}return Array.isArray(e)?rN(e,t,r):""}function rN(e,t,r){let n=[],a=-1;for(;++a<e.length;)n[a]=rC(e[a],t,r);return n.join("")}function rI(e,t,r,n){let a,i=e.length,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,r=r>0?r:0,n.length<1e4)(a=Array.from(n)).unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);o<n.length;)(a=n.slice(o,o+1e4)).unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function rR(e,t){return e.length>0?(rI(e,e.length,0,t),e):t}let rD={}.hasOwnProperty;function rL(e){let t={},r=-1;for(;++r<e.length;)!function(e,t){let r;for(r in t){let n,a=(rD.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];if(i)for(n in i){rD.call(a,n)||(a[n]=[]);let e=i[n];!function(e,t){let r=-1,n=[];for(;++r<t.length;)("after"===t[r].add?e:n).push(t[r]);rI(e,0,0,n)}(a[n],Array.isArray(e)?e:e?[e]:[])}}}(t,e[r]);return t}let rO=rq(/[A-Za-z]/),rP=rq(/[\dA-Za-z]/),rM=rq(/[#-'*+\--9=?A-Z^-~]/);function rF(e){return null!==e&&(e<32||127===e)}let rB=rq(/\d/),rj=rq(/[\dA-Fa-f]/),rU=rq(/[!-/:-@[-`{-~]/);function rH(e){return null!==e&&e<-2}function rG(e){return null!==e&&(e<0||32===e)}function r$(e){return -2===e||-1===e||32===e}let rz=rq(/\p{P}|\p{S}/u),rW=rq(/\s/);function rq(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function rV(e,t,r,n){let a=n?n-1:1/0,i=0;return function(n){return r$(n)?(e.enter(r),function n(o){return r$(o)&&i++<a?(e.consume(o),n):(e.exit(r),t(o))}(n)):t(n)}}let rY={tokenize:function(e){let t,r=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),rV(e,r,"linePrefix"))},function(r){return e.enter("paragraph"),function r(n){let a=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=a),t=a,function t(n){if(null===n){e.exit("chunkText"),e.exit("paragraph"),e.consume(n);return}return rH(n)?(e.consume(n),e.exit("chunkText"),r):(e.consume(n),t)}(n)}(r)});return r}},rQ={tokenize:function(e){let t,r,n,a=this,i=[],o=0;return s;function s(t){if(o<i.length){let r=i[o];return a.containerState=r[1],e.attempt(r[0].continuation,l,c)(t)}return c(t)}function l(e){if(o++,a.containerState._closeFlow){let r;a.containerState._closeFlow=void 0,t&&y();let n=a.events.length,i=n;for(;i--;)if("exit"===a.events[i][0]&&"chunkFlow"===a.events[i][1].type){r=a.events[i][1].end;break}g(o);let s=n;for(;s<a.events.length;)a.events[s][1].end={...r},s++;return rI(a.events,i+1,0,a.events.slice(n)),a.events.length=s,c(e)}return s(e)}function c(r){if(o===i.length){if(!t)return p(r);if(t.currentConstruct&&t.currentConstruct.concrete)return f(r);a.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return a.containerState={},e.check(rK,u,d)(r)}function u(e){return t&&y(),g(o),p(e)}function d(e){return a.parser.lazy[a.now().line]=o!==i.length,n=a.now().offset,f(e)}function p(t){return a.containerState={},e.attempt(rK,h,f)(t)}function h(e){return o++,i.push([a.currentConstruct,a.containerState]),p(e)}function f(n){if(null===n){t&&y(),g(0),e.consume(n);return}return t=t||a.parser.flow(a.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:r}),function t(r){if(null===r){m(e.exit("chunkFlow"),!0),g(0),e.consume(r);return}return rH(r)?(e.consume(r),m(e.exit("chunkFlow")),o=0,a.interrupt=void 0,s):(e.consume(r),t)}(n)}function m(e,i){let s=a.sliceStream(e);if(i&&s.push(null),e.previous=r,r&&(r.next=e),r=e,t.defineSkip(e.start),t.write(s),a.parser.lazy[e.start.line]){let e,r,i=t.events.length;for(;i--;)if(t.events[i][1].start.offset<n&&(!t.events[i][1].end||t.events[i][1].end.offset>n))return;let s=a.events.length,l=s;for(;l--;)if("exit"===a.events[l][0]&&"chunkFlow"===a.events[l][1].type){if(e){r=a.events[l][1].end;break}e=!0}for(g(o),i=s;i<a.events.length;)a.events[i][1].end={...r},i++;rI(a.events,l+1,0,a.events.slice(s)),a.events.length=i}}function g(t){let r=i.length;for(;r-- >t;){let t=i[r];a.containerState=t[1],t[0].exit.call(a,e)}i.length=t}function y(){t.write([null]),r=void 0,t=void 0,a.containerState._closeFlow=void 0}}},rK={tokenize:function(e,t,r){return rV(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},rX={partial:!0,tokenize:function(e,t,r){return function(t){return r$(t)?rV(e,n,"linePrefix")(t):n(t)};function n(e){return null===e||rH(e)?t(e):r(e)}}};class rJ{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let r=null==t?1/0:t;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,t,r){this.setCursor(Math.trunc(e));let n=this.right.splice(this.right.length-(t||0),1/0);return r&&rZ(this.left,r),n.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),rZ(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),rZ(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length))if(e<this.left.length){let t=this.left.splice(e,1/0);rZ(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);rZ(this.left,t.reverse())}}}function rZ(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function r0(e){let t,r,n,a,i,o,s,l={},c=-1,u=new rJ(e);for(;++c<u.length;){for(;c in l;)c=l[c];if(t=u.get(c),c&&"chunkFlow"===t[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&((n=0)<(o=t[1]._tokenizer.events).length&&"lineEndingBlank"===o[n][1].type&&(n+=2),n<o.length&&"content"===o[n][1].type))for(;++n<o.length&&"content"!==o[n][1].type;)"chunkText"===o[n][1].type&&(o[n][1]._isInFirstContentOfListItem=!0,n++);if("enter"===t[0])t[1].contentType&&(Object.assign(l,function(e,t){let r,n,a=e.get(t)[1],i=e.get(t)[2],o=t-1,s=[],l=a._tokenizer;!l&&(l=i.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));let c=l.events,u=[],d={},p=-1,h=a,f=0,m=0,g=[0];for(;h;){for(;e.get(++o)[1]!==h;);s.push(o),!h._tokenizer&&(r=i.sliceStream(h),h.next||r.push(null),n&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(r),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),n=h,h=h.next}for(h=a;++p<c.length;)"exit"===c[p][0]&&"enter"===c[p-1][0]&&c[p][1].type===c[p-1][1].type&&c[p][1].start.line!==c[p][1].end.line&&(m=p+1,g.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):g.pop(),p=g.length;p--;){let t=c.slice(g[p],g[p+1]),r=s.pop();u.push([r,r+t.length-1]),e.splice(r,2,t)}for(u.reverse(),p=-1;++p<u.length;)d[f+u[p][0]]=f+u[p][1],f+=u[p][1]-u[p][0]-1;return d}(u,c)),c=l[c],s=!0);else if(t[1]._container){for(n=c,r=void 0;n--;)if("lineEnding"===(a=u.get(n))[1].type||"lineEndingBlank"===a[1].type)"enter"===a[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),a[1].type="lineEnding",r=n);else if("linePrefix"===a[1].type||"listItemIndent"===a[1].type);else break;r&&(t[1].end={...u.get(r)[1].start},(i=u.slice(r,c)).unshift(t),u.splice(r,c-r+1,i))}}return rI(e,0,1/0,u.slice(0)),!s}let r1={resolve:function(e){return r0(e),e},tokenize:function(e,t){let r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(t)};function n(t){return null===t?a(t):rH(t)?e.check(r2,i,a)(t):(e.consume(t),n)}function a(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function i(t){return e.consume(t),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}},r2={partial:!0,tokenize:function(e,t,r){let n=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),rV(e,a,"linePrefix")};function a(a){if(null===a||rH(a))return r(a);let i=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}}},r5={tokenize:function(e){let t=this,r=e.attempt(rX,function(n){return null===n?void e.consume(n):(e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r)},e.attempt(this.parser.constructs.flowInitial,n,rV(e,e.attempt(this.parser.constructs.flow,n,e.attempt(r1,n)),"linePrefix")));return r;function n(n){return null===n?void e.consume(n):(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r)}}},r3={resolveAll:r9()},r4=r8("string"),r6=r8("text");function r8(e){return{resolveAll:r9("text"===e?r7:void 0),tokenize:function(t){let r=this,n=this.parser.constructs[e],a=t.attempt(n,i,o);return i;function i(e){return l(e)?a(e):o(e)}function o(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),s)}function s(e){return l(e)?(t.exit("data"),a(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;let t=n[e],a=-1;if(t)for(;++a<t.length;){let e=t[a];if(!e.previous||e.previous.call(r,r.previous))return!0}return!1}}}}function r9(e){return function(t,r){let n,a=-1;for(;++a<=t.length;)void 0===n?t[a]&&"data"===t[a][1].type&&(n=a,a++):t[a]&&"data"===t[a][1].type||(a!==n+2&&(t[n][1].end=t[a-1][1].end,t.splice(n+2,a-n-2),a=n+2),n=void 0);return e?e(t,r):t}}function r7(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||"lineEnding"===e[r][1].type)&&"data"===e[r-1][1].type){let n,a=e[r-1][1],i=t.sliceStream(a),o=i.length,s=-1,l=0;for(;o--;){let e=i[o];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)n=!0,l++;else if(-1===e);else{o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(l=0),l){let i={type:r===e.length||n||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:a.start._bufferIndex+s,_index:a.start._index+o,line:a.end.line,column:a.end.column-l,offset:a.end.offset-l},end:{...a.end}};a.end={...i.start},a.start.offset===a.end.offset?Object.assign(a,i):(e.splice(r,0,["enter",i,t],["exit",i,t]),r+=2)}r++}return e}function ne(e){return null===e||rG(e)||rW(e)?1:rz(e)?2:void 0}function nt(e,t,r){let n=[],a=-1;for(;++a<e.length;){let i=e[a].resolveAll;i&&!n.includes(i)&&(t=i(t,r),n.push(i))}return t}let nr={name:"attention",resolveAll:function(e,t){let r,n,a,i,o,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close){for(r=u;r--;)if("exit"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[r][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;let d={...e[r][1].end},p={...e[u][1].start};nn(d,-s),nn(p,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},o={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},a={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[u][1].start}},n={type:s>1?"strong":"emphasis",start:{...i.start},end:{...o.end}},e[r][1].end={...i.start},e[u][1].start={...o.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=rR(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=rR(l,[["enter",n,t],["enter",i,t],["exit",i,t],["enter",a,t]]),l=rR(l,nt(t.parser.constructs.insideSpan.null,e.slice(r+1,u),t)),l=rR(l,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",n,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=rR(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,rI(e,r-1,u-r+3,l),u=r+l.length-c-2;break}}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){let r,n=this.parser.constructs.attentionMarkers.null,a=this.previous,i=ne(a);return function(o){return r=o,e.enter("attentionSequence"),function o(s){if(s===r)return e.consume(s),o;let l=e.exit("attentionSequence"),c=ne(s),u=!c||2===c&&i||n.includes(s),d=!i||2===i&&c||n.includes(a);return l._open=!!(42===r?u:u&&(i||!d)),l._close=!!(42===r?d:d&&(c||!u)),t(s)}(o)}}};function nn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let na={continuation:{tokenize:function(e,t,r){let n=this;return function(t){return r$(t)?rV(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):a(t)};function a(n){return e.attempt(na,t,r)(n)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,r){let n=this;return function(t){if(62===t){let r=n.containerState;return r.open||(e.enter("blockQuote",{_container:!0}),r.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),a}return r(t)};function a(r){return r$(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}}},ni={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),n};function n(n){return rU(n)?(e.enter("characterEscapeValue"),e.consume(n),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(n)}}},no=document.createElement("i");function ns(e){let t="&"+e+";";no.innerHTML=t;let r=no.textContent;return(59!==r.charCodeAt(r.length-1)||"semi"===e)&&r!==t&&r}let nl={name:"characterReference",tokenize:function(e,t,r){let n,a,i=this,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),n=31,a=rP,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),n=6,a=rj,c):(e.enter("characterReferenceValue"),n=7,a=rB,c(t))}function c(s){if(59===s&&o){let n=e.exit("characterReferenceValue");return a!==rP||ns(i.sliceSerialize(n))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(s)}return a(s)&&o++<n?(e.consume(s),c):r(s)}}},nc={partial:!0,tokenize:function(e,t,r){let n=this;return function(t){return null===t?r(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a)};function a(e){return n.parser.lazy[n.now().line]?r(e):t(e)}}},nu={concrete:!0,name:"codeFenced",tokenize:function(e,t,r){let n,a=this,i={partial:!0,tokenize:function(e,t,r){let i=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(t){return e.enter("codeFencedFence"),r$(t)?rV(e,l,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===n?(e.enter("codeFencedFenceSequence"),function t(a){return a===n?(i++,e.consume(a),t):i>=s?(e.exit("codeFencedFenceSequence"),r$(a)?rV(e,c,"whitespace")(a):c(a)):r(a)}(t)):r(t)}function c(n){return null===n||rH(n)?(e.exit("codeFencedFence"),t(n)):r(n)}}},o=0,s=0;return function(t){var i;let c;return i=t,o=(c=a.events[a.events.length-1])&&"linePrefix"===c[1].type?c[2].sliceSerialize(c[1],!0).length:0,n=i,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(a){return a===n?(s++,e.consume(a),t):s<3?r(a):(e.exit("codeFencedFenceSequence"),r$(a)?rV(e,l,"whitespace")(a):l(a))}(i)};function l(i){return null===i||rH(i)?(e.exit("codeFencedFence"),a.interrupt?t(i):e.check(nc,u,f)(i)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(a){return null===a||rH(a)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(a)):r$(a)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),rV(e,c,"whitespace")(a)):96===a&&a===n?r(a):(e.consume(a),t)}(i))}function c(t){return null===t||rH(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(a){return null===a||rH(a)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(a)):96===a&&a===n?r(a):(e.consume(a),t)}(t))}function u(t){return e.attempt(i,f,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),p}function p(t){return o>0&&r$(t)?rV(e,h,"linePrefix",o+1)(t):h(t)}function h(t){return null===t||rH(t)?e.check(nc,u,f)(t):(e.enter("codeFlowValue"),function t(r){return null===r||rH(r)?(e.exit("codeFlowValue"),h(r)):(e.consume(r),t)}(t))}function f(r){return e.exit("codeFenced"),t(r)}}},nd={name:"codeIndented",tokenize:function(e,t,r){let n=this;return function(t){return e.enter("codeIndented"),rV(e,a,"linePrefix",5)(t)};function a(t){let a=n.events[n.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?function t(r){return null===r?i(r):rH(r)?e.attempt(np,t,i)(r):(e.enter("codeFlowValue"),function r(n){return null===n||rH(n)?(e.exit("codeFlowValue"),t(n)):(e.consume(n),r)}(r))}(t):r(t)}function i(r){return e.exit("codeIndented"),t(r)}}},np={partial:!0,tokenize:function(e,t,r){let n=this;return a;function a(t){return n.parser.lazy[n.now().line]?r(t):rH(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):rV(e,i,"linePrefix",5)(t)}function i(e){let i=n.events[n.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):rH(e)?a(e):r(e)}}};function nh(e,t,r,n,a,i,o,s,l){let c=l||1/0,u=0;return function(t){return 60===t?(e.enter(n),e.enter(a),e.enter(i),e.consume(t),e.exit(i),d):null===t||32===t||41===t||rF(t)?r(t):(e.enter(n),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),f(t))};function d(r){return 62===r?(e.enter(i),e.consume(r),e.exit(i),e.exit(a),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(r))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||rH(t)?r(t):(e.consume(t),92===t?h:p)}function h(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function f(a){return!u&&(null===a||41===a||rG(a))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(a)):u<c&&40===a?(e.consume(a),u++,f):41===a?(e.consume(a),u--,f):null===a||32===a||40===a||rF(a)?r(a):(e.consume(a),92===a?m:f)}function m(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function nf(e,t,r,n,a,i){let o,s=this,l=0;return function(t){return e.enter(n),e.enter(a),e.consume(t),e.exit(a),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!o||94===d&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?r(d):93===d?(e.exit(i),e.enter(a),e.consume(d),e.exit(a),e.exit(n),t):rH(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||rH(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),o||(o=!r$(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function nm(e,t,r,n,a,i){let o;return function(t){return 34===t||39===t||40===t?(e.enter(n),e.enter(a),e.consume(t),e.exit(a),o=40===t?41:t,s):r(t)};function s(r){return r===o?(e.enter(a),e.consume(r),e.exit(a),e.exit(n),t):(e.enter(i),l(r))}function l(t){return t===o?(e.exit(i),s(o)):null===t?r(t):rH(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),rV(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===o||null===t||rH(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===o||92===t?(e.consume(t),c):c(t)}}function ng(e,t){let r;return function n(a){return rH(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),r=!0,n):r$(a)?rV(e,n,r?"linePrefix":"lineSuffix")(a):t(a)}}function ny(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let nE={partial:!0,tokenize:function(e,t,r){return function(t){return rG(t)?ng(e,n)(t):r(t)};function n(t){return nm(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return r$(t)?rV(e,i,"whitespace")(t):i(t)}function i(e){return null===e||rH(e)?t(e):r(e)}}},nb=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],nv=["pre","script","style","textarea"],nT={partial:!0,tokenize:function(e,t,r){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(rX,t,r)}}},n_={partial:!0,tokenize:function(e,t,r){let n=this;return function(t){return rH(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):r(t)};function a(e){return n.parser.lazy[n.now().line]?r(e):t(e)}}},nA={name:"labelEnd",resolveAll:function(e){let t=-1,r=[];for(;++t<e.length;){let n=e[t][1];if(r.push(e[t]),"labelImage"===n.type||"labelLink"===n.type||"labelEnd"===n.type){let e="labelImage"===n.type?4:2;n.type="data",t+=e}}return e.length!==r.length&&rI(e,0,e.length,r),e},resolveTo:function(e,t){let r,n,a,i,o=e.length,s=0;for(;o--;)if(r=e[o][1],n){if("link"===r.type||"labelLink"===r.type&&r._inactive)break;"enter"===e[o][0]&&"labelLink"===r.type&&(r._inactive=!0)}else if(a){if("enter"===e[o][0]&&("labelImage"===r.type||"labelLink"===r.type)&&!r._balanced&&(n=o,"labelLink"!==r.type)){s=2;break}}else"labelEnd"===r.type&&(a=o);let l={type:"labelLink"===e[n][1].type?"link":"image",start:{...e[n][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[n][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[n+s+2][1].end},end:{...e[a-2][1].start}};return i=rR(i=[["enter",l,t],["enter",c,t]],e.slice(n+1,n+s+3)),i=rR(i,[["enter",u,t]]),i=rR(i,nt(t.parser.constructs.insideSpan.null,e.slice(n+s+4,a-3),t)),i=rR(i,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),i=rR(i,e.slice(a+1)),i=rR(i,[["exit",l,t]]),rI(e,n,e.length,i),e},tokenize:function(e,t,r){let n,a,i=this,o=i.events.length;for(;o--;)if(("labelImage"===i.events[o][1].type||"labelLink"===i.events[o][1].type)&&!i.events[o][1]._balanced){n=i.events[o][1];break}return function(t){return n?n._inactive?u(t):(a=i.parser.defined.includes(ny(i.sliceSerialize({start:n.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s):r(t)};function s(t){return 40===t?e.attempt(nk,c,a?c:u)(t):91===t?e.attempt(nw,c,a?l:u)(t):a?c(t):u(t)}function l(t){return e.attempt(nx,c,u)(t)}function c(e){return t(e)}function u(e){return n._balanced=!0,r(e)}}},nk={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),n};function n(t){return rG(t)?ng(e,a)(t):a(t)}function a(t){return 41===t?c(t):nh(e,i,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return rG(t)?ng(e,s)(t):c(t)}function o(e){return r(e)}function s(t){return 34===t||39===t||40===t?nm(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return rG(t)?ng(e,c)(t):c(t)}function c(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):r(n)}}},nw={tokenize:function(e,t,r){let n=this;return function(t){return nf.call(n,e,a,i,"reference","referenceMarker","referenceString")(t)};function a(e){return n.parser.defined.includes(ny(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}function i(e){return r(e)}}},nx={tokenize:function(e,t,r){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),n};function n(n){return 93===n?(e.enter("referenceMarker"),e.consume(n),e.exit("referenceMarker"),e.exit("reference"),t):r(n)}}},nS={name:"labelStartImage",resolveAll:nA.resolveAll,tokenize:function(e,t,r){let n=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):r(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}}},nC={name:"labelStartLink",resolveAll:nA.resolveAll,tokenize:function(e,t,r){let n=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}}},nN={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),rV(e,t,"linePrefix")}}},nI={name:"thematicBreak",tokenize:function(e,t,r){let n,a=0;return function(i){var o;return e.enter("thematicBreak"),n=o=i,function i(o){return o===n?(e.enter("thematicBreakSequence"),function t(r){return r===n?(e.consume(r),a++,t):(e.exit("thematicBreakSequence"),r$(r)?rV(e,i,"whitespace")(r):i(r))}(o)):a>=3&&(null===o||rH(o))?(e.exit("thematicBreak"),t(o)):r(o)}(o)}}},nR={continuation:{tokenize:function(e,t,r){let n=this;return n.containerState._closeFlow=void 0,e.check(rX,function(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,rV(e,t,"listItemIndent",n.containerState.size+1)(r)},function(r){return n.containerState.furtherBlankLines||!r$(r)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(r)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(nL,t,a)(r))});function a(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,rV(e,e.attempt(nR,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,r){let n=this,a=n.events[n.events.length-1],i=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,o=0;return function(t){let a=n.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!n.containerState.marker||t===n.containerState.marker:rB(t)){if(n.containerState.type||(n.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(nI,r,s)(t):s(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(a){return rB(a)&&++o<10?(e.consume(a),t):(!n.interrupt||o<2)&&(n.containerState.marker?a===n.containerState.marker:41===a||46===a)?(e.exit("listItemValue"),s(a)):r(a)}(t)}return r(t)};function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(rX,n.interrupt?r:l,e.attempt(nD,u,c))}function l(e){return n.containerState.initialBlankLine=!0,i++,u(e)}function c(t){return r$(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):r(t)}function u(r){return n.containerState.size=i+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(r)}}},nD={partial:!0,tokenize:function(e,t,r){let n=this;return rV(e,function(e){let a=n.events[n.events.length-1];return!r$(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):r(e)},"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},nL={partial:!0,tokenize:function(e,t,r){let n=this;return rV(e,function(e){let a=n.events[n.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(e):r(e)},"listItemIndent",n.containerState.size+1)}},nO={name:"setextUnderline",resolveTo:function(e,t){let r,n,a,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){r=i;break}"paragraph"===e[i][1].type&&(n=i)}else"content"===e[i][1].type&&e.splice(i,1),a||"definition"!==e[i][1].type||(a=i);let o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[n][1].type="setextHeadingText",a?(e.splice(n,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,t]),e},tokenize:function(e,t,r){let n,a=this;return function(t){var o;let s,l=a.events.length;for(;l--;)if("lineEnding"!==a.events[l][1].type&&"linePrefix"!==a.events[l][1].type&&"content"!==a.events[l][1].type){s="paragraph"===a.events[l][1].type;break}return!a.parser.lazy[a.now().line]&&(a.interrupt||s)?(e.enter("setextHeadingLine"),n=t,o=t,e.enter("setextHeadingLineSequence"),function t(r){return r===n?(e.consume(r),t):(e.exit("setextHeadingLineSequence"),r$(r)?rV(e,i,"lineSuffix")(r):i(r))}(o)):r(t)};function i(n){return null===n||rH(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}}};e.s(["attentionMarkers",0,{null:[42,95]},"contentInitial",0,{91:{name:"definition",tokenize:function(e,t,r){let n,a=this;return function(t){var n;return e.enter("definition"),n=t,nf.call(a,e,i,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(n)};function i(t){return(n=ny(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):r(t)}function o(t){return rG(t)?ng(e,s)(t):s(t)}function s(t){return nh(e,l,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(nE,c,c)(t)}function c(t){return r$(t)?rV(e,u,"whitespace")(t):u(t)}function u(i){return null===i||rH(i)?(e.exit("definition"),a.parser.defined.push(n),t(i)):r(i)}}}},"disable",0,{null:[]},"document",0,{42:nR,43:nR,45:nR,48:nR,49:nR,50:nR,51:nR,52:nR,53:nR,54:nR,55:nR,56:nR,57:nR,62:na},"flow",0,{35:{name:"headingAtx",resolve:function(e,t){let r,n,a=e.length-2,i=3;return"whitespace"===e[3][1].type&&(i+=2),a-2>i&&"whitespace"===e[a][1].type&&(a-=2),"atxHeadingSequence"===e[a][1].type&&(i===a-1||a-4>i&&"whitespace"===e[a-2][1].type)&&(a-=i+1===a?2:4),a>i&&(r={type:"atxHeadingText",start:e[i][1].start,end:e[a][1].end},n={type:"chunkText",start:e[i][1].start,end:e[a][1].end,contentType:"text"},rI(e,i,a-i+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]])),e},tokenize:function(e,t,r){let n=0;return function(a){var i;return e.enter("atxHeading"),i=a,e.enter("atxHeadingSequence"),function a(i){return 35===i&&n++<6?(e.consume(i),a):null===i||rG(i)?(e.exit("atxHeadingSequence"),function r(n){return 35===n?(e.enter("atxHeadingSequence"),function t(n){return 35===n?(e.consume(n),t):(e.exit("atxHeadingSequence"),r(n))}(n)):null===n||rH(n)?(e.exit("atxHeading"),t(n)):r$(n)?rV(e,r,"whitespace")(n):(e.enter("atxHeadingText"),function t(n){return null===n||35===n||rG(n)?(e.exit("atxHeadingText"),r(n)):(e.consume(n),t)}(n))}(i)):r(i)}(i)}}},42:nI,45:[nO,nI],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,r){let n,a,i,o,s,l=this;return function(t){var r;return r=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(r),c};function c(o){return 33===o?(e.consume(o),u):47===o?(e.consume(o),a=!0,h):63===o?(e.consume(o),n=3,l.interrupt?t:D):rO(o)?(e.consume(o),i=String.fromCharCode(o),f):r(o)}function u(a){return 45===a?(e.consume(a),n=2,d):91===a?(e.consume(a),n=5,o=0,p):rO(a)?(e.consume(a),n=4,l.interrupt?t:D):r(a)}function d(n){return 45===n?(e.consume(n),l.interrupt?t:D):r(n)}function p(n){let a="CDATA[";return n===a.charCodeAt(o++)?(e.consume(n),o===a.length)?l.interrupt?t:k:p:r(n)}function h(t){return rO(t)?(e.consume(t),i=String.fromCharCode(t),f):r(t)}function f(o){if(null===o||47===o||62===o||rG(o)){let s=47===o,c=i.toLowerCase();return!s&&!a&&nv.includes(c)?(n=1,l.interrupt?t(o):k(o)):nb.includes(i.toLowerCase())?(n=6,s)?(e.consume(o),m):l.interrupt?t(o):k(o):(n=7,l.interrupt&&!l.parser.lazy[l.now().line]?r(o):a?function t(r){return r$(r)?(e.consume(r),t):_(r)}(o):g(o))}return 45===o||rP(o)?(e.consume(o),i+=String.fromCharCode(o),f):r(o)}function m(n){return 62===n?(e.consume(n),l.interrupt?t:k):r(n)}function g(t){return 47===t?(e.consume(t),_):58===t||95===t||rO(t)?(e.consume(t),y):r$(t)?(e.consume(t),g):_(t)}function y(t){return 45===t||46===t||58===t||95===t||rP(t)?(e.consume(t),y):E(t)}function E(t){return 61===t?(e.consume(t),b):r$(t)?(e.consume(t),E):g(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),s=t,v):r$(t)?(e.consume(t),b):function t(r){return null===r||34===r||39===r||47===r||60===r||61===r||62===r||96===r||rG(r)?E(r):(e.consume(r),t)}(t)}function v(t){return t===s?(e.consume(t),s=null,T):null===t||rH(t)?r(t):(e.consume(t),v)}function T(e){return 47===e||62===e||r$(e)?g(e):r(e)}function _(t){return 62===t?(e.consume(t),A):r(t)}function A(t){return null===t||rH(t)?k(t):r$(t)?(e.consume(t),A):r(t)}function k(t){return 45===t&&2===n?(e.consume(t),C):60===t&&1===n?(e.consume(t),N):62===t&&4===n?(e.consume(t),L):63===t&&3===n?(e.consume(t),D):93===t&&5===n?(e.consume(t),R):rH(t)&&(6===n||7===n)?(e.exit("htmlFlowData"),e.check(nT,O,w)(t)):null===t||rH(t)?(e.exit("htmlFlowData"),w(t)):(e.consume(t),k)}function w(t){return e.check(n_,x,O)(t)}function x(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),S}function S(t){return null===t||rH(t)?w(t):(e.enter("htmlFlowData"),k(t))}function C(t){return 45===t?(e.consume(t),D):k(t)}function N(t){return 47===t?(e.consume(t),i="",I):k(t)}function I(t){if(62===t){let r=i.toLowerCase();return nv.includes(r)?(e.consume(t),L):k(t)}return rO(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),I):k(t)}function R(t){return 93===t?(e.consume(t),D):k(t)}function D(t){return 62===t?(e.consume(t),L):45===t&&2===n?(e.consume(t),D):k(t)}function L(t){return null===t||rH(t)?(e.exit("htmlFlowData"),O(t)):(e.consume(t),L)}function O(r){return e.exit("htmlFlow"),t(r)}}},61:nO,95:nI,96:nu,126:nu},"flowInitial",0,{[-2]:nd,[-1]:nd,32:nd},"insideSpan",0,{null:[nr,r3]},"string",0,{38:nl,92:ni},"text",0,{[-5]:nN,[-4]:nN,[-3]:nN,33:nS,38:nl,42:nr,60:[{name:"autolink",tokenize:function(e,t,r){let n=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a};function a(t){return rO(t)?(e.consume(t),i):64===t?r(t):s(t)}function i(t){return 43===t||45===t||46===t||rP(t)?(n=1,function t(r){return 58===r?(e.consume(r),n=0,o):(43===r||45===r||46===r||rP(r))&&n++<32?(e.consume(r),t):(n=0,s(r))}(t)):s(t)}function o(n){return 62===n?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):null===n||32===n||60===n||rF(n)?r(n):(e.consume(n),o)}function s(t){return 64===t?(e.consume(t),l):rM(t)?(e.consume(t),s):r(t)}function l(a){return rP(a)?function a(i){return 46===i?(e.consume(i),n=0,l):62===i?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(i),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(i){if((45===i||rP(i))&&n++<63){let r=45===i?t:a;return e.consume(i),r}return r(i)}(i)}(a):r(a)}}},{name:"htmlText",tokenize:function(e,t,r){let n,a,i,o=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),v):63===t?(e.consume(t),E):rO(t)?(e.consume(t),_):r(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),a=0,h):rO(t)?(e.consume(t),y):r(t)}function c(t){return 45===t?(e.consume(t),p):r(t)}function u(t){return null===t?r(t):45===t?(e.consume(t),d):rH(t)?(i=u,I(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?N(e):45===e?d(e):u(e)}function h(t){let n="CDATA[";return t===n.charCodeAt(a++)?(e.consume(t),a===n.length?f:h):r(t)}function f(t){return null===t?r(t):93===t?(e.consume(t),m):rH(t)?(i=f,I(t)):(e.consume(t),f)}function m(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?N(t):93===t?(e.consume(t),g):f(t)}function y(t){return null===t||62===t?N(t):rH(t)?(i=y,I(t)):(e.consume(t),y)}function E(t){return null===t?r(t):63===t?(e.consume(t),b):rH(t)?(i=E,I(t)):(e.consume(t),E)}function b(e){return 62===e?N(e):E(e)}function v(t){return rO(t)?(e.consume(t),T):r(t)}function T(t){return 45===t||rP(t)?(e.consume(t),T):function t(r){return rH(r)?(i=t,I(r)):r$(r)?(e.consume(r),t):N(r)}(t)}function _(t){return 45===t||rP(t)?(e.consume(t),_):47===t||62===t||rG(t)?A(t):r(t)}function A(t){return 47===t?(e.consume(t),N):58===t||95===t||rO(t)?(e.consume(t),k):rH(t)?(i=A,I(t)):r$(t)?(e.consume(t),A):N(t)}function k(t){return 45===t||46===t||58===t||95===t||rP(t)?(e.consume(t),k):function t(r){return 61===r?(e.consume(r),w):rH(r)?(i=t,I(r)):r$(r)?(e.consume(r),t):A(r)}(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),n=t,x):rH(t)?(i=w,I(t)):r$(t)?(e.consume(t),w):(e.consume(t),S)}function x(t){return t===n?(e.consume(t),n=void 0,C):null===t?r(t):rH(t)?(i=x,I(t)):(e.consume(t),x)}function S(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):47===t||62===t||rG(t)?A(t):(e.consume(t),S)}function C(e){return 47===e||62===e||rG(e)?A(e):r(e)}function N(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}function I(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),R}function R(t){return r$(t)?rV(e,D,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):D(t)}function D(t){return e.enter("htmlTextData"),i(t)}}}],91:nC,92:[{name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.consume(t),n};function n(n){return rH(n)?(e.exit("hardBreakEscape"),t(n)):r(n)}}},ni],93:nA,95:nr,96:{name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,r,n=e.length-4,a=3;if(("lineEnding"===e[3][1].type||"space"===e[a][1].type)&&("lineEnding"===e[n][1].type||"space"===e[n][1].type)){for(t=a;++t<n;)if("codeTextData"===e[t][1].type){e[a][1].type="codeTextPadding",e[n][1].type="codeTextPadding",a+=2,n-=2;break}}for(t=a-1,n++;++t<=n;)void 0===r?t!==n&&"lineEnding"!==e[t][1].type&&(r=t):(t===n||"lineEnding"===e[t][1].type)&&(e[r][1].type="codeTextData",t!==r+2&&(e[r][1].end=e[t-1][1].end,e.splice(r+2,t-r-2),n-=t-r-2,t=r+2),r=void 0);return e},tokenize:function(e,t,r){let n,a,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(r){return 96===r?(e.consume(r),i++,t):(e.exit("codeTextSequence"),o(r))}(t)};function o(l){return null===l?r(l):32===l?(e.enter("space"),e.consume(l),e.exit("space"),o):96===l?(a=e.enter("codeTextSequence"),n=0,function r(o){return 96===o?(e.consume(o),n++,r):n===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(o)):(a.type="codeTextData",s(o))}(l)):rH(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):(e.enter("codeTextData"),s(l))}function s(t){return null===t||32===t||96===t||rH(t)?(e.exit("codeTextData"),o(t)):(e.consume(t),s)}}}}],119210);var nP=e.i(119210);let nM=/[\0\t\n\r]/g;function nF(e,t){let r=Number.parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(65535&r)==65535||(65535&r)==65534||r>1114111?"�":String.fromCodePoint(r)}let nB=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nj(e,t,r){if(t)return t;if(35===r.charCodeAt(0)){let e=r.charCodeAt(1),t=120===e||88===e;return nF(r.slice(t?2:1),t?16:10)}return ns(r)||e}let nU={}.hasOwnProperty;function nH(e){return{line:e.line,column:e.column,offset:e.offset}}function nG(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+rs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+rs({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+rs({start:t.start,end:t.end})+") is still open")}function n$(e){let t=this;t.parser=function(r){var n,a;let i,o,s,l;return"string"!=typeof(n={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(a=n,n=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:n(y),autolinkProtocol:c,autolinkEmail:c,atxHeading:n(f),blockQuote:n(function(){return{type:"blockquote",children:[]}}),characterEscape:c,characterReference:c,codeFenced:n(h),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:n(h,a),codeText:n(function(){return{type:"inlineCode",value:""}},a),codeTextData:c,data:c,codeFlowValue:c,definition:n(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:n(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:n(m),hardBreakTrailing:n(m),htmlFlow:n(g,a),htmlFlowData:c,htmlText:n(g,a),htmlTextData:c,image:n(function(){return{type:"image",title:null,url:"",alt:null}}),label:a,link:n(y),listItem:n(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:n(E,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:n(E),paragraph:n(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:n(f),strong:n(function(){return{type:"strong",children:[]}}),thematicBreak:n(function(){return{type:"thematicBreak"}})},exit:{atxHeading:o(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:o(),autolinkEmail:function(e){u.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){u.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:o(),characterEscapeValue:u,characterReferenceMarkerHexadecimal:p,characterReferenceMarkerNumeric:p,characterReferenceValue:function(e){let t,r=this.sliceSerialize(e),n=this.data.characterReferenceType;n?(t=nF(r,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):t=ns(r);let a=this.stack[this.stack.length-1];a.value+=t},characterReference:function(e){this.stack.pop().position.end=nH(e.end)},codeFenced:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:u,codeIndented:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:u,data:u,definition:o(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=ny(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:o(),hardBreakEscape:o(d),hardBreakTrailing:o(d),htmlFlow:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:u,htmlText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:u,image:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),r=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===r.type?r.children=e.children:r.alt=t},labelText:function(e){let t=this.sliceSerialize(e),r=this.stack[this.stack.length-2];r.label=t.replace(nB,nj),r.identifier=ny(t).toLowerCase()},lineEnding:function(e){let r=this.stack[this.stack.length-1];if(this.data.atHardBreak){r.children[r.children.length-1].position.end=nH(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(r.type)&&(c.call(this,e),u.call(this,e))},link:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:function(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=ny(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:o(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:o(),thematicBreak:o()}};!function e(t,r){let n=-1;for(;++n<r.length;){let a=r[n];Array.isArray(a)?e(t,a):function(e,t){let r;for(r in t)if(nU.call(t,r))switch(r){case"canContainEols":{let n=t[r];n&&e[r].push(...n);break}case"transforms":{let n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{let n=t[r];n&&Object.assign(e[r],n)}}}(t,a)}}(t,(e||{}).mdastExtensions||[]);let r={};return function(e){let n={type:"root",children:[]},o={stack:[n],tokenStack:[],config:t,enter:i,exit:s,buffer:a,resume:l,data:r},c=[],u=-1;for(;++u<e.length;)("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)&&("enter"===e[u][0]?c.push(u):u=function(e,t,r){let n,a,i,o,s=t-1,l=-1,c=!1;for(;++s<=r;){let t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!n||o||l||i||(i=s),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(n){let o=s;for(a=void 0;o--;){let t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;a&&(e[a][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",a=o}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}i&&(!a||i<a)&&(n._spread=!0),n.end=Object.assign({},a?e[a][1].start:t[1].end),e.splice(a||s,0,["exit",n,t[2]]),s++,r++}if("listItemPrefix"===t[1].type){let a={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};n=a,e.splice(s,0,["enter",a,t[2]]),s++,r++,i=void 0,o=!0}}}return e[t][1]._spread=c,r}(e,c.pop(),u));for(u=-1;++u<e.length;){let r=t[e[u][0]];nU.call(r,e[u][1].type)&&r[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},o),e[u][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||nG).call(o,void 0,e[0])}for(n.position={start:nH(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:nH(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)n=t.transforms[u](n)||n;return n};function n(e,t){return function(r){i.call(this,e(r),r),t&&t.call(this,r)}}function a(){this.stack.push({type:"fragment",children:[]})}function i(e,t,r){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,r||void 0]),e.position={start:nH(t.start),end:void 0}}function o(e){return function(t){e&&e.call(this,t),s.call(this,t)}}function s(e,t){let r=this.stack.pop(),n=this.tokenStack.pop();if(n)n[0].type!==e.type&&(t?t.call(this,e,n[0]):(n[1]||nG).call(this,e,n[0]));else throw Error("Cannot close `"+e.type+"` ("+rs({start:e.start,end:e.end})+"): it’s not open");r.position.end=nH(e.end)}function l(){return rS(this.stack.pop())}function c(e){let t=this.stack[this.stack.length-1].children,r=t[t.length-1];r&&"text"===r.type||((r={type:"text",value:""}).position={start:nH(e.start),end:void 0},t.push(r)),this.stack.push(r)}function u(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=nH(e.end)}function d(){this.data.atHardBreak=!0}function p(e){this.data.characterReferenceType=e.type}function h(){return{type:"code",lang:null,meta:null,value:""}}function f(){return{type:"heading",depth:0,children:[]}}function m(){return{type:"break"}}function g(){return{type:"html",value:""}}function y(){return{type:"link",title:null,url:"",children:[]}}function E(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(a)(function(e){for(;!r0(e););return e}((function(e){let t={constructs:rL([nP,...(e||{}).extensions||[]]),content:r(rY),defined:[],document:r(rQ),flow:r(r5),lazy:{},string:r(r4),text:r(r6)};return t;function r(e){return function(r){return function(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0},a={},i=[],o=[],s=[],l={attempt:f(function(e,t){m(e,t.from)}),check:f(h),consume:function(e){rH(e)?(n.line++,n.column=1,n.offset+=-3===e?2:1,g()):-1!==e&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=e},enter:function(e,t){let r=t||{};return r.type=e,r.start=p(),c.events.push(["enter",r,c]),s.push(r),r},exit:function(e){let t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:f(h,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){a[e.line]=e.column,g()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let r,n=-1,a=[];for(;++n<e.length;){let i,o=e[n];if("string"==typeof o)i=o;else switch(o){case -5:i="\r";break;case -4:i="\n";break;case -3:i="\r\n";break;case -2:i=t?" ":" ";break;case -1:if(!t&&r)continue;i=" ";break;default:i=String.fromCharCode(o)}r=-2===o,a.push(i)}return a.join("")}(d(e),t)},sliceStream:d,write:function(e){return(o=rR(o,e),function(){let e;for(;n._index<o.length;){let r=o[n._index];if("string"==typeof r)for(e=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===e&&n._bufferIndex<r.length;){var t;t=r.charCodeAt(n._bufferIndex),u=u(t)}else u=u(r)}}(),null!==o[o.length-1])?[]:(m(t,0),c.events=nt(i,c.events,c),c.events)}},u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(e){return function(e,t){let r,n=t.start._index,a=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;if(n===i)r=[e[n].slice(a,o)];else{if(r=e.slice(n,i),a>-1){let e=r[0];"string"==typeof e?r[0]=e.slice(a):r.shift()}o>0&&r.push(e[i].slice(0,o))}return r}(o,e)}function p(){let{_bufferIndex:e,_index:t,line:r,column:a,offset:i}=n;return{_bufferIndex:e,_index:t,line:r,column:a,offset:i}}function h(e,t){t.restore()}function f(e,t){return function(r,a,i){var o;let u,d,h,f;return Array.isArray(r)?m(r):"tokenize"in r?m([r]):(o=r,function(e){let t=null!==e&&o[e],r=null!==e&&o.null;return m([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(r)?r:r?[r]:[]])(e)});function m(e){return(u=e,d=0,0===e.length)?i:y(e[d])}function y(e){return function(r){let a,i,o,u,d;return(a=p(),i=c.previous,o=c.currentConstruct,u=c.events.length,d=Array.from(s),f={from:u,restore:function(){n=a,c.previous=i,c.currentConstruct=o,c.events.length=u,s=d,g()}},h=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name))?b(r):e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,E,b)(r)}}function E(t){return e(h,f),a}function b(e){return(f.restore(),++d<u.length)?y(u[d]):i}}}function m(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&rI(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function g(){n.line in a&&n.column<2&&(n.column=a[n.line],n.offset+=a[n.line]-1)}}(t,e,r)}}})(a).document().write((o=1,s="",l=!0,function(e,t,r){let n,a,c,u,d,p=[];for(e=s+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),c=0,s="",l&&(65279===e.charCodeAt(0)&&c++,l=void 0);c<e.length;){if(nM.lastIndex=c,u=(n=nM.exec(e))&&void 0!==n.index?n.index:e.length,d=e.charCodeAt(u),!n){s=e.slice(c);break}if(10===d&&c===u&&i)p.push(-3),i=void 0;else switch(i&&(p.push(-5),i=void 0),c<u&&(p.push(e.slice(c,u)),o+=u-c),d){case 0:p.push(65533),o++;break;case 9:for(a=4*Math.ceil(o/4),p.push(-2);o++<a;)p.push(-1);break;case 10:p.push(-4),o=1;break;default:i=!0,o=1}c=u+1}return r&&(i&&p.push(-5),s&&p.push(s),p.push(null)),p})(r,n,!0))))}}let nz="object"==typeof self?self:globalThis,nW=e=>{var t;let r,n;return(t=new Map,r=(e,r)=>(t.set(r,e),e),n=a=>{if(t.has(a))return t.get(a);let[i,o]=e[a];switch(i){case 0:case -1:return r(o,a);case 1:{let e=r([],a);for(let t of o)e.push(n(t));return e}case 2:{let e=r({},a);for(let[t,r]of o)e[n(t)]=n(r);return e}case 3:return r(new Date(o),a);case 4:{let{source:e,flags:t}=o;return r(new RegExp(e,t),a)}case 5:{let e=r(new Map,a);for(let[t,r]of o)e.set(n(t),n(r));return e}case 6:{let e=r(new Set,a);for(let t of o)e.add(n(t));return e}case 7:{let{name:e,message:t}=o;return r(new nz[e](t),a)}case 8:return r(BigInt(o),a);case"BigInt":return r(Object(BigInt(o)),a);case"ArrayBuffer":return r(new Uint8Array(o).buffer,o);case"DataView":{let{buffer:e}=new Uint8Array(o);return r(new DataView(e),o)}}return r(new nz[i](o),a)})(0)},{toString:nq}={},{keys:nV}=Object,nY=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let r=nq.call(e).slice(8,-1);switch(r){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},nQ=([e,t])=>0===e&&("function"===t||"symbol"===t),nK=(e,{json:t,lossy:r}={})=>{var n,a,i;let o,s,l=[];return(n=!(t||r),a=!!t,i=new Map,o=(e,t)=>{let r=l.push(e)-1;return i.set(t,r),r},s=e=>{if(i.has(e))return i.get(e);let[t,r]=nY(e);switch(t){case 0:{let a=e;switch(r){case"bigint":t=8,a=e.toString();break;case"function":case"symbol":if(n)throw TypeError("unable to serialize "+r);a=null;break;case"undefined":return o([-1],e)}return o([t,a],e)}case 1:{if(r){let t=e;return"DataView"===r?t=new Uint8Array(e.buffer):"ArrayBuffer"===r&&(t=new Uint8Array(e)),o([r,[...t]],e)}let n=[],a=o([t,n],e);for(let t of e)n.push(s(t));return a}case 2:{if(r)switch(r){case"BigInt":return o([r,e.toString()],e);case"Boolean":case"Number":case"String":return o([r,e.valueOf()],e)}if(a&&"toJSON"in e)return s(e.toJSON());let i=[],l=o([t,i],e);for(let t of nV(e))(n||!nQ(nY(e[t])))&&i.push([s(t),s(e[t])]);return l}case 3:return o([t,e.toISOString()],e);case 4:{let{source:r,flags:n}=e;return o([t,{source:r,flags:n}],e)}case 5:{let r=[],a=o([t,r],e);for(let[t,a]of e)(n||!(nQ(nY(t))||nQ(nY(a))))&&r.push([s(t),s(a)]);return a}case 6:{let r=[],a=o([t,r],e);for(let t of e)(n||!nQ(nY(t)))&&r.push(s(t));return a}}let{message:l}=e;return o([t,{name:r,message:l}],e)})(e),l},nX="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?nW(nK(e,t)):structuredClone(e):(e,t)=>nW(nK(e,t));function nJ(e){let t=[],r=-1,n=0,a=0;for(;++r<e.length;){let i=e.charCodeAt(r),o="";if(37===i&&rP(e.charCodeAt(r+1))&&rP(e.charCodeAt(r+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(o=String.fromCharCode(i));else if(i>55295&&i<57344){let t=e.charCodeAt(r+1);i<56320&&t>56319&&t<57344?(o=String.fromCharCode(i,t),a=1):o="�"}else o=String.fromCharCode(i);o&&(t.push(e.slice(n,r),encodeURIComponent(o)),n=r+a+1,o=""),a&&(r+=a,a=0)}return t.join("")+e.slice(n)}function nZ(e,t){let r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function n0(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}let n1=function(e){var t,r;if(null==e)return n5;if("function"==typeof e)return n2(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],r=-1;for(;++r<e.length;)t[r]=n1(e[r]);return n2(function(...e){let r=-1;for(;++r<t.length;)if(t[r].apply(this,e))return!0;return!1})}(e):(t=e,n2(function(e){let r;for(r in t)if(e[r]!==t[r])return!1;return!0}))}if("string"==typeof e){return r=e,n2(function(e){return e&&e.type===r})}throw Error("Expected function, string, or object as test")};function n2(e){return function(t,r,n){return!!(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof r?r:void 0,n||void 0))}}function n5(){return!0}let n3=[],n4="skip";function n6(e,t,r,n){var a,i,o;let s,l,c,u,d,p;"function"==typeof t&&"function"!=typeof r?(l=void 0,c=t,s=r):(l=t,c=r,s=n),a=l,i=function(e,t){let r=t[t.length-1],n=r?r.children.indexOf(e):void 0;return c(e,n,r)},o=s,"function"==typeof a&&"function"!=typeof i?(o=i,i=a):u=a,d=n1(u),p=o?-1:1,(function e(t,r,n){let s=t&&"object"==typeof t?t:{};if("string"==typeof s.type){let e="string"==typeof s.tagName?s.tagName:"string"==typeof s.name?s.name:void 0;Object.defineProperty(l,"name",{value:"node ("+t.type+(e?"<"+e+">":"")+")"})}return l;function l(){var s;let l,c,u,h=n3;if((!a||d(t,r,n[n.length-1]||void 0))&&!1===(h=Array.isArray(s=i(t,n))?s:"number"==typeof s?[!0,s]:null==s?n3:[s])[0])return h;if("children"in t&&t.children&&t.children&&h[0]!==n4)for(c=(o?t.children.length:-1)+p,u=n.concat(t);c>-1&&c<t.children.length;){if(!1===(l=e(t.children[c],c,u)())[0])return l;c="number"==typeof l[1]?l[1]:c+p}return h}})(e,void 0,[])()}function n8(e,t){let r=t.referenceType,n="]";if("collapsed"===r?n+="[]":"full"===r&&(n+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+n}];let a=e.all(t),i=a[0];i&&"text"===i.type?i.value="["+i.value:a.unshift({type:"text",value:"["});let o=a[a.length-1];return o&&"text"===o.type?o.value+=n:a.push({type:"text",value:n}),a}function n9(e){let t=e.spread;return null==t?e.children.length>1:t}function n7(e,t,r){let n=0,a=e.length;if(t){let t=e.codePointAt(n);for(;9===t||32===t;)n++,t=e.codePointAt(n)}if(r){let t=e.codePointAt(a-1);for(;9===t||32===t;)a--,t=e.codePointAt(a-1)}return a>n?e.slice(n,a):""}let ae={blockquote:function(e,t){let r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)},break:function(e,t){let r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:"\n"}]},code:function(e,t){let r=t.value?t.value+"\n":"",n={};t.lang&&(n.className=["language-"+t.lang]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a={type:"element",tagName:"pre",properties:{},children:[a=e.applyData(t,a)]},e.patch(t,a),a},delete:function(e,t){let r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},emphasis:function(e,t){let r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},footnoteReference:function(e,t){let r,n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),i=nJ(a.toLowerCase()),o=e.footnoteOrder.indexOf(a),s=e.footnoteCounts.get(a);void 0===s?(s=0,e.footnoteOrder.push(a),r=e.footnoteOrder.length):r=o+1,s+=1,e.footnoteCounts.set(a,s);let l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(r)}]};e.patch(t,l);let c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){let r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},html:function(e,t){if(e.options.allowDangerousHtml){let r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}},imageReference:function(e,t){let r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return n8(e,t);let a={src:nJ(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(a.title=n.title);let i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){let r={src:nJ(t.url)};null!==t.alt&&void 0!==t.alt&&(r.alt=t.alt),null!==t.title&&void 0!==t.title&&(r.title=t.title);let n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)},inlineCode:function(e,t){let r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);let n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)},linkReference:function(e,t){let r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return n8(e,t);let a={href:nJ(n.url||"")};null!==n.title&&void 0!==n.title&&(a.title=n.title);let i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){let r={href:nJ(t.url)};null!==t.title&&void 0!==t.title&&(r.title=t.title);let n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},listItem:function(e,t,r){let n=e.all(t),a=r?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let r=e.children,n=-1;for(;!t&&++n<r.length;)t=n9(r[n])}return t}(r):n9(t),i={},o=[];if("boolean"==typeof t.checked){let e,r=n[0];r&&"element"===r.type&&"p"===r.tagName?e=r:(e={type:"element",tagName:"p",properties:{},children:[]},n.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<n.length;){let e=n[s];(a||0!==s||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||a?o.push(e):o.push(...e.children)}let l=n[n.length-1];l&&(a||"element"!==l.type||"p"!==l.tagName)&&o.push({type:"text",value:"\n"});let c={type:"element",tagName:"li",properties:i,children:o};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){let r={},n=e.all(t),a=-1;for("number"==typeof t.start&&1!==t.start&&(r.start=t.start);++a<n.length;){let e=n[a];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}let i={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){let r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},root:function(e,t){let r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)},strong:function(e,t){let r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},table:function(e,t){let r=e.all(t),n=r.shift(),a=[];if(n){let r={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],r),a.push(r)}if(r.length>0){let n={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},i=ri(t.children[1]),o=ra(t.children[t.children.length-1]);i&&o&&(n.position={start:i,end:o}),a.push(n)}let i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){let r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},tableRow:function(e,t,r){let n=r?r.children:void 0,a=0===(n?n.indexOf(t):1)?"th":"td",i=r&&"table"===r.type?r.align:void 0,o=i?i.length:t.children.length,s=-1,l=[];for(;++s<o;){let r=t.children[s],n={},o=i?i[s]:void 0;o&&(n.align=o);let c={type:"element",tagName:a,properties:n,children:[]};r&&(c.children=e.all(r),e.patch(r,c),c=e.applyData(r,c)),l.push(c)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){let r={type:"text",value:function(e){let t=String(e),r=/\r?\n|\r/g,n=r.exec(t),a=0,i=[];for(;n;)i.push(n7(t.slice(a,n.index),a>0,!0),n[0]),a=n.index+n[0].length,n=r.exec(t);return i.push(n7(t.slice(a),a>0,!1)),i.join("")}(String(t.value))};return e.patch(t,r),e.applyData(t,r)},thematicBreak:function(e,t){let r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)},toml:at,yaml:at,definition:at,footnoteDefinition:at};function at(){}let ar={}.hasOwnProperty,an={};function aa(e,t){e.position&&(t.position=function(e){let t=ri(e),r=ra(e);if(t&&r)return{start:t,end:r}}(e))}function ai(e,t){let r=t;if(e&&e.data){let t=e.data.hName,n=e.data.hChildren,a=e.data.hProperties;"string"==typeof t&&("element"===r.type?r.tagName=t:r={type:"element",tagName:t,properties:{},children:"children"in r?r.children:[r]}),"element"===r.type&&a&&Object.assign(r.properties,nX(a)),"children"in r&&r.children&&null!=n&&(r.children=n)}return r}function ao(e,t){let r=[],n=-1;for(t&&r.push({type:"text",value:"\n"});++n<e.length;)n&&r.push({type:"text",value:"\n"}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:"\n"}),r}function as(e){let t=0,r=e.charCodeAt(t);for(;9===r||32===r;)t++,r=e.charCodeAt(t);return e.slice(t)}function al(e,t){let r,n,a,i,o=(r=t||an,n=new Map,a=new Map,i={all:function(e){let t=[];if("children"in e){let r=e.children,n=-1;for(;++n<r.length;){let a=i.one(r[n],e);if(a){if(n&&"break"===r[n-1].type&&(Array.isArray(a)||"text"!==a.type||(a.value=as(a.value)),!Array.isArray(a)&&"element"===a.type)){let e=a.children[0];e&&"text"===e.type&&(e.value=as(e.value))}Array.isArray(a)?t.push(...a):t.push(a)}}}return t},applyData:ai,definitionById:n,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],handlers:{...ae,...r.handlers},one:function(e,t){let r=e.type,n=i.handlers[r];if(ar.call(i.handlers,r)&&n)return n(i,e,t);if(i.options.passThrough&&i.options.passThrough.includes(r)){if("children"in e){let{children:t,...r}=e,n=nX(r);return n.children=i.all(e),n}return nX(e)}return(i.options.unknownHandler||function(e,t){let r=t.data||{},n="value"in t&&!(ar.call(r,"hProperties")||ar.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)})(i,e,t)},options:r,patch:aa,wrap:ao},n6(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?n:a,r=String(e.identifier).toUpperCase();t.has(r)||t.set(r,e)}}),i),s=o.one(e,void 0),l=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||nZ,n=e.options.footnoteBackLabel||n0,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[],l=-1;for(;++l<e.footnoteOrder.length;){let a=e.footnoteById.get(e.footnoteOrder[l]);if(!a)continue;let i=e.all(a),o=String(a.identifier).toUpperCase(),c=nJ(o.toLowerCase()),u=0,d=[],p=e.footnoteCounts.get(o);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof r?r:r(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof n?n:n(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let h=i[i.length-1];if(h&&"element"===h.type&&"p"===h.tagName){let e=h.children[h.children.length-1];e&&"text"===e.type?e.value+=" ":h.children.push({type:"text",value:" "}),h.children.push(...d)}else i.push(...d);let f={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(a,f),s.push(f)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...nX(o),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(o),c=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return l&&(tv("children"in c),c.children.push({type:"text",value:"\n"},l)),c}function ac(e,t){return e&&"run"in e?async function(r,n){let a=al(r,{file:n,...t});await e.run(a,n)}:function(r,n){return al(r,{file:n,...e||t})}}function au(e){if(e)throw e}var ad=e.i(975609);function ap(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}let ah=function(e,t){let r;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');ay(e);let n=0,a=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(r){n=i+1;break}}else a<0&&(r=!0,a=i+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(r){n=i+1;break}}else o<0&&(r=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(a=i):(s=-1,a=o));return n===a?a=o:a<0&&(a=e.length),e.slice(n,a)},af=function(e){let t;if(ay(e),0===e.length)return".";let r=-1,n=e.length;for(;--n;)if(47===e.codePointAt(n)){if(t){r=n;break}}else t||(t=!0);return r<0?47===e.codePointAt(0)?"/":".":1===r&&47===e.codePointAt(0)?"//":e.slice(0,r)},am=function(e){let t;ay(e);let r=e.length,n=-1,a=0,i=-1,o=0;for(;r--;){let s=e.codePointAt(r);if(47===s){if(t){a=r+1;break}continue}n<0&&(t=!0,n=r+1),46===s?i<0?i=r:1!==o&&(o=1):i>-1&&(o=-1)}return i<0||n<0||0===o||1===o&&i===n-1&&i===a+1?"":e.slice(i,n)},ag=function(...e){var t;let r,n,a,i=-1;for(;++i<e.length;)ay(e[i]),e[i]&&(a=void 0===a?e[i]:a+"/"+e[i]);return void 0===a?".":(ay(t=a),r=47===t.codePointAt(0),0!==(n=function(e,t){let r,n,a="",i=0,o=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)r=e.codePointAt(l);else if(47===r)break;else r=47;if(47===r){if(o===l-1||1===s);else if(o!==l-1&&2===s){if(a.length<2||2!==i||46!==a.codePointAt(a.length-1)||46!==a.codePointAt(a.length-2)){if(a.length>2){if((n=a.lastIndexOf("/"))!==a.length-1){n<0?(a="",i=0):i=(a=a.slice(0,n)).length-1-a.lastIndexOf("/"),o=l,s=0;continue}}else if(a.length>0){a="",i=0,o=l,s=0;continue}}t&&(a=a.length>0?a+"/..":"..",i=2)}else a.length>0?a+="/"+e.slice(o+1,l):a=e.slice(o+1,l),i=l-o-1;o=l,s=0}else 46===r&&s>-1?s++:s=-1}return a}(t,!r)).length||r||(n="."),n.length>0&&47===t.codePointAt(t.length-1)&&(n+="/"),r?"/"+n:n)};function ay(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function aE(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let ab=["history","path","basename","stem","extname","dirname"];class av{constructor(e){let t,r;t=e?aE(e)?{path:e}:"string"==typeof e||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":"/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<ab.length;){const e=ab[n];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)ab.includes(r)||(this[r]=t[r])}get basename(){return"string"==typeof this.path?ah(this.path):void 0}set basename(e){a_(e,"basename"),aT(e,"basename"),this.path=ag(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?af(this.path):void 0}set dirname(e){aA(this.basename,"dirname"),this.path=ag(e||"",this.basename)}get extname(){return"string"==typeof this.path?am(this.path):void 0}set extname(e){if(aT(e,"extname"),aA(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=ag(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){aE(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!aE(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,r=-1;for(;++r<t.length;)if(37===t.codePointAt(r)&&50===t.codePointAt(r+1)){let e=t.codePointAt(r+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),a_(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?ah(this.path,this.extname):void 0}set stem(e){a_(e,"stem"),aT(e,"stem"),this.path=ag(this.dirname||"",e+(this.extname||""))}fail(e,t,r){let n=this.message(e,t,r);throw n.fatal=!0,n}info(e,t,r){let n=this.message(e,t,r);return n.fatal=void 0,n}message(e,t,r){let n=new rd(e,t,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function aT(e,t){if(e&&e.includes("/"))throw Error("`"+t+"` cannot be a path: did not expect `/`")}function a_(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function aA(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let ak=function(e){let t=this.constructor.prototype,r=t[e],n=function(){return r.apply(n,arguments)};return Object.setPrototypeOf(n,t),n},aw={}.hasOwnProperty;class ax extends ak{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){let e=[],t={run:function(...t){let r=-1,n=t.pop();if("function"!=typeof n)throw TypeError("Expected function as last argument, not "+n);!function a(i,...o){let s=e[++r],l=-1;if(i)return void n(i);for(;++l<t.length;)(null===o[l]||void 0===o[l])&&(o[l]=t[l]);t=o,s?(function(e,t){let r;return function(...t){let i,o=e.length>t.length;o&&t.push(n);try{i=e.apply(this,t)}catch(e){if(o&&r)throw e;return n(e)}o||(i&&i.then&&"function"==typeof i.then?i.then(a,n):i instanceof Error?n(i):a(i))};function n(e,...a){r||(r=!0,t(e,...a))}function a(e){n(null,e)}})(s,a)(...o):n(null,...o)}(null,...t)},use:function(r){if("function"!=typeof r)throw TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}};return t}()}copy(){let e=new ax,t=-1;for(;++t<this.attachers.length;){let r=this.attachers[t];e.use(...r)}return e.data((0,ad.default)(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(aI("data",this.frozen),this.namespace[e]=t,this):aw.call(this.namespace,e)&&this.namespace[e]||void 0:e?(aI("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let r=e.call(this,...t);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=aL(e),r=this.parser||this.Parser;return aC("parse",r),r(String(t),t)}process(e,t){let r=this;return this.freeze(),aC("process",this.parser||this.Parser),aN("process",this.compiler||this.Compiler),t?n(void 0,t):new Promise(n);function n(n,a){let i=aL(e),o=r.parse(i);function s(e,r){e||!r?a(e):n?n(r):(tv(t,"`done` is defined if `resolve` is not"),t(void 0,r))}r.run(o,i,function(e,t,n){var a,i;if(e||!t||!n)return s(e);let o=r.stringify(t,n);"string"==typeof(a=o)||(i=a)&&"object"==typeof i&&"byteLength"in i&&"byteOffset"in i?n.value=o:n.result=o,s(e,n)})}}processSync(e){let t,r=!1;return this.freeze(),aC("processSync",this.parser||this.Parser),aN("processSync",this.compiler||this.Compiler),this.process(e,function(e,n){r=!0,au(e),t=n}),aD("processSync","process",r),tv(t,"we either bailed on an error or have a tree"),t}run(e,t,r){aR(e),this.freeze();let n=this.transformers;return r||"function"!=typeof t||(r=t,t=void 0),r?a(void 0,r):new Promise(a);function a(a,i){tv("function"!=typeof t,"`file` can’t be a `done` anymore, we checked");let o=aL(t);n.run(e,o,function(t,n,o){let s=n||e;t?i(t):a?a(s):(tv(r,"`done` is defined if `resolve` is not"),r(void 0,s,o))})}}runSync(e,t){let r,n=!1;return this.run(e,t,function(e,t){au(e),r=t,n=!0}),aD("runSync","run",n),tv(r,"we either bailed on an error or have a tree"),r}stringify(e,t){this.freeze();let r=aL(t),n=this.compiler||this.Compiler;return aN("stringify",n),aR(e),n(e,r)}use(e,...t){let r=this.attachers,n=this.namespace;if(aI("use",this.frozen),null==e);else if("function"==typeof e)o(e,t);else if("object"==typeof e)Array.isArray(e)?i(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function a(e){if(!("plugins"in e)&&!("settings"in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");i(e.plugins),e.settings&&(n.settings=(0,ad.default)(!0,n.settings,e.settings))}function i(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)o(e,[]);else if("object"==typeof e)if(Array.isArray(e)){let[t,...r]=e;o(t,r)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function o(e,t){let n=-1,a=-1;for(;++n<r.length;)if(r[n][0]===e){a=n;break}if(-1===a)r.push([e,...t]);else if(t.length>0){let[n,...i]=t,o=r[a][1];ap(o)&&ap(n)&&(n=(0,ad.default)(!0,o,n)),r[a]=[e,n,...i]}}}}let aS=new ax().freeze();function aC(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function aN(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function aI(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function aR(e){if(!ap(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function aD(e,t,r){if(!r)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function aL(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new av(e)}let aO=[],aP={allowDangerousHtml:!0},aM=/^(https?|ircs?|mailto|xmpp)$/i,aF=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function aB(e){var t;let r,n,a,i,o,s=(r=(t=e).rehypePlugins||aO,n=t.remarkPlugins||aO,a=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...aP}:aP,aS().use(n$).use(n).use(ac,a).use(r)),l=(i=e.children||"",o=new av,"string"==typeof i?o.value=i:tT("Unexpected value `"+i+"` for `children` prop, expected `string`"),o);return function(e,t){let r=t.allowedElements,n=t.allowElement,a=t.components,i=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||aj;for(let e of aF)Object.hasOwn(t,e.from)&&tT("Unexpected `"+e.from+"` prop, "+(e.to?"use `"+e.to+"` instead":"remove it")+" (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#"+e.id+"> for more info)");return r&&i&&tT("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other"),n6(e,function(e,t,a){if("raw"===e.type&&a&&"number"==typeof t)return o?a.children.splice(t,1):a.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in rw)if(Object.hasOwn(rw,t)&&Object.hasOwn(e.properties,t)){let r=e.properties[t],n=rw[t];(null===n||n.includes(e.tagName))&&(e.properties[t]=l(String(r||""),t,e))}}if("element"===e.type){let o=r?!r.includes(e.tagName):!!i&&i.includes(e.tagName);if(!o&&n&&"number"==typeof t&&(o=!n(e,t,a)),o&&a&&"number"==typeof t)return s&&e.children?a.children.splice(t,1,...e.children):a.children.splice(t,1),t}}),function(e,t){var r,n,a,i;let o;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let s=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=s,n=t.jsxDEV,o=function(e,t,a,i){let o=Array.isArray(a.children),s=ri(e);return n(t,a,i,o,{columnNumber:s?s.column-1:void 0,fileName:r,lineNumber:s?s.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");a=t.jsx,i=t.jsxs,o=function(e,t,r,n){let o=Array.isArray(r.children)?i:a;return n?o(t,r,n):o(t,r)}}let l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:s,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?re:t7,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},c=rE(l,e,void 0);return c&&"string"!=typeof c?c:l.create(e,l.Fragment,{children:c||void 0},void 0)}(e,{Fragment:$.Fragment,components:a,ignoreInvalidStyle:!0,jsx:$.jsx,jsxs:$.jsxs,passKeys:!0,passNode:!0})}(s.runSync(s.parse(l),l),e)}function aj(e){let t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),a=e.indexOf("/");return -1===t||-1!==a&&t>a||-1!==r&&t>r||-1!==n&&t>n||aM.test(e.slice(0,t))?e:""}let aU=/[#.]/g;function aH(e,t,r){let n=r?function(e){let t=new Map;for(let r of e)t.set(r.toLowerCase(),r);return t}(r):void 0;return function(r,a,...i){let o;if(null==r)o={type:"root",children:[]},i.unshift(a);else{let s=(o=function(e,t){let r,n,a=e||"",i={},o=0;for(;o<a.length;){aU.lastIndex=o;let e=aU.exec(a),t=a.slice(o,e?e.index:a.length);t&&(r?"#"===r?i.id=t:Array.isArray(i.className)?i.className.push(t):i.className=[t]:n=t,o+=t.length),e&&(r=e[0],o++)}return{type:"element",tagName:n||t||"div",properties:i,children:[]}}(r,t)).tagName.toLowerCase(),l=n?n.get(s):void 0;if(o.tagName=l||s,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;for(let t of Object.keys(e)){let r=e[t];if(r&&"object"==typeof r){if(!Array.isArray(r))return!0;for(let e of r)if("number"!=typeof e&&"string"!=typeof e)return!0}}return!!("children"in e&&Array.isArray(e.children))}(a))i.unshift(a);else for(let[t,r]of Object.entries(a))!function(e,t,r,n){let a,i=tY(e,r);if(null!=n){if("number"==typeof n){if(Number.isNaN(n))return;a=n}else a="boolean"==typeof n?n:"string"==typeof n?i.spaceSeparated?rt(n):i.commaSeparated?t_(n):i.commaOrSpaceSeparated?rt(t_(n).join(" ")):aG(i,i.property,n):Array.isArray(n)?[...n]:"style"===i.property?function(e){let t=[];for(let[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}(n):String(n);if(Array.isArray(a)){let e=[];for(let t of a)e.push(aG(i,i.property,t));a=e}"className"===i.property&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}(e,o.properties,t,r)}for(let e of i)!function e(t,r){if(null==r);else if("number"==typeof r||"string"==typeof r)t.push({type:"text",value:String(r)});else if(Array.isArray(r))for(let n of r)e(t,n);else if("object"==typeof r&&"type"in r)"root"===r.type?e(t,r.children):t.push(r);else throw Error("Expected node, nodes, or string, got `"+r+"`")}(o.children,e);return"element"===o.type&&"template"===o.tagName&&(o.content={type:"root",children:o.children},o.children=[]),o}}function aG(e,t,r){if("string"==typeof r){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(""===r||tz(r)===tz(t)))return!0}return r}let a$=aH(t7,"div"),az=aH(re,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]),aW={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function aq(e,t){let r=function(e,t){switch(e.nodeType){case 1:return function(e,t){let r=e.namespaceURI,n=r===aW.svg?az:a$,a=r===aW.html?e.tagName.toLowerCase():e.tagName,i=r===aW.html&&"template"===a?e.content:e,o=e.getAttributeNames(),s={},l=-1;for(;++l<o.length;)s[o[l]]=e.getAttribute(o[l])||"";return n(a,s,aV(i,t))}(e,t);case 3:return{type:"text",value:e.nodeValue||""};case 8:return{type:"comment",value:e.nodeValue||""};case 9:case 11:return function(e,t){return{type:"root",children:aV(e,t)}}(e,t);case 10:return{type:"doctype"};default:return}}(e,t);return r&&t.afterTransform&&t.afterTransform(e,r),r}function aV(e,t){let r=e.childNodes,n=[],a=-1;for(;++a<r.length;){let e=aq(r[a],t);void 0!==e&&n.push(e)}return n}let aY=new DOMParser,aQ=function(e,t,r){let n=n1(r);if(!e||!e.type||!e.children)throw Error("Expected parent node");if("number"==typeof t){if(t<0||t===1/0)throw Error("Expected positive finite number as index")}else if((t=e.children.indexOf(t))<0)throw Error("Expected child node or index");for(;++t<e.children.length;)if(n(e.children[t],t,e))return e.children[t]},aK=function(e){if(null==e)return aJ;if("string"==typeof e){var t;return t=e,aX(function(e){return e.tagName===t})}if("object"==typeof e){var r=e;let t=[],n=-1;for(;++n<r.length;)t[n]=aK(r[n]);return aX(function(...e){let r=-1;for(;++r<t.length;)if(t[r].apply(this,e))return!0;return!1})}if("function"==typeof e)return aX(e);throw Error("Expected function, string, or array as `test`")};function aX(e){return function(t,r,n){var a;return!!(null!==(a=t)&&"object"==typeof a&&"type"in a&&"tagName"in a&&e.call(this,t,"number"==typeof r?r:void 0,n||void 0))}}function aJ(e){return!!(e&&"object"==typeof e&&"type"in e&&"element"===e.type&&"tagName"in e&&"string"==typeof e.tagName)}let aZ=/\n/g,a0=/[\t ]+/g,a1=aK("br"),a2=aK(function(e){return"td"===e.tagName||"th"===e.tagName}),a5=aK("p"),a3=aK("tr"),a4=aK(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",function(e){return!!(e.properties||{}).hidden},function(e){return"dialog"===e.tagName&&!(e.properties||{}).open}]),a6=aK(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function a8(e,t){let r,n=String(e.value),a=[],i=[],o=0;for(;o<=n.length;){aZ.lastIndex=o;let e=aZ.exec(n),r=e&&"index"in e?e.index:n.length;a.push(function(e,t,r){let n,a=[],i=0;for(;i<e.length;){a0.lastIndex=i;let r=a0.exec(e);n=r?r.index:e.length,i||n||!r||t||a.push(""),i!==n&&a.push(e.slice(i,n)),i=r?n+r[0].length:n}return i===n||r||a.push(""),a.join(" ")}(n.slice(o,r).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),0!==o||t.breakBefore,r!==n.length||t.breakAfter)),o=r+1}let s=-1;for(;++s<a.length;)8203===a[s].charCodeAt(a[s].length-1)||s<a.length-1&&8203===a[s+1].charCodeAt(0)?(i.push(a[s]),r=void 0):a[s]?("number"==typeof r&&i.push(r),i.push(a[s]),r=0):(0===s||s===a.length-1)&&i.push(0);return i}function a9(e,t){if("element"===e.type){let r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}var a7=e.i(923472);let ie=[],it="skip";function ir(e,t,r,n){let a;"function"==typeof t&&"function"!=typeof r?(n=r,r=t):a=t;let i=n1(a),o=n?-1:1;(function e(a,s,l){let c=a&&"object"==typeof a?a:{};if("string"==typeof c.type){let e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+a.type+(e?"<"+e+">":"")+")"})}return u;function u(){var c;let u,d,p,h=ie;if((!t||i(a,s,l[l.length-1]||void 0))&&!1===(h=Array.isArray(c=r(a,l))?c:"number"==typeof c?[!0,c]:null==c?ie:[c])[0])return h;if("children"in a&&a.children&&a.children&&h[0]!==it)for(d=(n?a.children.length:-1)+o,p=l.concat(a);d>-1&&d<a.children.length;){if(!1===(u=e(a.children[d],d,p)())[0])return u;d="number"==typeof u[1]?u[1]:d+o}return h}})(e,void 0,[])()}let ia={},ii=[];function io(e,t){let r=e.indexOf("\r",t),n=e.indexOf("\n",t);return -1===n?r:-1===r||r+1===n?n:r<n?r:n}let is={}.hasOwnProperty,il=Object.prototype;function ic(e,t){let r;switch(t.nodeName){case"#comment":return r={type:"comment",value:t.data},id(e,t,r),r;case"#document":case"#document-fragment":{let n="mode"in t&&("quirks"===t.mode||"limited-quirks"===t.mode);if(r={type:"root",children:iu(e,t.childNodes),data:{quirksMode:n}},e.file&&e.location){let t,n,a=String(e.file),i=(t=String(a),n=[],{toOffset:function(e){if(e&&"number"==typeof e.line&&"number"==typeof e.column&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=io(t,e),a=-1===r?t.length+1:r+1;if(e===a)break;n.push(a)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}},toPoint:function(e){if("number"==typeof e&&e>-1&&e<=t.length){let r=0;for(;;){let a=n[r];if(void 0===a){let e=io(t,n[r-1]);a=-1===e?t.length+1:e+1,n[r]=a}if(a>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}}),o=i.toPoint(0),s=i.toPoint(a.length);tv(o,"expected `start`"),tv(s,"expected `end`"),r.position={start:o,end:s}}return r}case"#documentType":return id(e,t,r={type:"doctype"}),r;case"#text":return r={type:"text",value:t.value},id(e,t,r),r;default:return function(e,t){let r=e.schema;e.schema=t.namespaceURI===aW.svg?re:t7;let n=-1,a={};for(;++n<t.attrs.length;){let e=t.attrs[n],r=(e.prefix?e.prefix+":":"")+e.name;is.call(il,r)||(a[r]=e.value)}let i=("svg"===e.schema.space?az:a$)(t.tagName,a,iu(e,t.childNodes));if(id(e,t,i),"template"===i.tagName){let r=t.sourceCodeLocation,n=r&&r.startTag&&ip(r.startTag),a=r&&r.endTag&&ip(r.endTag),o=ic(e,t.content);n&&a&&e.file&&(o.position={start:n.end,end:a.start}),i.content=o}return e.schema=r,i}(e,t)}}function iu(e,t){let r=-1,n=[];for(;++r<t.length;){let a=ic(e,t[r]);n.push(a)}return n}function id(e,t,r){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){let n=function(e,t,r){let n=ip(r);if("element"===t.type){let a=t.children[t.children.length-1];if(n&&!r.endTag&&a&&a.position&&a.position.end&&(n.end=Object.assign({},a.position.end)),e.verbose){let n,a={};if(r.attrs)for(n in r.attrs)is.call(r.attrs,n)&&(a[tY(e.schema,n).property]=ip(r.attrs[n]));tv(r.startTag,"a start tag should exist");let i=ip(r.startTag),o=r.endTag?ip(r.endTag):void 0,s={opening:i};o&&(s.closing=o),s.properties=a,t.data={position:s}}}return n}(e,r,t.sourceCodeLocation);n&&(e.location=!0,r.position=n)}}function ip(e){let t=ih({line:e.startLine,column:e.startCol,offset:e.startOffset}),r=ih({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||r?{start:t,end:r}:void 0}function ih(e){return e.line&&e.column?e:void 0}function im(e){return e.toLowerCase()}class ig{constructor(e,t){this.property=e,this.attribute=t}}ig.prototype.space=null,ig.prototype.boolean=!1,ig.prototype.booleanish=!1,ig.prototype.overloadedBoolean=!1,ig.prototype.number=!1,ig.prototype.commaSeparated=!1,ig.prototype.spaceSeparated=!1,ig.prototype.commaOrSpaceSeparated=!1,ig.prototype.mustUseProperty=!1,ig.prototype.defined=!1;let iy=0,iE=iw(),ib=iw(),iv=iw(),iT=iw(),i_=iw(),iA=iw(),ik=iw();function iw(){return 2**++iy}e.s(["boolean",0,iE,"booleanish",0,ib,"commaOrSpaceSeparated",0,ik,"commaSeparated",0,iA,"number",0,iT,"overloadedBoolean",0,iv,"spaceSeparated",0,i_],505400);var ix=e.i(505400);let iS=Object.keys(ix);class iC extends ig{constructor(e,t,r,n){let a=-1;if(super(e,t),function(e,t,r){r&&(e[t]=r)}(this,"space",n),"number"==typeof r)for(;++a<iS.length;){const e=iS[a];!function(e,t,r){r&&(e[t]=r)}(this,iS[a],(r&ix[e])===ix[e])}}}iC.prototype.defined=!0;let iN=/^data[-\w.:]+$/i,iI=/-[a-z]/g,iR=/[A-Z]/g;function iD(e){return"-"+e.toLowerCase()}function iL(e){return e.charAt(1).toUpperCase()}class iO{constructor(e,t,r){this.property=e,this.normal=t,r&&(this.space=r)}}function iP(e,t){let r={},n={},a=-1;for(;++a<e.length;)Object.assign(r,e[a].property),Object.assign(n,e[a].normal);return new iO(r,n,t)}iO.prototype.property={},iO.prototype.normal={},iO.prototype.space=null;let iM={}.hasOwnProperty;function iF(e){let t,r={},n={};for(t in e.properties)if(iM.call(e.properties,t)){let a=e.properties[t],i=new iC(t,e.transform(e.attributes||{},t),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(t)&&(i.mustUseProperty=!0),r[t]=i,n[im(t)]=t,n[im(i.attribute)]=t}return new iO(r,n,e.space)}let iB=iF({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),ij=iF({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function iU(e,t){return t in e?e[t]:t}function iH(e,t){return iU(e,t.toLowerCase())}let iG=iF({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:iH,properties:{xmlns:null,xmlnsXLink:null}}),i$=iF({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:ib,ariaAutoComplete:null,ariaBusy:ib,ariaChecked:ib,ariaColCount:iT,ariaColIndex:iT,ariaColSpan:iT,ariaControls:i_,ariaCurrent:null,ariaDescribedBy:i_,ariaDetails:null,ariaDisabled:ib,ariaDropEffect:i_,ariaErrorMessage:null,ariaExpanded:ib,ariaFlowTo:i_,ariaGrabbed:ib,ariaHasPopup:null,ariaHidden:ib,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:i_,ariaLevel:iT,ariaLive:null,ariaModal:ib,ariaMultiLine:ib,ariaMultiSelectable:ib,ariaOrientation:null,ariaOwns:i_,ariaPlaceholder:null,ariaPosInSet:iT,ariaPressed:ib,ariaReadOnly:ib,ariaRelevant:null,ariaRequired:ib,ariaRoleDescription:i_,ariaRowCount:iT,ariaRowIndex:iT,ariaRowSpan:iT,ariaSelected:ib,ariaSetSize:iT,ariaSort:null,ariaValueMax:iT,ariaValueMin:iT,ariaValueNow:iT,ariaValueText:null,role:null}}),iz=iF({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:iH,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:iA,acceptCharset:i_,accessKey:i_,action:null,allow:null,allowFullScreen:iE,allowPaymentRequest:iE,allowUserMedia:iE,alt:null,as:null,async:iE,autoCapitalize:null,autoComplete:i_,autoFocus:iE,autoPlay:iE,blocking:i_,capture:null,charSet:null,checked:iE,cite:null,className:i_,cols:iT,colSpan:null,content:null,contentEditable:ib,controls:iE,controlsList:i_,coords:iT|iA,crossOrigin:null,data:null,dateTime:null,decoding:null,default:iE,defer:iE,dir:null,dirName:null,disabled:iE,download:iv,draggable:ib,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:iE,formTarget:null,headers:i_,height:iT,hidden:iE,high:iT,href:null,hrefLang:null,htmlFor:i_,httpEquiv:i_,id:null,imageSizes:null,imageSrcSet:null,inert:iE,inputMode:null,integrity:null,is:null,isMap:iE,itemId:null,itemProp:i_,itemRef:i_,itemScope:iE,itemType:i_,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:iE,low:iT,manifest:null,max:null,maxLength:iT,media:null,method:null,min:null,minLength:iT,multiple:iE,muted:iE,name:null,nonce:null,noModule:iE,noValidate:iE,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:iE,optimum:iT,pattern:null,ping:i_,placeholder:null,playsInline:iE,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:iE,referrerPolicy:null,rel:i_,required:iE,reversed:iE,rows:iT,rowSpan:iT,sandbox:i_,scope:null,scoped:iE,seamless:iE,selected:iE,shadowRootClonable:iE,shadowRootDelegatesFocus:iE,shadowRootMode:null,shape:null,size:iT,sizes:null,slot:null,span:iT,spellCheck:ib,src:null,srcDoc:null,srcLang:null,srcSet:null,start:iT,step:null,style:null,tabIndex:iT,target:null,title:null,translate:null,type:null,typeMustMatch:iE,useMap:null,value:ib,width:iT,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:i_,axis:null,background:null,bgColor:null,border:iT,borderColor:null,bottomMargin:iT,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:iE,declare:iE,event:null,face:null,frame:null,frameBorder:null,hSpace:iT,leftMargin:iT,link:null,longDesc:null,lowSrc:null,marginHeight:iT,marginWidth:iT,noResize:iE,noHref:iE,noShade:iE,noWrap:iE,object:null,profile:null,prompt:null,rev:null,rightMargin:iT,rules:null,scheme:null,scrolling:ib,standby:null,summary:null,text:null,topMargin:iT,valueType:null,version:null,vAlign:null,vLink:null,vSpace:iT,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:iE,disableRemotePlayback:iE,prefix:null,property:null,results:iT,security:null,unselectable:null}}),iW=iF({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:iU,properties:{about:ik,accentHeight:iT,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:iT,amplitude:iT,arabicForm:null,ascent:iT,attributeName:null,attributeType:null,azimuth:iT,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:iT,by:null,calcMode:null,capHeight:iT,className:i_,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:iT,diffuseConstant:iT,direction:null,display:null,dur:null,divisor:iT,dominantBaseline:null,download:iE,dx:null,dy:null,edgeMode:null,editable:null,elevation:iT,enableBackground:null,end:null,event:null,exponent:iT,externalResourcesRequired:null,fill:null,fillOpacity:iT,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:iA,g2:iA,glyphName:iA,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:iT,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:iT,horizOriginX:iT,horizOriginY:iT,id:null,ideographic:iT,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:iT,k:iT,k1:iT,k2:iT,k3:iT,k4:iT,kernelMatrix:ik,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:iT,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:iT,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:iT,overlineThickness:iT,paintOrder:null,panose1:null,path:null,pathLength:iT,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:i_,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:iT,pointsAtY:iT,pointsAtZ:iT,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ik,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ik,rev:ik,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ik,requiredFeatures:ik,requiredFonts:ik,requiredFormats:ik,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:iT,specularExponent:iT,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:iT,strikethroughThickness:iT,string:null,stroke:null,strokeDashArray:ik,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:iT,strokeOpacity:iT,strokeWidth:null,style:null,surfaceScale:iT,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ik,tabIndex:iT,tableValues:null,target:null,targetX:iT,targetY:iT,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ik,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:iT,underlineThickness:iT,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:iT,values:null,vAlphabetic:iT,vMathematical:iT,vectorEffect:null,vHanging:iT,vIdeographic:iT,version:null,vertAdvY:iT,vertOriginX:iT,vertOriginY:iT,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:iT,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),iq=iP([ij,iB,iG,i$,iz],"html"),iV=iP([ij,iB,iG,i$,iW],"svg"),iY={}.hasOwnProperty;function iQ(e,t){let r=t||{};function n(t,...r){let a=n.invalid,i=n.handlers;if(t&&iY.call(t,e)){let r=String(t[e]);a=iY.call(i,r)?i[r]:n.unknown}if(a)return a.call(this,t,...r)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}let iK={}.hasOwnProperty,iX=iQ("type",{handlers:{root:function(e,t){let r={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return r.childNodes=iJ(e.children,r,t),iZ(e,r),r},element:function(e,t){var r,n;let a,i,o=t;"element"===e.type&&"svg"===e.tagName.toLowerCase()&&"html"===t.space&&(o=iV);let s=[];if(e.properties){for(a in e.properties)if("children"!==a&&iK.call(e.properties,a)){let t=function(e,t,r){let n=function(e,t){let r=im(t),n=t,a=ig;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&"data"===r.slice(0,4)&&iN.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(iI,iL);n="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!iI.test(e)){let r=e.replace(iR,iD);"-"!==r.charAt(0)&&(r="-"+r),t="data"+r}}a=iC}return new a(n,t)}(e,t);if(!1===r||null==r||"number"==typeof r&&Number.isNaN(r)||!r&&n.boolean)return;Array.isArray(r)&&(r=n.commaSeparated?tA(r):rr(r));let a={name:n.attribute,value:!0===r?"":String(r)};if(n.space&&"html"!==n.space&&"svg"!==n.space){let e=a.name.indexOf(":");e<0?a.prefix="":(a.name=a.name.slice(e+1),a.prefix=n.attribute.slice(0,e)),a.namespace=aW[n.space]}return a}(o,a,e.properties[a]);t&&s.push(t)}}let l=o.space;tv(l);let c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:aW[l],childNodes:[],parentNode:null};return c.childNodes=iJ(e.children,c,o),iZ(e,c),"template"===e.tagName&&e.content&&(r=e.content,n=o,(i={nodeName:"#document-fragment",childNodes:[]}).childNodes=iJ(r.children,i,n),iZ(r,i),c.content=i),c},text:function(e){let t={nodeName:"#text",value:e.value,parentNode:null};return iZ(e,t),t},comment:function(e){let t={nodeName:"#comment",data:e.value,parentNode:null};return iZ(e,t),t},doctype:function(e){let t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return iZ(e,t),t}}});function iJ(e,t,r){let n=-1,a=[];if(e)for(;++n<e.length;){let i=iX(e[n],r);i.parentNode=t,a.push(i)}return a}function iZ(e,t){let r=e.position;r&&r.start&&r.end&&(tv("number"==typeof r.start.offset),tv("number"==typeof r.end.offset),t.sourceCodeLocation={startLine:r.start.line,startCol:r.start.column,startOffset:r.start.offset,endLine:r.end.line,endCol:r.end.column,endOffset:r.end.offset})}let i0=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],i1=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]);(s=w||(w={}))[s.EOF=-1]="EOF",s[s.NULL=0]="NULL",s[s.TABULATION=9]="TABULATION",s[s.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",s[s.LINE_FEED=10]="LINE_FEED",s[s.FORM_FEED=12]="FORM_FEED",s[s.SPACE=32]="SPACE",s[s.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",s[s.QUOTATION_MARK=34]="QUOTATION_MARK",s[s.AMPERSAND=38]="AMPERSAND",s[s.APOSTROPHE=39]="APOSTROPHE",s[s.HYPHEN_MINUS=45]="HYPHEN_MINUS",s[s.SOLIDUS=47]="SOLIDUS",s[s.DIGIT_0=48]="DIGIT_0",s[s.DIGIT_9=57]="DIGIT_9",s[s.SEMICOLON=59]="SEMICOLON",s[s.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",s[s.EQUALS_SIGN=61]="EQUALS_SIGN",s[s.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",s[s.QUESTION_MARK=63]="QUESTION_MARK",s[s.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",s[s.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",s[s.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",s[s.GRAVE_ACCENT=96]="GRAVE_ACCENT",s[s.LATIN_SMALL_A=97]="LATIN_SMALL_A",s[s.LATIN_SMALL_Z=122]="LATIN_SMALL_Z";let i2="[CDATA[",i5="doctype",i3="script";function i4(e){return e>=55296&&e<=57343}function i6(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function i8(e){return e>=64976&&e<=65007||i1.has(e)}(l=x||(x={})).controlCharacterInInputStream="control-character-in-input-stream",l.noncharacterInInputStream="noncharacter-in-input-stream",l.surrogateInInputStream="surrogate-in-input-stream",l.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",l.endTagWithAttributes="end-tag-with-attributes",l.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",l.unexpectedSolidusInTag="unexpected-solidus-in-tag",l.unexpectedNullCharacter="unexpected-null-character",l.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",l.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",l.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",l.missingEndTagName="missing-end-tag-name",l.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",l.unknownNamedCharacterReference="unknown-named-character-reference",l.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",l.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",l.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",l.eofBeforeTagName="eof-before-tag-name",l.eofInTag="eof-in-tag",l.missingAttributeValue="missing-attribute-value",l.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",l.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",l.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",l.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",l.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",l.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",l.missingDoctypePublicIdentifier="missing-doctype-public-identifier",l.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",l.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",l.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",l.cdataInHtmlContent="cdata-in-html-content",l.incorrectlyOpenedComment="incorrectly-opened-comment",l.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",l.eofInDoctype="eof-in-doctype",l.nestedComment="nested-comment",l.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",l.eofInComment="eof-in-comment",l.incorrectlyClosedComment="incorrectly-closed-comment",l.eofInCdata="eof-in-cdata",l.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",l.nullCharacterReference="null-character-reference",l.surrogateCharacterReference="surrogate-character-reference",l.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",l.controlCharacterReference="control-character-reference",l.noncharacterCharacterReference="noncharacter-character-reference",l.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",l.missingDoctypeName="missing-doctype-name",l.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",l.duplicateAttribute="duplicate-attribute",l.nonConformingDoctype="non-conforming-doctype",l.missingDoctype="missing-doctype",l.misplacedDoctype="misplaced-doctype",l.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",l.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",l.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",l.openElementsLeftAfterEof="open-elements-left-after-eof",l.abandonedHeadElementChild="abandoned-head-element-child",l.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",l.nestedNoscriptInHead="nested-noscript-in-head",l.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text";class i9{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:r,col:n,offset:a}=this,i=n+t,o=a+t;return{code:e,startLine:r,endLine:r,startCol:i,endCol:i,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(t>=56320&&t<=57343)return this.pos++,this._addGap(),(e-55296)*1024+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,w.EOF;return this._err(x.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((32|this.html.charCodeAt(this.pos+t))!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,w.EOF;let r=this.html.charCodeAt(t);return r===w.CARRIAGE_RETURN?w.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,w.EOF;let e=this.html.charCodeAt(this.pos);return e===w.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,w.LINE_FEED):e===w.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,i4(e)&&(e=this._processSurrogate(e)),null===this.handler.onParseError||e>31&&e<127||e===w.LINE_FEED||e===w.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){i6(e)?this._err(x.controlCharacterInInputStream):i8(e)&&this._err(x.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}function i7(e,t){for(let r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}(c=S||(S={}))[c.CHARACTER=0]="CHARACTER",c[c.NULL_CHARACTER=1]="NULL_CHARACTER",c[c.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",c[c.START_TAG=3]="START_TAG",c[c.END_TAG=4]="END_TAG",c[c.COMMENT=5]="COMMENT",c[c.DOCTYPE=6]="DOCTYPE",c[c.EOF=7]="EOF",c[c.HIBERNATION=8]="HIBERNATION",e.s(["TokenType",()=>S,"getTokenAttr",()=>i7],743820);let oe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀\ud835\udd04rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀\ud835\udd38plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀\ud835\udc9cign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀\ud835\udd05pf;쀀\ud835\udd39eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀\ud835\udc9epĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀\ud835\udd07Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀\ud835\udd3bƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀\ud835\udc9frok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀\ud835\udd08rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀\ud835\udd3csilon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀\ud835\udd09lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀\ud835\udd3dAll;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀\ud835\udd0a;拙pf;쀀\ud835\udd3eeater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀\ud835\udca2;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀\ud835\udd40a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀\ud835\udd0dpf;쀀\ud835\udd41ǣ߇\0ߌr;쀀\ud835\udca5rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀\ud835\udd0epf;쀀\ud835\udd42cr;쀀\ud835\udca6րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀\ud835\udd0fĀ;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀\ud835\udd43erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀\ud835\udd10nusPlus;戓pf;쀀\ud835\udd44cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀\ud835\udd11ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀\ud835\udca9ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀\ud835\udd12rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀\ud835\udd46enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀\ud835\udcaaash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀\ud835\udd13i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀\ud835\udcab;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀\ud835\udd14pf;愚cr;쀀\ud835\udcacBEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀\ud835\udd16ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀\ud835\udd4aɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀\ud835\udcaear;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀\ud835\udd17ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀\ud835\udd4bipleDot;惛Āctዖዛr;쀀\ud835\udcafrok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀\ud835\udd18rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀\ud835\udd4cЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀\ud835\udcb0ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀\ud835\udd19pf;쀀\ud835\udd4dcr;쀀\ud835\udcb1dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀\ud835\udd1apf;쀀\ud835\udd4ecr;쀀\ud835\udcb2Ȁfiosᓋᓐᓒᓘr;쀀\ud835\udd1b;䎞pf;쀀\ud835\udd4fcr;쀀\ud835\udcb3ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀\ud835\udd1cpf;쀀\ud835\udd50cr;쀀\ud835\udcb4ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀\ud835\udcb5ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀\ud835\udd1erave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀\ud835\udd52;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀\ud835\udcb6;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀\ud835\udd1fgcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀\ud835\udd53Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀\ud835\udcb7mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀\ud835\udd20ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀\ud835\udd54oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀\ud835\udcb8Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀\ud835\udd21arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀\ud835\udd55ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀\ud835\udcb9;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀\ud835\udd22ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀\ud835\udd56ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀\ud835\udd23lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀\ud835\udd57ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀\ud835\udcbbࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀\ud835\udd24Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀\ud835\udd58Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀\ud835\udd25sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀\ud835\udd59bar;怕ƀclt≯≴≸r;쀀\ud835\udcbdasè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀\ud835\udd26rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀\ud835\udd5aa;䎹uest耻¿䂿Āci⎊⎏r;쀀\ud835\udcbenʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀\ud835\udd27ath;䈷pf;쀀\ud835\udd5bǣ⏬\0⏱r;쀀\ud835\udcbfrcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀\ud835\udd28reen;䄸cy;䑅cy;䑜pf;쀀\ud835\udd5ccr;쀀\ud835\udcc0ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀\ud835\udd29Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀\ud835\udd5dus;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀\ud835\udcc1mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀\ud835\udd2ao;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀\ud835\udd5eĀct⣸⣽r;쀀\ud835\udcc2pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀\ud835\udd2bȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀\ud835\udd5f膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀\ud835\udcc3ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀\ud835\udd2cͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀\ud835\udd60ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀\ud835\udd2dƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀\ud835\udd61nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀\ud835\udcc5;䏈ncsp;怈̀fiopsu⋢⿱r;쀀\ud835\udd2epf;쀀\ud835\udd62rime;恗cr;쀀\ud835\udcc6ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀\ud835\udd2fĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀\ud835\udd63us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀\ud835\udcc7Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀\ud835\udd30Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀\ud835\udd64aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀\ud835\udcc8tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀\ud835\udd31Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀\ud835\udd65rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀\ud835\udcc9;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀\ud835\udd32rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀\ud835\udd66̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀\ud835\udccaƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀\ud835\udd33tré㦮suĀbp㧯㧱»ജ»൙pf;쀀\ud835\udd67roðtré㦴Ācu㨆㨋r;쀀\ud835\udccbĀbp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀\ud835\udd34pf;쀀\ud835\udd68Ā;eᑹ㩦atèᑹcr;쀀\ud835\udcccૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀\ud835\udd35ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀\ud835\udd69imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀\ud835\udccdĀpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀\ud835\udd36cy;䑗pf;쀀\ud835\udd6acr;쀀\ud835\udcceĀcm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀\ud835\udd37cy;䐶grarr;懝pf;쀀\ud835\udd6bcr;쀀\ud835\udccfĀjn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),ot=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function or(e){return e>=N.ZERO&&e<=N.NINE}C=String.fromCodePoint,(u=N||(N={}))[u.NUM=35]="NUM",u[u.SEMI=59]="SEMI",u[u.EQUALS=61]="EQUALS",u[u.ZERO=48]="ZERO",u[u.NINE=57]="NINE",u[u.LOWER_A=97]="LOWER_A",u[u.LOWER_F=102]="LOWER_F",u[u.LOWER_X=120]="LOWER_X",u[u.LOWER_Z=122]="LOWER_Z",u[u.UPPER_A=65]="UPPER_A",u[u.UPPER_F=70]="UPPER_F",u[u.UPPER_Z=90]="UPPER_Z",(d=I||(I={}))[d.VALUE_LENGTH=49152]="VALUE_LENGTH",d[d.BRANCH_LENGTH=16256]="BRANCH_LENGTH",d[d.JUMP_TABLE=127]="JUMP_TABLE",(p=R||(R={}))[p.EntityStart=0]="EntityStart",p[p.NumericStart=1]="NumericStart",p[p.NumericDecimal=2]="NumericDecimal",p[p.NumericHex=3]="NumericHex",p[p.NamedEntity=4]="NamedEntity",(h=D||(D={}))[h.Legacy=0]="Legacy",h[h.Strict=1]="Strict",h[h.Attribute=2]="Attribute";class on{constructor(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=R.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=D.Strict}startEntity(e){this.decodeMode=e,this.state=R.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case R.EntityStart:if(e.charCodeAt(t)===N.NUM)return this.state=R.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1);return this.state=R.NamedEntity,this.stateNamedEntity(e,t);case R.NumericStart:return this.stateNumericStart(e,t);case R.NumericDecimal:return this.stateNumericDecimal(e,t);case R.NumericHex:return this.stateNumericHex(e,t);case R.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===N.LOWER_X?(this.state=R.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=R.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,r,n){if(t!==r){let a=r-t;this.result=this.result*Math.pow(n,a)+Number.parseInt(e.substr(t,a),n),this.consumed+=a}}stateNumericHex(e,t){let r=t;for(;t<e.length;){var n;let a=e.charCodeAt(t);if(!or(a)&&(!((n=a)>=N.UPPER_A)||!(n<=N.UPPER_F))&&(!(n>=N.LOWER_A)||!(n<=N.LOWER_F)))return this.addToNumericResult(e,r,t,16),this.emitNumericEntity(a,3);t+=1}return this.addToNumericResult(e,r,t,16),-1}stateNumericDecimal(e,t){let r=t;for(;t<e.length;){let n=e.charCodeAt(t);if(!or(n))return this.addToNumericResult(e,r,t,10),this.emitNumericEntity(n,2);t+=1}return this.addToNumericResult(e,r,t,10),-1}emitNumericEntity(e,t){var r,n,a;if(this.consumed<=t)return null==(r=this.errors)||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===N.SEMI)this.consumed+=1;else if(this.decodeMode===D.Strict)return 0;return this.emitCodePoint((n=this.result)>=55296&&n<=57343||n>1114111?65533:null!=(a=ot.get(n))?a:n,this.consumed),this.errors&&(e!==N.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:r}=this,n=r[this.treeIndex],a=(n&I.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let i=e.charCodeAt(t);if(this.treeIndex=function(e,t,r,n){let a=(t&I.BRANCH_LENGTH)>>7,i=t&I.JUMP_TABLE;if(0===a)return 0!==i&&n===i?r:-1;if(i){let t=n-i;return t<0||t>=a?-1:e[r+t]-1}let o=r,s=o+a-1;for(;o<=s;){let t=o+s>>>1,r=e[t];if(r<n)o=t+1;else{if(!(r>n))return e[t+a];s=t-1}}return -1}(r,n,this.treeIndex+Math.max(1,a),i),this.treeIndex<0)return 0===this.result||this.decodeMode===D.Attribute&&(0===a||function(e){var t;return e===N.EQUALS||(t=e)>=N.UPPER_A&&t<=N.UPPER_Z||t>=N.LOWER_A&&t<=N.LOWER_Z||or(t)}(i))?0:this.emitNotTerminatedNamedEntity();if(0!=(a=((n=r[this.treeIndex])&I.VALUE_LENGTH)>>14)){if(i===N.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==D.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return -1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:r}=this,n=(r[t]&I.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,n,this.consumed),null==(e=this.errors)||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,r){let{decodeTree:n}=this;return this.emitCodePoint(1===t?n[e]&~I.VALUE_LENGTH:n[e+1],r),3===t&&this.emitCodePoint(n[e+2],r),r}end(){var e;switch(this.state){case R.NamedEntity:return 0!==this.result&&(this.decodeMode!==D.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case R.NumericDecimal:return this.emitNumericEntity(0,2);case R.NumericHex:return this.emitNumericEntity(0,3);case R.NumericStart:return null==(e=this.errors)||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case R.EntityStart:return 0}}}(f=L||(L={})).HTML="http://www.w3.org/1999/xhtml",f.MATHML="http://www.w3.org/1998/Math/MathML",f.SVG="http://www.w3.org/2000/svg",f.XLINK="http://www.w3.org/1999/xlink",f.XML="http://www.w3.org/XML/1998/namespace",f.XMLNS="http://www.w3.org/2000/xmlns/",(m=O||(O={})).TYPE="type",m.ACTION="action",m.ENCODING="encoding",m.PROMPT="prompt",m.NAME="name",m.COLOR="color",m.FACE="face",m.SIZE="size",(g=P||(P={})).NO_QUIRKS="no-quirks",g.QUIRKS="quirks",g.LIMITED_QUIRKS="limited-quirks",(y=M||(M={})).A="a",y.ADDRESS="address",y.ANNOTATION_XML="annotation-xml",y.APPLET="applet",y.AREA="area",y.ARTICLE="article",y.ASIDE="aside",y.B="b",y.BASE="base",y.BASEFONT="basefont",y.BGSOUND="bgsound",y.BIG="big",y.BLOCKQUOTE="blockquote",y.BODY="body",y.BR="br",y.BUTTON="button",y.CAPTION="caption",y.CENTER="center",y.CODE="code",y.COL="col",y.COLGROUP="colgroup",y.DD="dd",y.DESC="desc",y.DETAILS="details",y.DIALOG="dialog",y.DIR="dir",y.DIV="div",y.DL="dl",y.DT="dt",y.EM="em",y.EMBED="embed",y.FIELDSET="fieldset",y.FIGCAPTION="figcaption",y.FIGURE="figure",y.FONT="font",y.FOOTER="footer",y.FOREIGN_OBJECT="foreignObject",y.FORM="form",y.FRAME="frame",y.FRAMESET="frameset",y.H1="h1",y.H2="h2",y.H3="h3",y.H4="h4",y.H5="h5",y.H6="h6",y.HEAD="head",y.HEADER="header",y.HGROUP="hgroup",y.HR="hr",y.HTML="html",y.I="i",y.IMG="img",y.IMAGE="image",y.INPUT="input",y.IFRAME="iframe",y.KEYGEN="keygen",y.LABEL="label",y.LI="li",y.LINK="link",y.LISTING="listing",y.MAIN="main",y.MALIGNMARK="malignmark",y.MARQUEE="marquee",y.MATH="math",y.MENU="menu",y.META="meta",y.MGLYPH="mglyph",y.MI="mi",y.MO="mo",y.MN="mn",y.MS="ms",y.MTEXT="mtext",y.NAV="nav",y.NOBR="nobr",y.NOFRAMES="noframes",y.NOEMBED="noembed",y.NOSCRIPT="noscript",y.OBJECT="object",y.OL="ol",y.OPTGROUP="optgroup",y.OPTION="option",y.P="p",y.PARAM="param",y.PLAINTEXT="plaintext",y.PRE="pre",y.RB="rb",y.RP="rp",y.RT="rt",y.RTC="rtc",y.RUBY="ruby",y.S="s",y.SCRIPT="script",y.SEARCH="search",y.SECTION="section",y.SELECT="select",y.SOURCE="source",y.SMALL="small",y.SPAN="span",y.STRIKE="strike",y.STRONG="strong",y.STYLE="style",y.SUB="sub",y.SUMMARY="summary",y.SUP="sup",y.TABLE="table",y.TBODY="tbody",y.TEMPLATE="template",y.TEXTAREA="textarea",y.TFOOT="tfoot",y.TD="td",y.TH="th",y.THEAD="thead",y.TITLE="title",y.TR="tr",y.TRACK="track",y.TT="tt",y.U="u",y.UL="ul",y.SVG="svg",y.VAR="var",y.WBR="wbr",y.XMP="xmp",(E=F||(F={}))[E.UNKNOWN=0]="UNKNOWN",E[E.A=1]="A",E[E.ADDRESS=2]="ADDRESS",E[E.ANNOTATION_XML=3]="ANNOTATION_XML",E[E.APPLET=4]="APPLET",E[E.AREA=5]="AREA",E[E.ARTICLE=6]="ARTICLE",E[E.ASIDE=7]="ASIDE",E[E.B=8]="B",E[E.BASE=9]="BASE",E[E.BASEFONT=10]="BASEFONT",E[E.BGSOUND=11]="BGSOUND",E[E.BIG=12]="BIG",E[E.BLOCKQUOTE=13]="BLOCKQUOTE",E[E.BODY=14]="BODY",E[E.BR=15]="BR",E[E.BUTTON=16]="BUTTON",E[E.CAPTION=17]="CAPTION",E[E.CENTER=18]="CENTER",E[E.CODE=19]="CODE",E[E.COL=20]="COL",E[E.COLGROUP=21]="COLGROUP",E[E.DD=22]="DD",E[E.DESC=23]="DESC",E[E.DETAILS=24]="DETAILS",E[E.DIALOG=25]="DIALOG",E[E.DIR=26]="DIR",E[E.DIV=27]="DIV",E[E.DL=28]="DL",E[E.DT=29]="DT",E[E.EM=30]="EM",E[E.EMBED=31]="EMBED",E[E.FIELDSET=32]="FIELDSET",E[E.FIGCAPTION=33]="FIGCAPTION",E[E.FIGURE=34]="FIGURE",E[E.FONT=35]="FONT",E[E.FOOTER=36]="FOOTER",E[E.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",E[E.FORM=38]="FORM",E[E.FRAME=39]="FRAME",E[E.FRAMESET=40]="FRAMESET",E[E.H1=41]="H1",E[E.H2=42]="H2",E[E.H3=43]="H3",E[E.H4=44]="H4",E[E.H5=45]="H5",E[E.H6=46]="H6",E[E.HEAD=47]="HEAD",E[E.HEADER=48]="HEADER",E[E.HGROUP=49]="HGROUP",E[E.HR=50]="HR",E[E.HTML=51]="HTML",E[E.I=52]="I",E[E.IMG=53]="IMG",E[E.IMAGE=54]="IMAGE",E[E.INPUT=55]="INPUT",E[E.IFRAME=56]="IFRAME",E[E.KEYGEN=57]="KEYGEN",E[E.LABEL=58]="LABEL",E[E.LI=59]="LI",E[E.LINK=60]="LINK",E[E.LISTING=61]="LISTING",E[E.MAIN=62]="MAIN",E[E.MALIGNMARK=63]="MALIGNMARK",E[E.MARQUEE=64]="MARQUEE",E[E.MATH=65]="MATH",E[E.MENU=66]="MENU",E[E.META=67]="META",E[E.MGLYPH=68]="MGLYPH",E[E.MI=69]="MI",E[E.MO=70]="MO",E[E.MN=71]="MN",E[E.MS=72]="MS",E[E.MTEXT=73]="MTEXT",E[E.NAV=74]="NAV",E[E.NOBR=75]="NOBR",E[E.NOFRAMES=76]="NOFRAMES",E[E.NOEMBED=77]="NOEMBED",E[E.NOSCRIPT=78]="NOSCRIPT",E[E.OBJECT=79]="OBJECT",E[E.OL=80]="OL",E[E.OPTGROUP=81]="OPTGROUP",E[E.OPTION=82]="OPTION",E[E.P=83]="P",E[E.PARAM=84]="PARAM",E[E.PLAINTEXT=85]="PLAINTEXT",E[E.PRE=86]="PRE",E[E.RB=87]="RB",E[E.RP=88]="RP",E[E.RT=89]="RT",E[E.RTC=90]="RTC",E[E.RUBY=91]="RUBY",E[E.S=92]="S",E[E.SCRIPT=93]="SCRIPT",E[E.SEARCH=94]="SEARCH",E[E.SECTION=95]="SECTION",E[E.SELECT=96]="SELECT",E[E.SOURCE=97]="SOURCE",E[E.SMALL=98]="SMALL",E[E.SPAN=99]="SPAN",E[E.STRIKE=100]="STRIKE",E[E.STRONG=101]="STRONG",E[E.STYLE=102]="STYLE",E[E.SUB=103]="SUB",E[E.SUMMARY=104]="SUMMARY",E[E.SUP=105]="SUP",E[E.TABLE=106]="TABLE",E[E.TBODY=107]="TBODY",E[E.TEMPLATE=108]="TEMPLATE",E[E.TEXTAREA=109]="TEXTAREA",E[E.TFOOT=110]="TFOOT",E[E.TD=111]="TD",E[E.TH=112]="TH",E[E.THEAD=113]="THEAD",E[E.TITLE=114]="TITLE",E[E.TR=115]="TR",E[E.TRACK=116]="TRACK",E[E.TT=117]="TT",E[E.U=118]="U",E[E.UL=119]="UL",E[E.SVG=120]="SVG",E[E.VAR=121]="VAR",E[E.WBR=122]="WBR",E[E.XMP=123]="XMP";let oa=new Map([[M.A,F.A],[M.ADDRESS,F.ADDRESS],[M.ANNOTATION_XML,F.ANNOTATION_XML],[M.APPLET,F.APPLET],[M.AREA,F.AREA],[M.ARTICLE,F.ARTICLE],[M.ASIDE,F.ASIDE],[M.B,F.B],[M.BASE,F.BASE],[M.BASEFONT,F.BASEFONT],[M.BGSOUND,F.BGSOUND],[M.BIG,F.BIG],[M.BLOCKQUOTE,F.BLOCKQUOTE],[M.BODY,F.BODY],[M.BR,F.BR],[M.BUTTON,F.BUTTON],[M.CAPTION,F.CAPTION],[M.CENTER,F.CENTER],[M.CODE,F.CODE],[M.COL,F.COL],[M.COLGROUP,F.COLGROUP],[M.DD,F.DD],[M.DESC,F.DESC],[M.DETAILS,F.DETAILS],[M.DIALOG,F.DIALOG],[M.DIR,F.DIR],[M.DIV,F.DIV],[M.DL,F.DL],[M.DT,F.DT],[M.EM,F.EM],[M.EMBED,F.EMBED],[M.FIELDSET,F.FIELDSET],[M.FIGCAPTION,F.FIGCAPTION],[M.FIGURE,F.FIGURE],[M.FONT,F.FONT],[M.FOOTER,F.FOOTER],[M.FOREIGN_OBJECT,F.FOREIGN_OBJECT],[M.FORM,F.FORM],[M.FRAME,F.FRAME],[M.FRAMESET,F.FRAMESET],[M.H1,F.H1],[M.H2,F.H2],[M.H3,F.H3],[M.H4,F.H4],[M.H5,F.H5],[M.H6,F.H6],[M.HEAD,F.HEAD],[M.HEADER,F.HEADER],[M.HGROUP,F.HGROUP],[M.HR,F.HR],[M.HTML,F.HTML],[M.I,F.I],[M.IMG,F.IMG],[M.IMAGE,F.IMAGE],[M.INPUT,F.INPUT],[M.IFRAME,F.IFRAME],[M.KEYGEN,F.KEYGEN],[M.LABEL,F.LABEL],[M.LI,F.LI],[M.LINK,F.LINK],[M.LISTING,F.LISTING],[M.MAIN,F.MAIN],[M.MALIGNMARK,F.MALIGNMARK],[M.MARQUEE,F.MARQUEE],[M.MATH,F.MATH],[M.MENU,F.MENU],[M.META,F.META],[M.MGLYPH,F.MGLYPH],[M.MI,F.MI],[M.MO,F.MO],[M.MN,F.MN],[M.MS,F.MS],[M.MTEXT,F.MTEXT],[M.NAV,F.NAV],[M.NOBR,F.NOBR],[M.NOFRAMES,F.NOFRAMES],[M.NOEMBED,F.NOEMBED],[M.NOSCRIPT,F.NOSCRIPT],[M.OBJECT,F.OBJECT],[M.OL,F.OL],[M.OPTGROUP,F.OPTGROUP],[M.OPTION,F.OPTION],[M.P,F.P],[M.PARAM,F.PARAM],[M.PLAINTEXT,F.PLAINTEXT],[M.PRE,F.PRE],[M.RB,F.RB],[M.RP,F.RP],[M.RT,F.RT],[M.RTC,F.RTC],[M.RUBY,F.RUBY],[M.S,F.S],[M.SCRIPT,F.SCRIPT],[M.SEARCH,F.SEARCH],[M.SECTION,F.SECTION],[M.SELECT,F.SELECT],[M.SOURCE,F.SOURCE],[M.SMALL,F.SMALL],[M.SPAN,F.SPAN],[M.STRIKE,F.STRIKE],[M.STRONG,F.STRONG],[M.STYLE,F.STYLE],[M.SUB,F.SUB],[M.SUMMARY,F.SUMMARY],[M.SUP,F.SUP],[M.TABLE,F.TABLE],[M.TBODY,F.TBODY],[M.TEMPLATE,F.TEMPLATE],[M.TEXTAREA,F.TEXTAREA],[M.TFOOT,F.TFOOT],[M.TD,F.TD],[M.TH,F.TH],[M.THEAD,F.THEAD],[M.TITLE,F.TITLE],[M.TR,F.TR],[M.TRACK,F.TRACK],[M.TT,F.TT],[M.U,F.U],[M.UL,F.UL],[M.SVG,F.SVG],[M.VAR,F.VAR],[M.WBR,F.WBR],[M.XMP,F.XMP]]);function oi(e){var t;return null!=(t=oa.get(e))?t:F.UNKNOWN}let oo=F,os={[L.HTML]:new Set([oo.ADDRESS,oo.APPLET,oo.AREA,oo.ARTICLE,oo.ASIDE,oo.BASE,oo.BASEFONT,oo.BGSOUND,oo.BLOCKQUOTE,oo.BODY,oo.BR,oo.BUTTON,oo.CAPTION,oo.CENTER,oo.COL,oo.COLGROUP,oo.DD,oo.DETAILS,oo.DIR,oo.DIV,oo.DL,oo.DT,oo.EMBED,oo.FIELDSET,oo.FIGCAPTION,oo.FIGURE,oo.FOOTER,oo.FORM,oo.FRAME,oo.FRAMESET,oo.H1,oo.H2,oo.H3,oo.H4,oo.H5,oo.H6,oo.HEAD,oo.HEADER,oo.HGROUP,oo.HR,oo.HTML,oo.IFRAME,oo.IMG,oo.INPUT,oo.LI,oo.LINK,oo.LISTING,oo.MAIN,oo.MARQUEE,oo.MENU,oo.META,oo.NAV,oo.NOEMBED,oo.NOFRAMES,oo.NOSCRIPT,oo.OBJECT,oo.OL,oo.P,oo.PARAM,oo.PLAINTEXT,oo.PRE,oo.SCRIPT,oo.SECTION,oo.SELECT,oo.SOURCE,oo.STYLE,oo.SUMMARY,oo.TABLE,oo.TBODY,oo.TD,oo.TEMPLATE,oo.TEXTAREA,oo.TFOOT,oo.TH,oo.THEAD,oo.TITLE,oo.TR,oo.TRACK,oo.UL,oo.WBR,oo.XMP]),[L.MATHML]:new Set([oo.MI,oo.MO,oo.MN,oo.MS,oo.MTEXT,oo.ANNOTATION_XML]),[L.SVG]:new Set([oo.TITLE,oo.FOREIGN_OBJECT,oo.DESC]),[L.XLINK]:new Set,[L.XML]:new Set,[L.XMLNS]:new Set},ol=new Set([oo.H1,oo.H2,oo.H3,oo.H4,oo.H5,oo.H6]),oc=new Set([M.STYLE,M.SCRIPT,M.XMP,M.IFRAME,M.NOEMBED,M.NOFRAMES,M.PLAINTEXT]);function ou(e,t){return oc.has(e)||t&&e===M.NOSCRIPT}e.s(["ATTRS",()=>O,"DOCUMENT_MODE",()=>P,"NS",()=>L,"NUMBERED_HEADERS",0,ol,"SPECIAL_ELEMENTS",0,os,"TAG_ID",()=>F,"TAG_NAMES",()=>M,"getTagID",()=>oi,"hasUnescapedText",()=>ou],113515),(b=B||(B={}))[b.DATA=0]="DATA",b[b.RCDATA=1]="RCDATA",b[b.RAWTEXT=2]="RAWTEXT",b[b.SCRIPT_DATA=3]="SCRIPT_DATA",b[b.PLAINTEXT=4]="PLAINTEXT",b[b.TAG_OPEN=5]="TAG_OPEN",b[b.END_TAG_OPEN=6]="END_TAG_OPEN",b[b.TAG_NAME=7]="TAG_NAME",b[b.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",b[b.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",b[b.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",b[b.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",b[b.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",b[b.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",b[b.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",b[b.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",b[b.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",b[b.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",b[b.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",b[b.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",b[b.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",b[b.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",b[b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",b[b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",b[b.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",b[b.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",b[b.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",b[b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",b[b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",b[b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",b[b.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",b[b.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",b[b.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",b[b.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",b[b.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",b[b.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",b[b.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",b[b.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",b[b.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",b[b.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",b[b.BOGUS_COMMENT=40]="BOGUS_COMMENT",b[b.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",b[b.COMMENT_START=42]="COMMENT_START",b[b.COMMENT_START_DASH=43]="COMMENT_START_DASH",b[b.COMMENT=44]="COMMENT",b[b.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",b[b.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",b[b.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",b[b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",b[b.COMMENT_END_DASH=49]="COMMENT_END_DASH",b[b.COMMENT_END=50]="COMMENT_END",b[b.COMMENT_END_BANG=51]="COMMENT_END_BANG",b[b.DOCTYPE=52]="DOCTYPE",b[b.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",b[b.DOCTYPE_NAME=54]="DOCTYPE_NAME",b[b.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",b[b.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",b[b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",b[b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",b[b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",b[b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",b[b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",b[b.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",b[b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",b[b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",b[b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",b[b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",b[b.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",b[b.CDATA_SECTION=68]="CDATA_SECTION",b[b.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",b[b.CDATA_SECTION_END=70]="CDATA_SECTION_END",b[b.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",b[b.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND";let od={DATA:B.DATA,RCDATA:B.RCDATA,RAWTEXT:B.RAWTEXT,SCRIPT_DATA:B.SCRIPT_DATA,PLAINTEXT:B.PLAINTEXT,CDATA_SECTION:B.CDATA_SECTION};function op(e){return e>=w.LATIN_CAPITAL_A&&e<=w.LATIN_CAPITAL_Z}function oh(e){return e>=w.LATIN_SMALL_A&&e<=w.LATIN_SMALL_Z||op(e)}function of(e){return oh(e)||e>=w.DIGIT_0&&e<=w.DIGIT_9}function om(e){return e===w.SPACE||e===w.LINE_FEED||e===w.TABULATION||e===w.FORM_FEED}function og(e){return om(e)||e===w.SOLIDUS||e===w.GREATER_THAN_SIGN}class oy{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=B.DATA,this.returnState=B.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new i9(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new on(oe,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(x.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(x.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=function(e){if(e===w.NULL)return x.nullCharacterReference;if(e>1114111)return x.characterReferenceOutsideUnicodeRange;if(i4(e))return x.surrogateCharacterReference;if(i8(e))return x.noncharacterCharacterReference;if(i6(e)||e===w.CARRIAGE_RETURN)return x.controlCharacterReference;return null}(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var r,n;null==(n=(r=this.handler).onParseError)||n.call(r,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,r){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==r||r()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return!!this.preprocessor.startsWith(e,t)&&(this._advanceBy(e.length-1),!0)}_createStartTagToken(){this.currentToken={type:S.START_TAG,tagName:"",tagID:F.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:S.END_TAG,tagName:"",tagID:F.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:S.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:S.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;let r=this.currentToken;null===i7(r,this.currentAttr.name)?(r.attrs.push(this.currentAttr),r.location&&this.currentLocation&&((null!=(e=(t=r.location).attrs)?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue())):this._err(x.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=oi(e.tagName),e.type===S.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(x.endTagWithAttributes),e.selfClosing&&this._err(x.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case S.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case S.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case S.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:S.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=om(e)?S.WHITESPACE_CHARACTER:e===w.NULL?S.NULL_CHARACTER:S.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(S.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=B.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?D.Attribute:D.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===B.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===B.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===B.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case B.DATA:this._stateData(e);break;case B.RCDATA:this._stateRcdata(e);break;case B.RAWTEXT:this._stateRawtext(e);break;case B.SCRIPT_DATA:this._stateScriptData(e);break;case B.PLAINTEXT:this._statePlaintext(e);break;case B.TAG_OPEN:this._stateTagOpen(e);break;case B.END_TAG_OPEN:this._stateEndTagOpen(e);break;case B.TAG_NAME:this._stateTagName(e);break;case B.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case B.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case B.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case B.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case B.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case B.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case B.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case B.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case B.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case B.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case B.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case B.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case B.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case B.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case B.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case B.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case B.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case B.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case B.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case B.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case B.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case B.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case B.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case B.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case B.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case B.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case B.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case B.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case B.BOGUS_COMMENT:this._stateBogusComment(e);break;case B.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case B.COMMENT_START:this._stateCommentStart(e);break;case B.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case B.COMMENT:this._stateComment(e);break;case B.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case B.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case B.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case B.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case B.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case B.COMMENT_END:this._stateCommentEnd(e);break;case B.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case B.DOCTYPE:this._stateDoctype(e);break;case B.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case B.DOCTYPE_NAME:this._stateDoctypeName(e);break;case B.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case B.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case B.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case B.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case B.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case B.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case B.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case B.CDATA_SECTION:this._stateCdataSection(e);break;case B.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case B.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case B.CHARACTER_REFERENCE:this._stateCharacterReference();break;case B.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error("Unknown state")}}_stateData(e){switch(e){case w.LESS_THAN_SIGN:this.state=B.TAG_OPEN;break;case w.AMPERSAND:this._startCharacterReference();break;case w.NULL:this._err(x.unexpectedNullCharacter),this._emitCodePoint(e);break;case w.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case w.AMPERSAND:this._startCharacterReference();break;case w.LESS_THAN_SIGN:this.state=B.RCDATA_LESS_THAN_SIGN;break;case w.NULL:this._err(x.unexpectedNullCharacter),this._emitChars("�");break;case w.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case w.LESS_THAN_SIGN:this.state=B.RAWTEXT_LESS_THAN_SIGN;break;case w.NULL:this._err(x.unexpectedNullCharacter),this._emitChars("�");break;case w.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case w.LESS_THAN_SIGN:this.state=B.SCRIPT_DATA_LESS_THAN_SIGN;break;case w.NULL:this._err(x.unexpectedNullCharacter),this._emitChars("�");break;case w.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case w.NULL:this._err(x.unexpectedNullCharacter),this._emitChars("�");break;case w.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(oh(e))this._createStartTagToken(),this.state=B.TAG_NAME,this._stateTagName(e);else switch(e){case w.EXCLAMATION_MARK:this.state=B.MARKUP_DECLARATION_OPEN;break;case w.SOLIDUS:this.state=B.END_TAG_OPEN;break;case w.QUESTION_MARK:this._err(x.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=B.BOGUS_COMMENT,this._stateBogusComment(e);break;case w.EOF:this._err(x.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(x.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=B.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(oh(e))this._createEndTagToken(),this.state=B.TAG_NAME,this._stateTagName(e);else switch(e){case w.GREATER_THAN_SIGN:this._err(x.missingEndTagName),this.state=B.DATA;break;case w.EOF:this._err(x.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(x.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=B.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:this.state=B.BEFORE_ATTRIBUTE_NAME;break;case w.SOLIDUS:this.state=B.SELF_CLOSING_START_TAG;break;case w.GREATER_THAN_SIGN:this.state=B.DATA,this.emitCurrentTagToken();break;case w.NULL:this._err(x.unexpectedNullCharacter),t.tagName+="�";break;case w.EOF:this._err(x.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(op(e)?e+32:e)}}_stateRcdataLessThanSign(e){e===w.SOLIDUS?this.state=B.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=B.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){oh(e)?(this.state=B.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=B.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();switch(this._createEndTagToken(),this.currentToken.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=B.BEFORE_ATTRIBUTE_NAME,!1;case w.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=B.SELF_CLOSING_START_TAG,!1;case w.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=B.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=B.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===w.SOLIDUS?this.state=B.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=B.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){oh(e)?(this.state=B.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=B.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=B.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case w.SOLIDUS:this.state=B.SCRIPT_DATA_END_TAG_OPEN;break;case w.EXCLAMATION_MARK:this.state=B.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=B.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){oh(e)?(this.state=B.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=B.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=B.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===w.HYPHEN_MINUS?(this.state=B.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=B.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===w.HYPHEN_MINUS?(this.state=B.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=B.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case w.HYPHEN_MINUS:this.state=B.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case w.LESS_THAN_SIGN:this.state=B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case w.NULL:this._err(x.unexpectedNullCharacter),this._emitChars("�");break;case w.EOF:this._err(x.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case w.HYPHEN_MINUS:this.state=B.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case w.LESS_THAN_SIGN:this.state=B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case w.NULL:this._err(x.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case w.EOF:this._err(x.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=B.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case w.HYPHEN_MINUS:this._emitChars("-");break;case w.LESS_THAN_SIGN:this.state=B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case w.GREATER_THAN_SIGN:this.state=B.SCRIPT_DATA,this._emitChars(">");break;case w.NULL:this._err(x.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case w.EOF:this._err(x.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=B.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===w.SOLIDUS?this.state=B.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:oh(e)?(this._emitChars("<"),this.state=B.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){oh(e)?(this.state=B.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(i3,!1)&&og(this.preprocessor.peek(i3.length))){this._emitCodePoint(e);for(let e=0;e<i3.length;e++)this._emitCodePoint(this._consume());this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case w.HYPHEN_MINUS:this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case w.LESS_THAN_SIGN:this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case w.NULL:this._err(x.unexpectedNullCharacter),this._emitChars("�");break;case w.EOF:this._err(x.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case w.HYPHEN_MINUS:this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case w.LESS_THAN_SIGN:this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case w.NULL:this._err(x.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case w.EOF:this._err(x.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case w.HYPHEN_MINUS:this._emitChars("-");break;case w.LESS_THAN_SIGN:this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case w.GREATER_THAN_SIGN:this.state=B.SCRIPT_DATA,this._emitChars(">");break;case w.NULL:this._err(x.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case w.EOF:this._err(x.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===w.SOLIDUS?(this.state=B.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(i3,!1)&&og(this.preprocessor.peek(i3.length))){this._emitCodePoint(e);for(let e=0;e<i3.length;e++)this._emitCodePoint(this._consume());this.state=B.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.SOLIDUS:case w.GREATER_THAN_SIGN:case w.EOF:this.state=B.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case w.EQUALS_SIGN:this._err(x.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=B.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=B.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:case w.SOLIDUS:case w.GREATER_THAN_SIGN:case w.EOF:this._leaveAttrName(),this.state=B.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case w.EQUALS_SIGN:this._leaveAttrName(),this.state=B.BEFORE_ATTRIBUTE_VALUE;break;case w.QUOTATION_MARK:case w.APOSTROPHE:case w.LESS_THAN_SIGN:this._err(x.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case w.NULL:this._err(x.unexpectedNullCharacter),this.currentAttr.name+="�";break;default:this.currentAttr.name+=String.fromCodePoint(op(e)?e+32:e)}}_stateAfterAttributeName(e){switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.SOLIDUS:this.state=B.SELF_CLOSING_START_TAG;break;case w.EQUALS_SIGN:this.state=B.BEFORE_ATTRIBUTE_VALUE;break;case w.GREATER_THAN_SIGN:this.state=B.DATA,this.emitCurrentTagToken();break;case w.EOF:this._err(x.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=B.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.QUOTATION_MARK:this.state=B.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case w.APOSTROPHE:this.state=B.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case w.GREATER_THAN_SIGN:this._err(x.missingAttributeValue),this.state=B.DATA,this.emitCurrentTagToken();break;default:this.state=B.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case w.QUOTATION_MARK:this.state=B.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case w.AMPERSAND:this._startCharacterReference();break;case w.NULL:this._err(x.unexpectedNullCharacter),this.currentAttr.value+="�";break;case w.EOF:this._err(x.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case w.APOSTROPHE:this.state=B.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case w.AMPERSAND:this._startCharacterReference();break;case w.NULL:this._err(x.unexpectedNullCharacter),this.currentAttr.value+="�";break;case w.EOF:this._err(x.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:this._leaveAttrValue(),this.state=B.BEFORE_ATTRIBUTE_NAME;break;case w.AMPERSAND:this._startCharacterReference();break;case w.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=B.DATA,this.emitCurrentTagToken();break;case w.NULL:this._err(x.unexpectedNullCharacter),this.currentAttr.value+="�";break;case w.QUOTATION_MARK:case w.APOSTROPHE:case w.LESS_THAN_SIGN:case w.EQUALS_SIGN:case w.GRAVE_ACCENT:this._err(x.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case w.EOF:this._err(x.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:this._leaveAttrValue(),this.state=B.BEFORE_ATTRIBUTE_NAME;break;case w.SOLIDUS:this._leaveAttrValue(),this.state=B.SELF_CLOSING_START_TAG;break;case w.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=B.DATA,this.emitCurrentTagToken();break;case w.EOF:this._err(x.eofInTag),this._emitEOFToken();break;default:this._err(x.missingWhitespaceBetweenAttributes),this.state=B.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case w.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=B.DATA,this.emitCurrentTagToken();break;case w.EOF:this._err(x.eofInTag),this._emitEOFToken();break;default:this._err(x.unexpectedSolidusInTag),this.state=B.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case w.GREATER_THAN_SIGN:this.state=B.DATA,this.emitCurrentComment(t);break;case w.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case w.NULL:this._err(x.unexpectedNullCharacter),t.data+="�";break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch("--",!0)?(this._createCommentToken(3),this.state=B.COMMENT_START):this._consumeSequenceIfMatch(i5,!1)?(this.currentLocation=this.getCurrentLocation(i5.length+1),this.state=B.DOCTYPE):this._consumeSequenceIfMatch(i2,!0)?this.inForeignNode?this.state=B.CDATA_SECTION:(this._err(x.cdataInHtmlContent),this._createCommentToken(i2.length+1),this.currentToken.data="[CDATA[",this.state=B.BOGUS_COMMENT):this._ensureHibernation()||(this._err(x.incorrectlyOpenedComment),this._createCommentToken(2),this.state=B.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case w.HYPHEN_MINUS:this.state=B.COMMENT_START_DASH;break;case w.GREATER_THAN_SIGN:{this._err(x.abruptClosingOfEmptyComment),this.state=B.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=B.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case w.HYPHEN_MINUS:this.state=B.COMMENT_END;break;case w.GREATER_THAN_SIGN:this._err(x.abruptClosingOfEmptyComment),this.state=B.DATA,this.emitCurrentComment(t);break;case w.EOF:this._err(x.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=B.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case w.HYPHEN_MINUS:this.state=B.COMMENT_END_DASH;break;case w.LESS_THAN_SIGN:t.data+="<",this.state=B.COMMENT_LESS_THAN_SIGN;break;case w.NULL:this._err(x.unexpectedNullCharacter),t.data+="�";break;case w.EOF:this._err(x.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case w.EXCLAMATION_MARK:t.data+="!",this.state=B.COMMENT_LESS_THAN_SIGN_BANG;break;case w.LESS_THAN_SIGN:t.data+="<";break;default:this.state=B.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===w.HYPHEN_MINUS?this.state=B.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=B.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===w.HYPHEN_MINUS?this.state=B.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=B.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==w.GREATER_THAN_SIGN&&e!==w.EOF&&this._err(x.nestedComment),this.state=B.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case w.HYPHEN_MINUS:this.state=B.COMMENT_END;break;case w.EOF:this._err(x.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=B.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case w.GREATER_THAN_SIGN:this.state=B.DATA,this.emitCurrentComment(t);break;case w.EXCLAMATION_MARK:this.state=B.COMMENT_END_BANG;break;case w.HYPHEN_MINUS:t.data+="-";break;case w.EOF:this._err(x.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=B.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case w.HYPHEN_MINUS:t.data+="--!",this.state=B.COMMENT_END_DASH;break;case w.GREATER_THAN_SIGN:this._err(x.incorrectlyClosedComment),this.state=B.DATA,this.emitCurrentComment(t);break;case w.EOF:this._err(x.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=B.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:this.state=B.BEFORE_DOCTYPE_NAME;break;case w.GREATER_THAN_SIGN:this.state=B.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case w.EOF:{this._err(x.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(x.missingWhitespaceBeforeDoctypeName),this.state=B.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(op(e))this._createDoctypeToken(String.fromCharCode(e+32)),this.state=B.DOCTYPE_NAME;else switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.NULL:this._err(x.unexpectedNullCharacter),this._createDoctypeToken("�"),this.state=B.DOCTYPE_NAME;break;case w.GREATER_THAN_SIGN:{this._err(x.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=B.DATA;break}case w.EOF:{this._err(x.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=B.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:this.state=B.AFTER_DOCTYPE_NAME;break;case w.GREATER_THAN_SIGN:this.state=B.DATA,this.emitCurrentDoctype(t);break;case w.NULL:this._err(x.unexpectedNullCharacter),t.name+="�";break;case w.EOF:this._err(x.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(op(e)?e+32:e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.GREATER_THAN_SIGN:this.state=B.DATA,this.emitCurrentDoctype(t);break;case w.EOF:this._err(x.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch("public",!1)?this.state=B.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch("system",!1)?this.state=B.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(x.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:this.state=B.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case w.QUOTATION_MARK:this._err(x.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case w.APOSTROPHE:this._err(x.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case w.GREATER_THAN_SIGN:this._err(x.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(t);break;case w.EOF:this._err(x.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(x.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.QUOTATION_MARK:t.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case w.APOSTROPHE:t.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case w.GREATER_THAN_SIGN:this._err(x.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(t);break;case w.EOF:this._err(x.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(x.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case w.QUOTATION_MARK:this.state=B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case w.NULL:this._err(x.unexpectedNullCharacter),t.publicId+="�";break;case w.GREATER_THAN_SIGN:this._err(x.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=B.DATA;break;case w.EOF:this._err(x.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case w.APOSTROPHE:this.state=B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case w.NULL:this._err(x.unexpectedNullCharacter),t.publicId+="�";break;case w.GREATER_THAN_SIGN:this._err(x.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=B.DATA;break;case w.EOF:this._err(x.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:this.state=B.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case w.GREATER_THAN_SIGN:this.state=B.DATA,this.emitCurrentDoctype(t);break;case w.QUOTATION_MARK:this._err(x.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case w.APOSTROPHE:this._err(x.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case w.EOF:this._err(x.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(x.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=B.DATA;break;case w.QUOTATION_MARK:t.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case w.APOSTROPHE:t.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case w.EOF:this._err(x.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(x.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:this.state=B.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case w.QUOTATION_MARK:this._err(x.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case w.APOSTROPHE:this._err(x.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case w.GREATER_THAN_SIGN:this._err(x.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(t);break;case w.EOF:this._err(x.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(x.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.QUOTATION_MARK:t.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case w.APOSTROPHE:t.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case w.GREATER_THAN_SIGN:this._err(x.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(t);break;case w.EOF:this._err(x.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(x.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case w.QUOTATION_MARK:this.state=B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case w.NULL:this._err(x.unexpectedNullCharacter),t.systemId+="�";break;case w.GREATER_THAN_SIGN:this._err(x.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=B.DATA;break;case w.EOF:this._err(x.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case w.APOSTROPHE:this.state=B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case w.NULL:this._err(x.unexpectedNullCharacter),t.systemId+="�";break;case w.GREATER_THAN_SIGN:this._err(x.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=B.DATA;break;case w.EOF:this._err(x.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=B.DATA;break;case w.EOF:this._err(x.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(x.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case w.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=B.DATA;break;case w.NULL:this._err(x.unexpectedNullCharacter);break;case w.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case w.RIGHT_SQUARE_BRACKET:this.state=B.CDATA_SECTION_BRACKET;break;case w.EOF:this._err(x.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===w.RIGHT_SQUARE_BRACKET?this.state=B.CDATA_SECTION_END:(this._emitChars("]"),this.state=B.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case w.GREATER_THAN_SIGN:this.state=B.DATA;break;case w.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=B.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}0===e?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(w.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&of(this.preprocessor.peek(1))?B.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){of(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===w.SEMICOLON&&this._err(x.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}let oE=new Set([F.DD,F.DT,F.LI,F.OPTGROUP,F.OPTION,F.P,F.RB,F.RP,F.RT,F.RTC]),ob=new Set([...oE,F.CAPTION,F.COLGROUP,F.TBODY,F.TD,F.TFOOT,F.TH,F.THEAD,F.TR]),ov=new Set([F.APPLET,F.CAPTION,F.HTML,F.MARQUEE,F.OBJECT,F.TABLE,F.TD,F.TEMPLATE,F.TH]),oT=new Set([...ov,F.OL,F.UL]),o_=new Set([...ov,F.BUTTON]),oA=new Set([F.ANNOTATION_XML,F.MI,F.MN,F.MO,F.MS,F.MTEXT]),ok=new Set([F.DESC,F.FOREIGN_OBJECT,F.TITLE]),ow=new Set([F.TR,F.TEMPLATE,F.HTML]),ox=new Set([F.TBODY,F.TFOOT,F.THEAD,F.TEMPLATE,F.HTML]),oS=new Set([F.TABLE,F.TEMPLATE,F.HTML]),oC=new Set([F.TD,F.TH]);class oN{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,r){this.treeAdapter=t,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=F.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===F.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===L.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let r=this._indexOf(e);this.items[r]=t,r===this.stackTop&&(this.current=t)}insertAfter(e,t,r){let n=this._indexOf(e)+1;this.items.splice(n,0,t),this.tagIDs.splice(n,0,r),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.current&&void 0!==this.currentTagId&&this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==L.HTML)this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let r=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(ol,L.HTML)}popUntilTableCellPopped(){this.popUntilPopped(oC,L.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let r=this.stackTop;r>=0;r--)if(e.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===t)return r;return -1}clearBackTo(e,t){let r=this._indexOfTagNames(e,t);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(oS,L.HTML)}clearBackToTableBodyContext(){this.clearBackTo(ox,L.HTML)}clearBackToTableRowContext(){this.clearBackTo(ow,L.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===F.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===F.HTML}hasInDynamicScope(e,t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case L.HTML:if(n===e)return!0;if(t.has(n))return!1;break;case L.SVG:if(ok.has(n))return!1;break;case L.MATHML:if(oA.has(n))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,ov)}hasInListItemScope(e){return this.hasInDynamicScope(e,oT)}hasInButtonScope(e){return this.hasInDynamicScope(e,o_)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case L.HTML:if(ol.has(t))return!0;if(ov.has(t))return!1;break;case L.SVG:if(ok.has(t))return!1;break;case L.MATHML:if(oA.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===L.HTML)switch(this.tagIDs[t]){case e:return!0;case F.TABLE:case F.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===L.HTML)switch(this.tagIDs[e]){case F.TBODY:case F.THEAD:case F.TFOOT:return!0;case F.TABLE:case F.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===L.HTML)switch(this.tagIDs[t]){case e:return!0;case F.OPTION:case F.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;void 0!==this.currentTagId&&oE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;void 0!==this.currentTagId&&ob.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;void 0!==this.currentTagId&&this.currentTagId!==e&&ob.has(this.currentTagId);)this.pop()}}(v=j||(j={}))[v.Marker=0]="Marker",v[v.Element=1]="Element";let oI={type:j.Marker};class oR{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let r=[],n=t.length,a=this.treeAdapter.getTagName(e),i=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===j.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===a&&this.treeAdapter.getNamespaceURI(o)===i){let t=this.treeAdapter.getAttrList(o);t.length===n&&r.push({idx:e,attrs:t})}}return r}_ensureNoahArkCondition(e){if(this.entries.length<3)return;let t=this.treeAdapter.getAttrList(e),r=this._getNoahArkConditionCandidates(e,t);if(r.length<3)return;let n=new Map(t.map(e=>[e.name,e.value])),a=0;for(let e=0;e<r.length;e++){let t=r[e];t.attrs.every(e=>n.get(e.name)===e.value)&&(a+=1)>=3&&this.entries.splice(t.idx,1)}}insertMarker(){this.entries.unshift(oI)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:j.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:j.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);-1!==t&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(oI);-1===e?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===j.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===j.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===j.Element&&t.element===e)}}let oD={createDocument:()=>({nodeName:"#document",mode:P.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,r)=>({nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),createTextNode:e=>({nodeName:"#text",value:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){let n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(e,t,r,n){let a=e.childNodes.find(e=>"#documentType"===e.nodeName);a?(a.name=t,a.publicId=r,a.systemId=n):oD.appendChild(e,{nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null})},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let r=e.childNodes[e.childNodes.length-1];if(oD.isTextNode(r)){r.value+=t;return}}oD.appendChild(e,oD.createTextNode(t))},insertTextBefore(e,t,r){let n=e.childNodes[e.childNodes.indexOf(r)-1];n&&oD.isTextNode(n)?n.value+=t:oD.insertBefore(e,oD.createTextNode(t),r)},adoptAttributes(e,t){let r=new Set(e.attrs.map(e=>e.name));for(let n=0;n<t.length;n++)r.has(t[n].name)||e.attrs.push(t[n])},getFirstChild:e=>e.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},oL="html",oO=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],oP=[...oO,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],oM=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),oF=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],oB=[...oF,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function oj(e,t){return t.some(t=>e.startsWith(t))}let oU=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),oH=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:L.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:L.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:L.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:L.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:L.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:L.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:L.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:L.XML}],["xml:space",{prefix:"xml",name:"space",namespace:L.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:L.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:L.XMLNS}]]),oG=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),o$=new Set([F.B,F.BIG,F.BLOCKQUOTE,F.BODY,F.BR,F.CENTER,F.CODE,F.DD,F.DIV,F.DL,F.DT,F.EM,F.EMBED,F.H1,F.H2,F.H3,F.H4,F.H5,F.H6,F.HEAD,F.HR,F.I,F.IMG,F.LI,F.LISTING,F.MENU,F.META,F.NOBR,F.OL,F.P,F.PRE,F.RUBY,F.S,F.SMALL,F.SPAN,F.STRONG,F.STRIKE,F.SUB,F.SUP,F.TABLE,F.TT,F.U,F.UL,F.VAR]);function oz(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}function oW(e){for(let t=0;t<e.attrs.length;t++){let r=oU.get(e.attrs[t].name);null!=r&&(e.attrs[t].name=r)}}function oq(e){for(let t=0;t<e.attrs.length;t++){let r=oH.get(e.attrs[t].name);r&&(e.attrs[t].prefix=r.prefix,e.attrs[t].name=r.name,e.attrs[t].namespace=r.namespace)}}(T=U||(U={}))[T.INITIAL=0]="INITIAL",T[T.BEFORE_HTML=1]="BEFORE_HTML",T[T.BEFORE_HEAD=2]="BEFORE_HEAD",T[T.IN_HEAD=3]="IN_HEAD",T[T.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",T[T.AFTER_HEAD=5]="AFTER_HEAD",T[T.IN_BODY=6]="IN_BODY",T[T.TEXT=7]="TEXT",T[T.IN_TABLE=8]="IN_TABLE",T[T.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",T[T.IN_CAPTION=10]="IN_CAPTION",T[T.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",T[T.IN_TABLE_BODY=12]="IN_TABLE_BODY",T[T.IN_ROW=13]="IN_ROW",T[T.IN_CELL=14]="IN_CELL",T[T.IN_SELECT=15]="IN_SELECT",T[T.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",T[T.IN_TEMPLATE=17]="IN_TEMPLATE",T[T.AFTER_BODY=18]="AFTER_BODY",T[T.IN_FRAMESET=19]="IN_FRAMESET",T[T.AFTER_FRAMESET=20]="AFTER_FRAMESET",T[T.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",T[T.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET";let oV={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},oY=new Set([F.TABLE,F.TBODY,F.TFOOT,F.THEAD,F.TR]),oQ={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:oD,onParseError:null};class oK{constructor(e,t,r=null,n=null){this.fragmentContext=r,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=U.INITIAL,this.originalInsertionMode=U.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...oQ,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=null!=t?t:this.treeAdapter.createDocument(),this.tokenizer=new oy(this.options,this),this.activeFormattingElements=new oR(this.treeAdapter),this.fragmentContextID=r?oi(this.treeAdapter.getTagName(r)):F.UNKNOWN,this._setContextModes(null!=r?r:this.document,this.fragmentContextID),this.openElements=new oN(this.document,this.treeAdapter,this)}static parse(e,t){let r=new this(t);return r.tokenizer.write(e,!0),r.document}static getFragmentParser(e,t){let r={...oQ,...t};null!=e||(e=r.treeAdapter.createElement(M.TEMPLATE,L.HTML,[]));let n=r.treeAdapter.createElement("documentmock",L.HTML,[]),a=new this(r,n,e);return a.fragmentContextID===F.TEMPLATE&&a.tmplInsertionModeStack.unshift(U.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,r){var n;if(!this.onParseError)return;let a=null!=(n=e.location)?n:oV,i={code:t,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(i)}onItemPush(e,t,r){var n,a;null==(a=(n=this.treeAdapter).onItemPush)||a.call(n,e),r&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var r,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null==(n=(r=this.treeAdapter).onItemPop)||n.call(r,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let r=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===L.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&void 0!==e&&void 0!==t&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,L.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=U.TEXT}switchToPlaintextParsing(){this.insertionMode=U.TEXT,this.originalInsertionMode=U.IN_BODY,this.tokenizer.state=od.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===M.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===L.HTML)switch(this.fragmentContextID){case F.TITLE:case F.TEXTAREA:this.tokenizer.state=od.RCDATA;break;case F.STYLE:case F.XMP:case F.IFRAME:case F.NOEMBED:case F.NOFRAMES:case F.NOSCRIPT:this.tokenizer.state=od.RAWTEXT;break;case F.SCRIPT:this.tokenizer.state=od.SCRIPT_DATA;break;case F.PLAINTEXT:this.tokenizer.state=od.PLAINTEXT}}_setDocumentType(e){let t=e.name||"",r=e.publicId||"",n=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,r,n),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let r=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(null!=t?t:this.document,e)}}_appendElement(e,t){let r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location)}_insertElement(e,t){let r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID)}_insertFakeElement(e,t){let r=this.treeAdapter.createElement(e,L.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,L.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,r),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(M.HTML,L.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,F.HTML)}_appendCommentNode(e,t){let r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,e.location)}_insertCharacters(e){let t,r;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(t,e.chars,r):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let n=this.treeAdapter.getChildNodes(t),a=r?n.lastIndexOf(r):n.length,i=n[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:r,endOffset:n}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:r,endOffset:n})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(t,r)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let r=t.location,n=this.treeAdapter.getTagName(e),a=t.type===S.END_TAG&&n===t.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}shouldProcessStartTagTokenInForeignContent(e){let t,r;return!!this.currentNotInHTML&&(0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,r=this.fragmentContextID):{current:t,currentTagId:r}=this.openElements,(e.tagID!==F.SVG||this.treeAdapter.getTagName(t)!==M.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==L.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===F.MGLYPH||e.tagID===F.MALIGNMARK)&&void 0!==r&&!this._isIntegrationPoint(r,t,L.HTML)))}_processToken(e){switch(e.type){case S.CHARACTER:this.onCharacter(e);break;case S.NULL_CHARACTER:this.onNullCharacter(e);break;case S.COMMENT:this.onComment(e);break;case S.DOCTYPE:this.onDoctype(e);break;case S.START_TAG:this._processStartTag(e);break;case S.END_TAG:this.onEndTag(e);break;case S.EOF:this.onEof(e);break;case S.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,r){let n=this.treeAdapter.getNamespaceURI(t),a=this.treeAdapter.getAttrList(t);return(!r||r===L.HTML)&&function(e,t,r){if(t===L.MATHML&&e===F.ANNOTATION_XML){for(let e=0;e<r.length;e++)if(r[e].name===O.ENCODING){let t=r[e].value.toLowerCase();return"text/html"===t||"application/xhtml+xml"===t}}return t===L.SVG&&(e===F.FOREIGN_OBJECT||e===F.DESC||e===F.TITLE)}(e,n,a)||(!r||r===L.MATHML)&&n===L.MATHML&&(e===F.MI||e===F.MO||e===F.MN||e===F.MS||e===F.MTEXT)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===j.Marker||this.openElements.contains(e.element)),r=-1===t?e-1:t-1;for(let e=r;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=U.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(F.P),this.openElements.popUntilTagNamePopped(F.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case F.TR:this.insertionMode=U.IN_ROW;return;case F.TBODY:case F.THEAD:case F.TFOOT:this.insertionMode=U.IN_TABLE_BODY;return;case F.CAPTION:this.insertionMode=U.IN_CAPTION;return;case F.COLGROUP:this.insertionMode=U.IN_COLUMN_GROUP;return;case F.TABLE:this.insertionMode=U.IN_TABLE;return;case F.BODY:this.insertionMode=U.IN_BODY;return;case F.FRAMESET:this.insertionMode=U.IN_FRAMESET;return;case F.SELECT:return void this._resetInsertionModeForSelect(e);case F.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case F.HTML:this.insertionMode=this.headElement?U.AFTER_HEAD:U.BEFORE_HEAD;return;case F.TD:case F.TH:if(e>0){this.insertionMode=U.IN_CELL;return}break;case F.HEAD:if(e>0){this.insertionMode=U.IN_HEAD;return}}this.insertionMode=U.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===F.TEMPLATE)break;if(e===F.TABLE){this.insertionMode=U.IN_SELECT_IN_TABLE;return}}this.insertionMode=U.IN_SELECT}_isElementCausesFosterParenting(e){return oY.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&void 0!==this.openElements.currentTagId&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case F.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===L.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case F.TABLE:{let r=this.treeAdapter.getParentNode(t);if(r)return{parent:r,beforeElement:t};return{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return os[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){var t,r;return void(t=this,r=e,t._insertCharacters(r),t.framesetOk=!1)}switch(this.insertionMode){case U.INITIAL:o0(this,e);break;case U.BEFORE_HTML:o1(this,e);break;case U.BEFORE_HEAD:o2(this,e);break;case U.IN_HEAD:o4(this,e);break;case U.IN_HEAD_NO_SCRIPT:o6(this,e);break;case U.AFTER_HEAD:o8(this,e);break;case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:se(this,e);break;case U.TEXT:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:sc(this,e);break;case U.IN_TABLE_TEXT:sf(this,e);break;case U.IN_COLUMN_GROUP:sE(this,e);break;case U.AFTER_BODY:sS(this,e);break;case U.AFTER_AFTER_BODY:sC(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){var t,r;return void(t=this,(r=e).chars="�",t._insertCharacters(r))}switch(this.insertionMode){case U.INITIAL:o0(this,e);break;case U.BEFORE_HTML:o1(this,e);break;case U.BEFORE_HEAD:o2(this,e);break;case U.IN_HEAD:o4(this,e);break;case U.IN_HEAD_NO_SCRIPT:o6(this,e);break;case U.AFTER_HEAD:o8(this,e);break;case U.TEXT:this._insertCharacters(e);break;case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:sc(this,e);break;case U.IN_COLUMN_GROUP:sE(this,e);break;case U.AFTER_BODY:sS(this,e);break;case U.AFTER_AFTER_BODY:sC(this,e)}}onComment(e){var t,r,n,a;if(this.skipNextNewLine=!1,this.currentNotInHTML)return void oJ(this,e);switch(this.insertionMode){case U.INITIAL:case U.BEFORE_HTML:case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_TEMPLATE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:oJ(this,e);break;case U.IN_TABLE_TEXT:sm(this,e);break;case U.AFTER_BODY:t=this,r=e,t._appendCommentNode(r,t.openElements.items[0]);break;case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:n=this,a=e,n._appendCommentNode(a,n.document)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case U.INITIAL:!function(e,t){e._setDocumentType(t);let r=t.forceQuirks?P.QUIRKS:function(e){if(e.name!==oL)return P.QUIRKS;let{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return P.QUIRKS;let{publicId:r}=e;if(null!==r){if(r=r.toLowerCase(),oM.has(r))return P.QUIRKS;let e=null===t?oP:oO;if(oj(r,e))return P.QUIRKS;if(oj(r,e=null===t?oF:oB))return P.LIMITED_QUIRKS}return P.NO_QUIRKS}(t);(t.name!==oL||null!==t.publicId||null!==t.systemId&&"about:legacy-compat"!==t.systemId)&&e._err(t,x.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=U.BEFORE_HTML}(this,e);break;case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:this._err(e,x.misplacedDoctype);break;case U.IN_TABLE_TEXT:sm(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,x.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){let r;if((r=t.tagID)===F.FONT&&t.attrs.some(({name:e})=>e===O.COLOR||e===O.SIZE||e===O.FACE)||o$.has(r))sN(e),e._startTagOutsideForeignContent(t);else{let r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);if(n===L.MATHML)oz(t);else if(n===L.SVG){let e;null!=(e=oG.get(t.tagName))&&(t.tagName=e,t.tagID=oi(t.tagName)),oW(t)}oq(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case U.INITIAL:o0(this,e);break;case U.BEFORE_HTML:t=this,(r=e).tagID===F.HTML?(t._insertElement(r,L.HTML),t.insertionMode=U.BEFORE_HEAD):o1(t,r);break;case U.BEFORE_HEAD:var t,r,n,a,i,o,s,l,c,u,d,p,h=this,f=e;switch(f.tagID){case F.HTML:si(h,f);break;case F.HEAD:h._insertElement(f,L.HTML),h.headElement=h.openElements.current,h.insertionMode=U.IN_HEAD;break;default:o2(h,f)}break;case U.IN_HEAD:o5(this,e);break;case U.IN_HEAD_NO_SCRIPT:var m=this,g=e;switch(g.tagID){case F.HTML:si(m,g);break;case F.BASEFONT:case F.BGSOUND:case F.HEAD:case F.LINK:case F.META:case F.NOFRAMES:case F.STYLE:o5(m,g);break;case F.NOSCRIPT:m._err(g,x.nestedNoscriptInHead);break;default:o6(m,g)}break;case U.AFTER_HEAD:var y=this,E=e;switch(E.tagID){case F.HTML:si(y,E);break;case F.BODY:y._insertElement(E,L.HTML),y.framesetOk=!1,y.insertionMode=U.IN_BODY;break;case F.FRAMESET:y._insertElement(E,L.HTML),y.insertionMode=U.IN_FRAMESET;break;case F.BASE:case F.BASEFONT:case F.BGSOUND:case F.LINK:case F.META:case F.NOFRAMES:case F.SCRIPT:case F.STYLE:case F.TEMPLATE:case F.TITLE:y._err(E,x.abandonedHeadElementChild),y.openElements.push(y.headElement,F.HEAD),o5(y,E),y.openElements.remove(y.headElement);break;case F.HEAD:y._err(E,x.misplacedStartTagForHeadElement);break;default:o8(y,E)}break;case U.IN_BODY:si(this,e);break;case U.IN_TABLE:su(this,e);break;case U.IN_TABLE_TEXT:sm(this,e);break;case U.IN_CAPTION:let b;n=this,b=(a=e).tagID,sg.has(b)?n.openElements.hasInTableScope(F.CAPTION)&&(n.openElements.generateImpliedEndTags(),n.openElements.popUntilTagNamePopped(F.CAPTION),n.activeFormattingElements.clearToLastMarker(),n.insertionMode=U.IN_TABLE,su(n,a)):si(n,a);break;case U.IN_COLUMN_GROUP:sy(this,e);break;case U.IN_TABLE_BODY:sb(this,e);break;case U.IN_ROW:sT(this,e);break;case U.IN_CELL:let v;i=this,v=(o=e).tagID,sg.has(v)?(i.openElements.hasInTableScope(F.TD)||i.openElements.hasInTableScope(F.TH))&&(i._closeTableCell(),sT(i,o)):si(i,o);break;case U.IN_SELECT:sA(this,e);break;case U.IN_SELECT_IN_TABLE:let T;s=this,(T=(l=e).tagID)===F.CAPTION||T===F.TABLE||T===F.TBODY||T===F.TFOOT||T===F.THEAD||T===F.TR||T===F.TD||T===F.TH?(s.openElements.popUntilTagNamePopped(F.SELECT),s._resetInsertionMode(),s._processStartTag(l)):sA(s,l);break;case U.IN_TEMPLATE:var _=this,A=e;switch(A.tagID){case F.BASE:case F.BASEFONT:case F.BGSOUND:case F.LINK:case F.META:case F.NOFRAMES:case F.SCRIPT:case F.STYLE:case F.TEMPLATE:case F.TITLE:o5(_,A);break;case F.CAPTION:case F.COLGROUP:case F.TBODY:case F.TFOOT:case F.THEAD:_.tmplInsertionModeStack[0]=U.IN_TABLE,_.insertionMode=U.IN_TABLE,su(_,A);break;case F.COL:_.tmplInsertionModeStack[0]=U.IN_COLUMN_GROUP,_.insertionMode=U.IN_COLUMN_GROUP,sy(_,A);break;case F.TR:_.tmplInsertionModeStack[0]=U.IN_TABLE_BODY,_.insertionMode=U.IN_TABLE_BODY,sb(_,A);break;case F.TD:case F.TH:_.tmplInsertionModeStack[0]=U.IN_ROW,_.insertionMode=U.IN_ROW,sT(_,A);break;default:_.tmplInsertionModeStack[0]=U.IN_BODY,_.insertionMode=U.IN_BODY,si(_,A)}break;case U.AFTER_BODY:c=this,(u=e).tagID===F.HTML?si(c,u):sS(c,u);break;case U.IN_FRAMESET:var k=this,w=e;switch(w.tagID){case F.HTML:si(k,w);break;case F.FRAMESET:k._insertElement(w,L.HTML);break;case F.FRAME:k._appendElement(w,L.HTML),w.ackSelfClosing=!0;break;case F.NOFRAMES:o5(k,w)}break;case U.AFTER_FRAMESET:var S=this,C=e;switch(C.tagID){case F.HTML:si(S,C);break;case F.NOFRAMES:o5(S,C)}break;case U.AFTER_AFTER_BODY:d=this,(p=e).tagID===F.HTML?si(d,p):sC(d,p);break;case U.AFTER_AFTER_FRAMESET:var N=this,I=e;switch(I.tagID){case F.HTML:si(N,I);break;case F.NOFRAMES:o5(N,I)}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===F.P||t.tagID===F.BR){sN(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){let n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===L.HTML){e._endTagOutsideForeignContent(t);break}let a=e.treeAdapter.getTagName(n);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(r);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case U.INITIAL:o0(this,e);break;case U.BEFORE_HTML:let t;n=this,((t=(a=e).tagID)===F.HTML||t===F.HEAD||t===F.BODY||t===F.BR)&&o1(n,a);break;case U.BEFORE_HEAD:let r;i=this,(r=(o=e).tagID)===F.HEAD||r===F.BODY||r===F.HTML||r===F.BR?o2(i,o):i._err(o,x.endTagWithoutMatchingOpenElement);break;case U.IN_HEAD:var n,a,i,o,s,l,c,u,d,p,h,f,m=this,g=e;switch(g.tagID){case F.HEAD:m.openElements.pop(),m.insertionMode=U.AFTER_HEAD;break;case F.BODY:case F.BR:case F.HTML:o4(m,g);break;case F.TEMPLATE:o3(m,g);break;default:m._err(g,x.endTagWithoutMatchingOpenElement)}break;case U.IN_HEAD_NO_SCRIPT:var y=this,E=e;switch(E.tagID){case F.NOSCRIPT:y.openElements.pop(),y.insertionMode=U.IN_HEAD;break;case F.BR:o6(y,E);break;default:y._err(E,x.endTagWithoutMatchingOpenElement)}break;case U.AFTER_HEAD:var b=this,v=e;switch(v.tagID){case F.BODY:case F.HTML:case F.BR:o8(b,v);break;case F.TEMPLATE:o3(b,v);break;default:b._err(v,x.endTagWithoutMatchingOpenElement)}break;case U.IN_BODY:ss(this,e);break;case U.TEXT:s=this,e.tagID===F.SCRIPT&&(null==(l=s.scriptHandler)||l.call(s,s.openElements.current)),s.openElements.pop(),s.insertionMode=s.originalInsertionMode;break;case U.IN_TABLE:sd(this,e);break;case U.IN_TABLE_TEXT:sm(this,e);break;case U.IN_CAPTION:var T=this,_=e;let A=_.tagID;switch(A){case F.CAPTION:case F.TABLE:T.openElements.hasInTableScope(F.CAPTION)&&(T.openElements.generateImpliedEndTags(),T.openElements.popUntilTagNamePopped(F.CAPTION),T.activeFormattingElements.clearToLastMarker(),T.insertionMode=U.IN_TABLE,A===F.TABLE&&sd(T,_));break;case F.BODY:case F.COL:case F.COLGROUP:case F.HTML:case F.TBODY:case F.TD:case F.TFOOT:case F.TH:case F.THEAD:case F.TR:break;default:ss(T,_)}break;case U.IN_COLUMN_GROUP:var k=this,w=e;switch(w.tagID){case F.COLGROUP:k.openElements.currentTagId===F.COLGROUP&&(k.openElements.pop(),k.insertionMode=U.IN_TABLE);break;case F.TEMPLATE:o3(k,w);break;case F.COL:break;default:sE(k,w)}break;case U.IN_TABLE_BODY:sv(this,e);break;case U.IN_ROW:s_(this,e);break;case U.IN_CELL:var S=this,C=e;let N=C.tagID;switch(N){case F.TD:case F.TH:S.openElements.hasInTableScope(N)&&(S.openElements.generateImpliedEndTags(),S.openElements.popUntilTagNamePopped(N),S.activeFormattingElements.clearToLastMarker(),S.insertionMode=U.IN_ROW);break;case F.TABLE:case F.TBODY:case F.TFOOT:case F.THEAD:case F.TR:S.openElements.hasInTableScope(N)&&(S._closeTableCell(),s_(S,C));break;case F.BODY:case F.CAPTION:case F.COL:case F.COLGROUP:case F.HTML:break;default:ss(S,C)}break;case U.IN_SELECT:sk(this,e);break;case U.IN_SELECT_IN_TABLE:let I;c=this,(I=(u=e).tagID)===F.CAPTION||I===F.TABLE||I===F.TBODY||I===F.TFOOT||I===F.THEAD||I===F.TR||I===F.TD||I===F.TH?c.openElements.hasInTableScope(I)&&(c.openElements.popUntilTagNamePopped(F.SELECT),c._resetInsertionMode(),c.onEndTag(u)):sk(c,u);break;case U.IN_TEMPLATE:d=this,(p=e).tagID===F.TEMPLATE&&o3(d,p);break;case U.AFTER_BODY:sx(this,e);break;case U.IN_FRAMESET:h=this,e.tagID===F.FRAMESET&&!h.openElements.isRootHtmlElementCurrent()&&(h.openElements.pop(),h.fragmentContext||h.openElements.currentTagId===F.FRAMESET||(h.insertionMode=U.AFTER_FRAMESET));break;case U.AFTER_FRAMESET:f=this,e.tagID===F.HTML&&(f.insertionMode=U.AFTER_AFTER_FRAMESET);break;case U.AFTER_AFTER_BODY:sC(this,e)}}onEof(e){switch(this.insertionMode){case U.INITIAL:o0(this,e);break;case U.BEFORE_HTML:o1(this,e);break;case U.BEFORE_HEAD:o2(this,e);break;case U.IN_HEAD:o4(this,e);break;case U.IN_HEAD_NO_SCRIPT:o6(this,e);break;case U.AFTER_HEAD:o8(this,e);break;case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:sl(this,e);break;case U.TEXT:var t,r;t=this,r=e,t._err(r,x.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(r);break;case U.IN_TABLE_TEXT:sm(this,e);break;case U.IN_TEMPLATE:sw(this,e);break;case U.AFTER_BODY:case U.IN_FRAMESET:case U.AFTER_FRAMESET:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:oZ(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===w.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)return void this._insertCharacters(e);switch(this.insertionMode){case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.TEXT:case U.IN_COLUMN_GROUP:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:this._insertCharacters(e);break;case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:case U.AFTER_BODY:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:o7(this,e);break;case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:sc(this,e);break;case U.IN_TABLE_TEXT:sh(this,e)}}}function oX(e,t){for(let r=0;r<8;r++){let r=function(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):so(e,t),r}(e,t);if(!r)break;let n=function(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){let a=e.openElements.items[n];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[n])&&(r=a)}return r||(e.openElements.shortenToLength(Math.max(n,0)),e.activeFormattingElements.removeEntry(t)),r}(e,r);if(!n)break;e.activeFormattingElements.bookmark=r;let a=function(e,t,r){let n=t,a=e.openElements.getCommonAncestor(t);for(let i=0,o=a;o!==r;i++,o=a){a=e.openElements.getCommonAncestor(o);let r=e.activeFormattingElements.getElementEntry(o),s=r&&i>=3;!r||s?(s&&e.activeFormattingElements.removeEntry(r),e.openElements.remove(o)):(o=function(e,t){let r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}(e,r),n===t&&(e.activeFormattingElements.bookmark=r),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(o,n),n=o)}return n}(e,n,r.element),i=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),i&&function(e,t,r){let n=oi(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(n))e._fosterParentElement(r);else{let a=e.treeAdapter.getNamespaceURI(t);n===F.TEMPLATE&&a===L.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}(e,i,a),function(e,t,r){let n=e.treeAdapter.getNamespaceURI(r.element),{token:a}=r,i=e.treeAdapter.createElement(a.tagName,n,a.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,a),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,i,a.tagID)}(e,n,r)}}function oJ(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function oZ(e,t){if(e.stopped=!0,t.location){let r=2*!e.fragmentContext;for(let n=e.openElements.stackTop;n>=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let r=e.openElements.items[0],n=e.treeAdapter.getNodeSourceCodeLocation(r);if(n&&!n.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){let r=e.openElements.items[1],n=e.treeAdapter.getNodeSourceCodeLocation(r);n&&!n.endTag&&e._setEndLocation(r,t)}}}}function o0(e,t){e._err(t,x.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,P.QUIRKS),e.insertionMode=U.BEFORE_HTML,e._processToken(t)}function o1(e,t){e._insertFakeRootElement(),e.insertionMode=U.BEFORE_HEAD,e._processToken(t)}function o2(e,t){e._insertFakeElement(M.HEAD,F.HEAD),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD,e._processToken(t)}function o5(e,t){switch(t.tagID){case F.HTML:si(e,t);break;case F.BASE:case F.BASEFONT:case F.BGSOUND:case F.LINK:case F.META:e._appendElement(t,L.HTML),t.ackSelfClosing=!0;break;case F.TITLE:e._switchToTextParsing(t,od.RCDATA);break;case F.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,od.RAWTEXT):(e._insertElement(t,L.HTML),e.insertionMode=U.IN_HEAD_NO_SCRIPT);break;case F.NOFRAMES:case F.STYLE:e._switchToTextParsing(t,od.RAWTEXT);break;case F.SCRIPT:e._switchToTextParsing(t,od.SCRIPT_DATA);break;case F.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=U.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(U.IN_TEMPLATE);break;case F.HEAD:e._err(t,x.misplacedStartTagForHeadElement);break;default:o4(e,t)}}function o3(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==F.TEMPLATE&&e._err(t,x.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(F.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,x.endTagWithoutMatchingOpenElement)}function o4(e,t){e.openElements.pop(),e.insertionMode=U.AFTER_HEAD,e._processToken(t)}function o6(e,t){let r=t.type===S.EOF?x.openElementsLeftAfterEof:x.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=U.IN_HEAD,e._processToken(t)}function o8(e,t){e._insertFakeElement(M.BODY,F.BODY),e.insertionMode=U.IN_BODY,o9(e,t)}function o9(e,t){switch(t.type){case S.CHARACTER:se(e,t);break;case S.WHITESPACE_CHARACTER:o7(e,t);break;case S.COMMENT:oJ(e,t);break;case S.START_TAG:si(e,t);break;case S.END_TAG:ss(e,t);break;case S.EOF:sl(e,t)}}function o7(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function se(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function st(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,L.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function sr(e){let t=i7(e,O.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function sn(e,t){e._switchToTextParsing(t,od.RAWTEXT)}function sa(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML)}function si(e,t){switch(t.tagID){case F.I:case F.S:case F.B:case F.U:case F.EM:case F.TT:case F.BIG:case F.CODE:case F.FONT:case F.SMALL:case F.STRIKE:case F.STRONG:e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case F.A:let r;(r=e.activeFormattingElements.getElementEntryInScopeWithTagName(M.A))&&(oX(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case F.H1:case F.H2:case F.H3:case F.H4:case F.H5:case F.H6:e.openElements.hasInButtonScope(F.P)&&e._closePElement(),void 0!==e.openElements.currentTagId&&ol.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,L.HTML);break;case F.P:case F.DL:case F.OL:case F.UL:case F.DIV:case F.DIR:case F.NAV:case F.MAIN:case F.MENU:case F.ASIDE:case F.CENTER:case F.FIGURE:case F.FOOTER:case F.HEADER:case F.HGROUP:case F.DIALOG:case F.DETAILS:case F.ADDRESS:case F.ARTICLE:case F.SEARCH:case F.SECTION:case F.SUMMARY:case F.FIELDSET:case F.BLOCKQUOTE:case F.FIGCAPTION:e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._insertElement(t,L.HTML);break;case F.LI:case F.DD:case F.DT:e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===F.LI&&r===F.LI||(n===F.DD||n===F.DT)&&(r===F.DD||r===F.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==F.ADDRESS&&r!==F.DIV&&r!==F.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._insertElement(t,L.HTML);break;case F.BR:case F.IMG:case F.WBR:case F.AREA:case F.EMBED:case F.KEYGEN:st(e,t);break;case F.HR:e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._appendElement(t,L.HTML),e.framesetOk=!1,t.ackSelfClosing=!0;break;case F.RB:case F.RTC:e.openElements.hasInScope(F.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,L.HTML);break;case F.RT:case F.RP:e.openElements.hasInScope(F.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(F.RTC),e._insertElement(t,L.HTML);break;case F.PRE:case F.LISTING:e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._insertElement(t,L.HTML),e.skipNextNewLine=!0,e.framesetOk=!1;break;case F.XMP:e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,od.RAWTEXT);break;case F.SVG:e._reconstructActiveFormattingElements(),oW(t),oq(t),t.selfClosing?e._appendElement(t,L.SVG):e._insertElement(t,L.SVG),t.ackSelfClosing=!0;break;case F.HTML:0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs);break;case F.BASE:case F.LINK:case F.META:case F.STYLE:case F.TITLE:case F.SCRIPT:case F.BGSOUND:case F.BASEFONT:case F.TEMPLATE:o5(e,t);break;case F.BODY:let a;(a=e.openElements.tryPeekProperlyNestedBodyElement())&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs));break;case F.FORM:let i;i=e.openElements.tmplCount>0,(!e.formElement||i)&&(e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._insertElement(t,L.HTML),i||(e.formElement=e.openElements.current));break;case F.NOBR:e._reconstructActiveFormattingElements(),e.openElements.hasInScope(F.NOBR)&&(oX(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,L.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case F.MATH:e._reconstructActiveFormattingElements(),oz(t),oq(t),t.selfClosing?e._appendElement(t,L.MATHML):e._insertElement(t,L.MATHML),t.ackSelfClosing=!0;break;case F.TABLE:e.treeAdapter.getDocumentMode(e.document)!==P.QUIRKS&&e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._insertElement(t,L.HTML),e.framesetOk=!1,e.insertionMode=U.IN_TABLE;break;case F.INPUT:e._reconstructActiveFormattingElements(),e._appendElement(t,L.HTML),sr(t)||(e.framesetOk=!1),t.ackSelfClosing=!0;break;case F.PARAM:case F.TRACK:case F.SOURCE:e._appendElement(t,L.HTML),t.ackSelfClosing=!0;break;case F.IMAGE:t.tagName=M.IMG,t.tagID=F.IMG,st(e,t);break;case F.BUTTON:e.openElements.hasInScope(F.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(F.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.framesetOk=!1;break;case F.APPLET:case F.OBJECT:case F.MARQUEE:e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1;break;case F.IFRAME:e.framesetOk=!1,e._switchToTextParsing(t,od.RAWTEXT);break;case F.SELECT:e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===U.IN_TABLE||e.insertionMode===U.IN_CAPTION||e.insertionMode===U.IN_TABLE_BODY||e.insertionMode===U.IN_ROW||e.insertionMode===U.IN_CELL?U.IN_SELECT_IN_TABLE:U.IN_SELECT;break;case F.OPTION:case F.OPTGROUP:e.openElements.currentTagId===F.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML);break;case F.NOEMBED:case F.NOFRAMES:sn(e,t);break;case F.FRAMESET:let o;o=e.openElements.tryPeekProperlyNestedBodyElement(),e.framesetOk&&o&&(e.treeAdapter.detachNode(o),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,L.HTML),e.insertionMode=U.IN_FRAMESET);break;case F.TEXTAREA:e._insertElement(t,L.HTML),e.skipNextNewLine=!0,e.tokenizer.state=od.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=U.TEXT;break;case F.NOSCRIPT:e.options.scriptingEnabled?sn(e,t):sa(e,t);break;case F.PLAINTEXT:e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._insertElement(t,L.HTML),e.tokenizer.state=od.PLAINTEXT;break;case F.COL:case F.TH:case F.TD:case F.TR:case F.HEAD:case F.FRAME:case F.TBODY:case F.TFOOT:case F.THEAD:case F.CAPTION:case F.COLGROUP:break;default:sa(e,t)}}function so(e,t){let r=t.tagName,n=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let a=e.openElements.items[t],i=e.openElements.tagIDs[t];if(n===i&&(n!==F.UNKNOWN||e.treeAdapter.getTagName(a)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(a,i))break}}function ss(e,t){switch(t.tagID){case F.A:case F.B:case F.I:case F.S:case F.U:case F.EM:case F.TT:case F.BIG:case F.CODE:case F.FONT:case F.NOBR:case F.SMALL:case F.STRIKE:case F.STRONG:oX(e,t);break;case F.P:e.openElements.hasInButtonScope(F.P)||e._insertFakeElement(M.P,F.P),e._closePElement();break;case F.DL:case F.UL:case F.OL:case F.DIR:case F.DIV:case F.NAV:case F.PRE:case F.MAIN:case F.MENU:case F.ASIDE:case F.BUTTON:case F.CENTER:case F.FIGURE:case F.FOOTER:case F.HEADER:case F.HGROUP:case F.DIALOG:case F.ADDRESS:case F.ARTICLE:case F.DETAILS:case F.SEARCH:case F.SECTION:case F.SUMMARY:case F.LISTING:case F.FIELDSET:case F.BLOCKQUOTE:case F.FIGCAPTION:let r;r=t.tagID,e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r));break;case F.LI:e.openElements.hasInListItemScope(F.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(F.LI),e.openElements.popUntilTagNamePopped(F.LI));break;case F.DD:case F.DT:let n;n=t.tagID,e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n));break;case F.H1:case F.H2:case F.H3:case F.H4:case F.H5:case F.H6:e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped());break;case F.BR:e._reconstructActiveFormattingElements(),e._insertFakeElement(M.BR,F.BR),e.openElements.pop(),e.framesetOk=!1;break;case F.BODY:if(e.openElements.hasInScope(F.BODY)&&(e.insertionMode=U.AFTER_BODY,e.options.sourceCodeLocationInfo)){let r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}break;case F.HTML:e.openElements.hasInScope(F.BODY)&&(e.insertionMode=U.AFTER_BODY,sx(e,t));break;case F.FORM:!function(e){let t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(F.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(F.FORM):r&&e.openElements.remove(r))}(e);break;case F.APPLET:case F.OBJECT:case F.MARQUEE:let a;a=t.tagID,e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker());break;case F.TEMPLATE:o3(e,t);break;default:so(e,t)}}function sl(e,t){e.tmplInsertionModeStack.length>0?sw(e,t):oZ(e,t)}function sc(e,t){if(void 0!==e.openElements.currentTagId&&oY.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=U.IN_TABLE_TEXT,t.type){case S.CHARACTER:sf(e,t);break;case S.WHITESPACE_CHARACTER:sh(e,t)}else sp(e,t)}function su(e,t){switch(t.tagID){case F.TD:case F.TH:case F.TR:e.openElements.clearBackToTableContext(),e._insertFakeElement(M.TBODY,F.TBODY),e.insertionMode=U.IN_TABLE_BODY,sb(e,t);break;case F.STYLE:case F.SCRIPT:case F.TEMPLATE:o5(e,t);break;case F.COL:e.openElements.clearBackToTableContext(),e._insertFakeElement(M.COLGROUP,F.COLGROUP),e.insertionMode=U.IN_COLUMN_GROUP,sy(e,t);break;case F.FORM:e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,L.HTML),e.formElement=e.openElements.current,e.openElements.pop());break;case F.TABLE:e.openElements.hasInTableScope(F.TABLE)&&(e.openElements.popUntilTagNamePopped(F.TABLE),e._resetInsertionMode(),e._processStartTag(t));break;case F.TBODY:case F.TFOOT:case F.THEAD:e.openElements.clearBackToTableContext(),e._insertElement(t,L.HTML),e.insertionMode=U.IN_TABLE_BODY;break;case F.INPUT:sr(t)?e._appendElement(t,L.HTML):sp(e,t),t.ackSelfClosing=!0;break;case F.CAPTION:e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,L.HTML),e.insertionMode=U.IN_CAPTION;break;case F.COLGROUP:e.openElements.clearBackToTableContext(),e._insertElement(t,L.HTML),e.insertionMode=U.IN_COLUMN_GROUP;break;default:sp(e,t)}}function sd(e,t){switch(t.tagID){case F.TABLE:e.openElements.hasInTableScope(F.TABLE)&&(e.openElements.popUntilTagNamePopped(F.TABLE),e._resetInsertionMode());break;case F.TEMPLATE:o3(e,t);break;case F.BODY:case F.CAPTION:case F.COL:case F.COLGROUP:case F.HTML:case F.TBODY:case F.TD:case F.TFOOT:case F.TH:case F.THEAD:case F.TR:break;default:sp(e,t)}}function sp(e,t){let r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,o9(e,t),e.fosterParentingEnabled=r}function sh(e,t){e.pendingCharacterTokens.push(t)}function sf(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function sm(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r<e.pendingCharacterTokens.length;r++)sp(e,e.pendingCharacterTokens[r]);else for(;r<e.pendingCharacterTokens.length;r++)e._insertCharacters(e.pendingCharacterTokens[r]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}let sg=new Set([F.CAPTION,F.COL,F.COLGROUP,F.TBODY,F.TD,F.TFOOT,F.TH,F.THEAD,F.TR]);function sy(e,t){switch(t.tagID){case F.HTML:si(e,t);break;case F.COL:e._appendElement(t,L.HTML),t.ackSelfClosing=!0;break;case F.TEMPLATE:o5(e,t);break;default:sE(e,t)}}function sE(e,t){e.openElements.currentTagId===F.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE,e._processToken(t))}function sb(e,t){switch(t.tagID){case F.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,L.HTML),e.insertionMode=U.IN_ROW;break;case F.TH:case F.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(M.TR,F.TR),e.insertionMode=U.IN_ROW,sT(e,t);break;case F.CAPTION:case F.COL:case F.COLGROUP:case F.TBODY:case F.TFOOT:case F.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,su(e,t));break;default:su(e,t)}}function sv(e,t){let r=t.tagID;switch(t.tagID){case F.TBODY:case F.TFOOT:case F.THEAD:e.openElements.hasInTableScope(r)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE);break;case F.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,sd(e,t));break;case F.BODY:case F.CAPTION:case F.COL:case F.COLGROUP:case F.HTML:case F.TD:case F.TH:case F.TR:break;default:sd(e,t)}}function sT(e,t){switch(t.tagID){case F.TH:case F.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,L.HTML),e.insertionMode=U.IN_CELL,e.activeFormattingElements.insertMarker();break;case F.CAPTION:case F.COL:case F.COLGROUP:case F.TBODY:case F.TFOOT:case F.THEAD:case F.TR:e.openElements.hasInTableScope(F.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,sb(e,t));break;default:su(e,t)}}function s_(e,t){switch(t.tagID){case F.TR:e.openElements.hasInTableScope(F.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY);break;case F.TABLE:e.openElements.hasInTableScope(F.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,sv(e,t));break;case F.TBODY:case F.TFOOT:case F.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(F.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,sv(e,t));break;case F.BODY:case F.CAPTION:case F.COL:case F.COLGROUP:case F.HTML:case F.TD:case F.TH:break;default:sd(e,t)}}function sA(e,t){switch(t.tagID){case F.HTML:si(e,t);break;case F.OPTION:e.openElements.currentTagId===F.OPTION&&e.openElements.pop(),e._insertElement(t,L.HTML);break;case F.OPTGROUP:e.openElements.currentTagId===F.OPTION&&e.openElements.pop(),e.openElements.currentTagId===F.OPTGROUP&&e.openElements.pop(),e._insertElement(t,L.HTML);break;case F.HR:e.openElements.currentTagId===F.OPTION&&e.openElements.pop(),e.openElements.currentTagId===F.OPTGROUP&&e.openElements.pop(),e._appendElement(t,L.HTML),t.ackSelfClosing=!0;break;case F.INPUT:case F.KEYGEN:case F.TEXTAREA:case F.SELECT:e.openElements.hasInSelectScope(F.SELECT)&&(e.openElements.popUntilTagNamePopped(F.SELECT),e._resetInsertionMode(),t.tagID!==F.SELECT&&e._processStartTag(t));break;case F.SCRIPT:case F.TEMPLATE:o5(e,t)}}function sk(e,t){switch(t.tagID){case F.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===F.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===F.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===F.OPTGROUP&&e.openElements.pop();break;case F.OPTION:e.openElements.currentTagId===F.OPTION&&e.openElements.pop();break;case F.SELECT:e.openElements.hasInSelectScope(F.SELECT)&&(e.openElements.popUntilTagNamePopped(F.SELECT),e._resetInsertionMode());break;case F.TEMPLATE:o3(e,t)}}function sw(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(F.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):oZ(e,t)}function sx(e,t){var r;if(t.tagID===F.HTML){if(e.fragmentContext||(e.insertionMode=U.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===F.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];!n||(null==(r=e.treeAdapter.getNodeSourceCodeLocation(n))?void 0:r.endTag)||e._setEndLocation(n,t)}}else sS(e,t)}function sS(e,t){e.insertionMode=U.IN_BODY,o9(e,t)}function sC(e,t){e.insertionMode=U.IN_BODY,o9(e,t)}function sN(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==L.HTML&&void 0!==e.openElements.currentTagId&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}null==String.prototype.codePointAt||((e,t)=>e.codePointAt(t)),M.AREA,M.BASE,M.BASEFONT,M.BGSOUND,M.BR,M.COL,M.EMBED,M.FRAME,M.HR,M.IMG,M.INPUT,M.KEYGEN,M.LINK,M.META,M.PARAM,M.SOURCE,M.TRACK,M.WBR;var sI=e.i(743820),sI=sI,sR=e.i(113515),sR=sR;let sD=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,sL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),sO={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function sP(e,t){var r,n;let a,i,o=!!((a="root"===(n=e).type?n.children[0]:n)&&("doctype"===a.type||"element"===a.type&&"html"===a.tagName.toLowerCase())),s=iQ("type",{handlers:{root:sF,element:sB,text:sj,comment:sH,doctype:sU,raw:sG},unknown:s$}),l={parser:o?new oK(sO):oK.getFragmentParser(void 0,sO),handle(e){s(e,l)},stitches:!1,options:t||{}};s(e,l),sz(l,ri());let c=(r=o?l.parser.document:l.parser.getFragment(),ic({file:(i={file:l.options.file}).file||void 0,location:!1,schema:"svg"===i.space?re:t7,verbose:i.verbose||!1},r));return(l.stitches&&n6(c,"comment",function(e,t,r){if(e.value.stitch&&r&&void 0!==t)return r.children[t]=e.value.stitch,t}),"root"===c.type&&1===c.children.length&&c.children[0].type===e.type)?c.children[0]:c}function sM(e,t){let r=-1;if(e)for(;++r<e.length;)t.handle(e[r])}function sF(e,t){sM(e.children,t)}function sB(e,t){(function(e,t){let r=e.tagName.toLowerCase();if(t.parser.tokenizer.state===od.PLAINTEXT)return;sz(t,ri(e));let n=t.parser.openElements.current,a="namespaceURI"in n?n.namespaceURI:aW.html;a===aW.html&&"svg"===r&&(a=aW.svg);let i=iX({...e,children:[]},"svg"===({space:a===aW.svg?"svg":"html"}).space?iV:iq),o={type:sI.TokenType.START_TAG,tagName:r,tagID:sR.getTagID(r),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:sq(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=r})(e,t),sM(e.children,t),function(e,t){let r=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&i0.includes(r)||t.parser.tokenizer.state===od.PLAINTEXT)return;sz(t,ra(e));let n={type:sI.TokenType.END_TAG,tagName:r,tagID:sR.getTagID(r),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:sq(e)};t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken),r===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===od.RCDATA||t.parser.tokenizer.state===od.RAWTEXT||t.parser.tokenizer.state===od.SCRIPT_DATA)&&(t.parser.tokenizer.state=od.DATA)}(e,t)}function sj(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let r={type:sI.TokenType.CHARACTER,chars:e.value,location:sq(e)};sz(t,ri(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function sU(e,t){let r={type:sI.TokenType.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:sq(e)};sz(t,ri(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function sH(e,t){let r=e.value,n={type:sI.TokenType.COMMENT,data:r,location:sq(e)};sz(t,ri(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function sG(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,sW(t,ri(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(sD,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),72===t.parser.tokenizer.state||78===t.parser.tokenizer.state){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function s$(e,t){if(t.options.passThrough&&t.options.passThrough.includes(e.type)){var r;let n;t.stitches=!0,n="children"in(r=e)?nX({...r,children:[]}):nX(r),"children"in e&&"children"in n&&(n.children=sP({type:"root",children:e.children},t.options).children),sH({type:"comment",value:{stitch:n}},t)}else{let t="";throw sL.has(e.type)&&(t=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+e.type+"` node"+t)}}function sz(e,t){sW(e,t);let r=e.parser.tokenizer.currentCharacterToken;r&&r.location&&(r.location.endLine=e.parser.tokenizer.preprocessor.line,r.location.endCol=e.parser.tokenizer.preprocessor.col+1,r.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=od.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function sW(e,t){if(t&&void 0!==t.offset){let r={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=r}}function sq(e){let t=ri(e)||{line:void 0,column:void 0,offset:void 0},r=ra(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:r.line,endCol:r.column,endOffset:r.offset}}function sV(e,t){let r=String(e);if("string"!=typeof t)throw TypeError("Expected character");let n=0,a=r.indexOf(t);for(;-1!==a;)n++,a=r.indexOf(t,a+t.length);return n}let sY="phrasing",sQ=["autolink","link","image","label"];function sK(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function sX(e){this.config.enter.autolinkProtocol.call(this,e)}function sJ(e){this.config.exit.autolinkProtocol.call(this,e)}function sZ(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];tv("link"===t.type),t.url="http://"+this.sliceSerialize(e)}function s0(e){this.config.exit.autolinkEmail.call(this,e)}function s1(e){this.exit(e)}function s2(e){!function(e,t,r){let n=n1((r||{}).ignore||[]),a=function(e){let t=[];if(!Array.isArray(e))throw TypeError("Expected find and replace tuple or list of tuples");let r=!e[0]||Array.isArray(e[0])?e:[e],n=-1;for(;++n<r.length;){var a;let e=r[n];t.push(["string"==typeof(a=e[0])?RegExp(function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(a),"g"):a,function(e){return"function"==typeof e?e:function(){return e}}(e[1])])}return t}(t),i=-1;for(;++i<a.length;)ir(e,"text",o);function o(e,t){let r,o=-1;for(;++o<t.length;){let e=t[o],a=r?r.children:void 0;if(n(e,a?a.indexOf(e):void 0,r))return;r=e}if(r)return function(e,t){let r=t[t.length-1],n=a[i][0],o=a[i][1],s=0,l=r.children.indexOf(e),c=!1,u=[];n.lastIndex=0;let d=n.exec(e.value);for(;d;){let r=d.index,a={index:d.index,input:d.input,stack:[...t,e]},i=o(...d,a);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?n.lastIndex=r+1:(s!==r&&u.push({type:"text",value:e.value.slice(s,r)}),Array.isArray(i)?u.push(...i):i&&u.push(i),s=r+d[0].length,c=!0),!n.global)break;d=n.exec(e.value)}return c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),r.children.splice(l,1,...u)):u=[e],l+u.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,s5],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,s3]],{ignore:["link","linkReference"]})}function s5(e,t,r,n,a){let i,o="";if(!s4(a))return!1;if(/^w/i.test(t)&&(r=t+r,t="",o="http://"),(i=r.split(".")).length<2||i[i.length-1]&&(/_/.test(i[i.length-1])||!/[a-zA-Z\d]/.test(i[i.length-1]))||i[i.length-2]&&(/_/.test(i[i.length-2])||!/[a-zA-Z\d]/.test(i[i.length-2])))return!1;let s=function(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")"),a=sV(e,"("),i=sV(e,")");for(;-1!==n&&a>i;)e+=r.slice(0,n+1),n=(r=r.slice(n+1)).indexOf(")"),i++;return[e,r]}(r+n);if(!s[0])return!1;let l={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function s3(e,t,r,n){return!(!s4(n,!0)||/[-\d_]$/.test(r))&&{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function s4(e,t){let r=e.input.charCodeAt(e.index-1);return(0===e.index||rW(r)||rz(r))&&(!t||47!==r)}function s6(){this.buffer()}function s8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function s9(){this.buffer()}function s7(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function le(e){let t=this.resume(),r=this.stack[this.stack.length-1];tv("footnoteReference"===r.type),r.identifier=ny(this.sliceSerialize(e)).toLowerCase(),r.label=t}function lt(e){this.exit(e)}function lr(e){let t=this.resume(),r=this.stack[this.stack.length-1];tv("footnoteDefinition"===r.type),r.identifier=ny(this.sliceSerialize(e)).toLowerCase(),r.label=t}function ln(e){this.exit(e)}function la(e,t,r,n){let a=r.createTracker(n),i=a.move("[^"),o=r.enter("footnoteReference"),s=r.enter("reference");return i+=a.move(r.safe(r.associationId(e),{after:"]",before:i})),s(),o(),i+=a.move("]")}function li(e,t,r){return 0===t?e:lo(e,t,r)}function lo(e,t,r){return(r?"":" ")+e}la.peek=function(){return"["};let ls=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function ll(e){this.enter({type:"delete",children:[]},e)}function lc(e){this.exit(e)}function lu(e,t,r,n){let a=r.createTracker(n),i=r.enter("strikethrough"),o=a.move("~~");return o+=r.containerPhrasing(e,{...a.current(),before:o,after:"~"}),o+=a.move("~~"),i(),o}function ld(e){return e.length}function lp(e){let t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:114*(82===t||114===t)}lu.peek=function(){return"~"};function lh(e,t,r){let n=e.value||"",a="`",i=-1;for(;RegExp("(^|[^`])"+a+"([^`]|$)").test(n);)a+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++i<r.unsafe.length;){let e,t=r.unsafe[i],a=r.compilePattern(t);if(t.atBreak)for(;e=a.exec(n);){let t=e.index;10===n.charCodeAt(t)&&13===n.charCodeAt(t-1)&&t--,n=n.slice(0,t)+" "+n.slice(e.index+1)}}return a+n+a}lh.peek=function(){return"`"};n1(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);let lf=function(e,t,r,n){let a=function(e){let t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(r),i=r.bulletCurrent||function(e){let t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(r);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===r.options.incrementListMarker?0:t.children.indexOf(e))+i);let o=i.length+1;("tab"===a||"mixed"===a&&(t&&"list"===t.type&&t.spread||e.spread))&&(o=4*Math.ceil(o/4));let s=r.createTracker(n);s.move(i+" ".repeat(o-i.length)),s.shift(o);let l=r.enter("listItem"),c=r.indentLines(r.containerFlow(e,s.current()),function(e,t,r){return t?(r?"":" ".repeat(o))+e:(r?i:i+" ".repeat(o-i.length))+e});return l(),c};function lm(e){let t=e._align;tv(t,"expected `_align` on table"),this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function lg(e){this.exit(e),this.data.inTable=void 0}function ly(e){this.enter({type:"tableRow",children:[]},e)}function lE(e){this.exit(e)}function lb(e){this.enter({type:"tableCell",children:[]},e)}function lv(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,lT));let r=this.stack[this.stack.length-1];tv("inlineCode"===r.type),r.value=t,this.exit(e)}function lT(e,t){return"|"===t?t:e}function l_(e){let t=this.stack[this.stack.length-2];tv("listItem"===t.type),t.checked="taskListCheckValueChecked"===e.type}function lA(e){let t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){let e=this.stack[this.stack.length-1];tv("paragraph"===e.type);let r=e.children[0];if(r&&"text"===r.type){let n,a=t.children,i=-1;for(;++i<a.length;){let e=a[i];if("paragraph"===e.type){n=e;break}}n===e&&(r.value=r.value.slice(1),0===r.value.length?e.children.shift():e.position&&r.position&&"number"==typeof r.position.start.offset&&(r.position.start.column++,r.position.start.offset++,e.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function lk(e,t,r,n){let a=e.children[0],i="boolean"==typeof e.checked&&a&&"paragraph"===a.type,o="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);i&&s.move(o);let l=lf(e,t,r,{...n,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+o})),l}let lw={tokenize:function(e,t,r){let n=0;return function t(i){return(87===i||119===i)&&n<3?(n++,e.consume(i),t):46===i&&3===n?(e.consume(i),a):r(i)};function a(e){return null===e?r(e):t(e)}},partial:!0},lx={tokenize:function(e,t,r){let n,a,i;return o;function o(t){return 46===t||95===t?e.check(lC,l,s)(t):null===t||rG(t)||rW(t)||45!==t&&rz(t)?l(t):(i=!0,e.consume(t),o)}function s(t){return 95===t?n=!0:(a=n,n=void 0),e.consume(t),o}function l(e){return a||n||!i?r(e):t(e)}},partial:!0},lS={tokenize:function(e,t){let r=0,n=0;return a;function a(o){return 40===o?(r++,e.consume(o),a):41===o&&n<r?i(o):33===o||34===o||38===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||60===o||63===o||93===o||95===o||126===o?e.check(lC,t,i)(o):null===o||rG(o)||rW(o)?t(o):(e.consume(o),a)}function i(t){return 41===t&&n++,e.consume(t),a}},partial:!0},lC={tokenize:function(e,t,r){return n;function n(o){return 33===o||34===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||63===o||95===o||126===o?(e.consume(o),n):38===o?(e.consume(o),i):93===o?(e.consume(o),a):60===o||null===o||rG(o)||rW(o)?t(o):r(o)}function a(e){return null===e||40===e||91===e||rG(e)||rW(e)?t(e):n(e)}function i(t){return rO(t)?function t(a){return 59===a?(e.consume(a),n):rO(a)?(e.consume(a),t):r(a)}(t):r(t)}},partial:!0},lN={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(e){return rP(e)?r(e):t(e)}},partial:!0},lI={name:"wwwAutolink",tokenize:function(e,t,r){let n=this;return function(t){return 87!==t&&119!==t||!lP.call(n,n.previous)||lj(n.events)?r(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(lw,e.attempt(lx,e.attempt(lS,a),r),r)(t))};function a(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(r)}},previous:lP},lR={name:"protocolAutolink",tokenize:function(e,t,r){let n=this,a="",i=!1;return function(t){return(72===t||104===t)&&lM.call(n,n.previous)&&!lj(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(t),e.consume(t),o):r(t)};function o(t){if(rO(t)&&a.length<5)return a+=String.fromCodePoint(t),e.consume(t),o;if(58===t){let r=a.toLowerCase();if("http"===r||"https"===r)return e.consume(t),s}return r(t)}function s(t){return 47===t?(e.consume(t),i)?l:(i=!0,s):r(t)}function l(t){return null===t||rF(t)||rG(t)||rW(t)||rz(t)?r(t):e.attempt(lx,e.attempt(lS,c),r)(t)}function c(r){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(r)}},previous:lM},lD={name:"emailAutolink",tokenize:function(e,t,r){let n,a,i=this;return function(t){return!lB(t)||!lF.call(i,i.previous)||lj(i.events)?r(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(n){return lB(n)?(e.consume(n),t):64===n?(e.consume(n),o):r(n)}(t))};function o(t){return 46===t?e.check(lN,l,s)(t):45===t||95===t||rP(t)?(a=!0,e.consume(t),o):l(t)}function s(t){return e.consume(t),n=!0,o}function l(o){return a&&n&&rO(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(o)):r(o)}},previous:lF},lL={},lO=48;for(;lO<123;)lL[lO]=lD,58==++lO?lO=65:91===lO&&(lO=97);function lP(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||rG(e)}function lM(e){return!rO(e)}function lF(e){return!(47===e||lB(e))}function lB(e){return 43===e||45===e||46===e||95===e||rP(e)}function lj(e){let t=e.length,r=!1;for(;t--;){let n=e[t][1];if(("labelLink"===n.type||"labelImage"===n.type)&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}lL[43]=lD,lL[45]=lD,lL[46]=lD,lL[95]=lD,lL[72]=[lD,lR],lL[104]=[lD,lR],lL[87]=[lD,lI],lL[119]=[lD,lI];let lU={tokenize:function(e,t,r){let n=this;return rV(e,function(e){let a=n.events[n.events.length-1];return a&&"gfmFootnoteDefinitionIndent"===a[1].type&&4===a[2].sliceSerialize(a[1],!0).length?t(e):r(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function lH(e,t,r){let n,a=this,i=a.events.length,o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);for(;i--;){let e=a.events[i][1];if("labelImage"===e.type){n=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!n||!n._balanced)return r(i);let s=ny(a.sliceSerialize({start:n.end,end:a.now()}));return 94===s.codePointAt(0)&&o.includes(s.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)):r(i)}}function lG(e,t){let r=e.length;for(;r--;)if("labelImage"===e[r][1].type&&"enter"===e[r][0]){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";let n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;let i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function l$(e,t,r){let n,a=this,i=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]),o=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?r(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(o>999||93===s&&!n||null===s||91===s||rG(s))return r(s);if(93===s){e.exit("chunkString");let n=e.exit("gfmFootnoteCallString");return i.includes(ny(a.sliceSerialize(n)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(s)}return rG(s)||(n=!0),o++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),o++,l):l(t)}}function lz(e,t,r){let n,a,i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):r(t)}function c(t){if(s>999||93===t&&!a||null===t||91===t||rG(t))return r(t);if(93===t){e.exit("chunkString");let r=e.exit("gfmFootnoteDefinitionLabelString");return n=ny(i.sliceSerialize(r)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return rG(t)||(a=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(n)||o.push(n),rV(e,p,"gfmFootnoteDefinitionWhitespace")):r(t)}function p(e){return t(e)}}function lW(e,t,r){return e.check(rX,t,e.attempt(lU,t,r))}function lq(e){e.exit("gfmFootnoteDefinition")}class lV{constructor(){this.map=[]}add(e,t,r){!function(e,t,r,n){let a=0;if(0!==r||0!==n.length){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=r,e.map[a][2].push(...n);return}a+=1}e.map.push([t,r,n])}}(this,e,t,r)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length,r=[];for(;t>0;)t-=1,r.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];r.push(e.slice()),e.length=0;let n=r.pop();for(;n;){for(let t of n)e.push(t);n=r.pop()}this.map.length=0}}function lY(e,t,r){let n,a=this,i=0,o=0;return function(e){let t=a.events.length-1;for(;t>-1;){let e=a.events[t][1].type;if("lineEnding"===e||"linePrefix"===e)t--;else break}let n=t>-1?a.events[t][1].type:null,i="tableHead"===n||"tableRow"===n?E:s;return i===E&&a.parser.lazy[a.now().line]?r(e):i(e)};function s(t){var r;return e.enter("tableHead"),e.enter("tableRow"),124===(r=t)||(n=!0,o+=1),l(r)}function l(t){return null===t?r(t):rH(t)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):r(t):r$(t)?rV(e,l,"whitespace")(t):(o+=1,n&&(n=!1,i+=1),124===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),n=!0,l):(e.enter("data"),c(t))}function c(t){return null===t||124===t||rG(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return(a.interrupt=!1,a.parser.lazy[a.now().line])?r(t):(e.enter("tableDelimiterRow"),n=!1,r$(t))?rV(e,p,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t)}function p(t){return 45===t||58===t?f(t):124===t?(n=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),h):r(t)}function h(t){return r$(t)?rV(e,f,"whitespace")(t):f(t)}function f(t){return 58===t?(o+=1,n=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(o+=1,m(t)):null===t||rH(t)?y(t):r(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),function t(r){return 45===r?(e.consume(r),t):58===r?(n=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(r),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(r))}(t)):r(t)}function g(t){return r$(t)?rV(e,y,"whitespace")(t):y(t)}function y(a){if(124===a)return p(a);if(null===a||rH(a))return n&&i===o?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(a)):r(a);return r(a)}function E(t){return e.enter("tableRow"),b(t)}function b(r){return 124===r?(e.enter("tableCellDivider"),e.consume(r),e.exit("tableCellDivider"),b):null===r||rH(r)?(e.exit("tableRow"),t(r)):r$(r)?rV(e,b,"whitespace")(r):(e.enter("data"),v(r))}function v(t){return null===t||124===t||rG(t)?(e.exit("data"),b(t)):(e.consume(t),92===t?T:v)}function T(t){return 92===t||124===t?(e.consume(t),v):v(t)}}function lQ(e,t){let r,n,a,i=-1,o=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0,p=new lV;for(;++i<e.length;){let h=e[i],f=h[1];"enter"===h[0]?"tableHead"===f.type?(u=!1,0!==d&&(lX(p,t,d,r,n),n=void 0,d=0),r={type:"table",start:Object.assign({},f.start),end:Object.assign({},f.end)},p.add(i,0,[["enter",r,t]])):"tableRow"===f.type||"tableDelimiterRow"===f.type?(o=!0,a=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,n={type:"tableBody",start:Object.assign({},f.start),end:Object.assign({},f.end)},p.add(i,0,[["enter",n,t]])),s="tableDelimiterRow"===f.type?2:n?3:1):s&&("data"===f.type||"tableDelimiterMarker"===f.type||"tableDelimiterFiller"===f.type)?(o=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],a=lK(p,t,l,s,void 0,a),l=[0,0,0,0]),c[2]=i)):"tableCellDivider"===f.type&&(o?o=!1:(0!==l[1]&&(c[0]=c[1],a=lK(p,t,l,s,void 0,a)),c=[(l=c)[1],i,0,0])):"tableHead"===f.type?(u=!0,d=i):"tableRow"===f.type||"tableDelimiterRow"===f.type?(d=i,0!==l[1]?(c[0]=c[1],a=lK(p,t,l,s,i,a)):0!==c[1]&&(a=lK(p,t,c,s,i,a)),s=0):s&&("data"===f.type||"tableDelimiterMarker"===f.type||"tableDelimiterFiller"===f.type)&&(c[3]=i)}for(0!==d&&lX(p,t,d,r,n),p.consume(t.events),i=-1;++i<t.events.length;){let e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=function(e,t){let r=!1,n=[];for(;t<e.length;){let a=e[t];if(r){if("enter"===a[0])"tableContent"===a[1].type&&n.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===a[1].type){if("tableDelimiterMarker"===e[t-1][1].type){let e=n.length-1;n[e]="left"===n[e]?"center":"right"}}else if("tableDelimiterRow"===a[1].type)break}else"enter"===a[0]&&"tableDelimiterRow"===a[1].type&&(r=!0);t+=1}return n}(t.events,i))}return e}function lK(e,t,r,n,a,i){0!==r[0]&&(i.end=Object.assign({},lJ(t.events,r[0])),e.add(r[0],0,[["exit",i,t]]));let o=lJ(t.events,r[1]);if(i={type:1===n?"tableHeader":2===n?"tableDelimiter":"tableData",start:Object.assign({},o),end:Object.assign({},o)},e.add(r[1],0,[["enter",i,t]]),0!==r[2]){let a=lJ(t.events,r[2]),i=lJ(t.events,r[3]),o={type:"tableContent",start:Object.assign({},a),end:Object.assign({},i)};if(e.add(r[2],0,[["enter",o,t]]),2!==n){let n=t.events[r[2]],a=t.events[r[3]];if(n[1].end=Object.assign({},a[1].end),n[1].type="chunkText",n[1].contentType="text",r[3]>r[2]+1){let t=r[2]+1,n=r[3]-r[2]-1;e.add(t,n,[])}}e.add(r[3]+1,0,[["exit",o,t]])}return void 0!==a&&(i.end=Object.assign({},lJ(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function lX(e,t,r,n,a){let i=[],o=lJ(t.events,r);a&&(a.end=Object.assign({},o),i.push(["exit",a,t])),n.end=Object.assign({},o),i.push(["exit",n,t]),e.add(r+1,0,i)}function lJ(e,t){let r=e[t],n="enter"===r[0]?"start":"end";return r[1][n]}RegExp("^"+/<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi.source,"i");let lZ={name:"tasklistCheck",tokenize:function(e,t,r){let n=this;return function(t){return null===n.previous&&n._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),a):r(t)};function a(t){return rG(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):r(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):r(t)}function o(n){return rH(n)?t(n):r$(n)?e.check({tokenize:l0},t,r)(n):r(n)}}};function l0(e,t,r){return rV(e,function(e){return null===e?r(e):t(e)},"whitespace")}let l1={},l2={tokenize:function(e,t,r){let n=this,a=n.events[n.events.length-1],i=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,o=0;return function(t){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),function t(n){return 36===n?(e.consume(n),o++,t):o<2?r(n):(e.exit("mathFlowFenceSequence"),rV(e,s,"whitespace")(n))}(t)};function s(t){return null===t||rH(t)?l(t):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(n){return null===n||rH(n)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),l(n)):36===n?r(n):(e.consume(n),t)}(t))}function l(r){return(e.exit("mathFlowFence"),n.interrupt)?t(r):e.attempt(l5,c,p)(r)}function c(t){return e.attempt({tokenize:h,partial:!0},p,u)(t)}function u(t){return(i?rV(e,d,"linePrefix",i+1):d)(t)}function d(t){return null===t?p(t):rH(t)?e.attempt(l5,c,p)(t):(e.enter("mathFlowValue"),function t(r){return null===r||rH(r)?(e.exit("mathFlowValue"),d(r)):(e.consume(r),t)}(t))}function p(r){return e.exit("mathFlow"),t(r)}function h(e,t,r){let a=0;return rV(e,function(t){return e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),function t(n){return 36===n?(a++,e.consume(n),t):a<o?r(n):(e.exit("mathFlowFenceSequence"),rV(e,i,"whitespace")(n))}(t)},"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function i(n){return null===n||rH(n)?(e.exit("mathFlowFence"),t(n)):r(n)}}},concrete:!0,name:"mathFlow"},l5={tokenize:function(e,t,r){let n=this;return function(r){return null===r?t(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),a)};function a(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0};function l3(e){let t,r,n=e.length-4,a=3;if(("lineEnding"===e[3][1].type||"space"===e[a][1].type)&&("lineEnding"===e[n][1].type||"space"===e[n][1].type)){for(t=a;++t<n;)if("mathTextData"===e[t][1].type){e[n][1].type="mathTextPadding",e[a][1].type="mathTextPadding",a+=2,n-=2;break}}for(t=a-1,n++;++t<=n;)void 0===r?t!==n&&"lineEnding"!==e[t][1].type&&(r=t):(t===n||"lineEnding"===e[t][1].type)&&(e[r][1].type="mathTextData",t!==r+2&&(e[r][1].end=e[t-1][1].end,e.splice(r+2,t-r-2),n-=t-r-2,t=r+2),r=void 0);return e}function l4(e){return 36!==e||"characterEscape"===this.events[this.events.length-1][1].type}let l6={};function l8(e,t){if("string"!=typeof e)return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{}return null}}let l9=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:"]);function l7(e,t,r,n=!1,a=!1){if(!e)return null;if("string"==typeof e&&e.startsWith("#")&&!a)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if("string"==typeof e&&e.startsWith("data:"))return a&&n&&e.startsWith("data:image/")?e:null;let i=l8(e,r);if(!i||!l9.has(i.protocol))return null;if("mailto:"===i.protocol)return i.href;let o="string"==typeof e&&e.startsWith("/");return i&&t.some(e=>{let t=l8(e,r);return!!t&&t.origin===i.origin&&i.href.startsWith(t.href)})?o?i.pathname+i.search+i.hash:i.href:t.includes("*")?"https:"!==i.protocol&&"http:"!==i.protocol?null:o?i.pathname+i.search+i.hash:i.href:null}let ce=Symbol("node-seen"),ct=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},cr=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var cn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let ca=(0,q.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:o,...s},l)=>(0,q.createElement)("svg",{ref:l,...cn,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:cr("lucide",a),...!i&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(s)&&{"aria-hidden":"true"},...s},[...o.map(([e,t])=>(0,q.createElement)(e,t)),...Array.isArray(i)?i:[i]])),ci=(e,t)=>{let r=(0,q.forwardRef)(({className:r,...n},a)=>(0,q.createElement)(ca,{ref:a,iconNode:t,className:cr(`lucide-${ct(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,r),...n}));return r.displayName=ct(e),r},co=ci("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),cs=ci("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),cl=ci("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),cc=[{id:"abap",name:"ABAP",import:()=>e.A(965087)},{id:"actionscript-3",name:"ActionScript",import:()=>e.A(780905)},{id:"ada",name:"Ada",import:()=>e.A(973434)},{id:"angular-html",name:"Angular HTML",import:()=>e.A(456633)},{id:"angular-ts",name:"Angular TypeScript",import:()=>e.A(287248)},{id:"apache",name:"Apache Conf",import:()=>e.A(36437)},{id:"apex",name:"Apex",import:()=>e.A(853962)},{id:"apl",name:"APL",import:()=>e.A(564353)},{id:"applescript",name:"AppleScript",import:()=>e.A(100800)},{id:"ara",name:"Ara",import:()=>e.A(469101)},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>e.A(324857)},{id:"asm",name:"Assembly",import:()=>e.A(520460)},{id:"astro",name:"Astro",import:()=>e.A(658563)},{id:"awk",name:"AWK",import:()=>e.A(563056)},{id:"ballerina",name:"Ballerina",import:()=>e.A(883969)},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>e.A(218312)},{id:"beancount",name:"Beancount",import:()=>e.A(877736)},{id:"berry",name:"Berry",aliases:["be"],import:()=>e.A(510984)},{id:"bibtex",name:"BibTeX",import:()=>e.A(608527)},{id:"bicep",name:"Bicep",import:()=>e.A(258254)},{id:"blade",name:"Blade",import:()=>e.A(683593)},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>e.A(174014)},{id:"c",name:"C",import:()=>e.A(517891)},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>e.A(703520)},{id:"cairo",name:"Cairo",import:()=>e.A(944644)},{id:"clarity",name:"Clarity",import:()=>e.A(345494)},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>e.A(174898)},{id:"cmake",name:"CMake",import:()=>e.A(165697)},{id:"cobol",name:"COBOL",import:()=>e.A(20528)},{id:"codeowners",name:"CODEOWNERS",import:()=>e.A(64797)},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>e.A(829314)},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>e.A(353773)},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>e.A(848636)},{id:"coq",name:"Coq",import:()=>e.A(124766)},{id:"cpp",name:"C++",aliases:["c++"],import:()=>e.A(42638)},{id:"crystal",name:"Crystal",import:()=>e.A(719950)},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>e.A(104522)},{id:"css",name:"CSS",import:()=>e.A(707215)},{id:"csv",name:"CSV",import:()=>e.A(223639)},{id:"cue",name:"CUE",import:()=>e.A(100774)},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>e.A(480395)},{id:"d",name:"D",import:()=>e.A(317461)},{id:"dart",name:"Dart",import:()=>e.A(567187)},{id:"dax",name:"DAX",import:()=>e.A(410889)},{id:"desktop",name:"Desktop",import:()=>e.A(888545)},{id:"diff",name:"Diff",import:()=>e.A(915705)},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>e.A(566968)},{id:"dotenv",name:"dotEnv",import:()=>e.A(36276)},{id:"dream-maker",name:"Dream Maker",import:()=>e.A(628803)},{id:"edge",name:"Edge",import:()=>e.A(268997)},{id:"elixir",name:"Elixir",import:()=>e.A(840906)},{id:"elm",name:"Elm",import:()=>e.A(942245)},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>e.A(130967)},{id:"erb",name:"ERB",import:()=>e.A(824606)},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>e.A(108082)},{id:"fennel",name:"Fennel",import:()=>e.A(620535)},{id:"fish",name:"Fish",import:()=>e.A(465007)},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>e.A(1229)},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>e.A(757635)},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>e.A(12366)},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>e.A(944474)},{id:"gdresource",name:"GDResource",import:()=>e.A(24026)},{id:"gdscript",name:"GDScript",import:()=>e.A(938061)},{id:"gdshader",name:"GDShader",import:()=>e.A(555065)},{id:"genie",name:"Genie",import:()=>e.A(788527)},{id:"gherkin",name:"Gherkin",import:()=>e.A(911182)},{id:"git-commit",name:"Git Commit Message",import:()=>e.A(496759)},{id:"git-rebase",name:"Git Rebase Message",import:()=>e.A(833204)},{id:"gleam",name:"Gleam",import:()=>e.A(367939)},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>e.A(845169)},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>e.A(404681)},{id:"glsl",name:"GLSL",import:()=>e.A(683661)},{id:"gnuplot",name:"Gnuplot",import:()=>e.A(874809)},{id:"go",name:"Go",import:()=>e.A(35792)},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>e.A(191375)},{id:"groovy",name:"Groovy",import:()=>e.A(276917)},{id:"hack",name:"Hack",import:()=>e.A(506064)},{id:"haml",name:"Ruby Haml",import:()=>e.A(169173)},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>e.A(212055)},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>e.A(989794)},{id:"haxe",name:"Haxe",import:()=>e.A(965530)},{id:"hcl",name:"HashiCorp HCL",import:()=>e.A(136813)},{id:"hjson",name:"Hjson",import:()=>e.A(969953)},{id:"hlsl",name:"HLSL",import:()=>e.A(642417)},{id:"html",name:"HTML",import:()=>e.A(769828)},{id:"html-derivative",name:"HTML (Derivative)",import:()=>e.A(795797)},{id:"http",name:"HTTP",import:()=>e.A(7837)},{id:"hxml",name:"HXML",import:()=>e.A(606185)},{id:"hy",name:"Hy",import:()=>e.A(669318)},{id:"imba",name:"Imba",import:()=>e.A(450528)},{id:"ini",name:"INI",aliases:["properties"],import:()=>e.A(405157)},{id:"java",name:"Java",import:()=>e.A(283968)},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>e.A(354888)},{id:"jinja",name:"Jinja",import:()=>e.A(843351)},{id:"jison",name:"Jison",import:()=>e.A(924498)},{id:"json",name:"JSON",import:()=>e.A(424847)},{id:"json5",name:"JSON5",import:()=>e.A(686162)},{id:"jsonc",name:"JSON with Comments",import:()=>e.A(29770)},{id:"jsonl",name:"JSON Lines",import:()=>e.A(553633)},{id:"jsonnet",name:"Jsonnet",import:()=>e.A(891057)},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>e.A(599899)},{id:"jsx",name:"JSX",import:()=>e.A(117927)},{id:"julia",name:"Julia",aliases:["jl"],import:()=>e.A(288800)},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>e.A(678031)},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>e.A(250481)},{id:"latex",name:"LaTeX",import:()=>e.A(949383)},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>e.A(333164)},{id:"less",name:"Less",import:()=>e.A(752221)},{id:"liquid",name:"Liquid",import:()=>e.A(206668)},{id:"llvm",name:"LLVM IR",import:()=>e.A(972440)},{id:"log",name:"Log file",import:()=>e.A(507264)},{id:"logo",name:"Logo",import:()=>e.A(960201)},{id:"lua",name:"Lua",import:()=>e.A(138877)},{id:"luau",name:"Luau",import:()=>e.A(367540)},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>e.A(689515)},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>e.A(825475)},{id:"marko",name:"Marko",import:()=>e.A(51415)},{id:"matlab",name:"MATLAB",import:()=>e.A(669186)},{id:"mdc",name:"MDC",import:()=>e.A(598309)},{id:"mdx",name:"MDX",import:()=>e.A(284053)},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>e.A(22951)},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>e.A(623518)},{id:"mojo",name:"Mojo",import:()=>e.A(5836)},{id:"move",name:"Move",import:()=>e.A(718963)},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>e.A(68693)},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>e.A(726939)},{id:"nginx",name:"Nginx",import:()=>e.A(24036)},{id:"nim",name:"Nim",import:()=>e.A(322346)},{id:"nix",name:"Nix",import:()=>e.A(219730)},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>e.A(170537)},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>e.A(27230)},{id:"objective-cpp",name:"Objective-C++",import:()=>e.A(279278)},{id:"ocaml",name:"OCaml",import:()=>e.A(504068)},{id:"pascal",name:"Pascal",import:()=>e.A(386966)},{id:"perl",name:"Perl",import:()=>e.A(315878)},{id:"php",name:"PHP",import:()=>e.A(609660)},{id:"plsql",name:"PL/SQL",import:()=>e.A(479652)},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>e.A(383412)},{id:"polar",name:"Polar",import:()=>e.A(203006)},{id:"postcss",name:"PostCSS",import:()=>e.A(289946)},{id:"powerquery",name:"PowerQuery",import:()=>e.A(584829)},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>e.A(914537)},{id:"prisma",name:"Prisma",import:()=>e.A(898119)},{id:"prolog",name:"Prolog",import:()=>e.A(848275)},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>e.A(196258)},{id:"pug",name:"Pug",aliases:["jade"],import:()=>e.A(33149)},{id:"puppet",name:"Puppet",import:()=>e.A(388877)},{id:"purescript",name:"PureScript",import:()=>e.A(903181)},{id:"python",name:"Python",aliases:["py"],import:()=>e.A(499518)},{id:"qml",name:"QML",import:()=>e.A(790902)},{id:"qmldir",name:"QML Directory",import:()=>e.A(205884)},{id:"qss",name:"Qt Style Sheets",import:()=>e.A(795988)},{id:"r",name:"R",import:()=>e.A(225184)},{id:"racket",name:"Racket",import:()=>e.A(84213)},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>e.A(259971)},{id:"razor",name:"ASP.NET Razor",import:()=>e.A(643775)},{id:"reg",name:"Windows Registry Script",import:()=>e.A(475066)},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>e.A(174848)},{id:"rel",name:"Rel",import:()=>e.A(794511)},{id:"riscv",name:"RISC-V",import:()=>e.A(62685)},{id:"rst",name:"reStructuredText",import:()=>e.A(390905)},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>e.A(629428)},{id:"rust",name:"Rust",aliases:["rs"],import:()=>e.A(801192)},{id:"sas",name:"SAS",import:()=>e.A(276892)},{id:"sass",name:"Sass",import:()=>e.A(461034)},{id:"scala",name:"Scala",import:()=>e.A(417576)},{id:"scheme",name:"Scheme",import:()=>e.A(826322)},{id:"scss",name:"SCSS",import:()=>e.A(126487)},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>e.A(667908)},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>e.A(29732)},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>e.A(350886)},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>e.A(685628)},{id:"smalltalk",name:"Smalltalk",import:()=>e.A(995667)},{id:"solidity",name:"Solidity",import:()=>e.A(180322)},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>e.A(13378)},{id:"sparql",name:"SPARQL",import:()=>e.A(34411)},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>e.A(108853)},{id:"sql",name:"SQL",import:()=>e.A(397375)},{id:"ssh-config",name:"SSH Config",import:()=>e.A(165412)},{id:"stata",name:"Stata",import:()=>e.A(822175)},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>e.A(583254)},{id:"svelte",name:"Svelte",import:()=>e.A(143149)},{id:"swift",name:"Swift",import:()=>e.A(476875)},{id:"system-verilog",name:"SystemVerilog",import:()=>e.A(701502)},{id:"systemd",name:"Systemd Units",import:()=>e.A(291267)},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>e.A(541735)},{id:"tasl",name:"Tasl",import:()=>e.A(58477)},{id:"tcl",name:"Tcl",import:()=>e.A(837518)},{id:"templ",name:"Templ",import:()=>e.A(606049)},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>e.A(349096)},{id:"tex",name:"TeX",import:()=>e.A(496470)},{id:"toml",name:"TOML",import:()=>e.A(911176)},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>e.A(845628)},{id:"tsv",name:"TSV",import:()=>e.A(314911)},{id:"tsx",name:"TSX",import:()=>e.A(654998)},{id:"turtle",name:"Turtle",import:()=>e.A(467022)},{id:"twig",name:"Twig",import:()=>e.A(882700)},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>e.A(423329)},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>e.A(932610)},{id:"typst",name:"Typst",aliases:["typ"],import:()=>e.A(799050)},{id:"v",name:"V",import:()=>e.A(209428)},{id:"vala",name:"Vala",import:()=>e.A(668946)},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>e.A(621519)},{id:"verilog",name:"Verilog",import:()=>e.A(168940)},{id:"vhdl",name:"VHDL",import:()=>e.A(173860)},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>e.A(561681)},{id:"vue",name:"Vue",import:()=>e.A(663037)},{id:"vue-html",name:"Vue HTML",import:()=>e.A(444471)},{id:"vue-vine",name:"Vue Vine",import:()=>e.A(957122)},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>e.A(341180)},{id:"wasm",name:"WebAssembly",import:()=>e.A(544713)},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>e.A(649772)},{id:"wgsl",name:"WGSL",import:()=>e.A(303299)},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>e.A(643069)},{id:"wit",name:"WebAssembly Interface Types",import:()=>e.A(148677)},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>e.A(185997)},{id:"xml",name:"XML",import:()=>e.A(272956)},{id:"xsl",name:"XSL",import:()=>e.A(403615)},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>e.A(632865)},{id:"zenscript",name:"ZenScript",import:()=>e.A(987024)},{id:"zig",name:"Zig",import:()=>e.A(562102)}],cu=Object.fromEntries(cc.map(e=>[e.id,e.import])),cd=Object.fromEntries(cc.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),cp={...cu,...cd};class ch extends Error{constructor(e){super(e),this.name="ShikiError"}}var cf=e.i(113971);function cm(e,...t){return t.forEach(t=>{for(let r in t)e[r]=t[r]}),e}var cg=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,cy=class{static hasCaptures(e){return null!==e&&(cg.lastIndex=0,cg.test(e))}static replaceCaptures(e,t,r){return e.replace(cg,(e,n,a,i)=>{let o=r[parseInt(n||a,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;"."===e[0];)e=e.substring(1);switch(i){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function cE(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let r=e.length,n=t.length;if(r===n){for(let n=0;n<r;n++){var a,i;let r=(a=e[n],a<(i=t[n])?-1:+(a>i));if(0!==r)return r}return 0}return r-n}function cb(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function cv(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var cT=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},c_=class{constructor(e,t,r){this._colorMap=e,this._defaults=t,this._root=r}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,r=[],n=0;for(let e=0,a=t.length;e<a;e++){let a,i=t[e];if(!i.settings)continue;if("string"==typeof i.scope){let e=i.scope;a=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else a=Array.isArray(i.scope)?i.scope:[""];let o=-1;if("string"==typeof i.settings.fontStyle){o=0;let e=i.settings.fontStyle.split(" ");for(let t=0,r=e.length;t<r;t++)switch(e[t]){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break;case"strikethrough":o|=8}}let s=null;"string"==typeof i.settings.foreground&&cb(i.settings.foreground)&&(s=i.settings.foreground);let l=null;"string"==typeof i.settings.background&&cb(i.settings.background)&&(l=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(" "),c=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1)).reverse(),r[n++]=new cw(c,u,e,o,s,l)}}return r}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{var r,n;let a=(r=e.scope,r<(n=t.scope)?-1:+(r>n));return 0!==a||0!==(a=cE(e.parentScopes,t.parentScopes))?a:e.index-t.index});let r=0,n="#000000",a="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(r=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(a=t.background)}let i=new cS(t),o=new ck(r,i.getId(n),i.getId(a)),s=new cI(new cN(0,null,-1,0,0),[]);for(let t=0,r=e.length;t<r;t++){let r=e[t];s.insert(0,r.scope,r.parentScopes,r.fontStyle,i.getId(r.foreground),i.getId(r.background))}return new c_(i,o,s)}(e,t)}_cachedMatchRoot=new cT(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;let t=e.scopeName,r=this._cachedMatchRoot.get(t).find(t=>(function(e,t){if(0===t.length)return!0;for(let a=0;a<t.length;a++){var r,n;let i=t[a],o=!1;if(">"===i){if(a===t.length-1)return!1;i=t[++a],o=!0}for(;e&&(r=e.scopeName,!((n=i)===r||r.startsWith(n)&&"."===r[n.length]));){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0})(e.parent,t.parentScopes));return r?new ck(r.fontStyle,r.foreground,r.background):null}},cA=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,r){for(let n of r)t=new e(t,n);return t}static from(...t){let r=null;for(let n=0;n<t.length;n++)r=new e(r,t[n]);return r}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],r=this;for(;r&&r!==e;)t.push(r.scopeName),r=r.parent;return r===e?t.reverse():void 0}},ck=class{constructor(e,t,r){this.fontStyle=e,this.foregroundId=t,this.backgroundId=r}},cw=class{constructor(e,t,r,n,a,i){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=n,this.foreground=a,this.background=i}},cx=((_=cx||{})[_.NotSet=-1]="NotSet",_[_.None=0]="None",_[_.Italic=1]="Italic",_[_.Bold=2]="Bold",_[_.Underline=4]="Underline",_[_.Strikethrough=8]="Strikethrough",_),cS=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,r=e.length;t<r;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},cC=Object.freeze([]),cN=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,r,n,a){this.scopeDepth=e,this.parentScopes=t||cC,this.fontStyle=r,this.foreground=n,this.background=a}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let r=0,n=e.length;r<n;r++)t[r]=e[r].clone();return t}acceptOverwrite(e,t,r,n){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==r&&(this.foreground=r),0!==n&&(this.background=n)}},cI=class e{constructor(e,t=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let r=0,n=0;for(;">"===e.parentScopes[r]&&r++,">"===t.parentScopes[n]&&n++,!(r>=e.parentScopes.length)&&!(n>=t.parentScopes.length);){let a=t.parentScopes[n].length-e.parentScopes[r].length;if(0!==a)return a;r++,n++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,r,n=t.indexOf(".");if(-1===n?(e=t,r=""):(e=t.substring(0,n),r=t.substring(n+1)),this._children.hasOwnProperty(e))return this._children[e].match(r)}let r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(e._cmpBySpecificity),r}insert(t,r,n,a,i,o){let s,l,c;if(""===r)return void this._doInsertHere(t,n,a,i,o);let u=r.indexOf(".");-1===u?(s=r,l=""):(s=r.substring(0,u),l=r.substring(u+1)),this._children.hasOwnProperty(s)?c=this._children[s]:(c=new e(this._mainRule.clone(),cN.cloneArr(this._rulesWithParentScopes)),this._children[s]=c),c.insert(t+1,l,n,a,i,o)}_doInsertHere(e,t,r,n,a){if(null===t)return void this._mainRule.acceptOverwrite(e,r,n,a);for(let i=0,o=this._rulesWithParentScopes.length;i<o;i++){let o=this._rulesWithParentScopes[i];if(0===cE(o.parentScopes,t))return void o.acceptOverwrite(e,r,n,a)}-1===r&&(r=this._mainRule.fontStyle),0===n&&(n=this._mainRule.foreground),0===a&&(a=this._mainRule.background),this._rulesWithParentScopes.push(new cN(e,t,r,n,a))}},cR=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){let r=e.getLanguageId(t),n=e.getTokenType(t),a=e.getFontStyle(t);console.log({languageId:r,tokenType:n,fontStyle:a,foreground:e.getForeground(t),background:e.getBackground(t)})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static set(t,r,n,a,i,o,s){let l=e.getLanguageId(t),c=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),p=e.getForeground(t),h=e.getBackground(t);return 0!==r&&(l=r),8!==n&&(c=n),null!==a&&(u=+!!a),-1!==i&&(d=i),0!==o&&(p=o),0!==s&&(h=s),(l|c<<8|u<<10|d<<11|p<<15|h<<24)>>>0}};function cD(e,t){var r;let n,a,i=[],o=(r=e,a=(n=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(r),{next:()=>{if(!a)return null;let e=a[0];return a=n.exec(r),e}}),s=o.next();for(;null!==s;){let e=0;if(2===s.length&&":"===s.charAt(1)){switch(s.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=o.next()}let t=c();if(i.push({matcher:t,priority:e}),","!==s)break;s=o.next()}return i;function l(){if("-"===s){s=o.next();let e=l();return t=>!!e&&!e(t)}if("("===s){s=o.next();let e=function(){let e=[],t=c();for(;t&&(e.push(t),"|"===s||","===s);){do s=o.next();while("|"===s||","===s)t=c()}return t=>e.some(e=>e(t))}();return")"===s&&(s=o.next()),e}if(cL(s)){let e=[];do e.push(s),s=o.next();while(cL(s))return r=>t(e,r)}return null}function c(){let e=[],t=l();for(;t;)e.push(t),t=l();return t=>e.every(e=>e(t))}}function cL(e){return!!e&&!!e.match(/[\w\.:]+/)}var cO=((A=cO||{})[A.None=0]="None",A[A.NotBeginString=1]="NotBeginString",A[A.NotEndString=2]="NotEndString",A[A.NotBeginPosition=4]="NotBeginPosition",A[A.DebugCall=8]="DebugCall",A);function cP(e){"function"==typeof e.dispose&&e.dispose()}var cM=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},cF=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},cB=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},cj=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new cM(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new cB;for(let r of e)!function(e,t,r,n){let a=r.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let i=r.lookup(t);e instanceof cM?cH({baseGrammar:i,selfGrammar:a},n):cU(e.ruleName,{baseGrammar:i,selfGrammar:a,repository:a.repository},n);let o=r.injections(e.scopeName);if(o)for(let e of o)n.add(new cM(e))}(r,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof cM){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function cU(e,t,r){t.repository&&t.repository[e]&&cG([t.repository[e]],t,r)}function cH(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&cG(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&cG(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function cG(e,t,r){for(let n of e){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);let e=n.repository?cm({},t.repository,n.repository):t.repository;Array.isArray(n.patterns)&&cG(n.patterns,{...t,repository:e},r);let a=n.include;if(!a)continue;let i=cY(a);switch(i.kind){case 0:cH({...t,selfGrammar:t.baseGrammar},r);break;case 1:cH(t,r);break;case 2:cU(i.ruleName,{...t,repository:e},r);break;case 3:case 4:let o=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){let n={baseGrammar:t.baseGrammar,selfGrammar:o,repository:e};4===i.kind?cU(i.ruleName,n,r):cH(n,r)}else 4===i.kind?r.add(new cF(i.scopeName,i.ruleName)):r.add(new cM(i.scopeName))}}}var c$=class{kind=0},cz=class{kind=1},cW=class{constructor(e){this.ruleName=e}kind=2},cq=class{constructor(e){this.scopeName=e}kind=3},cV=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function cY(e){if("$base"===e)return new c$;if("$self"===e)return new cz;let t=e.indexOf("#");return -1===t?new cq(e):0===t?new cW(e.substring(1)):new cV(e.substring(0,t),e.substring(t+1))}var cQ=/\\(\d+)/,cK=/\\(\d+)/g;Symbol("RuleId");var cX=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,r,n){this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=cy.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=cy.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${function e(t){let r=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===r?t:~r==t.length-1?e(t.substring(0,t.length-1)):t.substr(~r+1)}(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?cy.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?cy.replaceCaptures(this._contentName,e,t):this._contentName}},cJ=class extends cX{retokenizeCapturedWithRuleId;constructor(e,t,r,n,a){super(e,t,r,n),this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,r,n){throw Error("Not supported!")}},cZ=class extends cX{_match;captures;_cachedCompiledPatterns;constructor(e,t,r,n,a){super(e,t,r,null),this._match=new c3(n,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new c4,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},c0=class extends cX{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,a){super(e,t,r,n),this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new c4,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},c1=class extends cX{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,a,i,o,s,l,c){super(e,t,r,n),this._begin=new c3(a,this.id),this.beginCaptures=i,this._end=new c3(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,n)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new c4,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},c2=class extends cX{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,r,n,a,i,o,s,l){super(e,t,r,n),this._begin=new c3(a,this.id),this.beginCaptures=i,this.whileCaptures=s,this._while=new c3(o,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new c4,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,r,n){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,n)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new c4,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},c5=class e{static createCaptureRule(e,t,r,n,a){return e.registerRule(e=>new cJ(t,e,r,n,a))}static getCompiledRuleId(t,r,n){return t.id||r.registerRule(a=>{if(t.id=a,t.match)return new cZ(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,r,n));if(void 0===t.begin){t.repository&&(n=cm({},n,t.repository));let a=t.patterns;return void 0===a&&t.include&&(a=[{include:t.include}]),new c0(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(a,r,n))}return t.while?new c2(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,r,n),t.while,e._compileCaptures(t.whileCaptures||t.captures,r,n),e._compilePatterns(t.patterns,r,n)):new c1(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,r,n),t.end,e._compileCaptures(t.endCaptures||t.captures,r,n),t.applyEndPatternLast,e._compilePatterns(t.patterns,r,n))}),t.id}static _compileCaptures(t,r,n){let a=[];if(t){let i=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>i&&(i=t)}for(let e=0;e<=i;e++)a[e]=null;for(let i in t){if("$vscodeTextmateLocation"===i)continue;let o=parseInt(i,10),s=0;t[i].patterns&&(s=e.getCompiledRuleId(t[i],r,n)),a[o]=e.createCaptureRule(r,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,s)}}return a}static _compilePatterns(t,r,n){let a=[];if(t)for(let i=0,o=t.length;i<o;i++){let o=t[i],s=-1;if(o.include){let t=cY(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(n[o.include],r,n);break;case 2:let a=n[t.ruleName];a&&(s=e.getCompiledRuleId(a,r,n));break;case 3:case 4:let i=t.scopeName,l=4===t.kind?t.ruleName:null,c=r.getExternalGrammar(i,n);if(c)if(l){let t=c.repository[l];t&&(s=e.getCompiledRuleId(t,r,c.repository))}else s=e.getCompiledRuleId(c.repository.$self,r,c.repository)}}else s=e.getCompiledRuleId(o,r,n);if(-1!==s){let e=r.getRule(s),t=!1;if((e instanceof c0||e instanceof c1||e instanceof c2)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;a.push(s)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},c3=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let r=0,n=[],a=!1;for(let i=0;i<t;i++)if("\\"===e.charAt(i)&&i+1<t){const t=e.charAt(i+1);"z"===t?(n.push(e.substring(r,i)),n.push("$(?!\\n)(?<!\\n)"),r=i+2):("A"===t||"G"===t)&&(a=!0),i++}this.hasAnchor=a,0===r?this.source=e:(n.push(e.substring(r,t)),this.source=n.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=cQ.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let r=t.map(t=>e.substring(t.start,t.end));return cK.lastIndex=0,this.source.replace(cK,(e,t)=>cv(r[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,r,n;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let a=[],i=[],o=[],s=[];for(e=0,t=this.source.length;e<t;e++)r=this.source.charAt(e),a[e]=r,i[e]=r,o[e]=r,s[e]=r,"\\"===r&&e+1<t&&("A"===(n=this.source.charAt(e+1))?(a[e+1]="",i[e+1]="",o[e+1]="A",s[e+1]="A"):"G"===n?(a[e+1]="",i[e+1]="G",o[e+1]="",s[e+1]="G"):(a[e+1]=n,i[e+1]=n,o[e+1]=n,s[e+1]=n),e++);return{A0_G0:a.join(""),A0_G1:i.join(""),A1_G0:o.join(""),A1_G1:s.join("")}}resolveAnchors(e,t){if(!this.hasAnchor||!this._anchorCache||"string"!=typeof this.source)return this.source;if(e)if(t)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;return t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},c4=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new c6(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,r){if(!this._hasAnchors)return this.compile(e);if(t)if(r)return this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1;else return this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0;return r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,r){return new c6(e,this._items.map(e=>e.resolveAnchors(t,r)),this._items.map(e=>e.ruleId))}},c6=class{constructor(e,t,r){this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,r=this.rules.length;t<r;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,r){let n=this.scanner.findNextMatchSync(e,t,r);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},c8=class{constructor(e,t){this.languageId=e,this.tokenType=t}},c9=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new c8(e,8),this._embeddedLanguagesMatcher=new c7(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new c8(0,0);_getBasicScopeAttributes=new cT(e=>new c8(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let r=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},c7=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>cv(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};void 0!==cf.default&&cf.default.env.VSCODE_TEXTMATE_DEBUG;var ue=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function ut(e,t,r,n,a,i,o,s){let l=t.content.length,c=!1,u=-1;if(o){let o=function(e,t,r,n,a,i){let o=a.beginRuleCapturedEOL?0:-1,s=[];for(let t=a;t;t=t.pop()){let r=t.getRule(e);r instanceof c2&&s.push({rule:r,stack:t})}for(let h=s.pop();h;h=s.pop()){var l,c,u,d,p;let{ruleScanner:s,findOptions:f}=(l=h.rule,c=e,u=h.stack.endRule,d=r,p=n===o,{ruleScanner:l.compileWhileAG(c,u,d,p),findOptions:0}),m=s.findNextMatchSync(t,n,f);if(m){if(-2!==m.ruleId){a=h.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(i.produce(h.stack,m.captureIndices[0].start),un(e,t,r,h.stack,i,h.rule.whileCaptures,m.captureIndices),i.produce(h.stack,m.captureIndices[0].end),o=m.captureIndices[0].end,m.captureIndices[0].end>n&&(n=m.captureIndices[0].end,r=!1))}else{a=h.stack.pop();break}}return{stack:a,linePos:n,anchorPosition:o,isFirstLine:r}}(e,t,r,n,a,i);a=o.stack,n=o.linePos,r=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!c;){if(0!==s&&Date.now()-d>s)return new ue(a,!0);!function(){let o=function(e,t,r,n,a,i){let o=function(e,t,r,n,a,i){let{ruleScanner:o,findOptions:s}=ur(a.getRule(e),e,a.endRule,r,n===i),l=o.findNextMatchSync(t,n,s);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}(e,t,r,n,a,i),s=e.getInjections();if(0===s.length)return o;let l=function(e,t,r,n,a,i,o){let s,l=Number.MAX_VALUE,c=null,u=0,d=i.contentNameScopesList.getScopeNames();for(let i=0,p=e.length;i<p;i++){let p=e[i];if(!p.matcher(d))continue;let{ruleScanner:h,findOptions:f}=ur(t.getRule(p.ruleId),t,null,n,a===o),m=h.findNextMatchSync(r,a,f);if(!m)continue;let g=m.captureIndices[0].start;if(!(g>=l)&&(l=g,c=m.captureIndices,s=m.ruleId,u=p.priority,l===a))break}return c?{priorityMatch:-1===u,captureIndices:c,matchedRuleId:s}:null}(s,e,t,r,n,a,i);if(!l)return o;if(!o)return l;let c=o.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:o}(e,t,r,n,a,u);if(!o){i.produce(a,l),c=!0;return}let s=o.captureIndices,d=o.matchedRuleId,p=!!s&&s.length>0&&s[0].end>n;if(-1===d){let o=a.getRule(e);i.produce(a,s[0].start),a=a.withContentNameScopesList(a.nameScopesList),un(e,t,r,a,i,o.endCaptures,s),i.produce(a,s[0].end);let d=a;if(a=a.parent,u=d.getAnchorPos(),!p&&d.getEnterPos()===n){a=d,i.produce(a,l),c=!0;return}}else{let o=e.getRule(d);i.produce(a,s[0].start);let h=a,f=o.getName(t.content,s),m=a.contentNameScopesList.pushAttributed(f,e);if(a=a.push(d,n,u,s[0].end===l,null,m,m),o instanceof c1){un(e,t,r,a,i,o.beginCaptures,s),i.produce(a,s[0].end),u=s[0].end;let n=o.getContentName(t.content,s),d=m.pushAttributed(n,e);if(a=a.withContentNameScopesList(d),o.endHasBackReferences&&(a=a.withEndRule(o.getEndWithResolvedBackReferences(t.content,s))),!p&&h.hasSameRuleAs(a)){a=a.pop(),i.produce(a,l),c=!0;return}}else if(o instanceof c2){un(e,t,r,a,i,o.beginCaptures,s),i.produce(a,s[0].end),u=s[0].end;let n=o.getContentName(t.content,s),d=m.pushAttributed(n,e);if(a=a.withContentNameScopesList(d),o.whileHasBackReferences&&(a=a.withEndRule(o.getWhileWithResolvedBackReferences(t.content,s))),!p&&h.hasSameRuleAs(a)){a=a.pop(),i.produce(a,l),c=!0;return}}else if(un(e,t,r,a,i,o.captures,s),i.produce(a,s[0].end),a=a.pop(),!p){a=a.safePop(),i.produce(a,l),c=!0;return}}s[0].end>n&&(n=s[0].end,r=!1)}()}return new ue(a,!1)}function ur(e,t,r,n,a){return{ruleScanner:e.compileAG(t,r,n,a),findOptions:0}}function un(e,t,r,n,a,i,o){if(0===i.length)return;let s=t.content,l=Math.min(i.length,o.length),c=[],u=o[0].end;for(let t=0;t<l;t++){let l=i[t];if(null===l)continue;let d=o[t];if(0===d.length)continue;if(d.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=d.start;)a.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?a.produceFromScopes(c[c.length-1].scopes,d.start):a.produce(n,d.start),l.retokenizeCapturedWithRuleId){let t=l.getName(s,o),i=n.contentNameScopesList.pushAttributed(t,e),c=l.getContentName(s,o),u=i.pushAttributed(c,e),p=n.push(l.retokenizeCapturedWithRuleId,d.start,-1,!1,null,i,u),h=e.createOnigString(s.substring(0,d.end));ut(e,h,r&&0===d.start,d.start,p,a,!1,0),cP(h);continue}let p=l.getName(s,o);if(null!==p){let t=(c.length>0?c[c.length-1].scopes:n.contentNameScopesList).pushAttributed(p,e);c.push(new ua(t,d.end))}}for(;c.length>0;)a.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var ua=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function ui(e,t,r,n,a){let i=cD(t,uo),o=c5.getCompiledRuleId(r,n,a.repository);for(let r of i)e.push({debugSelector:t,matcher:r.matcher,ruleId:o,grammar:a,priority:r.priority})}function uo(e,t){if(t.length<e.length)return!1;let r=0;return e.every(e=>{for(let n=r;n<t.length;n++)if(function(e,t){if(!e)return!1;if(e===t)return!0;let r=t.length;return e.length>r&&e.substr(0,r)===t&&"."===e[r]}(t[n],e))return r=n+1,!0;return!1})}var us=class{constructor(e,t,r,n,a,i,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=i,this._onigLib=s,this._basicScopeAttributesProvider=new c9(r,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=ul(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(const e of Object.keys(a))for(const t of cD(e,uo))this._tokenTypeMatchers.push({matcher:t.matcher,type:a[e]})}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=[],t=this._rootScopeName,r=({lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)}).lookup(t);if(r){let n=r.injections;if(n)for(let t in n)ui(e,t,n[t],this,r);let a=this._grammarRepository.injections(t);a&&a.forEach(t=>{let r=this.getExternalGrammar(t);if(r){let t=r.injectionSelector;t&&ui(e,t,r,this,r)}})}return e.sort((e,t)=>e.priority-t.priority),e}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,r=e(t);return this._ruleId2desc[t]=r,r}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let r=this._grammarRepository.lookup(e);if(r)return this._includedGrammars[e]=ul(r,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,r=0){let n=this._tokenize(e,t,!1,r);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(e,t,r=0){let n=this._tokenize(e,t,!0,r);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(e,t,r,n){let a;if(-1===this._rootId&&(this._rootId=c5.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==uu.NULL)a=!1,t.reset();else{let e;a=!0;let r=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),i=cR.set(0,r.languageId,r.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),o=this.getRule(this._rootId).getName(null,null);e=o?uc.createRootAndLookUpScopeName(o,i,this):uc.createRoot("unknown",i),t=new uu(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let i=this.createOnigString(e),o=i.content.length,s=new up(r,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=ut(this,i,a,0,t,s,!0,n);return cP(i),{lineLength:o,lineTokens:s,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function ul(e,t){return(e=function e(t){return Array.isArray(t)?function(t){let r=[];for(let n=0,a=t.length;n<a;n++)r[n]=e(t[n]);return r}(t):t instanceof RegExp?t:"object"==typeof t?function(t){let r={};for(let n in t)r[n]=e(t[n]);return r}(t):t}(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var uc=class e{constructor(e,t,r){this.parent=e,this.scopePath=t,this.tokenAttributes=r}static fromExtension(t,r){let n=t,a=t?.scopePath??null;for(let t of r)n=new e(n,a=cA.push(a,t.scopeNames),t.encodedTokenAttributes);return n}static createRoot(t,r){return new e(null,new cA(null,t),r)}static createRootAndLookUpScopeName(t,r,n){let a=n.getMetadataForScope(t),i=new cA(null,t),o=n.themeProvider.themeMatch(i),s=e.mergeAttributes(r,a,o);return new e(null,i,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,r){let n=-1,a=0,i=0;return null!==r&&(n=r.fontStyle,a=r.foregroundId,i=r.backgroundId),cR.set(e,t.languageId,t.tokenType,null,n,a,i)}pushAttributed(t,r){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,r);let n=t.split(/ /g),a=this;for(let t of n)a=e._pushAttributed(a,t,r);return a}static _pushAttributed(t,r,n){let a=n.getMetadataForScope(r),i=t.scopePath.push(r),o=n.themeProvider.themeMatch(i),s=e.mergeAttributes(t.tokenAttributes,a,o);return new e(t,i,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],r=this;for(;r&&r!==e;)t.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?t.reverse():void 0}},uu=class e{constructor(e,t,r,n,a,i,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=a,this.endRule=i,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=n}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&uc.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,r,n,a,i,o,s){return new e(this,t,r,n,a,i,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,r){let n=uc.fromExtension(t?.nameScopesList??null,r.nameScopesList);return new e(t,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,n,uc.fromExtension(n,r.contentNameScopesList))}},ud=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):cD(e,uo).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>cD(e,uo).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},up=class{constructor(e,t,r,n){this.balancedBracketSelectors=n,this._emitBinaryTokens=e,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,n=!1;if(this.balancedBracketSelectors?.matchesAlways&&(n=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(r=cR.set(r,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(n=this.balancedBracketSelectors.match(t))}if(n&&(r=cR.set(r,0,8,n,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}let r=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let r=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)r[e]=this._binaryTokens[e];return r}},uh=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,r,n,a){if(!this._grammars.has(e)){let i=this._rawGrammars.get(e);if(!i)return null;this._grammars.set(e,new us(e,i,t,r,n,a,this,this._onigLib))}return this._grammars.get(e)}},uf=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new uh(c_.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(c_.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,r){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,t,r){return this._loadGrammar(e,t,r.embeddedLanguages,r.tokenTypes,new ud(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,r,n,a){let i=new cj(this._syncRegistry,e);for(;i.Q.length>0;)i.Q.map(e=>this._loadSingleGrammar(e.scopeName)),i.processQueue();return this._grammarForScopeName(e,t,r,n,a)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let r="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,r)}}addGrammar(e,t=[],r=0,n=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,r,n)}_grammarForScopeName(e,t=0,r=null,n=null,a=null){return this._syncRegistry.grammarForScopeName(e,t,r,n,a)}},um=uu.NULL;let ug=/["&'<>`]/g,uy=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,uE=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,ub=/[|\\{}()[\]^$+*?.]/g,uv=new WeakMap,uT=/[\dA-Fa-f]/,u_=/\d/,uA=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],uk={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},uw=["cent","copy","divide","gt","lt","not","para","times"],ux={}.hasOwnProperty,uS={};for(t in uk)ux.call(uk,t)&&(uS[uk[t]]=t);let uC=/[^\dA-Za-z]/;function uN(e,t,r){var n,a;let i,o,s=(n=r.omitOptionalSemicolons,i="&#x"+e.toString(16).toUpperCase(),n&&t&&!uT.test(String.fromCharCode(t))?i:i+";");if((r.useNamedReferences||r.useShortestReferences)&&(o=function(e,t,r,n){let a=String.fromCharCode(e);if(ux.call(uS,a)){let e=uS[a],i="&"+e;return r&&uA.includes(e)&&!uw.includes(e)&&(!n||t&&61!==t&&uC.test(String.fromCharCode(t)))?i:i+";"}return""}(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!o)&&r.useShortestReferences){let n,i=(a=r.omitOptionalSemicolons,n="&#"+String(e),a&&t&&!u_.test(String.fromCharCode(t))?n:n+";");i.length<s.length&&(s=i)}return o&&(!r.useShortestReferences||o.length<s.length)?o:s}function uI(e,t){let r;var n,a=e,i=Object.assign({format:uN},t);if(a=a.replace(i.subset?(n=i.subset,(r=uv.get(n))||(r=function(e){let t=[],r=-1;for(;++r<e.length;)t.push(e[r].replace(ub,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(n),uv.set(n,r)),r):ug,o),i.subset||i.escapeOnly)return a;return a.replace(uy,function(e,t,r){return i.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(t+2),i)}).replace(uE,o);function o(e,t,r){return i.format(e.charCodeAt(0),r.charCodeAt(t+1),i)}}let uR=/^>|^->|<!--|-->|--!>|<!-$/g,uD=[">"],uL=["<",">"],uO=uF(1),uP=uF(-1),uM=[];function uF(e){return function(t,r,n){let a=t?t.children:uM,i=(r||0)+e,o=a[i];if(!n)for(;o&&tN(o);)i+=e,o=a[i];return o}}let uB={}.hasOwnProperty;function uj(e){return function(t,r,n){return uB.call(e,t.tagName)&&e[t.tagName](t,r,n)}}let uU=uj({body:function(e,t,r){let n=uO(r,t);return!n||"comment"!==n.type},caption:uH,colgroup:uH,dd:function(e,t,r){let n=uO(r,t);return!n||"element"===n.type&&("dt"===n.tagName||"dd"===n.tagName)},dt:function(e,t,r){let n=uO(r,t);return!!(n&&"element"===n.type&&("dt"===n.tagName||"dd"===n.tagName))},head:uH,html:function(e,t,r){let n=uO(r,t);return!n||"comment"!==n.type},li:function(e,t,r){let n=uO(r,t);return!n||"element"===n.type&&"li"===n.tagName},optgroup:function(e,t,r){let n=uO(r,t);return!n||"element"===n.type&&"optgroup"===n.tagName},option:function(e,t,r){let n=uO(r,t);return!n||"element"===n.type&&("option"===n.tagName||"optgroup"===n.tagName)},p:function(e,t,r){let n=uO(r,t);return n?"element"===n.type&&("address"===n.tagName||"article"===n.tagName||"aside"===n.tagName||"blockquote"===n.tagName||"details"===n.tagName||"div"===n.tagName||"dl"===n.tagName||"fieldset"===n.tagName||"figcaption"===n.tagName||"figure"===n.tagName||"footer"===n.tagName||"form"===n.tagName||"h1"===n.tagName||"h2"===n.tagName||"h3"===n.tagName||"h4"===n.tagName||"h5"===n.tagName||"h6"===n.tagName||"header"===n.tagName||"hgroup"===n.tagName||"hr"===n.tagName||"main"===n.tagName||"menu"===n.tagName||"nav"===n.tagName||"ol"===n.tagName||"p"===n.tagName||"pre"===n.tagName||"section"===n.tagName||"table"===n.tagName||"ul"===n.tagName):!r||"element"!==r.type||"a"!==r.tagName&&"audio"!==r.tagName&&"del"!==r.tagName&&"ins"!==r.tagName&&"map"!==r.tagName&&"noscript"!==r.tagName&&"video"!==r.tagName},rp:uG,rt:uG,tbody:function(e,t,r){let n=uO(r,t);return!n||"element"===n.type&&("tbody"===n.tagName||"tfoot"===n.tagName)},td:u$,tfoot:function(e,t,r){return!uO(r,t)},th:u$,thead:function(e,t,r){let n=uO(r,t);return!!(n&&"element"===n.type&&("tbody"===n.tagName||"tfoot"===n.tagName))},tr:function(e,t,r){let n=uO(r,t);return!n||"element"===n.type&&"tr"===n.tagName}});function uH(e,t,r){let n=uO(r,t,!0);return!n||"comment"!==n.type&&!("text"===n.type&&tN(n.value.charAt(0)))}function uG(e,t,r){let n=uO(r,t);return!n||"element"===n.type&&("rp"===n.tagName||"rt"===n.tagName)}function u$(e,t,r){let n=uO(r,t);return!n||"element"===n.type&&("td"===n.tagName||"th"===n.tagName)}let uz=uj({body:function(e){let t=uO(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&tN(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)},colgroup:function(e,t,r){let n=uP(r,t),a=uO(e,-1,!0);return!(r&&n&&"element"===n.type&&"colgroup"===n.tagName&&uU(n,r.children.indexOf(n),r))&&!!(a&&"element"===a.type&&"col"===a.tagName)},head:function(e){let t=new Set;for(let r of e.children)if("element"===r.type&&("base"===r.tagName||"title"===r.tagName)){if(t.has(r.tagName))return!1;t.add(r.tagName)}let r=e.children[0];return!r||"element"===r.type},html:function(e){let t=uO(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,r){let n=uP(r,t),a=uO(e,-1);return!(r&&n&&"element"===n.type&&("thead"===n.tagName||"tbody"===n.tagName)&&uU(n,r.children.indexOf(n),r))&&!!(a&&"element"===a.type&&"tr"===a.tagName)}}),uW={name:[[" \n\f\r &/=>".split("")," \n\f\r \"&'/=>`".split("")],["\0 \n\f\r \"&'/<=>".split(""),"\0 \n\f\r \"&'/<=>`".split("")]],unquoted:[[" \n\f\r &>".split(""),"\0 \n\f\r \"&'<=>`".split("")],["\0 \n\f\r \"&'<=>`".split(""),"\0 \n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},uq=["<","&"];function uV(e,t,r,n){return r&&"element"===r.type&&("script"===r.tagName||"style"===r.tagName)?e.value:uI(e.value,Object.assign({},n.settings.characterReferences,{subset:uq}))}let uY=iQ("type",{invalid:function(e){throw Error("Expected node, not `"+e+"`")},unknown:function(e){throw Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,r,n){return n.settings.bogusComments?"<?"+uI(e.value,Object.assign({},n.settings.characterReferences,{subset:uD}))+">":"<!--"+e.value.replace(uR,function(e){return uI(e,Object.assign({},n.settings.characterReferences,{subset:uL}))})+"-->"},doctype:function(e,t,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,r,n){let a,i=n.schema,o="svg"!==i.space&&n.settings.omitOptionalTags,s="svg"===i.space?n.settings.closeEmptyElements:n.settings.voids.includes(e.tagName.toLowerCase()),l=[];"html"===i.space&&"svg"===e.tagName&&(n.schema=re);let c=function(e,t){let r,n=[],a=-1;if(t){for(r in t)if(null!==t[r]&&void 0!==t[r]){let a=function(e,t,r){let n,a=tY(e.schema,t),i=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,o=+!e.settings.allowDangerousCharacters,s=e.quote;if(a.overloadedBoolean&&(r===a.attribute||""===r)?r=!0:(a.boolean||a.overloadedBoolean)&&("string"!=typeof r||r===a.attribute||""===r)&&(r=!!r),null==r||!1===r||"number"==typeof r&&Number.isNaN(r))return"";let l=uI(a.attribute,Object.assign({},e.settings.characterReferences,{subset:uW.name[i][o]}));return!0===r||(r=Array.isArray(r)?(a.commaSeparated?tA:rr)(r,{padLeft:!e.settings.tightCommaSeparatedLists}):String(r),e.settings.collapseEmptyAttributes&&!r)?l:(e.settings.preferUnquoted&&(n=uI(r,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:uW.unquoted[i][o]}))),n!==r&&(e.settings.quoteSmart&&sV(r,s)>sV(r,e.alternative)&&(s=e.alternative),n=s+uI(r,Object.assign({},e.settings.characterReferences,{subset:("'"===s?uW.single:uW.double)[i][o],attribute:!0}))+s),l+(n?"="+n:n))}(e,r,t[r]);a&&n.push(a)}}for(;++a<n.length;){let t=e.settings.tightAttributes?n[a].charAt(n[a].length-1):void 0;a!==n.length-1&&'"'!==t&&"'"!==t&&(n[a]+=" ")}return n.join("")}(n,e.properties),u=n.all("html"===i.space&&"template"===e.tagName?e.content:e);return n.schema=i,u&&(s=!1),!c&&o&&uz(e,t,r)||(l.push("<",e.tagName,c?" "+c:""),s&&("svg"===i.space||n.settings.closeSelfClosing)&&(a=c.charAt(c.length-1),(!n.settings.tightSelfClosing||"/"===a||a&&'"'!==a&&"'"!==a)&&l.push(" "),l.push("/")),l.push(">")),l.push(u),s||o&&uU(e,t,r)||l.push("</"+e.tagName+">"),l.join("")},raw:function(e,t,r,n){return n.settings.allowDangerousHtml?e.value:uV(e,t,r,n)},root:function(e,t,r,n){return n.all(e)},text:uV}}),uQ={},uK={},uX=[];function uJ(e,t,r){return uY(e,t,r,this)}function uZ(e){let t=[],r=e&&e.children||uX,n=-1;for(;++n<r.length;)t[n]=this.one(r[n],n,e);return t.join("")}function u0(e,t){let r="string"==typeof e?{}:{...e.colorReplacements},n="string"==typeof e?e:e.name;for(let[e,a]of Object.entries(t?.colorReplacements||{}))"string"==typeof a?r[e]=a:e===n&&Object.assign(r,a);return r}function u1(e,t){return e&&t?.[e?.toLowerCase()]||e}async function u2(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function u5(e){return!e||["plaintext","txt","text","plain"].includes(e)}function u3(e){return"ansi"===e||u5(e)}function u4(e){return"none"===e}function u6(e,t){if(!t)return e;for(let r of(e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]),Array.isArray(t)?t:t.split(/\s+/g)))r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function u8(e,t=!1){let r=e.split(/(\r?\n)/g),n=0,a=[];for(let e=0;e<r.length;e+=2){let i=t?r[e]+(r[e+1]||""):r[e];a.push([i,n]),n+=r[e].length,n+=r[e+1]?.length||0}return a}let u9="light-dark()",u7=["color","background-color"];function de(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&cx.Italic&&(t["font-style"]="italic"),e.fontStyle&cx.Bold&&(t["font-weight"]="bold");let r=[];e.fontStyle&cx.Underline&&r.push("underline"),e.fontStyle&cx.Strikethrough&&r.push("line-through"),r.length&&(t["text-decoration"]=r.join(" "))}return t}function dt(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}let dr=new WeakMap;function dn(e,t){dr.set(e,t)}function da(e){return dr.get(e)}class di{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new di(Object.fromEntries((Array.isArray(t)?t:[t]).map(e=>[e,um])),e)}constructor(...e){if(2===e.length){const[t,r]=e;this.lang=r,this._stacks=t}else{const[t,r,n]=e;this.lang=r,this._stacks={[n]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){var t;let r,n;return t=this._stacks[e],r=[],n=new Set,!function e(t){if(n.has(t))return;n.add(t);let a=t?.nameScopesList?.scopeName;a&&r.push(a),t.parent&&e(t.parent)}(t),r}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}let ds=[function(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){var r;let n,a=function(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new ch(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...i.indexToPos(e),offset:e}}{let t=i.lines[e.line];if(void 0===t)throw new ch(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${i.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new ch(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:i.posToIndex(e.line,r)}}},i={lines:n=u8(r=t.source,!0).map(([e])=>e),indexToPos:function(e){if(e===r.length)return{line:n.length-1,character:n[n.length-1].length};let t=e,a=0;for(let e of n){if(t<e.length)break;t-=e.length,a++}return{line:a,character:t}},posToIndex:function(e,t){let r=0;for(let t=0;t<e;t++)r+=n[t].length;return r+t}},o=(t.options.decorations||[]).map(e=>({...e,start:a(e.start),end:a(e.end)}));(function(e){for(let t=0;t<e.length;t++){let r=e[t];if(r.start.offset>r.end.offset)throw new ch(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let n=t+1;n<e.length;n++){let t=e[n],a=r.start.offset<=t.start.offset&&t.start.offset<r.end.offset,i=r.start.offset<t.end.offset&&t.end.offset<=r.end.offset,o=t.start.offset<=r.start.offset&&r.start.offset<t.end.offset,s=t.start.offset<r.end.offset&&r.end.offset<=t.end.offset;if(a||i||o||s){if(a&&i||o&&s||o&&r.start.offset===r.end.offset||i&&t.start.offset===t.end.offset)continue;throw new ch(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(t.start)} intersect.`)}}}})(o),e.set(t.meta,{decorations:o,converter:i,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){let r;if(!this.options.decorations?.length)return;let n=t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]);return(r=Array.from(n instanceof Set?n:new Set(n)).sort((e,t)=>e-t)).length?e.map(e=>e.flatMap(e=>{let t=r.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);if(!t.length)return e;let n=0,a=[];for(let r of t)r>n&&a.push({...e,content:e.content.slice(n,r),offset:e.offset+n}),n=r;return n<e.content.length&&a.push({...e,content:e.content.slice(n),offset:e.offset+n}),a})):e},code(e){if(!this.options.decorations?.length)return;let r=t(this),n=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(n.length!==r.converter.lines.length)throw new ch(`Number of lines in code element (${n.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function a(e,t,r,a){let o=n[e],s="",l=-1,c=-1;if(0===t&&(l=0),0===r&&(c=0),r===1/0&&(c=o.children.length),-1===l||-1===c)for(let e=0;e<o.children.length;e++)s+=function e(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(e).join(""):""}(o.children[e]),-1===l&&s.length===t&&(l=e+1),-1===c&&s.length===r&&(c=e+1);if(-1===l)throw new ch(`Failed to find start index for decoration ${JSON.stringify(a.start)}`);if(-1===c)throw new ch(`Failed to find end index for decoration ${JSON.stringify(a.end)}`);let u=o.children.slice(l,c);if(a.alwaysWrap||u.length!==o.children.length)if(a.alwaysWrap||1!==u.length||"element"!==u[0].type){let e={type:"element",tagName:"span",properties:{},children:u};i(e,a,"wrapper"),o.children.splice(l,u.length,e)}else i(u[0],a,"token");else i(o,a,"line")}function i(e,t,r){let n=t.properties||{},a=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...n,class:e.properties.class},t.properties?.class&&u6(e,t.properties.class),e=a(e,r)||e}let o=[];for(let e of r.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset)){let{start:t,end:r}=e;if(t.line===r.line)a(t.line,t.character,r.character,e);else if(t.line<r.line){a(t.line,t.character,1/0,e);for(let a=t.line+1;a<r.line;a++)o.unshift(()=>{var t;n[t=a]=i(n[t],e,"line")});a(r.line,0,r.character,e)}}o.forEach(e=>e())}}}()];function dl(e){let t=function(e){let t=[],r=[],n=[];for(let a of e)switch(a.enforce){case"pre":t.push(a);break;case"post":r.push(a);break;default:n.push(a)}return{pre:t,post:r,normal:n}}(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...ds]}var dc=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],du={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function dd(e){let t=e.shift();if("2"===t){let t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){let t=e.shift();if(t)return{type:"table",index:Number(t)}}}var dp={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function dh(e,t,r={}){var n,a,i,o,s;let l,c,{lang:u="text",theme:d=e.getLoadedThemes()[0]}=r;if(u5(u)||u4(d))return u8(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:p,colorMap:h}=e.setTheme(d);if("ansi"===u){let e,n,a,i,o,s,l;return e=u0(p,r),n=u8(t),a=function(e=dp){let t;function r(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}return{value:function(n){switch(n.type){case"named":return e[n.name];case"rgb":return r(n.rgb);case"table":var a;return a=n.index,function(){if(t)return t;t=[];for(let r=0;r<dc.length;r++)t.push(e[dc[r]]);let n=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let a=0;a<6;a++)for(let i=0;i<6;i++)t.push(r([n[e],n[a],n[i]]));let a=8;for(let e=0;e<24;e++,a+=10)t.push(r([a,a,a]));return t}()[a]}}}}(Object.fromEntries(dc.map(e=>[e,p.colors?.[`terminal.ansi${e[0].toUpperCase()}${e.substring(1)}`]]))),i=null,o=null,s=new Set,l={parse(e){let t=[],r=0;do{let n=function(e,t){let r=e.indexOf("\x1b",t);if(-1!==r&&"["===e[r+1]){let t=e.indexOf("m",r);if(-1!==t)return{sequence:e.substring(r+2,t).split(";"),startPosition:r,position:t+1}}return{position:e.length}}(e,r),a=n.sequence?e.substring(r,n.startPosition):e.substring(r);if(a.length>0&&t.push({value:a,foreground:i,background:o,decorations:new Set(s)}),n.sequence){let e=function(e){let t=[];for(;e.length>0;){let r=e.shift();if(!r)continue;let n=Number.parseInt(r);if(!Number.isNaN(n))if(0===n)t.push({type:"resetAll"});else if(n<=9)du[n]&&t.push({type:"setDecoration",value:du[n]});else if(n<=29){let e=du[n-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(n<=37)t.push({type:"setForegroundColor",value:{type:"named",name:dc[n-30]}});else if(38===n){let r=dd(e);r&&t.push({type:"setForegroundColor",value:r})}else if(39===n)t.push({type:"resetForegroundColor"});else if(n<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:dc[n-40]}});else if(48===n){let r=dd(e);r&&t.push({type:"setBackgroundColor",value:r})}else 49===n?t.push({type:"resetBackgroundColor"}):53===n?t.push({type:"setDecoration",value:"overline"}):55===n?t.push({type:"resetDecoration",value:"overline"}):n>=90&&n<=97?t.push({type:"setForegroundColor",value:{type:"named",name:dc[n-90+8]}}):n>=100&&n<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:dc[n-100+8]}})}return t}(n.sequence);for(let t of e)"resetAll"===t.type?(i=null,o=null,s.clear()):"resetForegroundColor"===t.type?i=null:"resetBackgroundColor"===t.type?o=null:"resetDecoration"===t.type&&s.delete(t.value);for(let t of e)"setForegroundColor"===t.type?i=t.value:"setBackgroundColor"===t.type?o=t.value:"setDecoration"===t.type&&s.add(t.value)}r=n.position}while(r<e.length)return t}},n.map(t=>l.parse(t[0]).map(r=>{let n,i;r.decorations.has("reverse")?(n=r.background?a.value(r.background):p.bg,i=r.foreground?a.value(r.foreground):p.fg):(n=r.foreground?a.value(r.foreground):p.fg,i=r.background?a.value(r.background):void 0),n=u1(n,e),i=u1(i,e),r.decorations.has("dim")&&(n=function(e){let t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t)if(t[3]){let e=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${e}`}else if(t[2])return`#${t[1]}${t[2]}80`;else return`#${Array.from(t[1]).map(e=>`${e}${e}`).join("")}80`;let r=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return r?`var(${r[1]}-dim)`:e}(n));let o=cx.None;return r.decorations.has("bold")&&(o|=cx.Bold),r.decorations.has("italic")&&(o|=cx.Italic),r.decorations.has("underline")&&(o|=cx.Underline),r.decorations.has("strikethrough")&&(o|=cx.Strikethrough),{content:r.value,offset:t[1],color:n,bgColor:i,fontStyle:o}}))}let f=e.getLanguage(u);if(r.grammarState){if(r.grammarState.lang!==f.name)throw new ch(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${f.name}"`);if(!r.grammarState.themes.includes(p.name))throw new ch(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${p.name}"`)}return l=df(n=t,a=f,i=p,o=h,s=r),c=new di(df(n,a,i,o,s).stateStack,a.name,i.name),dn(l.tokens,c),l.tokens}function df(e,t,r,n,a){let i=u0(r,a),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=a,l=u8(e),c=a.grammarState?function(e,t){if(!(e instanceof di))throw new ch("Invalid grammar state");return e.getInternalStack(t)}(a.grammarState,r.name)??um:null!=a.grammarContextCode?df(a.grammarContextCode,t,r,n,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:um,u=[],d=[];for(let e=0,p=l.length;e<p;e++){let p,h,[f,m]=l[e];if(""===f){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:m,color:"",fontStyle:0}]);continue}a.includeExplanation&&(p=t.tokenizeLine(f,c,s).tokens,h=0);let g=t.tokenizeLine2(f,c,s),y=g.tokens.length/2;for(let e=0;e<y;e++){let t=g.tokens[2*e],o=e+1<y?g.tokens[2*e+2]:f.length;if(t===o)continue;let s=g.tokens[2*e+1],l=u1(n[cR.getForeground(s)],i),c=cR.getFontStyle(s),d={content:f.substring(t,o),offset:m+t,color:l,fontStyle:c};if(a.includeExplanation){let e=[];if("scopeName"!==a.includeExplanation)for(let t of r.settings){let r;switch(typeof t.scope){case"string":r=t.scope.split(/,/).map(e=>e.trim());break;case"object":r=t.scope;break;default:continue}e.push({settings:t,selectors:r.map(e=>e.split(/ /))})}d.explanation=[];let n=0;for(;t+n<o;){let t=p[h],r=f.substring(t.startIndex,t.endIndex);n+=r.length,d.explanation.push({content:r,scopes:"scopeName"===a.includeExplanation?t.scopes.map(e=>({scopeName:e})):function(e,t){let r=[];for(let n=0,a=t.length;n<a;n++){let a=t[n];r[n]={scopeName:a,themeMatches:function(e,t,r){let n=[];for(let{selectors:a,settings:i}of e)for(let e of a)if(function(e,t,r){if(!dm(e[e.length-1],t))return!1;let n=e.length-2,a=r.length-1;for(;n>=0&&a>=0;)dm(e[n],r[a])&&(n-=1),a-=1;return -1===n}(e,t,r)){n.push(i);break}return n}(e,a,t.slice(0,n))}}return r}(e,t.scopes)}),h+=1}}u.push(d)}d.push(u),u=[],c=g.ruleStack}return{tokens:d,stateStack:c}}function dm(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function dg(e,t,r){let n=Object.entries(r.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=n.map(n=>{let a=dh(e,t,{...r,theme:n.theme}),i=da(a);return{tokens:a,state:i,theme:"string"==typeof n.theme?n.theme:n.theme.name}}),i=function(...e){let t=e.map(()=>[]),r=e.length;for(let n=0;n<e[0].length;n++){let a=e.map(e=>e[n]),i=t.map(()=>[]);t.forEach((e,t)=>e.push(i[t]));let o=a.map(()=>0),s=a.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<r;t++){let r=s[t];r.content.length===e?(i[t].push(r),o[t]+=1,s[t]=a[t][o[t]]):(i[t].push({...r,content:r.content.slice(0,e)}),s[t]={...r,content:r.content.slice(e),offset:r.offset+e})}}}return t}(...a.map(e=>e.tokens)),o=i[0].map((e,t)=>e.map((e,a)=>{let o={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in r&&r.includeExplanation&&(o.explanation=e.explanation),i.forEach((e,r)=>{let{content:i,explanation:s,offset:l,...c}=e[t][a];o.variants[n[r].color]=c}),o})),s=a[0].state?new di(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return s&&dn(o,s),o}function dy(e,t,r){let n,a,i,o,s,l;if("themes"in r){let{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:d="css-vars"}=r,p=Object.entries(r.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===c?-1:+(t.color===c));if(0===p.length)throw new ch("`themes` option must not be empty");let h=dg(e,t,r);if(l=da(h),c&&u9!==c&&!p.find(e=>e.color===c))throw new ch(`\`themes\` option must contain the defaultColor key \`${c}\``);let f=p.map(t=>e.getTheme(t.theme)),m=p.map(e=>e.color);i=h.map(e=>e.map(e=>(function(e,t,r,n,a="css-vars"){let i={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>de(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),l={},c=(e,n)=>{let a="color"===n?"":"background-color"===n?"-bg":`-${n}`;return r+t[e]+("color"===n?"":a)};return o.forEach((e,r)=>{for(let i of s){let s=e[i]||"inherit";if(0===r&&n&&u7.includes(i))if(n===u9&&o.length>1){let e=t.findIndex(e=>"light"===e),n=t.findIndex(e=>"dark"===e);if(-1===e||-1===n)throw new ch('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][i]||"inherit",d=o[n][i]||"inherit";l[i]=`light-dark(${u}, ${d})`,"css-vars"===a&&(l[c(r,i)]=s)}else l[i]=s;else"css-vars"===a&&(l[c(r,i)]=s)}}),i.htmlStyle=l,i})(e,m,u,c,d))),l&&dn(i,l);let g=p.map(e=>u0(e.theme,r));a=dE(p,f,g,u,c,"fg",d),n=dE(p,f,g,u,c,"bg",d),o=`shiki-themes ${f.map(e=>e.name).join(" ")}`,s=c?void 0:[a,n].join(";")}else if("theme"in r){let s=u0(r.theme,r);i=dh(e,t,r);let c=e.getTheme(r.theme);n=u1(c.bg,s),a=u1(c.fg,s),o=c.name,l=da(i)}else throw new ch("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:a,bg:n,themeName:o,rootStyle:s,grammarState:l}}function dE(e,t,r,n,a,i,o){return e.map((s,l)=>{let c=u1(t[l][i],r[l])||"inherit",u=`${n+s.color}${"bg"===i?"-bg":""}:${c}`;if(0===l&&a){if(a===u9&&e.length>1){let n=e.findIndex(e=>"light"===e.color),a=e.findIndex(e=>"dark"===e.color);if(-1===n||-1===a)throw new ch('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let o=u1(t[n][i],r[n])||"inherit",s=u1(t[a][i],r[a])||"inherit";return`light-dark(${o}, ${s});${u}`}return c}return"css-vars"===o?u:null}).filter(e=>!!e).join(";")}function db(e,t,r,n={meta:{},options:r,codeToHast:(t,r)=>db(e,t,r),codeToTokens:(t,r)=>dy(e,t,r)}){let a=t;for(let e of dl(r))a=e.preprocess?.call(n,a,r)||a;let{tokens:i,fg:o,bg:s,themeName:l,rootStyle:c,grammarState:u}=dy(e,a,r),{mergeWhitespaces:d=!0,mergeSameStyleTokens:p=!1}=r;!0===d?i=i.map(e=>{let t=[],r="",n=0;return e.forEach((a,i)=>{let o=!(a.fontStyle&&(a.fontStyle&cx.Underline||a.fontStyle&cx.Strikethrough));o&&a.content.match(/^\s+$/)&&e[i+1]?(n||(n=a.offset),r+=a.content):r?(o?t.push({...a,offset:n,content:r+a.content}):t.push({content:r,offset:n},a),n=0,r=""):t.push(a)}),t}):"never"===d&&(i=i.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,r,n,a]=t;if(!r&&!a)return e;let i=[{...e,offset:e.offset+r.length,content:n}];return r&&i.unshift({content:r,offset:e.offset}),a&&i.push({content:a,offset:e.offset+r.length+n.length}),i}))),p&&(i=i.map(e=>{let t=[];for(let r of e){if(0===t.length){t.push({...r});continue}let e=t[t.length-1],n=dt(e.htmlStyle||de(e)),a=dt(r.htmlStyle||de(r)),i=e.fontStyle&&(e.fontStyle&cx.Underline||e.fontStyle&cx.Strikethrough),o=r.fontStyle&&(r.fontStyle&cx.Underline||r.fontStyle&cx.Strikethrough);i||o||n!==a?t.push({...r}):e.content+=r.content}return t}));let h={...n,get source(){return a}};for(let e of dl(r))i=e.tokens?.call(h,i)||i;return function(e,t,r,n=da(e)){let a=dl(t),i=[],o={type:"root",children:[]},{structure:s="classic",tabindex:l="0"}=t,c={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...!1!==l&&null!=l?{tabindex:l.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([e])=>!e.startsWith("_")))},children:[]},u={type:"element",tagName:"code",properties:{},children:i},d=[],p={...r,structure:s,addClassToHast:u6,get source(){return r.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return c},get code(){return u},get lines(){return d}};if(e.forEach((e,t)=>{t&&("inline"===s?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===s&&i.push({type:"text",value:"\n"}));let r={type:"element",tagName:"span",properties:{class:"line"},children:[]},n=0;for(let i of e){let e={type:"element",tagName:"span",properties:{...i.htmlAttrs},children:[{type:"text",value:i.content}]},l=dt(i.htmlStyle||de(i));for(let o of(l&&(e.properties.style=l),a))e=o?.span?.call(p,e,t+1,n,r,i)||e;"inline"===s?o.children.push(e):"classic"===s&&r.children.push(e),n+=i.content.length}if("classic"===s){for(let e of a)r=e?.line?.call(p,r,t+1)||r;d.push(r),i.push(r)}}),"classic"===s){for(let e of a)u=e?.code?.call(p,u)||u;for(let e of(c.children.push(u),a))c=e?.pre?.call(p,c)||c;o.children.push(c)}let h=o;for(let e of a)h=e?.root?.call(p,h)||h;return n&&dn(h,n),h}(i,{...r,fg:o,bg:s,themeName:l,rootStyle:c},h,u)}let dv=function(e,t){let r=t||uQ,n=r.quote||'"';if('"'!==n&&"'"!==n)throw Error("Invalid quote `"+n+"`, expected `'` or `\"`");return({one:uJ,all:uZ,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||i0,characterReferences:r.characterReferences||uK,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:"svg"===r.space?re:t7,quote:n,alternative:'"'===n?"'":'"'}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)},dT="__shiki_resolved";function d_(e){if(e?.[dT])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:r,fg:n}=t;if(!r||!n){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(n=e.settings.foreground),e?.settings?.background&&(r=e.settings.background),!n&&t?.colors?.["editor.foreground"]&&(n=t.colors["editor.foreground"]),!r&&t?.colors?.["editor.background"]&&(r=t.colors["editor.background"]),n||(n="light"===t.type?"#333333":"#bbbbbb"),r||(r="light"===t.type?"#fffffe":"#1e1e1e"),t.fg=n,t.bg=r}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let a=0,i=new Map;function o(e){if(i.has(e))return i.get(e);a+=1;let r=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${r}`]?o(e):(i.set(e,r),r)}for(let e of(t.settings=t.settings.map(e=>{let r=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),n=e.settings?.background&&!e.settings.background.startsWith("#");if(!r&&!n)return e;let a={...e,settings:{...e.settings}};if(r){let r=o(e.settings.foreground);t.colorReplacements[r]=e.settings.foreground,a.settings.foreground=r}if(n){let r=o(e.settings.background);t.colorReplacements[r]=e.settings.background,a.settings.background=r}return a}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let r=o(t.colors[e]);t.colorReplacements[r]=t.colors[e],t.colors[e]=r}return Object.defineProperty(t,dT,{enumerable:!1,writable:!1,value:!0}),t}async function dA(e){return Array.from(new Set((await Promise.all(e.filter(e=>!u3(e)).map(async e=>await u2(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function dk(e){return(await Promise.all(e.map(async e=>u4(e)?null:d_(await u2(e))))).filter(e=>!!e)}class dw extends Error{constructor(e){super(e),this.name="ShikiError"}}class dx extends uf{constructor(e,t,r,n={}){super(e),this._resolver=e,this._themes=t,this._langs=r,this._alias=n,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=d_(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=c_.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){if(this._alias[e]){let t=new Set([e]);for(;this._alias[e];){if(e=this._alias[e],t.has(e))throw new dw(`Circular alias \`${Array.from(t).join(" -> ")} -> ${e}\``);t.add(e)}}return this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let n=this.loadGrammarWithConfiguration(e.scopeName,1,r);if(n.name=e.name,this._resolvedGrammars.set(e.name,n),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),r=t.filter(([e,t])=>!t);if(r.length){let e=t.filter(([e,t])=>t&&t.embeddedLangs?.some(e=>r.map(([e])=>e).includes(e))).filter(e=>!r.includes(e));throw new dw(`Missing languages ${r.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,r]of t)this._resolver.addLanguage(r);for(let[e,r]of t)this.loadLanguage(r)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){if(this._langMap.set(e.name,e),this._langGraph.set(e.name,e),e.embeddedLangs)for(let t of e.embeddedLangs)this._langGraph.set(t,this._langMap.get(t))}}class dS{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),r=[];for(let e=1;e<=t.length;e++){let n=t.slice(0,e).join(".");r=[...r,...this._injections.get(n)||[]]}return r}}let dC=0;async function dN(e){e.engine||function(e,t=3){if(!(t>3))if(1)console.trace(`[SHIKI DEPRECATE]: ${e}`);else throw Error(`[SHIKI DEPRECATE]: ${e}`)}("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,r,n]=await Promise.all([dk(e.themes||[]),dA(e.langs||[]),e.engine]);return function(e){let t;dC+=1,!1!==e.warnings&&dC>=10&&dC%10==0&&console.warn(`[Shiki] ${dC} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let r=!1;if(!e.engine)throw new dw("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),a=(e.themes||[]).flat(1).map(d_),i=new dx(new dS(e.engine,n),a,n,e.langAlias);function o(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};c();let t=i.getTheme(e);if(!t)throw new dw(`Theme \`${e}\` not found, you may need to load it first`);return t}function s(...e){c(),i.loadLanguages(e.flat(1))}function l(...e){for(let t of(c(),e.flat(1)))i.loadTheme(t)}function c(){if(r)throw new dw("Shiki instance has been disposed")}function u(){r||(r=!0,i.dispose(),dC-=1)}return{setTheme:function(e){c();let r=o(e);return t!==e&&(i.setTheme(r),t=e),{theme:r,colorMap:i.getColorMap()}},getTheme:o,getLanguage:function(e){c();let t=i.getGrammar("string"==typeof e?e:e.name);if(!t)throw new dw(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return c(),i.getLoadedThemes()},getLoadedLanguages:function(){return c(),i.getLoadedLanguages()},loadLanguage:async function(...e){return s(await dA(e))},loadLanguageSync:s,loadTheme:async function(...e){return c(),l(await dk(e))},loadThemeSync:l,dispose:u,[Symbol.dispose]:u}}({...e,themes:t,langs:r,engine:n})}async function dI(e){let t=await dN(e);return{getLastGrammarState:(...e)=>(function(...e){if(2===e.length)return da(e[1]);let[t,r,n={}]=e,{lang:a="text",theme:i=t.getLoadedThemes()[0]}=n;if(u5(a)||u4(i))throw new ch("Plain language does not have grammar state");if("ansi"===a)throw new ch("ANSI language does not have grammar state");let{theme:o,colorMap:s}=t.setTheme(i),l=t.getLanguage(a);return new di(df(r,l,o,s,n).stateStack,l.name,o.name)})(t,...e),codeToTokensBase:(e,r)=>dh(t,e,r),codeToTokensWithThemes:(e,r)=>dg(t,e,r),codeToTokens:(e,r)=>dy(t,e,r),codeToHast:(e,r)=>db(t,e,r),codeToHtml:(e,r)=>(function(e,t,r){let n={meta:{},options:r,codeToHast:(t,r)=>db(e,t,r),codeToTokens:(t,r)=>dy(e,t,r)},a=dv(db(e,t,r,n));for(let e of dl(r))a=e.postprocess?.call(n,a,r)||a;return a})(t,e,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}let dR=Object.fromEntries([{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>e.A(391650)},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>e.A(375493)},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>e.A(818745)},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>e.A(208626)},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>e.A(215398)},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>e.A(832713)},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>e.A(638272)},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>e.A(282997)},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>e.A(415991)},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>e.A(79520)},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>e.A(79557)},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>e.A(174137)},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>e.A(394577)},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>e.A(41832)},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>e.A(190125)},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>e.A(168635)},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>e.A(140446)},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>e.A(272233)},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>e.A(370347)},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>e.A(260846)},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>e.A(32408)},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>e.A(854372)},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>e.A(112832)},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>e.A(186819)},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>e.A(190034)},{id:"houston",displayName:"Houston",type:"dark",import:()=>e.A(122954)},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>e.A(494361)},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>e.A(515402)},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>e.A(403537)},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>e.A(678748)},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>e.A(231112)},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>e.A(335429)},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>e.A(495124)},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>e.A(673277)},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>e.A(768477)},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>e.A(4967)},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>e.A(99287)},{id:"min-light",displayName:"Min Light",type:"light",import:()=>e.A(199091)},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>e.A(84693)},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>e.A(810501)},{id:"nord",displayName:"Nord",type:"dark",import:()=>e.A(825029)},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>e.A(592986)},{id:"one-light",displayName:"One Light",type:"light",import:()=>e.A(143967)},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>e.A(146470)},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>e.A(61984)},{id:"red",displayName:"Red",type:"dark",import:()=>e.A(418024)},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>e.A(732275)},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>e.A(86393)},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>e.A(323931)},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>e.A(583027)},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>e.A(392397)},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>e.A(555916)},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>e.A(589079)},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>e.A(488682)},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>e.A(943536)},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>e.A(290837)},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>e.A(913264)},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>e.A(142407)},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>e.A(985937)},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>e.A(337123)}].map(e=>[e.id,e.import]));var dD=e.i(284922);class dL extends Error{constructor(e){super(e),this.name="ShikiError"}}function dO(){return"undefined"!=typeof performance?performance.now():Date.now()}let dP=(e,t)=>e+(t-e%t)%t;async function dM(e){let t,r,n={};function a(e){r=e,n.HEAPU8=new Uint8Array(e),n.HEAPU32=new Uint32Array(e)}let i="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function o(e,t){return e?function(e,t,r=1024){let n=t+r,a=t;for(;e[a]&&!(a>=n);)++a;if(a-t>16&&e.buffer&&i)return i.decode(e.subarray(t,a));let o="";for(;t<a;){let r=e[t++];if(!(128&r)){o+=String.fromCharCode(r);continue}let n=63&e[t++];if((224&r)==192){o+=String.fromCharCode((31&r)<<6|n);continue}let a=63&e[t++];if((r=(240&r)==224?(15&r)<<12|n<<6|a:(7&r)<<18|n<<12|a<<6|63&e[t++])<65536)o+=String.fromCharCode(r);else{let e=r-65536;o+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return o}(n.HEAPU8,e,t):""}let s={emscripten_get_now:dO,emscripten_memcpy_big:function(e,t,r){n.HEAPU8.copyWithin(e,t,t+r)},emscripten_resize_heap:function(e){let i=n.HEAPU8.length;if((e>>>=0)>0x80000000)return!1;for(let n=1;n<=4;n*=2){let o=i*(1+.2/n);if(o=Math.min(o,e+0x6000000),function(e){try{return t.grow(e-r.byteLength+65535>>>16),a(t.buffer),1}catch{}}(Math.min(0x80000000,dP(Math.max(e,o),65536))))return!0}return!1},fd_write:()=>0};async function l(){let r=await e({env:s,wasi_snapshot_preview1:s});a((t=r.memory).buffer),Object.assign(n,r),n.UTF8ToString=o}return await l(),n}var dF=Object.defineProperty,dB=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?dF(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r};let dj=null;class dU{constructor(e){dB(this,"utf16Length"),dB(this,"utf8Length"),dB(this,"utf16Value"),dB(this,"utf8Value"),dB(this,"utf16OffsetToUtf8"),dB(this,"utf8OffsetToUtf16");const t=e.length,r=dU._utf8ByteLength(e),n=r!==t,a=n?new Uint32Array(t+1):null;n&&(a[t]=r);const i=n?new Uint32Array(r+1):null;n&&(i[r]=t);const o=new Uint8Array(r);let s=0;for(let r=0;r<t;r++){const l=e.charCodeAt(r);let c=l,u=!1;if(l>=55296&&l<=56319&&r+1<t){const t=e.charCodeAt(r+1);t>=56320&&t<=57343&&(c=(l-55296<<10)+65536|t-56320,u=!0)}n&&(a[r]=s,u&&(a[r+1]=s),c<=127?i[s+0]=r:c<=2047?(i[s+0]=r,i[s+1]=r):c<=65535?(i[s+0]=r,i[s+1]=r,i[s+2]=r):(i[s+0]=r,i[s+1]=r,i[s+2]=r,i[s+3]=r)),c<=127?o[s++]=c:(c<=2047?o[s++]=192|(1984&c)>>>6:(c<=65535?o[s++]=224|(61440&c)>>>12:(o[s++]=240|(1835008&c)>>>18,o[s++]=128|(258048&c)>>>12),o[s++]=128|(4032&c)>>>6),o[s++]=128|(63&c)>>>0),u&&r++}this.utf16Length=t,this.utf8Length=r,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=i}static _utf8ByteLength(e){let t=0;for(let r=0,n=e.length;r<n;r++){let a=e.charCodeAt(r),i=a,o=!1;if(a>=55296&&a<=56319&&r+1<n){let t=e.charCodeAt(r+1);t>=56320&&t<=57343&&(i=(a-55296<<10)+65536|t-56320,o=!0)}i<=127?t+=1:i<=2047?t+=2:i<=65535?t+=3:t+=4,o&&r++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let dH=class e{constructor(t){if(dB(this,"id",++e.LAST_ID),dB(this,"_onigBinding"),dB(this,"content"),dB(this,"utf16Length"),dB(this,"utf8Length"),dB(this,"utf16OffsetToUtf8"),dB(this,"utf8OffsetToUtf16"),dB(this,"ptr"),!dj)throw new dL("Must invoke loadWasm first.");this._onigBinding=dj,this.content=t;const r=new dU(t);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=dj.omalloc(1e4)),e._sharedPtrInUse=!0,dj.HEAPU8.set(r.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=r.createString(dj)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};dB(dH,"LAST_ID",0),dB(dH,"_sharedPtr",0),dB(dH,"_sharedPtrInUse",!1);class dG{constructor(e){if(dB(this,"_onigBinding"),dB(this,"_ptr"),!dj)throw new dL("Must invoke loadWasm first.");const t=[],r=[];for(let n=0,a=e.length;n<a;n++){const a=new dU(e[n]);t[n]=a.createString(dj),r[n]=a.utf8Length}const n=dj.omalloc(4*e.length);dj.HEAPU32.set(t,n/4);const a=dj.omalloc(4*e.length);dj.HEAPU32.set(r,a/4);const i=dj.createOnigScanner(n,a,e.length);for(let r=0,n=e.length;r<n;r++)dj.ofree(t[r]);dj.ofree(a),dj.ofree(n),0===i&&function(e){throw new dL(e.UTF8ToString(e.getLastOnigError()))}(dj),this._onigBinding=dj,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,r){let n=0;if("number"==typeof r&&(n=r),"string"==typeof e){e=new dH(e);let r=this._findNextMatchSync(e,t,!1,n);return e.dispose(),r}return this._findNextMatchSync(e,t,!1,n)}_findNextMatchSync(e,t,r,n){let a=this._onigBinding,i=a.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),n);if(0===i)return null;let o=a.HEAPU32,s=i/4,l=o[s++],c=o[s++],u=[];for(let t=0;t<c;t++){let r=e.convertUtf8OffsetToUtf16(o[s++]),n=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:r,end:n,length:n-r}}return{index:l,captureIndices:u}}}function d$(e){return t=>WebAssembly.instantiate(e,t)}async function dz(e){return e&&await (r||(r=async function(){dj=await dM(async t=>{let r=e;if("function"==typeof(r=await r)&&(r=await r(t)),"function"==typeof r&&(r=await r(t)),"function"==typeof r.instantiator)r=await r.instantiator(t);else if("function"==typeof r.default)r=await r.default(t);else{var n,a,i,o;if(void 0!==r.data&&(r=r.data),n=r,"undefined"!=typeof Response&&n instanceof Response){r="function"==typeof WebAssembly.instantiateStreaming?await (i=r,e=>WebAssembly.instantiateStreaming(i,e))(t):await (o=r,async e=>{let t=await o.arrayBuffer();return WebAssembly.instantiate(t,e)})(t)}else(a=r,"undefined"!=typeof ArrayBuffer&&(a instanceof ArrayBuffer||ArrayBuffer.isView(a))||void 0!==dD.Buffer&&dD.Buffer.isBuffer?.(a)||"undefined"!=typeof SharedArrayBuffer&&a instanceof SharedArrayBuffer||"undefined"!=typeof Uint32Array&&a instanceof Uint32Array||r instanceof WebAssembly.Module)?r=await d$(r)(t):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await d$(r.default)(t))}return"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}())),{createScanner:e=>new dG(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new dH(e)}}let dW=(a=(k={langs:cp,themes:dR,engine:()=>dz(e.A(919193))}).langs,i=k.themes,o=k.engine,async function(e){function t(t){if("string"==typeof t){if(u3(t))return[];let r=a[t=e.langAlias?.[t]||t];if(!r)throw new ch(`Language \`${t}\` is not included in this bundle. You may want to load it from external source.`);return r}return t}function r(e){if(u4(e))return"none";if("string"==typeof e){let t=i[e];if(!t)throw new ch(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let n=(e.themes??[]).map(e=>r(e)),s=(e.langs??[]).map(e=>t(e)),l=await dI({engine:e.engine??o(),...e,themes:n,langs:s});return{...l,loadLanguage:(...e)=>l.loadLanguage(...e.map(t)),loadTheme:(...e)=>l.loadTheme(...e.map(r)),getBundledLanguages:()=>a,getBundledThemes:()=>i}});function dq(e){if(1!=[...e].length)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}let dV=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),dY=String.raw;function dQ(e,t){if(null==e)throw Error(t??"Value expected");return e}let dK=dY`\[\^?`,dX=`c.? | C(?:-.?)?|${dY`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${dY`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${dY`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${dY`o\{[^\}]*\}?`}|${dY`\d{1,3}`}`,dJ=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,dZ=RegExp(dY`
|
|
4
|
+
\\ (?:
|
|
5
|
+
${dX}
|
|
6
|
+
| [gk]<[^>]*>?
|
|
7
|
+
| [gk]'[^']*'?
|
|
8
|
+
| .
|
|
9
|
+
)
|
|
10
|
+
| \( (?:
|
|
11
|
+
\? (?:
|
|
12
|
+
[:=!>({]
|
|
13
|
+
| <[=!]
|
|
14
|
+
| <[^>]*>
|
|
15
|
+
| '[^']*'
|
|
16
|
+
| ~\|?
|
|
17
|
+
| #(?:[^)\\]|\\.?)*
|
|
18
|
+
| [^:)]*[:)]
|
|
19
|
+
)?
|
|
20
|
+
| \*[^\)]*\)?
|
|
21
|
+
)?
|
|
22
|
+
| (?:${dJ.source})+
|
|
23
|
+
| ${dK}
|
|
24
|
+
| .
|
|
25
|
+
`.replace(/\s+/g,""),"gsu"),d0=RegExp(dY`
|
|
26
|
+
\\ (?:
|
|
27
|
+
${dX}
|
|
28
|
+
| .
|
|
29
|
+
)
|
|
30
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
31
|
+
| ${dK}
|
|
32
|
+
| &&
|
|
33
|
+
| .
|
|
34
|
+
`.replace(/\s+/g,""),"gsu");function d1(e,{inCharClass:t}){let r=e[1];if("c"===r||"C"===r){var n,a=e;let t="c"===a[1]?a[2]:a[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${a}"`);return d3(dq(t.toUpperCase())-64,a)}if("dDhHsSwW".includes(r)){let t;return d6({d:"digit",h:"hex",s:"space",w:"word"}[t=(n=e)[1].toLowerCase()],n,{negate:n[1]!==t})}if(e.startsWith(dY`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(3===e.length)throw Error(`Incomplete or invalid Unicode property "${e}"`);return function(e){let{p:t,neg:r,value:n}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return d6("property",e,{value:n,negate:"P"===t&&!r||"p"===t&&!!r})}(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),r=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),n=new TextEncoder;return[...r].map(e=>{let t=[...n.encode(e)].map(e=>`\\x${e.toString(16)}`).join("");return d3(dq(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if("u"===r||"x"===r)return d3(function(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);return parseInt("{"===e[2]?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2),16)}(e),e);if(pe.has(r))return d3(pe.get(r),e);if(/\d/.test(r))return{type:"EscapedNumber",inCharClass:t,raw:e};if("\\"===e)throw Error(dY`Incomplete escape "\"`);if("M"===r)throw Error(`Unsupported meta "${e}"`);if(2==[...e].length)return d3(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function d2(e,t){return{type:"Assertion",kind:e,raw:t}}function d5(e){return{type:"Backreference",raw:e}}function d3(e,t){return{type:"Character",value:e,raw:t}}function d4(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function d6(e,t,r={}){return{type:"CharacterSet",kind:e,...r,raw:t}}function d8(e,t,r={}){return"keep"===e?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:dQ(r.flags),raw:t}}function d9(e,t,r={}){return{type:"GroupOpen",kind:e,...r,raw:t}}let d7=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),pe=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function pt(e){let t=null,r,n;if("{"===e[0]){let{minStr:a,maxStr:i}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups;if(+a>1e5||i&&+i>1e5)throw Error("Quantifier value unsupported in Oniguruma");if((r=+a)>(n=void 0===i?+a:""===i?1/0:+i)&&(t="possessive",[r,n]=[n,r]),e.endsWith("?")){if("possessive"===t)throw Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else r=+("+"===e[0]),n="?"===e[0]?1:1/0,t="+"===e[1]?"possessive":"?"===e[1]?"lazy":"greedy";return{type:"Quantifier",kind:t,min:r,max:n,raw:e}}function pr(e){let t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function pn(e,t){if(!Array.isArray(e.body))throw Error("Expected node with body array");if(1!==e.body.length)return!1;let r=e.body[0];return!t||Object.keys(t).every(e=>t[e]===r[e])}let pa=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function pi(e,t={}){var r;let n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},a=function(e,t={}){let r={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if("string"!=typeof e)throw Error("String expected as pattern");let n=function(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<e.length;r++){let n=e[r];if(!"imxDPSWy".includes(n))throw Error(`Invalid flag "${n}"`);if("y"===n){if(!/^y{[gw]}/.test(e.slice(r)))throw Error('Invalid or unspecified flag "y" mode');t.textSegmentMode="g"===e[r+2]?"grapheme":"word",r+=3;continue}t[({i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"})[n]]=!0}return t}(r.flags),a=[n.extended],i={captureGroup:r.rules.captureGroup,getCurrentModX:()=>a.at(-1),numOpenGroups:0,popModX(){a.pop()},pushModX(e){a.push(e)},replaceCurrentModX(e){a[a.length-1]=e},singleline:r.rules.singleline},o=[],s;for(dZ.lastIndex=0;s=dZ.exec(e);){let t=function(e,t,r,n){let[a,i]=r;if("["===r||"[^"===r){let e=function(e,t,r){let n=[d4("^"===t[1],t)],a=1,i;for(d0.lastIndex=r;i=d0.exec(e);){let e=i[0];if("["===e[0]&&":"!==e[1])a++,n.push(d4("^"===e[1],e));else if("]"===e){if("CharacterClassOpen"===n.at(-1).type)n.push(d3(93,e));else if(a--,n.push({type:"CharacterClassClose",raw:e}),!a)break}else{let t=function(e){if("\\"===e[0])return d1(e,{inCharClass:!0});if("["===e[0]){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!dV.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return d6("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return"-"===e?{type:"CharacterClassHyphen",raw:e}:"&&"===e?{type:"CharacterClassIntersector",raw:e}:d3(dq(e),e)}(e);Array.isArray(t)?n.push(...t):n.push(t)}}return{tokens:n,lastIndex:d0.lastIndex||e.length}}(t,r,n);return{tokens:e.tokens,lastIndex:e.lastIndex}}if("\\"===a){if("AbBGyYzZ".includes(i))return{token:d2(r,r)};if(/^\\g[<']/.test(r)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(r))throw Error(`Invalid group name "${r}"`);return{token:{type:"Subroutine",raw:r}}}if(/^\\k[<']/.test(r)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(r))throw Error(`Invalid group name "${r}"`);return{token:d5(r)}}if("K"===i)return{token:d8("keep",r)};if("N"===i||"R"===i)return{token:d6("newline",r,{negate:"N"===i})};if("O"===i)return{token:d6("any",r)};if("X"===i)return{token:d6("text_segment",r)};let e=d1(r,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if("("===a){if("*"===i)return{token:function(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:r,tag:n,args:a}=t.groups;if(!r)throw Error(`Invalid named callout "${e}"`);if(""===n)throw Error(`Named callout tag with empty value not allowed "${e}"`);let i=a?a.split(",").filter(e=>""!==e).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,l]=i,c=d7.has(r)?r.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(i.length>0)throw Error(`Named callout arguments not allowed "${i}"`);break;case"error":if(i.length>1)throw Error(`Named callout allows only one argument "${i}"`);if("string"==typeof o)throw Error(`Named callout argument must be a number "${o}"`);break;case"max":if(!i.length||i.length>2)throw Error(`Named callout must have one or two arguments "${i}"`);if("string"==typeof o&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(2===i.length&&("number"==typeof s||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case"count":case"total_count":if(i.length>1)throw Error(`Named callout allows only one argument "${i}"`);if(1===i.length&&("number"==typeof o||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case"cmp":if(3!==i.length)throw Error(`Named callout must have three arguments "${i}"`);if("string"==typeof o&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if("number"==typeof s||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if("string"==typeof l&&!/^[A-Za-z_]\w*$/.test(l))throw Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw Error(`Undefined callout name "${r}"`);default:throw Error(`Unexpected named callout kind "${c}"`)}return{type:"NamedCallout",kind:c,tag:n??null,arguments:a?.split(",")??null,raw:e}}(r)};if("(?{"===r)throw Error(`Unsupported callout "${r}"`);if(r.startsWith("(?#")){if(")"!==t[n])throw Error('Unclosed comment group "(?#"');return{lastIndex:n+1}}if(/^\(\?[-imx]+[:)]$/.test(r))return{token:function(e,t){let{on:r,off:n}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;n??="";let a=(t.getCurrentModX()||r.includes("x"))&&!n.includes("x"),i=pr(r),o=pr(n),s={};if(i&&(s.enable=i),o&&(s.disable=o),e.endsWith(")"))return t.replaceCurrentModX(a),d8("flags",e,{flags:s});if(e.endsWith(":"))return t.pushModX(a),t.numOpenGroups++,d9("group",e,{...(i||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}(r,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,"("===r&&!e.captureGroup||"(?:"===r)return{token:d9("group",r)};if("(?>"===r)return{token:d9("atomic",r)};if("(?="===r||"(?!"===r||"(?<="===r||"(?<!"===r)return{token:d9("<"===r[2]?"lookbehind":"lookahead",r,{negate:r.endsWith("!")})};if("("===r&&e.captureGroup||r.startsWith("(?<")&&r.endsWith(">")||r.startsWith("(?'")&&r.endsWith("'"))return{token:d9("capturing",r,{..."("!==r&&{name:r.slice(3,-1)}})};if(r.startsWith("(?~")){if("(?~|"===r)throw Error(`Unsupported absence function kind "${r}"`);return{token:d9("absence_repeater",r)}}throw"(?("===r?Error(`Unsupported conditional "${r}"`):Error(`Invalid or unsupported group option "${r}"`)}if(")"===r){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error('Unmatched ")"');return{token:{type:"GroupClose",raw:r}}}if(e.getCurrentModX()){if("#"===r){let e=t.indexOf(`
|
|
35
|
+
`,n);return{lastIndex:-1===e?t.length:e}}if(/^\s$/.test(r)){let e=/\s+/y;return e.lastIndex=n,{lastIndex:e.exec(t)?e.lastIndex:n}}}return"."===r?{token:d6("dot",r)}:"^"===r||"$"===r?{token:d2(e.singleline?({"^":dY`\A`,$:dY`\Z`})[r]:r,r)}:"|"===r?{token:{type:"Alternator",raw:r}}:dJ.test(r)?{tokens:function(e){let t,r=[],n=RegExp(dJ,"gy");for(;t=n.exec(e);){let e=t[0];if("{"===e[0]){let t=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(t){let{min:a,max:i}=t.groups;if(+a>+i&&e.endsWith("?")){n.lastIndex--,r.push(pt(e.slice(0,-1)));continue}}}r.push(pt(e))}return r}(r)}:{token:d3(dq(r),r)}}(i,e,s[0],dZ.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),void 0!==t.lastIndex&&(dZ.lastIndex=t.lastIndex)}let l=[],c=0;o.filter(e=>"GroupOpen"===e.type).forEach(e=>{"capturing"===e.kind?e.number=++c:"("===e.raw&&l.push(e)}),c||l.forEach((e,t)=>{e.kind="capturing",e.number=t+1});let u=c||l.length;return{tokens:o.map(e=>"EscapedNumber"===e.type?function(e,t){let{raw:r,inCharClass:n}=e,a=r.slice(1);if(!n&&("0"!==a&&1===a.length||"0"!==a[0]&&+a<=t))return[d5(r)];let i=[],o=a.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t,n=o[e];if(0===e&&"8"!==n&&"9"!==n){if((t=parseInt(n,8))>127)throw Error(dY`Octal encoded byte above 177 unsupported "${r}"`)}else t=dq(n);i.push(d3(t,(0===e?"\\":"")+n))}return i}(e,u):e).flat(),flags:n}}(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let r=a.tokens[o.nextIndex];switch(o.parent=e,o.nextIndex++,r.type){case"Alternator":return po();case"Assertion":return function({kind:e}){return ps(dQ({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===dY`\B`||e===dY`\Y`})}(r);case"Backreference":return function({raw:e},t){let r=/^\\k[<']/.test(e),n=r?e.slice(3,-1):e.slice(1),a=(r,n=!1)=>{let a=t.capturingGroups.length,i=!1;if(r>a)if(t.skipBackrefValidation)i=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,pl(n?a+1-r:r,{orphan:i})};if(r){let r=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(n);if(r)return a(+r.groups.num,!!r.groups.sign);if(/[-+]/.test(n))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(n))throw Error(`Group name not defined to the left "${e}"`);return pl(n)}return a(+n)}(r,o);case"Character":return pu(r.value,{useLastValid:!!t.isCheckingRangeEnd});case"CharacterClassHyphen":return function(e,t,r){let{tokens:n,walk:a}=t,i=t.parent,o=i.body.at(-1),s=n[t.nextIndex];if(!r.isCheckingRangeEnd&&o&&"CharacterClass"!==o.type&&"CharacterClassRange"!==o.type&&s&&"CharacterClassOpen"!==s.type&&"CharacterClassClose"!==s.type&&"CharacterClassIntersector"!==s.type){let e=a(i,{...r,isCheckingRangeEnd:!0});if("Character"===o.type&&"Character"===e.type)return i.body.pop(),function(e,t){if(t.value<e.value)throw Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}(o,e);throw Error("Invalid character class range")}return pu(dq("-"))}(0,o,t);case"CharacterClassOpen":return function({negate:e},t,r){let{tokens:n,walk:a}=t,i=n[t.nextIndex],o=[pd()],s=pA(i);for(;"CharacterClassClose"!==s.type;){if("CharacterClassIntersector"===s.type)o.push(pd()),t.nextIndex++;else{let e=o.at(-1);e.body.push(a(e,r))}s=pA(n[t.nextIndex],i)}let l=pd({negate:e});return 1===o.length?l.body=o[0].body:(l.kind="intersection",l.body=o.map(e=>1===e.body.length?e.body[0]:e)),t.nextIndex++,l}(r,o,t);case"CharacterSet":return function({kind:e,negate:t,value:r},n){let{normalizeUnknownPropertyNames:a,skipPropertyNameValidation:i,unicodePropertyMap:o}=n;if("property"===e){let n=p_(r);if(!dV.has(n)||o?.has(n))return py(r,{negate:t,normalizeUnknownPropertyNames:a,skipPropertyNameValidation:i,unicodePropertyMap:o});e="posix",r=n}return"posix"===e?function(e,t){let r=!!t?.negate;if(!dV.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:r}}(r,{negate:t}):pp(e,{negate:t})}(r,o);case"Directive":return function(e,t={}){if("keep"===e)return{type:"Directive",kind:e};if("flags"===e)return{type:"Directive",kind:e,flags:dQ(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}(r.kind,{flags:r.flags});case"GroupOpen":return function(e,t,r){var n,a;let{tokens:i,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:l,walk:c}=t,u=function({flags:e,kind:t,name:r,negate:n,number:a}){switch(t){case"absence_repeater":var i="repeater";!1;return{type:"AbsenceFunction",kind:i,body:pE(void 0)};case"atomic":return ph({atomic:!0});case"capturing":return pc(a,{name:r});case"group":return ph({flags:e});case"lookahead":case"lookbehind":return pf({behind:"lookbehind"===t,negate:n});default:throw Error(`Unexpected group kind "${t}"`)}}(e),d="AbsenceFunction"===u.type,p=pT(u),h=p&&u.negate;if("CapturingGroup"===u.type&&(o.push(u),u.name&&(n=u.name,a=[],s.has(n)||s.set(n,a),s.get(n)).push(u)),d&&r.isInAbsenceFunction)throw Error("Nested absence function not supported by Oniguruma");let f=pk(i[t.nextIndex]);for(;"GroupClose"!==f.type;){if("Alternator"===f.type)u.body.push(po()),t.nextIndex++;else{let e=u.body.at(-1),t=c(e,{...r,isInAbsenceFunction:r.isInAbsenceFunction||d,isInLookbehind:r.isInLookbehind||p,isInNegLookbehind:r.isInNegLookbehind||h});if(e.body.push(t),(p||r.isInLookbehind)&&!l){let e="Lookbehind includes a pattern not allowed by Oniguruma";if(h||r.isInNegLookbehind){if(pv(t)||"CapturingGroup"===t.type)throw Error(e)}else if(pv(t)||pT(t)&&t.negate)throw Error(e)}}f=pk(i[t.nextIndex])}return t.nextIndex++,u}(r,o,t);case"NamedCallout":var n,i;return n=r.kind,i=r.tag,{type:"NamedCallout",kind:n,tag:i,arguments:r.arguments};case"Quantifier":return function({kind:e,min:t,max:r},n){let a=n.parent,i=a.body.at(-1);if(!i||!pa.has(i.type))throw Error("Quantifier requires a repeatable token");let o=pm(e,t,r,i);return a.body.pop(),o}(r,o);case"Subroutine":return function({raw:e},t){let{capturingGroups:r,subroutines:n}=t,a=e.slice(3,-1),i=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(a);if(i){let e=+i.groups.num,n=r.length;if(t.hasNumberedRef=!0,(a=({"":e,"+":n+e,"-":n+1-e})[i.groups.sign])<1)throw Error("Invalid subroutine number")}else"0"===a&&(a=0);let o=pg(a);return n.push(o),o}(r,o);default:throw Error(`Unexpected token type "${r.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:a.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},s=(r={type:"Flags",...a.flags},{type:"Regex",body:pE(void 0),flags:r}),l=s.body[0];for(;o.nextIndex<a.tokens.length;){let e=i(l,{});"Alternative"===e.type?(s.body.push(e),l=e):l.body.push(e)}let{capturingGroups:c,hasNumberedRef:u,namedGroupsByName:d,subroutines:p}=o;if(u&&d.size&&!n.rules.captureGroup)throw Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:e}of p)if("number"==typeof e){if(e>c.length)throw Error("Subroutine uses a group number that's not defined");e&&(c[e-1].isSubroutined=!0)}else if(d.has(e)){if(d.get(e).length>1)throw Error(dY`Subroutine uses a duplicate group name "\g<${e}>"`);d.get(e)[0].isSubroutined=!0}else throw Error(dY`Subroutine uses a group name that's not defined "\g<${e}>"`);return s}function po(e){return{type:"Alternative",body:pb(e?.body)}}function ps(e,t){let r={type:"Assertion",kind:e};return("word_boundary"===e||"text_segment_boundary"===e)&&(r.negate=!!t?.negate),r}function pl(e,t){let r=!!t?.orphan;return{type:"Backreference",ref:e,...r&&{orphan:r}}}function pc(e,t){var r;let n={name:void 0,isSubroutined:!1,...t};if(void 0!==n.name&&(r=n.name,!/^[\p{Alpha}\p{Pc}][^)]*$/u.test(r)))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:pE(t?.body)}}function pu(e,t){let r={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(r.useLastValid)e=1114111;else throw e>1310719?Error(`Invalid code point out of range "\\x{${t}}"`):Error(`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:"Character",value:e}}function pd(e){let t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:pb(e?.body)}}function pp(e,t){let r=!!t?.negate,n={type:"CharacterSet",kind:e};return("digit"===e||"hex"===e||"newline"===e||"space"===e||"word"===e)&&(n.negate=r),"text_segment"!==e&&("newline"!==e||r)||(n.variableLength=!0),n}function ph(e){let t=e?.atomic,r=e?.flags;if(t&&r)throw Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...r&&{flags:r},body:pE(e?.body)}}function pf(e){let t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:pE(e?.body)}}function pm(e,t,r,n){if(t>r)throw Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:r,body:n}}function pg(e){return{type:"Subroutine",ref:e}}function py(e,t){let r={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},n=r.unicodePropertyMap?.get(p_(e));if(!n){if(r.normalizeUnknownPropertyNames)n=e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase());else if(r.unicodePropertyMap&&!r.skipPropertyNameValidation)throw Error(dY`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:n??e,negate:r.negate}}function pE(e){if(void 0===e)e=[po()];else if(!Array.isArray(e)||!e.length||!e.every(e=>"Alternative"===e.type))throw Error("Invalid body; expected array of one or more Alternative nodes");return e}function pb(e){if(void 0===e)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error("Invalid body; expected array of nodes");return e}function pv(e){return"LookaroundAssertion"===e.type&&"lookahead"===e.kind}function pT(e){return"LookaroundAssertion"===e.type&&"lookbehind"===e.kind}function p_(e){return e.replace(/[- _]+/g,"").toLowerCase()}function pA(e,t){return dQ(e,`${t?.type==="Character"&&93===t.value?"Empty":"Unclosed"} character class`)}function pk(e){return dQ(e,"Unclosed group")}function pw(e,t,r=null){function n(e,t){for(let r=0;r<e.length;r++){let n=a(e[r],t,r,e);r=Math.max(-1,r+n)}}function a(i,o=null,s=null,l=null){let c=0,u=!1,d={node:i,parent:o,key:s,container:l,root:e,remove(){px(l).splice(Math.max(0,pS(s)+c),1),c--,u=!0},removeAllNextSiblings:()=>px(l).splice(pS(s)+1),removeAllPrevSiblings(){let e=pS(s)+c;return c-=e,px(l).splice(0,Math.max(0,e))},replaceWith(e,t={}){let r=!!t.traverse;l?l[Math.max(0,pS(s)+c)]=e:dQ(o,"Can't replace root node")[s]=e,r&&a(e,o,s,l),u=!0},replaceWithMultiple(e,t={}){let r=!!t.traverse;if(px(l).splice(Math.max(0,pS(s)+c),1,...e),c+=e.length-1,r){let t=0;for(let r=0;r<e.length;r++)t+=a(e[r],o,pS(s)+r+t,l)}u=!0},skip(){u=!0}},{type:p}=i,h=t["*"],f=t[p],m="function"==typeof h?h:h?.enter,g="function"==typeof f?f:f?.enter;if(m?.(d,r),g?.(d,r),!u)switch(p){case"AbsenceFunction":case"CapturingGroup":case"Group":case"Alternative":case"CharacterClass":case"LookaroundAssertion":n(i.body,i);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":a(i.min,i,"min"),a(i.max,i,"max");break;case"Quantifier":a(i.body,i,"body");break;case"Regex":n(i.body,i),a(i.flags,i,"flags");break;default:throw Error(`Unexpected node type "${p}"`)}return f?.exit?.(d,r),h?.exit?.(d,r),c}return a(e),e}function px(e){if(!Array.isArray(e))throw Error("Container expected");return e}function pS(e){if("number"!=typeof e)throw Error("Numeric key expected");return e}let pC=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`,pN=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function pI(e,t,r,n){let a=RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),i=[!1],o=0,s="";for(let t of e.matchAll(a)){let{0:e,groups:{$skip:a}}=t;if(!a&&(!n||n===pN.DEFAULT==!o)){r instanceof Function?s+=r(t,{context:o?pN.CHAR_CLASS:pN.DEFAULT,negated:i[i.length-1]}):s+=r;continue}"["===e[0]?(o++,i.push("^"===e[1])):"]"===e&&o&&(o--,i.pop()),s+=e}return s}function pR(e,t,r){return!!function(e,t,r=0,n){let a;if(!RegExp(t,"su").test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=r;let o=0;for(;a=i.exec(e);){let{0:e,groups:{$skip:t}}=a;if(!t&&(!n||n===pN.DEFAULT==!o))return a;"["===e?o++:"]"===e&&o&&o--,i.lastIndex==a.index&&i.lastIndex++}return null}(e,t,0,r)}let pD=RegExp(String.raw`(?<noncapturingStart>${pC})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu"),pL=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,pO=RegExp(String.raw`
|
|
36
|
+
\\(?: \d+
|
|
37
|
+
| c[A-Za-z]
|
|
38
|
+
| [gk]<[^>]+>
|
|
39
|
+
| [pPu]\{[^\}]+\}
|
|
40
|
+
| u[A-Fa-f\d]{4}
|
|
41
|
+
| x[A-Fa-f\d]{2}
|
|
42
|
+
)
|
|
43
|
+
| \((?: \? (?: [:=!>]
|
|
44
|
+
| <(?:[=!]|[^>]+>)
|
|
45
|
+
| [A-Za-z\-]+:
|
|
46
|
+
| \(DEFINE\)
|
|
47
|
+
))?
|
|
48
|
+
| (?<qBase>${pL})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
49
|
+
| \\?.
|
|
50
|
+
`.replace(/\s+/g,""),"gsu"),pP=String.raw,pM=pP`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,pF=pP`\(\?R=(?<rDepth>[^\)]+)\)|${pM}`,pB=pP`\(\?<(?![=!])(?<captureName>[^>]+)>`,pj=pP`${pB}|(?<unnamed>\()(?!\?)`,pU=RegExp(pP`${pB}|${pF}|\(\?|\\?.`,"gsu"),pH="Cannot use multiple overlapping recursions";function pG(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e*=1)<2||e>100)throw Error(t)}function p$(e,t,r,n,a,i,o){let s=new Set;n&&pI(e+t,pB,({groups:{captureName:e}})=>{s.add(e)},pN.DEFAULT);let l=[r,n?s:null,a,i,o];return`${e}${pz(`(?:${e}`,"forward",...l)}(?:)${pz(`${t})`,"backward",...l)}${t}`}function pz(e,t,r,n,a,i,o){let s=e=>"forward"===t?e+2:r-e+2-1,l="";for(let t=0;t<r;t++){let r=s(t);l+=pI(e,pP`${pj}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:l}})=>{if(l&&n&&!n.has(l))return e;let c=`_$${r}`;if(s||t){let r=o+i.length+1;return i.push(r),function(e,t){for(let r=0;r<e.length;r++)e[r]>=t&&e[r]++}(a,r),s?e:`(?<${t}${c}>`}return pP`\k<${l}${c}>`},pN.DEFAULT)}return l}function pW(e,t,r,n,a,i){if(e.size&&n){let o=0;pI(t,pj,()=>o++,pN.DEFAULT);let s=i-o+a,l=new Map;return e.forEach((e,t)=>{let a=(n-o*r)/r,i=o*r,c=t>s+o?t+n:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+a)u.push(t+n);else if(t<=s+o)for(let e=0;e<=r;e++)u.push(t+o*e);else for(let e=0;e<=r;e++)u.push(t+i+a*e);l.set(c,u)}),l}return e}var pq=String.fromCodePoint,pV=String.raw,pY={flagGroups:(()=>{try{RegExp("(?i:)")}catch{return!1}return!0})(),unicodeSets:(()=>{try{RegExp("","v")}catch{return!1}return!0})()};function pQ(e,{enable:t,disable:r}){return{dotAll:!r?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!r?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function pK(e,t,r){return e.has(t)||e.set(t,r),e.get(t)}pY.bugFlagVLiteralHyphenIsRange=!!pY.unicodeSets&&(()=>{try{RegExp(pV`[\d\-a]`,"v")}catch{return!0}return!1})(),pY.bugNestedClassIgnoresNegation=pY.unicodeSets&&RegExp("[[^a]]","v").test("a");var pX={ES2025:2025,ES2024:2024,ES2018:2018},pJ={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function pZ(e={}){if("[object Object]"!==({}).toString.call(e))throw Error("Unexpected options");if(void 0!==e.target&&!pJ[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return"auto"===t.target&&(t.target=pY.flagGroups?"ES2025":pY.unicodeSets?"ES2024":"ES2018"),t}var p0=new Set([pq(304),pq(305)]),p1=pV`[\p{L}\p{M}\p{N}\p{Pc}]`;function p2(e){if(p0.has(e))return[e];let t=new Set,r=e.toLowerCase(),n=r.toUpperCase(),a=p6.get(r),i=p3.get(r),o=p4.get(r);return 1==[...n].length&&t.add(n),o&&t.add(o),a&&t.add(a),t.add(r),i&&t.add(i),[...t]}var p5=new Map(`C Other
|
|
51
|
+
Cc Control cntrl
|
|
52
|
+
Cf Format
|
|
53
|
+
Cn Unassigned
|
|
54
|
+
Co Private_Use
|
|
55
|
+
Cs Surrogate
|
|
56
|
+
L Letter
|
|
57
|
+
LC Cased_Letter
|
|
58
|
+
Ll Lowercase_Letter
|
|
59
|
+
Lm Modifier_Letter
|
|
60
|
+
Lo Other_Letter
|
|
61
|
+
Lt Titlecase_Letter
|
|
62
|
+
Lu Uppercase_Letter
|
|
63
|
+
M Mark Combining_Mark
|
|
64
|
+
Mc Spacing_Mark
|
|
65
|
+
Me Enclosing_Mark
|
|
66
|
+
Mn Nonspacing_Mark
|
|
67
|
+
N Number
|
|
68
|
+
Nd Decimal_Number digit
|
|
69
|
+
Nl Letter_Number
|
|
70
|
+
No Other_Number
|
|
71
|
+
P Punctuation punct
|
|
72
|
+
Pc Connector_Punctuation
|
|
73
|
+
Pd Dash_Punctuation
|
|
74
|
+
Pe Close_Punctuation
|
|
75
|
+
Pf Final_Punctuation
|
|
76
|
+
Pi Initial_Punctuation
|
|
77
|
+
Po Other_Punctuation
|
|
78
|
+
Ps Open_Punctuation
|
|
79
|
+
S Symbol
|
|
80
|
+
Sc Currency_Symbol
|
|
81
|
+
Sk Modifier_Symbol
|
|
82
|
+
Sm Math_Symbol
|
|
83
|
+
So Other_Symbol
|
|
84
|
+
Z Separator
|
|
85
|
+
Zl Line_Separator
|
|
86
|
+
Zp Paragraph_Separator
|
|
87
|
+
Zs Space_Separator
|
|
88
|
+
ASCII
|
|
89
|
+
ASCII_Hex_Digit AHex
|
|
90
|
+
Alphabetic Alpha
|
|
91
|
+
Any
|
|
92
|
+
Assigned
|
|
93
|
+
Bidi_Control Bidi_C
|
|
94
|
+
Bidi_Mirrored Bidi_M
|
|
95
|
+
Case_Ignorable CI
|
|
96
|
+
Cased
|
|
97
|
+
Changes_When_Casefolded CWCF
|
|
98
|
+
Changes_When_Casemapped CWCM
|
|
99
|
+
Changes_When_Lowercased CWL
|
|
100
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
101
|
+
Changes_When_Titlecased CWT
|
|
102
|
+
Changes_When_Uppercased CWU
|
|
103
|
+
Dash
|
|
104
|
+
Default_Ignorable_Code_Point DI
|
|
105
|
+
Deprecated Dep
|
|
106
|
+
Diacritic Dia
|
|
107
|
+
Emoji
|
|
108
|
+
Emoji_Component EComp
|
|
109
|
+
Emoji_Modifier EMod
|
|
110
|
+
Emoji_Modifier_Base EBase
|
|
111
|
+
Emoji_Presentation EPres
|
|
112
|
+
Extended_Pictographic ExtPict
|
|
113
|
+
Extender Ext
|
|
114
|
+
Grapheme_Base Gr_Base
|
|
115
|
+
Grapheme_Extend Gr_Ext
|
|
116
|
+
Hex_Digit Hex
|
|
117
|
+
IDS_Binary_Operator IDSB
|
|
118
|
+
IDS_Trinary_Operator IDST
|
|
119
|
+
ID_Continue IDC
|
|
120
|
+
ID_Start IDS
|
|
121
|
+
Ideographic Ideo
|
|
122
|
+
Join_Control Join_C
|
|
123
|
+
Logical_Order_Exception LOE
|
|
124
|
+
Lowercase Lower
|
|
125
|
+
Math
|
|
126
|
+
Noncharacter_Code_Point NChar
|
|
127
|
+
Pattern_Syntax Pat_Syn
|
|
128
|
+
Pattern_White_Space Pat_WS
|
|
129
|
+
Quotation_Mark QMark
|
|
130
|
+
Radical
|
|
131
|
+
Regional_Indicator RI
|
|
132
|
+
Sentence_Terminal STerm
|
|
133
|
+
Soft_Dotted SD
|
|
134
|
+
Terminal_Punctuation Term
|
|
135
|
+
Unified_Ideograph UIdeo
|
|
136
|
+
Uppercase Upper
|
|
137
|
+
Variation_Selector VS
|
|
138
|
+
White_Space space
|
|
139
|
+
XID_Continue XIDC
|
|
140
|
+
XID_Start XIDS`.split(/\s/).map(e=>[p_(e),e])),p3=new Map([["s",pq(383)],[pq(383),"s"]]),p4=new Map([[pq(223),pq(7838)],[pq(107),pq(8490)],[pq(229),pq(8491)],[pq(969),pq(8486)]]),p6=new Map([p9(453),p9(456),p9(459),p9(498),...p7(8072,8079),...p7(8088,8095),...p7(8104,8111),p9(8124),p9(8140),p9(8188)]),p8=new Map([["alnum",pV`[\p{Alpha}\p{Nd}]`],["alpha",pV`\p{Alpha}`],["ascii",pV`\p{ASCII}`],["blank",pV`[\p{Zs}\t]`],["cntrl",pV`\p{Cc}`],["digit",pV`\p{Nd}`],["graph",pV`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",pV`\p{Lower}`],["print",pV`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",pV`[\p{P}\p{S}]`],["space",pV`\p{space}`],["upper",pV`\p{Upper}`],["word",pV`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",pV`\p{AHex}`]]);function p9(e){let t=pq(e);return[t.toLowerCase(),t]}function p7(e,t){return(function(e,t){let r=[];for(let n=e;n<=t;n++)r.push(n);return r})(e,t).map(e=>p9(e))}var he=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]),ht={AbsenceFunction({node:e,parent:t,replaceWith:r}){let{body:n,kind:a}=e;if("repeater"===a){let e=ph();e.body[0].body.push(pf({negate:!0,body:n}),py("Any"));let a=ph();a.body[0].body.push(pm("greedy",0,1/0,e)),r(hh(a,t),{traverse:!0})}else throw Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:r},{flagDirectivesByAlt:n}){let a=e.body.filter(e=>"flags"===e.kind);for(let e=r+1;e<t.body.length;e++)pK(n,t.body[e],[]).push(...a)},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let r=hs(t.get(e));if(r){let t=ph({flags:r});t.body[0].body=e.body,e.body=[hh(t,e)]}}}},Assertion({node:e,parent:t,key:r,container:n,root:a,remove:i,replaceWith:o},s){let{kind:l,negate:c}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:p,wordIsAscii:h}=s;if("text_segment_boundary"===l)throw Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if("line_end"===l)o(hh(pf({body:[po({body:[ps("string_end")]}),po({body:[pu(10)]})]}),t));else if("line_start"===l)o(hh(hu(pV`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if("search_start"===l)if(p.has(e))a.flags.sticky=!0,i();else{var f;let e,a=n[r-1];if(a&&((e=["Character","CharacterClass","CharacterSet"]).includes((f=a).type)||"Quantifier"===f.type&&f.min&&e.includes(f.body.type)))o(hh(pf({negate:!0}),t));else if(d)throw Error(pV`Uses "\G" in a way that requires a subclass`);else o(hp(ps("string_start"),t)),s.strategy="clip_search"}else if("string_end"===l||"string_start"===l);else if("string_end_newline"===l)o(hh(hu(pV`(?=\n?\z)`),t));else if("word_boundary"===l){if(!h&&!u){let e=`(?:(?<=${p1})(?!${p1})|(?<!${p1})(?=${p1}))`,r=`(?:(?<=${p1})(?=${p1})|(?<!${p1})(?!${p1}))`;o(hh(hu(c?r:e),t))}}else throw Error(`Unexpected assertion kind "${l}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:r}=e;"string"!=typeof r||hc(r)||(e.ref=r=ho(r,t))},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:r}){let{name:n}=e;n&&!hc(n)&&(e.name=n=ho(n,t)),r.set(e.number,e),n&&r.set(n,e)},CharacterClassRange({node:e,parent:t,replaceWith:r}){"intersection"===t.kind&&r(hh(pd({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:r},{accuracy:n,minTargetEs2024:a,digitIsAscii:i,spaceIsAscii:o,wordIsAscii:s}){let{kind:l,negate:c,value:u}=e;if(i&&("digit"===l||"digit"===u))return void r(hp(pp("digit",{negate:c}),t));if(o&&("space"===l||"space"===u))return void r(hh(hd(hu("[ -\r ]"),c),t));if(s&&("word"===l||"word"===u))return void r(hp(pp("word",{negate:c}),t));if("any"===l)r(hp(py("Any"),t));else if("digit"===l)r(hp(py("Nd",{negate:c}),t));else if("dot"===l);else if("text_segment"===l){if("strict"===n)throw Error(pV`Use of "\X" requires non-strict accuracy`);let e="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",i=pV`\p{RI}{2}|${e}(?:\u200D${e})*`;r(hh(hu(pV`(?>\r\n|${a?pV`\p{RGI_Emoji}`:i}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if("hex"===l)r(hp(py("AHex",{negate:c}),t));else if("newline"===l)r(hh(hu(c?"[^\n]":"(?>\r\n?|[\n\v\f
\u2028\u2029])"),t));else if("posix"===l)if(a||"graph"!==u&&"print"!==u)r(hh(hd(hu(p8.get(u)),c),t));else{if("strict"===n)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:"!-~",print:" -~"}[u];c&&(e=`\0-${pq(e.codePointAt(0)-1)}${pq(e.codePointAt(2)+1)}-\u{10FFFF}`),r(hh(hu(`[${e}]`),t))}else if("property"===l)p5.has(p_(u))||(e.key="sc");else if("space"===l)r(hp(py("space",{negate:c}),t));else if("word"===l)r(hh(hd(hu(p1),c),t));else throw Error(`Unexpected character set kind "${l}"`)},Directive({node:e,parent:t,root:r,remove:n,replaceWith:a,removeAllPrevSiblings:i,removeAllNextSiblings:o}){let{kind:s,flags:l}=e;if("flags"===s)if(l.enable||l.disable){let e=ph({flags:l});e.body[0].body=o(),a(hh(e,t),{traverse:!0})}else n();else if("keep"===s){let e=r.body[0],n=1===r.body.length&&pn(e,{type:"Group"})&&1===e.body[0].body.length?e.body[0]:r;if(t.parent!==n||n.body.length>1)throw Error(pV`Uses "\K" in a way that's unsupported`);let o=pf({behind:!0});o.body[0].body=i(),a(hh(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error('Unsupported flag "P"');if("word"===e.textSegmentMode)throw Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:r}=e.flags;t?.extended&&delete t.extended,r?.extended&&delete r.extended,t?.dotAll&&r?.dotAll&&delete t.dotAll,t?.ignoreCase&&r?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,r&&!Object.keys(r).length&&delete e.flags.disable,e.flags.enable||e.flags.disable||delete e.flags},LookaroundAssertion({node:e},t){let{kind:r}=e;"lookbehind"===r&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:r}){let{kind:n}=e;if("fail"===n)r(hh(pf({negate:!0}),t));else throw Error(`Unsupported named callout "(*${n.toUpperCase()}"`)},Quantifier({node:e}){if("Quantifier"===e.body.type){let t=ph();t.body[0].body.push(e.body),e.body=hh(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let r=[],n=!1,a=!1;for(let t of e.body)if(1===t.body.length&&"search_start"===t.body[0].kind)t.body.pop();else{let e=function e(t){let r=t.find(e=>"search_start"===e.kind||function(e,t){let r={negate:null,...t};return"LookaroundAssertion"===e.type&&(null===r.negate||e.negate===r.negate)&&1===e.body.length&&pn(e.body[0],{type:"Assertion",kind:"search_start"})}(e,{negate:!1})||!function({type:e}){return"Assertion"===e||"Directive"===e||"LookaroundAssertion"===e}(e));if(!r)return null;if("search_start"===r.kind)return r;if("LookaroundAssertion"===r.type)return r.body[0].body[0];if("CapturingGroup"===r.type||"Group"===r.type){let t=[];for(let n of r.body){let r=e(n.body);if(!r)return null;Array.isArray(r)?t.push(...r):t.push(r)}return t}return null}(t.body);e?(n=!0,Array.isArray(e)?r.push(...e):r.push(e)):a=!0}n&&!a&&r.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:r,strategy:n}){if("strict"===t&&r&&n)throw Error(pV`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:r}=e;"string"!=typeof r||hc(r)||(e.ref=r=ho(r,t))}},hr={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:r}){let{orphan:n,ref:a}=e;n||r.set(e,[...t.get(a).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:r,skip:n},{groupOriginByCopy:a,groupsByName:i,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:l}){let c=a.get(e);if(c&&s.has(e.number)){let n=hp(hi(e.number),t);l.set(n,s.get(e.number)),r(n);return}s.set(e.number,e),o.set(e.number,[]),e.name&&pK(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let r=u[t];if(c===r.node||c&&c===r.origin||e===r.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:c}),e.name&&o.get(e.name).push({node:e,origin:c}),e.name){let t=pK(i,e.name,new Map),r=!1;if(c)r=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){r=!0;break}i.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:r})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=pQ(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:r},n){let{isRecursive:a,ref:i}=e;if(a){let r=t;for(;(r=r.parent)&&("CapturingGroup"!==r.type||r.name!==i&&r.number!==i););n.reffedNodesByReferencer.set(e,r);return}let o=n.subroutineRefMap.get(i),s=0===i,l=s?hi(0):function e(t,r,n,a){let i=Array.isArray(t)?[]:{};for(let[o,s]of Object.entries(t))"parent"===o?i.parent=Array.isArray(n)?a:n:s&&"object"==typeof s?i[o]=e(s,r,i,n):("type"===o&&"CapturingGroup"===s&&r.set(i,r.get(t)??t),i[o]=s);return i}(o,n.groupOriginByCopy,null),c=l;if(!s){var u,d;let e=hs(function(e,t){let r=[];for(;e=e.parent;)(!t||t(e))&&r.push(e);return r}(o,e=>"Group"===e.type&&!!e.flags)),t=e?pQ(n.globalFlags,e):n.globalFlags;u=t,d=n.currentFlags,(u.dotAll!==d.dotAll||u.ignoreCase!==d.ignoreCase)&&(c=ph({flags:function({dotAll:e,ignoreCase:t}){let r={};return(e||t)&&(r.enable={},e&&(r.enable.dotAll=!0),t&&(r.enable.ignoreCase=!0)),e&&t||(r.disable={},e||(r.disable.dotAll=!0),t||(r.disable.ignoreCase=!0)),r}(t)})).body[0].body.push(l)}r(hh(c,t),{traverse:!s})}},hn={Backreference({node:e,parent:t,replaceWith:r},n){if(e.orphan){n.highestOrphanBackref=Math.max(n.highestOrphanBackref,e.ref);return}let a=n.reffedNodesByReferencer.get(e).filter(t=>(function(e,t){let r=t;do{if("Regex"===r.type)return!1;if("Alternative"===r.type)continue;if(r===e)return!1;for(let t of hl(r.parent)){if(t===r)break;if(t===e||function e(t,r){for(let n of hl(t)??[])if(n===r||e(n,r))return!0;return!1}(t,e))return!0}}while(r=r.parent)throw Error("Unexpected path")})(t,e));a.length?a.length>1?r(hh(ph({atomic:!0,body:a.reverse().map(e=>po({body:[pl(e.number)]}))}),t)):e.ref=a[0].number:r(hh(pf({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let r=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<r;t++){let t=pc();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&0!==e.ref&&(e.ref=t.reffedNodesByReferencer.get(e).number)}};function ha(e){pw(e,{"*"({node:e,parent:t}){e.parent=t}})}function hi(e){let t=pg(e);return t.isRecursive=!0,t}function ho(e,t){if(t.has(e))return t.get(e);let r=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,r),r}function hs(e){let t=["dotAll","ignoreCase"],r={enable:{},disable:{}};return(e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete r.disable[t],r.enable[t]=!0),e.disable?.[t]&&(r.disable[t]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable)?r:null}function hl(e){if(!e)throw Error("Node expected");let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function hc(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function hu(e,t){let r=pi(e,{...t,unicodePropertyMap:p5}).body;return r.length>1||r[0].body.length>1?ph({body:r}):r[0].body[0]}function hd(e,t){return e.negate=t,e}function hp(e,t){return e.parent=t,e}function hh(e,t){return ha(e),e.parent=t,e}var hf={"*":{enter({node:e},t){if(hk(e)){let r=t.getCurrentModI();t.pushModI(e.flags?pQ({ignoreCase:r},e.flags).ignoreCase:r)}},exit({node:e},t){hk(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){hT(pq(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},r){t(),h_(e,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:e},t){"property"===e.kind&&he.has(e.value)&&t.setHasCasedChar()}},hm={Alternative:({body:e},t,r)=>e.map(r).join(""),Assertion({kind:e,negate:t}){if("string_end"===e)return"$";if("string_start"===e)return"^";if("word_boundary"===e)return t?pV`\B`:pV`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if("number"!=typeof e)throw Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&"strict"===t.accuracy&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,r){let{body:n,name:a,number:i}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,i>s.number&&(o.transferTo=s.number)),t.captureMap.set(i,o),`(${a?`?<${a}>`:""}${n.map(r).join("|")})`},Character({value:e},t){let r=pq(e),n=hA(e,{escDigit:"Backreference"===t.lastNode.type,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(n!==r)return n;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&hT(r)){let e=p2(r);return t.inCharClass?e.join(""):e.length>1?`[${e.join("")}]`:e[0]}return r},CharacterClass(e,t,r){let{kind:n,negate:a,parent:i}=e,{body:o}=e;if("intersection"===n&&!t.useFlagV)throw Error("Use of class intersection requires min target ES2024");pY.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(hw)&&(o=[pu(45),...o.filter(e=>!hw(e))]);let s=()=>`[${a?"^":""}${o.map(r).join("intersection"===n?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||pY.bugNestedClassIgnoresNegation)&&!a){let t=o.filter(e=>"CharacterClass"===e.type&&"union"===e.kind&&e.negate);if(t.length){let n=ph(),a=n.body[0];return n.parent=i,a.parent=n,e.body=o=o.filter(e=>!t.includes(e)),o.length?(e.parent=a,a.body.push(e)):n.body.pop(),t.forEach(e=>{let t=po({body:[e]});e.parent=t,t.parent=n,n.body.push(t)}),r(n)}}t.inCharClass=!0;let n=s();return t.inCharClass=!1,n}let l=o[0];if("union"===n&&!a&&l&&((!t.useFlagV||!t.verbose)&&"union"===i.kind&&!(pY.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&"intersection"===i.kind&&1===o.length&&"CharacterClassRange"!==l.type))return o.map(r).join("");if(!t.useFlagV&&"CharacterClass"===i.type)throw Error("Use of nested character class requires min target ES2024");return s()},CharacterClassRange(e,t){let r=e.min.value,n=e.max.value,a={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},i=hA(r,a),o=hA(n,a),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&(function(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),r=[],n=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?n??=t[e]:null===n?r.push(t[e]):(r.push([n,t[e]]),n=null);return r})(h_(e)).forEach(e=>{s.add(Array.isArray(e)?`${hA(e[0],a)}-${hA(e[1],a)}`:hA(e,a))}),`${i}-${o}${[...s].join("")}`},CharacterSet({kind:e,negate:t,value:r,key:n},a){if("dot"===e)return a.currentFlags.dotAll?a.appliedGlobalFlags.dotAll||a.useFlagMods?".":"[^]":pV`[^\n]`;if("digit"===e)return t?pV`\D`:pV`\d`;if("property"===e){if(a.useAppliedIgnoreCase&&a.currentFlags.ignoreCase&&he.has(r))throw Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${t?pV`\P`:pV`\p`}{${n?`${n}=`:""}${r}}`}if("word"===e)return t?pV`\W`:pV`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags:(e,t)=>(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":""),Group({atomic:e,body:t,flags:r,parent:n},a,i){let o=a.currentFlags;r&&(a.currentFlags=pQ(o,r));let s=t.map(i).join("|"),l=a.verbose||1!==t.length||"Quantifier"===n.type||e||a.useFlagMods&&r?`(?${function(e,t,r){if(e)return">";let n="";if(t&&r){let{enable:e,disable:r}=t;n=(e?.ignoreCase?"i":"")+(e?.dotAll?"s":"")+(r?"-":"")+(r?.ignoreCase?"i":"")+(r?.dotAll?"s":"")}return`${n}:`}(e,r,a.useFlagMods)}${s})`:s;return a.currentFlags=o,l},LookaroundAssertion({body:e,kind:t,negate:r},n,a){let i=`${"lookahead"===t?"":"<"}${r?"!":"="}`;return`(?${i}${e.map(a).join("|")})`},Quantifier:(e,t,r)=>r(e.body)+function({kind:e,max:t,min:r}){return(r||1!==t?r||t!==1/0?1===r&&t===1/0?"+":r===t?`{${r}}`:`{${r},${t===1/0?"":t}}`:"*":"?")+({greedy:"",lazy:"?",possessive:"+"})[e]}(e),Subroutine({isRecursive:e,ref:t},r){if(!e)throw Error("Unexpected non-recursive subroutine in transformed AST");let n=r.recursionLimit;return 0===t?`(?R=${n})`:pV`\g<${t}&R=${n}>`}},hg=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),hy=new Set(["-","\\","]","^","["]),hE=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),hb=new Map([[9,pV`\t`],[10,pV`\n`],[11,pV`\v`],[12,pV`\f`],[13,pV`\r`],[8232,pV`\u2028`],[8233,pV`\u2029`],[65279,pV`\uFEFF`]]),hv=/^\p{Cased}$/u;function hT(e){return hv.test(e)}function h_(e,t){let r=!!t?.firstOnly,n=e.min.value,a=e.max.value,i=[];if(n<65&&(65535===a||a>=131071)||65536===n&&a>=131071)return i;for(let e=n;e<=a;e++){let t=pq(e);if(!hT(t))continue;let o=p2(t).filter(e=>{let t=e.codePointAt(0);return t<n||t>a});if(o.length&&(i.push(...o),r))break}return i}function hA(e,{escDigit:t,inCharClass:r,useFlagV:n}){var a;if(hb.has(e))return hb.get(e);if(e<32||e>126&&e<160||e>262143||t&&(a=e)>47&&a<58)return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;let i=pq(e);return((r?n?hE:hy:hg).has(i)?"\\":"")+i}function hk({type:e}){return"CapturingGroup"===e||"Group"===e||"LookaroundAssertion"===e}function hw({type:e,value:t}){return"Character"===e&&45===t}var hx=class e extends RegExp{#e=new Map;#t=null;#r;#n=null;#a=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(t,r,n){const a=!!n?.lazyCompile;if(t instanceof RegExp){if(n)throw Error("Cannot provide options when copying a regexp");super(t,r),this.#r=t.source,t instanceof e&&(this.#e=t.#e,this.#n=t.#n,this.#a=t.#a,this.rawOptions=t.rawOptions)}else{const e={hiddenCaptures:[],strategy:null,transfers:[],...n};super(a?"":t,r),this.#r=t,this.#e=function(e,t){let r=new Map;for(let t of e)r.set(t,{hidden:!0});for(let[e,n]of t)for(let t of n)pK(r,t,{}).transferTo=e;return r}(e.hiddenCaptures,e.transfers),this.#a=e.strategy,this.rawOptions=n??{}}a||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...r}=this.rawOptions;this.#t=new e(this.#r,this.flags,r)}let r=this.global||this.sticky,n=this.lastIndex;if("clip_search"===this.#a&&r&&n){this.lastIndex=0;let e=this.#i(t.slice(n));return e&&(function(e,t,r,n){if(e.index+=t,e.input=r,n){let r=e.indices;for(let e=0;e<r.length;e++){let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])}let n=r.groups;n&&Object.keys(n).forEach(e=>{let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])})}}(e,n,t,this.hasIndices),this.lastIndex+=n),e}return this.#i(t)}#i(e){let t;this.#t.lastIndex=this.lastIndex;let r=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!r||!this.#e.size)return r;let n=[...r];r.length=1,this.hasIndices&&(t=[...r.indices],r.indices.length=1);let a=[0];for(let e=1;e<n.length;e++){let{hidden:i,transferTo:o}=this.#e.get(e)??{};if(i?a.push(null):(a.push(r.length),r.push(n[e]),this.hasIndices&&r.indices.push(t[e])),o&&void 0!==n[e]){let i=a[o];if(!i)throw Error(`Invalid capture transfer to "${i}"`);if(r[i]=n[e],this.hasIndices&&(r.indices[i]=t[e]),r.groups){this.#n||(this.#n=function(e){let t,r=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,a=0,i=0;for(;t=r.exec(e);){let{0:e,groups:{capture:r,name:o}}=t;"["===e?a++:a?"]"===e&&a--:r&&(i++,o&&n.set(i,o))}return n}(this.source));let a=this.#n.get(o);a&&(r.groups[a]=n[e],this.hasIndices&&(r.indices.groups[a]=t[e]))}}}return r}};class hS{constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:r=!1,cache:n,regexConstructor:a}=t;if(!a)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if("string"!=typeof e)return e;let t=n?.get(e);if(t){if(t instanceof RegExp)return t;if(r)return null;throw t}try{let t=a(e);return n?.set(e,t),t}catch(t){if(n?.set(e,t),r)return null;throw t}})}regexps;findNextMatchSync(e,t,r){let n="string"==typeof e?e:e.content,a=[];function i(e,t,r=0){return{index:e,captureIndices:t.indices.map(e=>null==e?{start:0xffffffff,end:0xffffffff,length:0}:{start:e[0]+r,end:e[1]+r,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let r=this.regexps[e];if(r)try{r.lastIndex=t;let o=r.exec(n);if(!o)continue;if(o.index===t)return i(e,o,0);a.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(a.length){let e=Math.min(...a.map(e=>e[1].index));for(let[t,r,n]of a)if(r.index===e)return i(t,r,n)}return null}}let hC=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),hN=[],hI=(e,t,r)=>{if(0==e.length-t)return r.classGroupId;let n=e[t],a=r.nextPart.get(n);if(a){let r=hI(e,t+1,a);if(r)return r}let i=r.validators;if(null===i)return;let o=0===t?e.join("-"):e.slice(t).join("-"),s=i.length;for(let e=0;e<s;e++){let t=i[e];if(t.validator(o))return t.classGroupId}},hR=(e,t)=>{let r=hC();for(let n in e)hD(e[n],r,n,t);return r},hD=(e,t,r,n)=>{let a=e.length;for(let i=0;i<a;i++)hL(e[i],t,r,n)},hL=(e,t,r,n)=>{"string"==typeof e?hO(e,t,r):"function"==typeof e?hP(e,t,r,n):hM(e,t,r,n)},hO=(e,t,r)=>{(""===e?t:hF(t,e)).classGroupId=r},hP=(e,t,r,n)=>{hB(e)?hD(e(n),t,r,n):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:r,validator:e}))},hM=(e,t,r,n)=>{let a=Object.entries(e),i=a.length;for(let e=0;e<i;e++){let[i,o]=a[e];hD(o,hF(t,i),r,n)}},hF=(e,t)=>{let r=e,n=t.split("-"),a=n.length;for(let e=0;e<a;e++){let t=n[e],a=r.nextPart.get(t);a||(a=hC(),r.nextPart.set(t,a)),r=a}return r},hB=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,hj=[],hU=(e,t,r,n,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:a}),hH=/\s+/,hG=e=>{let t;if("string"==typeof e)return e;let r="";for(let n=0;n<e.length;n++)e[n]&&(t=hG(e[n]))&&(r&&(r+=" "),r+=t);return r},h$=[],hz=e=>{let t=t=>t[e]||h$;return t.isThemeGetter=!0,t},hW=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,hq=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hV=/^\d+\/\d+$/,hY=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hQ=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,hK=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hX=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hJ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hZ=e=>hV.test(e),h0=e=>!!e&&!Number.isNaN(Number(e)),h1=e=>!!e&&Number.isInteger(Number(e)),h2=e=>e.endsWith("%")&&h0(e.slice(0,-1)),h5=e=>hY.test(e),h3=()=>!0,h4=e=>hQ.test(e)&&!hK.test(e),h6=()=>!1,h8=e=>hX.test(e),h9=e=>hJ.test(e),h7=e=>!ft(e)&&!fs(e),fe=e=>ff(e,fE,h6),ft=e=>hW.test(e),fr=e=>ff(e,fb,h4),fn=e=>ff(e,fv,h0),fa=e=>ff(e,fg,h6),fi=e=>ff(e,fy,h9),fo=e=>ff(e,f_,h8),fs=e=>hq.test(e),fl=e=>fm(e,fb),fc=e=>fm(e,fT),fu=e=>fm(e,fg),fd=e=>fm(e,fE),fp=e=>fm(e,fy),fh=e=>fm(e,f_,!0),ff=(e,t,r)=>{let n=hW.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},fm=(e,t,r=!1)=>{let n=hq.exec(e);return!!n&&(n[1]?t(n[1]):r)},fg=e=>"position"===e||"percentage"===e,fy=e=>"image"===e||"url"===e,fE=e=>"length"===e||"size"===e||"bg-size"===e,fb=e=>"length"===e,fv=e=>"number"===e,fT=e=>"family-name"===e,f_=e=>"shadow"===e,fA=((e,...t)=>{let r,n,a,i,o=e=>{let t=n(e);if(t)return t;let i=((e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:i}=t,o=[],s=e.trim().split(hH),l="";for(let e=s.length-1;e>=0;e-=1){let t=s[e],{isExternal:c,modifiers:u,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:h}=r(t);if(c){l=t+(l.length>0?" "+l:l);continue}let f=!!h,m=n(f?p.substring(0,h):p);if(!m){if(!f||!(m=n(p))){l=t+(l.length>0?" "+l:l);continue}f=!1}let g=0===u.length?"":1===u.length?u[0]:i(u).join(":"),y=d?g+"!":g,E=y+m;if(o.indexOf(E)>-1)continue;o.push(E);let b=a(m,f);for(let e=0;e<b.length;++e){let t=b[e];o.push(y+t)}l=t+(l.length>0?" "+l:l)}return l})(e,r);return a(e,i),i};return i=s=>{var l;let c;return n=(r={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null),a=(a,i)=>{r[a]=i,++t>e&&(t=0,n=r,r=Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=n[e])?(a(e,t),t):void 0},set(e,t){e in r?r[e]=t:a(e,t)}}})((l=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:r}=e,n=e=>{let t,r=[],n=0,a=0,i=0,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(0===n&&0===a){if(":"===o){r.push(e.slice(i,s)),i=s+1;continue}if("/"===o){t=s;continue}}"["===o?n++:"]"===o?n--:"("===o?a++:")"===o&&a--}let s=0===r.length?e:e.slice(i),l=s,c=!1;return s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0),hU(r,c,l,t&&t>i?t-i:void 0)};if(t){let e=t+":",r=n;n=t=>t.startsWith(e)?r(t.slice(e.length)):hU(hj,!1,t,void 0,!0)}if(r){let e=n;n=t=>r({className:t,parseClassName:e})}return n})(l),sortModifiers:(c=new Map,l.orderSensitiveModifiers.forEach((e,t)=>{c.set(e,1e6+t)}),e=>{let t=[],r=[];for(let n=0;n<e.length;n++){let a=e[n],i="["===a[0],o=c.has(a);i||o?(r.length>0&&(r.sort(),t.push(...r),r=[]),t.push(a)):r.push(a)}return r.length>0&&(r.sort(),t.push(...r)),t}),...(e=>{let t=(e=>{let{theme:t,classGroups:r}=e;return hR(r,t)})(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]")){var r;let t,n,a;return -1===(r=e).slice(1,-1).indexOf(":")?void 0:(n=(t=r.slice(1,-1)).indexOf(":"),(a=t.slice(0,n))?"arbitrary.."+a:void 0)}let n=e.split("-"),a=+(""===n[0]&&n.length>1);return hI(n,a,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=n[e],a=r[e];if(t){if(a){let e=Array(a.length+t.length);for(let t=0;t<a.length;t++)e[t]=a[t];for(let r=0;r<t.length;r++)e[a.length+r]=t[r];return e}return t}return a||hN}return r[e]||hN}}})(l)}).cache.get,a=r.cache.set,i=o,o(s)},(...e)=>i(((...e)=>{let t,r,n=0,a="";for(;n<e.length;)(t=e[n++])&&(r=hG(t))&&(a&&(a+=" "),a+=r);return a})(...e))})(()=>{let e=hz("color"),t=hz("font"),r=hz("text"),n=hz("font-weight"),a=hz("tracking"),i=hz("leading"),o=hz("breakpoint"),s=hz("container"),l=hz("spacing"),c=hz("radius"),u=hz("shadow"),d=hz("inset-shadow"),p=hz("text-shadow"),h=hz("drop-shadow"),f=hz("blur"),m=hz("perspective"),g=hz("aspect"),y=hz("ease"),E=hz("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...v(),fs,ft],_=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],k=()=>[fs,ft,l],w=()=>[hZ,"full","auto",...k()],x=()=>[h1,"none","subgrid",fs,ft],S=()=>["auto",{span:["full",h1,fs,ft]},h1,fs,ft],C=()=>[h1,"auto",fs,ft],N=()=>["auto","min","max","fr",fs,ft],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...k()],L=()=>[hZ,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],O=()=>[e,fs,ft],P=()=>[...v(),fu,fa,{position:[fs,ft]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",fd,fe,{size:[fs,ft]}],B=()=>[h2,fl,fr],j=()=>["","none","full",c,fs,ft],U=()=>["",h0,fl,fr],H=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>[h0,h2,fu,fa],z=()=>["","none",f,fs,ft],W=()=>["none",h0,fs,ft],q=()=>["none",h0,fs,ft],V=()=>[h0,fs,ft],Y=()=>[hZ,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[h5],breakpoint:[h5],color:[h3],container:[h5],"drop-shadow":[h5],ease:["in","out","in-out"],font:[h7],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[h5],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[h5],shadow:[h5],spacing:["px",h0],text:[h5],"text-shadow":[h5],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",hZ,ft,fs,g]}],container:["container"],columns:[{columns:[h0,ft,fs,s]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[h1,"auto",fs,ft]}],basis:[{basis:[hZ,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[h0,hZ,"auto","initial","none",ft]}],grow:[{grow:["",h0,fs,ft]}],shrink:[{shrink:["",h0,fs,ft]}],order:[{order:[h1,"first","last","none",fs,ft]}],"grid-cols":[{"grid-cols":x()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":x()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],w:[{w:[s,"screen",...L()]}],"min-w":[{"min-w":[s,"screen","none",...L()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",r,fl,fr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,fs,fn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",h2,ft]}],"font-family":[{font:[fc,ft,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,fs,ft]}],"line-clamp":[{"line-clamp":[h0,"none",fs,fn]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",fs,ft]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",fs,ft]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:[h0,"from-font","auto",fs,fr]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[h0,"auto",fs,ft]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fs,ft]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",fs,ft]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},h1,fs,ft],radial:["",fs,ft],conic:[h1,fs,ft]},fp,fi]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...H(),"hidden","none"]}],"divide-style":[{divide:[...H(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...H(),"none","hidden"]}],"outline-offset":[{"outline-offset":[h0,fs,ft]}],"outline-w":[{outline:["",h0,fl,fr]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",u,fh,fo]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",d,fh,fo]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[h0,fr]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",p,fh,fo]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[h0,fs,ft]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[h0]}],"mask-image-linear-from-pos":[{"mask-linear-from":$()}],"mask-image-linear-to-pos":[{"mask-linear-to":$()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":$()}],"mask-image-t-to-pos":[{"mask-t-to":$()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":$()}],"mask-image-r-to-pos":[{"mask-r-to":$()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":$()}],"mask-image-b-to-pos":[{"mask-b-to":$()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":$()}],"mask-image-l-to-pos":[{"mask-l-to":$()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":$()}],"mask-image-x-to-pos":[{"mask-x-to":$()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":$()}],"mask-image-y-to-pos":[{"mask-y-to":$()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[fs,ft]}],"mask-image-radial-from-pos":[{"mask-radial-from":$()}],"mask-image-radial-to-pos":[{"mask-radial-to":$()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":v()}],"mask-image-conic-pos":[{"mask-conic":[h0]}],"mask-image-conic-from-pos":[{"mask-conic-from":$()}],"mask-image-conic-to-pos":[{"mask-conic-to":$()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",fs,ft]}],filter:[{filter:["","none",fs,ft]}],blur:[{blur:z()}],brightness:[{brightness:[h0,fs,ft]}],contrast:[{contrast:[h0,fs,ft]}],"drop-shadow":[{"drop-shadow":["","none",h,fh,fo]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",h0,fs,ft]}],"hue-rotate":[{"hue-rotate":[h0,fs,ft]}],invert:[{invert:["",h0,fs,ft]}],saturate:[{saturate:[h0,fs,ft]}],sepia:[{sepia:["",h0,fs,ft]}],"backdrop-filter":[{"backdrop-filter":["","none",fs,ft]}],"backdrop-blur":[{"backdrop-blur":z()}],"backdrop-brightness":[{"backdrop-brightness":[h0,fs,ft]}],"backdrop-contrast":[{"backdrop-contrast":[h0,fs,ft]}],"backdrop-grayscale":[{"backdrop-grayscale":["",h0,fs,ft]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h0,fs,ft]}],"backdrop-invert":[{"backdrop-invert":["",h0,fs,ft]}],"backdrop-opacity":[{"backdrop-opacity":[h0,fs,ft]}],"backdrop-saturate":[{"backdrop-saturate":[h0,fs,ft]}],"backdrop-sepia":[{"backdrop-sepia":["",h0,fs,ft]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",fs,ft]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[h0,"initial",fs,ft]}],ease:[{ease:["linear","initial",y,fs,ft]}],delay:[{delay:[h0,fs,ft]}],animate:[{animate:["none",E,fs,ft]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,fs,ft]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:q()}],"scale-x":[{"scale-x":q()}],"scale-y":[{"scale-y":q()}],"scale-z":[{"scale-z":q()}],"scale-3d":["scale-3d"],skew:[{skew:V()}],"skew-x":[{"skew-x":V()}],"skew-y":[{"skew-y":V()}],transform:[{transform:[fs,ft,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Y()}],"translate-x":[{"translate-x":Y()}],"translate-y":[{"translate-y":Y()}],"translate-z":[{"translate-z":Y()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",fs,ft]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",fs,ft]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[h0,fl,fr,fn]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});var fk=e.i(51379),fw=(...e)=>fA((0,V.clsx)(e)),fx=(e,t,r)=>{let n="string"==typeof t?new Blob([t],{type:r}):t,a=URL.createObjectURL(n),i=document.createElement("a");i.href=a,i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(a)},fS=/<pre(\s|>)/,fC=(0,q.createContext)({code:""}),fN=new class{constructor(){this.lightHighlighter=null,this.darkHighlighter=null,this.lightTheme=null,this.darkTheme=null,this.loadedLanguages=new Set,this.initializationPromise=null}isLanguageSupported(e){return Object.hasOwn(cp,e)}getFallbackLanguage(){return"text"}async ensureHighlightersInitialized(e,t){var r,n;let[a,i]=e,o=function(e={}){let t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=e=>{let r;return(r=function(e,t){var r;let n,a,i,o,s=pZ(t),l=(r=pi(e,{flags:s.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:s.rules.captureGroup,singleline:s.rules.singleline},skipBackrefValidation:s.rules.allowOrphanBackrefs,unicodePropertyMap:p5}),n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...{accuracy:s.accuracy,asciiWordBoundaries:s.rules.asciiWordBoundaries,avoidSubclass:s.avoidSubclass,bestEffortTarget:s.target}},ha(r),a={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:pX[n.bestEffortTarget]>=pX.ES2024,passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:r.flags.digitIsAscii,spaceIsAscii:r.flags.spaceIsAscii,wordIsAscii:r.flags.wordIsAscii},pw(r,ht,a),o={currentFlags:i={dotAll:r.flags.dotAll,ignoreCase:r.flags.ignoreCase},prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:a.subroutineRefMap},pw(r,hr,o),pw(r,hn,{groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer}),r._originMap=o.groupOriginByCopy,r._strategy=a.strategy,r),c=function(e,t){let r=pZ(t),n=pX[r.target]>=pX.ES2024,a=pX[r.target]>=pX.ES2025,i=r.rules.recursionLimit;if(!Number.isInteger(i)||i<2||i>20)throw Error("Invalid recursionLimit; use 2-20");let o=null,s=null;if(!a){let t=[e.flags.ignoreCase];pw(e,hf,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let l={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},c=e,u={accuracy:r.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:e._originMap,recursionLimit:i,useAppliedIgnoreCase:!!(!a&&o&&s),useFlagMods:a,useFlagV:n,verbose:r.verbose};function d(e){return u.lastNode=c,c=e,(function(e,t){if(null==e)throw Error(t??"Value expected");return e})(hm[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let p={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return n||(delete p.options.force.v,p.options.disable.v=!0,p.options.unicodeSetsPlugin=null),p._captureTransfers=new Map,p._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&p._hiddenCaptures.push(t),e.transferTo&&pK(p._captureTransfers,e.transferTo,[]).push(t)}),p}(l,s),u=function(e,t){let r,{hiddenCaptures:n,mode:a}={hiddenCaptures:[],mode:"plugin",...t},i=t?.captureTransfers??new Map;if(!RegExp(pF,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if("plugin"===a&&pR(e,pP`\(\?\(DEFINE\)`,pN.DEFAULT))throw Error("DEFINE groups cannot be used with recursion");let o=[],s=pR(e,pP`\\[1-9]`,pN.DEFAULT),l=new Map,c=[],u=!1,d=0,p=0;for(pU.lastIndex=0;r=pU.exec(e);){let{0:t,groups:{captureName:h,rDepth:f,gRNameOrNum:m,gRDepth:g}}=r;if("["===t)d++;else if(d)"]"===t&&d--;else if(f){if(pG(f),u)throw Error(pH);if(s)throw Error(`${"external"===a?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);let t=e.slice(0,r.index),l=e.slice(pU.lastIndex);if(pR(l,pF,pN.DEFAULT))throw Error(pH);let c=f-1;e=p$(t,l,c,!1,n,o,p),i=pW(i,t,c,o.length,0,p);break}else if(m){pG(g);let d=!1;for(let e of c)if(e.name===m||e.num===+m){if(d=!0,e.hasRecursedWithin)throw Error(pH);break}if(!d)throw Error(pP`Recursive \g cannot be used outside the referenced group "${"external"===a?m:pP`\g<${m}&R=${g}>`}"`);let h=l.get(m),f=function(e,t){let r,n=/\\?./gsu;n.lastIndex=t;let a=e.length,i=0,o=1;for(;r=n.exec(e);){let[e]=r;if("["===e)i++;else if(i)"]"===e&&i--;else if("("===e)o++;else if(")"===e&&!--o){a=r.index;break}}return e.slice(t,a)}(e,h);if(s&&pR(f,pP`${pB}|\((?!\?)`,pN.DEFAULT))throw Error(`${"external"===a?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);let y=e.slice(h,r.index),E=f.slice(y.length+t.length),b=o.length,v=g-1,T=p$(y,E,v,!0,n,o,p);i=pW(i,y,v,o.length-b,b,p);let _=e.slice(0,h),A=e.slice(h+f.length);e=`${_}${T}${A}`,pU.lastIndex+=T.length-t.length-y.length-E.length,c.forEach(e=>e.hasRecursedWithin=!0),u=!0}else if(h)p++,l.set(String(p),pU.lastIndex),l.set(h,pU.lastIndex),c.push({num:p,name:h});else if("("===t[0]){let e="("===t;e&&(p++,l.set(String(p),pU.lastIndex)),c.push(e?{num:p}:{})}else")"===t&&c.pop()}return n.push(...o),{pattern:e,captureTransfers:i,hiddenCaptures:n}}(c.pattern,{captureTransfers:c._captureTransfers,hiddenCaptures:c._hiddenCaptures,mode:"external"}),d=function(e,t){let r,n=t?.hiddenCaptures??[],a=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:n};let i="(?:(?=(",o=[0],s=[],l=0,c=0,u=NaN;do{let t;r=!1;let d=0,p=0,h=!1;for(pD.lastIndex=Number.isNaN(u)?0:u+i.length;t=pD.exec(e);){let{0:f,index:m,groups:{capturingStart:g,noncapturingStart:y}}=t;if("["===f)d++;else if(d)"]"===f&&d--;else if("(?>"!==f||h){if(h&&y)p++;else if(g)h?p++:(l++,o.push(l+c));else if(")"===f&&h){if(!p){let t=l+ ++c;e=`${e.slice(0,u)}${i}${e.slice(u+3,m)}))<$$${t}>)${e.slice(m+1)}`,r=!0,s.push(t);for(let e=0;e<n.length;e++)n[e]>=t&&n[e]++;if(a.size){let e=new Map;a.forEach((r,n)=>{e.set(n>=t?n+1:n,r.map(e=>e>=t?e+1:e))}),a=e}break}p--}}else u=m,h=!0}}while(r)return n.push(...s),{pattern:e=pI(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:r}})=>{if(t){let r=+t;if(r>o.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${o[r]}`}return`\\${r}`},pN.DEFAULT),captureTransfers:a,hiddenCaptures:n}}(function(e){let t;if(!RegExp(`${pL}\\+`).test(e))return{pattern:e};let r=[],n=null,a=null,i="",o=0;for(pO.lastIndex=0;t=pO.exec(e);){let{0:c,index:u,groups:{qBase:d,qMod:p,invalidQ:h}}=t;if("["===c)o||(a=u),o++;else if("]"===c)o?o--:a=null;else if(!o)if("+"===p&&i&&!i.startsWith("(")){if(h)throw Error(`Invalid quantifier "${c}"`);let t=-1;if(/^\{\d+\}$/.test(d)){var s,l;s=e,l=u+d.length,e=s.slice(0,l)+""+s.slice(l+p.length)}else{if(")"===i||"]"===i){let t=")"===i?n:a;if(null===t)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,u)}${d})${e.slice(u+c.length)}`}else e=`${e.slice(0,u-i.length)}(?>${i}${d})${e.slice(u+c.length)}`;t+=4}pO.lastIndex+=t}else"("===c[0]?r.push(u):")"===c&&(n=r.length?r.pop():null);i=c}return{pattern:e}}(u.pattern).pattern,{captureTransfers:u.captureTransfers,hiddenCaptures:u.hiddenCaptures}),p={pattern:d.pattern,flags:`${s.hasIndices?"d":""}${s.global?"g":""}${c.flags}${c.options.disable.v?"u":"v"}`};if(s.avoidSubclass){if(s.lazyCompileLength!==1/0)throw Error("Lazy compilation requires subclass")}else{let e=d.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(d.captureTransfers),r=l._strategy,n=p.pattern.length>=s.lazyCompileLength;(e.length||t.length||r||n)&&(p.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...r&&{strategy:r},...n&&{lazyCompile:n}})}return p}(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...{target:t.target}})).options?new hx(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)},{createScanner:e=>new hS(e,t),createString:e=>({content:e})}}({forgiving:!0}),s=!this.lightHighlighter||this.lightTheme!==a,l=!this.darkHighlighter||this.darkTheme!==i;(s||l)&&this.loadedLanguages.clear();let c=this.isLanguageSupported(t),u=!this.loadedLanguages.has(t)&&c;if(s?(this.lightHighlighter=await dW({themes:[a],langs:c?[t]:[],engine:o}),this.lightTheme=a,c&&this.loadedLanguages.add(t)):u&&await (null==(r=this.lightHighlighter)?void 0:r.loadLanguage(t)),l){let e=u?[...this.loadedLanguages].concat(c?[t]:[]):Array.from(this.loadedLanguages);this.darkHighlighter=await dW({themes:[i],langs:e.length>0?e:c?[t]:[],engine:o}),this.darkTheme=i}else u&&await (null==(n=this.darkHighlighter)?void 0:n.loadLanguage(t));u&&this.loadedLanguages.add(t)}async highlightCode(e,t,r,n){var a,i;this.initializationPromise&&await this.initializationPromise,this.initializationPromise=this.ensureHighlightersInitialized(r,t),await this.initializationPromise,this.initializationPromise=null;let[o,s]=r,l=this.isLanguageSupported(t)?t:this.getFallbackLanguage(),c=null==(a=this.lightHighlighter)?void 0:a.codeToHtml(e,{lang:l,theme:o}),u=null==(i=this.darkHighlighter)?void 0:i.codeToHtml(e,{lang:l,theme:s}),d=e=>n?e.replace(fS,`<pre class="${n}"$1`):e;return[d(c),d(u)]}},fI=({code:e,language:t,className:r,children:n,preClassName:a,...i})=>{let[o,s]=(0,q.useState)(""),[l,c]=(0,q.useState)(""),u=(0,q.useRef)(!1),[d,p]=(0,q.useContext)(mv);return(0,q.useEffect)(()=>(u.current=!0,fN.highlightCode(e,t,[d,p],a).then(([e,t])=>{u.current&&(s(e),c(t))}),()=>{u.current=!1}),[e,t,d,p,a]),(0,$.jsx)(fC.Provider,{value:{code:e},children:(0,$.jsxs)("div",{className:"my-4 w-full overflow-hidden rounded-xl border","data-code-block-container":!0,"data-language":t,children:[(0,$.jsxs)("div",{className:"flex items-center justify-between bg-muted/80 p-3 text-muted-foreground text-xs","data-code-block-header":!0,"data-language":t,children:[(0,$.jsx)("span",{className:"ml-1 font-mono lowercase",children:t}),(0,$.jsx)("div",{className:"flex items-center gap-2",children:n})]}),(0,$.jsx)("div",{className:"w-full",children:(0,$.jsxs)("div",{className:"min-w-full",children:[(0,$.jsx)("div",{className:fw("overflow-x-auto dark:hidden",r),dangerouslySetInnerHTML:{__html:o},"data-code-block":!0,"data-language":t,...i}),(0,$.jsx)("div",{className:fw("hidden overflow-x-auto dark:block",r),dangerouslySetInnerHTML:{__html:l},"data-code-block":!0,"data-language":t,...i})]})})]})})},fR={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},fD=({onDownload:e,onError:t,language:r,children:n,className:a,code:i,...o})=>{let{code:s}=(0,q.useContext)(fC),{isAnimating:l}=(0,q.useContext)(mA),c=null!=i?i:s,u=`file.${r&&r in fR?fR[r]:"txt"}`;return(0,$.jsx)("button",{className:fw("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),disabled:l,onClick:()=>{try{fx(u,c,"text/plain"),null==e||e()}catch(e){null==t||t(e)}},title:"Download file",type:"button",...o,children:null!=n?n:(0,$.jsx)(cl,{size:14})})},fL=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:a,code:i,...o})=>{let[s,l]=(0,q.useState)(!1),c=(0,q.useRef)(0),{code:u}=(0,q.useContext)(fC),{isAnimating:d}=(0,q.useContext)(mA),p=null!=i?i:u,h=async()=>{var n;if("undefined"==typeof window||!(null!=(n=null==navigator?void 0:navigator.clipboard)&&n.writeText)){null==t||t(Error("Clipboard API not available"));return}try{s||(await navigator.clipboard.writeText(p),l(!0),null==e||e(),c.current=window.setTimeout(()=>l(!1),r))}catch(e){null==t||t(e)}};return(0,q.useEffect)(()=>()=>{window.clearTimeout(c.current)},[]),(0,$.jsx)("button",{className:fw("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),disabled:d,onClick:h,type:"button",...o,children:null!=n?n:(0,$.jsx)(s?co:cs,{size:14})})},fO=async t=>{let r={startOnLoad:!1,theme:"default",securityLevel:"strict",fontFamily:"monospace",suppressErrorRendering:!0,...t},n=(await e.A(172381)).default;return n.initialize(r),n},fP=({chart:e,className:t,config:r})=>{let[n,a]=(0,q.useState)(null),[i,o]=(0,q.useState)(!0),[s,l]=(0,q.useState)(""),[c,u]=(0,q.useState)("");return((0,q.useEffect)(()=>{(async()=>{try{a(null),o(!0);let t=await fO(r),n=e.split("").reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),i=`mermaid-${Math.abs(n)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:s}=await t.render(i,e);l(s),u(s)}catch(e){c||s||a(e instanceof Error?e.message:"Failed to render Mermaid chart")}finally{o(!1)}})()},[e,r]),!i||s||c)?!n||s||c?(0,$.jsx)("div",{"aria-label":"Mermaid chart",className:fw("my-4 flex justify-center",t),dangerouslySetInnerHTML:{__html:s||c},role:"img"}):(0,$.jsxs)("div",{className:fw("rounded-lg border border-red-200 bg-red-50 p-4",t),children:[(0,$.jsxs)("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",n]}),(0,$.jsxs)("details",{className:"mt-2",children:[(0,$.jsx)("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),(0,$.jsx)("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]}):(0,$.jsx)("div",{className:fw("my-4 flex justify-center p-4",t),children:(0,$.jsxs)("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[(0,$.jsx)("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),(0,$.jsx)("span",{className:"text-sm",children:"Loading diagram..."})]})})};function fM(e){var t,r;let n=[],a=[];for(let r of e.querySelectorAll("thead th"))n.push((null==(t=r.textContent)?void 0:t.trim())||"");for(let t of e.querySelectorAll("tbody tr")){let e=[];for(let n of t.querySelectorAll("td"))e.push((null==(r=n.textContent)?void 0:r.trim())||"");a.push(e)}return{headers:n,rows:a}}function fF(e){let{headers:t,rows:r}=e,n=e=>e.includes(",")||e.includes('"')||e.includes(`
|
|
141
|
+
`)?`"${e.replace(/"/g,'""')}"`:e,a=[];for(let e of(t.length>0&&a.push(t.map(n).join(",")),r))a.push(e.map(n).join(","));return a.join(`
|
|
142
|
+
`)}function fB(e){let{headers:t,rows:r}=e;if(0===t.length)return"";let n=[],a=t.map(e=>e.replace(/\|/g,"\\|"));for(let e of(n.push(`| ${a.join(" | ")} |`),n.push(`| ${t.map(()=>"---").join(" | ")} |`),r)){let r=[...e];for(;r.length<t.length;)r.push("");let a=r.map(e=>e.replace(/\|/g,"\\|"));n.push(`| ${a.join(" | ")} |`)}return n.join(`
|
|
143
|
+
`)}var fj=({children:e,className:t,onCopy:r,onError:n,timeout:a=2e3,format:i="markdown"})=>{let[o,s]=(0,q.useState)(!1),l=(0,q.useRef)(0),{isAnimating:c}=(0,q.useContext)(mA),u=async e=>{var t;if("undefined"==typeof window||!(null!=(t=null==navigator?void 0:navigator.clipboard)&&t.write)){null==n||n(Error("Clipboard API not available"));return}try{if(!o){let t=e.currentTarget.closest('[data-streamdown="table-wrapper"]'),o=null==t?void 0:t.querySelector("table");if(!o){null==n||n(Error("Table not found"));return}let c=fM(o),u=new ClipboardItem({"text/plain":"markdown"===i?fB(c):fF(c),"text/html":new Blob([o.outerHTML],{type:"text/html"})});await navigator.clipboard.write([u]),s(!0),null==r||r(),l.current=window.setTimeout(()=>s(!1),a)}}catch(e){null==n||n(e)}};return(0,q.useEffect)(()=>()=>{window.clearTimeout(l.current)},[]),(0,$.jsx)("button",{className:fw("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:u,title:`Copy table as ${i}`,type:"button",children:null!=e?e:(0,$.jsx)(o?co:cs,{size:14})})},fU=({children:e,className:t,onDownload:r,onError:n})=>{let[a,i]=(0,q.useState)(!1),o=(0,q.useRef)(null),{isAnimating:s}=(0,q.useContext)(mA),l=e=>{var t;try{let a=null==(t=o.current)?void 0:t.closest('[data-streamdown="table-wrapper"]'),s=null==a?void 0:a.querySelector("table");if(!s){null==n||n(Error("Table not found"));return}let l=fM(s),c="csv"===e?fF(l):fB(l);fx(`table.${"csv"===e?"csv":"md"}`,c,"csv"===e?"text/csv":"text/markdown"),i(!1),null==r||r(e)}catch(e){null==n||n(e)}};return(0,q.useEffect)(()=>{let e=e=>{o.current&&!o.current.contains(e.target)&&i(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,$.jsxs)("div",{className:"relative",ref:o,children:[(0,$.jsx)("button",{className:fw("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:s,onClick:()=>i(!a),title:"Download table",type:"button",children:null!=e?e:(0,$.jsx)(cl,{size:14})}),a&&(0,$.jsxs)("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] rounded-md border border-border bg-background shadow-lg",children:[(0,$.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>l("csv"),type:"button",children:"CSV"}),(0,$.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>l("markdown"),type:"button",children:"Markdown"})]})]})},fH=/language-([^\s]+)/;function fG(e,t){if(!(null!=e&&e.position||null!=t&&t.position))return!0;if(!(null!=e&&e.position&&null!=t&&t.position))return!1;let r=e.position.start,n=t.position.start,a=e.position.end,i=t.position.end;return(null==r?void 0:r.line)===(null==n?void 0:n.line)&&(null==r?void 0:r.column)===(null==n?void 0:n.column)&&(null==a?void 0:a.line)===(null==i?void 0:i.line)&&(null==a?void 0:a.column)===(null==i?void 0:i.column)}function f$(e,t){return e.className===t.className&&fG(e.node,t.node)}var fz=(e,t)=>"boolean"==typeof e?e:!1!==e[t],fW=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("ol",{className:fw("ml-4 list-outside list-decimal whitespace-normal",t),"data-streamdown":"ordered-list",...n,children:e}),(e,t)=>f$(e,t));fW.displayName="MarkdownOl";var fq=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("li",{className:fw("py-1",t),"data-streamdown":"list-item",...n,children:e}),(e,t)=>e.className===t.className&&fG(e.node,t.node));fq.displayName="MarkdownLi";var fV=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("ul",{className:fw("ml-4 list-outside list-disc whitespace-normal",t),"data-streamdown":"unordered-list",...n,children:e}),(e,t)=>f$(e,t));fV.displayName="MarkdownUl";var fY=(0,q.memo)(({className:e,node:t,...r})=>(0,$.jsx)("hr",{className:fw("my-6 border-border",e),"data-streamdown":"horizontal-rule",...r}),(e,t)=>f$(e,t));fY.displayName="MarkdownHr";var fQ=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("span",{className:fw("font-semibold",t),"data-streamdown":"strong",...n,children:e}),(e,t)=>f$(e,t));fQ.displayName="MarkdownStrong";var fK=(0,q.memo)(({children:e,className:t,href:r,node:n,...a})=>(0,$.jsx)("a",{className:fw("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":"streamdown:incomplete-link"===r,"data-streamdown":"link",href:r,rel:"noreferrer",target:"_blank",...a,children:e}),(e,t)=>f$(e,t)&&e.href===t.href);fK.displayName="MarkdownA";var fX=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("h1",{className:fw("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e}),(e,t)=>f$(e,t));fX.displayName="MarkdownH1";var fJ=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("h2",{className:fw("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e}),(e,t)=>f$(e,t));fJ.displayName="MarkdownH2";var fZ=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("h3",{className:fw("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e}),(e,t)=>f$(e,t));fZ.displayName="MarkdownH3";var f0=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("h4",{className:fw("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e}),(e,t)=>f$(e,t));f0.displayName="MarkdownH4";var f1=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("h5",{className:fw("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e}),(e,t)=>f$(e,t));f1.displayName="MarkdownH5";var f2=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("h6",{className:fw("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e}),(e,t)=>f$(e,t));f2.displayName="MarkdownH6";var f5=(0,q.memo)(({children:e,className:t,node:r,...n})=>{let a=fz((0,q.useContext)(m_),"table");return(0,$.jsxs)("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[a&&(0,$.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,$.jsx)(fj,{}),(0,$.jsx)(fU,{})]}),(0,$.jsx)("div",{className:"overflow-x-auto",children:(0,$.jsx)("table",{className:fw("w-full border-collapse border border-border",t),"data-streamdown":"table",...n,children:e})})]})},(e,t)=>f$(e,t));f5.displayName="MarkdownTable";var f3=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("thead",{className:fw("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e}),(e,t)=>f$(e,t));f3.displayName="MarkdownThead";var f4=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("tbody",{className:fw("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...n,children:e}),(e,t)=>f$(e,t));f4.displayName="MarkdownTbody";var f6=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("tr",{className:fw("border-border border-b",t),"data-streamdown":"table-row",...n,children:e}),(e,t)=>f$(e,t));f6.displayName="MarkdownTr";var f8=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("th",{className:fw("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...n,children:e}),(e,t)=>f$(e,t));f8.displayName="MarkdownTh";var f9=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("td",{className:fw("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e}),(e,t)=>f$(e,t));f9.displayName="MarkdownTd";var f7=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("blockquote",{className:fw("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...n,children:e}),(e,t)=>f$(e,t));f7.displayName="MarkdownBlockquote";var me=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("sup",{className:fw("text-sm",t),"data-streamdown":"superscript",...n,children:e}),(e,t)=>f$(e,t));me.displayName="MarkdownSup";var mt=(0,q.memo)(({children:e,className:t,node:r,...n})=>(0,$.jsx)("sub",{className:fw("text-sm",t),"data-streamdown":"subscript",...n,children:e}),(e,t)=>f$(e,t));mt.displayName="MarkdownSub";var mr=(0,q.memo)(({children:e,className:t,node:r,...n})=>{if("data-footnotes"in n){let r=Array.isArray(e)?e.map(e=>{if(!(0,q.isValidElement)(e))return e;if(e.type===fW){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!(e=>{var t,r;if(!(0,q.isValidElement)(e))return!1;let n=Array.isArray(e.props.children)?e.props.children:[e.props.children],a=!1,i=!1;for(let e of n)if(e){if("string"==typeof e)""!==e.trim()&&(a=!0);else if((0,q.isValidElement)(e)){if((null==(t=e.props)?void 0:t["data-footnote-backref"])!==void 0)i=!0;else for(let t of Array.isArray(e.props.children)?e.props.children:[e.props.children])if("string"==typeof t&&""!==t.trim()||(0,q.isValidElement)(t)&&(null==(r=t.props)?void 0:r["data-footnote-backref"])===void 0){a=!0;break}}}return i&&!a})(e));return 0===t.length?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(r)?r.some(e=>null!==e):null!==r)?(0,$.jsx)("section",{className:t,...n,children:r}):null}return(0,$.jsx)("section",{className:t,...n,children:e})},(e,t)=>f$(e,t));mr.displayName="MarkdownSection";var mn=(0,q.memo)(({node:e,className:t,children:r,...n})=>{var a,i,o;let s=(null==(a=null==e?void 0:e.position)?void 0:a.start.line)===(null==(i=null==e?void 0:e.position)?void 0:i.end.line),l=(0,q.useContext)(mT),c=(0,q.useContext)(m_);if(s)return(0,$.jsx)("code",{className:fw("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...n,children:r});let u=null==t?void 0:t.match(fH),d=null!=(o=null==u?void 0:u.at(1))?o:"",p="";if((0,q.isValidElement)(r)&&r.props&&"object"==typeof r.props&&"children"in r.props&&"string"==typeof r.props.children?p=r.props.children:"string"==typeof r&&(p=r),"mermaid"===d){let e=fz(c,"mermaid");return(0,$.jsxs)("div",{className:fw("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[e&&(0,$.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,$.jsx)(fD,{code:p,language:d}),(0,$.jsx)(fL,{code:p})]}),(0,$.jsx)(fP,{chart:p,config:l})]})}let h=fz(c,"code");return(0,$.jsx)(fI,{className:fw("overflow-x-auto border-t",t),code:p,"data-language":d,"data-streamdown":"code-block",language:d,preClassName:"overflow-x-auto font-mono text-xs p-4 bg-muted/40",children:h&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(fD,{code:p,language:d}),(0,$.jsx)(fL,{})]})})},(e,t)=>e.className===t.className&&fG(e.node,t.node));mn.displayName="MarkdownCode";var ma=(0,q.memo)(({node:e,className:t,src:r,alt:n,...a})=>{let i=async()=>{var e;if(r)try{let t=await (await fetch(r)).blob(),a=new URL(r,window.location.origin).pathname.split("/").pop()||"",i=a.includes(".")&&(null==(e=a.split(".").pop())?void 0:e.length)<=4,o="";if(i)o=a;else{let e=t.type,r="png";e.includes("jpeg")||e.includes("jpg")?r="jpg":e.includes("png")?r="png":e.includes("svg")?r="svg":e.includes("gif")?r="gif":e.includes("webp")&&(r="webp"),o=`${(n||a||"image").replace(/\.[^/.]+$/,"")}.${r}`}fx(o,t,t.type)}catch(e){console.error("Failed to download image:",e)}};return r?(0,$.jsxs)("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[(0,$.jsx)("img",{alt:n,className:fw("max-w-full rounded-lg",t),"data-streamdown":"image",src:r,...a}),(0,$.jsx)("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),(0,$.jsx)("button",{className:fw("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:i,title:"Download image",type:"button",children:(0,$.jsx)(cl,{size:14})})]}):null},(e,t)=>e.className===t.className&&fG(e.node,t.node));ma.displayName="MarkdownImg";var mi=(0,q.memo)(({children:e,className:t,node:r,...n})=>{var a;let i=(Array.isArray(e)?e:[e]).filter(e=>null!=e&&""!==e);return 1===i.length&&(0,q.isValidElement)(i[0])&&(null==(a=i[0].props.node)?void 0:a.tagName)==="img"?(0,$.jsx)($.Fragment,{children:e}):(0,$.jsx)("p",{className:t,...n,children:e})},(e,t)=>f$(e,t));mi.displayName="MarkdownParagraph";var mo={ol:fW,li:fq,ul:fV,hr:fY,strong:fQ,a:fK,h1:fX,h2:fJ,h3:fZ,h4:f0,h5:f1,h6:f2,table:f5,thead:f3,tbody:f4,tr:f6,th:f8,td:f9,blockquote:f7,code:mn,img:ma,pre:({children:e})=>e,sup:me,sub:mt,p:mi,section:mr},ms=/(!?\[)([^\]]*?)$/,ml=/(\*\*)([^*]*?)$/,mc=/(__)([^_]*?)$/,mu=/(\*\*\*)([^*]*?)$/,md=/(\*)([^*]*?)$/,mp=/(_)([^_]*?)$/,mh=/(`)([^`]*?)$/,mf=/(~~)([^~]*?)$/,mm=e=>{let t=(e.match(/```/g)||[]).length;return t>0&&t%2==0&&e.includes(`
|
|
144
|
+
`)},mg=(e,t)=>{let r=!1,n=!1;for(let a=0;a<e.length&&a<t;a++){if("\\"===e[a]&&"$"===e[a+1]){a++;continue}"$"===e[a]&&("$"===e[a+1]?(n=!n,a++,r=!1):n||(r=!r))}return r||n},my=(e,t)=>{let r="```"===e.substring(t,t+3),n=t>0&&"```"===e.substring(t-1,t+2),a=t>1&&"```"===e.substring(t-2,t+1);return r||n||a},mE={harden:[function({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:r=[],allowDataImages:n=!1,blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:i="text-gray-500"}){let o=t.length&&!t.every(e=>"*"===e),s=r.length&&!r.every(e=>"*"===e);if(!e&&(o||s))throw Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return o=>{var s,l,c,u,d,p;let h;n6(o,(s=e,l=t,c=r,u=n,d=a,p=i,h=(e,t,r)=>{if("element"!==e.type||e[ce])return!0;if("a"===e.tagName){let n=l7(e.properties.href,l,s,!1,!1);return null===n?(e[ce]=!0,n6(e,h),r&&"number"==typeof t&&(r.children[t]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:p},children:[...e.children,{type:"text",value:" [blocked]"}]}),n4):(e.properties.href=n,e.properties.target="_blank",e.properties.rel="noopener noreferrer",!0)}if("img"===e.tagName){let n=l7(e.properties.src,c,s,u,!0);if(null===n)return e[ce]=!0,n6(e,h),r&&"number"==typeof t&&(r.children[t]={type:"element",tagName:"span",properties:{class:d},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}),n4;e.properties.src=n}return!0}))}},{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],defaultOrigin:void 0,allowDataImages:!0}],raw:function(e){return function(t,r){return sP(t,{...e,file:r})}},katex:[function(e){let t=e||ia;return function(e,r){ir(e,"element",function(e,n){let a,i=Array.isArray(e.properties.className)?e.properties.className:ii,o=i.includes("language-math"),s=i.includes("math-display"),l=i.includes("math-inline"),c=s;if(!o&&!s&&!l)return;let u=n[n.length-1],d=e;if("code"===e.tagName&&o&&u&&"element"===u.type&&"pre"===u.tagName&&(d=u,u=n[n.length-2],c=!0),!u)return;let p=function(e,t){let r,n="children"in e?e.children:[],a=a6(e),i=a9(e,{whitespace:(t||{}).whitespace||"normal",breakBefore:!1,breakAfter:!1}),o=[];("text"===e.type||"comment"===e.type)&&o.push(...a8(e,{whitespace:i,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<n.length;)o.push(...function e(t,r,n){return"element"===t.type?function(t,r,n){let a,i,o=a9(t,n),s=t.children||[],l=-1,c=[];if(a4(t))return c;for(a1(t)||a3(t)&&aQ(r,t,a3)?i="\n":a5(t)?(a=2,i=2):a6(t)&&(a=1,i=1);++l<s.length;)c=c.concat(e(s[l],t,{whitespace:o,breakBefore:l?void 0:a,breakAfter:l<s.length-1?a1(s[l+1]):i}));return a2(t)&&aQ(r,t,a2)&&c.push(" "),a&&c.unshift(a),i&&c.push(i),c}(t,r,n):"text"===t.type?"normal"===n.whitespace?a8(t,n):[String(t.value)]:[]}(n[s],e,{whitespace:i,breakBefore:s?void 0:a,breakAfter:s<n.length-1?a1(n[s+1]):a}));let l=[];for(s=-1;++s<o.length;){let e=o[s];"number"==typeof e?void 0!==r&&e>r&&(r=e):e&&(void 0!==r&&r>-1&&l.push("\n".repeat(r)||" "),r=-1,l.push(e))}return l.join("")}(d,{whitespace:"pre"});try{a=a7.default.renderToString(p,{...t,displayMode:c,throwOnError:!0})}catch(o){let i=o.name.toLowerCase();r.message("Could not render math with KaTeX",{ancestors:[...n,e],cause:o,place:e.position,ruleId:i,source:"rehype-katex"});try{a=a7.default.renderToString(p,{...t,displayMode:c,strict:"ignore",throwOnError:!1})}catch{a=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(o)},children:[{type:"text",value:p}]}]}}if("string"==typeof a){var h,f,m;let e;a=(h=a,f={fragment:!0},aq(f?.fragment?(m=h,(e=document.createElement("template")).innerHTML=m,e.content):aY.parseFromString(h,"text/html"),{})||{type:"root",children:[]}).children}let g=u.children.indexOf(d);return u.children.splice(g,1,...a),it})}},{errorColor:"var(--color-muted-foreground)"}]},mb={gfm:[function(e){let t,r,n,a=e||l1,i=this.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),l=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push(rL([{text:lL},{document:{91:{name:"gfmFootnoteDefinition",tokenize:lz,continuation:{tokenize:lW},exit:lq}},text:{91:{name:"gfmFootnoteCall",tokenize:l$},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:lH,resolveTo:lG}}},(t=(a||{}).singleTilde,r={name:"strikethrough",tokenize:function(e,r,n){let a=this.previous,i=this.events,o=0;return function(s){return 126===a&&"characterEscape"!==i[i.length-1][1].type?n(s):(e.enter("strikethroughSequenceTemporary"),function i(s){let l=ne(a);if(126===s)return o>1?n(s):(e.consume(s),o++,i);if(o<2&&!t)return n(s);let c=e.exit("strikethroughSequenceTemporary"),u=ne(s);return c._open=!u||2===u&&!!l,c._close=!l||2===l&&!!u,r(s)}(s))}},resolveAll:function(e,t){let r=-1;for(;++r<e.length;)if("enter"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._close){let n=r;for(;n--;)if("exit"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._open&&e[r][1].end.offset-e[r][1].start.offset==e[n][1].end.offset-e[n][1].start.offset){e[r][1].type="strikethroughSequence",e[n][1].type="strikethroughSequence";let a={type:"strikethrough",start:Object.assign({},e[n][1].start),end:Object.assign({},e[r][1].end)},i={type:"strikethroughText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},o=[["enter",a,t],["enter",e[n][1],t],["exit",e[n][1],t],["enter",i,t]],s=t.parser.constructs.insideSpan.null;s&&rI(o,o.length,0,nt(s,e.slice(n+1,r),t)),rI(o,o.length,0,[["exit",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["exit",a,t]]),rI(e,n-1,r-n+3,o),r=n+o.length-2;break}}for(r=-1;++r<e.length;)"strikethroughSequenceTemporary"===e[r][1].type&&(e[r][1].type="data");return e}},null==t&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}}),{flow:{null:{name:"table",tokenize:lY,resolveAll:lQ}}},{text:{91:lZ}}])),s.push([{transforms:[s2],enter:{literalAutolink:sK,literalAutolinkEmail:sX,literalAutolinkHttp:sX,literalAutolinkWww:sX},exit:{literalAutolink:s1,literalAutolinkEmail:s0,literalAutolinkHttp:sJ,literalAutolinkWww:sZ}},{enter:{gfmFootnoteCallString:s6,gfmFootnoteCall:s8,gfmFootnoteDefinitionLabelString:s9,gfmFootnoteDefinition:s7},exit:{gfmFootnoteCallString:le,gfmFootnoteCall:lt,gfmFootnoteDefinitionLabelString:lr,gfmFootnoteDefinition:ln}},{canContainEols:["delete"],enter:{strikethrough:ll},exit:{strikethrough:lc}},{enter:{table:lm,tableData:lb,tableHeader:lb,tableRow:ly},exit:{codeText:lv,table:lg,tableData:lE,tableHeader:lE,tableRow:lE}},{exit:{taskListCheckValueChecked:l_,taskListCheckValueUnchecked:l_,paragraph:lA}}]),l.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:sY,notInConstruct:sQ},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:sY,notInConstruct:sQ},{character:":",before:"[ps]",after:"\\/",inConstruct:sY,notInConstruct:sQ}]},(n=!1,a&&a.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:function(e,t,r,a){let i=r.createTracker(a),o=i.move("[^"),s=r.enter("footnoteDefinition"),l=r.enter("label");return o+=i.move(r.safe(r.associationId(e),{before:o,after:"]"})),l(),o+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),o+=i.move((n?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),n?lo:li))),s(),o},footnoteReference:la},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ls}],handlers:{delete:lu}},function(e){let t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,a=t.stringLength,i=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,r){let n=lh(e,t,r);return r.stack.includes("tableCell")&&(n=n.replace(/\|/g,"\\$&")),n},table:function(e,t,r,n){return s(function(e,t,r){let n=e.children,a=-1,i=[],o=t.enter("table");for(;++a<n.length;)i[a]=l(n[a],t,r);return o(),i}(e,r,n),e.align)},tableCell:o,tableRow:function(e,t,r,n){let a=s([l(e,r,n)]);return a.slice(0,a.indexOf("\n"))}}};function o(e,t,r,n){let a=r.enter("tableCell"),o=r.enter("phrasing"),s=r.containerPhrasing(e,{...n,before:i,after:i});return o(),a(),s}function s(e,t){return function(e,t){let r=t||{},n=(r.align||[]).concat(),a=r.stringLength||ld,i=[],o=[],s=[],l=[],c=0,u=-1;for(;++u<e.length;){let t=[],n=[],i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){var d;let o=null==(d=e[u][i])?"":String(d);if(!1!==r.alignDelimiters){let e=a(o);n[i]=e,(void 0===l[i]||e>l[i])&&(l[i]=e)}t.push(o)}o[u]=t,s[u]=n}let p=-1;if("object"==typeof n&&"length"in n)for(;++p<c;)i[p]=lp(n[p]);else{let e=lp(n);for(;++p<c;)i[p]=e}p=-1;let h=[],f=[];for(;++p<c;){let e=i[p],t="",n="";99===e?(t=":",n=":"):108===e?t=":":114===e&&(n=":");let a=!1===r.alignDelimiters?1:Math.max(1,l[p]-t.length-n.length),o=t+"-".repeat(a)+n;!1!==r.alignDelimiters&&((a=t.length+a+n.length)>l[p]&&(l[p]=a),f[p]=a),h[p]=o}o.splice(1,0,h),s.splice(1,0,f),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];p=-1;let n=[];for(;++p<c;){let a=e[p]||"",o="",s="";if(!1!==r.alignDelimiters){let e=l[p]-(t[p]||0),r=i[p];114===r?o=" ".repeat(e):99===r?e%2?(o=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):s=o=" ".repeat(e/2):s=" ".repeat(e)}!1===r.delimiterStart||p||n.push("|"),!1!==r.padding&&(!1!==r.alignDelimiters||""!==a)&&(!1!==r.delimiterStart||p)&&n.push(" "),!1!==r.alignDelimiters&&n.push(o),n.push(a),!1!==r.alignDelimiters&&n.push(s),!1!==r.padding&&n.push(" "),(!1!==r.delimiterEnd||p!==c-1)&&n.push("|")}m.push(!1===r.delimiterEnd?n.join("").replace(/ +$/,""):n.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:n,padding:r,stringLength:a})}function l(e,t,r){let n=e.children,a=-1,i=[],s=t.enter("tableRow");for(;++a<n.length;)i[a]=o(n[a],e,t,r);return s(),i}}(a),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:lk}}]})},{}],math:[function(e){let t,r=e||l6,n=this.data(),a=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);a.push({flow:{36:l2},text:{36:(null==(t=(r||{}).singleDollarTextMath)&&(t=!0),{tokenize:function(e,r,n){let a,i,o=0;return function(r){return e.enter("mathText"),e.enter("mathTextSequence"),function r(a){return 36===a?(e.consume(a),o++,r):o<2&&!t?n(a):(e.exit("mathTextSequence"),s(a))}(r)};function s(t){return null===t?n(t):36===t?(i=e.enter("mathTextSequence"),a=0,function t(n){return 36===n?(e.consume(n),a++,t):a===o?(e.exit("mathTextSequence"),e.exit("mathText"),r(n)):(i.type="mathTextData",l(n))}(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):rH(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("mathTextData"),l(t))}function l(t){return null===t||32===t||36===t||rH(t)?(e.exit("mathTextData"),s(t)):(e.consume(t),l)}},resolve:l3,previous:l4,name:"mathText"})}}),i.push(function(){return{enter:{mathFlow:function(e){this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[{type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]}]}},e)},mathFlowFenceMeta:function(){this.buffer()},mathText:function(e){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},e),this.buffer()}},exit:{mathFlow:function(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),r=this.stack[this.stack.length-1];tv("math"===r.type),this.exit(e),r.value=t;let n=r.data.hChildren[0];tv("element"===n.type),tv("code"===n.tagName),n.children.push({type:"text",value:t}),this.data.mathFlowInside=void 0},mathFlowFence:function(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)},mathFlowFenceMeta:function(){let e=this.resume(),t=this.stack[this.stack.length-1];tv("math"===t.type),t.meta=e},mathFlowValue:e,mathText:function(e){let t=this.resume(),r=this.stack[this.stack.length-1];tv("inlineMath"===r.type),this.exit(e),r.value=t,r.data.hChildren.push({type:"text",value:t})},mathTextData:e}};function e(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}()),o.push(function(e){let t=(e||{}).singleDollarTextMath;return null==t&&(t=!0),r.peek=function(){return"$"},{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:"\n",inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:function(e,t,r,n){let a=e.value||"",i=r.createTracker(n),o="$".repeat(Math.max(function(e,t){let r=String(e),n=r.indexOf("$"),a=n,i=0,o=0;!1;for(;-1!==n;)n===a?++i>o&&(o=i):i=1,a=n+1,n=r.indexOf("$",a);return o}(a,"$")+1,2)),s=r.enter("mathFlow"),l=i.move(o);if(e.meta){let t=r.enter("mathFlowMeta");l+=i.move(r.safe(e.meta,{after:"\n",before:l,encode:["$"],...i.current()})),t()}return l+=i.move("\n"),a&&(l+=i.move(a+"\n")),l+=i.move(o),s(),l},inlineMath:r}};function r(e,r,n){let a=e.value||"",i=1;for(!t&&i++;RegExp("(^|[^$])"+"\\$".repeat(i)+"([^$]|$)").test(a);)i++;let o="$".repeat(i);/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^\$|\$$/.test(a))&&(a=" "+a+" ");let s=-1;for(;++s<n.unsafe.length;){let e,t=n.unsafe[s];if(!t.atBreak)continue;let r=n.compilePattern(t);for(;e=r.exec(a);){let t=e.index;10===a.codePointAt(t)&&13===a.codePointAt(t-1)&&t--,a=a.slice(0,t)+" "+a.slice(e.index+1)}}return o+a+o}}(r))},{singleDollarTextMath:!1}]},mv=(0,q.createContext)(["github-light","github-dark"]),mT=(0,q.createContext)(void 0),m_=(0,q.createContext)(!0),mA=(0,q.createContext)({isAnimating:!1}),mk=(0,q.memo)(({content:e,shouldParseIncompleteMarkdown:t,...r})=>{let n=(0,q.useMemo)(()=>"string"==typeof e&&t?(e=>{if(!e||"string"!=typeof e)return e;let t=e,r=(e=>{let t=e.match(/(!?)\[([^\]]+)\]\(([^)]+)$/);if(t){let r="!"===t[1],n=t[2],a=t[3],i=e.lastIndexOf(`${r?"!":""}[${n}](${a}`),o=e.substring(0,i);return r?o:`${o}[${n}](streamdown:incomplete-link)`}let r=e.match(ms);if(r){if(r[1].startsWith("!")){let t=e.lastIndexOf(r[1]);return e.substring(0,t)}return`${e}](streamdown:incomplete-link)`}return e})(t);return r.endsWith("](streamdown:incomplete-link)")?r:t=(e=>{if((e.match(/\$\$/g)||[]).length%2==0)return e;let t=e.indexOf("$$");return -1===t||-1===e.indexOf(`
|
|
145
|
+
`,t)||e.endsWith(`
|
|
146
|
+
`)?`${e}$$`:`${e}
|
|
147
|
+
$$`})(t=(e=>{let t=e.match(mf);if(t){let r=t[2];if(!r||/^[\s_~*`]*$/.test(r))return e;if((e.match(/~~/g)||[]).length%2==1)return`${e}~~`}return e})(t=(e=>{if(e.match(/^```[^`\n]*```?$/)&&!e.includes(`
|
|
148
|
+
`))return e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e;let t=(e.match(/```/g)||[]).length;if(t>0&&t%2==0&&e.includes(`
|
|
149
|
+
`)||(e.endsWith("```\n")||e.endsWith("```"))&&t%2==0)return e;let r=e.match(mh);if(r&&t%2!=1){let t=r[2];if(!t||/^[\s_~*`]*$/.test(t))return e;if((e=>{let t=0;for(let r=0;r<e.length;r++)"`"===e[r]&&!my(e,r)&&t++;return t})(e)%2==1)return`${e}\``}return e})(t=(e=>{if(mm(e))return e;if(e.match(mp)){let t=-1;for(let r=0;r<e.length;r++)if("_"===e[r]&&"_"!==e[r-1]&&"_"!==e[r+1]&&"\\"!==e[r-1]&&!mg(e,r)){let n=r>0?e[r-1]:"",a=r<e.length-1?e[r+1]:"";if(n&&a&&/[\p{L}\p{N}_]/u.test(n)&&/[\p{L}\p{N}_]/u.test(a))continue;t=r;break}if(-1===t)return e;let r=e.substring(t+1);if(!r||/^[\s_~*`]*$/.test(r))return e;if(e.split("").reduce((t,r,n)=>{if("_"===r){let r=e[n-1],a=e[n+1];if("\\"===r||mg(e,n)||r&&a&&/[\p{L}\p{N}_]/u.test(r)&&/[\p{L}\p{N}_]/u.test(a))return t;if("_"!==r&&"_"!==a)return t+1}return t},0)%2==1){let t=e.match(/\n+$/);return t?`${e.slice(0,-t[0].length)}_${t[0]}`:`${e}_`}}return e})(t=(e=>{if(mm(e))return e;if(e.match(md)){let t=-1;for(let r=0;r<e.length;r++)if("*"===e[r]&&"*"!==e[r-1]&&"*"!==e[r+1]){t=r;break}if(-1===t)return e;let r=e.substring(t+1);if(!r||/^[\s_~*`]*$/.test(r))return e;if(e.split("").reduce((t,r,n)=>{if("*"===r){let r=e[n-1],a=e[n+1];if("\\"===r)return t;let i=n;for(let t=n-1;t>=0;t--){if(e[t]===`
|
|
150
|
+
`){i=t+1;break}if(0===t){i=0;break}}if(""===e.substring(i,n).trim()&&(" "===a||" "===a))return t;if("*"!==r&&"*"!==a)return t+1}return t},0)%2==1)return`${e}*`}return e})(t=(e=>{let t=e.match(mc);if(t){let r=t[2];if(!r||/^[\s_~*`]*$/.test(r))return e;let n=e.lastIndexOf(t[1]),a=e.substring(0,n).lastIndexOf(`
|
|
151
|
+
`),i=e.substring(-1===a?0:a+1,n);if(/^[\s]*[-*+][\s]+$/.test(i)&&r.includes(`
|
|
152
|
+
`))return e;if((e.match(/__/g)||[]).length%2==1)return`${e}__`}return e})(t=(e=>{if(mm(e))return e;let t=e.match(ml);if(t){let r=t[2];if(!r||/^[\s_~*`]*$/.test(r))return e;let n=e.lastIndexOf(t[1]),a=e.substring(0,n).lastIndexOf(`
|
|
153
|
+
`),i=e.substring(-1===a?0:a+1,n);if(/^[\s]*[-*+][\s]+$/.test(i)&&r.includes(`
|
|
154
|
+
`))return e;if((e.match(/\*\*/g)||[]).length%2==1)return`${e}**`}return e})(t=(e=>{if(mm(e)||/^\*{4,}$/.test(e))return e;let t=e.match(mu);if(t){let r=t[2];if(!r||/^[\s_~*`]*$/.test(r))return e;if((e=>{let t=0;for(let r of e.match(/\*+/g)||[]){let e=r.length;e>=3&&(t+=Math.floor(e/3))}return t})(e)%2==1)return`${e}***`}return e})(t=r))))))))})(e.trim()):e,[e,t]);return(0,$.jsx)(aB,{...r,children:n})},(e,t)=>e.content===t.content);mk.displayName="Block";var mw=(0,q.memo)(({children:e,parseIncompleteMarkdown:t=!0,components:r,rehypePlugins:n=Object.values(mE),remarkPlugins:a=Object.values(mb),className:i,shikiTheme:o=["github-light","github-dark"],mermaidConfig:s,controls:l=!0,isAnimating:c=!1,...u})=>{let d=(0,q.useId)(),p=(0,q.useMemo)(()=>(e=>{let t=/\[\^[^\]\s]{1,200}\](?!:)/.test(e),r=/\[\^[^\]\s]{1,200}\]:/.test(e);if(t||r)return[e];let n=fk.Lexer.lex(e,{gfm:!0}),a=[],i=[];for(let e=0;e<n.length;e++){let t=n[e],r=t.raw;if(i.length>0){if(a[a.length-1]+=r,"html"===t.type){let e=r.match(/<\/(\w+)>/);if(e){let t=e[1];i[i.length-1]===t&&i.pop()}}continue}if("html"===t.type&&t.block){let e=r.match(/<(\w+)[\s>]/);if(e){let t=e[1];r.includes(`</${t}>`)||i.push(t)}}if("$$"===r.trim()&&a.length>0){let e=a.at(-1);if(!e){a.push(r);continue}let t=e.trimStart().startsWith("$$"),n=(e.match(/\$\$/g)||[]).length;if(t&&n%2==1){a[a.length-1]=e+r;continue}}if(a.length>0&&r.trimEnd().endsWith("$$")){let e=a.at(-1);if(!e){a.push(r);continue}let t=e.trimStart().startsWith("$$"),n=(e.match(/\$\$/g)||[]).length,i=(r.match(/\$\$/g)||[]).length;if(t&&n%2==1&&!r.trimStart().startsWith("$$")&&1===i){a[a.length-1]=e+r;continue}}a.push(r)}return a})("string"==typeof e?e:""),[e]);return(0,$.jsx)(mv.Provider,{value:o,children:(0,$.jsx)(mT.Provider,{value:s,children:(0,$.jsx)(m_.Provider,{value:l,children:(0,$.jsx)(mA.Provider,{value:{isAnimating:c},children:(0,$.jsx)("div",{className:fw("space-y-4",i),children:p.map((e,i)=>(0,$.jsx)(mk,{components:{...mo,...r},content:e,rehypePlugins:n,remarkPlugins:a,shouldParseIncompleteMarkdown:t,...u},`${d}-block-${i}`))})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating);function mx({messages:e}){return 0===e.length?(0,$.jsx)("div",{className:"text-center py-8 text-[11px]",style:{color:"var(--ds-gray-600)"},children:"No messages"}):(0,$.jsx)("div",{className:"flex flex-col gap-3 max-h-[400px] overflow-y-auto p-3",children:e.map((e,t)=>(0,$.jsx)(mS,{message:e},t))})}function mS({message:e}){var t;let r=e.role,n="string"==typeof(t=e.content)?[{type:"text",text:t}]:Array.isArray(t)?t.map(e=>"string"==typeof e?{type:"text",text:e}:e?.type==="text"?{type:"text",text:String(e.text??"")}:e?.type==="tool-call"?{type:"tool-call",toolName:e.toolName,input:e.input}:e?.type==="tool-result"?{type:"tool-result",toolName:e.toolName,output:e.output}:{type:"text",text:""}):[],a=function(e){switch(e){case"user":return{bg:"var(--ds-blue-100)",border:"var(--ds-blue-300)",label:"var(--ds-blue-700)"};case"assistant":default:return{bg:"var(--ds-gray-100)",border:"var(--ds-gray-300)",label:"var(--ds-gray-700)"};case"system":return{bg:"var(--ds-amber-100)",border:"var(--ds-amber-300)",label:"var(--ds-amber-700)"};case"tool":return{bg:"var(--ds-green-50)",border:"var(--ds-green-300)",label:"var(--ds-green-700)"}}}(r);return(0,$.jsxs)("div",{className:"rounded-md border text-[11px]",style:{backgroundColor:a.bg,borderColor:a.border},children:[(0,$.jsx)("div",{className:"px-2.5 py-1 border-b text-[10px] font-medium uppercase tracking-wide",style:{borderColor:a.border,color:a.label},children:r}),(0,$.jsx)("div",{className:"px-2.5 py-2 space-y-2",children:n.map((e,t)=>(0,$.jsx)(mC,{part:e,role:r},t))})]})}function mC({part:e,role:t}){if("text"===e.type)return e.text?"assistant"===t?(0,$.jsx)("div",{className:"prose prose-sm max-w-none text-[11px] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",style:{color:"var(--ds-gray-1000)"},children:(0,$.jsx)(mw,{children:e.text})}):(0,$.jsx)("div",{className:"whitespace-pre-wrap break-words",style:{color:"var(--ds-gray-1000)"},children:e.text}):null;if("tool-call"===e.type)return(0,$.jsxs)("div",{className:"rounded border px-2 py-1.5",style:{backgroundColor:"var(--ds-purple-100)",borderColor:"var(--ds-purple-300)"},children:[(0,$.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] font-medium",children:[(0,$.jsx)("span",{children:"\uD83D\uDD27"}),(0,$.jsx)("span",{style:{color:"var(--ds-purple-900)"},children:e.toolName})]}),null!=e.input&&(0,$.jsx)("pre",{className:"mt-1.5 text-[10px] overflow-x-auto p-1.5 rounded",style:{backgroundColor:"var(--ds-gray-100)",color:"var(--ds-gray-800)"},children:"string"==typeof e.input?e.input:JSON.stringify(e.input,null,2)})]});if("tool-result"===e.type){let t=function(e){if(null==e)return null;let t="string"==typeof e?e:JSON.stringify(e,null,2);return t.length>500?`${t.slice(0,500)}...`:t}(e.output);return(0,$.jsxs)("div",{className:"rounded border px-2 py-1.5",style:{backgroundColor:"var(--ds-green-100)",borderColor:"var(--ds-green-300)"},children:[(0,$.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] font-medium",children:[(0,$.jsx)("span",{children:"✓"}),(0,$.jsxs)("span",{style:{color:"var(--ds-green-900)"},children:[e.toolName," result"]})]}),t&&(0,$.jsx)("pre",{className:"mt-1.5 text-[10px] overflow-x-auto max-h-[80px] p-1.5 rounded",style:{backgroundColor:"var(--ds-gray-100)",color:"var(--ds-gray-800)"},children:t})]})}return null}function mN({summary:e,children:t}){return(0,$.jsxs)("details",{className:"group",children:[(0,$.jsx)("summary",{className:"cursor-pointer rounded-md border px-2.5 py-1.5 text-xs hover:brightness-95",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)",color:"var(--ds-gray-900)"},children:e}),(0,$.jsxs)("div",{className:"relative pl-6 mt-3",children:[(0,$.jsx)("div",{className:"absolute left-3 -top-3 w-px h-3",style:{backgroundColor:"var(--ds-gray-400)"}}),(0,$.jsx)("div",{className:"absolute left-3 top-0 w-3 h-3 border-l border-b rounded-bl-lg",style:{borderColor:"var(--ds-gray-400)"}}),(0,$.jsx)("div",{className:"absolute left-6 top-3 w-0 h-px -translate-y-px",style:{backgroundColor:"var(--ds-gray-400)"}}),(0,$.jsx)("div",{children:t})]})]})}function mI({conversation:e,args:t}){let[r,n]=(0,q.useState)("conversation");return(0,$.jsx)(mN,{summary:`Input (${e.length} messages)`,children:(0,$.jsxs)("div",{className:"rounded-md border",style:{borderColor:"var(--ds-gray-300)"},children:[(0,$.jsxs)("div",{className:"flex gap-1 border-b",style:{borderColor:"var(--ds-gray-300)"},children:[(0,$.jsx)("button",{type:"button",onClick:()=>n("conversation"),className:"px-3 py-1.5 text-[11px] font-medium transition-colors",style:{color:"conversation"===r?"var(--ds-gray-1000)":"var(--ds-gray-600)",borderBottom:"conversation"===r?"2px solid var(--ds-blue-600)":"2px solid transparent",marginBottom:"-1px"},children:"Conversation"}),(0,$.jsx)("button",{type:"button",onClick:()=>n("json"),className:"px-3 py-1.5 text-[11px] font-medium transition-colors",style:{color:"json"===r?"var(--ds-gray-1000)":"var(--ds-gray-600)",borderBottom:"json"===r?"2px solid var(--ds-blue-600)":"2px solid transparent",marginBottom:"-1px"},children:"Raw JSON"})]}),"conversation"===r?(0,$.jsx)(mx,{messages:e}):(0,$.jsx)("div",{className:"p-3 max-h-[400px] overflow-y-auto",children:Array.isArray(t)?t.map((e,t)=>(0,$.jsx)("div",{className:"mt-2 first:mt-0",children:mL(e)},t)):mL(t)})]})})}mw.displayName="Streamdown";let mR=(0,q.createContext)(void 0),mD=({streamRef:e})=>{let t=(0,q.useContext)(mR);return(0,$.jsxs)("button",{type:"button",onClick:()=>{t&&t(e.streamId)},className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono cursor-pointer hover:opacity-80 transition-opacity",style:{backgroundColor:"var(--ds-blue-200)",color:"var(--ds-blue-900)",border:"1px solid var(--ds-blue-400)"},title:`Click to view stream: ${e.streamId}`,children:[(0,$.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("title",{children:"Stream icon"}),(0,$.jsx)("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"}),(0,$.jsx)("circle",{cx:"12",cy:"12",r:"3"})]}),e.streamId.length>40?`${e.streamId.slice(0,20)}...${e.streamId.slice(-15)}`:e.streamId]})},mL=e=>{let t,r,n,{json:a,streamRefs:i}=(t=new Map,r=0,{json:JSON.stringify((n=e=>{if(null!==e&&"object"==typeof e&&"__type"in e&&"__workflow_stream_ref__"===e.__type&&"streamId"in e&&"string"==typeof e.streamId){let n=`__STREAM_REF_${r++}__`;return t.set(n,e),n}if(Array.isArray(e))return e.map(n);if(null!==e&&"object"==typeof e){let t={};for(let[r,a]of Object.entries(e))t[r]=n(a);return t}return e})(e),null,2),streamRefs:t});if(0===i.size)return(0,$.jsx)("pre",{className:"text-[11px] overflow-x-auto rounded-md border p-3",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)",color:"var(--ds-gray-1000)"},children:(0,$.jsx)("code",{children:a})});let o=[],s=a,l=0;for(let[e,t]of i){let r=s.indexOf(`"${e}"`);-1!==r&&(r>0&&o.push(s.slice(0,r)),o.push((0,$.jsx)(mD,{streamRef:t},l++)),s=s.slice(r+e.length+2))}return s&&o.push(s),(0,$.jsx)("pre",{className:"text-[11px] overflow-x-auto rounded-md border p-3",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)",color:"var(--ds-gray-1000)"},children:(0,$.jsx)("code",{children:o})})},mO=["workflowName","stepName","status","stepId","hookId","eventId","runId","attempt","token","correlationId","eventType","deploymentId","ownerId","projectId","environment","executionContext","createdAt","startedAt","updatedAt","completedAt","expiredAt","retryAfter","error","metadata","eventData","input","output","resumeAt"],mP=(e,t)=>(mO.indexOf(e)||0)-(mO.indexOf(t)||0),mM=e=>(e instanceof Date?e:new Date("number"==typeof e?e:"string"==typeof e?e:String(e))).toLocaleString(void 0,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",fractionalSecondDigits:3}),mF={workflowName:e=>(0,H.parseWorkflowName)(String(e))?.shortName??"?",stepName:e=>(0,H.parseStepName)(String(e))?.shortName??"?",runId:e=>String(e),stepId:e=>String(e),hookId:e=>String(e),eventId:e=>String(e),status:e=>String(e),attempt:e=>String(e),token:e=>String(e),eventType:e=>String(e),correlationId:e=>String(e),deploymentId:e=>String(e),ownerId:e=>null,projectId:e=>null,environment:e=>null,executionContext:e=>null,createdAt:mM,startedAt:mM,updatedAt:mM,completedAt:mM,expiredAt:mM,retryAfter:mM,resumeAt:mM,metadata:mL,input:(e,t)=>{if(e&&"object"==typeof e&&"args"in e){let{args:r,closureVars:n}=e,a=Array.isArray(r)?r.length:0,i=n&&Object.keys(n).length>0;if(t?.stepName&&(0,X.isDoStreamStep)(t.stepName)){let e=(0,X.extractConversation)(r);if(e&&e.length>0)return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(mI,{conversation:e,args:r}),i&&(0,$.jsx)(mN,{summary:"Closure Variables",children:mL(n)})]})}return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(mN,{summary:`Input (${a} arguments)`,children:Array.isArray(r)?r.map((e,t)=>(0,$.jsx)("div",{className:"mt-2",children:mL(e)},t)):mL(r)}),i&&(0,$.jsx)(mN,{summary:"Closure Variables",children:mL(n)})]})}let r=Array.isArray(e)?e.length:0;return(0,$.jsx)(mN,{summary:`Input (${r} arguments)`,children:Array.isArray(e)?e.map((e,t)=>(0,$.jsx)("div",{className:"mt-2",children:mL(e)},t)):mL(e)})},output:e=>(0,$.jsx)(mN,{summary:"Output",children:mL(e)}),error:e=>e&&"object"==typeof e&&"message"in e?(0,$.jsx)(mN,{summary:"Error",children:(0,$.jsxs)("div",{className:"flex flex-col gap-2",children:[e.code&&(0,$.jsxs)("div",{children:[(0,$.jsxs)("span",{className:"text-[11px] font-medium",style:{color:"var(--ds-gray-700)"},children:["Error Code:"," "]}),(0,$.jsx)("code",{className:"text-[11px]",style:{color:"var(--ds-gray-1000)"},children:e.code})]}),(0,$.jsx)("pre",{className:"text-[11px] overflow-x-auto rounded-md border p-3",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)",color:"var(--ds-gray-1000)",whiteSpace:"pre-wrap"},children:(0,$.jsx)("code",{children:e.stack||e.message})})]})}):(0,$.jsx)(mN,{summary:"Error",children:(0,$.jsx)("pre",{className:"text-[11px] overflow-x-auto rounded-md border p-3",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)",color:"var(--ds-gray-1000)",whiteSpace:"pre-wrap"},children:(0,$.jsx)("code",{children:String(e)})})}),eventData:e=>(0,$.jsx)(mN,{summary:"Event Data",children:mL(e)})},mB=["input","output","error","metadata","eventData"],mj=()=>(0,$.jsx)("div",{className:"text-copy-12 rounded-md border p-4 my-2",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)",color:"var(--ds-gray-700)"},children:(0,$.jsx)("span",{children:"The data for this run has expired and is no longer available."})}),mU=({attribute:e,value:t,isLoading:r,inline:n=!1,context:a})=>{let i=mF[e];if(!i)return null;let o=i(t,a);return o?n?(0,$.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,$.jsx)("span",{className:"text-[11px] font-medium",style:{color:"var(--ds-gray-500)"},children:e}),(0,$.jsx)("span",{className:"text-[11px]",style:{color:"var(--ds-gray-1000)"},children:o})]}):(0,$.jsxs)("div",{className:"relative",children:["boolean"==typeof r&&r&&(0,$.jsx)("div",{className:"absolute top-9 right-4",children:(0,$.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2",style:{borderColor:"var(--ds-gray-900)"}})}),(0,$.jsxs)("div",{className:"flex flex-col gap-0 my-2",children:[(0,$.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--ds-gray-500)"},children:e}),(0,$.jsx)("span",{className:"text-xs",style:{color:"var(--ds-gray-1000)"},children:o})]},e)]}):null},mH=({data:e,isLoading:t,error:r,expiredAt:n,onStreamClick:a})=>{let i=null!=n&&new Date(n)<new Date,o=Object.keys(e).filter(e=>!mB.includes(e)).sort(mP),s=Object.keys(e).filter(e=>mB.includes(e)).sort(mP),l=o.filter(t=>{let r=mF[t];return!!r&&null!==r(e[t])}),c=(0,q.useMemo)(()=>({stepName:e.stepName}),[e.stepName]);return(0,$.jsx)(mR.Provider,{value:a,children:(0,$.jsxs)("div",{children:[l.length>0&&(0,$.jsx)("div",{className:"flex flex-col divide-y rounded-lg border mb-3 overflow-hidden",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)"},children:l.map(t=>(0,$.jsxs)("div",{className:"flex items-center justify-between px-3 py-1.5",style:{borderColor:"var(--ds-gray-300)"},children:[(0,$.jsx)("span",{className:"text-[11px] font-medium",style:{color:"var(--ds-gray-500)"},children:t}),(0,$.jsx)("span",{className:"text-[11px] font-mono",style:{color:"var(--ds-gray-1000)"},children:mF[t]?.(e[t])})]},t))}),r?(0,$.jsxs)(Z,{variant:"destructive",className:"my-4",children:[(0,$.jsx)(W,{className:"h-4 w-4"}),(0,$.jsx)(ee,{children:"Failed to load resource details"}),(0,$.jsx)(et,{className:"text-sm",children:r.message})]}):i?(0,$.jsx)(mj,{}):s.map(r=>(0,$.jsx)(mU,{isLoading:t,attribute:r,value:e[r],context:c},r))]})})};function mG({correlationId:e,env:t,events:r,expiredAt:n}){let a=null!=n&&new Date(n)<new Date,i=(0,q.useCallback)(()=>(0,tE.fetchEventsByCorrelationId)(t,e,{sortOrder:"asc",limit:100,withData:!a}).then(e=>{if(!e.success)throw Error(e.error?.message||"Failed to fetch events");return(0,tb.convertEventsToSpanEvents)(e.data.data||[],!1)}),[t,e,a]),{data:o,error:s,isLoading:l}=ty(["workflow","events",e],i,{fallbackData:r,revalidateOnFocus:!1}),c=(o?.length?o:r)||[];return(0,$.jsxs)("div",{className:"mt-2",style:{color:"var(--ds-gray-1000)"},children:[(0,$.jsxs)("h3",{className:"text-heading-16 font-medium mt-4 mb-2",style:{color:"var(--ds-gray-1000)"},children:["Events ",!l&&`(${c.length})`]}),s?(0,$.jsxs)(Z,{variant:"destructive",className:"my-4",children:[(0,$.jsx)(W,{className:"h-4 w-4"}),(0,$.jsx)(ee,{children:"Failed to load event data"}),(0,$.jsx)(et,{className:"text-sm",children:s.message})]}):null,l?(0,$.jsx)("div",{children:"Loading events..."}):null,!l&&!s&&0===c.length&&(0,$.jsx)("div",{className:"text-sm",children:"No events found"}),c.length>0&&!s?(0,$.jsx)("div",{className:"flex flex-col gap-2",children:c.map((e,t)=>(0,$.jsxs)(mN,{summary:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("span",{className:"font-medium",style:{color:"var(--ds-gray-1000)"},children:e.name})," ","-"," ",(0,$.jsx)("span",{style:{color:"var(--ds-gray-700)"},children:mM(1e3*e.timestamp[0]+e.timestamp[1]/1e6)})]}),children:[(0,$.jsx)("div",{className:"flex flex-col divide-y rounded-md border overflow-hidden",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)"},children:Object.entries(e.attributes).filter(([e])=>"eventData"!==e).map(([e,t])=>(0,$.jsxs)("div",{className:"flex items-center justify-between px-2.5 py-1.5",style:{borderColor:"var(--ds-gray-300)"},children:[(0,$.jsx)("span",{className:"text-[11px] font-medium",style:{color:"var(--ds-gray-500)"},children:e}),(0,$.jsx)("span",{className:"text-[11px] font-mono",style:{color:"var(--ds-gray-1000)"},children:String(t)})]},e))}),s&&(0,$.jsx)("div",{className:"text-xs text-red-500 mt-2",children:"Error loading event data"}),!s&&!l&&e.attributes.eventData&&(0,$.jsx)("div",{className:"mt-2",children:(0,$.jsx)(mU,{isLoading:l,attribute:"eventData",value:e.attributes.eventData})})]},`${e.name}-${t}`))}):null]})}let m$={root:{startTime:0,endTime:1,duration:1,depth:0,children:[]},spanMap:{},resourceMap:{},filter:"",selected:null,baseScale:1,scaleRatio:1,scale:1,width:640,height:480,timelineWidth:640,timelineHeight:480,panelWidth:380,panelHeight:480,scrollbarWidth:0,timelineRef:{current:null},scrollSnapshotRef:{current:void 0},memoCacheRef:{current:new Map},getQuickLinks:()=>[],withPanel:!1,isMobile:!1,customPanelComponent:null},mz=e=>(e.width-e.scrollbarWidth-Number(!!(e.selected&&e.withPanel))*e.panelWidth)/e.root.duration,mW=(0,q.createContext)({state:m$,dispatch:()=>{}});mW.displayName="TraceViewerContext";let mq=(e,t)=>{switch(t.type){case"setRoot":return e.scrollSnapshotRef.current=void 0,e.memoCacheRef.current.clear(),mq({...e,root:t.root,spanMap:t.spanMap,resourceMap:Object.fromEntries(t.resources.map(({name:e,attributes:t})=>[e,t]))},{type:"detectBaseScale"});case"setSize":{let r=t.height-56-40-24,n=e.withPanel&&t.width<=768,a={...e,width:t.width,height:t.height,timelineWidth:t.width-Number(!!(e.selected&&e.withPanel&&!n))*e.panelWidth,timelineHeight:r,panelHeight:r,isMobile:n};return a.width!==e.width&&(a=mq(a,{type:"detectBaseScale"})),a}case"setPanelWidth":{let r=Math.max(240,Math.min(t.width,e.width-240));return{...e,timelineWidth:e.width-r,panelWidth:r}}case"setFilter":return{...e,filter:t.filter};case"deselect":return mq({...e,selected:null,timelineWidth:e.width},{type:"minScale"});case"select":{let r=e.spanMap[t.id];if(!r)return e;return{...e,selected:r,timelineWidth:e.width-(e.withPanel&&!e.isMobile?e.panelWidth:0)}}case"escape":if(e.selected)return mq(e,{type:"deselect"});return mq(e,{type:"resetScale"});case"toggleSelection":{let r=e;if(e.selected&&(r=mq(r,{type:"deselect"})),e.selected?.span.spanId===t.id)return r;return mq(r,{type:"select",id:t.id})}case"detectBaseScale":{let t=(e.width-e.scrollbarWidth)/e.root.duration;return{...e,baseScale:t,scale:t*e.scaleRatio}}case"setScale":return{...e,scaleRatio:t.scale,scale:e.baseScale*t.scale};case"resetScale":return mq(e,{type:"scaleToRange",t1:e.root.startTime,t2:e.root.endTime});case"scaleToNode":{let r=e.spanMap[t.id];if(!r)return e;return mq(mq(e,{type:"setScale",scale:(e.width-e.scrollbarWidth-(e.withPanel&&!e.isMobile?e.panelWidth:0))/r.duration/e.baseScale}),{type:"setScrollSnapshot",anchorT:r.startTime-e.root.startTime,anchorX:0})}case"scaleToRange":{let r=Math.abs(t.t1-t.t2);return mq(mq(e,{type:"setScale",scale:(e.width-e.scrollbarWidth-(e.selected&&e.withPanel?e.panelWidth:0))/r/e.baseScale}),{type:"setScrollSnapshot",anchorT:Math.min(t.t1,t.t2)-e.root.startTime,anchorX:0})}case"adjustScaleRatio":{let{scaleRatio:r}=e;switch(t.direction){case -1:r*=.8;break;case 1:r*=1.25;break;default:r=1}let n=e.timelineRef.current;if(!n)return console.warn("timelineRef is null"),e;let{clientWidth:a,scrollLeft:i}=n;return mq(mq({...e,scaleRatio:r,scale:e.baseScale*r},{type:"minScale"}),{type:"setScrollSnapshot",anchorT:(i+.5*a)/e.scale,anchorX:.5*a})}case"trackpadScale":{let r=Math.max(mz(e)/e.baseScale,e.scaleRatio*(1+.2*Math.sign(t.delta)*Math.sqrt(Math.abs(t.delta))));return mq({...e,scaleRatio:r,scale:e.baseScale*r},{type:"setScrollSnapshot",anchorT:t.anchorT,anchorX:t.anchorX})}case"minScale":{let t=mz(e);if(e.scale>=t)return e;return{...e,scale:t,scaleRatio:t/e.baseScale}}case"setScrollSnapshot":{let r=e.timelineRef.current;if(!r)return e;let{anchorT:n,anchorX:a}=t,i=n*e.scale-a,{scrollTop:o}=r,s=(o-24-8)/26,l=s+Math.ceil(e.timelineHeight/26);return e.scrollSnapshotRef.current={anchorT:n,anchorX:a,scrollLeft:i,scrollTop:o,startTime:e.root.startTime+i/e.scale,endTime:e.root.startTime+(i+e.timelineWidth)/e.scale,startRow:s,endRow:l,scale:e.scale},e}case"setWithPanel":if(e.withPanel===t.withPanel)return e;return{...e,withPanel:t.withPanel};case"forceRender":return e.memoCacheRef.current.set("",{}),{...e}}};function mV({getQuickLinks:e,withPanel:t=!1,children:r,customSpanClassNameFunc:n,customSpanEventClassNameFunc:a,customPanelComponent:i=null}){let o=(0,q.useRef)(null),s=(0,q.useRef)(void 0),l=(0,q.useRef)(e);l.current=e;let c=(0,q.useRef)(new Map),u=(0,q.useRef)(new Map),[d,p]=(0,q.useReducer)(mq,m$,e=>({...e,scrollbarWidth:(()=>{if(!("document"in globalThis))return 0;let e=document.createElement("div");e.style.width="400px",e.style.height="400px",e.style.overflow="scroll",document.body.appendChild(e);let t=400-e.scrollWidth;return e.remove(),t})(),timelineRef:o,scrollSnapshotRef:s,customSpanClassNameFunc:n,customSpanEventClassNameFunc:a,customPanelComponent:i,memoCacheRef:c,withPanel:t,getQuickLinks:e=>{let t=e.spanId,r=u.current.get(t);if(r)return r;let n=l.current?.(e)||[];return u.current.set(t,n),n}}));(0,q.useEffect)(()=>p({type:"setWithPanel",withPanel:t}),[t]);let h=(0,q.useMemo)(()=>({state:d,dispatch:p}),[d,p]);return(0,$.jsx)(mW.Provider,{value:h,children:r})}let mY=()=>(0,q.useContext)(mW);var mQ=e.i(345342),mK=e.i(894128);let mX=(e,t)=>e.duration*t>=500,mJ=e=>e.isVercel?String(mQ.default.colorVercel):String(mQ.default[`color${e.resourceIndex%5}`]),mZ=(e,t)=>{let r=mX(e,t),n=e.isHovered&&!r&&!1!==e.isHighlighted;return(0,V.clsx)(mQ.default.spanNode,r&&mQ.default.huge,e.duration*t<64&&mQ.default.small,e.isSelected&&mQ.default.selected,n&&mQ.default.xHover,e.isHighlighted?mQ.default.colorHighlight:mJ(e),!1===e.isHighlighted&&mQ.default.unlit)},m0=(0,q.memo)(function({root:e,scale:t,spans:r,scrollSnapshotRef:n,cache:a,customSpanClassNameFunc:i,customSpanEventClassNameFunc:o}){return r.map(r=>(0,$.jsx)(m1,{cacheKey:a.get(r.span.spanId),customSpanEventClassNameFunc:o,customSpanClassNameFunc:i,node:r,root:e,scale:t,scrollSnapshotRef:n},r.span.spanId))}),m1=(0,q.memo)(function({node:e,root:t,scale:r,scrollSnapshotRef:n,customSpanClassNameFunc:a,customSpanEventClassNameFunc:i}){let o=(0,q.useRef)(null);e.ref=o;let{span:s}=e,l=e.isInstrumentationHint?"Get Started":(0,X.formatDuration)(e.duration),c=(e.startTime-t.startTime)*r,u=24+26*e.row,d=e.duration*r,p=Math.max(d,4),h=24,f=mX(e,r),m=d<64,g=e.isHovered&&!f&&!1!==e.isHighlighted;m&&!g&&(h*=.4,u+=(24-h)*.5);let y=!1;if(g){let{duration:r,endTime:a}=t,i=n.current;i&&(r=i.endTime-i.startTime,a=i.endTime),y=a-e.startTime<.25*r}let E=a?a(e):"";return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("button",{"aria-label":`${s.name} - ${l}`,className:(0,V.clsx)(mZ(e,r),E),"data-span-id":s.spanId,"data-start-time":e.startTime-t.startTime,"data-right-side":y,ref:o,style:{"--span-width":`${Math.max(d,1)}px`,minWidth:g?p:void 0,width:g?void 0:p,height:h,maxWidth:g&&!y?(t.endTime-e.startTime)*r:void 0,containIntrinsicWidth:g?void 0:p,containIntrinsicHeight:h,left:y?void 0:c,right:y?(t.endTime-e.endTime)*r:void 0,top:u},type:"button",children:m&&!g?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("span",{className:mQ.default.spanName,children:e.label||s.name}),f?(0,$.jsx)("span",{className:mQ.default.spanSpacer}):null,g||p>128?(0,$.jsx)("span",{className:mQ.default.spanDuration,children:l}):null]})}),e.events&&!m?e.events.map(n=>(0,$.jsx)(m2,{customSpanEventClassNameFunc:i,event:n,node:e,root:t,scale:r},n.key)):null]})}),m2=(0,q.memo)(function({event:e,node:t,root:r,scale:n,customSpanEventClassNameFunc:a}){let i=(0,q.useRef)(null);e.ref=i;let{event:{name:o}}=e,s=(0,X.formatDuration)(e.timestamp-r.startTime),l=(e.timestamp-r.startTime)*n,c=24+26*t.row,u=a?a(e):"";return(0,$.jsxs)("div",{title:`${o} at ${s}`,className:(0,V.clsx)(mQ.default.spanNodeEvent,u,t.isHighlighted?mQ.default.colorHighlight:mJ(t),!1===t.isHighlighted&&mQ.default.unlit),"data-hovered":e.isHovered,ref:i,style:{left:l,top:c},children:[(0,$.jsxs)("div",{className:(0,V.clsx)(mQ.default.hoverInfo,(e.timestamp-t.startTime)/t.duration<.5?mQ.default.alignStart:mQ.default.alignEnd),children:[(0,$.jsx)("span",{className:mQ.default.eventName,children:o}),(0,$.jsx)("span",{className:mQ.default.eventTimestamp,children:s})]}),(0,$.jsx)("div",{className:mQ.default.eventDiamond})]})}),m5={"gray-700":"var(--ds-gray-700)","gray-900":"var(--ds-gray-900)"};function m3({size:e=16,color:t="gray-700"}){let r={color:m5[t]||t};return(0,$.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",style:r,"aria-hidden":!0,children:[(0,$.jsx)("title",{children:"Cross"}),(0,$.jsx)("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function m4({size:e=16}){return(0,$.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,className:mQ.default.detailHeadingIcon,children:[(0,$.jsx)("title",{children:"Chevron Down"}),(0,$.jsx)("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function m6({size:e=16,color:t="gray-900"}){let r={color:m5[t]||t};return(0,$.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",style:r,"aria-hidden":!0,children:[(0,$.jsx)("title",{children:"External Small"}),(0,$.jsx)("path",{d:"M14 4h6m0 0v6m0-6L10 14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,$.jsx)("path",{d:"M20 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function m8(e){let{as:t,className:r,href:n,children:a,...i}=e;return"span"!==(t||"a")&&n?(0,$.jsx)("a",{className:r,href:n,...i,children:a}):(0,$.jsx)("span",{className:r,...i,children:a})}function m9(e){let{className:t,children:r,size:n,...a}=e;return(0,$.jsx)("a",{...a,className:(0,V.clsx)(mQ.default.buttonLink,t),children:r})}function m7({children:e,className:t}){return(0,$.jsx)("div",{className:(0,V.clsx)(mQ.default.note,t),children:e})}function ge({width:e,height:t,rounded:r}){return(0,$.jsx)("span",{className:(0,V.clsx)(mQ.default.skeleton,r&&mQ.default.skeletonRounded),style:{width:e,height:t},"aria-hidden":!0})}let gt=e=>`${(100*e).toFixed(3)}%`,gr=(e,t)=>e<t?-1:+(e>t),gn=e=>{let t={};for(let[r,n]of Object.entries(e)){let e=r.indexOf("."),a="",i="";-1!==e?(a=r.substring(0,e),i=r.substring(e+1)):i=r;let o=t[a];o||(o={prefix:a,attributes:[]},t[a]=o),o.attributes.push({key:r,suffix:i,value:String(n)})}let r=Array.from(Object.values(t)).sort((e,t)=>gr(e.prefix,t.prefix));for(let e of r)e.attributes.sort((e,t)=>gr(e.suffix,t.suffix));return r},ga=()=>{let{state:{root:e,selected:t,resourceMap:r,getQuickLinks:n},dispatch:a}=mY(),i=(0,q.useMemo)(()=>((e,t)=>{let r=[];if(!t)return r;for(let e=t;"parent"in e;e=e.parent)r.unshift(e);return r})(0,t),[e,t]),o=(0,q.useMemo)(()=>gn(t?.span.attributes??{}),[t]),s=(0,q.useMemo)(()=>{let e=t?.span.resource;if(!e)return[];let n=r[e];return n?gn(n):[]},[r,t]);if(!t)return null;let{span:l}=t,c=gp(t);return(0,$.jsxs)($.Fragment,{children:[t.isVercel?(0,$.jsx)(gh,{node:t}):null,t.isInstrumentationHint?(0,$.jsx)(gg,{}):null,!t.isInstrumentationHint&&i.length?(0,$.jsx)(gs,{className:mQ.default.ancestorGroup,name:"Location",children:i.map(r=>(0,$.jsxs)("button",{className:mQ.default.ancestorNode,onClick:()=>a({type:"select",id:r.span.spanId}),type:"button",children:[(0,$.jsxs)("div",{className:mQ.default.ancestorText,children:[(0,$.jsx)("span",{className:mQ.default.ancestorName,children:r.label||r.span.name}),(0,$.jsx)("span",{className:mQ.default.ancestorDuration,children:(0,X.formatDuration)(r.duration)})]}),(0,$.jsx)("span",{"aria-hidden":!0,className:mQ.default.ancestorLineContainer,children:(0,$.jsx)("span",{className:(0,V.clsx)(mQ.default.ancestorLine,mJ(r)),style:{left:gt((r.startTime-e.startTime)/e.duration),width:gt(r.duration/e.duration)}})})]},`${t.span.spanId}.${r.span.spanId}`))}):null,c?(0,$.jsx)(gf,{getQuickLinks:n,span:t.span}):null,t.events?.length?(0,$.jsx)(gs,{name:"Events",children:t.events.map(t=>(0,$.jsxs)(q.Fragment,{children:[(0,$.jsxs)("dl",{className:mQ.default.spanDetailPanelAttribute,children:[(0,$.jsx)("dt",{className:mQ.default.spanDetailPanelAttributeKey,children:t.event.name}),(0,$.jsx)("dd",{className:mQ.default.spanDetailPanelAttributeValue,children:(0,X.formatDuration)(t.timestamp-e.startTime)})]}),Object.entries(t.event.attributes).map(([e,r])=>(0,$.jsx)(gy,{name:`${t.event.name}.${e}`,value:r},e))]},t.key))}):null,o.length?(0,$.jsx)(gs,{name:"Attributes",children:o.map(e=>(0,$.jsx)(q.Fragment,{children:e.attributes.map(({key:e,value:t})=>(0,$.jsx)(gy,{name:e,value:t},e))},e.prefix))}):null,s.length?(0,$.jsx)(gs,{name:"Resource",children:s.map(e=>(0,$.jsx)(q.Fragment,{children:e.attributes.map(({key:e,value:t})=>(0,$.jsx)(gy,{name:e,value:t},e))},e.prefix))}):null,t.isInstrumentationHint?null:(0,$.jsxs)(gs,{name:"Library",children:[(0,$.jsx)(gy,{name:"name",value:l.library.name}),l.library.version?(0,$.jsx)(gy,{name:"version",value:l.library.version}):null]})]})};function gi({attached:e=!1}){let{state:{selected:t,isMobile:r,customPanelComponent:n},dispatch:a}=mY();if(!t)return null;let{span:i}=t;return(0,$.jsxs)("div",{className:(0,V.clsx)(mQ.default.spanDetailPanel,r&&mQ.default.mobile),children:[e&&!r?(0,$.jsx)(gE,{}):null,(0,$.jsx)("div",{className:mQ.default.spanDetailPanelTop,children:(0,$.jsxs)("div",{className:mQ.default.spanDetailPanelTopInfo,children:[(0,$.jsx)("span",{className:mQ.default.spanDetailPanelName,title:i.name,children:i.name}),(0,$.jsxs)("div",{className:mQ.default.spanDetailPanelCorner,children:[t.isInstrumentationHint?null:(0,$.jsx)("span",{className:mQ.default.spanDetailPanelDuration,children:(0,X.formatDuration)(t.duration)}),(0,$.jsx)("div",{className:mQ.default.spanDetailPanelCloseVerticalRule}),(0,$.jsx)("button",{"aria-label":"Close Span Details",className:mQ.default.spanDetailPanelClose,onClick:()=>a({type:"deselect"}),type:"button",children:(0,$.jsx)(m3,{color:"gray-700",size:20})})]})]})}),(0,$.jsx)("div",{className:(0,V.clsx)("flex gap-3",mQ.default.spanDetailPanelBody),children:n||(0,$.jsx)(ga,{})})]})}let go="vc-trace-span-exp:";function gs({name:e,className:t="",children:r}){let[n,a]=(0,q.useState)(()=>!("localStorage"in globalThis)||"0"!==localStorage.getItem(`${go}${e}`)),i=(0,q.useCallback)(()=>{a(t=>{let r=!t;return localStorage.setItem(`${go}${e}`,String(Number(r))),r})},[e]);return(0,$.jsxs)("div",{className:(0,V.clsx)(mQ.default.detailGroup,n?mQ.default.expanded:mQ.default.collapsed,t),children:[(0,$.jsxs)("button",{className:mQ.default.detailHeading,onClick:i,type:"button",children:[(0,$.jsx)("span",{children:e}),(0,$.jsx)(m4,{})]}),n?r:null]})}let gl=new Set(["OPTIONS","HEAD","GET","PUT","POST","DELETE"]),gc={"Resolve Deployment":"How long it took Vercel's routing layer to retrieve details for the deployment.","Resolve Cache":"How long it took Vercel's routing layer to check for a cached function invocation.","Resolve Route":"How long it took Vercel's routing layer to resolve routing rules, including redirects and rewrites.","Invoke Middleware":"How long it took this middleware to start and run user code.","Invoke Function":"How long it took this Vercel Function to start and run user code.",waitUntil:"How long it took to run user code inside of waitUntil.","Start VM":"How long it took to start the Virtual Machine which contains the Vercel Function.","Spawn Node.js":"How long it took the Virtual Machine to start the Node.js runtime.","Spawn Python":"How long it took the Virtual Machine to start the Python runtime.","Init User Code":"How long it took to import the user code and run any globally-scoped code."},gu=new Set(["Start VM","Spawn Node.js","Spawn Python","Init User Code"]),gd=e=>{if(!e||!("span"in e))return null;let t=e.span.attributes,r=t["vercel.region"]||t["vercel.function.region"];return r?String(r):null},gp=e=>{if(!e.isVercel)return!1;let{name:t}=e.span,r=t.indexOf(" ");if(-1===r)return!1;let n=t.substring(0,r);return gl.has(n)};function gh({node:e}){let{name:t}=e.span,r=gc[t];if(!r&&gp(e)&&(r="How long it took for Vercel to process the request and send the response."),!r)return null;let n=(e=>{let{name:t}=e.span,r=gd(e),n=gd(e.parent);return"true"===e.span.attributes["vercel.middleware.internal"]?"The Vercel Toolbar created this middleware.":gu.has(t)||"Invoke Function"===t&&e.children.some(e=>gu.has(e.span.name))?"This function encountered a cold start.":r&&n&&r!==n?"This request was routed across regions.":null})(e);return(0,$.jsx)(gs,{name:"What is this?",children:(0,$.jsxs)("div",{className:mQ.default.infraSpanDescription,children:[(0,$.jsx)("span",{children:r}),n?(0,$.jsx)(m7,{children:n}):n]})})}let gf=(0,q.memo)(function({getQuickLinks:e,span:t}){let r=e(t);return r.length?(0,$.jsx)(gs,{name:"Links",children:r.map(({key:e,value:t})=>(0,$.jsx)(gm,{link:t,name:e},e))}):null});function gm({name:e,link:t}){let r=function(e){let[t,r]=(0,q.useState)({}),n=void 0!==e.__resolvedValue||void 0!==e.__rejectedValue;return(0,q.useEffect)(()=>{n||e.then(t=>{e.__resolvedValue=t}).catch(t=>{e.__rejectedValue=t}).finally(()=>r({}))},[e,n]),e.__resolvedValue}(t);return(0,$.jsxs)(m8,{as:r?void 0:"span",className:(0,V.clsx)(mQ.default.spanDetailPanelAttribute,mQ.default.spanDetailPanelQuickLink),href:r?.href||"",children:[(0,$.jsx)("span",{className:mQ.default.spanDetailPanelAttributeKey,children:e}),(0,$.jsx)("span",{className:(0,V.clsx)(mQ.default.spanDetailPanelAttributeValue,mQ.default.spanDetailPanelQuickLinkLabel),children:r?(0,$.jsxs)($.Fragment,{children:[r.label,r.icon||(0,$.jsx)(m6,{color:"gray-900"})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ge,{height:18,width:32+8*e.length}),(0,$.jsx)(ge,{height:18,rounded:!0,width:18})]})})]})}function gg(){return(0,$.jsx)(gs,{name:"What is this?",children:(0,$.jsxs)("div",{className:mQ.default.infraSpanDescription,children:[(0,$.jsx)("span",{children:"You can visualize your application's spans alongside Vercel's spans in this viewer."}),(0,$.jsx)(m9,{href:"https://vercel.com/docs/session-tracing#adding-custom-spans",size:"small",target:"_blank",children:"Get Started"})]})})}function gy({name:e,value:t}){return(0,$.jsxs)("dl",{className:mQ.default.spanDetailPanelAttribute,children:[(0,$.jsx)("dt",{className:mQ.default.spanDetailPanelAttributeKey,children:e}),(0,$.jsx)("dd",{className:mQ.default.spanDetailPanelAttributeValue,title:String(t),children:String(t)})]})}function gE(){let{state:{panelWidth:e},dispatch:t}=mY(),r=(0,q.useRef)({start:{x:0,width:e},x:0,width:e,isHeld:!1});r.current.width=e;let n=(0,q.useCallback)(e=>{if("mouse"!==e.pointerType)return;e.preventDefault();let t=r.current;t.start.x=e.clientX,t.x=e.clientX,t.start.width=t.width,t.isHeld=!0},[]),a=(0,q.useCallback)(()=>{t({type:"setPanelWidth",width:m$.panelWidth})},[t]);return(0,q.useEffect)(()=>{let e=0,n=()=>{let e=r.current;t({type:"setPanelWidth",width:e.start.width+e.start.x-e.x})},a=t=>{r.current.isHeld&&(t.preventDefault(),r.current.x=t.clientX,cancelAnimationFrame(e),e=requestAnimationFrame(n))},i=()=>{r.current.isHeld=!1};return window.addEventListener("pointermove",a),window.addEventListener("pointerup",i),()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",i)}},[t]),(0,$.jsx)("div",{"aria-hidden":!0,className:mQ.default.spanDetailPanelResizer,onDoubleClick:a,onPointerDown:n})}function gb(e){let t=(0,q.useRef)({});return{setStyle:(0,q.useCallback)((r,n)=>{if(t.current[r]=n,e.current){if(!n)return void e.current.style.removeProperty(r);e.current.style.setProperty(r,n)}},[e]),styleRef:t,style:{...t.current}}}let gv=(0,q.memo)(function({timelineRef:e,rows:t,scale:r}){let{state:{root:n,baseScale:a,timelineWidth:i,width:o,scrollbarWidth:s}}=mY(),l=o+16,c=(()=>{let[e,t]=(0,q.useState)(1);return(0,q.useLayoutEffect)(()=>{let r=()=>t("devicePixelRatio"in globalThis&&globalThis.devicePixelRatio||1),n=matchMedia(`(resolution: ${e}dppx)`);return n.addEventListener("change",r),r(),()=>{n.removeEventListener("change",r)}},[e]),e})(),u=(0,q.useRef)(null),d=(0,q.useRef)(null),p=o/(o-s)*Math.min(o/i,a/r),h=Math.min(o,(i-s)*p);(0,q.useEffect)(()=>{let t,r=!1,n=0,a=e=>!!u.current?.contains(e),i=0,o=()=>{if(!r||!t)return;let a=e.current;a&&(a.scrollLeft=(n-.5*h-t.left)/p)},s=e=>{({clientX:n}=e),cancelAnimationFrame(i),i=requestAnimationFrame(o)},l=e=>{a(e.target)&&(r=!0,t=u.current?.getBoundingClientRect(),s(e))},c=()=>{r=!1,t=void 0},d=e=>{a(e.target)&&e.cancelable&&e.preventDefault()},f=e=>{r&&e.cancelable&&e.preventDefault()};return window.addEventListener("pointerdown",l),window.addEventListener("pointermove",s),window.addEventListener("pointerup",c),window.addEventListener("blur",c),window.addEventListener("touchstart",d,{passive:!1}),window.addEventListener("touchmove",f,{passive:!1}),()=>{window.removeEventListener("pointerdown",l),window.removeEventListener("pointermove",s),window.removeEventListener("pointerup",c),window.removeEventListener("blur",c),window.removeEventListener("touchstart",d),window.removeEventListener("touchmove",f),cancelAnimationFrame(i)}},[e,p,h]),(0,q.useEffect)(()=>{let e=d.current,r=e?.getContext("2d");if(!e||!r)return;let a=requestAnimationFrame(()=>{r.resetTransform(),r.clearRect(0,0,e.width,e.height),r.scale(c,c);let a=(l-16)/n.duration;for(let e of(r.fillStyle="#ccc",r.beginPath(),t))for(let t of e){let e=7+4*t.row;if(e>=45)break;let i=8+(t.startTime-n.startTime)*a,o=t.duration*a;r.roundRect(i,e,o,3,3)}r.fill()});return()=>cancelAnimationFrame(a)},[c,n,l,t]);let f=(0,q.useRef)(null),{style:m,setStyle:g}=gb(f);return(0,q.useLayoutEffect)(()=>{let t=e.current;if(!t)return;let r=0,n=()=>{g("transform",`translateX(${8+t.scrollLeft*p}px)`)};n();let a=()=>{cancelAnimationFrame(r),r=requestAnimationFrame(n)};return t.addEventListener("scroll",a),()=>{cancelAnimationFrame(r),t.removeEventListener("scroll",a)}},[e,p,g]),(0,$.jsxs)("div",{className:mQ.default.mapContainer,ref:u,style:{width:h>0?l:"100%",height:56},children:[(0,$.jsx)("canvas",{className:mQ.default.mapCanvas,height:56*c,ref:d,style:{width:l,height:56},width:l*c}),(0,$.jsx)("div",{className:mQ.default.mapThumb,ref:f,style:{transform:m.transform,width:h>0?h:"calc(100% - 16px)",top:2,height:52}})]})}),gT=[1,2,4,5,8,10];function g_({scale:e}){let{state:{root:t}}=mY(),r=t.duration,n=Math.floor(Math.log10(r)),a=Math.max(2,10**n*(Math.floor(Math.log10(.5*r))===n?1:.5)),i=a*e,o=1;for(let e of gT){if(a/e<24)break;o=e}a/=o,i/=o;let s=Math.ceil(r/a),l=Math.ceil(100/i)||1;return(0,$.jsx)("div",{className:mQ.default.markersContainer,children:(0,$.jsx)("div",{"aria-hidden":!0,className:mQ.default.markers,style:{width:Math.floor(t.duration*e+15),visibility:-1!==e?"visible":"hidden","--marker-width":`${i}px`},children:Array(s).fill(null).map((e,t)=>{let r=t%l==0;return(0,$.jsx)("span",{className:(0,V.clsx)(mQ.default.marker,!r&&mQ.default.notch),children:r?(0,$.jsx)("span",{className:mQ.default.markerLabel,children:(0,mK.formatDurationForTimeline)(a*t)}):null},String(t))})})})}function gA({events:e,root:t,scale:r}){let n=(0,q.useMemo)(()=>e.filter(e=>!1!==e.event.showVerticalLine),[e]);return(0,$.jsx)("div",{className:mQ.default.eventMarkersContainer,children:(0,$.jsx)("div",{"aria-hidden":!0,className:mQ.default.eventMarkers,style:{width:Math.floor(t.duration*r)},children:n.map(e=>(0,$.jsx)("span",{className:(0,V.clsx)(mQ.default.eventMarker),style:{left:Math.floor((e.timestamp-t.startTime)*r),...e.event.color&&{borderLeftColor:e.event.color}}},e.key))})})}function gk({memoCacheRef:e,timelineRef:t,root:r,spans:n,events:a,scale:i,dispatch:o,scrollSnapshotRef:s}){var l;let c,u=(0,q.useRef)(!1),d=(0,q.useRef)(n);d.current=n;let p=(0,q.useRef)(a);p.current=a;let h=(0,q.useRef)(null),{style:f,setStyle:m}=gb(h),g=(0,q.useRef)(null),y=(0,q.useRef)(null),{style:E,setStyle:b}=gb(y),v=(0,q.useRef)(void 0),T=(0,q.useRef)(null),{style:_,setStyle:A}=gb(T),k=(0,q.useRef)(0);(0,q.useEffect)(()=>{let n=t.current;if(!n)return;let a=k.current,s=0,l=!1,c=!1,h=!1,f=!1,y=0,E=0,_=Date.now()+500,x=()=>{v.current||(v.current=n.getBoundingClientRect())},S=e=>v.current?(e-24-8)/26:0,C=()=>{let t=e.current;for(let e of d.current)e.isHovered&&(e.isHovered=!1,t.set(e.span.spanId,{}));o({type:"forceRender"})},N=0,I=()=>{if(!u.current)return;v.current||x();let t=v.current;if(!t)return;let{scrollLeft:f,scrollTop:k}=n,w=Math.max(0,Math.min(a+f-t.left-8,r.duration*i)),R=`${w-f+8}px`;b("left",R),m("left",R);let D=r.startTime+w/i,L=D-r.startTime;if(L<0||L>r.duration?g.current?.removeAttribute("data-text"):g.current?.setAttribute("data-text",(0,mK.formatTimeSelection)(L)),l){let e,n,o=a-s,l=Math.abs(o);if(!h){if(l<4)return;h=!0,A("display","flex"),C()}o>0?(A("left",""),A("right","0")):(A("left","0"),A("right","")),A("width",`${l}px`);let c=Math.max(0,Math.min(s+f-t.left-8,r.duration*i))/i;c<L?(e=c,n=L):(e=L,n=c),T.current?.setAttribute("data-range",`${(0,mK.formatTimeSelection)(e)} — ${(0,mK.formatTimeSelection)(n)}`),T.current?.setAttribute("data-duration",`${(0,mK.formatTimeSelection)(n-e)} selected`)}if(Date.now()<_){N=requestAnimationFrame(I);return}if(f!==y||k!==E){y=f,E=k,N=requestAnimationFrame(I);return}if(a-t.left<128?g.current?.setAttribute("data-align","left"):a-t.left>t.width-128?g.current?.setAttribute("data-align","right"):g.current?.removeAttribute("data-align"),!h&&!c){let r=e.current,n=S(k)-2,a=S(k+t.height)+2;for(let e of d.current){let t=e.row>=n&&e.row<=a&&D>=e.startTime&&D<=e.endTime;e.isHovered!==t&&(e.isHovered=t,r.set(e.span.spanId,{}))}let s=12/i;for(let e of p.current){let t=D>=e.timestamp-s&&D<=e.timestamp+s;if(e.isHovered===t)continue;e.isHovered=t;let r=e.ref?.current;r&&r.setAttribute("data-hovered",String(t))}o({type:"forceRender"})}};N=requestAnimationFrame(I);let R=e=>{"mouse"===e.pointerType&&(u.current=!0)},D=()=>{u.current&&(u.current=!1,C())},L=({clientX:e})=>{k.current=a=e,cancelAnimationFrame(N),N=requestAnimationFrame(I)},O=e=>{e.preventDefault()},P=e=>{if(2===e.button)f=!0,e.preventDefault();else{if(0!==e.button)return;f=!1}t.current?.contains(e.target)?(s=a,l=!0):(c=!0,requestAnimationFrame(C))},M=e=>{if(c=!1,!l||(l=!1,!h))return;if(h=!1,A("display",""),A("left",""),A("right",""),A("width",""),e.preventDefault(),e.stopImmediatePropagation(),f){f=!1;return}v.current||x();let t=v.current;if(!t)return;let{scrollLeft:u}=n,d=Math.max(0,Math.min((s+u-t.left-8)/i,r.duration)),p=Math.max(0,Math.min((a+u-t.left-8)/i,r.duration));o({type:"scaleToRange",t1:d+r.startTime,t2:p+r.startTime})},F=e=>{l&&"Escape"===e.key&&(f=!0,M(e))},B=()=>{v.current=void 0,w.current=void 0,cancelAnimationFrame(N),N=requestAnimationFrame(I)},j=()=>{cancelAnimationFrame(N),N=requestAnimationFrame(I)},U=new ResizeObserver(()=>{v.current=void 0});return U.observe(n),window.addEventListener("mousemove",L),n.addEventListener("contextmenu",O),window.addEventListener("mousedown",P),window.addEventListener("mouseup",M),window.addEventListener("blur",M),window.addEventListener("keydown",F,!0),window.addEventListener("scroll",B),n.addEventListener("scroll",j),n.addEventListener("pointerenter",R),n.addEventListener("pointerleave",D),()=>{U.disconnect(),window.removeEventListener("mousemove",L),n.removeEventListener("contextmenu",O),window.removeEventListener("mousedown",P),window.removeEventListener("mouseup",M),window.removeEventListener("blur",M),window.removeEventListener("keydown",F,!0),window.removeEventListener("scroll",B),n.removeEventListener("scroll",j),n.removeEventListener("pointerenter",R),n.removeEventListener("pointerleave",D),cancelAnimationFrame(N),k.current=a,C()}},[o,r,i,b,m,A,e,t,s]);let w=(0,q.useRef)(void 0);return l=e=>{let r=t.current;if(!r)return;v.current??=r.getBoundingClientRect();let n=v.current,a=Math.max(0,Math.min(k.current-n.left-8,n.width-16)),s=0,l=w.current;l?.anchorX===a?s=l.anchorT:w.current=l={anchorT:s=(r.scrollLeft+a)/i,anchorX:a},o({type:"trackpadScale",delta:e/64,anchorT:s,anchorX:a})},(c=(0,q.useRef)(l)).current=l,(0,q.useEffect)(()=>{let e=0,t=0,r=()=>{c.current(e),e=0},n=n=>{if(!n.ctrlKey&&!n.metaKey)return;n.preventDefault();let a=-n.deltaY;switch(n.deltaMode){case WheelEvent.DOM_DELTA_PAGE:a*=window.innerHeight;break;case WheelEvent.DOM_DELTA_LINE:a*=20}e+=a,cancelAnimationFrame(t),t=requestAnimationFrame(r)};return window.addEventListener("wheel",n,{passive:!1}),()=>{window.removeEventListener("wheel",n),cancelAnimationFrame(t)}},[]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{className:mQ.default.cursorMarkerStickyParent,children:(0,$.jsx)("div",{className:mQ.default.cursorMarkerLabelContainer,ref:h,style:f,children:(0,$.jsx)("div",{className:mQ.default.cursorMarkerLabel,ref:g})})}),(0,$.jsx)("div",{className:mQ.default.cursorMarkerStickyParent,children:(0,$.jsx)("div",{className:mQ.default.cursorMarkerContainer,ref:y,style:E,children:(0,$.jsx)("div",{className:mQ.default.cursorMarker,children:(0,$.jsx)("div",{className:mQ.default.cursorSelection,ref:T,style:_})})})})]})}function gw({height:e,width:t,value:r,placeholder:n,onChange:a}){return(0,$.jsxs)("label",{className:mQ.default.searchInputLabel,children:[(0,$.jsx)("div",{className:mQ.default.searchInputPrefix,children:(0,$.jsx)(gx,{})}),(0,$.jsx)("input",{type:"search",value:r,placeholder:n,onChange:a,style:{height:e,width:t}})]})}function gx(){return(0,$.jsxs)("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",focusable:"false",children:[(0,$.jsx)("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),(0,$.jsx)("path",{d:"M11.5 11.5L14 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function gS(){return(0,$.jsx)("nav",{className:mQ.default.searchBar,children:(0,$.jsx)(gC,{})})}function gC(){let{dispatch:e}=mY(),[t,r]=(0,q.useState)("");return(0,q.useEffect)(()=>{let r=setTimeout(()=>e({type:"setFilter",filter:t}),100);return()=>{clearTimeout(r)}},[e,t]),(0,$.jsx)("div",{className:mQ.default.searchInput,children:(0,$.jsx)(gw,{height:40,onChange:e=>r(e.target.value),placeholder:"Search spans…",value:t,width:"100%"})})}function gN({size:e=16}){return(0,$.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[(0,$.jsx)("title",{children:"Zoom In"}),(0,$.jsx)("path",{d:"M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",stroke:"currentColor",strokeWidth:"2"}),(0,$.jsx)("path",{d:"M11 8v6M8 11h6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,$.jsx)("path",{d:"M20 20l-3.5-3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function gI({size:e=16}){return(0,$.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[(0,$.jsx)("title",{children:"Zoom Out"}),(0,$.jsx)("path",{d:"M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",stroke:"currentColor",strokeWidth:"2"}),(0,$.jsx)("path",{d:"M8 11h6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,$.jsx)("path",{d:"M20 20l-3.5-3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function gR({size:e=16}){return(0,$.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[(0,$.jsx)("title",{children:"Minus"}),(0,$.jsx)("path",{d:"M6 12h12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function gD(){let{dispatch:e}=mY(),t=(0,q.useCallback)(()=>{e({type:"adjustScaleRatio",direction:1})},[e]),r=(0,q.useCallback)(()=>{e({type:"adjustScaleRatio",direction:-1})},[e]),n=(0,q.useCallback)(()=>{e({type:"adjustScaleRatio",direction:0})},[e]);return(0,$.jsxs)("div",{className:mQ.default.zoomButtonGroup,children:[(0,$.jsx)("button",{"aria-label":"Zoom Out",className:mQ.default.zoomButton,onClick:r,type:"button",children:(0,$.jsx)(gI,{size:18})}),(0,$.jsx)("div",{className:mQ.default.divider}),(0,$.jsx)("button",{"aria-label":"Reset Zoom",className:mQ.default.zoomButton,onClick:n,type:"button",children:(0,$.jsx)(gR,{size:18})}),(0,$.jsx)("div",{className:mQ.default.divider}),(0,$.jsx)("button",{"aria-label":"Zoom In",className:mQ.default.zoomButton,onClick:t,type:"button",children:(0,$.jsx)(gN,{size:18})})]})}var gL=e.i(925311);function gO(){return[]}let gP={traceId:"skeleton",spans:[{parentSpanId:"",spanId:"root",name:"root span",kind:1,resource:"vercel.runtime",startTime:[5e3,0],endTime:[6e3,0],duration:[1e3,0],library:{name:"vercel-site"},status:{code:1},attributes:{"vercel.ownerId":"team_abc"},traceFlags:1,events:[],links:[]}],resources:[{name:"vercel.runtime",attributes:{}}],rootSpanId:"root"};function gM({trace:t=gP,className:r="",scrollLock:n=!1,height:a,withPanel:i=!1,highlightedSpans:o}){let s=t===gP,{state:l,dispatch:c}=mY(),{timelineRef:u,scrollSnapshotRef:d}=l,p=l.memoCacheRef.current,h=(o?.length??0)>0||t.spans.length<=10;(0,q.useEffect)(()=>{let{root:e,map:r}=(0,gL.parseTrace)(t);c({type:"setRoot",root:e,spanMap:r,resources:t.resources||[]})},[c,t]);let{rows:f,spans:m,events:g,scale:y}=(t=>{let{state:r,dispatch:n}=mY(),{root:a,filter:i,scale:o,timelineRef:s,timelineWidth:l,spanMap:c,scrollSnapshotRef:u,selected:d,memoCacheRef:p,customSpanClassNameFunc:h}=r,f=function(e){let[t,r]=(0,q.useState)(e);return(0,q.useEffect)(()=>{if(t===e)return;let n=0,a=0,i=()=>{if(++n<=3){a=requestAnimationFrame(i);return}r(e)};return i(),()=>{cancelAnimationFrame(a)}},[t,e]),t}(r.timelineHeight),m=(0,q.useRef)(0),[g,y]=(0,q.useState)(gO),[E,b]=(0,q.useState)(gO),[v,T]=(0,q.useState)(gO),[_,A]=(0,q.useState)(-1),k=(0,q.useRef)(void 0);return(0,q.useEffect)(()=>k.current?.(i),[i]),(0,q.useEffect)(()=>{if(t?.length){for(let e of g)for(let r of e){let e=t.includes(r.span.spanId);r.isHighlighted!==e&&(r.isHighlighted=e,p.current.set(r.span.spanId,{}))}n({type:"forceRender"})}},[g,t,n,p]),(0,q.useEffect)(()=>{if(!a.startTime)return;let t=new Worker(e.r(403222)),r=++m.current;t.addEventListener("message",e=>{let t=e.data;switch(t.type){case"setRowsResult":if(t.isEnd)for(let e of t.rows)for(let t of e)t.span=c[t.span.spanId]?.span??t.span;y(t.rows);break;case"updateHighlight":{if(t.requestId!==r)return;let{matches:e}=t;y(t=>{for(let r of t)for(let t of r){let r=e.has(t.span.spanId);t.isHighlighted!==r&&(t.isHighlighted=r,p.current.set(t.span.spanId,{}))}return t}),n({type:"forceRender"})}}});let i={requestId:r,type:"calculateSpanPositions",root:a};return t.postMessage(i),k.current=e=>{let n=e.trim().toLocaleLowerCase();if(!n)return void y(e=>e.map(e=>e.map(e=>(e.isHighlighted=void 0,{...e}))));let i={type:"filterSpans",requestId:r=++m.current,root:a,filter:n};t.postMessage(i)},()=>{t.terminate()}},[a,c,n,p]),(0,q.useEffect)(()=>{if(!g.length)return;let e=s.current,t=u.current,r=!1,n=!1,i=0,c=0,d=Math.max(500,.5*l),p=Array(g.length).fill(null),h=e=>t?e<t.startRow?e-t.startRow:e>t.endRow?e-t.endRow:0:0,m=e=>{if(!t)return 0;let r=0;e.endTime<t.startTime?r=t.startTime-e.endTime:e.startTime>t.endTime&&(r=e.startTime-t.endTime);let n=Math.abs(h(e.row));return r||n?Math.sqrt((r/o)**2+(24*n+2)**2):0},y=0,E=()=>{(r||!t)&&(r=!1,(()=>{if(!e)return;let{scrollLeft:r,scrollTop:n}=e,i=(n-24-8)/26,s=i+Math.ceil(f/26);u.current=t={anchorT:r/o,anchorX:0,scrollLeft:r,scrollTop:n,startTime:a.startTime+r/o,endTime:a.startTime+(r+l)/o,startRow:i,endRow:s,scale:o};for(let e=p.length;e--;)p[e]=null})()),(()=>{n=!0;let e=Math.min(1+c+Math.ceil(t?.endRow??1/0),g.length);for(let t=e;t--;){if(p[t])continue;let e=h(t);if(Math.abs(e)>c){if(n=!1,e>0)continue;break}let r=[],a=g[t];if(a){for(let e of a){if(!(0,gL.adjustSpanVisibility)(e,o))continue;let t=m(e);i=Math.max(t,i),r.push({d:t,span:e})}p[t]=r}}})();let s=[],v=[];for(let e of p)if(e)for(let{d:t,span:r}of e)!(t>c)&&(s.push(r),r.events&&v.push(...r.events));c<d&&(!n||c<i)&&(c=Math.min(d,c+100),y=requestAnimationFrame(E)),b(s),T(v),A(o)};E();let v=Date.now(),_=e=>{(e.ctrlKey||e.metaKey)&&(v=Date.now())};e?.addEventListener("wheel",_);let k=()=>{Date.now()-v<=50||(r=!0,cancelAnimationFrame(y),y=requestAnimationFrame(E))};return e?.addEventListener("scroll",k),()=>{cancelAnimationFrame(y),e?.removeEventListener("wheel",_),e?.removeEventListener("scroll",k)}},[g,a,o,u,s,l,f]),(0,q.useEffect)(()=>{let e;if(!d)return;for(let t of E)if(t.span.spanId===d.span.spanId){e=t;break}let t=e?.ref?.current;if(!e||!t)return;e.isSelected=!0;let r=mZ(e,o),n=h?h(e):"";return t.className=(0,V.clsx)(r,n),()=>{e.isSelected=!1;let r=mZ(e,o),n=h?h(e):"";t.className=(0,V.clsx)(r,n)}},[E,o,d,h]),{rows:g,spans:E,events:v,scale:_}})(o),E=(0,q.useRef)(null);(0,q.useLayoutEffect)(()=>{let e=E.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();c({type:"setSize",width:t.width-16,height:t.height})};t();let r=new ResizeObserver(t);return r.observe(e),window.addEventListener("resize",t),()=>{r.disconnect(),window.removeEventListener("resize",t)}},[c]);let b=(0,q.useRef)({t:0,x:-1,y:-1,spanId:""}),v=(0,q.useCallback)(e=>{let t=b.current,r=Date.now(),{clientX:n,clientY:a}=e,i=Math.sqrt((n-t.x)**2+(a-t.y)**2);if(r-t.t<=500&&i<=8)return(e.stopPropagation(),e.preventDefault(),t.spanId)?(c({type:"select",id:t.spanId}),void c({type:"scaleToNode",id:t.spanId})):void c({type:"resetScale"});let o=e.target;if(!o.closest(`.${String(mQ.default.timeline)}`))return;let s=o.closest("[data-span-id]"),l=s?.dataset.spanId||"";b.current={x:n,y:a,t:r,spanId:l},l&&(c({type:"toggleSelection",id:l}),e.stopPropagation())},[c]);(0,q.useLayoutEffect)(()=>{let e=u.current;if(!e)return;let t=d.current;t&&(e.scrollLeft=t.anchorT*y-t.anchorX)},[d,u,y]),(0,q.useEffect)(()=>{let e=l.selected?.span.spanId;if(!e)return;let t=setTimeout(()=>{let t=l.timelineRef.current,r=t?.querySelector(`[data-span-id="${e}"]`);if(!t||!r)return;let n=t.getBoundingClientRect(),a=r.getBoundingClientRect();a.width<n.width&&(a.left<n.left||a.right>n.right||a.top<n.top||a.bottom>n.bottom)&&r.scrollIntoView({block:"nearest",inline:"center",behavior:"smooth"})},500);return()=>{clearTimeout(t)}},[l.selected,l.timelineRef]),(0,q.useEffect)(()=>{let e=e=>{"Escape"===e.key&&c({type:"escape"})};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[c]),(0,q.useEffect)(()=>{if(!n)return;let e=document.documentElement,t=document.body;e.style.overflow="clip",t.style.overflow="clip";let r=e=>{e?.cancelable?e.preventDefault():window.scrollTo({left:0,top:0,behavior:"instant"})};return r(),window.addEventListener("scroll",r,{passive:!1}),()=>{e.style.overflow="",t.style.overflow="",window.removeEventListener("scroll",r)}},[n]);let T=Math.max(l.timelineHeight-l.scrollbarWidth,26+26*f.length-2+84),_=!!(l.isMobile&&l.selected);return(0,$.jsxs)("div",{className:(0,V.clsx)(mQ.default.traceViewer,s&&mQ.default.skeleton,r),onClickCapture:v,ref:E,style:{height:a,"--timeline-padding":"8px","--row-height":"24px","--row-padding":"2px","--search-height":`${40*!h}px`,"--search-gap":`${!h?8:2}px`,"--map-height":"56px","--timeline-width":`${l.timelineWidth}px`,"--timeline-height":`${l.timelineHeight}px`,"--timeline-scroll-width":`${Math.round(l.root.duration*l.scale)}px`,"--panel-width":`${l.panelWidth}px`,"--panel-height":`${l.panelHeight}px`,"--height":`${l.height}px`,"--scrollbar-width":`${l.scrollbarWidth}px`,"--marker-height":"24px","--marker-notch-height":"8px"},children:[h?null:(0,$.jsx)(gS,{}),(0,$.jsx)(gv,{rows:f,scale:y,timelineRef:u}),(0,$.jsxs)("div",{className:(0,V.clsx)(mQ.default.traceViewerContent,_&&mQ.default.inert),children:[(0,$.jsx)("div",{className:mQ.default.timeline,ref:u,children:(0,$.jsx)("div",{style:{position:"relative",width:l.timelineWidth,height:l.timelineHeight-16,padding:8,paddingBottom:0},children:(0,$.jsxs)("div",{className:mQ.default.traceNode,style:{width:l.root.duration*y||void 0,height:T-16},children:[(0,$.jsx)(g_,{scale:y}),(0,$.jsx)(gA,{events:g,root:l.root,scale:y}),(0,$.jsx)(gk,{dispatch:c,events:g,memoCacheRef:l.memoCacheRef,root:l.root,scale:y,scrollSnapshotRef:d,spans:m,timelineRef:u}),(0,$.jsx)(m0,{cacheKey:p.get(""),cache:p,customSpanClassNameFunc:l.customSpanClassNameFunc,customSpanEventClassNameFunc:l.customSpanEventClassNameFunc,root:l.root,scale:y,scrollSnapshotRef:d,spans:m})]})})}),(0,$.jsx)("div",{className:mQ.default.zoomButtonTraceViewer,children:(0,$.jsx)(gD,{})})]}),i?(0,$.jsx)("div",{className:(0,V.clsx)(mQ.default.spanDetailPanelTraceViewer,!l.selected&&mQ.default.hidden,l.isMobile&&mQ.default.mobile),children:(0,$.jsx)(gi,{attached:!0})}):null]})}function gF({env:e,run:t,onStreamClick:r}){let{state:n}=mY(),{selected:a}=n,[i,o]=(0,q.useState)(!1),[s,l]=(0,q.useState)(!1),[c,u]=(0,q.useState)(!1),d=a?.span.attributes?.data,{resource:p,resourceId:h,runId:f}=(0,q.useMemo)(()=>{let e=a?.span.attributes?.resource;return"step"===e?{resource:"step",resourceId:d.stepId,runId:d.runId}:"run"===e?{resource:"run",resourceId:d.runId,runId:void 0}:"hook"===e?{resource:"hook",resourceId:d.hookId,runId:void 0}:"sleep"===e?{resource:"sleep",resourceId:a?.span?.spanId,runId:void 0}:{resource:void 0,resourceId:void 0,runId:void 0}},[a,d]),m=a?.span.events,g=m?.length??0,y=(0,q.useMemo)(()=>{if("sleep"!==p||!m||["completed","failed","cancelled"].includes(t.status)||m.some(e=>"wait_completed"===e.name))return!1;let e=m.find(e=>"wait_created"===e.name),r=e?.attributes?.eventData,n=r?.resumeAt;return!!n&&new Date(n).getTime()>Date.now()},[p,m,g,t.status]),E=(0,q.useMemo)(()=>"hook"===p&&!!m&&!(["completed","failed","cancelled"].includes(t.status)||m.some(e=>"hook_disposed"===e.name)),[p,m,g,t.status]),b=(0,q.useMemo)(()=>{if("hook"===p)return d?.token},[p,d]),{data:v,error:T,loading:_}=(0,G.useWorkflowResourceData)(e,p,h??"",{runId:f});(0,q.useEffect)(()=>{T&&a&&p&&eb.error(`Failed to load ${p} details`,{description:T.message})},[T,p,a]);let A=async()=>{if(!i&&h)try{o(!0),(await (0,G.wakeUpRun)(e,t.runId,{correlationIds:[h]})).stoppedCount>0?eb.success("Run woken up",{description:"The sleep call has been interrupted and the run woken up."}):eb.info("Sleep already completed",{description:"This sleep call has already finished."})}catch(e){console.error("Failed to wake up run:",e),eb.error("Failed to wake up run",{description:e instanceof Error?e.message:"An unknown error occurred"})}finally{o(!1)}},k=(0,q.useCallback)(async t=>{if(!c&&b)try{u(!0),await (0,G.resumeHook)(e,b,t),eb.success("Hook resolved",{description:"The payload has been sent and the hook resolved."}),l(!1)}catch(e){console.error("Failed to resolve hook:",e),eb.error("Failed to resolve hook",{description:e instanceof Error?e.message:"An unknown error occurred"})}finally{u(!1)}},[e,b,c]);if(!a||!p||!h)return null;let w=v||d;return(0,$.jsxs)("div",{className:(0,V.default)("flex flex-col px-2"),children:["sleep"===p&&y&&(0,$.jsxs)("div",{className:"mb-3 pb-3 border-b border-gray-200 dark:border-gray-700",children:[(0,$.jsxs)("button",{type:"button",onClick:A,disabled:i,className:(0,V.default)("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md w-full","bg-amber-100 dark:bg-amber-900/30 text-amber-800 dark:text-amber-200","hover:bg-amber-200 dark:hover:bg-amber-900/50","disabled:opacity-50 disabled:cursor-not-allowed","transition-colors",i?"opacity-50 cursor-not-allowed":"cursor-pointer"),children:[(0,$.jsx)(eL,{className:"h-4 w-4"}),i?"Waking up...":"Wake up"]}),(0,$.jsx)("p",{className:"mt-1.5 text-xs text-gray-500 dark:text-gray-400",children:"Interrupt this sleep call and wake up the run."})]}),"hook"===p&&E&&(0,$.jsxs)("div",{className:"mb-3 pb-3 border-b border-gray-200 dark:border-gray-700",children:[(0,$.jsxs)("button",{type:"button",onClick:()=>l(!0),disabled:c,className:(0,V.default)("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md w-full","bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-200","hover:bg-blue-200 dark:hover:bg-blue-900/50","disabled:opacity-50 disabled:cursor-not-allowed","transition-colors",c?"opacity-50 cursor-not-allowed":"cursor-pointer"),children:[(0,$.jsx)(es,{className:"h-4 w-4"}),"Resolve Hook"]}),(0,$.jsx)("p",{className:"mt-1.5 text-xs text-gray-500 dark:text-gray-400",children:"Send a JSON payload to resolve this hook."})]}),(0,$.jsx)(ex,{isOpen:s,onClose:()=>l(!1),onSubmit:k,isSubmitting:c}),(0,$.jsx)(mH,{data:w,expiredAt:t.expiredAt,isLoading:_,error:T??void 0,onStreamClick:r}),"run"!==p&&(0,$.jsx)(mG,{correlationId:h,env:e,events:a.span.events,expiredAt:t.expiredAt})]})}function gB(e,t=!1){if(t&&"pending"===e)return mQ.default.spanPendingStriped;switch(e){case"running":return mQ.default.spanRunning;case"pending":return mQ.default.spanPending;case"completed":return mQ.default.spanCompleted;case"cancelled":return mQ.default.spanCancelled;case"paused":return mQ.default.spanPaused;case"failed":return mQ.default.spanFailed;default:return""}}let gj=e=>{let t=e.span.attributes,r=t?.resource;if("step"===r){let e=t.data,r=e?.stepName;if(r&&String(r).toLowerCase().endsWith("sleep"))return mQ.default.spanSleep;let n=e?.status==="pending";return gB(e?.status,n)}if("run"===r){let e=t.data;return gB(e?.status,!1)}return"hook"===r?mQ.default.spanHook:"sleep"===r?mQ.default.spanSleep:""},gU=e=>{let t=e.event.name;return"step_failed"===t||"workflow_failed"===t?mQ.default.eventFailed:"step_retrying"===t?mQ.default.eventRetrying:"hook_created"===t||"hook_received"===t||"hook_disposed"===t?mQ.default.eventHook:mQ.default.eventDefault};var gH=e.i(329242);function gG({env:e,streamId:t}){let[r,n]=(0,q.useState)([]),[a,i]=(0,q.useState)(!0),[o,s]=(0,q.useState)(null),[l,c]=(0,q.useState)(!1),u=(0,q.useRef)(null),d=(0,q.useRef)(null),p=(0,q.useRef)(0),h=(0,q.useCallback)(()=>{if(u.current){let{scrollTop:e,scrollHeight:t,clientHeight:r}=u.current;c(!(t-e-r<10)&&t>r)}},[]);return(0,q.useEffect)(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight),h()},[r.length,h]),(0,q.useEffect)(()=>{let r=!0;d.current=new AbortController;let a=()=>{r&&i(!1)},o=e=>{if(r&&null!=e){let t=p.current++,r="string"==typeof e?e:JSON.stringify(e,null,2);n(e=>[...e,{id:t,text:r}])}},l=async e=>{for(;!d.current?.signal.aborted;){let{value:t,done:r}=await e.read();if(r){a();break}o(t)}};return(async()=>{try{let r=(await (0,G.readStream)(e,t)).getReader();await l(r)}catch(e){r&&(s(e instanceof Error?e.message:String(e)),i(!1))}})(),()=>{r=!1,d.current&&d.current.abort()}},[e,t]),(0,$.jsxs)("div",{className:"flex flex-col h-full pb-4",children:[(0,$.jsxs)("div",{className:"flex items-center justify-between mb-3 px-1",children:[(0,$.jsx)("code",{className:"text-xs font-mono truncate max-w-[80%]",style:{color:"var(--ds-gray-900)"},title:t,children:t}),(0,$.jsxs)("span",{className:"text-xs flex items-center gap-1.5",style:{color:a?"var(--ds-green-700)":"var(--ds-gray-600)"},children:[(0,$.jsx)("span",{className:"inline-block w-2 h-2 rounded-full",style:{backgroundColor:a?"var(--ds-green-600)":"var(--ds-gray-500)"}}),a?"Live":"Closed"]})]}),(0,$.jsxs)("div",{className:"relative flex-1 min-h-[200px]",children:[(0,$.jsx)("div",{ref:u,onScroll:h,className:"absolute inset-0 overflow-auto flex flex-col gap-2",children:o?(0,$.jsxs)("div",{className:"text-[11px] rounded-md border p-3",style:{borderColor:"var(--ds-red-300)",backgroundColor:"var(--ds-red-100)",color:"var(--ds-red-700)"},children:[(0,$.jsx)("div",{children:"Error reading stream:"}),(0,$.jsx)("div",{children:o})]}):0===r.length?(0,$.jsx)("div",{className:"text-[11px] rounded-md border p-3",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)",color:"var(--ds-gray-600)"},children:a?"Waiting for stream data...":"Stream is empty"}):r.map((e,r)=>(0,$.jsx)("pre",{className:"text-[11px] rounded-md border p-3 m-0 whitespace-pre-wrap break-words",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)",color:"var(--ds-gray-1000)"},children:(0,$.jsxs)("code",{children:[(0,$.jsxs)("span",{className:"select-none mr-2",style:{color:"var(--ds-gray-500)"},children:["[",r,"]"]}),e.text]})},`${t}-chunk-${e.id}`))}),l&&(0,$.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-8 pointer-events-none",style:{background:"linear-gradient(to top, var(--ds-background-100), transparent)"}})]})]})}e.s(["WorkflowTraceViewer",0,({run:e,steps:t,hooks:r,events:n,env:a,isLoading:i,error:o,onStreamClick:s})=>{let[l,c]=(0,q.useState)(()=>new Date);(0,q.useEffect)(()=>{if(!e?.completedAt){let e=setInterval(()=>{c(new Date)},2e3);return()=>clearInterval(e)}},[e?.completedAt]);let u=(0,q.useMemo)(()=>{if(!e)return;let a=new Map,i=new Map,o=[],s=new Map,c=new Map;for(let e of n){if("wait_created"===e.eventType||"wait_completed"===e.eventType){let t=s.get(e.correlationId)||[];t.push(e),s.set(e.correlationId,t);continue}if("hook_received"===e.eventType||"hook_created"===e.eventType||"hook_disposed"===e.eventType){let t=c.get(e.correlationId)||[];t.push(e),c.set(e.correlationId,t);continue}let n=e.correlationId;if(n){let s=t.find(e=>e.stepId===n),l=r.find(e=>e.hookId===n);if(s){let t=a.get(n)||[];t.push(e),a.set(n,t)}else if(l){let t=i.get(n)||[];t.push(e),i.set(n,t)}else o.push(e)}else o.push(e)}let u=t.map(e=>{let t=a.get(e.stepId)||[];return(0,tb.stepToSpan)(e,t,l)}),d=Array.from(c.entries()).map(([t,r])=>(0,tb.hookToSpan)(r,e,l)).filter(e=>null!==e),p=Array.from(s.entries()).map(([t,r])=>(0,tb.waitToSpan)(r,e,l)).filter(e=>null!==e),h=[(0,tb.runToSpan)(e,o,l),...[...u,...d,...p].slice().sort((e,t)=>(0,gH.otelTimeToMs)(e.startTime)-(0,gH.otelTimeToMs)(t.startTime))],f=h.map((e,t)=>{let r=0===t?void 0:String(h[t-1].spanId);return{...e,parentSpanId:r}});return{traceId:e.runId,rootSpanId:e.runId,spans:f,resources:[{name:"workflow",attributes:{"service.name":tb.WORKFLOW_LIBRARY.name}}]}},[e,t,r,n,l]);return((0,q.useEffect)(()=>{o&&!i&&(console.error(o),eb.error("Error loading workflow trace data",{description:o.message}))},[o,i]),i||!u)?(0,$.jsxs)("div",{className:"relative w-full h-full",children:[(0,$.jsx)("div",{className:"border-b border-gray-alpha-400 w-full"}),(0,$.jsx)(eD,{className:"w-full ml-2 mt-1 mb-1 h-[56px]"}),(0,$.jsxs)("div",{className:"p-2 relative w-full",children:[(0,$.jsx)(eD,{className:"w-full mt-6 h-[20px]"}),(0,$.jsx)(eD,{className:"w-[10%] mt-2 ml-6 h-[20px]"}),(0,$.jsx)(eD,{className:"w-[10%] mt-2 ml-12 h-[20px]"}),(0,$.jsx)(eD,{className:"w-[20%] mt-2 ml-16 h-[20px]"})]})]}):(0,$.jsx)("div",{className:"relative w-full h-full",children:(0,$.jsx)(mV,{withPanel:!0,customSpanClassNameFunc:gj,customSpanEventClassNameFunc:gU,customPanelComponent:(0,$.jsx)(eo,{children:(0,$.jsx)(gF,{env:a,run:e,onStreamClick:s})}),children:(0,$.jsx)(gM,{height:"100%",trace:u,withPanel:!0})})})}],195547),e.s(["StreamViewer",()=>gG],742334),e.s([],169764)},949245,e=>{"use strict";var t=e.i(7284),r=e.i(884212);function n(...e){return(0,r.twMerge)((0,t.clsx)(e))}e.i(169764),e.s(["DEFAULT_PAGE_SIZE",0,10,"LIVE_UPDATE_INTERVAL_MS",0,5e3,"cn",()=>n])},638322,e=>{"use strict";var t=e.i(666426),r=e.i(912738),n=e.i(686107),a=e.i(949245);r.Provider;let i=r.Root,o=r.Trigger,s=n.forwardRef(({className:e,sideOffset:n=4,...i},o)=>(0,t.jsx)(r.Content,{ref:o,sideOffset:n,className:(0,a.cn)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...i}));s.displayName=r.Content.displayName,e.s(["Tooltip",()=>i,"TooltipContent",()=>s,"TooltipTrigger",()=>o])},652773,e=>{"use strict";var t=e.i(686107);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return t=>{let n=!1,a=e.map(e=>{let a=r(e,t);return n||"function"!=typeof a||(n=!0),a});if(n)return()=>{for(let t=0;t<a.length;t++){let n=a[t];"function"==typeof n?n():r(e[t],null)}}}}function a(...e){return t.useCallback(n(...e),e)}e.s(["composeRefs",()=>n,"useComposedRefs",()=>a])},68206,e=>{"use strict";var t=e.i(686107),r=e.i(652773),n=e.i(666426),a=t.forwardRef((e,r)=>{let{children:a,...o}=e,l=t.Children.toArray(a),c=l.find(s);if(c){let e=c.props.children,a=l.map(r=>r!==c?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,n.jsx)(i,{...o,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,a):null})}return(0,n.jsx)(i,{...o,ref:r,children:a})});a.displayName="Slot";var i=t.forwardRef((e,n)=>{let{children:a,...i}=e;if(t.isValidElement(a)){var o;let e,s,l=(o=a,(s=(e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(s=(e=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref);return t.cloneElement(a,{...function(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...e)=>{i(...e),a(...e)}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}(i,a.props),ref:n?(0,r.composeRefs)(n,l):l})}return t.Children.count(a)>1?t.Children.only(null):null});i.displayName="SlotClone";var o=({children:e})=>(0,n.jsx)(n.Fragment,{children:e});function s(e){return t.isValidElement(e)&&e.type===o}e.s(["Slot",()=>a,"Slottable",()=>o])},260218,e=>{"use strict";var t=e.i(666426),r=e.i(68206),n=e.i(294237),a=e.i(686107),i=e.i(949245);let o=(0,n.cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),s=a.forwardRef(({className:e,variant:n,size:a,asChild:s=!1,...l},c)=>{let u=s?r.Slot:"button";return(0,t.jsx)(u,{className:(0,i.cn)(o({variant:n,size:a,className:e})),ref:c,...l})});s.displayName="Button",e.s(["Button",()=>s,"buttonVariants",()=>o])},178896,e=>{"use strict";function t(e,r,{checkForDefaultPrevented:n=!0}={}){return function(t){if(e?.(t),!1===n||!t.defaultPrevented)return r?.(t)}}e.s(["composeEventHandlers",()=>t])},961612,e=>{"use strict";var t=e.i(686107),r=e.i(666426);function n(e,n){let a=t.createContext(n),i=e=>{let{children:n,...i}=e,o=t.useMemo(()=>i,Object.values(i));return(0,r.jsx)(a.Provider,{value:o,children:n})};return i.displayName=e+"Provider",[i,function(r){let i=t.useContext(a);if(i)return i;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${e}\``)}]}function a(e,n=[]){let i=[],o=()=>{let r=i.map(e=>t.createContext(e));return function(n){let a=n?.[e]||r;return t.useMemo(()=>({[`__scope${e}`]:{...n,[e]:a}}),[n,a])}};return o.scopeName=e,[function(n,a){let o=t.createContext(a),s=i.length;i=[...i,a];let l=n=>{let{scope:a,children:i,...l}=n,c=a?.[e]?.[s]||o,u=t.useMemo(()=>l,Object.values(l));return(0,r.jsx)(c.Provider,{value:u,children:i})};return l.displayName=n+"Provider",[l,function(r,i){let l=i?.[e]?.[s]||o,c=t.useContext(l);if(c)return c;if(void 0!==a)return a;throw Error(`\`${r}\` must be used within \`${n}\``)}]},function(...e){let r=e[0];if(1===e.length)return r;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let a=n.reduce((t,{useScope:r,scopeName:n})=>{let a=r(e)[`__scope${n}`];return{...t,...a}},{});return t.useMemo(()=>({[`__scope${r.scopeName}`]:a}),[a])}};return n.scopeName=r.scopeName,n}(o,...n)]}e.s(["createContext",()=>n,"createContextScope",()=>a])},676977,448297,e=>{"use strict";var t=e.i(686107);function r(e){let r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>r.current?.(...e),[])}function n({prop:e,defaultProp:n,onChange:a=()=>{}}){let[i,o]=function({defaultProp:e,onChange:n}){let a=t.useState(e),[i]=a,o=t.useRef(i),s=r(n);return t.useEffect(()=>{o.current!==i&&(s(i),o.current=i)},[i,o,s]),a}({defaultProp:n,onChange:a}),s=void 0!==e,l=s?e:i,c=r(a);return[l,t.useCallback(t=>{if(s){let r="function"==typeof t?t(e):t;r!==e&&c(r)}else o(t)},[s,e,o,c])]}e.s(["useCallbackRef",()=>r],448297),e.s(["useControllableState",()=>n],676977)},656900,642477,828679,584169,e=>{"use strict";var t=e.i(686107),r=e.i(571577),n=e.i(652773),a=e.i(666426),i=t.forwardRef((e,r)=>{let{children:n,...i}=e,s=t.Children.toArray(n),c=s.find(l);if(c){let e=c.props.children,n=s.map(r=>r!==c?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,a.jsx)(o,{...i,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,a.jsx)(o,{...i,ref:r,children:n})});i.displayName="Slot";var o=t.forwardRef((e,r)=>{let{children:a,...i}=e;if(t.isValidElement(a)){var o;let e,s,l=(o=a,(s=(e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(s=(e=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref),c=function(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...e)=>{i(...e),a(...e)}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}(i,a.props);return a.type!==t.Fragment&&(c.ref=r?(0,n.composeRefs)(r,l):l),t.cloneElement(a,c)}return t.Children.count(a)>1?t.Children.only(null):null});o.displayName="SlotClone";var s=({children:e})=>(0,a.jsx)(a.Fragment,{children:e});function l(e){return t.isValidElement(e)&&e.type===s}e.s(["Slot",()=>i],642477);var c=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,r)=>{let n=t.forwardRef((e,t)=>{let{asChild:n,...o}=e,s=n?i:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,a.jsx)(s,{...o,ref:t})});return n.displayName=`Primitive.${r}`,{...e,[r]:n}},{});function u(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}e.s(["Primitive",()=>c,"dispatchDiscreteCustomEvent",()=>u],656900);var d=e.i(961612);function p(e){let r=e+"CollectionProvider",[o,s]=(0,d.createContextScope)(r),[l,c]=o(r,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:r,children:n}=e,i=t.default.useRef(null),o=t.default.useRef(new Map).current;return(0,a.jsx)(l,{scope:r,itemMap:o,collectionRef:i,children:n})};u.displayName=r;let p=e+"CollectionSlot",h=t.default.forwardRef((e,t)=>{let{scope:r,children:o}=e,s=c(p,r),l=(0,n.useComposedRefs)(t,s.collectionRef);return(0,a.jsx)(i,{ref:l,children:o})});h.displayName=p;let f=e+"CollectionItemSlot",m="data-radix-collection-item",g=t.default.forwardRef((e,r)=>{let{scope:o,children:s,...l}=e,u=t.default.useRef(null),d=(0,n.useComposedRefs)(r,u),p=c(f,o);return t.default.useEffect(()=>(p.itemMap.set(u,{ref:u,...l}),()=>void p.itemMap.delete(u))),(0,a.jsx)(i,{...{[m]:""},ref:d,children:s})});return g.displayName=f,[{Provider:u,Slot:h,ItemSlot:g},function(r){let n=c(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},s]}e.s(["createCollection",()=>p],828679);var h=t.createContext(void 0);function f(e){let r=t.useContext(h);return e||r||"ltr"}e.s(["useDirection",()=>f],584169)},25749,e=>{"use strict";var t=e.i(686107),r=e.i(448297);function n(e,a=globalThis?.document){let i=(0,r.useCallbackRef)(e);t.useEffect(()=>{let e=e=>{"Escape"===e.key&&i(e)};return a.addEventListener("keydown",e,{capture:!0}),()=>a.removeEventListener("keydown",e,{capture:!0})},[i,a])}e.s(["useEscapeKeydown",()=>n])},931289,e=>{"use strict";var t,r=e.i(686107),n=e.i(178896),a=e.i(656900),i=e.i(652773),o=e.i(448297),s=e.i(25749),l=e.i(666426),c="dismissableLayer.update",u=r.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),d=r.forwardRef((e,d)=>{let{disableOutsidePointerEvents:f=!1,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:y,onInteractOutside:E,onDismiss:b,...v}=e,T=r.useContext(u),[_,A]=r.useState(null),k=_?.ownerDocument??globalThis?.document,[,w]=r.useState({}),x=(0,i.useComposedRefs)(d,e=>A(e)),S=Array.from(T.layers),[C]=[...T.layersWithOutsidePointerEventsDisabled].slice(-1),N=S.indexOf(C),I=_?S.indexOf(_):-1,R=T.layersWithOutsidePointerEventsDisabled.size>0,D=I>=N,L=function(e,t=globalThis?.document){let n=(0,o.useCallbackRef)(e),a=r.useRef(!1),i=r.useRef(()=>{});return r.useEffect(()=>{let e=e=>{if(e.target&&!a.current){let r=function(){h("dismissableLayer.pointerDownOutside",n,a,{discrete:!0})},a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=r,t.addEventListener("click",i.current,{once:!0})):r()}else t.removeEventListener("click",i.current);a.current=!1},r=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(r),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}(e=>{let t=e.target,r=[...T.branches].some(e=>e.contains(t));D&&!r&&(g?.(e),E?.(e),e.defaultPrevented||b?.())},k),O=function(e,t=globalThis?.document){let n=(0,o.useCallbackRef)(e),a=r.useRef(!1);return r.useEffect(()=>{let e=e=>{e.target&&!a.current&&h("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}(e=>{let t=e.target;![...T.branches].some(e=>e.contains(t))&&(y?.(e),E?.(e),e.defaultPrevented||b?.())},k);return(0,s.useEscapeKeydown)(e=>{I===T.layers.size-1&&(m?.(e),!e.defaultPrevented&&b&&(e.preventDefault(),b()))},k),r.useEffect(()=>{if(_)return f&&(0===T.layersWithOutsidePointerEventsDisabled.size&&(t=k.body.style.pointerEvents,k.body.style.pointerEvents="none"),T.layersWithOutsidePointerEventsDisabled.add(_)),T.layers.add(_),p(),()=>{f&&1===T.layersWithOutsidePointerEventsDisabled.size&&(k.body.style.pointerEvents=t)}},[_,k,f,T]),r.useEffect(()=>()=>{_&&(T.layers.delete(_),T.layersWithOutsidePointerEventsDisabled.delete(_),p())},[_,T]),r.useEffect(()=>{let e=()=>w({});return document.addEventListener(c,e),()=>document.removeEventListener(c,e)},[]),(0,l.jsx)(a.Primitive.div,{...v,ref:x,style:{pointerEvents:R?D?"auto":"none":void 0,...e.style},onFocusCapture:(0,n.composeEventHandlers)(e.onFocusCapture,O.onFocusCapture),onBlurCapture:(0,n.composeEventHandlers)(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:(0,n.composeEventHandlers)(e.onPointerDownCapture,L.onPointerDownCapture)})});function p(){let e=new CustomEvent(c);document.dispatchEvent(e)}function h(e,t,r,{discrete:n}){let i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?(0,a.dispatchDiscreteCustomEvent)(i,o):i.dispatchEvent(o)}d.displayName="DismissableLayer",r.forwardRef((e,t)=>{let n=r.useContext(u),o=r.useRef(null),s=(0,i.useComposedRefs)(t,o);return r.useEffect(()=>{let e=o.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,l.jsx)(a.Primitive.div,{...e,ref:s})}).displayName="DismissableLayerBranch",e.s(["DismissableLayer",()=>d])},648502,e=>{"use strict";var t=e.i(686107),r=0;function n(){t.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??a()),document.body.insertAdjacentElement("beforeend",e[1]??a()),r++,()=>{1===r&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),r--}},[])}function a(){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}e.s(["useFocusGuards",()=>n])},632529,e=>{"use strict";let t;var r=e.i(686107),n=e.i(652773),a=e.i(656900),i=e.i(448297),o=e.i(666426),s="focusScope.autoFocusOnMount",l="focusScope.autoFocusOnUnmount",c={bubbles:!1,cancelable:!0},u=r.forwardRef((e,t)=>{let{loop:u=!1,trapped:m=!1,onMountAutoFocus:g,onUnmountAutoFocus:y,...E}=e,[b,v]=r.useState(null),T=(0,i.useCallbackRef)(g),_=(0,i.useCallbackRef)(y),A=r.useRef(null),k=(0,n.useComposedRefs)(t,e=>v(e)),w=r.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;r.useEffect(()=>{if(m){let e=function(e){if(w.paused||!b)return;let t=e.target;b.contains(t)?A.current=t:h(A.current,{select:!0})},t=function(e){if(w.paused||!b)return;let t=e.relatedTarget;null!==t&&(b.contains(t)||h(A.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&h(b)});return b&&r.observe(b,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[m,b,w.paused]),r.useEffect(()=>{if(b){f.add(w);let e=document.activeElement;if(!b.contains(e)){let t=new CustomEvent(s,c);b.addEventListener(s,T),b.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(h(n,{select:t}),document.activeElement!==r)return}(d(b).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&h(b))}return()=>{b.removeEventListener(s,T),setTimeout(()=>{let t=new CustomEvent(l,c);b.addEventListener(l,_),b.dispatchEvent(t),t.defaultPrevented||h(e??document.body,{select:!0}),b.removeEventListener(l,_),f.remove(w)},0)}}},[b,T,_,w]);let x=r.useCallback(e=>{if(!u&&!m||w.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){var n;let t,a=e.currentTarget,[i,o]=[p(t=d(n=a),n),p(t.reverse(),n)];i&&o?e.shiftKey||r!==o?e.shiftKey&&r===i&&(e.preventDefault(),u&&h(o,{select:!0})):(e.preventDefault(),u&&h(i,{select:!0})):r===a&&e.preventDefault()}},[u,m,w.paused]);return(0,o.jsx)(a.Primitive.div,{tabIndex:-1,...E,ref:k,onKeyDown:x})});function d(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function p(e,t){for(let r of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function h(e,{select:t=!1}={}){if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}u.displayName="FocusScope";var f=(t=[],{add(e){let r=t[0];e!==r&&r?.pause(),(t=m(t,e)).unshift(e)},remove(e){t=m(t,e),t[0]?.resume()}});function m(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}e.s(["FocusScope",()=>u])},873350,664019,e=>{"use strict";var t=e.i(686107),r=globalThis?.document?t.useLayoutEffect:()=>{};e.s(["useLayoutEffect",()=>r],664019);var n=t["useId".toString()]||(()=>void 0),a=0;function i(e){let[i,o]=t.useState(n());return r(()=>{e||o(e=>e??String(a++))},[e]),e||(i?`radix-${i}`:"")}e.s(["useId",()=>i],873350)},378104,134448,e=>{"use strict";var t=e.i(686107),r=e.i(50346),n=e.i(422957),a=e.i(656900),i=e.i(666426),o=t.forwardRef((e,t)=>{let{children:r,width:n=10,height:o=5,...s}=e;return(0,i.jsx)(a.Primitive.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,i.jsx)("polygon",{points:"0,0 30,0 15,10"})})});o.displayName="Arrow";var s=e.i(652773),l=e.i(961612),c=e.i(448297),u=e.i(664019),d="Popper",[p,h]=(0,l.createContextScope)(d),[f,m]=p(d),g=e=>{let{__scopePopper:r,children:n}=e,[a,o]=t.useState(null);return(0,i.jsx)(f,{scope:r,anchor:a,onAnchorChange:o,children:n})};g.displayName=d;var y="PopperAnchor",E=t.forwardRef((e,r)=>{let{__scopePopper:n,virtualRef:o,...l}=e,c=m(y,n),u=t.useRef(null),d=(0,s.useComposedRefs)(r,u);return t.useEffect(()=>{c.onAnchorChange(o?.current||u.current)}),o?null:(0,i.jsx)(a.Primitive.div,{...l,ref:d})});E.displayName=y;var b="PopperContent",[v,T]=p(b),_=t.forwardRef((e,o)=>{let{__scopePopper:l,side:d="bottom",sideOffset:p=0,align:h="center",alignOffset:f=0,arrowPadding:g=0,avoidCollisions:y=!0,collisionBoundary:E=[],collisionPadding:T=0,sticky:_="partial",hideWhenDetached:A=!1,updatePositionStrategy:k="optimized",onPlaced:w,...N}=e,I=m(b,l),[R,D]=t.useState(null),L=(0,s.useComposedRefs)(o,e=>D(e)),[O,P]=t.useState(null),M=function(e){let[r,n]=t.useState(void 0);return(0,u.useLayoutEffect)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,a;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,a=t.blockSize}else r=e.offsetWidth,a=e.offsetHeight;n({width:r,height:a})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),r}(O),F=M?.width??0,B=M?.height??0,j="number"==typeof T?T:{top:0,right:0,bottom:0,left:0,...T},U=Array.isArray(E)?E:[E],H=U.length>0,G={padding:j,boundary:U.filter(x),altBoundary:H},{refs:$,floatingStyles:z,placement:W,isPositioned:q,middlewareData:V}=(0,r.useFloating)({strategy:"fixed",placement:d+("center"!==h?"-"+h:""),whileElementsMounted:(...e)=>(0,n.autoUpdate)(...e,{animationFrame:"always"===k}),elements:{reference:I.anchor},middleware:[(0,r.offset)({mainAxis:p+B,alignmentAxis:f}),y&&(0,r.shift)({mainAxis:!0,crossAxis:!1,limiter:"partial"===_?(0,r.limitShift)():void 0,...G}),y&&(0,r.flip)({...G}),(0,r.size)({...G,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:a,height:i}=t.reference,o=e.floating.style;o.setProperty("--radix-popper-available-width",`${r}px`),o.setProperty("--radix-popper-available-height",`${n}px`),o.setProperty("--radix-popper-anchor-width",`${a}px`),o.setProperty("--radix-popper-anchor-height",`${i}px`)}}),O&&(0,r.arrow)({element:O,padding:g}),S({arrowWidth:F,arrowHeight:B}),A&&(0,r.hide)({strategy:"referenceHidden",...G})]}),[Y,Q]=C(W),K=(0,c.useCallbackRef)(w);(0,u.useLayoutEffect)(()=>{q&&K?.()},[q,K]);let X=V.arrow?.x,J=V.arrow?.y,Z=V.arrow?.centerOffset!==0,[ee,et]=t.useState();return(0,u.useLayoutEffect)(()=>{R&&et(window.getComputedStyle(R).zIndex)},[R]),(0,i.jsx)("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:q?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,i.jsx)(v,{scope:l,placedSide:Y,onArrowChange:P,arrowX:X,arrowY:J,shouldHideArrow:Z,children:(0,i.jsx)(a.Primitive.div,{"data-side":Y,"data-align":Q,...N,ref:L,style:{...N.style,animation:q?void 0:"none"}})})})});_.displayName=b;var A="PopperArrow",k={top:"bottom",right:"left",bottom:"top",left:"right"},w=t.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,a=T(A,r),s=k[a.placedSide];return(0,i.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,i.jsx)(o,{...n,ref:t,style:{...n.style,display:"block"}})})});function x(e){return null!==e}w.displayName=A;var S=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:a}=t,i=a.arrow?.centerOffset!==0,o=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=C(r),u={start:"0%",center:"50%",end:"100%"}[c],d=(a.arrow?.x??0)+o/2,p=(a.arrow?.y??0)+s/2,h="",f="";return"bottom"===l?(h=i?u:`${d}px`,f=`${-s}px`):"top"===l?(h=i?u:`${d}px`,f=`${n.floating.height+s}px`):"right"===l?(h=`${-s}px`,f=i?u:`${p}px`):"left"===l&&(h=`${n.floating.width+s}px`,f=i?u:`${p}px`),{data:{x:h,y:f}}}});function C(e){let[t,r="center"]=e.split("-");return[t,r]}e.s(["Anchor",()=>E,"Arrow",()=>w,"Content",()=>_,"Root",()=>g,"createPopperScope",()=>h],378104);var N=e.i(571577),I=t.forwardRef((e,r)=>{let{container:n,...o}=e,[s,l]=t.useState(!1);(0,u.useLayoutEffect)(()=>l(!0),[]);let c=n||s&&globalThis?.document?.body;return c?N.default.createPortal((0,i.jsx)(a.Primitive.div,{...o,ref:r}),c):null});I.displayName="Portal",e.s(["Portal",()=>I],134448)},224285,e=>{"use strict";var t=e.i(686107),r=e.i(652773),n=e.i(664019),a=e=>{var a;let o,s,{present:l,children:c}=e,u=function(e){var r,a;let[o,s]=t.useState(),l=t.useRef({}),c=t.useRef(e),u=t.useRef("none"),[d,p]=(r=e?"mounted":"unmounted",a={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,t)=>a[e][t]??e,r));return t.useEffect(()=>{let e=i(l.current);u.current="mounted"===d?e:"none"},[d]),(0,n.useLayoutEffect)(()=>{let t=l.current,r=c.current;if(r!==e){let n=u.current,a=i(t);e?p("MOUNT"):"none"===a||t?.display==="none"?p("UNMOUNT"):r&&n!==a?p("ANIMATION_OUT"):p("UNMOUNT"),c.current=e}},[e,p]),(0,n.useLayoutEffect)(()=>{if(o){let e,t=o.ownerDocument.defaultView??window,r=r=>{let n=i(l.current).includes(r.animationName);if(r.target===o&&n&&(p("ANIMATION_END"),!c.current)){let r=o.style.animationFillMode;o.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===o.style.animationFillMode&&(o.style.animationFillMode=r)})}},n=e=>{e.target===o&&(u.current=i(l.current))};return o.addEventListener("animationstart",n),o.addEventListener("animationcancel",r),o.addEventListener("animationend",r),()=>{t.clearTimeout(e),o.removeEventListener("animationstart",n),o.removeEventListener("animationcancel",r),o.removeEventListener("animationend",r)}}p("ANIMATION_END")},[o,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:t.useCallback(e=>{e&&(l.current=getComputedStyle(e)),s(e)},[])}}(l),d="function"==typeof c?c({present:u.isPresent}):t.Children.only(c),p=(0,r.useComposedRefs)(u.ref,(a=d,(s=(o=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?a.ref:(s=(o=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?a.props.ref:a.props.ref||a.ref));return"function"==typeof c||u.isPresent?t.cloneElement(d,{ref:p}):null};function i(e){return e?.animationName||"none"}a.displayName="Presence",e.s(["Presence",()=>a])},829427,e=>{"use strict";var t=e.i(686107),r=e.i(178896),n=e.i(828679),a=e.i(652773),i=e.i(961612),o=e.i(873350),s=e.i(656900),l=e.i(448297),c=e.i(676977),u=e.i(584169),d=e.i(666426),p="rovingFocusGroup.onEntryFocus",h={bubbles:!1,cancelable:!0},f="RovingFocusGroup",[m,g,y]=(0,n.createCollection)(f),[E,b]=(0,i.createContextScope)(f,[y]),[v,T]=E(f),_=t.forwardRef((e,t)=>(0,d.jsx)(m.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(m.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(A,{...e,ref:t})})}));_.displayName=f;var A=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,orientation:o,loop:f=!1,dir:m,currentTabStopId:y,defaultCurrentTabStopId:E,onCurrentTabStopIdChange:b,onEntryFocus:T,preventScrollOnEntryFocus:_=!1,...A}=e,k=t.useRef(null),w=(0,a.useComposedRefs)(n,k),x=(0,u.useDirection)(m),[C=null,N]=(0,c.useControllableState)({prop:y,defaultProp:E,onChange:b}),[I,R]=t.useState(!1),D=(0,l.useCallbackRef)(T),L=g(i),O=t.useRef(!1),[P,M]=t.useState(0);return t.useEffect(()=>{let e=k.current;if(e)return e.addEventListener(p,D),()=>e.removeEventListener(p,D)},[D]),(0,d.jsx)(v,{scope:i,orientation:o,dir:x,loop:f,currentTabStopId:C,onItemFocus:t.useCallback(e=>N(e),[N]),onItemShiftTab:t.useCallback(()=>R(!0),[]),onFocusableItemAdd:t.useCallback(()=>M(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>M(e=>e-1),[]),children:(0,d.jsx)(s.Primitive.div,{tabIndex:I||0===P?-1:0,"data-orientation":o,...A,ref:w,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{O.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!O.current;if(e.target===e.currentTarget&&t&&!I){let t=new CustomEvent(p,h);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=L().filter(e=>e.focusable);S([e.find(e=>e.active),e.find(e=>e.id===C),...e].filter(Boolean).map(e=>e.ref.current),_)}}O.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>R(!1))})})}),k="RovingFocusGroupItem",w=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:a,focusable:i=!0,active:l=!1,tabStopId:c,...u}=e,p=(0,o.useId)(),h=c||p,f=T(k,a),y=f.currentTabStopId===h,E=g(a),{onFocusableItemAdd:b,onFocusableItemRemove:v}=f;return t.useEffect(()=>{if(i)return b(),()=>v()},[i,b,v]),(0,d.jsx)(m.ItemSlot,{scope:a,id:h,focusable:i,active:l,children:(0,d.jsx)(s.Primitive.span,{tabIndex:y?0:-1,"data-orientation":f.orientation,...u,ref:n,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{i?f.onItemFocus(h):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>f.onItemFocus(h)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void f.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let a=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(a))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(a)))return x[a]}(e,f.orientation,f.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let a=E().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)a.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&a.reverse();let i=a.indexOf(e.currentTarget);a=f.loop?(r=a,n=i+1,r.map((e,t)=>r[(n+t)%r.length])):a.slice(i+1)}setTimeout(()=>S(a))}})})})});w.displayName=k;var x={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function S(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>w,"Root",()=>_,"createRovingFocusGroupScope",()=>b])},73772,e=>{"use strict";var t=new WeakMap,r=new WeakMap,n={},a=0,i=function(e){return e&&(e.host||i(e.parentNode))},o=function(e,o,s,l){var c=(Array.isArray(e)?e:[e]).map(function(e){if(o.contains(e))return e;var t=i(e);return t&&o.contains(t)?t:(console.error("aria-hidden",e,"in not contained inside",o,". Doing nothing"),null)}).filter(function(e){return!!e});n[s]||(n[s]=new WeakMap);var u=n[s],d=[],p=new Set,h=new Set(c),f=function(e){!e||p.has(e)||(p.add(e),f(e.parentNode))};c.forEach(f);var m=function(e){!e||h.has(e)||Array.prototype.forEach.call(e.children,function(e){if(p.has(e))m(e);else try{var n=e.getAttribute(l),a=null!==n&&"false"!==n,i=(t.get(e)||0)+1,o=(u.get(e)||0)+1;t.set(e,i),u.set(e,o),d.push(e),1===i&&a&&r.set(e,!0),1===o&&e.setAttribute(s,"true"),a||e.setAttribute(l,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return m(o),p.clear(),a++,function(){d.forEach(function(e){var n=t.get(e)-1,a=u.get(e)-1;t.set(e,n),u.set(e,a),n||(r.has(e)||e.removeAttribute(l),r.delete(e)),a||e.removeAttribute(s)}),--a||(t=new WeakMap,t=new WeakMap,r=new WeakMap,n={})}},s=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=t||("undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),o(n,a,r,"aria-hidden")):function(){return null}};e.s(["hideOthers",()=>s])},891246,e=>{"use strict";var t,r,n,a,i,o,s,l=function(){return(l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function c(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var u=("function"==typeof SuppressedError&&SuppressedError,e.i(686107)),d="right-scroll-bar-position",p="width-before-scroll-bar";function h(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var f="undefined"!=typeof window?u.useLayoutEffect:u.useEffect,m=new WeakMap,g=(void 0===t&&(t={}),(void 0===r&&(r=function(e){return e}),n=[],a=!1,i={read:function(){if(a)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:null},useMedium:function(e){var t=r(e,a);return n.push(t),function(){n=n.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(a=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){a=!0;var t=[];if(n.length){var r=n;n=[],r.forEach(e),t=n}var i=function(){var r=t;t=[],r.forEach(e)},o=function(){return Promise.resolve().then(i)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}).options=l({async:!0,ssr:!1},t),i),y=function(){},E=u.forwardRef(function(e,t){var r,n,a,i,o=u.useRef(null),s=u.useState({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:y}),d=s[0],p=s[1],E=e.forwardProps,b=e.children,v=e.className,T=e.removeScrollBar,_=e.enabled,A=e.shards,k=e.sideCar,w=e.noRelative,x=e.noIsolation,S=e.inert,C=e.allowPinchZoom,N=e.as,I=e.gapMode,R=c(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=(r=[o,t],n=function(e){return r.forEach(function(t){return h(t,e)})},(a=(0,u.useState)(function(){return{value:null,callback:n,facade:{get current(){return a.value},set current(value){var e=a.value;e!==value&&(a.value=value,a.callback(value,e))}}}})[0]).callback=n,i=a.facade,f(function(){var e=m.get(i);if(e){var t=new Set(e),n=new Set(r),a=i.current;t.forEach(function(e){n.has(e)||h(e,null)}),n.forEach(function(e){t.has(e)||h(e,a)})}m.set(i,r)},[r]),i),L=l(l({},R),d);return u.createElement(u.Fragment,null,_&&u.createElement(k,{sideCar:g,removeScrollBar:T,shards:A,noRelative:w,noIsolation:x,inert:S,setCallbacks:p,allowPinchZoom:!!C,lockRef:o,gapMode:I}),E?u.cloneElement(u.Children.only(b),l(l({},L),{ref:D})):u.createElement(void 0===N?"div":N,l({},L,{className:v,ref:D}),b))});E.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},E.classNames={fullWidth:p,zeroRight:d};var b=function(e){var t=e.sideCar,r=c(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return u.createElement(n,l({},r))};b.isSideCarExport=!0;var v=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=s||("undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var n,a;(n=t).styleSheet?n.styleSheet.cssText=r:n.appendChild(document.createTextNode(r)),a=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(a)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},T=function(){var e=v();return function(t,r){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},_=function(){var e=T();return function(t){return e(t.styles,t.dynamic),null}},A={left:0,top:0,right:0,gap:0},k=function(e){return parseInt(e||"",10)||0},w=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[k(r),k(n),k(a)]},x=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return A;var t=w(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},S=_(),C="data-scroll-locked",N=function(e,t,r,n){var a=e.left,i=e.top,o=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body[").concat(C,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(o,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(d," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(p," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(d," .").concat(d," {\n right: 0 ").concat(n,";\n }\n \n .").concat(p," .").concat(p," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(C,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},I=function(){var e=parseInt(document.body.getAttribute(C)||"0",10);return isFinite(e)?e:0},R=function(){u.useEffect(function(){return document.body.setAttribute(C,(I()+1).toString()),function(){var e=I()-1;e<=0?document.body.removeAttribute(C):document.body.setAttribute(C,e.toString())}},[])},D=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=void 0===n?"margin":n;R();var i=u.useMemo(function(){return x(a)},[a]);return u.createElement(S,{styles:N(i,!t,a,r?"":"!important")})},L=!1;if("undefined"!=typeof window)try{var O=Object.defineProperty({},"passive",{get:function(){return L=!0,!0}});window.addEventListener("test",O,O),window.removeEventListener("test",O,O)}catch(e){L=!1}var P=!!L&&{passive:!1},M=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&(r.overflowY!==r.overflowX||"TEXTAREA"===e.tagName||"visible"!==r[t])},F=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),B(e,n)){var a=j(e,n);if(a[1]>a[2])return!0}n=n.parentNode}while(n&&n!==r.body)return!1},B=function(e,t){return"v"===e?M(t,"overflowY"):M(t,"overflowX")},j=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},U=function(e,t,r,n,a){var i,o=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),s=o*n,l=r.target,c=t.contains(l),u=!1,d=s>0,p=0,h=0;do{if(!l)break;var f=j(e,l),m=f[0],g=f[1]-f[2]-o*m;(m||g)&&B(e,l)&&(p+=g,h+=m);var y=l.parentNode;l=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&l!==document.body||c&&(t.contains(l)||t===l))return d&&(a&&1>Math.abs(p)||!a&&s>p)?u=!0:!d&&(a&&1>Math.abs(h)||!a&&-s>h)&&(u=!0),u},H=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},G=function(e){return[e.deltaX,e.deltaY]},$=function(e){return e&&"current"in e?e.current:e},z=0,W=[];let q=(o=function(e){var t=u.useRef([]),r=u.useRef([0,0]),n=u.useRef(),a=u.useState(z++)[0],i=u.useState(_)[0],o=u.useRef(e);u.useEffect(function(){o.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=(function(e,t,r){if(r||2==arguments.length)for(var n,a=0,i=t.length;a<i;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map($),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var s=u.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!o.current.allowPinchZoom;var a,i=H(e),s=r.current,l="deltaX"in e?e.deltaX:s[0]-i[0],c="deltaY"in e?e.deltaY:s[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=F(d,u);if(!p)return!0;if(p?a=d:(a="v"===d?"h":"v",p=F(d,u)),!p)return!1;if(!n.current&&"changedTouches"in e&&(l||c)&&(n.current=a),!a)return!0;var h=n.current||a;return U(h,t,e,"h"===h?l:c,!0)},[]),l=u.useCallback(function(e){if(W.length&&W[W.length-1]===i){var r="deltaY"in e?G(e):H(e),n=t.current.filter(function(t){var n;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(n=t.delta,n[0]===r[0]&&n[1]===r[1])})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var a=(o.current.shards||[]).map($).filter(Boolean).filter(function(t){return t.contains(e.target)});(a.length>0?s(e,a[0]):!o.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=u.useCallback(function(e,r,n,a){var i={name:e,delta:r,target:n,should:a,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(n)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),d=u.useCallback(function(e){r.current=H(e),n.current=void 0},[]),p=u.useCallback(function(t){c(t.type,G(t),t.target,s(t,e.lockRef.current))},[]),h=u.useCallback(function(t){c(t.type,H(t),t.target,s(t,e.lockRef.current))},[]);u.useEffect(function(){return W.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",l,P),document.addEventListener("touchmove",l,P),document.addEventListener("touchstart",d,P),function(){W=W.filter(function(e){return e!==i}),document.removeEventListener("wheel",l,P),document.removeEventListener("touchmove",l,P),document.removeEventListener("touchstart",d,P)}},[]);var f=e.removeScrollBar,m=e.inert;return u.createElement(u.Fragment,null,m?u.createElement(i,{styles:"\n .block-interactivity-".concat(a," {pointer-events: none;}\n .allow-interactivity-").concat(a," {pointer-events: all;}\n")}):null,f?u.createElement(D,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},g.useMedium(o),b);var V=u.forwardRef(function(e,t){return u.createElement(E,l({},e,{ref:t,sideCar:q}))});V.classNames=E.classNames,e.s(["RemoveScroll",0,V],891246)},362503,e=>{"use strict";var t=e.i(686107),r=e.i(178896),n=e.i(652773),a=e.i(961612),i=e.i(676977),o=e.i(656900),s=e.i(828679),l=e.i(584169),c=e.i(931289),u=e.i(648502),d=e.i(632529),p=e.i(873350),h=e.i(378104),f=e.i(134448),m=e.i(224285),g=e.i(829427),y=e.i(642477),E=e.i(448297),b=e.i(73772),v=e.i(891246),T=e.i(666426),_=["Enter"," "],A=["ArrowUp","PageDown","End"],k=["ArrowDown","PageUp","Home",...A],w={ltr:[..._,"ArrowRight"],rtl:[..._,"ArrowLeft"]},x={ltr:["ArrowLeft"],rtl:["ArrowRight"]},S="Menu",[C,N,I]=(0,s.createCollection)(S),[R,D]=(0,a.createContextScope)(S,[I,h.createPopperScope,g.createRovingFocusGroupScope]),L=(0,h.createPopperScope)(),O=(0,g.createRovingFocusGroupScope)(),[P,M]=R(S),[F,B]=R(S),j=e=>{let{__scopeMenu:r,open:n=!1,children:a,dir:i,onOpenChange:o,modal:s=!0}=e,c=L(r),[u,d]=t.useState(null),p=t.useRef(!1),f=(0,E.useCallbackRef)(o),m=(0,l.useDirection)(i);return t.useEffect(()=>{let e=()=>{p.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>p.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,T.jsx)(h.Root,{...c,children:(0,T.jsx)(P,{scope:r,open:n,onOpenChange:f,content:u,onContentChange:d,children:(0,T.jsx)(F,{scope:r,onClose:t.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:p,dir:m,modal:s,children:a})})})};j.displayName=S;var U=t.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,a=L(r);return(0,T.jsx)(h.Anchor,{...a,...n,ref:t})});U.displayName="MenuAnchor";var H="MenuPortal",[G,$]=R(H,{forceMount:void 0}),z=e=>{let{__scopeMenu:t,forceMount:r,children:n,container:a}=e,i=M(H,t);return(0,T.jsx)(G,{scope:t,forceMount:r,children:(0,T.jsx)(m.Presence,{present:r||i.open,children:(0,T.jsx)(f.Portal,{asChild:!0,container:a,children:n})})})};z.displayName=H;var W="MenuContent",[q,V]=R(W),Y=t.forwardRef((e,t)=>{let r=$(W,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,i=M(W,e.__scopeMenu),o=B(W,e.__scopeMenu);return(0,T.jsx)(C.Provider,{scope:e.__scopeMenu,children:(0,T.jsx)(m.Presence,{present:n||i.open,children:(0,T.jsx)(C.Slot,{scope:e.__scopeMenu,children:o.modal?(0,T.jsx)(Q,{...a,ref:t}):(0,T.jsx)(K,{...a,ref:t})})})})}),Q=t.forwardRef((e,a)=>{let i=M(W,e.__scopeMenu),o=t.useRef(null),s=(0,n.useComposedRefs)(a,o);return t.useEffect(()=>{let e=o.current;if(e)return(0,b.hideOthers)(e)},[]),(0,T.jsx)(X,{...e,ref:s,trapFocus:i.open,disableOutsidePointerEvents:i.open,disableOutsideScroll:!0,onFocusOutside:(0,r.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>i.onOpenChange(!1)})}),K=t.forwardRef((e,t)=>{let r=M(W,e.__scopeMenu);return(0,T.jsx)(X,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),X=t.forwardRef((e,a)=>{let{__scopeMenu:i,loop:o=!1,trapFocus:s,onOpenAutoFocus:l,onCloseAutoFocus:p,disableOutsidePointerEvents:f,onEntryFocus:m,onEscapeKeyDown:E,onPointerDownOutside:b,onFocusOutside:_,onInteractOutside:w,onDismiss:x,disableOutsideScroll:S,...C}=e,I=M(W,i),R=B(W,i),D=L(i),P=O(i),F=N(i),[j,U]=t.useState(null),H=t.useRef(null),G=(0,n.useComposedRefs)(a,H,I.onContentChange),$=t.useRef(0),z=t.useRef(""),V=t.useRef(0),Y=t.useRef(null),Q=t.useRef("right"),K=t.useRef(0),X=S?v.RemoveScroll:t.Fragment,J=S?{as:y.Slot,allowPinchZoom:!0}:void 0;t.useEffect(()=>()=>window.clearTimeout($.current),[]),(0,u.useFocusGuards)();let Z=t.useCallback(e=>{var t,r;return Q.current===Y.current?.side&&(t=e,!!(r=Y.current?.area)&&function(e,t){let{x:r,y:n}=e,a=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){let o=t[e].x,s=t[e].y,l=t[i].x,c=t[i].y;s>n!=c>n&&r<(l-o)*(n-s)/(c-s)+o&&(a=!a)}return a}({x:t.clientX,y:t.clientY},r))},[]);return(0,T.jsx)(q,{scope:i,searchRef:z,onItemEnter:t.useCallback(e=>{Z(e)&&e.preventDefault()},[Z]),onItemLeave:t.useCallback(e=>{Z(e)||(H.current?.focus(),U(null))},[Z]),onTriggerLeave:t.useCallback(e=>{Z(e)&&e.preventDefault()},[Z]),pointerGraceTimerRef:V,onPointerGraceIntentChange:t.useCallback(e=>{Y.current=e},[]),children:(0,T.jsx)(X,{...J,children:(0,T.jsx)(d.FocusScope,{asChild:!0,trapped:s,onMountAutoFocus:(0,r.composeEventHandlers)(l,e=>{e.preventDefault(),H.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:p,children:(0,T.jsx)(c.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:E,onPointerDownOutside:b,onFocusOutside:_,onInteractOutside:w,onDismiss:x,children:(0,T.jsx)(g.Root,{asChild:!0,...P,dir:R.dir,orientation:"vertical",loop:o,currentTabStopId:j,onCurrentTabStopIdChange:U,onEntryFocus:(0,r.composeEventHandlers)(m,e=>{R.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,T.jsx)(h.Content,{role:"menu","aria-orientation":"vertical","data-state":ew(I.open),"data-radix-menu-content":"",dir:R.dir,...D,...C,ref:G,style:{outline:"none",...C.style},onKeyDown:(0,r.composeEventHandlers)(C.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,n=1===e.key.length;if(t){var a;let t,i,o,s,l,c;"Tab"===e.key&&e.preventDefault(),!r&&n&&(a=e.key,t=z.current+a,i=F().filter(e=>!e.disabled),o=document.activeElement,s=i.find(e=>e.ref.current===o)?.textValue,l=function(e,t,r){var n;let a=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=r?e.indexOf(r):-1,o=(n=Math.max(i,0),e.map((t,r)=>e[(n+r)%e.length]));1===a.length&&(o=o.filter(e=>e!==r));let s=o.find(e=>e.toLowerCase().startsWith(a.toLowerCase()));return s!==r?s:void 0}(i.map(e=>e.textValue),t,s),c=i.find(e=>e.textValue===l)?.ref.current,function e(t){z.current=t,window.clearTimeout($.current),""!==t&&($.current=window.setTimeout(()=>e(""),1e3))}(t),c&&setTimeout(()=>c.focus()))}let i=H.current;if(e.target!==i||!k.includes(e.key))return;e.preventDefault();let o=F().filter(e=>!e.disabled).map(e=>e.ref.current);A.includes(e.key)&&o.reverse(),function(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}(o)}),onBlur:(0,r.composeEventHandlers)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout($.current),z.current="")}),onPointerMove:(0,r.composeEventHandlers)(e.onPointerMove,eC(e=>{let t=e.target,r=K.current!==e.clientX;e.currentTarget.contains(t)&&r&&(Q.current=e.clientX>K.current?"right":"left",K.current=e.clientX)}))})})})})})})});Y.displayName=W;var J=t.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,T.jsx)(o.Primitive.div,{role:"group",...n,ref:t})});J.displayName="MenuGroup";var Z=t.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,T.jsx)(o.Primitive.div,{...n,ref:t})});Z.displayName="MenuLabel";var ee="MenuItem",et="menu.itemSelect",er=t.forwardRef((e,a)=>{let{disabled:i=!1,onSelect:s,...l}=e,c=t.useRef(null),u=B(ee,e.__scopeMenu),d=V(ee,e.__scopeMenu),p=(0,n.useComposedRefs)(a,c),h=t.useRef(!1);return(0,T.jsx)(en,{...l,ref:p,disabled:i,onClick:(0,r.composeEventHandlers)(e.onClick,()=>{let e=c.current;if(!i&&e){let t=new CustomEvent(et,{bubbles:!0,cancelable:!0});e.addEventListener(et,e=>s?.(e),{once:!0}),(0,o.dispatchDiscreteCustomEvent)(e,t),t.defaultPrevented?h.current=!1:u.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),h.current=!0},onPointerUp:(0,r.composeEventHandlers)(e.onPointerUp,e=>{h.current||e.currentTarget?.click()}),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{let t=""!==d.searchRef.current;i||t&&" "===e.key||_.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});er.displayName=ee;var en=t.forwardRef((e,a)=>{let{__scopeMenu:i,disabled:s=!1,textValue:l,...c}=e,u=V(ee,i),d=O(i),p=t.useRef(null),h=(0,n.useComposedRefs)(a,p),[f,m]=t.useState(!1),[y,E]=t.useState("");return t.useEffect(()=>{let e=p.current;e&&E((e.textContent??"").trim())},[c.children]),(0,T.jsx)(C.ItemSlot,{scope:i,disabled:s,textValue:l??y,children:(0,T.jsx)(g.Item,{asChild:!0,...d,focusable:!s,children:(0,T.jsx)(o.Primitive.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":s||void 0,"data-disabled":s?"":void 0,...c,ref:h,onPointerMove:(0,r.composeEventHandlers)(e.onPointerMove,eC(e=>{s?u.onItemLeave(e):(u.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,r.composeEventHandlers)(e.onPointerLeave,eC(e=>u.onItemLeave(e))),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>m(!0)),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>m(!1))})})})}),ea=t.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:a,...i}=e;return(0,T.jsx)(ep,{scope:e.__scopeMenu,checked:n,children:(0,T.jsx)(er,{role:"menuitemcheckbox","aria-checked":ex(n)?"mixed":n,...i,ref:t,"data-state":eS(n),onSelect:(0,r.composeEventHandlers)(i.onSelect,()=>a?.(!!ex(n)||!n),{checkForDefaultPrevented:!1})})})});ea.displayName="MenuCheckboxItem";var ei="MenuRadioGroup",[eo,es]=R(ei,{value:void 0,onValueChange:()=>{}}),el=t.forwardRef((e,t)=>{let{value:r,onValueChange:n,...a}=e,i=(0,E.useCallbackRef)(n);return(0,T.jsx)(eo,{scope:e.__scopeMenu,value:r,onValueChange:i,children:(0,T.jsx)(J,{...a,ref:t})})});el.displayName=ei;var ec="MenuRadioItem",eu=t.forwardRef((e,t)=>{let{value:n,...a}=e,i=es(ec,e.__scopeMenu),o=n===i.value;return(0,T.jsx)(ep,{scope:e.__scopeMenu,checked:o,children:(0,T.jsx)(er,{role:"menuitemradio","aria-checked":o,...a,ref:t,"data-state":eS(o),onSelect:(0,r.composeEventHandlers)(a.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});eu.displayName=ec;var ed="MenuItemIndicator",[ep,eh]=R(ed,{checked:!1}),ef=t.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:n,...a}=e,i=eh(ed,r);return(0,T.jsx)(m.Presence,{present:n||ex(i.checked)||!0===i.checked,children:(0,T.jsx)(o.Primitive.span,{...a,ref:t,"data-state":eS(i.checked)})})});ef.displayName=ed;var em=t.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,T.jsx)(o.Primitive.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});em.displayName="MenuSeparator";var eg=t.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,a=L(r);return(0,T.jsx)(h.Arrow,{...a,...n,ref:t})});eg.displayName="MenuArrow";var ey="MenuSub",[eE,eb]=R(ey),ev=e=>{let{__scopeMenu:r,children:n,open:a=!1,onOpenChange:i}=e,o=M(ey,r),s=L(r),[l,c]=t.useState(null),[u,d]=t.useState(null),f=(0,E.useCallbackRef)(i);return t.useEffect(()=>(!1===o.open&&f(!1),()=>f(!1)),[o.open,f]),(0,T.jsx)(h.Root,{...s,children:(0,T.jsx)(P,{scope:r,open:a,onOpenChange:f,content:u,onContentChange:d,children:(0,T.jsx)(eE,{scope:r,contentId:(0,p.useId)(),triggerId:(0,p.useId)(),trigger:l,onTriggerChange:c,children:n})})})};ev.displayName=ey;var eT="MenuSubTrigger",e_=t.forwardRef((e,a)=>{let i=M(eT,e.__scopeMenu),o=B(eT,e.__scopeMenu),s=eb(eT,e.__scopeMenu),l=V(eT,e.__scopeMenu),c=t.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=l,p={__scopeMenu:e.__scopeMenu},h=t.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return t.useEffect(()=>h,[h]),t.useEffect(()=>{let e=u.current;return()=>{window.clearTimeout(e),d(null)}},[u,d]),(0,T.jsx)(U,{asChild:!0,...p,children:(0,T.jsx)(en,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":s.contentId,"data-state":ew(i.open),...e,ref:(0,n.composeRefs)(a,s.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),i.open||i.onOpenChange(!0))},onPointerMove:(0,r.composeEventHandlers)(e.onPointerMove,eC(t=>{l.onItemEnter(t),!t.defaultPrevented&&(e.disabled||i.open||c.current||(l.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{i.onOpenChange(!0),h()},100)))})),onPointerLeave:(0,r.composeEventHandlers)(e.onPointerLeave,eC(e=>{h();let t=i.content?.getBoundingClientRect();if(t){let r=i.content?.dataset.side,n="right"===r,a=t[n?"left":"right"],o=t[n?"right":"left"];l.onPointerGraceIntentChange({area:[{x:e.clientX+(n?-5:5),y:e.clientY},{x:a,y:t.top},{x:o,y:t.top},{x:o,y:t.bottom},{x:a,y:t.bottom}],side:r}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(e),e.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,t=>{let r=""!==l.searchRef.current;e.disabled||r&&" "===t.key||w[o.dir].includes(t.key)&&(i.onOpenChange(!0),i.content?.focus(),t.preventDefault())})})})});e_.displayName=eT;var eA="MenuSubContent",ek=t.forwardRef((e,a)=>{let i=$(W,e.__scopeMenu),{forceMount:o=i.forceMount,...s}=e,l=M(W,e.__scopeMenu),c=B(W,e.__scopeMenu),u=eb(eA,e.__scopeMenu),d=t.useRef(null),p=(0,n.useComposedRefs)(a,d);return(0,T.jsx)(C.Provider,{scope:e.__scopeMenu,children:(0,T.jsx)(m.Presence,{present:o||l.open,children:(0,T.jsx)(C.Slot,{scope:e.__scopeMenu,children:(0,T.jsx)(X,{id:u.contentId,"aria-labelledby":u.triggerId,...s,ref:p,align:"start",side:"rtl"===c.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{c.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,r.composeEventHandlers)(e.onFocusOutside,e=>{e.target!==u.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:(0,r.composeEventHandlers)(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),r=x[c.dir].includes(e.key);t&&r&&(l.onOpenChange(!1),u.trigger?.focus(),e.preventDefault())})})})})})});function ew(e){return e?"open":"closed"}function ex(e){return"indeterminate"===e}function eS(e){return ex(e)?"indeterminate":e?"checked":"unchecked"}function eC(e){return t=>"mouse"===t.pointerType?e(t):void 0}ek.displayName=eA;var eN="DropdownMenu",[eI,eR]=(0,a.createContextScope)(eN,[D]),eD=D(),[eL,eO]=eI(eN),eP=e=>{let{__scopeDropdownMenu:r,children:n,dir:a,open:o,defaultOpen:s,onOpenChange:l,modal:c=!0}=e,u=eD(r),d=t.useRef(null),[h=!1,f]=(0,i.useControllableState)({prop:o,defaultProp:s,onChange:l});return(0,T.jsx)(eL,{scope:r,triggerId:(0,p.useId)(),triggerRef:d,contentId:(0,p.useId)(),open:h,onOpenChange:f,onOpenToggle:t.useCallback(()=>f(e=>!e),[f]),modal:c,children:(0,T.jsx)(j,{...u,open:h,onOpenChange:f,dir:a,modal:c,children:n})})};eP.displayName=eN;var eM="DropdownMenuTrigger",eF=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:a,disabled:i=!1,...s}=e,l=eO(eM,a),c=eD(a);return(0,T.jsx)(U,{asChild:!0,...c,children:(0,T.jsx)(o.Primitive.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...s,ref:(0,n.composeRefs)(t,l.triggerRef),onPointerDown:(0,r.composeEventHandlers)(e.onPointerDown,e=>{!i&&0===e.button&&!1===e.ctrlKey&&(l.onOpenToggle(),l.open||e.preventDefault())}),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{!i&&(["Enter"," "].includes(e.key)&&l.onOpenToggle(),"ArrowDown"===e.key&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});eF.displayName=eM;var eB=e=>{let{__scopeDropdownMenu:t,...r}=e,n=eD(t);return(0,T.jsx)(z,{...n,...r})};eB.displayName="DropdownMenuPortal";var ej="DropdownMenuContent",eU=t.forwardRef((e,n)=>{let{__scopeDropdownMenu:a,...i}=e,o=eO(ej,a),s=eD(a),l=t.useRef(!1);return(0,T.jsx)(Y,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...i,ref:n,onCloseAutoFocus:(0,r.composeEventHandlers)(e.onCloseAutoFocus,e=>{l.current||o.triggerRef.current?.focus(),l.current=!1,e.preventDefault()}),onInteractOutside:(0,r.composeEventHandlers)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;(!o.modal||n)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});eU.displayName=ej;var eH=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=eD(r);return(0,T.jsx)(J,{...a,...n,ref:t})});eH.displayName="DropdownMenuGroup";var eG=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=eD(r);return(0,T.jsx)(Z,{...a,...n,ref:t})});eG.displayName="DropdownMenuLabel";var e$=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=eD(r);return(0,T.jsx)(er,{...a,...n,ref:t})});e$.displayName="DropdownMenuItem";var ez=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=eD(r);return(0,T.jsx)(ea,{...a,...n,ref:t})});ez.displayName="DropdownMenuCheckboxItem";var eW=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=eD(r);return(0,T.jsx)(el,{...a,...n,ref:t})});eW.displayName="DropdownMenuRadioGroup";var eq=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=eD(r);return(0,T.jsx)(eu,{...a,...n,ref:t})});eq.displayName="DropdownMenuRadioItem";var eV=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=eD(r);return(0,T.jsx)(ef,{...a,...n,ref:t})});eV.displayName="DropdownMenuItemIndicator";var eY=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=eD(r);return(0,T.jsx)(em,{...a,...n,ref:t})});eY.displayName="DropdownMenuSeparator",t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=eD(r);return(0,T.jsx)(eg,{...a,...n,ref:t})}).displayName="DropdownMenuArrow";var eQ=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=eD(r);return(0,T.jsx)(e_,{...a,...n,ref:t})});eQ.displayName="DropdownMenuSubTrigger";var eK=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=eD(r);return(0,T.jsx)(ek,{...a,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});eK.displayName="DropdownMenuSubContent";var eX=e=>{let{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:a,defaultOpen:o}=e,s=eD(t),[l=!1,c]=(0,i.useControllableState)({prop:n,defaultProp:o,onChange:a});return(0,T.jsx)(ev,{...s,open:l,onOpenChange:c,children:r})};e.s(["CheckboxItem",()=>ez,"Content",()=>eU,"Group",()=>eH,"Item",()=>e$,"ItemIndicator",()=>eV,"Label",()=>eG,"Portal",()=>eB,"RadioGroup",()=>eW,"RadioItem",()=>eq,"Root",()=>eP,"Separator",()=>eY,"Sub",()=>eX,"SubContent",()=>eK,"SubTrigger",()=>eQ,"Trigger",()=>eF],362503)},613671,e=>{"use strict";let t=(0,e.i(886288).default)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],613671)},524914,e=>{"use strict";let t=(0,e.i(886288).default)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],524914)},917955,e=>{"use strict";var t=e.i(666426),r=e.i(362503),n=e.i(613671),a=e.i(524914);let i=(0,e.i(886288).default)("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var o=e.i(686107),s=e.i(949245);let l=r.Root,c=r.Trigger;r.Group,r.Portal,r.Sub,r.RadioGroup,o.forwardRef(({className:e,inset:n,children:i,...o},l)=>(0,t.jsxs)(r.SubTrigger,{ref:l,className:(0,s.cn)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",e),...o,children:[i,(0,t.jsx)(a.ChevronRight,{className:"ml-auto h-4 w-4"})]})).displayName=r.SubTrigger.displayName,o.forwardRef(({className:e,...n},a)=>(0,t.jsx)(r.SubContent,{ref:a,className:(0,s.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})).displayName=r.SubContent.displayName;let u=o.forwardRef(({className:e,sideOffset:n=4,...a},i)=>(0,t.jsx)(r.Portal,{children:(0,t.jsx)(r.Content,{ref:i,sideOffset:n,className:(0,s.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));u.displayName=r.Content.displayName;let d=o.forwardRef(({className:e,inset:n,...a},i)=>(0,t.jsx)(r.Item,{ref:i,className:(0,s.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",e),...a}));d.displayName=r.Item.displayName,o.forwardRef(({className:e,children:a,checked:i,...o},l)=>(0,t.jsxs)(r.CheckboxItem,{ref:l,className:(0,s.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:i,...o,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(r.ItemIndicator,{children:(0,t.jsx)(n.Check,{className:"h-4 w-4"})})}),a]})).displayName=r.CheckboxItem.displayName,o.forwardRef(({className:e,children:n,...a},o)=>(0,t.jsxs)(r.RadioItem,{ref:o,className:(0,s.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(r.ItemIndicator,{children:(0,t.jsx)(i,{className:"h-2 w-2 fill-current"})})}),n]})).displayName=r.RadioItem.displayName;let p=o.forwardRef(({className:e,inset:n,...a},i)=>(0,t.jsx)(r.Label,{ref:i,className:(0,s.cn)("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...a}));p.displayName=r.Label.displayName;let h=o.forwardRef(({className:e,...n},a)=>(0,t.jsx)(r.Separator,{ref:a,className:(0,s.cn)("-mx-1 my-1 h-px bg-muted",e),...n}));h.displayName=r.Separator.displayName,e.s(["DropdownMenu",()=>l,"DropdownMenuContent",()=>u,"DropdownMenuItem",()=>d,"DropdownMenuLabel",()=>p,"DropdownMenuSeparator",()=>h,"DropdownMenuTrigger",()=>c],917955)},456944,e=>{"use strict";var t=e.i(666426),r=e.i(294237),n=e.i(686107),a=e.i(949245);let i=(0,r.cva)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),o=n.forwardRef(({className:e,variant:r,...n},o)=>(0,t.jsx)("div",{ref:o,role:"alert",className:(0,a.cn)(i({variant:r}),e),...n}));o.displayName="Alert";let s=n.forwardRef(({className:e,...r},n)=>(0,t.jsx)("h5",{ref:n,className:(0,a.cn)("mb-1 font-medium leading-none tracking-tight",e),...r}));s.displayName="AlertTitle";let l=n.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,className:(0,a.cn)("text-sm [&_p]:leading-relaxed",e),...r}));l.displayName="AlertDescription",e.s(["Alert",()=>o,"AlertDescription",()=>l,"AlertTitle",()=>s])},177779,e=>{"use strict";var t=e.i(686107),r=e.i(810096),n=e.i(221588),a=e.i(545136),i=e.i(666426);function o(e){let o=e+"CollectionProvider",[s,l]=(0,r.createContextScope)(o),[c,u]=s(o,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:r,children:n}=e,a=t.default.useRef(null),o=t.default.useRef(new Map).current;return(0,i.jsx)(c,{scope:r,itemMap:o,collectionRef:a,children:n})};d.displayName=o;let p=e+"CollectionSlot",h=(0,a.createSlot)(p),f=t.default.forwardRef((e,t)=>{let{scope:r,children:a}=e,o=u(p,r),s=(0,n.useComposedRefs)(t,o.collectionRef);return(0,i.jsx)(h,{ref:s,children:a})});f.displayName=p;let m=e+"CollectionItemSlot",g="data-radix-collection-item",y=(0,a.createSlot)(m),E=t.default.forwardRef((e,r)=>{let{scope:a,children:o,...s}=e,l=t.default.useRef(null),c=(0,n.useComposedRefs)(r,l),d=u(m,a);return t.default.useEffect(()=>(d.itemMap.set(l,{ref:l,...s}),()=>void d.itemMap.delete(l))),(0,i.jsx)(y,{...{[g]:""},ref:c,children:o})});return E.displayName=m,[{Provider:d,Slot:f,ItemSlot:E},function(r){let n=u(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},l]}var s=new WeakMap;function l(e,t){var r,n;let a,i,o;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let s=(r=e,n=t,a=r.length,(o=(i=c(n))>=0?i:a+i)<0||o>=a?-1:o);return -1===s?void 0:e[s]}function c(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#o;constructor(e){super(e),this.#o=[...super.keys()],s.set(this,!0)}set(e,t){return s.get(this)&&(this.has(e)?this.#o[this.#o.indexOf(e)]=e:this.#o.push(e)),super.set(e,t),this}insert(e,t,r){let n,a=this.has(t),i=this.#o.length,o=c(e),s=o>=0?o:i+o,l=s<0||s>=i?-1:s;if(l===this.size||a&&l===this.size-1||-1===l)return this.set(t,r),this;let u=this.size+ +!a;o<0&&s++;let d=[...this.#o],p=!1;for(let e=s;e<u;e++)if(s===e){let i=d[e];d[e]===t&&(i=d[e+1]),a&&this.delete(t),n=this.get(i),this.set(t,r)}else{p||d[e-1]!==t||(p=!0);let r=d[p?e:e-1],a=n;n=this.get(r),this.delete(r),this.set(r,a)}return this}with(t,r,n){let a=new e(this);return a.insert(t,r,n),a}before(e){let t=this.#o.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#o.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#o.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#o.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#o=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#o.splice(this.#o.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=l(this.#o,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=l(this.#o,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#o.indexOf(e)}keyAt(e){return l(this.#o,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],a=0;for(let e of this)Reflect.apply(t,r,[e,a,this])&&n.push(e),a++;return new e(n)}map(t,r){let n=[],a=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,a,this])]),a++;return new e(n)}reduce(...e){let[t,r]=e,n=0,a=r??this.at(0);for(let r of this)a=0===n&&1===e.length?r:Reflect.apply(t,this,[a,r,n,this]),n++;return a}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let a=this.at(r);n=r===this.size-1&&1===e.length?a:Reflect.apply(t,this,[n,a,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,a=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(a=r-1);for(let e=t;e<=a;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>o])},92581,e=>{"use strict";var t=e.i(686107);e.i(666426);var r=t.createContext(void 0);function n(e){let n=t.useContext(r);return e||n||"ltr"}e.s(["useDirection",()=>n])},620486,655907,e=>{"use strict";var t=e.i(610062),r=e.i(349011),n=e.i(686107);function a(e,t,n){try{return e(t)}catch(e){return(0,r.l)("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":""),t,e,n),null}}function i(e){function t(t){if(void 0===t)return null;let r="";if(Array.isArray(t)){if(void 0===t[0])return null;r=t[0]}return"string"==typeof t&&(r=t),a(e.parse,r)}return{type:"single",eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide:r=>t(r)??e}},withOptions(e){return{...this,...e}}}}let o=i({parse:e=>e,serialize:String});function s(e,t){return e.valueOf()===t.valueOf()}function l(e,{clearOnDefault:n=!0,urlKeys:a={},processUrlSearchParams:i}={}){return function(o,s={}){let[l,u]=c(o)?function(e){if("string"==typeof e){let[t="",...r]=e.split("?");return[t,new URLSearchParams(r.join("?"))]}return e instanceof URLSearchParams?["",new URLSearchParams(e)]:[e.origin+e.pathname,new URLSearchParams(e.searchParams)]}(o):["",new URLSearchParams],d=c(o)?s:o;if(null===d){for(let t in e){let e=a[t]??t;u.delete(e)}return i&&(u=i(u)),l+(0,r.o)(u)}for(let r in e){let i=e[r],o=d[r];if(!i||void 0===o)continue;let s=a[r]??r,l=void 0!==i.defaultValue&&null!==o&&(i.eq??((e,t)=>e===t))(o,i.defaultValue);null===o||(i.clearOnDefault??n??!0)&&l?u.delete(s):u=(0,t.a)(i.serialize(o),s,u)}return i&&(u=i(u)),l+(0,r.o)(u)}}function c(e){return"string"==typeof e||e instanceof URLSearchParams||e instanceof URL}i({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)}),i({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)}),i({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return(1&t.length?"0":"")+t}}),i({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String}),i({parse:e=>"true"===e.toLowerCase(),serialize:String}),i({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:s}),i({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:s}),i({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:s});let u=(0,t.r)(),d={};function p(e,a={}){let i=(0,n.useId)(),o=(0,r.i)(),s=(0,r.a)(),{history:l="replace",scroll:c=o?.scroll??!1,shallow:m=o?.shallow??!0,throttleMs:g=t.s.timeMs,limitUrlUpdates:y=o?.limitUrlUpdates,clearOnDefault:E=o?.clearOnDefault??!0,startTransition:b,urlKeys:v=d}=a,T=Object.keys(e).join(","),_=(0,n.useMemo)(()=>Object.fromEntries(Object.keys(e).map(e=>[e,v[e]??e])),[T,JSON.stringify(v)]),A=(0,r.r)(Object.values(_)),k=A.searchParams,w=(0,n.useRef)({}),x=(0,n.useMemo)(()=>Object.fromEntries(Object.keys(e).map(t=>[t,e[t].defaultValue??null])),[Object.values(e).map(({defaultValue:e})=>e).join(",")]),S=t.t.useQueuedQueries(Object.values(_)),[C,N]=(0,n.useState)(()=>h(e,v,k??new URLSearchParams,S).state),I=(0,n.useRef)(C);if((0,r.c)("[nuq+ %s `%s`] render - state: %O, iSP: %s",i,T,C,k),Object.keys(w.current).join("&")!==Object.values(_).join("&")){let{state:t,hasChanged:n}=h(e,v,k,S,w.current,I.current);n&&((0,r.c)("[nuq+ %s `%s`] State changed: %O",i,T,{state:t,initialSearchParams:k,queuedQueries:S,queryRef:w.current,stateRef:I.current}),I.current=t,N(t)),w.current=Object.fromEntries(Object.entries(_).map(([t,r])=>[r,e[t]?.type==="multi"?k?.getAll(r):k?.get(r)??null]))}(0,n.useEffect)(()=>{let{state:t,hasChanged:n}=h(e,v,k,S,w.current,I.current);n&&((0,r.c)("[nuq+ %s `%s`] State changed: %O",i,T,{state:t,initialSearchParams:k,queuedQueries:S,queryRef:w.current,stateRef:I.current}),I.current=t,N(t))},[Object.values(_).map(e=>`${e}=${k?.getAll(e)}`).join("&"),JSON.stringify(S)]),(0,n.useEffect)(()=>{let t=Object.keys(e).reduce((t,n)=>(t[n]=({state:t,query:a})=>{N(o=>{let{defaultValue:s}=e[n],l=_[n],c=t??s??null;return Object.is(o[n]??s??null,c)?((0,r.c)("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",i,T,l,t,s,I.current),o):(I.current={...I.current,[n]:c},w.current[l]=a,(0,r.c)("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",i,T,l,t,s,I.current),I.current)})},t),{});for(let n of Object.keys(e)){let e=_[n];(0,r.c)("[nuq+ %s `%s`] Subscribing to sync for `%s`",i,e,T),u.on(e,t[n])}return()=>{for(let n of Object.keys(e)){let e=_[n];(0,r.c)("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",i,e,T),u.off(e,t[n])}}},[T,_]);let R=(0,n.useCallback)((n,a={})=>{let o,d=Object.fromEntries(Object.keys(e).map(e=>[e,null])),p="function"==typeof n?n(f(I.current,x))??d:n??d;(0,r.c)("[nuq+ %s `%s`] setState: %O",i,T,p);let h=0,v=!1,k=[];for(let[n,i]of Object.entries(p)){let d=e[n],p=_[n];if(!d)continue;(a.clearOnDefault??d.clearOnDefault??E)&&null!==i&&void 0!==d.defaultValue&&(d.eq??((e,t)=>e===t))(i,d.defaultValue)&&(i=null);let f=null===i?null:(d.serialize??String)(i);u.emit(p,{state:i,query:f});let T={key:p,query:f,options:{history:a.history??d.history??l,shallow:a.shallow??d.shallow??m,scroll:a.scroll??d.scroll??c,startTransition:a.startTransition??d.startTransition??b}};if(a?.limitUrlUpdates?.method==="debounce"||y?.method==="debounce"||d.limitUrlUpdates?.method==="debounce"){!0===T.options.shallow&&console.warn((0,r.s)(422));let e=a?.limitUrlUpdates?.timeMs??y?.timeMs??d.limitUrlUpdates?.timeMs??t.s.timeMs,n=t.t.push(T,e,A,s);h<e&&(o=n,h=e)}else{let e=a?.limitUrlUpdates?.timeMs??d?.limitUrlUpdates?.timeMs??y?.timeMs??a.throttleMs??d.throttleMs??g;k.push(t.t.abort(p)),t.n.push(T,e),v=!0}}let w=k.reduce((e,t)=>t(e),v?t.n.flush(A,s):t.n.getPendingPromise(A));return o??w},[T,l,m,c,g,y?.method,y?.timeMs,b,_,A.updateUrl,A.getSearchParamsSnapshot,A.rateLimitFactor,s,x]);return[(0,n.useMemo)(()=>f(C,x),[C,x]),R]}function h(e,r,n,i,o,s){let l=!1,c=Object.entries(e).reduce((e,[c,u])=>{var d;let p=r?.[c]??c,h=i[p],f="multi"===u.type?[]:null,m=void 0===h?("multi"===u.type?n?.getAll(p):n?.get(p))??f:h;return o&&s&&((d=o[p]??f)===m||null!==d&&null!==m&&"string"!=typeof d&&"string"!=typeof m&&d.length===m.length&&d.every((e,t)=>e===m[t]))?e[c]=s[c]??null:(l=!0,e[c]=((0,t.i)(m)?null:a(u.parse,m,p))??null,o&&(o[p]=m)),e},{});if(!l){let t=Object.keys(e),r=Object.keys(s??{});l=t.length!==r.length||t.some(e=>!r.includes(e))}return{state:c,hasChanged:l}}function f(e,t){return Object.fromEntries(Object.keys(e).map(r=>[r,e[r]??t[r]??null]))}function m(e,t={}){let{parse:r,type:a,serialize:i,eq:o,defaultValue:s,...l}=t,[{[e]:c},u]=p({[e]:{parse:r??(e=>e),type:a,serialize:i,eq:o,defaultValue:s}},l);return[c,(0,n.useCallback)((t,r={})=>u(r=>({[e]:"function"==typeof t?t(r[e]):t}),r),[e,u])]}e.s(["createSerializer",()=>l,"parseAsString",()=>o,"useQueryState",()=>m,"useQueryStates",()=>p],655907);let g={backend:"local",dataDir:"./.next/workflow-data",port:"3000",env:"production"},y={backend:o.withDefault(g.backend||"embedded"),env:o.withDefault(g.env||"production"),authToken:o,project:o,team:o,port:o.withDefault(g.port||"3000"),dataDir:o.withDefault(g.dataDir||"./.next/workflow-data"),manifestPath:o},E=l(y);function b(){let[e]=p(y,{history:"push",shallow:!0});return e}function v(){let[,e]=p(y,{history:"push",shallow:!0});return t=>{let r={};for(let[e,n]of Object.entries(t))null==n||""===n?r[e]=null:n!==g[e]?r[e]=n:r[e]=null;e(r)}}function T(e,t,r){let n=new URLSearchParams(E(t));if(r)for(let[e,t]of Object.entries(r))null!=t&&""!==t&&n.set(e,t);let a=n.toString();return a?`${e}?${a}`:e}e.s(["buildUrlWithConfig",()=>T,"useQueryParamConfig",()=>b,"useUpdateConfigQueryParams",()=>v,"worldConfigToEnvMap",0,e=>{var t;return{WORKFLOW_TARGET_WORLD:"postgres"===(t=e.backend)?"@workflow/world-postgres":t,WORKFLOW_VERCEL_ENV:e.env,WORKFLOW_VERCEL_AUTH_TOKEN:e.authToken,WORKFLOW_VERCEL_PROJECT:e.project,WORKFLOW_VERCEL_TEAM:e.team,PORT:e.port,WORKFLOW_MANIFEST_PATH:e.manifestPath,WORKFLOW_LOCAL_DATA_DIR:e.dataDir,WORKFLOW_POSTGRES_URL:e.postgresUrl}}],620486)}]);
|