@desktalk/core 0.1.0-alpha.2 → 0.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/frontend/assets/{frontend-DzPuSfWJ.js → frontend-BGrAEoc-.js} +2 -2
- package/dist/frontend/assets/{frontend-DzPuSfWJ.js.map → frontend-BGrAEoc-.js.map} +1 -1
- package/dist/frontend/assets/{frontend-Dn0dKARf.js → frontend-BWgJC5kX.js} +2 -2
- package/dist/frontend/assets/{frontend-Dn0dKARf.js.map → frontend-BWgJC5kX.js.map} +1 -1
- package/dist/frontend/assets/{frontend-yvqb_XNo.js → frontend-CTdbpot-.js} +2 -2
- package/dist/frontend/assets/{frontend-yvqb_XNo.js.map → frontend-CTdbpot-.js.map} +1 -1
- package/dist/frontend/assets/{frontend-BAknU-ge.js → frontend-CwxhooMD.js} +3 -3
- package/dist/frontend/assets/frontend-CwxhooMD.js.map +1 -0
- package/dist/frontend/assets/{frontend-DpmnQ1w4.js → frontend-DRTe8-9o.js} +3 -3
- package/dist/frontend/assets/frontend-DRTe8-9o.js.map +1 -0
- package/dist/frontend/assets/frontend-Dz_8vRz5.js +547 -0
- package/dist/frontend/assets/frontend-Dz_8vRz5.js.map +1 -0
- package/dist/frontend/assets/{frontend-0mUhlxkg.js → frontend-vY_f4fVI.js} +2 -2
- package/dist/frontend/assets/{frontend-0mUhlxkg.js.map → frontend-vY_f4fVI.js.map} +1 -1
- package/dist/frontend/assets/{highlighted-body-TPN3WLV5-BheGZsYG.js → highlighted-body-TPN3WLV5-CRT7miki.js} +2 -2
- package/dist/frontend/assets/{highlighted-body-TPN3WLV5-BheGZsYG.js.map → highlighted-body-TPN3WLV5-CRT7miki.js.map} +1 -1
- package/dist/frontend/assets/index-CI5Mxo87.js +1863 -0
- package/dist/frontend/assets/index-CI5Mxo87.js.map +1 -0
- package/dist/frontend/assets/index-D6_VuNyY.css +1 -0
- package/dist/frontend/index.html +3 -2
- package/dist/frontend/logo.png +0 -0
- package/dist/i18n/manifest.json +268 -0
- package/dist/i18n/zh-CN.json +53 -0
- package/dist/i18n/zh.json +60 -0
- package/dist/server/auth-routes.d.ts.map +1 -1
- package/dist/server/auth-routes.js +2 -2
- package/dist/server/auth-routes.js.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +14 -5
- package/dist/server/index.js.map +1 -1
- package/dist/server/thumbnail-routes.d.ts +3 -0
- package/dist/server/thumbnail-routes.d.ts.map +1 -0
- package/dist/server/thumbnail-routes.js +97 -0
- package/dist/server/thumbnail-routes.js.map +1 -0
- package/dist/services/ai/edit-history.d.ts +3 -7
- package/dist/services/ai/edit-history.d.ts.map +1 -1
- package/dist/services/ai/edit-history.js +145 -76
- package/dist/services/ai/edit-history.js.map +1 -1
- package/dist/services/ai/edit-tool.js +1 -1
- package/dist/services/ai/edit-tool.js.map +1 -1
- package/dist/services/ai/layout-tool.d.ts +8 -0
- package/dist/services/ai/layout-tool.d.ts.map +1 -0
- package/dist/services/ai/layout-tool.js +105 -0
- package/dist/services/ai/layout-tool.js.map +1 -0
- package/dist/services/ai/manual-pages/desktop-layout.md +34 -0
- package/dist/services/ai/manual-pages/desktop-windows.md +2 -0
- package/dist/services/ai/manual-pages/index.d.ts.map +1 -1
- package/dist/services/ai/manual-pages/index.js +9 -2
- package/dist/services/ai/manual-pages/index.js.map +1 -1
- package/dist/services/ai/pi-session-service.d.ts.map +1 -1
- package/dist/services/ai/pi-session-service.js +4 -0
- package/dist/services/ai/pi-session-service.js.map +1 -1
- package/dist/services/ai/redo-edit-tool.js +1 -1
- package/dist/services/ai/redo-edit-tool.js.map +1 -1
- package/dist/services/ai/undo-edit-tool.js +1 -1
- package/dist/services/ai/undo-edit-tool.js.map +1 -1
- package/dist/services/file-thumbnail.d.ts +20 -0
- package/dist/services/file-thumbnail.d.ts.map +1 -0
- package/dist/services/file-thumbnail.js +102 -0
- package/dist/services/file-thumbnail.js.map +1 -0
- package/dist/services/onboarding-config.d.ts +1 -1
- package/dist/services/onboarding-config.d.ts.map +1 -1
- package/dist/services/onboarding-config.js +10 -2
- package/dist/services/onboarding-config.js.map +1 -1
- package/package.json +11 -10
- package/dist/frontend/assets/frontend-B1Lvc6Rl.js +0 -413
- package/dist/frontend/assets/frontend-B1Lvc6Rl.js.map +0 -1
- package/dist/frontend/assets/frontend-BAknU-ge.js.map +0 -1
- package/dist/frontend/assets/frontend-DpmnQ1w4.js.map +0 -1
- package/dist/frontend/assets/index-BAa2HQwc.css +0 -1
- package/dist/frontend/assets/index-BEaTx9Vu.js +0 -1863
- package/dist/frontend/assets/index-BEaTx9Vu.js.map +0 -1
|
@@ -1,1863 +0,0 @@
|
|
|
1
|
-
function Sv(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();function Mu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r0={exports:{}},Yl={};var oy;function xw(){if(oy)return Yl;oy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,s,l){var o=null;if(l!==void 0&&(o=""+l),s.key!==void 0&&(o=""+s.key),"key"in s){l={};for(var d in s)d!=="key"&&(l[d]=s[d])}else l=s;return s=l.ref,{$$typeof:e,type:i,key:o,ref:s!==void 0?s:null,props:l}}return Yl.Fragment=t,Yl.jsx=n,Yl.jsxs=n,Yl}var cy;function vw(){return cy||(cy=1,r0.exports=xw()),r0.exports}var v=vw();const _w=Mu(v),Tw=Sv({__proto__:null,default:_w},[v]);var i0={exports:{}},Be={};var dy;function Aw(){if(dy)return Be;dy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),o=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),x=Symbol.iterator;function E(D){return D===null||typeof D!="object"?null:(D=x&&D[x]||D["@@iterator"],typeof D=="function"?D:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function k(D,ee,O){this.props=D,this.context=ee,this.refs=S,this.updater=O||T}k.prototype.isReactComponent={},k.prototype.setState=function(D,ee){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,ee,"setState")},k.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function j(){}j.prototype=k.prototype;function P(D,ee,O){this.props=D,this.context=ee,this.refs=S,this.updater=O||T}var V=P.prototype=new j;V.constructor=P,w(V,k.prototype),V.isPureReactComponent=!0;var J=Array.isArray;function H(){}var ne={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function fe(D,ee,O){var F=O.ref;return{$$typeof:e,type:D,key:ee,ref:F!==void 0?F:null,props:O}}function z(D,ee){return fe(D.type,ee,D.props)}function $(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function Y(D){var ee={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(O){return ee[O]})}var _e=/\/+/g;function ce(D,ee){return typeof D=="object"&&D!==null&&D.key!=null?Y(""+D.key):ee.toString(36)}function ue(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(H,H):(D.status="pending",D.then(function(ee){D.status==="pending"&&(D.status="fulfilled",D.value=ee)},function(ee){D.status==="pending"&&(D.status="rejected",D.reason=ee)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function I(D,ee,O,F,be){var ye=typeof D;(ye==="undefined"||ye==="boolean")&&(D=null);var Re=!1;if(D===null)Re=!0;else switch(ye){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(D.$$typeof){case e:case t:Re=!0;break;case m:return Re=D._init,I(Re(D._payload),ee,O,F,be)}}if(Re)return be=be(D),Re=F===""?"."+ce(D,0):F,J(be)?(O="",Re!=null&&(O=Re.replace(_e,"$&/")+"/"),I(be,ee,O,"",function(Gt){return Gt})):be!=null&&($(be)&&(be=z(be,O+(be.key==null||D&&D.key===be.key?"":(""+be.key).replace(_e,"$&/")+"/")+Re)),ee.push(be)),1;Re=0;var Je=F===""?".":F+":";if(J(D))for(var Le=0;Le<D.length;Le++)F=D[Le],ye=Je+ce(F,Le),Re+=I(F,ee,O,ye,be);else if(Le=E(D),typeof Le=="function")for(D=Le.call(D),Le=0;!(F=D.next()).done;)F=F.value,ye=Je+ce(F,Le++),Re+=I(F,ee,O,ye,be);else if(ye==="object"){if(typeof D.then=="function")return I(ue(D),ee,O,F,be);throw ee=String(D),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.")}return Re}function ie(D,ee,O){if(D==null)return D;var F=[],be=0;return I(D,F,"","",function(ye){return ee.call(O,ye,be++)}),F}function Ee(D){if(D._status===-1){var ee=D._result;ee=ee(),ee.then(function(O){(D._status===0||D._status===-1)&&(D._status=1,D._result=O)},function(O){(D._status===0||D._status===-1)&&(D._status=2,D._result=O)}),D._status===-1&&(D._status=0,D._result=ee)}if(D._status===1)return D._result.default;throw D._result}var ke=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ee=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(ee))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},R={map:ie,forEach:function(D,ee,O){ie(D,function(){ee.apply(this,arguments)},O)},count:function(D){var ee=0;return ie(D,function(){ee++}),ee},toArray:function(D){return ie(D,function(ee){return ee})||[]},only:function(D){if(!$(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return Be.Activity=b,Be.Children=R,Be.Component=k,Be.Fragment=n,Be.Profiler=s,Be.PureComponent=P,Be.StrictMode=i,Be.Suspense=h,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ne,Be.__COMPILER_RUNTIME={__proto__:null,c:function(D){return ne.H.useMemoCache(D)}},Be.cache=function(D){return function(){return D.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(D,ee,O){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var F=w({},D.props),be=D.key;if(ee!=null)for(ye in ee.key!==void 0&&(be=""+ee.key),ee)!te.call(ee,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&ee.ref===void 0||(F[ye]=ee[ye]);var ye=arguments.length-2;if(ye===1)F.children=O;else if(1<ye){for(var Re=Array(ye),Je=0;Je<ye;Je++)Re[Je]=arguments[Je+2];F.children=Re}return fe(D.type,be,F)},Be.createContext=function(D){return D={$$typeof:o,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:l,_context:D},D},Be.createElement=function(D,ee,O){var F,be={},ye=null;if(ee!=null)for(F in ee.key!==void 0&&(ye=""+ee.key),ee)te.call(ee,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(be[F]=ee[F]);var Re=arguments.length-2;if(Re===1)be.children=O;else if(1<Re){for(var Je=Array(Re),Le=0;Le<Re;Le++)Je[Le]=arguments[Le+2];be.children=Je}if(D&&D.defaultProps)for(F in Re=D.defaultProps,Re)be[F]===void 0&&(be[F]=Re[F]);return fe(D,ye,be)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(D){return{$$typeof:d,render:D}},Be.isValidElement=$,Be.lazy=function(D){return{$$typeof:m,_payload:{_status:-1,_result:D},_init:Ee}},Be.memo=function(D,ee){return{$$typeof:f,type:D,compare:ee===void 0?null:ee}},Be.startTransition=function(D){var ee=ne.T,O={};ne.T=O;try{var F=D(),be=ne.S;be!==null&&be(O,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(H,ke)}catch(ye){ke(ye)}finally{ee!==null&&O.types!==null&&(ee.types=O.types),ne.T=ee}},Be.unstable_useCacheRefresh=function(){return ne.H.useCacheRefresh()},Be.use=function(D){return ne.H.use(D)},Be.useActionState=function(D,ee,O){return ne.H.useActionState(D,ee,O)},Be.useCallback=function(D,ee){return ne.H.useCallback(D,ee)},Be.useContext=function(D){return ne.H.useContext(D)},Be.useDebugValue=function(){},Be.useDeferredValue=function(D,ee){return ne.H.useDeferredValue(D,ee)},Be.useEffect=function(D,ee){return ne.H.useEffect(D,ee)},Be.useEffectEvent=function(D){return ne.H.useEffectEvent(D)},Be.useId=function(){return ne.H.useId()},Be.useImperativeHandle=function(D,ee,O){return ne.H.useImperativeHandle(D,ee,O)},Be.useInsertionEffect=function(D,ee){return ne.H.useInsertionEffect(D,ee)},Be.useLayoutEffect=function(D,ee){return ne.H.useLayoutEffect(D,ee)},Be.useMemo=function(D,ee){return ne.H.useMemo(D,ee)},Be.useOptimistic=function(D,ee){return ne.H.useOptimistic(D,ee)},Be.useReducer=function(D,ee,O){return ne.H.useReducer(D,ee,O)},Be.useRef=function(D){return ne.H.useRef(D)},Be.useState=function(D){return ne.H.useState(D)},Be.useSyncExternalStore=function(D,ee,O){return ne.H.useSyncExternalStore(D,ee,O)},Be.useTransition=function(){return ne.H.useTransition()},Be.version="19.2.4",Be}var fy;function um(){return fy||(fy=1,i0.exports=Aw()),i0.exports}var C=um();const qi=Mu(C);function wv(e,t){return function(){return e.apply(t,arguments)}}const{toString:Sw}=Object.prototype,{getPrototypeOf:om}=Object,{iterator:od,toStringTag:kv}=Symbol,cd=(e=>t=>{const n=Sw.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Er=e=>(e=e.toLowerCase(),t=>cd(t)===e),dd=e=>t=>typeof t===e,{isArray:Ys}=Array,Us=dd("undefined");function Iu(e){return e!==null&&!Us(e)&&e.constructor!==null&&!Us(e.constructor)&&kn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Cv=Er("ArrayBuffer");function ww(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Cv(e.buffer),t}const kw=dd("string"),kn=dd("function"),Nv=dd("number"),Du=e=>e!==null&&typeof e=="object",Cw=e=>e===!0||e===!1,Mc=e=>{if(cd(e)!=="object")return!1;const t=om(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(kv in e)&&!(od in e)},Nw=e=>{if(!Du(e)||Iu(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Rw=Er("Date"),Ow=Er("File"),Lw=e=>!!(e&&typeof e.uri<"u"),Mw=e=>e&&typeof e.getParts<"u",Iw=Er("Blob"),Dw=Er("FileList"),Bw=e=>Du(e)&&kn(e.pipe);function zw(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const hy=zw(),py=typeof hy.FormData<"u"?hy.FormData:void 0,Pw=e=>{let t;return e&&(py&&e instanceof py||kn(e.append)&&((t=cd(e))==="formdata"||t==="object"&&kn(e.toString)&&e.toString()==="[object FormData]"))},Hw=Er("URLSearchParams"),[Uw,jw,Fw,$w]=["ReadableStream","Request","Response","Headers"].map(Er),qw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Bu(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),Ys(e))for(i=0,s=e.length;i<s;i++)t.call(null,e[i],i,e);else{if(Iu(e))return;const l=n?Object.getOwnPropertyNames(e):Object.keys(e),o=l.length;let d;for(i=0;i<o;i++)d=l[i],t.call(null,e[d],d,e)}}function Rv(e,t){if(Iu(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i=n.length,s;for(;i-- >0;)if(s=n[i],t===s.toLowerCase())return s;return null}const Sa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ov=e=>!Us(e)&&e!==Sa;function pp(){const{caseless:e,skipUndefined:t}=Ov(this)&&this||{},n={},i=(s,l)=>{if(l==="__proto__"||l==="constructor"||l==="prototype")return;const o=e&&Rv(n,l)||l;Mc(n[o])&&Mc(s)?n[o]=pp(n[o],s):Mc(s)?n[o]=pp({},s):Ys(s)?n[o]=s.slice():(!t||!Us(s))&&(n[o]=s)};for(let s=0,l=arguments.length;s<l;s++)arguments[s]&&Bu(arguments[s],i);return n}const Yw=(e,t,n,{allOwnKeys:i}={})=>(Bu(t,(s,l)=>{n&&kn(s)?Object.defineProperty(e,l,{value:wv(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,l,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),e),Vw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Gw=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Ww=(e,t,n,i)=>{let s,l,o;const d={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),l=s.length;l-- >0;)o=s[l],(!i||i(o,e,t))&&!d[o]&&(t[o]=e[o],d[o]=!0);e=n!==!1&&om(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Qw=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return i!==-1&&i===n},Xw=e=>{if(!e)return null;if(Ys(e))return e;let t=e.length;if(!Nv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Kw=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&om(Uint8Array)),Zw=(e,t)=>{const i=(e&&e[od]).call(e);let s;for(;(s=i.next())&&!s.done;){const l=s.value;t.call(e,l[0],l[1])}},Jw=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},ek=Er("HTMLFormElement"),tk=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),my=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),nk=Er("RegExp"),Lv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};Bu(n,(s,l)=>{let o;(o=t(s,l,e))!==!1&&(i[l]=o||s)}),Object.defineProperties(e,i)},rk=e=>{Lv(e,(t,n)=>{if(kn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(kn(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ik=(e,t)=>{const n={},i=s=>{s.forEach(l=>{n[l]=!0})};return Ys(e)?i(e):i(String(e).split(t)),n},ak=()=>{},sk=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function lk(e){return!!(e&&kn(e.append)&&e[kv]==="FormData"&&e[od])}const uk=e=>{const t=new Array(10),n=(i,s)=>{if(Du(i)){if(t.indexOf(i)>=0)return;if(Iu(i))return i;if(!("toJSON"in i)){t[s]=i;const l=Ys(i)?[]:{};return Bu(i,(o,d)=>{const h=n(o,s+1);!Us(h)&&(l[d]=h)}),t[s]=void 0,l}}return i};return n(e,0)},ok=Er("AsyncFunction"),ck=e=>e&&(Du(e)||kn(e))&&kn(e.then)&&kn(e.catch),Mv=((e,t)=>e?setImmediate:t?((n,i)=>(Sa.addEventListener("message",({source:s,data:l})=>{s===Sa&&l===n&&i.length&&i.shift()()},!1),s=>{i.push(s),Sa.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",kn(Sa.postMessage)),dk=typeof queueMicrotask<"u"?queueMicrotask.bind(Sa):typeof process<"u"&&process.nextTick||Mv,fk=e=>e!=null&&kn(e[od]),K={isArray:Ys,isArrayBuffer:Cv,isBuffer:Iu,isFormData:Pw,isArrayBufferView:ww,isString:kw,isNumber:Nv,isBoolean:Cw,isObject:Du,isPlainObject:Mc,isEmptyObject:Nw,isReadableStream:Uw,isRequest:jw,isResponse:Fw,isHeaders:$w,isUndefined:Us,isDate:Rw,isFile:Ow,isReactNativeBlob:Lw,isReactNative:Mw,isBlob:Iw,isRegExp:nk,isFunction:kn,isStream:Bw,isURLSearchParams:Hw,isTypedArray:Kw,isFileList:Dw,forEach:Bu,merge:pp,extend:Yw,trim:qw,stripBOM:Vw,inherits:Gw,toFlatObject:Ww,kindOf:cd,kindOfTest:Er,endsWith:Qw,toArray:Xw,forEachEntry:Zw,matchAll:Jw,isHTMLForm:ek,hasOwnProperty:my,hasOwnProp:my,reduceDescriptors:Lv,freezeMethods:rk,toObjectSet:ik,toCamelCase:tk,noop:ak,toFiniteNumber:sk,findKey:Rv,global:Sa,isContextDefined:Ov,isSpecCompliantForm:lk,toJSONObject:uk,isAsyncFn:ok,isThenable:ck,setImmediate:Mv,asap:dk,isIterable:fk};let De=class Iv extends Error{static from(t,n,i,s,l,o){const d=new Iv(t.message,n||t.code,i,s,l);return d.cause=t,d.name=t.name,t.status!=null&&d.status==null&&(d.status=t.status),o&&Object.assign(d,o),d}constructor(t,n,i,s,l){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),i&&(this.config=i),s&&(this.request=s),l&&(this.response=l,this.status=l.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}};De.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";De.ERR_BAD_OPTION="ERR_BAD_OPTION";De.ECONNABORTED="ECONNABORTED";De.ETIMEDOUT="ETIMEDOUT";De.ERR_NETWORK="ERR_NETWORK";De.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";De.ERR_DEPRECATED="ERR_DEPRECATED";De.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";De.ERR_BAD_REQUEST="ERR_BAD_REQUEST";De.ERR_CANCELED="ERR_CANCELED";De.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";De.ERR_INVALID_URL="ERR_INVALID_URL";const hk=null;function mp(e){return K.isPlainObject(e)||K.isArray(e)}function Dv(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function a0(e,t,n){return e?e.concat(t).map(function(s,l){return s=Dv(s),!n&&l?"["+s+"]":s}).join(n?".":""):t}function pk(e){return K.isArray(e)&&!e.some(mp)}const mk=K.toFlatObject(K,{},null,function(t){return/^is[A-Z]/.test(t)});function fd(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,S){return!K.isUndefined(S[w])});const i=n.metaTokens,s=n.visitor||m,l=n.dots,o=n.indexes,h=(n.Blob||typeof Blob<"u"&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(s))throw new TypeError("visitor must be a function");function f(T){if(T===null)return"";if(K.isDate(T))return T.toISOString();if(K.isBoolean(T))return T.toString();if(!h&&K.isBlob(T))throw new De("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(T)||K.isTypedArray(T)?h&&typeof Blob=="function"?new Blob([T]):Buffer.from(T):T}function m(T,w,S){let k=T;if(K.isReactNative(t)&&K.isReactNativeBlob(T))return t.append(a0(S,w,l),f(T)),!1;if(T&&!S&&typeof T=="object"){if(K.endsWith(w,"{}"))w=i?w:w.slice(0,-2),T=JSON.stringify(T);else if(K.isArray(T)&&pk(T)||(K.isFileList(T)||K.endsWith(w,"[]"))&&(k=K.toArray(T)))return w=Dv(w),k.forEach(function(P,V){!(K.isUndefined(P)||P===null)&&t.append(o===!0?a0([w],V,l):o===null?w:w+"[]",f(P))}),!1}return mp(T)?!0:(t.append(a0(S,w,l),f(T)),!1)}const b=[],x=Object.assign(mk,{defaultVisitor:m,convertValue:f,isVisitable:mp});function E(T,w){if(!K.isUndefined(T)){if(b.indexOf(T)!==-1)throw Error("Circular reference detected in "+w.join("."));b.push(T),K.forEach(T,function(k,j){(!(K.isUndefined(k)||k===null)&&s.call(t,k,K.isString(j)?j.trim():j,w,x))===!0&&E(k,w?w.concat(j):[j])}),b.pop()}}if(!K.isObject(e))throw new TypeError("data must be an object");return E(e),t}function gy(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function cm(e,t){this._pairs=[],e&&fd(e,this,t)}const Bv=cm.prototype;Bv.append=function(t,n){this._pairs.push([t,n])};Bv.toString=function(t){const n=t?function(i){return t.call(this,i,gy)}:gy;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function gk(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function zv(e,t,n){if(!t)return e;const i=n&&n.encode||gk,s=K.isFunction(n)?{serialize:n}:n,l=s&&s.serialize;let o;if(l?o=l(t,s):o=K.isURLSearchParams(t)?t.toString():new cm(t,s).toString(i),o){const d=e.indexOf("#");d!==-1&&(e=e.slice(0,d)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class by{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){K.forEach(this.handlers,function(i){i!==null&&t(i)})}}const dm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},bk=typeof URLSearchParams<"u"?URLSearchParams:cm,yk=typeof FormData<"u"?FormData:null,Ek=typeof Blob<"u"?Blob:null,xk={isBrowser:!0,classes:{URLSearchParams:bk,FormData:yk,Blob:Ek},protocols:["http","https","file","blob","url","data"]},fm=typeof window<"u"&&typeof document<"u",gp=typeof navigator=="object"&&navigator||void 0,vk=fm&&(!gp||["ReactNative","NativeScript","NS"].indexOf(gp.product)<0),_k=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Tk=fm&&window.location.href||"http://localhost",Ak=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fm,hasStandardBrowserEnv:vk,hasStandardBrowserWebWorkerEnv:_k,navigator:gp,origin:Tk},Symbol.toStringTag,{value:"Module"})),an={...Ak,...xk};function Sk(e,t){return fd(e,new an.classes.URLSearchParams,{visitor:function(n,i,s,l){return an.isNode&&K.isBuffer(n)?(this.append(i,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...t})}function wk(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function kk(e){const t={},n=Object.keys(e);let i;const s=n.length;let l;for(i=0;i<s;i++)l=n[i],t[l]=e[l];return t}function Pv(e){function t(n,i,s,l){let o=n[l++];if(o==="__proto__")return!0;const d=Number.isFinite(+o),h=l>=n.length;return o=!o&&K.isArray(s)?s.length:o,h?(K.hasOwnProp(s,o)?s[o]=[s[o],i]:s[o]=i,!d):((!s[o]||!K.isObject(s[o]))&&(s[o]=[]),t(n,i,s[o],l)&&K.isArray(s[o])&&(s[o]=kk(s[o])),!d)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,(i,s)=>{t(wk(i),s,n,0)}),n}return null}function Ck(e,t,n){if(K.isString(e))try{return(t||JSON.parse)(e),K.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const zu={transitional:dm,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const i=n.getContentType()||"",s=i.indexOf("application/json")>-1,l=K.isObject(t);if(l&&K.isHTMLForm(t)&&(t=new FormData(t)),K.isFormData(t))return s?JSON.stringify(Pv(t)):t;if(K.isArrayBuffer(t)||K.isBuffer(t)||K.isStream(t)||K.isFile(t)||K.isBlob(t)||K.isReadableStream(t))return t;if(K.isArrayBufferView(t))return t.buffer;if(K.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(l){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Sk(t,this.formSerializer).toString();if((d=K.isFileList(t))||i.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return fd(d?{"files[]":t}:t,h&&new h,this.formSerializer)}}return l||s?(n.setContentType("application/json",!1),Ck(t)):t}],transformResponse:[function(t){const n=this.transitional||zu.transitional,i=n&&n.forcedJSONParsing,s=this.responseType==="json";if(K.isResponse(t)||K.isReadableStream(t))return t;if(t&&K.isString(t)&&(i&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(d){if(o)throw d.name==="SyntaxError"?De.from(d,De.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:an.classes.FormData,Blob:an.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],e=>{zu.headers[e]={}});const Nk=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Rk=e=>{const t={};let n,i,s;return e&&e.split(`
|
|
2
|
-
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),i=o.substring(s+1).trim(),!(!n||t[n]&&Nk[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},yy=Symbol("internals");function Vl(e){return e&&String(e).trim().toLowerCase()}function Ic(e){return e===!1||e==null?e:K.isArray(e)?e.map(Ic):String(e)}function Ok(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}const Lk=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function s0(e,t,n,i,s){if(K.isFunction(i))return i.call(this,t,n);if(s&&(t=n),!!K.isString(t)){if(K.isString(i))return t.indexOf(i)!==-1;if(K.isRegExp(i))return i.test(t)}}function Mk(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function Ik(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(s,l,o){return this[i].call(this,t,s,l,o)},configurable:!0})})}let Cn=class{constructor(t){t&&this.set(t)}set(t,n,i){const s=this;function l(d,h,f){const m=Vl(h);if(!m)throw new Error("header name must be a non-empty string");const b=K.findKey(s,m);(!b||s[b]===void 0||f===!0||f===void 0&&s[b]!==!1)&&(s[b||h]=Ic(d))}const o=(d,h)=>K.forEach(d,(f,m)=>l(f,m,h));if(K.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(K.isString(t)&&(t=t.trim())&&!Lk(t))o(Rk(t),n);else if(K.isObject(t)&&K.isIterable(t)){let d={},h,f;for(const m of t){if(!K.isArray(m))throw TypeError("Object iterator must return a key-value pair");d[f=m[0]]=(h=d[f])?K.isArray(h)?[...h,m[1]]:[h,m[1]]:m[1]}o(d,n)}else t!=null&&l(n,t,i);return this}get(t,n){if(t=Vl(t),t){const i=K.findKey(this,t);if(i){const s=this[i];if(!n)return s;if(n===!0)return Ok(s);if(K.isFunction(n))return n.call(this,s,i);if(K.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Vl(t),t){const i=K.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||s0(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let s=!1;function l(o){if(o=Vl(o),o){const d=K.findKey(i,o);d&&(!n||s0(i,i[d],d,n))&&(delete i[d],s=!0)}}return K.isArray(t)?t.forEach(l):l(t),s}clear(t){const n=Object.keys(this);let i=n.length,s=!1;for(;i--;){const l=n[i];(!t||s0(this,this[l],l,t,!0))&&(delete this[l],s=!0)}return s}normalize(t){const n=this,i={};return K.forEach(this,(s,l)=>{const o=K.findKey(i,l);if(o){n[o]=Ic(s),delete n[l];return}const d=t?Mk(l):String(l).trim();d!==l&&delete n[l],n[d]=Ic(s),i[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return K.forEach(this,(i,s)=>{i!=null&&i!==!1&&(n[s]=t&&K.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const i=new this(t);return n.forEach(s=>i.set(s)),i}static accessor(t){const i=(this[yy]=this[yy]={accessors:{}}).accessors,s=this.prototype;function l(o){const d=Vl(o);i[d]||(Ik(s,o),i[d]=!0)}return K.isArray(t)?t.forEach(l):l(t),this}};Cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);K.reduceDescriptors(Cn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});K.freezeMethods(Cn);function l0(e,t){const n=this||zu,i=t||n,s=Cn.from(i.headers);let l=i.data;return K.forEach(e,function(d){l=d.call(n,l,s.normalize(),t?t.status:void 0)}),s.normalize(),l}function Hv(e){return!!(e&&e.__CANCEL__)}let Pu=class extends De{constructor(t,n,i){super(t??"canceled",De.ERR_CANCELED,n,i),this.name="CanceledError",this.__CANCEL__=!0}};function Uv(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new De("Request failed with status code "+n.status,[De.ERR_BAD_REQUEST,De.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Dk(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Bk(e,t){e=e||10;const n=new Array(e),i=new Array(e);let s=0,l=0,o;return t=t!==void 0?t:1e3,function(h){const f=Date.now(),m=i[l];o||(o=f),n[s]=h,i[s]=f;let b=l,x=0;for(;b!==s;)x+=n[b++],b=b%e;if(s=(s+1)%e,s===l&&(l=(l+1)%e),f-o<t)return;const E=m&&f-m;return E?Math.round(x*1e3/E):void 0}}function zk(e,t){let n=0,i=1e3/t,s,l;const o=(f,m=Date.now())=>{n=m,s=null,l&&(clearTimeout(l),l=null),e(...f)};return[(...f)=>{const m=Date.now(),b=m-n;b>=i?o(f,m):(s=f,l||(l=setTimeout(()=>{l=null,o(s)},i-b)))},()=>s&&o(s)]}const qc=(e,t,n=3)=>{let i=0;const s=Bk(50,250);return zk(l=>{const o=l.loaded,d=l.lengthComputable?l.total:void 0,h=o-i,f=s(h),m=o<=d;i=o;const b={loaded:o,total:d,progress:d?o/d:void 0,bytes:h,rate:f||void 0,estimated:f&&d&&m?(d-o)/f:void 0,event:l,lengthComputable:d!=null,[t?"download":"upload"]:!0};e(b)},n)},Ey=(e,t)=>{const n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},xy=e=>(...t)=>K.asap(()=>e(...t)),Pk=an.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,an.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(an.origin),an.navigator&&/(msie|trident)/i.test(an.navigator.userAgent)):()=>!0,Hk=an.hasStandardBrowserEnv?{write(e,t,n,i,s,l,o){if(typeof document>"u")return;const d=[`${e}=${encodeURIComponent(t)}`];K.isNumber(n)&&d.push(`expires=${new Date(n).toUTCString()}`),K.isString(i)&&d.push(`path=${i}`),K.isString(s)&&d.push(`domain=${s}`),l===!0&&d.push("secure"),K.isString(o)&&d.push(`SameSite=${o}`),document.cookie=d.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Uk(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function jk(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function jv(e,t,n){let i=!Uk(t);return e&&(i||n==!1)?jk(e,t):t}const vy=e=>e instanceof Cn?{...e}:e;function Oa(e,t){t=t||{};const n={};function i(f,m,b,x){return K.isPlainObject(f)&&K.isPlainObject(m)?K.merge.call({caseless:x},f,m):K.isPlainObject(m)?K.merge({},m):K.isArray(m)?m.slice():m}function s(f,m,b,x){if(K.isUndefined(m)){if(!K.isUndefined(f))return i(void 0,f,b,x)}else return i(f,m,b,x)}function l(f,m){if(!K.isUndefined(m))return i(void 0,m)}function o(f,m){if(K.isUndefined(m)){if(!K.isUndefined(f))return i(void 0,f)}else return i(void 0,m)}function d(f,m,b){if(b in t)return i(f,m);if(b in e)return i(void 0,f)}const h={url:l,method:l,data:l,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:d,headers:(f,m,b)=>s(vy(f),vy(m),b,!0)};return K.forEach(Object.keys({...e,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const b=K.hasOwnProp(h,m)?h[m]:s,x=b(e[m],t[m],m);K.isUndefined(x)&&b!==d||(n[m]=x)}),n}const Fv=e=>{const t=Oa({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:l,headers:o,auth:d}=t;if(t.headers=o=Cn.from(o),t.url=zv(jv(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),d&&o.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):""))),K.isFormData(n)){if(an.hasStandardBrowserEnv||an.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(K.isFunction(n.getHeaders)){const h=n.getHeaders(),f=["content-type","content-length"];Object.entries(h).forEach(([m,b])=>{f.includes(m.toLowerCase())&&o.set(m,b)})}}if(an.hasStandardBrowserEnv&&(i&&K.isFunction(i)&&(i=i(t)),i||i!==!1&&Pk(t.url))){const h=s&&l&&Hk.read(l);h&&o.set(s,h)}return t},Fk=typeof XMLHttpRequest<"u",$k=Fk&&function(e){return new Promise(function(n,i){const s=Fv(e);let l=s.data;const o=Cn.from(s.headers).normalize();let{responseType:d,onUploadProgress:h,onDownloadProgress:f}=s,m,b,x,E,T;function w(){E&&E(),T&&T(),s.cancelToken&&s.cancelToken.unsubscribe(m),s.signal&&s.signal.removeEventListener("abort",m)}let S=new XMLHttpRequest;S.open(s.method.toUpperCase(),s.url,!0),S.timeout=s.timeout;function k(){if(!S)return;const P=Cn.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),J={data:!d||d==="text"||d==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:P,config:e,request:S};Uv(function(ne){n(ne),w()},function(ne){i(ne),w()},J),S=null}"onloadend"in S?S.onloadend=k:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(k)},S.onabort=function(){S&&(i(new De("Request aborted",De.ECONNABORTED,e,S)),S=null)},S.onerror=function(V){const J=V&&V.message?V.message:"Network Error",H=new De(J,De.ERR_NETWORK,e,S);H.event=V||null,i(H),S=null},S.ontimeout=function(){let V=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const J=s.transitional||dm;s.timeoutErrorMessage&&(V=s.timeoutErrorMessage),i(new De(V,J.clarifyTimeoutError?De.ETIMEDOUT:De.ECONNABORTED,e,S)),S=null},l===void 0&&o.setContentType(null),"setRequestHeader"in S&&K.forEach(o.toJSON(),function(V,J){S.setRequestHeader(J,V)}),K.isUndefined(s.withCredentials)||(S.withCredentials=!!s.withCredentials),d&&d!=="json"&&(S.responseType=s.responseType),f&&([x,T]=qc(f,!0),S.addEventListener("progress",x)),h&&S.upload&&([b,E]=qc(h),S.upload.addEventListener("progress",b),S.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(m=P=>{S&&(i(!P||P.type?new Pu(null,e,S):P),S.abort(),S=null)},s.cancelToken&&s.cancelToken.subscribe(m),s.signal&&(s.signal.aborted?m():s.signal.addEventListener("abort",m)));const j=Dk(s.url);if(j&&an.protocols.indexOf(j)===-1){i(new De("Unsupported protocol "+j+":",De.ERR_BAD_REQUEST,e));return}S.send(l||null)})},qk=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let i=new AbortController,s;const l=function(f){if(!s){s=!0,d();const m=f instanceof Error?f:this.reason;i.abort(m instanceof De?m:new Pu(m instanceof Error?m.message:m))}};let o=t&&setTimeout(()=>{o=null,l(new De(`timeout of ${t}ms exceeded`,De.ETIMEDOUT))},t);const d=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(l):f.removeEventListener("abort",l)}),e=null)};e.forEach(f=>f.addEventListener("abort",l));const{signal:h}=i;return h.unsubscribe=()=>K.asap(d),h}},Yk=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let i=0,s;for(;i<n;)s=i+t,yield e.slice(i,s),i=s},Vk=async function*(e,t){for await(const n of Gk(e))yield*Yk(n,t)},Gk=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:i}=await t.read();if(n)break;yield i}}finally{await t.cancel()}},_y=(e,t,n,i)=>{const s=Vk(e,t);let l=0,o,d=h=>{o||(o=!0,i&&i(h))};return new ReadableStream({async pull(h){try{const{done:f,value:m}=await s.next();if(f){d(),h.close();return}let b=m.byteLength;if(n){let x=l+=b;n(x)}h.enqueue(new Uint8Array(m))}catch(f){throw d(f),f}},cancel(h){return d(h),s.return()}},{highWaterMark:2})},Ty=64*1024,{isFunction:mc}=K,Wk=(({Request:e,Response:t})=>({Request:e,Response:t}))(K.global),{ReadableStream:Ay,TextEncoder:Sy}=K.global,wy=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Qk=e=>{e=K.merge.call({skipUndefined:!0},Wk,e);const{fetch:t,Request:n,Response:i}=e,s=t?mc(t):typeof fetch=="function",l=mc(n),o=mc(i);if(!s)return!1;const d=s&&mc(Ay),h=s&&(typeof Sy=="function"?(T=>w=>T.encode(w))(new Sy):async T=>new Uint8Array(await new n(T).arrayBuffer())),f=l&&d&&wy(()=>{let T=!1;const w=new n(an.origin,{body:new Ay,method:"POST",get duplex(){return T=!0,"half"}}).headers.has("Content-Type");return T&&!w}),m=o&&d&&wy(()=>K.isReadableStream(new i("").body)),b={stream:m&&(T=>T.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(T=>{!b[T]&&(b[T]=(w,S)=>{let k=w&&w[T];if(k)return k.call(w);throw new De(`Response type '${T}' is not supported`,De.ERR_NOT_SUPPORT,S)})});const x=async T=>{if(T==null)return 0;if(K.isBlob(T))return T.size;if(K.isSpecCompliantForm(T))return(await new n(an.origin,{method:"POST",body:T}).arrayBuffer()).byteLength;if(K.isArrayBufferView(T)||K.isArrayBuffer(T))return T.byteLength;if(K.isURLSearchParams(T)&&(T=T+""),K.isString(T))return(await h(T)).byteLength},E=async(T,w)=>{const S=K.toFiniteNumber(T.getContentLength());return S??x(w)};return async T=>{let{url:w,method:S,data:k,signal:j,cancelToken:P,timeout:V,onDownloadProgress:J,onUploadProgress:H,responseType:ne,headers:te,withCredentials:fe="same-origin",fetchOptions:z}=Fv(T),$=t||fetch;ne=ne?(ne+"").toLowerCase():"text";let Y=qk([j,P&&P.toAbortSignal()],V),_e=null;const ce=Y&&Y.unsubscribe&&(()=>{Y.unsubscribe()});let ue;try{if(H&&f&&S!=="get"&&S!=="head"&&(ue=await E(te,k))!==0){let D=new n(w,{method:"POST",body:k,duplex:"half"}),ee;if(K.isFormData(k)&&(ee=D.headers.get("content-type"))&&te.setContentType(ee),D.body){const[O,F]=Ey(ue,qc(xy(H)));k=_y(D.body,Ty,O,F)}}K.isString(fe)||(fe=fe?"include":"omit");const I=l&&"credentials"in n.prototype,ie={...z,signal:Y,method:S.toUpperCase(),headers:te.normalize().toJSON(),body:k,duplex:"half",credentials:I?fe:void 0};_e=l&&new n(w,ie);let Ee=await(l?$(_e,z):$(w,ie));const ke=m&&(ne==="stream"||ne==="response");if(m&&(J||ke&&ce)){const D={};["status","statusText","headers"].forEach(be=>{D[be]=Ee[be]});const ee=K.toFiniteNumber(Ee.headers.get("content-length")),[O,F]=J&&Ey(ee,qc(xy(J),!0))||[];Ee=new i(_y(Ee.body,Ty,O,()=>{F&&F(),ce&&ce()}),D)}ne=ne||"text";let R=await b[K.findKey(b,ne)||"text"](Ee,T);return!ke&&ce&&ce(),await new Promise((D,ee)=>{Uv(D,ee,{data:R,headers:Cn.from(Ee.headers),status:Ee.status,statusText:Ee.statusText,config:T,request:_e})})}catch(I){throw ce&&ce(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new De("Network Error",De.ERR_NETWORK,T,_e,I&&I.response),{cause:I.cause||I}):De.from(I,I&&I.code,T,_e,I&&I.response)}}},Xk=new Map,$v=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:s}=t,l=[i,s,n];let o=l.length,d=o,h,f,m=Xk;for(;d--;)h=l[d],f=m.get(h),f===void 0&&m.set(h,f=d?new Map:Qk(t)),m=f;return f};$v();const hm={http:hk,xhr:$k,fetch:{get:$v}};K.forEach(hm,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ky=e=>`- ${e}`,Kk=e=>K.isFunction(e)||e===null||e===!1;function Zk(e,t){e=K.isArray(e)?e:[e];const{length:n}=e;let i,s;const l={};for(let o=0;o<n;o++){i=e[o];let d;if(s=i,!Kk(i)&&(s=hm[(d=String(i)).toLowerCase()],s===void 0))throw new De(`Unknown adapter '${d}'`);if(s&&(K.isFunction(s)||(s=s.get(t))))break;l[d||"#"+o]=s}if(!s){const o=Object.entries(l).map(([h,f])=>`adapter ${h} `+(f===!1?"is not supported by the environment":"is not available in the build"));let d=n?o.length>1?`since :
|
|
4
|
-
`+o.map(ky).join(`
|
|
5
|
-
`):" "+ky(o[0]):"as no adapter specified";throw new De("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return s}const qv={getAdapter:Zk,adapters:hm};function u0(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pu(null,e)}function Cy(e){return u0(e),e.headers=Cn.from(e.headers),e.data=l0.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),qv.getAdapter(e.adapter||zu.adapter,e)(e).then(function(i){return u0(e),i.data=l0.call(e,e.transformResponse,i),i.headers=Cn.from(i.headers),i},function(i){return Hv(i)||(u0(e),i&&i.response&&(i.response.data=l0.call(e,e.transformResponse,i.response),i.response.headers=Cn.from(i.response.headers))),Promise.reject(i)})}const Yv="1.13.6",hd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{hd[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const Ny={};hd.transitional=function(t,n,i){function s(l,o){return"[Axios v"+Yv+"] Transitional option '"+l+"'"+o+(i?". "+i:"")}return(l,o,d)=>{if(t===!1)throw new De(s(o," has been removed"+(n?" in "+n:"")),De.ERR_DEPRECATED);return n&&!Ny[o]&&(Ny[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(l,o,d):!0}};hd.spelling=function(t){return(n,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function Jk(e,t,n){if(typeof e!="object")throw new De("options must be an object",De.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let s=i.length;for(;s-- >0;){const l=i[s],o=t[l];if(o){const d=e[l],h=d===void 0||o(d,l,e);if(h!==!0)throw new De("option "+l+" must be "+h,De.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new De("Unknown option "+l,De.ERR_BAD_OPTION)}}const Dc={assertOptions:Jk,validators:hd},ir=Dc.validators;let Ca=class{constructor(t){this.defaults=t||{},this.interceptors={request:new by,response:new by}}async request(t,n){try{return await this._request(t,n)}catch(i){if(i instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const l=s.stack?s.stack.replace(/^.+\n/,""):"";try{i.stack?l&&!String(i.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
6
|
-
`+l):i.stack=l}catch{}}throw i}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Oa(this.defaults,n);const{transitional:i,paramsSerializer:s,headers:l}=n;i!==void 0&&Dc.assertOptions(i,{silentJSONParsing:ir.transitional(ir.boolean),forcedJSONParsing:ir.transitional(ir.boolean),clarifyTimeoutError:ir.transitional(ir.boolean),legacyInterceptorReqResOrdering:ir.transitional(ir.boolean)},!1),s!=null&&(K.isFunction(s)?n.paramsSerializer={serialize:s}:Dc.assertOptions(s,{encode:ir.function,serialize:ir.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Dc.assertOptions(n,{baseUrl:ir.spelling("baseURL"),withXsrfToken:ir.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=l&&K.merge(l.common,l[n.method]);l&&K.forEach(["delete","get","head","post","put","patch","common"],T=>{delete l[T]}),n.headers=Cn.concat(o,l);const d=[];let h=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(n)===!1)return;h=h&&w.synchronous;const S=n.transitional||dm;S&&S.legacyInterceptorReqResOrdering?d.unshift(w.fulfilled,w.rejected):d.push(w.fulfilled,w.rejected)});const f=[];this.interceptors.response.forEach(function(w){f.push(w.fulfilled,w.rejected)});let m,b=0,x;if(!h){const T=[Cy.bind(this),void 0];for(T.unshift(...d),T.push(...f),x=T.length,m=Promise.resolve(n);b<x;)m=m.then(T[b++],T[b++]);return m}x=d.length;let E=n;for(;b<x;){const T=d[b++],w=d[b++];try{E=T(E)}catch(S){w.call(this,S);break}}try{m=Cy.call(this,E)}catch(T){return Promise.reject(T)}for(b=0,x=f.length;b<x;)m=m.then(f[b++],f[b++]);return m}getUri(t){t=Oa(this.defaults,t);const n=jv(t.baseURL,t.url,t.allowAbsoluteUrls);return zv(n,t.params,t.paramsSerializer)}};K.forEach(["delete","get","head","options"],function(t){Ca.prototype[t]=function(n,i){return this.request(Oa(i||{},{method:t,url:n,data:(i||{}).data}))}});K.forEach(["post","put","patch"],function(t){function n(i){return function(l,o,d){return this.request(Oa(d||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:l,data:o}))}}Ca.prototype[t]=n(),Ca.prototype[t+"Form"]=n(!0)});let eC=class Vv{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const i=this;this.promise.then(s=>{if(!i._listeners)return;let l=i._listeners.length;for(;l-- >0;)i._listeners[l](s);i._listeners=null}),this.promise.then=s=>{let l;const o=new Promise(d=>{i.subscribe(d),l=d}).then(s);return o.cancel=function(){i.unsubscribe(l)},o},t(function(l,o,d){i.reason||(i.reason=new Pu(l,o,d),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=i=>{t.abort(i)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Vv(function(s){t=s}),cancel:t}}};function tC(e){return function(n){return e.apply(null,n)}}function nC(e){return K.isObject(e)&&e.isAxiosError===!0}const bp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(bp).forEach(([e,t])=>{bp[t]=e});function Gv(e){const t=new Ca(e),n=wv(Ca.prototype.request,t);return K.extend(n,Ca.prototype,t,{allOwnKeys:!0}),K.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Gv(Oa(e,s))},n}const Tt=Gv(zu);Tt.Axios=Ca;Tt.CanceledError=Pu;Tt.CancelToken=eC;Tt.isCancel=Hv;Tt.VERSION=Yv;Tt.toFormData=fd;Tt.AxiosError=De;Tt.Cancel=Tt.CanceledError;Tt.all=function(t){return Promise.all(t)};Tt.spread=tC;Tt.isAxiosError=nC;Tt.mergeConfig=Oa;Tt.AxiosHeaders=Cn;Tt.formToJSON=e=>Pv(K.isHTMLForm(e)?new FormData(e):e);Tt.getAdapter=qv.getAdapter;Tt.HttpStatusCode=bp;Tt.default=Tt;const{Axios:HV,AxiosError:UV,CanceledError:jV,isCancel:FV,CancelToken:$V,VERSION:qV,all:YV,Cancel:VV,isAxiosError:GV,spread:WV,toFormData:QV,AxiosHeaders:XV,HttpStatusCode:KV,formToJSON:ZV,getAdapter:JV,mergeConfig:eG}=Tt;var o0={exports:{}},rn={};var Ry;function rC(){if(Ry)return rn;Ry=1;var e=um();function t(h){var f="https://react.dev/errors/"+h;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+h+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(h,f,m){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:b==null?null:""+b,children:h,containerInfo:f,implementation:m}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(h,f){if(h==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return rn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,rn.createPortal=function(h,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return l(h,f,null,m)},rn.flushSync=function(h){var f=o.T,m=i.p;try{if(o.T=null,i.p=2,h)return h()}finally{o.T=f,i.p=m,i.d.f()}},rn.preconnect=function(h,f){typeof h=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,i.d.C(h,f))},rn.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},rn.preinit=function(h,f){if(typeof h=="string"&&f&&typeof f.as=="string"){var m=f.as,b=d(m,f.crossOrigin),x=typeof f.integrity=="string"?f.integrity:void 0,E=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?i.d.S(h,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:b,integrity:x,fetchPriority:E}):m==="script"&&i.d.X(h,{crossOrigin:b,integrity:x,fetchPriority:E,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},rn.preinitModule=function(h,f){if(typeof h=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=d(f.as,f.crossOrigin);i.d.M(h,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&i.d.M(h)},rn.preload=function(h,f){if(typeof h=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,b=d(m,f.crossOrigin);i.d.L(h,m,{crossOrigin:b,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},rn.preloadModule=function(h,f){if(typeof h=="string")if(f){var m=d(f.as,f.crossOrigin);i.d.m(h,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else i.d.m(h)},rn.requestFormReset=function(h){i.d.r(h)},rn.unstable_batchedUpdates=function(h,f){return h(f)},rn.useFormState=function(h,f,m){return o.H.useFormState(h,f,m)},rn.useFormStatus=function(){return o.H.useHostTransitionStatus()},rn.version="19.2.4",rn}var Oy;function Wv(){if(Oy)return o0.exports;Oy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),o0.exports=rC(),o0.exports}var Hu=Wv();const iC=Mu(Hu),aC=Sv({__proto__:null,default:iC},[Hu]);var c0={exports:{}},Gl={},d0={exports:{}},f0={};var Ly;function sC(){return Ly||(Ly=1,(function(e){function t(I,ie){var Ee=I.length;I.push(ie);e:for(;0<Ee;){var ke=Ee-1>>>1,R=I[ke];if(0<s(R,ie))I[ke]=ie,I[Ee]=R,Ee=ke;else break e}}function n(I){return I.length===0?null:I[0]}function i(I){if(I.length===0)return null;var ie=I[0],Ee=I.pop();if(Ee!==ie){I[0]=Ee;e:for(var ke=0,R=I.length,D=R>>>1;ke<D;){var ee=2*(ke+1)-1,O=I[ee],F=ee+1,be=I[F];if(0>s(O,Ee))F<R&&0>s(be,O)?(I[ke]=be,I[F]=Ee,ke=F):(I[ke]=O,I[ee]=Ee,ke=ee);else if(F<R&&0>s(be,Ee))I[ke]=be,I[F]=Ee,ke=F;else break e}}return ie}function s(I,ie){var Ee=I.sortIndex-ie.sortIndex;return Ee!==0?Ee:I.id-ie.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var o=Date,d=o.now();e.unstable_now=function(){return o.now()-d}}var h=[],f=[],m=1,b=null,x=3,E=!1,T=!1,w=!1,S=!1,k=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function V(I){for(var ie=n(f);ie!==null;){if(ie.callback===null)i(f);else if(ie.startTime<=I)i(f),ie.sortIndex=ie.expirationTime,t(h,ie);else break;ie=n(f)}}function J(I){if(w=!1,V(I),!T)if(n(h)!==null)T=!0,H||(H=!0,Y());else{var ie=n(f);ie!==null&&ue(J,ie.startTime-I)}}var H=!1,ne=-1,te=5,fe=-1;function z(){return S?!0:!(e.unstable_now()-fe<te)}function $(){if(S=!1,H){var I=e.unstable_now();fe=I;var ie=!0;try{e:{T=!1,w&&(w=!1,j(ne),ne=-1),E=!0;var Ee=x;try{t:{for(V(I),b=n(h);b!==null&&!(b.expirationTime>I&&z());){var ke=b.callback;if(typeof ke=="function"){b.callback=null,x=b.priorityLevel;var R=ke(b.expirationTime<=I);if(I=e.unstable_now(),typeof R=="function"){b.callback=R,V(I),ie=!0;break t}b===n(h)&&i(h),V(I)}else i(h);b=n(h)}if(b!==null)ie=!0;else{var D=n(f);D!==null&&ue(J,D.startTime-I),ie=!1}}break e}finally{b=null,x=Ee,E=!1}ie=void 0}}finally{ie?Y():H=!1}}}var Y;if(typeof P=="function")Y=function(){P($)};else if(typeof MessageChannel<"u"){var _e=new MessageChannel,ce=_e.port2;_e.port1.onmessage=$,Y=function(){ce.postMessage(null)}}else Y=function(){k($,0)};function ue(I,ie){ne=k(function(){I(e.unstable_now())},ie)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(I){switch(x){case 1:case 2:case 3:var ie=3;break;default:ie=x}var Ee=x;x=ie;try{return I()}finally{x=Ee}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(I,ie){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var Ee=x;x=I;try{return ie()}finally{x=Ee}},e.unstable_scheduleCallback=function(I,ie,Ee){var ke=e.unstable_now();switch(typeof Ee=="object"&&Ee!==null?(Ee=Ee.delay,Ee=typeof Ee=="number"&&0<Ee?ke+Ee:ke):Ee=ke,I){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=Ee+R,I={id:m++,callback:ie,priorityLevel:I,startTime:Ee,expirationTime:R,sortIndex:-1},Ee>ke?(I.sortIndex=Ee,t(f,I),n(h)===null&&I===n(f)&&(w?(j(ne),ne=-1):w=!0,ue(J,Ee-ke))):(I.sortIndex=R,t(h,I),T||E||(T=!0,H||(H=!0,Y()))),I},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(I){var ie=x;return function(){var Ee=x;x=ie;try{return I.apply(this,arguments)}finally{x=Ee}}}})(f0)),f0}var My;function lC(){return My||(My=1,d0.exports=sC()),d0.exports}var Iy;function uC(){if(Iy)return Gl;Iy=1;var e=lC(),t=um(),n=Wv();function i(r){var a="https://react.dev/errors/"+r;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var a=r,u=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(u=a.return),r=a.return;while(r)}return a.tag===3?u:null}function o(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function d(r){if(r.tag===31){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function h(r){if(l(r)!==r)throw Error(i(188))}function f(r){var a=r.alternate;if(!a){if(a=l(r),a===null)throw Error(i(188));return a!==r?null:r}for(var u=r,c=a;;){var p=u.return;if(p===null)break;var g=p.alternate;if(g===null){if(c=p.return,c!==null){u=c;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===u)return h(p),r;if(g===c)return h(p),a;g=g.sibling}throw Error(i(188))}if(u.return!==c.return)u=p,c=g;else{for(var _=!1,A=p.child;A;){if(A===u){_=!0,u=p,c=g;break}if(A===c){_=!0,c=p,u=g;break}A=A.sibling}if(!_){for(A=g.child;A;){if(A===u){_=!0,u=g,c=p;break}if(A===c){_=!0,c=g,u=p;break}A=A.sibling}if(!_)throw Error(i(189))}}if(u.alternate!==c)throw Error(i(190))}if(u.tag!==3)throw Error(i(188));return u.stateNode.current===u?r:a}function m(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r;for(r=r.child;r!==null;){if(a=m(r),a!==null)return a;r=r.sibling}return null}var b=Object.assign,x=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),P=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),fe=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function Y(r){return r===null||typeof r!="object"?null:(r=$&&r[$]||r["@@iterator"],typeof r=="function"?r:null)}var _e=Symbol.for("react.client.reference");function ce(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===_e?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case w:return"Fragment";case k:return"Profiler";case S:return"StrictMode";case J:return"Suspense";case H:return"SuspenseList";case fe:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case T:return"Portal";case P:return r.displayName||"Context";case j:return(r._context.displayName||"Context")+".Consumer";case V:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ne:return a=r.displayName||null,a!==null?a:ce(r.type)||"Memo";case te:a=r._payload,r=r._init;try{return ce(r(a))}catch{}}return null}var ue=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee={pending:!1,data:null,method:null,action:null},ke=[],R=-1;function D(r){return{current:r}}function ee(r){0>R||(r.current=ke[R],ke[R]=null,R--)}function O(r,a){R++,ke[R]=r.current,r.current=a}var F=D(null),be=D(null),ye=D(null),Re=D(null);function Je(r,a){switch(O(ye,a),O(be,r),O(F,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?L2(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=L2(a),r=M2(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}ee(F),O(F,r)}function Le(){ee(F),ee(be),ee(ye)}function Gt(r){r.memoizedState!==null&&O(Re,r);var a=F.current,u=M2(a,r.type);a!==u&&(O(be,r),O(F,u))}function Wt(r){be.current===r&&(ee(F),ee(be)),Re.current===r&&(ee(Re),jl._currentValue=Ee)}var Ln,dr;function Qt(r){if(Ln===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);Ln=a&&a[1]||"",dr=-1<u.stack.indexOf(`
|
|
7
|
-
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
8
|
-
`+Ln+r+dr}var _r=!1;function di(r,a){if(!r||_r)return"";_r=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(Z){var X=Z}Reflect.construct(r,[],oe)}else{try{oe.call()}catch(Z){X=Z}r.call(oe.prototype)}}else{try{throw Error()}catch(Z){X=Z}(oe=r())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(Z){if(Z&&X&&typeof Z.stack=="string")return[Z.stack,X.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),_=g[0],A=g[1];if(_&&A){var B=_.split(`
|
|
9
|
-
`),Q=A.split(`
|
|
10
|
-
`);for(p=c=0;c<B.length&&!B[c].includes("DetermineComponentFrameRoot");)c++;for(;p<Q.length&&!Q[p].includes("DetermineComponentFrameRoot");)p++;if(c===B.length||p===Q.length)for(c=B.length-1,p=Q.length-1;1<=c&&0<=p&&B[c]!==Q[p];)p--;for(;1<=c&&0<=p;c--,p--)if(B[c]!==Q[p]){if(c!==1||p!==1)do if(c--,p--,0>p||B[c]!==Q[p]){var ae=`
|
|
11
|
-
`+B[c].replace(" at new "," at ");return r.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",r.displayName)),ae}while(1<=c&&0<=p);break}}}finally{_r=!1,Error.prepareStackTrace=u}return(u=r?r.displayName||r.name:"")?Qt(u):""}function Ue(r,a){switch(r.tag){case 26:case 27:case 5:return Qt(r.type);case 16:return Qt("Lazy");case 13:return r.child!==a&&a!==null?Qt("Suspense Fallback"):Qt("Suspense");case 19:return Qt("SuspenseList");case 0:case 15:return di(r.type,!1);case 11:return di(r.type.render,!1);case 1:return di(r.type,!0);case 31:return Qt("Activity");default:return""}}function ot(r){try{var a="",u=null;do a+=Ue(r,u),u=r,r=r.return;while(r);return a}catch(c){return`
|
|
12
|
-
Error generating stack: `+c.message+`
|
|
13
|
-
`+c.stack}}var jt=Object.prototype.hasOwnProperty,on=e.unstable_scheduleCallback,fr=e.unstable_cancelCallback,jd=e.unstable_shouldYield,Fd=e.unstable_requestPaint,cn=e.unstable_now,$d=e.unstable_getCurrentPriorityLevel,se=e.unstable_ImmediatePriority,xe=e.unstable_UserBlockingPriority,Ie=e.unstable_NormalPriority,qe=e.unstable_LowPriority,it=e.unstable_IdlePriority,Mn=e.log,Pr=e.unstable_setDisableYieldValue,dn=null,zt=null;function gn(r){if(typeof Mn=="function"&&Pr(r),zt&&typeof zt.setStrictMode=="function")try{zt.setStrictMode(dn,r)}catch{}}var pt=Math.clz32?Math.clz32:s6,fi=Math.log,hr=Math.LN2;function s6(r){return r>>>=0,r===0?32:31-(fi(r)/hr|0)|0}var Zu=256,Ju=262144,eo=4194304;function ea(r){var a=r&42;if(a!==0)return a;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function to(r,a,u){var c=r.pendingLanes;if(c===0)return 0;var p=0,g=r.suspendedLanes,_=r.pingedLanes;r=r.warmLanes;var A=c&134217727;return A!==0?(c=A&~g,c!==0?p=ea(c):(_&=A,_!==0?p=ea(_):u||(u=A&~r,u!==0&&(p=ea(u))))):(A=c&~g,A!==0?p=ea(A):_!==0?p=ea(_):u||(u=c&~r,u!==0&&(p=ea(u)))),p===0?0:a!==0&&a!==p&&(a&g)===0&&(g=p&-p,u=a&-a,g>=u||g===32&&(u&4194048)!==0)?a:p}function el(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function l6(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function h1(){var r=eo;return eo<<=1,(eo&62914560)===0&&(eo=4194304),r}function qd(r){for(var a=[],u=0;31>u;u++)a.push(r);return a}function tl(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function u6(r,a,u,c,p,g){var _=r.pendingLanes;r.pendingLanes=u,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=u,r.entangledLanes&=u,r.errorRecoveryDisabledLanes&=u,r.shellSuspendCounter=0;var A=r.entanglements,B=r.expirationTimes,Q=r.hiddenUpdates;for(u=_&~u;0<u;){var ae=31-pt(u),oe=1<<ae;A[ae]=0,B[ae]=-1;var X=Q[ae];if(X!==null)for(Q[ae]=null,ae=0;ae<X.length;ae++){var Z=X[ae];Z!==null&&(Z.lane&=-536870913)}u&=~oe}c!==0&&p1(r,c,0),g!==0&&p===0&&r.tag!==0&&(r.suspendedLanes|=g&~(_&~a))}function p1(r,a,u){r.pendingLanes|=a,r.suspendedLanes&=~a;var c=31-pt(a);r.entangledLanes|=a,r.entanglements[c]=r.entanglements[c]|1073741824|u&261930}function m1(r,a){var u=r.entangledLanes|=a;for(r=r.entanglements;u;){var c=31-pt(u),p=1<<c;p&a|r[c]&a&&(r[c]|=a),u&=~p}}function g1(r,a){var u=a&-a;return u=(u&42)!==0?1:Yd(u),(u&(r.suspendedLanes|a))!==0?0:u}function Yd(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Vd(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function b1(){var r=ie.p;return r!==0?r:(r=window.event,r===void 0?32:ny(r.type))}function y1(r,a){var u=ie.p;try{return ie.p=r,a()}finally{ie.p=u}}var hi=Math.random().toString(36).slice(2),Xt="__reactFiber$"+hi,bn="__reactProps$"+hi,Fa="__reactContainer$"+hi,Gd="__reactEvents$"+hi,o6="__reactListeners$"+hi,c6="__reactHandles$"+hi,E1="__reactResources$"+hi,nl="__reactMarker$"+hi;function Wd(r){delete r[Xt],delete r[bn],delete r[Gd],delete r[o6],delete r[c6]}function $a(r){var a=r[Xt];if(a)return a;for(var u=r.parentNode;u;){if(a=u[Fa]||u[Xt]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(r=U2(r);r!==null;){if(u=r[Xt])return u;r=U2(r)}return a}r=u,u=r.parentNode}return null}function qa(r){if(r=r[Xt]||r[Fa]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function rl(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(i(33))}function Ya(r){var a=r[E1];return a||(a=r[E1]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ft(r){r[nl]=!0}var x1=new Set,v1={};function ta(r,a){Va(r,a),Va(r+"Capture",a)}function Va(r,a){for(v1[r]=a,r=0;r<a.length;r++)x1.add(a[r])}var d6=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),_1={},T1={};function f6(r){return jt.call(T1,r)?!0:jt.call(_1,r)?!1:d6.test(r)?T1[r]=!0:(_1[r]=!0,!1)}function no(r,a,u){if(f6(a))if(u===null)r.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+u)}}function ro(r,a,u){if(u===null)r.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+u)}}function Hr(r,a,u,c){if(c===null)r.removeAttribute(u);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(u);return}r.setAttributeNS(a,u,""+c)}}function Wn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function A1(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function h6(r,a,u){var c=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,g=c.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return p.call(this)},set:function(_){u=""+_,g.call(this,_)}}),Object.defineProperty(r,a,{enumerable:c.enumerable}),{getValue:function(){return u},setValue:function(_){u=""+_},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function Qd(r){if(!r._valueTracker){var a=A1(r)?"checked":"value";r._valueTracker=h6(r,a,""+r[a])}}function S1(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var u=a.getValue(),c="";return r&&(c=A1(r)?r.checked?"true":"false":r.value),r=c,r!==u?(a.setValue(r),!0):!1}function io(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var p6=/[\n"\\]/g;function Qn(r){return r.replace(p6,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Xd(r,a,u,c,p,g,_,A){r.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?r.type=_:r.removeAttribute("type"),a!=null?_==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+Wn(a)):r.value!==""+Wn(a)&&(r.value=""+Wn(a)):_!=="submit"&&_!=="reset"||r.removeAttribute("value"),a!=null?Kd(r,_,Wn(a)):u!=null?Kd(r,_,Wn(u)):c!=null&&r.removeAttribute("value"),p==null&&g!=null&&(r.defaultChecked=!!g),p!=null&&(r.checked=p&&typeof p!="function"&&typeof p!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?r.name=""+Wn(A):r.removeAttribute("name")}function w1(r,a,u,c,p,g,_,A){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(r.type=g),a!=null||u!=null){if(!(g!=="submit"&&g!=="reset"||a!=null)){Qd(r);return}u=u!=null?""+Wn(u):"",a=a!=null?""+Wn(a):u,A||a===r.value||(r.value=a),r.defaultValue=a}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=A?r.checked:!!c,r.defaultChecked=!!c,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(r.name=_),Qd(r)}function Kd(r,a,u){a==="number"&&io(r.ownerDocument)===r||r.defaultValue===""+u||(r.defaultValue=""+u)}function Ga(r,a,u,c){if(r=r.options,a){a={};for(var p=0;p<u.length;p++)a["$"+u[p]]=!0;for(u=0;u<r.length;u++)p=a.hasOwnProperty("$"+r[u].value),r[u].selected!==p&&(r[u].selected=p),p&&c&&(r[u].defaultSelected=!0)}else{for(u=""+Wn(u),a=null,p=0;p<r.length;p++){if(r[p].value===u){r[p].selected=!0,c&&(r[p].defaultSelected=!0);return}a!==null||r[p].disabled||(a=r[p])}a!==null&&(a.selected=!0)}}function k1(r,a,u){if(a!=null&&(a=""+Wn(a),a!==r.value&&(r.value=a),u==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=u!=null?""+Wn(u):""}function C1(r,a,u,c){if(a==null){if(c!=null){if(u!=null)throw Error(i(92));if(ue(c)){if(1<c.length)throw Error(i(93));c=c[0]}u=c}u==null&&(u=""),a=u}u=Wn(a),r.defaultValue=u,c=r.textContent,c===u&&c!==""&&c!==null&&(r.value=c),Qd(r)}function Wa(r,a){if(a){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=a;return}}r.textContent=a}var m6=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function N1(r,a,u){var c=a.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?c?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":c?r.setProperty(a,u):typeof u!="number"||u===0||m6.has(a)?a==="float"?r.cssFloat=u:r[a]=(""+u).trim():r[a]=u+"px"}function R1(r,a,u){if(a!=null&&typeof a!="object")throw Error(i(62));if(r=r.style,u!=null){for(var c in u)!u.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var p in a)c=a[p],a.hasOwnProperty(p)&&u[p]!==c&&N1(r,p,c)}else for(var g in a)a.hasOwnProperty(g)&&N1(r,g,a[g])}function Zd(r){if(r.indexOf("-")===-1)return!1;switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var g6=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),b6=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ao(r){return b6.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Ur(){}var Jd=null;function ef(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Qa=null,Xa=null;function O1(r){var a=qa(r);if(a&&(r=a.stateNode)){var u=r[bn]||null;e:switch(r=a.stateNode,a.type){case"input":if(Xd(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),a=u.name,u.type==="radio"&&a!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Qn(""+a)+'"][type="radio"]'),a=0;a<u.length;a++){var c=u[a];if(c!==r&&c.form===r.form){var p=c[bn]||null;if(!p)throw Error(i(90));Xd(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<u.length;a++)c=u[a],c.form===r.form&&S1(c)}break e;case"textarea":k1(r,u.value,u.defaultValue);break e;case"select":a=u.value,a!=null&&Ga(r,!!u.multiple,a,!1)}}}var tf=!1;function L1(r,a,u){if(tf)return r(a,u);tf=!0;try{var c=r(a);return c}finally{if(tf=!1,(Qa!==null||Xa!==null)&&(Go(),Qa&&(a=Qa,r=Xa,Xa=Qa=null,O1(a),r)))for(a=0;a<r.length;a++)O1(r[a])}}function il(r,a){var u=r.stateNode;if(u===null)return null;var c=u[bn]||null;if(c===null)return null;u=c[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(i(231,a,typeof u));return u}var jr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nf=!1;if(jr)try{var al={};Object.defineProperty(al,"passive",{get:function(){nf=!0}}),window.addEventListener("test",al,al),window.removeEventListener("test",al,al)}catch{nf=!1}var pi=null,rf=null,so=null;function M1(){if(so)return so;var r,a=rf,u=a.length,c,p="value"in pi?pi.value:pi.textContent,g=p.length;for(r=0;r<u&&a[r]===p[r];r++);var _=u-r;for(c=1;c<=_&&a[u-c]===p[g-c];c++);return so=p.slice(r,1<c?1-c:void 0)}function lo(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function uo(){return!0}function I1(){return!1}function yn(r){function a(u,c,p,g,_){this._reactName=u,this._targetInst=p,this.type=c,this.nativeEvent=g,this.target=_,this.currentTarget=null;for(var A in r)r.hasOwnProperty(A)&&(u=r[A],this[A]=u?u(g):g[A]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?uo:I1,this.isPropagationStopped=I1,this}return b(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=uo)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=uo)},persist:function(){},isPersistent:uo}),a}var na={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oo=yn(na),sl=b({},na,{view:0,detail:0}),y6=yn(sl),af,sf,ll,co=b({},sl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uf,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==ll&&(ll&&r.type==="mousemove"?(af=r.screenX-ll.screenX,sf=r.screenY-ll.screenY):sf=af=0,ll=r),af)},movementY:function(r){return"movementY"in r?r.movementY:sf}}),D1=yn(co),E6=b({},co,{dataTransfer:0}),x6=yn(E6),v6=b({},sl,{relatedTarget:0}),lf=yn(v6),_6=b({},na,{animationName:0,elapsedTime:0,pseudoElement:0}),T6=yn(_6),A6=b({},na,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),S6=yn(A6),w6=b({},na,{data:0}),B1=yn(w6),k6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},C6={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},N6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function R6(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=N6[r])?!!a[r]:!1}function uf(){return R6}var O6=b({},sl,{key:function(r){if(r.key){var a=k6[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=lo(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?C6[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uf,charCode:function(r){return r.type==="keypress"?lo(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?lo(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),L6=yn(O6),M6=b({},co,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),z1=yn(M6),I6=b({},sl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uf}),D6=yn(I6),B6=b({},na,{propertyName:0,elapsedTime:0,pseudoElement:0}),z6=yn(B6),P6=b({},co,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),H6=yn(P6),U6=b({},na,{newState:0,oldState:0}),j6=yn(U6),F6=[9,13,27,32],of=jr&&"CompositionEvent"in window,ul=null;jr&&"documentMode"in document&&(ul=document.documentMode);var $6=jr&&"TextEvent"in window&&!ul,P1=jr&&(!of||ul&&8<ul&&11>=ul),H1=" ",U1=!1;function j1(r,a){switch(r){case"keyup":return F6.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function F1(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ka=!1;function q6(r,a){switch(r){case"compositionend":return F1(a);case"keypress":return a.which!==32?null:(U1=!0,H1);case"textInput":return r=a.data,r===H1&&U1?null:r;default:return null}}function Y6(r,a){if(Ka)return r==="compositionend"||!of&&j1(r,a)?(r=M1(),so=rf=pi=null,Ka=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return P1&&a.locale!=="ko"?null:a.data;default:return null}}var V6={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $1(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!V6[r.type]:a==="textarea"}function q1(r,a,u,c){Qa?Xa?Xa.push(c):Xa=[c]:Qa=c,a=ec(a,"onChange"),0<a.length&&(u=new oo("onChange","change",null,u,c),r.push({event:u,listeners:a}))}var ol=null,cl=null;function G6(r){w2(r,0)}function fo(r){var a=rl(r);if(S1(a))return r}function Y1(r,a){if(r==="change")return a}var V1=!1;if(jr){var cf;if(jr){var df="oninput"in document;if(!df){var G1=document.createElement("div");G1.setAttribute("oninput","return;"),df=typeof G1.oninput=="function"}cf=df}else cf=!1;V1=cf&&(!document.documentMode||9<document.documentMode)}function W1(){ol&&(ol.detachEvent("onpropertychange",Q1),cl=ol=null)}function Q1(r){if(r.propertyName==="value"&&fo(cl)){var a=[];q1(a,cl,r,ef(r)),L1(G6,a)}}function W6(r,a,u){r==="focusin"?(W1(),ol=a,cl=u,ol.attachEvent("onpropertychange",Q1)):r==="focusout"&&W1()}function Q6(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return fo(cl)}function X6(r,a){if(r==="click")return fo(a)}function K6(r,a){if(r==="input"||r==="change")return fo(a)}function Z6(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var In=typeof Object.is=="function"?Object.is:Z6;function dl(r,a){if(In(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var u=Object.keys(r),c=Object.keys(a);if(u.length!==c.length)return!1;for(c=0;c<u.length;c++){var p=u[c];if(!jt.call(a,p)||!In(r[p],a[p]))return!1}return!0}function X1(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function K1(r,a){var u=X1(r);r=0;for(var c;u;){if(u.nodeType===3){if(c=r+u.textContent.length,r<=a&&c>=a)return{node:u,offset:a-r};r=c}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=X1(u)}}function Z1(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?Z1(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function J1(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=io(r.document);a instanceof r.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)r=a.contentWindow;else break;a=io(r.document)}return a}function ff(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var J6=jr&&"documentMode"in document&&11>=document.documentMode,Za=null,hf=null,fl=null,pf=!1;function eg(r,a,u){var c=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;pf||Za==null||Za!==io(c)||(c=Za,"selectionStart"in c&&ff(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),fl&&dl(fl,c)||(fl=c,c=ec(hf,"onSelect"),0<c.length&&(a=new oo("onSelect","select",null,a,u),r.push({event:a,listeners:c}),a.target=Za)))}function ra(r,a){var u={};return u[r.toLowerCase()]=a.toLowerCase(),u["Webkit"+r]="webkit"+a,u["Moz"+r]="moz"+a,u}var Ja={animationend:ra("Animation","AnimationEnd"),animationiteration:ra("Animation","AnimationIteration"),animationstart:ra("Animation","AnimationStart"),transitionrun:ra("Transition","TransitionRun"),transitionstart:ra("Transition","TransitionStart"),transitioncancel:ra("Transition","TransitionCancel"),transitionend:ra("Transition","TransitionEnd")},mf={},tg={};jr&&(tg=document.createElement("div").style,"AnimationEvent"in window||(delete Ja.animationend.animation,delete Ja.animationiteration.animation,delete Ja.animationstart.animation),"TransitionEvent"in window||delete Ja.transitionend.transition);function ia(r){if(mf[r])return mf[r];if(!Ja[r])return r;var a=Ja[r],u;for(u in a)if(a.hasOwnProperty(u)&&u in tg)return mf[r]=a[u];return r}var ng=ia("animationend"),rg=ia("animationiteration"),ig=ia("animationstart"),eS=ia("transitionrun"),tS=ia("transitionstart"),nS=ia("transitioncancel"),ag=ia("transitionend"),sg=new Map,gf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");gf.push("scrollEnd");function pr(r,a){sg.set(r,a),ta(a,[r])}var ho=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Xn=[],es=0,bf=0;function po(){for(var r=es,a=bf=es=0;a<r;){var u=Xn[a];Xn[a++]=null;var c=Xn[a];Xn[a++]=null;var p=Xn[a];Xn[a++]=null;var g=Xn[a];if(Xn[a++]=null,c!==null&&p!==null){var _=c.pending;_===null?p.next=p:(p.next=_.next,_.next=p),c.pending=p}g!==0&&lg(u,p,g)}}function mo(r,a,u,c){Xn[es++]=r,Xn[es++]=a,Xn[es++]=u,Xn[es++]=c,bf|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function yf(r,a,u,c){return mo(r,a,u,c),go(r)}function aa(r,a){return mo(r,null,null,a),go(r)}function lg(r,a,u){r.lanes|=u;var c=r.alternate;c!==null&&(c.lanes|=u);for(var p=!1,g=r.return;g!==null;)g.childLanes|=u,c=g.alternate,c!==null&&(c.childLanes|=u),g.tag===22&&(r=g.stateNode,r===null||r._visibility&1||(p=!0)),r=g,g=g.return;return r.tag===3?(g=r.stateNode,p&&a!==null&&(p=31-pt(u),r=g.hiddenUpdates,c=r[p],c===null?r[p]=[a]:c.push(a),a.lane=u|536870912),g):null}function go(r){if(50<Il)throw Il=0,kh=null,Error(i(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var ts={};function rS(r,a,u,c){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dn(r,a,u,c){return new rS(r,a,u,c)}function Ef(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Fr(r,a){var u=r.alternate;return u===null?(u=Dn(r.tag,a,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=a,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&65011712,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,a=r.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u.refCleanup=r.refCleanup,u}function ug(r,a){r.flags&=65011714;var u=r.alternate;return u===null?(r.childLanes=0,r.lanes=a,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=u.childLanes,r.lanes=u.lanes,r.child=u.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=u.memoizedProps,r.memoizedState=u.memoizedState,r.updateQueue=u.updateQueue,r.type=u.type,a=u.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function bo(r,a,u,c,p,g){var _=0;if(c=r,typeof r=="function")Ef(r)&&(_=1);else if(typeof r=="string")_=uw(r,u,F.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case fe:return r=Dn(31,u,a,p),r.elementType=fe,r.lanes=g,r;case w:return sa(u.children,p,g,a);case S:_=8,p|=24;break;case k:return r=Dn(12,u,a,p|2),r.elementType=k,r.lanes=g,r;case J:return r=Dn(13,u,a,p),r.elementType=J,r.lanes=g,r;case H:return r=Dn(19,u,a,p),r.elementType=H,r.lanes=g,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case P:_=10;break e;case j:_=9;break e;case V:_=11;break e;case ne:_=14;break e;case te:_=16,c=null;break e}_=29,u=Error(i(130,r===null?"null":typeof r,"")),c=null}return a=Dn(_,u,a,p),a.elementType=r,a.type=c,a.lanes=g,a}function sa(r,a,u,c){return r=Dn(7,r,c,a),r.lanes=u,r}function xf(r,a,u){return r=Dn(6,r,null,a),r.lanes=u,r}function og(r){var a=Dn(18,null,null,0);return a.stateNode=r,a}function vf(r,a,u){return a=Dn(4,r.children!==null?r.children:[],r.key,a),a.lanes=u,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var cg=new WeakMap;function Kn(r,a){if(typeof r=="object"&&r!==null){var u=cg.get(r);return u!==void 0?u:(a={value:r,source:a,stack:ot(a)},cg.set(r,a),a)}return{value:r,source:a,stack:ot(a)}}var ns=[],rs=0,yo=null,hl=0,Zn=[],Jn=0,mi=null,Tr=1,Ar="";function $r(r,a){ns[rs++]=hl,ns[rs++]=yo,yo=r,hl=a}function dg(r,a,u){Zn[Jn++]=Tr,Zn[Jn++]=Ar,Zn[Jn++]=mi,mi=r;var c=Tr;r=Ar;var p=32-pt(c)-1;c&=~(1<<p),u+=1;var g=32-pt(a)+p;if(30<g){var _=p-p%5;g=(c&(1<<_)-1).toString(32),c>>=_,p-=_,Tr=1<<32-pt(a)+p|u<<p|c,Ar=g+r}else Tr=1<<g|u<<p|c,Ar=r}function _f(r){r.return!==null&&($r(r,1),dg(r,1,0))}function Tf(r){for(;r===yo;)yo=ns[--rs],ns[rs]=null,hl=ns[--rs],ns[rs]=null;for(;r===mi;)mi=Zn[--Jn],Zn[Jn]=null,Ar=Zn[--Jn],Zn[Jn]=null,Tr=Zn[--Jn],Zn[Jn]=null}function fg(r,a){Zn[Jn++]=Tr,Zn[Jn++]=Ar,Zn[Jn++]=mi,Tr=a.id,Ar=a.overflow,mi=r}var Kt=null,Et=null,Xe=!1,gi=null,er=!1,Af=Error(i(519));function bi(r){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw pl(Kn(a,r)),Af}function hg(r){var a=r.stateNode,u=r.type,c=r.memoizedProps;switch(a[Xt]=r,a[bn]=c,u){case"dialog":Ve("cancel",a),Ve("close",a);break;case"iframe":case"object":case"embed":Ve("load",a);break;case"video":case"audio":for(u=0;u<Bl.length;u++)Ve(Bl[u],a);break;case"source":Ve("error",a);break;case"img":case"image":case"link":Ve("error",a),Ve("load",a);break;case"details":Ve("toggle",a);break;case"input":Ve("invalid",a),w1(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ve("invalid",a);break;case"textarea":Ve("invalid",a),C1(a,c.value,c.defaultValue,c.children)}u=c.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||a.textContent===""+u||c.suppressHydrationWarning===!0||R2(a.textContent,u)?(c.popover!=null&&(Ve("beforetoggle",a),Ve("toggle",a)),c.onScroll!=null&&Ve("scroll",a),c.onScrollEnd!=null&&Ve("scrollend",a),c.onClick!=null&&(a.onclick=Ur),a=!0):a=!1,a||bi(r,!0)}function pg(r){for(Kt=r.return;Kt;)switch(Kt.tag){case 5:case 31:case 13:er=!1;return;case 27:case 3:er=!0;return;default:Kt=Kt.return}}function is(r){if(r!==Kt)return!1;if(!Xe)return pg(r),Xe=!0,!1;var a=r.tag,u;if((u=a!==3&&a!==27)&&((u=a===5)&&(u=r.type,u=!(u!=="form"&&u!=="button")||Fh(r.type,r.memoizedProps)),u=!u),u&&Et&&bi(r),pg(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));Et=H2(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));Et=H2(r)}else a===27?(a=Et,Oi(r.type)?(r=Gh,Gh=null,Et=r):Et=a):Et=Kt?nr(r.stateNode.nextSibling):null;return!0}function la(){Et=Kt=null,Xe=!1}function Sf(){var r=gi;return r!==null&&(_n===null?_n=r:_n.push.apply(_n,r),gi=null),r}function pl(r){gi===null?gi=[r]:gi.push(r)}var wf=D(null),ua=null,qr=null;function yi(r,a,u){O(wf,a._currentValue),a._currentValue=u}function Yr(r){r._currentValue=wf.current,ee(wf)}function kf(r,a,u){for(;r!==null;){var c=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),r===u)break;r=r.return}}function Cf(r,a,u,c){var p=r.child;for(p!==null&&(p.return=r);p!==null;){var g=p.dependencies;if(g!==null){var _=p.child;g=g.firstContext;e:for(;g!==null;){var A=g;g=p;for(var B=0;B<a.length;B++)if(A.context===a[B]){g.lanes|=u,A=g.alternate,A!==null&&(A.lanes|=u),kf(g.return,u,r),c||(_=null);break e}g=A.next}}else if(p.tag===18){if(_=p.return,_===null)throw Error(i(341));_.lanes|=u,g=_.alternate,g!==null&&(g.lanes|=u),kf(_,u,r),_=null}else _=p.child;if(_!==null)_.return=p;else for(_=p;_!==null;){if(_===r){_=null;break}if(p=_.sibling,p!==null){p.return=_.return,_=p;break}_=_.return}p=_}}function as(r,a,u,c){r=null;for(var p=a,g=!1;p!==null;){if(!g){if((p.flags&524288)!==0)g=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var _=p.alternate;if(_===null)throw Error(i(387));if(_=_.memoizedProps,_!==null){var A=p.type;In(p.pendingProps.value,_.value)||(r!==null?r.push(A):r=[A])}}else if(p===Re.current){if(_=p.alternate,_===null)throw Error(i(387));_.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(r!==null?r.push(jl):r=[jl])}p=p.return}r!==null&&Cf(a,r,u,c),a.flags|=262144}function Eo(r){for(r=r.firstContext;r!==null;){if(!In(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function oa(r){ua=r,qr=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Zt(r){return mg(ua,r)}function xo(r,a){return ua===null&&oa(r),mg(r,a)}function mg(r,a){var u=a._currentValue;if(a={context:a,memoizedValue:u,next:null},qr===null){if(r===null)throw Error(i(308));qr=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else qr=qr.next=a;return u}var iS=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(u,c){r.push(c)}};this.abort=function(){a.aborted=!0,r.forEach(function(u){return u()})}},aS=e.unstable_scheduleCallback,sS=e.unstable_NormalPriority,Ot={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nf(){return{controller:new iS,data:new Map,refCount:0}}function ml(r){r.refCount--,r.refCount===0&&aS(sS,function(){r.controller.abort()})}var gl=null,Rf=0,ss=0,ls=null;function lS(r,a){if(gl===null){var u=gl=[];Rf=0,ss=Mh(),ls={status:"pending",value:void 0,then:function(c){u.push(c)}}}return Rf++,a.then(gg,gg),a}function gg(){if(--Rf===0&&gl!==null){ls!==null&&(ls.status="fulfilled");var r=gl;gl=null,ss=0,ls=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function uS(r,a){var u=[],c={status:"pending",value:null,reason:null,then:function(p){u.push(p)}};return r.then(function(){c.status="fulfilled",c.value=a;for(var p=0;p<u.length;p++)(0,u[p])(a)},function(p){for(c.status="rejected",c.reason=p,p=0;p<u.length;p++)(0,u[p])(void 0)}),c}var bg=I.S;I.S=function(r,a){e2=cn(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&lS(r,a),bg!==null&&bg(r,a)};var ca=D(null);function Of(){var r=ca.current;return r!==null?r:mt.pooledCache}function vo(r,a){a===null?O(ca,ca.current):O(ca,a.pool)}function yg(){var r=Of();return r===null?null:{parent:Ot._currentValue,pool:r}}var us=Error(i(460)),Lf=Error(i(474)),_o=Error(i(542)),To={then:function(){}};function Eg(r){return r=r.status,r==="fulfilled"||r==="rejected"}function xg(r,a,u){switch(u=r[u],u===void 0?r.push(a):u!==a&&(a.then(Ur,Ur),a=u),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,_g(r),r;default:if(typeof a.status=="string")a.then(Ur,Ur);else{if(r=mt,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=a,r.status="pending",r.then(function(c){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=c}},function(c){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,_g(r),r}throw fa=a,us}}function da(r){try{var a=r._init;return a(r._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(fa=u,us):u}}var fa=null;function vg(){if(fa===null)throw Error(i(459));var r=fa;return fa=null,r}function _g(r){if(r===us||r===_o)throw Error(i(483))}var os=null,bl=0;function Ao(r){var a=bl;return bl+=1,os===null&&(os=[]),xg(os,r,a)}function yl(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function So(r,a){throw a.$$typeof===x?Error(i(525)):(r=Object.prototype.toString.call(a),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function Tg(r){function a(q,U){if(r){var W=q.deletions;W===null?(q.deletions=[U],q.flags|=16):W.push(U)}}function u(q,U){if(!r)return null;for(;U!==null;)a(q,U),U=U.sibling;return null}function c(q){for(var U=new Map;q!==null;)q.key!==null?U.set(q.key,q):U.set(q.index,q),q=q.sibling;return U}function p(q,U){return q=Fr(q,U),q.index=0,q.sibling=null,q}function g(q,U,W){return q.index=W,r?(W=q.alternate,W!==null?(W=W.index,W<U?(q.flags|=67108866,U):W):(q.flags|=67108866,U)):(q.flags|=1048576,U)}function _(q){return r&&q.alternate===null&&(q.flags|=67108866),q}function A(q,U,W,le){return U===null||U.tag!==6?(U=xf(W,q.mode,le),U.return=q,U):(U=p(U,W),U.return=q,U)}function B(q,U,W,le){var Ce=W.type;return Ce===w?ae(q,U,W.props.children,le,W.key):U!==null&&(U.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===te&&da(Ce)===U.type)?(U=p(U,W.props),yl(U,W),U.return=q,U):(U=bo(W.type,W.key,W.props,null,q.mode,le),yl(U,W),U.return=q,U)}function Q(q,U,W,le){return U===null||U.tag!==4||U.stateNode.containerInfo!==W.containerInfo||U.stateNode.implementation!==W.implementation?(U=vf(W,q.mode,le),U.return=q,U):(U=p(U,W.children||[]),U.return=q,U)}function ae(q,U,W,le,Ce){return U===null||U.tag!==7?(U=sa(W,q.mode,le,Ce),U.return=q,U):(U=p(U,W),U.return=q,U)}function oe(q,U,W){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=xf(""+U,q.mode,W),U.return=q,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case E:return W=bo(U.type,U.key,U.props,null,q.mode,W),yl(W,U),W.return=q,W;case T:return U=vf(U,q.mode,W),U.return=q,U;case te:return U=da(U),oe(q,U,W)}if(ue(U)||Y(U))return U=sa(U,q.mode,W,null),U.return=q,U;if(typeof U.then=="function")return oe(q,Ao(U),W);if(U.$$typeof===P)return oe(q,xo(q,U),W);So(q,U)}return null}function X(q,U,W,le){var Ce=U!==null?U.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Ce!==null?null:A(q,U,""+W,le);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case E:return W.key===Ce?B(q,U,W,le):null;case T:return W.key===Ce?Q(q,U,W,le):null;case te:return W=da(W),X(q,U,W,le)}if(ue(W)||Y(W))return Ce!==null?null:ae(q,U,W,le,null);if(typeof W.then=="function")return X(q,U,Ao(W),le);if(W.$$typeof===P)return X(q,U,xo(q,W),le);So(q,W)}return null}function Z(q,U,W,le,Ce){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return q=q.get(W)||null,A(U,q,""+le,Ce);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case E:return q=q.get(le.key===null?W:le.key)||null,B(U,q,le,Ce);case T:return q=q.get(le.key===null?W:le.key)||null,Q(U,q,le,Ce);case te:return le=da(le),Z(q,U,W,le,Ce)}if(ue(le)||Y(le))return q=q.get(W)||null,ae(U,q,le,Ce,null);if(typeof le.then=="function")return Z(q,U,W,Ao(le),Ce);if(le.$$typeof===P)return Z(q,U,W,xo(U,le),Ce);So(U,le)}return null}function Te(q,U,W,le){for(var Ce=null,et=null,we=U,Pe=U=0,Qe=null;we!==null&&Pe<W.length;Pe++){we.index>Pe?(Qe=we,we=null):Qe=we.sibling;var tt=X(q,we,W[Pe],le);if(tt===null){we===null&&(we=Qe);break}r&&we&&tt.alternate===null&&a(q,we),U=g(tt,U,Pe),et===null?Ce=tt:et.sibling=tt,et=tt,we=Qe}if(Pe===W.length)return u(q,we),Xe&&$r(q,Pe),Ce;if(we===null){for(;Pe<W.length;Pe++)we=oe(q,W[Pe],le),we!==null&&(U=g(we,U,Pe),et===null?Ce=we:et.sibling=we,et=we);return Xe&&$r(q,Pe),Ce}for(we=c(we);Pe<W.length;Pe++)Qe=Z(we,q,Pe,W[Pe],le),Qe!==null&&(r&&Qe.alternate!==null&&we.delete(Qe.key===null?Pe:Qe.key),U=g(Qe,U,Pe),et===null?Ce=Qe:et.sibling=Qe,et=Qe);return r&&we.forEach(function(Bi){return a(q,Bi)}),Xe&&$r(q,Pe),Ce}function Oe(q,U,W,le){if(W==null)throw Error(i(151));for(var Ce=null,et=null,we=U,Pe=U=0,Qe=null,tt=W.next();we!==null&&!tt.done;Pe++,tt=W.next()){we.index>Pe?(Qe=we,we=null):Qe=we.sibling;var Bi=X(q,we,tt.value,le);if(Bi===null){we===null&&(we=Qe);break}r&&we&&Bi.alternate===null&&a(q,we),U=g(Bi,U,Pe),et===null?Ce=Bi:et.sibling=Bi,et=Bi,we=Qe}if(tt.done)return u(q,we),Xe&&$r(q,Pe),Ce;if(we===null){for(;!tt.done;Pe++,tt=W.next())tt=oe(q,tt.value,le),tt!==null&&(U=g(tt,U,Pe),et===null?Ce=tt:et.sibling=tt,et=tt);return Xe&&$r(q,Pe),Ce}for(we=c(we);!tt.done;Pe++,tt=W.next())tt=Z(we,q,Pe,tt.value,le),tt!==null&&(r&&tt.alternate!==null&&we.delete(tt.key===null?Pe:tt.key),U=g(tt,U,Pe),et===null?Ce=tt:et.sibling=tt,et=tt);return r&&we.forEach(function(Ew){return a(q,Ew)}),Xe&&$r(q,Pe),Ce}function ft(q,U,W,le){if(typeof W=="object"&&W!==null&&W.type===w&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case E:e:{for(var Ce=W.key;U!==null;){if(U.key===Ce){if(Ce=W.type,Ce===w){if(U.tag===7){u(q,U.sibling),le=p(U,W.props.children),le.return=q,q=le;break e}}else if(U.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===te&&da(Ce)===U.type){u(q,U.sibling),le=p(U,W.props),yl(le,W),le.return=q,q=le;break e}u(q,U);break}else a(q,U);U=U.sibling}W.type===w?(le=sa(W.props.children,q.mode,le,W.key),le.return=q,q=le):(le=bo(W.type,W.key,W.props,null,q.mode,le),yl(le,W),le.return=q,q=le)}return _(q);case T:e:{for(Ce=W.key;U!==null;){if(U.key===Ce)if(U.tag===4&&U.stateNode.containerInfo===W.containerInfo&&U.stateNode.implementation===W.implementation){u(q,U.sibling),le=p(U,W.children||[]),le.return=q,q=le;break e}else{u(q,U);break}else a(q,U);U=U.sibling}le=vf(W,q.mode,le),le.return=q,q=le}return _(q);case te:return W=da(W),ft(q,U,W,le)}if(ue(W))return Te(q,U,W,le);if(Y(W)){if(Ce=Y(W),typeof Ce!="function")throw Error(i(150));return W=Ce.call(W),Oe(q,U,W,le)}if(typeof W.then=="function")return ft(q,U,Ao(W),le);if(W.$$typeof===P)return ft(q,U,xo(q,W),le);So(q,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,U!==null&&U.tag===6?(u(q,U.sibling),le=p(U,W),le.return=q,q=le):(u(q,U),le=xf(W,q.mode,le),le.return=q,q=le),_(q)):u(q,U)}return function(q,U,W,le){try{bl=0;var Ce=ft(q,U,W,le);return os=null,Ce}catch(we){if(we===us||we===_o)throw we;var et=Dn(29,we,null,q.mode);return et.lanes=le,et.return=q,et}}}var ha=Tg(!0),Ag=Tg(!1),Ei=!1;function Mf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function If(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function xi(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function vi(r,a,u){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(rt&2)!==0){var p=c.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),c.pending=a,a=go(r),lg(r,null,u),a}return mo(r,c,a,u),go(r)}function El(r,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194048)!==0)){var c=a.lanes;c&=r.pendingLanes,u|=c,a.lanes=u,m1(r,u)}}function Df(r,a){var u=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,u===c)){var p=null,g=null;if(u=u.firstBaseUpdate,u!==null){do{var _={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};g===null?p=g=_:g=g.next=_,u=u.next}while(u!==null);g===null?p=g=a:g=g.next=a}else p=g=a;u={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=a:r.next=a,u.lastBaseUpdate=a}var Bf=!1;function xl(){if(Bf){var r=ls;if(r!==null)throw r}}function vl(r,a,u,c){Bf=!1;var p=r.updateQueue;Ei=!1;var g=p.firstBaseUpdate,_=p.lastBaseUpdate,A=p.shared.pending;if(A!==null){p.shared.pending=null;var B=A,Q=B.next;B.next=null,_===null?g=Q:_.next=Q,_=B;var ae=r.alternate;ae!==null&&(ae=ae.updateQueue,A=ae.lastBaseUpdate,A!==_&&(A===null?ae.firstBaseUpdate=Q:A.next=Q,ae.lastBaseUpdate=B))}if(g!==null){var oe=p.baseState;_=0,ae=Q=B=null,A=g;do{var X=A.lane&-536870913,Z=X!==A.lane;if(Z?(We&X)===X:(c&X)===X){X!==0&&X===ss&&(Bf=!0),ae!==null&&(ae=ae.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var Te=r,Oe=A;X=a;var ft=u;switch(Oe.tag){case 1:if(Te=Oe.payload,typeof Te=="function"){oe=Te.call(ft,oe,X);break e}oe=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=Oe.payload,X=typeof Te=="function"?Te.call(ft,oe,X):Te,X==null)break e;oe=b({},oe,X);break e;case 2:Ei=!0}}X=A.callback,X!==null&&(r.flags|=64,Z&&(r.flags|=8192),Z=p.callbacks,Z===null?p.callbacks=[X]:Z.push(X))}else Z={lane:X,tag:A.tag,payload:A.payload,callback:A.callback,next:null},ae===null?(Q=ae=Z,B=oe):ae=ae.next=Z,_|=X;if(A=A.next,A===null){if(A=p.shared.pending,A===null)break;Z=A,A=Z.next,Z.next=null,p.lastBaseUpdate=Z,p.shared.pending=null}}while(!0);ae===null&&(B=oe),p.baseState=B,p.firstBaseUpdate=Q,p.lastBaseUpdate=ae,g===null&&(p.shared.lanes=0),wi|=_,r.lanes=_,r.memoizedState=oe}}function Sg(r,a){if(typeof r!="function")throw Error(i(191,r));r.call(a)}function wg(r,a){var u=r.callbacks;if(u!==null)for(r.callbacks=null,r=0;r<u.length;r++)Sg(u[r],a)}var cs=D(null),wo=D(0);function kg(r,a){r=ei,O(wo,r),O(cs,a),ei=r|a.baseLanes}function zf(){O(wo,ei),O(cs,cs.current)}function Pf(){ei=wo.current,ee(cs),ee(wo)}var Bn=D(null),tr=null;function _i(r){var a=r.alternate;O(Ct,Ct.current&1),O(Bn,r),tr===null&&(a===null||cs.current!==null||a.memoizedState!==null)&&(tr=r)}function Hf(r){O(Ct,Ct.current),O(Bn,r),tr===null&&(tr=r)}function Cg(r){r.tag===22?(O(Ct,Ct.current),O(Bn,r),tr===null&&(tr=r)):Ti()}function Ti(){O(Ct,Ct.current),O(Bn,Bn.current)}function zn(r){ee(Bn),tr===r&&(tr=null),ee(Ct)}var Ct=D(0);function ko(r){for(var a=r;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Yh(u)||Vh(u)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Vr=0,ze=null,ct=null,Lt=null,Co=!1,ds=!1,pa=!1,No=0,_l=0,fs=null,oS=0;function At(){throw Error(i(321))}function Uf(r,a){if(a===null)return!1;for(var u=0;u<a.length&&u<r.length;u++)if(!In(r[u],a[u]))return!1;return!0}function jf(r,a,u,c,p,g){return Vr=g,ze=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,I.H=r===null||r.memoizedState===null?db:nh,pa=!1,g=u(c,p),pa=!1,ds&&(g=Rg(a,u,c,p)),Ng(r),g}function Ng(r){I.H=Sl;var a=ct!==null&&ct.next!==null;if(Vr=0,Lt=ct=ze=null,Co=!1,_l=0,fs=null,a)throw Error(i(300));r===null||Mt||(r=r.dependencies,r!==null&&Eo(r)&&(Mt=!0))}function Rg(r,a,u,c){ze=r;var p=0;do{if(ds&&(fs=null),_l=0,ds=!1,25<=p)throw Error(i(301));if(p+=1,Lt=ct=null,r.updateQueue!=null){var g=r.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}I.H=fb,g=a(u,c)}while(ds);return g}function cS(){var r=I.H,a=r.useState()[0];return a=typeof a.then=="function"?Tl(a):a,r=r.useState()[0],(ct!==null?ct.memoizedState:null)!==r&&(ze.flags|=1024),a}function Ff(){var r=No!==0;return No=0,r}function $f(r,a,u){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~u}function qf(r){if(Co){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}Co=!1}Vr=0,Lt=ct=ze=null,ds=!1,_l=No=0,fs=null}function fn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?ze.memoizedState=Lt=r:Lt=Lt.next=r,Lt}function Nt(){if(ct===null){var r=ze.alternate;r=r!==null?r.memoizedState:null}else r=ct.next;var a=Lt===null?ze.memoizedState:Lt.next;if(a!==null)Lt=a,ct=r;else{if(r===null)throw ze.alternate===null?Error(i(467)):Error(i(310));ct=r,r={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},Lt===null?ze.memoizedState=Lt=r:Lt=Lt.next=r}return Lt}function Ro(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Tl(r){var a=_l;return _l+=1,fs===null&&(fs=[]),r=xg(fs,r,a),a=ze,(Lt===null?a.memoizedState:Lt.next)===null&&(a=a.alternate,I.H=a===null||a.memoizedState===null?db:nh),r}function Oo(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Tl(r);if(r.$$typeof===P)return Zt(r)}throw Error(i(438,String(r)))}function Yf(r){var a=null,u=ze.updateQueue;if(u!==null&&(a=u.memoCache),a==null){var c=ze.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),u===null&&(u=Ro(),ze.updateQueue=u),u.memoCache=a,u=a.data[a.index],u===void 0)for(u=a.data[a.index]=Array(r),c=0;c<r;c++)u[c]=z;return a.index++,u}function Gr(r,a){return typeof a=="function"?a(r):a}function Lo(r){var a=Nt();return Vf(a,ct,r)}function Vf(r,a,u){var c=r.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=u;var p=r.baseQueue,g=c.pending;if(g!==null){if(p!==null){var _=p.next;p.next=g.next,g.next=_}a.baseQueue=p=g,c.pending=null}if(g=r.baseState,p===null)r.memoizedState=g;else{a=p.next;var A=_=null,B=null,Q=a,ae=!1;do{var oe=Q.lane&-536870913;if(oe!==Q.lane?(We&oe)===oe:(Vr&oe)===oe){var X=Q.revertLane;if(X===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),oe===ss&&(ae=!0);else if((Vr&X)===X){Q=Q.next,X===ss&&(ae=!0);continue}else oe={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},B===null?(A=B=oe,_=g):B=B.next=oe,ze.lanes|=X,wi|=X;oe=Q.action,pa&&u(g,oe),g=Q.hasEagerState?Q.eagerState:u(g,oe)}else X={lane:oe,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},B===null?(A=B=X,_=g):B=B.next=X,ze.lanes|=oe,wi|=oe;Q=Q.next}while(Q!==null&&Q!==a);if(B===null?_=g:B.next=A,!In(g,r.memoizedState)&&(Mt=!0,ae&&(u=ls,u!==null)))throw u;r.memoizedState=g,r.baseState=_,r.baseQueue=B,c.lastRenderedState=g}return p===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function Gf(r){var a=Nt(),u=a.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=r;var c=u.dispatch,p=u.pending,g=a.memoizedState;if(p!==null){u.pending=null;var _=p=p.next;do g=r(g,_.action),_=_.next;while(_!==p);In(g,a.memoizedState)||(Mt=!0),a.memoizedState=g,a.baseQueue===null&&(a.baseState=g),u.lastRenderedState=g}return[g,c]}function Og(r,a,u){var c=ze,p=Nt(),g=Xe;if(g){if(u===void 0)throw Error(i(407));u=u()}else u=a();var _=!In((ct||p).memoizedState,u);if(_&&(p.memoizedState=u,Mt=!0),p=p.queue,Xf(Ig.bind(null,c,p,r),[r]),p.getSnapshot!==a||_||Lt!==null&&Lt.memoizedState.tag&1){if(c.flags|=2048,hs(9,{destroy:void 0},Mg.bind(null,c,p,u,a),null),mt===null)throw Error(i(349));g||(Vr&127)!==0||Lg(c,a,u)}return u}function Lg(r,a,u){r.flags|=16384,r={getSnapshot:a,value:u},a=ze.updateQueue,a===null?(a=Ro(),ze.updateQueue=a,a.stores=[r]):(u=a.stores,u===null?a.stores=[r]:u.push(r))}function Mg(r,a,u,c){a.value=u,a.getSnapshot=c,Dg(a)&&Bg(r)}function Ig(r,a,u){return u(function(){Dg(a)&&Bg(r)})}function Dg(r){var a=r.getSnapshot;r=r.value;try{var u=a();return!In(r,u)}catch{return!0}}function Bg(r){var a=aa(r,2);a!==null&&Tn(a,r,2)}function Wf(r){var a=fn();if(typeof r=="function"){var u=r;if(r=u(),pa){gn(!0);try{u()}finally{gn(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gr,lastRenderedState:r},a}function zg(r,a,u,c){return r.baseState=u,Vf(r,ct,typeof c=="function"?c:Gr)}function dS(r,a,u,c,p){if(Do(r))throw Error(i(485));if(r=a.action,r!==null){var g={payload:p,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){g.listeners.push(_)}};I.T!==null?u(!0):g.isTransition=!1,c(g),u=a.pending,u===null?(g.next=a.pending=g,Pg(a,g)):(g.next=u.next,a.pending=u.next=g)}}function Pg(r,a){var u=a.action,c=a.payload,p=r.state;if(a.isTransition){var g=I.T,_={};I.T=_;try{var A=u(p,c),B=I.S;B!==null&&B(_,A),Hg(r,a,A)}catch(Q){Qf(r,a,Q)}finally{g!==null&&_.types!==null&&(g.types=_.types),I.T=g}}else try{g=u(p,c),Hg(r,a,g)}catch(Q){Qf(r,a,Q)}}function Hg(r,a,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(c){Ug(r,a,c)},function(c){return Qf(r,a,c)}):Ug(r,a,u)}function Ug(r,a,u){a.status="fulfilled",a.value=u,jg(a),r.state=u,a=r.pending,a!==null&&(u=a.next,u===a?r.pending=null:(u=u.next,a.next=u,Pg(r,u)))}function Qf(r,a,u){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=u,jg(a),a=a.next;while(a!==c)}r.action=null}function jg(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function Fg(r,a){return a}function $g(r,a){if(Xe){var u=mt.formState;if(u!==null){e:{var c=ze;if(Xe){if(Et){t:{for(var p=Et,g=er;p.nodeType!==8;){if(!g){p=null;break t}if(p=nr(p.nextSibling),p===null){p=null;break t}}g=p.data,p=g==="F!"||g==="F"?p:null}if(p){Et=nr(p.nextSibling),c=p.data==="F!";break e}}bi(c)}c=!1}c&&(a=u[0])}}return u=fn(),u.memoizedState=u.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fg,lastRenderedState:a},u.queue=c,u=ub.bind(null,ze,c),c.dispatch=u,c=Wf(!1),g=th.bind(null,ze,!1,c.queue),c=fn(),p={state:a,dispatch:null,action:r,pending:null},c.queue=p,u=dS.bind(null,ze,p,g,u),p.dispatch=u,c.memoizedState=r,[a,u,!1]}function qg(r){var a=Nt();return Yg(a,ct,r)}function Yg(r,a,u){if(a=Vf(r,a,Fg)[0],r=Lo(Gr)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=Tl(a)}catch(_){throw _===us?_o:_}else c=a;a=Nt();var p=a.queue,g=p.dispatch;return u!==a.memoizedState&&(ze.flags|=2048,hs(9,{destroy:void 0},fS.bind(null,p,u),null)),[c,g,r]}function fS(r,a){r.action=a}function Vg(r){var a=Nt(),u=ct;if(u!==null)return Yg(a,u,r);Nt(),a=a.memoizedState,u=Nt();var c=u.queue.dispatch;return u.memoizedState=r,[a,c,!1]}function hs(r,a,u,c){return r={tag:r,create:u,deps:c,inst:a,next:null},a=ze.updateQueue,a===null&&(a=Ro(),ze.updateQueue=a),u=a.lastEffect,u===null?a.lastEffect=r.next=r:(c=u.next,u.next=r,r.next=c,a.lastEffect=r),r}function Gg(){return Nt().memoizedState}function Mo(r,a,u,c){var p=fn();ze.flags|=r,p.memoizedState=hs(1|a,{destroy:void 0},u,c===void 0?null:c)}function Io(r,a,u,c){var p=Nt();c=c===void 0?null:c;var g=p.memoizedState.inst;ct!==null&&c!==null&&Uf(c,ct.memoizedState.deps)?p.memoizedState=hs(a,g,u,c):(ze.flags|=r,p.memoizedState=hs(1|a,g,u,c))}function Wg(r,a){Mo(8390656,8,r,a)}function Xf(r,a){Io(2048,8,r,a)}function hS(r){ze.flags|=4;var a=ze.updateQueue;if(a===null)a=Ro(),ze.updateQueue=a,a.events=[r];else{var u=a.events;u===null?a.events=[r]:u.push(r)}}function Qg(r){var a=Nt().memoizedState;return hS({ref:a,nextImpl:r}),function(){if((rt&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function Xg(r,a){return Io(4,2,r,a)}function Kg(r,a){return Io(4,4,r,a)}function Zg(r,a){if(typeof a=="function"){r=r();var u=a(r);return function(){typeof u=="function"?u():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function Jg(r,a,u){u=u!=null?u.concat([r]):null,Io(4,4,Zg.bind(null,a,r),u)}function Kf(){}function eb(r,a){var u=Nt();a=a===void 0?null:a;var c=u.memoizedState;return a!==null&&Uf(a,c[1])?c[0]:(u.memoizedState=[r,a],r)}function tb(r,a){var u=Nt();a=a===void 0?null:a;var c=u.memoizedState;if(a!==null&&Uf(a,c[1]))return c[0];if(c=r(),pa){gn(!0);try{r()}finally{gn(!1)}}return u.memoizedState=[c,a],c}function Zf(r,a,u){return u===void 0||(Vr&1073741824)!==0&&(We&261930)===0?r.memoizedState=a:(r.memoizedState=u,r=n2(),ze.lanes|=r,wi|=r,u)}function nb(r,a,u,c){return In(u,a)?u:cs.current!==null?(r=Zf(r,u,c),In(r,a)||(Mt=!0),r):(Vr&42)===0||(Vr&1073741824)!==0&&(We&261930)===0?(Mt=!0,r.memoizedState=u):(r=n2(),ze.lanes|=r,wi|=r,a)}function rb(r,a,u,c,p){var g=ie.p;ie.p=g!==0&&8>g?g:8;var _=I.T,A={};I.T=A,th(r,!1,a,u);try{var B=p(),Q=I.S;if(Q!==null&&Q(A,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var ae=uS(B,c);Al(r,a,ae,Un(r))}else Al(r,a,c,Un(r))}catch(oe){Al(r,a,{then:function(){},status:"rejected",reason:oe},Un())}finally{ie.p=g,_!==null&&A.types!==null&&(_.types=A.types),I.T=_}}function pS(){}function Jf(r,a,u,c){if(r.tag!==5)throw Error(i(476));var p=ib(r).queue;rb(r,p,a,Ee,u===null?pS:function(){return ab(r),u(c)})}function ib(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:Ee,baseState:Ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gr,lastRenderedState:Ee},next:null};var u={};return a.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gr,lastRenderedState:u},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function ab(r){var a=ib(r);a.next===null&&(a=r.alternate.memoizedState),Al(r,a.next.queue,{},Un())}function eh(){return Zt(jl)}function sb(){return Nt().memoizedState}function lb(){return Nt().memoizedState}function mS(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var u=Un();r=xi(u);var c=vi(a,r,u);c!==null&&(Tn(c,a,u),El(c,a,u)),a={cache:Nf()},r.payload=a;return}a=a.return}}function gS(r,a,u){var c=Un();u={lane:c,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Do(r)?ob(a,u):(u=yf(r,a,u,c),u!==null&&(Tn(u,r,c),cb(u,a,c)))}function ub(r,a,u){var c=Un();Al(r,a,u,c)}function Al(r,a,u,c){var p={lane:c,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Do(r))ob(a,p);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=a.lastRenderedReducer,g!==null))try{var _=a.lastRenderedState,A=g(_,u);if(p.hasEagerState=!0,p.eagerState=A,In(A,_))return mo(r,a,p,0),mt===null&&po(),!1}catch{}if(u=yf(r,a,p,c),u!==null)return Tn(u,r,c),cb(u,a,c),!0}return!1}function th(r,a,u,c){if(c={lane:2,revertLane:Mh(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Do(r)){if(a)throw Error(i(479))}else a=yf(r,u,c,2),a!==null&&Tn(a,r,2)}function Do(r){var a=r.alternate;return r===ze||a!==null&&a===ze}function ob(r,a){ds=Co=!0;var u=r.pending;u===null?a.next=a:(a.next=u.next,u.next=a),r.pending=a}function cb(r,a,u){if((u&4194048)!==0){var c=a.lanes;c&=r.pendingLanes,u|=c,a.lanes=u,m1(r,u)}}var Sl={readContext:Zt,use:Oo,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At};Sl.useEffectEvent=At;var db={readContext:Zt,use:Oo,useCallback:function(r,a){return fn().memoizedState=[r,a===void 0?null:a],r},useContext:Zt,useEffect:Wg,useImperativeHandle:function(r,a,u){u=u!=null?u.concat([r]):null,Mo(4194308,4,Zg.bind(null,a,r),u)},useLayoutEffect:function(r,a){return Mo(4194308,4,r,a)},useInsertionEffect:function(r,a){Mo(4,2,r,a)},useMemo:function(r,a){var u=fn();a=a===void 0?null:a;var c=r();if(pa){gn(!0);try{r()}finally{gn(!1)}}return u.memoizedState=[c,a],c},useReducer:function(r,a,u){var c=fn();if(u!==void 0){var p=u(a);if(pa){gn(!0);try{u(a)}finally{gn(!1)}}}else p=a;return c.memoizedState=c.baseState=p,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:p},c.queue=r,r=r.dispatch=gS.bind(null,ze,r),[c.memoizedState,r]},useRef:function(r){var a=fn();return r={current:r},a.memoizedState=r},useState:function(r){r=Wf(r);var a=r.queue,u=ub.bind(null,ze,a);return a.dispatch=u,[r.memoizedState,u]},useDebugValue:Kf,useDeferredValue:function(r,a){var u=fn();return Zf(u,r,a)},useTransition:function(){var r=Wf(!1);return r=rb.bind(null,ze,r.queue,!0,!1),fn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,u){var c=ze,p=fn();if(Xe){if(u===void 0)throw Error(i(407));u=u()}else{if(u=a(),mt===null)throw Error(i(349));(We&127)!==0||Lg(c,a,u)}p.memoizedState=u;var g={value:u,getSnapshot:a};return p.queue=g,Wg(Ig.bind(null,c,g,r),[r]),c.flags|=2048,hs(9,{destroy:void 0},Mg.bind(null,c,g,u,a),null),u},useId:function(){var r=fn(),a=mt.identifierPrefix;if(Xe){var u=Ar,c=Tr;u=(c&~(1<<32-pt(c)-1)).toString(32)+u,a="_"+a+"R_"+u,u=No++,0<u&&(a+="H"+u.toString(32)),a+="_"}else u=oS++,a="_"+a+"r_"+u.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:eh,useFormState:$g,useActionState:$g,useOptimistic:function(r){var a=fn();a.memoizedState=a.baseState=r;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=u,a=th.bind(null,ze,!0,u),u.dispatch=a,[r,a]},useMemoCache:Yf,useCacheRefresh:function(){return fn().memoizedState=mS.bind(null,ze)},useEffectEvent:function(r){var a=fn(),u={impl:r};return a.memoizedState=u,function(){if((rt&2)!==0)throw Error(i(440));return u.impl.apply(void 0,arguments)}}},nh={readContext:Zt,use:Oo,useCallback:eb,useContext:Zt,useEffect:Xf,useImperativeHandle:Jg,useInsertionEffect:Xg,useLayoutEffect:Kg,useMemo:tb,useReducer:Lo,useRef:Gg,useState:function(){return Lo(Gr)},useDebugValue:Kf,useDeferredValue:function(r,a){var u=Nt();return nb(u,ct.memoizedState,r,a)},useTransition:function(){var r=Lo(Gr)[0],a=Nt().memoizedState;return[typeof r=="boolean"?r:Tl(r),a]},useSyncExternalStore:Og,useId:sb,useHostTransitionStatus:eh,useFormState:qg,useActionState:qg,useOptimistic:function(r,a){var u=Nt();return zg(u,ct,r,a)},useMemoCache:Yf,useCacheRefresh:lb};nh.useEffectEvent=Qg;var fb={readContext:Zt,use:Oo,useCallback:eb,useContext:Zt,useEffect:Xf,useImperativeHandle:Jg,useInsertionEffect:Xg,useLayoutEffect:Kg,useMemo:tb,useReducer:Gf,useRef:Gg,useState:function(){return Gf(Gr)},useDebugValue:Kf,useDeferredValue:function(r,a){var u=Nt();return ct===null?Zf(u,r,a):nb(u,ct.memoizedState,r,a)},useTransition:function(){var r=Gf(Gr)[0],a=Nt().memoizedState;return[typeof r=="boolean"?r:Tl(r),a]},useSyncExternalStore:Og,useId:sb,useHostTransitionStatus:eh,useFormState:Vg,useActionState:Vg,useOptimistic:function(r,a){var u=Nt();return ct!==null?zg(u,ct,r,a):(u.baseState=r,[r,u.queue.dispatch])},useMemoCache:Yf,useCacheRefresh:lb};fb.useEffectEvent=Qg;function rh(r,a,u,c){a=r.memoizedState,u=u(c,a),u=u==null?a:b({},a,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var ih={enqueueSetState:function(r,a,u){r=r._reactInternals;var c=Un(),p=xi(c);p.payload=a,u!=null&&(p.callback=u),a=vi(r,p,c),a!==null&&(Tn(a,r,c),El(a,r,c))},enqueueReplaceState:function(r,a,u){r=r._reactInternals;var c=Un(),p=xi(c);p.tag=1,p.payload=a,u!=null&&(p.callback=u),a=vi(r,p,c),a!==null&&(Tn(a,r,c),El(a,r,c))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var u=Un(),c=xi(u);c.tag=2,a!=null&&(c.callback=a),a=vi(r,c,u),a!==null&&(Tn(a,r,u),El(a,r,u))}};function hb(r,a,u,c,p,g,_){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,g,_):a.prototype&&a.prototype.isPureReactComponent?!dl(u,c)||!dl(p,g):!0}function pb(r,a,u,c){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,c),a.state!==r&&ih.enqueueReplaceState(a,a.state,null)}function ma(r,a){var u=a;if("ref"in a){u={};for(var c in a)c!=="ref"&&(u[c]=a[c])}if(r=r.defaultProps){u===a&&(u=b({},u));for(var p in r)u[p]===void 0&&(u[p]=r[p])}return u}function mb(r){ho(r)}function gb(r){console.error(r)}function bb(r){ho(r)}function Bo(r,a){try{var u=r.onUncaughtError;u(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function yb(r,a,u){try{var c=r.onCaughtError;c(u.value,{componentStack:u.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function ah(r,a,u){return u=xi(u),u.tag=3,u.payload={element:null},u.callback=function(){Bo(r,a)},u}function Eb(r){return r=xi(r),r.tag=3,r}function xb(r,a,u,c){var p=u.type.getDerivedStateFromError;if(typeof p=="function"){var g=c.value;r.payload=function(){return p(g)},r.callback=function(){yb(a,u,c)}}var _=u.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(r.callback=function(){yb(a,u,c),typeof p!="function"&&(ki===null?ki=new Set([this]):ki.add(this));var A=c.stack;this.componentDidCatch(c.value,{componentStack:A!==null?A:""})})}function bS(r,a,u,c,p){if(u.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=u.alternate,a!==null&&as(a,u,p,!0),u=Bn.current,u!==null){switch(u.tag){case 31:case 13:return tr===null?Wo():u.alternate===null&&St===0&&(St=3),u.flags&=-257,u.flags|=65536,u.lanes=p,c===To?u.flags|=16384:(a=u.updateQueue,a===null?u.updateQueue=new Set([c]):a.add(c),Rh(r,c,p)),!1;case 22:return u.flags|=65536,c===To?u.flags|=16384:(a=u.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},u.updateQueue=a):(u=a.retryQueue,u===null?a.retryQueue=new Set([c]):u.add(c)),Rh(r,c,p)),!1}throw Error(i(435,u.tag))}return Rh(r,c,p),Wo(),!1}if(Xe)return a=Bn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,c!==Af&&(r=Error(i(422),{cause:c}),pl(Kn(r,u)))):(c!==Af&&(a=Error(i(423),{cause:c}),pl(Kn(a,u))),r=r.current.alternate,r.flags|=65536,p&=-p,r.lanes|=p,c=Kn(c,u),p=ah(r.stateNode,c,p),Df(r,p),St!==4&&(St=2)),!1;var g=Error(i(520),{cause:c});if(g=Kn(g,u),Ml===null?Ml=[g]:Ml.push(g),St!==4&&(St=2),a===null)return!0;c=Kn(c,u),u=a;do{switch(u.tag){case 3:return u.flags|=65536,r=p&-p,u.lanes|=r,r=ah(u.stateNode,c,r),Df(u,r),!1;case 1:if(a=u.type,g=u.stateNode,(u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(ki===null||!ki.has(g))))return u.flags|=65536,p&=-p,u.lanes|=p,p=Eb(p),xb(p,r,u,c),Df(u,p),!1}u=u.return}while(u!==null);return!1}var sh=Error(i(461)),Mt=!1;function Jt(r,a,u,c){a.child=r===null?Ag(a,null,u,c):ha(a,r.child,u,c)}function vb(r,a,u,c,p){u=u.render;var g=a.ref;if("ref"in c){var _={};for(var A in c)A!=="ref"&&(_[A]=c[A])}else _=c;return oa(a),c=jf(r,a,u,_,g,p),A=Ff(),r!==null&&!Mt?($f(r,a,p),Wr(r,a,p)):(Xe&&A&&_f(a),a.flags|=1,Jt(r,a,c,p),a.child)}function _b(r,a,u,c,p){if(r===null){var g=u.type;return typeof g=="function"&&!Ef(g)&&g.defaultProps===void 0&&u.compare===null?(a.tag=15,a.type=g,Tb(r,a,g,c,p)):(r=bo(u.type,null,c,a,a.mode,p),r.ref=a.ref,r.return=a,a.child=r)}if(g=r.child,!ph(r,p)){var _=g.memoizedProps;if(u=u.compare,u=u!==null?u:dl,u(_,c)&&r.ref===a.ref)return Wr(r,a,p)}return a.flags|=1,r=Fr(g,c),r.ref=a.ref,r.return=a,a.child=r}function Tb(r,a,u,c,p){if(r!==null){var g=r.memoizedProps;if(dl(g,c)&&r.ref===a.ref)if(Mt=!1,a.pendingProps=c=g,ph(r,p))(r.flags&131072)!==0&&(Mt=!0);else return a.lanes=r.lanes,Wr(r,a,p)}return lh(r,a,u,c,p)}function Ab(r,a,u,c){var p=c.children,g=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(g=g!==null?g.baseLanes|u:u,r!==null){for(c=a.child=r.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~g}else c=0,a.child=null;return Sb(r,a,g,u,c)}if((u&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&vo(a,g!==null?g.cachePool:null),g!==null?kg(a,g):zf(),Cg(a);else return c=a.lanes=536870912,Sb(r,a,g!==null?g.baseLanes|u:u,u,c)}else g!==null?(vo(a,g.cachePool),kg(a,g),Ti(),a.memoizedState=null):(r!==null&&vo(a,null),zf(),Ti());return Jt(r,a,p,u),a.child}function wl(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Sb(r,a,u,c,p){var g=Of();return g=g===null?null:{parent:Ot._currentValue,pool:g},a.memoizedState={baseLanes:u,cachePool:g},r!==null&&vo(a,null),zf(),Cg(a),r!==null&&as(r,a,c,!0),a.childLanes=p,null}function zo(r,a){return a=Ho({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function wb(r,a,u){return ha(a,r.child,null,u),r=zo(a,a.pendingProps),r.flags|=2,zn(a),a.memoizedState=null,r}function yS(r,a,u){var c=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(Xe){if(c.mode==="hidden")return r=zo(a,c),a.lanes=536870912,wl(null,r);if(Hf(a),(r=Et)?(r=P2(r,er),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:mi!==null?{id:Tr,overflow:Ar}:null,retryLane:536870912,hydrationErrors:null},u=og(r),u.return=a,a.child=u,Kt=a,Et=null)):r=null,r===null)throw bi(a);return a.lanes=536870912,null}return zo(a,c)}var g=r.memoizedState;if(g!==null){var _=g.dehydrated;if(Hf(a),p)if(a.flags&256)a.flags&=-257,a=wb(r,a,u);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(i(558));else if(Mt||as(r,a,u,!1),p=(u&r.childLanes)!==0,Mt||p){if(c=mt,c!==null&&(_=g1(c,u),_!==0&&_!==g.retryLane))throw g.retryLane=_,aa(r,_),Tn(c,r,_),sh;Wo(),a=wb(r,a,u)}else r=g.treeContext,Et=nr(_.nextSibling),Kt=a,Xe=!0,gi=null,er=!1,r!==null&&fg(a,r),a=zo(a,c),a.flags|=4096;return a}return r=Fr(r.child,{mode:c.mode,children:c.children}),r.ref=a.ref,a.child=r,r.return=a,r}function Po(r,a){var u=a.ref;if(u===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(i(284));(r===null||r.ref!==u)&&(a.flags|=4194816)}}function lh(r,a,u,c,p){return oa(a),u=jf(r,a,u,c,void 0,p),c=Ff(),r!==null&&!Mt?($f(r,a,p),Wr(r,a,p)):(Xe&&c&&_f(a),a.flags|=1,Jt(r,a,u,p),a.child)}function kb(r,a,u,c,p,g){return oa(a),a.updateQueue=null,u=Rg(a,c,u,p),Ng(r),c=Ff(),r!==null&&!Mt?($f(r,a,g),Wr(r,a,g)):(Xe&&c&&_f(a),a.flags|=1,Jt(r,a,u,g),a.child)}function Cb(r,a,u,c,p){if(oa(a),a.stateNode===null){var g=ts,_=u.contextType;typeof _=="object"&&_!==null&&(g=Zt(_)),g=new u(c,g),a.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=ih,a.stateNode=g,g._reactInternals=a,g=a.stateNode,g.props=c,g.state=a.memoizedState,g.refs={},Mf(a),_=u.contextType,g.context=typeof _=="object"&&_!==null?Zt(_):ts,g.state=a.memoizedState,_=u.getDerivedStateFromProps,typeof _=="function"&&(rh(a,u,_,c),g.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(_=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),_!==g.state&&ih.enqueueReplaceState(g,g.state,null),vl(a,c,g,p),xl(),g.state=a.memoizedState),typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(r===null){g=a.stateNode;var A=a.memoizedProps,B=ma(u,A);g.props=B;var Q=g.context,ae=u.contextType;_=ts,typeof ae=="object"&&ae!==null&&(_=Zt(ae));var oe=u.getDerivedStateFromProps;ae=typeof oe=="function"||typeof g.getSnapshotBeforeUpdate=="function",A=a.pendingProps!==A,ae||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(A||Q!==_)&&pb(a,g,c,_),Ei=!1;var X=a.memoizedState;g.state=X,vl(a,c,g,p),xl(),Q=a.memoizedState,A||X!==Q||Ei?(typeof oe=="function"&&(rh(a,u,oe,c),Q=a.memoizedState),(B=Ei||hb(a,u,B,c,X,Q,_))?(ae||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(a.flags|=4194308)):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=Q),g.props=c,g.state=Q,g.context=_,c=B):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{g=a.stateNode,If(r,a),_=a.memoizedProps,ae=ma(u,_),g.props=ae,oe=a.pendingProps,X=g.context,Q=u.contextType,B=ts,typeof Q=="object"&&Q!==null&&(B=Zt(Q)),A=u.getDerivedStateFromProps,(Q=typeof A=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_!==oe||X!==B)&&pb(a,g,c,B),Ei=!1,X=a.memoizedState,g.state=X,vl(a,c,g,p),xl();var Z=a.memoizedState;_!==oe||X!==Z||Ei||r!==null&&r.dependencies!==null&&Eo(r.dependencies)?(typeof A=="function"&&(rh(a,u,A,c),Z=a.memoizedState),(ae=Ei||hb(a,u,ae,c,X,Z,B)||r!==null&&r.dependencies!==null&&Eo(r.dependencies))?(Q||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,Z,B),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,Z,B)),typeof g.componentDidUpdate=="function"&&(a.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof g.componentDidUpdate!="function"||_===r.memoizedProps&&X===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||_===r.memoizedProps&&X===r.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=Z),g.props=c,g.state=Z,g.context=B,c=ae):(typeof g.componentDidUpdate!="function"||_===r.memoizedProps&&X===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||_===r.memoizedProps&&X===r.memoizedState||(a.flags|=1024),c=!1)}return g=c,Po(r,a),c=(a.flags&128)!==0,g||c?(g=a.stateNode,u=c&&typeof u.getDerivedStateFromError!="function"?null:g.render(),a.flags|=1,r!==null&&c?(a.child=ha(a,r.child,null,p),a.child=ha(a,null,u,p)):Jt(r,a,u,p),a.memoizedState=g.state,r=a.child):r=Wr(r,a,p),r}function Nb(r,a,u,c){return la(),a.flags|=256,Jt(r,a,u,c),a.child}var uh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function oh(r){return{baseLanes:r,cachePool:yg()}}function ch(r,a,u){return r=r!==null?r.childLanes&~u:0,a&&(r|=Hn),r}function Rb(r,a,u){var c=a.pendingProps,p=!1,g=(a.flags&128)!==0,_;if((_=g)||(_=r!==null&&r.memoizedState===null?!1:(Ct.current&2)!==0),_&&(p=!0,a.flags&=-129),_=(a.flags&32)!==0,a.flags&=-33,r===null){if(Xe){if(p?_i(a):Ti(),(r=Et)?(r=P2(r,er),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:mi!==null?{id:Tr,overflow:Ar}:null,retryLane:536870912,hydrationErrors:null},u=og(r),u.return=a,a.child=u,Kt=a,Et=null)):r=null,r===null)throw bi(a);return Vh(r)?a.lanes=32:a.lanes=536870912,null}var A=c.children;return c=c.fallback,p?(Ti(),p=a.mode,A=Ho({mode:"hidden",children:A},p),c=sa(c,p,u,null),A.return=a,c.return=a,A.sibling=c,a.child=A,c=a.child,c.memoizedState=oh(u),c.childLanes=ch(r,_,u),a.memoizedState=uh,wl(null,c)):(_i(a),dh(a,A))}var B=r.memoizedState;if(B!==null&&(A=B.dehydrated,A!==null)){if(g)a.flags&256?(_i(a),a.flags&=-257,a=fh(r,a,u)):a.memoizedState!==null?(Ti(),a.child=r.child,a.flags|=128,a=null):(Ti(),A=c.fallback,p=a.mode,c=Ho({mode:"visible",children:c.children},p),A=sa(A,p,u,null),A.flags|=2,c.return=a,A.return=a,c.sibling=A,a.child=c,ha(a,r.child,null,u),c=a.child,c.memoizedState=oh(u),c.childLanes=ch(r,_,u),a.memoizedState=uh,a=wl(null,c));else if(_i(a),Vh(A)){if(_=A.nextSibling&&A.nextSibling.dataset,_)var Q=_.dgst;_=Q,c=Error(i(419)),c.stack="",c.digest=_,pl({value:c,source:null,stack:null}),a=fh(r,a,u)}else if(Mt||as(r,a,u,!1),_=(u&r.childLanes)!==0,Mt||_){if(_=mt,_!==null&&(c=g1(_,u),c!==0&&c!==B.retryLane))throw B.retryLane=c,aa(r,c),Tn(_,r,c),sh;Yh(A)||Wo(),a=fh(r,a,u)}else Yh(A)?(a.flags|=192,a.child=r.child,a=null):(r=B.treeContext,Et=nr(A.nextSibling),Kt=a,Xe=!0,gi=null,er=!1,r!==null&&fg(a,r),a=dh(a,c.children),a.flags|=4096);return a}return p?(Ti(),A=c.fallback,p=a.mode,B=r.child,Q=B.sibling,c=Fr(B,{mode:"hidden",children:c.children}),c.subtreeFlags=B.subtreeFlags&65011712,Q!==null?A=Fr(Q,A):(A=sa(A,p,u,null),A.flags|=2),A.return=a,c.return=a,c.sibling=A,a.child=c,wl(null,c),c=a.child,A=r.child.memoizedState,A===null?A=oh(u):(p=A.cachePool,p!==null?(B=Ot._currentValue,p=p.parent!==B?{parent:B,pool:B}:p):p=yg(),A={baseLanes:A.baseLanes|u,cachePool:p}),c.memoizedState=A,c.childLanes=ch(r,_,u),a.memoizedState=uh,wl(r.child,c)):(_i(a),u=r.child,r=u.sibling,u=Fr(u,{mode:"visible",children:c.children}),u.return=a,u.sibling=null,r!==null&&(_=a.deletions,_===null?(a.deletions=[r],a.flags|=16):_.push(r)),a.child=u,a.memoizedState=null,u)}function dh(r,a){return a=Ho({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function Ho(r,a){return r=Dn(22,r,null,a),r.lanes=0,r}function fh(r,a,u){return ha(a,r.child,null,u),r=dh(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function Ob(r,a,u){r.lanes|=a;var c=r.alternate;c!==null&&(c.lanes|=a),kf(r.return,a,u)}function hh(r,a,u,c,p,g){var _=r.memoizedState;_===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:u,tailMode:p,treeForkCount:g}:(_.isBackwards=a,_.rendering=null,_.renderingStartTime=0,_.last=c,_.tail=u,_.tailMode=p,_.treeForkCount=g)}function Lb(r,a,u){var c=a.pendingProps,p=c.revealOrder,g=c.tail;c=c.children;var _=Ct.current,A=(_&2)!==0;if(A?(_=_&1|2,a.flags|=128):_&=1,O(Ct,_),Jt(r,a,c,u),c=Xe?hl:0,!A&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Ob(r,u,a);else if(r.tag===19)Ob(r,u,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(p){case"forwards":for(u=a.child,p=null;u!==null;)r=u.alternate,r!==null&&ko(r)===null&&(p=u),u=u.sibling;u=p,u===null?(p=a.child,a.child=null):(p=u.sibling,u.sibling=null),hh(a,!1,p,u,g,c);break;case"backwards":case"unstable_legacy-backwards":for(u=null,p=a.child,a.child=null;p!==null;){if(r=p.alternate,r!==null&&ko(r)===null){a.child=p;break}r=p.sibling,p.sibling=u,u=p,p=r}hh(a,!0,u,null,g,c);break;case"together":hh(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function Wr(r,a,u){if(r!==null&&(a.dependencies=r.dependencies),wi|=a.lanes,(u&a.childLanes)===0)if(r!==null){if(as(r,a,u,!1),(u&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(i(153));if(a.child!==null){for(r=a.child,u=Fr(r,r.pendingProps),a.child=u,u.return=a;r.sibling!==null;)r=r.sibling,u=u.sibling=Fr(r,r.pendingProps),u.return=a;u.sibling=null}return a.child}function ph(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&Eo(r)))}function ES(r,a,u){switch(a.tag){case 3:Je(a,a.stateNode.containerInfo),yi(a,Ot,r.memoizedState.cache),la();break;case 27:case 5:Gt(a);break;case 4:Je(a,a.stateNode.containerInfo);break;case 10:yi(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Hf(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(_i(a),a.flags|=128,null):(u&a.child.childLanes)!==0?Rb(r,a,u):(_i(a),r=Wr(r,a,u),r!==null?r.sibling:null);_i(a);break;case 19:var p=(r.flags&128)!==0;if(c=(u&a.childLanes)!==0,c||(as(r,a,u,!1),c=(u&a.childLanes)!==0),p){if(c)return Lb(r,a,u);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),O(Ct,Ct.current),c)break;return null;case 22:return a.lanes=0,Ab(r,a,u,a.pendingProps);case 24:yi(a,Ot,r.memoizedState.cache)}return Wr(r,a,u)}function Mb(r,a,u){if(r!==null)if(r.memoizedProps!==a.pendingProps)Mt=!0;else{if(!ph(r,u)&&(a.flags&128)===0)return Mt=!1,ES(r,a,u);Mt=(r.flags&131072)!==0}else Mt=!1,Xe&&(a.flags&1048576)!==0&&dg(a,hl,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(r=da(a.elementType),a.type=r,typeof r=="function")Ef(r)?(c=ma(r,c),a.tag=1,a=Cb(null,a,r,c,u)):(a.tag=0,a=lh(null,a,r,c,u));else{if(r!=null){var p=r.$$typeof;if(p===V){a.tag=11,a=vb(null,a,r,c,u);break e}else if(p===ne){a.tag=14,a=_b(null,a,r,c,u);break e}}throw a=ce(r)||r,Error(i(306,a,""))}}return a;case 0:return lh(r,a,a.type,a.pendingProps,u);case 1:return c=a.type,p=ma(c,a.pendingProps),Cb(r,a,c,p,u);case 3:e:{if(Je(a,a.stateNode.containerInfo),r===null)throw Error(i(387));c=a.pendingProps;var g=a.memoizedState;p=g.element,If(r,a),vl(a,c,null,u);var _=a.memoizedState;if(c=_.cache,yi(a,Ot,c),c!==g.cache&&Cf(a,[Ot],u,!0),xl(),c=_.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:_.cache},a.updateQueue.baseState=g,a.memoizedState=g,a.flags&256){a=Nb(r,a,c,u);break e}else if(c!==p){p=Kn(Error(i(424)),a),pl(p),a=Nb(r,a,c,u);break e}else for(r=a.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,Et=nr(r.firstChild),Kt=a,Xe=!0,gi=null,er=!0,u=Ag(a,null,c,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(la(),c===p){a=Wr(r,a,u);break e}Jt(r,a,c,u)}a=a.child}return a;case 26:return Po(r,a),r===null?(u=q2(a.type,null,a.pendingProps,null))?a.memoizedState=u:Xe||(u=a.type,r=a.pendingProps,c=tc(ye.current).createElement(u),c[Xt]=a,c[bn]=r,en(c,u,r),Ft(c),a.stateNode=c):a.memoizedState=q2(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return Gt(a),r===null&&Xe&&(c=a.stateNode=j2(a.type,a.pendingProps,ye.current),Kt=a,er=!0,p=Et,Oi(a.type)?(Gh=p,Et=nr(c.firstChild)):Et=p),Jt(r,a,a.pendingProps.children,u),Po(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&Xe&&((p=c=Et)&&(c=QS(c,a.type,a.pendingProps,er),c!==null?(a.stateNode=c,Kt=a,Et=nr(c.firstChild),er=!1,p=!0):p=!1),p||bi(a)),Gt(a),p=a.type,g=a.pendingProps,_=r!==null?r.memoizedProps:null,c=g.children,Fh(p,g)?c=null:_!==null&&Fh(p,_)&&(a.flags|=32),a.memoizedState!==null&&(p=jf(r,a,cS,null,null,u),jl._currentValue=p),Po(r,a),Jt(r,a,c,u),a.child;case 6:return r===null&&Xe&&((r=u=Et)&&(u=XS(u,a.pendingProps,er),u!==null?(a.stateNode=u,Kt=a,Et=null,r=!0):r=!1),r||bi(a)),null;case 13:return Rb(r,a,u);case 4:return Je(a,a.stateNode.containerInfo),c=a.pendingProps,r===null?a.child=ha(a,null,c,u):Jt(r,a,c,u),a.child;case 11:return vb(r,a,a.type,a.pendingProps,u);case 7:return Jt(r,a,a.pendingProps,u),a.child;case 8:return Jt(r,a,a.pendingProps.children,u),a.child;case 12:return Jt(r,a,a.pendingProps.children,u),a.child;case 10:return c=a.pendingProps,yi(a,a.type,c.value),Jt(r,a,c.children,u),a.child;case 9:return p=a.type._context,c=a.pendingProps.children,oa(a),p=Zt(p),c=c(p),a.flags|=1,Jt(r,a,c,u),a.child;case 14:return _b(r,a,a.type,a.pendingProps,u);case 15:return Tb(r,a,a.type,a.pendingProps,u);case 19:return Lb(r,a,u);case 31:return yS(r,a,u);case 22:return Ab(r,a,u,a.pendingProps);case 24:return oa(a),c=Zt(Ot),r===null?(p=Of(),p===null&&(p=mt,g=Nf(),p.pooledCache=g,g.refCount++,g!==null&&(p.pooledCacheLanes|=u),p=g),a.memoizedState={parent:c,cache:p},Mf(a),yi(a,Ot,p)):((r.lanes&u)!==0&&(If(r,a),vl(a,null,null,u),xl()),p=r.memoizedState,g=a.memoizedState,p.parent!==c?(p={parent:c,cache:c},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),yi(a,Ot,c)):(c=g.cache,yi(a,Ot,c),c!==p.cache&&Cf(a,[Ot],u,!0))),Jt(r,a,a.pendingProps.children,u),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function Qr(r){r.flags|=4}function mh(r,a,u,c,p){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(p&335544128)===p)if(r.stateNode.complete)r.flags|=8192;else if(s2())r.flags|=8192;else throw fa=To,Lf}else r.flags&=-16777217}function Ib(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Q2(a))if(s2())r.flags|=8192;else throw fa=To,Lf}function Uo(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?h1():536870912,r.lanes|=a,bs|=a)}function kl(r,a){if(!Xe)switch(r.tailMode){case"hidden":a=r.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var c=null;u!==null;)u.alternate!==null&&(c=u),u=u.sibling;c===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function xt(r){var a=r.alternate!==null&&r.alternate.child===r.child,u=0,c=0;if(a)for(var p=r.child;p!==null;)u|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=r,p=p.sibling;else for(p=r.child;p!==null;)u|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=c,r.childLanes=u,a}function xS(r,a,u){var c=a.pendingProps;switch(Tf(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(a),null;case 1:return xt(a),null;case 3:return u=a.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),Yr(Ot),Le(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(r===null||r.child===null)&&(is(a)?Qr(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Sf())),xt(a),null;case 26:var p=a.type,g=a.memoizedState;return r===null?(Qr(a),g!==null?(xt(a),Ib(a,g)):(xt(a),mh(a,p,null,c,u))):g?g!==r.memoizedState?(Qr(a),xt(a),Ib(a,g)):(xt(a),a.flags&=-16777217):(r=r.memoizedProps,r!==c&&Qr(a),xt(a),mh(a,p,r,c,u)),null;case 27:if(Wt(a),u=ye.current,p=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==c&&Qr(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return xt(a),null}r=F.current,is(a)?hg(a):(r=j2(p,c,u),a.stateNode=r,Qr(a))}return xt(a),null;case 5:if(Wt(a),p=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==c&&Qr(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return xt(a),null}if(g=F.current,is(a))hg(a);else{var _=tc(ye.current);switch(g){case 1:g=_.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:g=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":g=_.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":g=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":g=_.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof c.is=="string"?_.createElement("select",{is:c.is}):_.createElement("select"),c.multiple?g.multiple=!0:c.size&&(g.size=c.size);break;default:g=typeof c.is=="string"?_.createElement(p,{is:c.is}):_.createElement(p)}}g[Xt]=a,g[bn]=c;e:for(_=a.child;_!==null;){if(_.tag===5||_.tag===6)g.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===a)break e;for(;_.sibling===null;){if(_.return===null||_.return===a)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}a.stateNode=g;e:switch(en(g,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Qr(a)}}return xt(a),mh(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,u),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==c&&Qr(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(i(166));if(r=ye.current,is(a)){if(r=a.stateNode,u=a.memoizedProps,c=null,p=Kt,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}r[Xt]=a,r=!!(r.nodeValue===u||c!==null&&c.suppressHydrationWarning===!0||R2(r.nodeValue,u)),r||bi(a,!0)}else r=tc(r).createTextNode(c),r[Xt]=a,a.stateNode=r}return xt(a),null;case 31:if(u=a.memoizedState,r===null||r.memoizedState!==null){if(c=is(a),u!==null){if(r===null){if(!c)throw Error(i(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[Xt]=a}else la(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;xt(a),r=!1}else u=Sf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=u),r=!0;if(!r)return a.flags&256?(zn(a),a):(zn(a),null);if((a.flags&128)!==0)throw Error(i(558))}return xt(a),null;case 13:if(c=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(p=is(a),c!==null&&c.dehydrated!==null){if(r===null){if(!p)throw Error(i(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[Xt]=a}else la(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;xt(a),p=!1}else p=Sf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(zn(a),a):(zn(a),null)}return zn(a),(a.flags&128)!==0?(a.lanes=u,a):(u=c!==null,r=r!==null&&r.memoizedState!==null,u&&(c=a.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),g=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==p&&(c.flags|=2048)),u!==r&&u&&(a.child.flags|=8192),Uo(a,a.updateQueue),xt(a),null);case 4:return Le(),r===null&&zh(a.stateNode.containerInfo),xt(a),null;case 10:return Yr(a.type),xt(a),null;case 19:if(ee(Ct),c=a.memoizedState,c===null)return xt(a),null;if(p=(a.flags&128)!==0,g=c.rendering,g===null)if(p)kl(c,!1);else{if(St!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(g=ko(r),g!==null){for(a.flags|=128,kl(c,!1),r=g.updateQueue,a.updateQueue=r,Uo(a,r),a.subtreeFlags=0,r=u,u=a.child;u!==null;)ug(u,r),u=u.sibling;return O(Ct,Ct.current&1|2),Xe&&$r(a,c.treeForkCount),a.child}r=r.sibling}c.tail!==null&&cn()>Yo&&(a.flags|=128,p=!0,kl(c,!1),a.lanes=4194304)}else{if(!p)if(r=ko(g),r!==null){if(a.flags|=128,p=!0,r=r.updateQueue,a.updateQueue=r,Uo(a,r),kl(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!Xe)return xt(a),null}else 2*cn()-c.renderingStartTime>Yo&&u!==536870912&&(a.flags|=128,p=!0,kl(c,!1),a.lanes=4194304);c.isBackwards?(g.sibling=a.child,a.child=g):(r=c.last,r!==null?r.sibling=g:a.child=g,c.last=g)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=cn(),r.sibling=null,u=Ct.current,O(Ct,p?u&1|2:u&1),Xe&&$r(a,c.treeForkCount),r):(xt(a),null);case 22:case 23:return zn(a),Pf(),c=a.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(u&536870912)!==0&&(a.flags&128)===0&&(xt(a),a.subtreeFlags&6&&(a.flags|=8192)):xt(a),u=a.updateQueue,u!==null&&Uo(a,u.retryQueue),u=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==u&&(a.flags|=2048),r!==null&&ee(ca),null;case 24:return u=null,r!==null&&(u=r.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),Yr(Ot),xt(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function vS(r,a){switch(Tf(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return Yr(Ot),Le(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return Wt(a),null;case 31:if(a.memoizedState!==null){if(zn(a),a.alternate===null)throw Error(i(340));la()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(zn(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(i(340));la()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return ee(Ct),null;case 4:return Le(),null;case 10:return Yr(a.type),null;case 22:case 23:return zn(a),Pf(),r!==null&&ee(ca),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return Yr(Ot),null;case 25:return null;default:return null}}function Db(r,a){switch(Tf(a),a.tag){case 3:Yr(Ot),Le();break;case 26:case 27:case 5:Wt(a);break;case 4:Le();break;case 31:a.memoizedState!==null&&zn(a);break;case 13:zn(a);break;case 19:ee(Ct);break;case 10:Yr(a.type);break;case 22:case 23:zn(a),Pf(),r!==null&&ee(ca);break;case 24:Yr(Ot)}}function Cl(r,a){try{var u=a.updateQueue,c=u!==null?u.lastEffect:null;if(c!==null){var p=c.next;u=p;do{if((u.tag&r)===r){c=void 0;var g=u.create,_=u.inst;c=g(),_.destroy=c}u=u.next}while(u!==p)}}catch(A){lt(a,a.return,A)}}function Ai(r,a,u){try{var c=a.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var g=p.next;c=g;do{if((c.tag&r)===r){var _=c.inst,A=_.destroy;if(A!==void 0){_.destroy=void 0,p=a;var B=u,Q=A;try{Q()}catch(ae){lt(p,B,ae)}}}c=c.next}while(c!==g)}}catch(ae){lt(a,a.return,ae)}}function Bb(r){var a=r.updateQueue;if(a!==null){var u=r.stateNode;try{wg(a,u)}catch(c){lt(r,r.return,c)}}}function zb(r,a,u){u.props=ma(r.type,r.memoizedProps),u.state=r.memoizedState;try{u.componentWillUnmount()}catch(c){lt(r,a,c)}}function Nl(r,a){try{var u=r.ref;if(u!==null){switch(r.tag){case 26:case 27:case 5:var c=r.stateNode;break;case 30:c=r.stateNode;break;default:c=r.stateNode}typeof u=="function"?r.refCleanup=u(c):u.current=c}}catch(p){lt(r,a,p)}}function Sr(r,a){var u=r.ref,c=r.refCleanup;if(u!==null)if(typeof c=="function")try{c()}catch(p){lt(r,a,p)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(p){lt(r,a,p)}else u.current=null}function Pb(r){var a=r.type,u=r.memoizedProps,c=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":u.autoFocus&&c.focus();break e;case"img":u.src?c.src=u.src:u.srcSet&&(c.srcset=u.srcSet)}}catch(p){lt(r,r.return,p)}}function gh(r,a,u){try{var c=r.stateNode;$S(c,r.type,u,a),c[bn]=a}catch(p){lt(r,r.return,p)}}function Hb(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Oi(r.type)||r.tag===4}function bh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Hb(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Oi(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function yh(r,a,u){var c=r.tag;if(c===5||c===6)r=r.stateNode,a?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(r,a):(a=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,a.appendChild(r),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=Ur));else if(c!==4&&(c===27&&Oi(r.type)&&(u=r.stateNode,a=null),r=r.child,r!==null))for(yh(r,a,u),r=r.sibling;r!==null;)yh(r,a,u),r=r.sibling}function jo(r,a,u){var c=r.tag;if(c===5||c===6)r=r.stateNode,a?u.insertBefore(r,a):u.appendChild(r);else if(c!==4&&(c===27&&Oi(r.type)&&(u=r.stateNode),r=r.child,r!==null))for(jo(r,a,u),r=r.sibling;r!==null;)jo(r,a,u),r=r.sibling}function Ub(r){var a=r.stateNode,u=r.memoizedProps;try{for(var c=r.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);en(a,c,u),a[Xt]=r,a[bn]=u}catch(g){lt(r,r.return,g)}}var Xr=!1,It=!1,Eh=!1,jb=typeof WeakSet=="function"?WeakSet:Set,$t=null;function _S(r,a){if(r=r.containerInfo,Uh=uc,r=J1(r),ff(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var c=u.getSelection&&u.getSelection();if(c&&c.rangeCount!==0){u=c.anchorNode;var p=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{u.nodeType,g.nodeType}catch{u=null;break e}var _=0,A=-1,B=-1,Q=0,ae=0,oe=r,X=null;t:for(;;){for(var Z;oe!==u||p!==0&&oe.nodeType!==3||(A=_+p),oe!==g||c!==0&&oe.nodeType!==3||(B=_+c),oe.nodeType===3&&(_+=oe.nodeValue.length),(Z=oe.firstChild)!==null;)X=oe,oe=Z;for(;;){if(oe===r)break t;if(X===u&&++Q===p&&(A=_),X===g&&++ae===c&&(B=_),(Z=oe.nextSibling)!==null)break;oe=X,X=oe.parentNode}oe=Z}u=A===-1||B===-1?null:{start:A,end:B}}else u=null}u=u||{start:0,end:0}}else u=null;for(jh={focusedElem:r,selectionRange:u},uc=!1,$t=a;$t!==null;)if(a=$t,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,$t=r;else for(;$t!==null;){switch(a=$t,g=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.updateQueue,r=r!==null?r.events:null,r!==null))for(u=0;u<r.length;u++)p=r[u],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&g!==null){r=void 0,u=a,p=g.memoizedProps,g=g.memoizedState,c=u.stateNode;try{var Te=ma(u.type,p);r=c.getSnapshotBeforeUpdate(Te,g),c.__reactInternalSnapshotBeforeUpdate=r}catch(Oe){lt(u,u.return,Oe)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,u=r.nodeType,u===9)qh(r);else if(u===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":qh(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=a.sibling,r!==null){r.return=a.return,$t=r;break}$t=a.return}}function Fb(r,a,u){var c=u.flags;switch(u.tag){case 0:case 11:case 15:Zr(r,u),c&4&&Cl(5,u);break;case 1:if(Zr(r,u),c&4)if(r=u.stateNode,a===null)try{r.componentDidMount()}catch(_){lt(u,u.return,_)}else{var p=ma(u.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(p,a,r.__reactInternalSnapshotBeforeUpdate)}catch(_){lt(u,u.return,_)}}c&64&&Bb(u),c&512&&Nl(u,u.return);break;case 3:if(Zr(r,u),c&64&&(r=u.updateQueue,r!==null)){if(a=null,u.child!==null)switch(u.child.tag){case 27:case 5:a=u.child.stateNode;break;case 1:a=u.child.stateNode}try{wg(r,a)}catch(_){lt(u,u.return,_)}}break;case 27:a===null&&c&4&&Ub(u);case 26:case 5:Zr(r,u),a===null&&c&4&&Pb(u),c&512&&Nl(u,u.return);break;case 12:Zr(r,u);break;case 31:Zr(r,u),c&4&&Yb(r,u);break;case 13:Zr(r,u),c&4&&Vb(r,u),c&64&&(r=u.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(u=OS.bind(null,u),KS(r,u))));break;case 22:if(c=u.memoizedState!==null||Xr,!c){a=a!==null&&a.memoizedState!==null||It,p=Xr;var g=It;Xr=c,(It=a)&&!g?Jr(r,u,(u.subtreeFlags&8772)!==0):Zr(r,u),Xr=p,It=g}break;case 30:break;default:Zr(r,u)}}function $b(r){var a=r.alternate;a!==null&&(r.alternate=null,$b(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&Wd(a)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var vt=null,En=!1;function Kr(r,a,u){for(u=u.child;u!==null;)qb(r,a,u),u=u.sibling}function qb(r,a,u){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(dn,u)}catch{}switch(u.tag){case 26:It||Sr(u,a),Kr(r,a,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:It||Sr(u,a);var c=vt,p=En;Oi(u.type)&&(vt=u.stateNode,En=!1),Kr(r,a,u),Pl(u.stateNode),vt=c,En=p;break;case 5:It||Sr(u,a);case 6:if(c=vt,p=En,vt=null,Kr(r,a,u),vt=c,En=p,vt!==null)if(En)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(u.stateNode)}catch(g){lt(u,a,g)}else try{vt.removeChild(u.stateNode)}catch(g){lt(u,a,g)}break;case 18:vt!==null&&(En?(r=vt,B2(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,u.stateNode),Ss(r)):B2(vt,u.stateNode));break;case 4:c=vt,p=En,vt=u.stateNode.containerInfo,En=!0,Kr(r,a,u),vt=c,En=p;break;case 0:case 11:case 14:case 15:Ai(2,u,a),It||Ai(4,u,a),Kr(r,a,u);break;case 1:It||(Sr(u,a),c=u.stateNode,typeof c.componentWillUnmount=="function"&&zb(u,a,c)),Kr(r,a,u);break;case 21:Kr(r,a,u);break;case 22:It=(c=It)||u.memoizedState!==null,Kr(r,a,u),It=c;break;default:Kr(r,a,u)}}function Yb(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Ss(r)}catch(u){lt(a,a.return,u)}}}function Vb(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Ss(r)}catch(u){lt(a,a.return,u)}}function TS(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new jb),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new jb),a;default:throw Error(i(435,r.tag))}}function Fo(r,a){var u=TS(r);a.forEach(function(c){if(!u.has(c)){u.add(c);var p=LS.bind(null,r,c);c.then(p,p)}})}function xn(r,a){var u=a.deletions;if(u!==null)for(var c=0;c<u.length;c++){var p=u[c],g=r,_=a,A=_;e:for(;A!==null;){switch(A.tag){case 27:if(Oi(A.type)){vt=A.stateNode,En=!1;break e}break;case 5:vt=A.stateNode,En=!1;break e;case 3:case 4:vt=A.stateNode.containerInfo,En=!0;break e}A=A.return}if(vt===null)throw Error(i(160));qb(g,_,p),vt=null,En=!1,g=p.alternate,g!==null&&(g.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Gb(a,r),a=a.sibling}var mr=null;function Gb(r,a){var u=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:xn(a,r),vn(r),c&4&&(Ai(3,r,r.return),Cl(3,r),Ai(5,r,r.return));break;case 1:xn(a,r),vn(r),c&512&&(It||u===null||Sr(u,u.return)),c&64&&Xr&&(r=r.updateQueue,r!==null&&(c=r.callbacks,c!==null&&(u=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=u===null?c:u.concat(c))));break;case 26:var p=mr;if(xn(a,r),vn(r),c&512&&(It||u===null||Sr(u,u.return)),c&4){var g=u!==null?u.memoizedState:null;if(c=r.memoizedState,u===null)if(c===null)if(r.stateNode===null){e:{c=r.type,u=r.memoizedProps,p=p.ownerDocument||p;t:switch(c){case"title":g=p.getElementsByTagName("title")[0],(!g||g[nl]||g[Xt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=p.createElement(c),p.head.insertBefore(g,p.querySelector("head > title"))),en(g,c,u),g[Xt]=r,Ft(g),c=g;break e;case"link":var _=G2("link","href",p).get(c+(u.href||""));if(_){for(var A=0;A<_.length;A++)if(g=_[A],g.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&g.getAttribute("rel")===(u.rel==null?null:u.rel)&&g.getAttribute("title")===(u.title==null?null:u.title)&&g.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){_.splice(A,1);break t}}g=p.createElement(c),en(g,c,u),p.head.appendChild(g);break;case"meta":if(_=G2("meta","content",p).get(c+(u.content||""))){for(A=0;A<_.length;A++)if(g=_[A],g.getAttribute("content")===(u.content==null?null:""+u.content)&&g.getAttribute("name")===(u.name==null?null:u.name)&&g.getAttribute("property")===(u.property==null?null:u.property)&&g.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&g.getAttribute("charset")===(u.charSet==null?null:u.charSet)){_.splice(A,1);break t}}g=p.createElement(c),en(g,c,u),p.head.appendChild(g);break;default:throw Error(i(468,c))}g[Xt]=r,Ft(g),c=g}r.stateNode=c}else W2(p,r.type,r.stateNode);else r.stateNode=V2(p,c,r.memoizedProps);else g!==c?(g===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):g.count--,c===null?W2(p,r.type,r.stateNode):V2(p,c,r.memoizedProps)):c===null&&r.stateNode!==null&&gh(r,r.memoizedProps,u.memoizedProps)}break;case 27:xn(a,r),vn(r),c&512&&(It||u===null||Sr(u,u.return)),u!==null&&c&4&&gh(r,r.memoizedProps,u.memoizedProps);break;case 5:if(xn(a,r),vn(r),c&512&&(It||u===null||Sr(u,u.return)),r.flags&32){p=r.stateNode;try{Wa(p,"")}catch(Te){lt(r,r.return,Te)}}c&4&&r.stateNode!=null&&(p=r.memoizedProps,gh(r,p,u!==null?u.memoizedProps:p)),c&1024&&(Eh=!0);break;case 6:if(xn(a,r),vn(r),c&4){if(r.stateNode===null)throw Error(i(162));c=r.memoizedProps,u=r.stateNode;try{u.nodeValue=c}catch(Te){lt(r,r.return,Te)}}break;case 3:if(ic=null,p=mr,mr=nc(a.containerInfo),xn(a,r),mr=p,vn(r),c&4&&u!==null&&u.memoizedState.isDehydrated)try{Ss(a.containerInfo)}catch(Te){lt(r,r.return,Te)}Eh&&(Eh=!1,Wb(r));break;case 4:c=mr,mr=nc(r.stateNode.containerInfo),xn(a,r),vn(r),mr=c;break;case 12:xn(a,r),vn(r);break;case 31:xn(a,r),vn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Fo(r,c)));break;case 13:xn(a,r),vn(r),r.child.flags&8192&&r.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(qo=cn()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Fo(r,c)));break;case 22:p=r.memoizedState!==null;var B=u!==null&&u.memoizedState!==null,Q=Xr,ae=It;if(Xr=Q||p,It=ae||B,xn(a,r),It=ae,Xr=Q,vn(r),c&8192)e:for(a=r.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(u===null||B||Xr||It||ga(r)),u=null,a=r;;){if(a.tag===5||a.tag===26){if(u===null){B=u=a;try{if(g=B.stateNode,p)_=g.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{A=B.stateNode;var oe=B.memoizedProps.style,X=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;A.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(Te){lt(B,B.return,Te)}}}else if(a.tag===6){if(u===null){B=a;try{B.stateNode.nodeValue=p?"":B.memoizedProps}catch(Te){lt(B,B.return,Te)}}}else if(a.tag===18){if(u===null){B=a;try{var Z=B.stateNode;p?z2(Z,!0):z2(B.stateNode,!1)}catch(Te){lt(B,B.return,Te)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;u===a&&(u=null),a=a.return}u===a&&(u=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=r.updateQueue,c!==null&&(u=c.retryQueue,u!==null&&(c.retryQueue=null,Fo(r,u))));break;case 19:xn(a,r),vn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Fo(r,c)));break;case 30:break;case 21:break;default:xn(a,r),vn(r)}}function vn(r){var a=r.flags;if(a&2){try{for(var u,c=r.return;c!==null;){if(Hb(c)){u=c;break}c=c.return}if(u==null)throw Error(i(160));switch(u.tag){case 27:var p=u.stateNode,g=bh(r);jo(r,g,p);break;case 5:var _=u.stateNode;u.flags&32&&(Wa(_,""),u.flags&=-33);var A=bh(r);jo(r,A,_);break;case 3:case 4:var B=u.stateNode.containerInfo,Q=bh(r);yh(r,Q,B);break;default:throw Error(i(161))}}catch(ae){lt(r,r.return,ae)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function Wb(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;Wb(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function Zr(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Fb(r,a.alternate,a),a=a.sibling}function ga(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:Ai(4,a,a.return),ga(a);break;case 1:Sr(a,a.return);var u=a.stateNode;typeof u.componentWillUnmount=="function"&&zb(a,a.return,u),ga(a);break;case 27:Pl(a.stateNode);case 26:case 5:Sr(a,a.return),ga(a);break;case 22:a.memoizedState===null&&ga(a);break;case 30:ga(a);break;default:ga(a)}r=r.sibling}}function Jr(r,a,u){for(u=u&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,p=r,g=a,_=g.flags;switch(g.tag){case 0:case 11:case 15:Jr(p,g,u),Cl(4,g);break;case 1:if(Jr(p,g,u),c=g,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(Q){lt(c,c.return,Q)}if(c=g,p=c.updateQueue,p!==null){var A=c.stateNode;try{var B=p.shared.hiddenCallbacks;if(B!==null)for(p.shared.hiddenCallbacks=null,p=0;p<B.length;p++)Sg(B[p],A)}catch(Q){lt(c,c.return,Q)}}u&&_&64&&Bb(g),Nl(g,g.return);break;case 27:Ub(g);case 26:case 5:Jr(p,g,u),u&&c===null&&_&4&&Pb(g),Nl(g,g.return);break;case 12:Jr(p,g,u);break;case 31:Jr(p,g,u),u&&_&4&&Yb(p,g);break;case 13:Jr(p,g,u),u&&_&4&&Vb(p,g);break;case 22:g.memoizedState===null&&Jr(p,g,u),Nl(g,g.return);break;case 30:break;default:Jr(p,g,u)}a=a.sibling}}function xh(r,a){var u=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==u&&(r!=null&&r.refCount++,u!=null&&ml(u))}function vh(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&ml(r))}function gr(r,a,u,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Qb(r,a,u,c),a=a.sibling}function Qb(r,a,u,c){var p=a.flags;switch(a.tag){case 0:case 11:case 15:gr(r,a,u,c),p&2048&&Cl(9,a);break;case 1:gr(r,a,u,c);break;case 3:gr(r,a,u,c),p&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&ml(r)));break;case 12:if(p&2048){gr(r,a,u,c),r=a.stateNode;try{var g=a.memoizedProps,_=g.id,A=g.onPostCommit;typeof A=="function"&&A(_,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(B){lt(a,a.return,B)}}else gr(r,a,u,c);break;case 31:gr(r,a,u,c);break;case 13:gr(r,a,u,c);break;case 23:break;case 22:g=a.stateNode,_=a.alternate,a.memoizedState!==null?g._visibility&2?gr(r,a,u,c):Rl(r,a):g._visibility&2?gr(r,a,u,c):(g._visibility|=2,ps(r,a,u,c,(a.subtreeFlags&10256)!==0||!1)),p&2048&&xh(_,a);break;case 24:gr(r,a,u,c),p&2048&&vh(a.alternate,a);break;default:gr(r,a,u,c)}}function ps(r,a,u,c,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var g=r,_=a,A=u,B=c,Q=_.flags;switch(_.tag){case 0:case 11:case 15:ps(g,_,A,B,p),Cl(8,_);break;case 23:break;case 22:var ae=_.stateNode;_.memoizedState!==null?ae._visibility&2?ps(g,_,A,B,p):Rl(g,_):(ae._visibility|=2,ps(g,_,A,B,p)),p&&Q&2048&&xh(_.alternate,_);break;case 24:ps(g,_,A,B,p),p&&Q&2048&&vh(_.alternate,_);break;default:ps(g,_,A,B,p)}a=a.sibling}}function Rl(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var u=r,c=a,p=c.flags;switch(c.tag){case 22:Rl(u,c),p&2048&&xh(c.alternate,c);break;case 24:Rl(u,c),p&2048&&vh(c.alternate,c);break;default:Rl(u,c)}a=a.sibling}}var Ol=8192;function ms(r,a,u){if(r.subtreeFlags&Ol)for(r=r.child;r!==null;)Xb(r,a,u),r=r.sibling}function Xb(r,a,u){switch(r.tag){case 26:ms(r,a,u),r.flags&Ol&&r.memoizedState!==null&&ow(u,mr,r.memoizedState,r.memoizedProps);break;case 5:ms(r,a,u);break;case 3:case 4:var c=mr;mr=nc(r.stateNode.containerInfo),ms(r,a,u),mr=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=Ol,Ol=16777216,ms(r,a,u),Ol=c):ms(r,a,u));break;default:ms(r,a,u)}}function Kb(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function Ll(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var c=a[u];$t=c,Jb(c,r)}Kb(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Zb(r),r=r.sibling}function Zb(r){switch(r.tag){case 0:case 11:case 15:Ll(r),r.flags&2048&&Ai(9,r,r.return);break;case 3:Ll(r);break;case 12:Ll(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,$o(r)):Ll(r);break;default:Ll(r)}}function $o(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var c=a[u];$t=c,Jb(c,r)}Kb(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:Ai(8,a,a.return),$o(a);break;case 22:u=a.stateNode,u._visibility&2&&(u._visibility&=-3,$o(a));break;default:$o(a)}r=r.sibling}}function Jb(r,a){for(;$t!==null;){var u=$t;switch(u.tag){case 0:case 11:case 15:Ai(8,u,a);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var c=u.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:ml(u.memoizedState.cache)}if(c=u.child,c!==null)c.return=u,$t=c;else e:for(u=r;$t!==null;){c=$t;var p=c.sibling,g=c.return;if($b(c),c===u){$t=null;break e}if(p!==null){p.return=g,$t=p;break e}$t=g}}}var AS={getCacheForType:function(r){var a=Zt(Ot),u=a.data.get(r);return u===void 0&&(u=r(),a.data.set(r,u)),u},cacheSignal:function(){return Zt(Ot).controller.signal}},SS=typeof WeakMap=="function"?WeakMap:Map,rt=0,mt=null,Ye=null,We=0,st=0,Pn=null,Si=!1,gs=!1,_h=!1,ei=0,St=0,wi=0,ba=0,Th=0,Hn=0,bs=0,Ml=null,_n=null,Ah=!1,qo=0,e2=0,Yo=1/0,Vo=null,ki=null,Pt=0,Ci=null,ys=null,ti=0,Sh=0,wh=null,t2=null,Il=0,kh=null;function Un(){return(rt&2)!==0&&We!==0?We&-We:I.T!==null?Mh():b1()}function n2(){if(Hn===0)if((We&536870912)===0||Xe){var r=Ju;Ju<<=1,(Ju&3932160)===0&&(Ju=262144),Hn=r}else Hn=536870912;return r=Bn.current,r!==null&&(r.flags|=32),Hn}function Tn(r,a,u){(r===mt&&(st===2||st===9)||r.cancelPendingCommit!==null)&&(Es(r,0),Ni(r,We,Hn,!1)),tl(r,u),((rt&2)===0||r!==mt)&&(r===mt&&((rt&2)===0&&(ba|=u),St===4&&Ni(r,We,Hn,!1)),wr(r))}function r2(r,a,u){if((rt&6)!==0)throw Error(i(327));var c=!u&&(a&127)===0&&(a&r.expiredLanes)===0||el(r,a),p=c?CS(r,a):Nh(r,a,!0),g=c;do{if(p===0){gs&&!c&&Ni(r,a,0,!1);break}else{if(u=r.current.alternate,g&&!wS(u)){p=Nh(r,a,!1),g=!1;continue}if(p===2){if(g=a,r.errorRecoveryDisabledLanes&g)var _=0;else _=r.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){a=_;e:{var A=r;p=Ml;var B=A.current.memoizedState.isDehydrated;if(B&&(Es(A,_).flags|=256),_=Nh(A,_,!1),_!==2){if(_h&&!B){A.errorRecoveryDisabledLanes|=g,ba|=g,p=4;break e}g=_n,_n=p,g!==null&&(_n===null?_n=g:_n.push.apply(_n,g))}p=_}if(g=!1,p!==2)continue}}if(p===1){Es(r,0),Ni(r,a,0,!0);break}e:{switch(c=r,g=p,g){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:Ni(c,a,Hn,!Si);break e;case 2:_n=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(p=qo+300-cn(),10<p)){if(Ni(c,a,Hn,!Si),to(c,0,!0)!==0)break e;ti=a,c.timeoutHandle=I2(i2.bind(null,c,u,_n,Vo,Ah,a,Hn,ba,bs,Si,g,"Throttled",-0,0),p);break e}i2(c,u,_n,Vo,Ah,a,Hn,ba,bs,Si,g,null,-0,0)}}break}while(!0);wr(r)}function i2(r,a,u,c,p,g,_,A,B,Q,ae,oe,X,Z){if(r.timeoutHandle=-1,oe=a.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ur},Xb(a,g,oe);var Te=(g&62914560)===g?qo-cn():(g&4194048)===g?e2-cn():0;if(Te=cw(oe,Te),Te!==null){ti=g,r.cancelPendingCommit=Te(f2.bind(null,r,a,g,u,c,p,_,A,B,ae,oe,null,X,Z)),Ni(r,g,_,!Q);return}}f2(r,a,g,u,c,p,_,A,B)}function wS(r){for(var a=r;;){var u=a.tag;if((u===0||u===11||u===15)&&a.flags&16384&&(u=a.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var c=0;c<u.length;c++){var p=u[c],g=p.getSnapshot;p=p.value;try{if(!In(g(),p))return!1}catch{return!1}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Ni(r,a,u,c){a&=~Th,a&=~ba,r.suspendedLanes|=a,r.pingedLanes&=~a,c&&(r.warmLanes|=a),c=r.expirationTimes;for(var p=a;0<p;){var g=31-pt(p),_=1<<g;c[g]=-1,p&=~_}u!==0&&p1(r,u,a)}function Go(){return(rt&6)===0?(Dl(0),!1):!0}function Ch(){if(Ye!==null){if(st===0)var r=Ye.return;else r=Ye,qr=ua=null,qf(r),os=null,bl=0,r=Ye;for(;r!==null;)Db(r.alternate,r),r=r.return;Ye=null}}function Es(r,a){var u=r.timeoutHandle;u!==-1&&(r.timeoutHandle=-1,VS(u)),u=r.cancelPendingCommit,u!==null&&(r.cancelPendingCommit=null,u()),ti=0,Ch(),mt=r,Ye=u=Fr(r.current,null),We=a,st=0,Pn=null,Si=!1,gs=el(r,a),_h=!1,bs=Hn=Th=ba=wi=St=0,_n=Ml=null,Ah=!1,(a&8)!==0&&(a|=a&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=a;0<c;){var p=31-pt(c),g=1<<p;a|=r[p],c&=~g}return ei=a,po(),u}function a2(r,a){ze=null,I.H=Sl,a===us||a===_o?(a=vg(),st=3):a===Lf?(a=vg(),st=4):st=a===sh?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Pn=a,Ye===null&&(St=1,Bo(r,Kn(a,r.current)))}function s2(){var r=Bn.current;return r===null?!0:(We&4194048)===We?tr===null:(We&62914560)===We||(We&536870912)!==0?r===tr:!1}function l2(){var r=I.H;return I.H=Sl,r===null?Sl:r}function u2(){var r=I.A;return I.A=AS,r}function Wo(){St=4,Si||(We&4194048)!==We&&Bn.current!==null||(gs=!0),(wi&134217727)===0&&(ba&134217727)===0||mt===null||Ni(mt,We,Hn,!1)}function Nh(r,a,u){var c=rt;rt|=2;var p=l2(),g=u2();(mt!==r||We!==a)&&(Vo=null,Es(r,a)),a=!1;var _=St;e:do try{if(st!==0&&Ye!==null){var A=Ye,B=Pn;switch(st){case 8:Ch(),_=6;break e;case 3:case 2:case 9:case 6:Bn.current===null&&(a=!0);var Q=st;if(st=0,Pn=null,xs(r,A,B,Q),u&&gs){_=0;break e}break;default:Q=st,st=0,Pn=null,xs(r,A,B,Q)}}kS(),_=St;break}catch(ae){a2(r,ae)}while(!0);return a&&r.shellSuspendCounter++,qr=ua=null,rt=c,I.H=p,I.A=g,Ye===null&&(mt=null,We=0,po()),_}function kS(){for(;Ye!==null;)o2(Ye)}function CS(r,a){var u=rt;rt|=2;var c=l2(),p=u2();mt!==r||We!==a?(Vo=null,Yo=cn()+500,Es(r,a)):gs=el(r,a);e:do try{if(st!==0&&Ye!==null){a=Ye;var g=Pn;t:switch(st){case 1:st=0,Pn=null,xs(r,a,g,1);break;case 2:case 9:if(Eg(g)){st=0,Pn=null,c2(a);break}a=function(){st!==2&&st!==9||mt!==r||(st=7),wr(r)},g.then(a,a);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:Eg(g)?(st=0,Pn=null,c2(a)):(st=0,Pn=null,xs(r,a,g,7));break;case 5:var _=null;switch(Ye.tag){case 26:_=Ye.memoizedState;case 5:case 27:var A=Ye;if(_?Q2(_):A.stateNode.complete){st=0,Pn=null;var B=A.sibling;if(B!==null)Ye=B;else{var Q=A.return;Q!==null?(Ye=Q,Qo(Q)):Ye=null}break t}}st=0,Pn=null,xs(r,a,g,5);break;case 6:st=0,Pn=null,xs(r,a,g,6);break;case 8:Ch(),St=6;break e;default:throw Error(i(462))}}NS();break}catch(ae){a2(r,ae)}while(!0);return qr=ua=null,I.H=c,I.A=p,rt=u,Ye!==null?0:(mt=null,We=0,po(),St)}function NS(){for(;Ye!==null&&!jd();)o2(Ye)}function o2(r){var a=Mb(r.alternate,r,ei);r.memoizedProps=r.pendingProps,a===null?Qo(r):Ye=a}function c2(r){var a=r,u=a.alternate;switch(a.tag){case 15:case 0:a=kb(u,a,a.pendingProps,a.type,void 0,We);break;case 11:a=kb(u,a,a.pendingProps,a.type.render,a.ref,We);break;case 5:qf(a);default:Db(u,a),a=Ye=ug(a,ei),a=Mb(u,a,ei)}r.memoizedProps=r.pendingProps,a===null?Qo(r):Ye=a}function xs(r,a,u,c){qr=ua=null,qf(a),os=null,bl=0;var p=a.return;try{if(bS(r,p,a,u,We)){St=1,Bo(r,Kn(u,r.current)),Ye=null;return}}catch(g){if(p!==null)throw Ye=p,g;St=1,Bo(r,Kn(u,r.current)),Ye=null;return}a.flags&32768?(Xe||c===1?r=!0:gs||(We&536870912)!==0?r=!1:(Si=r=!0,(c===2||c===9||c===3||c===6)&&(c=Bn.current,c!==null&&c.tag===13&&(c.flags|=16384))),d2(a,r)):Qo(a)}function Qo(r){var a=r;do{if((a.flags&32768)!==0){d2(a,Si);return}r=a.return;var u=xS(a.alternate,a,ei);if(u!==null){Ye=u;return}if(a=a.sibling,a!==null){Ye=a;return}Ye=a=r}while(a!==null);St===0&&(St=5)}function d2(r,a){do{var u=vS(r.alternate,r);if(u!==null){u.flags&=32767,Ye=u;return}if(u=r.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!a&&(r=r.sibling,r!==null)){Ye=r;return}Ye=r=u}while(r!==null);St=6,Ye=null}function f2(r,a,u,c,p,g,_,A,B){r.cancelPendingCommit=null;do Xo();while(Pt!==0);if((rt&6)!==0)throw Error(i(327));if(a!==null){if(a===r.current)throw Error(i(177));if(g=a.lanes|a.childLanes,g|=bf,u6(r,u,g,_,A,B),r===mt&&(Ye=mt=null,We=0),ys=a,Ci=r,ti=u,Sh=g,wh=p,t2=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,MS(Ie,function(){return b2(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=I.T,I.T=null,p=ie.p,ie.p=2,_=rt,rt|=4;try{_S(r,a,u)}finally{rt=_,ie.p=p,I.T=c}}Pt=1,h2(),p2(),m2()}}function h2(){if(Pt===1){Pt=0;var r=Ci,a=ys,u=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||u){u=I.T,I.T=null;var c=ie.p;ie.p=2;var p=rt;rt|=4;try{Gb(a,r);var g=jh,_=J1(r.containerInfo),A=g.focusedElem,B=g.selectionRange;if(_!==A&&A&&A.ownerDocument&&Z1(A.ownerDocument.documentElement,A)){if(B!==null&&ff(A)){var Q=B.start,ae=B.end;if(ae===void 0&&(ae=Q),"selectionStart"in A)A.selectionStart=Q,A.selectionEnd=Math.min(ae,A.value.length);else{var oe=A.ownerDocument||document,X=oe&&oe.defaultView||window;if(X.getSelection){var Z=X.getSelection(),Te=A.textContent.length,Oe=Math.min(B.start,Te),ft=B.end===void 0?Oe:Math.min(B.end,Te);!Z.extend&&Oe>ft&&(_=ft,ft=Oe,Oe=_);var q=K1(A,Oe),U=K1(A,ft);if(q&&U&&(Z.rangeCount!==1||Z.anchorNode!==q.node||Z.anchorOffset!==q.offset||Z.focusNode!==U.node||Z.focusOffset!==U.offset)){var W=oe.createRange();W.setStart(q.node,q.offset),Z.removeAllRanges(),Oe>ft?(Z.addRange(W),Z.extend(U.node,U.offset)):(W.setEnd(U.node,U.offset),Z.addRange(W))}}}}for(oe=[],Z=A;Z=Z.parentNode;)Z.nodeType===1&&oe.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<oe.length;A++){var le=oe[A];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}uc=!!Uh,jh=Uh=null}finally{rt=p,ie.p=c,I.T=u}}r.current=a,Pt=2}}function p2(){if(Pt===2){Pt=0;var r=Ci,a=ys,u=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||u){u=I.T,I.T=null;var c=ie.p;ie.p=2;var p=rt;rt|=4;try{Fb(r,a.alternate,a)}finally{rt=p,ie.p=c,I.T=u}}Pt=3}}function m2(){if(Pt===4||Pt===3){Pt=0,Fd();var r=Ci,a=ys,u=ti,c=t2;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Pt=5:(Pt=0,ys=Ci=null,g2(r,r.pendingLanes));var p=r.pendingLanes;if(p===0&&(ki=null),Vd(u),a=a.stateNode,zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(dn,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=I.T,p=ie.p,ie.p=2,I.T=null;try{for(var g=r.onRecoverableError,_=0;_<c.length;_++){var A=c[_];g(A.value,{componentStack:A.stack})}}finally{I.T=a,ie.p=p}}(ti&3)!==0&&Xo(),wr(r),p=r.pendingLanes,(u&261930)!==0&&(p&42)!==0?r===kh?Il++:(Il=0,kh=r):Il=0,Dl(0)}}function g2(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,ml(a)))}function Xo(){return h2(),p2(),m2(),b2()}function b2(){if(Pt!==5)return!1;var r=Ci,a=Sh;Sh=0;var u=Vd(ti),c=I.T,p=ie.p;try{ie.p=32>u?32:u,I.T=null,u=wh,wh=null;var g=Ci,_=ti;if(Pt=0,ys=Ci=null,ti=0,(rt&6)!==0)throw Error(i(331));var A=rt;if(rt|=4,Zb(g.current),Qb(g,g.current,_,u),rt=A,Dl(0,!1),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(dn,g)}catch{}return!0}finally{ie.p=p,I.T=c,g2(r,a)}}function y2(r,a,u){a=Kn(u,a),a=ah(r.stateNode,a,2),r=vi(r,a,2),r!==null&&(tl(r,2),wr(r))}function lt(r,a,u){if(r.tag===3)y2(r,r,u);else for(;a!==null;){if(a.tag===3){y2(a,r,u);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(ki===null||!ki.has(c))){r=Kn(u,r),u=Eb(2),c=vi(a,u,2),c!==null&&(xb(u,c,a,r),tl(c,2),wr(c));break}}a=a.return}}function Rh(r,a,u){var c=r.pingCache;if(c===null){c=r.pingCache=new SS;var p=new Set;c.set(a,p)}else p=c.get(a),p===void 0&&(p=new Set,c.set(a,p));p.has(u)||(_h=!0,p.add(u),r=RS.bind(null,r,a,u),a.then(r,r))}function RS(r,a,u){var c=r.pingCache;c!==null&&c.delete(a),r.pingedLanes|=r.suspendedLanes&u,r.warmLanes&=~u,mt===r&&(We&u)===u&&(St===4||St===3&&(We&62914560)===We&&300>cn()-qo?(rt&2)===0&&Es(r,0):Th|=u,bs===We&&(bs=0)),wr(r)}function E2(r,a){a===0&&(a=h1()),r=aa(r,a),r!==null&&(tl(r,a),wr(r))}function OS(r){var a=r.memoizedState,u=0;a!==null&&(u=a.retryLane),E2(r,u)}function LS(r,a){var u=0;switch(r.tag){case 31:case 13:var c=r.stateNode,p=r.memoizedState;p!==null&&(u=p.retryLane);break;case 19:c=r.stateNode;break;case 22:c=r.stateNode._retryCache;break;default:throw Error(i(314))}c!==null&&c.delete(a),E2(r,u)}function MS(r,a){return on(r,a)}var Ko=null,vs=null,Oh=!1,Zo=!1,Lh=!1,Ri=0;function wr(r){r!==vs&&r.next===null&&(vs===null?Ko=vs=r:vs=vs.next=r),Zo=!0,Oh||(Oh=!0,DS())}function Dl(r,a){if(!Lh&&Zo){Lh=!0;do for(var u=!1,c=Ko;c!==null;){if(r!==0){var p=c.pendingLanes;if(p===0)var g=0;else{var _=c.suspendedLanes,A=c.pingedLanes;g=(1<<31-pt(42|r)+1)-1,g&=p&~(_&~A),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(u=!0,T2(c,g))}else g=We,g=to(c,c===mt?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||el(c,g)||(u=!0,T2(c,g));c=c.next}while(u);Lh=!1}}function IS(){x2()}function x2(){Zo=Oh=!1;var r=0;Ri!==0&&YS()&&(r=Ri);for(var a=cn(),u=null,c=Ko;c!==null;){var p=c.next,g=v2(c,a);g===0?(c.next=null,u===null?Ko=p:u.next=p,p===null&&(vs=u)):(u=c,(r!==0||(g&3)!==0)&&(Zo=!0)),c=p}Pt!==0&&Pt!==5||Dl(r),Ri!==0&&(Ri=0)}function v2(r,a){for(var u=r.suspendedLanes,c=r.pingedLanes,p=r.expirationTimes,g=r.pendingLanes&-62914561;0<g;){var _=31-pt(g),A=1<<_,B=p[_];B===-1?((A&u)===0||(A&c)!==0)&&(p[_]=l6(A,a)):B<=a&&(r.expiredLanes|=A),g&=~A}if(a=mt,u=We,u=to(r,r===a?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,u===0||r===a&&(st===2||st===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&fr(c),r.callbackNode=null,r.callbackPriority=0;if((u&3)===0||el(r,u)){if(a=u&-u,a===r.callbackPriority)return a;switch(c!==null&&fr(c),Vd(u)){case 2:case 8:u=xe;break;case 32:u=Ie;break;case 268435456:u=it;break;default:u=Ie}return c=_2.bind(null,r),u=on(u,c),r.callbackPriority=a,r.callbackNode=u,a}return c!==null&&c!==null&&fr(c),r.callbackPriority=2,r.callbackNode=null,2}function _2(r,a){if(Pt!==0&&Pt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var u=r.callbackNode;if(Xo()&&r.callbackNode!==u)return null;var c=We;return c=to(r,r===mt?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(r2(r,c,a),v2(r,cn()),r.callbackNode!=null&&r.callbackNode===u?_2.bind(null,r):null)}function T2(r,a){if(Xo())return null;r2(r,a,!0)}function DS(){GS(function(){(rt&6)!==0?on(se,IS):x2()})}function Mh(){if(Ri===0){var r=ss;r===0&&(r=Zu,Zu<<=1,(Zu&261888)===0&&(Zu=256)),Ri=r}return Ri}function A2(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:ao(""+r)}function S2(r,a){var u=a.ownerDocument.createElement("input");return u.name=a.name,u.value=a.value,r.id&&u.setAttribute("form",r.id),a.parentNode.insertBefore(u,a),r=new FormData(r),u.parentNode.removeChild(u),r}function BS(r,a,u,c,p){if(a==="submit"&&u&&u.stateNode===p){var g=A2((p[bn]||null).action),_=c.submitter;_&&(a=(a=_[bn]||null)?A2(a.formAction):_.getAttribute("formAction"),a!==null&&(g=a,_=null));var A=new oo("action","action",null,c,p);r.push({event:A,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Ri!==0){var B=_?S2(p,_):new FormData(p);Jf(u,{pending:!0,data:B,method:p.method,action:g},null,B)}}else typeof g=="function"&&(A.preventDefault(),B=_?S2(p,_):new FormData(p),Jf(u,{pending:!0,data:B,method:p.method,action:g},g,B))},currentTarget:p}]})}}for(var Ih=0;Ih<gf.length;Ih++){var Dh=gf[Ih],zS=Dh.toLowerCase(),PS=Dh[0].toUpperCase()+Dh.slice(1);pr(zS,"on"+PS)}pr(ng,"onAnimationEnd"),pr(rg,"onAnimationIteration"),pr(ig,"onAnimationStart"),pr("dblclick","onDoubleClick"),pr("focusin","onFocus"),pr("focusout","onBlur"),pr(eS,"onTransitionRun"),pr(tS,"onTransitionStart"),pr(nS,"onTransitionCancel"),pr(ag,"onTransitionEnd"),Va("onMouseEnter",["mouseout","mouseover"]),Va("onMouseLeave",["mouseout","mouseover"]),Va("onPointerEnter",["pointerout","pointerover"]),Va("onPointerLeave",["pointerout","pointerover"]),ta("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ta("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ta("onBeforeInput",["compositionend","keypress","textInput","paste"]),ta("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ta("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ta("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),HS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Bl));function w2(r,a){a=(a&4)!==0;for(var u=0;u<r.length;u++){var c=r[u],p=c.event;c=c.listeners;e:{var g=void 0;if(a)for(var _=c.length-1;0<=_;_--){var A=c[_],B=A.instance,Q=A.currentTarget;if(A=A.listener,B!==g&&p.isPropagationStopped())break e;g=A,p.currentTarget=Q;try{g(p)}catch(ae){ho(ae)}p.currentTarget=null,g=B}else for(_=0;_<c.length;_++){if(A=c[_],B=A.instance,Q=A.currentTarget,A=A.listener,B!==g&&p.isPropagationStopped())break e;g=A,p.currentTarget=Q;try{g(p)}catch(ae){ho(ae)}p.currentTarget=null,g=B}}}}function Ve(r,a){var u=a[Gd];u===void 0&&(u=a[Gd]=new Set);var c=r+"__bubble";u.has(c)||(k2(a,r,2,!1),u.add(c))}function Bh(r,a,u){var c=0;a&&(c|=4),k2(u,r,c,a)}var Jo="_reactListening"+Math.random().toString(36).slice(2);function zh(r){if(!r[Jo]){r[Jo]=!0,x1.forEach(function(u){u!=="selectionchange"&&(HS.has(u)||Bh(u,!1,r),Bh(u,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[Jo]||(a[Jo]=!0,Bh("selectionchange",!1,a))}}function k2(r,a,u,c){switch(ny(a)){case 2:var p=hw;break;case 8:p=pw;break;default:p=Zh}u=p.bind(null,a,u,r),p=void 0,!nf||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),c?p!==void 0?r.addEventListener(a,u,{capture:!0,passive:p}):r.addEventListener(a,u,!0):p!==void 0?r.addEventListener(a,u,{passive:p}):r.addEventListener(a,u,!1)}function Ph(r,a,u,c,p){var g=c;if((a&1)===0&&(a&2)===0&&c!==null)e:for(;;){if(c===null)return;var _=c.tag;if(_===3||_===4){var A=c.stateNode.containerInfo;if(A===p)break;if(_===4)for(_=c.return;_!==null;){var B=_.tag;if((B===3||B===4)&&_.stateNode.containerInfo===p)return;_=_.return}for(;A!==null;){if(_=$a(A),_===null)return;if(B=_.tag,B===5||B===6||B===26||B===27){c=g=_;continue e}A=A.parentNode}}c=c.return}L1(function(){var Q=g,ae=ef(u),oe=[];e:{var X=sg.get(r);if(X!==void 0){var Z=oo,Te=r;switch(r){case"keypress":if(lo(u)===0)break e;case"keydown":case"keyup":Z=L6;break;case"focusin":Te="focus",Z=lf;break;case"focusout":Te="blur",Z=lf;break;case"beforeblur":case"afterblur":Z=lf;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=D1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=x6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=D6;break;case ng:case rg:case ig:Z=T6;break;case ag:Z=z6;break;case"scroll":case"scrollend":Z=y6;break;case"wheel":Z=H6;break;case"copy":case"cut":case"paste":Z=S6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=z1;break;case"toggle":case"beforetoggle":Z=j6}var Oe=(a&4)!==0,ft=!Oe&&(r==="scroll"||r==="scrollend"),q=Oe?X!==null?X+"Capture":null:X;Oe=[];for(var U=Q,W;U!==null;){var le=U;if(W=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||W===null||q===null||(le=il(U,q),le!=null&&Oe.push(zl(U,le,W))),ft)break;U=U.return}0<Oe.length&&(X=new Z(X,Te,null,u,ae),oe.push({event:X,listeners:Oe}))}}if((a&7)===0){e:{if(X=r==="mouseover"||r==="pointerover",Z=r==="mouseout"||r==="pointerout",X&&u!==Jd&&(Te=u.relatedTarget||u.fromElement)&&($a(Te)||Te[Fa]))break e;if((Z||X)&&(X=ae.window===ae?ae:(X=ae.ownerDocument)?X.defaultView||X.parentWindow:window,Z?(Te=u.relatedTarget||u.toElement,Z=Q,Te=Te?$a(Te):null,Te!==null&&(ft=l(Te),Oe=Te.tag,Te!==ft||Oe!==5&&Oe!==27&&Oe!==6)&&(Te=null)):(Z=null,Te=Q),Z!==Te)){if(Oe=D1,le="onMouseLeave",q="onMouseEnter",U="mouse",(r==="pointerout"||r==="pointerover")&&(Oe=z1,le="onPointerLeave",q="onPointerEnter",U="pointer"),ft=Z==null?X:rl(Z),W=Te==null?X:rl(Te),X=new Oe(le,U+"leave",Z,u,ae),X.target=ft,X.relatedTarget=W,le=null,$a(ae)===Q&&(Oe=new Oe(q,U+"enter",Te,u,ae),Oe.target=W,Oe.relatedTarget=ft,le=Oe),ft=le,Z&&Te)t:{for(Oe=US,q=Z,U=Te,W=0,le=q;le;le=Oe(le))W++;le=0;for(var Ce=U;Ce;Ce=Oe(Ce))le++;for(;0<W-le;)q=Oe(q),W--;for(;0<le-W;)U=Oe(U),le--;for(;W--;){if(q===U||U!==null&&q===U.alternate){Oe=q;break t}q=Oe(q),U=Oe(U)}Oe=null}else Oe=null;Z!==null&&C2(oe,X,Z,Oe,!1),Te!==null&&ft!==null&&C2(oe,ft,Te,Oe,!0)}}e:{if(X=Q?rl(Q):window,Z=X.nodeName&&X.nodeName.toLowerCase(),Z==="select"||Z==="input"&&X.type==="file")var et=Y1;else if($1(X))if(V1)et=K6;else{et=Q6;var we=W6}else Z=X.nodeName,!Z||Z.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Q&&Zd(Q.elementType)&&(et=Y1):et=X6;if(et&&(et=et(r,Q))){q1(oe,et,u,ae);break e}we&&we(r,X,Q),r==="focusout"&&Q&&X.type==="number"&&Q.memoizedProps.value!=null&&Kd(X,"number",X.value)}switch(we=Q?rl(Q):window,r){case"focusin":($1(we)||we.contentEditable==="true")&&(Za=we,hf=Q,fl=null);break;case"focusout":fl=hf=Za=null;break;case"mousedown":pf=!0;break;case"contextmenu":case"mouseup":case"dragend":pf=!1,eg(oe,u,ae);break;case"selectionchange":if(J6)break;case"keydown":case"keyup":eg(oe,u,ae)}var Pe;if(of)e:{switch(r){case"compositionstart":var Qe="onCompositionStart";break e;case"compositionend":Qe="onCompositionEnd";break e;case"compositionupdate":Qe="onCompositionUpdate";break e}Qe=void 0}else Ka?j1(r,u)&&(Qe="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Qe="onCompositionStart");Qe&&(P1&&u.locale!=="ko"&&(Ka||Qe!=="onCompositionStart"?Qe==="onCompositionEnd"&&Ka&&(Pe=M1()):(pi=ae,rf="value"in pi?pi.value:pi.textContent,Ka=!0)),we=ec(Q,Qe),0<we.length&&(Qe=new B1(Qe,r,null,u,ae),oe.push({event:Qe,listeners:we}),Pe?Qe.data=Pe:(Pe=F1(u),Pe!==null&&(Qe.data=Pe)))),(Pe=$6?q6(r,u):Y6(r,u))&&(Qe=ec(Q,"onBeforeInput"),0<Qe.length&&(we=new B1("onBeforeInput","beforeinput",null,u,ae),oe.push({event:we,listeners:Qe}),we.data=Pe)),BS(oe,r,Q,u,ae)}w2(oe,a)})}function zl(r,a,u){return{instance:r,listener:a,currentTarget:u}}function ec(r,a){for(var u=a+"Capture",c=[];r!==null;){var p=r,g=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||g===null||(p=il(r,u),p!=null&&c.unshift(zl(r,p,g)),p=il(r,a),p!=null&&c.push(zl(r,p,g))),r.tag===3)return c;r=r.return}return[]}function US(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function C2(r,a,u,c,p){for(var g=a._reactName,_=[];u!==null&&u!==c;){var A=u,B=A.alternate,Q=A.stateNode;if(A=A.tag,B!==null&&B===c)break;A!==5&&A!==26&&A!==27||Q===null||(B=Q,p?(Q=il(u,g),Q!=null&&_.unshift(zl(u,Q,B))):p||(Q=il(u,g),Q!=null&&_.push(zl(u,Q,B)))),u=u.return}_.length!==0&&r.push({event:a,listeners:_})}var jS=/\r\n?/g,FS=/\u0000|\uFFFD/g;function N2(r){return(typeof r=="string"?r:""+r).replace(jS,`
|
|
14
|
-
`).replace(FS,"")}function R2(r,a){return a=N2(a),N2(r)===a}function dt(r,a,u,c,p,g){switch(u){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||Wa(r,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&Wa(r,""+c);break;case"className":ro(r,"class",c);break;case"tabIndex":ro(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":ro(r,u,c);break;case"style":R1(r,c,g);break;case"data":if(a!=="object"){ro(r,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||u!=="href")){r.removeAttribute(u);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(u);break}c=ao(""+c),r.setAttribute(u,c);break;case"action":case"formAction":if(typeof c=="function"){r.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(u==="formAction"?(a!=="input"&&dt(r,a,"name",p.name,p,null),dt(r,a,"formEncType",p.formEncType,p,null),dt(r,a,"formMethod",p.formMethod,p,null),dt(r,a,"formTarget",p.formTarget,p,null)):(dt(r,a,"encType",p.encType,p,null),dt(r,a,"method",p.method,p,null),dt(r,a,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(u);break}c=ao(""+c),r.setAttribute(u,c);break;case"onClick":c!=null&&(r.onclick=Ur);break;case"onScroll":c!=null&&Ve("scroll",r);break;case"onScrollEnd":c!=null&&Ve("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(u=c.__html,u!=null){if(p.children!=null)throw Error(i(60));r.innerHTML=u}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}u=ao(""+c),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(u,""+c):r.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(u,""):r.removeAttribute(u);break;case"capture":case"download":c===!0?r.setAttribute(u,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(u,c):r.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(u,c):r.removeAttribute(u);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(u):r.setAttribute(u,c);break;case"popover":Ve("beforetoggle",r),Ve("toggle",r),no(r,"popover",c);break;case"xlinkActuate":Hr(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Hr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Hr(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Hr(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Hr(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Hr(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Hr(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Hr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Hr(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":no(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=g6.get(u)||u,no(r,u,c))}}function Hh(r,a,u,c,p,g){switch(u){case"style":R1(r,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(u=c.__html,u!=null){if(p.children!=null)throw Error(i(60));r.innerHTML=u}}break;case"children":typeof c=="string"?Wa(r,c):(typeof c=="number"||typeof c=="bigint")&&Wa(r,""+c);break;case"onScroll":c!=null&&Ve("scroll",r);break;case"onScrollEnd":c!=null&&Ve("scrollend",r);break;case"onClick":c!=null&&(r.onclick=Ur);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!v1.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(p=u.endsWith("Capture"),a=u.slice(2,p?u.length-7:void 0),g=r[bn]||null,g=g!=null?g[u]:null,typeof g=="function"&&r.removeEventListener(a,g,p),typeof c=="function")){typeof g!="function"&&g!==null&&(u in r?r[u]=null:r.hasAttribute(u)&&r.removeAttribute(u)),r.addEventListener(a,c,p);break e}u in r?r[u]=c:c===!0?r.setAttribute(u,""):no(r,u,c)}}}function en(r,a,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",r),Ve("load",r);var c=!1,p=!1,g;for(g in u)if(u.hasOwnProperty(g)){var _=u[g];if(_!=null)switch(g){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:dt(r,a,g,_,u,null)}}p&&dt(r,a,"srcSet",u.srcSet,u,null),c&&dt(r,a,"src",u.src,u,null);return;case"input":Ve("invalid",r);var A=g=_=p=null,B=null,Q=null;for(c in u)if(u.hasOwnProperty(c)){var ae=u[c];if(ae!=null)switch(c){case"name":p=ae;break;case"type":_=ae;break;case"checked":B=ae;break;case"defaultChecked":Q=ae;break;case"value":g=ae;break;case"defaultValue":A=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(i(137,a));break;default:dt(r,a,c,ae,u,null)}}w1(r,g,A,B,Q,_,p,!1);return;case"select":Ve("invalid",r),c=_=g=null;for(p in u)if(u.hasOwnProperty(p)&&(A=u[p],A!=null))switch(p){case"value":g=A;break;case"defaultValue":_=A;break;case"multiple":c=A;default:dt(r,a,p,A,u,null)}a=g,u=_,r.multiple=!!c,a!=null?Ga(r,!!c,a,!1):u!=null&&Ga(r,!!c,u,!0);return;case"textarea":Ve("invalid",r),g=p=c=null;for(_ in u)if(u.hasOwnProperty(_)&&(A=u[_],A!=null))switch(_){case"value":c=A;break;case"defaultValue":p=A;break;case"children":g=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(i(91));break;default:dt(r,a,_,A,u,null)}C1(r,c,p,g);return;case"option":for(B in u)u.hasOwnProperty(B)&&(c=u[B],c!=null)&&(B==="selected"?r.selected=c&&typeof c!="function"&&typeof c!="symbol":dt(r,a,B,c,u,null));return;case"dialog":Ve("beforetoggle",r),Ve("toggle",r),Ve("cancel",r),Ve("close",r);break;case"iframe":case"object":Ve("load",r);break;case"video":case"audio":for(c=0;c<Bl.length;c++)Ve(Bl[c],r);break;case"image":Ve("error",r),Ve("load",r);break;case"details":Ve("toggle",r);break;case"embed":case"source":case"link":Ve("error",r),Ve("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in u)if(u.hasOwnProperty(Q)&&(c=u[Q],c!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:dt(r,a,Q,c,u,null)}return;default:if(Zd(a)){for(ae in u)u.hasOwnProperty(ae)&&(c=u[ae],c!==void 0&&Hh(r,a,ae,c,u,void 0));return}}for(A in u)u.hasOwnProperty(A)&&(c=u[A],c!=null&&dt(r,a,A,c,u,null))}function $S(r,a,u,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,g=null,_=null,A=null,B=null,Q=null,ae=null;for(Z in u){var oe=u[Z];if(u.hasOwnProperty(Z)&&oe!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":B=oe;default:c.hasOwnProperty(Z)||dt(r,a,Z,null,c,oe)}}for(var X in c){var Z=c[X];if(oe=u[X],c.hasOwnProperty(X)&&(Z!=null||oe!=null))switch(X){case"type":g=Z;break;case"name":p=Z;break;case"checked":Q=Z;break;case"defaultChecked":ae=Z;break;case"value":_=Z;break;case"defaultValue":A=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(i(137,a));break;default:Z!==oe&&dt(r,a,X,Z,c,oe)}}Xd(r,_,A,B,Q,ae,g,p);return;case"select":Z=_=A=X=null;for(g in u)if(B=u[g],u.hasOwnProperty(g)&&B!=null)switch(g){case"value":break;case"multiple":Z=B;default:c.hasOwnProperty(g)||dt(r,a,g,null,c,B)}for(p in c)if(g=c[p],B=u[p],c.hasOwnProperty(p)&&(g!=null||B!=null))switch(p){case"value":X=g;break;case"defaultValue":A=g;break;case"multiple":_=g;default:g!==B&&dt(r,a,p,g,c,B)}a=A,u=_,c=Z,X!=null?Ga(r,!!u,X,!1):!!c!=!!u&&(a!=null?Ga(r,!!u,a,!0):Ga(r,!!u,u?[]:"",!1));return;case"textarea":Z=X=null;for(A in u)if(p=u[A],u.hasOwnProperty(A)&&p!=null&&!c.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:dt(r,a,A,null,c,p)}for(_ in c)if(p=c[_],g=u[_],c.hasOwnProperty(_)&&(p!=null||g!=null))switch(_){case"value":X=p;break;case"defaultValue":Z=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==g&&dt(r,a,_,p,c,g)}k1(r,X,Z);return;case"option":for(var Te in u)X=u[Te],u.hasOwnProperty(Te)&&X!=null&&!c.hasOwnProperty(Te)&&(Te==="selected"?r.selected=!1:dt(r,a,Te,null,c,X));for(B in c)X=c[B],Z=u[B],c.hasOwnProperty(B)&&X!==Z&&(X!=null||Z!=null)&&(B==="selected"?r.selected=X&&typeof X!="function"&&typeof X!="symbol":dt(r,a,B,X,c,Z));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Oe in u)X=u[Oe],u.hasOwnProperty(Oe)&&X!=null&&!c.hasOwnProperty(Oe)&&dt(r,a,Oe,null,c,X);for(Q in c)if(X=c[Q],Z=u[Q],c.hasOwnProperty(Q)&&X!==Z&&(X!=null||Z!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(137,a));break;default:dt(r,a,Q,X,c,Z)}return;default:if(Zd(a)){for(var ft in u)X=u[ft],u.hasOwnProperty(ft)&&X!==void 0&&!c.hasOwnProperty(ft)&&Hh(r,a,ft,void 0,c,X);for(ae in c)X=c[ae],Z=u[ae],!c.hasOwnProperty(ae)||X===Z||X===void 0&&Z===void 0||Hh(r,a,ae,X,c,Z);return}}for(var q in u)X=u[q],u.hasOwnProperty(q)&&X!=null&&!c.hasOwnProperty(q)&&dt(r,a,q,null,c,X);for(oe in c)X=c[oe],Z=u[oe],!c.hasOwnProperty(oe)||X===Z||X==null&&Z==null||dt(r,a,oe,X,c,Z)}function O2(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function qS(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,u=performance.getEntriesByType("resource"),c=0;c<u.length;c++){var p=u[c],g=p.transferSize,_=p.initiatorType,A=p.duration;if(g&&A&&O2(_)){for(_=0,A=p.responseEnd,c+=1;c<u.length;c++){var B=u[c],Q=B.startTime;if(Q>A)break;var ae=B.transferSize,oe=B.initiatorType;ae&&O2(oe)&&(B=B.responseEnd,_+=ae*(B<A?1:(A-Q)/(B-Q)))}if(--c,a+=8*(g+_)/(p.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Uh=null,jh=null;function tc(r){return r.nodeType===9?r:r.ownerDocument}function L2(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function M2(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function Fh(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var $h=null;function YS(){var r=window.event;return r&&r.type==="popstate"?r===$h?!1:($h=r,!0):($h=null,!1)}var I2=typeof setTimeout=="function"?setTimeout:void 0,VS=typeof clearTimeout=="function"?clearTimeout:void 0,D2=typeof Promise=="function"?Promise:void 0,GS=typeof queueMicrotask=="function"?queueMicrotask:typeof D2<"u"?function(r){return D2.resolve(null).then(r).catch(WS)}:I2;function WS(r){setTimeout(function(){throw r})}function Oi(r){return r==="head"}function B2(r,a){var u=a,c=0;do{var p=u.nextSibling;if(r.removeChild(u),p&&p.nodeType===8)if(u=p.data,u==="/$"||u==="/&"){if(c===0){r.removeChild(p),Ss(a);return}c--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")c++;else if(u==="html")Pl(r.ownerDocument.documentElement);else if(u==="head"){u=r.ownerDocument.head,Pl(u);for(var g=u.firstChild;g;){var _=g.nextSibling,A=g.nodeName;g[nl]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&g.rel.toLowerCase()==="stylesheet"||u.removeChild(g),g=_}}else u==="body"&&Pl(r.ownerDocument.body);u=p}while(u);Ss(a)}function z2(r,a){var u=r;r=0;do{var c=u.nextSibling;if(u.nodeType===1?a?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(a?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),c&&c.nodeType===8)if(u=c.data,u==="/$"){if(r===0)break;r--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||r++;u=c}while(u)}function qh(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var u=a;switch(a=a.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":qh(u),Wd(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}r.removeChild(u)}}function QS(r,a,u,c){for(;r.nodeType===1;){var p=u;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[nl])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(g=r.getAttribute("rel"),g==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(g!==p.rel||r.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||r.getAttribute("title")!==(p.title==null?null:p.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(g=r.getAttribute("src"),(g!==(p.src==null?null:p.src)||r.getAttribute("type")!==(p.type==null?null:p.type)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&g&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var g=p.name==null?null:""+p.name;if(p.type==="hidden"&&r.getAttribute("name")===g)return r}else return r;if(r=nr(r.nextSibling),r===null)break}return null}function XS(r,a,u){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!u||(r=nr(r.nextSibling),r===null))return null;return r}function P2(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=nr(r.nextSibling),r===null))return null;return r}function Yh(r){return r.data==="$?"||r.data==="$~"}function Vh(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function KS(r,a){var u=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||u.readyState!=="loading")a();else{var c=function(){a(),u.removeEventListener("DOMContentLoaded",c)};u.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function nr(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var Gh=null;function H2(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"||u==="/&"){if(a===0)return nr(r.nextSibling);a--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||a++}r=r.nextSibling}return null}function U2(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(a===0)return r;a--}else u!=="/$"&&u!=="/&"||a++}r=r.previousSibling}return null}function j2(r,a,u){switch(a=tc(u),r){case"html":if(r=a.documentElement,!r)throw Error(i(452));return r;case"head":if(r=a.head,!r)throw Error(i(453));return r;case"body":if(r=a.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function Pl(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);Wd(r)}var rr=new Map,F2=new Set;function nc(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var ni=ie.d;ie.d={f:ZS,r:JS,D:ew,C:tw,L:nw,m:rw,X:aw,S:iw,M:sw};function ZS(){var r=ni.f(),a=Go();return r||a}function JS(r){var a=qa(r);a!==null&&a.tag===5&&a.type==="form"?ab(a):ni.r(r)}var _s=typeof document>"u"?null:document;function $2(r,a,u){var c=_s;if(c&&typeof a=="string"&&a){var p=Qn(a);p='link[rel="'+r+'"][href="'+p+'"]',typeof u=="string"&&(p+='[crossorigin="'+u+'"]'),F2.has(p)||(F2.add(p),r={rel:r,crossOrigin:u,href:a},c.querySelector(p)===null&&(a=c.createElement("link"),en(a,"link",r),Ft(a),c.head.appendChild(a)))}}function ew(r){ni.D(r),$2("dns-prefetch",r,null)}function tw(r,a){ni.C(r,a),$2("preconnect",r,a)}function nw(r,a,u){ni.L(r,a,u);var c=_s;if(c&&r&&a){var p='link[rel="preload"][as="'+Qn(a)+'"]';a==="image"&&u&&u.imageSrcSet?(p+='[imagesrcset="'+Qn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(p+='[imagesizes="'+Qn(u.imageSizes)+'"]')):p+='[href="'+Qn(r)+'"]';var g=p;switch(a){case"style":g=Ts(r);break;case"script":g=As(r)}rr.has(g)||(r=b({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:r,as:a},u),rr.set(g,r),c.querySelector(p)!==null||a==="style"&&c.querySelector(Hl(g))||a==="script"&&c.querySelector(Ul(g))||(a=c.createElement("link"),en(a,"link",r),Ft(a),c.head.appendChild(a)))}}function rw(r,a){ni.m(r,a);var u=_s;if(u&&r){var c=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+Qn(c)+'"][href="'+Qn(r)+'"]',g=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=As(r)}if(!rr.has(g)&&(r=b({rel:"modulepreload",href:r},a),rr.set(g,r),u.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Ul(g)))return}c=u.createElement("link"),en(c,"link",r),Ft(c),u.head.appendChild(c)}}}function iw(r,a,u){ni.S(r,a,u);var c=_s;if(c&&r){var p=Ya(c).hoistableStyles,g=Ts(r);a=a||"default";var _=p.get(g);if(!_){var A={loading:0,preload:null};if(_=c.querySelector(Hl(g)))A.loading=5;else{r=b({rel:"stylesheet",href:r,"data-precedence":a},u),(u=rr.get(g))&&Wh(r,u);var B=_=c.createElement("link");Ft(B),en(B,"link",r),B._p=new Promise(function(Q,ae){B.onload=Q,B.onerror=ae}),B.addEventListener("load",function(){A.loading|=1}),B.addEventListener("error",function(){A.loading|=2}),A.loading|=4,rc(_,a,c)}_={type:"stylesheet",instance:_,count:1,state:A},p.set(g,_)}}}function aw(r,a){ni.X(r,a);var u=_s;if(u&&r){var c=Ya(u).hoistableScripts,p=As(r),g=c.get(p);g||(g=u.querySelector(Ul(p)),g||(r=b({src:r,async:!0},a),(a=rr.get(p))&&Qh(r,a),g=u.createElement("script"),Ft(g),en(g,"link",r),u.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function sw(r,a){ni.M(r,a);var u=_s;if(u&&r){var c=Ya(u).hoistableScripts,p=As(r),g=c.get(p);g||(g=u.querySelector(Ul(p)),g||(r=b({src:r,async:!0,type:"module"},a),(a=rr.get(p))&&Qh(r,a),g=u.createElement("script"),Ft(g),en(g,"link",r),u.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function q2(r,a,u,c){var p=(p=ye.current)?nc(p):null;if(!p)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=Ts(u.href),u=Ya(p).hoistableStyles,c=u.get(a),c||(c={type:"style",instance:null,count:0,state:null},u.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){r=Ts(u.href);var g=Ya(p).hoistableStyles,_=g.get(r);if(_||(p=p.ownerDocument||p,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(r,_),(g=p.querySelector(Hl(r)))&&!g._p&&(_.instance=g,_.state.loading=5),rr.has(r)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},rr.set(r,u),g||lw(p,r,u,_.state))),a&&c===null)throw Error(i(528,""));return _}if(a&&c!==null)throw Error(i(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=As(u),u=Ya(p).hoistableScripts,c=u.get(a),c||(c={type:"script",instance:null,count:0,state:null},u.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function Ts(r){return'href="'+Qn(r)+'"'}function Hl(r){return'link[rel="stylesheet"]['+r+"]"}function Y2(r){return b({},r,{"data-precedence":r.precedence,precedence:null})}function lw(r,a,u,c){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=r.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),en(a,"link",u),Ft(a),r.head.appendChild(a))}function As(r){return'[src="'+Qn(r)+'"]'}function Ul(r){return"script[async]"+r}function V2(r,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var c=r.querySelector('style[data-href~="'+Qn(u.href)+'"]');if(c)return a.instance=c,Ft(c),c;var p=b({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),Ft(c),en(c,"style",p),rc(c,u.precedence,r),a.instance=c;case"stylesheet":p=Ts(u.href);var g=r.querySelector(Hl(p));if(g)return a.state.loading|=4,a.instance=g,Ft(g),g;c=Y2(u),(p=rr.get(p))&&Wh(c,p),g=(r.ownerDocument||r).createElement("link"),Ft(g);var _=g;return _._p=new Promise(function(A,B){_.onload=A,_.onerror=B}),en(g,"link",c),a.state.loading|=4,rc(g,u.precedence,r),a.instance=g;case"script":return g=As(u.src),(p=r.querySelector(Ul(g)))?(a.instance=p,Ft(p),p):(c=u,(p=rr.get(g))&&(c=b({},u),Qh(c,p)),r=r.ownerDocument||r,p=r.createElement("script"),Ft(p),en(p,"link",c),r.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,rc(c,u.precedence,r));return a.instance}function rc(r,a,u){for(var c=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,g=p,_=0;_<c.length;_++){var A=c[_];if(A.dataset.precedence===a)g=A;else if(g!==p)break}g?g.parentNode.insertBefore(r,g.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(r,a.firstChild))}function Wh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function Qh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var ic=null;function G2(r,a,u){if(ic===null){var c=new Map,p=ic=new Map;p.set(u,c)}else p=ic,c=p.get(u),c||(c=new Map,p.set(u,c));if(c.has(r))return c;for(c.set(r,null),u=u.getElementsByTagName(r),p=0;p<u.length;p++){var g=u[p];if(!(g[nl]||g[Xt]||r==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var _=g.getAttribute(a)||"";_=r+_;var A=c.get(_);A?A.push(g):c.set(_,[g])}}return c}function W2(r,a,u){r=r.ownerDocument||r,r.head.insertBefore(u,a==="title"?r.querySelector("head > title"):null)}function uw(r,a,u){if(u===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Q2(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function ow(r,a,u,c){if(u.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var p=Ts(c.href),g=a.querySelector(Hl(p));if(g){a=g._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=ac.bind(r),a.then(r,r)),u.state.loading|=4,u.instance=g,Ft(g);return}g=a.ownerDocument||a,c=Y2(c),(p=rr.get(p))&&Wh(c,p),g=g.createElement("link"),Ft(g);var _=g;_._p=new Promise(function(A,B){_.onload=A,_.onerror=B}),en(g,"link",c),u.instance=g}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(r.count++,u=ac.bind(r),a.addEventListener("load",u),a.addEventListener("error",u))}}var Xh=0;function cw(r,a){return r.stylesheets&&r.count===0&&lc(r,r.stylesheets),0<r.count||0<r.imgCount?function(u){var c=setTimeout(function(){if(r.stylesheets&&lc(r,r.stylesheets),r.unsuspend){var g=r.unsuspend;r.unsuspend=null,g()}},6e4+a);0<r.imgBytes&&Xh===0&&(Xh=62500*qS());var p=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&lc(r,r.stylesheets),r.unsuspend)){var g=r.unsuspend;r.unsuspend=null,g()}},(r.imgBytes>Xh?50:800)+a);return r.unsuspend=u,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function ac(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lc(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var sc=null;function lc(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,sc=new Map,a.forEach(dw,r),sc=null,ac.call(r))}function dw(r,a){if(!(a.state.loading&4)){var u=sc.get(r);if(u)var c=u.get(null);else{u=new Map,sc.set(r,u);for(var p=r.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<p.length;g++){var _=p[g];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(u.set(_.dataset.precedence,_),c=_)}c&&u.set(null,c)}p=a.instance,_=p.getAttribute("data-precedence"),g=u.get(_)||c,g===c&&u.set(null,p),u.set(_,p),this.count++,c=ac.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),g?g.parentNode.insertBefore(p,g.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(p,r.firstChild)),a.state.loading|=4}}var jl={$$typeof:P,Provider:null,Consumer:null,_currentValue:Ee,_currentValue2:Ee,_threadCount:0};function fw(r,a,u,c,p,g,_,A,B){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=qd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qd(0),this.hiddenUpdates=qd(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=g,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function X2(r,a,u,c,p,g,_,A,B,Q,ae,oe){return r=new fw(r,a,u,_,B,Q,ae,oe,A),a=1,g===!0&&(a|=24),g=Dn(3,null,null,a),r.current=g,g.stateNode=r,a=Nf(),a.refCount++,r.pooledCache=a,a.refCount++,g.memoizedState={element:c,isDehydrated:u,cache:a},Mf(g),r}function K2(r){return r?(r=ts,r):ts}function Z2(r,a,u,c,p,g){p=K2(p),c.context===null?c.context=p:c.pendingContext=p,c=xi(a),c.payload={element:u},g=g===void 0?null:g,g!==null&&(c.callback=g),u=vi(r,c,a),u!==null&&(Tn(u,r,a),El(u,r,a))}function J2(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<a?u:a}}function Kh(r,a){J2(r,a),(r=r.alternate)&&J2(r,a)}function ey(r){if(r.tag===13||r.tag===31){var a=aa(r,67108864);a!==null&&Tn(a,r,67108864),Kh(r,67108864)}}function ty(r){if(r.tag===13||r.tag===31){var a=Un();a=Yd(a);var u=aa(r,a);u!==null&&Tn(u,r,a),Kh(r,a)}}var uc=!0;function hw(r,a,u,c){var p=I.T;I.T=null;var g=ie.p;try{ie.p=2,Zh(r,a,u,c)}finally{ie.p=g,I.T=p}}function pw(r,a,u,c){var p=I.T;I.T=null;var g=ie.p;try{ie.p=8,Zh(r,a,u,c)}finally{ie.p=g,I.T=p}}function Zh(r,a,u,c){if(uc){var p=Jh(c);if(p===null)Ph(r,a,c,oc,u),ry(r,c);else if(gw(p,r,a,u,c))c.stopPropagation();else if(ry(r,c),a&4&&-1<mw.indexOf(r)){for(;p!==null;){var g=qa(p);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var _=ea(g.pendingLanes);if(_!==0){var A=g;for(A.pendingLanes|=2,A.entangledLanes|=2;_;){var B=1<<31-pt(_);A.entanglements[1]|=B,_&=~B}wr(g),(rt&6)===0&&(Yo=cn()+500,Dl(0))}}break;case 31:case 13:A=aa(g,2),A!==null&&Tn(A,g,2),Go(),Kh(g,2)}if(g=Jh(c),g===null&&Ph(r,a,c,oc,u),g===p)break;p=g}p!==null&&c.stopPropagation()}else Ph(r,a,c,null,u)}}function Jh(r){return r=ef(r),e0(r)}var oc=null;function e0(r){if(oc=null,r=$a(r),r!==null){var a=l(r);if(a===null)r=null;else{var u=a.tag;if(u===13){if(r=o(a),r!==null)return r;r=null}else if(u===31){if(r=d(a),r!==null)return r;r=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return oc=r,null}function ny(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($d()){case se:return 2;case xe:return 8;case Ie:case qe:return 32;case it:return 268435456;default:return 32}default:return 32}}var t0=!1,Li=null,Mi=null,Ii=null,Fl=new Map,$l=new Map,Di=[],mw="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ry(r,a){switch(r){case"focusin":case"focusout":Li=null;break;case"dragenter":case"dragleave":Mi=null;break;case"mouseover":case"mouseout":Ii=null;break;case"pointerover":case"pointerout":Fl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":$l.delete(a.pointerId)}}function ql(r,a,u,c,p,g){return r===null||r.nativeEvent!==g?(r={blockedOn:a,domEventName:u,eventSystemFlags:c,nativeEvent:g,targetContainers:[p]},a!==null&&(a=qa(a),a!==null&&ey(a)),r):(r.eventSystemFlags|=c,a=r.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),r)}function gw(r,a,u,c,p){switch(a){case"focusin":return Li=ql(Li,r,a,u,c,p),!0;case"dragenter":return Mi=ql(Mi,r,a,u,c,p),!0;case"mouseover":return Ii=ql(Ii,r,a,u,c,p),!0;case"pointerover":var g=p.pointerId;return Fl.set(g,ql(Fl.get(g)||null,r,a,u,c,p)),!0;case"gotpointercapture":return g=p.pointerId,$l.set(g,ql($l.get(g)||null,r,a,u,c,p)),!0}return!1}function iy(r){var a=$a(r.target);if(a!==null){var u=l(a);if(u!==null){if(a=u.tag,a===13){if(a=o(u),a!==null){r.blockedOn=a,y1(r.priority,function(){ty(u)});return}}else if(a===31){if(a=d(u),a!==null){r.blockedOn=a,y1(r.priority,function(){ty(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function cc(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var u=Jh(r.nativeEvent);if(u===null){u=r.nativeEvent;var c=new u.constructor(u.type,u);Jd=c,u.target.dispatchEvent(c),Jd=null}else return a=qa(u),a!==null&&ey(a),r.blockedOn=u,!1;a.shift()}return!0}function ay(r,a,u){cc(r)&&u.delete(a)}function bw(){t0=!1,Li!==null&&cc(Li)&&(Li=null),Mi!==null&&cc(Mi)&&(Mi=null),Ii!==null&&cc(Ii)&&(Ii=null),Fl.forEach(ay),$l.forEach(ay)}function dc(r,a){r.blockedOn===a&&(r.blockedOn=null,t0||(t0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,bw)))}var fc=null;function sy(r){fc!==r&&(fc=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){fc===r&&(fc=null);for(var a=0;a<r.length;a+=3){var u=r[a],c=r[a+1],p=r[a+2];if(typeof c!="function"){if(e0(c||u)===null)continue;break}var g=qa(u);g!==null&&(r.splice(a,3),a-=3,Jf(g,{pending:!0,data:p,method:u.method,action:c},c,p))}}))}function Ss(r){function a(B){return dc(B,r)}Li!==null&&dc(Li,r),Mi!==null&&dc(Mi,r),Ii!==null&&dc(Ii,r),Fl.forEach(a),$l.forEach(a);for(var u=0;u<Di.length;u++){var c=Di[u];c.blockedOn===r&&(c.blockedOn=null)}for(;0<Di.length&&(u=Di[0],u.blockedOn===null);)iy(u),u.blockedOn===null&&Di.shift();if(u=(r.ownerDocument||r).$$reactFormReplay,u!=null)for(c=0;c<u.length;c+=3){var p=u[c],g=u[c+1],_=p[bn]||null;if(typeof g=="function")_||sy(u);else if(_){var A=null;if(g&&g.hasAttribute("formAction")){if(p=g,_=g[bn]||null)A=_.formAction;else if(e0(p)!==null)continue}else A=_.action;typeof A=="function"?u[c+1]=A:(u.splice(c,3),c-=3),sy(u)}}}function ly(){function r(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(_){return p=_})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),c||setTimeout(u,20)}function u(){if(!c&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(u,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function n0(r){this._internalRoot=r}hc.prototype.render=n0.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var u=a.current,c=Un();Z2(u,c,r,a,null,null)},hc.prototype.unmount=n0.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;Z2(r.current,2,null,r,null,null),Go(),a[Fa]=null}};function hc(r){this._internalRoot=r}hc.prototype.unstable_scheduleHydration=function(r){if(r){var a=b1();r={blockedOn:null,target:r,priority:a};for(var u=0;u<Di.length&&a!==0&&a<Di[u].priority;u++);Di.splice(u,0,r),u===0&&iy(r)}};var uy=t.version;if(uy!=="19.2.4")throw Error(i(527,uy,"19.2.4"));ie.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=f(a),r=r!==null?m(r):null,r=r===null?null:r.stateNode,r};var yw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var pc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pc.isDisabled&&pc.supportsFiber)try{dn=pc.inject(yw),zt=pc}catch{}}return Gl.createRoot=function(r,a){if(!s(r))throw Error(i(299));var u=!1,c="",p=mb,g=gb,_=bb;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError)),a=X2(r,1,!1,null,null,u,c,null,p,g,_,ly),r[Fa]=a.current,zh(r),new n0(a)},Gl.hydrateRoot=function(r,a,u){if(!s(r))throw Error(i(299));var c=!1,p="",g=mb,_=gb,A=bb,B=null;return u!=null&&(u.unstable_strictMode===!0&&(c=!0),u.identifierPrefix!==void 0&&(p=u.identifierPrefix),u.onUncaughtError!==void 0&&(g=u.onUncaughtError),u.onCaughtError!==void 0&&(_=u.onCaughtError),u.onRecoverableError!==void 0&&(A=u.onRecoverableError),u.formState!==void 0&&(B=u.formState)),a=X2(r,1,!0,a,u??null,c,p,B,g,_,A,ly),a.context=K2(null),u=a.current,c=Un(),c=Yd(c),p=xi(c),p.callback=null,vi(u,p,c),u=c,a.current.lanes=u,tl(a,u),wr(a),r[Fa]=a.current,zh(r),new hc(a)},Gl.version="19.2.4",Gl}var Dy;function oC(){if(Dy)return c0.exports;Dy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),c0.exports=uC(),c0.exports}var yp=oC();function pm(e,t,n){const i=e.slice(t);return!i||i==="/"||i==="\\"?n:i.startsWith("/")||i.startsWith("\\")?`${n}${i}`:`${n}/${i}`}function cC(e){const t=e.match(/^(.*[\\/])home[\\/][^\\/]+(?=([\\/]|$))/i);return!t||typeof t[0]!="string"?null:pm(e,t[0].length,"<dt-home>")}function dC(e){const t=e.match(/^(.*[\\/])(?=(home|miniapps|ai-sessions)([\\/]|$))/i);return!t||typeof t[1]!="string"?null:pm(e,t[1].length,"<dt-data>")}function fC(e){const t=e.match(/^((?:[A-Za-z]:)?[\\/](?:Users|home)[\\/][^\\/]+)(?=([\\/]|$))/);return!t||typeof t[1]!="string"?null:pm(e,t[1].length,"~")}function hC(e){return cC(e)??dC(e)??fC(e)??e}const Qv=C.createContext(null),mm=C.createContext(null);function tG({windowId:e,children:t}){return v.jsx(mm.Provider,{value:e,children:t})}function pC(){const e=C.useContext(mm);if(!e)throw new Error("useWindowId must be used inside a <WindowIdProvider>");return e}function gc(e,t){window.dispatchEvent(new CustomEvent("desktalk:actions-changed",{detail:{windowId:e,actions:t}}))}function nG({children:e}){const t=C.useRef(new Map),n=C.useContext(mm),i=C.useMemo(()=>({register(s){t.current.set(s.name,s),n&&gc(n,Array.from(t.current.values()))},unregister(s){t.current.delete(s),n&&gc(n,Array.from(t.current.values()))}}),[n]);return C.useEffect(()=>{if(n)return gc(n,Array.from(t.current.values())),()=>{gc(n,[])}},[n]),v.jsx(Qv.Provider,{value:i,children:e})}function rG({name:e,description:t,params:n,handler:i}){const s=C.useContext(Qv);return C.useEffect(()=>{if(s)return s.register({name:e,description:t,params:n,handler:i}),()=>{s.unregister(e)}},[s,e,t,n,i]),null}const Xv=C.createContext(null);function iG({miniAppId:e,children:t}){return qi.createElement(Xv.Provider,{value:e},t)}function mC(){const e=C.useContext(Xv);if(!e)throw new Error("useMiniAppId must be used inside a <MiniAppIdProvider>");return e}let Bc=null;const Ep=new Map,va=new Map,_a=new Map,gC=5e3,bC=200;let yC=0;function EC(){return`req-${++yC}-${Date.now()}`}function xC(e){Bc=e,e.addEventListener("message",t=>{try{const n=JSON.parse(t.data);if(n.type==="command:response"){const i=Ep.get(n.requestId);i&&(Ep.delete(n.requestId),n.error?i.reject(new Error(n.error)):i.resolve(n.data))}else if(n.type==="event"){typeof window<"u"&&window.dispatchEvent(new CustomEvent("desktalk:event",{detail:{miniAppId:typeof n.miniAppId=="string"?n.miniAppId:null,event:typeof n.event=="string"?n.event:null,data:n.data}}));const i=va.get(n.event);if(i&&i.size>0)for(const s of i)s(n.data);else{_a.has(n.event)||_a.set(n.event,[]);const s=_a.get(n.event),l=setTimeout(()=>{const o=_a.get(n.event);if(o){const d=o.findIndex(h=>h.timer===l);d!==-1&&o.splice(d,1),o.length===0&&_a.delete(n.event)}},gC);for(s.push({data:n.data,timer:l});s.length>bC;){const o=s.shift();clearTimeout(o.timer)}}}}catch{}})}function aG(e){const t=mC();return C.useCallback(n=>new Promise((i,s)=>{if(!Bc||Bc.readyState!==WebSocket.OPEN){s(new Error("WebSocket not connected"));return}const l=EC();Ep.set(l,{resolve:i,reject:s}),Bc.send(JSON.stringify({type:"command:invoke",miniAppId:t,command:e,requestId:l,data:n??null}))}),[t,e])}function sG(e,t){const n=C.useRef(t);n.current=t,C.useEffect(()=>{const i=l=>{n.current(l)};va.has(e)||va.set(e,new Set),va.get(e).add(i);const s=_a.get(e);if(s&&s.length>0){const l=[...s];for(const o of l)clearTimeout(o.timer);_a.delete(e);for(const o of l)i(o.data)}return()=>{va.get(e)?.delete(i),va.get(e)?.size===0&&va.delete(e)}},[e])}function lG(){return C.useCallback((e,t)=>{window.dispatchEvent(new CustomEvent("desktalk:open-window",{detail:{miniAppId:e,args:t}}))},[])}function uG(e){const t=pC(),n=C.useRef(e);n.current=e,C.useEffect(()=>{const i=s=>{const l=s.detail;l.windowId===t&&n.current(l.args)};return window.addEventListener("desktalk:window-args-updated",i),()=>window.removeEventListener("desktalk:window-args-updated",i)},[t])}const vC=C.createContext({locale:"en",messages:{}});C.createContext(null);let Kv={messages:{}};function _C(e,t){return t?e.replace(/\{([A-Za-z_$][\w$]*)\}/g,(n,i)=>{const s=t[i];return s==null?"":String(s)}):e}function TC(e,t,n,i,s){const l=e.messages[t]?.[n]??i;return _C(l,s)}function Wl(e){return TC(Kv,e.scope,e.key,e.defaultText,e.params)}function AC({locale:e,messages:t,children:n}){const i=C.useMemo(()=>({locale:e,messages:t}),[e,t]);return Kv=i,qi.createElement(vC.Provider,{value:i},n)}var SC=function(e){return typeof e=="function"},Ms=function(e){var t=C.useRef(e);t.current=C.useMemo(function(){return e},[e]);var n=C.useRef(void 0);return n.current||(n.current=function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return t.current.apply(this,i)}),n.current};function By(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function Zv(e){var t=C.useRef(e);return t.current=e,t}var wC=function(e){var t=Zv(e);C.useEffect(function(){return function(){t.current()}},[])},kC=!!(typeof window<"u"&&window.document&&window.document.createElement);function Jv(e,t){if(kC){if(!e)return t;var n;return SC(e)?n=e():"current"in e?n=e.current:n=e,n}}var CC=function(e){var t=function(n,i,s){var l=C.useRef(!1),o=C.useRef([]),d=C.useRef([]),h=C.useRef(void 0);e(function(){var f,m=Array.isArray(s)?s:[s],b=m.map(function(x){return Jv(x)});if(!l.current){l.current=!0,o.current=b,d.current=i,h.current=n();return}(b.length!==o.current.length||!By(o.current,b)||!By(d.current,i))&&((f=h.current)===null||f===void 0||f.call(h),o.current=b,d.current=i,h.current=n())}),wC(function(){var f;(f=h.current)===null||f===void 0||f.call(h),l.current=!1})};return t},NC=CC(C.useEffect);function lu(e,t,n){n===void 0&&(n={});var i=n.enable,s=i===void 0?!0:i,l=Zv(t);NC(function(){if(s){var o=Jv(n.target,window);if(o?.addEventListener){var d=function(f){return l.current(f)},h=Array.isArray(e)?e:[e];return h.forEach(function(f){o.addEventListener(f,d,{capture:n.capture,once:n.once,passive:n.passive})}),function(){h.forEach(function(f){o.removeEventListener(f,d,{capture:n.capture})})}}}},[e,n.capture,n.once,n.passive,s],n.target)}const zy=e=>{let t;const n=new Set,i=(f,m)=>{const b=typeof f=="function"?f(t):f;if(!Object.is(b,t)){const x=t;t=m??(typeof b!="object"||b===null)?b:Object.assign({},t,b),n.forEach(E=>E(t,x))}},s=()=>t,d={setState:i,getState:s,getInitialState:()=>h,subscribe:f=>(n.add(f),()=>n.delete(f))},h=t=e(i,s,d);return d},RC=(e=>e?zy(e):zy),OC=e=>e;function LC(e,t=OC){const n=qi.useSyncExternalStore(e.subscribe,qi.useCallback(()=>t(e.getState()),[e,t]),qi.useCallback(()=>t(e.getInitialState()),[e,t]));return qi.useDebugValue(n),n}const Py=e=>{const t=RC(e),n=i=>LC(t,i);return Object.assign(n,t),n},Uu=(e=>e?Py(e):Py);function uu(e,t,n){if(e.type==="leaf")return[{windowId:e.windowId,x:t.x+n,y:t.y+n,width:Math.max(t.width-n*2,0),height:Math.max(t.height-n*2,0)}];const{split:i,ratio:s,children:l}=e,o=n/2;if(i==="horizontal"){const f=Math.round(t.width*s),m=t.width-f;return[...uu(l[0],{...t,width:f-o},n),...uu(l[1],{x:t.x+f+o,y:t.y,width:m-o,height:t.height},n)]}const d=Math.round(t.height*s),h=t.height-d;return[...uu(l[0],{...t,height:d-o},n),...uu(l[1],{x:t.x,y:t.y+d+o,width:t.width,height:h-o},n)]}function Is(e){return e.type==="leaf"?[e.windowId]:[...Is(e.children[0]),...Is(e.children[1])]}function xp(e,t){return e.type==="leaf"?e.windowId===t?e:null:xp(e.children[0],t)??xp(e.children[1],t)}function Nn(e,t){return xp(e,t)!==null}function MC(e,t,n=0){return e.windowId===t?n:-1}function Yc(e,t,n,i){return e.type==="leaf"?e.windowId!==t?e:{type:"container",split:i==="auto"?DC(MC({windowId:t},t)):i,ratio:.5,children:[{type:"leaf",windowId:t},{type:"leaf",windowId:n}]}:Nn(e.children[0],t)?{...e,children:[Yc(e.children[0],t,n,i),e.children[1]]}:{...e,children:[e.children[0],Yc(e.children[1],t,n,i)]}}function Vc(e,t){if(e.type==="leaf")return e.windowId===t?null:e;const[n,i]=e.children;if(n.type==="leaf"&&n.windowId===t)return i;if(i.type==="leaf"&&i.windowId===t)return n;if(Nn(n,t)){const s=Vc(n,t);return s===null?i:{...e,children:[s,i]}}if(Nn(i,t)){const s=Vc(i,t);return s===null?n:{...e,children:[n,s]}}return e}function Gc(e,t,n){return e.type==="leaf"?e.windowId===t?{type:"leaf",windowId:n}:e.windowId===n?{type:"leaf",windowId:t}:e:{...e,children:[Gc(e.children[0],t,n),Gc(e.children[1],t,n)]}}function vp(e,t,n){if(e.type==="leaf")return e;const[i,s]=e.children,l=i.type==="leaf"&&i.windowId===t||Nn(i,t),o=s.type==="leaf"&&s.windowId===t||Nn(s,t);if(l&&!o){if(i.type==="leaf"&&i.windowId===t)return{...e,ratio:cu(e.ratio+n)};const d=vp(i,t,n);return d===i?{...e,ratio:cu(e.ratio+n)}:{...e,children:[d,s]}}if(o&&!l){if(s.type==="leaf"&&s.windowId===t)return{...e,ratio:cu(e.ratio-n)};const d=vp(s,t,n);return d===s?{...e,ratio:cu(e.ratio-n)}:{...e,children:[i,d]}}return e}function _p(e,t){if(e.type==="leaf")return e;const[n,i]=e.children;return n.type==="leaf"&&n.windowId===t||i.type==="leaf"&&i.windowId===t?{...e,ratio:.5}:Nn(n,t)?{...e,children:[_p(n,t),i]}:Nn(i,t)?{...e,children:[n,_p(i,t)]}:e}function Tp(e,t){if(e.type==="leaf")return e;const[n,i]=e.children;return n.type==="leaf"&&n.windowId===t||i.type==="leaf"&&i.windowId===t?{...e,split:e.split==="horizontal"?"vertical":"horizontal"}:Nn(n,t)?{...e,children:[Tp(n,t),i]}:Nn(i,t)?{...e,children:[n,Tp(i,t)]}:e}function Ap(e,t,n,i){return e.type==="leaf"?e.windowId!==t?e:{type:"container",split:i==="left"||i==="right"?"horizontal":"vertical",ratio:.5,children:[i==="left"||i==="top"?{type:"leaf",windowId:n}:{type:"leaf",windowId:t},i==="left"||i==="top"?{type:"leaf",windowId:t}:{type:"leaf",windowId:n}]}:Nn(e.children[0],t)?{...e,children:[Ap(e.children[0],t,n,i),e.children[1]]}:{...e,children:[e.children[0],Ap(e.children[1],t,n,i)]}}function IC(e,t,n,i){if(t===n||!Nn(e,t)||!Nn(e,n))return e;if(i==="center")return Gc(e,t,n);const s=Vc(e,t);return s?Ap(s,n,t,i):e}function Hy(e,t,n){const i=e.find(h=>h.windowId===t);if(!i)return null;const s=i.x+i.width/2,l=i.y+i.height/2;let o=null,d=1/0;for(const h of e){if(h.windowId===t)continue;const f=h.x+h.width/2,m=h.y+h.height/2;let b=!1;switch(n){case"left":b=f<s;break;case"right":b=f>s;break;case"up":b=m<l;break;case"down":b=m>l;break}if(b){const x=Math.abs(f-s)+Math.abs(m-l);x<d&&(d=x,o=h.windowId)}}return o}function ou(e,t,n,i=[]){if(e.type==="leaf")return[];const{split:s,ratio:l,children:o}=e,d=[];if(s==="horizontal"){const h=t.x+Math.round(t.width*l),f=n/2;d.push({path:i,split:s,ratio:l,x:h-f,y:t.y,width:n,height:t.height});const m={...t,width:Math.round(t.width*l)-f},b={x:t.x+Math.round(t.width*l)+f,y:t.y,width:t.width-Math.round(t.width*l)-f,height:t.height};d.push(...ou(o[0],m,n,[...i,0])),d.push(...ou(o[1],b,n,[...i,1]))}else{const h=t.y+Math.round(t.height*l),f=n/2;d.push({path:i,split:s,ratio:l,x:t.x,y:h-f,width:t.width,height:n});const m={...t,height:Math.round(t.height*l)-f},b={x:t.x,y:t.y+Math.round(t.height*l)+f,width:t.width,height:t.height-Math.round(t.height*l)-f};d.push(...ou(o[0],m,n,[...i,0])),d.push(...ou(o[1],b,n,[...i,1]))}return d}function e_(e,t,n){if(t.length===0)return e.type!=="container"?e:{...e,ratio:cu(n)};if(e.type!=="container")return e;const[i,...s]=t,l=[e.children[0],e.children[1]];return l[i]=e_(e.children[i],s,n),{...e,children:l}}function cu(e){return Math.min(Math.max(e,.15),.85)}function DC(e){return e%2===0?"horizontal":"vertical"}const Uy=4;function BC(e){return{id:e.id,miniAppId:e.miniAppId,title:e.title,args:e.args}}function zC(e){return{id:e.id,miniAppId:e.miniAppId,title:e.title,position:{x:0,y:0},size:{width:0,height:0},minimized:!1,maximized:!1,focused:!1,zIndex:1,args:e.args}}let zc=null;function gm(e){!zc||zc.readyState!==WebSocket.OPEN||zc.send(JSON.stringify(e))}function An(){const e=ut.getState(),t={version:2,windows:e.windows.map(BC),tree:e.tree,focusedWindowId:e.focusedWindowId,fullscreenWindowId:e.fullscreenWindowId,windowIdCounter:e.windowIdCounter,nextSplitDirection:e.nextSplitDirection};gm({type:"window:sync",...t})}function jy(e){zc=e}function PC(e,t){gm({type:"window:actions_changed",windowId:e,actions:t})}function h0(e,t,n){gm({type:"window:action_result",requestId:e,result:t,error:n})}function jn(e,t){return e?{rects:uu(e,t,Uy),bars:ou(e,t,Uy)}:{rects:[],bars:[]}}function hn(e,t,n,i){const s=new Map(t.map(l=>[l.windowId,l]));return e.map(l=>{const o=s.get(l.id);return{...l,focused:l.id===n,maximized:l.id===i,position:o?{x:o.x,y:o.y}:l.position,size:o?{width:o.width,height:o.height}:l.size,zIndex:l.id===i?9999:1}})}function Fy(e){return e??{}}function $y(e,t){const n=Fy(e),i=Fy(t),s=Object.keys(n),l=Object.keys(i);return s.length!==l.length?!1:s.every(o=>n[o]===i[o])}const ut=Uu((e,t)=>({windows:[],windowIdCounter:0,focusedWindowActions:[],windowActions:{},tree:null,focusedWindowId:null,fullscreenWindowId:null,nextSplitDirection:"auto",tileRects:[],splitBars:[],desktopBounds:{x:0,y:0,width:800,height:600},openWindow(n,i,s){const l=t(),o=l.windows.filter(S=>S.miniAppId===n&&$y(S.args,s)).reduce((S,k)=>!S||k.id===l.focusedWindowId?k:S,void 0);if(o){const S=l.fullscreenWindowId===o.id?l.fullscreenWindowId:null,{rects:k,bars:j}=jn(l.tree,l.desktopBounds),P=hn(l.windows.map(V=>V.id===o.id&&s?{...V,args:s}:V),k,o.id,S);return e({windows:P,focusedWindowId:o.id,fullscreenWindowId:S,tileRects:k,splitBars:j,focusedWindowActions:l.windowActions[o.id]??[]}),An(),o.id}const d=l.windowIdCounter+1,h=`win-${d}`,f={id:h,miniAppId:n,title:i,position:{x:0,y:0},size:{width:0,height:0},minimized:!1,maximized:!1,focused:!0,zIndex:1,args:s};let m=l.nextSplitDirection;if(m==="auto"&&l.tree){const S=l.focusedWindowId&&Nn(l.tree,l.focusedWindowId)?l.focusedWindowId:Is(l.tree)[0],k=l.tileRects.find(j=>j.windowId===S);k&&(m=k.width>=k.height?"horizontal":"vertical")}let b;if(!l.tree)b={type:"leaf",windowId:h};else if(l.focusedWindowId&&Nn(l.tree,l.focusedWindowId))b=Yc(l.tree,l.focusedWindowId,h,m);else{const S=Is(l.tree);b=Yc(l.tree,S[0],h,m)}const{rects:x,bars:E}=jn(b,l.desktopBounds),T=[...l.windows,f],w=hn(T,x,h,null);return e({windows:w,windowIdCounter:d,tree:b,focusedWindowId:h,fullscreenWindowId:null,tileRects:x,splitBars:E,focusedWindowActions:[]}),An(),h},closeWindow(n){const i=t(),s=i.windows.filter(E=>E.id!==n),{[n]:l,...o}=i.windowActions,d=i.tree?Vc(i.tree,n):null;let h=null;if(i.focusedWindowId===n){if(d){const E=Is(d);h=E.length>0?E[0]:null}}else h=i.focusedWindowId;const f=i.fullscreenWindowId===n?null:i.fullscreenWindowId,{rects:m,bars:b}=jn(d,i.desktopBounds),x=hn(s,m,h,f);e({windows:x,tree:d,focusedWindowId:h,fullscreenWindowId:f,windowActions:o,focusedWindowActions:h?o[h]??[]:[],tileRects:m,splitBars:b}),An()},focusWindow(n){const i=t();if(!i.windows.find(f=>f.id===n))return;const l=i.tree??{type:"leaf",windowId:n},{rects:o,bars:d}=jn(l,i.desktopBounds),h=hn(i.windows,o,n,i.fullscreenWindowId);e({windows:h,tree:l,focusedWindowId:n,tileRects:o,splitBars:d,focusedWindowActions:i.windowActions[n]??[]}),An()},maximizeWindow(n){const i=t();if(!i.windows.find(f=>f.id===n))return;const l=i.fullscreenWindowId===n?null:n,{rects:o,bars:d}=jn(i.tree,i.desktopBounds),h=hn(i.windows,o,i.focusedWindowId,l);e({windows:h,fullscreenWindowId:l,tileRects:o,splitBars:d}),An()},moveWindow(n,i){},resizeWindow(n,i){},focusDirection(n){const i=t();if(!i.focusedWindowId||!i.tree)return;const s=i.tileRects,l=Hy(s,i.focusedWindowId,n);if(!l)return;const o=hn(i.windows,s,l,i.fullscreenWindowId);e({windows:o,focusedWindowId:l,fullscreenWindowId:null,focusedWindowActions:i.windowActions[l]??[]}),An()},swapDirection(n){const i=t();if(!i.focusedWindowId||!i.tree)return;const s=i.tileRects,l=Hy(s,i.focusedWindowId,n);if(!l)return;const o=Gc(i.tree,i.focusedWindowId,l),{rects:d,bars:h}=jn(o,i.desktopBounds),f=hn(i.windows,d,i.focusedWindowId,i.fullscreenWindowId);e({windows:f,tree:o,tileRects:d,splitBars:h}),An()},toggleFullscreen(){const n=t();n.focusedWindowId&&t().maximizeWindow(n.focusedWindowId)},setNextSplitDirection(n){e({nextSplitDirection:n}),An()},rotateFocusedSplit(){const n=t();if(!n.focusedWindowId||!n.tree)return;const i=Tp(n.tree,n.focusedWindowId),{rects:s,bars:l}=jn(i,n.desktopBounds),o=hn(n.windows,s,n.focusedWindowId,n.fullscreenWindowId);e({windows:o,tree:i,tileRects:s,splitBars:l}),An()},adjustFocusedRatio(n){const i=t();if(!i.focusedWindowId||!i.tree)return;const s=vp(i.tree,i.focusedWindowId,n),{rects:l,bars:o}=jn(s,i.desktopBounds),d=hn(i.windows,l,i.focusedWindowId,i.fullscreenWindowId);e({windows:d,tree:s,tileRects:l,splitBars:o}),An()},equalizeFocusedRatio(){const n=t();if(!n.focusedWindowId||!n.tree)return;const i=_p(n.tree,n.focusedWindowId),{rects:s,bars:l}=jn(i,n.desktopBounds),o=hn(n.windows,s,n.focusedWindowId,n.fullscreenWindowId);e({windows:o,tree:i,tileRects:s,splitBars:l}),An()},focusNth(n){const i=t();if(!i.tree)return;const s=Is(i.tree),l=n-1;if(l<0||l>=s.length)return;const o=s[l],d=hn(i.windows,i.tileRects,o,null);e({windows:d,focusedWindowId:o,fullscreenWindowId:null,focusedWindowActions:i.windowActions[o]??[]}),An()},setDesktopBounds(n){const i=t(),{rects:s,bars:l}=jn(i.tree,n),o=hn(i.windows,s,i.focusedWindowId,i.fullscreenWindowId);e({windows:o,desktopBounds:n,tileRects:s,splitBars:l})},setNodeRatio(n,i){const s=t();if(!s.tree)return;const l=e_(s.tree,n,i),{rects:o,bars:d}=jn(l,s.desktopBounds),h=hn(s.windows,o,s.focusedWindowId,s.fullscreenWindowId);e({windows:h,tree:l,tileRects:o,splitBars:d}),An()},relocateWindow(n,i,s){const l=t();if(!l.tree)return;const o=IC(l.tree,n,i,s);if(o===l.tree)return;const{rects:d,bars:h}=jn(o,l.desktopBounds),f=hn(l.windows,d,n,null);e({windows:f,tree:o,focusedWindowId:n,fullscreenWindowId:null,tileRects:d,splitBars:h,focusedWindowActions:l.windowActions[n]??[]}),An()},setFocusedWindowActions(n){e({focusedWindowActions:n})},setWindowActions(n,i){e(s=>({windowActions:{...s.windowActions,[n]:i},focusedWindowActions:s.focusedWindowId===n?i:s.focusedWindowActions}))},getFocusedWindow(){const n=t();return n.windows.find(i=>i.id===n.focusedWindowId)},getWindowsByMiniApp(n,i){return t().windows.filter(s=>s.miniAppId===n&&$y(s.args,i))},restoreFromBackend(n){const i=t().desktopBounds,{rects:s,bars:l}=jn(n.tree,i),o=hn(n.windows.map(zC),s,n.focusedWindowId,n.fullscreenWindowId);e({windows:o,tree:n.tree,focusedWindowId:n.focusedWindowId,fullscreenWindowId:n.fullscreenWindowId,windowIdCounter:n.windowIdCounter,nextSplitDirection:n.nextSplitDirection,tileRects:s,splitBars:l})}})),HC="_dockIcon_1xw56_1",UC="_dockIconImage_1xw56_11",qy={dockIcon:HC,dockIconImage:UC};function jC({icon:e,iconPng:t,className:n,tooltip:i}){const s=v.jsx("div",{className:[qy.dockIcon,n].filter(Boolean).join(" "),children:t?v.jsx("img",{className:qy.dockIconImage,src:t,alt:"","aria-hidden":"true"}):v.jsx("span",{children:e})});return i?v.jsx("dt-tooltip",{content:i,children:s}):s}function FC(e,t){return t?e.some(n=>{const i=n.current;return i?i.contains(t):!1}):!1}function $C(e,t,n=!0){C.useEffect(()=>{if(!n)return;function i(l){const o=l.target;FC(e,o)||t()}function s(){requestAnimationFrame(()=>{document.activeElement?.tagName==="IFRAME"&&t()})}return document.addEventListener("mousedown",i),window.addEventListener("blur",s),()=>{document.removeEventListener("mousedown",i),window.removeEventListener("blur",s)}},[n,t,e])}const qC="_panel_uttta_1",YC="_empty_uttta_18",VC="_item_uttta_25",GC="_icon_uttta_45",WC="_label_uttta_52",Ql={panel:qC,empty:YC,item:VC,icon:GC,label:WC};function QC({apps:e,isOpen:t,onClose:n,onLaunch:i,anchorRef:s}){const l=C.useRef(null),[o,d]=C.useState({top:0,left:0});return C.useLayoutEffect(()=>{if(!t||!s.current)return;function h(){const f=s.current?.getBoundingClientRect(),m=l.current?.offsetWidth??340;if(!f)return;const b=Math.min(Math.max(16,f.left),Math.max(16,window.innerWidth-m-16));d({top:f.bottom+16,left:b})}return h(),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0),()=>{window.removeEventListener("resize",h),window.removeEventListener("scroll",h,!0)}},[s,t]),$C([l,s],n,t),C.useEffect(()=>{if(!t)return;function h(f){f.key==="Escape"&&n()}return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h)}},[t,n]),t?Hu.createPortal(v.jsxs("div",{ref:l,className:Ql.panel,style:o,children:[e.length===0&&v.jsx("div",{className:Ql.empty,children:"No applications available"}),e.map(h=>v.jsxs("button",{className:Ql.item,onClick:()=>{i(h),n()},children:[v.jsx(jC,{icon:h.icon,iconPng:h.iconPng,className:Ql.icon}),v.jsx("span",{className:Ql.label,children:h.name})]},h.id))]}),document.body):null}const XC=C.memo(function({mode:t,size:n=14}){return v.jsxs("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("rect",{x:"1.5",y:"2.5",width:"13",height:"11",rx:"1.5"}),t==="horizontal"&&v.jsx("line",{x1:"8",y1:"3",x2:"8",y2:"13"}),t==="vertical"&&v.jsx("line",{x1:"2",y1:"8",x2:"14",y2:"8"}),t==="auto"&&v.jsxs(v.Fragment,{children:[v.jsx("line",{x1:"8",y1:"3",x2:"8",y2:"13",opacity:"0.45"}),v.jsx("line",{x1:"2",y1:"8",x2:"14",y2:"8",opacity:"0.45"}),v.jsx("text",{x:"8",y:"9",textAnchor:"middle",dominantBaseline:"central",fill:"currentColor",stroke:"none",fontSize:"5.5",fontWeight:"700",children:"A"})]})]})}),KC="_actionsBar_1otoq_2",ZC="_launcherWrapper_1otoq_18",JC="_appName_1otoq_22",e4="_appNameActive_1otoq_41",t4="_splitToggle_1otoq_47",n4="_splitToggleActive_1otoq_68",r4="_separator_1otoq_79",i4="_action_1otoq_2",a4="_glowing_1otoq_104",s4="_builtinAction_1otoq_116 _action_1otoq_2",ar={actionsBar:KC,launcherWrapper:ZC,appName:JC,appNameActive:e4,splitToggle:t4,splitToggleActive:n4,separator:r4,action:i4,glowing:a4,builtinAction:s4},p0=["auto","horizontal","vertical"],l4={auto:"Auto",horizontal:"Horizontal",vertical:"Vertical"};function u4({apps:e,onLaunch:t}){const n=ut(S=>S.focusedWindowId),i=ut(S=>S.fullscreenWindowId),s=ut(S=>S.windows.find(k=>k.id===S.focusedWindowId)),l=ut(S=>S.focusedWindowActions),o=ut(S=>S.nextSplitDirection),[d,h]=C.useState(!1),f=C.useRef(l),[m,b]=C.useState(!1),x=C.useRef(null);C.useEffect(()=>{if(l.length>0&&l!==f.current){h(!0);const S=setTimeout(()=>h(!1),1200);return f.current=l,()=>clearTimeout(S)}f.current=l},[l]);const E=C.useCallback(()=>{const S=p0.indexOf(o),k=p0[(S+1)%p0.length];ut.getState().setNextSplitDirection(k)},[o]),T=n===i&&i!==null,w=`${Wl({scope:"core",key:"split.mode",defaultText:"Split mode"})}: ${l4[o]}`;return v.jsxs("div",{className:ar.actionsBar,children:[v.jsxs("div",{className:ar.launcherWrapper,children:[v.jsx("button",{ref:x,className:`${ar.appName}${m?` ${ar.appNameActive}`:""}`,onClick:()=>b(S=>!S),children:Wl({scope:"core",key:"applications",defaultText:"Applications"})}),v.jsx(QC,{apps:e,isOpen:m,onClose:()=>b(!1),onLaunch:t,anchorRef:x})]}),v.jsx("dt-tooltip",{content:w,placement:"bottom",children:v.jsx("button",{className:`${ar.splitToggle}${o!=="auto"?` ${ar.splitToggleActive}`:""}`,onClick:E,children:v.jsx(XC,{mode:o})})}),s&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:ar.separator}),v.jsx("button",{className:ar.builtinAction,onClick:()=>ut.getState().maximizeWindow(s.id),children:Wl(T?{scope:"core",key:"window.restore",defaultText:"Restore"}:{scope:"core",key:"window.fullscreen",defaultText:"Fullscreen"})}),v.jsx("button",{className:ar.builtinAction,onClick:()=>ut.getState().closeWindow(s.id),children:Wl({scope:"core",key:"close",defaultText:"Close"})}),l.length>0&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:ar.separator}),l.map(S=>v.jsx("dt-tooltip",{content:S.description,placement:"bottom",children:v.jsx("button",{className:`${ar.action}${d?` ${ar.glowing}`:""}`,onClick:()=>S.handler(),children:S.name})},S.name))]})]})]})}const o4="_overlay_196os_1",c4="_card_196os_13",d4="_spinner_196os_27",f4="_title_196os_36",h4="_subtitle_196os_42",Xl={overlay:o4,card:c4,spinner:d4,title:f4,subtitle:h4};function p4({status:e,retryInSeconds:t}){if(e==="connected")return null;const n=e==="reconnecting"?`Reconnecting${t&&t>0?` in ${t}s`:""}...`:"Connecting...";return v.jsx("div",{className:Xl.overlay,role:"status","aria-live":"polite","aria-busy":"true",children:v.jsxs("div",{className:Xl.card,children:[v.jsx("span",{className:Xl.spinner,"aria-hidden":"true"}),v.jsx("div",{className:Xl.title,children:n}),v.jsx("div",{className:Xl.subtitle,children:"DeskTalk is waiting for the desktop bridge to be ready."})]})})}const m4="_resizer_z2l6k_1",g4="_horizontal_z2l6k_11",b4="_vertical_z2l6k_18",y4="_bar_z2l6k_25",bc={resizer:m4,horizontal:g4,vertical:b4,bar:y4};function t_({path:e,split:t,ratio:n,onRatioChange:i}){const s=C.useRef(null),l=C.useRef(null),o=C.useCallback(f=>{f.preventDefault(),f.stopPropagation();const m=f.clientX,b=f.clientY;s.current={clientX:m,clientY:b,startRatio:n};const E=l.current?.parentElement?.getBoundingClientRect();if(!E)return;const T=document.createElement("style");T.textContent="iframe { pointer-events: none !important; }",document.head.appendChild(T);const w=k=>{if(!s.current)return;const j=k.clientX-s.current.clientX,P=k.clientY-s.current.clientY;let V;t==="horizontal"?V=E.width>0?j/E.width:0:V=E.height>0?P/E.height:0;const J=s.current.startRatio+V;i?i(J):ut.getState().setNodeRatio(e,J)},S=()=>{s.current=null,document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",S),document.body.style.cursor="",document.body.style.userSelect="",T.remove()};document.addEventListener("mousemove",w),document.addEventListener("mouseup",S),document.body.style.cursor=t==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none"},[i,e,t,n]),d=t==="horizontal",h=[bc.resizer,d?bc.horizontal:bc.vertical].filter(Boolean).join(" ");return v.jsx("div",{ref:l,className:h,onMouseDown:o,children:v.jsx("div",{className:bc.bar})})}const m0={isDragging:!1,dragWindowId:null,dropTarget:null},si=Uu((e,t)=>({...m0,startDrag(n){e({isDragging:!0,dragWindowId:n,dropTarget:null})},updateDropTarget(n,i){const s=t();if(n===s.dragWindowId){e({dropTarget:null});return}const l=s.dropTarget;l&&l.windowId===n&&l.edge===i||e({dropTarget:{windowId:n,edge:i}})},clearDropTarget(){t().dropTarget!==null&&e({dropTarget:null})},finishDrag(){const n=t(),i=n.isDragging&&n.dragWindowId&&n.dropTarget?{sourceWindowId:n.dragWindowId,target:n.dropTarget}:null;return e(m0),i},cancelDrag(){e(m0)}})),E4="_overlay_19iyv_1",x4="_tileZone_19iyv_8",v4="_highlight_19iyv_13",g0={overlay:E4,tileZone:x4,highlight:v4};function _4(e,t,n,i){const s=i.getBoundingClientRect(),l=s.left+n.x,o=s.top+n.y,d=e-l,h=t-o,f=n.width>0?d/n.width:.5,m=n.height>0?h/n.height:.5;return m<.3?"top":m>.7?"bottom":f<.3?"left":f>.7?"right":"center"}function T4(e){switch(e){case"left":return{left:0,top:0,width:"50%",height:"100%"};case"right":return{right:0,top:0,width:"50%",height:"100%"};case"top":return{left:0,top:0,width:"100%",height:"50%"};case"bottom":return{left:0,bottom:0,width:"100%",height:"50%"};case"center":return{left:0,top:0,width:"100%",height:"100%"}}}function A4({desktopRef:e}){const t=si(d=>d.dragWindowId),n=si(d=>d.dropTarget),i=ut(d=>d.tileRects),s=C.useCallback((d,h)=>{const f=e.current;if(!f)return;const m=_4(d.clientX,d.clientY,h,f);si.getState().updateDropTarget(h.windowId,m)},[e]),l=C.useCallback(()=>{si.getState().clearDropTarget()},[]),o=i.filter(d=>d.windowId!==t);return v.jsx("div",{className:g0.overlay,children:o.map(d=>{const h=n?.windowId===d.windowId;return v.jsx("div",{className:g0.tileZone,style:{left:d.x,top:d.y,width:d.width,height:d.height},onMouseMove:f=>s(f,d),onMouseLeave:l,children:h&&n&&v.jsx("div",{className:g0.highlight,style:T4(n.edge)})},d.windowId)})})}class S4{stream=null;audioContext=null;sourceNode=null;workletNode=null;chunkHandler=null;async start(t){this.chunkHandler=t,this.stream=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,sampleRate:{ideal:16e3},echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),this.audioContext=new AudioContext,await this.audioContext.audioWorklet.addModule("/pcm-capture-processor.js"),this.sourceNode=this.audioContext.createMediaStreamSource(this.stream),this.workletNode=new AudioWorkletNode(this.audioContext,"pcm-capture-processor"),this.workletNode.port.onmessage=i=>{this.chunkHandler&&i.data&&this.chunkHandler(i.data)},this.sourceNode.connect(this.workletNode);const n=this.audioContext.createGain();n.gain.value=0,this.workletNode.connect(n),n.connect(this.audioContext.destination),console.log(`[mic] Started capture at ${this.audioContext.sampleRate}Hz, resampling to 16kHz in worklet`)}stop(){if(this.workletNode&&(this.workletNode.disconnect(),this.workletNode.port.onmessage=null,this.workletNode=null),this.sourceNode&&(this.sourceNode.disconnect(),this.sourceNode=null),this.audioContext&&(this.audioContext.close(),this.audioContext=null),this.stream){for(const t of this.stream.getTracks())t.stop();this.stream=null}this.chunkHandler=null,console.log("[mic] Stopped capture")}isActive(){return this.stream!==null&&this.audioContext!==null}}class w4{ws=null;eventHandler=null;sessionId=null;connect(){return new Promise((t,n)=>{if(this.ws&&this.ws.readyState===WebSocket.OPEN){t();return}const s=`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws/voice`,l=new WebSocket(s);l.binaryType="arraybuffer",l.addEventListener("open",()=>{this.ws=l,console.log("[voice-ws] Connected"),t()}),l.addEventListener("message",o=>{if(typeof o.data=="string")try{const d=JSON.parse(o.data);this.eventHandler?.(d)}catch{}}),l.addEventListener("close",()=>{console.log("[voice-ws] Disconnected"),this.ws=null}),l.addEventListener("error",o=>{console.error("[voice-ws] Error:",o),n(new Error("Voice WebSocket connection failed"))})})}onEvent(t){this.eventHandler=t}startSession(t,n=16e3,i){this.sessionId=t,this.sendControl({type:"session.start",sessionId:t,format:"pcm_s16le",sampleRate:n,channels:1,...i?{language:i}:{}})}endSession(){this.sessionId&&(this.sendControl({type:"session.end",sessionId:this.sessionId}),this.sessionId=null)}sendAudioChunk(t){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(t)}sendControl(t){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify(t))}disconnect(){this.ws&&(this.ws.close(),this.ws=null),this.sessionId=null}isConnected(){return this.ws!==null&&this.ws.readyState===WebSocket.OPEN}}let mu=null,Or=null;function k4(){return`vs-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}const Lr=Uu((e,t)=>({status:"idle",errorMessage:null,partialText:"",transcripts:[],sessionId:null,async startVoice(){const n=t();if(!(n.status!=="idle"&&n.status!=="error")){e({status:"connecting",errorMessage:null,partialText:""});try{Or=new w4,Or.onEvent(s=>{C4(s,e,t)}),await Or.connect();const i=k4();Or.startSession(i,16e3),e({sessionId:i}),await N4(Or,i),mu=new S4,await mu.start(s=>{Or?.sendAudioChunk(s)}),e({status:"listening"})}catch(i){const s=i instanceof DOMException&&i.name==="NotAllowedError"?"Microphone permission denied. Please allow microphone access.":i.message;e({status:"error",errorMessage:s}),Yy()}}},stopVoice(){t().status!=="idle"&&(Yy(),e({status:"idle",partialText:"",sessionId:null}))},clearTranscripts(){e({transcripts:[],partialText:""})}}));function C4(e,t,n){switch(e.type){case"speech.start":t({status:"speaking",partialText:""});break;case"transcript.partial":t({partialText:e.text??""});break;case"transcript.final":if(e.text&&e.utteranceId){const i=n();t({transcripts:[...i.transcripts,{utteranceId:e.utteranceId,text:e.text,isFinal:!0,timestamp:Date.now()}],partialText:"",status:"listening"})}break;case"speech.end":t({status:"listening",partialText:""});break;case"error":t({status:"error",errorMessage:e.message??`Error: ${e.code??"unknown"}`});break}}function N4(e,t){return new Promise((n,i)=>{const s=setTimeout(()=>{i(new Error("Voice session start timed out"))},5e3),l=e.eventHandler;e.onEvent(o=>{l?.(o),o.type==="session.ready"&&o.sessionId===t?(clearTimeout(s),e.onEvent(l??(()=>{})),n()):o.type==="error"&&o.sessionId===t&&(clearTimeout(s),e.onEvent(l??(()=>{})),i(new Error(o.message??"Session start failed")))})})}function Yy(){mu&&(mu.stop(),mu=null),Or&&(Or.endSession(),Or.disconnect(),Or=null)}const cr=Tt.create({withCredentials:!0});function n_(e,t){return Tt.isAxiosError(e)?e.response?.data?.error??e.message??t:e instanceof Error&&e.message?e.message:t}function Vy(e,t){const n=t.find(i=>i.id===e);return!n||!n.model?"not configured":`${n.id}/${n.model}`}const nt=Uu((e,t)=>({messages:[],draftInput:"",isAiRunning:!1,activeRequestId:null,modelLabel:"not configured",tokenCount:0,providerOptions:[],selectedProvider:"",currentSessionId:null,sessions:[],pendingQuestion:null,async loadProviders(){try{const{data:n}=await cr.get("/api/ai/providers");e({providerOptions:n.providers,selectedProvider:n.defaultProvider,modelLabel:Vy(n.defaultProvider,n.providers)})}catch{e({providerOptions:[],selectedProvider:"",modelLabel:"not configured"})}},loadSessions(n){return n.readyState!==WebSocket.OPEN?!1:(n.send(JSON.stringify({type:"ai:sessions:list"})),!0)},switchSession(n,i){const s=t();return!n||i.readyState!==WebSocket.OPEN||s.isAiRunning||s.currentSessionId===n?!1:(e({messages:[],isAiRunning:!1,tokenCount:0,activeRequestId:null,currentSessionId:n,pendingQuestion:null}),i.send(JSON.stringify({type:"ai:sessions:switch",sessionId:n})),!0)},createSession(n){const i=t();return n.readyState!==WebSocket.OPEN||i.isAiRunning?!1:(e({messages:[],isAiRunning:!1,tokenCount:0,activeRequestId:null,currentSessionId:null,pendingQuestion:null}),n.send(JSON.stringify({type:"ai:sessions:create"})),!0)},cancelAiRequest(n){const i=t();return n.readyState!==WebSocket.OPEN||!i.isAiRunning||!i.activeRequestId?!1:(n.send(JSON.stringify({type:"ai:cancel",requestId:i.activeRequestId})),!0)},answerQuestion(n,i,s){const l=t();return s.readyState!==WebSocket.OPEN||!l.pendingQuestion||l.pendingQuestion.questionId!==n?!1:(s.send(JSON.stringify({type:"ai:answer",questionId:n,answer:i})),e({pendingQuestion:null}),!0)},submitPrompt(n,i="text",s){const l=t();if(!n||s.readyState!==WebSocket.OPEN||l.isAiRunning)return!1;const o=`ai-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;return e(d=>({messages:[...d.messages,{id:`user-${o}`,role:"user",content:n,source:i},{id:`assistant-${o}`,role:"assistant",content:""}],isAiRunning:!0,activeRequestId:o,tokenCount:0})),s.send(JSON.stringify({type:"ai:prompt",requestId:o,text:n,source:i})),!0},setDraftInput(n){e({draftInput:n})},clearDraftInput(){e({draftInput:""})},handleAiEvent(n){const i=t();if(n.type==="sessions_sync"){e(s=>({sessions:n.sessions??s.sessions,currentSessionId:n.sessionId??s.currentSessionId}));return}if(n.type==="history_sync"){e(s=>({messages:n.messages??[],currentSessionId:n.sessionId??s.currentSessionId}));return}if(!(i.activeRequestId&&n.requestId!==i.activeRequestId))if(n.type==="message_start")e({isAiRunning:!0,modelLabel:n.model?`${n.provider}/${n.model}`:"not configured"});else if(n.type==="message_update")e(s=>{const l=[...s.messages],o=l.length-1;return o>=0&&l[o].role==="assistant"&&!l[o].toolCall&&(l[o]={...l[o],content:n.text??""}),{messages:l}});else if(n.type==="thinking_update")e(s=>{const l=[...s.messages],o=l.length-1;return o>=0&&l[o].role==="assistant"&&!l[o].toolCall&&(l[o]={...l[o],thinkingContent:n.thinkingText??""}),{messages:l}});else if(n.type==="tool_call")e(s=>{const l=[...s.messages],o=i.activeRequestId,d=o?`assistant-${o}`:null,h={id:`tool-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,role:"assistant",content:"",toolCall:n.toolCall};if(d){const f=l.findIndex(m=>m.id===d);if(f>=0)return l.splice(f,0,h),{messages:l}}return l.push(h),{messages:l}});else if(n.type==="agent_question"){if(!n.questionId||!n.question||!n.questionType)return;e({pendingQuestion:{questionId:n.questionId,question:n.question,questionType:n.questionType,options:n.options}})}else if(n.type==="message_end"){const s=i.activeRequestId,l=i.providerOptions,o=i.selectedProvider,d="[Cancelled]";e(h=>{let f=h.messages;if(s){const m=`assistant-${s}`,b=f.findIndex(x=>x.id===m);if(b>=0){const x=f[b];if(n.cancelled){const E=x.content.trim()?`${x.content.replace(/\s+$/u,"")}
|
|
15
|
-
|
|
16
|
-
${d}`:d;f=[...f.slice(0,b),{...x,content:x.cancelled?x.content:E,cancelled:!0},...f.slice(b+1)]}else!x.content&&!x.thinkingContent&&(f=[...f.slice(0,b),...f.slice(b+1)])}}return{messages:f,isAiRunning:!1,activeRequestId:null,pendingQuestion:null,tokenCount:n.usage?.totalTokens??0,modelLabel:o?Vy(o,l):h.modelLabel}})}else n.type==="error"&&e(s=>{const l=[...s.messages],o=l.length-1;return o>=0&&l[o].role==="assistant"?l[o]={...l[o],content:n.message??"AI request failed."}:l.push({id:`assistant-error-${Date.now()}`,role:"assistant",content:n.message??"AI request failed."}),{messages:l,isAiRunning:!1,activeRequestId:null,pendingQuestion:null}})},clearMessages(){e({messages:[],tokenCount:0})},addSystemMessage(n){e(i=>({messages:[...i.messages,{id:`system-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,role:"assistant",content:n}]}))}})),pd=[{name:"new",description:"Create a new AI session",execute(e){return e.createSession(e.socket)}},{name:"clear",description:"Clear the current message history (client-side only)",execute(e){return e.clearMessages(),!0}},{name:"title",description:"Rename the current AI session",execute(e,t){const n=t.trim();return n?(e.socket.send(JSON.stringify({type:"ai:sessions:rename",title:n})),!0):(e.addSystemMessage("Usage: /title <new session title>"),!0)}},{name:"help",description:"Show available slash commands",execute(e){const t=pd.map(n=>` /${n.name} — ${n.description}`);return e.addSystemMessage(`Available commands:
|
|
17
|
-
`+t.join(`
|
|
18
|
-
`)),!0}}];function R4(e,t){const n=e.trim();if(!n.startsWith("/"))return!1;const i=n.indexOf(" "),s=(i===-1?n.slice(1):n.slice(1,i)).toLowerCase(),l=i===-1?"":n.slice(i+1).trim(),o=pd.find(d=>d.name===s);return o?o.execute(t,l):(t.addSystemMessage(`Unknown command: /${s}. Type /help for available commands.`),!0)}function O4(e){const t=e.toLowerCase();return pd.filter(n=>n.name.startsWith(t))}function L4(){return pd}const M4="modulepreload",I4=function(e){return"/"+e},Gy={},ii=function(t,n,i){let s=Promise.resolve();if(n&&n.length>0){let h=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),d=o?.nonce||o?.getAttribute("nonce");s=h(n.map(f=>{if(f=I4(f),f in Gy)return;Gy[f]=!0;const m=f.endsWith(".css"),b=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${b}`))return;const x=document.createElement("link");if(x.rel=m?"stylesheet":M4,m||(x.as="script"),x.crossOrigin="",x.href=f,d&&x.setAttribute("nonce",d),document.head.appendChild(x),m)return new Promise((E,T)=>{x.addEventListener("load",E),x.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${f}`)))})}))}function l(o){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=o,window.dispatchEvent(d),!d.defaultPrevented)throw o}return s.then(o=>{for(const d of o||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})},md=(function(e){if(e==null)return P4;if(typeof e=="function")return gd(e);if(typeof e=="object")return Array.isArray(e)?D4(e):B4(e);if(typeof e=="string")return z4(e);throw new Error("Expected function, string, or object as test")});function D4(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=md(e[n]);return gd(i);function i(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function B4(e){const t=e;return gd(n);function n(i){const s=i;let l;for(l in e)if(s[l]!==t[l])return!1;return!0}}function z4(e){return gd(t);function t(n){return n&&n.type===e}}function gd(e){return t;function t(n,i,s){return!!(H4(n)&&e.call(this,n,typeof i=="number"?i:void 0,s||void 0))}}function P4(){return!0}function H4(e){return e!==null&&typeof e=="object"&&"type"in e}const r_=[],du=!0,Sp=!1,Ds="skip";function bm(e,t,n,i){let s;typeof t=="function"&&typeof n!="function"?(i=n,n=t):s=t;const l=md(s),o=i?-1:1;d(e,void 0,[])();function d(h,f,m){const b=h&&typeof h=="object"?h:{};if(typeof b.type=="string"){const E=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(h.type+(E?"<"+E+">":""))+")"})}return x;function x(){let E=r_,T,w,S;if((!t||l(h,f,m[m.length-1]||void 0))&&(E=U4(n(h,m)),E[0]===Sp))return E;if("children"in h&&h.children){const k=h;if(k.children&&E[0]!==Ds)for(w=(i?k.children.length:-1)+o,S=m.concat(k);w>-1&&w<k.children.length;){const j=k.children[w];if(T=d(j,w,S)(),T[0]===Sp)return T;w=typeof T[1]=="number"?T[1]:w+o}}return E}}}function U4(e){return Array.isArray(e)?e:typeof e=="number"?[du,e]:e==null?r_:[e]}function Dr(e,t,n,i){let s,l,o;typeof t=="function"&&typeof n!="function"?(l=void 0,o=t,s=n):(l=t,o=n,s=i),bm(e,l,d,s);function d(h,f){const m=f[f.length-1],b=m?m.children.indexOf(h):void 0;return o(h,b,m)}}const js={indicator:"indicator",textOnly:"text-only",remove:"remove"};function j4({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:i=!1,allowedProtocols:s=[],blockedImageClass:l="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:o="text-gray-500",linkBlockPolicy:d=js.indicator,imageBlockPolicy:h=js.indicator}){const f=t.length&&!t.every(b=>b==="*"),m=n.length&&!n.every(b=>b==="*");if(!e&&(f||m))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return b=>{const x=G4(e,t,n,i,s,l,o,d,h);i_(b),Dr(b,x)}}function Wy(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function F4(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const $4=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),q4=new Set(["javascript:","data:","file:","vbscript:"]);function Qy(e,t,n,i=!1,s=!1,l=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!s)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return s&&i&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const m=e.substring(5);if(m&&m.length>0&&m!=="invalid")return e}}catch{return null}return null}const o=Wy(e,n);if(!o||q4.has(o.protocol)||!($4.has(o.protocol)||l.includes(o.protocol)||l.includes("*")))return null;if(o.protocol==="mailto:"||!o.protocol.match(/^https?:$/))return o.href;const h=F4(e);return o&&t.some(f=>{const m=Wy(f,n);return!m||m.origin!==o.origin?!1:o.href.startsWith(m.href)})?h?o.pathname+o.search+o.hash:o.href:t.includes("*")?o.protocol!=="https:"&&o.protocol!=="http:"?null:h?o.pathname+o.search+o.hash:o.href:null}function i_(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)i_(t)}}const b0=Symbol("node-seen");function Y4(e,t,n){return t===js.remove?{type:"remove"}:t===js.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function V4(e,t,n){if(t===js.remove)return{type:"remove"};if(t===js.textOnly){const i=String(e.properties.alt||"");return i?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:i}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const G4=(e,t,n,i,s,l,o,d,h)=>{const f=(m,b,x)=>{if(m.type!=="element"||m[b0])return du;if(m.tagName==="a"){const E=Qy(m.properties.href,t,e,!1,!1,s);if(E===null){if(m[b0]=!0,Dr(m,f),x&&typeof b=="number"){const T=Y4(m,d,o);if(T.type==="remove")return x.children.splice(b,1),[Ds,b];x.children[b]=T.element}return Ds}else return m.properties.href=E,m.properties.target="_blank",m.properties.rel="noopener noreferrer",du}if(m.tagName==="img"){const E=Qy(m.properties.src,n,e,i,!0,s);if(E===null){if(m[b0]=!0,Dr(m,f),x&&typeof b=="number"){const T=V4(m,h,l);if(T.type==="remove")return x.children.splice(b,1),[Ds,b];x.children[b]=T.element}return Ds}else return m.properties.src=E,du}return du};return f},a_=-1,bd=0,gu=1,Wc=2,ym=3,Em=4,xm=5,vm=6,s_=7,l_=8,Xy=typeof self=="object"?self:globalThis,W4=(e,t)=>{const n=(s,l)=>(e.set(l,s),s),i=s=>{if(e.has(s))return e.get(s);const[l,o]=t[s];switch(l){case bd:case a_:return n(o,s);case gu:{const d=n([],s);for(const h of o)d.push(i(h));return d}case Wc:{const d=n({},s);for(const[h,f]of o)d[i(h)]=i(f);return d}case ym:return n(new Date(o),s);case Em:{const{source:d,flags:h}=o;return n(new RegExp(d,h),s)}case xm:{const d=n(new Map,s);for(const[h,f]of o)d.set(i(h),i(f));return d}case vm:{const d=n(new Set,s);for(const h of o)d.add(i(h));return d}case s_:{const{name:d,message:h}=o;return n(new Xy[d](h),s)}case l_:return n(BigInt(o),s);case"BigInt":return n(Object(BigInt(o)),s);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:d}=new Uint8Array(o);return n(new DataView(d),o)}}return n(new Xy[l](o),s)};return i},Ky=e=>W4(new Map,e)(0),ws="",{toString:Q4}={},{keys:X4}=Object,Kl=e=>{const t=typeof e;if(t!=="object"||!e)return[bd,t];const n=Q4.call(e).slice(8,-1);switch(n){case"Array":return[gu,ws];case"Object":return[Wc,ws];case"Date":return[ym,ws];case"RegExp":return[Em,ws];case"Map":return[xm,ws];case"Set":return[vm,ws];case"DataView":return[gu,n]}return n.includes("Array")?[gu,n]:n.includes("Error")?[s_,n]:[Wc,n]},yc=([e,t])=>e===bd&&(t==="function"||t==="symbol"),K4=(e,t,n,i)=>{const s=(o,d)=>{const h=i.push(o)-1;return n.set(d,h),h},l=o=>{if(n.has(o))return n.get(o);let[d,h]=Kl(o);switch(d){case bd:{let m=o;switch(h){case"bigint":d=l_,m=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);m=null;break;case"undefined":return s([a_],o)}return s([d,m],o)}case gu:{if(h){let x=o;return h==="DataView"?x=new Uint8Array(o.buffer):h==="ArrayBuffer"&&(x=new Uint8Array(o)),s([h,[...x]],o)}const m=[],b=s([d,m],o);for(const x of o)m.push(l(x));return b}case Wc:{if(h)switch(h){case"BigInt":return s([h,o.toString()],o);case"Boolean":case"Number":case"String":return s([h,o.valueOf()],o)}if(t&&"toJSON"in o)return l(o.toJSON());const m=[],b=s([d,m],o);for(const x of X4(o))(e||!yc(Kl(o[x])))&&m.push([l(x),l(o[x])]);return b}case ym:return s([d,o.toISOString()],o);case Em:{const{source:m,flags:b}=o;return s([d,{source:m,flags:b}],o)}case xm:{const m=[],b=s([d,m],o);for(const[x,E]of o)(e||!(yc(Kl(x))||yc(Kl(E))))&&m.push([l(x),l(E)]);return b}case vm:{const m=[],b=s([d,m],o);for(const x of o)(e||!yc(Kl(x)))&&m.push(l(x));return b}}const{message:f}=o;return s([d,{name:h,message:f}],o)};return l},Zy=(e,{json:t,lossy:n}={})=>{const i=[];return K4(!(t||n),!!t,new Map,i)(e),i},La=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ky(Zy(e,t)):structuredClone(e):(e,t)=>Ky(Zy(e,t));class ju{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}ju.prototype.normal={};ju.prototype.property={};ju.prototype.space=void 0;function u_(e,t){const n={},i={};for(const s of e)Object.assign(n,s.property),Object.assign(i,s.normal);return new ju(n,i,t)}function ku(e){return e.toLowerCase()}class On{constructor(t,n){this.attribute=n,this.property=t}}On.prototype.attribute="";On.prototype.booleanish=!1;On.prototype.boolean=!1;On.prototype.commaOrSpaceSeparated=!1;On.prototype.commaSeparated=!1;On.prototype.defined=!1;On.prototype.mustUseProperty=!1;On.prototype.number=!1;On.prototype.overloadedBoolean=!1;On.prototype.property="";On.prototype.spaceSeparated=!1;On.prototype.space=void 0;let Z4=0;const He=Da(),Dt=Da(),wp=Da(),me=Da(),yt=Da(),zs=Da(),qn=Da();function Da(){return 2**++Z4}const kp=Object.freeze(Object.defineProperty({__proto__:null,boolean:He,booleanish:Dt,commaOrSpaceSeparated:qn,commaSeparated:zs,number:me,overloadedBoolean:wp,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),y0=Object.keys(kp);class _m extends On{constructor(t,n,i,s){let l=-1;if(super(t,n),Jy(this,"space",s),typeof i=="number")for(;++l<y0.length;){const o=y0[l];Jy(this,y0[l],(i&kp[o])===kp[o])}}}_m.prototype.defined=!0;function Jy(e,t,n){n&&(e[t]=n)}function Vs(e){const t={},n={};for(const[i,s]of Object.entries(e.properties)){const l=new _m(i,e.transform(e.attributes||{},i),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),t[i]=l,n[ku(i)]=i,n[ku(l.attribute)]=i}return new ju(t,n,e.space)}const o_=Vs({properties:{ariaActiveDescendant:null,ariaAtomic:Dt,ariaAutoComplete:null,ariaBusy:Dt,ariaChecked:Dt,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:Dt,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:Dt,ariaFlowTo:yt,ariaGrabbed:Dt,ariaHasPopup:null,ariaHidden:Dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:me,ariaLive:null,ariaModal:Dt,ariaMultiLine:Dt,ariaMultiSelectable:Dt,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Dt,ariaReadOnly:Dt,ariaRelevant:null,ariaRequired:Dt,ariaRoleDescription:yt,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Dt,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function c_(e,t){return t in e?e[t]:t}function d_(e,t){return c_(e,t.toLowerCase())}const J4=Vs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:zs,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:He,allowPaymentRequest:He,allowUserMedia:He,alt:null,as:null,async:He,autoCapitalize:null,autoComplete:yt,autoFocus:He,autoPlay:He,blocking:yt,capture:null,charSet:null,checked:He,cite:null,className:yt,cols:me,colSpan:null,content:null,contentEditable:Dt,controls:He,controlsList:yt,coords:me|zs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:He,defer:He,dir:null,dirName:null,disabled:He,download:wp,draggable:Dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:He,formTarget:null,headers:yt,height:me,hidden:wp,high:me,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:He,inputMode:null,integrity:null,is:null,isMap:He,itemId:null,itemProp:yt,itemRef:yt,itemScope:He,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:He,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:He,muted:He,name:null,nonce:null,noModule:He,noValidate:He,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:He,optimum:me,pattern:null,ping:yt,placeholder:null,playsInline:He,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:He,referrerPolicy:null,rel:yt,required:He,reversed:He,rows:me,rowSpan:me,sandbox:yt,scope:null,scoped:He,seamless:He,selected:He,shadowRootClonable:He,shadowRootDelegatesFocus:He,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:He,useMap:null,value:Dt,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:He,declare:He,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:He,noHref:He,noShade:He,noWrap:He,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Dt,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:He,disableRemotePlayback:He,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:d_}),e5=Vs({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:qn,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:yt,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:He,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:zs,g2:zs,glyphName:zs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:qn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qn,rev:qn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qn,requiredFeatures:qn,requiredFonts:qn,requiredFormats:qn,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:qn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qn,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:c_}),f_=Vs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),h_=Vs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:d_}),p_=Vs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),t5={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"},n5=/[A-Z]/g,eE=/-[a-z]/g,r5=/^data[-\w.:]+$/i;function yd(e,t){const n=ku(t);let i=t,s=On;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&r5.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(eE,a5);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!eE.test(l)){let o=l.replace(n5,i5);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}s=_m}return new s(i,t)}function i5(e){return"-"+e.toLowerCase()}function a5(e){return e.charAt(1).toUpperCase()}const Fu=u_([o_,J4,f_,h_,p_],"html"),Ki=u_([o_,e5,f_,h_,p_],"svg");function tE(e){const t=[],n=String(e||"");let i=n.indexOf(","),s=0,l=!1;for(;!l;){i===-1&&(i=n.length,l=!0);const o=n.slice(s,i).trim();(o||!l)&&t.push(o),s=i+1,i=n.indexOf(",",s)}return t}function m_(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const nE=/[#.]/g;function s5(e,t){const n=e||"",i={};let s=0,l,o;for(;s<n.length;){nE.lastIndex=s;const d=nE.exec(n),h=n.slice(s,d?d.index:n.length);h&&(l?l==="#"?i.id=h:Array.isArray(i.className)?i.className.push(h):i.className=[h]:o=h,s+=h.length),d&&(l=d[0],s++)}return{type:"element",tagName:o||t||"div",properties:i,children:[]}}function rE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function g_(e){return e.join(" ").trim()}function b_(e,t,n){const i=n?c5(n):void 0;function s(l,o,...d){let h;if(l==null){h={type:"root",children:[]};const f=o;d.unshift(f)}else{h=s5(l,t);const f=h.tagName.toLowerCase(),m=i?i.get(f):void 0;if(h.tagName=m||f,l5(o))d.unshift(o);else for(const[b,x]of Object.entries(o))u5(e,h.properties,b,x)}for(const f of d)Cp(h.children,f);return h.type==="element"&&h.tagName==="template"&&(h.content={type:"root",children:h.children},h.children=[]),h}return s}function l5(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const i of n){const s=t[i];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const l=s;for(const o of l)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function u5(e,t,n,i){const s=yd(e,n);let l;if(i!=null){if(typeof i=="number"){if(Number.isNaN(i))return;l=i}else typeof i=="boolean"?l=i:typeof i=="string"?s.spaceSeparated?l=rE(i):s.commaSeparated?l=tE(i):s.commaOrSpaceSeparated?l=rE(tE(i).join(" ")):l=iE(s,s.property,i):Array.isArray(i)?l=[...i]:l=s.property==="style"?o5(i):String(i);if(Array.isArray(l)){const o=[];for(const d of l)o.push(iE(s,s.property,d));l=o}s.property==="className"&&Array.isArray(t.className)&&(l=t.className.concat(l)),t[s.property]=l}}function Cp(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Cp(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Cp(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function iE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ku(n)===ku(t)))return!0}return n}function o5(e){const t=[];for(const[n,i]of Object.entries(e))t.push([n,i].join(": "));return t.join("; ")}function c5(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const d5=["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"],f5=b_(Fu,"div"),h5=b_(Ki,"g",d5);function p5(e){const t=String(e),n=[];return{toOffset:s,toPoint:i};function i(l){if(typeof l=="number"&&l>-1&&l<=t.length){let o=0;for(;;){let d=n[o];if(d===void 0){const h=aE(t,n[o-1]);d=h===-1?t.length+1:h+1,n[o]=d}if(d>l)return{line:o+1,column:l-(o>0?n[o-1]:0)+1,offset:l};o++}}}function s(l){if(l&&typeof l.line=="number"&&typeof l.column=="number"&&!Number.isNaN(l.line)&&!Number.isNaN(l.column)){for(;n.length<l.line;){const d=n[n.length-1],h=aE(t,d),f=h===-1?t.length+1:h+1;if(d===f)break;n.push(f)}const o=(l.line>1?n[l.line-2]:0)+l.column-1;if(o<n[l.line-1])return o}}}function aE(e,t){const n=e.indexOf("\r",t),i=e.indexOf(`
|
|
19
|
-
`,t);return i===-1?n:n===-1||n+1===i?i:n<i?n:i}const wa={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/"},y_={}.hasOwnProperty,m5=Object.prototype;function g5(e,t){const n=t||{};return Tm({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ki:Fu,verbose:n.verbose||!1},e)}function Tm(e,t){let n;switch(t.nodeName){case"#comment":{const i=t;return n={type:"comment",value:i.data},Pc(e,i,n),n}case"#document":case"#document-fragment":{const i=t,s="mode"in i?i.mode==="quirks"||i.mode==="limited-quirks":!1;if(n={type:"root",children:E_(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const l=String(e.file),o=p5(l),d=o.toPoint(0),h=o.toPoint(l.length);n.position={start:d,end:h}}return n}case"#documentType":{const i=t;return n={type:"doctype"},Pc(e,i,n),n}case"#text":{const i=t;return n={type:"text",value:i.value},Pc(e,i,n),n}default:return n=b5(e,t),n}}function E_(e,t){let n=-1;const i=[];for(;++n<t.length;){const s=Tm(e,t[n]);i.push(s)}return i}function b5(e,t){const n=e.schema;e.schema=t.namespaceURI===wa.svg?Ki:Fu;let i=-1;const s={};for(;++i<t.attrs.length;){const d=t.attrs[i],h=(d.prefix?d.prefix+":":"")+d.name;y_.call(m5,h)||(s[h]=d.value)}const o=(e.schema.space==="svg"?h5:f5)(t.tagName,s,E_(e,t.childNodes));if(Pc(e,t,o),o.tagName==="template"){const d=t,h=d.sourceCodeLocation,f=h&&h.startTag&&Bs(h.startTag),m=h&&h.endTag&&Bs(h.endTag),b=Tm(e,d.content);f&&m&&e.file&&(b.position={start:f.end,end:m.start}),o.content=b}return e.schema=n,o}function Pc(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const i=y5(e,n,t.sourceCodeLocation);i&&(e.location=!0,n.position=i)}}function y5(e,t,n){const i=Bs(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(i&&!n.endTag&&s&&s.position&&s.position.end&&(i.end=Object.assign({},s.position.end)),e.verbose){const l={};let o;if(n.attrs)for(o in n.attrs)y_.call(n.attrs,o)&&(l[yd(e.schema,o).property]=Bs(n.attrs[o]));n.startTag;const d=Bs(n.startTag),h=n.endTag?Bs(n.endTag):void 0,f={opening:d};h&&(f.closing=h),f.properties=l,t.data={position:f}}}return i}function Bs(e){const t=sE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=sE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function sE(e){return e.line&&e.column?e:void 0}const lE={}.hasOwnProperty;function x_(e,t){const n=t||{};function i(s,...l){let o=i.invalid;const d=i.handlers;if(s&&lE.call(s,e)){const h=String(s[e]);o=lE.call(d,h)?d[h]:i.unknown}if(o)return o.call(this,s,...l)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}const E5={},x5={}.hasOwnProperty,v_=x_("type",{handlers:{root:_5,element:k5,text:S5,comment:w5,doctype:A5}});function v5(e,t){const i=(t||E5).space;return v_(e,i==="svg"?Ki:Fu)}function _5(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Am(e.children,n,t),Gs(e,n),n}function T5(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Am(e.children,n,t),Gs(e,n),n}function A5(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Gs(e,t),t}function S5(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Gs(e,t),t}function w5(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Gs(e,t),t}function k5(e,t){const n=t;let i=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=Ki);const s=[];let l;if(e.properties){for(l in e.properties)if(l!=="children"&&x5.call(e.properties,l)){const h=C5(i,l,e.properties[l]);h&&s.push(h)}}const o=i.space,d={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:wa[o],childNodes:[],parentNode:null};return d.childNodes=Am(e.children,d,i),Gs(e,d),e.tagName==="template"&&e.content&&(d.content=T5(e.content,i)),d}function C5(e,t,n){const i=yd(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&i.boolean)return;Array.isArray(n)&&(n=i.commaSeparated?m_(n):g_(n));const s={name:i.attribute,value:n===!0?"":String(n)};if(i.space&&i.space!=="html"&&i.space!=="svg"){const l=s.name.indexOf(":");l<0?s.prefix="":(s.name=s.name.slice(l+1),s.prefix=i.attribute.slice(0,l)),s.namespace=wa[i.space]}return s}function Am(e,t,n){let i=-1;const s=[];if(e)for(;++i<e.length;){const l=v_(e[i],n);l.parentNode=t,s.push(l)}return s}function Gs(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const N5=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],R5=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]),_t="�";var N;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(N||(N={}));const Sn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function __(e){return e>=55296&&e<=57343}function O5(e){return e>=56320&&e<=57343}function L5(e,t){return(e-55296)*1024+9216+t}function T_(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function A_(e){return e>=64976&&e<=65007||R5.has(e)}var re;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(re||(re={}));const M5=65536;class I5{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=M5,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:i,col:s,offset:l}=this,o=s+n,d=l+n;return{code:t,startLine:i,endLine:i,startCol:o,endCol:o,startOffset:d,endOffset:d}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(O5(n))return this.pos++,this._addGap(),L5(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.EOF;return this._err(re.surrogateInInputStream),t}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(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let i=0;i<t.length;i++)if((this.html.charCodeAt(this.pos+i)|32)!==t.charCodeAt(i))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;const i=this.html.charCodeAt(n);return i===N.CARRIAGE_RETURN?N.LINE_FEED:i}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,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,__(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){T_(t)?this._err(re.controlCharacterInInputStream):A_(t)&&this._err(re.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Fe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Fe||(Fe={}));function S_(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const D5=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘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;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;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;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫Ѐ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;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦ր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;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑Ȁ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;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾ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;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆Ȁ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;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠Ā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;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪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;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏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;쀀𝔠ƀ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ᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ā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;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕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;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀ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;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Ā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;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;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;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀ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;楼;쀀𝔩Ā;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;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;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;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;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;쀀𝔫Ȁ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;쀀𝕟膀¬;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å;쀀𝓃ortɭ⬅\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;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀ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;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀ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;楽;쀀𝔯Ā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;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ā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㍶⁕쀀𝔰Ȁ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;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñ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;쀀𝔱Ȁ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㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆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;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀ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;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),B5=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 z5(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=B5.get(e))!==null&&t!==void 0?t:e}var Vt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Vt||(Vt={}));const P5=32;var Yi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Yi||(Yi={}));function Np(e){return e>=Vt.ZERO&&e<=Vt.NINE}function H5(e){return e>=Vt.UPPER_A&&e<=Vt.UPPER_F||e>=Vt.LOWER_A&&e<=Vt.LOWER_F}function U5(e){return e>=Vt.UPPER_A&&e<=Vt.UPPER_Z||e>=Vt.LOWER_A&&e<=Vt.LOWER_Z||Np(e)}function j5(e){return e===Vt.EQUALS||U5(e)}var qt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(qt||(qt={}));var ai;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ai||(ai={}));class F5{constructor(t,n,i){this.decodeTree=t,this.emitCodePoint=n,this.errors=i,this.state=qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ai.Strict}startEntity(t){this.decodeMode=t,this.state=qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case qt.EntityStart:return t.charCodeAt(n)===Vt.NUM?(this.state=qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=qt.NamedEntity,this.stateNamedEntity(t,n));case qt.NumericStart:return this.stateNumericStart(t,n);case qt.NumericDecimal:return this.stateNumericDecimal(t,n);case qt.NumericHex:return this.stateNumericHex(t,n);case qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|P5)===Vt.LOWER_X?(this.state=qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=qt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,i,s){if(n!==i){const l=i-n;this.result=this.result*Math.pow(s,l)+Number.parseInt(t.substr(n,l),s),this.consumed+=l}}stateNumericHex(t,n){const i=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Np(s)||H5(s))n+=1;else return this.addToNumericResult(t,i,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,i,n,16),-1}stateNumericDecimal(t,n){const i=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Np(s))n+=1;else return this.addToNumericResult(t,i,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,i,n,10),-1}emitNumericEntity(t,n){var i;if(this.consumed<=n)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Vt.SEMI)this.consumed+=1;else if(this.decodeMode===ai.Strict)return 0;return this.emitCodePoint(z5(this.result),this.consumed),this.errors&&(t!==Vt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:i}=this;let s=i[this.treeIndex],l=(s&Yi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const o=t.charCodeAt(n);if(this.treeIndex=$5(i,s,this.treeIndex+Math.max(1,l),o),this.treeIndex<0)return this.result===0||this.decodeMode===ai.Attribute&&(l===0||j5(o))?0:this.emitNotTerminatedNamedEntity();if(s=i[this.treeIndex],l=(s&Yi.VALUE_LENGTH)>>14,l!==0){if(o===Vt.SEMI)return this.emitNamedEntityData(this.treeIndex,l,this.consumed+this.excess);this.decodeMode!==ai.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:i}=this,s=(i[n]&Yi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,i){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~Yi.VALUE_LENGTH:s[t+1],i),n===3&&this.emitCodePoint(s[t+2],i),i}end(){var t;switch(this.state){case qt.NamedEntity:return this.result!==0&&(this.decodeMode!==ai.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case qt.NumericDecimal:return this.emitNumericEntity(0,2);case qt.NumericHex:return this.emitNumericEntity(0,3);case qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case qt.EntityStart:return 0}}}function $5(e,t,n,i){const s=(t&Yi.BRANCH_LENGTH)>>7,l=t&Yi.JUMP_TABLE;if(s===0)return l!==0&&i===l?n:-1;if(l){const h=i-l;return h<0||h>=s?-1:e[n+h]-1}let o=n,d=o+s-1;for(;o<=d;){const h=o+d>>>1,f=e[h];if(f<i)o=h+1;else if(f>i)d=h-1;else return e[h+s]}return-1}var de;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(de||(de={}));var Na;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Na||(Na={}));var lr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(lr||(lr={}));var G;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(G||(G={}));var y;(function(e){e[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"})(y||(y={}));const q5=new Map([[G.A,y.A],[G.ADDRESS,y.ADDRESS],[G.ANNOTATION_XML,y.ANNOTATION_XML],[G.APPLET,y.APPLET],[G.AREA,y.AREA],[G.ARTICLE,y.ARTICLE],[G.ASIDE,y.ASIDE],[G.B,y.B],[G.BASE,y.BASE],[G.BASEFONT,y.BASEFONT],[G.BGSOUND,y.BGSOUND],[G.BIG,y.BIG],[G.BLOCKQUOTE,y.BLOCKQUOTE],[G.BODY,y.BODY],[G.BR,y.BR],[G.BUTTON,y.BUTTON],[G.CAPTION,y.CAPTION],[G.CENTER,y.CENTER],[G.CODE,y.CODE],[G.COL,y.COL],[G.COLGROUP,y.COLGROUP],[G.DD,y.DD],[G.DESC,y.DESC],[G.DETAILS,y.DETAILS],[G.DIALOG,y.DIALOG],[G.DIR,y.DIR],[G.DIV,y.DIV],[G.DL,y.DL],[G.DT,y.DT],[G.EM,y.EM],[G.EMBED,y.EMBED],[G.FIELDSET,y.FIELDSET],[G.FIGCAPTION,y.FIGCAPTION],[G.FIGURE,y.FIGURE],[G.FONT,y.FONT],[G.FOOTER,y.FOOTER],[G.FOREIGN_OBJECT,y.FOREIGN_OBJECT],[G.FORM,y.FORM],[G.FRAME,y.FRAME],[G.FRAMESET,y.FRAMESET],[G.H1,y.H1],[G.H2,y.H2],[G.H3,y.H3],[G.H4,y.H4],[G.H5,y.H5],[G.H6,y.H6],[G.HEAD,y.HEAD],[G.HEADER,y.HEADER],[G.HGROUP,y.HGROUP],[G.HR,y.HR],[G.HTML,y.HTML],[G.I,y.I],[G.IMG,y.IMG],[G.IMAGE,y.IMAGE],[G.INPUT,y.INPUT],[G.IFRAME,y.IFRAME],[G.KEYGEN,y.KEYGEN],[G.LABEL,y.LABEL],[G.LI,y.LI],[G.LINK,y.LINK],[G.LISTING,y.LISTING],[G.MAIN,y.MAIN],[G.MALIGNMARK,y.MALIGNMARK],[G.MARQUEE,y.MARQUEE],[G.MATH,y.MATH],[G.MENU,y.MENU],[G.META,y.META],[G.MGLYPH,y.MGLYPH],[G.MI,y.MI],[G.MO,y.MO],[G.MN,y.MN],[G.MS,y.MS],[G.MTEXT,y.MTEXT],[G.NAV,y.NAV],[G.NOBR,y.NOBR],[G.NOFRAMES,y.NOFRAMES],[G.NOEMBED,y.NOEMBED],[G.NOSCRIPT,y.NOSCRIPT],[G.OBJECT,y.OBJECT],[G.OL,y.OL],[G.OPTGROUP,y.OPTGROUP],[G.OPTION,y.OPTION],[G.P,y.P],[G.PARAM,y.PARAM],[G.PLAINTEXT,y.PLAINTEXT],[G.PRE,y.PRE],[G.RB,y.RB],[G.RP,y.RP],[G.RT,y.RT],[G.RTC,y.RTC],[G.RUBY,y.RUBY],[G.S,y.S],[G.SCRIPT,y.SCRIPT],[G.SEARCH,y.SEARCH],[G.SECTION,y.SECTION],[G.SELECT,y.SELECT],[G.SOURCE,y.SOURCE],[G.SMALL,y.SMALL],[G.SPAN,y.SPAN],[G.STRIKE,y.STRIKE],[G.STRONG,y.STRONG],[G.STYLE,y.STYLE],[G.SUB,y.SUB],[G.SUMMARY,y.SUMMARY],[G.SUP,y.SUP],[G.TABLE,y.TABLE],[G.TBODY,y.TBODY],[G.TEMPLATE,y.TEMPLATE],[G.TEXTAREA,y.TEXTAREA],[G.TFOOT,y.TFOOT],[G.TD,y.TD],[G.TH,y.TH],[G.THEAD,y.THEAD],[G.TITLE,y.TITLE],[G.TR,y.TR],[G.TRACK,y.TRACK],[G.TT,y.TT],[G.U,y.U],[G.UL,y.UL],[G.SVG,y.SVG],[G.VAR,y.VAR],[G.WBR,y.WBR],[G.XMP,y.XMP]]);function Ws(e){var t;return(t=q5.get(e))!==null&&t!==void 0?t:y.UNKNOWN}const pe=y,Y5={[de.HTML]:new Set([pe.ADDRESS,pe.APPLET,pe.AREA,pe.ARTICLE,pe.ASIDE,pe.BASE,pe.BASEFONT,pe.BGSOUND,pe.BLOCKQUOTE,pe.BODY,pe.BR,pe.BUTTON,pe.CAPTION,pe.CENTER,pe.COL,pe.COLGROUP,pe.DD,pe.DETAILS,pe.DIR,pe.DIV,pe.DL,pe.DT,pe.EMBED,pe.FIELDSET,pe.FIGCAPTION,pe.FIGURE,pe.FOOTER,pe.FORM,pe.FRAME,pe.FRAMESET,pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6,pe.HEAD,pe.HEADER,pe.HGROUP,pe.HR,pe.HTML,pe.IFRAME,pe.IMG,pe.INPUT,pe.LI,pe.LINK,pe.LISTING,pe.MAIN,pe.MARQUEE,pe.MENU,pe.META,pe.NAV,pe.NOEMBED,pe.NOFRAMES,pe.NOSCRIPT,pe.OBJECT,pe.OL,pe.P,pe.PARAM,pe.PLAINTEXT,pe.PRE,pe.SCRIPT,pe.SECTION,pe.SELECT,pe.SOURCE,pe.STYLE,pe.SUMMARY,pe.TABLE,pe.TBODY,pe.TD,pe.TEMPLATE,pe.TEXTAREA,pe.TFOOT,pe.TH,pe.THEAD,pe.TITLE,pe.TR,pe.TRACK,pe.UL,pe.WBR,pe.XMP]),[de.MATHML]:new Set([pe.MI,pe.MO,pe.MN,pe.MS,pe.MTEXT,pe.ANNOTATION_XML]),[de.SVG]:new Set([pe.TITLE,pe.FOREIGN_OBJECT,pe.DESC]),[de.XLINK]:new Set,[de.XML]:new Set,[de.XMLNS]:new Set},Rp=new Set([pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6]);G.STYLE,G.SCRIPT,G.XMP,G.IFRAME,G.NOEMBED,G.NOFRAMES,G.PLAINTEXT;var L;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(L||(L={}));const Rt={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function V5(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function fu(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function G5(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function ji(e){return G5(e)||fu(e)}function uE(e){return ji(e)||V5(e)}function Ec(e){return e+32}function w_(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function oE(e){return w_(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function W5(e){return e===N.NULL?re.nullCharacterReference:e>1114111?re.characterReferenceOutsideUnicodeRange:__(e)?re.surrogateCharacterReference:A_(e)?re.noncharacterCharacterReference:T_(e)||e===N.CARRIAGE_RETURN?re.controlCharacterReference:null}class Q5{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=L.DATA,this.returnState=L.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new I5(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new F5(D5,(i,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(i)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(re.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:i=>{this._err(re.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+i)},validateNumericCharacterReference:i=>{const s=W5(i);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var i,s;(s=(i=this.handler).onParseError)===null||s===void 0||s.call(i,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,i){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||i?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Fe.START_TAG,tagName:"",tagID:y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Fe.END_TAG,tagName:"",tagID:y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Fe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Fe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const i=this.currentToken;if(S_(i,this.currentAttr.name)===null){if(i.attrs.push(this.currentAttr),i.location&&this.currentLocation){const s=(t=(n=i.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(re.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Ws(t.tagName),t.type===Fe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(re.endTagWithAttributes),t.selfClosing&&this._err(re.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Fe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Fe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Fe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Fe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=w_(t)?Fe.WHITESPACE_CHARACTER:t===N.NULL?Fe.NULL_CHARACTER:Fe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Fe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ai.Attribute:ai.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===L.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case L.DATA:{this._stateData(t);break}case L.RCDATA:{this._stateRcdata(t);break}case L.RAWTEXT:{this._stateRawtext(t);break}case L.SCRIPT_DATA:{this._stateScriptData(t);break}case L.PLAINTEXT:{this._statePlaintext(t);break}case L.TAG_OPEN:{this._stateTagOpen(t);break}case L.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case L.TAG_NAME:{this._stateTagName(t);break}case L.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case L.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case L.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case L.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case L.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case L.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case L.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case L.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case L.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case L.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case L.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case L.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case L.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case L.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case L.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case L.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case L.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case L.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case L.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case L.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case L.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case L.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case L.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case L.BOGUS_COMMENT:{this._stateBogusComment(t);break}case L.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case L.COMMENT_START:{this._stateCommentStart(t);break}case L.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case L.COMMENT:{this._stateComment(t);break}case L.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case L.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case L.COMMENT_END:{this._stateCommentEnd(t);break}case L.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case L.DOCTYPE:{this._stateDoctype(t);break}case L.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case L.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case L.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case L.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case L.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case L.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case L.CDATA_SECTION:{this._stateCdataSection(t);break}case L.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case L.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case L.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case L.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=L.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=L.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(_t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=L.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(_t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(_t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(_t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ji(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=L.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=L.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(re.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(re.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(re.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ji(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(re.missingEndTagName),this.state=L.DATA;break}case N.EOF:{this._err(re.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(re.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=L.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.tagName+=_t;break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(fu(t)?Ec(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=L.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ji(t)?(this.state=L.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=L.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=L.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=L.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=L.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ji(t)?(this.state=L.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=L.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=L.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=L.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ji(t)?(this.state=L.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(_t);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(_t);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(_t);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ji(t)?(this._emitChars("<"),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ji(t)?(this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Sn.SCRIPT,!1)&&oE(this.preprocessor.peek(Sn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Sn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(_t);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_t);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_t);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Sn.SCRIPT,!1)&&oE(this.preprocessor.peek(Sn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Sn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(re.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=L.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(re.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.name+=_t;break}default:this.currentAttr.name+=String.fromCodePoint(fu(t)?Ec(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=L.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=L.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(re.missingAttributeValue),this.state=L.DATA,this.emitCurrentTagToken();break}default:this.state=L.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(re.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=L.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._err(re.missingWhitespaceBetweenAttributes),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=L.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._err(re.unexpectedSolidusInTag),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.data+=_t;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Sn.DASH_DASH,!0)?(this._createCommentToken(Sn.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(Sn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Sn.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(Sn.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(re.cdataInHtmlContent),this._createCommentToken(Sn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(re.incorrectlyOpenedComment),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=L.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptClosingOfEmptyComment),this.state=L.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=L.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=L.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.data+=_t;break}case N.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case N.EXCLAMATION_MARK:{n.data+="!",this.state=L.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=L.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=L.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(re.nestedComment),this.state=L.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case N.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=L.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=L.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(re.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=L.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(re.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingWhitespaceBeforeDoctypeName),this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(fu(t))this._createDoctypeToken(String.fromCharCode(Ec(t))),this.state=L.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(re.unexpectedNullCharacter),this._createDoctypeToken(_t),this.state=L.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(re.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.EOF:{this._err(re.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=L.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=L.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.name+=_t;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(fu(t)?Ec(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Sn.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Sn.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(re.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(re.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(re.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(re.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(re.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.publicId+=_t;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.publicId+=_t;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(re.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(re.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(re.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(re.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(re.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(re.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.systemId+=_t;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.systemId+=_t;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.NULL:{this._err(re.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=L.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(re.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=L.CDATA_SECTION_END:(this._emitChars("]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=L.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&uE(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){uE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(re.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const k_=new Set([y.DD,y.DT,y.LI,y.OPTGROUP,y.OPTION,y.P,y.RB,y.RP,y.RT,y.RTC]),cE=new Set([...k_,y.CAPTION,y.COLGROUP,y.TBODY,y.TD,y.TFOOT,y.TH,y.THEAD,y.TR]),Qc=new Set([y.APPLET,y.CAPTION,y.HTML,y.MARQUEE,y.OBJECT,y.TABLE,y.TD,y.TEMPLATE,y.TH]),X5=new Set([...Qc,y.OL,y.UL]),K5=new Set([...Qc,y.BUTTON]),dE=new Set([y.ANNOTATION_XML,y.MI,y.MN,y.MO,y.MS,y.MTEXT]),fE=new Set([y.DESC,y.FOREIGN_OBJECT,y.TITLE]),Z5=new Set([y.TR,y.TEMPLATE,y.HTML]),J5=new Set([y.TBODY,y.TFOOT,y.THEAD,y.TEMPLATE,y.HTML]),eN=new Set([y.TABLE,y.TEMPLATE,y.HTML]),tN=new Set([y.TD,y.TH]);class nN{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,i){this.treeAdapter=n,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=y.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===y.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===de.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const i=this._indexOf(t);this.items[i]=n,i===this.stackTop&&(this.current=n)}insertAfter(t,n,i){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,i),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==de.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const i=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(i,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Rp,de.HTML)}popUntilTableCellPopped(){this.popUntilPopped(tN,de.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let i=this.stackTop;i>=0;i--)if(t.has(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===n)return i;return-1}clearBackTo(t,n){const i=this._indexOfTagNames(t,n);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(eN,de.HTML)}clearBackToTableBodyContext(){this.clearBackTo(J5,de.HTML)}clearBackToTableRowContext(){this.clearBackTo(Z5,de.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===y.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===y.HTML}hasInDynamicScope(t,n){for(let i=this.stackTop;i>=0;i--){const s=this.tagIDs[i];switch(this.treeAdapter.getNamespaceURI(this.items[i])){case de.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case de.SVG:{if(fE.has(s))return!1;break}case de.MATHML:{if(dE.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Qc)}hasInListItemScope(t){return this.hasInDynamicScope(t,X5)}hasInButtonScope(t){return this.hasInDynamicScope(t,K5)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case de.HTML:{if(Rp.has(n))return!0;if(Qc.has(n))return!1;break}case de.SVG:{if(fE.has(n))return!1;break}case de.MATHML:{if(dE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===de.HTML)switch(this.tagIDs[n]){case t:return!0;case y.TABLE:case y.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===de.HTML)switch(this.tagIDs[t]){case y.TBODY:case y.THEAD:case y.TFOOT:return!0;case y.TABLE:case y.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===de.HTML)switch(this.tagIDs[n]){case t:return!0;case y.OPTION:case y.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&k_.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&cE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&cE.has(this.currentTagId);)this.pop()}}const E0=3;var Mr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Mr||(Mr={}));const hE={type:Mr.Marker};class rN{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const i=[],s=n.length,l=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let d=0;d<this.entries.length;d++){const h=this.entries[d];if(h.type===Mr.Marker)break;const{element:f}=h;if(this.treeAdapter.getTagName(f)===l&&this.treeAdapter.getNamespaceURI(f)===o){const m=this.treeAdapter.getAttrList(f);m.length===s&&i.push({idx:d,attrs:m})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<E0)return;const n=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,n);if(i.length<E0)return;const s=new Map(n.map(o=>[o.name,o.value]));let l=0;for(let o=0;o<i.length;o++){const d=i[o];d.attrs.every(h=>s.get(h.name)===h.value)&&(l+=1,l>=E0&&this.entries.splice(d.idx,1))}}insertMarker(){this.entries.unshift(hE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Mr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:Mr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(hE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(i=>i.type===Mr.Marker||this.treeAdapter.getTagName(i.element)===t);return n&&n.type===Mr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Mr.Element&&n.element===t)}}const Fi={createDocument(){return{nodeName:"#document",mode:lr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const i=e.childNodes.indexOf(n);e.childNodes.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,i){const s=e.childNodes.find(l=>l.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=i;else{const l={nodeName:"#documentType",name:t,publicId:n,systemId:i,parentNode:null};Fi.appendChild(e,l)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Fi.isTextNode(n)){n.value+=t;return}}Fi.appendChild(e,Fi.createTextNode(t))},insertTextBefore(e,t,n){const i=e.childNodes[e.childNodes.indexOf(n)-1];i&&Fi.isTextNode(i)?i.value+=t:Fi.insertBefore(e,Fi.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(i=>i.name));for(let i=0;i<t.length;i++)n.has(t[i].name)||e.attrs.push(t[i])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},C_="html",iN="about:legacy-compat",aN="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",N_=["+//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//"],sN=[...N_,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],lN=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),R_=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],uN=[...R_,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function pE(e,t){return t.some(n=>e.startsWith(n))}function oN(e){return e.name===C_&&e.publicId===null&&(e.systemId===null||e.systemId===iN)}function cN(e){if(e.name!==C_)return lr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===aN)return lr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),lN.has(n))return lr.QUIRKS;let i=t===null?sN:N_;if(pE(n,i))return lr.QUIRKS;if(i=t===null?R_:uN,pE(n,i))return lr.LIMITED_QUIRKS}return lr.NO_QUIRKS}const mE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},dN="definitionurl",fN="definitionURL",hN=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])),pN=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:de.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:de.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:de.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:de.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:de.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:de.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:de.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:de.XML}],["xml:space",{prefix:"xml",name:"space",namespace:de.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:de.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:de.XMLNS}]]),mN=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])),gN=new Set([y.B,y.BIG,y.BLOCKQUOTE,y.BODY,y.BR,y.CENTER,y.CODE,y.DD,y.DIV,y.DL,y.DT,y.EM,y.EMBED,y.H1,y.H2,y.H3,y.H4,y.H5,y.H6,y.HEAD,y.HR,y.I,y.IMG,y.LI,y.LISTING,y.MENU,y.META,y.NOBR,y.OL,y.P,y.PRE,y.RUBY,y.S,y.SMALL,y.SPAN,y.STRONG,y.STRIKE,y.SUB,y.SUP,y.TABLE,y.TT,y.U,y.UL,y.VAR]);function bN(e){const t=e.tagID;return t===y.FONT&&e.attrs.some(({name:i})=>i===Na.COLOR||i===Na.SIZE||i===Na.FACE)||gN.has(t)}function O_(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===dN){e.attrs[t].name=fN;break}}function L_(e){for(let t=0;t<e.attrs.length;t++){const n=hN.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Sm(e){for(let t=0;t<e.attrs.length;t++){const n=pN.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function yN(e){const t=mN.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ws(e.tagName))}function EN(e,t){return t===de.MATHML&&(e===y.MI||e===y.MO||e===y.MN||e===y.MS||e===y.MTEXT)}function xN(e,t,n){if(t===de.MATHML&&e===y.ANNOTATION_XML){for(let i=0;i<n.length;i++)if(n[i].name===Na.ENCODING){const s=n[i].value.toLowerCase();return s===mE.TEXT_HTML||s===mE.APPLICATION_XML}}return t===de.SVG&&(e===y.FOREIGN_OBJECT||e===y.DESC||e===y.TITLE)}function vN(e,t,n,i){return(!i||i===de.HTML)&&xN(e,t,n)||(!i||i===de.MATHML)&&EN(e,t)}const _N="hidden",TN=8,AN=3;var M;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(M||(M={}));const SN={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},M_=new Set([y.TABLE,y.TBODY,y.TFOOT,y.THEAD,y.TR]),gE={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Fi,onParseError:null};class bE{constructor(t,n,i=null,s=null){this.fragmentContext=i,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.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={...gE,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new Q5(this.options,this),this.activeFormattingElements=new rN(this.treeAdapter),this.fragmentContextID=i?Ws(this.treeAdapter.getTagName(i)):y.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new nN(this.document,this.treeAdapter,this)}static parse(t,n){const i=new this(n);return i.tokenizer.write(t,!0),i.document}static getFragmentParser(t,n){const i={...gE,...n};t??(t=i.treeAdapter.createElement(G.TEMPLATE,de.HTML,[]));const s=i.treeAdapter.createElement("documentmock",de.HTML,[]),l=new this(i,s,t);return l.fragmentContextID===y.TEMPLATE&&l.tmplInsertionModeStack.unshift(M.IN_TEMPLATE),l._initTokenizerForFragmentParsing(),l._insertFakeRootElement(),l._resetInsertionMode(),l._findFormInFragmentContext(),l}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,i){var s;if(!this.onParseError)return;const l=(s=t.location)!==null&&s!==void 0?s:SN,o={code:n,startLine:l.startLine,startCol:l.startCol,startOffset:l.startOffset,endLine:i?l.startLine:l.endLine,endCol:i?l.startCol:l.endCol,endOffset:i?l.startOffset:l.endOffset};this.onParseError(o)}onItemPush(t,n,i){var s,l;(l=(s=this.treeAdapter).onItemPush)===null||l===void 0||l.call(s,t),i&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var i,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(i=this.treeAdapter).onItemPop)===null||s===void 0||s.call(i,t,this.openElements.current),n){let l,o;this.openElements.stackTop===0&&this.fragmentContext?(l=this.fragmentContext,o=this.fragmentContextID):{current:l,currentTagId:o}=this.openElements,this._setContextModes(l,o)}}_setContextModes(t,n){const i=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===de.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,de.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=Rt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===G.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==de.HTML))switch(this.fragmentContextID){case y.TITLE:case y.TEXTAREA:{this.tokenizer.state=Rt.RCDATA;break}case y.STYLE:case y.XMP:case y.IFRAME:case y.NOEMBED:case y.NOFRAMES:case y.NOSCRIPT:{this.tokenizer.state=Rt.RAWTEXT;break}case y.SCRIPT:{this.tokenizer.state=Rt.SCRIPT_DATA;break}case y.PLAINTEXT:{this.tokenizer.state=Rt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",i=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,i,s),t.location){const o=this.treeAdapter.getChildNodes(this.document).find(d=>this.treeAdapter.isDocumentTypeNode(d));o&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const i=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i??this.document,t)}}_appendElement(t,n){const i=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(i,t.location)}_insertElement(t,n){const i=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID)}_insertFakeElement(t,n){const i=this.treeAdapter.createElement(t,de.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,de.HTML,t.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,i),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(G.HTML,de.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,y.HTML)}_appendCommentNode(t,n){const i=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_insertCharacters(t){let n,i;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(n,t.chars,i):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),l=i?s.lastIndexOf(i):s.length,o=s[l-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:h,endCol:f,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:h,endCol:f,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}_adoptNodes(t,n){for(let i=this.treeAdapter.getFirstChild(t);i;i=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(n,i)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const i=n.location,s=this.treeAdapter.getTagName(t),l=n.type===Fe.END_TAG&&s===n.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,l)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,i;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,i=this.fragmentContextID):{current:n,currentTagId:i}=this.openElements,t.tagID===y.SVG&&this.treeAdapter.getTagName(n)===G.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===de.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===y.MGLYPH||t.tagID===y.MALIGNMARK)&&i!==void 0&&!this._isIntegrationPoint(i,n,de.HTML)}_processToken(t){switch(t.type){case Fe.CHARACTER:{this.onCharacter(t);break}case Fe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Fe.COMMENT:{this.onComment(t);break}case Fe.DOCTYPE:{this.onDoctype(t);break}case Fe.START_TAG:{this._processStartTag(t);break}case Fe.END_TAG:{this.onEndTag(t);break}case Fe.EOF:{this.onEof(t);break}case Fe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,i){const s=this.treeAdapter.getNamespaceURI(n),l=this.treeAdapter.getAttrList(n);return vN(t,s,l,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Mr.Marker||this.openElements.contains(s.element)),i=n===-1?t-1:n-1;for(let s=i;s>=0;s--){const l=this.activeFormattingElements.entries[s];this._insertElement(l.token,this.treeAdapter.getNamespaceURI(l.element)),l.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(y.P),this.openElements.popUntilTagNamePopped(y.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case y.TR:{this.insertionMode=M.IN_ROW;return}case y.TBODY:case y.THEAD:case y.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case y.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case y.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case y.TABLE:{this.insertionMode=M.IN_TABLE;return}case y.BODY:{this.insertionMode=M.IN_BODY;return}case y.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case y.SELECT:{this._resetInsertionModeForSelect(t);return}case y.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case y.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case y.TD:case y.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case y.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const i=this.openElements.tagIDs[n];if(i===y.TEMPLATE)break;if(i===y.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return M_.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case y.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===de.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case y.TABLE:{const i=this.treeAdapter.getParentNode(n);return i?{parent:i,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const i=this.treeAdapter.getNamespaceURI(t);return Y5[i].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){tR(this,t);return}switch(this.insertionMode){case M.INITIAL:{Zl(this,t);break}case M.BEFORE_HTML:{bu(this,t);break}case M.BEFORE_HEAD:{yu(this,t);break}case M.IN_HEAD:{Eu(this,t);break}case M.IN_HEAD_NO_SCRIPT:{xu(this,t);break}case M.AFTER_HEAD:{vu(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{D_(this,t);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{x0(this,t);break}case M.IN_TABLE_TEXT:{j_(this,t);break}case M.IN_COLUMN_GROUP:{Xc(this,t);break}case M.AFTER_BODY:{Kc(this,t);break}case M.AFTER_AFTER_BODY:{Hc(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){eR(this,t);return}switch(this.insertionMode){case M.INITIAL:{Zl(this,t);break}case M.BEFORE_HTML:{bu(this,t);break}case M.BEFORE_HEAD:{yu(this,t);break}case M.IN_HEAD:{Eu(this,t);break}case M.IN_HEAD_NO_SCRIPT:{xu(this,t);break}case M.AFTER_HEAD:{vu(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{x0(this,t);break}case M.IN_COLUMN_GROUP:{Xc(this,t);break}case M.AFTER_BODY:{Kc(this,t);break}case M.AFTER_AFTER_BODY:{Hc(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Op(this,t);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{Op(this,t);break}case M.IN_TABLE_TEXT:{Jl(this,t);break}case M.AFTER_BODY:{LN(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{MN(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{IN(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,re.misplacedDoctype);break}case M.IN_TABLE_TEXT:{Jl(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,re.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?nR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Zl(this,t);break}case M.BEFORE_HTML:{DN(this,t);break}case M.BEFORE_HEAD:{zN(this,t);break}case M.IN_HEAD:{xr(this,t);break}case M.IN_HEAD_NO_SCRIPT:{UN(this,t);break}case M.AFTER_HEAD:{FN(this,t);break}case M.IN_BODY:{ln(this,t);break}case M.IN_TABLE:{Fs(this,t);break}case M.IN_TABLE_TEXT:{Jl(this,t);break}case M.IN_CAPTION:{P8(this,t);break}case M.IN_COLUMN_GROUP:{Cm(this,t);break}case M.IN_TABLE_BODY:{vd(this,t);break}case M.IN_ROW:{_d(this,t);break}case M.IN_CELL:{j8(this,t);break}case M.IN_SELECT:{q_(this,t);break}case M.IN_SELECT_IN_TABLE:{$8(this,t);break}case M.IN_TEMPLATE:{Y8(this,t);break}case M.AFTER_BODY:{G8(this,t);break}case M.IN_FRAMESET:{W8(this,t);break}case M.AFTER_FRAMESET:{X8(this,t);break}case M.AFTER_AFTER_BODY:{Z8(this,t);break}case M.AFTER_AFTER_FRAMESET:{J8(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?rR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Zl(this,t);break}case M.BEFORE_HTML:{BN(this,t);break}case M.BEFORE_HEAD:{PN(this,t);break}case M.IN_HEAD:{HN(this,t);break}case M.IN_HEAD_NO_SCRIPT:{jN(this,t);break}case M.AFTER_HEAD:{$N(this,t);break}case M.IN_BODY:{xd(this,t);break}case M.TEXT:{C8(this,t);break}case M.IN_TABLE:{Cu(this,t);break}case M.IN_TABLE_TEXT:{Jl(this,t);break}case M.IN_CAPTION:{H8(this,t);break}case M.IN_COLUMN_GROUP:{U8(this,t);break}case M.IN_TABLE_BODY:{Lp(this,t);break}case M.IN_ROW:{$_(this,t);break}case M.IN_CELL:{F8(this,t);break}case M.IN_SELECT:{Y_(this,t);break}case M.IN_SELECT_IN_TABLE:{q8(this,t);break}case M.IN_TEMPLATE:{V8(this,t);break}case M.AFTER_BODY:{G_(this,t);break}case M.IN_FRAMESET:{Q8(this,t);break}case M.AFTER_FRAMESET:{K8(this,t);break}case M.AFTER_AFTER_BODY:{Hc(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Zl(this,t);break}case M.BEFORE_HTML:{bu(this,t);break}case M.BEFORE_HEAD:{yu(this,t);break}case M.IN_HEAD:{Eu(this,t);break}case M.IN_HEAD_NO_SCRIPT:{xu(this,t);break}case M.AFTER_HEAD:{vu(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{H_(this,t);break}case M.TEXT:{N8(this,t);break}case M.IN_TABLE_TEXT:{Jl(this,t);break}case M.IN_TEMPLATE:{V_(this,t);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{km(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{I_(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{x0(this,t);break}case M.IN_TABLE_TEXT:{U_(this,t);break}}}}function wN(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):P_(e,t),n}function kN(e,t){let n=null,i=e.openElements.stackTop;for(;i>=0;i--){const s=e.openElements.items[i];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[i])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(i,0)),e.activeFormattingElements.removeEntry(t)),n}function CN(e,t,n){let i=t,s=e.openElements.getCommonAncestor(t);for(let l=0,o=s;o!==n;l++,o=s){s=e.openElements.getCommonAncestor(o);const d=e.activeFormattingElements.getElementEntry(o),h=d&&l>=AN;!d||h?(h&&e.activeFormattingElements.removeEntry(d),e.openElements.remove(o)):(o=NN(e,d),i===t&&(e.activeFormattingElements.bookmark=d),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(o,i),i=o)}return i}function NN(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),i=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,i),t.element=i,i}function RN(e,t,n){const i=e.treeAdapter.getTagName(t),s=Ws(i);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const l=e.treeAdapter.getNamespaceURI(t);s===y.TEMPLATE&&l===de.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ON(e,t,n){const i=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,l=e.treeAdapter.createElement(s.tagName,i,s.attrs);e._adoptNodes(t,l),e.treeAdapter.appendChild(t,l),e.activeFormattingElements.insertElementAfterBookmark(l,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,l,s.tagID)}function wm(e,t){for(let n=0;n<TN;n++){const i=wN(e,t);if(!i)break;const s=kN(e,i);if(!s)break;e.activeFormattingElements.bookmark=i;const l=CN(e,s,i.element),o=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(l),o&&RN(e,o,l),ON(e,s,i)}}function Op(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function LN(e,t){e._appendCommentNode(t,e.openElements.items[0])}function MN(e,t){e._appendCommentNode(t,e.document)}function km(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let i=e.openElements.stackTop;i>=n;i--)e._setEndLocation(e.openElements.items[i],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const i=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(i);if(s&&!s.endTag&&(e._setEndLocation(i,t),e.openElements.stackTop>=1)){const l=e.openElements.items[1],o=e.treeAdapter.getNodeSourceCodeLocation(l);o&&!o.endTag&&e._setEndLocation(l,t)}}}}function IN(e,t){e._setDocumentType(t);const n=t.forceQuirks?lr.QUIRKS:cN(t);oN(t)||e._err(t,re.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Zl(e,t){e._err(t,re.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,lr.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function DN(e,t){t.tagID===y.HTML?(e._insertElement(t,de.HTML),e.insertionMode=M.BEFORE_HEAD):bu(e,t)}function BN(e,t){const n=t.tagID;(n===y.HTML||n===y.HEAD||n===y.BODY||n===y.BR)&&bu(e,t)}function bu(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function zN(e,t){switch(t.tagID){case y.HTML:{ln(e,t);break}case y.HEAD:{e._insertElement(t,de.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:yu(e,t)}}function PN(e,t){const n=t.tagID;n===y.HEAD||n===y.BODY||n===y.HTML||n===y.BR?yu(e,t):e._err(t,re.endTagWithoutMatchingOpenElement)}function yu(e,t){e._insertFakeElement(G.HEAD,y.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function xr(e,t){switch(t.tagID){case y.HTML:{ln(e,t);break}case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:{e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case y.TITLE:{e._switchToTextParsing(t,Rt.RCDATA);break}case y.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Rt.RAWTEXT):(e._insertElement(t,de.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case y.NOFRAMES:case y.STYLE:{e._switchToTextParsing(t,Rt.RAWTEXT);break}case y.SCRIPT:{e._switchToTextParsing(t,Rt.SCRIPT_DATA);break}case y.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case y.HEAD:{e._err(t,re.misplacedStartTagForHeadElement);break}default:Eu(e,t)}}function HN(e,t){switch(t.tagID){case y.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case y.BODY:case y.BR:case y.HTML:{Eu(e,t);break}case y.TEMPLATE:{Ba(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function Ba(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==y.TEMPLATE&&e._err(t,re.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,re.endTagWithoutMatchingOpenElement)}function Eu(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function UN(e,t){switch(t.tagID){case y.HTML:{ln(e,t);break}case y.BASEFONT:case y.BGSOUND:case y.HEAD:case y.LINK:case y.META:case y.NOFRAMES:case y.STYLE:{xr(e,t);break}case y.NOSCRIPT:{e._err(t,re.nestedNoscriptInHead);break}default:xu(e,t)}}function jN(e,t){switch(t.tagID){case y.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case y.BR:{xu(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function xu(e,t){const n=t.type===Fe.EOF?re.openElementsLeftAfterEof:re.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function FN(e,t){switch(t.tagID){case y.HTML:{ln(e,t);break}case y.BODY:{e._insertElement(t,de.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case y.FRAMESET:{e._insertElement(t,de.HTML),e.insertionMode=M.IN_FRAMESET;break}case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:case y.NOFRAMES:case y.SCRIPT:case y.STYLE:case y.TEMPLATE:case y.TITLE:{e._err(t,re.abandonedHeadElementChild),e.openElements.push(e.headElement,y.HEAD),xr(e,t),e.openElements.remove(e.headElement);break}case y.HEAD:{e._err(t,re.misplacedStartTagForHeadElement);break}default:vu(e,t)}}function $N(e,t){switch(t.tagID){case y.BODY:case y.HTML:case y.BR:{vu(e,t);break}case y.TEMPLATE:{Ba(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function vu(e,t){e._insertFakeElement(G.BODY,y.BODY),e.insertionMode=M.IN_BODY,Ed(e,t)}function Ed(e,t){switch(t.type){case Fe.CHARACTER:{D_(e,t);break}case Fe.WHITESPACE_CHARACTER:{I_(e,t);break}case Fe.COMMENT:{Op(e,t);break}case Fe.START_TAG:{ln(e,t);break}case Fe.END_TAG:{xd(e,t);break}case Fe.EOF:{H_(e,t);break}}}function I_(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function D_(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function qN(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function YN(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function VN(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,de.HTML),e.insertionMode=M.IN_FRAMESET)}function GN(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML)}function WN(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Rp.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,de.HTML)}function QN(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function XN(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML),n||(e.formElement=e.openElements.current))}function KN(e,t){e.framesetOk=!1;const n=t.tagID;for(let i=e.openElements.stackTop;i>=0;i--){const s=e.openElements.tagIDs[i];if(n===y.LI&&s===y.LI||(n===y.DD||n===y.DT)&&(s===y.DD||s===y.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==y.ADDRESS&&s!==y.DIV&&s!==y.P&&e._isSpecialElement(e.openElements.items[i],s))break}e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML)}function ZN(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML),e.tokenizer.state=Rt.PLAINTEXT}function JN(e,t){e.openElements.hasInScope(y.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.framesetOk=!1}function e8(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(G.A);n&&(wm(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function t8(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function n8(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(y.NOBR)&&(wm(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,de.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function r8(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function i8(e,t){e.treeAdapter.getDocumentMode(e.document)!==lr.QUIRKS&&e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function B_(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,de.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function z_(e){const t=S_(e,Na.TYPE);return t!=null&&t.toLowerCase()===_N}function a8(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,de.HTML),z_(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function s8(e,t){e._appendElement(t,de.HTML),t.ackSelfClosing=!0}function l8(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._appendElement(t,de.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function u8(e,t){t.tagName=G.IMG,t.tagID=y.IMG,B_(e,t)}function o8(e,t){e._insertElement(t,de.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Rt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function c8(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function d8(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function yE(e,t){e._switchToTextParsing(t,Rt.RAWTEXT)}function f8(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function h8(e,t){e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML)}function p8(e,t){e.openElements.hasInScope(y.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,de.HTML)}function m8(e,t){e.openElements.hasInScope(y.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(y.RTC),e._insertElement(t,de.HTML)}function g8(e,t){e._reconstructActiveFormattingElements(),O_(t),Sm(t),t.selfClosing?e._appendElement(t,de.MATHML):e._insertElement(t,de.MATHML),t.ackSelfClosing=!0}function b8(e,t){e._reconstructActiveFormattingElements(),L_(t),Sm(t),t.selfClosing?e._appendElement(t,de.SVG):e._insertElement(t,de.SVG),t.ackSelfClosing=!0}function EE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML)}function ln(e,t){switch(t.tagID){case y.I:case y.S:case y.B:case y.U:case y.EM:case y.TT:case y.BIG:case y.CODE:case y.FONT:case y.SMALL:case y.STRIKE:case y.STRONG:{t8(e,t);break}case y.A:{e8(e,t);break}case y.H1:case y.H2:case y.H3:case y.H4:case y.H5:case y.H6:{WN(e,t);break}case y.P:case y.DL:case y.OL:case y.UL:case y.DIV:case y.DIR:case y.NAV:case y.MAIN:case y.MENU:case y.ASIDE:case y.CENTER:case y.FIGURE:case y.FOOTER:case y.HEADER:case y.HGROUP:case y.DIALOG:case y.DETAILS:case y.ADDRESS:case y.ARTICLE:case y.SEARCH:case y.SECTION:case y.SUMMARY:case y.FIELDSET:case y.BLOCKQUOTE:case y.FIGCAPTION:{GN(e,t);break}case y.LI:case y.DD:case y.DT:{KN(e,t);break}case y.BR:case y.IMG:case y.WBR:case y.AREA:case y.EMBED:case y.KEYGEN:{B_(e,t);break}case y.HR:{l8(e,t);break}case y.RB:case y.RTC:{p8(e,t);break}case y.RT:case y.RP:{m8(e,t);break}case y.PRE:case y.LISTING:{QN(e,t);break}case y.XMP:{c8(e,t);break}case y.SVG:{b8(e,t);break}case y.HTML:{qN(e,t);break}case y.BASE:case y.LINK:case y.META:case y.STYLE:case y.TITLE:case y.SCRIPT:case y.BGSOUND:case y.BASEFONT:case y.TEMPLATE:{xr(e,t);break}case y.BODY:{YN(e,t);break}case y.FORM:{XN(e,t);break}case y.NOBR:{n8(e,t);break}case y.MATH:{g8(e,t);break}case y.TABLE:{i8(e,t);break}case y.INPUT:{a8(e,t);break}case y.PARAM:case y.TRACK:case y.SOURCE:{s8(e,t);break}case y.IMAGE:{u8(e,t);break}case y.BUTTON:{JN(e,t);break}case y.APPLET:case y.OBJECT:case y.MARQUEE:{r8(e,t);break}case y.IFRAME:{d8(e,t);break}case y.SELECT:{f8(e,t);break}case y.OPTION:case y.OPTGROUP:{h8(e,t);break}case y.NOEMBED:case y.NOFRAMES:{yE(e,t);break}case y.FRAMESET:{VN(e,t);break}case y.TEXTAREA:{o8(e,t);break}case y.NOSCRIPT:{e.options.scriptingEnabled?yE(e,t):EE(e,t);break}case y.PLAINTEXT:{ZN(e,t);break}case y.COL:case y.TH:case y.TD:case y.TR:case y.HEAD:case y.FRAME:case y.TBODY:case y.TFOOT:case y.THEAD:case y.CAPTION:case y.COLGROUP:break;default:EE(e,t)}}function y8(e,t){if(e.openElements.hasInScope(y.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function E8(e,t){e.openElements.hasInScope(y.BODY)&&(e.insertionMode=M.AFTER_BODY,G_(e,t))}function x8(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function v8(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(y.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(y.FORM):n&&e.openElements.remove(n))}function _8(e){e.openElements.hasInButtonScope(y.P)||e._insertFakeElement(G.P,y.P),e._closePElement()}function T8(e){e.openElements.hasInListItemScope(y.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(y.LI),e.openElements.popUntilTagNamePopped(y.LI))}function A8(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function S8(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function w8(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function k8(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(G.BR,y.BR),e.openElements.pop(),e.framesetOk=!1}function P_(e,t){const n=t.tagName,i=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const l=e.openElements.items[s],o=e.openElements.tagIDs[s];if(i===o&&(i!==y.UNKNOWN||e.treeAdapter.getTagName(l)===n)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(l,o))break}}function xd(e,t){switch(t.tagID){case y.A:case y.B:case y.I:case y.S:case y.U:case y.EM:case y.TT:case y.BIG:case y.CODE:case y.FONT:case y.NOBR:case y.SMALL:case y.STRIKE:case y.STRONG:{wm(e,t);break}case y.P:{_8(e);break}case y.DL:case y.UL:case y.OL:case y.DIR:case y.DIV:case y.NAV:case y.PRE:case y.MAIN:case y.MENU:case y.ASIDE:case y.BUTTON:case y.CENTER:case y.FIGURE:case y.FOOTER:case y.HEADER:case y.HGROUP:case y.DIALOG:case y.ADDRESS:case y.ARTICLE:case y.DETAILS:case y.SEARCH:case y.SECTION:case y.SUMMARY:case y.LISTING:case y.FIELDSET:case y.BLOCKQUOTE:case y.FIGCAPTION:{x8(e,t);break}case y.LI:{T8(e);break}case y.DD:case y.DT:{A8(e,t);break}case y.H1:case y.H2:case y.H3:case y.H4:case y.H5:case y.H6:{S8(e);break}case y.BR:{k8(e);break}case y.BODY:{y8(e,t);break}case y.HTML:{E8(e,t);break}case y.FORM:{v8(e);break}case y.APPLET:case y.OBJECT:case y.MARQUEE:{w8(e,t);break}case y.TEMPLATE:{Ba(e,t);break}default:P_(e,t)}}function H_(e,t){e.tmplInsertionModeStack.length>0?V_(e,t):km(e,t)}function C8(e,t){var n;t.tagID===y.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function N8(e,t){e._err(t,re.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function x0(e,t){if(e.openElements.currentTagId!==void 0&&M_.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Fe.CHARACTER:{j_(e,t);break}case Fe.WHITESPACE_CHARACTER:{U_(e,t);break}}else $u(e,t)}function R8(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,de.HTML),e.insertionMode=M.IN_CAPTION}function O8(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,de.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function L8(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.COLGROUP,y.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,Cm(e,t)}function M8(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,de.HTML),e.insertionMode=M.IN_TABLE_BODY}function I8(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.TBODY,y.TBODY),e.insertionMode=M.IN_TABLE_BODY,vd(e,t)}function D8(e,t){e.openElements.hasInTableScope(y.TABLE)&&(e.openElements.popUntilTagNamePopped(y.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function B8(e,t){z_(t)?e._appendElement(t,de.HTML):$u(e,t),t.ackSelfClosing=!0}function z8(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,de.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Fs(e,t){switch(t.tagID){case y.TD:case y.TH:case y.TR:{I8(e,t);break}case y.STYLE:case y.SCRIPT:case y.TEMPLATE:{xr(e,t);break}case y.COL:{L8(e,t);break}case y.FORM:{z8(e,t);break}case y.TABLE:{D8(e,t);break}case y.TBODY:case y.TFOOT:case y.THEAD:{M8(e,t);break}case y.INPUT:{B8(e,t);break}case y.CAPTION:{R8(e,t);break}case y.COLGROUP:{O8(e,t);break}default:$u(e,t)}}function Cu(e,t){switch(t.tagID){case y.TABLE:{e.openElements.hasInTableScope(y.TABLE)&&(e.openElements.popUntilTagNamePopped(y.TABLE),e._resetInsertionMode());break}case y.TEMPLATE:{Ba(e,t);break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TBODY:case y.TD:case y.TFOOT:case y.TH:case y.THEAD:case y.TR:break;default:$u(e,t)}}function $u(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ed(e,t),e.fosterParentingEnabled=n}function U_(e,t){e.pendingCharacterTokens.push(t)}function j_(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Jl(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)$u(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const F_=new Set([y.CAPTION,y.COL,y.COLGROUP,y.TBODY,y.TD,y.TFOOT,y.TH,y.THEAD,y.TR]);function P8(e,t){const n=t.tagID;F_.has(n)?e.openElements.hasInTableScope(y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,Fs(e,t)):ln(e,t)}function H8(e,t){const n=t.tagID;switch(n){case y.CAPTION:case y.TABLE:{e.openElements.hasInTableScope(y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,n===y.TABLE&&Cu(e,t));break}case y.BODY:case y.COL:case y.COLGROUP:case y.HTML:case y.TBODY:case y.TD:case y.TFOOT:case y.TH:case y.THEAD:case y.TR:break;default:xd(e,t)}}function Cm(e,t){switch(t.tagID){case y.HTML:{ln(e,t);break}case y.COL:{e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case y.TEMPLATE:{xr(e,t);break}default:Xc(e,t)}}function U8(e,t){switch(t.tagID){case y.COLGROUP:{e.openElements.currentTagId===y.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case y.TEMPLATE:{Ba(e,t);break}case y.COL:break;default:Xc(e,t)}}function Xc(e,t){e.openElements.currentTagId===y.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function vd(e,t){switch(t.tagID){case y.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,de.HTML),e.insertionMode=M.IN_ROW;break}case y.TH:case y.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(G.TR,y.TR),e.insertionMode=M.IN_ROW,_d(e,t);break}case y.CAPTION:case y.COL:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,Fs(e,t));break}default:Fs(e,t)}}function Lp(e,t){const n=t.tagID;switch(t.tagID){case y.TBODY:case y.TFOOT:case y.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case y.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,Cu(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TD:case y.TH:case y.TR:break;default:Cu(e,t)}}function _d(e,t){switch(t.tagID){case y.TH:case y.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,de.HTML),e.insertionMode=M.IN_CELL,e.activeFormattingElements.insertMarker();break}case y.CAPTION:case y.COL:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:case y.TR:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,vd(e,t));break}default:Fs(e,t)}}function $_(e,t){switch(t.tagID){case y.TR:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case y.TABLE:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Lp(e,t));break}case y.TBODY:case y.TFOOT:case y.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(y.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Lp(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TD:case y.TH:break;default:Cu(e,t)}}function j8(e,t){const n=t.tagID;F_.has(n)?(e.openElements.hasInTableScope(y.TD)||e.openElements.hasInTableScope(y.TH))&&(e._closeTableCell(),_d(e,t)):ln(e,t)}function F8(e,t){const n=t.tagID;switch(n){case y.TD:case y.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_ROW);break}case y.TABLE:case y.TBODY:case y.TFOOT:case y.THEAD:case y.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),$_(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:break;default:xd(e,t)}}function q_(e,t){switch(t.tagID){case y.HTML:{ln(e,t);break}case y.OPTION:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e._insertElement(t,de.HTML);break}case y.OPTGROUP:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop(),e._insertElement(t,de.HTML);break}case y.HR:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop(),e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case y.INPUT:case y.KEYGEN:case y.TEXTAREA:case y.SELECT:{e.openElements.hasInSelectScope(y.SELECT)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),t.tagID!==y.SELECT&&e._processStartTag(t));break}case y.SCRIPT:case y.TEMPLATE:{xr(e,t);break}}}function Y_(e,t){switch(t.tagID){case y.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===y.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===y.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop();break}case y.OPTION:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop();break}case y.SELECT:{e.openElements.hasInSelectScope(y.SELECT)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode());break}case y.TEMPLATE:{Ba(e,t);break}}}function $8(e,t){const n=t.tagID;n===y.CAPTION||n===y.TABLE||n===y.TBODY||n===y.TFOOT||n===y.THEAD||n===y.TR||n===y.TD||n===y.TH?(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),e._processStartTag(t)):q_(e,t)}function q8(e,t){const n=t.tagID;n===y.CAPTION||n===y.TABLE||n===y.TBODY||n===y.TFOOT||n===y.THEAD||n===y.TR||n===y.TD||n===y.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Y_(e,t)}function Y8(e,t){switch(t.tagID){case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:case y.NOFRAMES:case y.SCRIPT:case y.STYLE:case y.TEMPLATE:case y.TITLE:{xr(e,t);break}case y.CAPTION:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,Fs(e,t);break}case y.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,Cm(e,t);break}case y.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,vd(e,t);break}case y.TD:case y.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,_d(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,ln(e,t)}}function V8(e,t){t.tagID===y.TEMPLATE&&Ba(e,t)}function V_(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):km(e,t)}function G8(e,t){t.tagID===y.HTML?ln(e,t):Kc(e,t)}function G_(e,t){var n;if(t.tagID===y.HTML){if(e.fragmentContext||(e.insertionMode=M.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===y.HTML){e._setEndLocation(e.openElements.items[0],t);const i=e.openElements.items[1];i&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(i))===null||n===void 0)&&n.endTag)&&e._setEndLocation(i,t)}}else Kc(e,t)}function Kc(e,t){e.insertionMode=M.IN_BODY,Ed(e,t)}function W8(e,t){switch(t.tagID){case y.HTML:{ln(e,t);break}case y.FRAMESET:{e._insertElement(t,de.HTML);break}case y.FRAME:{e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case y.NOFRAMES:{xr(e,t);break}}}function Q8(e,t){t.tagID===y.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==y.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function X8(e,t){switch(t.tagID){case y.HTML:{ln(e,t);break}case y.NOFRAMES:{xr(e,t);break}}}function K8(e,t){t.tagID===y.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function Z8(e,t){t.tagID===y.HTML?ln(e,t):Hc(e,t)}function Hc(e,t){e.insertionMode=M.IN_BODY,Ed(e,t)}function J8(e,t){switch(t.tagID){case y.HTML:{ln(e,t);break}case y.NOFRAMES:{xr(e,t);break}}}function eR(e,t){t.chars=_t,e._insertCharacters(t)}function tR(e,t){e._insertCharacters(t),e.framesetOk=!1}function W_(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==de.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function nR(e,t){if(bN(t))W_(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(n);i===de.MATHML?O_(t):i===de.SVG&&(yN(t),L_(t)),Sm(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function rR(e,t){if(t.tagID===y.P||t.tagID===y.BR){W_(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const i=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(i)===de.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(i);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}G.AREA,G.BASE,G.BASEFONT,G.BGSOUND,G.BR,G.COL,G.EMBED,G.FRAME,G.HR,G.IMG,G.INPUT,G.KEYGEN,G.LINK,G.META,G.PARAM,G.SOURCE,G.TRACK,G.WBR;const Td=Q_("end"),Br=Q_("start");function Q_(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function X_(e){const t=Br(e),n=Td(e);if(t&&n)return{start:t,end:n}}const iR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,aR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),xE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function K_(e,t){const n=mR(e),i=x_("type",{handlers:{root:sR,element:lR,text:uR,comment:J_,doctype:oR,raw:dR},unknown:fR}),s={parser:n?new bE(xE):bE.getFragmentParser(void 0,xE),handle(d){i(d,s)},stitches:!1,options:t||{}};i(e,s),Qs(s,Br());const l=n?s.parser.document:s.parser.getFragment(),o=g5(l,{file:s.options.file});return s.stitches&&Dr(o,"comment",function(d,h,f){const m=d;if(m.value.stitch&&f&&h!==void 0){const b=f.children;return b[h]=m.value.stitch,h}}),o.type==="root"&&o.children.length===1&&o.children[0].type===e.type?o.children[0]:o}function Z_(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function sR(e,t){Z_(e.children,t)}function lR(e,t){hR(e,t),Z_(e.children,t),pR(e,t)}function uR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Fe.CHARACTER,chars:e.value,location:qu(e)};Qs(t,Br(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function oR(e,t){const n={type:Fe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:qu(e)};Qs(t,Br(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function cR(e,t){t.stitches=!0;const n=gR(e);if("children"in e&&"children"in n){const i=K_({type:"root",children:e.children},t.options);n.children=i.children}J_({type:"comment",value:{stitch:n}},t)}function J_(e,t){const n=e.value,i={type:Fe.COMMENT,data:n,location:qu(e)};Qs(t,Br(e)),t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken)}function dR(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,eT(t,Br(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(iR,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function fR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))cR(n,t);else{let i="";throw aR.has(n.type)&&(i=". 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"),new Error("Cannot compile `"+n.type+"` node"+i)}}function Qs(e,t){eT(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,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=Rt.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 eT(e,t){if(t&&t.offset!==void 0){const n={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=n}}function hR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Rt.PLAINTEXT)return;Qs(t,Br(e));const i=t.parser.openElements.current;let s="namespaceURI"in i?i.namespaceURI:wa.html;s===wa.html&&n==="svg"&&(s=wa.svg);const l=v5({...e,children:[]},{space:s===wa.svg?"svg":"html"}),o={type:Fe.START_TAG,tagName:n,tagID:Ws(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in l?l.attrs:[],location:qu(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function pR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&N5.includes(n)||t.parser.tokenizer.state===Rt.PLAINTEXT)return;Qs(t,Td(e));const i={type:Fe.END_TAG,tagName:n,tagID:Ws(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:qu(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Rt.RCDATA||t.parser.tokenizer.state===Rt.RAWTEXT||t.parser.tokenizer.state===Rt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Rt.DATA)}function mR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function qu(e){const t=Br(e)||{line:void 0,column:void 0,offset:void 0},n=Td(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function gR(e){return"children"in e?La({...e,children:[]}):La(e)}function Mp(e){return function(t,n){return K_(t,{...e,file:n})}}const ya=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ta={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ya,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ya],h2:[["className","sr-only"]],img:[...ya,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ya,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ya],table:[...ya],ul:[...ya,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},$i={}.hasOwnProperty;function bR(e,t){let n={type:"root",children:[]};const i={schema:t?{...Ta,...t}:Ta,stack:[]},s=tT(i,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function tT(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return yR(e,n);case"doctype":return ER(e,n);case"element":return xR(e,n);case"root":return vR(e,n);case"text":return _R(e,n)}}}function yR(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",i=n.indexOf("-->"),l={type:"comment",value:i<0?n:n.slice(0,i)};return Yu(l,t),l}}function ER(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Yu(n,t),n}}function xR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const i=nT(e,t.children),s=TR(e,t.properties);e.stack.pop();let l=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(l=!0,e.schema.ancestors&&$i.call(e.schema.ancestors,n))){const d=e.schema.ancestors[n];let h=-1;for(l=!1;++h<d.length;)e.stack.includes(d[h])&&(l=!0)}if(!l)return e.schema.strip&&!e.schema.strip.includes(n)?i:void 0;const o={type:"element",tagName:n,properties:s,children:i};return Yu(o,t),o}function vR(e,t){const i={type:"root",children:nT(e,t.children)};return Yu(i,t),i}function _R(e,t){const i={type:"text",value:typeof t.value=="string"?t.value:""};return Yu(i,t),i}function nT(e,t){const n=[];if(Array.isArray(t)){const i=t;let s=-1;for(;++s<i.length;){const l=tT(e,i[s]);l&&(Array.isArray(l)?n.push(...l):n.push(l))}}return n}function TR(e,t){const n=e.stack[e.stack.length-1],i=e.schema.attributes,s=e.schema.required,l=i&&$i.call(i,n)?i[n]:void 0,o=i&&$i.call(i,"*")?i["*"]:void 0,d=t&&typeof t=="object"?t:{},h={};let f;for(f in d)if($i.call(d,f)){const m=d[f];let b=vE(e,_E(l,f),f,m);b==null&&(b=vE(e,_E(o,f),f,m)),b!=null&&(h[f]=b)}if(s&&$i.call(s,n)){const m=s[n];for(f in m)$i.call(m,f)&&!$i.call(h,f)&&(h[f]=m[f])}return h}function vE(e,t,n,i){return t?Array.isArray(i)?AR(e,t,n,i):rT(e,t,n,i):void 0}function AR(e,t,n,i){let s=-1;const l=[];for(;++s<i.length;){const o=rT(e,t,n,i[s]);(typeof o=="number"||typeof o=="string")&&l.push(o)}return l}function rT(e,t,n,i){if(!(typeof i!="boolean"&&typeof i!="number"&&typeof i!="string")&&SR(e,n,i)){if(typeof t=="object"&&t.length>1){let s=!1,l=0;for(;++l<t.length;){const o=t[l];if(o&&typeof o=="object"&&"flags"in o){if(o.test(String(i))){s=!0;break}}else if(o===i){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+i:i}}function SR(e,t,n){const i=e.schema.protocols&&$i.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!i||i.length===0)return!0;const s=String(n),l=s.indexOf(":"),o=s.indexOf("?"),d=s.indexOf("#"),h=s.indexOf("/");if(l<0||h>-1&&l>h||o>-1&&l>o||d>-1&&l>d)return!0;let f=-1;for(;++f<i.length;){const m=i[f];if(l===m.length&&s.slice(0,m.length)===m)return!0}return!1}function Yu(e,t){const n=X_(t);t.data&&(e.data=La(t.data)),n&&(e.position=n)}function _E(e,t){let n,i=-1;if(e)for(;++i<e.length;){const s=e[i],l=typeof s=="string"?s:s[0];if(l===t)return s;l==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function iT(e){return function(t){return bR(t,e)}}function TE(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,s=n.indexOf(t);for(;s!==-1;)i++,s=n.indexOf(t,s+t.length);return i}const pn=Zi(/[A-Za-z]/),sn=Zi(/[\dA-Za-z]/),wR=Zi(/[#-'*+\--9=?A-Z^-~]/);function Zc(e){return e!==null&&(e<32||e===127)}const Ip=Zi(/\d/),kR=Zi(/[\dA-Fa-f]/),CR=Zi(/[!-/:-@[-`{-~]/);function Ne(e){return e!==null&&e<-2}function gt(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const Ad=Zi(/\p{P}|\p{S}/u),Ma=Zi(/\s/);function Zi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function NR(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function RR(e,t,n){const s=md((n||{}).ignore||[]),l=OR(t);let o=-1;for(;++o<l.length;)bm(e,"text",d);function d(f,m){let b=-1,x;for(;++b<m.length;){const E=m[b],T=x?x.children:void 0;if(s(E,T?T.indexOf(E):void 0,x))return;x=E}if(x)return h(f,m)}function h(f,m){const b=m[m.length-1],x=l[o][0],E=l[o][1];let T=0;const S=b.children.indexOf(f);let k=!1,j=[];x.lastIndex=0;let P=x.exec(f.value);for(;P;){const V=P.index,J={index:P.index,input:P.input,stack:[...m,f]};let H=E(...P,J);if(typeof H=="string"&&(H=H.length>0?{type:"text",value:H}:void 0),H===!1?x.lastIndex=V+1:(T!==V&&j.push({type:"text",value:f.value.slice(T,V)}),Array.isArray(H)?j.push(...H):H&&j.push(H),T=V+P[0].length,k=!0),!x.global)break;P=x.exec(f.value)}return k?(T<f.value.length&&j.push({type:"text",value:f.value.slice(T)}),b.children.splice(S,1,...j)):j=[f],S+j.length}}function OR(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const s=n[i];t.push([LR(s[0]),MR(s[1])])}return t}function LR(e){return typeof e=="string"?new RegExp(NR(e),"g"):e}function MR(e){return typeof e=="function"?e:function(){return e}}const v0="phrasing",_0=["autolink","link","image","label"];function IR(){return{transforms:[jR],enter:{literalAutolink:BR,literalAutolinkEmail:T0,literalAutolinkHttp:T0,literalAutolinkWww:T0},exit:{literalAutolink:UR,literalAutolinkEmail:HR,literalAutolinkHttp:zR,literalAutolinkWww:PR}}}function DR(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:v0,notInConstruct:_0},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:v0,notInConstruct:_0},{character:":",before:"[ps]",after:"\\/",inConstruct:v0,notInConstruct:_0}]}}function BR(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function T0(e){this.config.enter.autolinkProtocol.call(this,e)}function zR(e){this.config.exit.autolinkProtocol.call(this,e)}function PR(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function HR(e){this.config.exit.autolinkEmail.call(this,e)}function UR(e){this.exit(e)}function jR(e){RR(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,FR],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,$R]],{ignore:["link","linkReference"]})}function FR(e,t,n,i,s){let l="";if(!aT(s)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!qR(n)))return!1;const o=YR(n+i);if(!o[0])return!1;const d={type:"link",title:null,url:l+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[d,{type:"text",value:o[1]}]:d}function $R(e,t,n,i){return!aT(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function qR(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function YR(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const s=TE(e,"(");let l=TE(e,")");for(;i!==-1&&s>l;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),l++;return[e,n]}function aT(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ma(n)||Ad(n))&&(!t||n!==47)}function yr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}sT.peek=e9;function VR(){this.buffer()}function GR(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function WR(){this.buffer()}function QR(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function XR(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function KR(e){this.exit(e)}function ZR(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function JR(e){this.exit(e)}function e9(){return"["}function sT(e,t,n,i){const s=n.createTracker(i);let l=s.move("[^");const o=n.enter("footnoteReference"),d=n.enter("reference");return l+=s.move(n.safe(n.associationId(e),{after:"]",before:l})),d(),o(),l+=s.move("]"),l}function t9(){return{enter:{gfmFootnoteCallString:VR,gfmFootnoteCall:GR,gfmFootnoteDefinitionLabelString:WR,gfmFootnoteDefinition:QR},exit:{gfmFootnoteCallString:XR,gfmFootnoteCall:KR,gfmFootnoteDefinitionLabelString:ZR,gfmFootnoteDefinition:JR}}}function n9(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:sT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,s,l,o){const d=l.createTracker(o);let h=d.move("[^");const f=l.enter("footnoteDefinition"),m=l.enter("label");return h+=d.move(l.safe(l.associationId(i),{before:h,after:"]"})),m(),h+=d.move("]:"),i.children&&i.children.length>0&&(d.shift(4),h+=d.move((t?`
|
|
20
|
-
`:" ")+l.indentLines(l.containerFlow(i,d.current()),t?lT:r9))),f(),h}}function r9(e,t,n){return t===0?e:lT(e,t,n)}function lT(e,t,n){return(n?"":" ")+e}const i9=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];uT.peek=o9;function a9(){return{canContainEols:["delete"],enter:{strikethrough:l9},exit:{strikethrough:u9}}}function s9(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:i9}],handlers:{delete:uT}}}function l9(e){this.enter({type:"delete",children:[]},e)}function u9(e){this.exit(e)}function uT(e,t,n,i){const s=n.createTracker(i),l=n.enter("strikethrough");let o=s.move("~~");return o+=n.containerPhrasing(e,{...s.current(),before:o,after:"~"}),o+=s.move("~~"),l(),o}function o9(){return"~"}function c9(e){return e.length}function d9(e,t){const n=t||{},i=(n.align||[]).concat(),s=n.stringLength||c9,l=[],o=[],d=[],h=[];let f=0,m=-1;for(;++m<e.length;){const w=[],S=[];let k=-1;for(e[m].length>f&&(f=e[m].length);++k<e[m].length;){const j=f9(e[m][k]);if(n.alignDelimiters!==!1){const P=s(j);S[k]=P,(h[k]===void 0||P>h[k])&&(h[k]=P)}w.push(j)}o[m]=w,d[m]=S}let b=-1;if(typeof i=="object"&&"length"in i)for(;++b<f;)l[b]=AE(i[b]);else{const w=AE(i);for(;++b<f;)l[b]=w}b=-1;const x=[],E=[];for(;++b<f;){const w=l[b];let S="",k="";w===99?(S=":",k=":"):w===108?S=":":w===114&&(k=":");let j=n.alignDelimiters===!1?1:Math.max(1,h[b]-S.length-k.length);const P=S+"-".repeat(j)+k;n.alignDelimiters!==!1&&(j=S.length+j+k.length,j>h[b]&&(h[b]=j),E[b]=j),x[b]=P}o.splice(1,0,x),d.splice(1,0,E),m=-1;const T=[];for(;++m<o.length;){const w=o[m],S=d[m];b=-1;const k=[];for(;++b<f;){const j=w[b]||"";let P="",V="";if(n.alignDelimiters!==!1){const J=h[b]-(S[b]||0),H=l[b];H===114?P=" ".repeat(J):H===99?J%2?(P=" ".repeat(J/2+.5),V=" ".repeat(J/2-.5)):(P=" ".repeat(J/2),V=P):V=" ".repeat(J)}n.delimiterStart!==!1&&!b&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&j==="")&&(n.delimiterStart!==!1||b)&&k.push(" "),n.alignDelimiters!==!1&&k.push(P),k.push(j),n.alignDelimiters!==!1&&k.push(V),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||b!==f-1)&&k.push("|")}T.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return T.join(`
|
|
21
|
-
`)}function f9(e){return e==null?"":String(e)}function AE(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function h9(e,t,n,i){const s=n.enter("blockquote"),l=n.createTracker(i);l.move("> "),l.shift(2);const o=n.indentLines(n.containerFlow(e,l.current()),p9);return s(),o}function p9(e,t,n){return">"+(n?"":" ")+e}function m9(e,t){return SE(e,t.inConstruct,!0)&&!SE(e,t.notInConstruct,!1)}function SE(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function wE(e,t,n,i){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
22
|
-
`&&m9(n.stack,n.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
23
|
-
`}function g9(e,t){const n=String(e);let i=n.indexOf(t),s=i,l=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===s?++l>o&&(o=l):l=1,s=i+t.length,i=n.indexOf(t,s);return o}function b9(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function y9(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function E9(e,t,n,i){const s=y9(n),l=e.value||"",o=s==="`"?"GraveAccent":"Tilde";if(b9(e,n)){const b=n.enter("codeIndented"),x=n.indentLines(l,x9);return b(),x}const d=n.createTracker(i),h=s.repeat(Math.max(g9(l,s)+1,3)),f=n.enter("codeFenced");let m=d.move(h);if(e.lang){const b=n.enter(`codeFencedLang${o}`);m+=d.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...d.current()})),b()}if(e.lang&&e.meta){const b=n.enter(`codeFencedMeta${o}`);m+=d.move(" "),m+=d.move(n.safe(e.meta,{before:m,after:`
|
|
24
|
-
`,encode:["`"],...d.current()})),b()}return m+=d.move(`
|
|
25
|
-
`),l&&(m+=d.move(l+`
|
|
26
|
-
`)),m+=d.move(h),f(),m}function x9(e,t,n){return(n?"":" ")+e}function Nm(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function v9(e,t,n,i){const s=Nm(n),l=s==='"'?"Quote":"Apostrophe",o=n.enter("definition");let d=n.enter("label");const h=n.createTracker(i);let f=h.move("[");return f+=h.move(n.safe(n.associationId(e),{before:f,after:"]",...h.current()})),f+=h.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=h.move("<"),f+=h.move(n.safe(e.url,{before:f,after:">",...h.current()})),f+=h.move(">")):(d=n.enter("destinationRaw"),f+=h.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
27
|
-
`,...h.current()}))),d(),e.title&&(d=n.enter(`title${l}`),f+=h.move(" "+s),f+=h.move(n.safe(e.title,{before:f,after:s,...h.current()})),f+=h.move(s),d()),o(),f}function _9(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Nu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function $s(e){if(e===null||gt(e)||Ma(e))return 1;if(Ad(e))return 2}function Jc(e,t,n){const i=$s(e),s=$s(t);return i===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}oT.peek=T9;function oT(e,t,n,i){const s=_9(n),l=n.enter("emphasis"),o=n.createTracker(i),d=o.move(s);let h=o.move(n.containerPhrasing(e,{after:s,before:d,...o.current()}));const f=h.charCodeAt(0),m=Jc(i.before.charCodeAt(i.before.length-1),f,s);m.inside&&(h=Nu(f)+h.slice(1));const b=h.charCodeAt(h.length-1),x=Jc(i.after.charCodeAt(0),b,s);x.inside&&(h=h.slice(0,-1)+Nu(b));const E=o.move(s);return l(),n.attentionEncodeSurroundingInfo={after:x.outside,before:m.outside},d+h+E}function T9(e,t,n){return n.options.emphasis||"*"}const A9={};function Rm(e,t){const n=A9,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return cT(e,i,s)}function cT(e,t,n){if(S9(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return kE(e.children,t,n)}return Array.isArray(e)?kE(e,t,n):""}function kE(e,t,n){const i=[];let s=-1;for(;++s<e.length;)i[s]=cT(e[s],t,n);return i.join("")}function S9(e){return!!(e&&typeof e=="object")}function w9(e,t){let n=!1;return Dr(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Sp}),!!((!e.depth||e.depth<3)&&Rm(e)&&(t.options.setext||n))}function k9(e,t,n,i){const s=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(i);if(w9(e,n)){const m=n.enter("headingSetext"),b=n.enter("phrasing"),x=n.containerPhrasing(e,{...l.current(),before:`
|
|
28
|
-
`,after:`
|
|
29
|
-
`});return b(),m(),x+`
|
|
30
|
-
`+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
31
|
-
`))+1))}const o="#".repeat(s),d=n.enter("headingAtx"),h=n.enter("phrasing");l.move(o+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
32
|
-
`,...l.current()});return/^[\t ]/.test(f)&&(f=Nu(f.charCodeAt(0))+f.slice(1)),f=f?o+" "+f:o,n.options.closeAtx&&(f+=" "+o),h(),d(),f}dT.peek=C9;function dT(e){return e.value||""}function C9(){return"<"}fT.peek=N9;function fT(e,t,n,i){const s=Nm(n),l=s==='"'?"Quote":"Apostrophe",o=n.enter("image");let d=n.enter("label");const h=n.createTracker(i);let f=h.move("![");return f+=h.move(n.safe(e.alt,{before:f,after:"]",...h.current()})),f+=h.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=h.move("<"),f+=h.move(n.safe(e.url,{before:f,after:">",...h.current()})),f+=h.move(">")):(d=n.enter("destinationRaw"),f+=h.move(n.safe(e.url,{before:f,after:e.title?" ":")",...h.current()}))),d(),e.title&&(d=n.enter(`title${l}`),f+=h.move(" "+s),f+=h.move(n.safe(e.title,{before:f,after:s,...h.current()})),f+=h.move(s),d()),f+=h.move(")"),o(),f}function N9(){return"!"}hT.peek=R9;function hT(e,t,n,i){const s=e.referenceType,l=n.enter("imageReference");let o=n.enter("label");const d=n.createTracker(i);let h=d.move("![");const f=n.safe(e.alt,{before:h,after:"]",...d.current()});h+=d.move(f+"]["),o();const m=n.stack;n.stack=[],o=n.enter("reference");const b=n.safe(n.associationId(e),{before:h,after:"]",...d.current()});return o(),n.stack=m,l(),s==="full"||!f||f!==b?h+=d.move(b+"]"):s==="shortcut"?h=h.slice(0,-1):h+=d.move("]"),h}function R9(){return"!"}pT.peek=O9;function pT(e,t,n){let i=e.value||"",s="`",l=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++l<n.unsafe.length;){const o=n.unsafe[l],d=n.compilePattern(o);let h;if(o.atBreak)for(;h=d.exec(i);){let f=h.index;i.charCodeAt(f)===10&&i.charCodeAt(f-1)===13&&f--,i=i.slice(0,f)+" "+i.slice(h.index+1)}}return s+i+s}function O9(){return"`"}function mT(e,t){const n=Rm(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}gT.peek=L9;function gT(e,t,n,i){const s=Nm(n),l=s==='"'?"Quote":"Apostrophe",o=n.createTracker(i);let d,h;if(mT(e,n)){const m=n.stack;n.stack=[],d=n.enter("autolink");let b=o.move("<");return b+=o.move(n.containerPhrasing(e,{before:b,after:">",...o.current()})),b+=o.move(">"),d(),n.stack=m,b}d=n.enter("link"),h=n.enter("label");let f=o.move("[");return f+=o.move(n.containerPhrasing(e,{before:f,after:"](",...o.current()})),f+=o.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=n.enter("destinationLiteral"),f+=o.move("<"),f+=o.move(n.safe(e.url,{before:f,after:">",...o.current()})),f+=o.move(">")):(h=n.enter("destinationRaw"),f+=o.move(n.safe(e.url,{before:f,after:e.title?" ":")",...o.current()}))),h(),e.title&&(h=n.enter(`title${l}`),f+=o.move(" "+s),f+=o.move(n.safe(e.title,{before:f,after:s,...o.current()})),f+=o.move(s),h()),f+=o.move(")"),d(),f}function L9(e,t,n){return mT(e,n)?"<":"["}bT.peek=M9;function bT(e,t,n,i){const s=e.referenceType,l=n.enter("linkReference");let o=n.enter("label");const d=n.createTracker(i);let h=d.move("[");const f=n.containerPhrasing(e,{before:h,after:"]",...d.current()});h+=d.move(f+"]["),o();const m=n.stack;n.stack=[],o=n.enter("reference");const b=n.safe(n.associationId(e),{before:h,after:"]",...d.current()});return o(),n.stack=m,l(),s==="full"||!f||f!==b?h+=d.move(b+"]"):s==="shortcut"?h=h.slice(0,-1):h+=d.move("]"),h}function M9(){return"["}function Om(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function I9(e){const t=Om(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function D9(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function yT(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function B9(e,t,n,i){const s=n.enter("list"),l=n.bulletCurrent;let o=e.ordered?D9(n):Om(n);const d=e.ordered?o==="."?")":".":I9(n);let h=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(h=!0),yT(n)===o&&m){let b=-1;for(;++b<e.children.length;){const x=e.children[b];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(o=d),n.bulletCurrent=o;const f=n.containerFlow(e,i);return n.bulletLastUsed=o,n.bulletCurrent=l,s(),f}function z9(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function P9(e,t,n,i){const s=z9(n);let l=n.bulletCurrent||Om(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let o=l.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const d=n.createTracker(i);d.move(l+" ".repeat(o-l.length)),d.shift(o);const h=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,d.current()),m);return h(),f;function m(b,x,E){return x?(E?"":" ".repeat(o))+b:(E?l:l+" ".repeat(o-l.length))+b}}function H9(e,t,n,i){const s=n.enter("paragraph"),l=n.enter("phrasing"),o=n.containerPhrasing(e,i);return l(),s(),o}const U9=md(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function j9(e,t,n,i){return(e.children.some(function(o){return U9(o)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function F9(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ET.peek=$9;function ET(e,t,n,i){const s=F9(n),l=n.enter("strong"),o=n.createTracker(i),d=o.move(s+s);let h=o.move(n.containerPhrasing(e,{after:s,before:d,...o.current()}));const f=h.charCodeAt(0),m=Jc(i.before.charCodeAt(i.before.length-1),f,s);m.inside&&(h=Nu(f)+h.slice(1));const b=h.charCodeAt(h.length-1),x=Jc(i.after.charCodeAt(0),b,s);x.inside&&(h=h.slice(0,-1)+Nu(b));const E=o.move(s+s);return l(),n.attentionEncodeSurroundingInfo={after:x.outside,before:m.outside},d+h+E}function $9(e,t,n){return n.options.strong||"*"}function q9(e,t,n,i){return n.safe(e.value,i)}function Y9(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function V9(e,t,n){const i=(yT(n)+(n.options.ruleSpaces?" ":"")).repeat(Y9(n));return n.options.ruleSpaces?i.slice(0,-1):i}const xT={blockquote:h9,break:wE,code:E9,definition:v9,emphasis:oT,hardBreak:wE,heading:k9,html:dT,image:fT,imageReference:hT,inlineCode:pT,link:gT,linkReference:bT,list:B9,listItem:P9,paragraph:H9,root:j9,strong:ET,text:q9,thematicBreak:V9},CE=document.createElement("i");function Lm(e){const t="&"+e+";";CE.innerHTML=t;const n=CE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function vT(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const G9=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function W9(e){return e.replace(G9,Q9)}function Q9(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),l=s===120||s===88;return vT(n.slice(l?2:1),l?16:10)}return Lm(n)||e}function X9(){return{enter:{table:K9,tableData:NE,tableHeader:NE,tableRow:J9},exit:{codeText:eO,table:Z9,tableData:A0,tableHeader:A0,tableRow:A0}}}function K9(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Z9(e){this.exit(e),this.data.inTable=void 0}function J9(e){this.enter({type:"tableRow",children:[]},e)}function A0(e){this.exit(e)}function NE(e){this.enter({type:"tableCell",children:[]},e)}function eO(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,tO));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function tO(e,t){return t==="|"?t:e}function nO(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,s=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
33
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:o,tableCell:h,tableRow:d}};function o(E,T,w,S){return f(m(E,w,S),E.align)}function d(E,T,w,S){const k=b(E,w,S),j=f([k]);return j.slice(0,j.indexOf(`
|
|
34
|
-
`))}function h(E,T,w,S){const k=w.enter("tableCell"),j=w.enter("phrasing"),P=w.containerPhrasing(E,{...S,before:l,after:l});return j(),k(),P}function f(E,T){return d9(E,{align:T,alignDelimiters:i,padding:n,stringLength:s})}function m(E,T,w){const S=E.children;let k=-1;const j=[],P=T.enter("table");for(;++k<S.length;)j[k]=b(S[k],T,w);return P(),j}function b(E,T,w){const S=E.children;let k=-1;const j=[],P=T.enter("tableRow");for(;++k<S.length;)j[k]=h(S[k],E,T,w);return P(),j}function x(E,T,w){let S=xT.inlineCode(E,T,w);return w.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function rO(){return{exit:{taskListCheckValueChecked:RE,taskListCheckValueUnchecked:RE,paragraph:aO}}}function iO(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:sO}}}function RE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function aO(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const s=t.children;let l=-1,o;for(;++l<s.length;){const d=s[l];if(d.type==="paragraph"){o=d;break}}o===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function sO(e,t,n,i){const s=e.children[0],l=typeof e.checked=="boolean"&&s&&s.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",d=n.createTracker(i);l&&d.move(o);let h=xT.listItem(e,t,n,{...i,...d.current()});return l&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),h;function f(m){return m+o}}function lO(){return[IR(),t9(),a9(),X9(),rO()]}function uO(e){return{extensions:[DR(),n9(e),s9(),nO(e),iO()]}}function Vn(e,t,n,i){const s=e.length;let l=0,o;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,i.length<1e4)o=Array.from(i),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);l<i.length;)o=i.slice(l,l+1e4),o.unshift(t,0),e.splice(...o),l+=1e4,t+=1e4}function ur(e,t){return e.length>0?(Vn(e,e.length,0,t),e):t}const OE={}.hasOwnProperty;function _T(e){const t={};let n=-1;for(;++n<e.length;)oO(t,e[n]);return t}function oO(e,t){let n;for(n in t){const s=(OE.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let o;if(l)for(o in l){OE.call(s,o)||(s[o]=[]);const d=l[o];cO(s[o],Array.isArray(d)?d:d?[d]:[])}}}function cO(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);Vn(e,0,0,i)}const dO={tokenize:bO,partial:!0},TT={tokenize:yO,partial:!0},AT={tokenize:EO,partial:!0},ST={tokenize:xO,partial:!0},fO={tokenize:vO,partial:!0},wT={name:"wwwAutolink",tokenize:mO,previous:CT},kT={name:"protocolAutolink",tokenize:gO,previous:NT},li={name:"emailAutolink",tokenize:pO,previous:RT},zr={};function hO(){return{text:zr}}let Ea=48;for(;Ea<123;)zr[Ea]=li,Ea++,Ea===58?Ea=65:Ea===91&&(Ea=97);zr[43]=li;zr[45]=li;zr[46]=li;zr[95]=li;zr[72]=[li,kT];zr[104]=[li,kT];zr[87]=[li,wT];zr[119]=[li,wT];function pO(e,t,n){const i=this;let s,l;return o;function o(b){return!Dp(b)||!RT.call(i,i.previous)||Mm(i.events)?n(b):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(b))}function d(b){return Dp(b)?(e.consume(b),d):b===64?(e.consume(b),h):n(b)}function h(b){return b===46?e.check(fO,m,f)(b):b===45||b===95||sn(b)?(l=!0,e.consume(b),h):m(b)}function f(b){return e.consume(b),s=!0,h}function m(b){return l&&s&&pn(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(b)):n(b)}}function mO(e,t,n){const i=this;return s;function s(o){return o!==87&&o!==119||!CT.call(i,i.previous)||Mm(i.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(dO,e.attempt(TT,e.attempt(AT,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function gO(e,t,n){const i=this;let s="",l=!1;return o;function o(b){return(b===72||b===104)&&NT.call(i,i.previous)&&!Mm(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(b),e.consume(b),d):n(b)}function d(b){if(pn(b)&&s.length<5)return s+=String.fromCodePoint(b),e.consume(b),d;if(b===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(b),h}return n(b)}function h(b){return b===47?(e.consume(b),l?f:(l=!0,h)):n(b)}function f(b){return b===null||Zc(b)||gt(b)||Ma(b)||Ad(b)?n(b):e.attempt(TT,e.attempt(AT,m),n)(b)}function m(b){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(b)}}function bO(e,t,n){let i=0;return s;function s(o){return(o===87||o===119)&&i<3?(i++,e.consume(o),s):o===46&&i===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function yO(e,t,n){let i,s,l;return o;function o(f){return f===46||f===95?e.check(ST,h,d)(f):f===null||gt(f)||Ma(f)||f!==45&&Ad(f)?h(f):(l=!0,e.consume(f),o)}function d(f){return f===95?i=!0:(s=i,i=void 0),e.consume(f),o}function h(f){return s||i||!l?n(f):t(f)}}function EO(e,t){let n=0,i=0;return s;function s(o){return o===40?(n++,e.consume(o),s):o===41&&i<n?l(o):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?e.check(ST,t,l)(o):o===null||gt(o)||Ma(o)?t(o):(e.consume(o),s)}function l(o){return o===41&&i++,e.consume(o),s}}function xO(e,t,n){return i;function i(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),i):d===38?(e.consume(d),l):d===93?(e.consume(d),s):d===60||d===null||gt(d)||Ma(d)?t(d):n(d)}function s(d){return d===null||d===40||d===91||gt(d)||Ma(d)?t(d):i(d)}function l(d){return pn(d)?o(d):n(d)}function o(d){return d===59?(e.consume(d),i):pn(d)?(e.consume(d),o):n(d)}}function vO(e,t,n){return i;function i(l){return e.consume(l),s}function s(l){return sn(l)?n(l):t(l)}}function CT(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gt(e)}function NT(e){return!pn(e)}function RT(e){return!(e===47||Dp(e))}function Dp(e){return e===43||e===45||e===46||e===95||sn(e)}function Mm(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Xs(e){const t=[];let n=-1,i=0,s=0;for(;++n<e.length;){const l=e.charCodeAt(n);let o="";if(l===37&&sn(e.charCodeAt(n+1))&&sn(e.charCodeAt(n+2)))s=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const d=e.charCodeAt(n+1);l<56320&&d>56319&&d<57344?(o=String.fromCharCode(l,d),s=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(i,n),encodeURIComponent(o)),i=n+s+1,o=""),s&&(n+=s,s=0)}return t.join("")+e.slice(i)}function Sd(e,t,n){const i=[];let s=-1;for(;++s<e.length;){const l=e[s].resolveAll;l&&!i.includes(l)&&(t=l(t,n),i.push(l))}return t}const Bp={name:"attention",resolveAll:_O,tokenize:TO};function _O(e,t){let n=-1,i,s,l,o,d,h,f,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;h=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const b={...e[i][1].end},x={...e[n][1].start};LE(b,-h),LE(x,h),o={type:h>1?"strongSequence":"emphasisSequence",start:b,end:{...e[i][1].end}},d={type:h>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},l={type:h>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},s={type:h>1?"strong":"emphasis",start:{...o.start},end:{...d.end}},e[i][1].end={...o.start},e[n][1].start={...d.end},f=[],e[i][1].end.offset-e[i][1].start.offset&&(f=ur(f,[["enter",e[i][1],t],["exit",e[i][1],t]])),f=ur(f,[["enter",s,t],["enter",o,t],["exit",o,t],["enter",l,t]]),f=ur(f,Sd(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),f=ur(f,[["exit",l,t],["enter",d,t],["exit",d,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,f=ur(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Vn(e,i-1,n-i+3,f),n=i+f.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function TO(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,s=$s(i);let l;return o;function o(h){return l=h,e.enter("attentionSequence"),d(h)}function d(h){if(h===l)return e.consume(h),d;const f=e.exit("attentionSequence"),m=$s(h),b=!m||m===2&&s||n.includes(h),x=!s||s===2&&m||n.includes(i);return f._open=!!(l===42?b:b&&(s||!x)),f._close=!!(l===42?x:x&&(m||!b)),t(h)}}function LE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const AO={name:"autolink",tokenize:SO};function SO(e,t,n){let i=0;return s;function s(E){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(E),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(E){return pn(E)?(e.consume(E),o):E===64?n(E):f(E)}function o(E){return E===43||E===45||E===46||sn(E)?(i=1,d(E)):f(E)}function d(E){return E===58?(e.consume(E),i=0,h):(E===43||E===45||E===46||sn(E))&&i++<32?(e.consume(E),d):(i=0,f(E))}function h(E){return E===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(E),e.exit("autolinkMarker"),e.exit("autolink"),t):E===null||E===32||E===60||Zc(E)?n(E):(e.consume(E),h)}function f(E){return E===64?(e.consume(E),m):wR(E)?(e.consume(E),f):n(E)}function m(E){return sn(E)?b(E):n(E)}function b(E){return E===46?(e.consume(E),i=0,m):E===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(E),e.exit("autolinkMarker"),e.exit("autolink"),t):x(E)}function x(E){if((E===45||sn(E))&&i++<63){const T=E===45?x:b;return e.consume(E),T}return n(E)}}function Ke(e,t,n,i){const s=i?i-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(h){return Ge(h)?(e.enter(n),d(h)):t(h)}function d(h){return Ge(h)&&l++<s?(e.consume(h),d):(e.exit(n),t(h))}}const Vu={partial:!0,tokenize:wO};function wO(e,t,n){return i;function i(l){return Ge(l)?Ke(e,s,"linePrefix")(l):s(l)}function s(l){return l===null||Ne(l)?t(l):n(l)}}const OT={continuation:{tokenize:CO},exit:NO,name:"blockQuote",tokenize:kO};function kO(e,t,n){const i=this;return s;function s(o){if(o===62){const d=i.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return n(o)}function l(o){return Ge(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function CO(e,t,n){const i=this;return s;function s(o){return Ge(o)?Ke(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(OT,t,n)(o)}}function NO(e){e.exit("blockQuote")}const LT={name:"characterEscape",tokenize:RO};function RO(e,t,n){return i;function i(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),s}function s(l){return CR(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const MT={name:"characterReference",tokenize:OO};function OO(e,t,n){const i=this;let s=0,l,o;return d;function d(b){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),h}function h(b){return b===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(b),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),l=31,o=sn,m(b))}function f(b){return b===88||b===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(b),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=kR,m):(e.enter("characterReferenceValue"),l=7,o=Ip,m(b))}function m(b){if(b===59&&s){const x=e.exit("characterReferenceValue");return o===sn&&!Lm(i.sliceSerialize(x))?n(b):(e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(b)&&s++<l?(e.consume(b),m):n(b)}}const ME={partial:!0,tokenize:MO},IE={concrete:!0,name:"codeFenced",tokenize:LO};function LO(e,t,n){const i=this,s={partial:!0,tokenize:J};let l=0,o=0,d;return h;function h(H){return f(H)}function f(H){const ne=i.events[i.events.length-1];return l=ne&&ne[1].type==="linePrefix"?ne[2].sliceSerialize(ne[1],!0).length:0,d=H,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(H)}function m(H){return H===d?(o++,e.consume(H),m):o<3?n(H):(e.exit("codeFencedFenceSequence"),Ge(H)?Ke(e,b,"whitespace")(H):b(H))}function b(H){return H===null||Ne(H)?(e.exit("codeFencedFence"),i.interrupt?t(H):e.check(ME,w,V)(H)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(H))}function x(H){return H===null||Ne(H)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),b(H)):Ge(H)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,E,"whitespace")(H)):H===96&&H===d?n(H):(e.consume(H),x)}function E(H){return H===null||Ne(H)?b(H):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),T(H))}function T(H){return H===null||Ne(H)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),b(H)):H===96&&H===d?n(H):(e.consume(H),T)}function w(H){return e.attempt(s,V,S)(H)}function S(H){return e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),k}function k(H){return l>0&&Ge(H)?Ke(e,j,"linePrefix",l+1)(H):j(H)}function j(H){return H===null||Ne(H)?e.check(ME,w,V)(H):(e.enter("codeFlowValue"),P(H))}function P(H){return H===null||Ne(H)?(e.exit("codeFlowValue"),j(H)):(e.consume(H),P)}function V(H){return e.exit("codeFenced"),t(H)}function J(H,ne,te){let fe=0;return z;function z(ue){return H.enter("lineEnding"),H.consume(ue),H.exit("lineEnding"),$}function $(ue){return H.enter("codeFencedFence"),Ge(ue)?Ke(H,Y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ue):Y(ue)}function Y(ue){return ue===d?(H.enter("codeFencedFenceSequence"),_e(ue)):te(ue)}function _e(ue){return ue===d?(fe++,H.consume(ue),_e):fe>=o?(H.exit("codeFencedFenceSequence"),Ge(ue)?Ke(H,ce,"whitespace")(ue):ce(ue)):te(ue)}function ce(ue){return ue===null||Ne(ue)?(H.exit("codeFencedFence"),ne(ue)):te(ue)}}}function MO(e,t,n){const i=this;return s;function s(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return i.parser.lazy[i.now().line]?n(o):t(o)}}const S0={name:"codeIndented",tokenize:DO},IO={partial:!0,tokenize:BO};function DO(e,t,n){const i=this;return s;function s(f){return e.enter("codeIndented"),Ke(e,l,"linePrefix",5)(f)}function l(f){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?o(f):n(f)}function o(f){return f===null?h(f):Ne(f)?e.attempt(IO,o,h)(f):(e.enter("codeFlowValue"),d(f))}function d(f){return f===null||Ne(f)?(e.exit("codeFlowValue"),o(f)):(e.consume(f),d)}function h(f){return e.exit("codeIndented"),t(f)}}function BO(e,t,n){const i=this;return s;function s(o){return i.parser.lazy[i.now().line]?n(o):Ne(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):Ke(e,l,"linePrefix",5)(o)}function l(o){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(o):Ne(o)?s(o):n(o)}}const zO={name:"codeText",previous:HO,resolve:PO,tokenize:UO};function PO(e){let t=e.length-4,n=3,i,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)s===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(s=i):(i===t||e[i][1].type==="lineEnding")&&(e[s][1].type="codeTextData",i!==s+2&&(e[s][1].end=e[i-1][1].end,e.splice(s+2,i-s-2),t-=i-s-2,i=s+2),s=void 0);return e}function HO(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UO(e,t,n){let i=0,s,l;return o;function o(b){return e.enter("codeText"),e.enter("codeTextSequence"),d(b)}function d(b){return b===96?(e.consume(b),i++,d):(e.exit("codeTextSequence"),h(b))}function h(b){return b===null?n(b):b===32?(e.enter("space"),e.consume(b),e.exit("space"),h):b===96?(l=e.enter("codeTextSequence"),s=0,m(b)):Ne(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h):(e.enter("codeTextData"),f(b))}function f(b){return b===null||b===32||b===96||Ne(b)?(e.exit("codeTextData"),h(b)):(e.consume(b),f)}function m(b){return b===96?(e.consume(b),s++,m):s===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(b)):(l.type="codeTextData",f(b))}}class jO{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const s=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&eu(this.left,i),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),eu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),eu(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);eu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);eu(this.left,n.reverse())}}}function eu(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function IT(e){const t={};let n=-1,i,s,l,o,d,h,f;const m=new jO(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(i=m.get(n),n&&i[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(h=i[1]._tokenizer.events,l=0,l<h.length&&h[l][1].type==="lineEndingBlank"&&(l+=2),l<h.length&&h[l][1].type==="content"))for(;++l<h.length&&h[l][1].type!=="content";)h[l][1].type==="chunkText"&&(h[l][1]._isInFirstContentOfListItem=!0,l++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,FO(m,n)),n=t[n],f=!0);else if(i[1]._container){for(l=n,s=void 0;l--;)if(o=m.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(s&&(m.get(s)[1].type="lineEndingBlank"),o[1].type="lineEnding",s=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;s&&(i[1].end={...m.get(s)[1].start},d=m.slice(s,n),d.unshift(i),m.splice(s,n-s+1,d))}}return Vn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!f}function FO(e,t){const n=e.get(t)[1],i=e.get(t)[2];let s=t-1;const l=[];let o=n._tokenizer;o||(o=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const d=o.events,h=[],f={};let m,b,x=-1,E=n,T=0,w=0;const S=[w];for(;E;){for(;e.get(++s)[1]!==E;);l.push(s),E._tokenizer||(m=i.sliceStream(E),E.next||m.push(null),b&&o.defineSkip(E.start),E._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(m),E._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),b=E,E=E.next}for(E=n;++x<d.length;)d[x][0]==="exit"&&d[x-1][0]==="enter"&&d[x][1].type===d[x-1][1].type&&d[x][1].start.line!==d[x][1].end.line&&(w=x+1,S.push(w),E._tokenizer=void 0,E.previous=void 0,E=E.next);for(o.events=[],E?(E._tokenizer=void 0,E.previous=void 0):S.pop(),x=S.length;x--;){const k=d.slice(S[x],S[x+1]),j=l.pop();h.push([j,j+k.length-1]),e.splice(j,2,k)}for(h.reverse(),x=-1;++x<h.length;)f[T+h[x][0]]=T+h[x][1],T+=h[x][1]-h[x][0]-1;return f}const $O={resolve:YO,tokenize:VO},qO={partial:!0,tokenize:GO};function YO(e){return IT(e),e}function VO(e,t){let n;return i;function i(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?l(d):Ne(d)?e.check(qO,o,l)(d):(e.consume(d),s)}function l(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function o(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function GO(e,t,n){const i=this;return s;function s(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ke(e,l,"linePrefix")}function l(o){if(o===null||Ne(o))return n(o);const d=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(o):e.interrupt(i.parser.constructs.flow,n,t)(o)}}function DT(e,t,n,i,s,l,o,d,h){const f=h||Number.POSITIVE_INFINITY;let m=0;return b;function b(k){return k===60?(e.enter(i),e.enter(s),e.enter(l),e.consume(k),e.exit(l),x):k===null||k===32||k===41||Zc(k)?n(k):(e.enter(i),e.enter(o),e.enter(d),e.enter("chunkString",{contentType:"string"}),w(k))}function x(k){return k===62?(e.enter(l),e.consume(k),e.exit(l),e.exit(s),e.exit(i),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),E(k))}function E(k){return k===62?(e.exit("chunkString"),e.exit(d),x(k)):k===null||k===60||Ne(k)?n(k):(e.consume(k),k===92?T:E)}function T(k){return k===60||k===62||k===92?(e.consume(k),E):E(k)}function w(k){return!m&&(k===null||k===41||gt(k))?(e.exit("chunkString"),e.exit(d),e.exit(o),e.exit(i),t(k)):m<f&&k===40?(e.consume(k),m++,w):k===41?(e.consume(k),m--,w):k===null||k===32||k===40||Zc(k)?n(k):(e.consume(k),k===92?S:w)}function S(k){return k===40||k===41||k===92?(e.consume(k),w):w(k)}}function BT(e,t,n,i,s,l){const o=this;let d=0,h;return f;function f(E){return e.enter(i),e.enter(s),e.consume(E),e.exit(s),e.enter(l),m}function m(E){return d>999||E===null||E===91||E===93&&!h||E===94&&!d&&"_hiddenFootnoteSupport"in o.parser.constructs?n(E):E===93?(e.exit(l),e.enter(s),e.consume(E),e.exit(s),e.exit(i),t):Ne(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),b(E))}function b(E){return E===null||E===91||E===93||Ne(E)||d++>999?(e.exit("chunkString"),m(E)):(e.consume(E),h||(h=!Ge(E)),E===92?x:b)}function x(E){return E===91||E===92||E===93?(e.consume(E),d++,b):b(E)}}function zT(e,t,n,i,s,l){let o;return d;function d(x){return x===34||x===39||x===40?(e.enter(i),e.enter(s),e.consume(x),e.exit(s),o=x===40?41:x,h):n(x)}function h(x){return x===o?(e.enter(s),e.consume(x),e.exit(s),e.exit(i),t):(e.enter(l),f(x))}function f(x){return x===o?(e.exit(l),h(o)):x===null?n(x):Ne(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Ke(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===o||x===null||Ne(x)?(e.exit("chunkString"),f(x)):(e.consume(x),x===92?b:m)}function b(x){return x===o||x===92?(e.consume(x),m):m(x)}}function _u(e,t){let n;return i;function i(s){return Ne(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,i):Ge(s)?Ke(e,i,n?"linePrefix":"lineSuffix")(s):t(s)}}const WO={name:"definition",tokenize:XO},QO={partial:!0,tokenize:KO};function XO(e,t,n){const i=this;let s;return l;function l(E){return e.enter("definition"),o(E)}function o(E){return BT.call(i,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(E)}function d(E){return s=yr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),h):n(E)}function h(E){return gt(E)?_u(e,f)(E):f(E)}function f(E){return DT(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(E)}function m(E){return e.attempt(QO,b,b)(E)}function b(E){return Ge(E)?Ke(e,x,"whitespace")(E):x(E)}function x(E){return E===null||Ne(E)?(e.exit("definition"),i.parser.defined.push(s),t(E)):n(E)}}function KO(e,t,n){return i;function i(d){return gt(d)?_u(e,s)(d):n(d)}function s(d){return zT(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function l(d){return Ge(d)?Ke(e,o,"whitespace")(d):o(d)}function o(d){return d===null||Ne(d)?t(d):n(d)}}const ZO={name:"hardBreakEscape",tokenize:JO};function JO(e,t,n){return i;function i(l){return e.enter("hardBreakEscape"),e.consume(l),s}function s(l){return Ne(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const eL={name:"headingAtx",resolve:tL,tokenize:nL};function tL(e,t){let n=e.length-2,i=3,s,l;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(s={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},l={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Vn(e,i,n-i+1,[["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]])),e}function nL(e,t,n){let i=0;return s;function s(m){return e.enter("atxHeading"),l(m)}function l(m){return e.enter("atxHeadingSequence"),o(m)}function o(m){return m===35&&i++<6?(e.consume(m),o):m===null||gt(m)?(e.exit("atxHeadingSequence"),d(m)):n(m)}function d(m){return m===35?(e.enter("atxHeadingSequence"),h(m)):m===null||Ne(m)?(e.exit("atxHeading"),t(m)):Ge(m)?Ke(e,d,"whitespace")(m):(e.enter("atxHeadingText"),f(m))}function h(m){return m===35?(e.consume(m),h):(e.exit("atxHeadingSequence"),d(m))}function f(m){return m===null||m===35||gt(m)?(e.exit("atxHeadingText"),d(m)):(e.consume(m),f)}}const rL=["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"],DE=["pre","script","style","textarea"],iL={concrete:!0,name:"htmlFlow",resolveTo:lL,tokenize:uL},aL={partial:!0,tokenize:cL},sL={partial:!0,tokenize:oL};function lL(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(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}function uL(e,t,n){const i=this;let s,l,o,d,h;return f;function f(O){return m(O)}function m(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),b}function b(O){return O===33?(e.consume(O),x):O===47?(e.consume(O),l=!0,w):O===63?(e.consume(O),s=3,i.interrupt?t:R):pn(O)?(e.consume(O),o=String.fromCharCode(O),S):n(O)}function x(O){return O===45?(e.consume(O),s=2,E):O===91?(e.consume(O),s=5,d=0,T):pn(O)?(e.consume(O),s=4,i.interrupt?t:R):n(O)}function E(O){return O===45?(e.consume(O),i.interrupt?t:R):n(O)}function T(O){const F="CDATA[";return O===F.charCodeAt(d++)?(e.consume(O),d===F.length?i.interrupt?t:Y:T):n(O)}function w(O){return pn(O)?(e.consume(O),o=String.fromCharCode(O),S):n(O)}function S(O){if(O===null||O===47||O===62||gt(O)){const F=O===47,be=o.toLowerCase();return!F&&!l&&DE.includes(be)?(s=1,i.interrupt?t(O):Y(O)):rL.includes(o.toLowerCase())?(s=6,F?(e.consume(O),k):i.interrupt?t(O):Y(O)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(O):l?j(O):P(O))}return O===45||sn(O)?(e.consume(O),o+=String.fromCharCode(O),S):n(O)}function k(O){return O===62?(e.consume(O),i.interrupt?t:Y):n(O)}function j(O){return Ge(O)?(e.consume(O),j):z(O)}function P(O){return O===47?(e.consume(O),z):O===58||O===95||pn(O)?(e.consume(O),V):Ge(O)?(e.consume(O),P):z(O)}function V(O){return O===45||O===46||O===58||O===95||sn(O)?(e.consume(O),V):J(O)}function J(O){return O===61?(e.consume(O),H):Ge(O)?(e.consume(O),J):P(O)}function H(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),h=O,ne):Ge(O)?(e.consume(O),H):te(O)}function ne(O){return O===h?(e.consume(O),h=null,fe):O===null||Ne(O)?n(O):(e.consume(O),ne)}function te(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||gt(O)?J(O):(e.consume(O),te)}function fe(O){return O===47||O===62||Ge(O)?P(O):n(O)}function z(O){return O===62?(e.consume(O),$):n(O)}function $(O){return O===null||Ne(O)?Y(O):Ge(O)?(e.consume(O),$):n(O)}function Y(O){return O===45&&s===2?(e.consume(O),I):O===60&&s===1?(e.consume(O),ie):O===62&&s===4?(e.consume(O),D):O===63&&s===3?(e.consume(O),R):O===93&&s===5?(e.consume(O),ke):Ne(O)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(aL,ee,_e)(O)):O===null||Ne(O)?(e.exit("htmlFlowData"),_e(O)):(e.consume(O),Y)}function _e(O){return e.check(sL,ce,ee)(O)}function ce(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ue}function ue(O){return O===null||Ne(O)?_e(O):(e.enter("htmlFlowData"),Y(O))}function I(O){return O===45?(e.consume(O),R):Y(O)}function ie(O){return O===47?(e.consume(O),o="",Ee):Y(O)}function Ee(O){if(O===62){const F=o.toLowerCase();return DE.includes(F)?(e.consume(O),D):Y(O)}return pn(O)&&o.length<8?(e.consume(O),o+=String.fromCharCode(O),Ee):Y(O)}function ke(O){return O===93?(e.consume(O),R):Y(O)}function R(O){return O===62?(e.consume(O),D):O===45&&s===2?(e.consume(O),R):Y(O)}function D(O){return O===null||Ne(O)?(e.exit("htmlFlowData"),ee(O)):(e.consume(O),D)}function ee(O){return e.exit("htmlFlow"),t(O)}}function oL(e,t,n){const i=this;return s;function s(o){return Ne(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):n(o)}function l(o){return i.parser.lazy[i.now().line]?n(o):t(o)}}function cL(e,t,n){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Vu,t,n)}}const dL={name:"htmlText",tokenize:fL};function fL(e,t,n){const i=this;let s,l,o;return d;function d(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),h}function h(R){return R===33?(e.consume(R),f):R===47?(e.consume(R),J):R===63?(e.consume(R),P):pn(R)?(e.consume(R),te):n(R)}function f(R){return R===45?(e.consume(R),m):R===91?(e.consume(R),l=0,T):pn(R)?(e.consume(R),j):n(R)}function m(R){return R===45?(e.consume(R),E):n(R)}function b(R){return R===null?n(R):R===45?(e.consume(R),x):Ne(R)?(o=b,ie(R)):(e.consume(R),b)}function x(R){return R===45?(e.consume(R),E):b(R)}function E(R){return R===62?I(R):R===45?x(R):b(R)}function T(R){const D="CDATA[";return R===D.charCodeAt(l++)?(e.consume(R),l===D.length?w:T):n(R)}function w(R){return R===null?n(R):R===93?(e.consume(R),S):Ne(R)?(o=w,ie(R)):(e.consume(R),w)}function S(R){return R===93?(e.consume(R),k):w(R)}function k(R){return R===62?I(R):R===93?(e.consume(R),k):w(R)}function j(R){return R===null||R===62?I(R):Ne(R)?(o=j,ie(R)):(e.consume(R),j)}function P(R){return R===null?n(R):R===63?(e.consume(R),V):Ne(R)?(o=P,ie(R)):(e.consume(R),P)}function V(R){return R===62?I(R):P(R)}function J(R){return pn(R)?(e.consume(R),H):n(R)}function H(R){return R===45||sn(R)?(e.consume(R),H):ne(R)}function ne(R){return Ne(R)?(o=ne,ie(R)):Ge(R)?(e.consume(R),ne):I(R)}function te(R){return R===45||sn(R)?(e.consume(R),te):R===47||R===62||gt(R)?fe(R):n(R)}function fe(R){return R===47?(e.consume(R),I):R===58||R===95||pn(R)?(e.consume(R),z):Ne(R)?(o=fe,ie(R)):Ge(R)?(e.consume(R),fe):I(R)}function z(R){return R===45||R===46||R===58||R===95||sn(R)?(e.consume(R),z):$(R)}function $(R){return R===61?(e.consume(R),Y):Ne(R)?(o=$,ie(R)):Ge(R)?(e.consume(R),$):fe(R)}function Y(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),s=R,_e):Ne(R)?(o=Y,ie(R)):Ge(R)?(e.consume(R),Y):(e.consume(R),ce)}function _e(R){return R===s?(e.consume(R),s=void 0,ue):R===null?n(R):Ne(R)?(o=_e,ie(R)):(e.consume(R),_e)}function ce(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||gt(R)?fe(R):(e.consume(R),ce)}function ue(R){return R===47||R===62||gt(R)?fe(R):n(R)}function I(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function ie(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),Ee}function Ee(R){return Ge(R)?Ke(e,ke,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):ke(R)}function ke(R){return e.enter("htmlTextData"),o(R)}}const Im={name:"labelEnd",resolveAll:gL,resolveTo:bL,tokenize:yL},hL={tokenize:EL},pL={tokenize:xL},mL={tokenize:vL};function gL(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",t+=s}}return e.length!==n.length&&Vn(e,0,e.length,n),e}function bL(e,t){let n=e.length,i=0,s,l,o,d;for(;n--;)if(s=e[n][1],l){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(l=n,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(o=n);const h={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},m={type:"labelText",start:{...e[l+i+2][1].end},end:{...e[o-2][1].start}};return d=[["enter",h,t],["enter",f,t]],d=ur(d,e.slice(l+1,l+i+3)),d=ur(d,[["enter",m,t]]),d=ur(d,Sd(t.parser.constructs.insideSpan.null,e.slice(l+i+4,o-3),t)),d=ur(d,[["exit",m,t],e[o-2],e[o-1],["exit",f,t]]),d=ur(d,e.slice(o+1)),d=ur(d,[["exit",h,t]]),Vn(e,l,e.length,d),e}function yL(e,t,n){const i=this;let s=i.events.length,l,o;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){l=i.events[s][1];break}return d;function d(x){return l?l._inactive?b(x):(o=i.parser.defined.includes(yr(i.sliceSerialize({start:l.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),h):n(x)}function h(x){return x===40?e.attempt(hL,m,o?m:b)(x):x===91?e.attempt(pL,m,o?f:b)(x):o?m(x):b(x)}function f(x){return e.attempt(mL,m,b)(x)}function m(x){return t(x)}function b(x){return l._balanced=!0,n(x)}}function EL(e,t,n){return i;function i(b){return e.enter("resource"),e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),s}function s(b){return gt(b)?_u(e,l)(b):l(b)}function l(b){return b===41?m(b):DT(e,o,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function o(b){return gt(b)?_u(e,h)(b):m(b)}function d(b){return n(b)}function h(b){return b===34||b===39||b===40?zT(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):m(b)}function f(b){return gt(b)?_u(e,m)(b):m(b)}function m(b){return b===41?(e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),e.exit("resource"),t):n(b)}}function xL(e,t,n){const i=this;return s;function s(d){return BT.call(i,e,l,o,"reference","referenceMarker","referenceString")(d)}function l(d){return i.parser.defined.includes(yr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function o(d){return n(d)}}function vL(e,t,n){return i;function i(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),s}function s(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const _L={name:"labelStartImage",resolveAll:Im.resolveAll,tokenize:TL};function TL(e,t,n){const i=this;return s;function s(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),l}function l(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),o):n(d)}function o(d){return d===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):t(d)}}const AL={name:"labelStartLink",resolveAll:Im.resolveAll,tokenize:SL};function SL(e,t,n){const i=this;return s;function s(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(o):t(o)}}const w0={name:"lineEnding",tokenize:wL};function wL(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const Uc={name:"thematicBreak",tokenize:kL};function kL(e,t,n){let i=0,s;return l;function l(f){return e.enter("thematicBreak"),o(f)}function o(f){return s=f,d(f)}function d(f){return f===s?(e.enter("thematicBreakSequence"),h(f)):i>=3&&(f===null||Ne(f))?(e.exit("thematicBreak"),t(f)):n(f)}function h(f){return f===s?(e.consume(f),i++,h):(e.exit("thematicBreakSequence"),Ge(f)?Ke(e,d,"whitespace")(f):d(f))}}const wn={continuation:{tokenize:OL},exit:ML,name:"list",tokenize:RL},CL={partial:!0,tokenize:IL},NL={partial:!0,tokenize:LL};function RL(e,t,n){const i=this,s=i.events[i.events.length-1];let l=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,o=0;return d;function d(E){const T=i.containerState.type||(E===42||E===43||E===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!i.containerState.marker||E===i.containerState.marker:Ip(E)){if(i.containerState.type||(i.containerState.type=T,e.enter(T,{_container:!0})),T==="listUnordered")return e.enter("listItemPrefix"),E===42||E===45?e.check(Uc,n,f)(E):f(E);if(!i.interrupt||E===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(E)}return n(E)}function h(E){return Ip(E)&&++o<10?(e.consume(E),h):(!i.interrupt||o<2)&&(i.containerState.marker?E===i.containerState.marker:E===41||E===46)?(e.exit("listItemValue"),f(E)):n(E)}function f(E){return e.enter("listItemMarker"),e.consume(E),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||E,e.check(Vu,i.interrupt?n:m,e.attempt(CL,x,b))}function m(E){return i.containerState.initialBlankLine=!0,l++,x(E)}function b(E){return Ge(E)?(e.enter("listItemPrefixWhitespace"),e.consume(E),e.exit("listItemPrefixWhitespace"),x):n(E)}function x(E){return i.containerState.size=l+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(E)}}function OL(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Vu,s,l);function s(d){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ke(e,t,"listItemIndent",i.containerState.size+1)(d)}function l(d){return i.containerState.furtherBlankLines||!Ge(d)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,o(d)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(NL,t,o)(d))}function o(d){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ke(e,e.attempt(wn,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function LL(e,t,n){const i=this;return Ke(e,s,"listItemIndent",i.containerState.size+1);function s(l){const o=i.events[i.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===i.containerState.size?t(l):n(l)}}function ML(e){e.exit(this.containerState.type)}function IL(e,t,n){const i=this;return Ke(e,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(l){const o=i.events[i.events.length-1];return!Ge(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const BE={name:"setextUnderline",resolveTo:DL,tokenize:BL};function DL(e,t){let n=e.length,i,s,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const o={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",l?(e.splice(s,0,["enter",o,t]),e.splice(l+1,0,["exit",e[i][1],t]),e[i][1].end={...e[l][1].end}):e[i][1]=o,e.push(["exit",o,t]),e}function BL(e,t,n){const i=this;let s;return l;function l(f){let m=i.events.length,b;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){b=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||b)?(e.enter("setextHeadingLine"),s=f,o(f)):n(f)}function o(f){return e.enter("setextHeadingLineSequence"),d(f)}function d(f){return f===s?(e.consume(f),d):(e.exit("setextHeadingLineSequence"),Ge(f)?Ke(e,h,"lineSuffix")(f):h(f))}function h(f){return f===null||Ne(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const zL={tokenize:YL,partial:!0};function PL(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:FL,continuation:{tokenize:$L},exit:qL}},text:{91:{name:"gfmFootnoteCall",tokenize:jL},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:HL,resolveTo:UL}}}}function HL(e,t,n){const i=this;let s=i.events.length;const l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;s--;){const h=i.events[s][1];if(h.type==="labelImage"){o=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return d;function d(h){if(!o||!o._balanced)return n(h);const f=yr(i.sliceSerialize({start:o.end,end:i.now()}));return f.codePointAt(0)!==94||!l.includes(f.slice(1))?n(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function UL(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},d=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...d),e}function jL(e,t,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l=0,o;return d;function d(b){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),h}function h(b){return b!==94?n(b):(e.enter("gfmFootnoteCallMarker"),e.consume(b),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(b){if(l>999||b===93&&!o||b===null||b===91||gt(b))return n(b);if(b===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(yr(i.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(b)}return gt(b)||(o=!0),l++,e.consume(b),b===92?m:f}function m(b){return b===91||b===92||b===93?(e.consume(b),l++,f):f(b)}}function FL(e,t,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,o=0,d;return h;function h(T){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(T){return T===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(T)}function m(T){if(o>999||T===93&&!d||T===null||T===91||gt(T))return n(T);if(T===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return l=yr(i.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return gt(T)||(d=!0),o++,e.consume(T),T===92?b:m}function b(T){return T===91||T===92||T===93?(e.consume(T),o++,m):m(T)}function x(T){return T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),s.includes(l)||s.push(l),Ke(e,E,"gfmFootnoteDefinitionWhitespace")):n(T)}function E(T){return t(T)}}function $L(e,t,n){return e.check(Vu,t,e.attempt(zL,t,n))}function qL(e){e.exit("gfmFootnoteDefinition")}function YL(e,t,n){const i=this;return Ke(e,s,"gfmFootnoteDefinitionIndent",5);function s(l){const o=i.events[i.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function VL(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:l,resolveAll:s};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(o,d){let h=-1;for(;++h<o.length;)if(o[h][0]==="enter"&&o[h][1].type==="strikethroughSequenceTemporary"&&o[h][1]._close){let f=h;for(;f--;)if(o[f][0]==="exit"&&o[f][1].type==="strikethroughSequenceTemporary"&&o[f][1]._open&&o[h][1].end.offset-o[h][1].start.offset===o[f][1].end.offset-o[f][1].start.offset){o[h][1].type="strikethroughSequence",o[f][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},o[f][1].start),end:Object.assign({},o[h][1].end)},b={type:"strikethroughText",start:Object.assign({},o[f][1].end),end:Object.assign({},o[h][1].start)},x=[["enter",m,d],["enter",o[f][1],d],["exit",o[f][1],d],["enter",b,d]],E=d.parser.constructs.insideSpan.null;E&&Vn(x,x.length,0,Sd(E,o.slice(f+1,h),d)),Vn(x,x.length,0,[["exit",b,d],["enter",o[h][1],d],["exit",o[h][1],d],["exit",m,d]]),Vn(o,f-1,h-f+3,x),h=f+x.length-2;break}}for(h=-1;++h<o.length;)o[h][1].type==="strikethroughSequenceTemporary"&&(o[h][1].type="data");return o}function l(o,d,h){const f=this.previous,m=this.events;let b=0;return x;function x(T){return f===126&&m[m.length-1][1].type!=="characterEscape"?h(T):(o.enter("strikethroughSequenceTemporary"),E(T))}function E(T){const w=$s(f);if(T===126)return b>1?h(T):(o.consume(T),b++,E);if(b<2&&!n)return h(T);const S=o.exit("strikethroughSequenceTemporary"),k=$s(T);return S._open=!k||k===2&&!!w,S._close=!w||w===2&&!!k,d(T)}}}class GL{constructor(){this.map=[]}add(t,n,i){WL(this,t,n,i)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let s=i.pop();for(;s;){for(const l of s)t.push(l);s=i.pop()}this.map.length=0}}function WL(e,t,n,i){let s=0;if(!(n===0&&i.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...i);return}s+=1}e.map.push([t,n,i])}}function QL(e,t){let n=!1;const i=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=i.length-1;i[l]=i[l]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function XL(){return{flow:{null:{name:"table",tokenize:KL,resolveAll:ZL}}}}function KL(e,t,n){const i=this;let s=0,l=0,o;return d;function d(z){let $=i.events.length-1;for(;$>-1;){const ce=i.events[$][1].type;if(ce==="lineEnding"||ce==="linePrefix")$--;else break}const Y=$>-1?i.events[$][1].type:null,_e=Y==="tableHead"||Y==="tableRow"?H:h;return _e===H&&i.parser.lazy[i.now().line]?n(z):_e(z)}function h(z){return e.enter("tableHead"),e.enter("tableRow"),f(z)}function f(z){return z===124||(o=!0,l+=1),m(z)}function m(z){return z===null?n(z):Ne(z)?l>1?(l=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),E):n(z):Ge(z)?Ke(e,m,"whitespace")(z):(l+=1,o&&(o=!1,s+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),o=!0,m):(e.enter("data"),b(z)))}function b(z){return z===null||z===124||gt(z)?(e.exit("data"),m(z)):(e.consume(z),z===92?x:b)}function x(z){return z===92||z===124?(e.consume(z),b):b(z)}function E(z){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(z):(e.enter("tableDelimiterRow"),o=!1,Ge(z)?Ke(e,T,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):T(z))}function T(z){return z===45||z===58?S(z):z===124?(o=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),w):J(z)}function w(z){return Ge(z)?Ke(e,S,"whitespace")(z):S(z)}function S(z){return z===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),k):z===45?(l+=1,k(z)):z===null||Ne(z)?V(z):J(z)}function k(z){return z===45?(e.enter("tableDelimiterFiller"),j(z)):J(z)}function j(z){return z===45?(e.consume(z),j):z===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),P):(e.exit("tableDelimiterFiller"),P(z))}function P(z){return Ge(z)?Ke(e,V,"whitespace")(z):V(z)}function V(z){return z===124?T(z):z===null||Ne(z)?!o||s!==l?J(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):J(z)}function J(z){return n(z)}function H(z){return e.enter("tableRow"),ne(z)}function ne(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),ne):z===null||Ne(z)?(e.exit("tableRow"),t(z)):Ge(z)?Ke(e,ne,"whitespace")(z):(e.enter("data"),te(z))}function te(z){return z===null||z===124||gt(z)?(e.exit("data"),ne(z)):(e.consume(z),z===92?fe:te)}function fe(z){return z===92||z===124?(e.consume(z),te):te(z)}}function ZL(e,t){let n=-1,i=!0,s=0,l=[0,0,0,0],o=[0,0,0,0],d=!1,h=0,f,m,b;const x=new GL;for(;++n<e.length;){const E=e[n],T=E[1];E[0]==="enter"?T.type==="tableHead"?(d=!1,h!==0&&(zE(x,t,h,f,m),m=void 0,h=0),f={type:"table",start:Object.assign({},T.start),end:Object.assign({},T.end)},x.add(n,0,[["enter",f,t]])):T.type==="tableRow"||T.type==="tableDelimiterRow"?(i=!0,b=void 0,l=[0,0,0,0],o=[0,n+1,0,0],d&&(d=!1,m={type:"tableBody",start:Object.assign({},T.start),end:Object.assign({},T.end)},x.add(n,0,[["enter",m,t]])),s=T.type==="tableDelimiterRow"?2:m?3:1):s&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")?(i=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],b=xc(x,t,l,s,void 0,b),l=[0,0,0,0]),o[2]=n)):T.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(o[0]=o[1],b=xc(x,t,l,s,void 0,b)),l=o,o=[l[1],n,0,0])):T.type==="tableHead"?(d=!0,h=n):T.type==="tableRow"||T.type==="tableDelimiterRow"?(h=n,l[1]!==0?(o[0]=o[1],b=xc(x,t,l,s,n,b)):o[1]!==0&&(b=xc(x,t,o,s,n,b)),s=0):s&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")&&(o[3]=n)}for(h!==0&&zE(x,t,h,f,m),x.consume(t.events),n=-1;++n<t.events.length;){const E=t.events[n];E[0]==="enter"&&E[1].type==="table"&&(E[1]._align=QL(t.events,n))}return e}function xc(e,t,n,i,s,l){const o=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",d="tableContent";n[0]!==0&&(l.end=Object.assign({},Os(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const h=Os(t.events,n[1]);if(l={type:o,start:Object.assign({},h),end:Object.assign({},h)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const f=Os(t.events,n[2]),m=Os(t.events,n[3]),b={type:d,start:Object.assign({},f),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",b,t]]),i!==2){const x=t.events[n[2]],E=t.events[n[3]];if(x[1].end=Object.assign({},E[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const T=n[2]+1,w=n[3]-n[2]-1;e.add(T,w,[])}}e.add(n[3]+1,0,[["exit",b,t]])}return s!==void 0&&(l.end=Object.assign({},Os(t.events,s)),e.add(s,0,[["exit",l,t]]),l=void 0),l}function zE(e,t,n,i,s){const l=[],o=Os(t.events,n);s&&(s.end=Object.assign({},o),l.push(["exit",s,t])),i.end=Object.assign({},o),l.push(["exit",i,t]),e.add(n+1,0,l)}function Os(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const JL={name:"tasklistCheck",tokenize:tM};function eM(){return{text:{91:JL}}}function tM(e,t,n){const i=this;return s;function s(h){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),l)}function l(h){return gt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),o):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),o):n(h)}function o(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):n(h)}function d(h){return Ne(h)?t(h):Ge(h)?e.check({tokenize:nM},t,n)(h):n(h)}}function nM(e,t,n){return Ke(e,i,"whitespace");function i(s){return s===null?n(s):t(s)}}function rM(e){return _T([hO(),PL(),VL(e),XL(),eM()])}const iM={};function aM(e){const t=this,n=e||iM,i=t.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(rM(n)),l.push(lO()),o.push(uO(n))}var sM=Object.defineProperty,lM=Object.defineProperties,uM=Object.getOwnPropertyDescriptors,PE=Object.getOwnPropertySymbols,oM=Object.prototype.hasOwnProperty,cM=Object.prototype.propertyIsEnumerable,HE=(e,t,n)=>t in e?sM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,PT=(e,t)=>{for(var n in t||(t={}))oM.call(t,n)&&HE(e,n,t[n]);if(PE)for(var n of PE(t))cM.call(t,n)&&HE(e,n,t[n]);return e},HT=(e,t)=>lM(e,uM(t)),Rn=(e,t)=>{let n=!1,i=!1;for(let s=0;s<t;s+=1){if(e[s]==="\\"&&s+1<e.length&&e[s+1]==="`"){s+=1;continue}if(e.substring(s,s+3)==="```"){i=!i,s+=2;continue}!i&&e[s]==="`"&&(n=!n)}return n||i},dM=(e,t)=>{let n=e.substring(t,t+3)==="```",i=t>0&&e.substring(t-1,t+2)==="```",s=t>1&&e.substring(t-2,t+1)==="```";return n||i||s},fM=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!dM(e,n)&&(t+=1)}return t},Gi=(e,t)=>{let n=!1,i=!1,s=-1;for(let l=0;l<e.length;l+=1){if(e[l]==="\\"&&l+1<e.length&&e[l+1]==="`"){l+=1;continue}if(e.substring(l,l+3)==="```"){i=!i,l+=2;continue}if(!i&&e[l]==="`")if(n){if(s<t&&t<l)return!0;n=!1,s=-1}else n=!0,s=l}return!1},hM=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,pM=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(hM,(t,n,i,s)=>Rn(e,s)?t:`${n}\\>${i}`),mM=/(\*\*)([^*]*\*?)$/,gM=/(__)([^_]*?)$/,bM=/(\*\*\*)([^*]*?)$/,yM=/(\*)([^*]*?)$/,EM=/(_)([^_]*?)$/,xM=/(`)([^`]*?)$/,vM=/(~~)([^~]*?)$/,za=/^[\s_~*`]*$/,UT=/^[\s]*[-*+][\s]+$/,_M=/[\p{L}\p{N}_]/u,TM=/^```[^`\n]*```?$/,AM=/^\*{4,}$/,SM=/(__)([^_]+)_$/,wM=/(~~)([^~]+)~$/,UE=/~~/g,Wi=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:_M.test(e)},kM=(e,t)=>{let n=1;for(let i=t-1;i>=0;i-=1)if(e[i]==="]")n+=1;else if(e[i]==="["&&(n-=1,n===0))return i;return-1},jT=(e,t)=>{let n=1;for(let i=t+1;i<e.length;i+=1)if(e[i]==="[")n+=1;else if(e[i]==="]"&&(n-=1,n===0))return i;return-1},wd=(e,t)=>{let n=!1,i=!1;for(let s=0;s<e.length&&s<t;s+=1){if(e[s]==="\\"&&e[s+1]==="$"){s+=1;continue}e[s]==="$"&&(e[s+1]==="$"?(i=!i,s+=1,n=!1):i||(n=!n))}return n||i},CM=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
35
|
-
`)return!1}return!1},FT=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?CM(e,t):!1;if(e[n]===`
|
|
36
|
-
`)return!1}return!1},NM=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let i=n+1<e.length?e[n+1]:"";return i>="a"&&i<="z"||i>="A"&&i<="Z"||i==="/"}if(e[n]===`
|
|
37
|
-
`)return!1}return!1},Dm=(e,t,n)=>{let i=0;for(let h=t-1;h>=0;h-=1)if(e[h]===`
|
|
38
|
-
`){i=h+1;break}let s=e.length;for(let h=t;h<e.length;h+=1)if(e[h]===`
|
|
39
|
-
`){s=h;break}let l=e.substring(i,s),o=0,d=!1;for(let h of l)if(h===n)o+=1;else if(h!==" "&&h!==" "){d=!0;break}return o>=3&&!d},RM=(e,t,n,i)=>n==="\\"||e.includes("$")&&wd(e,t)?!0:n!=="*"&&i==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&i&&Wi(n)&&Wi(i)||(!n||n===" "||n===" "||n===`
|
|
40
|
-
`)&&(!i||i===" "||i===" "||i===`
|
|
41
|
-
`)),$T=e=>{let t=0,n=!1,i=e.length;for(let s=0;s<i;s+=1){if(e[s]==="`"&&s+2<i&&e[s+1]==="`"&&e[s+2]==="`"){n=!n,s+=2;continue}if(n||e[s]!=="*")continue;let l=s>0?e[s-1]:"",o=s<i-1?e[s+1]:"";RM(e,s,l,o)||(t+=1)}return t},OM=(e,t,n,i)=>!!(n==="\\"||e.includes("$")&&wd(e,t)||FT(e,t)||NM(e,t)||n==="_"||i==="_"||n&&i&&Wi(n)&&Wi(i)),LM=e=>{let t=0,n=!1,i=e.length;for(let s=0;s<i;s+=1){if(e[s]==="`"&&s+2<i&&e[s+1]==="`"&&e[s+2]==="`"){n=!n,s+=2;continue}if(n||e[s]!=="_")continue;let l=s>0?e[s-1]:"",o=s<i-1?e[s+1]:"";OM(e,s,l,o)||(t+=1)}return t},MM=e=>{let t=0,n=0,i=!1;for(let s=0;s<e.length;s+=1){if(e[s]==="`"&&s+2<e.length&&e[s+1]==="`"&&e[s+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,i=!i,s+=2;continue}i||(e[s]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},Bm=e=>{let t=0,n=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}n||e[i]==="*"&&i+1<e.length&&e[i+1]==="*"&&(t+=1,i+=1)}return t},jE=e=>{let t=0,n=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}n||e[i]==="_"&&i+1<e.length&&e[i+1]==="_"&&(t+=1,i+=1)}return t},IM=(e,t,n)=>{if(!t||za.test(t))return!0;let i=e.substring(0,n).lastIndexOf(`
|
|
42
|
-
`),s=i===-1?0:i+1,l=e.substring(s,n);return UT.test(l)&&t.includes(`
|
|
43
|
-
`)?!0:Dm(e,n,"*")},DM=e=>{let t=e.match(mM);if(!t)return e;let n=t[2],i=e.lastIndexOf(t[1]);return Rn(e,i)||Gi(e,i)||IM(e,n,i)?e:Bm(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},BM=(e,t,n)=>{if(!t||za.test(t))return!0;let i=e.substring(0,n).lastIndexOf(`
|
|
44
|
-
`),s=i===-1?0:i+1,l=e.substring(s,n);return UT.test(l)&&t.includes(`
|
|
45
|
-
`)?!0:Dm(e,n,"_")},zM=e=>{let t=e.match(gM);if(!t){let s=e.match(SM);if(s){let l=e.lastIndexOf(s[1]);if(!(Rn(e,l)||Gi(e,l))&&jE(e)%2===1)return`${e}_`}return e}let n=t[2],i=e.lastIndexOf(t[1]);return Rn(e,i)||Gi(e,i)||BM(e,n,i)?e:jE(e)%2===1?`${e}__`:e},PM=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!wd(e,n)){let i=n>0?e[n-1]:"",s=n<e.length-1?e[n+1]:"";if((!i||i===" "||i===" "||i===`
|
|
46
|
-
`)&&(!s||s===" "||s===" "||s===`
|
|
47
|
-
`)||i&&s&&Wi(i)&&Wi(s))continue;return n}}return-1},HM=e=>{if(!e.match(yM))return e;let t=PM(e);if(t===-1||Rn(e,t)||Gi(e,t))return e;let n=e.substring(t+1);return!n||za.test(n)?e:$T(e)%2===1?`${e}*`:e},qT=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!wd(e,n)&&!FT(e,n)){let i=n>0?e[n-1]:"",s=n<e.length-1?e[n+1]:"";if(i&&s&&Wi(i)&&Wi(s))continue;return n}}return-1},UM=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
48
|
-
`;)t-=1;if(t<e.length){let n=e.slice(0,t),i=e.slice(t);return`${n}_${i}`}return`${e}_`},jM=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Bm(t)%2!==1)return null;let n=t.indexOf("**"),i=qT(t);return n!==-1&&i!==-1&&n<i?`${t}_**`:null},FM=e=>{if(!e.match(EM))return e;let t=qT(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||za.test(n)||Rn(e,t)||Gi(e,t))return e;if(LM(e)%2===1){let i=jM(e);return i!==null?i:UM(e)}return e},$M=e=>{let t=Bm(e),n=$T(e);return t%2===0&&n%2===0},qM=(e,t,n)=>!t||za.test(t)||Rn(e,n)||Gi(e,n)?!0:Dm(e,n,"*"),YM=e=>{if(AM.test(e))return e;let t=e.match(bM);if(!t)return e;let n=t[2],i=e.lastIndexOf(t[1]);return qM(e,n,i)?e:MM(e)%2===1?$M(e)?e:`${e}***`:e},VM=/<[a-zA-Z/][^>]*$/,GM=e=>{let t=e.match(VM);return!t||t.index===void 0||Rn(e,t.index)?e:e.substring(0,t.index).trimEnd()},WM=e=>!e.match(TM)||e.includes(`
|
|
49
|
-
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,QM=e=>(e.match(/```/g)||[]).length%2===1,XM=e=>{let t=WM(e);if(t!==null)return t;let n=e.match(xM);if(n&&!QM(e)){let i=n[2];if(!i||za.test(i))return e;if(fM(e)%2===1)return`${e}\``}return e},KM=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",ZM=e=>{let t=0,n=!1;for(let i=0;i<e.length-1;i+=1)e[i]==="`"&&!KM(e,i)&&(n=!n),!n&&e[i]==="$"&&e[i+1]==="$"&&(t+=1,i+=1);return t},JM=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
50
|
-
`,t)!==-1&&!e.endsWith(`
|
|
51
|
-
`)?`${e}
|
|
52
|
-
$$`:`${e}$$`},eI=e=>ZM(e)%2===0?e:JM(e),tI=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let i=kM(e,t);if(i===-1||Rn(e,i))return null;let s=i>0&&e[i-1]==="!",l=s?i-1:i,o=e.substring(0,l);if(s)return o;let d=e.substring(i+1,t);return n==="text-only"?`${o}${d}`:`${o}[${d}](streamdown:incomplete-link)`},FE=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!Rn(e,n)){if(n>0&&e[n-1]==="!")continue;let i=jT(e,n);if(i===-1)return n;if(i+1<e.length&&e[i+1]==="("){let s=e.indexOf(")",i+2);s!==-1&&(n=s)}}return t},nI=(e,t,n)=>{let i=t>0&&e[t-1]==="!",s=i?t-1:t;if(!e.substring(t+1).includes("]")){let l=e.substring(0,s);if(i)return l;if(n==="text-only"){let o=FE(e,t);return e.substring(0,o)+e.substring(o+1)}return`${e}](streamdown:incomplete-link)`}if(jT(e,t)===-1){let l=e.substring(0,s);if(i)return l;if(n==="text-only"){let o=FE(e,t);return e.substring(0,o)+e.substring(o+1)}return`${e}](streamdown:incomplete-link)`}return null},YT=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!Rn(e,n)){let i=tI(e,n,t);if(i!==null)return i}for(let i=e.length-1;i>=0;i-=1)if(e[i]==="["&&!Rn(e,i)){let s=nI(e,i,t);if(s!==null)return s}return e},rI=/^-{1,2}$/,iI=/^[\s]*-{1,2}[\s]+$/,aI=/^={1,2}$/,sI=/^[\s]*={1,2}[\s]+$/,lI=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
53
|
-
`);if(t===-1)return e;let n=e.substring(t+1),i=e.substring(0,t),s=n.trim();if(rI.test(s)&&!n.match(iI)){let l=i.split(`
|
|
54
|
-
`).at(-1);if(l&&l.trim().length>0)return`${e}`}if(aI.test(s)&&!n.match(sI)){let l=i.split(`
|
|
55
|
-
`).at(-1);if(l&&l.trim().length>0)return`${e}`}return e},uI=e=>{var t,n;let i=e.match(vM);if(i){let s=i[2];if(!s||za.test(s))return e;let l=e.lastIndexOf(i[1]);if(Rn(e,l)||Gi(e,l))return e;if(((t=e.match(UE))==null?void 0:t.length)%2===1)return`${e}~~`}else{let s=e.match(wM);if(s){let l=e.lastIndexOf(s[0].slice(0,2));if(Rn(e,l)||Gi(e,l))return e;if(((n=e.match(UE))==null?void 0:n.length)%2===1)return`${e}~`}}return e},k0=e=>e!==!1,Yn={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},oI=[{handler:{name:"comparisonOperators",handle:pM,priority:Yn.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:GM,priority:Yn.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:lI,priority:Yn.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:YT,priority:Yn.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:YM,priority:Yn.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:DM,priority:Yn.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:zM,priority:Yn.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:HM,priority:Yn.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:FM,priority:Yn.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:XM,priority:Yn.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:uI,priority:Yn.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:eI,priority:Yn.KATEX},optionKey:"katex"}],cI=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return oI.filter(({handler:i,optionKey:s})=>i.name==="links"?k0(e?.links)||k0(e?.images):k0(e?.[s])).map(({handler:i,earlyReturn:s})=>i.name==="links"?{handler:HT(PT({},i),{handle:l=>YT(l,n)}),earlyReturn:n==="protocol"?s:void 0}:{handler:i,earlyReturn:s})},dI=(e,t)=>{var n;if(!e||typeof e!="string")return e;let i=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,s=cI(t),l=((n=t?.handlers)!=null?n:[]).map(d=>{var h;return{handler:HT(PT({},d),{priority:(h=d.priority)!=null?h:Yn.DEFAULT}),earlyReturn:void 0}}),o=[...s,...l].sort((d,h)=>{var f,m;return((f=d.handler.priority)!=null?f:0)-((m=h.handler.priority)!=null?m:0)});for(let{handler:d,earlyReturn:h}of o)if(i=d.handle(i),h!=null&&h(i))return i;return i},fI=dI;function VT(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=VT(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function GT(){for(var e,t,n=0,i="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=VT(e))&&(i&&(i+=" "),i+=t);return i}const hI=(e,t)=>{const n=new Array(e.length+t.length);for(let i=0;i<e.length;i++)n[i]=e[i];for(let i=0;i<t.length;i++)n[e.length+i]=t[i];return n},pI=(e,t)=>({classGroupId:e,validator:t}),WT=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ed="-",$E=[],mI="arbitrary..",gI=e=>{const t=yI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return bI(o);const d=o.split(ed),h=d[0]===""&&d.length>1?1:0;return QT(d,h,t)},getConflictingClassGroupIds:(o,d)=>{if(d){const h=i[o],f=n[o];return h?f?hI(f,h):h:f||$E}return n[o]||$E}}},QT=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],l=n.nextPart.get(s);if(l){const f=QT(e,t+1,l);if(f)return f}const o=n.validators;if(o===null)return;const d=t===0?e.join(ed):e.slice(t).join(ed),h=o.length;for(let f=0;f<h;f++){const m=o[f];if(m.validator(d))return m.classGroupId}},bI=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),i=t.slice(0,n);return i?mI+i:void 0})(),yI=e=>{const{theme:t,classGroups:n}=e;return EI(n,t)},EI=(e,t)=>{const n=WT();for(const i in e){const s=e[i];zm(s,n,i,t)}return n},zm=(e,t,n,i)=>{const s=e.length;for(let l=0;l<s;l++){const o=e[l];xI(o,t,n,i)}},xI=(e,t,n,i)=>{if(typeof e=="string"){vI(e,t,n);return}if(typeof e=="function"){_I(e,t,n,i);return}TI(e,t,n,i)},vI=(e,t,n)=>{const i=e===""?t:XT(t,e);i.classGroupId=n},_I=(e,t,n,i)=>{if(AI(e)){zm(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(pI(n,e))},TI=(e,t,n,i)=>{const s=Object.entries(e),l=s.length;for(let o=0;o<l;o++){const[d,h]=s[o];zm(h,XT(t,d),n,i)}},XT=(e,t)=>{let n=e;const i=t.split(ed),s=i.length;for(let l=0;l<s;l++){const o=i[l];let d=n.nextPart.get(o);d||(d=WT(),n.nextPart.set(o,d)),n=d}return n},AI=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,SI=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null);const s=(l,o)=>{n[l]=o,t++,t>e&&(t=0,i=n,n=Object.create(null))};return{get(l){let o=n[l];if(o!==void 0)return o;if((o=i[l])!==void 0)return s(l,o),o},set(l,o){l in n?n[l]=o:s(l,o)}}},zp="!",qE=":",wI=[],YE=(e,t,n,i,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:s}),kI=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=s=>{const l=[];let o=0,d=0,h=0,f;const m=s.length;for(let w=0;w<m;w++){const S=s[w];if(o===0&&d===0){if(S===qE){l.push(s.slice(h,w)),h=w+1;continue}if(S==="/"){f=w;continue}}S==="["?o++:S==="]"?o--:S==="("?d++:S===")"&&d--}const b=l.length===0?s:s.slice(h);let x=b,E=!1;b.endsWith(zp)?(x=b.slice(0,-1),E=!0):b.startsWith(zp)&&(x=b.slice(1),E=!0);const T=f&&f>h?f-h:void 0;return YE(l,E,x,T)};if(t){const s=t+qE,l=i;i=o=>o.startsWith(s)?l(o.slice(s.length)):YE(wI,!1,o,void 0,!0)}if(n){const s=i;i=l=>n({className:l,parseClassName:s})}return i},CI=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,i)=>{t.set(n,1e6+i)}),n=>{const i=[];let s=[];for(let l=0;l<n.length;l++){const o=n[l],d=o[0]==="[",h=t.has(o);d||h?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(o)):s.push(o)}return s.length>0&&(s.sort(),i.push(...s)),i}},NI=e=>({cache:SI(e.cacheSize),parseClassName:kI(e),sortModifiers:CI(e),...gI(e)}),RI=/\s+/,OI=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:l}=t,o=[],d=e.trim().split(RI);let h="";for(let f=d.length-1;f>=0;f-=1){const m=d[f],{isExternal:b,modifiers:x,hasImportantModifier:E,baseClassName:T,maybePostfixModifierPosition:w}=n(m);if(b){h=m+(h.length>0?" "+h:h);continue}let S=!!w,k=i(S?T.substring(0,w):T);if(!k){if(!S){h=m+(h.length>0?" "+h:h);continue}if(k=i(T),!k){h=m+(h.length>0?" "+h:h);continue}S=!1}const j=x.length===0?"":x.length===1?x[0]:l(x).join(":"),P=E?j+zp:j,V=P+k;if(o.indexOf(V)>-1)continue;o.push(V);const J=s(k,S);for(let H=0;H<J.length;++H){const ne=J[H];o.push(P+ne)}h=m+(h.length>0?" "+h:h)}return h},LI=(...e)=>{let t=0,n,i,s="";for(;t<e.length;)(n=e[t++])&&(i=KT(n))&&(s&&(s+=" "),s+=i);return s},KT=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=KT(e[i]))&&(n&&(n+=" "),n+=t);return n},MI=(e,...t)=>{let n,i,s,l;const o=h=>{const f=t.reduce((m,b)=>b(m),e());return n=NI(f),i=n.cache.get,s=n.cache.set,l=d,d(h)},d=h=>{const f=i(h);if(f)return f;const m=OI(h,n);return s(h,m),m};return l=o,(...h)=>l(LI(...h))},II=[],Ht=e=>{const t=n=>n[e]||II;return t.isThemeGetter=!0,t},ZT=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,JT=/^\((?:(\w[\w-]*):)?(.+)\)$/i,DI=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,BI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zI=/\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$/,PI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,HI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,UI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zi=e=>DI.test(e),je=e=>!!e&&!Number.isNaN(Number(e)),Pi=e=>!!e&&Number.isInteger(Number(e)),C0=e=>e.endsWith("%")&&je(e.slice(0,-1)),ri=e=>BI.test(e),e3=()=>!0,jI=e=>zI.test(e)&&!PI.test(e),Pm=()=>!1,FI=e=>HI.test(e),$I=e=>UI.test(e),qI=e=>!Ae(e)&&!Se(e),YI=e=>Ji(e,r3,Pm),Ae=e=>ZT.test(e),xa=e=>Ji(e,i3,jI),VE=e=>Ji(e,JI,je),VI=e=>Ji(e,s3,e3),GI=e=>Ji(e,a3,Pm),GE=e=>Ji(e,t3,Pm),WI=e=>Ji(e,n3,$I),vc=e=>Ji(e,l3,FI),Se=e=>JT.test(e),tu=e=>Pa(e,i3),QI=e=>Pa(e,a3),WE=e=>Pa(e,t3),XI=e=>Pa(e,r3),KI=e=>Pa(e,n3),_c=e=>Pa(e,l3,!0),ZI=e=>Pa(e,s3,!0),Ji=(e,t,n)=>{const i=ZT.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},Pa=(e,t,n=!1)=>{const i=JT.exec(e);return i?i[1]?t(i[1]):n:!1},t3=e=>e==="position"||e==="percentage",n3=e=>e==="image"||e==="url",r3=e=>e==="length"||e==="size"||e==="bg-size",i3=e=>e==="length",JI=e=>e==="number",a3=e=>e==="family-name",s3=e=>e==="number"||e==="weight",l3=e=>e==="shadow",eD=()=>{const e=Ht("color"),t=Ht("font"),n=Ht("text"),i=Ht("font-weight"),s=Ht("tracking"),l=Ht("leading"),o=Ht("breakpoint"),d=Ht("container"),h=Ht("spacing"),f=Ht("radius"),m=Ht("shadow"),b=Ht("inset-shadow"),x=Ht("text-shadow"),E=Ht("drop-shadow"),T=Ht("blur"),w=Ht("perspective"),S=Ht("aspect"),k=Ht("ease"),j=Ht("animate"),P=()=>["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"],J=()=>[...V(),Se,Ae],H=()=>["auto","hidden","clip","visible","scroll"],ne=()=>["auto","contain","none"],te=()=>[Se,Ae,h],fe=()=>[zi,"full","auto",...te()],z=()=>[Pi,"none","subgrid",Se,Ae],$=()=>["auto",{span:["full",Pi,Se,Ae]},Pi,Se,Ae],Y=()=>[Pi,"auto",Se,Ae],_e=()=>["auto","min","max","fr",Se,Ae],ce=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ue=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...te()],ie=()=>[zi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...te()],Ee=()=>[zi,"screen","full","dvw","lvw","svw","min","max","fit",...te()],ke=()=>[zi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...te()],R=()=>[e,Se,Ae],D=()=>[...V(),WE,GE,{position:[Se,Ae]}],ee=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",XI,YI,{size:[Se,Ae]}],F=()=>[C0,tu,xa],be=()=>["","none","full",f,Se,Ae],ye=()=>["",je,tu,xa],Re=()=>["solid","dashed","dotted","double"],Je=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Le=()=>[je,C0,WE,GE],Gt=()=>["","none",T,Se,Ae],Wt=()=>["none",je,Se,Ae],Ln=()=>["none",je,Se,Ae],dr=()=>[je,Se,Ae],Qt=()=>[zi,"full",...te()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ri],breakpoint:[ri],color:[e3],container:[ri],"drop-shadow":[ri],ease:["in","out","in-out"],font:[qI],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ri],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ri],shadow:[ri],spacing:["px",je],text:[ri],"text-shadow":[ri],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",zi,Ae,Se,S]}],container:["container"],columns:[{columns:[je,Ae,Se,d]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"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:J()}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:ne()}],"overscroll-x":[{"overscroll-x":ne()}],"overscroll-y":[{"overscroll-y":ne()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:fe()}],"inset-x":[{"inset-x":fe()}],"inset-y":[{"inset-y":fe()}],start:[{"inset-s":fe(),start:fe()}],end:[{"inset-e":fe(),end:fe()}],"inset-bs":[{"inset-bs":fe()}],"inset-be":[{"inset-be":fe()}],top:[{top:fe()}],right:[{right:fe()}],bottom:[{bottom:fe()}],left:[{left:fe()}],visibility:["visible","invisible","collapse"],z:[{z:[Pi,"auto",Se,Ae]}],basis:[{basis:[zi,"full","auto",d,...te()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,zi,"auto","initial","none",Ae]}],grow:[{grow:["",je,Se,Ae]}],shrink:[{shrink:["",je,Se,Ae]}],order:[{order:[Pi,"first","last","none",Se,Ae]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_e()}],"auto-rows":[{"auto-rows":_e()}],gap:[{gap:te()}],"gap-x":[{"gap-x":te()}],"gap-y":[{"gap-y":te()}],"justify-content":[{justify:[...ce(),"normal"]}],"justify-items":[{"justify-items":[...ue(),"normal"]}],"justify-self":[{"justify-self":["auto",...ue()]}],"align-content":[{content:["normal",...ce()]}],"align-items":[{items:[...ue(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ue(),{baseline:["","last"]}]}],"place-content":[{"place-content":ce()}],"place-items":[{"place-items":[...ue(),"baseline"]}],"place-self":[{"place-self":["auto",...ue()]}],p:[{p:te()}],px:[{px:te()}],py:[{py:te()}],ps:[{ps:te()}],pe:[{pe:te()}],pbs:[{pbs:te()}],pbe:[{pbe:te()}],pt:[{pt:te()}],pr:[{pr:te()}],pb:[{pb:te()}],pl:[{pl:te()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mbs:[{mbs:I()}],mbe:[{mbe:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":te()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":te()}],"space-y-reverse":["space-y-reverse"],size:[{size:ie()}],"inline-size":[{inline:["auto",...Ee()]}],"min-inline-size":[{"min-inline":["auto",...Ee()]}],"max-inline-size":[{"max-inline":["none",...Ee()]}],"block-size":[{block:["auto",...ke()]}],"min-block-size":[{"min-block":["auto",...ke()]}],"max-block-size":[{"max-block":["none",...ke()]}],w:[{w:[d,"screen",...ie()]}],"min-w":[{"min-w":[d,"screen","none",...ie()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[o]},...ie()]}],h:[{h:["screen","lh",...ie()]}],"min-h":[{"min-h":["screen","lh","none",...ie()]}],"max-h":[{"max-h":["screen","lh",...ie()]}],"font-size":[{text:["base",n,tu,xa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ZI,VI]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",C0,Ae]}],"font-family":[{font:[QI,GI,t]}],"font-features":[{"font-features":[Ae]}],"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:[s,Se,Ae]}],"line-clamp":[{"line-clamp":[je,"none",Se,VE]}],leading:[{leading:[l,...te()]}],"list-image":[{"list-image":["none",Se,Ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,Ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Re(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",Se,xa]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[je,"auto",Se,Ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:te()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,Ae]}],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",Se,Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Pi,Se,Ae],radial:["",Se,Ae],conic:[Pi,Se,Ae]},KI,WI]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:be()}],"rounded-s":[{"rounded-s":be()}],"rounded-e":[{"rounded-e":be()}],"rounded-t":[{"rounded-t":be()}],"rounded-r":[{"rounded-r":be()}],"rounded-b":[{"rounded-b":be()}],"rounded-l":[{"rounded-l":be()}],"rounded-ss":[{"rounded-ss":be()}],"rounded-se":[{"rounded-se":be()}],"rounded-ee":[{"rounded-ee":be()}],"rounded-es":[{"rounded-es":be()}],"rounded-tl":[{"rounded-tl":be()}],"rounded-tr":[{"rounded-tr":be()}],"rounded-br":[{"rounded-br":be()}],"rounded-bl":[{"rounded-bl":be()}],"border-w":[{border:ye()}],"border-w-x":[{"border-x":ye()}],"border-w-y":[{"border-y":ye()}],"border-w-s":[{"border-s":ye()}],"border-w-e":[{"border-e":ye()}],"border-w-bs":[{"border-bs":ye()}],"border-w-be":[{"border-be":ye()}],"border-w-t":[{"border-t":ye()}],"border-w-r":[{"border-r":ye()}],"border-w-b":[{"border-b":ye()}],"border-w-l":[{"border-l":ye()}],"divide-x":[{"divide-x":ye()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ye()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Re(),"hidden","none"]}],"divide-style":[{divide:[...Re(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...Re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,Se,Ae]}],"outline-w":[{outline:["",je,tu,xa]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",m,_c,vc]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",b,_c,vc]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:ye()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[je,xa]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":ye()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",x,_c,vc]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[je,Se,Ae]}],"mix-blend":[{"mix-blend":[...Je(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Je()}],"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":[je]}],"mask-image-linear-from-pos":[{"mask-linear-from":Le()}],"mask-image-linear-to-pos":[{"mask-linear-to":Le()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":Le()}],"mask-image-t-to-pos":[{"mask-t-to":Le()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":Le()}],"mask-image-r-to-pos":[{"mask-r-to":Le()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":Le()}],"mask-image-b-to-pos":[{"mask-b-to":Le()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":Le()}],"mask-image-l-to-pos":[{"mask-l-to":Le()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":Le()}],"mask-image-x-to-pos":[{"mask-x-to":Le()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":Le()}],"mask-image-y-to-pos":[{"mask-y-to":Le()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[Se,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":Le()}],"mask-image-radial-to-pos":[{"mask-radial-to":Le()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"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":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":Le()}],"mask-image-conic-to-pos":[{"mask-conic-to":Le()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,Ae]}],filter:[{filter:["","none",Se,Ae]}],blur:[{blur:Gt()}],brightness:[{brightness:[je,Se,Ae]}],contrast:[{contrast:[je,Se,Ae]}],"drop-shadow":[{"drop-shadow":["","none",E,_c,vc]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",je,Se,Ae]}],"hue-rotate":[{"hue-rotate":[je,Se,Ae]}],invert:[{invert:["",je,Se,Ae]}],saturate:[{saturate:[je,Se,Ae]}],sepia:[{sepia:["",je,Se,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,Ae]}],"backdrop-blur":[{"backdrop-blur":Gt()}],"backdrop-brightness":[{"backdrop-brightness":[je,Se,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[je,Se,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,Se,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,Se,Ae]}],"backdrop-invert":[{"backdrop-invert":["",je,Se,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[je,Se,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[je,Se,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",je,Se,Ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":te()}],"border-spacing-x":[{"border-spacing-x":te()}],"border-spacing-y":[{"border-spacing-y":te()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,Ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",Se,Ae]}],ease:[{ease:["linear","initial",k,Se,Ae]}],delay:[{delay:[je,Se,Ae]}],animate:[{animate:["none",j,Se,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Se,Ae]}],"perspective-origin":[{"perspective-origin":J()}],rotate:[{rotate:Wt()}],"rotate-x":[{"rotate-x":Wt()}],"rotate-y":[{"rotate-y":Wt()}],"rotate-z":[{"rotate-z":Wt()}],scale:[{scale:Ln()}],"scale-x":[{"scale-x":Ln()}],"scale-y":[{"scale-y":Ln()}],"scale-z":[{"scale-z":Ln()}],"scale-3d":["scale-3d"],skew:[{skew:dr()}],"skew-x":[{"skew-x":dr()}],"skew-y":[{"skew-y":dr()}],transform:[{transform:[Se,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:J()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Qt()}],"translate-x":[{"translate-x":Qt()}],"translate-y":[{"translate-y":Qt()}],"translate-z":[{"translate-z":Qt()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"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",Se,Ae]}],"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":te()}],"scroll-mx":[{"scroll-mx":te()}],"scroll-my":[{"scroll-my":te()}],"scroll-ms":[{"scroll-ms":te()}],"scroll-me":[{"scroll-me":te()}],"scroll-mbs":[{"scroll-mbs":te()}],"scroll-mbe":[{"scroll-mbe":te()}],"scroll-mt":[{"scroll-mt":te()}],"scroll-mr":[{"scroll-mr":te()}],"scroll-mb":[{"scroll-mb":te()}],"scroll-ml":[{"scroll-ml":te()}],"scroll-p":[{"scroll-p":te()}],"scroll-px":[{"scroll-px":te()}],"scroll-py":[{"scroll-py":te()}],"scroll-ps":[{"scroll-ps":te()}],"scroll-pe":[{"scroll-pe":te()}],"scroll-pbs":[{"scroll-pbs":te()}],"scroll-pbe":[{"scroll-pbe":te()}],"scroll-pt":[{"scroll-pt":te()}],"scroll-pr":[{"scroll-pr":te()}],"scroll-pb":[{"scroll-pb":te()}],"scroll-pl":[{"scroll-pl":te()}],"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",Se,Ae]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[je,tu,xa,VE]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]}},u3=MI(eD),tD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nD=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rD={};function QE(e,t){return(rD.jsx?nD:tD).test(e)}const iD=/[ \t\n\f\r]/g;function aD(e){return typeof e=="object"?e.type==="text"?XE(e.value):!1:XE(e)}function XE(e){return e.replace(iD,"")===""}var ks={},N0,KE;function sD(){if(KE)return N0;KE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,d=/^\s+|\s+$/g,h=`
|
|
56
|
-
`,f="/",m="*",b="",x="comment",E="declaration";function T(S,k){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];k=k||{};var j=1,P=1;function V(ce){var ue=ce.match(t);ue&&(j+=ue.length);var I=ce.lastIndexOf(h);P=~I?ce.length-I:P+ce.length}function J(){var ce={line:j,column:P};return function(ue){return ue.position=new H(ce),fe(),ue}}function H(ce){this.start=ce,this.end={line:j,column:P},this.source=k.source}H.prototype.content=S;function ne(ce){var ue=new Error(k.source+":"+j+":"+P+": "+ce);if(ue.reason=ce,ue.filename=k.source,ue.line=j,ue.column=P,ue.source=S,!k.silent)throw ue}function te(ce){var ue=ce.exec(S);if(ue){var I=ue[0];return V(I),S=S.slice(I.length),ue}}function fe(){te(n)}function z(ce){var ue;for(ce=ce||[];ue=$();)ue!==!1&&ce.push(ue);return ce}function $(){var ce=J();if(!(f!=S.charAt(0)||m!=S.charAt(1))){for(var ue=2;b!=S.charAt(ue)&&(m!=S.charAt(ue)||f!=S.charAt(ue+1));)++ue;if(ue+=2,b===S.charAt(ue-1))return ne("End of comment missing");var I=S.slice(2,ue-2);return P+=2,V(I),S=S.slice(ue),P+=2,ce({type:x,comment:I})}}function Y(){var ce=J(),ue=te(i);if(ue){if($(),!te(s))return ne("property missing ':'");var I=te(l),ie=ce({type:E,property:w(ue[0].replace(e,b)),value:I?w(I[0].replace(e,b)):b});return te(o),ie}}function _e(){var ce=[];z(ce);for(var ue;ue=Y();)ue!==!1&&(ce.push(ue),z(ce));return ce}return fe(),_e()}function w(S){return S?S.replace(d,b):b}return N0=T,N0}var ZE;function lD(){if(ZE)return ks;ZE=1;var e=ks&&ks.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ks,"__esModule",{value:!0}),ks.default=n;const t=e(sD());function n(i,s){let l=null;if(!i||typeof i!="string")return l;const o=(0,t.default)(i),d=typeof s=="function";return o.forEach(h=>{if(h.type!=="declaration")return;const{property:f,value:m}=h;d?s(f,m,h):m&&(l=l||{},l[f]=m)}),l}return ks}var nu={},JE;function uD(){if(JE)return nu;JE=1,Object.defineProperty(nu,"__esModule",{value:!0}),nu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(f){return!f||n.test(f)||e.test(f)},o=function(f,m){return m.toUpperCase()},d=function(f,m){return"".concat(m,"-")},h=function(f,m){return m===void 0&&(m={}),l(f)?f:(f=f.toLowerCase(),m.reactCompat?f=f.replace(s,d):f=f.replace(i,d),f.replace(t,o))};return nu.camelCase=h,nu}var ru,ex;function oD(){if(ex)return ru;ex=1;var e=ru&&ru.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(lD()),n=uD();function i(s,l){var o={};return!s||typeof s!="string"||(0,t.default)(s,function(d,h){d&&h&&(o[(0,n.camelCase)(d,l)]=h)}),o}return i.default=i,ru=i,ru}var cD=oD();const dD=Mu(cD);function Tu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?tx(e.position):"start"in e||"end"in e?tx(e):"line"in e||"column"in e?Pp(e):""}function Pp(e){return nx(e&&e.line)+":"+nx(e&&e.column)}function tx(e){return Pp(e&&e.start)+"-"+Pp(e&&e.end)}function nx(e){return e&&typeof e=="number"?e:1}class un extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let s="",l={},o=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?s=t:!l.cause&&t&&(o=!0,s=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof i=="string"){const h=i.indexOf(":");h===-1?l.ruleId=i:(l.source=i.slice(0,h),l.ruleId=i.slice(h+1))}if(!l.place&&l.ancestors&&l.ancestors){const h=l.ancestors[l.ancestors.length-1];h&&(l.place=h.position)}const d=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=Tu(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}un.prototype.file="";un.prototype.name="";un.prototype.reason="";un.prototype.message="";un.prototype.stack="";un.prototype.column=void 0;un.prototype.line=void 0;un.prototype.ancestors=void 0;un.prototype.cause=void 0;un.prototype.fatal=void 0;un.prototype.place=void 0;un.prototype.ruleId=void 0;un.prototype.source=void 0;const Hm={}.hasOwnProperty,fD=new Map,hD=/[A-Z]/g,pD=new Set(["table","tbody","thead","tfoot","tr"]),mD=new Set(["td","th"]),o3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gD(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=AD(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=TD(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ki:Fu,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=c3(s,e,void 0);return l&&typeof l!="string"?l:s.create(e,s.Fragment,{children:l||void 0},void 0)}function c3(e,t,n){if(t.type==="element")return bD(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return yD(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return xD(e,t,n);if(t.type==="mdxjsEsm")return ED(e,t);if(t.type==="root")return vD(e,t,n);if(t.type==="text")return _D(e,t)}function bD(e,t,n){const i=e.schema;let s=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=Ki,e.schema=s),e.ancestors.push(t);const l=f3(e,t.tagName,!1),o=SD(e,t);let d=jm(e,t);return pD.has(t.tagName)&&(d=d.filter(function(h){return typeof h=="string"?!aD(h):!0})),d3(e,o,l,t),Um(o,d),e.ancestors.pop(),e.schema=i,e.create(t,l,o,n)}function yD(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Ru(e,t.position)}function ED(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ru(e,t.position)}function xD(e,t,n){const i=e.schema;let s=i;t.name==="svg"&&i.space==="html"&&(s=Ki,e.schema=s),e.ancestors.push(t);const l=t.name===null?e.Fragment:f3(e,t.name,!0),o=wD(e,t),d=jm(e,t);return d3(e,o,l,t),Um(o,d),e.ancestors.pop(),e.schema=i,e.create(t,l,o,n)}function vD(e,t,n){const i={};return Um(i,jm(e,t)),e.create(t,e.Fragment,i,n)}function _D(e,t){return t.value}function d3(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function Um(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function TD(e,t,n){return i;function i(s,l,o,d){const f=Array.isArray(o.children)?n:t;return d?f(l,o,d):f(l,o)}}function AD(e,t){return n;function n(i,s,l,o){const d=Array.isArray(l.children),h=Br(i);return t(s,l,o,d,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function SD(e,t){const n={};let i,s;for(s in t.properties)if(s!=="children"&&Hm.call(t.properties,s)){const l=kD(e,s,t.properties[s]);if(l){const[o,d]=l;e.tableCellAlignToStyle&&o==="align"&&typeof d=="string"&&mD.has(t.tagName)?i=d:n[o]=d}}if(i){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function wD(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const l=i.data.estree.body[0];l.type;const o=l.expression;o.type;const d=o.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else Ru(e,t.position);else{const s=i.name;let l;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const d=i.value.data.estree.body[0];d.type,l=e.evaluater.evaluateExpression(d.expression)}else Ru(e,t.position);else l=i.value===null?!0:i.value;n[s]=l}return n}function jm(e,t){const n=[];let i=-1;const s=e.passKeys?new Map:fD;for(;++i<t.children.length;){const l=t.children[i];let o;if(e.passKeys){const h=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(h){const f=s.get(h)||0;o=h+"-"+f,s.set(h,f+1)}}const d=c3(e,l,o);d!==void 0&&n.push(d)}return n}function kD(e,t,n){const i=yd(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?m_(n):g_(n)),i.property==="style"){let s=typeof n=="object"?n:CD(e,String(n));return e.stylePropertyNameCase==="css"&&(s=ND(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&i.space?t5[i.property]||i.property:i.attribute,n]}}function CD(e,t){try{return dD(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,s=new un("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=o3+"#cannot-parse-style-attribute",s}}function f3(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let l=-1,o;for(;++l<s.length;){const d=QE(s[l])?{type:"Identifier",name:s[l]}:{type:"Literal",value:s[l]};o=o?{type:"MemberExpression",object:o,property:d,computed:!!(l&&d.type==="Literal"),optional:!1}:d}i=o}else i=QE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const s=i.value;return Hm.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(i);Ru(e)}function Ru(e,t){const n=new un("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=o3+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ND(e){const t={};let n;for(n in e)Hm.call(e,n)&&(t[RD(n)]=e[n]);return t}function RD(e){let t=e.replace(hD,OD);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function OD(e){return"-"+e.toLowerCase()}const R0={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"]},LD={tokenize:MD};function MD(e){const t=e.attempt(this.parser.constructs.contentInitial,i,s);let n;return t;function i(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ke(e,t,"linePrefix")}function s(d){return e.enter("paragraph"),l(d)}function l(d){const h=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=h),n=h,o(d)}function o(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Ne(d)?(e.consume(d),e.exit("chunkText"),l):(e.consume(d),o)}}const ID={tokenize:DD},rx={tokenize:BD};function DD(e){const t=this,n=[];let i=0,s,l,o;return d;function d(P){if(i<n.length){const V=n[i];return t.containerState=V[1],e.attempt(V[0].continuation,h,f)(P)}return f(P)}function h(P){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&j();const V=t.events.length;let J=V,H;for(;J--;)if(t.events[J][0]==="exit"&&t.events[J][1].type==="chunkFlow"){H=t.events[J][1].end;break}k(i);let ne=V;for(;ne<t.events.length;)t.events[ne][1].end={...H},ne++;return Vn(t.events,J+1,0,t.events.slice(V)),t.events.length=ne,f(P)}return d(P)}function f(P){if(i===n.length){if(!s)return x(P);if(s.currentConstruct&&s.currentConstruct.concrete)return T(P);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(rx,m,b)(P)}function m(P){return s&&j(),k(i),x(P)}function b(P){return t.parser.lazy[t.now().line]=i!==n.length,o=t.now().offset,T(P)}function x(P){return t.containerState={},e.attempt(rx,E,T)(P)}function E(P){return i++,n.push([t.currentConstruct,t.containerState]),x(P)}function T(P){if(P===null){s&&j(),k(0),e.consume(P);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:l}),w(P)}function w(P){if(P===null){S(e.exit("chunkFlow"),!0),k(0),e.consume(P);return}return Ne(P)?(e.consume(P),S(e.exit("chunkFlow")),i=0,t.interrupt=void 0,d):(e.consume(P),w)}function S(P,V){const J=t.sliceStream(P);if(V&&J.push(null),P.previous=l,l&&(l.next=P),l=P,s.defineSkip(P.start),s.write(J),t.parser.lazy[P.start.line]){let H=s.events.length;for(;H--;)if(s.events[H][1].start.offset<o&&(!s.events[H][1].end||s.events[H][1].end.offset>o))return;const ne=t.events.length;let te=ne,fe,z;for(;te--;)if(t.events[te][0]==="exit"&&t.events[te][1].type==="chunkFlow"){if(fe){z=t.events[te][1].end;break}fe=!0}for(k(i),H=ne;H<t.events.length;)t.events[H][1].end={...z},H++;Vn(t.events,te+1,0,t.events.slice(ne)),t.events.length=H}}function k(P){let V=n.length;for(;V-- >P;){const J=n[V];t.containerState=J[1],J[0].exit.call(t,e)}n.length=P}function j(){s.write([null]),l=void 0,s=void 0,t.containerState._closeFlow=void 0}}function BD(e,t,n){return Ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const zD={tokenize:PD};function PD(e){const t=this,n=e.attempt(Vu,i,e.attempt(this.parser.constructs.flowInitial,s,Ke(e,e.attempt(this.parser.constructs.flow,s,e.attempt($O,s)),"linePrefix")));return n;function i(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const HD={resolveAll:p3()},UD=h3("string"),jD=h3("text");function h3(e){return{resolveAll:p3(e==="text"?FD:void 0),tokenize:t};function t(n){const i=this,s=this.parser.constructs[e],l=n.attempt(s,o,d);return o;function o(m){return f(m)?l(m):d(m)}function d(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),h}function h(m){return f(m)?(n.exit("data"),l(m)):(n.consume(m),h)}function f(m){if(m===null)return!0;const b=s[m];let x=-1;if(b)for(;++x<b.length;){const E=b[x];if(!E.previous||E.previous.call(i,i.previous))return!0}return!1}}}function p3(e){return t;function t(n,i){let s=-1,l;for(;++s<=n.length;)l===void 0?n[s]&&n[s][1].type==="data"&&(l=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==l+2&&(n[l][1].end=n[s-1][1].end,n.splice(l+2,s-l-2),s=l+2),l=void 0);return e?e(n,i):n}}function FD(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],s=t.sliceStream(i);let l=s.length,o=-1,d=0,h;for(;l--;){const f=s[l];if(typeof f=="string"){for(o=f.length;f.charCodeAt(o-1)===32;)d++,o--;if(o)break;o=-1}else if(f===-2)h=!0,d++;else if(f!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const f={type:n===e.length||h||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:i.start._bufferIndex+o,_index:i.start._index+l,line:i.end.line,column:i.end.column-d,offset:i.end.offset-d},end:{...i.end}};i.end={...f.start},i.start.offset===i.end.offset?Object.assign(i,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const $D={42:wn,43:wn,45:wn,48:wn,49:wn,50:wn,51:wn,52:wn,53:wn,54:wn,55:wn,56:wn,57:wn,62:OT},qD={91:WO},YD={[-2]:S0,[-1]:S0,32:S0},VD={35:eL,42:Uc,45:[BE,Uc],60:iL,61:BE,95:Uc,96:IE,126:IE},GD={38:MT,92:LT},WD={[-5]:w0,[-4]:w0,[-3]:w0,33:_L,38:MT,42:Bp,60:[AO,dL],91:AL,92:[ZO,LT],93:Im,95:Bp,96:zO},QD={null:[Bp,HD]},XD={null:[42,95]},KD={null:[]},ZD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:XD,contentInitial:qD,disable:KD,document:$D,flow:VD,flowInitial:YD,insideSpan:QD,string:GD,text:WD},Symbol.toStringTag,{value:"Module"}));function JD(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},l=[];let o=[],d=[];const h={attempt:ne(J),check:ne(H),consume:j,enter:P,exit:V,interrupt:ne(H,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:T,parser:e,previous:null,sliceSerialize:x,sliceStream:E,write:b};let m=t.tokenize.call(f,h);return t.resolveAll&&l.push(t),f;function b($){return o=ur(o,$),S(),o[o.length-1]!==null?[]:(te(t,0),f.events=Sd(l,f.events,f),f.events)}function x($,Y){return t7(E($),Y)}function E($){return e7(o,$)}function T(){const{_bufferIndex:$,_index:Y,line:_e,column:ce,offset:ue}=i;return{_bufferIndex:$,_index:Y,line:_e,column:ce,offset:ue}}function w($){s[$.line]=$.column,z()}function S(){let $;for(;i._index<o.length;){const Y=o[i._index];if(typeof Y=="string")for($=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===$&&i._bufferIndex<Y.length;)k(Y.charCodeAt(i._bufferIndex));else k(Y)}}function k($){m=m($)}function j($){Ne($)?(i.line++,i.column=1,i.offset+=$===-3?2:1,z()):$!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===o[i._index].length&&(i._bufferIndex=-1,i._index++)),f.previous=$}function P($,Y){const _e=Y||{};return _e.type=$,_e.start=T(),f.events.push(["enter",_e,f]),d.push(_e),_e}function V($){const Y=d.pop();return Y.end=T(),f.events.push(["exit",Y,f]),Y}function J($,Y){te($,Y.from)}function H($,Y){Y.restore()}function ne($,Y){return _e;function _e(ce,ue,I){let ie,Ee,ke,R;return Array.isArray(ce)?ee(ce):"tokenize"in ce?ee([ce]):D(ce);function D(ye){return Re;function Re(Je){const Le=Je!==null&&ye[Je],Gt=Je!==null&&ye.null,Wt=[...Array.isArray(Le)?Le:Le?[Le]:[],...Array.isArray(Gt)?Gt:Gt?[Gt]:[]];return ee(Wt)(Je)}}function ee(ye){return ie=ye,Ee=0,ye.length===0?I:O(ye[Ee])}function O(ye){return Re;function Re(Je){return R=fe(),ke=ye,ye.partial||(f.currentConstruct=ye),ye.name&&f.parser.constructs.disable.null.includes(ye.name)?be():ye.tokenize.call(Y?Object.assign(Object.create(f),Y):f,h,F,be)(Je)}}function F(ye){return $(ke,R),ue}function be(ye){return R.restore(),++Ee<ie.length?O(ie[Ee]):I}}}function te($,Y){$.resolveAll&&!l.includes($)&&l.push($),$.resolve&&Vn(f.events,Y,f.events.length-Y,$.resolve(f.events.slice(Y),f)),$.resolveTo&&(f.events=$.resolveTo(f.events,f))}function fe(){const $=T(),Y=f.previous,_e=f.currentConstruct,ce=f.events.length,ue=Array.from(d);return{from:ce,restore:I};function I(){i=$,f.previous=Y,f.currentConstruct=_e,f.events.length=ce,d=ue,z()}}function z(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function e7(e,t){const n=t.start._index,i=t.start._bufferIndex,s=t.end._index,l=t.end._bufferIndex;let o;if(n===s)o=[e[n].slice(i,l)];else{if(o=e.slice(n,s),i>-1){const d=o[0];typeof d=="string"?o[0]=d.slice(i):o.shift()}l>0&&o.push(e[s].slice(0,l))}return o}function t7(e,t){let n=-1;const i=[];let s;for(;++n<e.length;){const l=e[n];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
|
|
57
|
-
`;break}case-3:{o=`\r
|
|
58
|
-
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&s)continue;o=" ";break}default:o=String.fromCharCode(l)}s=l===-2,i.push(o)}return i.join("")}function n7(e){const i={constructs:_T([ZD,...(e||{}).extensions||[]]),content:s(LD),defined:[],document:s(ID),flow:s(zD),lazy:{},string:s(UD),text:s(jD)};return i;function s(l){return o;function o(d){return JD(i,l,d)}}}function r7(e){for(;!IT(e););return e}const ix=/[\0\t\n\r]/g;function i7(){let e=1,t="",n=!0,i;return s;function s(l,o,d){const h=[];let f,m,b,x,E;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),b=0,t="",n&&(l.charCodeAt(0)===65279&&b++,n=void 0);b<l.length;){if(ix.lastIndex=b,f=ix.exec(l),x=f&&f.index!==void 0?f.index:l.length,E=l.charCodeAt(x),!f){t=l.slice(b);break}if(E===10&&b===x&&i)h.push(-3),i=void 0;else switch(i&&(h.push(-5),i=void 0),b<x&&(h.push(l.slice(b,x)),e+=x-b),E){case 0:{h.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,h.push(-2);e++<m;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:i=!0,e=1}b=x+1}return d&&(i&&h.push(-5),t&&h.push(t),h.push(null)),h}}const m3={}.hasOwnProperty;function a7(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),s7(n)(r7(n7(n).document().write(i7()(e,t,!0))))}function s7(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(jt),autolinkProtocol:fe,autolinkEmail:fe,atxHeading:l(_r),blockQuote:l(Gt),characterEscape:fe,characterReference:fe,codeFenced:l(Wt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(Wt,o),codeText:l(Ln,o),codeTextData:fe,data:fe,codeFlowValue:fe,definition:l(dr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(Qt),hardBreakEscape:l(di),hardBreakTrailing:l(di),htmlFlow:l(Ue,o),htmlFlowData:fe,htmlText:l(Ue,o),htmlTextData:fe,image:l(ot),label:o,link:l(jt),listItem:l(fr),listItemValue:x,listOrdered:l(on,b),listUnordered:l(on),paragraph:l(jd),reference:O,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(_r),strong:l(Fd),thematicBreak:l($d)},exit:{atxHeading:h(),atxHeadingSequence:J,autolink:h(),autolinkEmail:Le,autolinkProtocol:Je,blockQuote:h(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:ye,characterReference:Re,codeFenced:h(S),codeFencedFence:w,codeFencedFenceInfo:E,codeFencedFenceMeta:T,codeFlowValue:z,codeIndented:h(k),codeText:h(ue),codeTextData:z,data:z,definition:h(),definitionDestinationString:V,definitionLabelString:j,definitionTitleString:P,emphasis:h(),hardBreakEscape:h(Y),hardBreakTrailing:h(Y),htmlFlow:h(_e),htmlFlowData:z,htmlText:h(ce),htmlTextData:z,image:h(ie),label:ke,labelText:Ee,lineEnding:$,link:h(I),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:F,resourceDestinationString:R,resourceTitleString:D,resource:ee,setextHeading:h(te),setextHeadingLineSequence:ne,setextHeadingText:H,strong:h(),thematicBreak:h()}};g3(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(se){let xe={type:"root",children:[]};const Ie={stack:[xe],tokenStack:[],config:t,enter:d,exit:f,buffer:o,resume:m,data:n},qe=[];let it=-1;for(;++it<se.length;)if(se[it][1].type==="listOrdered"||se[it][1].type==="listUnordered")if(se[it][0]==="enter")qe.push(it);else{const Mn=qe.pop();it=s(se,Mn,it)}for(it=-1;++it<se.length;){const Mn=t[se[it][0]];m3.call(Mn,se[it][1].type)&&Mn[se[it][1].type].call(Object.assign({sliceSerialize:se[it][2].sliceSerialize},Ie),se[it][1])}if(Ie.tokenStack.length>0){const Mn=Ie.tokenStack[Ie.tokenStack.length-1];(Mn[1]||ax).call(Ie,void 0,Mn[0])}for(xe.position={start:Hi(se.length>0?se[0][1].start:{line:1,column:1,offset:0}),end:Hi(se.length>0?se[se.length-2][1].end:{line:1,column:1,offset:0})},it=-1;++it<t.transforms.length;)xe=t.transforms[it](xe)||xe;return xe}function s(se,xe,Ie){let qe=xe-1,it=-1,Mn=!1,Pr,dn,zt,gn;for(;++qe<=Ie;){const pt=se[qe];switch(pt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pt[0]==="enter"?it++:it--,gn=void 0;break}case"lineEndingBlank":{pt[0]==="enter"&&(Pr&&!gn&&!it&&!zt&&(zt=qe),gn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:gn=void 0}if(!it&&pt[0]==="enter"&&pt[1].type==="listItemPrefix"||it===-1&&pt[0]==="exit"&&(pt[1].type==="listUnordered"||pt[1].type==="listOrdered")){if(Pr){let fi=qe;for(dn=void 0;fi--;){const hr=se[fi];if(hr[1].type==="lineEnding"||hr[1].type==="lineEndingBlank"){if(hr[0]==="exit")continue;dn&&(se[dn][1].type="lineEndingBlank",Mn=!0),hr[1].type="lineEnding",dn=fi}else if(!(hr[1].type==="linePrefix"||hr[1].type==="blockQuotePrefix"||hr[1].type==="blockQuotePrefixWhitespace"||hr[1].type==="blockQuoteMarker"||hr[1].type==="listItemIndent"))break}zt&&(!dn||zt<dn)&&(Pr._spread=!0),Pr.end=Object.assign({},dn?se[dn][1].start:pt[1].end),se.splice(dn||qe,0,["exit",Pr,pt[2]]),qe++,Ie++}if(pt[1].type==="listItemPrefix"){const fi={type:"listItem",_spread:!1,start:Object.assign({},pt[1].start),end:void 0};Pr=fi,se.splice(qe,0,["enter",fi,pt[2]]),qe++,Ie++,zt=void 0,gn=!0}}}return se[xe][1]._spread=Mn,Ie}function l(se,xe){return Ie;function Ie(qe){d.call(this,se(qe),qe),xe&&xe.call(this,qe)}}function o(){this.stack.push({type:"fragment",children:[]})}function d(se,xe,Ie){this.stack[this.stack.length-1].children.push(se),this.stack.push(se),this.tokenStack.push([xe,Ie||void 0]),se.position={start:Hi(xe.start),end:void 0}}function h(se){return xe;function xe(Ie){se&&se.call(this,Ie),f.call(this,Ie)}}function f(se,xe){const Ie=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==se.type&&(xe?xe.call(this,se,qe[0]):(qe[1]||ax).call(this,se,qe[0]));else throw new Error("Cannot close `"+se.type+"` ("+Tu({start:se.start,end:se.end})+"): it’s not open");Ie.position.end=Hi(se.end)}function m(){return Rm(this.stack.pop())}function b(){this.data.expectingFirstListItemValue=!0}function x(se){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(se),10),this.data.expectingFirstListItemValue=void 0}}function E(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=se}function T(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=se}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.value=se.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.value=se.replace(/(\r?\n|\r)$/g,"")}function j(se){const xe=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=xe,Ie.identifier=yr(this.sliceSerialize(se)).toLowerCase()}function P(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.title=se}function V(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.url=se}function J(se){const xe=this.stack[this.stack.length-1];if(!xe.depth){const Ie=this.sliceSerialize(se).length;xe.depth=Ie}}function H(){this.data.setextHeadingSlurpLineEnding=!0}function ne(se){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(se).codePointAt(0)===61?1:2}function te(){this.data.setextHeadingSlurpLineEnding=void 0}function fe(se){const Ie=this.stack[this.stack.length-1].children;let qe=Ie[Ie.length-1];(!qe||qe.type!=="text")&&(qe=cn(),qe.position={start:Hi(se.start),end:void 0},Ie.push(qe)),this.stack.push(qe)}function z(se){const xe=this.stack.pop();xe.value+=this.sliceSerialize(se),xe.position.end=Hi(se.end)}function $(se){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ie=xe.children[xe.children.length-1];Ie.position.end=Hi(se.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(fe.call(this,se),z.call(this,se))}function Y(){this.data.atHardBreak=!0}function _e(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.value=se}function ce(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.value=se}function ue(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.value=se}function I(){const se=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";se.type+="Reference",se.referenceType=xe,delete se.url,delete se.title}else delete se.identifier,delete se.label;this.data.referenceType=void 0}function ie(){const se=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";se.type+="Reference",se.referenceType=xe,delete se.url,delete se.title}else delete se.identifier,delete se.label;this.data.referenceType=void 0}function Ee(se){const xe=this.sliceSerialize(se),Ie=this.stack[this.stack.length-2];Ie.label=W9(xe),Ie.identifier=yr(xe).toLowerCase()}function ke(){const se=this.stack[this.stack.length-1],xe=this.resume(),Ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ie.type==="link"){const qe=se.children;Ie.children=qe}else Ie.alt=xe}function R(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.url=se}function D(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.title=se}function ee(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function F(se){const xe=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=xe,Ie.identifier=yr(this.sliceSerialize(se)).toLowerCase(),this.data.referenceType="full"}function be(se){this.data.characterReferenceType=se.type}function ye(se){const xe=this.sliceSerialize(se),Ie=this.data.characterReferenceType;let qe;Ie?(qe=vT(xe,Ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=Lm(xe);const it=this.stack[this.stack.length-1];it.value+=qe}function Re(se){const xe=this.stack.pop();xe.position.end=Hi(se.end)}function Je(se){z.call(this,se);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(se)}function Le(se){z.call(this,se);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(se)}function Gt(){return{type:"blockquote",children:[]}}function Wt(){return{type:"code",lang:null,meta:null,value:""}}function Ln(){return{type:"inlineCode",value:""}}function dr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Qt(){return{type:"emphasis",children:[]}}function _r(){return{type:"heading",depth:0,children:[]}}function di(){return{type:"break"}}function Ue(){return{type:"html",value:""}}function ot(){return{type:"image",title:null,url:"",alt:null}}function jt(){return{type:"link",title:null,url:"",children:[]}}function on(se){return{type:"list",ordered:se.type==="listOrdered",start:null,spread:se._spread,children:[]}}function fr(se){return{type:"listItem",spread:se._spread,checked:null,children:[]}}function jd(){return{type:"paragraph",children:[]}}function Fd(){return{type:"strong",children:[]}}function cn(){return{type:"text",value:""}}function $d(){return{type:"thematicBreak"}}}function Hi(e){return{line:e.line,column:e.column,offset:e.offset}}function g3(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?g3(e,i):l7(e,i)}}function l7(e,t){let n;for(n in t)if(m3.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function ax(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Tu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Tu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Tu({start:t.start,end:t.end})+") is still open")}function u7(e){const t=this;t.parser=n;function n(i){return a7(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function o7(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function c7(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
59
|
-
`}]}function d7(e,t){const n=t.value?t.value+`
|
|
60
|
-
`:"",i={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(i.className=["language-"+s[0]]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function f7(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function h7(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function p7(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),s=Xs(i.toLowerCase()),l=e.footnoteOrder.indexOf(i);let o,d=e.footnoteCounts.get(i);d===void 0?(d=0,e.footnoteOrder.push(i),o=e.footnoteOrder.length):o=l+1,d+=1,e.footnoteCounts.set(i,d);const h={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,h);const f={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,f),e.applyData(t,f)}function m7(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function g7(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function b3(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const s=e.all(t),l=s[0];l&&l.type==="text"?l.value="["+l.value:s.unshift({type:"text",value:"["});const o=s[s.length-1];return o&&o.type==="text"?o.value+=i:s.push({type:"text",value:i}),s}function b7(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return b3(e,t);const s={src:Xs(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(s.title=i.title);const l={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,l),e.applyData(t,l)}function y7(e,t){const n={src:Xs(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function E7(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function x7(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return b3(e,t);const s={href:Xs(i.url||"")};i.title!==null&&i.title!==void 0&&(s.title=i.title);const l={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function v7(e,t){const n={href:Xs(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function _7(e,t,n){const i=e.all(t),s=n?T7(n):y3(t),l={},o=[];if(typeof t.checked=="boolean"){const m=i[0];let b;m&&m.type==="element"&&m.tagName==="p"?b=m:(b={type:"element",tagName:"p",properties:{},children:[]},i.unshift(b)),b.children.length>0&&b.children.unshift({type:"text",value:" "}),b.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let d=-1;for(;++d<i.length;){const m=i[d];(s||d!==0||m.type!=="element"||m.tagName!=="p")&&o.push({type:"text",value:`
|
|
61
|
-
`}),m.type==="element"&&m.tagName==="p"&&!s?o.push(...m.children):o.push(m)}const h=i[i.length-1];h&&(s||h.type!=="element"||h.tagName!=="p")&&o.push({type:"text",value:`
|
|
62
|
-
`});const f={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,f),e.applyData(t,f)}function T7(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=y3(n[i])}return t}function y3(e){const t=e.spread;return t??e.children.length>1}function A7(e,t){const n={},i=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<i.length;){const o=i[s];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function S7(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function w7(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function k7(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function C7(e,t){const n=e.all(t),i=n.shift(),s=[];if(i){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],o),s.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=Br(t.children[1]),h=Td(t.children[t.children.length-1]);d&&h&&(o.position={start:d,end:h}),s.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)}function N7(e,t,n){const i=n?n.children:void 0,l=(i?i.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,d=o?o.length:t.children.length;let h=-1;const f=[];for(;++h<d;){const b=t.children[h],x={},E=o?o[h]:void 0;E&&(x.align=E);let T={type:"element",tagName:l,properties:x,children:[]};b&&(T.children=e.all(b),e.patch(b,T),T=e.applyData(b,T)),f.push(T)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,m),e.applyData(t,m)}function R7(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const sx=9,lx=32;function O7(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),s=0;const l=[];for(;i;)l.push(ux(t.slice(s,i.index),s>0,!0),i[0]),s=i.index+i[0].length,i=n.exec(t);return l.push(ux(t.slice(s),s>0,!1)),l.join("")}function ux(e,t,n){let i=0,s=e.length;if(t){let l=e.codePointAt(i);for(;l===sx||l===lx;)i++,l=e.codePointAt(i)}if(n){let l=e.codePointAt(s-1);for(;l===sx||l===lx;)s--,l=e.codePointAt(s-1)}return s>i?e.slice(i,s):""}function L7(e,t){const n={type:"text",value:O7(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function M7(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const I7={blockquote:o7,break:c7,code:d7,delete:f7,emphasis:h7,footnoteReference:p7,heading:m7,html:g7,imageReference:b7,image:y7,inlineCode:E7,linkReference:x7,link:v7,listItem:_7,list:A7,paragraph:S7,root:w7,strong:k7,table:C7,tableCell:R7,tableRow:N7,text:L7,thematicBreak:M7,toml:Tc,yaml:Tc,definition:Tc,footnoteDefinition:Tc};function Tc(){}function D7(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function B7(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function z7(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||D7,i=e.options.footnoteBackLabel||B7,s=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let h=-1;for(;++h<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[h]);if(!f)continue;const m=e.all(f),b=String(f.identifier).toUpperCase(),x=Xs(b.toLowerCase());let E=0;const T=[],w=e.footnoteCounts.get(b);for(;w!==void 0&&++E<=w;){T.length>0&&T.push({type:"text",value:" "});let j=typeof n=="string"?n:n(h,E);typeof j=="string"&&(j={type:"text",value:j}),T.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(E>1?"-"+E:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(h,E),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const S=m[m.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const j=S.children[S.children.length-1];j&&j.type==="text"?j.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...T)}else m.push(...T);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(m,!0)};e.patch(f,k),d.push(k)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...La(o),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
63
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
64
|
-
`}]}}const Hp={}.hasOwnProperty,P7={};function H7(e,t){const n=t||P7,i=new Map,s=new Map,l=new Map,o={...I7,...n.handlers},d={all:f,applyData:j7,definitionById:i,footnoteById:s,footnoteCounts:l,footnoteOrder:[],handlers:o,one:h,options:n,patch:U7,wrap:$7};return Dr(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const b=m.type==="definition"?i:s,x=String(m.identifier).toUpperCase();b.has(x)||b.set(x,m)}}),d;function h(m,b){const x=m.type,E=d.handlers[x];if(Hp.call(d.handlers,x)&&E)return E(d,m,b);if(d.options.passThrough&&d.options.passThrough.includes(x)){if("children"in m){const{children:w,...S}=m,k=La(S);return k.children=d.all(m),k}return La(m)}return(d.options.unknownHandler||F7)(d,m,b)}function f(m){const b=[];if("children"in m){const x=m.children;let E=-1;for(;++E<x.length;){const T=d.one(x[E],m);if(T){if(E&&x[E-1].type==="break"&&(!Array.isArray(T)&&T.type==="text"&&(T.value=ox(T.value)),!Array.isArray(T)&&T.type==="element")){const w=T.children[0];w&&w.type==="text"&&(w.value=ox(w.value))}Array.isArray(T)?b.push(...T):b.push(T)}}}return b}}function U7(e,t){e.position&&(t.position=X_(e))}function j7(e,t){let n=t;if(e&&e.data){const i=e.data.hName,s=e.data.hChildren,l=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const o="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:o}}n.type==="element"&&l&&Object.assign(n.properties,La(l)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function F7(e,t){const n=t.data||{},i="value"in t&&!(Hp.call(n,"hProperties")||Hp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function $7(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
|
|
65
|
-
`});++i<e.length;)i&&n.push({type:"text",value:`
|
|
66
|
-
`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
67
|
-
`}),n}function ox(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function cx(e,t){const n=H7(e,t),i=n.one(e,void 0),s=z7(n),l=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return s&&l.children.push({type:"text",value:`
|
|
68
|
-
`},s),l}function q7(e,t){return e&&"run"in e?async function(n,i){const s=cx(n,{file:i,...t});await e.run(s,i)}:function(n,i){return cx(n,{file:i,...e||t})}}function dx(e){if(e)throw e}var O0,fx;function Y7(){if(fx)return O0;fx=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},l=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var m=e.call(f,"constructor"),b=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!m&&!b)return!1;var x;for(x in f);return typeof x>"u"||e.call(f,x)},o=function(f,m){n&&m.name==="__proto__"?n(f,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):f[m.name]=m.newValue},d=function(f,m){if(m==="__proto__")if(e.call(f,m)){if(i)return i(f,m).value}else return;return f[m]};return O0=function h(){var f,m,b,x,E,T,w=arguments[0],S=1,k=arguments.length,j=!1;for(typeof w=="boolean"&&(j=w,w=arguments[1]||{},S=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});S<k;++S)if(f=arguments[S],f!=null)for(m in f)b=d(w,m),x=d(f,m),w!==x&&(j&&x&&(l(x)||(E=s(x)))?(E?(E=!1,T=b&&s(b)?b:[]):T=b&&l(b)?b:{},o(w,{name:m,newValue:h(j,T,x)})):typeof x<"u"&&o(w,{name:m,newValue:x}));return w},O0}var V7=Y7();const L0=Mu(V7);function Up(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function G7(){const e=[],t={run:n,use:i};return t;function n(...s){let l=-1;const o=s.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);d(null,...s);function d(h,...f){const m=e[++l];let b=-1;if(h){o(h);return}for(;++b<s.length;)(f[b]===null||f[b]===void 0)&&(f[b]=s[b]);s=f,m?W7(m,d)(...f):o(null,...f)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function W7(e,t){let n;return i;function i(...o){const d=e.length>o.length;let h;d&&o.push(s);try{h=e.apply(this,o)}catch(f){const m=f;if(d&&n)throw m;return s(m)}d||(h&&h.then&&typeof h.then=="function"?h.then(l,s):h instanceof Error?s(h):l(h))}function s(o,...d){n||(n=!0,t(o,...d))}function l(o){s(null,o)}}const Rr={basename:Q7,dirname:X7,extname:K7,join:Z7,sep:"/"};function Q7(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Gu(e);let n=0,i=-1,s=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else i<0&&(l=!0,i=s+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let o=-1,d=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else o<0&&(l=!0,o=s+1),d>-1&&(e.codePointAt(s)===t.codePointAt(d--)?d<0&&(i=s):(d=-1,i=o));return n===i?i=o:i<0&&(i=e.length),e.slice(n,i)}function X7(e){if(Gu(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function K7(e){Gu(e);let t=e.length,n=-1,i=0,s=-1,l=0,o;for(;t--;){const d=e.codePointAt(t);if(d===47){if(o){i=t+1;break}continue}n<0&&(o=!0,n=t+1),d===46?s<0?s=t:l!==1&&(l=1):s>-1&&(l=-1)}return s<0||n<0||l===0||l===1&&s===n-1&&s===i+1?"":e.slice(s,n)}function Z7(...e){let t=-1,n;for(;++t<e.length;)Gu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":J7(n)}function J7(e){Gu(e);const t=e.codePointAt(0)===47;let n=eB(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function eB(e,t){let n="",i=0,s=-1,l=0,o=-1,d,h;for(;++o<=e.length;){if(o<e.length)d=e.codePointAt(o);else{if(d===47)break;d=47}if(d===47){if(!(s===o-1||l===1))if(s!==o-1&&l===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(h=n.lastIndexOf("/"),h!==n.length-1){h<0?(n="",i=0):(n=n.slice(0,h),i=n.length-1-n.lastIndexOf("/")),s=o,l=0;continue}}else if(n.length>0){n="",i=0,s=o,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(s+1,o):n=e.slice(s+1,o),i=o-s-1;s=o,l=0}else d===46&&l>-1?l++:l=-1}return n}function Gu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tB={cwd:nB};function nB(){return"/"}function jp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function rB(e){if(typeof e=="string")e=new URL(e);else if(!jp(e)){const t=new 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(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return iB(e)}function iB(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const M0=["history","path","basename","stem","extname","dirname"];class aB{constructor(t){let n;t?jp(t)?n={path:t}:typeof t=="string"||sB(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":tB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<M0.length;){const l=M0[i];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let s;for(s in n)M0.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Rr.basename(this.path):void 0}set basename(t){D0(t,"basename"),I0(t,"basename"),this.path=Rr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Rr.dirname(this.path):void 0}set dirname(t){hx(this.basename,"dirname"),this.path=Rr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Rr.extname(this.path):void 0}set extname(t){if(I0(t,"extname"),hx(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Rr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){jp(t)&&(t=rB(t)),D0(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Rr.basename(this.path,this.extname):void 0}set stem(t){D0(t,"stem"),I0(t,"stem"),this.path=Rr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const s=this.message(t,n,i);throw s.fatal=!0,s}info(t,n,i){const s=this.message(t,n,i);return s.fatal=void 0,s}message(t,n,i){const s=new un(t,n,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function I0(e,t){if(e&&e.includes(Rr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Rr.sep+"`")}function D0(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function hx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function sB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lB=(function(e){const i=this.constructor.prototype,s=i[e],l=function(){return s.apply(l,arguments)};return Object.setPrototypeOf(l,i),l}),uB={}.hasOwnProperty;class Fm extends lB{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=G7()}copy(){const t=new Fm;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(L0(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(P0("data",this.frozen),this.namespace[t]=n,this):uB.call(this.namespace,t)&&this.namespace[t]||void 0:t?(P0("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=n.call(t,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ac(t),i=this.parser||this.Parser;return B0("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),B0("process",this.parser||this.Parser),z0("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(l,o){const d=Ac(t),h=i.parse(d);i.run(h,d,function(m,b,x){if(m||!b||!x)return f(m);const E=b,T=i.stringify(E,x);dB(T)?x.value=T:x.result=T,f(m,x)});function f(m,b){m||!b?o(m):l?l(b):n(void 0,b)}}}processSync(t){let n=!1,i;return this.freeze(),B0("processSync",this.parser||this.Parser),z0("processSync",this.compiler||this.Compiler),this.process(t,s),mx("processSync","process",n),i;function s(l,o){n=!0,dx(l),i=o}}run(t,n,i){px(t),this.freeze();const s=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?l(void 0,i):new Promise(l);function l(o,d){const h=Ac(n);s.run(t,h,f);function f(m,b,x){const E=b||t;m?d(m):o?o(E):i(void 0,E,x)}}}runSync(t,n){let i=!1,s;return this.run(t,n,l),mx("runSync","run",i),s;function l(o,d){dx(o),s=d,i=!0}}stringify(t,n){this.freeze();const i=Ac(n),s=this.compiler||this.Compiler;return z0("stringify",s),px(t),s(t,i)}use(t,...n){const i=this.attachers,s=this.namespace;if(P0("use",this.frozen),t!=null)if(typeof t=="function")h(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(f){if(typeof f=="function")h(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[m,...b]=f;h(m,b)}else o(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function o(f){if(!("plugins"in f)&&!("settings"in f))throw new 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");d(f.plugins),f.settings&&(s.settings=L0(!0,s.settings,f.settings))}function d(f){let m=-1;if(f!=null)if(Array.isArray(f))for(;++m<f.length;){const b=f[m];l(b)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function h(f,m){let b=-1,x=-1;for(;++b<i.length;)if(i[b][0]===f){x=b;break}if(x===-1)i.push([f,...m]);else if(m.length>0){let[E,...T]=m;const w=i[x][1];Up(w)&&Up(E)&&(E=L0(!0,w,E)),i[x]=[f,E,...T]}}}}const oB=new Fm().freeze();function B0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function z0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function P0(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function px(e){if(!Up(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function mx(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ac(e){return cB(e)?e:new aB(e)}function cB(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function dB(e){return typeof e=="string"||fB(e)}function fB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function $m(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ha=$m();function E3(e){Ha=e}var Aa={exec:()=>null};function Ze(e,t=""){let n=typeof e=="string"?e:e.source,i={replace:(s,l)=>{let o=typeof l=="string"?l:l.source;return o=o.replace(mn.caret,"$1"),n=n.replace(s,o),i},getRegex:()=>new RegExp(n,t)};return i}var hB=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),mn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},pB=/^(?:[ \t]*(?:\n|$))+/,mB=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,gB=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Wu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,bB=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,qm=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,x3=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,v3=Ze(x3).replace(/bull/g,qm).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),yB=Ze(x3).replace(/bull/g,qm).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ym=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,EB=/^[^\n]+/,Vm=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,xB=Ze(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Vm).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),vB=Ze(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,qm).getRegex(),kd="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Gm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,_B=Ze("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Gm).replace("tag",kd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_3=Ze(Ym).replace("hr",Wu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",kd).getRegex(),TB=Ze(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_3).getRegex(),Wm={blockquote:TB,code:mB,def:xB,fences:gB,heading:bB,hr:Wu,html:_B,lheading:v3,list:vB,newline:pB,paragraph:_3,table:Aa,text:EB},gx=Ze("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Wu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",kd).getRegex(),AB={...Wm,lheading:yB,table:gx,paragraph:Ze(Ym).replace("hr",Wu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",gx).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",kd).getRegex()},SB={...Wm,html:Ze(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Gm).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Aa,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ze(Ym).replace("hr",Wu).replace("heading",` *#{1,6} *[^
|
|
69
|
-
]`).replace("lheading",v3).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},wB=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,kB=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,T3=/^( {2,}|\\)\n(?!\s*$)/,CB=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Cd=/[\p{P}\p{S}]/u,Qm=/[\s\p{P}\p{S}]/u,A3=/[^\s\p{P}\p{S}]/u,NB=Ze(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Qm).getRegex(),S3=/(?!~)[\p{P}\p{S}]/u,RB=/(?!~)[\s\p{P}\p{S}]/u,OB=/(?:[^\s\p{P}\p{S}]|~)/u,w3=/(?![*_])[\p{P}\p{S}]/u,LB=/(?![*_])[\s\p{P}\p{S}]/u,MB=/(?:[^\s\p{P}\p{S}]|[*_])/u,IB=Ze(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",hB?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),k3=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,DB=Ze(k3,"u").replace(/punct/g,Cd).getRegex(),BB=Ze(k3,"u").replace(/punct/g,S3).getRegex(),C3="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",zB=Ze(C3,"gu").replace(/notPunctSpace/g,A3).replace(/punctSpace/g,Qm).replace(/punct/g,Cd).getRegex(),PB=Ze(C3,"gu").replace(/notPunctSpace/g,OB).replace(/punctSpace/g,RB).replace(/punct/g,S3).getRegex(),HB=Ze("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,A3).replace(/punctSpace/g,Qm).replace(/punct/g,Cd).getRegex(),UB=Ze(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,w3).getRegex(),jB="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",FB=Ze(jB,"gu").replace(/notPunctSpace/g,MB).replace(/punctSpace/g,LB).replace(/punct/g,w3).getRegex(),$B=Ze(/\\(punct)/,"gu").replace(/punct/g,Cd).getRegex(),qB=Ze(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),YB=Ze(Gm).replace("(?:-->|$)","-->").getRegex(),VB=Ze("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",YB).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),td=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,GB=Ze(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",td).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),N3=Ze(/^!?\[(label)\]\[(ref)\]/).replace("label",td).replace("ref",Vm).getRegex(),R3=Ze(/^!?\[(ref)\](?:\[\])?/).replace("ref",Vm).getRegex(),WB=Ze("reflink|nolink(?!\\()","g").replace("reflink",N3).replace("nolink",R3).getRegex(),bx=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Xm={_backpedal:Aa,anyPunctuation:$B,autolink:qB,blockSkip:IB,br:T3,code:kB,del:Aa,delLDelim:Aa,delRDelim:Aa,emStrongLDelim:DB,emStrongRDelimAst:zB,emStrongRDelimUnd:HB,escape:wB,link:GB,nolink:R3,punctuation:NB,reflink:N3,reflinkSearch:WB,tag:VB,text:CB,url:Aa},QB={...Xm,link:Ze(/^!?\[(label)\]\((.*?)\)/).replace("label",td).getRegex(),reflink:Ze(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",td).getRegex()},Fp={...Xm,emStrongRDelimAst:PB,emStrongLDelim:BB,delLDelim:UB,delRDelim:FB,url:Ze(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",bx).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ze(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",bx).getRegex()},XB={...Fp,br:Ze(T3).replace("{2,}","*").getRegex(),text:Ze(Fp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Sc={normal:Wm,gfm:AB,pedantic:SB},iu={normal:Xm,gfm:Fp,breaks:XB,pedantic:QB},KB={"&":"&","<":"<",">":">",'"':""","'":"'"},yx=e=>KB[e];function Nr(e,t){if(t){if(mn.escapeTest.test(e))return e.replace(mn.escapeReplace,yx)}else if(mn.escapeTestNoEncode.test(e))return e.replace(mn.escapeReplaceNoEncode,yx);return e}function Ex(e){try{e=encodeURI(e).replace(mn.percentDecode,"%")}catch{return null}return e}function xx(e,t){let n=e.replace(mn.findPipe,(l,o,d)=>{let h=!1,f=o;for(;--f>=0&&d[f]==="\\";)h=!h;return h?"|":" |"}),i=n.split(mn.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(mn.slashPipe,"|");return i}function au(e,t,n){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function ZB(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&(n--,n<0))return i;return n>0?-2:-1}function JB(e,t=0){let n=t,i="";for(let s of e)if(s===" "){let l=4-n%4;i+=" ".repeat(l),n+=l}else i+=s,n++;return i}function vx(e,t,n,i,s){let l=t.href,o=t.title||null,d=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let h={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:l,title:o,text:d,tokens:i.inlineTokens(d)};return i.state.inLink=!1,h}function ez(e,t,n){let i=e.match(n.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
70
|
-
`).map(l=>{let o=l.match(n.other.beginningSpace);if(o===null)return l;let[d]=o;return d.length>=s.length?l.slice(s.length):l}).join(`
|
|
71
|
-
`)}var nd=class{options;rules;lexer;constructor(t){this.options=t||Ha}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let i=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:au(i,`
|
|
72
|
-
`)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let i=n[0],s=ez(i,n[3]||"",this.rules);return{type:"code",raw:i,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:s}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let i=n[2].trim();if(this.rules.other.endingHash.test(i)){let s=au(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:au(n[0],`
|
|
73
|
-
`)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let i=au(n[0],`
|
|
74
|
-
`).split(`
|
|
75
|
-
`),s="",l="",o=[];for(;i.length>0;){let d=!1,h=[],f;for(f=0;f<i.length;f++)if(this.rules.other.blockquoteStart.test(i[f]))h.push(i[f]),d=!0;else if(!d)h.push(i[f]);else break;i=i.slice(f);let m=h.join(`
|
|
76
|
-
`),b=m.replace(this.rules.other.blockquoteSetextReplace,`
|
|
77
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
78
|
-
${m}`:m,l=l?`${l}
|
|
79
|
-
${b}`:b;let x=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,o,!0),this.lexer.state.top=x,i.length===0)break;let E=o.at(-1);if(E?.type==="code")break;if(E?.type==="blockquote"){let T=E,w=T.raw+`
|
|
80
|
-
`+i.join(`
|
|
81
|
-
`),S=this.blockquote(w);o[o.length-1]=S,s=s.substring(0,s.length-T.raw.length)+S.raw,l=l.substring(0,l.length-T.text.length)+S.text;break}else if(E?.type==="list"){let T=E,w=T.raw+`
|
|
82
|
-
`+i.join(`
|
|
83
|
-
`),S=this.list(w);o[o.length-1]=S,s=s.substring(0,s.length-E.raw.length)+S.raw,l=l.substring(0,l.length-T.raw.length)+S.raw,i=w.substring(o.at(-1).raw.length).split(`
|
|
84
|
-
`);continue}}return{type:"blockquote",raw:s,tokens:o,text:l}}}list(t){let n=this.rules.block.list.exec(t);if(n){let i=n[1].trim(),s=i.length>1,l={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),d=!1;for(;t;){let f=!1,m="",b="";if(!(n=o.exec(t))||this.rules.block.hr.test(t))break;m=n[0],t=t.substring(m.length);let x=JB(n[2].split(`
|
|
85
|
-
`,1)[0],n[1].length),E=t.split(`
|
|
86
|
-
`,1)[0],T=!x.trim(),w=0;if(this.options.pedantic?(w=2,b=x.trimStart()):T?w=n[1].length+1:(w=x.search(this.rules.other.nonSpaceChar),w=w>4?1:w,b=x.slice(w),w+=n[1].length),T&&this.rules.other.blankLine.test(E)&&(m+=E+`
|
|
87
|
-
`,t=t.substring(E.length+1),f=!0),!f){let S=this.rules.other.nextBulletRegex(w),k=this.rules.other.hrRegex(w),j=this.rules.other.fencesBeginRegex(w),P=this.rules.other.headingBeginRegex(w),V=this.rules.other.htmlBeginRegex(w),J=this.rules.other.blockquoteBeginRegex(w);for(;t;){let H=t.split(`
|
|
88
|
-
`,1)[0],ne;if(E=H,this.options.pedantic?(E=E.replace(this.rules.other.listReplaceNesting," "),ne=E):ne=E.replace(this.rules.other.tabCharGlobal," "),j.test(E)||P.test(E)||V.test(E)||J.test(E)||S.test(E)||k.test(E))break;if(ne.search(this.rules.other.nonSpaceChar)>=w||!E.trim())b+=`
|
|
89
|
-
`+ne.slice(w);else{if(T||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||j.test(x)||P.test(x)||k.test(x))break;b+=`
|
|
90
|
-
`+E}T=!E.trim(),m+=H+`
|
|
91
|
-
`,t=t.substring(H.length+1),x=ne.slice(w)}}l.loose||(d?l.loose=!0:this.rules.other.doubleBlankLine.test(m)&&(d=!0)),l.items.push({type:"list_item",raw:m,task:!!this.options.gfm&&this.rules.other.listIsTask.test(b),loose:!1,text:b,tokens:[]}),l.raw+=m}let h=l.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let f of l.items){if(this.lexer.state.top=!1,f.tokens=this.lexer.blockTokens(f.text,[]),f.task){if(f.text=f.text.replace(this.rules.other.listReplaceTask,""),f.tokens[0]?.type==="text"||f.tokens[0]?.type==="paragraph"){f.tokens[0].raw=f.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),f.tokens[0].text=f.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let b=this.lexer.inlineQueue.length-1;b>=0;b--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[b].src)){this.lexer.inlineQueue[b].src=this.lexer.inlineQueue[b].src.replace(this.rules.other.listReplaceTask,"");break}}let m=this.rules.other.listTaskCheckbox.exec(f.raw);if(m){let b={type:"checkbox",raw:m[0]+" ",checked:m[0]!=="[ ]"};f.checked=b.checked,l.loose?f.tokens[0]&&["paragraph","text"].includes(f.tokens[0].type)&&"tokens"in f.tokens[0]&&f.tokens[0].tokens?(f.tokens[0].raw=b.raw+f.tokens[0].raw,f.tokens[0].text=b.raw+f.tokens[0].text,f.tokens[0].tokens.unshift(b)):f.tokens.unshift({type:"paragraph",raw:b.raw,text:b.raw,tokens:[b]}):f.tokens.unshift(b)}}if(!l.loose){let m=f.tokens.filter(x=>x.type==="space"),b=m.length>0&&m.some(x=>this.rules.other.anyLine.test(x.raw));l.loose=b}}if(l.loose)for(let f of l.items){f.loose=!0;for(let m of f.tokens)m.type==="text"&&(m.type="paragraph")}return l}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let i=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:i,raw:n[0],href:s,title:l}}}table(t){let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let i=xx(n[1]),s=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=n[3]?.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
92
|
-
`):[],o={type:"table",raw:n[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let d of s)this.rules.other.tableAlignRight.test(d)?o.align.push("right"):this.rules.other.tableAlignCenter.test(d)?o.align.push("center"):this.rules.other.tableAlignLeft.test(d)?o.align.push("left"):o.align.push(null);for(let d=0;d<i.length;d++)o.header.push({text:i[d],tokens:this.lexer.inline(i[d]),header:!0,align:o.align[d]});for(let d of l)o.rows.push(xx(d,o.header.length).map((h,f)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:o.align[f]})));return o}}lheading(t){let n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){let n=this.rules.block.paragraph.exec(t);if(n){let i=n[1].charAt(n[1].length-1)===`
|
|
93
|
-
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let i=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=au(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=ZB(n[2],"()");if(o===-2)return;if(o>-1){let d=(n[0].indexOf("!")===0?5:4)+n[1].length+o;n[2]=n[2].substring(0,o),n[0]=n[0].substring(0,d).trim(),n[3]=""}}let s=n[2],l="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],l=o[3])}else l=n[3]?n[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),vx(n,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=n[s.toLowerCase()];if(!l){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return vx(i,l,i[0],this.lexer,this.rules)}}emStrong(t,n,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let l=[...s[0]].length-1,o,d,h=l,f=0,m=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,n=n.slice(-1*t.length+l);(s=m.exec(n))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(d=[...o].length,s[3]||s[4]){h+=d;continue}else if((s[5]||s[6])&&l%3&&!((l+d)%3)){f+=d;continue}if(h-=d,h>0)continue;d=Math.min(d,d+h+f);let b=[...s[0]][0].length,x=t.slice(0,l+s.index+b+d);if(Math.min(l,d)%2){let T=x.slice(1,-1);return{type:"em",raw:x,text:T,tokens:this.lexer.inlineTokens(T)}}let E=x.slice(2,-2);return{type:"strong",raw:x,text:E,tokens:this.lexer.inlineTokens(E)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let i=n[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),l=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&l&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:n[0],text:i}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t,n,i=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!i||this.rules.inline.punctuation.exec(i))){let l=[...s[0]].length-1,o,d,h=l,f=this.rules.inline.delRDelim;for(f.lastIndex=0,n=n.slice(-1*t.length+l);(s=f.exec(n))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o||(d=[...o].length,d!==l))continue;if(s[3]||s[4]){h+=d;continue}if(h-=d,h>0)continue;d=Math.min(d,d+h);let m=[...s[0]][0].length,b=t.slice(0,l+s.index+m+d),x=b.slice(l,-l);return{type:"del",raw:b,text:x,tokens:this.lexer.inlineTokens(x)}}}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let i,s;return n[2]==="@"?(i=n[1],s="mailto:"+i):(i=n[1],s=i),{type:"link",raw:n[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let i,s;if(n[2]==="@")i=n[0],s="mailto:"+i;else{let l;do l=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(l!==n[0]);i=n[0],n[1]==="www."?s="http://"+n[0]:s=n[0]}return{type:"link",raw:n[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let i=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:i}}}},or=class $p{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ha,this.options.tokenizer=this.options.tokenizer||new nd,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:mn,block:Sc.normal,inline:iu.normal};this.options.pedantic?(n.block=Sc.pedantic,n.inline=iu.pedantic):this.options.gfm&&(n.block=Sc.gfm,this.options.breaks?n.inline=iu.breaks:n.inline=iu.gfm),this.tokenizer.rules=n}static get rules(){return{block:Sc,inline:iu}}static lex(t,n){return new $p(n).lex(t)}static lexInline(t,n){return new $p(n).inlineTokens(t)}lex(t){t=t.replace(mn.carriageReturn,`
|
|
94
|
-
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],i=!1){for(this.options.pedantic&&(t=t.replace(mn.tabCharGlobal," ").replace(mn.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(o=>(s=o.call({lexer:this},t,n))?(t=t.substring(s.raw.length),n.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let o=n.at(-1);s.raw.length===1&&o!==void 0?o.raw+=`
|
|
95
|
-
`:n.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
96
|
-
`)?"":`
|
|
97
|
-
`)+s.raw,o.text+=`
|
|
98
|
-
`+s.text,this.inlineQueue.at(-1).src=o.text):n.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
99
|
-
`)?"":`
|
|
100
|
-
`)+s.raw,o.text+=`
|
|
101
|
-
`+s.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},n.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),n.push(s);continue}let l=t;if(this.options.extensions?.startBlock){let o=1/0,d=t.slice(1),h;this.options.extensions.startBlock.forEach(f=>{h=f.call({lexer:this},d),typeof h=="number"&&h>=0&&(o=Math.min(o,h))}),o<1/0&&o>=0&&(l=t.substring(0,o+1))}if(this.state.top&&(s=this.tokenizer.paragraph(l))){let o=n.at(-1);i&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
|
|
102
|
-
`)?"":`
|
|
103
|
-
`)+s.raw,o.text+=`
|
|
104
|
-
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(s),i=l.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let o=n.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
105
|
-
`)?"":`
|
|
106
|
-
`)+s.raw,o.text+=`
|
|
107
|
-
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(s);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let i=t,s=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)h.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)l=s[2]?s[2].length:0,i=i.slice(0,s.index+l)+"["+"a".repeat(s[0].length-l-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let o=!1,d="";for(;t;){o||(d=""),o=!1;let h;if(this.options.extensions?.inline?.some(m=>(h=m.call({lexer:this},t,n))?(t=t.substring(h.raw.length),n.push(h),!0):!1))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);let m=n.at(-1);h.type==="text"&&m?.type==="text"?(m.raw+=h.raw,m.text+=h.text):n.push(h);continue}if(h=this.tokenizer.emStrong(t,i,d)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.del(t,i,d)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),n.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),n.push(h);continue}let f=t;if(this.options.extensions?.startInline){let m=1/0,b=t.slice(1),x;this.options.extensions.startInline.forEach(E=>{x=E.call({lexer:this},b),typeof x=="number"&&x>=0&&(m=Math.min(m,x))}),m<1/0&&m>=0&&(f=t.substring(0,m+1))}if(h=this.tokenizer.inlineText(f)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(d=h.raw.slice(-1)),o=!0;let m=n.at(-1);m?.type==="text"?(m.raw+=h.raw,m.text+=h.text):n.push(h);continue}if(t){let m="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return n}},rd=class{options;parser;constructor(t){this.options=t||Ha}space(t){return""}code({text:t,lang:n,escaped:i}){let s=(n||"").match(mn.notSpaceStart)?.[0],l=t.replace(mn.endingNewline,"")+`
|
|
108
|
-
`;return s?'<pre><code class="language-'+Nr(s)+'">'+(i?l:Nr(l,!0))+`</code></pre>
|
|
109
|
-
`:"<pre><code>"+(i?l:Nr(l,!0))+`</code></pre>
|
|
110
|
-
`}blockquote({tokens:t}){return`<blockquote>
|
|
111
|
-
${this.parser.parse(t)}</blockquote>
|
|
112
|
-
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
|
|
113
|
-
`}hr(t){return`<hr>
|
|
114
|
-
`}list(t){let n=t.ordered,i=t.start,s="";for(let d=0;d<t.items.length;d++){let h=t.items[d];s+=this.listitem(h)}let l=n?"ol":"ul",o=n&&i!==1?' start="'+i+'"':"";return"<"+l+o+`>
|
|
115
|
-
`+s+"</"+l+`>
|
|
116
|
-
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
117
|
-
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
118
|
-
`}table(t){let n="",i="";for(let l=0;l<t.header.length;l++)i+=this.tablecell(t.header[l]);n+=this.tablerow({text:i});let s="";for(let l=0;l<t.rows.length;l++){let o=t.rows[l];i="";for(let d=0;d<o.length;d++)i+=this.tablecell(o[d]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
119
|
-
<thead>
|
|
120
|
-
`+n+`</thead>
|
|
121
|
-
`+s+`</table>
|
|
122
|
-
`}tablerow({text:t}){return`<tr>
|
|
123
|
-
${t}</tr>
|
|
124
|
-
`}tablecell(t){let n=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+n+`</${i}>
|
|
125
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Nr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:i}){let s=this.parser.parseInline(i),l=Ex(t);if(l===null)return s;t=l;let o='<a href="'+t+'"';return n&&(o+=' title="'+Nr(n)+'"'),o+=">"+s+"</a>",o}image({href:t,title:n,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let l=Ex(t);if(l===null)return Nr(i);t=l;let o=`<img src="${t}" alt="${Nr(i)}"`;return n&&(o+=` title="${Nr(n)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Nr(t.text)}},Km=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},br=class qp{options;renderer;textRenderer;constructor(t){this.options=t||Ha,this.options.renderer=this.options.renderer||new rd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Km}static parse(t,n){return new qp(n).parse(t)}static parseInline(t,n){return new qp(n).parseInline(t)}parse(t){let n="";for(let i=0;i<t.length;i++){let s=t[i];if(this.options.extensions?.renderers?.[s.type]){let o=s,d=this.options.extensions.renderers[o.type].call({parser:this},o);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){n+=d||"";continue}}let l=s;switch(l.type){case"space":{n+=this.renderer.space(l);break}case"hr":{n+=this.renderer.hr(l);break}case"heading":{n+=this.renderer.heading(l);break}case"code":{n+=this.renderer.code(l);break}case"table":{n+=this.renderer.table(l);break}case"blockquote":{n+=this.renderer.blockquote(l);break}case"list":{n+=this.renderer.list(l);break}case"checkbox":{n+=this.renderer.checkbox(l);break}case"html":{n+=this.renderer.html(l);break}case"def":{n+=this.renderer.def(l);break}case"paragraph":{n+=this.renderer.paragraph(l);break}case"text":{n+=this.renderer.text(l);break}default:{let o='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}parseInline(t,n=this.renderer){let i="";for(let s=0;s<t.length;s++){let l=t[s];if(this.options.extensions?.renderers?.[l.type]){let d=this.options.extensions.renderers[l.type].call({parser:this},l);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){i+=d||"";continue}}let o=l;switch(o.type){case"escape":{i+=n.text(o);break}case"html":{i+=n.html(o);break}case"link":{i+=n.link(o);break}case"image":{i+=n.image(o);break}case"checkbox":{i+=n.checkbox(o);break}case"strong":{i+=n.strong(o);break}case"em":{i+=n.em(o);break}case"codespan":{i+=n.codespan(o);break}case"br":{i+=n.br(o);break}case"del":{i+=n.del(o);break}case"text":{i+=n.text(o);break}default:{let d='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return i}},hu=class{options;block;constructor(t){this.options=t||Ha}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?or.lex:or.lexInline}provideParser(){return this.block?br.parse:br.parseInline}},tz=class{defaults=$m();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=br;Renderer=rd;TextRenderer=Km;Lexer=or;Tokenizer=nd;Hooks=hu;constructor(...t){this.use(...t)}walkTokens(t,n){let i=[];for(let s of t)switch(i=i.concat(n.call(this,s)),s.type){case"table":{let l=s;for(let o of l.header)i=i.concat(this.walkTokens(o.tokens,n));for(let o of l.rows)for(let d of o)i=i.concat(this.walkTokens(d.tokens,n));break}case"list":{let l=s;i=i.concat(this.walkTokens(l.items,n));break}default:{let l=s;this.defaults.extensions?.childTokens?.[l.type]?this.defaults.extensions.childTokens[l.type].forEach(o=>{let d=l[o].flat(1/0);i=i.concat(this.walkTokens(d,n))}):l.tokens&&(i=i.concat(this.walkTokens(l.tokens,n)))}}return i}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){let o=n.renderers[l.name];o?n.renderers[l.name]=function(...d){let h=l.renderer.apply(this,d);return h===!1&&(h=o.apply(this,d)),h}:n.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=n[l.level];o?o.unshift(l.tokenizer):n[l.level]=[l.tokenizer],l.start&&(l.level==="block"?n.startBlock?n.startBlock.push(l.start):n.startBlock=[l.start]:l.level==="inline"&&(n.startInline?n.startInline.push(l.start):n.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(n.childTokens[l.name]=l.childTokens)}),s.extensions=n),i.renderer){let l=this.defaults.renderer||new rd(this.defaults);for(let o in i.renderer){if(!(o in l))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let d=o,h=i.renderer[d],f=l[d];l[d]=(...m)=>{let b=h.apply(l,m);return b===!1&&(b=f.apply(l,m)),b||""}}s.renderer=l}if(i.tokenizer){let l=this.defaults.tokenizer||new nd(this.defaults);for(let o in i.tokenizer){if(!(o in l))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let d=o,h=i.tokenizer[d],f=l[d];l[d]=(...m)=>{let b=h.apply(l,m);return b===!1&&(b=f.apply(l,m)),b}}s.tokenizer=l}if(i.hooks){let l=this.defaults.hooks||new hu;for(let o in i.hooks){if(!(o in l))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let d=o,h=i.hooks[d],f=l[d];hu.passThroughHooks.has(o)?l[d]=m=>{if(this.defaults.async&&hu.passThroughHooksRespectAsync.has(o))return(async()=>{let x=await h.call(l,m);return f.call(l,x)})();let b=h.call(l,m);return f.call(l,b)}:l[d]=(...m)=>{if(this.defaults.async)return(async()=>{let x=await h.apply(l,m);return x===!1&&(x=await f.apply(l,m)),x})();let b=h.apply(l,m);return b===!1&&(b=f.apply(l,m)),b}}s.hooks=l}if(i.walkTokens){let l=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(d){let h=[];return h.push(o.call(this,d)),l&&(h=h.concat(l.call(this,d))),h}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return or.lex(t,n??this.defaults)}parser(t,n){return br.parse(t,n??this.defaults)}parseMarkdown(t){return(n,i)=>{let s={...i},l={...this.defaults,...s},o=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&s.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(l.hooks&&(l.hooks.options=l,l.hooks.block=t),l.async)return(async()=>{let d=l.hooks?await l.hooks.preprocess(n):n,h=await(l.hooks?await l.hooks.provideLexer():t?or.lex:or.lexInline)(d,l),f=l.hooks?await l.hooks.processAllTokens(h):h;l.walkTokens&&await Promise.all(this.walkTokens(f,l.walkTokens));let m=await(l.hooks?await l.hooks.provideParser():t?br.parse:br.parseInline)(f,l);return l.hooks?await l.hooks.postprocess(m):m})().catch(o);try{l.hooks&&(n=l.hooks.preprocess(n));let d=(l.hooks?l.hooks.provideLexer():t?or.lex:or.lexInline)(n,l);l.hooks&&(d=l.hooks.processAllTokens(d)),l.walkTokens&&this.walkTokens(d,l.walkTokens);let h=(l.hooks?l.hooks.provideParser():t?br.parse:br.parseInline)(d,l);return l.hooks&&(h=l.hooks.postprocess(h)),h}catch(d){return o(d)}}}onError(t,n){return i=>{if(i.message+=`
|
|
126
|
-
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Nr(i.message+"",!0)+"</pre>";return n?Promise.resolve(s):s}if(n)return Promise.reject(i);throw i}}},Ia=new tz;function ht(e,t){return Ia.parse(e,t)}ht.options=ht.setOptions=function(e){return Ia.setOptions(e),ht.defaults=Ia.defaults,E3(ht.defaults),ht};ht.getDefaults=$m;ht.defaults=Ha;ht.use=function(...e){return Ia.use(...e),ht.defaults=Ia.defaults,E3(ht.defaults),ht};ht.walkTokens=function(e,t){return Ia.walkTokens(e,t)};ht.parseInline=Ia.parseInline;ht.Parser=br;ht.parser=br.parse;ht.Renderer=rd;ht.TextRenderer=Km;ht.Lexer=or;ht.lexer=or.lex;ht.Tokenizer=nd;ht.Hooks=hu;ht.parse=ht;ht.options;ht.setOptions;ht.use;ht.walkTokens;ht.parseInline;br.parse;or.lex;var nz=300,rz="300px",iz=500;function az(e={}){let{immediate:t=!1,debounceDelay:n=nz,rootMargin:i=rz,idleTimeout:s=iz}=e,[l,o]=C.useState(!1),d=C.useRef(null),h=C.useRef(null),f=C.useRef(null),m=C.useMemo(()=>E=>{let T=Date.now();return window.setTimeout(()=>{E({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-T))})},1)},[]),b=C.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(E,T)=>window.requestIdleCallback(E,T):m,[m]),x=C.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?E=>window.cancelIdleCallback(E):E=>{clearTimeout(E)},[]);return C.useEffect(()=>{if(t){o(!0);return}let E=d.current;if(!E)return;h.current&&(clearTimeout(h.current),h.current=null),f.current&&(x(f.current),f.current=null);let T=()=>{h.current&&(clearTimeout(h.current),h.current=null),f.current&&(x(f.current),f.current=null)},w=P=>{f.current=b(V=>{V.timeRemaining()>0||V.didTimeout?(o(!0),P.disconnect()):f.current=b(()=>{o(!0),P.disconnect()},{timeout:s/2})},{timeout:s})},S=P=>{T(),h.current=window.setTimeout(()=>{var V,J;let H=P.takeRecords();(H.length===0||(J=(V=H.at(-1))==null?void 0:V.isIntersecting)!=null&&J)&&w(P)},n)},k=(P,V)=>{P.isIntersecting?S(V):T()},j=new IntersectionObserver(P=>{for(let V of P)k(V,j)},{rootMargin:i,threshold:0});return j.observe(E),()=>{h.current&&clearTimeout(h.current),f.current&&x(f.current),j.disconnect()}},[t,n,i,s,x,b]),{shouldRender:l,containerRef:d}}var O3=/\s/,sz=/^\s+$/,lz=new Set(["code","pre","svg","math","annotation"]),uz=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",oz=e=>e.some(t=>uz(t)&&lz.has(t.tagName)),cz=e=>{let t=[],n="",i=!1;for(let s of e){let l=O3.test(s);l!==i&&n&&(t.push(n),n=""),n+=s,i=l}return n&&t.push(n),t},dz=e=>{let t=[],n="";for(let i of e)O3.test(i)?n+=i:(n&&(t.push(n),n=""),t.push(i));return n&&t.push(n),t},fz=(e,t,n,i,s)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:s?`--sd-animation:sd-${t};--sd-duration:0ms;--sd-easing:${i}`:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${i}`},children:[{type:"text",value:e}]}),hz=(e,t,n,i,s)=>{let l=t.at(-1);if(!(l&&"children"in l))return;if(oz(t))return Ds;let o=l,d=o.children.indexOf(e);if(d===-1)return;let h=e.value;if(!h.trim()){s.count+=h.length;return}let f=n.sep==="char"?dz(h):cz(h),m=i.prevContentLength,b=f.map(x=>{let E=s.count;if(s.count+=x.length,sz.test(x))return{type:"text",value:x};let T=m>0&&E<m;return fz(x,n.animation,n.duration,n.easing,T)});return o.children.splice(d,1,...b),d+b.length},pz=0;function Yp(e){var t,n,i,s;let l={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(i=e?.easing)!=null?i:"ease",sep:(s=e?.sep)!=null?s:"word"},o={prevContentLength:0,lastRenderCharCount:0},d=pz++,h=()=>f=>{let m={count:0};bm(f,"text",(b,x)=>hz(b,x,l,o,m)),o.lastRenderCharCount=m.count,o.prevContentLength=0};return Object.defineProperty(h,"name",{value:`rehypeAnimate$${d}`}),{name:"animate",type:"animate",rehypePlugin:h,setPrevContentLength(f){o.prevContentLength=f},getLastRenderCharCount(){let f=o.lastRenderCharCount;return o.lastRenderCharCount=0,f}}}Yp();var L3=C.createContext(!1),mz=()=>C.useContext(L3),Zm=(...e)=>u3(GT(e)),gz=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(i=>i.startsWith(n)?i:`${e}:${i}`).join(" ")},bz=e=>e?(...t)=>gz(e,u3(GT(t))):Zm,Ps=(e,t,n)=>{let i=typeof t=="string"?new Blob([t],{type:n}):t,s=URL.createObjectURL(i),l=document.createElement("a");l.href=s,l.download=e,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(s)},Vp=C.createContext(Zm),$e=()=>C.useContext(Vp),yz=Zm("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),Ez=e=>{let t={};for(let n of e.split(";")){let i=n.indexOf(":");if(i>0){let s=n.slice(0,i).trim(),l=n.slice(i+1).trim();s&&l&&(t[s]=l)}}return t},xz=C.memo(({children:e,result:t,language:n,className:i,startLine:s,...l})=>{let o=$e(),d=C.useMemo(()=>o(yz),[o]),h=C.useMemo(()=>{let f={};return t.bg&&(f["--sdm-bg"]=t.bg),t.fg&&(f["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(f,Ez(t.rootStyle)),f},[t.bg,t.fg,t.rootStyle]);return v.jsx("div",{className:o(i,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...l,children:v.jsx("pre",{className:o(i,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:h,children:v.jsx("code",{className:o("[counter-increment:line_0] [counter-reset:line]"),style:s&&s>1?{counterReset:`line ${s-1}`}:void 0,children:t.tokens.map((f,m)=>v.jsx("span",{className:d,children:f.length===0||f.length===1&&f[0].content===""?`
|
|
127
|
-
`:f.map((b,x)=>{let E={},T=!!b.bgColor;if(b.color&&(E["--sdm-c"]=b.color),b.bgColor&&(E["--sdm-tbg"]=b.bgColor),b.htmlStyle)for(let[w,S]of Object.entries(b.htmlStyle))w==="color"?E["--sdm-c"]=S:w==="background-color"?(E["--sdm-tbg"]=S,T=!0):E[w]=S;return v.jsx("span",{className:o("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",T&&"bg-[var(--sdm-tbg)]",T&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:E,...b.htmlAttrs,children:b.content},x)})},m))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine),vz=({className:e,language:t,style:n,isIncomplete:i,...s})=>{let l=$e();return v.jsx("div",{className:l("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":i||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...s})},M3=C.createContext({code:""}),I3=()=>C.useContext(M3),_z=({language:e})=>{let t=$e();return v.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:v.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},Tz=/\n+$/,Az=C.lazy(()=>ii(()=>import("./highlighted-body-TPN3WLV5-BheGZsYG.js"),[]).then(e=>({default:e.HighlightedCodeBlockBody}))),Sz=({code:e,language:t,className:n,children:i,isIncomplete:s=!1,startLine:l,...o})=>{let d=$e(),h=C.useMemo(()=>e.replace(Tz,""),[e]),f=C.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:h.split(`
|
|
128
|
-
`).map(m=>[{content:m,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[h]);return v.jsx(M3.Provider,{value:{code:e},children:v.jsxs(vz,{isIncomplete:s,language:t,children:[v.jsx(_z,{language:t}),i?v.jsx("div",{className:d("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:v.jsx("div",{className:d("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:i})}):null,v.jsx(C.Suspense,{fallback:v.jsx(xz,{className:n,language:t,result:f,startLine:l,...o}),children:v.jsx(Az,{className:n,code:h,language:t,raw:f,startLine:l,...o})})]})})},wz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),kz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),Cz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),Nz=e=>v.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[v.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),Rz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),Oz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),Lz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),Mz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),Iz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Dz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),pu={CheckIcon:wz,CopyIcon:kz,DownloadIcon:Cz,ExternalLinkIcon:Mz,Loader2Icon:Nz,Maximize2Icon:Rz,RotateCcwIcon:Oz,XIcon:Lz,ZoomInIcon:Iz,ZoomOutIcon:Dz},D3=C.createContext(pu),Bz=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),i=Object.keys(t);return n.length!==i.length?!1:n.every(s=>e[s]===t[s])},_x=({icons:e,children:t})=>{let n=C.useRef(e),i=C.useRef(e?{...pu,...e}:pu);Bz(n.current,e)||(n.current=e,i.current=e?{...pu,...e}:pu);let s=i.current;return v.jsx(D3.Provider,{value:s,children:t})},vr=()=>C.useContext(D3),B3={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},Gp=C.createContext(B3),ui=()=>C.useContext(Gp),Tx=({onCopy:e,onError:t,timeout:n=2e3,children:i,className:s,code:l,...o})=>{let d=$e(),[h,f]=C.useState(!1),m=C.useRef(0),{code:b}=I3(),{isAnimating:x}=C.useContext(Gn),E=ui(),T=l??b,w=async()=>{var j;if(typeof window>"u"||!((j=navigator?.clipboard)!=null&&j.writeText)){t?.(new Error("Clipboard API not available"));return}try{h||(await navigator.clipboard.writeText(T),f(!0),e?.(),m.current=window.setTimeout(()=>f(!1),n))}catch(P){t?.(P)}};C.useEffect(()=>()=>{window.clearTimeout(m.current)},[]);let S=vr(),k=h?S.CheckIcon:S.CopyIcon;return v.jsx("button",{className:d("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-copy-button",disabled:x,onClick:w,title:E.copyCode,type:"button",...o,children:i??v.jsx(k,{size:14})})},Ax={"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"},zz=({onDownload:e,onError:t,language:n,children:i,className:s,code:l,...o})=>{let d=$e(),{code:h}=I3(),{isAnimating:f}=C.useContext(Gn),m=ui(),b=vr(),x=l??h,E=`file.${n&&n in Ax?Ax[n]:"txt"}`,T="text/plain",w=()=>{try{Ps(E,x,T),e?.()}catch(S){t?.(S)}};return v.jsx("button",{className:d("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-download-button",disabled:f,onClick:w,title:m.downloadFile,type:"button",...o,children:i??v.jsx(b.DownloadIcon,{size:14})})},Sx=()=>{let{Loader2Icon:e}=vr(),t=$e();return v.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[v.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),v.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:v.jsx(e,{className:t("size-4 animate-spin")})})]})},Pz=/\.[^/.]+$/,Hz=({node:e,className:t,src:n,alt:i,onLoad:s,onError:l,...o})=>{let{DownloadIcon:d}=vr(),h=$e(),f=C.useRef(null),[m,b]=C.useState(!1),[x,E]=C.useState(!1),T=ui(),w=o.width!=null||o.height!=null,S=(m||w)&&!x,k=x&&!w;C.useEffect(()=>{let J=f.current;if(J!=null&&J.complete){let H=J.naturalWidth>0;b(H),E(!H)}},[]);let j=C.useCallback(J=>{b(!0),E(!1),s?.(J)},[s]),P=C.useCallback(J=>{b(!1),E(!0),l?.(J)},[l]),V=async()=>{if(n)try{let J=await(await fetch(n)).blob(),H=new URL(n,window.location.origin).pathname.split("/").pop()||"",ne=H.split(".").pop(),te=H.includes(".")&&ne!==void 0&&ne.length<=4,fe="";if(te)fe=H;else{let z=J.type,$="png";z.includes("jpeg")||z.includes("jpg")?$="jpg":z.includes("png")?$="png":z.includes("svg")?$="svg":z.includes("gif")?$="gif":z.includes("webp")&&($="webp"),fe=`${(i||H||"image").replace(Pz,"")}.${$}`}Ps(fe,J,J.type)}catch{window.open(n,"_blank")}};return n?v.jsxs("div",{className:h("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[v.jsx("img",{alt:i,className:h("max-w-full rounded-lg",k&&"hidden",t),"data-streamdown":"image",onError:P,onLoad:j,ref:f,src:n,...o}),k&&v.jsx("span",{className:h("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:T.imageNotAvailable}),v.jsx("div",{className:h("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),S&&v.jsx("button",{className:h("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:V,title:T.downloadImage,type:"button",children:v.jsx(d,{size:14})})]}):null},Au=0,Jm=()=>{Au+=1,Au===1&&(document.body.style.overflow="hidden")},e1=()=>{Au=Math.max(0,Au-1),Au===0&&(document.body.style.overflow="")},Uz=({url:e,isOpen:t,onClose:n,onConfirm:i})=>{let{CheckIcon:s,CopyIcon:l,ExternalLinkIcon:o,XIcon:d}=vr(),h=$e(),[f,m]=C.useState(!1),b=ui(),x=C.useCallback(async()=>{try{await navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),2e3)}catch{}},[e]),E=C.useCallback(()=>{i(),n()},[i,n]);return C.useEffect(()=>{if(t){Jm();let T=w=>{w.key==="Escape"&&n()};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T),e1()}}},[t,n]),t?v.jsx("div",{className:h("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:T=>{T.key==="Escape"&&n()},role:"button",tabIndex:0,children:v.jsxs("div",{className:h("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:T=>T.stopPropagation(),onKeyDown:T=>T.stopPropagation(),role:"presentation",children:[v.jsx("button",{className:h("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:b.close,type:"button",children:v.jsx(d,{size:16})}),v.jsxs("div",{className:h("flex flex-col gap-2"),children:[v.jsxs("div",{className:h("flex items-center gap-2 font-semibold text-lg"),children:[v.jsx(o,{size:20}),v.jsx("span",{children:b.openExternalLink})]}),v.jsx("p",{className:h("text-muted-foreground text-sm"),children:b.externalLinkWarning})]}),v.jsx("div",{className:h("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),v.jsxs("div",{className:h("flex gap-2"),children:[v.jsx("button",{className:h("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:x,type:"button",children:f?v.jsxs(v.Fragment,{children:[v.jsx(s,{size:14}),v.jsx("span",{children:b.copied})]}):v.jsxs(v.Fragment,{children:[v.jsx(l,{size:14}),v.jsx("span",{children:b.copyLink})]})}),v.jsxs("button",{className:h("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:E,type:"button",children:[v.jsx(o,{size:14}),v.jsx("span",{children:b.openLink})]})]})]})}):null},Wp=C.createContext(null),t1=()=>C.useContext(Wp),pG=()=>{var e;let t=t1();return(e=t?.code)!=null?e:null},n1=()=>{var e;let t=t1();return(e=t?.mermaid)!=null?e:null},jz=e=>{var t;let n=t1();return n!=null&&n.renderers&&e&&(t=n.renderers.find(i=>Array.isArray(i.language)?i.language.includes(e):i.language===e))!=null?t:null},Fz=(e,t)=>{var n;let i=(n=void 0)!=null?n:5;return new Promise((s,l)=>{let o="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),d=new Image;d.crossOrigin="anonymous",d.onload=()=>{let h=document.createElement("canvas"),f=d.width*i,m=d.height*i;h.width=f,h.height=m;let b=h.getContext("2d");if(!b){l(new Error("Failed to create 2D canvas context for PNG export"));return}b.drawImage(d,0,0,f,m),h.toBlob(x=>{if(!x){l(new Error("Failed to create PNG blob"));return}s(x)},"image/png")},d.onerror=()=>l(new Error("Failed to load SVG image")),d.src=o})},$z=({chart:e,children:t,className:n,onDownload:i,config:s,onError:l})=>{let o=$e(),[d,h]=C.useState(!1),f=C.useRef(null),{isAnimating:m}=C.useContext(Gn),b=vr(),x=n1(),E=ui(),T=async w=>{try{if(w==="mmd"){Ps("diagram.mmd",e,"text/plain"),h(!1),i?.(w);return}if(!x){l?.(new Error("Mermaid plugin not available"));return}let S=x.getMermaid(s),k=e.split("").reduce((V,J)=>(V<<5)-V+J.charCodeAt(0)|0,0),j=`mermaid-${Math.abs(k)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:P}=await S.render(j,e);if(!P){l?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(w==="svg"){Ps("diagram.svg",P,"image/svg+xml"),h(!1),i?.(w);return}if(w==="png"){let V=await Fz(P);Ps("diagram.png",V,"image/png"),i?.(w),h(!1);return}}catch(S){l?.(S)}};return C.useEffect(()=>{let w=S=>{let k=S.composedPath();f.current&&!k.includes(f.current)&&h(!1)};return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w)}},[]),v.jsxs("div",{className:o("relative"),ref:f,children:[v.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:m,onClick:()=>h(!d),title:E.downloadDiagram,type:"button",children:t??v.jsx(b.DownloadIcon,{size:14})}),d?v.jsxs("div",{className:o("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[v.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("svg"),title:E.downloadDiagramAsSvg,type:"button",children:E.mermaidFormatSvg}),v.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("png"),title:E.downloadDiagramAsPng,type:"button",children:E.mermaidFormatPng}),v.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("mmd"),title:E.downloadDiagramAsMmd,type:"button",children:E.mermaidFormatMmd})]}):null]})},qz=({chart:e,config:t,onFullscreen:n,onExit:i,className:s,...l})=>{let{Maximize2Icon:o,XIcon:d}=vr(),h=$e(),[f,m]=C.useState(!1),{isAnimating:b,controls:x}=C.useContext(Gn),E=ui(),T=(()=>{if(typeof x=="boolean")return x;let S=x.mermaid;return S===!1?!1:S===!0||S===void 0?!0:S.panZoom!==!1})(),w=()=>{m(!f)};return C.useEffect(()=>{if(f){Jm();let S=k=>{k.key==="Escape"&&m(!1)};return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S),e1()}}},[f]),C.useEffect(()=>{f?n?.():i&&i()},[f,n,i]),v.jsxs(v.Fragment,{children:[v.jsx("button",{className:h("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),disabled:b,onClick:w,title:E.viewFullscreen,type:"button",...l,children:v.jsx(o,{size:14})}),f?Hu.createPortal(v.jsxs("div",{className:h("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:w,onKeyDown:S=>{S.key==="Escape"&&w()},role:"button",tabIndex:0,children:[v.jsx("button",{className:h("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:w,title:E.exitFullscreen,type:"button",children:v.jsx(d,{size:20})}),v.jsx("div",{className:h("flex size-full items-center justify-center p-4"),onClick:S=>S.stopPropagation(),onKeyDown:S=>S.stopPropagation(),role:"presentation",children:v.jsx(pA,{chart:e,className:h("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:T})})]}),document.body):null]})},z3=e=>{var t,n;let i=[],s=[],l=e.querySelectorAll("thead th");for(let d of l)i.push(((t=d.textContent)==null?void 0:t.trim())||"");let o=e.querySelectorAll("tbody tr");for(let d of o){let h=[],f=d.querySelectorAll("td");for(let m of f)h.push(((n=m.textContent)==null?void 0:n.trim())||"");s.push(h)}return{headers:i,rows:s}},P3=e=>{let{headers:t,rows:n}=e,i=d=>{let h=!1,f=!1;for(let m of d){if(m==='"'){h=!0,f=!0;break}(m===","||m===`
|
|
129
|
-
`)&&(h=!0)}return h?f?`"${d.replace(/"/g,'""')}"`:`"${d}"`:d},s=t.length>0?n.length+1:n.length,l=new Array(s),o=0;t.length>0&&(l[o]=t.map(i).join(","),o+=1);for(let d of n)l[o]=d.map(i).join(","),o+=1;return l.join(`
|
|
130
|
-
`)},Yz=e=>{let{headers:t,rows:n}=e,i=d=>{let h=!1;for(let m of d)if(m===" "||m===`
|
|
131
|
-
`||m==="\r"){h=!0;break}if(!h)return d;let f=[];for(let m of d)m===" "?f.push("\\t"):m===`
|
|
132
|
-
`?f.push("\\n"):m==="\r"?f.push("\\r"):f.push(m);return f.join("")},s=t.length>0?n.length+1:n.length,l=new Array(s),o=0;t.length>0&&(l[o]=t.map(i).join(" "),o+=1);for(let d of n)l[o]=d.map(i).join(" "),o+=1;return l.join(`
|
|
133
|
-
`)},H0=e=>{let t=!1;for(let i of e)if(i==="\\"||i==="|"){t=!0;break}if(!t)return e;let n=[];for(let i of e)i==="\\"?n.push("\\\\"):i==="|"?n.push("\\|"):n.push(i);return n.join("")},Qp=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let i=new Array(n.length+2),s=0,l=t.map(d=>H0(d));i[s]=`| ${l.join(" | ")} |`,s+=1;let o=new Array(t.length);for(let d=0;d<t.length;d+=1)o[d]="---";i[s]=`| ${o.join(" | ")} |`,s+=1;for(let d of n)if(d.length<t.length){let h=new Array(t.length);for(let f=0;f<t.length;f+=1)h[f]=f<d.length?H0(d[f]):"";i[s]=`| ${h.join(" | ")} |`,s+=1}else{let h=d.map(f=>H0(f));i[s]=`| ${h.join(" | ")} |`,s+=1}return i.join(`
|
|
134
|
-
`)},H3=({children:e,className:t,onCopy:n,onError:i,timeout:s=2e3})=>{let l=$e(),[o,d]=C.useState(!1),[h,f]=C.useState(!1),m=C.useRef(null),b=C.useRef(0),{isAnimating:x}=C.useContext(Gn),E=ui(),T=async k=>{var j,P;if(typeof window>"u"||!((j=navigator?.clipboard)!=null&&j.write)){i?.(new Error("Clipboard API not available"));return}try{let V=(P=m.current)==null?void 0:P.closest('[data-streamdown="table-wrapper"]'),J=V?.querySelector("table");if(!J){i?.(new Error("Table not found"));return}let H=z3(J),ne=({csv:P3,tsv:Yz,md:Qp}[k]||Qp)(H),te=new ClipboardItem({"text/plain":new Blob([ne],{type:"text/plain"}),"text/html":new Blob([J.outerHTML],{type:"text/html"})});await navigator.clipboard.write([te]),f(!0),d(!1),n?.(k),b.current=window.setTimeout(()=>f(!1),s)}catch(V){i?.(V)}};C.useEffect(()=>{let k=j=>{let P=j.composedPath();m.current&&!P.includes(m.current)&&d(!1)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k),window.clearTimeout(b.current)}},[]);let w=vr(),S=h?w.CheckIcon:w.CopyIcon;return v.jsxs("div",{className:l("relative"),ref:m,children:[v.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:x,onClick:()=>d(!o),title:E.copyTable,type:"button",children:e??v.jsx(S,{height:14,width:14})}),o?v.jsxs("div",{className:l("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[v.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("md"),title:E.copyTableAsMarkdown,type:"button",children:E.tableFormatMarkdown}),v.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("csv"),title:E.copyTableAsCsv,type:"button",children:E.tableFormatCsv}),v.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("tsv"),title:E.copyTableAsTsv,type:"button",children:E.tableFormatTsv})]}):null]})},U3=({children:e,className:t,onDownload:n,onError:i})=>{let s=$e(),[l,o]=C.useState(!1),d=C.useRef(null),{isAnimating:h}=C.useContext(Gn),f=ui(),m=vr(),b=x=>{var E;try{let T=(E=d.current)==null?void 0:E.closest('[data-streamdown="table-wrapper"]'),w=T?.querySelector("table");if(!w){i?.(new Error("Table not found"));return}let S=z3(w),k=x==="csv"?P3(S):Qp(S);Ps(`table.${x==="csv"?"csv":"md"}`,k,x==="csv"?"text/csv":"text/markdown"),o(!1),n?.(x)}catch(T){i?.(T)}};return C.useEffect(()=>{let x=E=>{let T=E.composedPath();d.current&&!T.includes(d.current)&&o(!1)};return document.addEventListener("mousedown",x),()=>{document.removeEventListener("mousedown",x)}},[]),v.jsxs("div",{className:s("relative"),ref:d,children:[v.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:h,onClick:()=>o(!l),title:f.downloadTable,type:"button",children:e??v.jsx(m.DownloadIcon,{size:14})}),l?v.jsxs("div",{className:s("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[v.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("csv"),title:f.downloadTableAsCsv,type:"button",children:f.tableFormatCsv}),v.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("markdown"),title:f.downloadTableAsMarkdown,type:"button",children:f.tableFormatMarkdown})]}):null]})},Vz=({children:e,className:t,showCopy:n=!0,showDownload:i=!0})=>{let{Maximize2Icon:s,XIcon:l}=vr(),o=$e(),[d,h]=C.useState(!1),{isAnimating:f}=C.useContext(Gn),m=ui(),b=()=>{h(!0)},x=()=>{h(!1)};return C.useEffect(()=>{if(d){Jm();let E=T=>{T.key==="Escape"&&h(!1)};return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E),e1()}}},[d]),v.jsxs(v.Fragment,{children:[v.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:f,onClick:b,title:m.viewFullscreen,type:"button",children:v.jsx(s,{size:14})}),d?Hu.createPortal(v.jsx("div",{"aria-label":m.viewFullscreen,"aria-modal":"true",className:o("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:x,onKeyDown:E=>{E.key==="Escape"&&x()},role:"dialog",children:v.jsxs("div",{className:o("flex h-full flex-col"),onClick:E=>E.stopPropagation(),onKeyDown:E=>E.stopPropagation(),role:"presentation",children:[v.jsxs("div",{className:o("flex items-center justify-end gap-1 p-4"),children:[n?v.jsx(H3,{}):null,i?v.jsx(U3,{}):null,v.jsx("button",{className:o("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:x,title:m.exitFullscreen,type:"button",children:v.jsx(l,{size:20})})]}),v.jsx("div",{className:o("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:v.jsx("table",{className:o("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},Gz=({children:e,className:t,showControls:n,showCopy:i=!0,showDownload:s=!0,showFullscreen:l=!0,...o})=>{let d=$e(),h=n&&i,f=n&&s,m=n&&l,b=h||f||m;return v.jsxs("div",{className:d("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[b?v.jsxs("div",{className:d("flex items-center justify-end gap-1"),children:[h?v.jsx(H3,{}):null,f?v.jsx(U3,{}):null,m?v.jsx(Vz,{showCopy:h,showDownload:f,children:e}):null]}):null,v.jsx("div",{className:d("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:v.jsx("table",{className:d("w-full divide-y divide-border",t),"data-streamdown":"table",...o,children:e})})]})},Wz=/startLine=(\d+)/,Qz=C.lazy(()=>ii(()=>Promise.resolve().then(()=>DV),void 0).then(e=>({default:e.Mermaid}))),Xz=/language-([^\s]+)/;function Nd(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,i=t.position.start,s=e.position.end,l=t.position.end;return n?.line===i?.line&&n?.column===i?.column&&s?.line===l?.line&&s?.column===l?.column}function kt(e,t){return e.className===t.className&&Nd(e.node,t.node)}var Xp=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,U0=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},wx=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},wc=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},r1=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("ol",{className:s("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...i,children:e})},(e,t)=>kt(e,t));r1.displayName="MarkdownOl";var j3=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("li",{className:s("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...i,children:e})},(e,t)=>e.className===t.className&&Nd(e.node,t.node));j3.displayName="MarkdownLi";var F3=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("ul",{className:s("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...i,children:e})},(e,t)=>kt(e,t));F3.displayName="MarkdownUl";var $3=C.memo(({className:e,node:t,...n})=>{let i=$e();return v.jsx("hr",{className:i("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>kt(e,t));$3.displayName="MarkdownHr";var q3=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("span",{className:s("font-semibold",t),"data-streamdown":"strong",...i,children:e})},(e,t)=>kt(e,t));q3.displayName="MarkdownStrong";var Kz=({children:e,className:t,href:n,node:i,...s})=>{let l=$e(),{linkSafety:o}=C.useContext(Gn),[d,h]=C.useState(!1),f=n==="streamdown:incomplete-link",m=C.useCallback(async T=>{if(!(!(o!=null&&o.enabled&&n)||f)){if(T.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}h(!0)}},[o,n,f]),b=C.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),x=C.useCallback(()=>{h(!1)},[]),E={url:n??"",isOpen:d,onClose:x,onConfirm:b};return o!=null&&o.enabled&&n?v.jsxs(v.Fragment,{children:[v.jsx("button",{className:l("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":f,"data-streamdown":"link",onClick:m,type:"button",children:e}),o.renderModal?o.renderModal(E):v.jsx(Uz,{...E})]}):v.jsx("a",{className:l("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":f,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...s,children:e})},Y3=C.memo(Kz,(e,t)=>kt(e,t)&&e.href===t.href);Y3.displayName="MarkdownA";var V3=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("h1",{className:s("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...i,children:e})},(e,t)=>kt(e,t));V3.displayName="MarkdownH1";var G3=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("h2",{className:s("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...i,children:e})},(e,t)=>kt(e,t));G3.displayName="MarkdownH2";var W3=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("h3",{className:s("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...i,children:e})},(e,t)=>kt(e,t));W3.displayName="MarkdownH3";var Q3=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("h4",{className:s("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...i,children:e})},(e,t)=>kt(e,t));Q3.displayName="MarkdownH4";var X3=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("h5",{className:s("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...i,children:e})},(e,t)=>kt(e,t));X3.displayName="MarkdownH5";var K3=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("h6",{className:s("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...i,children:e})},(e,t)=>kt(e,t));K3.displayName="MarkdownH6";var Z3=C.memo(({children:e,className:t,node:n,...i})=>{let{controls:s}=C.useContext(Gn),l=Xp(s,"table"),o=U0(s,"copy"),d=U0(s,"download"),h=U0(s,"fullscreen");return v.jsx(Gz,{className:t,showControls:l,showCopy:o,showDownload:d,showFullscreen:h,...i,children:e})},(e,t)=>kt(e,t));Z3.displayName="MarkdownTable";var J3=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("thead",{className:s("bg-muted/80",t),"data-streamdown":"table-header",...i,children:e})},(e,t)=>kt(e,t));J3.displayName="MarkdownThead";var eA=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("tbody",{className:s("divide-y divide-border",t),"data-streamdown":"table-body",...i,children:e})},(e,t)=>kt(e,t));eA.displayName="MarkdownTbody";var tA=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("tr",{className:s("border-border",t),"data-streamdown":"table-row",...i,children:e})},(e,t)=>kt(e,t));tA.displayName="MarkdownTr";var nA=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("th",{className:s("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...i,children:e})},(e,t)=>kt(e,t));nA.displayName="MarkdownTh";var rA=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("td",{className:s("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...i,children:e})},(e,t)=>kt(e,t));rA.displayName="MarkdownTd";var iA=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("blockquote",{className:s("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...i,children:e})},(e,t)=>kt(e,t));iA.displayName="MarkdownBlockquote";var aA=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("sup",{className:s("text-sm",t),"data-streamdown":"superscript",...i,children:e})},(e,t)=>kt(e,t));aA.displayName="MarkdownSup";var sA=C.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("sub",{className:s("text-sm",t),"data-streamdown":"subscript",...i,children:e})},(e,t)=>kt(e,t));sA.displayName="MarkdownSub";var lA=C.memo(({children:e,className:t,node:n,...i})=>{if("data-footnotes"in i){let s=o=>{var d,h;if(!C.isValidElement(o))return!1;let f=Array.isArray(o.props.children)?o.props.children:[o.props.children],m=!1,b=!1;for(let x of f)if(x){if(typeof x=="string")x.trim()!==""&&(m=!0);else if(C.isValidElement(x))if(((d=x.props)==null?void 0:d["data-footnote-backref"])!==void 0)b=!0;else{let E=Array.isArray(x.props.children)?x.props.children:[x.props.children];for(let T of E){if(typeof T=="string"&&T.trim()!==""){m=!0;break}if(C.isValidElement(T)&&((h=T.props)==null?void 0:h["data-footnote-backref"])===void 0){m=!0;break}}}}return b&&!m},l=Array.isArray(e)?e.map(o=>{if(!C.isValidElement(o))return o;if(o.type===r1){let d=(Array.isArray(o.props.children)?o.props.children:[o.props.children]).filter(h=>!s(h));return d.length===0?null:{...o,props:{...o.props,children:d}}}return o}):e;return(Array.isArray(l)?l.some(o=>o!==null):l!==null)?v.jsx("section",{className:t,...i,children:l}):null}return v.jsx("section",{className:t,...i,children:e})},(e,t)=>kt(e,t));lA.displayName="MarkdownSection";var Zz=({node:e,className:t,children:n,...i})=>{var s,l;let o=$e(),d=!("data-block"in i),{mermaid:h,controls:f}=C.useContext(Gn),m=n1(),b=mz(),x=t?.match(Xz),E=(s=x?.at(1))!=null?s:"",T=jz(E);if(d)return v.jsx("code",{className:o("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...i,children:n});let w=(l=e?.properties)==null?void 0:l.metastring,S=w?.match(Wz),k=S?Number.parseInt(S[1],10):void 0,j=k!==void 0&&k>=1?k:void 0,P="";if(C.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?P=n.props.children:typeof n=="string"&&(P=n),T){let ne=T.component;return v.jsx(C.Suspense,{fallback:v.jsx(Sx,{}),children:v.jsx(ne,{code:P,isIncomplete:b,language:E})})}if(E==="mermaid"&&m){let ne=Xp(f,"mermaid"),te=wc(f,"download"),fe=wc(f,"copy"),z=wc(f,"fullscreen"),$=wc(f,"panZoom"),Y=ne&&(te||fe||z);return v.jsx(C.Suspense,{fallback:v.jsx(Sx,{}),children:v.jsxs("div",{className:o("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[v.jsx("div",{className:o("flex h-8 items-center text-muted-foreground text-xs"),children:v.jsx("span",{className:o("ml-1 font-mono lowercase"),children:"mermaid"})}),Y?v.jsx("div",{className:o("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:v.jsxs("div",{className:o("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[te?v.jsx($z,{chart:P,config:h?.config}):null,fe?v.jsx(Tx,{code:P}):null,z?v.jsx(qz,{chart:P,config:h?.config}):null]})}):null,v.jsx("div",{className:o("rounded-md border border-border bg-background"),children:v.jsx(Qz,{chart:P,config:h?.config,showControls:$})})]})})}let V=Xp(f,"code"),J=wx(f,"download"),H=wx(f,"copy");return v.jsx(Sz,{className:t,code:P,isIncomplete:b,language:E,startLine:j,children:V?v.jsxs(v.Fragment,{children:[J?v.jsx(zz,{code:P,language:E}):null,H?v.jsx(Tx,{}):null]}):null})},uA=C.memo(Zz,(e,t)=>e.className===t.className&&Nd(e.node,t.node));uA.displayName="MarkdownCode";var oA=C.memo(Hz,(e,t)=>e.className===t.className&&Nd(e.node,t.node));oA.displayName="MarkdownImg";var cA=C.memo(({children:e,node:t,...n})=>{let i=(Array.isArray(e)?e:[e]).filter(s=>s!=null&&s!=="");if(i.length===1&&C.isValidElement(i[0])){let s=i[0].props.node,l=s?.tagName;if(l==="img")return v.jsx(v.Fragment,{children:e});if(l==="code"&&"data-block"in i[0].props)return v.jsx(v.Fragment,{children:e})}return v.jsx("p",{...n,children:e})},(e,t)=>kt(e,t));cA.displayName="MarkdownParagraph";var Jz={ol:r1,li:j3,ul:F3,hr:$3,strong:q3,a:Y3,h1:V3,h2:G3,h3:W3,h4:Q3,h5:X3,h6:K3,table:Z3,thead:J3,tbody:eA,tr:tA,th:nA,td:rA,blockquote:iA,code:uA,img:oA,pre:({children:e})=>C.isValidElement(e)?C.cloneElement(e,{"data-block":"true"}):e,sup:aA,sub:sA,p:cA,section:lA},eP=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,tP=/\p{L}/u;function kx(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(eP.test(n))return"rtl";if(tP.test(n))return"ltr"}return"ltr"}var nP=/^[ \t]{0,3}(`{3,}|~{3,})/,rP=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Cx=e=>{let t=e.split(`
|
|
135
|
-
`),n=null,i=0;for(let s of t){let l=nP.exec(s);if(n===null){if(l){let o=l[1];n=o[0],i=o.length}}else if(l){let o=l[1],d=o[0],h=o.length;d===n&&h>=i&&(n=null,i=0)}}return n!==null},iP=e=>{let t=e.split(`
|
|
136
|
-
`);for(let n of t){let i=n.trim();if(i.length>0&&i.includes("|")&&rP.test(i))return!0}return!1},aP=()=>e=>{Dr(e,"html",(t,n,i)=>{!i||typeof n!="number"||(i.children[n]={type:"text",value:t.value})})},Nx=[],Rx={allowDangerousHtml:!0},kc=new WeakMap,sP=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(t){let n=this.keyCache.get(t);if(n)return n;let i=t.rehypePlugins,s=t.remarkPlugins,l=t.remarkRehypeOptions;if(!(i||s||l)){let b="default";return this.keyCache.set(t,b),b}let o=b=>{if(!b||b.length===0)return"";let x="";for(let E=0;E<b.length;E+=1){let T=b[E];if(E>0&&(x+=","),Array.isArray(T)){let[w,S]=T;if(typeof w=="function"){let k=kc.get(w);k||(k=w.name,kc.set(w,k)),x+=k}else x+=String(w);x+=":",x+=JSON.stringify(S)}else if(typeof T=="function"){let w=kc.get(T);w||(w=T.name,kc.set(T,w)),x+=w}else x+=String(T)}return x},d=o(i),h=o(s),f=l?JSON.stringify(l):"",m=`${h}::${d}::${f}`;return this.keyCache.set(t,m),m}get(t){let n=this.generateCacheKey(t),i=this.cache.get(n);return i&&(this.cache.delete(n),this.cache.set(n,i)),i}set(t,n){let i=this.generateCacheKey(t);if(this.cache.size>=this.maxSize){let s=this.cache.keys().next().value;s&&this.cache.delete(s)}this.cache.set(i,n)}clear(){this.cache.clear()}},Ox=new sP,dA=e=>{let t=lP(e),n=e.children||"",i=t.runSync(t.parse(n),n);return pP(i,e)},lP=e=>{let t=Ox.get(e);if(t)return t;let n=oP(e);return Ox.set(e,n),n},uP=e=>e.some(t=>Array.isArray(t)?t[0]===Mp:t===Mp),oP=e=>{let t=e.rehypePlugins||Nx,n=e.remarkPlugins||Nx,i=uP(t)?n:[...n,aP],s=e.remarkRehypeOptions?{...Rx,...e.remarkRehypeOptions}:Rx;return oB().use(u7).use(i).use(q7,s).use(t)},cP=e=>e,dP=(e,t,n,i)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:i}},fP=(e,t)=>{var n;for(let i in R0)if(Object.hasOwn(R0,i)&&Object.hasOwn(e.properties,i)){let s=e.properties[i],l=R0[i];(l===null||l.includes(e.tagName))&&(e.properties[i]=(n=t(String(s||""),i,e))!=null?n:void 0)}},hP=(e,t,n,i,s,l)=>{let o=!1;return i?o=!i.includes(e.tagName):s&&(o=s.includes(e.tagName)),!o&&l&&typeof t=="number"&&(o=!l(e,t,n)),o},pP=(e,t)=>{let{allowElement:n,allowedElements:i,disallowedElements:s,skipHtml:l,unwrapDisallowed:o,urlTransform:d}=t;if(n||i||s||l||d){let h=d||cP;Dr(e,(f,m,b)=>{if(f.type==="raw"&&b&&typeof m=="number")return dP(b,m,l,f.value),m;if(f.type==="element"&&(fP(f,h),hP(f,m,b,i,s,n)&&b&&typeof m=="number"))return o&&f.children?b.children.splice(m,1,...f.children):b.children.splice(m,1),m})}return gD(e,{Fragment:v.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0})},mP=/\[\^[\w-]{1,200}\](?!:)/,gP=/\[\^[\w-]{1,200}\]:/,bP=/<(\w+)[\s>]/,yP=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Lx=new Map,Mx=new Map,EP=e=>{let t=e.toLowerCase(),n=Lx.get(t);if(n)return n;let i=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Lx.set(t,i),i},xP=e=>{let t=e.toLowerCase(),n=Mx.get(t);if(n)return n;let i=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return Mx.set(t,i),i},Ix=(e,t)=>{if(yP.has(t.toLowerCase()))return 0;let n=e.match(EP(t));if(!n)return 0;let i=0;for(let s of n)s.trimEnd().endsWith("/>")||(i+=1);return i},Dx=(e,t)=>{let n=e.match(xP(t));return n?n.length:0},vP=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},_P=e=>{let t=mP.test(e),n=gP.test(e);if(t||n)return[e];let i=or.lex(e,{gfm:!0}),s=[],l=[],o=!1;for(let d of i){let h=d.raw,f=s.length;if(l.length>0){s[f-1]+=h;let m=l.at(-1),b=Ix(h,m),x=Dx(h,m);for(let E=0;E<b;E+=1)l.push(m);for(let E=0;E<x;E+=1)l.length>0&&l.at(-1)===m&&l.pop();continue}if(d.type==="html"&&d.block){let m=h.match(bP);if(m){let b=m[1],x=Ix(h,b),E=Dx(h,b);x>E&&l.push(b)}}if(f>0&&!o){let m=s[f-1];if(vP(m)%2===1){s[f-1]=m+h;continue}}s.push(h),d.type!=="space"&&(o=d.type==="code")}return s},TP=(e,t)=>{if(!t.length)return e;let n=e;for(let i of t){let s=new RegExp(`(<${i}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${i}\\s*>)`,"gi");n=n.replace(s,(l,o,d,h)=>{let f=d.replace(/\n\n/g,`
|
|
137
|
-
<!---->
|
|
138
|
-
`);return o+f+h})}return n},AP=/([\\`*_~[\]|])/g,SP=e=>e.replace(AP,"\\$1"),wP=(e,t)=>{if(!t.length)return e;let n=e;for(let i of t){let s=new RegExp(`(<${i}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${i}\\s*>)`,"gi");n=n.replace(s,(l,o,d,h)=>o+SP(d)+h)}return n},fA=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(fA).join(""):"",kP=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(i=>i.toLowerCase()));Dr(t,"element",i=>{if(n.has(i.tagName.toLowerCase())){let s=fA(i);i.children=s?[{type:"text",value:s}]:[]}})},CP=()=>e=>{Dr(e,"code",t=>{var n,i;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(i=t.data.hProperties)!=null?i:{},metastring:t.meta})})},NP=/^[ \t]*<[\w!/?-]/,RP=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,OP=e=>typeof e!="string"||e.length===0||!NP.test(e)?e:e.replace(RP,"$1"),Bx,zx,Px,Hx,jc={...Ta,protocols:{...Ta.protocols,href:[...(zx=(Bx=Ta.protocols)==null?void 0:Bx.href)!=null?zx:[],"tel"]},attributes:{...Ta.attributes,code:[...(Hx=(Px=Ta.attributes)==null?void 0:Px.code)!=null?Hx:[],"metastring"]}},Kp={raw:Mp,sanitize:[iT,jc],harden:[j4,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},LP={gfm:[aM,{}],codeMeta:CP},Ux=Object.values(Kp),MP=Object.values(LP),IP={block:" ▋",circle:" ●"},DP={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Gn=C.createContext(DP),hA=C.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:i,isIncomplete:s,dir:l,animatePlugin:o,...d})=>{if(o){let m=o.getLastRenderCharCount();o.setPrevContentLength(m)}let h=typeof e=="string"&&n?OP(e):e,f=v.jsx(dA,{...d,children:h});return v.jsx(L3.Provider,{value:s,children:l?v.jsx("div",{dir:l,style:{display:"contents"},children:f}):f})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),i=Object.keys(t.components||{});if(n.length!==i.length||n.some(s=>{var l,o;return((l=e.components)==null?void 0:l[s])!==((o=t.components)==null?void 0:o[s])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});hA.displayName="Block";var BP=["github-light","github-dark"],i1=C.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:i=!0,normalizeHtmlIndentation:s=!1,components:l,rehypePlugins:o=Ux,remarkPlugins:d=MP,className:h,shikiTheme:f=BP,mermaid:m,controls:b=!0,isAnimating:x=!1,animated:E,BlockComponent:T=hA,parseMarkdownIntoBlocksFn:w=_P,caret:S,plugins:k,remend:j,linkSafety:P={enabled:!0},allowedTags:V,literalTagContent:J,translations:H,icons:ne,prefix:te,onAnimationStart:fe,onAnimationEnd:z,...$})=>{let Y=C.useId(),[_e,ce]=C.useTransition(),ue=C.useMemo(()=>bz(te),[te]),I=C.useRef(null),ie=C.useRef(fe),Ee=C.useRef(z);ie.current=fe,Ee.current=z,C.useEffect(()=>{var Ue,ot,jt;if(t==="static")return;let on=I.current;if(I.current=x,on===null){x&&((Ue=ie.current)==null||Ue.call(ie));return}x&&!on?(ot=ie.current)==null||ot.call(ie):!x&&on&&((jt=Ee.current)==null||jt.call(Ee))},[x,t]);let ke=C.useMemo(()=>V?Object.keys(V):[],[V]),R=C.useMemo(()=>{if(typeof e!="string")return"";let Ue=t==="streaming"&&i?fI(e,j):e;return J&&J.length>0&&(Ue=wP(Ue,J)),ke.length>0&&(Ue=TP(Ue,ke)),Ue},[e,t,i,j,ke,J]),D=C.useMemo(()=>w(R),[R,w]),[ee,O]=C.useState(D);C.useEffect(()=>{t==="streaming"&&!Je?ce(()=>{O(D)}):O(D)},[D,t]);let F=t==="streaming"?ee:D,be=C.useMemo(()=>n==="auto"?F.map(kx):void 0,[F,n]),ye=C.useMemo(()=>F.map((Ue,ot)=>`${Y}-${ot}`),[F.length,Y]),Re=C.useMemo(()=>E===!0?"true":E?JSON.stringify(E):"",[E]),Je=C.useMemo(()=>Re?Re==="true"?Yp():Yp(E):null,[Re]),Le=C.useMemo(()=>{var Ue,ot;return{shikiTheme:(ot=(Ue=k?.code)==null?void 0:Ue.getThemes())!=null?ot:f,controls:b,isAnimating:x,mode:t,mermaid:m,linkSafety:P}},[f,b,x,t,m,P,k?.code]),Gt=C.useMemo(()=>H?JSON.stringify(H):"",[H]),Wt=C.useMemo(()=>({...B3,...H}),[Gt]),Ln=C.useMemo(()=>{let{inlineCode:Ue,...ot}=l??{},jt={...Jz,...ot};if(Ue){let on=jt.code;jt.code=fr=>"data-block"in fr?on?C.createElement(on,fr):null:C.createElement(Ue,fr)}return jt},[l]),dr=C.useMemo(()=>{let Ue=[];return k!=null&&k.cjk&&(Ue=[...Ue,...k.cjk.remarkPluginsBefore]),Ue=[...Ue,...d],k!=null&&k.cjk&&(Ue=[...Ue,...k.cjk.remarkPluginsAfter]),k!=null&&k.math&&(Ue=[...Ue,k.math.remarkPlugin]),Ue},[d,k?.math,k?.cjk]),Qt=C.useMemo(()=>{var Ue;let ot=o;if(V&&Object.keys(V).length>0&&o===Ux){let jt={...jc,tagNames:[...(Ue=jc.tagNames)!=null?Ue:[],...Object.keys(V)],attributes:{...jc.attributes,...V}};ot=[Kp.raw,[iT,jt],Kp.harden]}return J&&J.length>0&&(ot=[...ot,[kP,J]]),k!=null&&k.math&&(ot=[...ot,k.math.rehypePlugin]),Je&&x&&(ot=[...ot,Je.rehypePlugin]),ot},[o,k?.math,Je,x,V,J]),_r=C.useMemo(()=>{if(!x||F.length===0)return!1;let Ue=F.at(-1);return Cx(Ue)||iP(Ue)},[x,F]),di=C.useMemo(()=>S&&x&&!_r?{"--streamdown-caret":`"${IP[S]}"`}:void 0,[S,x,_r]);return t==="static"?v.jsx(Gp.Provider,{value:Wt,children:v.jsx(Wp.Provider,{value:k??null,children:v.jsx(Gn.Provider,{value:Le,children:v.jsx(_x,{icons:ne,children:v.jsx(Vp.Provider,{value:ue,children:v.jsx("div",{className:ue("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",h),dir:n==="auto"?kx(R):n,children:v.jsx(dA,{components:Ln,rehypePlugins:Qt,remarkPlugins:dr,...$,children:R})})})})})})}):v.jsx(Gp.Provider,{value:Wt,children:v.jsx(Wp.Provider,{value:k??null,children:v.jsx(Gn.Provider,{value:Le,children:v.jsx(_x,{icons:ne,children:v.jsx(Vp.Provider,{value:ue,children:v.jsxs("div",{className:ue("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",S&&!_r?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,h),style:di,children:[F.length===0&&S&&x&&v.jsx("span",{}),F.map((Ue,ot)=>{var jt;let on=ot===F.length-1,fr=x&&on&&Cx(Ue);return v.jsx(T,{animatePlugin:Je,components:Ln,content:Ue,dir:(jt=be?.[ot])!=null?jt:n!=="auto"?n:void 0,index:ot,isIncomplete:fr,rehypePlugins:Qt,remarkPlugins:dr,shouldNormalizeHtmlIndentation:s,shouldParseIncompleteMarkdown:i,...$},ye[ot])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);i1.displayName="Streamdown";var zP=({children:e,className:t,minZoom:n=.5,maxZoom:i=3,zoomStep:s=.1,showControls:l=!0,initialZoom:o=1,fullscreen:d=!1})=>{let{RotateCcwIcon:h,ZoomInIcon:f,ZoomOutIcon:m}=vr(),b=$e(),x=C.useRef(null),E=C.useRef(null),[T,w]=C.useState(o),[S,k]=C.useState({x:0,y:0}),[j,P]=C.useState(!1),[V,J]=C.useState({x:0,y:0}),[H,ne]=C.useState({x:0,y:0}),te=C.useCallback(I=>{w(ie=>Math.max(n,Math.min(i,ie+I)))},[n,i]),fe=C.useCallback(()=>{te(s)},[te,s]),z=C.useCallback(()=>{te(-s)},[te,s]),$=C.useCallback(()=>{w(o),k({x:0,y:0})},[o]),Y=C.useCallback(I=>{I.preventDefault();let ie=I.deltaY>0?-s:s;te(ie)},[te,s]),_e=C.useCallback(I=>{if(I.button!==0||I.isPrimary===!1)return;P(!0),J({x:I.clientX,y:I.clientY}),ne(S);let ie=I.currentTarget;ie instanceof HTMLElement&&ie.setPointerCapture(I.pointerId)},[S]),ce=C.useCallback(I=>{if(!j)return;I.preventDefault();let ie=I.clientX-V.x,Ee=I.clientY-V.y;k({x:H.x+ie,y:H.y+Ee})},[j,V,H]),ue=C.useCallback(I=>{P(!1);let ie=I.currentTarget;ie instanceof HTMLElement&&ie.releasePointerCapture(I.pointerId)},[]);return C.useEffect(()=>{let I=x.current;if(I)return I.addEventListener("wheel",Y,{passive:!1}),()=>{I.removeEventListener("wheel",Y)}},[Y]),C.useEffect(()=>{let I=E.current;if(I&&j)return document.body.style.userSelect="none",I.addEventListener("pointermove",ce,{passive:!1}),I.addEventListener("pointerup",ue),I.addEventListener("pointercancel",ue),()=>{document.body.style.userSelect="",I.removeEventListener("pointermove",ce),I.removeEventListener("pointerup",ue),I.removeEventListener("pointercancel",ue)}},[j,ce,ue]),v.jsxs("div",{className:b("relative flex flex-col",d?"h-full w-full":"min-h-28 w-full",t),ref:x,style:{cursor:j?"grabbing":"grab"},children:[l?v.jsxs("div",{className:b("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",d?"bottom-4 left-4":"bottom-2 left-2"),children:[v.jsx("button",{className:b("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:T>=i,onClick:fe,title:"Zoom in",type:"button",children:v.jsx(f,{size:16})}),v.jsx("button",{className:b("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:T<=n,onClick:z,title:"Zoom out",type:"button",children:v.jsx(m,{size:16})}),v.jsx("button",{className:b("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:$,title:"Reset zoom and pan",type:"button",children:v.jsx(h,{size:16})})]}):null,v.jsx("div",{className:b("flex-1 origin-center transition-transform duration-150 ease-out",d?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:_e,ref:E,role:"application",style:{transform:`translate(${S.x}px, ${S.y}px) scale(${T})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},pA=({chart:e,className:t,config:n,fullscreen:i=!1,showControls:s=!0})=>{let l=$e(),[o,d]=C.useState(null),[h,f]=C.useState(!1),[m,b]=C.useState(""),[x,E]=C.useState(""),[T,w]=C.useState(0),{mermaid:S}=C.useContext(Gn),k=n1(),j=S?.errorComponent,{shouldRender:P,containerRef:V}=az({immediate:i});if(C.useEffect(()=>{if(P){if(!k){d("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{d(null),f(!0);let H=k.getMermaid(n),ne=e.split("").reduce((z,$)=>(z<<5)-z+$.charCodeAt(0)|0,0),te=`mermaid-${Math.abs(ne)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:fe}=await H.render(te,e);b(fe),E(fe)}catch(H){if(!(x||m)){let ne=H instanceof Error?H.message:"Failed to render Mermaid chart";d(ne)}}finally{f(!1)}})()}},[e,n,T,P,k]),!(P||m||x))return v.jsx("div",{className:l("my-4 min-h-[200px]",t),ref:V});if(h&&!m&&!x)return v.jsx("div",{className:l("my-4 flex justify-center p-4",t),ref:V,children:v.jsxs("div",{className:l("flex items-center space-x-2 text-muted-foreground"),children:[v.jsx("div",{className:l("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),v.jsx("span",{className:l("text-sm"),children:"Loading diagram..."})]})});if(o&&!m&&!x){let H=()=>w(ne=>ne+1);return j?v.jsx("div",{ref:V,children:v.jsx(j,{chart:e,error:o,retry:H})}):v.jsxs("div",{className:l("rounded-md bg-red-50 p-4",t),ref:V,children:[v.jsxs("p",{className:l("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",o]}),v.jsxs("details",{className:l("mt-2"),children:[v.jsx("summary",{className:l("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),v.jsx("pre",{className:l("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let J=m||x;return v.jsx("div",{className:l("size-full",t),"data-streamdown":"mermaid",ref:V,children:v.jsx(zP,{className:l(i?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:i,maxZoom:3,minZoom:.5,showControls:s,zoomStep:.1,children:v.jsx("div",{"aria-label":"Mermaid chart",className:l("flex justify-center",i?"size-full items-center":null),dangerouslySetInnerHTML:{__html:J},role:"img"})})})};function mA(e,t){const n=e.toLowerCase(),i=typeof t.path=="string"?t.path:typeof t.filePath=="string"?t.filePath:null,s=i?hC(i):null;if(n==="read")return s?`Read ${s}`:"Read file";if(n==="desktop"){const l=typeof t.action=="string"?t.action:null,o=typeof t.miniAppId=="string"?t.miniAppId:null,d=typeof t.windowId=="string"?t.windowId:null;return l==="list"?"List windows":l==="open"&&o?`Open ${o}`:l==="focus"?d?`Focus window ${d}`:"Focus window":l==="maximize"?d?`Maximize window ${d}`:"Maximize window":l==="close"?d?`Close window ${d}`:"Close window":l?`Desktop ${l}`:"Desktop"}if(n==="action"){const l=typeof t.name=="string"?t.name:null;return l?`Invoke ${l}`:"Invoke action"}if(n==="create_liveapp"){const l=typeof t.title=="string"?t.title:null;return l?`Create LiveApp: ${l}`:"Create LiveApp"}if(n==="generate_icon"){const l=typeof t.liveAppId=="string"?t.liveAppId:null;return l?`Generate icon: ${l}`:"Generate icon"}if(n==="edit")return s?`Edit ${s}`:"Edit file";if(n==="undo_edit")return s?`Undo edit ${s}`:"Undo edit";if(n==="redo_edit")return s?`Redo edit ${s}`:"Redo edit";if(n==="read_manual"){const l=typeof t.page=="string"?t.page:null;return l?`Read manual: ${l}`:"Read manual"}return n==="ask_user"?"Ask user":e}function PP(e){const t="Called the ",n=" tool with the following input:";if(!e.startsWith(t))return null;const i=e.indexOf(n);if(i===-1)return null;const s=e.slice(t.length,i).trim(),l=e.slice(i+n.length).trim(),o=l.indexOf("{");if(!s||o===-1)return null;let d=0,h=!1,f=!1;for(let m=o;m<l.length;m+=1){const b=l[m];if(f){f=!1;continue}if(b==="\\"){f=!0;continue}if(b==='"'){h=!h;continue}if(!h){if(b==="{")d+=1;else if(b==="}"&&(d-=1,d===0))return{toolName:s,rawParams:l.slice(o,m+1)}}}return null}function HP(e){const t=e.split(`
|
|
139
|
-
`),n=[];let i=!1;for(const s of t){const l=s.trim(),o=PP(l);if(o){const{toolName:d,rawParams:h}=o;try{const f=JSON.parse(h);n.push(`- ${mA(d,f)}`)}catch{n.push(`- ${d}`)}i=!0;continue}if(i){if(l.startsWith("<path>")||l.startsWith("<type>")||l.startsWith("<content>")||l.startsWith("</path>")||l.startsWith("</type>")||l.startsWith("</content>")||l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")||/^\d+:\s/.test(l)||l.startsWith("(End of file"))continue;if(l.length===0){i=!1;continue}i=!1}n.push(s)}return n.join(`
|
|
140
|
-
`).replace(/\n{3,}/g,`
|
|
141
|
-
|
|
142
|
-
`).trim()}const UP="_thinkingBlock_x27ux_1",jP="_thinkingToggle_x27ux_9",FP="_thinkingChevron_x27ux_26",$P="_thinkingChevronOpen_x27ux_33",qP="_thinkingContent_x27ux_37",YP="_thinkingStreamingDot_x27ux_119",Cs={thinkingBlock:UP,thinkingToggle:jP,thinkingChevron:FP,thinkingChevronOpen:$P,thinkingContent:qP,thinkingStreamingDot:YP};function VP({content:e,isStreaming:t,defaultExpanded:n}){const[i,s]=C.useState(n);return C.useEffect(()=>{t&&s(!0)},[t]),v.jsxs("div",{className:Cs.thinkingBlock,children:[v.jsxs("button",{type:"button",className:Cs.thinkingToggle,onClick:()=>s(l=>!l),children:[v.jsx("span",{className:`${Cs.thinkingChevron} ${i?Cs.thinkingChevronOpen:""}`,children:"▶"}),"Thinking",t&&v.jsx("span",{className:Cs.thinkingStreamingDot})]}),i&&v.jsx(i1,{className:Cs.thinkingContent,isAnimating:t,animated:!0,children:e})]})}const GP="_answeredQuestion_3nr33_1",WP="_pendingQuestion_3nr33_2",QP="_questionLabel_3nr33_20",XP="_prompt_3nr33_21",KP="_answerLabel_3nr33_26",ZP="_controlsRow_3nr33_30",JP="_textInput_3nr33_36",eH="_optionList_3nr33_47",tH="_optionItem_3nr33_53",nH="_submitButton_3nr33_60",rH="_secondaryButton_3nr33_61",tn={answeredQuestion:GP,pendingQuestion:WP,questionLabel:QP,prompt:XP,answerLabel:KP,controlsRow:ZP,textInput:JP,optionList:eH,optionItem:tH,submitButton:nH,secondaryButton:rH};function iH(e){if(e.answer===void 0)return"Waiting for answer";if(e.questionType!=="multi_select")return e.answer;try{const t=JSON.parse(e.answer);if(Array.isArray(t))return t.filter(n=>typeof n=="string").join(", ")}catch{return e.answer}return e.answer}function gA({question:e,onAnswer:t}){const[n,i]=C.useState(""),[s,l]=C.useState(""),[o,d]=C.useState([]),h=C.useMemo(()=>iH(e),[e]),f=e.answer!==void 0,m=x=>{!t||!e.questionId||t(e.questionId,x)},b=x=>{if(x.preventDefault(),e.questionType==="text"){const E=n.trim();E&&m(E);return}if(e.questionType==="select"){s&&m(s);return}e.questionType==="multi_select"&&o.length>0&&m(JSON.stringify(o))};return f?v.jsxs("div",{className:tn.answeredQuestion,children:[v.jsx("span",{className:tn.questionLabel,children:e.question}),v.jsx("span",{className:tn.answerLabel,children:h})]}):v.jsxs("form",{className:tn.pendingQuestion,onSubmit:b,children:[v.jsx("div",{className:tn.prompt,children:e.question}),e.questionType==="text"&&v.jsxs("div",{className:tn.controlsRow,children:[v.jsx("input",{className:tn.textInput,type:"text",value:n,onChange:x=>i(x.target.value),placeholder:"Type your answer"}),v.jsx("button",{type:"submit",className:tn.submitButton,disabled:!n.trim(),children:"Submit"})]}),e.questionType==="select"&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:tn.optionList,children:(e.options??[]).map(x=>v.jsxs("label",{className:tn.optionItem,children:[v.jsx("input",{type:"radio",name:e.questionId,value:x,checked:s===x,onChange:()=>l(x)}),v.jsx("span",{children:x})]},x))}),v.jsx("button",{type:"submit",className:tn.submitButton,disabled:!s,children:"Submit"})]}),e.questionType==="multi_select"&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:tn.optionList,children:(e.options??[]).map(x=>v.jsxs("label",{className:tn.optionItem,children:[v.jsx("input",{type:"checkbox",value:x,checked:o.includes(x),onChange:E=>{d(T=>E.target.checked?[...T,x]:T.filter(w=>w!==x))}}),v.jsx("span",{children:x})]},x))}),v.jsx("button",{type:"submit",className:tn.submitButton,disabled:o.length===0,children:"Submit"})]}),e.questionType==="confirm"&&v.jsxs("div",{className:tn.controlsRow,children:[v.jsx("button",{type:"button",className:tn.submitButton,onClick:()=>m("yes"),children:"Yes"}),v.jsx("button",{type:"button",className:tn.secondaryButton,onClick:()=>m("no"),children:"No"})]})]})}const aH="_messageUser_100r6_9 _message_100r6_1",sH="_messageAssistant_100r6_15 _message_100r6_1",lH="_messageToolCall_100r6_21",uH="_toolCallLabel_100r6_34",oH="_messageHeader_100r6_40",cH="_messageSpeaker_100r6_47",dH="_voiceSourceBadge_100r6_61",fH="_markdownContent_100r6_75",hH="_thinkingIndicator_100r6_150",pH="_thinkingDot_100r6_157",sr={messageUser:aH,messageAssistant:sH,messageToolCall:lH,toolCallLabel:uH,messageHeader:oH,messageSpeaker:cH,voiceSourceBadge:dH,markdownContent:fH,thinkingIndicator:hH,thinkingDot:pH};function mH({content:e,isStreaming:t}){return v.jsx(i1,{className:sr.markdownContent,isAnimating:t,animated:!0,children:HP(e)})}function gH({toolName:e,params:t}){const n=mA(e,t);return v.jsx("div",{className:sr.messageToolCall,children:v.jsx("span",{className:sr.toolCallLabel,children:n})})}function bA({message:e,isThinking:t,isStreaming:n}){if(e.toolCall)return e.toolCall.toolName==="ask_user"?v.jsx(gA,{question:e.toolCall.params}):v.jsx(gH,{toolName:e.toolCall.toolName,params:e.toolCall.params});const i=!!e.thinkingContent,s=!!e.content;if(e.role==="assistant"&&!s&&!i&&!t)return null;const o=n&&i&&!s,d=t&&!i&&!s;return v.jsxs("div",{className:e.role==="user"?sr.messageUser:sr.messageAssistant,children:[v.jsxs("div",{className:sr.messageHeader,children:[v.jsx("span",{className:sr.messageSpeaker,children:e.role==="user"?"ME":"AI"}),e.role==="user"&&e.source==="voice"&&v.jsx("span",{className:sr.voiceSourceBadge,children:"voice"})]}),i&&v.jsx(VP,{content:e.thinkingContent,isStreaming:o,defaultExpanded:o}),d?v.jsxs("div",{className:sr.thinkingIndicator,children:[v.jsx("span",{className:sr.thinkingDot}),v.jsx("span",{className:sr.thinkingDot}),v.jsx("span",{className:sr.thinkingDot})]}):s?v.jsx(mH,{content:e.content,isStreaming:n}):null]})}const bH=C.memo(function({size:t=16}){return v.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),v.jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),v.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),v.jsx("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]})}),yH="_controlFrame_1mi1b_2",EH="_slashMenu_1mi1b_9",xH="_slashMenuItem_1mi1b_27",vH="_slashMenuItemActive_1mi1b_37",_H="_slashMenuName_1mi1b_41",TH="_slashMenuDesc_1mi1b_47",AH="_inputRow_1mi1b_55",SH="_input_1mi1b_55",wH="_statusRow_1mi1b_88",kH="_statusItem_1mi1b_99",CH="_voiceButton_1mi1b_108",NH="_voiceButtonActive_1mi1b_128",Fn={controlFrame:yH,slashMenu:EH,slashMenuItem:xH,slashMenuItemActive:vH,slashMenuName:_H,slashMenuDesc:TH,inputRow:AH,input:SH,statusRow:wH,statusItem:kH,voiceButton:CH,voiceButtonActive:NH},jx=200;function yA({onSubmit:e,onCancelAi:t,isAiRunning:n,queuedCount:i,isVoiceActive:s,onVoiceToggle:l,modelLabel:o,wsReady:d}){const h=nt(z=>z.draftInput),f=nt(z=>z.setDraftInput),m=nt(z=>z.clearDraftInput),b=C.useRef(null),x=C.useRef(null),[E,T]=C.useState(0),[w,S]=C.useState(!1),[k,j]=C.useState(!1),P=Ms(()=>{x.current!==null&&(clearTimeout(x.current),x.current=null),S(!1),j(!1)}),V=Ms(()=>{x.current!==null&&clearTimeout(x.current),S(!0),x.current=setTimeout(()=>{x.current=null,S(!1)},1500)}),J=C.useMemo(()=>{const z=h.trimStart();return!z.startsWith("/")||z.includes(" ")?null:z.slice(1)},[h]),H=C.useMemo(()=>J===null?[]:J===""?L4():O4(J),[J]),ne=H.length>0,te=Ms(z=>{const $=H[z];$&&(f(`/${$.name} `),T(0),b.current?.focus())}),fe=Ms(z=>{if(z.key==="Escape"&&n){z.preventDefault(),w?(x.current!==null&&(clearTimeout(x.current),x.current=null),S(!1),t()&&j(!0)):V();return}if(ne){if(z.key==="ArrowUp"){z.preventDefault(),T($=>$<=0?H.length-1:$-1);return}if(z.key==="ArrowDown"){z.preventDefault(),T($=>$>=H.length-1?0:$+1);return}if(z.key==="Tab"){z.preventDefault(),te(E);return}if(z.key==="Escape"){z.preventDefault(),m(),T(0);return}}z.key==="Enter"&&!z.shiftKey&&(z.preventDefault(),e())});return C.useLayoutEffect(()=>{T(0)},[H.length]),C.useLayoutEffect(()=>{n||P()},[n,P]),C.useLayoutEffect(()=>()=>{x.current!==null&&clearTimeout(x.current)},[]),C.useLayoutEffect(()=>{const z=b.current;z&&(z.style.height="auto",z.style.height=`${Math.min(z.scrollHeight,jx)}px`,z.style.overflowY=z.scrollHeight>jx?"auto":"hidden")},[h]),v.jsxs("div",{className:Fn.controlFrame,children:[ne&&v.jsx("ul",{className:Fn.slashMenu,role:"listbox",children:H.map((z,$)=>v.jsxs("li",{role:"option","aria-selected":$===E,className:`${Fn.slashMenuItem} ${$===E?Fn.slashMenuItemActive:""}`,onMouseDown:Y=>{Y.preventDefault(),te($)},onMouseEnter:()=>T($),children:[v.jsxs("span",{className:Fn.slashMenuName,children:["/",z.name]}),v.jsx("span",{className:Fn.slashMenuDesc,children:z.description})]},z.name))}),v.jsxs("div",{className:Fn.inputRow,children:[v.jsx("textarea",{ref:b,className:Fn.input,value:h,onChange:z=>f(z.target.value),onKeyDown:fe,rows:1,placeholder:k?"Cancelling AI...":n?w?"Press Esc again to cancel AI, or Enter to queue the next message":"AI is thinking... press Esc twice to cancel or Enter to queue the next message":"Ask the AI...",disabled:!d}),v.jsx("dt-tooltip",{content:s?"Stop voice input":"Start voice input",children:v.jsx("button",{className:`${Fn.voiceButton} ${s?Fn.voiceButtonActive:""}`,onClick:l,children:v.jsx(bH,{})})})]}),v.jsxs("div",{className:Fn.statusRow,children:[v.jsx("span",{className:Fn.statusItem,children:d?o:"offline"}),i>0&&v.jsxs("span",{className:Fn.statusItem,children:[i," queued"]})]})]})}const RH="_infoPanel_1fshd_1",OH="_header_1fshd_12",LH="_headerPrimary_1fshd_27",MH="_sessionControls_1fshd_36",IH="_newSessionButton_1fshd_49",DH="_headerControls_1fshd_75",BH="_tokenCount_1fshd_81",zH="_messages_1fshd_106",PH="_placeholder_1fshd_114",HH="_queuedMessage_1fshd_125",UH="_queuedMessageHeader_1fshd_136",jH="_queuedSpeaker_1fshd_143",FH="_queuedBadge_1fshd_150",$H="_queuedMessageBody_1fshd_163",qH="_partialTranscript_1fshd_167",YH="_partialDot_1fshd_180",VH="_voiceListening_1fshd_190",GH="_voiceSpeaking_1fshd_191",WH="_voiceProcessing_1fshd_192",QH="_listeningDot_1fshd_204",XH="_speakingWave_1fshd_218",KH="_voiceError_1fshd_242",wt={infoPanel:RH,header:OH,headerPrimary:LH,sessionControls:MH,newSessionButton:IH,headerControls:DH,tokenCount:BH,messages:zH,placeholder:PH,queuedMessage:HH,queuedMessageHeader:UH,queuedSpeaker:jH,queuedBadge:FH,queuedMessageBody:$H,partialTranscript:qH,partialDot:YH,voiceListening:VH,voiceSpeaking:GH,voiceProcessing:WH,listeningDot:QH,speakingWave:XH,voiceError:KH};function ZH({socket:e,wsReady:t}){const[n,i]=C.useState([]),s=C.useRef(null),l=C.useRef(new Set),o=C.useRef([]),d=nt(F=>F.messages),h=nt(F=>F.isAiRunning),f=nt(F=>F.activeRequestId),m=nt(F=>F.modelLabel),b=nt(F=>F.tokenCount),x=nt(F=>F.currentSessionId),E=nt(F=>F.sessions),T=nt(F=>F.pendingQuestion),w=nt(F=>F.loadProviders),S=nt(F=>F.loadSessions),k=nt(F=>F.switchSession),j=nt(F=>F.createSession),P=nt(F=>F.cancelAiRequest),V=nt(F=>F.submitPrompt),J=nt(F=>F.answerQuestion),H=nt(F=>F.clearDraftInput),ne=nt(F=>F.handleAiEvent),te=nt(F=>F.clearMessages),fe=nt(F=>F.addSystemMessage),z=Lr(F=>F.status),$=Lr(F=>F.errorMessage),Y=Lr(F=>F.partialText),_e=Lr(F=>F.transcripts),ce=Lr(F=>F.startVoice),ue=Lr(F=>F.stopVoice),I=z!=="idle"&&z!=="error",ie=f?`assistant-${f}`:null,Ee=h||!e||e.readyState!==WebSocket.OPEN||!t;C.useEffect(()=>{t&&w()},[w,t]),C.useEffect(()=>{!e||!t||e.readyState!==WebSocket.OPEN||S(e)},[S,e,t]),C.useEffect(()=>{if(!e)return;const F=be=>{try{const ye=JSON.parse(String(be.data));if(ye.type!=="ai:event"||!ye.event)return;ne(ye.event)}catch{}};return e.addEventListener("message",F),()=>{e.removeEventListener("message",F)}},[e,ne]);const ke=Ms(()=>{if(h||!e||e.readyState!==WebSocket.OPEN)return;const F=o.current.shift();if(!F)return;V(F.text,"voice",e)||o.current.unshift(F)});C.useEffect(()=>{for(const F of _e)!F.isFinal||l.current.has(F.utteranceId)||(l.current.add(F.utteranceId),o.current.push({utteranceId:F.utteranceId,text:F.text}));ke()},[_e,ke]),C.useEffect(()=>{h||ke()},[h,ke]),C.useEffect(()=>{i([]),o.current=[],l.current.clear()},[x]),C.useEffect(()=>{if(h||!e||e.readyState!==WebSocket.OPEN||n.length===0)return;const[F]=n;V(F.text,F.source,e)&&i(ye=>ye.slice(1))},[h,n,e,V]);const R=Ms(()=>{const F=nt.getState().draftInput.trim();if(!F||!e)return;if(F.startsWith("/")&&R4(F,{socket:e,createSession:j,clearMessages:te,addSystemMessage:fe})){H();return}if(h){i(ye=>[...ye,{id:`queued-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,source:"text",text:F}]),H();return}V(F,"text",e)&&H()}),D=C.useCallback(()=>{I?ue():ce()},[I,ce,ue]);C.useEffect(()=>{s.current?.scrollIntoView({behavior:"smooth"})},[d,n,_e,Y]);const ee=C.useCallback(()=>{e&&j(e)&&H()},[H,j,e]),O=C.useCallback(()=>e?P(e):!1,[P,e]);return v.jsxs("div",{className:wt.infoPanel,children:[v.jsxs("div",{className:wt.header,children:[v.jsx("div",{className:wt.headerPrimary,children:v.jsxs("div",{className:wt.sessionControls,children:[v.jsx("dt-select",{value:x??"",options:E.map(F=>({value:F.id,label:F.label})),placeholder:"New session",align:"right",disabled:Ee,"ondt-change":F=>{e&&k(F.detail.value,e)}}),v.jsx("button",{type:"button",className:wt.newSessionButton,onClick:ee,disabled:Ee,"aria-label":"Create new session",title:"Create new session",children:"+"})]})}),v.jsx("div",{className:wt.headerControls,children:b>0&&v.jsxs("span",{className:wt.tokenCount,children:[b," tokens"]})})]}),v.jsxs("div",{className:wt.messages,children:[d.length===0&&n.length===0&&_e.length===0&&!Y?v.jsx("div",{className:wt.placeholder,children:"Ask the AI to interact with your MiniApps, or use voice input"}):v.jsxs(v.Fragment,{children:[d.map(F=>{const be=F.id===ie,Re=F.role==="assistant"&&!F.content&&!F.thinkingContent&&h&&be;return v.jsx(bA,{message:F,isThinking:Re,isStreaming:F.role==="assistant"&&h&&be},F.id)}),n.map((F,be)=>v.jsxs("div",{className:wt.queuedMessage,children:[v.jsxs("div",{className:wt.queuedMessageHeader,children:[v.jsx("span",{className:wt.queuedSpeaker,children:"ME"}),v.jsx("span",{className:wt.queuedBadge,children:be===0?"next":"queued"})]}),v.jsx("div",{className:wt.queuedMessageBody,children:F.text})]},F.id)),T&&e&&v.jsx(gA,{question:T,onAnswer:(F,be)=>{J(F,be,e)}})]}),Y&&v.jsxs("div",{className:wt.partialTranscript,children:[v.jsx("span",{className:wt.partialDot}),Y]}),I&&!Y&&z==="listening"&&v.jsxs("div",{className:wt.voiceListening,children:[v.jsx("span",{className:wt.listeningDot}),"Listening for speech..."]}),z==="speaking"&&!Y&&v.jsxs("div",{className:wt.voiceSpeaking,children:[v.jsx("span",{className:wt.speakingWave}),"Detecting speech..."]}),z==="processing"&&v.jsx("div",{className:wt.voiceProcessing,children:"Transcribing..."}),$&&v.jsx("div",{className:wt.voiceError,children:$}),v.jsx("div",{ref:s})]}),v.jsx(yA,{onSubmit:R,onCancelAi:O,isAiRunning:h,queuedCount:n.length,isVoiceActive:I,onVoiceToggle:D,modelLabel:m,wsReady:t})]})}const JH="_compactPanel_11w4u_1",eU="_dragHandle_11w4u_30",tU="_dragHandleLine_11w4u_50",nU="_messageArea_11w4u_57",rU="_placeholder_11w4u_64",iU="_partialTranscript_11w4u_71",aU="_partialDot_11w4u_83",sU="_voiceListening_11w4u_101",lU="_voiceSpeaking_11w4u_102",uU="_voiceProcessing_11w4u_103",oU="_listeningDot_11w4u_113",cU="_speakingWave_11w4u_114",dU="_commandInputWrapper_11w4u_144",$n={compactPanel:JH,dragHandle:eU,dragHandleLine:tU,messageArea:nU,placeholder:rU,partialTranscript:iU,partialDot:aU,voiceListening:sU,voiceSpeaking:lU,voiceProcessing:uU,listeningDot:oU,speakingWave:cU,commandInputWrapper:dU};function fU({socket:e,wsReady:t}){const[n,i]=C.useState({x:0,y:0}),[s,l]=C.useState(!1),o=C.useRef({x:0,y:0}),d=C.useRef(null),h=nt(Y=>Y.messages),f=nt(Y=>Y.isAiRunning),m=nt(Y=>Y.activeRequestId),b=nt(Y=>Y.modelLabel),x=nt(Y=>Y.cancelAiRequest),E=nt(Y=>Y.submitPrompt),T=nt(Y=>Y.clearDraftInput),w=Lr(Y=>Y.status),S=Lr(Y=>Y.partialText),k=Lr(Y=>Y.startVoice),j=Lr(Y=>Y.stopVoice),P=w!=="idle"&&w!=="error",V=m?`assistant-${m}`:null,J=h[h.length-1],H=C.useCallback(Y=>{Y.preventDefault(),l(!0),o.current={x:Y.clientX-n.x,y:Y.clientY-n.y},d.current?.setPointerCapture(Y.pointerId)},[n]),ne=C.useCallback(Y=>{if(!s)return;const _e=Y.clientX-o.current.x,ce=Y.clientY-o.current.y;i({x:_e,y:ce})},[s]),te=C.useCallback(Y=>{l(!1),d.current?.releasePointerCapture(Y.pointerId)},[]),fe=C.useCallback(()=>{const Y=nt.getState().draftInput.trim();if(!(!Y||!e)){if(f){T();return}E(Y,"text",e),nt.getState().isAiRunning&&T()}},[f,e,E,T]),z=C.useCallback(()=>{P?j():k()},[P,k,j]),$=C.useCallback(()=>e?x(e):!1,[x,e]);return v.jsxs("div",{ref:d,className:$n.compactPanel,style:{transform:`translate(${n.x}px, ${n.y}px)`},onPointerMove:ne,onPointerUp:te,onPointerCancel:te,children:[v.jsx("div",{className:$n.dragHandle,onPointerDown:H,role:"button","aria-label":"Drag to move",tabIndex:0,children:v.jsx("div",{className:$n.dragHandleLine})}),v.jsxs("div",{className:$n.messageArea,children:[J?v.jsx(bA,{message:J,isThinking:J.id===V&&J.role==="assistant"&&!J.content&&!J.thinkingContent&&f,isStreaming:J.role==="assistant"&&f&&J.id===V}):v.jsx("div",{className:$n.placeholder,children:"Ask the AI to get started"}),S&&v.jsxs("div",{className:$n.partialTranscript,children:[v.jsx("span",{className:$n.partialDot}),S]}),P&&!S&&w==="listening"&&v.jsxs("div",{className:$n.voiceListening,children:[v.jsx("span",{className:$n.listeningDot}),"Listening for speech..."]}),w==="speaking"&&!S&&v.jsxs("div",{className:$n.voiceSpeaking,children:[v.jsx("span",{className:$n.speakingWave}),"Detecting speech..."]}),w==="processing"&&v.jsx("div",{className:$n.voiceProcessing,children:"Transcribing..."})]}),v.jsx("div",{className:$n.commandInputWrapper,children:v.jsx(yA,{onSubmit:fe,onCancelAi:$,isAiRunning:f,queuedCount:0,isVoiceActive:P,onVoiceToggle:z,modelLabel:b,wsReady:t})})]})}const hU="_window_k9cdu_1",pU="_windowFocused_k9cdu_16",mU="_windowDragging_k9cdu_21",gU="_windowFullscreen_k9cdu_28",bU="_chrome_k9cdu_54",yU="_trafficLights_k9cdu_65",EU="_trafficLightClose_k9cdu_88 _trafficLight_k9cdu_65",xU="_trafficLightFullscreen_k9cdu_99 _trafficLight_k9cdu_65",vU="_title_k9cdu_110",_U="_body_k9cdu_124",kr={window:hU,windowFocused:pU,windowDragging:mU,windowFullscreen:gU,chrome:bU,trafficLights:yU,trafficLightClose:EU,trafficLightFullscreen:xU,title:vU,body:_U},TU=5;function EA({window:e,tileRect:t,title:n,isFocused:i,showCloseButton:s=!0,showFullscreenButton:l=!0,draggable:o=!1,onFocus:d,isOverlayMaximized:h=!1,children:f}){const m=C.useRef(null),b=ut(V=>V.fullscreenWindowId),x=e.id===b,E=i??e.focused,T=si(V=>V.isDragging&&V.dragWindowId===e.id),w=C.useRef(null),S=C.useCallback(()=>{if(d){d();return}const V=ut.getState();V.focusedWindowId!==e.id&&V.focusWindow(e.id)},[d,e.id]);C.useEffect(()=>()=>{w.current=null},[]);const k=C.useCallback(V=>{if(!o||V.button!==0||V.target.closest("button")||ut.getState().fullscreenWindowId)return;const ne=V.clientX,te=V.clientY;w.current={startX:ne,startY:te,activated:!1};let fe=null;const z=()=>{w.current=null,document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",Y),document.removeEventListener("keydown",_e),document.body.style.cursor="",document.body.style.userSelect="",fe&&(fe.remove(),fe=null)},$=ce=>{const ue=w.current;if(!ue)return;const I=ce.clientX-ue.startX,ie=ce.clientY-ue.startY;!ue.activated&&Math.sqrt(I*I+ie*ie)>=TU&&(ue.activated=!0,si.getState().startDrag(e.id),fe=document.createElement("style"),fe.textContent="iframe { pointer-events: none !important; }",document.head.appendChild(fe))},Y=()=>{const ce=w.current;if(z(),ce?.activated){const I=si.getState().finishDrag();I&&ut.getState().relocateWindow(I.sourceWindowId,I.target.windowId,I.target.edge)}},_e=ce=>{ce.key==="Escape"&&(z(),si.getState().cancelDrag())};document.addEventListener("mousemove",$),document.addEventListener("mouseup",Y),document.addEventListener("keydown",_e),document.body.style.cursor="grabbing",document.body.style.userSelect="none"},[o,e.id]),j=[kr.window,E?kr.windowFocused:"",x&&h?kr.windowFullscreen:"",T?kr.windowDragging:""].filter(Boolean).join(" "),P=x?{}:t?{position:"absolute",left:t.x,top:t.y,width:t.width,height:t.height}:{};return v.jsxs("div",{ref:m,className:j,style:P,"data-window-id":e.id,onMouseDown:S,children:[v.jsxs("div",{className:kr.chrome,onMouseDown:k,style:o?{cursor:"grab"}:void 0,children:[v.jsxs("div",{className:kr.trafficLights,children:[s&&v.jsx("button",{className:kr.trafficLightClose,onClick:V=>{V.stopPropagation(),ut.getState().closeWindow(e.id)}}),l&&v.jsx("button",{className:kr.trafficLightFullscreen,onClick:V=>{V.stopPropagation(),ut.getState().maximizeWindow(e.id)}})]}),v.jsx("div",{className:kr.title,children:n??e.title})]}),v.jsx("div",{className:kr.body,children:f})]})}const Fx=1e3,AU=15e3;function SU(){const[e,t]=C.useState("connecting"),[n,i]=C.useState(null),[s,l]=C.useState(null),o=C.useRef(null),d=C.useRef(null),h=C.useRef(null),f=C.useRef(Fx),m=C.useRef(!1);return C.useEffect(()=>{const x=`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws`;let E=!1;const T=()=>{d.current!==null&&(window.clearTimeout(d.current),d.current=null),h.current!==null&&(window.clearInterval(h.current),h.current=null)},w=()=>{if(E||d.current!==null)return;const k=f.current,j=Date.now()+k;t("reconnecting"),l(Math.max(1,Math.ceil(k/1e3))),h.current=window.setInterval(()=>{const P=Math.max(0,Math.ceil((j-Date.now())/1e3));l(P)},1e3),d.current=window.setTimeout(()=>{T(),l(null),S()},k),f.current=Math.min(f.current*2,AU)},S=()=>{if(E)return;T(),l(null),t(m.current?"reconnecting":"connecting");const k=new WebSocket(x);o.current=k,i(k),k.addEventListener("open",()=>{E||o.current!==k||(console.log("[shell] WebSocket connected"),m.current=!0,f.current=Fx,xC(k),t("connected"),l(null))}),k.addEventListener("close",()=>{o.current===k&&(o.current=null,i(null),!E&&(console.log("[shell] WebSocket disconnected"),w()))}),k.addEventListener("error",j=>{console.error("[shell] WebSocket error:",j)})};return S(),()=>{E=!0,T();const k=o.current;o.current=null,k&&(k.readyState===WebSocket.OPEN||k.readyState===WebSocket.CONNECTING)&&k.close()}},[]),{status:e,socket:n,retryInSeconds:s}}const wU={note:()=>ii(()=>import("./frontend-DpmnQ1w4.js"),[]),"file-explorer":()=>ii(()=>import("./frontend-B1Lvc6Rl.js"),[]),preference:()=>ii(()=>import("./frontend-BAknU-ge.js"),[]),preview:()=>ii(()=>import("./frontend-0mUhlxkg.js"),[]),player:()=>ii(()=>import("./frontend-DzPuSfWJ.js"),[]),terminal:()=>ii(()=>import("./frontend-Dn0dKARf.js"),[]),"text-edit":()=>ii(()=>import("./frontend-yvqb_XNo.js"),[])},$x=new Map;async function kU(e){const t=$x.get(e);if(t)return t;const n=wU[e];if(!n)throw new Error(`No frontend bundle found for miniapp: ${e}`);const i=await n();return $x.set(e,i),i}function CU({miniAppId:e,message:t}){return v.jsxs("div",{style:{padding:24,color:"var(--dt-text-muted)"},children:[v.jsx("h3",{children:e}),v.jsx("p",{children:t})]})}function NU({miniAppId:e,windowId:t,args:n,themePreferences:i}){const s=C.useRef(null),[l,o]=C.useState(null),d=C.useRef(null),h=C.useRef(null);return C.useEffect(()=>{window.dispatchEvent(new CustomEvent("desktalk:theme-update",{detail:{windowId:t,miniAppId:e,theme:{accentColor:i.accentColor,mode:i.theme}}}))},[e,i.accentColor,i.theme,t]),C.useEffect(()=>{let f=!1;return kU(e).then(m=>{!f&&s.current&&(d.current=m,h.current=m.activate({root:s.current,miniAppId:e,windowId:t,args:n,theme:{accentColor:i.accentColor,mode:i.theme}}),o(null))}).catch(m=>{f||o(m.message)}),()=>{f=!0;const m=h.current;h.current=null,d.current=null,m&&queueMicrotask(()=>{m.deactivate()})}},[n,e,t]),l?v.jsx(CU,{miniAppId:e,message:l}):v.jsx("div",{ref:s,style:{width:"100%",height:"100%"}})}const RU="_tileSplit_zwnh1_1",OU="_tileSplitHorizontal_zwnh1_9",LU="_tileSplitVertical_zwnh1_14",MU="_tilePane_zwnh1_19",IU="_tileLeaf_zwnh1_20",Ns={tileSplit:RU,tileSplitHorizontal:OU,tileSplitVertical:LU,tilePane:MU,tileLeaf:IU},qx=4;function DU({win:e,themePreferences:t,isOverlayMaximized:n=!1,draggable:i=!1}){return v.jsx(EA,{window:e,isOverlayMaximized:n,draggable:i,children:v.jsx(NU,{miniAppId:e.miniAppId,windowId:e.id,args:e.args,themePreferences:t})})}function Zp({node:e,windowsById:t,themePreferences:n,path:i=[],canDrag:s=!1}){if(e.type==="leaf"){const f=t.get(e.windowId);return f?v.jsx("div",{className:Ns.tileLeaf,children:v.jsx(DU,{win:f,themePreferences:n,isOverlayMaximized:f.maximized,draggable:s})}):null}const[l,o]=e.children,d=e.split==="horizontal"?{gridTemplateColumns:`minmax(0, ${e.ratio}fr) ${qx}px minmax(0, ${1-e.ratio}fr)`}:{gridTemplateRows:`minmax(0, ${e.ratio}fr) ${qx}px minmax(0, ${1-e.ratio}fr)`},h=[Ns.tileSplit,e.split==="horizontal"?Ns.tileSplitHorizontal:Ns.tileSplitVertical].filter(Boolean).join(" ");return v.jsxs("div",{className:h,style:d,children:[v.jsx("div",{className:Ns.tilePane,children:v.jsx(Zp,{node:l,windowsById:t,themePreferences:n,path:[...i,0],canDrag:s})}),v.jsx(t_,{path:i,split:e.split,ratio:e.ratio}),v.jsx("div",{className:Ns.tilePane,children:v.jsx(Zp,{node:o,windowsById:t,themePreferences:n,path:[...i,1],canDrag:s})})]})}function BU(){lu("desktalk:bridge:get-state",e=>{const t=e.detail;if(!t?.selector)return;const n=ut.getState(),i=s=>({id:s.id,miniAppId:s.miniAppId,title:s.title,focused:s.id===n.focusedWindowId,maximized:s.id===n.fullscreenWindowId||!!s.maximized});try{switch(t.selector){case"desktop.summary":t.resolve({focusedWindowId:n.focusedWindowId,fullscreenWindowId:n.fullscreenWindowId,windows:n.windows.map(i)});return;case"desktop.windows":t.resolve(n.windows.map(i));return;case"desktop.focusedWindow":{const s=n.windows.find(l=>l.id===n.focusedWindowId);t.resolve(s?i(s):null);return}case"theme.current":{const s=getComputedStyle(document.documentElement),l=["--dt-bg","--dt-bg-subtle","--dt-surface","--dt-text","--dt-text-secondary","--dt-text-muted","--dt-border","--dt-accent","--dt-danger","--dt-success","--dt-warning","--dt-info"].reduce((o,d)=>(o[d]=s.getPropertyValue(d).trim(),o),{});t.resolve({mode:document.documentElement.dataset.theme==="dark"?"dark":"light",tokens:l});return}}}catch(s){t.reject(s.message)}})}function zU(e){const t=C.useRef(new Map),n=C.useCallback((i,s)=>{const l=t.current.get(i)??new Map;return s.map(o=>{const d=l.get(o.name);return d?{...o,handler:d}:null}).filter(o=>o!==null)},[]);return C.useEffect(()=>(jy(e),()=>{jy(null)}),[e]),C.useEffect(()=>{if(!e)return;const i=(l,o,d,h,f,m)=>{const b=ut.getState();let x;try{switch(l){case"open":{if(!d||!h)break;cr.post(`/api/miniapps/${encodeURIComponent(d)}/activate`,{args:m}),x=b.openWindow(d,h,m);break}case"close":o&&b.closeWindow(o);break;case"focus":o&&b.focusWindow(o);break;case"maximize":o&&b.maximizeWindow(o);break;default:console.warn(`[shell] Unknown AI window command: ${l}`)}if(f){const E=e;E&&E.readyState===WebSocket.OPEN&&E.send(JSON.stringify({type:"window:ai_command_result",requestId:f,ok:!0,action:l,windowId:x??o}))}}catch(E){if(f){const T=e;T&&T.readyState===WebSocket.OPEN&&T.send(JSON.stringify({type:"window:ai_command_result",requestId:f,ok:!1,error:E.message}))}}},s=l=>{try{const o=JSON.parse(l.data);if(o.type==="window:state"){const d=o;ut.getState().restoreFromBackend({version:2,windows:d.windows??[],tree:d.tree??null,focusedWindowId:typeof d.focusedWindowId=="string"?d.focusedWindowId:null,fullscreenWindowId:typeof d.fullscreenWindowId=="string"?d.fullscreenWindowId:null,windowIdCounter:typeof d.windowIdCounter=="number"?d.windowIdCounter:0,nextSplitDirection:d.nextSplitDirection==="horizontal"||d.nextSplitDirection==="vertical"||d.nextSplitDirection==="auto"?d.nextSplitDirection:"auto"});return}if(o.type==="window:ai_command"){const{action:d,windowId:h,miniAppId:f,title:m,requestId:b,args:x}=o;i(d,h,f,m,b,x);return}if(o.type==="window:invoke_action"){const d=o.requestId,h=o.windowId,f=o.actionName;if(!d||!h||!f)return;const m=t.current.get(h)?.get(f);if(!m){h0(d,void 0,`Action not available on window ${h}: ${f}`);return}m(o.params).then(b=>{h0(d,b)}).catch(b=>{h0(d,void 0,b.message)})}}catch{}};return e.addEventListener("message",s),()=>{e.removeEventListener("message",s)}},[e]),{actionHandlersRef:t,buildClientActions:n}}function PU(e){const t=e.target;if(!t)return!1;const n=t.tagName;return!!(n==="INPUT"||n==="TEXTAREA"||n==="SELECT"||t.isContentEditable)}function HU(){C.useEffect(()=>{function e(t){if(!t.altKey||PU(t))return;const n=ut.getState(),i=t.code;if(i==="Digit1"||i==="Digit2"||i==="Digit3"){t.preventDefault();const s=parseInt(i.charAt(5),10);n.focusNth(s);return}if(!t.shiftKey)switch(i){case"KeyH":t.preventDefault(),n.focusDirection("left");return;case"KeyL":t.preventDefault(),n.focusDirection("right");return;case"KeyK":t.preventDefault(),n.focusDirection("up");return;case"KeyJ":t.preventDefault(),n.focusDirection("down");return}if(t.shiftKey)switch(i){case"KeyH":t.preventDefault(),n.swapDirection("left");return;case"KeyL":t.preventDefault(),n.swapDirection("right");return;case"KeyK":t.preventDefault(),n.swapDirection("up");return;case"KeyJ":t.preventDefault(),n.swapDirection("down");return}if(i==="KeyF"&&!t.shiftKey){t.preventDefault(),n.toggleFullscreen();return}if(i==="KeyW"&&!t.shiftKey){t.preventDefault(),n.focusedWindowId&&n.closeWindow(n.focusedWindowId);return}if(i==="KeyV"&&!t.shiftKey){t.preventDefault(),n.setNextSplitDirection(n.nextSplitDirection==="vertical"?"auto":"vertical");return}if(i==="KeyB"&&!t.shiftKey){t.preventDefault(),n.setNextSplitDirection(n.nextSplitDirection==="horizontal"?"auto":"horizontal");return}if(i==="KeyR"&&!t.shiftKey){t.preventDefault(),n.rotateFocusedSplit();return}if(i==="BracketLeft"&&!t.shiftKey){t.preventDefault(),n.adjustFocusedRatio(-.05);return}if(i==="BracketRight"&&!t.shiftKey){t.preventDefault(),n.adjustFocusedRatio(.05);return}if(i==="Equal"&&!t.shiftKey){t.preventDefault(),n.equalizeFocusedRatio();return}}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[])}var UU=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},xA=UU,jU={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},FU=jU,$U=e=>xA(FU[e.toLowerCase()],6),qU=$U,YU=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,VU=e=>{let t;return(t=e.match(YU))?xA(parseInt(t[1],16),t[1].length):void 0},GU=VU,Vi="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Su=`${Vi}%`,a1=`(?:${Vi}%|${Vi})`,WU=`(?:${Vi}(deg|grad|rad|turn)|${Vi})`,qs="\\s*,\\s*",QU=new RegExp(`^rgba?\\(\\s*${Vi}${qs}${Vi}${qs}${Vi}\\s*(?:,\\s*${a1}\\s*)?\\)$`),XU=new RegExp(`^rgba?\\(\\s*${Su}${qs}${Su}${qs}${Su}\\s*(?:,\\s*${a1}\\s*)?\\)$`),KU=e=>{let t={mode:"rgb"},n;if(n=e.match(QU))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(XU))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]!==void 0?t.alpha=Math.max(0,Math.min(1,n[4]/100)):n[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+n[5]))),t},ZU=KU,JU=(e,t)=>e===void 0?void 0:typeof e!="object"?tm(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,ej=JU,tj=(e="rgb")=>t=>(t=ej(t,e))!==void 0?t.mode===e?t:Ir[t.mode][e]?Ir[t.mode][e](t):e==="rgb"?Ir[t.mode].rgb(t):Ir.rgb[e](Ir[t.mode].rgb(t)):void 0,vA=tj,Ir={},_A={},id=[],TA={},nj=e=>e,at=e=>(Ir[e.mode]={...Ir[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Ir[t]||(Ir[t]={}),Ir[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=nj)}),_A[e.mode]=e,(e.parse||[]).forEach(t=>{ij(t,e.mode)}),vA(e.mode)),rj=e=>_A[e],ij=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");TA[e]=t}else typeof e=="function"&&id.indexOf(e)<0&&id.push(e)},Jp=/[^\x00-\x7F]|[a-zA-Z_]/,aj=/[^\x00-\x7F]|[-\w]/,ge={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},Me=0;function Cc(e){let t=e[Me],n=e[Me+1];return t==="-"||t==="+"?/\d/.test(n)||n==="."&&/\d/.test(e[Me+2]):t==="."?/\d/.test(n):/\d/.test(t)}function em(e){if(Me>=e.length)return!1;let t=e[Me];if(Jp.test(t))return!0;if(t==="-"){if(e.length-Me<2)return!1;let n=e[Me+1];return!!(n==="-"||Jp.test(n))}return!1}var sj={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function su(e){let t="";if((e[Me]==="-"||e[Me]==="+")&&(t+=e[Me++]),t+=Nc(e),e[Me]==="."&&/\d/.test(e[Me+1])&&(t+=e[Me++]+Nc(e)),(e[Me]==="e"||e[Me]==="E")&&((e[Me+1]==="-"||e[Me+1]==="+")&&/\d/.test(e[Me+2])?t+=e[Me++]+e[Me++]+Nc(e):/\d/.test(e[Me+1])&&(t+=e[Me++]+Nc(e))),em(e)){let n=ad(e);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:ge.Hue,value:t*sj[n]}:void 0}return e[Me]==="%"?(Me++,{type:ge.Percentage,value:+t}):{type:ge.Number,value:+t}}function Nc(e){let t="";for(;/\d/.test(e[Me]);)t+=e[Me++];return t}function ad(e){let t="";for(;Me<e.length&&aj.test(e[Me]);)t+=e[Me++];return t}function lj(e){let t=ad(e);return e[Me]==="("?(Me++,{type:ge.Function,value:t}):t==="none"?{type:ge.None,value:void 0}:{type:ge.Ident,value:t}}function uj(e=""){let t=e.trim(),n=[],i;for(Me=0;Me<t.length;){if(i=t[Me++],i===`
|
|
143
|
-
`||i===" "||i===" "){for(;Me<t.length&&(t[Me]===`
|
|
144
|
-
`||t[Me]===" "||t[Me]===" ");)Me++;continue}if(i===",")return;if(i===")"){n.push({type:ge.ParenClose});continue}if(i==="+"){if(Me--,Cc(t)){n.push(su(t));continue}return}if(i==="-"){if(Me--,Cc(t)){n.push(su(t));continue}if(em(t)){n.push({type:ge.Ident,value:ad(t)});continue}return}if(i==="."){if(Me--,Cc(t)){n.push(su(t));continue}return}if(i==="/"){for(;Me<t.length&&(t[Me]===`
|
|
145
|
-
`||t[Me]===" "||t[Me]===" ");)Me++;let s;if(Cc(t)&&(s=su(t),s.type!==ge.Hue)){n.push({type:ge.Alpha,value:s});continue}if(em(t)&&ad(t)==="none"){n.push({type:ge.Alpha,value:{type:ge.None,value:void 0}});continue}return}if(/\d/.test(i)){Me--,n.push(su(t));continue}if(Jp.test(i)){Me--,n.push(lj(t));continue}return}return n}function oj(e){e._i=0;let t=e[e._i++];if(!t||t.type!==ge.Function||t.value!=="color"||(t=e[e._i++],t.type!==ge.Ident))return;let n=TA[t.value];if(!n)return;let i={mode:n},s=AA(e,!1);if(!s)return;let l=rj(n).channels;for(let o=0,d,h;o<l.length;o++)d=s[o],h=l[o],d.type!==ge.None&&(i[h]=d.type===ge.Number?d.value:d.value/100,h==="alpha"&&(i[h]=Math.max(0,Math.min(1,i[h]))));return i}function AA(e,t){let n=[],i;for(;e._i<e.length;){if(i=e[e._i++],i.type===ge.None||i.type===ge.Number||i.type===ge.Alpha||i.type===ge.Percentage||t&&i.type===ge.Hue){n.push(i);continue}if(i.type===ge.ParenClose){if(e._i<e.length)return;continue}return}if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==ge.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:ge.None,value:void 0}),n.every(s=>s.type!==ge.Alpha)?n:void 0}}function cj(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==ge.Function)return;let i=AA(e,t);if(i)return i.unshift(n.value),i}var dj=e=>{if(typeof e!="string")return;let t=uj(e),n=t?cj(t,!0):void 0,i,s=0,l=id.length;for(;s<l;)if((i=id[s++](e,n))!==void 0)return i;return t?oj(t):void 0},tm=dj;function fj(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let n={mode:"rgb"},[,i,s,l,o]=t;if(!(i.type===ge.Hue||s.type===ge.Hue||l.type===ge.Hue))return i.type!==ge.None&&(n.r=i.type===ge.Number?i.value/255:i.value/100),s.type!==ge.None&&(n.g=s.type===ge.Number?s.value/255:s.value/100),l.type!==ge.None&&(n.b=l.type===ge.Number?l.value/255:l.value/100),o.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,o.type===ge.Number?o.value:o.value/100))),n}var hj=fj,pj=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,mj=pj,gj=(e,t,n)=>e+n*(t-e),bj=e=>{let t=[];for(let n=0;n<e.length-1;n++){let i=e[n],s=e[n+1];i===void 0&&s===void 0?t.push(void 0):i!==void 0&&s!==void 0?t.push([i,s]):t.push(i!==void 0?[i,i]:[s,s])}return t},yj=e=>t=>{let n=bj(t);return i=>{let s=i*n.length,l=i>=1?n.length-1:Math.max(Math.floor(s),0),o=n[l];return o===void 0?void 0:e(o[0],o[1],s-l)}},ve=yj(gj),Ut=e=>{let t=!1,n=e.map(i=>i!==void 0?(t=!0,i):1);return t?n:e},Ej={mode:"rgb",channels:["r","g","b","alpha"],parse:[hj,GU,ZU,qU,mj,"srgb"],serialize:"srgb",interpolate:{r:ve,g:ve,b:ve,alpha:{use:ve,fixup:Ut}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Ks=Ej,j0=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),xj=e=>{let t=j0(e.r),n=j0(e.g),i=j0(e.b),s={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*i,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*i,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*i};return e.alpha!==void 0&&(s.alpha=e.alpha),s},Yx=xj,F0=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),vj=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"a98",r:F0(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:F0(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:F0(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return i!==void 0&&(s.alpha=i),s},Vx=vj,$0=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},_j=({r:e,g:t,b:n,alpha:i})=>{let s={mode:"lrgb",r:$0(e),g:$0(t),b:$0(n)};return i!==void 0&&(s.alpha=i),s},Zs=_j,Tj=e=>{let{r:t,g:n,b:i,alpha:s}=Zs(e),l={mode:"xyz65",x:.4123907992659593*t+.357584339383878*n+.1804807884018343*i,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*i,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*i};return s!==void 0&&(l.alpha=s),l},Ua=Tj,q0=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},Aj=({r:e,g:t,b:n,alpha:i},s="rgb")=>{let l={mode:s,r:q0(e),g:q0(t),b:q0(n)};return i!==void 0&&(l.alpha=i),l},Js=Aj,Sj=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Js({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return i!==void 0&&(s.alpha=i),s},ja=Sj,wj={...Ks,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Vx(Ua(e)),xyz65:Vx},toMode:{rgb:e=>ja(Yx(e)),xyz65:Yx}},kj=wj,Cj=e=>(e=e%360)<0?e+360:e,nn=Cj,Nj=(e,t)=>e.map((n,i,s)=>{if(n===void 0)return n;let l=nn(n);return i===0||e[i-1]===void 0?l:t(l-nn(s[i-1]))}).reduce((n,i)=>!n.length||i===void 0||n[n.length-1]===void 0?(n.push(i),n):(n.push(i+n[n.length-1]),n),[]),oi=e=>Nj(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),Yt=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Rj=Math.PI/180,Oj=180/Math.PI,Gx=Yt[3]*Yt[4],Wx=Yt[1]*Yt[4],Qx=Yt[1]*Yt[2]-Yt[0]*Yt[3],Lj=({r:e,g:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=(Qx*n+e*Gx-t*Wx)/(Qx+Gx-Wx),l=n-s,o=(Yt[4]*(t-s)-Yt[2]*l)/Yt[3],d={mode:"cubehelix",l:s,s:s===0||s===1?void 0:Math.sqrt(l*l+o*o)/(Yt[4]*s*(1-s))};return d.s&&(d.h=Math.atan2(o,l)*Oj-120),i!==void 0&&(d.alpha=i),d},Mj=Lj,Ij=({h:e,s:t,l:n,alpha:i})=>{let s={mode:"rgb"};e=(e===void 0?0:e+120)*Rj,n===void 0&&(n=0);let l=t===void 0?0:t*n*(1-n),o=Math.cos(e),d=Math.sin(e);return s.r=n+l*(Yt[0]*o+Yt[1]*d),s.g=n+l*(Yt[2]*o+Yt[3]*d),s.b=n+l*(Yt[4]*o+Yt[5]*d),i!==void 0&&(s.alpha=i),s},Dj=Ij,Rd=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=nn(e.h),i=nn(t.h),s=Math.sin((i-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*s},Bj=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=nn(e.h),i=nn(t.h);return Math.abs(i-n)>180?n-(i-360*Math.sign(i-n)):i-n},Od=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=nn(e.h),i=nn(t.h),s=Math.sin((i-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*s},ci=e=>{let t=e.reduce((i,s)=>{if(s!==void 0){let l=s*Math.PI/180;i.sin+=Math.sin(l),i.cos+=Math.cos(l)}return i},{sin:0,cos:0}),n=Math.atan2(t.sin,t.cos)*180/Math.PI;return n<0?360+n:n},zj={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Mj},toMode:{rgb:Dj},interpolate:{h:{use:ve,fixup:oi},s:ve,l:ve,alpha:{use:ve,fixup:Ut}},difference:{h:Rd},average:{h:ci}},Pj=zj,Hj=({l:e,a:t,b:n,alpha:i},s="lch")=>{t===void 0&&(t=0),n===void 0&&(n=0);let l=Math.sqrt(t*t+n*n),o={mode:s,l:e,c:l};return l&&(o.h=nn(Math.atan2(n,t)*180/Math.PI)),i!==void 0&&(o.alpha=i),o},Qi=Hj,Uj=({l:e,c:t,h:n,alpha:i},s="lab")=>{n===void 0&&(n=0);let l={mode:s,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return i!==void 0&&(l.alpha=i),l},Xi=Uj,SA=Math.pow(29,3)/Math.pow(3,3),wA=Math.pow(6,3)/Math.pow(29,3),Bt={X:.9642956764295677,Y:1,Z:.8251046025104602},Hs={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},Y0=e=>Math.pow(e,3)>wA?Math.pow(e,3):(116*e-16)/SA,jj=({l:e,a:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=(e+16)/116,l=t/500+s,o=s-n/200,d={mode:"xyz65",x:Y0(l)*Hs.X,y:Y0(s)*Hs.Y,z:Y0(o)*Hs.Z};return i!==void 0&&(d.alpha=i),d},kA=jj,Fj=e=>ja(kA(e)),Ld=Fj,V0=e=>e>wA?Math.cbrt(e):(SA*e+16)/116,$j=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=V0(e/Hs.X),l=V0(t/Hs.Y),o=V0(n/Hs.Z),d={mode:"lab65",l:116*l-16,a:500*(s-l),b:200*(l-o)};return i!==void 0&&(d.alpha=i),d},CA=$j,qj=e=>{let t=CA(Ua(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Md=qj,Ou=.14444444444444443*Math.PI,sd=Math.cos(Ou),ld=Math.sin(Ou),NA=100/Math.log(139/100),Yj=({l:e,c:t,h:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"lab65",l:(Math.exp(e*1/NA)-1)/.0039},l=(Math.exp(.0435*t*1*1)-1)/.075,o=l*Math.cos(n/180*Math.PI-Ou),d=l*Math.sin(n/180*Math.PI-Ou);return s.a=o*sd-d/.83*ld,s.b=o*ld+d/.83*sd,i!==void 0&&(s.alpha=i),s},nm=Yj,Vj=({l:e,a:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=t*sd+n*ld,l=.83*(n*sd-t*ld),o=Math.sqrt(s*s+l*l),d={mode:"dlch",l:NA/1*Math.log(1+.0039*e),c:Math.log(1+.075*o)/(.0435*1*1)};return d.c&&(d.h=nn((Math.atan2(l,s)+Ou)/Math.PI*180)),i!==void 0&&(d.alpha=i),d},rm=Vj,Xx=e=>nm(Qi(e,"dlch")),Kx=e=>Xi(rm(e),"dlab"),Gj={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Xx,rgb:e=>Ld(Xx(e))},fromMode:{lab65:Kx,rgb:e=>Kx(Md(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:ve,a:ve,b:ve,alpha:{use:ve,fixup:Ut}}},Wj=Gj,Qj={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:nm,dlab:e=>Xi(e,"dlab"),rgb:e=>Ld(nm(e))},fromMode:{lab65:rm,dlab:e=>Qi(e,"dlch"),rgb:e=>rm(Md(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:ve,c:ve,h:{use:ve,fixup:oi},alpha:{use:ve,fixup:Ut}},difference:{h:Od},average:{h:ci}},Xj=Qj;function Kj({h:e,s:t,i:n,alpha:i}){e=nn(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:n*(1+t*(3/(2-s)-1)),g:n*(1+t*(3*(1-s)/(2-s)-1)),b:n*(1-t)};break;case 1:l={r:n*(1+t*(3*(1-s)/(2-s)-1)),g:n*(1+t*(3/(2-s)-1)),b:n*(1-t)};break;case 2:l={r:n*(1-t),g:n*(1+t*(3/(2-s)-1)),b:n*(1+t*(3*(1-s)/(2-s)-1))};break;case 3:l={r:n*(1-t),g:n*(1+t*(3*(1-s)/(2-s)-1)),b:n*(1+t*(3/(2-s)-1))};break;case 4:l={r:n*(1+t*(3*(1-s)/(2-s)-1)),g:n*(1-t),b:n*(1+t*(3/(2-s)-1))};break;case 5:l={r:n*(1+t*(3/(2-s)-1)),g:n*(1-t),b:n*(1+t*(3*(1-s)/(2-s)-1))};break;default:l={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return l.mode="rgb",i!==void 0&&(l.alpha=i),l}function Zj({r:e,g:t,b:n,alpha:i}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.max(e,t,n),l=Math.min(e,t,n),o={mode:"hsi",s:e+t+n===0?0:1-3*l/(e+t+n),i:(e+t+n)/3};return s-l!==0&&(o.h=(s===e?(t-n)/(s-l)+(t<n)*6:s===t?(n-e)/(s-l)+2:(e-t)/(s-l)+4)*60),i!==void 0&&(o.alpha=i),o}var Jj={mode:"hsi",toMode:{rgb:Kj},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Zj},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:ve,fixup:oi},s:ve,i:ve,alpha:{use:ve,fixup:Ut}},difference:{h:Rd},average:{h:ci}},eF=Jj;function tF({h:e,s:t,l:n,alpha:i}){e=nn(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let s=n+t*(n<.5?n:1-n),l=s-(s-n)*2*Math.abs(e/60%2-1),o;switch(Math.floor(e/60)){case 0:o={r:s,g:l,b:2*n-s};break;case 1:o={r:l,g:s,b:2*n-s};break;case 2:o={r:2*n-s,g:s,b:l};break;case 3:o={r:2*n-s,g:l,b:s};break;case 4:o={r:l,g:2*n-s,b:s};break;case 5:o={r:s,g:2*n-s,b:l};break;default:o={r:2*n-s,g:2*n-s,b:2*n-s}}return o.mode="rgb",i!==void 0&&(o.alpha=i),o}function nF({r:e,g:t,b:n,alpha:i}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.max(e,t,n),l=Math.min(e,t,n),o={mode:"hsl",s:s===l?0:(s-l)/(1-Math.abs(s+l-1)),l:.5*(s+l)};return s-l!==0&&(o.h=(s===e?(t-n)/(s-l)+(t<n)*6:s===t?(n-e)/(s-l)+2:(e-t)/(s-l)+4)*60),i!==void 0&&(o.alpha=i),o}var rF=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},iF=rF,aF=new RegExp(`^hsla?\\(\\s*${WU}${qs}${Su}${qs}${Su}\\s*(?:,\\s*${a1}\\s*)?\\)$`),sF=e=>{let t=e.match(aF);if(!t)return;let n={mode:"hsl"};return t[3]!==void 0?n.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(n.h=iF(t[1],t[2])),t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?n.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+t[7]))),n},lF=sF;function uF(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let n={mode:"hsl"},[,i,s,l,o]=t;if(i.type!==ge.None){if(i.type===ge.Percentage)return;n.h=i.value}if(s.type!==ge.None){if(s.type===ge.Hue)return;n.s=s.value/100}if(l.type!==ge.None){if(l.type===ge.Hue)return;n.l=l.value/100}return o.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,o.type===ge.Number?o.value:o.value/100))),n}var oF=uF,cF={mode:"hsl",toMode:{rgb:tF},fromMode:{rgb:nF},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[oF,lF],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:ve,fixup:oi},s:ve,l:ve,alpha:{use:ve,fixup:Ut}},difference:{h:Rd},average:{h:ci}},RA=cF;function OA({h:e,s:t,v:n,alpha:i}){e=nn(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:n,g:n*(1-t*s),b:n*(1-t)};break;case 1:l={r:n*(1-t*s),g:n,b:n*(1-t)};break;case 2:l={r:n*(1-t),g:n,b:n*(1-t*s)};break;case 3:l={r:n*(1-t),g:n*(1-t*s),b:n};break;case 4:l={r:n*(1-t*s),g:n*(1-t),b:n};break;case 5:l={r:n,g:n*(1-t),b:n*(1-t*s)};break;default:l={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return l.mode="rgb",i!==void 0&&(l.alpha=i),l}function LA({r:e,g:t,b:n,alpha:i}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.max(e,t,n),l=Math.min(e,t,n),o={mode:"hsv",s:s===0?0:1-l/s,v:s};return s-l!==0&&(o.h=(s===e?(t-n)/(s-l)+(t<n)*6:s===t?(n-e)/(s-l)+2:(e-t)/(s-l)+4)*60),i!==void 0&&(o.alpha=i),o}var dF={mode:"hsv",toMode:{rgb:OA},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:LA},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:ve,fixup:oi},s:ve,v:ve,alpha:{use:ve,fixup:Ut}},difference:{h:Rd},average:{h:ci}},MA=dF;function fF({h:e,w:t,b:n,alpha:i}){if(t===void 0&&(t=0),n===void 0&&(n=0),t+n>1){let s=t+n;t/=s,n/=s}return OA({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:i})}function hF(e){let t=LA(e);if(t===void 0)return;let n=t.s!==void 0?t.s:0,i=t.v!==void 0?t.v:0,s={mode:"hwb",w:(1-n)*i,b:1-i};return t.h!==void 0&&(s.h=t.h),t.alpha!==void 0&&(s.alpha=t.alpha),s}function pF(e,t){if(!t||t[0]!=="hwb")return;let n={mode:"hwb"},[,i,s,l,o]=t;if(i.type!==ge.None){if(i.type===ge.Percentage)return;n.h=i.value}if(s.type!==ge.None){if(s.type===ge.Hue)return;n.w=s.value/100}if(l.type!==ge.None){if(l.type===ge.Hue)return;n.b=l.value/100}return o.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,o.type===ge.Number?o.value:o.value/100))),n}var mF=pF,gF={mode:"hwb",toMode:{rgb:fF},fromMode:{rgb:hF},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[mF],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:ve,fixup:oi},w:ve,b:ve,alpha:{use:ve,fixup:Ut}},difference:{h:Bj},average:{h:ci}},bF=gF,Id=.1593017578125,IA=78.84375,Dd=.8359375,Bd=18.8515625,zd=18.6875;function G0(e){if(e<0)return 0;let t=Math.pow(e,1/IA);return 1e4*Math.pow(Math.max(0,t-Dd)/(Bd-zd*t),1/Id)}function W0(e){if(e<0)return 0;let t=Math.pow(e/1e4,Id);return Math.pow((Dd+Bd*t)/(1+zd*t),IA)}var Q0=e=>Math.max(e/203,0),yF=({i:e,t,p:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=G0(e+.008609037037932761*t+.11102962500302593*n),l=G0(e-.00860903703793275*t-.11102962500302599*n),o=G0(e+.5600313357106791*t-.32062717498731885*n),d={mode:"xyz65",x:Q0(2.070152218389422*s-1.3263473389671556*l+.2066510476294051*o),y:Q0(.3647385209748074*s+.680566024947227*l-.0453045459220346*o),z:Q0(-.049747207535812*s-.0492609666966138*l+1.1880659249923042*o)};return i!==void 0&&(d.alpha=i),d},Zx=yF,X0=(e=0)=>Math.max(e*203,0),EF=({x:e,y:t,z:n,alpha:i})=>{let s=X0(e),l=X0(t),o=X0(n),d=W0(.3592832590121217*s+.6976051147779502*l-.0358915932320289*o),h=W0(-.1920808463704995*s+1.1004767970374323*l+.0753748658519118*o),f=W0(.0070797844607477*s+.0748396662186366*l+.8433265453898765*o),m=.5*d+.5*h,b=1.61376953125*d-3.323486328125*h+1.709716796875*f,x=4.378173828125*d-4.24560546875*h-.132568359375*f,E={mode:"itp",i:m,t:b,p:x};return i!==void 0&&(E.alpha=i),E},Jx=EF,xF={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Zx,rgb:e=>ja(Zx(e))},fromMode:{xyz65:Jx,rgb:e=>Jx(Ua(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:ve,t:ve,p:ve,alpha:{use:ve,fixup:Ut}}},vF=xF,_F=134.03437499999998,TF=16295499532821565e-27,K0=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,Id);return Math.pow((Dd+Bd*t)/(1+zd*t),_F)},Z0=(e=0)=>Math.max(e*203,0),AF=({x:e,y:t,z:n,alpha:i})=>{e=Z0(e),t=Z0(t),n=Z0(n);let s=1.15*e-.15*n,l=.66*t+.34*e,o=K0(.41478972*s+.579999*l+.014648*n),d=K0(-.20151*s+1.120649*l+.0531008*n),h=K0(-.0166008*s+.2648*l+.6684799*n),f=(o+d)/2,m={mode:"jab",j:.44*f/(1-.56*f)-TF,a:3.524*o-4.066708*d+.542708*h,b:.199076*o+1.096799*d-1.295875*h};return i!==void 0&&(m.alpha=i),m},DA=AF,SF=134.03437499999998,ev=16295499532821565e-27,J0=e=>{if(e<0)return 0;let t=Math.pow(e,1/SF);return 1e4*Math.pow((Dd-t)/(zd*t-Bd),1/Id)},ep=e=>e/203,wF=({j:e,a:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=(e+ev)/(.44+.56*(e+ev)),l=J0(s+.13860504*t+.058047316*n),o=J0(s-.13860504*t-.058047316*n),d=J0(s-.096019242*t-.8118919*n),h={mode:"xyz65",x:ep(1.661373024652174*l-.914523081304348*o+.23136208173913045*d),y:ep(-.3250758611844533*l+1.571847026732543*o-.21825383453227928*d),z:ep(-.090982811*l-.31272829*o+1.5227666*d)};return i!==void 0&&(h.alpha=i),h},BA=wF,kF=e=>{let t=DA(Ua(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},zA=kF,CF=e=>ja(BA(e)),PA=CF,NF={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:zA,xyz65:DA},toMode:{rgb:PA,xyz65:BA},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:ve,a:ve,b:ve,alpha:{use:ve,fixup:Ut}}},RF=NF,OF=({j:e,a:t,b:n,alpha:i})=>{t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.sqrt(t*t+n*n),l={mode:"jch",j:e,c:s};return s&&(l.h=nn(Math.atan2(n,t)*180/Math.PI)),i!==void 0&&(l.alpha=i),l},tv=OF,LF=({j:e,c:t,h:n,alpha:i})=>{n===void 0&&(n=0);let s={mode:"jab",j:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return i!==void 0&&(s.alpha=i),s},nv=LF,MF={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:nv,rgb:e=>PA(nv(e))},fromMode:{rgb:e=>tv(zA(e)),jab:tv},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:ve,fixup:oi},c:ve,j:ve,alpha:{use:ve,fixup:Ut}},difference:{h:Od},average:{h:ci}},IF=MF,Pd=Math.pow(29,3)/Math.pow(3,3),s1=Math.pow(6,3)/Math.pow(29,3),tp=e=>Math.pow(e,3)>s1?Math.pow(e,3):(116*e-16)/Pd,DF=({l:e,a:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=(e+16)/116,l=t/500+s,o=s-n/200,d={mode:"xyz50",x:tp(l)*Bt.X,y:tp(s)*Bt.Y,z:tp(o)*Bt.Z};return i!==void 0&&(d.alpha=i),d},l1=DF,BF=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Js({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return i!==void 0&&(s.alpha=i),s},Qu=BF,zF=e=>Qu(l1(e)),HA=zF,PF=e=>{let{r:t,g:n,b:i,alpha:s}=Zs(e),l={mode:"xyz50",x:.436065742824811*t+.3851514688337912*n+.14307845442264197*i,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*i,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*i};return s!==void 0&&(l.alpha=s),l},Xu=PF,np=e=>e>s1?Math.cbrt(e):(Pd*e+16)/116,HF=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=np(e/Bt.X),l=np(t/Bt.Y),o=np(n/Bt.Z),d={mode:"lab",l:116*l-16,a:500*(s-l),b:200*(l-o)};return i!==void 0&&(d.alpha=i),d},u1=HF,UF=e=>{let t=u1(Xu(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},UA=UF;function jF(e,t){if(!t||t[0]!=="lab")return;let n={mode:"lab"},[,i,s,l,o]=t;if(!(i.type===ge.Hue||s.type===ge.Hue||l.type===ge.Hue))return i.type!==ge.None&&(n.l=Math.min(Math.max(0,i.value),100)),s.type!==ge.None&&(n.a=s.type===ge.Number?s.value:s.value*125/100),l.type!==ge.None&&(n.b=l.type===ge.Number?l.value:l.value*125/100),o.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,o.type===ge.Number?o.value:o.value/100))),n}var FF=jF,$F={mode:"lab",toMode:{xyz50:l1,rgb:HA},fromMode:{xyz50:u1,rgb:UA},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[FF],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:ve,a:ve,b:ve,alpha:{use:ve,fixup:Ut}}},o1=$F,qF={...o1,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:kA,rgb:Ld},fromMode:{xyz65:CA,rgb:Md},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},YF=qF;function VF(e,t){if(!t||t[0]!=="lch")return;let n={mode:"lch"},[,i,s,l,o]=t;if(i.type!==ge.None){if(i.type===ge.Hue)return;n.l=Math.min(Math.max(0,i.value),100)}if(s.type!==ge.None&&(n.c=Math.max(0,s.type===ge.Number?s.value:s.value*150/100)),l.type!==ge.None){if(l.type===ge.Percentage)return;n.h=l.value}return o.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,o.type===ge.Number?o.value:o.value/100))),n}var GF=VF,WF={mode:"lch",toMode:{lab:Xi,rgb:e=>HA(Xi(e))},fromMode:{rgb:e=>Qi(UA(e)),lab:Qi},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[GF],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:ve,fixup:oi},c:ve,l:ve,alpha:{use:ve,fixup:Ut}},difference:{h:Od},average:{h:ci}},c1=WF,QF={...c1,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Xi(e,"lab65"),rgb:e=>Ld(Xi(e,"lab65"))},fromMode:{rgb:e=>Qi(Md(e),"lch65"),lab65:e=>Qi(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},XF=QF,KF=({l:e,u:t,v:n,alpha:i})=>{t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.sqrt(t*t+n*n),l={mode:"lchuv",l:e,c:s};return s&&(l.h=nn(Math.atan2(n,t)*180/Math.PI)),i!==void 0&&(l.alpha=i),l},jA=KF,ZF=({l:e,c:t,h:n,alpha:i})=>{n===void 0&&(n=0);let s={mode:"luv",l:e,u:t?t*Math.cos(n/180*Math.PI):0,v:t?t*Math.sin(n/180*Math.PI):0};return i!==void 0&&(s.alpha=i),s},FA=ZF,$A=(e,t,n)=>4*e/(e+15*t+3*n),qA=(e,t,n)=>9*t/(e+15*t+3*n),JF=$A(Bt.X,Bt.Y,Bt.Z),e$=qA(Bt.X,Bt.Y,Bt.Z),t$=e=>e<=s1?Pd*e:116*Math.cbrt(e)-16,n$=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=t$(t/Bt.Y),l=$A(e,t,n),o=qA(e,t,n);!isFinite(l)||!isFinite(o)?s=l=o=0:(l=13*s*(l-JF),o=13*s*(o-e$));let d={mode:"luv",l:s,u:l,v:o};return i!==void 0&&(d.alpha=i),d},im=n$,r$=(e,t,n)=>4*e/(e+15*t+3*n),i$=(e,t,n)=>9*t/(e+15*t+3*n),a$=r$(Bt.X,Bt.Y,Bt.Z),s$=i$(Bt.X,Bt.Y,Bt.Z),l$=({l:e,u:t,v:n,alpha:i})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),n===void 0&&(n=0);let s=t/(13*e)+a$,l=n/(13*e)+s$,o=Bt.Y*(e<=8?e/Pd:Math.pow((e+16)/116,3)),d=o*(9*s)/(4*l),h=o*(12-3*s-20*l)/(4*l),f={mode:"xyz50",x:d,y:o,z:h};return i!==void 0&&(f.alpha=i),f},am=l$,u$=e=>jA(im(Xu(e))),o$=e=>Qu(am(FA(e))),c$={mode:"lchuv",toMode:{luv:FA,rgb:o$},fromMode:{rgb:u$,luv:jA},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:ve,fixup:oi},c:ve,l:ve,alpha:{use:ve,fixup:Ut}},difference:{h:Od},average:{h:ci}},d$=c$,f$={...Ks,mode:"lrgb",toMode:{rgb:Js},fromMode:{rgb:Zs},parse:["srgb-linear"],serialize:"srgb-linear"},h$=f$,p$={mode:"luv",toMode:{xyz50:am,rgb:e=>Qu(am(e))},fromMode:{xyz50:im,rgb:e=>im(Xu(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:ve,u:ve,v:ve,alpha:{use:ve,fixup:Ut}}},m$=p$,g$=({r:e,g:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*n),l=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*n),o=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*n),d={mode:"oklab",l:.210454268309314*s+.7936177747023054*l-.0040720430116193*o,a:1.9779985324311684*s-2.42859224204858*l+.450593709617411*o,b:.0259040424655478*s+.7827717124575296*l-.8086757549230774*o};return i!==void 0&&(d.alpha=i),d},YA=g$,b$=e=>{let t=YA(Zs(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Hd=b$,y$=({l:e,a:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.pow(e+.3963377773761749*t+.2158037573099136*n,3),l=Math.pow(e-.1055613458156586*t-.0638541728258133*n,3),o=Math.pow(e-.0894841775298119*t-1.2914855480194092*n,3),d={mode:"lrgb",r:4.076741636075957*s-3.3077115392580616*l+.2309699031821044*o,g:-1.2684379732850317*s+2.6097573492876887*l-.3413193760026573*o,b:-.0041960761386756*s-.7034186179359362*l+1.7076146940746117*o};return i!==void 0&&(d.alpha=i),d},Ku=y$,E$=e=>Js(Ku(e)),Ud=E$;function sm(e){let t=1.170873786407767;return .5*(t*e-.206+Math.sqrt((t*e-.206)*(t*e-.206)+4*.03*t*e))}function ud(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function x$(e,t){let n,i,s,l,o,d,h,f;-1.88170328*e-.80936493*t>1?(n=1.19086277,i=1.76576728,s=.59662641,l=.75515197,o=.56771245,d=4.0767416621,h=-3.3077115913,f=.2309699292):1.81444104*e-1.19445276*t>1?(n=.73956515,i=-.45954404,s=.08285427,l=.1254107,o=.14503204,d=-1.2684380046,h=2.6097574011,f=-.3413193965):(n=1.35733652,i=-.00915799,s=-1.1513021,l=-.50559606,o=.00692167,d=-.0041960863,h=-.7034186147,f=1.707614701);let m=n+i*e+s*t+l*e*e+o*e*t,b=.3963377774*e+.2158037573*t,x=-.1055613458*e-.0638541728*t,E=-.0894841775*e-1.291485548*t;{let T=1+m*b,w=1+m*x,S=1+m*E,k=T*T*T,j=w*w*w,P=S*S*S,V=3*b*T*T,J=3*x*w*w,H=3*E*S*S,ne=6*b*b*T,te=6*x*x*w,fe=6*E*E*S,z=d*k+h*j+f*P,$=d*V+h*J+f*H,Y=d*ne+h*te+f*fe;m=m-z*$/($*$-.5*z*Y)}return m}function d1(e,t){let n=x$(e,t),i=Ku({l:1,a:n*e,b:n*t}),s=Math.cbrt(1/Math.max(i.r,i.g,i.b)),l=s*n;return[s,l]}function v$(e,t,n,i,s,l=null){l||(l=d1(e,t));let o;if((n-s)*l[1]-(l[0]-s)*i<=0)o=l[1]*s/(i*l[0]+l[1]*(s-n));else{o=l[1]*(s-1)/(i*(l[0]-1)+l[1]*(s-n));{let d=n-s,h=i,f=.3963377774*e+.2158037573*t,m=-.1055613458*e-.0638541728*t,b=-.0894841775*e-1.291485548*t,x=d+h*f,E=d+h*m,T=d+h*b;{let w=s*(1-o)+o*n,S=o*i,k=w+S*f,j=w+S*m,P=w+S*b,V=k*k*k,J=j*j*j,H=P*P*P,ne=3*x*k*k,te=3*E*j*j,fe=3*T*P*P,z=6*x*x*k,$=6*E*E*j,Y=6*T*T*P,_e=4.0767416621*V-3.3077115913*J+.2309699292*H-1,ce=4.0767416621*ne-3.3077115913*te+.2309699292*fe,ue=4.0767416621*z-3.3077115913*$+.2309699292*Y,I=ce/(ce*ce-.5*_e*ue),ie=-_e*I,Ee=-1.2684380046*V+2.6097574011*J-.3413193965*H-1,ke=-1.2684380046*ne+2.6097574011*te-.3413193965*fe,R=-1.2684380046*z+2.6097574011*$-.3413193965*Y,D=ke/(ke*ke-.5*Ee*R),ee=-Ee*D,O=-.0041960863*V-.7034186147*J+1.707614701*H-1,F=-.0041960863*ne-.7034186147*te+1.707614701*fe,be=-.0041960863*z-.7034186147*$+1.707614701*Y,ye=F/(F*F-.5*O*be),Re=-O*ye;ie=I>=0?ie:1e6,ee=D>=0?ee:1e6,Re=ye>=0?Re:1e6,o+=Math.min(ie,Math.min(ee,Re))}}}return o}function f1(e,t,n=null){n||(n=d1(e,t));let i=n[0],s=n[1];return[s/i,s/(1-i)]}function VA(e,t,n){let i=d1(t,n),s=v$(t,n,e,1,e,i),l=f1(t,n,i),o=.11516993+1/(7.4477897+4.1590124*n+t*(-2.19557347+1.75198401*n+t*(-2.13704948-10.02301043*n+t*(-4.24894561+5.38770819*n+4.69891013*t)))),d=.11239642+1/(1.6132032-.68124379*n+t*(.40370612+.90148123*n+t*(-.27087943+.6122399*n+t*(.00299215-.45399568*n-.14661872*t)))),h=s/Math.min(e*l[0],(1-e)*l[1]),f=e*o,m=(1-e)*d,b=.9*h*Math.sqrt(Math.sqrt(1/(1/(f*f*f*f)+1/(m*m*m*m))));return f=e*.4,m=(1-e)*.8,[Math.sqrt(1/(1/(f*f)+1/(m*m))),b,s]}function rv(e){let t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,i=e.b!==void 0?e.b:0,s={mode:"okhsl",l:sm(t)};e.alpha!==void 0&&(s.alpha=e.alpha);let l=Math.sqrt(n*n+i*i);if(!l)return s.s=0,s;let[o,d,h]=VA(t,n/l,i/l),f;if(l<d){let m=0,b=.8*o,x=1-b/d;f=(l-m)/(b+x*(l-m))*.8}else{let m=d,b=.2*d*d*1.25*1.25/o,x=1-b/(h-d);f=.8+.2*((l-m)/(b+x*(l-m)))}return f&&(s.s=f,s.h=nn(Math.atan2(i,n)*180/Math.PI)),s}function iv(e){let t=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,i=e.l!==void 0?e.l:0,s={mode:"oklab",l:ud(i)};if(e.alpha!==void 0&&(s.alpha=e.alpha),!n||i===1)return s.a=s.b=0,s;let l=Math.cos(t/180*Math.PI),o=Math.sin(t/180*Math.PI),[d,h,f]=VA(s.l,l,o),m,b,x,E;n<.8?(m=1.25*n,b=0,x=.8*d,E=1-x/h):(m=5*(n-.8),b=h,x=.2*h*h*1.25*1.25/d,E=1-x/(f-h));let T=b+m*x/(1-E*m);return s.a=T*l,s.b=T*o,s}var _$={...RA,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:rv,rgb:e=>rv(Hd(e))},toMode:{oklab:iv,rgb:e=>Ud(iv(e))}},T$=_$;function av(e){let t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,i=e.b!==void 0?e.b:0,s=Math.sqrt(n*n+i*i),l=s?n/s:1,o=s?i/s:1,[d,h]=f1(l,o),f=.5,m=1-f/d,b=h/(s+t*h),x=b*t,E=b*s,T=ud(x),w=E*T/x,S=Ku({l:T,a:l*w,b:o*w}),k=Math.cbrt(1/Math.max(S.r,S.g,S.b,0));t=t/k,s=s/k*sm(t)/t,t=sm(t);let j={mode:"okhsv",s:s?(f+h)*E/(h*f+h*m*E):0,v:t?t/x:0};return j.s&&(j.h=nn(Math.atan2(i,n)*180/Math.PI)),e.alpha!==void 0&&(j.alpha=e.alpha),j}function sv(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let n=e.h!==void 0?e.h:0,i=e.s!==void 0?e.s:0,s=e.v!==void 0?e.v:0,l=Math.cos(n/180*Math.PI),o=Math.sin(n/180*Math.PI),[d,h]=f1(l,o),f=.5,m=1-f/d,b=1-i*f/(f+h-h*m*i),x=i*h*f/(f+h-h*m*i),E=ud(b),T=x*E/b,w=Ku({l:E,a:l*T,b:o*T}),S=Math.cbrt(1/Math.max(w.r,w.g,w.b,0)),k=ud(s*b),j=x*k/b;return t.l=k*S,t.a=j*l*S,t.b=j*o*S,t}var A$={...MA,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:av,rgb:e=>av(Hd(e))},toMode:{oklab:sv,rgb:e=>Ud(sv(e))}},S$=A$;function w$(e,t){if(!t||t[0]!=="oklab")return;let n={mode:"oklab"},[,i,s,l,o]=t;if(!(i.type===ge.Hue||s.type===ge.Hue||l.type===ge.Hue))return i.type!==ge.None&&(n.l=Math.min(Math.max(0,i.type===ge.Number?i.value:i.value/100),1)),s.type!==ge.None&&(n.a=s.type===ge.Number?s.value:s.value*.4/100),l.type!==ge.None&&(n.b=l.type===ge.Number?l.value:l.value*.4/100),o.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,o.type===ge.Number?o.value:o.value/100))),n}var k$=w$,C$={...o1,mode:"oklab",toMode:{lrgb:Ku,rgb:Ud},fromMode:{lrgb:YA,rgb:Hd},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[k$],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},N$=C$;function R$(e,t){if(!t||t[0]!=="oklch")return;let n={mode:"oklch"},[,i,s,l,o]=t;if(i.type!==ge.None){if(i.type===ge.Hue)return;n.l=Math.min(Math.max(0,i.type===ge.Number?i.value:i.value/100),1)}if(s.type!==ge.None&&(n.c=Math.max(0,s.type===ge.Number?s.value:s.value*.4/100)),l.type!==ge.None){if(l.type===ge.Percentage)return;n.h=l.value}return o.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,o.type===ge.Number?o.value:o.value/100))),n}var O$=R$,L$={...c1,mode:"oklch",toMode:{oklab:e=>Xi(e,"oklab"),rgb:e=>Ud(Xi(e,"oklab"))},fromMode:{rgb:e=>Qi(Hd(e),"oklch"),oklab:e=>Qi(e,"oklch")},parse:[O$],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},M$=L$,I$=e=>{let{r:t,g:n,b:i,alpha:s}=Zs(e),l={mode:"xyz65",x:.486570948648216*t+.265667693169093*n+.1982172852343625*i,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*i,z:0*t+.0451133818589026*n+1.043944368900976*i};return s!==void 0&&(l.alpha=s),l},lv=I$,D$=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Js({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},"p3");return i!==void 0&&(s.alpha=i),s},uv=D$,B$={...Ks,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>uv(Ua(e)),xyz65:uv},toMode:{rgb:e=>ja(lv(e)),xyz65:lv}},z$=B$,rp=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},P$=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"prophoto",r:rp(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:rp(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:rp(e*0+t*0+1.2119675456389452*n)};return i!==void 0&&(s.alpha=i),s},ov=P$,ip=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},H$=e=>{let t=ip(e.r),n=ip(e.g),i=ip(e.b),s={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*i,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*i,z:0*t+0*n+.8251046025104602*i};return e.alpha!==void 0&&(s.alpha=e.alpha),s},cv=H$,U$={...Ks,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:ov,rgb:e=>ov(Xu(e))},toMode:{xyz50:cv,rgb:e=>Qu(cv(e))}},j$=U$,dv=1.09929682680944,F$=.018053968510807,ap=e=>{let t=Math.abs(e);return t>F$?(Math.sign(e)||1)*(dv*Math.pow(t,.45)-(dv-1)):4.5*e},$$=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"rec2020",r:ap(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:ap(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:ap(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return i!==void 0&&(s.alpha=i),s},fv=$$,hv=1.09929682680944,q$=.018053968510807,sp=(e=0)=>{let t=Math.abs(e);return t<q$*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+hv-1)/hv,1/.45)},Y$=e=>{let t=sp(e.r),n=sp(e.g),i=sp(e.b),s={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*i,y:.262700212011267*t+.6779980715188708*n+.059301716469862*i,z:0*t+.0280726930490874*n+1.0609850577107909*i};return e.alpha!==void 0&&(s.alpha=e.alpha),s},pv=Y$,V$={...Ks,mode:"rec2020",fromMode:{xyz65:fv,rgb:e=>fv(Ua(e))},toMode:{xyz65:pv,rgb:e=>ja(pv(e))},parse:["rec2020"],serialize:"rec2020"},G$=V$,Ra=.0037930732552754493,GA=Math.cbrt(Ra),lp=e=>Math.cbrt(e)-GA,W$=e=>{let{r:t,g:n,b:i,alpha:s}=Zs(e),l=lp(.3*t+.622*n+.078*i+Ra),o=lp(.23*t+.692*n+.078*i+Ra),d=lp(.2434226892454782*t+.2047674442449682*n+.5518098665095535*i+Ra),h={mode:"xyb",x:(l-o)/2,y:(l+o)/2,b:d-(l+o)/2};return s!==void 0&&(h.alpha=s),h},Q$=W$,up=e=>Math.pow(e+GA,3),X$=({x:e,y:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=up(e+t)-Ra,l=up(t-e)-Ra,o=up(n+t)-Ra,d=Js({r:11.031566904639861*s-9.866943908131562*l-.16462299650829934*o,g:-3.2541473810744237*s+4.418770377582723*l-.16462299650829934*o,b:-3.6588512867136815*s+2.7129230459360922*l+1.9459282407775895*o});return i!==void 0&&(d.alpha=i),d},K$=X$,Z$={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:K$},fromMode:{rgb:Q$},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:ve,y:ve,b:ve,alpha:{use:ve,fixup:Ut}}},J$=Z$,eq={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Qu,lab:u1},fromMode:{rgb:Xu,lab:l1},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:ve,y:ve,z:ve,alpha:{use:ve,fixup:Ut}}},tq=eq,nq=e=>{let{x:t,y:n,z:i,alpha:s}=e;t===void 0&&(t=0),n===void 0&&(n=0),i===void 0&&(i=0);let l={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*i,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*i,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*i};return s!==void 0&&(l.alpha=s),l},rq=nq,iq=e=>{let{x:t,y:n,z:i,alpha:s}=e;t===void 0&&(t=0),n===void 0&&(n=0),i===void 0&&(i=0);let l={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*i,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*i,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*i};return s!==void 0&&(l.alpha=s),l},aq=iq,sq={mode:"xyz65",toMode:{rgb:ja,xyz50:rq},fromMode:{rgb:Ua,xyz50:aq},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:ve,y:ve,z:ve,alpha:{use:ve,fixup:Ut}}},lq=sq,uq=({r:e,g:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*n,i:.59597799*e-.2741761*t-.32180189*n,q:.21147017*e-.52261711*t+.31114694*n};return i!==void 0&&(s.alpha=i),s},oq=uq,cq=({y:e,i:t,q:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"rgb",r:e+.95608445*t+.6208885*n,g:e-.27137664*t-.6486059*n,b:e-1.10561724*t+1.70250126*n};return i!==void 0&&(s.alpha=i),s},dq=cq,fq={mode:"yiq",toMode:{rgb:dq},fromMode:{rgb:oq},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:ve,i:ve,q:ve,alpha:{use:ve,fixup:Ut}}},hq=fq;at(kj);at(Pj);at(Wj);at(Xj);at(eF);at(RA);at(MA);at(bF);at(vF);at(RF);at(IF);at(o1);at(YF);at(c1);at(XF);at(d$);at(h$);at(m$);at(T$);at(S$);at(N$);at(M$);at(z$);at(j$);at(G$);at(Ks);at(J$);at(tq);at(lq);at(hq);var WA="#7c6ff7",pq=vA("oklch"),mq=[["50",.98,.005],["100",.94,.01],["150",.88,.015],["200",.8,.02],["300",.7,.025],["400",.6,.03],["500",.5,.04],["600",.4,.03],["700",.32,.025],["800",.24,.03],["850",.2,.035],["900",.16,.04],["950",.12,.05]],gq={danger:25,success:155,warning:80,info:250},Fc={accentColor:WA,theme:"dark"};function wu(e,t,n){return Math.min(Math.max(e,t),n)}function QA(e){let t=e%360;return t<0?t+360:t}function ka(e){return e.toFixed(3).replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1")}function bt(e,t,n,i){let s=`oklch(${ka(wu(e,0,1))} ${ka(wu(t,0,.4))} ${ka(QA(n))}`;return i===void 0?`${s})`:`${s} / ${ka(wu(i,0,1))})`}function bq(e){return e==="dark"?"dark":"light"}function yq(e){let t=tm(e)??tm(WA),n=t?pq(t):null;return n?{l:wu(n.l??.623,0,1),c:wu(n.c??.234,0,.37),h:QA(n.h??286)}:{l:.623,c:.234,h:286}}function Eq(e){let t=bq(e.theme)==="dark",{l:n,c:i,h:s}=yq(e.accentColor),l=[],o=(m,b)=>{l.push(` ${m}: ${b};`)},d=m=>`var(--dt-scale-${m})`;o("--dt-accent-h",ka(s)),o("--dt-accent-c",ka(i)),o("--dt-accent-l",ka(n)),o("--dt-mode-sign",t?"1":"-1");for(let[m,b,x]of mq)o(`--dt-scale-${m}`,bt(b,x,s));o("--dt-bg",d(t?"950":"50")),o("--dt-bg-subtle",d(t?"900":"100")),o("--dt-surface",d(t?"850":"100")),o("--dt-surface-hover",d(t?"800":"150")),o("--dt-surface-active",d(t?"700":"200")),o("--dt-overlay",t?bt(.16,.04,s,.85):bt(.98,.005,s,.85)),o("--dt-text",d(t?"50":"950")),o("--dt-text-secondary",d(t?"300":"600")),o("--dt-text-muted",d(t?"400":"500")),o("--dt-border",d(t?"800":"200")),o("--dt-border-subtle",t?bt(.2,.035,s,.6):bt(.88,.015,s,.6)),o("--dt-border-strong",d(t?"700":"300"));let h=t?.05:-.05,f=t?.1:-.1;o("--dt-accent",bt(n,i,s)),o("--dt-accent-hover",bt(n+h,i,s)),o("--dt-accent-active",bt(n+f,i,s)),o("--dt-accent-subtle",bt(n,i,s,.15)),o("--dt-accent-ghost",bt(n,i,s,.08)),o("--dt-text-on-accent",n>.6?d("950"):d("50"));for(let[m,b]of Object.entries(gq)){let x=t?.7:.45;o(`--dt-${m}`,bt(x,.18,b)),o(`--dt-${m}-subtle`,bt(x,.18,b,.15))}return o("--dt-dock-bg","var(--dt-overlay)"),o("--dt-actions-bar-bg","var(--dt-bg-subtle)"),o("--dt-window-chrome","var(--dt-surface)"),o("--dt-window-body","var(--dt-bg)"),o("--dt-info-panel-bg","var(--dt-bg-subtle)"),o("--dt-wallpaper",t?`linear-gradient(135deg, ${bt(.25,.08,s)} 0%, ${bt(.3,.1,s)} 50%, ${bt(.4,.04,s+30)} 100%)`:`linear-gradient(135deg, ${bt(.85,.06,s)} 0%, ${bt(.8,.08,s)} 50%, ${bt(.75,.03,s+30)} 100%)`),o("--dt-glass",t?bt(.2,.035,s,.7):bt(.94,.01,s,.7)),o("--dt-glass-border",t?bt(.98,.005,s,.1):bt(.12,.05,s,.12)),o("--dt-glass-highlight",t?bt(.98,.005,s,.05):bt(.98,.005,s,.45)),o("--dt-shadow-color",t?bt(.12,.05,s,.4):bt(.12,.05,s,.15)),o("--font-display","'Sora', system-ui, -apple-system, sans-serif"),o("--font-ui","'Work Sans', system-ui, -apple-system, sans-serif"),o("--font-mono","'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace"),`:root {
|
|
146
|
-
${l.join(`
|
|
147
|
-
`)}
|
|
148
|
-
}`}var xq=`
|
|
149
|
-
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="url"] {
|
|
150
|
-
font-family: var(--font-mono, 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace);
|
|
151
|
-
font-size: 0.8125rem;
|
|
152
|
-
font-weight: 600;
|
|
153
|
-
letter-spacing: 0.04em;
|
|
154
|
-
line-height: 1;
|
|
155
|
-
color: var(--dt-text);
|
|
156
|
-
background: var(--dt-surface);
|
|
157
|
-
border: 1px solid var(--dt-accent);
|
|
158
|
-
border-radius: 2px;
|
|
159
|
-
padding: 6px 10px;
|
|
160
|
-
outline: none;
|
|
161
|
-
width: 100%;
|
|
162
|
-
box-sizing: border-box;
|
|
163
|
-
transition: all 0.1s ease;
|
|
164
|
-
position: relative;
|
|
165
|
-
}
|
|
166
|
-
input[type="text"]:hover, input[type="email"]:hover, input[type="password"]:hover, input[type="number"]:hover, input[type="search"]:hover, input[type="url"]:hover {
|
|
167
|
-
background: var(--dt-accent);
|
|
168
|
-
color: var(--dt-text-on-accent);
|
|
169
|
-
}
|
|
170
|
-
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="url"]:focus {
|
|
171
|
-
background: var(--dt-accent);
|
|
172
|
-
color: var(--dt-text-on-accent);
|
|
173
|
-
}
|
|
174
|
-
input[type="text"]:disabled, input[type="email"]:disabled, input[type="password"]:disabled, input[type="number"]:disabled, input[type="search"]:disabled, input[type="url"]:disabled {
|
|
175
|
-
cursor: not-allowed;
|
|
176
|
-
opacity: 0.4;
|
|
177
|
-
}
|
|
178
|
-
input[type="text"]::placeholder, input[type="email"]::placeholder, input[type="password"]::placeholder, input[type="number"]::placeholder, input[type="search"]::placeholder, input[type="url"]::placeholder {
|
|
179
|
-
color: var(--dt-text-muted);
|
|
180
|
-
font-weight: 600;
|
|
181
|
-
letter-spacing: 0.04em;
|
|
182
|
-
}
|
|
183
|
-
`.trim();const mv="dt-theme";function vq(e){return e==="dark"?"dark":"light"}function _q(){let e=document.getElementById(mv);return e||(e=document.createElement("style"),e.id=mv,document.head.appendChild(e)),e}function XA(e){const t=vq(e.theme),n=_q();n.parentElement===document.head&&n!==document.head.lastElementChild&&document.head.appendChild(n),n.textContent=Eq({accentColor:e.accentColor,theme:t}),document.documentElement.dataset.theme=t}const Tq="_shell_1jqjo_1",Aq="_actionsBar_1jqjo_12",Sq="_content_1jqjo_19",wq="_desktop_1jqjo_28",kq="_assistantPane_1jqjo_36",Cq="_maximizedMask_1jqjo_42",Rs={shell:Tq,actionsBar:Aq,content:Sq,desktop:wq,assistantPane:kq,maximizedMask:Cq},Nq=4,Rq=.18,Oq=.45,Lq=.28,Mq="__assistant__",gv="dt-shell-form-controls",Iq="[data-dt-shell]";function Dq(e){return Math.min(Math.max(e,Rq),Oq)}function Bq(e){const t=ut(n=>n.setDesktopBounds);C.useEffect(()=>{const n=e.current;if(!n)return;const i=new ResizeObserver(s=>{for(const l of s){const{width:o,height:d}=l.contentRect;t({x:0,y:0,width:o,height:d})}});return i.observe(n),t({x:0,y:0,width:n.clientWidth,height:n.clientHeight}),()=>i.disconnect()},[e,t])}function zq({themePreferences:e}){const{status:t,socket:n,retryInSeconds:i}=SU(),s=t==="connected",l=ut($=>$.windows),o=ut($=>$.tree),d=ut($=>$.fullscreenWindowId),h=ut($=>$.setWindowActions),f=si($=>$.isDragging),[m,b]=C.useState([]),[x,E]=C.useState([]),[T,w]=C.useState(Lq),{actionHandlersRef:S,buildClientActions:k}=zU(n),j=C.useRef(null);Bq(j),HU(),BU(),C.useEffect(()=>{let $=document.getElementById(gv);return $||($=document.createElement("style"),$.id=gv,document.head.appendChild($)),$.textContent=xq.replaceAll('input[type="',`${Iq} input[type="`),()=>{$?.remove()}},[]),lu("blur",()=>{requestAnimationFrame(()=>{const $=document.activeElement;if(!$||$.tagName!=="IFRAME")return;const Y=$.closest("[data-window-id]");if(!Y)return;const _e=Y.dataset.windowId;if(!_e)return;const ce=ut.getState();ce.focusedWindowId!==_e&&ce.focusWindow(_e)})});const P=new Map(l.map($=>[$.id,$])),V=d?P.get(d):void 0,J=1-T,H={gridTemplateColumns:`minmax(0, ${J}fr) ${Nq}px minmax(0, ${T}fr)`},ne={id:Mq,miniAppId:"assistant",title:"AI Assistant",position:{x:0,y:0},size:{width:0,height:0},minimized:!1,maximized:!1,focused:!1,zIndex:1},te=C.useCallback(async()=>{try{const $=await cr.get("/api/liveapps");E($.data)}catch($){console.error("[shell] Could not load LiveApps:",$)}},[]);C.useEffect(()=>{let $=!1;return(async()=>{try{const Y=await cr.get("/api/miniapps");$||b(Y.data)}catch(Y){console.error("[shell] Could not load MiniApps:",Y)}try{const Y=await cr.get("/api/liveapps");$||E(Y.data)}catch(Y){console.error("[shell] Could not load LiveApps:",Y)}})(),()=>{$=!0}},[]),lu("desktalk:event",$=>{$.detail?.event==="liveapps.changed"&&te()});const fe=[...m.map($=>({id:`miniapp:${$.id}`,name:$.name,icon:$.icon,iconPng:$.iconPng,kind:"miniapp",miniAppId:$.id})),...x.map($=>({id:`liveapp:${$.id}`,name:$.name,icon:$.icon,iconPng:$.iconPng,kind:"liveapp",miniAppId:"preview",args:{path:$.path,liveAppId:$.id}}))].sort(($,Y)=>$.name.localeCompare(Y.name));lu("desktalk:actions-changed",$=>{const Y=$;if(!Y.detail?.windowId)return;const _e=Y.detail.actions??[];S.current.set(Y.detail.windowId,new Map(_e.map(ce=>[ce.name,ce.handler]))),PC(Y.detail.windowId,_e.map(ce=>({name:ce.name,description:ce.description,params:ce.params}))),h(Y.detail.windowId,k(Y.detail.windowId,_e))}),lu("desktalk:open-window",$=>{const{miniAppId:Y,args:_e}=$.detail;Y&&(async()=>{try{await cr.post(`/api/miniapps/${encodeURIComponent(Y)}/activate`,{args:_e});const ue=m.find(I=>I.id===Y)?.name??Y;ut.getState().openWindow(Y,ue,_e)}catch(ce){console.error("[shell] Could not open MiniApp window:",ce)}})()});const z=C.useCallback(async $=>{try{const Y=$.kind==="liveapp"?{...$.args??{},bridgeToken:crypto.randomUUID()}:$.args;await cr.post(`/api/miniapps/${encodeURIComponent($.miniAppId)}/activate`,{args:Y}),ut.getState().openWindow($.miniAppId,$.name,Y)}catch(Y){console.error("[shell] Could not launch application:",Y)}},[]);return v.jsxs("div",{className:Rs.shell,"data-dt-shell":!0,children:[v.jsx(p4,{status:t,retryInSeconds:i}),v.jsx("div",{className:Rs.actionsBar,children:v.jsx(u4,{apps:fe,onLaunch:z})}),v.jsxs("div",{className:Rs.content,style:H,children:[v.jsxs("div",{ref:j,className:Rs.desktop,children:[s?o&&v.jsx(Zp,{node:o,windowsById:P,themePreferences:e,canDrag:o.type==="container"}):null,f&&v.jsx(A4,{desktopRef:j})]}),v.jsx(t_,{path:[],split:"horizontal",ratio:J,onRatioChange:$=>{w(Dq(1-$))}}),v.jsx("div",{className:Rs.assistantPane,children:v.jsx(EA,{window:ne,title:"AI Assistant",showCloseButton:!1,showFullscreenButton:!1,children:v.jsx(ZH,{socket:n,wsReady:s})})}),V&&v.jsx("div",{className:Rs.maximizedMask}),V&&v.jsx(fU,{socket:n,wsReady:s})]})]})}const Pq="_page_1nc9w_1",Hq="_logo_1nc9w_10",Uq="_form_1nc9w_17",jq="_field_1nc9w_24",Fq="_label_1nc9w_30",$q="_input_1nc9w_38",qq="_error_1nc9w_56",Cr={page:Pq,logo:Hq,form:Uq,field:jq,label:Fq,input:$q,error:qq},Yq="_modal_2xb7m_1",Vq="_small_2xb7m_13",Gq="_medium_2xb7m_17",Wq="_large_2xb7m_21",op={modal:Yq,small:Vq,medium:Gq,large:Wq};function KA({children:e,className:t="",size:n="medium"}){const i=op[n]??op.medium,s=`${op.modal} ${i} ${t}`.trim();return v.jsx("div",{className:s,children:e})}function Qq({onLoginSuccess:e}){const[t,n]=C.useState(""),[i,s]=C.useState(""),[l,o]=C.useState(""),[d,h]=C.useState(!1);async function f(m){m.preventDefault(),o(""),h(!0);try{await cr.post("/api/auth/login",{username:t,password:i}),e()}catch(b){o(n_(b,"Network error. Please try again."))}finally{h(!1)}}return v.jsx("div",{className:Cr.page,children:v.jsxs(KA,{size:"small",children:[v.jsx("h1",{className:Cr.logo,children:"DeskTalk"}),v.jsxs("form",{className:Cr.form,onSubmit:f,children:[v.jsxs("div",{className:Cr.field,children:[v.jsx("label",{className:Cr.label,htmlFor:"login-username",children:"Username"}),v.jsx("input",{id:"login-username",className:Cr.input,type:"text",placeholder:"Enter your username",autoComplete:"username",autoFocus:!0,value:t,onChange:m=>n(m.target.value),disabled:d})]}),v.jsxs("div",{className:Cr.field,children:[v.jsx("label",{className:Cr.label,htmlFor:"login-password",children:"Password"}),v.jsx("input",{id:"login-password",className:Cr.input,type:"password",placeholder:"Enter your password",autoComplete:"current-password",value:i,onChange:m=>s(m.target.value),disabled:d})]}),v.jsx("div",{className:Cr.error,children:l}),v.jsx("dt-button",{variant:"primary",disabled:d||!t||!i,type:"submit",fullwidth:!0,children:d?"Signing in...":"Sign In"})]})]})})}const Xq="_page_1q807_1",Kq="_header_1q807_10",Zq="_title_1q807_14",Jq="_subtitle_1q807_21",eY="_stepIndicator_1q807_26",tY="_dot_1q807_32",nY="_dotActive_1q807_40 _dot_1q807_32",rY="_dotCompleted_1q807_45 _dot_1q807_32",iY="_body_1q807_50",aY="_providerList_1q807_56",sY="_providerCard_1q807_62",lY="_providerCardBody_1q807_71",uY="_providerCardHeader_1q807_77",oY="_providerCardTitleRow_1q807_84",cY="_providerCardTitle_1q807_84",dY="_providerCardActions_1q807_96",fY="_providerActionButtonWrap_1q807_104",hY="_providerSelectWrap_1q807_113",pY="_providerFieldGrid_1q807_122",mY="_field_1q807_128",gY="_label_1q807_134",bY="_input_1q807_142",yY="_footer_1q807_161",EY="_error_1q807_167",xY="_welcomeText_1q807_174",vY="_hintText_1q807_181",_Y="_doneText_1q807_189",TY="_footerActions_1q807_196",he={page:Xq,header:Kq,title:Zq,subtitle:Jq,stepIndicator:eY,dot:tY,dotActive:nY,dotCompleted:rY,body:iY,providerList:aY,providerCard:sY,providerCardBody:lY,providerCardHeader:uY,providerCardTitleRow:oY,providerCardTitle:cY,providerCardActions:dY,providerActionButtonWrap:fY,providerSelectWrap:hY,providerFieldGrid:pY,field:mY,label:gY,input:bY,footer:yY,error:EY,welcomeText:xY,hintText:vY,doneText:_Y,footerActions:TY},$c=["welcome","account","aiConfig","voiceConfig","done"],ZA={provider:"openai"};function bv(e=ZA.provider){return{provider:e,apiKey:"",model:"",baseUrl:""}}const JA={provider:"openai-whisper"};function yv(e=JA.provider){return e==="azure-openai-whisper"?{provider:e,apiKey:"",model:"",baseUrl:"",azureDeployment:"",azureApiVersion:"2024-06-01"}:{provider:e,apiKey:"",model:"whisper-1",baseUrl:"https://api.openai.com/v1",azureDeployment:"",azureApiVersion:"2024-06-01"}}const AY=Uu((e,t)=>({step:"welcome",stepIndex:0,username:"",displayName:"",password:"",confirmPassword:"",aiProviders:[bv()],voiceProviders:[yv()],error:"",loading:!1,goNext(){const{stepIndex:n}=t(),i=n+1;i<$c.length&&e({step:$c[i],stepIndex:i,error:""})},goBack(){const{stepIndex:n}=t(),i=n-1;i>=0&&e({step:$c[i],stepIndex:i,error:""})},setUsername:n=>e({username:n}),setDisplayName:n=>e({displayName:n}),setPassword:n=>e({password:n}),setConfirmPassword:n=>e({confirmPassword:n}),addAiProvider:(n=ZA.provider)=>e(i=>i.aiProviders.some(s=>s.provider===n)?i:{aiProviders:[...i.aiProviders,bv(n)]}),removeAiProvider:n=>e(i=>i.aiProviders.length===1?i:{aiProviders:i.aiProviders.filter(s=>s.provider!==n)}),setDefaultAiProvider:n=>e(i=>{const s=i.aiProviders.filter(o=>o.provider!==n),l=i.aiProviders.find(o=>o.provider===n);return l?{aiProviders:[l,...s]}:i}),updateAiProvider:(n,i,s)=>e(l=>({aiProviders:l.aiProviders.map(o=>o.provider===n?{...o,[i]:s}:o)})),addVoiceProvider:(n=JA.provider)=>e(i=>i.voiceProviders.some(s=>s.provider===n)?i:{voiceProviders:[...i.voiceProviders,yv(n)]}),removeVoiceProvider:n=>e(i=>i.voiceProviders.length===1?i:{voiceProviders:i.voiceProviders.filter(s=>s.provider!==n)}),setDefaultVoiceProvider:n=>e(i=>{const s=i.voiceProviders.filter(o=>o.provider!==n),l=i.voiceProviders.find(o=>o.provider===n);return l?{voiceProviders:[l,...s]}:i}),updateVoiceProvider:(n,i,s)=>e(l=>({voiceProviders:l.voiceProviders.map(o=>o.provider===n?{...o,[i]:s}:o)})),validateAccount(){const{username:n,displayName:i,password:s,confirmPassword:l}=t();return n.trim()?/^[a-zA-Z0-9_-]{1,32}$/.test(n)?i.trim()?s.length<8?(e({error:"Password must be at least 8 characters."}),!1):s!==l?(e({error:"Passwords do not match."}),!1):!0:(e({error:"Display name is required."}),!1):(e({error:"Username must be 1-32 alphanumeric characters, hyphens, or underscores."}),!1):(e({error:"Username is required."}),!1)},async submit(n){const{username:i,displayName:s,password:l,aiProviders:o,voiceProviders:d}=t();e({error:"",loading:!0});try{const h={username:i.trim(),displayName:s.trim(),password:l},f=o.map(E=>({provider:E.provider,apiKey:E.apiKey.trim(),model:E.model.trim(),baseUrl:E.baseUrl.trim()}));f.some(E=>E.apiKey||E.model||E.baseUrl||E.provider!=="openai")&&(h.aiConfig={defaultProvider:f[0]?.provider??"openai",providers:f.map(E=>({provider:E.provider,apiKey:E.apiKey||void 0,model:E.model||void 0,baseUrl:E.baseUrl||void 0}))});const b=d.map(E=>({provider:E.provider,apiKey:E.apiKey.trim(),model:E.model.trim(),baseUrl:E.baseUrl.trim(),azureDeployment:E.azureDeployment.trim(),azureApiVersion:E.azureApiVersion.trim()}));b.some(E=>E.apiKey||E.model||E.baseUrl||E.azureDeployment||E.azureApiVersion!=="2024-06-01"||E.provider!=="openai-whisper")&&(h.voiceConfig={defaultProvider:b[0]?.provider??"openai-whisper",providers:b.map(E=>({provider:E.provider,apiKey:E.apiKey||void 0,model:E.model||void 0,baseUrl:E.baseUrl||void 0,azureDeployment:E.azureDeployment||void 0,azureApiVersion:E.azureApiVersion||void 0}))}),await cr.post("/api/setup",h),n()}catch(h){e({error:n_(h,"Network error. Please try again.")})}finally{e({loading:!1})}}})),Rc=[{id:"openai",label:"OpenAI",supportsBaseUrl:!0},{id:"anthropic",label:"Anthropic",supportsBaseUrl:!1},{id:"google",label:"Google Gemini",supportsBaseUrl:!1},{id:"azure-openai-responses",label:"Azure OpenAI",supportsBaseUrl:!0},{id:"mistral",label:"Mistral",supportsBaseUrl:!0},{id:"groq",label:"Groq",supportsBaseUrl:!0},{id:"xai",label:"xAI",supportsBaseUrl:!0},{id:"openrouter",label:"OpenRouter",supportsBaseUrl:!0},{id:"ollama",label:"Ollama",supportsBaseUrl:!0}],Oc=[{id:"openai-whisper",label:"OpenAI Whisper",supportsModel:!0,supportsBaseUrl:!0,supportsAzureDeployment:!1,supportsAzureApiVersion:!1},{id:"azure-openai-whisper",label:"Azure OpenAI Whisper",supportsModel:!1,supportsBaseUrl:!0,supportsAzureDeployment:!0,supportsAzureApiVersion:!0}];function SY({onComplete:e}){const t=AY();function n(){return v.jsx("div",{className:he.stepIndicator,children:$c.map((f,m)=>{let b=he.dot;return m===t.stepIndex?b=he.dotActive:m<t.stepIndex&&(b=he.dotCompleted),v.jsx("div",{className:b},f)})})}function i(){return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:he.header,children:[v.jsx("h1",{className:he.title,children:"Welcome to DeskTalk"}),v.jsx("p",{className:he.subtitle,children:"Let's create your admin account"})]}),v.jsx("div",{className:he.body,children:v.jsx("p",{className:he.welcomeText,children:"DeskTalk is a browser-based desktop environment with an AI assistant and modular MiniApps. Since this is the first time running DeskTalk, you'll need to create an administrator account."})}),v.jsxs("div",{className:he.footer,children:[v.jsx("span",{}),v.jsx("dt-button",{variant:"primary",onClick:t.goNext,children:"Get Started"})]})]})}function s(){return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:he.header,children:[v.jsx("h1",{className:he.title,children:"Create Admin Account"}),v.jsx("p",{className:he.subtitle,children:"Choose your credentials"})]}),v.jsxs("div",{className:he.body,children:[v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:"onboard-username",children:"Username"}),v.jsx("input",{id:"onboard-username",className:he.input,type:"text",placeholder:"e.g. admin",autoComplete:"username",value:t.username,onChange:f=>t.setUsername(f.target.value)})]}),v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:"onboard-displayname",children:"Display Name"}),v.jsx("input",{id:"onboard-displayname",className:he.input,type:"text",placeholder:"Your display name",autoComplete:"name",value:t.displayName,onChange:f=>t.setDisplayName(f.target.value)})]}),v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:"onboard-password",children:"Password"}),v.jsx("input",{id:"onboard-password",className:he.input,type:"password",placeholder:"At least 8 characters",autoComplete:"new-password",value:t.password,onChange:f=>t.setPassword(f.target.value)})]}),v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:"onboard-confirm",children:"Confirm Password"}),v.jsx("input",{id:"onboard-confirm",className:he.input,type:"password",placeholder:"Re-enter your password",autoComplete:"new-password",value:t.confirmPassword,onChange:f=>t.setConfirmPassword(f.target.value)})]}),v.jsx("div",{className:he.error,children:t.error})]}),v.jsxs("div",{className:he.footer,children:[v.jsx("dt-button",{variant:"secondary",onClick:t.goBack,children:"Back"}),v.jsx("dt-button",{variant:"primary",onClick:()=>{t.validateAccount()&&t.goNext()},disabled:!t.username||!t.displayName||!t.password||!t.confirmPassword,children:"Next"})]})]})}function l(){return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:he.header,children:[v.jsx("h1",{className:he.title,children:"AI Configuration"}),v.jsx("p",{className:he.subtitle,children:"Configure your AI provider (optional)"})]}),v.jsxs("div",{className:he.body,children:[v.jsx("p",{className:he.hintText,children:"Set up an AI provider so DeskTalk's assistant is ready to use. You can change these settings later in Preferences."}),v.jsx("div",{className:he.providerList,children:t.aiProviders.map((f,m)=>{const b=Rc.find(E=>E.id===f.provider),x=Rc.filter(E=>E.id===f.provider||!t.aiProviders.some(T=>T.provider===E.id));return v.jsx("div",{className:he.providerCard,children:v.jsx("dt-card",{variant:"outlined",children:v.jsxs("div",{className:he.providerCardBody,children:[v.jsxs("div",{className:he.providerCardHeader,children:[v.jsxs("div",{className:he.providerCardTitleRow,children:[v.jsx("div",{className:he.providerCardTitle,children:b?.label??f.provider}),m===0&&v.jsx("dt-badge",{variant:"default",children:"Default"})]}),v.jsxs("div",{className:he.providerCardActions,children:[v.jsx("dt-button",{onClick:()=>t.setDefaultAiProvider(f.provider),disabled:m===0,variant:"secondary",size:"sm",children:"Set as default"}),v.jsx("dt-button",{onClick:()=>t.removeAiProvider(f.provider),disabled:t.aiProviders.length===1,variant:"danger",size:"sm",children:"Delete"})]})]}),v.jsxs("div",{className:he.providerFieldGrid,children:[v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-ai-provider-${f.provider}`,children:"Provider"}),v.jsx(Ev,{id:`onboard-ai-provider-${f.provider}`,value:f.provider,options:x.map(E=>({value:E.id,label:E.label})),onChange:E=>t.updateAiProvider(f.provider,"provider",E)})]}),v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-ai-apikey-${f.provider}`,children:"API Key"}),v.jsx("input",{id:`onboard-ai-apikey-${f.provider}`,className:he.input,type:"password",placeholder:"Enter your API key",autoComplete:"off",value:f.apiKey,onChange:E=>t.updateAiProvider(f.provider,"apiKey",E.target.value)})]}),v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-ai-model-${f.provider}`,children:"Model (optional)"}),v.jsx("input",{id:`onboard-ai-model-${f.provider}`,className:he.input,type:"text",placeholder:"e.g. gpt-4o",value:f.model,onChange:E=>t.updateAiProvider(f.provider,"model",E.target.value)})]}),b?.supportsBaseUrl&&v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-ai-baseurl-${f.provider}`,children:"Base URL (optional)"}),v.jsx("input",{id:`onboard-ai-baseurl-${f.provider}`,className:he.input,type:"text",placeholder:"Custom API endpoint",value:f.baseUrl,onChange:E=>t.updateAiProvider(f.provider,"baseUrl",E.target.value)})]})]})]})})},f.provider)})}),v.jsx("div",{className:he.providerActionButtonWrap,children:v.jsx("dt-button",{onClick:()=>{const f=Rc.find(m=>!t.aiProviders.some(b=>b.provider===m.id));f&&t.addAiProvider(f.id)},disabled:t.aiProviders.length>=Rc.length,variant:"secondary",children:"Add provider"})})]}),v.jsxs("div",{className:he.footer,children:[v.jsx("dt-button",{variant:"secondary",onClick:t.goBack,children:"Back"}),v.jsxs("div",{className:he.footerActions,children:[v.jsx("dt-button",{variant:"ghost",onClick:t.goNext,children:"Skip"}),v.jsx("dt-button",{variant:"primary",onClick:t.goNext,children:"Next"})]})]})]})}function o(){return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:he.header,children:[v.jsx("h1",{className:he.title,children:"Voice Configuration"}),v.jsx("p",{className:he.subtitle,children:"Configure speech-to-text (optional)"})]}),v.jsxs("div",{className:he.body,children:[v.jsx("p",{className:he.hintText,children:"Set up a speech-to-text provider for voice input. You can change these settings later in Preferences."}),v.jsx("div",{className:he.providerList,children:t.voiceProviders.map((f,m)=>{const b=Oc.find(E=>E.id===f.provider),x=Oc.filter(E=>E.id===f.provider||!t.voiceProviders.some(T=>T.provider===E.id));return v.jsx("div",{className:he.providerCard,children:v.jsx("dt-card",{variant:"outlined",children:v.jsxs("div",{className:he.providerCardBody,children:[v.jsxs("div",{className:he.providerCardHeader,children:[v.jsxs("div",{className:he.providerCardTitleRow,children:[v.jsx("div",{className:he.providerCardTitle,children:b?.label??f.provider}),m===0&&v.jsx("dt-badge",{variant:"default",children:"Default"})]}),v.jsxs("div",{className:he.providerCardActions,children:[v.jsx("dt-button",{onClick:()=>t.setDefaultVoiceProvider(f.provider),disabled:m===0,variant:"secondary",size:"sm",children:"Set as default"}),v.jsx("dt-button",{onClick:()=>t.removeVoiceProvider(f.provider),disabled:t.voiceProviders.length===1,variant:"danger",size:"sm",children:"Delete"})]})]}),v.jsxs("div",{className:he.providerFieldGrid,children:[v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,children:"STT Provider"}),v.jsx(Ev,{value:f.provider,options:x.map(E=>({value:E.id,label:E.label})),onChange:E=>t.updateVoiceProvider(f.provider,"provider",E)})]}),v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-stt-apikey-${f.provider}`,children:"API Key"}),v.jsx("input",{id:`onboard-stt-apikey-${f.provider}`,className:he.input,type:"password",placeholder:"Enter your STT API key",autoComplete:"off",value:f.apiKey,onChange:E=>t.updateVoiceProvider(f.provider,"apiKey",E.target.value)})]}),b?.supportsModel&&v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-stt-model-${f.provider}`,children:"Model"}),v.jsx("input",{id:`onboard-stt-model-${f.provider}`,className:he.input,type:"text",value:f.model,onChange:E=>t.updateVoiceProvider(f.provider,"model",E.target.value)})]}),b?.supportsBaseUrl&&v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-stt-baseurl-${f.provider}`,children:"Base URL"}),v.jsx("input",{id:`onboard-stt-baseurl-${f.provider}`,className:he.input,type:"text",value:f.baseUrl,onChange:E=>t.updateVoiceProvider(f.provider,"baseUrl",E.target.value)})]}),b?.supportsAzureDeployment&&v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-stt-deployment-${f.provider}`,children:"Azure Deployment"}),v.jsx("input",{id:`onboard-stt-deployment-${f.provider}`,className:he.input,type:"text",value:f.azureDeployment,onChange:E=>t.updateVoiceProvider(f.provider,"azureDeployment",E.target.value)})]}),b?.supportsAzureApiVersion&&v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-stt-api-version-${f.provider}`,children:"Azure API Version"}),v.jsx("input",{id:`onboard-stt-api-version-${f.provider}`,className:he.input,type:"text",value:f.azureApiVersion,onChange:E=>t.updateVoiceProvider(f.provider,"azureApiVersion",E.target.value)})]})]})]})})},f.provider)})}),v.jsx("div",{className:he.providerActionButtonWrap,children:v.jsx("dt-button",{onClick:()=>{const f=Oc.find(m=>!t.voiceProviders.some(b=>b.provider===m.id));f&&t.addVoiceProvider(f.id)},disabled:t.voiceProviders.length>=Oc.length,variant:"secondary",children:"Add provider"})})]}),v.jsxs("div",{className:he.footer,children:[v.jsx("dt-button",{variant:"secondary",onClick:t.goBack,children:"Back"}),v.jsxs("div",{className:he.footerActions,children:[v.jsx("dt-button",{variant:"ghost",onClick:t.goNext,children:"Skip"}),v.jsx("dt-button",{variant:"primary",onClick:t.goNext,children:"Next"})]})]})]})}function d(){return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:he.header,children:[v.jsx("h1",{className:he.title,children:"All Set!"}),v.jsx("p",{className:he.subtitle,children:"Your admin account is ready"})]}),v.jsxs("div",{className:he.body,children:[v.jsxs("p",{className:he.doneText,children:["Welcome, ",t.displayName||t.username,". Click below to enter your DeskTalk desktop."]}),v.jsx("div",{className:he.error,children:t.error})]}),v.jsxs("div",{className:he.footer,children:[v.jsx("dt-button",{variant:"secondary",onClick:t.goBack,children:"Back"}),v.jsx("dt-button",{variant:"primary",onClick:()=>t.submit(e),disabled:t.loading,children:t.loading?"Setting up...":"Enter Desktop"})]})]})}const h={welcome:i,account:s,aiConfig:l,voiceConfig:o,done:d};return v.jsx("div",{className:he.page,children:v.jsxs(KA,{size:"medium",children:[n(),h[t.step]()]})})}function Ev({id:e,value:t,options:n,disabled:i=!1,onChange:s}){return v.jsx("div",{className:he.providerSelectWrap,children:v.jsx("dt-select",{id:e,value:t,options:n,disabled:i,"ondt-change":l=>{s(l.detail.value)}})})}var wY=`.dt-tooltip-popup {
|
|
184
|
-
position: fixed;
|
|
185
|
-
z-index: 2147483647;
|
|
186
|
-
padding: 6px 10px;
|
|
187
|
-
border: 1px solid var(--dt-accent);
|
|
188
|
-
border-radius: 2px;
|
|
189
|
-
background: var(--dt-surface);
|
|
190
|
-
color: var(--dt-text-secondary);
|
|
191
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
|
192
|
-
font-size: 12px;
|
|
193
|
-
font-weight: 500;
|
|
194
|
-
line-height: 1.4;
|
|
195
|
-
white-space: nowrap;
|
|
196
|
-
pointer-events: none;
|
|
197
|
-
user-select: none;
|
|
198
|
-
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/* Tech corner accents */
|
|
202
|
-
.dt-tooltip-popup::before {
|
|
203
|
-
content: '';
|
|
204
|
-
position: absolute;
|
|
205
|
-
top: -1px;
|
|
206
|
-
left: -1px;
|
|
207
|
-
width: 4px;
|
|
208
|
-
height: 4px;
|
|
209
|
-
border-top: 1px solid var(--dt-accent);
|
|
210
|
-
border-left: 1px solid var(--dt-accent);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.dt-tooltip-popup::after {
|
|
214
|
-
content: '';
|
|
215
|
-
position: absolute;
|
|
216
|
-
bottom: -1px;
|
|
217
|
-
right: -1px;
|
|
218
|
-
width: 4px;
|
|
219
|
-
height: 4px;
|
|
220
|
-
border-bottom: 1px solid var(--dt-accent);
|
|
221
|
-
border-right: 1px solid var(--dt-accent);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/* Arrow styling - tech/minimal */
|
|
225
|
-
.dt-tooltip-popup[data-actual-placement='top'] {
|
|
226
|
-
transform: translateX(-50%);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.dt-tooltip-popup[data-actual-placement='top']::before {
|
|
230
|
-
top: auto;
|
|
231
|
-
bottom: -4px;
|
|
232
|
-
left: 50%;
|
|
233
|
-
transform: translateX(-50%);
|
|
234
|
-
width: 0;
|
|
235
|
-
height: 0;
|
|
236
|
-
border: 4px solid transparent;
|
|
237
|
-
border-top-color: var(--dt-accent);
|
|
238
|
-
border-left: none;
|
|
239
|
-
border-right: none;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.dt-tooltip-popup[data-actual-placement='bottom'] {
|
|
243
|
-
transform: translateX(-50%);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.dt-tooltip-popup[data-actual-placement='bottom']::before {
|
|
247
|
-
bottom: auto;
|
|
248
|
-
top: -4px;
|
|
249
|
-
left: 50%;
|
|
250
|
-
transform: translateX(-50%);
|
|
251
|
-
width: 0;
|
|
252
|
-
height: 0;
|
|
253
|
-
border: 4px solid transparent;
|
|
254
|
-
border-bottom-color: var(--dt-accent);
|
|
255
|
-
border-left: none;
|
|
256
|
-
border-right: none;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
.dt-tooltip-popup[data-actual-placement='left'] {
|
|
260
|
-
transform: translateY(-50%);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.dt-tooltip-popup[data-actual-placement='left']::before {
|
|
264
|
-
left: auto;
|
|
265
|
-
top: 50%;
|
|
266
|
-
right: -4px;
|
|
267
|
-
transform: translateY(-50%);
|
|
268
|
-
width: 0;
|
|
269
|
-
height: 0;
|
|
270
|
-
border: 4px solid transparent;
|
|
271
|
-
border-left-color: var(--dt-accent);
|
|
272
|
-
border-top: none;
|
|
273
|
-
border-bottom: none;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.dt-tooltip-popup[data-actual-placement='right'] {
|
|
277
|
-
transform: translateY(-50%);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.dt-tooltip-popup[data-actual-placement='right']::before {
|
|
281
|
-
right: auto;
|
|
282
|
-
top: 50%;
|
|
283
|
-
left: -4px;
|
|
284
|
-
transform: translateY(-50%);
|
|
285
|
-
width: 0;
|
|
286
|
-
height: 0;
|
|
287
|
-
border: 4px solid transparent;
|
|
288
|
-
border-right-color: var(--dt-accent);
|
|
289
|
-
border-top: none;
|
|
290
|
-
border-bottom: none;
|
|
291
|
-
}
|
|
292
|
-
`,kY="dt-tooltip-popup",Ui=8,xv=!1;function CY(){if(xv)return;let e=document.createElement("style");e.setAttribute("data-dt-tooltip",""),e.textContent=wY,document.head.appendChild(e),xv=!0}var NY=class extends HTMLElement{_popup=null;_showTimeout=null;_tooltipId="";_visible=!1;static get observedAttributes(){return["content","placement","delay","disabled"]}get content(){return this.getAttribute("content")??""}set content(e){this.setAttribute("content",e)}get placement(){let e=this.getAttribute("placement");return e==="bottom"||e==="left"||e==="right"?e:"top"}set placement(e){this.setAttribute("placement",e)}get delay(){let e=Number(this.getAttribute("delay"));return Number.isFinite(e)&&e>0?e:0}set delay(e){this.setAttribute("delay",String(e))}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}constructor(){super();let e=this.attachShadow({mode:"open"});e.innerHTML="<slot></slot>",this._tooltipId=`dt-tip-${Math.random().toString(36).slice(2,9)}`}connectedCallback(){CY(),this.addEventListener("mouseenter",this._onEnter),this.addEventListener("mouseleave",this._onLeave),this.addEventListener("focusin",this._onEnter),this.addEventListener("focusout",this._onLeave)}disconnectedCallback(){this.removeEventListener("mouseenter",this._onEnter),this.removeEventListener("mouseleave",this._onLeave),this.removeEventListener("focusin",this._onEnter),this.removeEventListener("focusout",this._onLeave),this._hide()}attributeChangedCallback(e,t,n){e==="disabled"&&this.disabled&&this._hide(),e==="content"&&this._popup&&(this._popup.textContent=this.content)}_onEnter=()=>{if(this.disabled||!this.content)return;this._showTimeout!==null&&clearTimeout(this._showTimeout);let e=()=>{this._createPopup(),this._position(),this._visible=!0};this.delay>0?this._showTimeout=setTimeout(e,this.delay):e()};_onLeave=()=>{this._hide()};_createPopup(){if(this._popup)return;let e=document.createElement("div");e.className=kY,e.id=this._tooltipId,e.setAttribute("role","tooltip"),e.textContent=this.content,document.body.appendChild(e),this._popup=e;let t=this._getTrigger();t&&t.setAttribute("aria-describedby",this._tooltipId)}_hide(){if(this._showTimeout!==null&&(clearTimeout(this._showTimeout),this._showTimeout=null),this._popup){let e=this._getTrigger();e&&e.removeAttribute("aria-describedby"),this._popup.remove(),this._popup=null,this._visible=!1}}_getTrigger(){let e=this.shadowRoot?.querySelector("slot")?.assignedElements();return e&&e.length>0?e[0]:null}_position(){let e=this._popup;if(!e)return;let t=this.getBoundingClientRect(),n=e.getBoundingClientRect(),i=window.innerWidth,s=window.innerHeight,l=this.placement;l==="top"&&t.top-n.height-Ui<0?l="bottom":l==="bottom"&&t.bottom+n.height+Ui>s?l="top":l==="left"&&t.left-n.width-Ui<0?l="right":l==="right"&&t.right+n.width+Ui>i&&(l="left"),e.setAttribute("data-actual-placement",l);let o,d;switch(l){case"top":d=t.left+t.width/2,o=t.top-n.height-Ui;break;case"bottom":d=t.left+t.width/2,o=t.bottom+Ui;break;case"left":d=t.left-n.width-Ui,o=t.top+t.height/2;break;case"right":d=t.right+Ui,o=t.top+t.height/2;break}e.style.left=`${d}px`,e.style.top=`${o}px`}},RY=`:host {
|
|
293
|
-
display: block;
|
|
294
|
-
margin-bottom: 12px;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.dt-card-inner {
|
|
298
|
-
background: var(--dt-surface);
|
|
299
|
-
border: 1px solid var(--dt-accent);
|
|
300
|
-
border-radius: 2px;
|
|
301
|
-
padding: 12px;
|
|
302
|
-
color: var(--dt-text);
|
|
303
|
-
font-family: var(--font-ui, 'Work Sans', system-ui, sans-serif);
|
|
304
|
-
position: relative;
|
|
305
|
-
height: 100%;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
/* Corner accents for sci-fi feel */
|
|
309
|
-
.dt-card-inner::before {
|
|
310
|
-
content: '';
|
|
311
|
-
position: absolute;
|
|
312
|
-
top: -1px;
|
|
313
|
-
left: -1px;
|
|
314
|
-
width: 8px;
|
|
315
|
-
height: 8px;
|
|
316
|
-
border-top: 2px solid var(--dt-accent);
|
|
317
|
-
border-left: 2px solid var(--dt-accent);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
.dt-card-inner::after {
|
|
321
|
-
content: '';
|
|
322
|
-
position: absolute;
|
|
323
|
-
bottom: -1px;
|
|
324
|
-
right: -1px;
|
|
325
|
-
width: 8px;
|
|
326
|
-
height: 8px;
|
|
327
|
-
border-bottom: 2px solid var(--dt-accent);
|
|
328
|
-
border-right: 2px solid var(--dt-accent);
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
:host([variant='outlined']) .dt-card-inner {
|
|
332
|
-
background: transparent;
|
|
333
|
-
border-style: dashed;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
:host([variant='filled']) .dt-card-inner {
|
|
337
|
-
background: var(--dt-accent-subtle);
|
|
338
|
-
border-style: solid;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
::slotted(h1),
|
|
342
|
-
::slotted(h2),
|
|
343
|
-
::slotted(h3),
|
|
344
|
-
::slotted(h4),
|
|
345
|
-
::slotted(h5),
|
|
346
|
-
::slotted(h6) {
|
|
347
|
-
color: var(--dt-accent);
|
|
348
|
-
margin: 0 0 6px;
|
|
349
|
-
line-height: 1.2;
|
|
350
|
-
font-family: var(--font-display, 'Sora', system-ui, sans-serif);
|
|
351
|
-
font-weight: 600;
|
|
352
|
-
text-transform: uppercase;
|
|
353
|
-
letter-spacing: 0.1em;
|
|
354
|
-
font-size: 0.85rem;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
::slotted(p) {
|
|
358
|
-
color: var(--dt-text-secondary);
|
|
359
|
-
margin: 0 0 6px;
|
|
360
|
-
line-height: 1.4;
|
|
361
|
-
font-family: var(--font-ui, 'Work Sans', system-ui, sans-serif);
|
|
362
|
-
font-size: 0.8125rem;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
::slotted(p:last-child) {
|
|
366
|
-
margin-bottom: 0;
|
|
367
|
-
}
|
|
368
|
-
`,OY="dt-card-inner",LY=class extends HTMLElement{static get observedAttributes(){return["variant"]}get variant(){let e=this.getAttribute("variant");return e==="outlined"||e==="filled"?e:"default"}set variant(e){this.setAttribute("variant",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=RY,e.appendChild(t);let n=document.createElement("div");n.className=OY,n.innerHTML="<slot></slot>",e.appendChild(n)}},MY=`.dt-select-menu {
|
|
369
|
-
position: fixed;
|
|
370
|
-
z-index: 2147483646;
|
|
371
|
-
display: flex;
|
|
372
|
-
min-width: 200px;
|
|
373
|
-
max-width: min(300px, 72vw);
|
|
374
|
-
max-height: 240px;
|
|
375
|
-
flex-direction: column;
|
|
376
|
-
overflow-y: auto;
|
|
377
|
-
border: 1px solid var(--dt-accent);
|
|
378
|
-
border-radius: 2px;
|
|
379
|
-
background: var(--dt-surface);
|
|
380
|
-
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
|
|
381
|
-
opacity: 0;
|
|
382
|
-
pointer-events: none;
|
|
383
|
-
transition: opacity 100ms ease;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.dt-select-menu[data-open] {
|
|
387
|
-
opacity: 1;
|
|
388
|
-
pointer-events: auto;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.dt-select-option {
|
|
392
|
-
display: flex;
|
|
393
|
-
width: 100%;
|
|
394
|
-
align-items: center;
|
|
395
|
-
justify-content: space-between;
|
|
396
|
-
padding: 8px 10px;
|
|
397
|
-
border: 0;
|
|
398
|
-
border-bottom: 1px solid var(--dt-border-subtle);
|
|
399
|
-
background: transparent;
|
|
400
|
-
color: var(--dt-text);
|
|
401
|
-
font-family: var(
|
|
402
|
-
--font-mono,
|
|
403
|
-
'SF Mono',
|
|
404
|
-
Monaco,
|
|
405
|
-
'Cascadia Code',
|
|
406
|
-
'Roboto Mono',
|
|
407
|
-
Consolas,
|
|
408
|
-
monospace
|
|
409
|
-
);
|
|
410
|
-
font-size: 0.8125rem;
|
|
411
|
-
font-weight: 600;
|
|
412
|
-
letter-spacing: 0.04em;
|
|
413
|
-
text-align: left;
|
|
414
|
-
cursor: pointer;
|
|
415
|
-
transition: all 0.1s ease;
|
|
416
|
-
user-select: none;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
.dt-select-option:last-child {
|
|
420
|
-
border-bottom: none;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.dt-select-option:hover {
|
|
424
|
-
background: var(--dt-accent);
|
|
425
|
-
color: var(--dt-text-on-accent);
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
.dt-select-option.dt-select-option--active {
|
|
429
|
-
background: var(--dt-accent-subtle);
|
|
430
|
-
color: var(--dt-accent);
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
.dt-select-option span {
|
|
434
|
-
overflow: hidden;
|
|
435
|
-
text-overflow: ellipsis;
|
|
436
|
-
white-space: nowrap;
|
|
437
|
-
}
|
|
438
|
-
`,IY=`:host {
|
|
439
|
-
display: block;
|
|
440
|
-
width: 100%;
|
|
441
|
-
min-width: 0;
|
|
442
|
-
position: relative;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
:host([disabled]) .dt-select-trigger {
|
|
446
|
-
cursor: not-allowed;
|
|
447
|
-
opacity: 0.4;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
.dt-select-trigger {
|
|
451
|
-
display: flex;
|
|
452
|
-
width: 100%;
|
|
453
|
-
min-width: 0;
|
|
454
|
-
max-width: 100%;
|
|
455
|
-
box-sizing: border-box;
|
|
456
|
-
align-items: center;
|
|
457
|
-
gap: 6px;
|
|
458
|
-
padding: 6px 10px;
|
|
459
|
-
border: 1px solid var(--dt-accent);
|
|
460
|
-
border-radius: 2px;
|
|
461
|
-
background: var(--dt-surface);
|
|
462
|
-
color: var(--dt-text);
|
|
463
|
-
font-family: var(
|
|
464
|
-
--font-mono,
|
|
465
|
-
'SF Mono',
|
|
466
|
-
Monaco,
|
|
467
|
-
'Cascadia Code',
|
|
468
|
-
'Roboto Mono',
|
|
469
|
-
Consolas,
|
|
470
|
-
monospace
|
|
471
|
-
);
|
|
472
|
-
font-size: 0.8125rem;
|
|
473
|
-
font-weight: 600;
|
|
474
|
-
letter-spacing: 0.04em;
|
|
475
|
-
line-height: 1;
|
|
476
|
-
cursor: pointer;
|
|
477
|
-
transition: all 0.1s ease;
|
|
478
|
-
user-select: none;
|
|
479
|
-
position: relative;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
/* Corner accents */
|
|
483
|
-
.dt-select-trigger::before {
|
|
484
|
-
content: '';
|
|
485
|
-
position: absolute;
|
|
486
|
-
top: 0;
|
|
487
|
-
left: 0;
|
|
488
|
-
width: 4px;
|
|
489
|
-
height: 4px;
|
|
490
|
-
border-top: 1px solid var(--dt-accent);
|
|
491
|
-
border-left: 1px solid var(--dt-accent);
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
.dt-select-trigger::after {
|
|
495
|
-
content: '';
|
|
496
|
-
position: absolute;
|
|
497
|
-
bottom: 0;
|
|
498
|
-
right: 0;
|
|
499
|
-
width: 4px;
|
|
500
|
-
height: 4px;
|
|
501
|
-
border-bottom: 1px solid var(--dt-accent);
|
|
502
|
-
border-right: 1px solid var(--dt-accent);
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
.dt-select-trigger:hover:not([disabled]) {
|
|
506
|
-
background: var(--dt-accent);
|
|
507
|
-
color: var(--dt-text-on-accent);
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
.dt-select-trigger:hover:not([disabled])::before,
|
|
511
|
-
.dt-select-trigger:hover:not([disabled])::after {
|
|
512
|
-
border-color: var(--dt-text-on-accent);
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
.dt-select-trigger[aria-expanded='true'] {
|
|
516
|
-
background: var(--dt-accent);
|
|
517
|
-
color: var(--dt-text-on-accent);
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
.dt-select-trigger[aria-expanded='true']::before,
|
|
521
|
-
.dt-select-trigger[aria-expanded='true']::after {
|
|
522
|
-
border-color: var(--dt-text-on-accent);
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
.dt-select-label {
|
|
526
|
-
overflow: hidden;
|
|
527
|
-
text-overflow: ellipsis;
|
|
528
|
-
white-space: nowrap;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
.dt-select-chevron {
|
|
532
|
-
color: currentColor;
|
|
533
|
-
font-size: 10px;
|
|
534
|
-
transition: transform 140ms ease;
|
|
535
|
-
opacity: 0.7;
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
.dt-select-trigger[aria-expanded='true'] .dt-select-chevron {
|
|
539
|
-
transform: rotate(180deg);
|
|
540
|
-
}
|
|
541
|
-
`,DY="dt-select-trigger",vv="dt-select-label",BY="dt-select-chevron",zY="dt-select-menu",PY="dt-select-option",HY="dt-select-option--active",_v=!1;function UY(){if(_v)return;let e=document.createElement("style");e.setAttribute("data-dt-select",""),e.textContent=MY,document.head.appendChild(e),_v=!0}var jY=class extends HTMLElement{_menu=null;_trigger=null;_options=[];_open=!1;_menuId="";static get observedAttributes(){return["value","placeholder","disabled","align"]}get value(){return this.getAttribute("value")??""}set value(e){this.setAttribute("value",e)}get placeholder(){return this.getAttribute("placeholder")??"Select…"}set placeholder(e){this.setAttribute("placeholder",e)}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get align(){return this.getAttribute("align")==="right"?"right":"left"}set align(e){this.setAttribute("align",e)}get options(){return this._options}set options(e){this._options=e,this._updateLabel(),this._open&&this._renderMenuItems()}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=IY,e.appendChild(t);let n=document.createElement("button");n.type="button",n.className=DY,n.setAttribute("aria-haspopup","listbox"),n.setAttribute("aria-expanded","false");let i=document.createElement("span");i.className=vv,n.appendChild(i);let s=document.createElement("span");s.className=BY,s.setAttribute("aria-hidden","true"),s.textContent="▾",n.appendChild(s),e.appendChild(n),this._trigger=n,this._menuId=`dt-sel-${Math.random().toString(36).slice(2,9)}`}connectedCallback(){UY(),this._trigger.addEventListener("click",this._onTriggerClick),this._updateLabel()}disconnectedCallback(){this._trigger.removeEventListener("click",this._onTriggerClick),this._close()}attributeChangedCallback(e){e==="value"&&(this._updateLabel(),this._open&&this._renderMenuItems()),e==="placeholder"&&!this.value&&this._updateLabel(),e==="disabled"&&this.disabled&&this._close()}_updateLabel(){let e=this._trigger.querySelector(`.${vv}`),t=this._options.find(n=>n.value===this.value);e.textContent=t?.label??this.placeholder}_onTriggerClick=()=>{this.disabled||(this._open?this._close():this._openMenu())};_openMenu(){if(this._open)return;let e=document.createElement("div");e.className=zY,e.id=this._menuId,e.setAttribute("role","listbox"),document.body.appendChild(e),this._menu=e,this._renderMenuItems(),this._position(),requestAnimationFrame(()=>{e.setAttribute("data-open","")}),this._open=!0,this._trigger.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{document.addEventListener("mousedown",this._onOutsideClick),document.addEventListener("keydown",this._onKeyDown)})}_close(){if(this._open){if(document.removeEventListener("mousedown",this._onOutsideClick),document.removeEventListener("keydown",this._onKeyDown),this._menu){this._menu.removeAttribute("data-open");let e=this._menu;setTimeout(()=>e.remove(),140),this._menu=null}this._open=!1,this._trigger.setAttribute("aria-expanded","false")}}_onOutsideClick=e=>{let t=e.target;this._menu?.contains(t)||this.contains(t)||this._close()};_onKeyDown=e=>{e.key==="Escape"&&(this._close(),this._trigger.focus())};_renderMenuItems(){let e=this._menu;if(e){e.innerHTML="";for(let t of this._options){let n=document.createElement("button");n.type="button",n.className=PY,n.setAttribute("role","option"),n.setAttribute("aria-selected",String(t.value===this.value)),t.value===this.value&&n.classList.add(HY);let i=document.createElement("span");i.textContent=t.label,n.appendChild(i),n.addEventListener("click",()=>{this._selectValue(t.value)}),e.appendChild(n)}}}_selectValue(e){let t=this.value;this.value=e,this._updateLabel(),this._close(),e!==t&&this.dispatchEvent(new CustomEvent("dt-change",{detail:{value:e},bubbles:!0,composed:!0}))}_position(){let e=this._menu;if(!e)return;let t=this.getBoundingClientRect(),n=10,i=Math.max(t.width,240),s=t.bottom+n,l=e.scrollHeight||260,o=window.innerHeight;if(s+l>o&&t.top-l-n>0&&(s=t.top-l-n),e.style.minWidth=`${i}px`,this.align==="right"){let d=window.innerWidth;e.style.right=`${d-t.right}px`,e.style.left="auto"}else e.style.left=`${t.left}px`,e.style.right="auto";e.style.top=`${s}px`}},FY=`:host {
|
|
542
|
-
display: block;
|
|
543
|
-
margin-bottom: 12px;
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
.dt-grid-inner {
|
|
547
|
-
display: grid;
|
|
548
|
-
gap: var(--grid-gap, 12px);
|
|
549
|
-
grid-template-columns: repeat(auto-fit, minmax(var(--min-width, 220px), 1fr));
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
:host([cols='1']) .dt-grid-inner {
|
|
553
|
-
grid-template-columns: repeat(1, 1fr);
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
:host([cols='2']) .dt-grid-inner {
|
|
557
|
-
grid-template-columns: repeat(2, 1fr);
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
:host([cols='3']) .dt-grid-inner {
|
|
561
|
-
grid-template-columns: repeat(3, 1fr);
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
:host([cols='4']) .dt-grid-inner {
|
|
565
|
-
grid-template-columns: repeat(4, 1fr);
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
:host([cols='5']) .dt-grid-inner {
|
|
569
|
-
grid-template-columns: repeat(5, 1fr);
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
:host([cols='6']) .dt-grid-inner {
|
|
573
|
-
grid-template-columns: repeat(6, 1fr);
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
@media (max-width: 480px) {
|
|
577
|
-
:host([cols='2']) .dt-grid-inner,
|
|
578
|
-
:host([cols='3']) .dt-grid-inner,
|
|
579
|
-
:host([cols='4']) .dt-grid-inner,
|
|
580
|
-
:host([cols='5']) .dt-grid-inner,
|
|
581
|
-
:host([cols='6']) .dt-grid-inner {
|
|
582
|
-
grid-template-columns: 1fr;
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
:host([gap='0']) .dt-grid-inner {
|
|
587
|
-
--grid-gap: 0;
|
|
588
|
-
}
|
|
589
|
-
:host([gap='4']) .dt-grid-inner {
|
|
590
|
-
--grid-gap: 4px;
|
|
591
|
-
}
|
|
592
|
-
:host([gap='8']) .dt-grid-inner {
|
|
593
|
-
--grid-gap: 8px;
|
|
594
|
-
}
|
|
595
|
-
:host([gap='12']) .dt-grid-inner {
|
|
596
|
-
--grid-gap: 12px;
|
|
597
|
-
}
|
|
598
|
-
:host([gap='16']) .dt-grid-inner {
|
|
599
|
-
--grid-gap: 16px;
|
|
600
|
-
}
|
|
601
|
-
:host([gap='20']) .dt-grid-inner {
|
|
602
|
-
--grid-gap: 20px;
|
|
603
|
-
}
|
|
604
|
-
:host([gap='24']) .dt-grid-inner {
|
|
605
|
-
--grid-gap: 24px;
|
|
606
|
-
}
|
|
607
|
-
:host([gap='32']) .dt-grid-inner {
|
|
608
|
-
--grid-gap: 32px;
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
:host([min-width='150']) .dt-grid-inner {
|
|
612
|
-
--min-width: 150px;
|
|
613
|
-
}
|
|
614
|
-
:host([min-width='180']) .dt-grid-inner {
|
|
615
|
-
--min-width: 180px;
|
|
616
|
-
}
|
|
617
|
-
:host([min-width='200']) .dt-grid-inner {
|
|
618
|
-
--min-width: 200px;
|
|
619
|
-
}
|
|
620
|
-
:host([min-width='220']) .dt-grid-inner {
|
|
621
|
-
--min-width: 220px;
|
|
622
|
-
}
|
|
623
|
-
:host([min-width='260']) .dt-grid-inner {
|
|
624
|
-
--min-width: 260px;
|
|
625
|
-
}
|
|
626
|
-
:host([min-width='300']) .dt-grid-inner {
|
|
627
|
-
--min-width: 300px;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
::slotted(*) {
|
|
631
|
-
min-width: 0;
|
|
632
|
-
}
|
|
633
|
-
`,$Y="dt-grid-inner",qY=class extends HTMLElement{static get observedAttributes(){return["cols","gap","min-width"]}get cols(){let e=this.getAttribute("cols");return e==="1"||e==="2"||e==="3"||e==="4"||e==="5"||e==="6"?e:null}set cols(e){e===null?this.removeAttribute("cols"):this.setAttribute("cols",e)}get gap(){let e=this.getAttribute("gap");return e==="0"||e==="4"||e==="8"||e==="12"||e==="20"||e==="24"||e==="32"?e:"16"}set gap(e){this.setAttribute("gap",e)}get minWidth(){let e=this.getAttribute("min-width");return e==="150"||e==="180"||e==="200"||e==="260"||e==="300"?e:"220"}set minWidth(e){this.setAttribute("min-width",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=FY,e.appendChild(t);let n=document.createElement("div");n.className=$Y,n.innerHTML="<slot></slot>",e.appendChild(n)}},YY=`:host {
|
|
634
|
-
display: block;
|
|
635
|
-
margin-bottom: 12px;
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
.dt-stack-inner {
|
|
639
|
-
display: flex;
|
|
640
|
-
flex-direction: var(--flex-direction, column);
|
|
641
|
-
gap: var(--stack-gap, 12px);
|
|
642
|
-
align-items: var(--align-items, stretch);
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
:host([direction='column']) .dt-stack-inner {
|
|
646
|
-
--flex-direction: column;
|
|
647
|
-
}
|
|
648
|
-
:host([direction='row']) .dt-stack-inner {
|
|
649
|
-
--flex-direction: row;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
:host([gap='0']) .dt-stack-inner {
|
|
653
|
-
--stack-gap: 0;
|
|
654
|
-
}
|
|
655
|
-
:host([gap='4']) .dt-stack-inner {
|
|
656
|
-
--stack-gap: 4px;
|
|
657
|
-
}
|
|
658
|
-
:host([gap='8']) .dt-stack-inner {
|
|
659
|
-
--stack-gap: 8px;
|
|
660
|
-
}
|
|
661
|
-
:host([gap='12']) .dt-stack-inner {
|
|
662
|
-
--stack-gap: 12px;
|
|
663
|
-
}
|
|
664
|
-
:host([gap='16']) .dt-stack-inner {
|
|
665
|
-
--stack-gap: 16px;
|
|
666
|
-
}
|
|
667
|
-
:host([gap='20']) .dt-stack-inner {
|
|
668
|
-
--stack-gap: 20px;
|
|
669
|
-
}
|
|
670
|
-
:host([gap='24']) .dt-stack-inner {
|
|
671
|
-
--stack-gap: 24px;
|
|
672
|
-
}
|
|
673
|
-
:host([gap='32']) .dt-stack-inner {
|
|
674
|
-
--stack-gap: 32px;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
:host([align='start']) .dt-stack-inner {
|
|
678
|
-
--align-items: flex-start;
|
|
679
|
-
}
|
|
680
|
-
:host([align='center']) .dt-stack-inner {
|
|
681
|
-
--align-items: center;
|
|
682
|
-
}
|
|
683
|
-
:host([align='end']) .dt-stack-inner {
|
|
684
|
-
--align-items: flex-end;
|
|
685
|
-
}
|
|
686
|
-
:host([align='stretch']) .dt-stack-inner {
|
|
687
|
-
--align-items: stretch;
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
@media (max-width: 480px) {
|
|
691
|
-
:host([direction='row']) .dt-stack-inner {
|
|
692
|
-
--flex-direction: column;
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
::slotted(*) {
|
|
697
|
-
min-width: 0;
|
|
698
|
-
}
|
|
699
|
-
`,VY="dt-stack-inner";function cp(e){return e==="row"||e==="horizontal"?"row":"column"}var GY=class extends HTMLElement{static get observedAttributes(){return["direction","gap","align"]}get direction(){return cp(this.getAttribute("direction"))}set direction(e){this.setAttribute("direction",cp(e))}get gap(){let e=this.getAttribute("gap");return e==="0"||e==="4"||e==="8"||e==="12"||e==="20"||e==="24"||e==="32"?e:"16"}set gap(e){this.setAttribute("gap",e)}get align(){let e=this.getAttribute("align");return e==="start"||e==="center"||e==="end"?e:"stretch"}set align(e){this.setAttribute("align",e)}connectedCallback(){this.#e()}attributeChangedCallback(e){e==="direction"&&this.#e()}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=YY,e.appendChild(t);let n=document.createElement("div");n.className=VY,n.innerHTML="<slot></slot>",e.appendChild(n)}#e(){let e=this.getAttribute("direction"),t=cp(e);e!==null&&e!==t&&this.setAttribute("direction",t)}},WY=`:host {
|
|
700
|
-
display: block;
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
.dt-stat-inner {
|
|
704
|
-
background: var(--dt-surface);
|
|
705
|
-
border: 1px solid var(--dt-accent);
|
|
706
|
-
border-radius: 2px;
|
|
707
|
-
padding: 12px;
|
|
708
|
-
font-family: var(--font-ui, 'Work Sans', system-ui, sans-serif);
|
|
709
|
-
display: flex;
|
|
710
|
-
flex-direction: column;
|
|
711
|
-
gap: 4px;
|
|
712
|
-
position: relative;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
/* Corner accents */
|
|
716
|
-
.dt-stat-inner::before {
|
|
717
|
-
content: '';
|
|
718
|
-
position: absolute;
|
|
719
|
-
top: 0;
|
|
720
|
-
left: 0;
|
|
721
|
-
width: 6px;
|
|
722
|
-
height: 6px;
|
|
723
|
-
border-top: 1px solid var(--dt-accent);
|
|
724
|
-
border-left: 1px solid var(--dt-accent);
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
.dt-stat-inner .label {
|
|
728
|
-
font-size: 0.625rem;
|
|
729
|
-
font-weight: 600;
|
|
730
|
-
color: var(--dt-text-muted);
|
|
731
|
-
text-transform: uppercase;
|
|
732
|
-
letter-spacing: 0.12em;
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
.dt-stat-inner .value {
|
|
736
|
-
font-size: 1.5rem;
|
|
737
|
-
font-weight: 600;
|
|
738
|
-
color: var(--dt-accent);
|
|
739
|
-
line-height: 1.1;
|
|
740
|
-
white-space: nowrap;
|
|
741
|
-
overflow: hidden;
|
|
742
|
-
text-overflow: ellipsis;
|
|
743
|
-
font-family: var(--font-display, 'Sora', system-ui, sans-serif);
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
.dt-stat-inner .description {
|
|
747
|
-
font-size: 0.75rem;
|
|
748
|
-
color: var(--dt-text-secondary);
|
|
749
|
-
line-height: 1.3;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
/* Size variants */
|
|
753
|
-
:host([size='sm']) .dt-stat-inner .value {
|
|
754
|
-
font-size: 1.125rem;
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
:host([size='sm']) .dt-stat-inner {
|
|
758
|
-
padding: 8px;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
:host([size='lg']) .dt-stat-inner .value {
|
|
762
|
-
font-size: 2rem;
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
:host([size='lg']) .dt-stat-inner {
|
|
766
|
-
padding: 16px;
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
/* Variant: outlined */
|
|
770
|
-
:host([variant='outlined']) .dt-stat-inner {
|
|
771
|
-
background: transparent;
|
|
772
|
-
border-style: dashed;
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
/* Variant: filled */
|
|
776
|
-
:host([variant='filled']) .dt-stat-inner {
|
|
777
|
-
background: var(--dt-accent-subtle);
|
|
778
|
-
border-style: solid;
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
/* Trend indicators */
|
|
782
|
-
.dt-stat-inner .trend {
|
|
783
|
-
display: inline-flex;
|
|
784
|
-
align-items: center;
|
|
785
|
-
gap: 3px;
|
|
786
|
-
font-size: 0.6875rem;
|
|
787
|
-
font-weight: 600;
|
|
788
|
-
margin-top: 2px;
|
|
789
|
-
text-transform: uppercase;
|
|
790
|
-
letter-spacing: 0.05em;
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
.dt-stat-inner .trend.positive {
|
|
794
|
-
color: var(--dt-success);
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
.dt-stat-inner .trend.negative {
|
|
798
|
-
color: var(--dt-danger);
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
.dt-stat-inner .trend.neutral {
|
|
802
|
-
color: var(--dt-text-muted);
|
|
803
|
-
}
|
|
804
|
-
`,QY="dt-stat-inner",XY=class extends HTMLElement{static get observedAttributes(){return["label","value","description","size","variant","trend","trend-value"]}_container;_labelEl;_valueEl;_descEl;_trendEl;get label(){return this.getAttribute("label")}set label(e){e===null?this.removeAttribute("label"):this.setAttribute("label",e)}get value(){return this.getAttribute("value")}set value(e){e===null?this.removeAttribute("value"):this.setAttribute("value",e)}get description(){return this.getAttribute("description")}set description(e){e===null?this.removeAttribute("description"):this.setAttribute("description",e)}get size(){let e=this.getAttribute("size");return e==="sm"||e==="lg"?e:"md"}set size(e){this.setAttribute("size",e)}get variant(){let e=this.getAttribute("variant");return e==="outlined"||e==="filled"?e:"default"}set variant(e){this.setAttribute("variant",e)}get trend(){let e=this.getAttribute("trend");return e==="up"||e==="down"||e==="neutral"?e:null}set trend(e){e===null?this.removeAttribute("trend"):this.setAttribute("trend",e)}get trendValue(){return this.getAttribute("trend-value")}set trendValue(e){e===null?this.removeAttribute("trend-value"):this.setAttribute("trend-value",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=WY,e.appendChild(t),this._container=document.createElement("div"),this._container.className=QY,this._labelEl=document.createElement("div"),this._labelEl.className="label",this._container.appendChild(this._labelEl),this._valueEl=document.createElement("div"),this._valueEl.className="value",this._container.appendChild(this._valueEl),this._descEl=document.createElement("div"),this._descEl.className="description",this._container.appendChild(this._descEl),this._trendEl=document.createElement("div"),this._trendEl.className="trend",this._container.appendChild(this._trendEl),e.appendChild(this._container),this._render()}attributeChangedCallback(e,t,n){(e==="label"||e==="value"||e==="description"||e==="size"||e==="variant"||e==="trend"||e==="trend-value")&&this._render()}_render(){this._labelEl.textContent=this.label??"",this._labelEl.style.display=this.label?"block":"none",this._valueEl.textContent=this.value??"",this._valueEl.style.display=this.value?"block":"none",this._descEl.textContent=this.description??"",this._descEl.style.display=this.description?"block":"none";let e=this.trend,t=this.trendValue;if(e&&t){this._trendEl.style.display="inline-flex",this._trendEl.className=`trend ${e==="up"?"positive":e==="down"?"negative":"neutral"}`;let n="";e==="up"?n="↑":e==="down"?n="↓":n="→",this._trendEl.textContent=`${n} ${t}`}else this._trendEl.style.display="none"}},KY=`:host {
|
|
805
|
-
display: inline-flex;
|
|
806
|
-
vertical-align: middle;
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
.dt-badge-inner {
|
|
810
|
-
display: inline-flex;
|
|
811
|
-
align-items: center;
|
|
812
|
-
padding: 2px 6px;
|
|
813
|
-
border: 1px solid;
|
|
814
|
-
border-radius: 2px;
|
|
815
|
-
font-size: 0.6875rem;
|
|
816
|
-
font-weight: 600;
|
|
817
|
-
font-family: var(
|
|
818
|
-
--font-mono,
|
|
819
|
-
'SF Mono',
|
|
820
|
-
Monaco,
|
|
821
|
-
'Cascadia Code',
|
|
822
|
-
'Roboto Mono',
|
|
823
|
-
Consolas,
|
|
824
|
-
monospace
|
|
825
|
-
);
|
|
826
|
-
line-height: 1.2;
|
|
827
|
-
white-space: nowrap;
|
|
828
|
-
text-transform: uppercase;
|
|
829
|
-
letter-spacing: 0.1em;
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
/* Variant: accent (default) */
|
|
833
|
-
:host([variant='accent']) .dt-badge-inner,
|
|
834
|
-
.dt-badge-inner {
|
|
835
|
-
background: var(--dt-accent-subtle);
|
|
836
|
-
border-color: var(--dt-accent);
|
|
837
|
-
color: var(--dt-accent);
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
/* Variant: success */
|
|
841
|
-
:host([variant='success']) .dt-badge-inner {
|
|
842
|
-
background: var(--dt-success-subtle);
|
|
843
|
-
border-color: var(--dt-success);
|
|
844
|
-
color: var(--dt-success);
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
/* Variant: danger */
|
|
848
|
-
:host([variant='danger']) .dt-badge-inner {
|
|
849
|
-
background: var(--dt-danger-subtle);
|
|
850
|
-
border-color: var(--dt-danger);
|
|
851
|
-
color: var(--dt-danger);
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
/* Variant: warning */
|
|
855
|
-
:host([variant='warning']) .dt-badge-inner {
|
|
856
|
-
background: var(--dt-warning-subtle);
|
|
857
|
-
border-color: var(--dt-warning);
|
|
858
|
-
color: var(--dt-warning);
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
/* Variant: info */
|
|
862
|
-
:host([variant='info']) .dt-badge-inner {
|
|
863
|
-
background: var(--dt-info-subtle);
|
|
864
|
-
border-color: var(--dt-info);
|
|
865
|
-
color: var(--dt-info);
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
/* Variant: default/neutral */
|
|
869
|
-
:host([variant='default']) .dt-badge-inner,
|
|
870
|
-
:host([variant='neutral']) .dt-badge-inner {
|
|
871
|
-
background: transparent;
|
|
872
|
-
border-color: var(--dt-border);
|
|
873
|
-
color: var(--dt-text-secondary);
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
/* Size variants */
|
|
877
|
-
:host([size='sm']) .dt-badge-inner {
|
|
878
|
-
padding: 1px 4px;
|
|
879
|
-
font-size: 0.625rem;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
:host([size='lg']) .dt-badge-inner {
|
|
883
|
-
padding: 3px 8px;
|
|
884
|
-
font-size: 0.75rem;
|
|
885
|
-
}
|
|
886
|
-
`,ZY="dt-badge-inner",JY=class extends HTMLElement{static get observedAttributes(){return["variant","size","text"]}_container;_slot;get variant(){let e=this.getAttribute("variant");return e==="success"||e==="danger"||e==="warning"||e==="info"||e==="default"||e==="neutral"?e:"accent"}set variant(e){this.setAttribute("variant",e)}get size(){let e=this.getAttribute("size");return e==="sm"||e==="lg"?e:"md"}set size(e){this.setAttribute("size",e)}get text(){return this.getAttribute("text")}set text(e){e===null?this.removeAttribute("text"):this.setAttribute("text",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=KY,e.appendChild(t),this._container=document.createElement("span"),this._container.className=ZY;let n=this.text;n!==null?this._container.textContent=n:(this._slot=document.createElement("slot"),this._container.appendChild(this._slot)),e.appendChild(this._container)}attributeChangedCallback(e,t,n){e==="text"&&this._render()}_render(){let e=this.text;e!==null&&(this._container.textContent=e)}},eV=`:host {
|
|
887
|
-
display: inline-flex;
|
|
888
|
-
vertical-align: middle;
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
.dt-button-inner {
|
|
892
|
-
display: inline-flex;
|
|
893
|
-
align-items: center;
|
|
894
|
-
justify-content: center;
|
|
895
|
-
gap: 4px;
|
|
896
|
-
padding: 6px 12px;
|
|
897
|
-
border: 1px solid var(--dt-accent);
|
|
898
|
-
border-radius: 2px;
|
|
899
|
-
font-size: 0.8125rem;
|
|
900
|
-
font-weight: 600;
|
|
901
|
-
font-family: var(--font-ui, 'Work Sans', system-ui, sans-serif);
|
|
902
|
-
line-height: 1.2;
|
|
903
|
-
cursor: pointer;
|
|
904
|
-
transition: all 0.1s ease;
|
|
905
|
-
background: var(--dt-surface);
|
|
906
|
-
color: var(--dt-accent);
|
|
907
|
-
text-transform: uppercase;
|
|
908
|
-
letter-spacing: 0.08em;
|
|
909
|
-
position: relative;
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
/* Corner accents */
|
|
913
|
-
.dt-button-inner::before {
|
|
914
|
-
content: '';
|
|
915
|
-
position: absolute;
|
|
916
|
-
top: 0;
|
|
917
|
-
left: 0;
|
|
918
|
-
width: 4px;
|
|
919
|
-
height: 4px;
|
|
920
|
-
border-top: 1px solid var(--dt-accent);
|
|
921
|
-
border-left: 1px solid var(--dt-accent);
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
.dt-button-inner::after {
|
|
925
|
-
content: '';
|
|
926
|
-
position: absolute;
|
|
927
|
-
bottom: 0;
|
|
928
|
-
right: 0;
|
|
929
|
-
width: 4px;
|
|
930
|
-
height: 4px;
|
|
931
|
-
border-bottom: 1px solid var(--dt-accent);
|
|
932
|
-
border-right: 1px solid var(--dt-accent);
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
.dt-button-inner:hover:not(:disabled) {
|
|
936
|
-
background: var(--dt-accent);
|
|
937
|
-
color: var(--dt-text-on-accent);
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
.dt-button-inner:hover:not(:disabled)::before,
|
|
941
|
-
.dt-button-inner:hover:not(:disabled)::after {
|
|
942
|
-
border-color: var(--dt-text-on-accent);
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
.dt-button-inner:active:not(:disabled) {
|
|
946
|
-
background: var(--dt-accent-active);
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
.dt-button-inner:disabled {
|
|
950
|
-
opacity: 0.4;
|
|
951
|
-
cursor: not-allowed;
|
|
952
|
-
border-color: var(--dt-border);
|
|
953
|
-
color: var(--dt-text-muted);
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
.dt-button-inner:disabled::before,
|
|
957
|
-
.dt-button-inner:disabled::after {
|
|
958
|
-
border-color: var(--dt-border);
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
/* Variant: primary - filled accent */
|
|
962
|
-
:host([variant='primary']) .dt-button-inner {
|
|
963
|
-
background: var(--dt-accent);
|
|
964
|
-
color: var(--dt-text-on-accent);
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
:host([variant='primary']) .dt-button-inner:hover:not(:disabled) {
|
|
968
|
-
background: var(--dt-accent-hover);
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
/* Variant: secondary - outlined */
|
|
972
|
-
:host([variant='secondary']) .dt-button-inner {
|
|
973
|
-
background: transparent;
|
|
974
|
-
border-color: var(--dt-border);
|
|
975
|
-
color: var(--dt-text);
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
:host([variant='secondary']) .dt-button-inner:hover:not(:disabled) {
|
|
979
|
-
background: var(--dt-surface-hover);
|
|
980
|
-
border-color: var(--dt-accent);
|
|
981
|
-
color: var(--dt-accent);
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
/* Variant: ghost - minimal */
|
|
985
|
-
:host([variant='ghost']) .dt-button-inner {
|
|
986
|
-
background: transparent;
|
|
987
|
-
border-color: transparent;
|
|
988
|
-
color: var(--dt-text-secondary);
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
:host([variant='ghost']) .dt-button-inner:hover:not(:disabled) {
|
|
992
|
-
background: var(--dt-surface);
|
|
993
|
-
border-color: var(--dt-border);
|
|
994
|
-
color: var(--dt-text);
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
:host([variant='ghost']) .dt-button-inner::before,
|
|
998
|
-
:host([variant='ghost']) .dt-button-inner::after {
|
|
999
|
-
display: none;
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
/* Variant: danger */
|
|
1003
|
-
:host([variant='danger']) .dt-button-inner {
|
|
1004
|
-
background: transparent;
|
|
1005
|
-
border-color: var(--dt-danger);
|
|
1006
|
-
color: var(--dt-danger);
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
:host([variant='danger']) .dt-button-inner:hover:not(:disabled) {
|
|
1010
|
-
background: var(--dt-danger);
|
|
1011
|
-
color: var(--dt-text-on-accent);
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
:host([variant='danger']) .dt-button-inner::before,
|
|
1015
|
-
:host([variant='danger']) .dt-button-inner::after {
|
|
1016
|
-
border-color: var(--dt-danger);
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
:host([variant='danger']) .dt-button-inner:hover:not(:disabled)::before,
|
|
1020
|
-
:host([variant='danger']) .dt-button-inner:hover:not(:disabled)::after {
|
|
1021
|
-
border-color: var(--dt-text-on-accent);
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
/* Size: sm */
|
|
1025
|
-
:host([size='sm']) .dt-button-inner {
|
|
1026
|
-
padding: 4px 8px;
|
|
1027
|
-
font-size: 0.75rem;
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
/* Size: lg */
|
|
1031
|
-
:host([size='lg']) .dt-button-inner {
|
|
1032
|
-
padding: 8px 16px;
|
|
1033
|
-
font-size: 0.875rem;
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
:host([fullwidth]) .dt-button-inner {
|
|
1037
|
-
width: 100%;
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
::slotted([slot='icon']) {
|
|
1041
|
-
display: inline-flex;
|
|
1042
|
-
width: 1em;
|
|
1043
|
-
height: 1em;
|
|
1044
|
-
}
|
|
1045
|
-
`,tV="dt-button-inner",nV=class extends HTMLElement{static get observedAttributes(){return["variant","size","disabled","fullwidth","type"]}_button;_slot;get variant(){let e=this.getAttribute("variant");return e==="secondary"||e==="ghost"||e==="danger"?e:"primary"}set variant(e){this.setAttribute("variant",e)}get size(){let e=this.getAttribute("size");return e==="sm"||e==="lg"?e:"md"}set size(e){this.setAttribute("size",e)}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get fullwidth(){return this.hasAttribute("fullwidth")}set fullwidth(e){e?this.setAttribute("fullwidth",""):this.removeAttribute("fullwidth")}get type(){let e=this.getAttribute("type");return e==="submit"||e==="reset"?e:"button"}set type(e){this.setAttribute("type",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=eV,e.appendChild(t),this._button=document.createElement("button"),this._button.className=tV,this._button.type=this.type,this._button.disabled=this.disabled,this._slot=document.createElement("slot"),this._button.appendChild(this._slot),e.appendChild(this._button)}attributeChangedCallback(e,t,n){switch(e){case"disabled":this._button.disabled=this.disabled;break;case"type":this._button.type=this.type;break}}},rV=`:host {
|
|
1046
|
-
display: block;
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
.dt-divider-inner {
|
|
1050
|
-
border: none;
|
|
1051
|
-
margin: 0;
|
|
1052
|
-
flex-shrink: 0;
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
/* Horizontal (default) */
|
|
1056
|
-
:host([direction='horizontal']) .dt-divider-inner,
|
|
1057
|
-
.dt-divider-inner {
|
|
1058
|
-
width: 100%;
|
|
1059
|
-
height: 1px;
|
|
1060
|
-
background: var(--dt-accent);
|
|
1061
|
-
opacity: 0.5;
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
/* Vertical */
|
|
1065
|
-
:host([direction='vertical']) .dt-divider-inner {
|
|
1066
|
-
width: 1px;
|
|
1067
|
-
height: 100%;
|
|
1068
|
-
min-height: 1em;
|
|
1069
|
-
background: var(--dt-accent);
|
|
1070
|
-
opacity: 0.5;
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
|
-
/* Style variants */
|
|
1074
|
-
:host([style-variant='subtle']) .dt-divider-inner {
|
|
1075
|
-
background: var(--dt-border);
|
|
1076
|
-
opacity: 1;
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
:host([style-variant='strong']) .dt-divider-inner {
|
|
1080
|
-
background: var(--dt-accent);
|
|
1081
|
-
opacity: 1;
|
|
1082
|
-
height: 2px;
|
|
1083
|
-
}
|
|
1084
|
-
|
|
1085
|
-
:host([direction='vertical'][style-variant='strong']) .dt-divider-inner {
|
|
1086
|
-
width: 2px;
|
|
1087
|
-
height: 100%;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
/* Spacing */
|
|
1091
|
-
:host([spacing='sm']) .dt-divider-inner {
|
|
1092
|
-
margin: 6px 0;
|
|
1093
|
-
}
|
|
1094
|
-
:host([spacing='md']) .dt-divider-inner {
|
|
1095
|
-
margin: 12px 0;
|
|
1096
|
-
}
|
|
1097
|
-
:host([spacing='lg']) .dt-divider-inner {
|
|
1098
|
-
margin: 18px 0;
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
:host([direction='vertical'][spacing='sm']) .dt-divider-inner {
|
|
1102
|
-
margin: 0 6px;
|
|
1103
|
-
}
|
|
1104
|
-
:host([direction='vertical'][spacing='md']) .dt-divider-inner {
|
|
1105
|
-
margin: 0 12px;
|
|
1106
|
-
}
|
|
1107
|
-
:host([direction='vertical'][spacing='lg']) .dt-divider-inner {
|
|
1108
|
-
margin: 0 18px;
|
|
1109
|
-
}
|
|
1110
|
-
`,iV="dt-divider-inner",aV=class extends HTMLElement{static get observedAttributes(){return["direction","style-variant","spacing"]}get direction(){return this.getAttribute("direction")==="vertical"?"vertical":"horizontal"}set direction(e){this.setAttribute("direction",e)}get styleVariant(){let e=this.getAttribute("style-variant");return e==="subtle"||e==="strong"?e:"default"}set styleVariant(e){this.setAttribute("style-variant",e)}get spacing(){let e=this.getAttribute("spacing");return e==="sm"||e==="md"||e==="lg"?e:null}set spacing(e){e===null?this.removeAttribute("spacing"):this.setAttribute("spacing",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=rV,e.appendChild(t);let n=document.createElement("hr");n.className=iV,e.appendChild(n)}},sV=`:host {
|
|
1111
|
-
display: block;
|
|
1112
|
-
min-height: 180px;
|
|
1113
|
-
color: var(--dt-text);
|
|
1114
|
-
font-family: var(
|
|
1115
|
-
--font-mono,
|
|
1116
|
-
'SF Mono',
|
|
1117
|
-
Monaco,
|
|
1118
|
-
'Cascadia Code',
|
|
1119
|
-
'Roboto Mono',
|
|
1120
|
-
Consolas,
|
|
1121
|
-
monospace
|
|
1122
|
-
);
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
.dt-table-view {
|
|
1126
|
-
display: flex;
|
|
1127
|
-
flex-direction: column;
|
|
1128
|
-
min-height: inherit;
|
|
1129
|
-
height: 100%;
|
|
1130
|
-
overflow: hidden;
|
|
1131
|
-
background: var(--dt-surface);
|
|
1132
|
-
border: 1px solid var(--dt-border);
|
|
1133
|
-
border-radius: 2px;
|
|
1134
|
-
position: relative;
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
.dt-table-view::before,
|
|
1138
|
-
.dt-table-view::after {
|
|
1139
|
-
content: '';
|
|
1140
|
-
position: absolute;
|
|
1141
|
-
width: 8px;
|
|
1142
|
-
height: 8px;
|
|
1143
|
-
pointer-events: none;
|
|
1144
|
-
z-index: 3;
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
.dt-table-view::before {
|
|
1148
|
-
top: -1px;
|
|
1149
|
-
left: -1px;
|
|
1150
|
-
border-top: 2px solid var(--dt-accent);
|
|
1151
|
-
border-left: 2px solid var(--dt-accent);
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
.dt-table-view::after {
|
|
1155
|
-
right: -1px;
|
|
1156
|
-
bottom: -1px;
|
|
1157
|
-
border-right: 2px solid var(--dt-accent);
|
|
1158
|
-
border-bottom: 2px solid var(--dt-accent);
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
.dt-table-scroll {
|
|
1162
|
-
min-height: inherit;
|
|
1163
|
-
height: 100%;
|
|
1164
|
-
overflow: auto;
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
.dt-table-header,
|
|
1168
|
-
.dt-table-row {
|
|
1169
|
-
display: grid;
|
|
1170
|
-
grid-template-columns: var(--dt-table-columns, minmax(0, 1fr));
|
|
1171
|
-
min-width: fit-content;
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
.dt-table-header {
|
|
1175
|
-
position: sticky;
|
|
1176
|
-
top: 0;
|
|
1177
|
-
z-index: 2;
|
|
1178
|
-
background: color-mix(in srgb, var(--dt-surface) 88%, var(--dt-accent) 12%);
|
|
1179
|
-
border-bottom: 1px solid var(--dt-border);
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
.dt-table-header-cell,
|
|
1183
|
-
.dt-table-cell {
|
|
1184
|
-
min-width: 0;
|
|
1185
|
-
padding: 10px 12px;
|
|
1186
|
-
overflow: hidden;
|
|
1187
|
-
text-overflow: ellipsis;
|
|
1188
|
-
white-space: nowrap;
|
|
1189
|
-
font-size: 0.8125rem;
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
.dt-table-header-cell {
|
|
1193
|
-
color: var(--dt-accent);
|
|
1194
|
-
font-size: 0.75rem;
|
|
1195
|
-
font-weight: 600;
|
|
1196
|
-
letter-spacing: 0.1em;
|
|
1197
|
-
text-transform: uppercase;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
.dt-table-header-cell--sortable {
|
|
1201
|
-
cursor: pointer;
|
|
1202
|
-
user-select: none;
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
.dt-table-header-cell--sortable:hover {
|
|
1206
|
-
background: var(--dt-surface-hover);
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
.dt-table-header-label {
|
|
1210
|
-
display: inline-flex;
|
|
1211
|
-
align-items: center;
|
|
1212
|
-
gap: 6px;
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
.dt-table-sort-indicator {
|
|
1216
|
-
color: var(--dt-text-secondary);
|
|
1217
|
-
font-size: 0.7rem;
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
.dt-table-body {
|
|
1221
|
-
position: relative;
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
.dt-table-canvas {
|
|
1225
|
-
position: relative;
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
.dt-table-row {
|
|
1229
|
-
position: absolute;
|
|
1230
|
-
left: 0;
|
|
1231
|
-
right: 0;
|
|
1232
|
-
border-bottom: 1px solid var(--dt-border-subtle);
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
|
-
.dt-table-row--clickable {
|
|
1236
|
-
cursor: pointer;
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
.dt-table-row--clickable:hover {
|
|
1240
|
-
background: var(--dt-surface-hover);
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
:host([striped]) .dt-table-row:nth-child(even) {
|
|
1244
|
-
background: color-mix(in srgb, var(--dt-surface) 92%, var(--dt-accent) 8%);
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
:host([bordered]) .dt-table-header-cell,
|
|
1248
|
-
:host([bordered]) .dt-table-cell {
|
|
1249
|
-
border-right: 1px solid var(--dt-border-subtle);
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
:host([bordered]) .dt-table-header-cell:last-child,
|
|
1253
|
-
:host([bordered]) .dt-table-cell:last-child {
|
|
1254
|
-
border-right: 0;
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
.dt-table-cell[data-align='center'],
|
|
1258
|
-
.dt-table-header-cell[data-align='center'] {
|
|
1259
|
-
text-align: center;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
.dt-table-cell[data-align='right'],
|
|
1263
|
-
.dt-table-header-cell[data-align='right'] {
|
|
1264
|
-
text-align: right;
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
.dt-table-empty {
|
|
1268
|
-
display: flex;
|
|
1269
|
-
align-items: center;
|
|
1270
|
-
justify-content: center;
|
|
1271
|
-
min-height: 140px;
|
|
1272
|
-
padding: 20px;
|
|
1273
|
-
color: var(--dt-text-muted);
|
|
1274
|
-
text-transform: uppercase;
|
|
1275
|
-
letter-spacing: 0.08em;
|
|
1276
|
-
font-size: 0.75rem;
|
|
1277
|
-
}
|
|
1278
|
-
`;function lV(e){return e==null||e===!1?null:e===!0?"":String(e)}function uV(e,t){let n=e.querySelectorAll("*");for(let i of n){let s=i.getAttribute("data-field");if(s){let l=t[s];i.textContent=l==null?"":String(l)}for(let l of i.getAttributeNames()){if(l==="data-field"||!l.startsWith("data-field-"))continue;let o=l.slice(11);if(!o)continue;let d=i.getAttribute(l);if(!d)continue;let h=lV(t[d]);h===null?i.removeAttribute(o):i.setAttribute(o,h)}}}function e6(e,t){let n=e.content.cloneNode(!0);return uV(n,t),n}var t6=class{_count=0;_estimateSize=56;_overscan=5;_fixedSize=null;_viewportHeight=0;_scrollTop=0;_sizes=new Map;constructor(e={}){this._count=e.count??0,this._estimateSize=e.estimateSize??56,this._overscan=e.overscan??5,this._fixedSize=e.fixedSize??null}setCount(e){this._count=Math.max(0,e);for(let t of this._sizes.keys())t>=this._count&&this._sizes.delete(t)}setViewportHeight(e){this._viewportHeight=Math.max(0,e)}setScrollTop(e){this._scrollTop=Math.max(0,e)}setEstimateSize(e){this._estimateSize=Math.max(1,e)}setFixedSize(e){this._fixedSize=e&&e>0?e:null}resetMeasurements(){this._sizes.clear()}measure(e,t){if(this._fixedSize!==null||e<0||e>=this._count)return 0;let n=Math.max(1,Math.round(t)),i=this._sizes.get(e);return i===n?0:(this._sizes.set(e,n),this.getOffset(e+1)<=this._scrollTop?n-(i??this._estimateSize):0)}getOffset(e){if(e<=0)return 0;let t=Math.min(e,this._count);if(this._fixedSize!==null)return t*this._fixedSize;let n=0;for(let i=0;i<t;i+=1)n+=this._sizes.get(i)??this._estimateSize;return n}getTotalHeight(){return this.getOffset(this._count)}getRange(){if(this._count===0)return{start:0,end:0,paddingTop:0,paddingBottom:0,totalHeight:0};if(this._fixedSize!==null){let d=Math.max(1,Math.ceil(this._viewportHeight/this._fixedSize)),h=Math.max(0,Math.floor(this._scrollTop/this._fixedSize)-this._overscan),f=Math.min(this._count,h+d+this._overscan*2),m=h*this._fixedSize,b=this._count*this._fixedSize,x=Math.max(0,b-m-(f-h)*this._fixedSize);return{start:h,end:f,paddingTop:m,paddingBottom:x,totalHeight:b}}let e=0,t=0;for(;e<this._count;){let d=this._sizes.get(e)??this._estimateSize;if(t+d>this._scrollTop)break;t+=d,e+=1}e=Math.max(0,e-this._overscan);let n=this.getOffset(e),i=e,s=0;for(;i<this._count&&s<this._viewportHeight;)s+=this._sizes.get(i)??this._estimateSize,i+=1;i=Math.min(this._count,i+this._overscan);let l=this.getTotalHeight(),o=Math.max(0,l-this.getOffset(i));return{start:e,end:i,paddingTop:n,paddingBottom:o,totalHeight:l}}};function oV(e){return e&&typeof e=="object"?e:{value:e}}function cV(e){return e==="center"||e==="right"?e:"left"}var n6=class extends HTMLElement{static get observedAttributes(){return["field","header","width","min-width","align"]}get field(){return this.getAttribute("field")??""}get header(){return this.getAttribute("header")??this.field}get width(){return this.getAttribute("width")??"auto"}get minWidth(){return this.getAttribute("min-width")??"0"}get align(){return cV(this.getAttribute("align"))}connectedCallback(){this.hidden=!0}attributeChangedCallback(){this.dispatchEvent(new CustomEvent("dt-column-change",{bubbles:!0,composed:!0}))}},dV=class extends HTMLElement{_rows=[];_columns=[];_virtualizer=new t6({estimateSize:40,overscan:5,fixedSize:40});_root;_scroll;_header;_body;_canvas;_emptyState;_resizeObserver=null;_mutationObserver=null;_sortField=null;_sortDirection="asc";static get observedAttributes(){return["row-height","sortable","striped","bordered","empty-text"]}get rows(){return this._rows}set rows(e){this._rows=Array.isArray(e)?e:[],this._virtualizer.setCount(this._rows.length),this._render()}get rowHeight(){let e=Number(this.getAttribute("row-height")??"40");return Number.isFinite(e)&&e>0?e:40}set rowHeight(e){this.setAttribute("row-height",String(e))}get sortable(){return this.hasAttribute("sortable")}get emptyText(){return this.getAttribute("empty-text")??"No data"}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=sV,e.appendChild(t),this._root=document.createElement("div"),this._root.className="dt-table-view",this._scroll=document.createElement("div"),this._scroll.className="dt-table-scroll",this._scroll.addEventListener("scroll",this._onScroll,{passive:!0}),this._header=document.createElement("div"),this._header.className="dt-table-header",this._body=document.createElement("div"),this._body.className="dt-table-body",this._canvas=document.createElement("div"),this._canvas.className="dt-table-canvas",this._emptyState=document.createElement("div"),this._emptyState.className="dt-table-empty",this._body.append(this._canvas,this._emptyState),this._scroll.append(this._header,this._body),this._root.appendChild(this._scroll),e.appendChild(this._root)}connectedCallback(){this._virtualizer.setFixedSize(this.rowHeight),this._virtualizer.setEstimateSize(this.rowHeight),this._syncColumns(),this._resizeObserver=new ResizeObserver(e=>{for(let t of e)if(t.target===this._scroll){let n=this._header.offsetHeight;this._virtualizer.setViewportHeight(Math.max(0,t.contentRect.height-n)),this._render()}}),this._resizeObserver.observe(this._scroll),this._mutationObserver=new MutationObserver(()=>{this._syncColumns(),this._render()}),this._mutationObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["field","header","width","min-width","align"]}),this._virtualizer.setCount(this._rows.length),this._virtualizer.setViewportHeight(Math.max(0,this._scroll.clientHeight-this._header.offsetHeight)),this._render()}disconnectedCallback(){this._scroll.removeEventListener("scroll",this._onScroll),this._resizeObserver?.disconnect(),this._mutationObserver?.disconnect(),this._resizeObserver=null,this._mutationObserver=null}attributeChangedCallback(e){e==="row-height"&&(this._virtualizer.setFixedSize(this.rowHeight),this._virtualizer.setEstimateSize(this.rowHeight)),this._render()}_onScroll=()=>{this._virtualizer.setScrollTop(Math.max(0,this._scroll.scrollTop-this._header.offsetHeight)),this._renderBody()};_syncColumns(){this._columns=Array.from(this.children).filter(e=>e instanceof n6).map(e=>({field:e.field,header:e.header,width:e.width,minWidth:e.minWidth,align:e.align,template:Array.from(e.children).find(t=>t instanceof HTMLTemplateElement)??null})).filter(e=>e.field)}_render(){if(!this.isConnected)return;this._emptyState.textContent=this.emptyText;let e=this._columns.length>0?this._columns.map(t=>this._toGridColumn(t)).join(" "):"minmax(0, 1fr)";this._header.style.setProperty("--dt-table-columns",e),this._canvas.style.setProperty("--dt-table-columns",e),this._renderHeader(),this._renderBody()}_renderHeader(){let e=document.createDocumentFragment();for(let t of this._columns){let n=document.createElement("div");n.className="dt-table-header-cell",n.dataset.align=t.align,this.sortable&&(n.classList.add("dt-table-header-cell--sortable"),n.tabIndex=0,n.setAttribute("role","button"),n.setAttribute("aria-label",`Sort by ${t.header}`),n.addEventListener("click",()=>this._requestSort(t.field)),n.addEventListener("keydown",s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),this._requestSort(t.field))}));let i=document.createElement("span");if(i.className="dt-table-header-label",i.textContent=t.header,this.sortable){let s=document.createElement("span");s.className="dt-table-sort-indicator",this._sortField===t.field?s.textContent=this._sortDirection==="asc"?"▲":"▼":s.textContent="↕",i.appendChild(s)}n.appendChild(i),e.appendChild(n)}this._header.replaceChildren(e)}_renderBody(){if(this._rows.length===0||this._columns.length===0){this._emptyState.hidden=!1,this._canvas.replaceChildren(),this._body.style.height="140px",this._canvas.style.height="0px";return}this._emptyState.hidden=!0,this._virtualizer.setCount(this._rows.length),this._virtualizer.setScrollTop(Math.max(0,this._scroll.scrollTop-this._header.offsetHeight)),this._virtualizer.setViewportHeight(Math.max(0,this._scroll.clientHeight-this._header.offsetHeight));let e=this._virtualizer.getRange();this._body.style.height=`${Math.max(e.totalHeight,this._scroll.clientHeight-this._header.offsetHeight)}px`,this._canvas.style.height=`${e.totalHeight}px`;let t=document.createDocumentFragment();for(let n=e.start;n<e.end;n+=1)t.appendChild(this._renderRow(n));this._canvas.replaceChildren(t)}_renderRow(e){let t=this._rows[e],n=document.createElement("div");n.className="dt-table-row dt-table-row--clickable",n.style.top=`${this._virtualizer.getOffset(e)}px`,n.style.height=`${this.rowHeight}px`,n.style.setProperty("--dt-table-columns",this._header.style.getPropertyValue("--dt-table-columns")),n.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("dt-row-click",{detail:{row:t,index:e},bubbles:!0,composed:!0}))});let i=oV(t);for(let s of this._columns){let l=document.createElement("div");if(l.className="dt-table-cell",l.dataset.align=s.align,s.template)l.appendChild(e6(s.template,i));else{let o=i[s.field];l.textContent=o==null?"":String(o)}n.appendChild(l)}return n}_requestSort(e){this._sortField===e?this._sortDirection=this._sortDirection==="asc"?"desc":"asc":(this._sortField=e,this._sortDirection="asc"),this._renderHeader(),this.dispatchEvent(new CustomEvent("dt-sort",{detail:{field:e,direction:this._sortDirection},bubbles:!0,composed:!0}))}_toGridColumn(e){let t=/^\d+$/.test(e.minWidth)?`${e.minWidth}px`:e.minWidth;if(e.width==="auto")return`minmax(${t}, 1fr)`;let n=/^\d+$/.test(e.width)?`${e.width}px`:e.width;return`minmax(${t}, ${n})`}},fV=`:host {
|
|
1279
|
-
display: block;
|
|
1280
|
-
min-height: 120px;
|
|
1281
|
-
color: var(--dt-text);
|
|
1282
|
-
font-family: var(
|
|
1283
|
-
--font-mono,
|
|
1284
|
-
'SF Mono',
|
|
1285
|
-
Monaco,
|
|
1286
|
-
'Cascadia Code',
|
|
1287
|
-
'Roboto Mono',
|
|
1288
|
-
Consolas,
|
|
1289
|
-
monospace
|
|
1290
|
-
);
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
.dt-list-view {
|
|
1294
|
-
position: relative;
|
|
1295
|
-
display: block;
|
|
1296
|
-
min-height: inherit;
|
|
1297
|
-
height: 100%;
|
|
1298
|
-
overflow: auto;
|
|
1299
|
-
background: var(--dt-surface);
|
|
1300
|
-
border: 1px solid var(--dt-border);
|
|
1301
|
-
border-radius: 2px;
|
|
1302
|
-
}
|
|
1303
|
-
|
|
1304
|
-
.dt-list-view::before,
|
|
1305
|
-
.dt-list-view::after {
|
|
1306
|
-
content: '';
|
|
1307
|
-
position: sticky;
|
|
1308
|
-
z-index: 2;
|
|
1309
|
-
width: 8px;
|
|
1310
|
-
height: 8px;
|
|
1311
|
-
pointer-events: none;
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
.dt-list-view::before {
|
|
1315
|
-
top: 0;
|
|
1316
|
-
left: 0;
|
|
1317
|
-
display: block;
|
|
1318
|
-
border-top: 2px solid var(--dt-accent);
|
|
1319
|
-
border-left: 2px solid var(--dt-accent);
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
.dt-list-view::after {
|
|
1323
|
-
right: 0;
|
|
1324
|
-
bottom: 0;
|
|
1325
|
-
float: right;
|
|
1326
|
-
border-right: 2px solid var(--dt-accent);
|
|
1327
|
-
border-bottom: 2px solid var(--dt-accent);
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
.dt-list-spacer {
|
|
1331
|
-
position: relative;
|
|
1332
|
-
min-height: 100%;
|
|
1333
|
-
}
|
|
1334
|
-
|
|
1335
|
-
.dt-list-items {
|
|
1336
|
-
position: relative;
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
.dt-list-item {
|
|
1340
|
-
box-sizing: border-box;
|
|
1341
|
-
width: 100%;
|
|
1342
|
-
padding: 12px;
|
|
1343
|
-
color: inherit;
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
.dt-list-item--interactive {
|
|
1347
|
-
cursor: pointer;
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
.dt-list-item--interactive:hover {
|
|
1351
|
-
background: var(--dt-surface-hover);
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
.dt-list-item--selected {
|
|
1355
|
-
background: var(--dt-accent-subtle);
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
:host([dividers]) .dt-list-item {
|
|
1359
|
-
border-bottom: 1px solid var(--dt-border-subtle);
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
:host([dividers]) .dt-list-item:last-child {
|
|
1363
|
-
border-bottom: 0;
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
.dt-list-empty {
|
|
1367
|
-
display: flex;
|
|
1368
|
-
align-items: center;
|
|
1369
|
-
justify-content: center;
|
|
1370
|
-
min-height: 120px;
|
|
1371
|
-
padding: 20px;
|
|
1372
|
-
color: var(--dt-text-muted);
|
|
1373
|
-
text-transform: uppercase;
|
|
1374
|
-
letter-spacing: 0.08em;
|
|
1375
|
-
font-size: 0.75rem;
|
|
1376
|
-
}
|
|
1377
|
-
`,Tv=56;function hV(e){return e&&typeof e=="object"?e:{value:e}}var pV=class extends HTMLElement{_items=[];_selectedIndices=new Set;_renderItem=null;_virtualizer=new t6({estimateSize:Tv,overscan:5});_viewport;_spacer;_itemsLayer;_emptyState;_resizeObserver=null;_itemResizeObserver=null;static get observedAttributes(){return["item-height","dividers","selectable","empty-text"]}get items(){return this._items}set items(e){this._items=Array.isArray(e)?e:[],this._selectedIndices=new Set([...this._selectedIndices].filter(t=>t<this._items.length)),this._virtualizer.setCount(this._items.length),this._syncSizingMode(!0),this._render()}get selectedItems(){return[...this._selectedIndices].sort((e,t)=>e-t).map(e=>this._items[e])}get renderItem(){return this._renderItem}set renderItem(e){this._renderItem=typeof e=="function"?e:null,this._render()}get itemHeight(){let e=this.getAttribute("item-height");if(!e)return null;let t=Number(e);return Number.isFinite(t)&&t>0?t:null}set itemHeight(e){if(e===null||e<=0){this.removeAttribute("item-height");return}this.setAttribute("item-height",String(e))}get selectable(){let e=this.getAttribute("selectable");return e==="single"||e==="multi"?e:"none"}set selectable(e){this.setAttribute("selectable",e)}get emptyText(){return this.getAttribute("empty-text")??"No items"}set emptyText(e){this.setAttribute("empty-text",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=fV,e.appendChild(t),this._viewport=document.createElement("div"),this._viewport.className="dt-list-view",this._viewport.addEventListener("scroll",this._onScroll,{passive:!0}),this._spacer=document.createElement("div"),this._spacer.className="dt-list-spacer",this._itemsLayer=document.createElement("div"),this._itemsLayer.className="dt-list-items",this._emptyState=document.createElement("div"),this._emptyState.className="dt-list-empty",this._spacer.append(this._itemsLayer,this._emptyState),this._viewport.appendChild(this._spacer),e.appendChild(this._viewport)}connectedCallback(){this._resizeObserver=new ResizeObserver(e=>{for(let t of e)t.target===this._viewport&&(this._virtualizer.setViewportHeight(t.contentRect.height),this._render())}),this._resizeObserver.observe(this._viewport),this._itemResizeObserver=new ResizeObserver(e=>{let t=0;for(let n of e){let i=n.target,s=Number(i.dataset.index);Number.isFinite(s)&&(t+=this._virtualizer.measure(s,n.contentRect.height))}t!==0&&(this._viewport.scrollTop+=t),e.length>0&&this._render()}),this._virtualizer.setCount(this._items.length),this._virtualizer.setViewportHeight(this._viewport.clientHeight),this._syncSizingMode(!1),this._render()}disconnectedCallback(){this._viewport.removeEventListener("scroll",this._onScroll),this._resizeObserver?.disconnect(),this._itemResizeObserver?.disconnect(),this._resizeObserver=null,this._itemResizeObserver=null}attributeChangedCallback(e){e==="item-height"&&this._syncSizingMode(!0),e==="selectable"&&this.selectable==="none"&&this._selectedIndices.size>0&&(this._selectedIndices.clear(),this._emitSelectionChange()),this._render()}_onScroll=()=>{this._virtualizer.setScrollTop(this._viewport.scrollTop),this._render()};_syncSizingMode(e){let t=this.itemHeight;this._virtualizer.setFixedSize(t),this._virtualizer.setEstimateSize(t??Tv),e&&this._virtualizer.resetMeasurements()}_render(){if(!this.isConnected)return;if(this._emptyState.textContent=this.emptyText,this._emptyState.hidden=this._items.length>0,this._items.length===0){this._itemsLayer.replaceChildren(),this._spacer.style.height="100%";return}this._virtualizer.setScrollTop(this._viewport.scrollTop),this._virtualizer.setViewportHeight(this._viewport.clientHeight),this._virtualizer.setCount(this._items.length);let e=this._virtualizer.getRange();this._spacer.style.height=`${Math.max(e.totalHeight,this._viewport.clientHeight)}px`,this._itemsLayer.style.transform=`translateY(${e.paddingTop}px)`;let t=document.createDocumentFragment();for(let n=e.start;n<e.end;n+=1)t.appendChild(this._renderVisibleItem(n));this._itemsLayer.replaceChildren(t)}_renderVisibleItem(e){let t=this._items[e],n=document.createElement("div");if(n.className="dt-list-item",n.dataset.index=String(e),this.selectable!=="none"&&(n.classList.add("dt-list-item--interactive"),n.setAttribute("role","option"),n.setAttribute("aria-selected",String(this._selectedIndices.has(e))),n.tabIndex=0),this._selectedIndices.has(e)&&n.classList.add("dt-list-item--selected"),this.itemHeight!==null&&(n.style.minHeight=`${this.itemHeight}px`),this._renderItem)this._renderItem(t,n,e);else{let i=this._getTemplate();i?n.appendChild(e6(i,hV(t))):n.textContent=String(t??"")}return n.addEventListener("click",()=>this._handleItemClick(e)),n.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),this._handleItemClick(e))}),this.itemHeight===null&&this._itemResizeObserver?.observe(n),n}_handleItemClick(e){let t=this._items[e],n=this.selectable;n==="single"?(this._selectedIndices=new Set([e]),this._emitSelectionChange(),this._render()):n==="multi"&&(this._selectedIndices.has(e)?this._selectedIndices.delete(e):this._selectedIndices.add(e),this._emitSelectionChange(),this._render()),this.dispatchEvent(new CustomEvent("dt-item-click",{detail:{item:t,index:e},bubbles:!0,composed:!0}))}_emitSelectionChange(){this.dispatchEvent(new CustomEvent("dt-selection-change",{detail:{selected:this.selectedItems},bubbles:!0,composed:!0}))}_getTemplate(){for(let e of Array.from(this.children))if(e instanceof HTMLTemplateElement)return e;return null}},mV=`:host {
|
|
1378
|
-
display: block;
|
|
1379
|
-
min-height: 220px;
|
|
1380
|
-
color: var(--dt-text);
|
|
1381
|
-
font-family: var(
|
|
1382
|
-
--font-mono,
|
|
1383
|
-
'SF Mono',
|
|
1384
|
-
Monaco,
|
|
1385
|
-
'Cascadia Code',
|
|
1386
|
-
'Roboto Mono',
|
|
1387
|
-
Consolas,
|
|
1388
|
-
monospace
|
|
1389
|
-
);
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
.dt-chart {
|
|
1393
|
-
position: relative;
|
|
1394
|
-
display: block;
|
|
1395
|
-
min-height: inherit;
|
|
1396
|
-
height: 100%;
|
|
1397
|
-
overflow: hidden;
|
|
1398
|
-
border: 1px solid var(--dt-border);
|
|
1399
|
-
border-radius: 2px;
|
|
1400
|
-
background:
|
|
1401
|
-
radial-gradient(
|
|
1402
|
-
circle at top left,
|
|
1403
|
-
color-mix(in srgb, var(--dt-accent) 16%, transparent),
|
|
1404
|
-
transparent 42%
|
|
1405
|
-
),
|
|
1406
|
-
linear-gradient(
|
|
1407
|
-
180deg,
|
|
1408
|
-
color-mix(in srgb, var(--dt-surface) 90%, var(--dt-accent) 10%),
|
|
1409
|
-
var(--dt-surface)
|
|
1410
|
-
);
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
.dt-chart::before,
|
|
1414
|
-
.dt-chart::after {
|
|
1415
|
-
content: '';
|
|
1416
|
-
position: absolute;
|
|
1417
|
-
z-index: 3;
|
|
1418
|
-
width: 8px;
|
|
1419
|
-
height: 8px;
|
|
1420
|
-
pointer-events: none;
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
.dt-chart::before {
|
|
1424
|
-
top: -1px;
|
|
1425
|
-
left: -1px;
|
|
1426
|
-
border-top: 2px solid var(--dt-accent);
|
|
1427
|
-
border-left: 2px solid var(--dt-accent);
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
.dt-chart::after {
|
|
1431
|
-
right: -1px;
|
|
1432
|
-
bottom: -1px;
|
|
1433
|
-
border-right: 2px solid var(--dt-accent);
|
|
1434
|
-
border-bottom: 2px solid var(--dt-accent);
|
|
1435
|
-
}
|
|
1436
|
-
|
|
1437
|
-
.dt-chart__canvas {
|
|
1438
|
-
position: relative;
|
|
1439
|
-
z-index: 1;
|
|
1440
|
-
display: block;
|
|
1441
|
-
width: 100%;
|
|
1442
|
-
height: 100%;
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
.dt-chart__status {
|
|
1446
|
-
position: absolute;
|
|
1447
|
-
inset: 0;
|
|
1448
|
-
z-index: 2;
|
|
1449
|
-
display: flex;
|
|
1450
|
-
align-items: center;
|
|
1451
|
-
justify-content: center;
|
|
1452
|
-
padding: 20px;
|
|
1453
|
-
color: var(--dt-text-muted);
|
|
1454
|
-
font-size: 0.75rem;
|
|
1455
|
-
letter-spacing: 0.08em;
|
|
1456
|
-
text-align: center;
|
|
1457
|
-
text-transform: uppercase;
|
|
1458
|
-
background: color-mix(in srgb, var(--dt-surface) 72%, transparent);
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
.dt-chart__status[hidden] {
|
|
1462
|
-
display: none;
|
|
1463
|
-
}
|
|
1464
|
-
`,dp=null;function gV(){return window.__DtChart?Promise.resolve(window.__DtChart):dp||(dp=new Promise((e,t)=>{let n=document.createElement("script");n.src="/api/ui/chart.umd.js",n.async=!0,n.dataset.dtChart="true",n.onload=()=>{if(window.__DtChart){e(window.__DtChart);return}t(new Error("Chart runtime loaded without a __DtChart export."))},n.onerror=()=>t(new Error("Failed to load the Chart.js runtime bundle.")),document.head.appendChild(n)}),dp)}function Lu(e,t,n){return Math.min(n,Math.max(t,e))}function bV(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}function lm(e){let t=e.trim().match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i);if(t){let s=t[1],l=s.length===3?s.split("").map(f=>`${f}${f}`).join(""):s,o=parseInt(l.slice(0,2),16)/255,d=parseInt(l.slice(2,4),16)/255,h=parseInt(l.slice(4,6),16)/255;return Av(o,d,h)}let n=e.trim().match(/^rgba?\((\d+(?:\.\d+)?)[,\s]+(\d+(?:\.\d+)?)[,\s]+(\d+(?:\.\d+)?)(?:[,/\s]+[\d.]+)?\)$/i);if(n)return Av(Number(n[1])/255,Number(n[2])/255,Number(n[3])/255);let i=e.trim().match(/^hsla?\(([-\d.]+)(?:deg)?[,\s]+([\d.]+)%[,\s]+([\d.]+)%(?:[,/\s]+[\d.]+)?\)$/i);return i?{h:(Number(i[1])%360+360)%360,s:Lu(Number(i[2]),0,100),l:Lu(Number(i[3]),0,100)}:null}function Av(e,t,n){let i=Math.max(e,t,n),s=Math.min(e,t,n),l=i-s,o=0,d=(i+s)/2,h=l===0?0:l/(1-Math.abs(2*d-1));if(l!==0)switch(i){case e:o=60*((t-n)/l%6);break;case t:o=60*((n-e)/l+2);break;default:o=60*((e-t)/l+4);break}return{h:(o+360)%360,s:Math.round(h*100),l:Math.round(d*100)}}function Ls(e,t=1){return`hsla(${Math.round(e.h)} ${Math.round(e.s)}% ${Math.round(e.l)}% / ${t})`}function yV(e){let t=lm(e)??{h:185,s:88,l:56};return[0,32,68,118,164,212,258,304].map((n,i)=>({h:(t.h+n)%360,s:Lu(t.s-i*2,55,90),l:Lu(t.l+(i%2===0?0:6)-i,38,66)}))}function Lc(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function r6(e,t){if(!Lc(e)||!Lc(t))return t??e;let n={...e};for(let[i,s]of Object.entries(t)){let l=n[i];n[i]=Lc(l)&&Lc(s)?r6(l,s):s}return n}function EV(e){return e==="top"||e==="bottom"||e==="left"||e==="right"?e:"none"}function xV(e){return e==="bar"||e==="line"||e==="area"||e==="pie"||e==="doughnut"||e==="radar"||e==="scatter"||e==="bubble"?e:"bar"}function vV(e){return e==="bar"||e==="line"||e==="area"||e==="scatter"||e==="bubble"}function _V(e){return e.map(t=>t.trim()).filter(Boolean)}var TV=class extends HTMLElement{_canvas;_status;_runtime=null;_loadPromise=null;_chart=null;_renderedType=null;_dataInput=null;_optionsOverride=null;_syncFrame=0;static get observedAttributes(){return["type","legend","stacked","labels"]}get type(){return xV(this.getAttribute("type"))}set type(e){this.setAttribute("type",e)}get legend(){return EV(this.getAttribute("legend"))}set legend(e){this.setAttribute("legend",e)}get stacked(){return this.hasAttribute("stacked")}set stacked(e){this.toggleAttribute("stacked",e)}get labels(){return _V(bV(this.getAttribute("labels")))}set labels(e){this.setAttribute("labels",e.join(","))}get data(){return this._dataInput}set data(e){this._dataInput=e?structuredClone(e):null,this._scheduleSync()}get options(){return this._optionsOverride}set options(e){this._optionsOverride=e?structuredClone(e):null,this._renderChart()}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=mV,e.appendChild(t);let n=document.createElement("div");n.className="dt-chart",this._canvas=document.createElement("canvas"),this._canvas.className="dt-chart__canvas",this._status=document.createElement("div"),this._status.className="dt-chart__status",this._status.textContent="Loading chart",n.append(this._canvas,this._status),e.appendChild(n)}connectedCallback(){this._canvas.addEventListener("click",this._handleCanvasClick),this._ensureRuntime().then(()=>this._renderChart()),this._scheduleSync()}disconnectedCallback(){this._canvas.removeEventListener("click",this._handleCanvasClick),this._syncFrame!==0&&(cancelAnimationFrame(this._syncFrame),this._syncFrame=0),this._chart?.destroy(),this._chart=null,this._renderedType=null}attributeChangedCallback(){this._scheduleSync()}_handleCanvasClick=e=>{if(!this._chart)return;let t=this._chart.getElementsAtEventForMode(e,"nearest",{intersect:!0},!0)[0];if(!t)return;let n=Array.isArray(this._chart.data.labels)?this._chart.data.labels[t.index]??null:null,i=this._chart.data.datasets[t.datasetIndex],s=Array.isArray(i?.data)?i.data[t.index]:void 0;this.dispatchEvent(new CustomEvent("dt-chart-click",{bubbles:!0,composed:!0,detail:{label:n,datasetIndex:t.datasetIndex,index:t.index,value:s}}))};_scheduleSync(){this._syncFrame===0&&(this._syncFrame=requestAnimationFrame(()=>{this._syncFrame=0,this._syncFromCurrentSource()}))}_syncFromCurrentSource(){this._renderChart()}async _ensureRuntime(){return this._runtime?this._runtime:(this._loadPromise||(this._loadPromise=gV().then(e=>(this._runtime=e,e))),this._loadPromise)}async _renderChart(){let e=this._dataInput;if(!e){this._setStatus("Waiting for data");return}let t=await this._ensureRuntime(),n=this._buildConfig(t,e),i=n.type;!this._chart||this._renderedType!==i?(this._chart?.destroy(),this._chart=new t.Chart(this._canvas,n),this._renderedType=i):(this._chart.data=n.data,this._chart.options=n.options,this._chart.update()),this._setStatus(e.datasets.length>0?null:"Waiting for data")}_buildConfig(e,t){let n=getComputedStyle(this),i=n.getPropertyValue("--dt-accent").trim()||"#42d4ff",s=n.getPropertyValue("--dt-text").trim()||"#d6ebff",l=n.getPropertyValue("--dt-text-muted").trim()||"#7b93a6",o=n.getPropertyValue("--dt-border").trim()||"rgba(123, 147, 166, 0.3)",d=n.getPropertyValue("--font-mono").trim()||"'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace",h=yV(i),f=this.type==="area"?"line":this.type,m={labels:t.labels??this.labels,datasets:t.datasets.map((x,E)=>{let T=h[E%h.length],w=x.color??Ls(T,1),S={label:x.label??"",data:x.data,backgroundColor:f==="line"||f==="radar"||f==="scatter"?Ls(T,f==="scatter"?.95:.24):w,borderColor:w,pointBackgroundColor:w,pointBorderColor:w,pointHoverBackgroundColor:w,pointRadius:this.type==="line"||this.type==="area"?3:4,pointHoverRadius:this.type==="line"||this.type==="area"?5:6,borderWidth:2,tension:f==="line"||this.type==="area"?.32:void 0,fill:this.type==="area"};return f==="pie"||f==="doughnut"?{...S,backgroundColor:Array.isArray(x.data)?x.data.map((k,j)=>Ls(h[j%h.length],.86)):w,borderColor:Array.isArray(x.data)?x.data.map((k,j)=>Ls(h[j%h.length],1)):w,borderWidth:1}:f==="scatter"||f==="bubble"?{...S,showLine:!1,backgroundColor:Ls(T,.78)}:S})},b={responsive:!0,maintainAspectRatio:!1,animation:{duration:320},interaction:{mode:"nearest",intersect:!0},plugins:{legend:{display:this.legend!=="none",position:this.legend==="none"?"top":this.legend,labels:{color:s,boxWidth:12,boxHeight:12,padding:14,font:{family:d,size:11}}},tooltip:{backgroundColor:"rgba(10, 18, 24, 0.92)",borderColor:AV(o,i,.35),borderWidth:1,titleColor:s,bodyColor:s,footerColor:l,titleFont:{family:d,size:11},bodyFont:{family:d,size:11},padding:10}},scales:vV(this.type)?{x:{stacked:this.stacked,grid:{display:!1,color:o},border:{color:o},ticks:{color:l,font:{family:d,size:11}}},y:{stacked:this.stacked,beginAtZero:!0,grid:{display:!1,color:o},border:{color:o},ticks:{color:l,font:{family:d,size:11}}}}:f==="radar"?{r:{angleLines:{color:o},grid:{color:o},pointLabels:{color:l,font:{family:d,size:11}},ticks:{color:l,backdropColor:"transparent",font:{family:d,size:10}}}}:void 0};return{type:f,data:m,options:r6(b,this._optionsOverride??{})}}_setStatus(e){if(!e){this._status.hidden=!0;return}this._status.hidden=!1,this._status.textContent=e}};function AV(e,t,n){let i=lm(e),s=lm(t);if(!i||!s)return e;let l=Lu(n,0,1),o=((s.h-i.h)%360+540)%360-180;return Ls({h:(i.h+o*l+360)%360,s:i.s+(s.s-i.s)*l,l:i.l+(s.l-i.l)*l})}var SV=`:host {
|
|
1465
|
-
display: block;
|
|
1466
|
-
color: var(--dt-text);
|
|
1467
|
-
font-family: var(--font-sans, 'Inter', sans-serif);
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
.dt-markdown {
|
|
1471
|
-
color: inherit;
|
|
1472
|
-
line-height: 1.7;
|
|
1473
|
-
word-break: break-word;
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
|
-
.dt-markdown > :first-child {
|
|
1477
|
-
margin-top: 0;
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
.dt-markdown > :last-child {
|
|
1481
|
-
margin-bottom: 0;
|
|
1482
|
-
}
|
|
1483
|
-
|
|
1484
|
-
.dt-markdown :is(h1, h2, h3, h4, h5, h6) {
|
|
1485
|
-
margin: 1.2em 0 0.55em;
|
|
1486
|
-
color: var(--dt-text);
|
|
1487
|
-
font-family: var(--font-sans, 'Inter', sans-serif);
|
|
1488
|
-
line-height: 1.2;
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
.dt-markdown h1 {
|
|
1492
|
-
color: var(--dt-accent);
|
|
1493
|
-
font-size: 1.6rem;
|
|
1494
|
-
letter-spacing: 0.08em;
|
|
1495
|
-
text-transform: uppercase;
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
.dt-markdown h2 {
|
|
1499
|
-
font-size: 1.3rem;
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
.dt-markdown h3 {
|
|
1503
|
-
font-size: 1.1rem;
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
.dt-markdown p,
|
|
1507
|
-
.dt-markdown ul,
|
|
1508
|
-
.dt-markdown ol,
|
|
1509
|
-
.dt-markdown blockquote,
|
|
1510
|
-
.dt-markdown pre,
|
|
1511
|
-
.dt-markdown table {
|
|
1512
|
-
margin: 0.8em 0;
|
|
1513
|
-
}
|
|
1514
|
-
|
|
1515
|
-
.dt-markdown ul,
|
|
1516
|
-
.dt-markdown ol {
|
|
1517
|
-
padding-left: 1.4rem;
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1520
|
-
.dt-markdown li + li {
|
|
1521
|
-
margin-top: 0.28em;
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
.dt-markdown strong {
|
|
1525
|
-
color: var(--dt-text);
|
|
1526
|
-
}
|
|
1527
|
-
|
|
1528
|
-
.dt-markdown a,
|
|
1529
|
-
.dt-markdown .dt-md-link {
|
|
1530
|
-
color: var(--dt-accent);
|
|
1531
|
-
text-decoration: none;
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
.dt-markdown a:hover,
|
|
1535
|
-
.dt-markdown .dt-md-link:hover {
|
|
1536
|
-
text-decoration: underline;
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
.dt-markdown code {
|
|
1540
|
-
padding: 0.12rem 0.35rem;
|
|
1541
|
-
border-radius: 2px;
|
|
1542
|
-
background: color-mix(in srgb, var(--dt-surface) 88%, var(--dt-accent) 12%);
|
|
1543
|
-
color: var(--dt-accent);
|
|
1544
|
-
font-family: var(
|
|
1545
|
-
--font-mono,
|
|
1546
|
-
'SF Mono',
|
|
1547
|
-
Monaco,
|
|
1548
|
-
'Cascadia Code',
|
|
1549
|
-
'Roboto Mono',
|
|
1550
|
-
Consolas,
|
|
1551
|
-
monospace
|
|
1552
|
-
);
|
|
1553
|
-
font-size: 0.92em;
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
.dt-md-pre {
|
|
1557
|
-
overflow-x: auto;
|
|
1558
|
-
padding: 14px 16px;
|
|
1559
|
-
border: 1px solid var(--dt-border);
|
|
1560
|
-
border-radius: 2px;
|
|
1561
|
-
background: var(--dt-surface);
|
|
1562
|
-
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dt-surface) 85%, var(--dt-accent) 15%);
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
|
-
.dt-md-pre code {
|
|
1566
|
-
display: block;
|
|
1567
|
-
padding: 0;
|
|
1568
|
-
background: transparent;
|
|
1569
|
-
color: var(--dt-text);
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
.dt-md-blockquote {
|
|
1573
|
-
margin: 0.9em 0;
|
|
1574
|
-
padding: 0.15rem 0 0.15rem 1rem;
|
|
1575
|
-
border-left: 3px solid var(--dt-accent);
|
|
1576
|
-
color: var(--dt-text-muted);
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
.dt-md-table {
|
|
1580
|
-
width: 100%;
|
|
1581
|
-
border-collapse: collapse;
|
|
1582
|
-
border: 1px solid var(--dt-border);
|
|
1583
|
-
background: var(--dt-surface);
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
.dt-md-table th,
|
|
1587
|
-
.dt-md-table td {
|
|
1588
|
-
padding: 0.6rem 0.8rem;
|
|
1589
|
-
border: 1px solid var(--dt-border-subtle, var(--dt-border));
|
|
1590
|
-
text-align: left;
|
|
1591
|
-
vertical-align: top;
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
.dt-md-table th {
|
|
1595
|
-
color: var(--dt-accent);
|
|
1596
|
-
background: color-mix(in srgb, var(--dt-surface) 88%, var(--dt-accent) 12%);
|
|
1597
|
-
font-size: 0.75rem;
|
|
1598
|
-
letter-spacing: 0.08em;
|
|
1599
|
-
text-transform: uppercase;
|
|
1600
|
-
}
|
|
1601
|
-
|
|
1602
|
-
.dt-markdown hr {
|
|
1603
|
-
border: 0;
|
|
1604
|
-
border-top: 1px solid var(--dt-border);
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
.dt-md-image {
|
|
1608
|
-
display: block;
|
|
1609
|
-
max-width: 100%;
|
|
1610
|
-
border: 1px solid var(--dt-border);
|
|
1611
|
-
border-radius: 2px;
|
|
1612
|
-
}
|
|
1613
|
-
|
|
1614
|
-
.dt-markdown__caret {
|
|
1615
|
-
display: inline-block;
|
|
1616
|
-
margin-left: 0.15rem;
|
|
1617
|
-
color: var(--dt-accent);
|
|
1618
|
-
animation: dt-markdown-caret 0.9s steps(1) infinite;
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
|
-
.dt-markdown__caret[hidden] {
|
|
1622
|
-
display: none;
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
|
-
@keyframes dt-markdown-caret {
|
|
1626
|
-
0%,
|
|
1627
|
-
49% {
|
|
1628
|
-
opacity: 1;
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
50%,
|
|
1632
|
-
100% {
|
|
1633
|
-
opacity: 0;
|
|
1634
|
-
}
|
|
1635
|
-
}
|
|
1636
|
-
`,fp=null;function wV(){return window.__DtMarked?Promise.resolve(window.__DtMarked):fp||(fp=new Promise((e,t)=>{let n=document.createElement("script");n.src="/api/ui/marked.js",n.async=!0,n.dataset.dtMarked="true",n.onload=()=>{if(window.__DtMarked){e(window.__DtMarked);return}t(new Error("Marked runtime loaded without a __DtMarked export."))},n.onerror=()=>t(new Error("Failed to load the marked runtime bundle.")),document.head.appendChild(n)}),fp)}function i6(e){return e.replaceAll(`\r
|
|
1637
|
-
`,`
|
|
1638
|
-
`)}function kV(e){let t=i6(e).split(`
|
|
1639
|
-
`);for(;t.length>0&&t[0].trim()==="";)t.shift();for(;t.length>0&&t[t.length-1].trim()==="";)t.pop();let n=t.filter(s=>s.trim()!=="").map(s=>s.match(/^\s*/)?.[0].length??0),i=n.length>0?Math.min(...n):0;return i===0?t.join(`
|
|
1640
|
-
`):t.map(s=>s.slice(i)).join(`
|
|
1641
|
-
`)}function CV(e){let t=i6(e);if((t.match(/(^|\n)(```|~~~)/g)??[]).length%2===0)return t;let n=t.includes("~~~")&&!t.includes("```")?"~~~":"```";return`${t}
|
|
1642
|
-
${n}`}var NV=class extends HTMLElement{_body;_caret;_contentOverride=null;_runtime=null;_loadPromise=null;_observer=null;_renderFrame=0;static get observedAttributes(){return["streaming","unsafe-html"]}get content(){return this._contentOverride??this._readInlineMarkdown()}set content(e){this._contentOverride=String(e??""),this._scheduleRender()}get streaming(){return this.hasAttribute("streaming")}set streaming(e){this.toggleAttribute("streaming",e)}get unsafeHtml(){return this.hasAttribute("unsafe-html")}set unsafeHtml(e){this.toggleAttribute("unsafe-html",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=SV,e.appendChild(t),this._body=document.createElement("div"),this._body.className="dt-markdown",this._body.addEventListener("click",this._onLinkClick),this._caret=document.createElement("span"),this._caret.className="dt-markdown__caret",this._caret.textContent="▌",this._caret.hidden=!0,e.append(this._body,this._caret)}connectedCallback(){this._observer||(this._observer=new MutationObserver(()=>{this._contentOverride===null&&this._scheduleRender()}),this._observer.observe(this,{childList:!0,characterData:!0,subtree:!0})),this._ensureRuntime(),this._scheduleRender()}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,this._renderFrame!==0&&(cancelAnimationFrame(this._renderFrame),this._renderFrame=0)}attributeChangedCallback(){this._scheduleRender()}_onLinkClick=e=>{let t=e.composedPath().find(n=>n instanceof HTMLAnchorElement);t&&(e.preventDefault(),this.dispatchEvent(new CustomEvent("dt-link-click",{bubbles:!0,composed:!0,detail:{href:t.getAttribute("href")??"#"}})))};_readInlineMarkdown(){return kV(this.textContent??"")}_scheduleRender(){this._renderFrame===0&&(this._renderFrame=requestAnimationFrame(()=>{this._renderFrame=0,this._render()}))}async _ensureRuntime(){return this._runtime?this._runtime:(this._loadPromise||(this._loadPromise=wV().then(e=>(this._runtime=e,e))),this._loadPromise)}async _render(){let e=await this._ensureRuntime(),t=this.content;this.streaming&&(t=CV(t)),this._body.innerHTML=e.render(t,{unsafeHtml:this.unsafeHtml}),this._caret.hidden=!this.streaming}},RV=`:host {
|
|
1643
|
-
display: block;
|
|
1644
|
-
min-height: 240px;
|
|
1645
|
-
color: var(--dt-text);
|
|
1646
|
-
font-family: var(--font-sans, 'Inter', sans-serif);
|
|
1647
|
-
}
|
|
1648
|
-
|
|
1649
|
-
.dt-markdown-editor {
|
|
1650
|
-
position: relative;
|
|
1651
|
-
height: 100%;
|
|
1652
|
-
min-height: inherit;
|
|
1653
|
-
overflow: hidden;
|
|
1654
|
-
border: 1px solid var(--dt-border);
|
|
1655
|
-
border-radius: 2px;
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
.dt-markdown-editor::before,
|
|
1659
|
-
.dt-markdown-editor::after {
|
|
1660
|
-
content: '';
|
|
1661
|
-
position: absolute;
|
|
1662
|
-
z-index: 3;
|
|
1663
|
-
width: 8px;
|
|
1664
|
-
height: 8px;
|
|
1665
|
-
pointer-events: none;
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
.dt-markdown-editor::before {
|
|
1669
|
-
top: -1px;
|
|
1670
|
-
left: -1px;
|
|
1671
|
-
border-top: 2px solid var(--dt-accent);
|
|
1672
|
-
border-left: 2px solid var(--dt-accent);
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
|
-
.dt-markdown-editor::after {
|
|
1676
|
-
right: -1px;
|
|
1677
|
-
bottom: -1px;
|
|
1678
|
-
border-right: 2px solid var(--dt-accent);
|
|
1679
|
-
border-bottom: 2px solid var(--dt-accent);
|
|
1680
|
-
}
|
|
1681
|
-
|
|
1682
|
-
.dt-markdown-editor__surface {
|
|
1683
|
-
height: 100%;
|
|
1684
|
-
min-height: inherit;
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
.dt-markdown-editor__content {
|
|
1688
|
-
height: 100%;
|
|
1689
|
-
min-height: inherit;
|
|
1690
|
-
}
|
|
1691
|
-
|
|
1692
|
-
.dt-markdown-editor__status {
|
|
1693
|
-
position: absolute;
|
|
1694
|
-
inset: 0;
|
|
1695
|
-
display: flex;
|
|
1696
|
-
align-items: center;
|
|
1697
|
-
justify-content: center;
|
|
1698
|
-
padding: 20px;
|
|
1699
|
-
background: color-mix(in srgb, var(--dt-surface) 84%, transparent);
|
|
1700
|
-
color: var(--dt-text-muted);
|
|
1701
|
-
font-size: 0.75rem;
|
|
1702
|
-
letter-spacing: 0.08em;
|
|
1703
|
-
text-transform: uppercase;
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
|
-
.dt-markdown-editor__status[hidden] {
|
|
1707
|
-
display: none;
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1710
|
-
.milkdown {
|
|
1711
|
-
--crepe-color-background: transparent;
|
|
1712
|
-
--crepe-color-on-background: var(--dt-text);
|
|
1713
|
-
--crepe-color-surface: var(--dt-surface);
|
|
1714
|
-
--crepe-color-surface-low: color-mix(in srgb, var(--dt-surface) 94%, var(--dt-accent) 6%);
|
|
1715
|
-
--crepe-color-on-surface: var(--dt-text);
|
|
1716
|
-
--crepe-color-on-surface-variant: var(--dt-text-muted);
|
|
1717
|
-
--crepe-color-outline: var(--dt-border);
|
|
1718
|
-
--crepe-color-primary: var(--dt-accent);
|
|
1719
|
-
--crepe-color-secondary: color-mix(in srgb, var(--dt-surface) 84%, var(--dt-accent) 16%);
|
|
1720
|
-
--crepe-color-on-secondary: var(--dt-text);
|
|
1721
|
-
--crepe-color-inverse: var(--dt-text);
|
|
1722
|
-
--crepe-color-on-inverse: var(--dt-surface);
|
|
1723
|
-
--crepe-color-inline-code: var(--dt-accent);
|
|
1724
|
-
--crepe-color-error: var(--dt-danger, #ff6a6a);
|
|
1725
|
-
--crepe-color-hover: var(--dt-surface-hover);
|
|
1726
|
-
--crepe-color-selected: color-mix(in srgb, var(--dt-surface) 82%, var(--dt-accent) 18%);
|
|
1727
|
-
--crepe-color-inline-area: color-mix(in srgb, var(--dt-surface) 90%, var(--dt-accent) 10%);
|
|
1728
|
-
--crepe-font-title: var(--font-sans, 'Inter', sans-serif);
|
|
1729
|
-
--crepe-font-default: var(--font-sans, 'Inter', sans-serif);
|
|
1730
|
-
--crepe-font-code: var(
|
|
1731
|
-
--font-mono,
|
|
1732
|
-
'SF Mono',
|
|
1733
|
-
Monaco,
|
|
1734
|
-
'Cascadia Code',
|
|
1735
|
-
'Roboto Mono',
|
|
1736
|
-
Consolas,
|
|
1737
|
-
monospace
|
|
1738
|
-
);
|
|
1739
|
-
--crepe-shadow-1: 0 0 0 1px color-mix(in srgb, var(--dt-surface) 82%, var(--dt-accent) 18%);
|
|
1740
|
-
--crepe-shadow-2:
|
|
1741
|
-
0 0 0 1px color-mix(in srgb, var(--dt-surface) 78%, var(--dt-accent) 22%),
|
|
1742
|
-
0 8px 24px color-mix(in srgb, var(--dt-accent) 12%, transparent);
|
|
1743
|
-
|
|
1744
|
-
height: 100%;
|
|
1745
|
-
background: transparent;
|
|
1746
|
-
color: var(--dt-text);
|
|
1747
|
-
}
|
|
1748
|
-
|
|
1749
|
-
.milkdown .editor {
|
|
1750
|
-
min-height: 100%;
|
|
1751
|
-
padding: 16px 18px 20px;
|
|
1752
|
-
outline: none;
|
|
1753
|
-
color: var(--dt-text);
|
|
1754
|
-
font-family: var(--font-sans, 'Inter', sans-serif);
|
|
1755
|
-
font-size: 14px;
|
|
1756
|
-
line-height: 1.7;
|
|
1757
|
-
}
|
|
1758
|
-
|
|
1759
|
-
.milkdown .editor > :first-child {
|
|
1760
|
-
margin-top: 0;
|
|
1761
|
-
}
|
|
1762
|
-
|
|
1763
|
-
.milkdown .editor h1,
|
|
1764
|
-
.milkdown .editor h2,
|
|
1765
|
-
.milkdown .editor h3,
|
|
1766
|
-
.milkdown .editor h4,
|
|
1767
|
-
.milkdown .editor h5,
|
|
1768
|
-
.milkdown .editor h6 {
|
|
1769
|
-
margin: 0.95em 0 0.45em;
|
|
1770
|
-
line-height: 1.2;
|
|
1771
|
-
}
|
|
1772
|
-
|
|
1773
|
-
.milkdown .editor h1 {
|
|
1774
|
-
color: var(--dt-accent);
|
|
1775
|
-
font-size: 1.6rem;
|
|
1776
|
-
letter-spacing: 0.08em;
|
|
1777
|
-
text-transform: uppercase;
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
.milkdown .editor h2 {
|
|
1781
|
-
font-size: 1.28rem;
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
.milkdown .editor h3 {
|
|
1785
|
-
font-size: 1.08rem;
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
.milkdown .editor p {
|
|
1789
|
-
margin: 0.65em 0;
|
|
1790
|
-
}
|
|
1791
|
-
|
|
1792
|
-
.milkdown .editor code {
|
|
1793
|
-
padding: 2px 5px;
|
|
1794
|
-
border-radius: 2px;
|
|
1795
|
-
background: color-mix(in srgb, var(--dt-surface) 88%, var(--dt-accent) 12%);
|
|
1796
|
-
font-family: var(
|
|
1797
|
-
--font-mono,
|
|
1798
|
-
'SF Mono',
|
|
1799
|
-
Monaco,
|
|
1800
|
-
'Cascadia Code',
|
|
1801
|
-
'Roboto Mono',
|
|
1802
|
-
Consolas,
|
|
1803
|
-
monospace
|
|
1804
|
-
);
|
|
1805
|
-
font-size: 0.9em;
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1808
|
-
.milkdown .editor pre {
|
|
1809
|
-
overflow-x: auto;
|
|
1810
|
-
margin: 0.9em 0;
|
|
1811
|
-
padding: 12px 14px;
|
|
1812
|
-
border: 1px solid var(--dt-border);
|
|
1813
|
-
border-radius: 2px;
|
|
1814
|
-
background: var(--dt-surface);
|
|
1815
|
-
}
|
|
1816
|
-
|
|
1817
|
-
.milkdown .editor pre code {
|
|
1818
|
-
padding: 0;
|
|
1819
|
-
background: transparent;
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
.milkdown .editor blockquote {
|
|
1823
|
-
margin: 0.9em 0;
|
|
1824
|
-
padding-left: 12px;
|
|
1825
|
-
border-left: 3px solid var(--dt-accent);
|
|
1826
|
-
color: var(--dt-text-muted);
|
|
1827
|
-
}
|
|
1828
|
-
|
|
1829
|
-
.milkdown .editor a {
|
|
1830
|
-
color: var(--dt-accent);
|
|
1831
|
-
text-decoration: none;
|
|
1832
|
-
}
|
|
1833
|
-
|
|
1834
|
-
.milkdown .editor a:hover {
|
|
1835
|
-
text-decoration: underline;
|
|
1836
|
-
}
|
|
1837
|
-
|
|
1838
|
-
.milkdown .editor hr {
|
|
1839
|
-
border: 0;
|
|
1840
|
-
border-top: 1px solid var(--dt-border);
|
|
1841
|
-
}
|
|
1842
|
-
|
|
1843
|
-
.milkdown .editor ul,
|
|
1844
|
-
.milkdown .editor ol {
|
|
1845
|
-
padding-left: 1.5rem;
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
|
-
.milkdown .editor img {
|
|
1849
|
-
max-width: 100%;
|
|
1850
|
-
border-radius: 2px;
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
|
-
.milkdown .editor table {
|
|
1854
|
-
width: 100%;
|
|
1855
|
-
border-collapse: collapse;
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
.milkdown .editor th,
|
|
1859
|
-
.milkdown .editor td {
|
|
1860
|
-
border: 1px solid var(--dt-border);
|
|
1861
|
-
}
|
|
1862
|
-
`,hp=null;function OV(){return window.__DtMilkdown?Promise.resolve(window.__DtMilkdown):hp||(hp=new Promise((e,t)=>{let n=document.createElement("script");n.src="/api/ui/milkdown.umd.js",n.async=!0,n.dataset.dtMilkdown="true",n.onload=()=>{if(window.__DtMilkdown){e(window.__DtMilkdown);return}t(new Error("Milkdown runtime loaded without a __DtMilkdown export."))},n.onerror=()=>t(new Error("Failed to load the Milkdown runtime bundle.")),document.head.appendChild(n)}),hp)}var LV=class extends HTMLElement{_runtimeStyle;_surface;_content;_status;_runtime=null;_loadPromise=null;_editor=null;_pendingValue="";_changeTimer=null;_setupToken=0;_suppressNextChange=!1;static get observedAttributes(){return["placeholder","readonly"]}get placeholder(){return this.getAttribute("placeholder")??""}set placeholder(e){this.setAttribute("placeholder",e)}get readonly(){return this.hasAttribute("readonly")}set readonly(e){this.toggleAttribute("readonly",e)}get value(){return this._editor&&(this._pendingValue=this._editor.getMarkdown()),this._pendingValue}set value(e){let t=String(e??"");this._pendingValue=t,this._editor&&this._runtime&&this._editor.getMarkdown()!==t&&(this._suppressNextChange=!0,this._editor.editor.action(this._runtime.replaceAll(t)))}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=RV,e.appendChild(t),this._runtimeStyle=document.createElement("style"),e.appendChild(this._runtimeStyle),this._surface=document.createElement("div"),this._surface.className="dt-markdown-editor",this._content=document.createElement("div"),this._content.className="dt-markdown-editor__surface";let n=document.createElement("div");n.className="dt-markdown-editor__content",this._content.appendChild(n),this._status=document.createElement("div"),this._status.className="dt-markdown-editor__status",this._status.textContent="Loading editor",this._surface.append(this._content,this._status),e.appendChild(this._surface)}connectedCallback(){this._initializeEditor()}disconnectedCallback(){this._setupToken+=1,this._clearChangeTimer(),this._destroyEditor()}attributeChangedCallback(e){if(e==="readonly"){this._editor?.setReadonly(this.readonly);return}e==="placeholder"&&this.isConnected&&this._initializeEditor(!0)}async _ensureRuntime(){return this._runtime?this._runtime:(this._loadPromise||(this._loadPromise=OV().then(e=>(this._runtime=e,this._runtimeStyle.textContent=e.cssText,e))),this._loadPromise)}async _initializeEditor(e=!1){let t=++this._setupToken;if(this._setStatus("Loading editor"),e)await this._destroyEditor();else if(this._editor){this._setStatus(null);return}try{let n=await this._ensureRuntime();if(!this.isConnected||t!==this._setupToken)return;this._content.replaceChildren();let i=document.createElement("div");i.className="dt-markdown-editor__content",this._content.appendChild(i);let s=new n.Crepe({root:i,defaultValue:this._pendingValue,features:{[n.Crepe.Feature.CodeMirror]:!1,[n.Crepe.Feature.ImageBlock]:!1,[n.Crepe.Feature.Latex]:!1},featureConfigs:{[n.Crepe.Feature.Placeholder]:{text:this.placeholder,mode:"doc"}}});if(s.on(l=>{l.markdownUpdated((o,d)=>{if(this._pendingValue=d,this._suppressNextChange){this._suppressNextChange=!1;return}this._queueChange(d)}),l.focus(()=>{this.dispatchEvent(new CustomEvent("dt-focus",{bubbles:!0,composed:!0}))}),l.blur(()=>{this.dispatchEvent(new CustomEvent("dt-blur",{bubbles:!0,composed:!0}))})}),await s.create(),!this.isConnected||t!==this._setupToken){await s.destroy();return}this._editor=s,this._editor.setReadonly(this.readonly),this._pendingValue=this._editor.getMarkdown(),this._setStatus(null)}catch{t===this._setupToken&&this._setStatus("Failed to load editor")}}async _destroyEditor(){let e=this._editor;if(this._editor=null,!!e)try{await e.destroy()}catch{}}_queueChange(e){this._clearChangeTimer(),this._changeTimer=setTimeout(()=>{this._changeTimer=null,this.dispatchEvent(new CustomEvent("dt-change",{bubbles:!0,composed:!0,detail:{value:e}}))},300)}_clearChangeTimer(){this._changeTimer&&(clearTimeout(this._changeTimer),this._changeTimer=null)}_setStatus(e){if(e){this._status.hidden=!1,this._status.textContent=e;return}this._status.hidden=!0}};customElements.get("dt-tooltip")||customElements.define("dt-tooltip",NY);customElements.get("dt-card")||customElements.define("dt-card",LY);customElements.get("dt-select")||customElements.define("dt-select",jY);customElements.get("dt-grid")||customElements.define("dt-grid",qY);customElements.get("dt-stack")||customElements.define("dt-stack",GY);customElements.get("dt-stat")||customElements.define("dt-stat",XY);customElements.get("dt-badge")||customElements.define("dt-badge",JY);customElements.get("dt-button")||customElements.define("dt-button",nV);customElements.get("dt-divider")||customElements.define("dt-divider",aV);customElements.get("dt-list-view")||customElements.define("dt-list-view",pV);customElements.get("dt-table-view")||customElements.define("dt-table-view",dV);customElements.get("dt-column")||customElements.define("dt-column",n6);customElements.get("dt-chart")||customElements.define("dt-chart",TV);customElements.get("dt-markdown")||customElements.define("dt-markdown",NV);customElements.get("dt-markdown-editor")||customElements.define("dt-markdown-editor",LV);XA(Fc);function MV(){const[e,t]=C.useState("en"),[n,i]=C.useState({}),[s,l]=C.useState(Fc),[o,d]=C.useState("loading"),h=C.useCallback(async()=>{try{const{data:f}=await cr.get("/api/auth/me");if(!f.authenticated){f.needsSetup?d("onboard"):d("login");return}d("desktop")}catch{d("login")}},[]);return C.useEffect(()=>{let f=!1;async function m(E){const T=E?`?locale=${encodeURIComponent(E)}`:"";try{const{data:w}=await cr.get(`/api/i18n/catalog${T}`);f||(t(w.locale),i(w.messages))}catch(w){if(Tt.isAxiosError(w)){const S=w.response?.status;if(S===401)return;throw new Error(`Failed to load i18n catalog (${S??"unknown"})`)}throw w}}async function b(){const{data:E}=await cr.get("/api/preferences/public");f||l({theme:E.theme,accentColor:E.accentColor})}b().catch(E=>{console.error("[theme] Could not load preferences:",E)}),h(),m().catch(E=>{console.error("[i18n] Could not load catalog:",E)});const x=E=>{const T=E.detail;if(T?.event==="preferences:resetAll"){l(Fc),m("en").catch(w=>{console.error("[i18n] Could not refresh catalog:",w)});return}T?.event==="preferences:changed"&&(T.data?.key==="general.language"&&m(String(T.data.value??"en")).catch(w=>{console.error("[i18n] Could not refresh catalog:",w)}),T.data?.key==="general.theme"&&l(w=>({...w,theme:T.data?.value==="dark"?"dark":"light"})),T.data?.key==="general.accentColor"&&l(w=>({...w,accentColor:String(T.data?.value??Fc.accentColor)})))};return window.addEventListener("desktalk:event",x),()=>{f=!0,window.removeEventListener("desktalk:event",x)}},[h]),C.useEffect(()=>{XA(s)},[s]),o==="loading"?null:o==="login"?v.jsx(Qq,{onLoginSuccess:h}):o==="onboard"?v.jsx(SY,{onComplete:h}):v.jsx(AC,{locale:e,messages:n,children:v.jsx(zq,{themePreferences:s})})}window.React=qi;window.ReactDOM={...aC,createRoot:yp.createRoot,hydrateRoot:yp.hydrateRoot};window.__desktalk_jsx_runtime=Tw;const a6=document.getElementById("root");if(!a6)throw new Error("Root element #root not found");const IV=yp.createRoot(a6);IV.render(v.jsx(qi.StrictMode,{children:v.jsx(MV,{})}));const DV=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:pA},Symbol.toStringTag,{value:"Module"}));export{nG as A,xz as B,pG as M,Gn as R,tG as W,Wl as _,iG as a,rG as b,lG as c,sG as d,uG as e,ii as f,pC as g,v as j,C as r,hC as s,aG as u};
|
|
1863
|
-
//# sourceMappingURL=index-BEaTx9Vu.js.map
|