@powerhousedao/connect 1.0.0-dev.198 → 1.0.0-dev.199
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/assets/Danger-CLu7nxgz.js +2 -0
- package/dist/assets/Danger-CLu7nxgz.js.map +1 -0
- package/dist/assets/Danger-KM8BZjue-CLu7nxgz.js +2 -0
- package/dist/assets/Danger-KM8BZjue-CLu7nxgz.js.map +1 -0
- package/dist/assets/Edit-D9GlgGu8.js +2 -0
- package/dist/assets/Edit-D9GlgGu8.js.map +1 -0
- package/dist/assets/Edit-Dr-ZiMSE-D9GlgGu8.js +2 -0
- package/dist/assets/Edit-Dr-ZiMSE-D9GlgGu8.js.map +1 -0
- package/dist/assets/PackageManager-B-MUWliB-bW01ZQSP.js +2 -0
- package/dist/assets/PackageManager-B-MUWliB-bW01ZQSP.js.map +1 -0
- package/dist/assets/PackageManager-D6Ia8zHs.js +2 -0
- package/dist/assets/PackageManager-D6Ia8zHs.js.map +1 -0
- package/dist/assets/QuestionSquare-B6O9Le7r-CDaw1i6L.js +2 -0
- package/dist/assets/QuestionSquare-B6O9Le7r-CDaw1i6L.js.map +1 -0
- package/dist/assets/QuestionSquare-CDaw1i6L.js +2 -0
- package/dist/assets/QuestionSquare-CDaw1i6L.js.map +1 -0
- package/dist/assets/{app-Dg2BvJrv.js → app-DvSjLYs-.js} +79 -79
- package/dist/assets/app-DvSjLYs-.js.map +1 -0
- package/dist/assets/{app-loader-CMlME3Af.js → app-loader-Dn48G7po.js} +3 -3
- package/dist/assets/{app-loader-CMlME3Af.js.map → app-loader-Dn48G7po.js.map} +1 -1
- package/dist/assets/app-loader-iGtpD3C9.css +1 -0
- package/dist/assets/{browser-hf_u4liU.js → browser-camIpcNU.js} +2 -2
- package/dist/assets/{browser-hf_u4liU.js.map → browser-camIpcNU.js.map} +1 -1
- package/dist/assets/{ccip-BXF9OFgE.js → ccip-D-9jk-RD.js} +2 -2
- package/dist/assets/{ccip-BXF9OFgE.js.map → ccip-D-9jk-RD.js.map} +1 -1
- package/dist/assets/{content-D83n-324.js → content-TOddMACx.js} +4 -4
- package/dist/assets/{content-D83n-324.js.map → content-TOddMACx.js.map} +1 -1
- package/dist/assets/{editor-EtczsZpk.js → editor-Ba951Cwc.js} +16 -16
- package/dist/assets/editor-Ba951Cwc.js.map +1 -0
- package/dist/assets/{getEnsName-BhpAYDJS.js → getEnsName-DiyJcfh8.js} +4 -4
- package/dist/assets/{getEnsName-BhpAYDJS.js.map → getEnsName-DiyJcfh8.js.map} +1 -1
- package/dist/assets/{index-C2_9k8Y2.js → index-B38XkIrT.js} +2 -2
- package/dist/assets/{index-C2_9k8Y2.js.map → index-B38XkIrT.js.map} +1 -1
- package/dist/assets/index-BBo8moLy.js +3 -0
- package/dist/assets/{index-BZ4pzrsy.js.map → index-BBo8moLy.js.map} +1 -1
- package/dist/assets/{isAddressEqual-DKH-mxqk.js → isAddressEqual-CXyuWVb7.js} +2 -2
- package/dist/assets/{isAddressEqual-DKH-mxqk.js.map → isAddressEqual-CXyuWVb7.js.map} +1 -1
- package/dist/assets/{json-B3Cpkyz2.js → json-CHCvwHN3.js} +3 -3
- package/dist/assets/{json-B3Cpkyz2.js.map → json-CHCvwHN3.js.map} +1 -1
- package/dist/assets/{main.CJqJ7IgV.js → main.BmAe1Lus.js} +2 -2
- package/dist/assets/{main.CJqJ7IgV.js.map → main.BmAe1Lus.js.map} +1 -1
- package/dist/assets/{root-CkM3N8QA.js → root-D8qKMM0F.js} +2 -2
- package/dist/assets/{root-CkM3N8QA.js.map → root-D8qKMM0F.js.map} +1 -1
- package/dist/assets/{router-UoCGtwRw.js → router-B1NCyaFw.js} +4 -4
- package/dist/assets/{router-UoCGtwRw.js.map → router-B1NCyaFw.js.map} +1 -1
- package/dist/assets/{useUiNodes-pse7JyFb.js → useUiNodes-D93b3yJT.js} +2 -2
- package/dist/assets/{useUiNodes-pse7JyFb.js.map → useUiNodes-D93b3yJT.js.map} +1 -1
- package/dist/index.html +3 -3
- package/dist/service-worker.js +1 -1
- package/dist/swEnv.js +2 -2
- package/dist/vite-envs.sh +5 -5
- package/package.json +6 -6
- package/dist/assets/app-Dg2BvJrv.js.map +0 -1
- package/dist/assets/app-loader-pxGy29G8.css +0 -1
- package/dist/assets/editor-EtczsZpk.js.map +0 -1
- package/dist/assets/index-BZ4pzrsy.js +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as __vitePreload}from"./main.CJqJ7IgV.js";import{jsx,Fragment,jsxs}from"react/jsx-runtime";import{cj as h$3,bO as index,c5 as applyMixins,b$ as BaseActions,cc as BaseDocument}from"./app-Dg2BvJrv.js";import*as React from"react";import React__default,{forwardRef,useLayoutEffect,useEffect,useState,useMemo,Suspense,lazy,useRef,useCallback,useImperativeHandle,createContext,memo,useContext,useId}from"react";import{P as P$5}from"./json-B3Cpkyz2.js";import*as ReactDOM from"react-dom";import ReactDOM__default from"react-dom";import{a as actions}from"./content-D83n-324.js";import"./app-loader-CMlME3Af.js";import"./useUiNodes-pse7JyFb.js";import"./getEnsName-BhpAYDJS.js";var B$3=Object.defineProperty,N$3=(Ws,ws,oi)=>ws in Ws?B$3(Ws,ws,{enumerable:!0,configurable:!0,writable:!0,value:oi}):Ws[ws]=oi,h$2=(Ws,ws,oi)=>N$3(Ws,typeof ws!="symbol"?ws+"":ws,oi);const _$3=Ws=>Ws!=null;h$3.any().refine(Ws=>_$3(Ws));const g$1=h$3.enum(["CRY","HEART","LAUGH","THUMBS_DOWN","THUMBS_UP"]);function E$1(){return h$3.object({messageId:h$3.string(),reactedBy:h$3.string(),type:g$1})}function I$3(){return h$3.object({content:h$3.string(),messageId:h$3.string(),sender:S$3(),sentAt:h$3.string().datetime()})}function y$3(){return h$3.object({description:h$3.string()})}function D$4(){return h$3.object({name:h$3.string()})}function f$3(){return h$3.object({messageId:h$3.string(),senderId:h$3.string(),type:g$1})}function S$3(){return h$3.object({__typename:h$3.literal("Sender").optional(),avatarUrl:h$3.string().url().nullable(),id:h$3.string(),name:h$3.string().nullable()})}let z$6=class extends Error{constructor(ws="MessageContentCannotBeEmpty"){super(ws),h$2(this,"errorCode","MessageContentCannotBeEmpty")}};const d$1={addMessageOperation(Ws,ws,oi){if(ws.input.content==="")throw new z$6;Ws.messages.push({id:ws.input.messageId,content:ws.input.content,sender:ws.input.sender,sentAt:ws.input.sentAt,reactions:[]})},addEmojiReactionOperation(Ws,ws,oi){const si=Ws.messages.find(ai=>ai.id===ws.input.messageId);if(!si)throw new Error("Message not found");const ii=si.reactions||[];ii.find(ai=>ai.type===ws.input.type)?si.reactions=ii.map(ai=>ai.type===ws.input.type?{...ai,reactedBy:[...ai.reactedBy,ws.input.reactedBy]}:ai):si.reactions=[...ii,{reactedBy:[ws.input.reactedBy],type:ws.input.type}],Ws.messages=Ws.messages.map(ai=>ai.id===si.id?si:ai)},removeEmojiReactionOperation(Ws,ws,oi){Ws.messages=Ws.messages.map(si=>(si.id===ws.input.messageId&&(si.reactions=(si.reactions||[]).map(ii=>ii.type===ws.input.type?{...ii,reactedBy:ii.reactedBy.filter(ai=>ai!==ws.input.senderId)}:ii)),si))},editChatNameOperation(Ws,ws,oi){Ws.name=ws.input.name||""},editChatDescriptionOperation(Ws,ws,oi){Ws.description=ws.input.description||""}},G$5=(Ws,ws,oi)=>{if(index.isBaseAction(ws))return Ws;switch(ws.type){case"ADD_MESSAGE":I$3().parse(ws.input),d$1.addMessageOperation(Ws[ws.scope],ws,oi);break;case"ADD_EMOJI_REACTION":E$1().parse(ws.input),d$1.addEmojiReactionOperation(Ws[ws.scope],ws,oi);break;case"REMOVE_EMOJI_REACTION":f$3().parse(ws.input),d$1.removeEmojiReactionOperation(Ws[ws.scope],ws,oi);break;case"EDIT_CHAT_NAME":D$4().parse(ws.input),d$1.editChatNameOperation(Ws[ws.scope],ws,oi);break;case"EDIT_CHAT_DESCRIPTION":y$3().parse(ws.input),d$1.editChatDescriptionOperation(Ws[ws.scope],ws,oi);break;default:return Ws}},m$3=index.createReducer(G$5),L$3={id:"",name:"",description:"",createdAt:"2024-12-03T14:13:08.862Z",createdBy:"",messages:[]},J$6={},c$2={fileExtension:".phdm",createState(Ws){return{global:{...L$3,...Ws==null?void 0:Ws.global},local:{...J$6,...Ws==null?void 0:Ws.local}}},createExtendedState(Ws){return index.createExtendedState({...Ws,documentType:"powerhouse/chat-room"},c$2.createState)},createDocument(Ws){return index.createDocument(c$2.createExtendedState(Ws),c$2.createState)},saveToFile(Ws,ws,oi){return index.saveToFile(Ws,ws,".phdm",oi)},saveToFileHandle(Ws,ws){return index.saveToFileHandle(Ws,ws)},loadFromFile(Ws){return index.loadFromFile(Ws,m$3)},loadFromInput(Ws){return index.loadFromInput(Ws,m$3)}},{createAction:p$3}=index,C$6=Ws=>p$3("ADD_MESSAGE",{...Ws},void 0,I$3,"global"),O$3=Ws=>p$3("ADD_EMOJI_REACTION",{...Ws},void 0,E$1,"global"),M$4=Ws=>p$3("REMOVE_EMOJI_REACTION",{...Ws},void 0,f$3,"global"),j$2=Ws=>p$3("EDIT_CHAT_NAME",{...Ws},void 0,D$4,"global"),x$4=Ws=>p$3("EDIT_CHAT_DESCRIPTION",{...Ws},void 0,y$3,"global");let P$4=class extends BaseDocument{addMessage(ws){return this.dispatch(C$6(ws))}addEmojiReaction(ws){return this.dispatch(O$3(ws))}removeEmojiReaction(ws){return this.dispatch(M$4(ws))}editChatName(ws){return this.dispatch(j$2(ws))}editChatDescription(ws){return this.dispatch(x$4(ws))}};const u$3=class qf extends BaseDocument{constructor(ws,oi){super(m$3,c$2.createDocument(ws),oi)}saveToFile(ws,oi){return super.saveToFile(ws,qf.fileExtension,oi)}loadFromFile(ws){return super.loadFromFile(ws)}static async fromFile(ws){const oi=new this;return await oi.loadFromFile(ws),oi}};h$2(u$3,"fileExtension",".phdm");let l$2=u$3;applyMixins(l$2,[P$4]);const V$2=Object.freeze(Object.defineProperty({__proto__:null,addEmojiReaction:O$3,addMessage:C$6,editChatDescription:x$4,editChatName:j$2,removeEmojiReaction:M$4},Symbol.toStringTag,{value:"Module"})),Y$3=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));({...c$2,...Y$3});({...BaseActions,...V$2});var It$2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ud(Ws){return Ws&&Ws.__esModule&&Object.prototype.hasOwnProperty.call(Ws,"default")?Ws.default:Ws}var hn$1,br$2;function mi(){if(br$2)return hn$1;br$2=1;var Ws="Expected a function",ws=NaN,oi="[object Symbol]",si=/^\s+|\s+$/g,ii=/^[-+]0x[0-9a-f]+$/i,ai=/^0b[01]+$/i,li=/^0o[0-7]+$/i,ci=parseInt,ui=typeof It$2=="object"&&It$2&&It$2.Object===Object&&It$2,di=typeof self=="object"&&self&&self.Object===Object&&self,hi=ui||di||Function("return this")(),pi=Object.prototype,ha=pi.toString,ga=Math.max,va=Math.min,ba=function(){return hi.Date.now()};function wa(gd,Ed,Od){var Nd,Pd,Ld,rf,_d,Md,Td=0,wd=!1,Cd=!1,sf=!0;if(typeof gd!="function")throw new TypeError(Ws);Ed=ku(Ed)||0,xa(Od)&&(wd=!!Od.leading,Cd="maxWait"in Od,Ld=Cd?ga(ku(Od.maxWait)||0,Ed):Ld,sf="trailing"in Od?!!Od.trailing:sf);function of(uf){var mf=Nd,yf=Pd;return Nd=Pd=void 0,Td=uf,rf=gd.apply(yf,mf),rf}function Wd(uf){return Td=uf,_d=setTimeout(xd,Ed),wd?of(uf):rf}function df(uf){var mf=uf-Md,yf=uf-Td,Sf=Ed-mf;return Cd?va(Sf,Ld-yf):Sf}function hf(uf){var mf=uf-Md,yf=uf-Td;return Md===void 0||mf>=Ed||mf<0||Cd&&yf>=Ld}function xd(){var uf=ba();if(hf(uf))return Fd(uf);_d=setTimeout(xd,df(uf))}function Fd(uf){return _d=void 0,sf&&Nd?of(uf):(Nd=Pd=void 0,rf)}function Vd(){_d!==void 0&&clearTimeout(_d),Td=0,Nd=Md=Pd=_d=void 0}function af(){return _d===void 0?rf:Fd(ba())}function ff(){var uf=ba(),mf=hf(uf);if(Nd=arguments,Pd=this,Md=uf,mf){if(_d===void 0)return Wd(Md);if(Cd)return _d=setTimeout(xd,Ed),of(Md)}return _d===void 0&&(_d=setTimeout(xd,Ed)),rf}return ff.cancel=Vd,ff.flush=af,ff}function xa(gd){var Ed=typeof gd;return!!gd&&(Ed=="object"||Ed=="function")}function Ca(gd){return!!gd&&typeof gd=="object"}function el(gd){return typeof gd=="symbol"||Ca(gd)&&ha.call(gd)==oi}function ku(gd){if(typeof gd=="number")return gd;if(el(gd))return ws;if(xa(gd)){var Ed=typeof gd.valueOf=="function"?gd.valueOf():gd;gd=xa(Ed)?Ed+"":Ed}if(typeof gd!="string")return gd===0?gd:+gd;gd=gd.replace(si,"");var Od=ai.test(gd);return Od||li.test(gd)?ci(gd.slice(2),Od?2:8):ii.test(gd)?ws:+gd}return hn$1=wa,hn$1}mi();var Pt$2=Ws=>Ws.type==="checkbox",Ye$2=Ws=>Ws instanceof Date,de$2=Ws=>Ws==null;const oo=Ws=>typeof Ws=="object";var re$1=Ws=>!de$2(Ws)&&!Array.isArray(Ws)&&oo(Ws)&&!Ye$2(Ws),so$1=Ws=>re$1(Ws)&&Ws.target?Pt$2(Ws.target)?Ws.target.checked:Ws.target.value:Ws,gi=Ws=>Ws.substring(0,Ws.search(/\.\d+(\.|$)/))||Ws,io$1=(Ws,ws)=>Ws.has(gi(ws)),vi=Ws=>{const ws=Ws.constructor&&Ws.constructor.prototype;return re$1(ws)&&ws.hasOwnProperty("isPrototypeOf")},Un$1=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function pe$1(Ws){let ws;const oi=Array.isArray(Ws),si=typeof FileList<"u"?Ws instanceof FileList:!1;if(Ws instanceof Date)ws=new Date(Ws);else if(Ws instanceof Set)ws=new Set(Ws);else if(!(Un$1&&(Ws instanceof Blob||si))&&(oi||re$1(Ws)))if(ws=oi?[]:{},!oi&&!vi(Ws))ws=Ws;else for(const ii in Ws)Ws.hasOwnProperty(ii)&&(ws[ii]=pe$1(Ws[ii]));else return Ws;return ws}var nn$1=Ws=>Array.isArray(Ws)?Ws.filter(Boolean):[],ne$2=Ws=>Ws===void 0,k$6=(Ws,ws,oi)=>{if(!ws||!re$1(Ws))return oi;const si=nn$1(ws.split(/[,[\].]+?/)).reduce((ii,ai)=>de$2(ii)?ii:ii[ai],Ws);return ne$2(si)||si===Ws?ne$2(Ws[ws])?oi:Ws[ws]:si},be$2=Ws=>typeof Ws=="boolean",Wn$2=Ws=>/^\w*$/.test(Ws),ao$1=Ws=>nn$1(Ws.replace(/["|']|\]/g,"").split(/\.|\[/)),J$5=(Ws,ws,oi)=>{let si=-1;const ii=Wn$2(ws)?[ws]:ao$1(ws),ai=ii.length,li=ai-1;for(;++si<ai;){const ci=ii[si];let ui=oi;if(si!==li){const di=Ws[ci];ui=re$1(di)||Array.isArray(di)?di:isNaN(+ii[si+1])?{}:[]}if(ci==="__proto__"||ci==="constructor"||ci==="prototype")return;Ws[ci]=ui,Ws=Ws[ci]}return Ws};const jt$2={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xe$2={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ie$2={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},co$1=React__default.createContext(null),$n$2=()=>React__default.useContext(co$1),$d=Ws=>{const{children:ws,...oi}=Ws;return React__default.createElement(co$1.Provider,{value:oi},ws)};var lo$1=(Ws,ws,oi,si=!0)=>{const ii={defaultValues:ws._defaultValues};for(const ai in Ws)Object.defineProperty(ii,ai,{get:()=>{const li=ai;return ws._proxyFormState[li]!==xe$2.all&&(ws._proxyFormState[li]=!si||xe$2.all),oi&&(oi[li]=!0),Ws[li]}});return ii},me$2=Ws=>re$1(Ws)&&!Object.keys(Ws).length,uo$1=(Ws,ws,oi,si)=>{oi(Ws);const{name:ii,...ai}=Ws;return me$2(ai)||Object.keys(ai).length>=Object.keys(ws).length||Object.keys(ai).find(li=>ws[li]===(!si||xe$2.all))},xt$1=Ws=>Array.isArray(Ws)?Ws:[Ws],fo$1=(Ws,ws,oi)=>!Ws||!ws||Ws===ws||xt$1(Ws).some(si=>si&&(oi?si===ws:si.startsWith(ws)||ws.startsWith(si)));function zn$2(Ws){const ws=React__default.useRef(Ws);ws.current=Ws,React__default.useEffect(()=>{const oi=!Ws.disabled&&ws.current.subject&&ws.current.subject.subscribe({next:ws.current.next});return()=>{oi&&oi.unsubscribe()}},[Ws.disabled])}function yi$1(Ws){const ws=$n$2(),{control:oi=ws.control,disabled:si,name:ii,exact:ai}=Ws,[li,ci]=React__default.useState(oi._formState),ui=React__default.useRef(!0),di=React__default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),hi=React__default.useRef(ii);return hi.current=ii,zn$2({disabled:si,next:pi=>ui.current&&fo$1(hi.current,pi.name,ai)&&uo$1(pi,di.current,oi._updateFormState)&&ci({...oi._formState,...pi}),subject:oi._subjects.state}),React__default.useEffect(()=>(ui.current=!0,di.current.isValid&&oi._updateValid(!0),()=>{ui.current=!1}),[oi]),React__default.useMemo(()=>lo$1(li,oi,di.current,!1),[li,oi])}var Te$2=Ws=>typeof Ws=="string",po$1=(Ws,ws,oi,si,ii)=>Te$2(Ws)?(si&&ws.watch.add(Ws),k$6(oi,Ws,ii)):Array.isArray(Ws)?Ws.map(ai=>(si&&ws.watch.add(ai),k$6(oi,ai))):(si&&(ws.watchAll=!0),oi);function bi(Ws){const ws=$n$2(),{control:oi=ws.control,name:si,defaultValue:ii,disabled:ai,exact:li}=Ws,ci=React__default.useRef(si);ci.current=si,zn$2({disabled:ai,subject:oi._subjects.values,next:hi=>{fo$1(ci.current,hi.name,li)&&di(pe$1(po$1(ci.current,oi._names,hi.values||oi._formValues,!1,ii)))}});const[ui,di]=React__default.useState(oi._getWatch(si,ii));return React__default.useEffect(()=>oi._removeUnmounted()),ui}function wi(Ws){const ws=$n$2(),{name:oi,disabled:si,control:ii=ws.control,shouldUnregister:ai}=Ws,li=io$1(ii._names.array,oi),ci=bi({control:ii,name:oi,defaultValue:k$6(ii._formValues,oi,k$6(ii._defaultValues,oi,Ws.defaultValue)),exact:!0}),ui=yi$1({control:ii,name:oi,exact:!0}),di=React__default.useRef(ii.register(oi,{...Ws.rules,value:ci,...be$2(Ws.disabled)?{disabled:Ws.disabled}:{}})),hi=React__default.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!k$6(ui.errors,oi)},isDirty:{enumerable:!0,get:()=>!!k$6(ui.dirtyFields,oi)},isTouched:{enumerable:!0,get:()=>!!k$6(ui.touchedFields,oi)},isValidating:{enumerable:!0,get:()=>!!k$6(ui.validatingFields,oi)},error:{enumerable:!0,get:()=>k$6(ui.errors,oi)}}),[ui,oi]),pi=React__default.useMemo(()=>({name:oi,value:ci,...be$2(si)||ui.disabled?{disabled:ui.disabled||si}:{},onChange:ha=>di.current.onChange({target:{value:so$1(ha),name:oi},type:jt$2.CHANGE}),onBlur:()=>di.current.onBlur({target:{value:k$6(ii._formValues,oi),name:oi},type:jt$2.BLUR}),ref:ha=>{const ga=k$6(ii._fields,oi);ga&&ha&&(ga._f.ref={focus:()=>ha.focus(),select:()=>ha.select(),setCustomValidity:va=>ha.setCustomValidity(va),reportValidity:()=>ha.reportValidity()})}}),[oi,ii._formValues,si,ui.disabled,ci,ii._fields]);return React__default.useEffect(()=>{const ha=ii._options.shouldUnregister||ai,ga=(va,ba)=>{const wa=k$6(ii._fields,va);wa&&wa._f&&(wa._f.mount=ba)};if(ga(oi,!0),ha){const va=pe$1(k$6(ii._options.defaultValues,oi));J$5(ii._defaultValues,oi,va),ne$2(k$6(ii._formValues,oi))&&J$5(ii._formValues,oi,va)}return!li&&ii.register(oi),()=>{(li?ha&&!ii._state.action:ha)?ii.unregister(oi):ga(oi,!1)}},[oi,ii,li,ai]),React__default.useEffect(()=>{ii._updateDisabledField({disabled:si,fields:ii._fields,name:oi})},[si,oi,ii]),React__default.useMemo(()=>({field:pi,formState:ui,fieldState:hi}),[pi,ui,hi])}const zd=Ws=>Ws.render(wi(Ws));var xi=(Ws,ws,oi,si,ii)=>ws?{...oi[Ws],types:{...oi[Ws]&&oi[Ws].types?oi[Ws].types:{},[si]:ii||!0}}:{},wr$2=Ws=>({isOnSubmit:!Ws||Ws===xe$2.onSubmit,isOnBlur:Ws===xe$2.onBlur,isOnChange:Ws===xe$2.onChange,isOnAll:Ws===xe$2.all,isOnTouch:Ws===xe$2.onTouched}),xr$2=(Ws,ws,oi)=>!oi&&(ws.watchAll||ws.watch.has(Ws)||[...ws.watch].some(si=>Ws.startsWith(si)&&/^\.\w+/.test(Ws.slice(si.length))));const Ct$2=(Ws,ws,oi,si)=>{for(const ii of oi||Object.keys(Ws)){const ai=k$6(Ws,ii);if(ai){const{_f:li,...ci}=ai;if(li){if(li.refs&&li.refs[0]&&ws(li.refs[0],ii)&&!si||li.ref&&ws(li.ref,li.name)&&!si)return!0;if(Ct$2(ci,ws))break}else if(re$1(ci)&&Ct$2(ci,ws))break}}};var Ci=(Ws,ws,oi)=>{const si=xt$1(k$6(Ws,oi));return J$5(si,"root",ws[oi]),J$5(Ws,oi,si),Ws},Gn$1=Ws=>Ws.type==="file",_e$2=Ws=>typeof Ws=="function",Ht$1=Ws=>{if(!Un$1)return!1;const ws=Ws?Ws.ownerDocument:0;return Ws instanceof(ws&&ws.defaultView?ws.defaultView.HTMLElement:HTMLElement)},Wt$2=Ws=>Te$2(Ws),jn$2=Ws=>Ws.type==="radio",Kt$1=Ws=>Ws instanceof RegExp;const Cr$2={value:!1,isValid:!1},Sr$2={value:!0,isValid:!0};var mo$1=Ws=>{if(Array.isArray(Ws)){if(Ws.length>1){const ws=Ws.filter(oi=>oi&&oi.checked&&!oi.disabled).map(oi=>oi.value);return{value:ws,isValid:!!ws.length}}return Ws[0].checked&&!Ws[0].disabled?Ws[0].attributes&&!ne$2(Ws[0].attributes.value)?ne$2(Ws[0].value)||Ws[0].value===""?Sr$2:{value:Ws[0].value,isValid:!0}:Sr$2:Cr$2}return Cr$2};const Er$2={isValid:!1,value:null};var ho$1=Ws=>Array.isArray(Ws)?Ws.reduce((ws,oi)=>oi&&oi.checked&&!oi.disabled?{isValid:!0,value:oi.value}:ws,Er$2):Er$2;function Ar$2(Ws,ws,oi="validate"){if(Wt$2(Ws)||Array.isArray(Ws)&&Ws.every(Wt$2)||be$2(Ws)&&!Ws)return{type:oi,message:Wt$2(Ws)?Ws:"",ref:ws}}var et$2=Ws=>re$1(Ws)&&!Kt$1(Ws)?Ws:{value:Ws,message:""},Rr$2=async(Ws,ws,oi,si,ii,ai)=>{const{ref:li,refs:ci,required:ui,maxLength:di,minLength:hi,min:pi,max:ha,pattern:ga,validate:va,name:ba,valueAsNumber:wa,mount:xa}=Ws._f,Ca=k$6(oi,ba);if(!xa||ws.has(ba))return{};const el=ci?ci[0]:li,ku=_d=>{ii&&el.reportValidity&&(el.setCustomValidity(be$2(_d)?"":_d||""),el.reportValidity())},gd={},Ed=jn$2(li),Od=Pt$2(li),Nd=Ed||Od,Pd=(wa||Gn$1(li))&&ne$2(li.value)&&ne$2(Ca)||Ht$1(li)&&li.value===""||Ca===""||Array.isArray(Ca)&&!Ca.length,Ld=xi.bind(null,ba,si,gd),rf=(_d,Md,Td,wd=Ie$2.maxLength,Cd=Ie$2.minLength)=>{const sf=_d?Md:Td;gd[ba]={type:_d?wd:Cd,message:sf,ref:li,...Ld(_d?wd:Cd,sf)}};if(ai?!Array.isArray(Ca)||!Ca.length:ui&&(!Nd&&(Pd||de$2(Ca))||be$2(Ca)&&!Ca||Od&&!mo$1(ci).isValid||Ed&&!ho$1(ci).isValid)){const{value:_d,message:Md}=Wt$2(ui)?{value:!!ui,message:ui}:et$2(ui);if(_d&&(gd[ba]={type:Ie$2.required,message:Md,ref:el,...Ld(Ie$2.required,Md)},!si))return ku(Md),gd}if(!Pd&&(!de$2(pi)||!de$2(ha))){let _d,Md;const Td=et$2(ha),wd=et$2(pi);if(!de$2(Ca)&&!isNaN(Ca)){const Cd=li.valueAsNumber||Ca&&+Ca;de$2(Td.value)||(_d=Cd>Td.value),de$2(wd.value)||(Md=Cd<wd.value)}else{const Cd=li.valueAsDate||new Date(Ca),sf=df=>new Date(new Date().toDateString()+" "+df),of=li.type=="time",Wd=li.type=="week";Te$2(Td.value)&&Ca&&(_d=of?sf(Ca)>sf(Td.value):Wd?Ca>Td.value:Cd>new Date(Td.value)),Te$2(wd.value)&&Ca&&(Md=of?sf(Ca)<sf(wd.value):Wd?Ca<wd.value:Cd<new Date(wd.value))}if((_d||Md)&&(rf(!!_d,Td.message,wd.message,Ie$2.max,Ie$2.min),!si))return ku(gd[ba].message),gd}if((di||hi)&&!Pd&&(Te$2(Ca)||ai&&Array.isArray(Ca))){const _d=et$2(di),Md=et$2(hi),Td=!de$2(_d.value)&&Ca.length>+_d.value,wd=!de$2(Md.value)&&Ca.length<+Md.value;if((Td||wd)&&(rf(Td,_d.message,Md.message),!si))return ku(gd[ba].message),gd}if(ga&&!Pd&&Te$2(Ca)){const{value:_d,message:Md}=et$2(ga);if(Kt$1(_d)&&!Ca.match(_d)&&(gd[ba]={type:Ie$2.pattern,message:Md,ref:li,...Ld(Ie$2.pattern,Md)},!si))return ku(Md),gd}if(va){if(_e$2(va)){const _d=await va(Ca,oi),Md=Ar$2(_d,el);if(Md&&(gd[ba]={...Md,...Ld(Ie$2.validate,Md.message)},!si))return ku(Md.message),gd}else if(re$1(va)){let _d={};for(const Md in va){if(!me$2(_d)&&!si)break;const Td=Ar$2(await va[Md](Ca,oi),el,Md);Td&&(_d={...Td,...Ld(Md,Td.message)},ku(Td.message),si&&(gd[ba]=_d))}if(!me$2(_d)&&(gd[ba]={ref:el,..._d},!si))return gd}}return ku(!0),gd};function Si(Ws,ws){const oi=ws.slice(0,-1).length;let si=0;for(;si<oi;)Ws=ne$2(Ws)?si++:Ws[ws[si++]];return Ws}function Ei(Ws){for(const ws in Ws)if(Ws.hasOwnProperty(ws)&&!ne$2(Ws[ws]))return!1;return!0}function oe$3(Ws,ws){const oi=Array.isArray(ws)?ws:Wn$2(ws)?[ws]:ao$1(ws),si=oi.length===1?Ws:Si(Ws,oi),ii=oi.length-1,ai=oi[ii];return si&&delete si[ai],ii!==0&&(re$1(si)&&me$2(si)||Array.isArray(si)&&Ei(si))&&oe$3(Ws,oi.slice(0,-1)),Ws}var gn$1=()=>{let Ws=[];return{get observers(){return Ws},next:ws=>{for(const oi of Ws)oi.next&&oi.next(ws)},subscribe:ws=>(Ws.push(ws),{unsubscribe:()=>{Ws=Ws.filter(oi=>oi!==ws)}}),unsubscribe:()=>{Ws=[]}}},Tn$1=Ws=>de$2(Ws)||!oo(Ws);function Ge$2(Ws,ws){if(Tn$1(Ws)||Tn$1(ws))return Ws===ws;if(Ye$2(Ws)&&Ye$2(ws))return Ws.getTime()===ws.getTime();const oi=Object.keys(Ws),si=Object.keys(ws);if(oi.length!==si.length)return!1;for(const ii of oi){const ai=Ws[ii];if(!si.includes(ii))return!1;if(ii!=="ref"){const li=ws[ii];if(Ye$2(ai)&&Ye$2(li)||re$1(ai)&&re$1(li)||Array.isArray(ai)&&Array.isArray(li)?!Ge$2(ai,li):ai!==li)return!1}}return!0}var go$1=Ws=>Ws.type==="select-multiple",Ai=Ws=>jn$2(Ws)||Pt$2(Ws),vn$2=Ws=>Ht$1(Ws)&&Ws.isConnected,vo=Ws=>{for(const ws in Ws)if(_e$2(Ws[ws]))return!0;return!1};function Yt$1(Ws,ws={}){const oi=Array.isArray(Ws);if(re$1(Ws)||oi)for(const si in Ws)Array.isArray(Ws[si])||re$1(Ws[si])&&!vo(Ws[si])?(ws[si]=Array.isArray(Ws[si])?[]:{},Yt$1(Ws[si],ws[si])):de$2(Ws[si])||(ws[si]=!0);return ws}function yo(Ws,ws,oi){const si=Array.isArray(Ws);if(re$1(Ws)||si)for(const ii in Ws)Array.isArray(Ws[ii])||re$1(Ws[ii])&&!vo(Ws[ii])?ne$2(ws)||Tn$1(oi[ii])?oi[ii]=Array.isArray(Ws[ii])?Yt$1(Ws[ii],[]):{...Yt$1(Ws[ii])}:yo(Ws[ii],de$2(ws)?{}:ws[ii],oi[ii]):oi[ii]=!Ge$2(Ws[ii],ws[ii]);return oi}var gt$2=(Ws,ws)=>yo(Ws,ws,Yt$1(ws)),bo=(Ws,{valueAsNumber:ws,valueAsDate:oi,setValueAs:si})=>ne$2(Ws)?Ws:ws?Ws===""?NaN:Ws&&+Ws:oi&&Te$2(Ws)?new Date(Ws):si?si(Ws):Ws;function yn$2(Ws){const ws=Ws.ref;return Gn$1(ws)?ws.files:jn$2(ws)?ho$1(Ws.refs).value:go$1(ws)?[...ws.selectedOptions].map(({value:oi})=>oi):Pt$2(ws)?mo$1(Ws.refs).value:bo(ne$2(ws.value)?Ws.ref.value:ws.value,Ws)}var Ri=(Ws,ws,oi,si)=>{const ii={};for(const ai of Ws){const li=k$6(ws,ai);li&&J$5(ii,ai,li._f)}return{criteriaMode:oi,names:[...Ws],fields:ii,shouldUseNativeValidation:si}},vt$2=Ws=>ne$2(Ws)?Ws:Kt$1(Ws)?Ws.source:re$1(Ws)?Kt$1(Ws.value)?Ws.value.source:Ws.value:Ws;const Mr$2="AsyncFunction";var Mi$1=Ws=>!!Ws&&!!Ws.validate&&!!(_e$2(Ws.validate)&&Ws.validate.constructor.name===Mr$2||re$1(Ws.validate)&&Object.values(Ws.validate).find(ws=>ws.constructor.name===Mr$2)),_i$1=Ws=>Ws.mount&&(Ws.required||Ws.min||Ws.max||Ws.maxLength||Ws.minLength||Ws.pattern||Ws.validate);function _r$2(Ws,ws,oi){const si=k$6(Ws,oi);if(si||Wn$2(oi))return{error:si,name:oi};const ii=oi.split(".");for(;ii.length;){const ai=ii.join("."),li=k$6(ws,ai),ci=k$6(Ws,ai);if(li&&!Array.isArray(li)&&oi!==ai)return{name:oi};if(ci&&ci.type)return{name:ai,error:ci};ii.pop()}return{name:oi}}var Pi=(Ws,ws,oi,si,ii)=>ii.isOnAll?!1:!oi&&ii.isOnTouch?!(ws||Ws):(oi?si.isOnBlur:ii.isOnBlur)?!Ws:(oi?si.isOnChange:ii.isOnChange)?Ws:!0,Ti=(Ws,ws)=>!nn$1(k$6(Ws,ws)).length&&oe$3(Ws,ws);const ki$1={mode:xe$2.onSubmit,reValidateMode:xe$2.onChange,shouldFocusError:!0};function Oi(Ws={}){let ws={...ki$1,...Ws},oi={submitCount:0,isDirty:!1,isLoading:_e$2(ws.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:ws.errors||{},disabled:ws.disabled||!1},si={},ii=re$1(ws.defaultValues)||re$1(ws.values)?pe$1(ws.defaultValues||ws.values)||{}:{},ai=ws.shouldUnregister?{}:pe$1(ii),li={action:!1,mount:!1,watch:!1},ci={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},ui,di=0;const hi={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},pi={values:gn$1(),array:gn$1(),state:gn$1()},ha=wr$2(ws.mode),ga=wr$2(ws.reValidateMode),va=ws.criteriaMode===xe$2.all,ba=kd=>Dd=>{clearTimeout(di),di=setTimeout(kd,Dd)},wa=async kd=>{if(!ws.disabled&&(hi.isValid||kd)){const Dd=ws.resolver?me$2((await Nd()).errors):await Ld(si,!0);Dd!==oi.isValid&&pi.state.next({isValid:Dd})}},xa=(kd,Dd)=>{!ws.disabled&&(hi.isValidating||hi.validatingFields)&&((kd||Array.from(ci.mount)).forEach(tf=>{tf&&(Dd?J$5(oi.validatingFields,tf,Dd):oe$3(oi.validatingFields,tf))}),pi.state.next({validatingFields:oi.validatingFields,isValidating:!me$2(oi.validatingFields)}))},Ca=(kd,Dd=[],tf,vd,Sd=!0,Id=!0)=>{if(vd&&tf&&!ws.disabled){if(li.action=!0,Id&&Array.isArray(k$6(si,kd))){const Bd=tf(k$6(si,kd),vd.argA,vd.argB);Sd&&J$5(si,kd,Bd)}if(Id&&Array.isArray(k$6(oi.errors,kd))){const Bd=tf(k$6(oi.errors,kd),vd.argA,vd.argB);Sd&&J$5(oi.errors,kd,Bd),Ti(oi.errors,kd)}if(hi.touchedFields&&Id&&Array.isArray(k$6(oi.touchedFields,kd))){const Bd=tf(k$6(oi.touchedFields,kd),vd.argA,vd.argB);Sd&&J$5(oi.touchedFields,kd,Bd)}hi.dirtyFields&&(oi.dirtyFields=gt$2(ii,ai)),pi.state.next({name:kd,isDirty:_d(kd,Dd),dirtyFields:oi.dirtyFields,errors:oi.errors,isValid:oi.isValid})}else J$5(ai,kd,Dd)},el=(kd,Dd)=>{J$5(oi.errors,kd,Dd),pi.state.next({errors:oi.errors})},ku=kd=>{oi.errors=kd,pi.state.next({errors:oi.errors,isValid:!1})},gd=(kd,Dd,tf,vd)=>{const Sd=k$6(si,kd);if(Sd){const Id=k$6(ai,kd,ne$2(tf)?k$6(ii,kd):tf);ne$2(Id)||vd&&vd.defaultChecked||Dd?J$5(ai,kd,Dd?Id:yn$2(Sd._f)):wd(kd,Id),li.mount&&wa()}},Ed=(kd,Dd,tf,vd,Sd)=>{let Id=!1,Bd=!1;const nf={name:kd};if(!ws.disabled){const lf=!!(k$6(si,kd)&&k$6(si,kd)._f&&k$6(si,kd)._f.disabled);if(!tf||vd){hi.isDirty&&(Bd=oi.isDirty,oi.isDirty=nf.isDirty=_d(),Id=Bd!==nf.isDirty);const pf=lf||Ge$2(k$6(ii,kd),Dd);Bd=!!(!lf&&k$6(oi.dirtyFields,kd)),pf||lf?oe$3(oi.dirtyFields,kd):J$5(oi.dirtyFields,kd,!0),nf.dirtyFields=oi.dirtyFields,Id=Id||hi.dirtyFields&&Bd!==!pf}if(tf){const pf=k$6(oi.touchedFields,kd);pf||(J$5(oi.touchedFields,kd,tf),nf.touchedFields=oi.touchedFields,Id=Id||hi.touchedFields&&pf!==tf)}Id&&Sd&&pi.state.next(nf)}return Id?nf:{}},Od=(kd,Dd,tf,vd)=>{const Sd=k$6(oi.errors,kd),Id=hi.isValid&&be$2(Dd)&&oi.isValid!==Dd;if(ws.delayError&&tf?(ui=ba(()=>el(kd,tf)),ui(ws.delayError)):(clearTimeout(di),ui=null,tf?J$5(oi.errors,kd,tf):oe$3(oi.errors,kd)),(tf?!Ge$2(Sd,tf):Sd)||!me$2(vd)||Id){const Bd={...vd,...Id&&be$2(Dd)?{isValid:Dd}:{},errors:oi.errors,name:kd};oi={...oi,...Bd},pi.state.next(Bd)}},Nd=async kd=>{xa(kd,!0);const Dd=await ws.resolver(ai,ws.context,Ri(kd||ci.mount,si,ws.criteriaMode,ws.shouldUseNativeValidation));return xa(kd),Dd},Pd=async kd=>{const{errors:Dd}=await Nd(kd);if(kd)for(const tf of kd){const vd=k$6(Dd,tf);vd?J$5(oi.errors,tf,vd):oe$3(oi.errors,tf)}else oi.errors=Dd;return Dd},Ld=async(kd,Dd,tf={valid:!0})=>{for(const vd in kd){const Sd=kd[vd];if(Sd){const{_f:Id,...Bd}=Sd;if(Id){const nf=ci.array.has(Id.name),lf=Sd._f&&Mi$1(Sd._f);lf&&hi.validatingFields&&xa([vd],!0);const pf=await Rr$2(Sd,ci.disabled,ai,va,ws.shouldUseNativeValidation&&!Dd,nf);if(lf&&hi.validatingFields&&xa([vd]),pf[Id.name]&&(tf.valid=!1,Dd))break;!Dd&&(k$6(pf,Id.name)?nf?Ci(oi.errors,pf,Id.name):J$5(oi.errors,Id.name,pf[Id.name]):oe$3(oi.errors,Id.name))}!me$2(Bd)&&await Ld(Bd,Dd,tf)}}return tf.valid},rf=()=>{for(const kd of ci.unMount){const Dd=k$6(si,kd);Dd&&(Dd._f.refs?Dd._f.refs.every(tf=>!vn$2(tf)):!vn$2(Dd._f.ref))&&ff(kd)}ci.unMount=new Set},_d=(kd,Dd)=>!ws.disabled&&(kd&&Dd&&J$5(ai,kd,Dd),!Ge$2(hf(),ii)),Md=(kd,Dd,tf)=>po$1(kd,ci,{...li.mount?ai:ne$2(Dd)?ii:Te$2(kd)?{[kd]:Dd}:Dd},tf,Dd),Td=kd=>nn$1(k$6(li.mount?ai:ii,kd,ws.shouldUnregister?k$6(ii,kd,[]):[])),wd=(kd,Dd,tf={})=>{const vd=k$6(si,kd);let Sd=Dd;if(vd){const Id=vd._f;Id&&(!Id.disabled&&J$5(ai,kd,bo(Dd,Id)),Sd=Ht$1(Id.ref)&&de$2(Dd)?"":Dd,go$1(Id.ref)?[...Id.ref.options].forEach(Bd=>Bd.selected=Sd.includes(Bd.value)):Id.refs?Pt$2(Id.ref)?Id.refs.length>1?Id.refs.forEach(Bd=>(!Bd.defaultChecked||!Bd.disabled)&&(Bd.checked=Array.isArray(Sd)?!!Sd.find(nf=>nf===Bd.value):Sd===Bd.value)):Id.refs[0]&&(Id.refs[0].checked=!!Sd):Id.refs.forEach(Bd=>Bd.checked=Bd.value===Sd):Gn$1(Id.ref)?Id.ref.value="":(Id.ref.value=Sd,Id.ref.type||pi.values.next({name:kd,values:{...ai}})))}(tf.shouldDirty||tf.shouldTouch)&&Ed(kd,Sd,tf.shouldTouch,tf.shouldDirty,!0),tf.shouldValidate&&df(kd)},Cd=(kd,Dd,tf)=>{for(const vd in Dd){const Sd=Dd[vd],Id=`${kd}.${vd}`,Bd=k$6(si,Id);(ci.array.has(kd)||re$1(Sd)||Bd&&!Bd._f)&&!Ye$2(Sd)?Cd(Id,Sd,tf):wd(Id,Sd,tf)}},sf=(kd,Dd,tf={})=>{const vd=k$6(si,kd),Sd=ci.array.has(kd),Id=pe$1(Dd);J$5(ai,kd,Id),Sd?(pi.array.next({name:kd,values:{...ai}}),(hi.isDirty||hi.dirtyFields)&&tf.shouldDirty&&pi.state.next({name:kd,dirtyFields:gt$2(ii,ai),isDirty:_d(kd,Id)})):vd&&!vd._f&&!de$2(Id)?Cd(kd,Id,tf):wd(kd,Id,tf),xr$2(kd,ci)&&pi.state.next({...oi}),pi.values.next({name:li.mount?kd:void 0,values:{...ai}})},of=async kd=>{li.mount=!0;const Dd=kd.target;let tf=Dd.name,vd=!0;const Sd=k$6(si,tf),Id=()=>Dd.type?yn$2(Sd._f):so$1(kd),Bd=nf=>{vd=Number.isNaN(nf)||Ye$2(nf)&&isNaN(nf.getTime())||Ge$2(nf,k$6(ai,tf,nf))};if(Sd){let nf,lf;const pf=Id(),gf=kd.type===jt$2.BLUR||kd.type===jt$2.FOCUS_OUT,vf=!_i$1(Sd._f)&&!ws.resolver&&!k$6(oi.errors,tf)&&!Sd._f.deps||Pi(gf,k$6(oi.touchedFields,tf),oi.isSubmitted,ga,ha),bf=xr$2(tf,ci,gf);J$5(ai,tf,pf),gf?(Sd._f.onBlur&&Sd._f.onBlur(kd),ui&&ui(0)):Sd._f.onChange&&Sd._f.onChange(kd);const If=Ed(tf,pf,gf,!1),Af=!me$2(If)||bf;if(!gf&&pi.values.next({name:tf,type:kd.type,values:{...ai}}),vf)return hi.isValid&&(ws.mode==="onBlur"&&gf?wa():gf||wa()),Af&&pi.state.next({name:tf,...bf?{}:If});if(!gf&&bf&&pi.state.next({...oi}),ws.resolver){const{errors:$f}=await Nd([tf]);if(Bd(pf),vd){const Cf=_r$2(oi.errors,si,tf),_f=_r$2($f,si,Cf.name||tf);nf=_f.error,tf=_f.name,lf=me$2($f)}}else xa([tf],!0),nf=(await Rr$2(Sd,ci.disabled,ai,va,ws.shouldUseNativeValidation))[tf],xa([tf]),Bd(pf),vd&&(nf?lf=!1:hi.isValid&&(lf=await Ld(si,!0)));vd&&(Sd._f.deps&&df(Sd._f.deps),Od(tf,lf,nf,If))}},Wd=(kd,Dd)=>{if(k$6(oi.errors,Dd)&&kd.focus)return kd.focus(),1},df=async(kd,Dd={})=>{let tf,vd;const Sd=xt$1(kd);if(ws.resolver){const Id=await Pd(ne$2(kd)?kd:Sd);tf=me$2(Id),vd=kd?!Sd.some(Bd=>k$6(Id,Bd)):tf}else kd?(vd=(await Promise.all(Sd.map(async Id=>{const Bd=k$6(si,Id);return await Ld(Bd&&Bd._f?{[Id]:Bd}:Bd)}))).every(Boolean),!(!vd&&!oi.isValid)&&wa()):vd=tf=await Ld(si);return pi.state.next({...!Te$2(kd)||hi.isValid&&tf!==oi.isValid?{}:{name:kd},...ws.resolver||!kd?{isValid:tf}:{},errors:oi.errors}),Dd.shouldFocus&&!vd&&Ct$2(si,Wd,kd?Sd:ci.mount),vd},hf=kd=>{const Dd={...li.mount?ai:ii};return ne$2(kd)?Dd:Te$2(kd)?k$6(Dd,kd):kd.map(tf=>k$6(Dd,tf))},xd=(kd,Dd)=>({invalid:!!k$6((Dd||oi).errors,kd),isDirty:!!k$6((Dd||oi).dirtyFields,kd),error:k$6((Dd||oi).errors,kd),isValidating:!!k$6(oi.validatingFields,kd),isTouched:!!k$6((Dd||oi).touchedFields,kd)}),Fd=kd=>{kd&&xt$1(kd).forEach(Dd=>oe$3(oi.errors,Dd)),pi.state.next({errors:kd?oi.errors:{}})},Vd=(kd,Dd,tf)=>{const vd=(k$6(si,kd,{_f:{}})._f||{}).ref,Sd=k$6(oi.errors,kd)||{},{ref:Id,message:Bd,type:nf,...lf}=Sd;J$5(oi.errors,kd,{...lf,...Dd,ref:vd}),pi.state.next({name:kd,errors:oi.errors,isValid:!1}),tf&&tf.shouldFocus&&vd&&vd.focus&&vd.focus()},af=(kd,Dd)=>_e$2(kd)?pi.values.subscribe({next:tf=>kd(Md(void 0,Dd),tf)}):Md(kd,Dd,!0),ff=(kd,Dd={})=>{for(const tf of kd?xt$1(kd):ci.mount)ci.mount.delete(tf),ci.array.delete(tf),Dd.keepValue||(oe$3(si,tf),oe$3(ai,tf)),!Dd.keepError&&oe$3(oi.errors,tf),!Dd.keepDirty&&oe$3(oi.dirtyFields,tf),!Dd.keepTouched&&oe$3(oi.touchedFields,tf),!Dd.keepIsValidating&&oe$3(oi.validatingFields,tf),!ws.shouldUnregister&&!Dd.keepDefaultValue&&oe$3(ii,tf);pi.values.next({values:{...ai}}),pi.state.next({...oi,...Dd.keepDirty?{isDirty:_d()}:{}}),!Dd.keepIsValid&&wa()},uf=({disabled:kd,name:Dd,field:tf,fields:vd})=>{(be$2(kd)&&li.mount||kd||ci.disabled.has(Dd))&&(kd?ci.disabled.add(Dd):ci.disabled.delete(Dd),Ed(Dd,yn$2(tf?tf._f:k$6(vd,Dd)._f),!1,!1,!0))},mf=(kd,Dd={})=>{let tf=k$6(si,kd);const vd=be$2(Dd.disabled)||be$2(ws.disabled);return J$5(si,kd,{...tf||{},_f:{...tf&&tf._f?tf._f:{ref:{name:kd}},name:kd,mount:!0,...Dd}}),ci.mount.add(kd),tf?uf({field:tf,disabled:be$2(Dd.disabled)?Dd.disabled:ws.disabled,name:kd}):gd(kd,!0,Dd.value),{...vd?{disabled:Dd.disabled||ws.disabled}:{},...ws.progressive?{required:!!Dd.required,min:vt$2(Dd.min),max:vt$2(Dd.max),minLength:vt$2(Dd.minLength),maxLength:vt$2(Dd.maxLength),pattern:vt$2(Dd.pattern)}:{},name:kd,onChange:of,onBlur:of,ref:Sd=>{if(Sd){mf(kd,Dd),tf=k$6(si,kd);const Id=ne$2(Sd.value)&&Sd.querySelectorAll&&Sd.querySelectorAll("input,select,textarea")[0]||Sd,Bd=Ai(Id),nf=tf._f.refs||[];if(Bd?nf.find(lf=>lf===Id):Id===tf._f.ref)return;J$5(si,kd,{_f:{...tf._f,...Bd?{refs:[...nf.filter(vn$2),Id,...Array.isArray(k$6(ii,kd))?[{}]:[]],ref:{type:Id.type,name:kd}}:{ref:Id}}}),gd(kd,!1,void 0,Id)}else tf=k$6(si,kd,{}),tf._f&&(tf._f.mount=!1),(ws.shouldUnregister||Dd.shouldUnregister)&&!(io$1(ci.array,kd)&&li.action)&&ci.unMount.add(kd)}}},yf=()=>ws.shouldFocusError&&Ct$2(si,Wd,ci.mount),Sf=kd=>{be$2(kd)&&(pi.state.next({disabled:kd}),Ct$2(si,(Dd,tf)=>{const vd=k$6(si,tf);vd&&(Dd.disabled=vd._f.disabled||kd,Array.isArray(vd._f.refs)&&vd._f.refs.forEach(Sd=>{Sd.disabled=vd._f.disabled||kd}))},0,!1))},Of=(kd,Dd)=>async tf=>{let vd;tf&&(tf.preventDefault&&tf.preventDefault(),tf.persist&&tf.persist());let Sd=pe$1(ai);if(ci.disabled.size)for(const Id of ci.disabled)J$5(Sd,Id,void 0);if(pi.state.next({isSubmitting:!0}),ws.resolver){const{errors:Id,values:Bd}=await Nd();oi.errors=Id,Sd=Bd}else await Ld(si);if(oe$3(oi.errors,"root"),me$2(oi.errors)){pi.state.next({errors:{}});try{await kd(Sd,tf)}catch(Id){vd=Id}}else Dd&&await Dd({...oi.errors},tf),yf(),setTimeout(yf);if(pi.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:me$2(oi.errors)&&!vd,submitCount:oi.submitCount+1,errors:oi.errors}),vd)throw vd},wf=(kd,Dd={})=>{k$6(si,kd)&&(ne$2(Dd.defaultValue)?sf(kd,pe$1(k$6(ii,kd))):(sf(kd,Dd.defaultValue),J$5(ii,kd,pe$1(Dd.defaultValue))),Dd.keepTouched||oe$3(oi.touchedFields,kd),Dd.keepDirty||(oe$3(oi.dirtyFields,kd),oi.isDirty=Dd.defaultValue?_d(kd,pe$1(k$6(ii,kd))):_d()),Dd.keepError||(oe$3(oi.errors,kd),hi.isValid&&wa()),pi.state.next({...oi}))},Ef=(kd,Dd={})=>{const tf=kd?pe$1(kd):ii,vd=pe$1(tf),Sd=me$2(kd),Id=Sd?ii:vd;if(Dd.keepDefaultValues||(ii=tf),!Dd.keepValues){if(Dd.keepDirtyValues){const Bd=new Set([...ci.mount,...Object.keys(gt$2(ii,ai))]);for(const nf of Array.from(Bd))k$6(oi.dirtyFields,nf)?J$5(Id,nf,k$6(ai,nf)):sf(nf,k$6(Id,nf))}else{if(Un$1&&ne$2(kd))for(const Bd of ci.mount){const nf=k$6(si,Bd);if(nf&&nf._f){const lf=Array.isArray(nf._f.refs)?nf._f.refs[0]:nf._f.ref;if(Ht$1(lf)){const pf=lf.closest("form");if(pf){pf.reset();break}}}}si={}}ai=ws.shouldUnregister?Dd.keepDefaultValues?pe$1(ii):{}:pe$1(Id),pi.array.next({values:{...Id}}),pi.values.next({values:{...Id}})}ci={mount:Dd.keepDirtyValues?ci.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},li.mount=!hi.isValid||!!Dd.keepIsValid||!!Dd.keepDirtyValues,li.watch=!!ws.shouldUnregister,pi.state.next({submitCount:Dd.keepSubmitCount?oi.submitCount:0,isDirty:Sd?!1:Dd.keepDirty?oi.isDirty:!!(Dd.keepDefaultValues&&!Ge$2(kd,ii)),isSubmitted:Dd.keepIsSubmitted?oi.isSubmitted:!1,dirtyFields:Sd?{}:Dd.keepDirtyValues?Dd.keepDefaultValues&&ai?gt$2(ii,ai):oi.dirtyFields:Dd.keepDefaultValues&&kd?gt$2(ii,kd):Dd.keepDirty?oi.dirtyFields:{},touchedFields:Dd.keepTouched?oi.touchedFields:{},errors:Dd.keepErrors?oi.errors:{},isSubmitSuccessful:Dd.keepIsSubmitSuccessful?oi.isSubmitSuccessful:!1,isSubmitting:!1})},xf=(kd,Dd)=>Ef(_e$2(kd)?kd(ai):kd,Dd);return{control:{register:mf,unregister:ff,getFieldState:xd,handleSubmit:Of,setError:Vd,_executeSchema:Nd,_getWatch:Md,_getDirty:_d,_updateValid:wa,_removeUnmounted:rf,_updateFieldArray:Ca,_updateDisabledField:uf,_getFieldArray:Td,_reset:Ef,_resetDefaultValues:()=>_e$2(ws.defaultValues)&&ws.defaultValues().then(kd=>{xf(kd,ws.resetOptions),pi.state.next({isLoading:!1})}),_updateFormState:kd=>{oi={...oi,...kd}},_disableForm:Sf,_subjects:pi,_proxyFormState:hi,_setErrors:ku,get _fields(){return si},get _formValues(){return ai},get _state(){return li},set _state(kd){li=kd},get _defaultValues(){return ii},get _names(){return ci},set _names(kd){ci=kd},get _formState(){return oi},set _formState(kd){oi=kd},get _options(){return ws},set _options(kd){ws={...ws,...kd}}},trigger:df,register:mf,handleSubmit:Of,watch:af,setValue:sf,getValues:hf,reset:xf,resetField:wf,clearErrors:Fd,unregister:ff,setError:Vd,setFocus:(kd,Dd={})=>{const tf=k$6(si,kd),vd=tf&&tf._f;if(vd){const Sd=vd.refs?vd.refs[0]:vd.ref;Sd.focus&&(Sd.focus(),Dd.shouldSelect&&_e$2(Sd.select)&&Sd.select())}},getFieldState:xd}}function Gd(Ws={}){const ws=React__default.useRef(void 0),oi=React__default.useRef(void 0),[si,ii]=React__default.useState({isDirty:!1,isValidating:!1,isLoading:_e$2(Ws.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:Ws.errors||{},disabled:Ws.disabled||!1,defaultValues:_e$2(Ws.defaultValues)?void 0:Ws.defaultValues});ws.current||(ws.current={...Oi(Ws),formState:si});const ai=ws.current.control;return ai._options=Ws,zn$2({subject:ai._subjects.state,next:li=>{uo$1(li,ai._proxyFormState,ai._updateFormState,!0)&&ii({...ai._formState})}}),React__default.useEffect(()=>ai._disableForm(Ws.disabled),[ai,Ws.disabled]),React__default.useEffect(()=>{if(ai._proxyFormState.isDirty){const li=ai._getDirty();li!==si.isDirty&&ai._subjects.state.next({isDirty:li})}},[ai,si.isDirty]),React__default.useEffect(()=>{Ws.values&&!Ge$2(Ws.values,oi.current)?(ai._reset(Ws.values,ai._options.resetOptions),oi.current=Ws.values,ii(li=>({...li}))):ai._resetDefaultValues()},[Ws.values,ai]),React__default.useEffect(()=>{Ws.errors&&ai._setErrors(Ws.errors)},[Ws.errors,ai]),React__default.useEffect(()=>{ai._state.mount||(ai._updateValid(),ai._state.mount=!0),ai._state.watch&&(ai._state.watch=!1,ai._subjects.state.next({...ai._formState})),ai._removeUnmounted()}),React__default.useEffect(()=>{Ws.shouldUnregister&&ai._subjects.values.next({values:ai._getWatch()})},[Ws.shouldUnregister,ai]),ws.current.formState=lo$1(si,ai),ws.current}function Pr$2(Ws,ws){if(typeof Ws=="function")return Ws(ws);Ws!=null&&(Ws.current=ws)}function rn$1(...Ws){return ws=>{let oi=!1;const si=Ws.map(ii=>{const ai=Pr$2(ii,ws);return!oi&&typeof ai=="function"&&(oi=!0),ai});if(oi)return()=>{for(let ii=0;ii<si.length;ii++){const ai=si[ii];typeof ai=="function"?ai():Pr$2(Ws[ii],null)}}}}function ge$2(...Ws){return React.useCallback(rn$1(...Ws),Ws)}var St$2=React.forwardRef((Ws,ws)=>{const{children:oi,...si}=Ws,ii=React.Children.toArray(oi),ai=ii.find(Ii);if(ai){const li=ai.props.children,ci=ii.map(ui=>ui===ai?React.Children.count(li)>1?React.Children.only(null):React.isValidElement(li)?li.props.children:null:ui);return jsx(kn$1,{...si,ref:ws,children:React.isValidElement(li)?React.cloneElement(li,void 0,ci):null})}return jsx(kn$1,{...si,ref:ws,children:oi})});St$2.displayName="Slot";var kn$1=React.forwardRef((Ws,ws)=>{const{children:oi,...si}=Ws;if(React.isValidElement(oi)){const ii=Ni(oi);return React.cloneElement(oi,{...Fi(si,oi.props),ref:ws?rn$1(ws,ii):ii})}return React.Children.count(oi)>1?React.Children.only(null):null});kn$1.displayName="SlotClone";var Di$1=({children:Ws})=>jsx(Fragment,{children:Ws});function Ii(Ws){return React.isValidElement(Ws)&&Ws.type===Di$1}function Fi(Ws,ws){const oi={...ws};for(const si in ws){const ii=Ws[si],ai=ws[si];/^on[A-Z]/.test(si)?ii&&ai?oi[si]=(...li)=>{ai(...li),ii(...li)}:ii&&(oi[si]=ii):si==="style"?oi[si]={...ii,...ai}:si==="className"&&(oi[si]=[ii,ai].filter(Boolean).join(" "))}return{...Ws,...oi}}function Ni(Ws){var ws,oi;let si=(ws=Object.getOwnPropertyDescriptor(Ws.props,"ref"))==null?void 0:ws.get,ii=si&&"isReactWarning"in si&&si.isReactWarning;return ii?Ws.ref:(si=(oi=Object.getOwnPropertyDescriptor(Ws,"ref"))==null?void 0:oi.get,ii=si&&"isReactWarning"in si&&si.isReactWarning,ii?Ws.props.ref:Ws.props.ref||Ws.ref)}var Li$1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],se$2=Li$1.reduce((Ws,ws)=>{const oi=React.forwardRef((si,ii)=>{const{asChild:ai,...li}=si,ci=ai?St$2:ws;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),jsx(ci,{...li,ref:ii})});return oi.displayName=`Primitive.${ws}`,{...Ws,[ws]:oi}},{});function wo$1(Ws,ws){Ws&&ReactDOM.flushSync(()=>Ws.dispatchEvent(ws))}function xo(Ws){var ws,oi,si="";if(typeof Ws=="string"||typeof Ws=="number")si+=Ws;else if(typeof Ws=="object")if(Array.isArray(Ws)){var ii=Ws.length;for(ws=0;ws<ii;ws++)Ws[ws]&&(oi=xo(Ws[ws]))&&(si&&(si+=" "),si+=oi)}else for(oi in Ws)Ws[oi]&&(si&&(si+=" "),si+=oi);return si}function jd(){for(var Ws,ws,oi=0,si="",ii=arguments.length;oi<ii;oi++)(Ws=arguments[oi])&&(ws=xo(Ws))&&(si&&(si+=" "),si+=ws);return si}const Hn$1="-",Vi=Ws=>{const ws=Ui(Ws),{conflictingClassGroups:oi,conflictingClassGroupModifiers:si}=Ws;return{getClassGroupId:ii=>{const ai=ii.split(Hn$1);return ai[0]===""&&ai.length!==1&&ai.shift(),Co(ai,ws)||Bi(ii)},getConflictingClassGroupIds:(ii,ai)=>{const li=oi[ii]||[];return ai&&si[ii]?[...li,...si[ii]]:li}}},Co=(Ws,ws)=>{var oi;if(Ws.length===0)return ws.classGroupId;const si=Ws[0],ii=ws.nextPart.get(si),ai=ii?Co(Ws.slice(1),ii):void 0;if(ai)return ai;if(ws.validators.length===0)return;const li=Ws.join(Hn$1);return(oi=ws.validators.find(({validator:ci})=>ci(li)))==null?void 0:oi.classGroupId},Tr$2=/^\[(.+)\]$/,Bi=Ws=>{if(Tr$2.test(Ws)){const ws=Tr$2.exec(Ws)[1],oi=ws==null?void 0:ws.substring(0,ws.indexOf(":"));if(oi)return"arbitrary.."+oi}},Ui=Ws=>{const{theme:ws,prefix:oi}=Ws,si={nextPart:new Map,validators:[]};return $i(Object.entries(Ws.classGroups),oi).forEach(([ii,ai])=>{On$2(ai,si,ii,ws)}),si},On$2=(Ws,ws,oi,si)=>{Ws.forEach(ii=>{if(typeof ii=="string"){const ai=ii===""?ws:kr$2(ws,ii);ai.classGroupId=oi;return}if(typeof ii=="function"){if(Wi(ii)){On$2(ii(si),ws,oi,si);return}ws.validators.push({validator:ii,classGroupId:oi});return}Object.entries(ii).forEach(([ai,li])=>{On$2(li,kr$2(ws,ai),oi,si)})})},kr$2=(Ws,ws)=>{let oi=Ws;return ws.split(Hn$1).forEach(si=>{oi.nextPart.has(si)||oi.nextPart.set(si,{nextPart:new Map,validators:[]}),oi=oi.nextPart.get(si)}),oi},Wi=Ws=>Ws.isThemeGetter,$i=(Ws,ws)=>ws?Ws.map(([oi,si])=>{const ii=si.map(ai=>typeof ai=="string"?ws+ai:typeof ai=="object"?Object.fromEntries(Object.entries(ai).map(([li,ci])=>[ws+li,ci])):ai);return[oi,ii]}):Ws,zi=Ws=>{if(Ws<1)return{get:()=>{},set:()=>{}};let ws=0,oi=new Map,si=new Map;const ii=(ai,li)=>{oi.set(ai,li),ws++,ws>Ws&&(ws=0,si=oi,oi=new Map)};return{get(ai){let li=oi.get(ai);if(li!==void 0)return li;if((li=si.get(ai))!==void 0)return ii(ai,li),li},set(ai,li){oi.has(ai)?oi.set(ai,li):ii(ai,li)}}},So="!",Gi=Ws=>{const{separator:ws,experimentalParseClassName:oi}=Ws,si=ws.length===1,ii=ws[0],ai=ws.length,li=ci=>{const ui=[];let di=0,hi=0,pi;for(let wa=0;wa<ci.length;wa++){let xa=ci[wa];if(di===0){if(xa===ii&&(si||ci.slice(wa,wa+ai)===ws)){ui.push(ci.slice(hi,wa)),hi=wa+ai;continue}if(xa==="/"){pi=wa;continue}}xa==="["?di++:xa==="]"&&di--}const ha=ui.length===0?ci:ci.substring(hi),ga=ha.startsWith(So),va=ga?ha.substring(1):ha,ba=pi&&pi>hi?pi-hi:void 0;return{modifiers:ui,hasImportantModifier:ga,baseClassName:va,maybePostfixModifierPosition:ba}};return oi?ci=>oi({className:ci,parseClassName:li}):li},ji$1=Ws=>{if(Ws.length<=1)return Ws;const ws=[];let oi=[];return Ws.forEach(si=>{si[0]==="["?(ws.push(...oi.sort(),si),oi=[]):oi.push(si)}),ws.push(...oi.sort()),ws},Hi=Ws=>({cache:zi(Ws.cacheSize),parseClassName:Gi(Ws),...Vi(Ws)}),Ki=/\s+/,Yi=(Ws,ws)=>{const{parseClassName:oi,getClassGroupId:si,getConflictingClassGroupIds:ii}=ws,ai=[],li=Ws.trim().split(Ki);let ci="";for(let ui=li.length-1;ui>=0;ui-=1){const di=li[ui],{modifiers:hi,hasImportantModifier:pi,baseClassName:ha,maybePostfixModifierPosition:ga}=oi(di);let va=!!ga,ba=si(va?ha.substring(0,ga):ha);if(!ba){if(!va){ci=di+(ci.length>0?" "+ci:ci);continue}if(ba=si(ha),!ba){ci=di+(ci.length>0?" "+ci:ci);continue}va=!1}const wa=ji$1(hi).join(":"),xa=pi?wa+So:wa,Ca=xa+ba;if(ai.includes(Ca))continue;ai.push(Ca);const el=ii(ba,va);for(let ku=0;ku<el.length;++ku){const gd=el[ku];ai.push(xa+gd)}ci=di+(ci.length>0?" "+ci:ci)}return ci};function Xi(){let Ws=0,ws,oi,si="";for(;Ws<arguments.length;)(ws=arguments[Ws++])&&(oi=Eo$1(ws))&&(si&&(si+=" "),si+=oi);return si}const Eo$1=Ws=>{if(typeof Ws=="string")return Ws;let ws,oi="";for(let si=0;si<Ws.length;si++)Ws[si]&&(ws=Eo$1(Ws[si]))&&(oi&&(oi+=" "),oi+=ws);return oi};function qi(Ws,...ws){let oi,si,ii,ai=li;function li(ui){const di=ws.reduce((hi,pi)=>pi(hi),Ws());return oi=Hi(di),si=oi.cache.get,ii=oi.cache.set,ai=ci,ci(ui)}function ci(ui){const di=si(ui);if(di)return di;const hi=Yi(ui,oi);return ii(ui,hi),hi}return function(){return ai(Xi.apply(null,arguments))}}const ee$1=Ws=>{const ws=oi=>oi[Ws]||[];return ws.isThemeGetter=!0,ws},Ao=/^\[(?:([a-z-]+):)?(.+)\]$/i,Zi=/^\d+\/\d+$/,Qi=new Set(["px","full","screen"]),Ji=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ea=/\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$/,ta=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,na=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ra=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fe$2=Ws=>ot$1(Ws)||Qi.has(Ws)||Zi.test(Ws),We$2=Ws=>ct$1(Ws,"length",da$1),ot$1=Ws=>!!Ws&&!Number.isNaN(Number(Ws)),bn$1=Ws=>ct$1(Ws,"number",ot$1),yt$1=Ws=>!!Ws&&Number.isInteger(Number(Ws)),oa=Ws=>Ws.endsWith("%")&&ot$1(Ws.slice(0,-1)),z$5=Ws=>Ao.test(Ws),$e$2=Ws=>Ji.test(Ws),sa=new Set(["length","size","percentage"]),ia=Ws=>ct$1(Ws,sa,Ro),aa=Ws=>ct$1(Ws,"position",Ro),ca=new Set(["image","url"]),la=Ws=>ct$1(Ws,ca,pa$1),ua$1=Ws=>ct$1(Ws,"",fa$1),bt$2=()=>!0,ct$1=(Ws,ws,oi)=>{const si=Ao.exec(Ws);return si?si[1]?typeof ws=="string"?si[1]===ws:ws.has(si[1]):oi(si[2]):!1},da$1=Ws=>ea.test(Ws)&&!ta.test(Ws),Ro=()=>!1,fa$1=Ws=>na.test(Ws),pa$1=Ws=>ra.test(Ws),ma$1=()=>{const Ws=ee$1("colors"),ws=ee$1("spacing"),oi=ee$1("blur"),si=ee$1("brightness"),ii=ee$1("borderColor"),ai=ee$1("borderRadius"),li=ee$1("borderSpacing"),ci=ee$1("borderWidth"),ui=ee$1("contrast"),di=ee$1("grayscale"),hi=ee$1("hueRotate"),pi=ee$1("invert"),ha=ee$1("gap"),ga=ee$1("gradientColorStops"),va=ee$1("gradientColorStopPositions"),ba=ee$1("inset"),wa=ee$1("margin"),xa=ee$1("opacity"),Ca=ee$1("padding"),el=ee$1("saturate"),ku=ee$1("scale"),gd=ee$1("sepia"),Ed=ee$1("skew"),Od=ee$1("space"),Nd=ee$1("translate"),Pd=()=>["auto","contain","none"],Ld=()=>["auto","hidden","clip","visible","scroll"],rf=()=>["auto",z$5,ws],_d=()=>[z$5,ws],Md=()=>["",Fe$2,We$2],Td=()=>["auto",ot$1,z$5],wd=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Cd=()=>["solid","dashed","dotted","double","none"],sf=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],of=()=>["start","end","center","between","around","evenly","stretch"],Wd=()=>["","0",z$5],df=()=>["auto","avoid","all","avoid-page","page","left","right","column"],hf=()=>[ot$1,z$5];return{cacheSize:500,separator:":",theme:{colors:[bt$2],spacing:[Fe$2,We$2],blur:["none","",$e$2,z$5],brightness:hf(),borderColor:[Ws],borderRadius:["none","","full",$e$2,z$5],borderSpacing:_d(),borderWidth:Md(),contrast:hf(),grayscale:Wd(),hueRotate:hf(),invert:Wd(),gap:_d(),gradientColorStops:[Ws],gradientColorStopPositions:[oa,We$2],inset:rf(),margin:rf(),opacity:hf(),padding:_d(),saturate:hf(),scale:hf(),sepia:Wd(),skew:hf(),space:_d(),translate:_d()},classGroups:{aspect:[{aspect:["auto","square","video",z$5]}],container:["container"],columns:[{columns:[$e$2]}],"break-after":[{"break-after":df()}],"break-before":[{"break-before":df()}],"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"],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:[...wd(),z$5]}],overflow:[{overflow:Ld()}],"overflow-x":[{"overflow-x":Ld()}],"overflow-y":[{"overflow-y":Ld()}],overscroll:[{overscroll:Pd()}],"overscroll-x":[{"overscroll-x":Pd()}],"overscroll-y":[{"overscroll-y":Pd()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[ba]}],"inset-x":[{"inset-x":[ba]}],"inset-y":[{"inset-y":[ba]}],start:[{start:[ba]}],end:[{end:[ba]}],top:[{top:[ba]}],right:[{right:[ba]}],bottom:[{bottom:[ba]}],left:[{left:[ba]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",yt$1,z$5]}],basis:[{basis:rf()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",z$5]}],grow:[{grow:Wd()}],shrink:[{shrink:Wd()}],order:[{order:["first","last","none",yt$1,z$5]}],"grid-cols":[{"grid-cols":[bt$2]}],"col-start-end":[{col:["auto",{span:["full",yt$1,z$5]},z$5]}],"col-start":[{"col-start":Td()}],"col-end":[{"col-end":Td()}],"grid-rows":[{"grid-rows":[bt$2]}],"row-start-end":[{row:["auto",{span:[yt$1,z$5]},z$5]}],"row-start":[{"row-start":Td()}],"row-end":[{"row-end":Td()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",z$5]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",z$5]}],gap:[{gap:[ha]}],"gap-x":[{"gap-x":[ha]}],"gap-y":[{"gap-y":[ha]}],"justify-content":[{justify:["normal",...of()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...of(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...of(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[Ca]}],px:[{px:[Ca]}],py:[{py:[Ca]}],ps:[{ps:[Ca]}],pe:[{pe:[Ca]}],pt:[{pt:[Ca]}],pr:[{pr:[Ca]}],pb:[{pb:[Ca]}],pl:[{pl:[Ca]}],m:[{m:[wa]}],mx:[{mx:[wa]}],my:[{my:[wa]}],ms:[{ms:[wa]}],me:[{me:[wa]}],mt:[{mt:[wa]}],mr:[{mr:[wa]}],mb:[{mb:[wa]}],ml:[{ml:[wa]}],"space-x":[{"space-x":[Od]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Od]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",z$5,ws]}],"min-w":[{"min-w":[z$5,ws,"min","max","fit"]}],"max-w":[{"max-w":[z$5,ws,"none","full","min","max","fit","prose",{screen:[$e$2]},$e$2]}],h:[{h:[z$5,ws,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[z$5,ws,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[z$5,ws,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[z$5,ws,"auto","min","max","fit"]}],"font-size":[{text:["base",$e$2,We$2]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",bn$1]}],"font-family":[{font:[bt$2]}],"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:["tighter","tight","normal","wide","wider","widest",z$5]}],"line-clamp":[{"line-clamp":["none",ot$1,bn$1]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Fe$2,z$5]}],"list-image":[{"list-image":["none",z$5]}],"list-style-type":[{list:["none","disc","decimal",z$5]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[Ws]}],"placeholder-opacity":[{"placeholder-opacity":[xa]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[Ws]}],"text-opacity":[{"text-opacity":[xa]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Cd(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Fe$2,We$2]}],"underline-offset":[{"underline-offset":["auto",Fe$2,z$5]}],"text-decoration-color":[{decoration:[Ws]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_d()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",z$5]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",z$5]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[xa]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...wd(),aa]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ia]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},la]}],"bg-color":[{bg:[Ws]}],"gradient-from-pos":[{from:[va]}],"gradient-via-pos":[{via:[va]}],"gradient-to-pos":[{to:[va]}],"gradient-from":[{from:[ga]}],"gradient-via":[{via:[ga]}],"gradient-to":[{to:[ga]}],rounded:[{rounded:[ai]}],"rounded-s":[{"rounded-s":[ai]}],"rounded-e":[{"rounded-e":[ai]}],"rounded-t":[{"rounded-t":[ai]}],"rounded-r":[{"rounded-r":[ai]}],"rounded-b":[{"rounded-b":[ai]}],"rounded-l":[{"rounded-l":[ai]}],"rounded-ss":[{"rounded-ss":[ai]}],"rounded-se":[{"rounded-se":[ai]}],"rounded-ee":[{"rounded-ee":[ai]}],"rounded-es":[{"rounded-es":[ai]}],"rounded-tl":[{"rounded-tl":[ai]}],"rounded-tr":[{"rounded-tr":[ai]}],"rounded-br":[{"rounded-br":[ai]}],"rounded-bl":[{"rounded-bl":[ai]}],"border-w":[{border:[ci]}],"border-w-x":[{"border-x":[ci]}],"border-w-y":[{"border-y":[ci]}],"border-w-s":[{"border-s":[ci]}],"border-w-e":[{"border-e":[ci]}],"border-w-t":[{"border-t":[ci]}],"border-w-r":[{"border-r":[ci]}],"border-w-b":[{"border-b":[ci]}],"border-w-l":[{"border-l":[ci]}],"border-opacity":[{"border-opacity":[xa]}],"border-style":[{border:[...Cd(),"hidden"]}],"divide-x":[{"divide-x":[ci]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[ci]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[xa]}],"divide-style":[{divide:Cd()}],"border-color":[{border:[ii]}],"border-color-x":[{"border-x":[ii]}],"border-color-y":[{"border-y":[ii]}],"border-color-s":[{"border-s":[ii]}],"border-color-e":[{"border-e":[ii]}],"border-color-t":[{"border-t":[ii]}],"border-color-r":[{"border-r":[ii]}],"border-color-b":[{"border-b":[ii]}],"border-color-l":[{"border-l":[ii]}],"divide-color":[{divide:[ii]}],"outline-style":[{outline:["",...Cd()]}],"outline-offset":[{"outline-offset":[Fe$2,z$5]}],"outline-w":[{outline:[Fe$2,We$2]}],"outline-color":[{outline:[Ws]}],"ring-w":[{ring:Md()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[Ws]}],"ring-opacity":[{"ring-opacity":[xa]}],"ring-offset-w":[{"ring-offset":[Fe$2,We$2]}],"ring-offset-color":[{"ring-offset":[Ws]}],shadow:[{shadow:["","inner","none",$e$2,ua$1]}],"shadow-color":[{shadow:[bt$2]}],opacity:[{opacity:[xa]}],"mix-blend":[{"mix-blend":[...sf(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":sf()}],filter:[{filter:["","none"]}],blur:[{blur:[oi]}],brightness:[{brightness:[si]}],contrast:[{contrast:[ui]}],"drop-shadow":[{"drop-shadow":["","none",$e$2,z$5]}],grayscale:[{grayscale:[di]}],"hue-rotate":[{"hue-rotate":[hi]}],invert:[{invert:[pi]}],saturate:[{saturate:[el]}],sepia:[{sepia:[gd]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[oi]}],"backdrop-brightness":[{"backdrop-brightness":[si]}],"backdrop-contrast":[{"backdrop-contrast":[ui]}],"backdrop-grayscale":[{"backdrop-grayscale":[di]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[hi]}],"backdrop-invert":[{"backdrop-invert":[pi]}],"backdrop-opacity":[{"backdrop-opacity":[xa]}],"backdrop-saturate":[{"backdrop-saturate":[el]}],"backdrop-sepia":[{"backdrop-sepia":[gd]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[li]}],"border-spacing-x":[{"border-spacing-x":[li]}],"border-spacing-y":[{"border-spacing-y":[li]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",z$5]}],duration:[{duration:hf()}],ease:[{ease:["linear","in","out","in-out",z$5]}],delay:[{delay:hf()}],animate:[{animate:["none","spin","ping","pulse","bounce",z$5]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[ku]}],"scale-x":[{"scale-x":[ku]}],"scale-y":[{"scale-y":[ku]}],rotate:[{rotate:[yt$1,z$5]}],"translate-x":[{"translate-x":[Nd]}],"translate-y":[{"translate-y":[Nd]}],"skew-x":[{"skew-x":[Ed]}],"skew-y":[{"skew-y":[Ed]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",z$5]}],accent:[{accent:["auto",Ws]}],appearance:[{appearance:["none","auto"]}],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",z$5]}],"caret-color":[{caret:[Ws]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_d()}],"scroll-mx":[{"scroll-mx":_d()}],"scroll-my":[{"scroll-my":_d()}],"scroll-ms":[{"scroll-ms":_d()}],"scroll-me":[{"scroll-me":_d()}],"scroll-mt":[{"scroll-mt":_d()}],"scroll-mr":[{"scroll-mr":_d()}],"scroll-mb":[{"scroll-mb":_d()}],"scroll-ml":[{"scroll-ml":_d()}],"scroll-p":[{"scroll-p":_d()}],"scroll-px":[{"scroll-px":_d()}],"scroll-py":[{"scroll-py":_d()}],"scroll-ps":[{"scroll-ps":_d()}],"scroll-pe":[{"scroll-pe":_d()}],"scroll-pt":[{"scroll-pt":_d()}],"scroll-pr":[{"scroll-pr":_d()}],"scroll-pb":[{"scroll-pb":_d()}],"scroll-pl":[{"scroll-pl":_d()}],"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",z$5]}],fill:[{fill:[Ws,"none"]}],"stroke-w":[{stroke:[Fe$2,We$2,bn$1]}],stroke:[{stroke:[Ws,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Hd=qi(ma$1);function Sa(Ws){return Ws?typeof Ws=="number"?{width:Ws.toString()+"px",height:Ws.toString()+"px"}:{width:Ws,height:Ws}:{}}const Ea=(Ws,ws,oi)=>{const si=Ws[ws];return si?typeof si=="function"?si():Promise.resolve(si):new Promise((ii,ai)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(ai.bind(null,new Error("Unknown variable dynamic import: "+ws+(ws.split("/").length!==oi?". Note that variables only represent file names one level deep.":""))))})};function Aa(Ws){return jsx("div",{style:{width:Ws.width,height:Ws.height}})}function Ra(Ws){try{return lazy(()=>Ea(Object.assign({"../../../assets/icon-components/ArrowFilledRight.tsx":()=>__vitePreload(()=>import("./ArrowFilledRight-blx8xu7X-D3d8PUWh.js"),[]),"../../../assets/icon-components/ArrowLeft.tsx":()=>__vitePreload(()=>import("./ArrowLeft-7pYNK4eX-8ZR_YHAJ.js"),[]),"../../../assets/icon-components/ArrowUp.tsx":()=>__vitePreload(()=>import("./ArrowUp-Bbr_dwo_-C5ppCQo4.js"),[]),"../../../assets/icon-components/BarChart.tsx":()=>__vitePreload(()=>import("./BarChart-B0G05Nfd-CHDJ7OaJ.js"),[]),"../../../assets/icon-components/BaseArrowLeft.tsx":()=>__vitePreload(()=>import("./BaseArrowLeft-DBzhFHMt-Dkbf2sWs.js"),[]),"../../../assets/icon-components/BaseArrowRight.tsx":()=>__vitePreload(()=>import("./BaseArrowRight-DYQTBWAs-CkkPllYm.js"),[]),"../../../assets/icon-components/Braces.tsx":()=>__vitePreload(()=>import("./Braces-N-sH2Zyc-3LcexUsR.js"),[]),"../../../assets/icon-components/Branch.tsx":()=>__vitePreload(()=>import("./Branch-CWdBw1_P-CmGdOXsI.js"),[]),"../../../assets/icon-components/BrickGlobe.tsx":()=>__vitePreload(()=>import("./BrickGlobe-67zaG6_H-DP0By6z_.js"),[]),"../../../assets/icon-components/Briefcase.tsx":()=>__vitePreload(()=>import("./Briefcase-CedW3KRR-DO5_k15F.js"),[]),"../../../assets/icon-components/Calendar.tsx":()=>__vitePreload(()=>import("./Calendar-C-6HV96D-YetudWvP.js"),[]),"../../../assets/icon-components/CalendarTime.tsx":()=>__vitePreload(()=>import("./CalendarTime-Bhjzlgn_-BVlYgNLL.js"),[]),"../../../assets/icon-components/Caret.tsx":()=>__vitePreload(()=>import("./Caret-Ep0j0fz2-By3ojfim.js"),[]),"../../../assets/icon-components/CaretDown.tsx":()=>__vitePreload(()=>import("./CaretDown-3X7LFYBf-C43xdKg8.js"),[]),"../../../assets/icon-components/CaretLeft.tsx":()=>__vitePreload(()=>import("./CaretLeft-Df3E-68c-wke5zKLt.js"),[]),"../../../assets/icon-components/CaretRight.tsx":()=>__vitePreload(()=>import("./CaretRight-DSVWUSka-Cx0Mkcqa.js"),[]),"../../../assets/icon-components/CaretSort.tsx":()=>__vitePreload(()=>import("./CaretSort-BkGdLETT-DVOzEEqR.js"),[]),"../../../assets/icon-components/Check.tsx":()=>__vitePreload(()=>import("./Check-DV-U4AEq-B582NMZp.js"),[]),"../../../assets/icon-components/CheckCircle.tsx":()=>__vitePreload(()=>import("./CheckCircle-DI5fEgGd-CVF4LDhR.js"),[]),"../../../assets/icon-components/CheckCircleFill.tsx":()=>__vitePreload(()=>import("./CheckCircleFill-C-F0v5mB-BSW1YMqM.js"),[]),"../../../assets/icon-components/Checkmark.tsx":()=>__vitePreload(()=>import("./Checkmark-BXnfChpo-CyQitGI2.js"),[]),"../../../assets/icon-components/ChevronDown.tsx":()=>__vitePreload(()=>import("./ChevronDown-ouBxrU-k-eUsCPXcB.js"),[]),"../../../assets/icon-components/Circle.tsx":()=>__vitePreload(()=>import("./Circle-n3-Wh4HS-8dOehHQf.js"),[]),"../../../assets/icon-components/CircleInfo.tsx":()=>__vitePreload(()=>import("./CircleInfo-BhZY3C2Q-CZgYK1h2.js"),[]),"../../../assets/icon-components/Clock.tsx":()=>__vitePreload(()=>import("./Clock-DF-XMxha-CudavWaE.js"),[]),"../../../assets/icon-components/ClockFill.tsx":()=>__vitePreload(()=>import("./ClockFill-Bd0t48q7-CcfHiJtH.js"),[]),"../../../assets/icon-components/CloudSlash.tsx":()=>__vitePreload(()=>import("./CloudSlash-B-zJBjaD-CxVyp-Ac.js"),[]),"../../../assets/icon-components/Collapse.tsx":()=>__vitePreload(()=>import("./Collapse-DRDB8Czs-CGcuZQgy.js"),[]),"../../../assets/icon-components/Connect.tsx":()=>__vitePreload(()=>import("./Connect-Dme-qfKq-CgniLji8.js"),[]),"../../../assets/icon-components/Copy.tsx":()=>__vitePreload(()=>import("./Copy-ms9-7m7Y-CkOtWZ6m.js"),[]),"../../../assets/icon-components/CrossCircle.tsx":()=>__vitePreload(()=>import("./CrossCircle-B6ZawoOx-z5-kkOo3.js"),[]),"../../../assets/icon-components/Discord.tsx":()=>__vitePreload(()=>import("./Discord-CAS0Cj7s-CcsBWpnf.js"),[]),"../../../assets/icon-components/Drive.tsx":()=>__vitePreload(()=>import("./Drive-GMcgBcIY-CzahDx9j.js"),[]),"../../../assets/icon-components/Ellipsis.tsx":()=>__vitePreload(()=>import("./Ellipsis-XK8AwMEC-BuVBeYhB.js"),[]),"../../../assets/icon-components/Error.tsx":()=>__vitePreload(()=>import("./Error-BmIZ2ZUy-CphzuMLn.js"),[]),"../../../assets/icon-components/Exclamation.tsx":()=>__vitePreload(()=>import("./Exclamation-CVsNS_QS-DLccamql.js"),[]),"../../../assets/icon-components/File.tsx":()=>__vitePreload(()=>import("./File-Ba7ClyaL-BU1g1wjO.js"),[]),"../../../assets/icon-components/FilesEarmark.tsx":()=>__vitePreload(()=>import("./FilesEarmark-CyrCQy8E-Bhut4E02.js"),[]),"../../../assets/icon-components/FolderClose.tsx":()=>__vitePreload(()=>import("./FolderClose-DG_qHisc-CH6NoBuu.js"),[]),"../../../assets/icon-components/FolderOpen.tsx":()=>__vitePreload(()=>import("./FolderOpen-kDoWFkJO-Cciutkdg.js"),[]),"../../../assets/icon-components/FolderPlus.tsx":()=>__vitePreload(()=>import("./FolderPlus-CSBSl9lZ-CifD0ek9.js"),[]),"../../../assets/icon-components/Forum.tsx":()=>__vitePreload(()=>import("./Forum-DZ-CkLFh-BwabccAX.js"),[]),"../../../assets/icon-components/Gear.tsx":()=>__vitePreload(()=>import("./Gear-cUlHJ4q6-B9R2l_9_.js"),[]),"../../../assets/icon-components/Github.tsx":()=>__vitePreload(()=>import("./Github-0PLiINY0-CjkZIHCO.js"),[]),"../../../assets/icon-components/Globe.tsx":()=>__vitePreload(()=>import("./Globe-CIYqVkpa-CL530H46.js"),[]),"../../../assets/icon-components/GlobeWww.tsx":()=>__vitePreload(()=>import("./GlobeWww-DN4yKujh-Ci7aa5CE.js"),[]),"../../../assets/icon-components/Hdd.tsx":()=>__vitePreload(()=>import("./Hdd-Dn_LdJIh-CJ6x9Bve.js"),[]),"../../../assets/icon-components/History.tsx":()=>__vitePreload(()=>import("./History-BP4SmaS_-P4WBKyqX.js"),[]),"../../../assets/icon-components/InfoSquare.tsx":()=>__vitePreload(()=>import("./InfoSquare-C98JaLiz-yPcGR71f.js"),[]),"../../../assets/icon-components/Link.tsx":()=>__vitePreload(()=>import("./Link-BF7aZjVu-CXIVQOz6.js"),[]),"../../../assets/icon-components/Linkedin.tsx":()=>__vitePreload(()=>import("./Linkedin-DJwIkS6q-Dkb5Tp_Z.js"),[]),"../../../assets/icon-components/Lock.tsx":()=>__vitePreload(()=>import("./Lock-PyaFHdNS-D_qxRTye.js"),[]),"../../../assets/icon-components/M.tsx":()=>__vitePreload(()=>import("./M-DozhhPMY-DBQw97P_.js"),[]),"../../../assets/icon-components/Pencil.tsx":()=>__vitePreload(()=>import("./Pencil-D7lvxXIP-D830iveq.js"),[]),"../../../assets/icon-components/People.tsx":()=>__vitePreload(()=>import("./People-CUB8LYKf-CyJmMqcw.js"),[]),"../../../assets/icon-components/Person.tsx":()=>__vitePreload(()=>import("./Person-DuL4PQzm-ttQR0nPy.js"),[]),"../../../assets/icon-components/Pin.tsx":()=>__vitePreload(()=>import("./Pin-DF70btCU-D53eCMAz.js"),[]),"../../../assets/icon-components/PinFilled.tsx":()=>__vitePreload(()=>import("./PinFilled-vImzS0do-CMXfFW67.js"),[]),"../../../assets/icon-components/Plus.tsx":()=>__vitePreload(()=>import("./Plus-DPFWGJM4-BztpK8li.js"),[]),"../../../assets/icon-components/PlusCircle.tsx":()=>__vitePreload(()=>import("./PlusCircle-BEnWRjHa-w5zztKGx.js"),[]),"../../../assets/icon-components/PowerhouseLogoSmall.tsx":()=>__vitePreload(()=>import("./PowerhouseLogoSmall-CmO95IAS-CDGLkst3.js"),[]),"../../../assets/icon-components/Project.tsx":()=>__vitePreload(()=>import("./Project-BlXuclr0-EsBam9d0.js"),[]),"../../../assets/icon-components/RedoArrow.tsx":()=>__vitePreload(()=>import("./RedoArrow-BJeEsiph-BbidqIFP.js"),[]),"../../../assets/icon-components/Reload.tsx":()=>__vitePreload(()=>import("./Reload-6C2CYgrl-DPZbA7yl.js"),[]),"../../../assets/icon-components/Renown.tsx":()=>__vitePreload(()=>import("./Renown-6m7hx37h-CItksi2j.js"),[]),"../../../assets/icon-components/RenownHover.tsx":()=>__vitePreload(()=>import("./RenownHover-CQ0TZHZv-cYQgnwQW.js"),[]),"../../../assets/icon-components/Ring.tsx":()=>__vitePreload(()=>import("./Ring-DKv0gnwT-CDHLz87h.js"),[]),"../../../assets/icon-components/Save.tsx":()=>__vitePreload(()=>import("./Save-BBxj68pn-BkUvn89C.js"),[]),"../../../assets/icon-components/Search.tsx":()=>__vitePreload(()=>import("./Search-YUJuRBLe-CecGUkZA.js"),[]),"../../../assets/icon-components/Server.tsx":()=>__vitePreload(()=>import("./Server-Bfkkjui1-lBan_3Dm.js"),[]),"../../../assets/icon-components/Settings.tsx":()=>__vitePreload(()=>import("./Settings-mbbylBS5-Cca-sV-_.js"),[]),"../../../assets/icon-components/Synced.tsx":()=>__vitePreload(()=>import("./Synced-DKJXzPiw-Cui8pDsS.js"),[]),"../../../assets/icon-components/Syncing.tsx":()=>__vitePreload(()=>import("./Syncing-aT9WSMFf-2VhhyCcX.js"),[]),"../../../assets/icon-components/Trash.tsx":()=>__vitePreload(()=>import("./Trash-CgSbHk-P-DIYkVMER.js"),[]),"../../../assets/icon-components/TrashFill.tsx":()=>__vitePreload(()=>import("./TrashFill-DN50ercb-Oqx67xXN.js"),[]),"../../../assets/icon-components/TreeViewSlash.tsx":()=>__vitePreload(()=>import("./TreeViewSlash-BywCsx5o-CUTTXZi-.js"),[]),"../../../assets/icon-components/TriangleDown.tsx":()=>__vitePreload(()=>import("./TriangleDown-eCXwUfu8-F-V79AL3.js"),[]),"../../../assets/icon-components/VariantArrowLeft.tsx":()=>__vitePreload(()=>import("./VariantArrowLeft-CnuX59_e-6Zt_Q3tm.js"),[]),"../../../assets/icon-components/VerticalDots.tsx":()=>__vitePreload(()=>import("./VerticalDots-C8QYf7et-CCxZfvjq.js"),[]),"../../../assets/icon-components/WarningFill.tsx":()=>__vitePreload(()=>import("./WarningFill-WowAvi5P-D5XCckM6.js"),[]),"../../../assets/icon-components/XTwitter.tsx":()=>__vitePreload(()=>import("./XTwitter-k3Pt8itk-mvLk8TKx.js"),[]),"../../../assets/icon-components/Xmark.tsx":()=>__vitePreload(()=>import("./Xmark-8qnJCs2Y-CZ3t0Fap.js"),[]),"../../../assets/icon-components/XmarkLight.tsx":()=>__vitePreload(()=>import("./XmarkLight-GHzDR5_F-CloMvuzt.js"),[]),"../../../assets/icon-components/Youtube.tsx":()=>__vitePreload(()=>import("./Youtube-i8V0IXUU-Bkiwoayp.js"),[])}),`../../../assets/icon-components/${Ws}.tsx`,6))}catch(ws){return console.error(ws),Aa}}function Kd({name:Ws,size:ws=24,color:oi,style:si,...ii}){const ai=Sa(ws),li={color:oi,...ai,style:si},ci=useMemo(()=>Ra(Ws),[Ws]);return jsx(Suspense,{fallback:jsx("div",{"data-testid":"icon-fallback",style:ai}),name:"icon-component",children:jsx(ci,{...ii,style:li})})}const Ma=["top","right","bottom","left"],je$2=Math.min,ve$2=Math.max,Xt$1=Math.round,Ft$2=Math.floor,ke$2=Ws=>({x:Ws,y:Ws}),_a$1={left:"right",right:"left",bottom:"top",top:"bottom"},Pa={start:"end",end:"start"};function Dn$2(Ws,ws,oi){return ve$2(Ws,je$2(ws,oi))}function Ne$1(Ws,ws){return typeof Ws=="function"?Ws(ws):Ws}function Le$2(Ws){return Ws.split("-")[0]}function lt$2(Ws){return Ws.split("-")[1]}function Kn$2(Ws){return Ws==="x"?"y":"x"}function Yn$2(Ws){return Ws==="y"?"height":"width"}function He$2(Ws){return["top","bottom"].includes(Le$2(Ws))?"y":"x"}function Xn$1(Ws){return Kn$2(He$2(Ws))}function Ta(Ws,ws,oi){oi===void 0&&(oi=!1);const si=lt$2(Ws),ii=Xn$1(Ws),ai=Yn$2(ii);let li=ii==="x"?si===(oi?"end":"start")?"right":"left":si==="start"?"bottom":"top";return ws.reference[ai]>ws.floating[ai]&&(li=qt$1(li)),[li,qt$1(li)]}function ka(Ws){const ws=qt$1(Ws);return[In$2(Ws),ws,In$2(ws)]}function In$2(Ws){return Ws.replace(/start|end/g,ws=>Pa[ws])}function Oa(Ws,ws,oi){const si=["left","right"],ii=["right","left"],ai=["top","bottom"],li=["bottom","top"];switch(Ws){case"top":case"bottom":return oi?ws?ii:si:ws?si:ii;case"left":case"right":return ws?ai:li;default:return[]}}function Da(Ws,ws,oi,si){const ii=lt$2(Ws);let ai=Oa(Le$2(Ws),oi==="start",si);return ii&&(ai=ai.map(li=>li+"-"+ii),ws&&(ai=ai.concat(ai.map(In$2)))),ai}function qt$1(Ws){return Ws.replace(/left|right|bottom|top/g,ws=>_a$1[ws])}function Ia(Ws){return{top:0,right:0,bottom:0,left:0,...Ws}}function Mo(Ws){return typeof Ws!="number"?Ia(Ws):{top:Ws,right:Ws,bottom:Ws,left:Ws}}function Zt$1(Ws){const{x:ws,y:oi,width:si,height:ii}=Ws;return{width:si,height:ii,top:oi,left:ws,right:ws+si,bottom:oi+ii,x:ws,y:oi}}function Dr$1(Ws,ws,oi){let{reference:si,floating:ii}=Ws;const ai=He$2(ws),li=Xn$1(ws),ci=Yn$2(li),ui=Le$2(ws),di=ai==="y",hi=si.x+si.width/2-ii.width/2,pi=si.y+si.height/2-ii.height/2,ha=si[ci]/2-ii[ci]/2;let ga;switch(ui){case"top":ga={x:hi,y:si.y-ii.height};break;case"bottom":ga={x:hi,y:si.y+si.height};break;case"right":ga={x:si.x+si.width,y:pi};break;case"left":ga={x:si.x-ii.width,y:pi};break;default:ga={x:si.x,y:si.y}}switch(lt$2(ws)){case"start":ga[li]-=ha*(oi&&di?-1:1);break;case"end":ga[li]+=ha*(oi&&di?-1:1);break}return ga}const Fa=async(Ws,ws,oi)=>{const{placement:si="bottom",strategy:ii="absolute",middleware:ai=[],platform:li}=oi,ci=ai.filter(Boolean),ui=await(li.isRTL==null?void 0:li.isRTL(ws));let di=await li.getElementRects({reference:Ws,floating:ws,strategy:ii}),{x:hi,y:pi}=Dr$1(di,si,ui),ha=si,ga={},va=0;for(let ba=0;ba<ci.length;ba++){const{name:wa,fn:xa}=ci[ba],{x:Ca,y:el,data:ku,reset:gd}=await xa({x:hi,y:pi,initialPlacement:si,placement:ha,strategy:ii,middlewareData:ga,rects:di,platform:li,elements:{reference:Ws,floating:ws}});hi=Ca??hi,pi=el??pi,ga={...ga,[wa]:{...ga[wa],...ku}},gd&&va<=50&&(va++,typeof gd=="object"&&(gd.placement&&(ha=gd.placement),gd.rects&&(di=gd.rects===!0?await li.getElementRects({reference:Ws,floating:ws,strategy:ii}):gd.rects),{x:hi,y:pi}=Dr$1(di,ha,ui)),ba=-1)}return{x:hi,y:pi,placement:ha,strategy:ii,middlewareData:ga}};async function Et$2(Ws,ws){var oi;ws===void 0&&(ws={});const{x:si,y:ii,platform:ai,rects:li,elements:ci,strategy:ui}=Ws,{boundary:di="clippingAncestors",rootBoundary:hi="viewport",elementContext:pi="floating",altBoundary:ha=!1,padding:ga=0}=Ne$1(ws,Ws),va=Mo(ga),ba=ci[ha?pi==="floating"?"reference":"floating":pi],wa=Zt$1(await ai.getClippingRect({element:(oi=await(ai.isElement==null?void 0:ai.isElement(ba)))==null||oi?ba:ba.contextElement||await(ai.getDocumentElement==null?void 0:ai.getDocumentElement(ci.floating)),boundary:di,rootBoundary:hi,strategy:ui})),xa=pi==="floating"?{x:si,y:ii,width:li.floating.width,height:li.floating.height}:li.reference,Ca=await(ai.getOffsetParent==null?void 0:ai.getOffsetParent(ci.floating)),el=await(ai.isElement==null?void 0:ai.isElement(Ca))?await(ai.getScale==null?void 0:ai.getScale(Ca))||{x:1,y:1}:{x:1,y:1},ku=Zt$1(ai.convertOffsetParentRelativeRectToViewportRelativeRect?await ai.convertOffsetParentRelativeRectToViewportRelativeRect({elements:ci,rect:xa,offsetParent:Ca,strategy:ui}):xa);return{top:(wa.top-ku.top+va.top)/el.y,bottom:(ku.bottom-wa.bottom+va.bottom)/el.y,left:(wa.left-ku.left+va.left)/el.x,right:(ku.right-wa.right+va.right)/el.x}}const Na=Ws=>({name:"arrow",options:Ws,async fn(ws){const{x:oi,y:si,placement:ii,rects:ai,platform:li,elements:ci,middlewareData:ui}=ws,{element:di,padding:hi=0}=Ne$1(Ws,ws)||{};if(di==null)return{};const pi=Mo(hi),ha={x:oi,y:si},ga=Xn$1(ii),va=Yn$2(ga),ba=await li.getDimensions(di),wa=ga==="y",xa=wa?"top":"left",Ca=wa?"bottom":"right",el=wa?"clientHeight":"clientWidth",ku=ai.reference[va]+ai.reference[ga]-ha[ga]-ai.floating[va],gd=ha[ga]-ai.reference[ga],Ed=await(li.getOffsetParent==null?void 0:li.getOffsetParent(di));let Od=Ed?Ed[el]:0;(!Od||!await(li.isElement==null?void 0:li.isElement(Ed)))&&(Od=ci.floating[el]||ai.floating[va]);const Nd=ku/2-gd/2,Pd=Od/2-ba[va]/2-1,Ld=je$2(pi[xa],Pd),rf=je$2(pi[Ca],Pd),_d=Ld,Md=Od-ba[va]-rf,Td=Od/2-ba[va]/2+Nd,wd=Dn$2(_d,Td,Md),Cd=!ui.arrow&<$2(ii)!=null&&Td!==wd&&ai.reference[va]/2-(Td<_d?Ld:rf)-ba[va]/2<0,sf=Cd?Td<_d?Td-_d:Td-Md:0;return{[ga]:ha[ga]+sf,data:{[ga]:wd,centerOffset:Td-wd-sf,...Cd&&{alignmentOffset:sf}},reset:Cd}}}),La=function(Ws){return Ws===void 0&&(Ws={}),{name:"flip",options:Ws,async fn(ws){var oi,si;const{placement:ii,middlewareData:ai,rects:li,initialPlacement:ci,platform:ui,elements:di}=ws,{mainAxis:hi=!0,crossAxis:pi=!0,fallbackPlacements:ha,fallbackStrategy:ga="bestFit",fallbackAxisSideDirection:va="none",flipAlignment:ba=!0,...wa}=Ne$1(Ws,ws);if((oi=ai.arrow)!=null&&oi.alignmentOffset)return{};const xa=Le$2(ii),Ca=He$2(ci),el=Le$2(ci)===ci,ku=await(ui.isRTL==null?void 0:ui.isRTL(di.floating)),gd=ha||(el||!ba?[qt$1(ci)]:ka(ci)),Ed=va!=="none";!ha&&Ed&&gd.push(...Da(ci,ba,va,ku));const Od=[ci,...gd],Nd=await Et$2(ws,wa),Pd=[];let Ld=((si=ai.flip)==null?void 0:si.overflows)||[];if(hi&&Pd.push(Nd[xa]),pi){const Td=Ta(ii,li,ku);Pd.push(Nd[Td[0]],Nd[Td[1]])}if(Ld=[...Ld,{placement:ii,overflows:Pd}],!Pd.every(Td=>Td<=0)){var rf,_d;const Td=(((rf=ai.flip)==null?void 0:rf.index)||0)+1,wd=Od[Td];if(wd)return{data:{index:Td,overflows:Ld},reset:{placement:wd}};let Cd=(_d=Ld.filter(sf=>sf.overflows[0]<=0).sort((sf,of)=>sf.overflows[1]-of.overflows[1])[0])==null?void 0:_d.placement;if(!Cd)switch(ga){case"bestFit":{var Md;const sf=(Md=Ld.filter(of=>{if(Ed){const Wd=He$2(of.placement);return Wd===Ca||Wd==="y"}return!0}).map(of=>[of.placement,of.overflows.filter(Wd=>Wd>0).reduce((Wd,df)=>Wd+df,0)]).sort((of,Wd)=>of[1]-Wd[1])[0])==null?void 0:Md[0];sf&&(Cd=sf);break}case"initialPlacement":Cd=ci;break}if(ii!==Cd)return{reset:{placement:Cd}}}return{}}}};function Ir$1(Ws,ws){return{top:Ws.top-ws.height,right:Ws.right-ws.width,bottom:Ws.bottom-ws.height,left:Ws.left-ws.width}}function Fr$2(Ws){return Ma.some(ws=>Ws[ws]>=0)}const Va=function(Ws){return Ws===void 0&&(Ws={}),{name:"hide",options:Ws,async fn(ws){const{rects:oi}=ws,{strategy:si="referenceHidden",...ii}=Ne$1(Ws,ws);switch(si){case"referenceHidden":{const ai=await Et$2(ws,{...ii,elementContext:"reference"}),li=Ir$1(ai,oi.reference);return{data:{referenceHiddenOffsets:li,referenceHidden:Fr$2(li)}}}case"escaped":{const ai=await Et$2(ws,{...ii,altBoundary:!0}),li=Ir$1(ai,oi.floating);return{data:{escapedOffsets:li,escaped:Fr$2(li)}}}default:return{}}}}};async function Ba(Ws,ws){const{placement:oi,platform:si,elements:ii}=Ws,ai=await(si.isRTL==null?void 0:si.isRTL(ii.floating)),li=Le$2(oi),ci=lt$2(oi),ui=He$2(oi)==="y",di=["left","top"].includes(li)?-1:1,hi=ai&&ui?-1:1,pi=Ne$1(ws,Ws);let{mainAxis:ha,crossAxis:ga,alignmentAxis:va}=typeof pi=="number"?{mainAxis:pi,crossAxis:0,alignmentAxis:null}:{mainAxis:pi.mainAxis||0,crossAxis:pi.crossAxis||0,alignmentAxis:pi.alignmentAxis};return ci&&typeof va=="number"&&(ga=ci==="end"?va*-1:va),ui?{x:ga*hi,y:ha*di}:{x:ha*di,y:ga*hi}}const Ua=function(Ws){return Ws===void 0&&(Ws=0),{name:"offset",options:Ws,async fn(ws){var oi,si;const{x:ii,y:ai,placement:li,middlewareData:ci}=ws,ui=await Ba(ws,Ws);return li===((oi=ci.offset)==null?void 0:oi.placement)&&(si=ci.arrow)!=null&&si.alignmentOffset?{}:{x:ii+ui.x,y:ai+ui.y,data:{...ui,placement:li}}}}},Wa=function(Ws){return Ws===void 0&&(Ws={}),{name:"shift",options:Ws,async fn(ws){const{x:oi,y:si,placement:ii}=ws,{mainAxis:ai=!0,crossAxis:li=!1,limiter:ci={fn:wa=>{let{x:xa,y:Ca}=wa;return{x:xa,y:Ca}}},...ui}=Ne$1(Ws,ws),di={x:oi,y:si},hi=await Et$2(ws,ui),pi=He$2(Le$2(ii)),ha=Kn$2(pi);let ga=di[ha],va=di[pi];if(ai){const wa=ha==="y"?"top":"left",xa=ha==="y"?"bottom":"right",Ca=ga+hi[wa],el=ga-hi[xa];ga=Dn$2(Ca,ga,el)}if(li){const wa=pi==="y"?"top":"left",xa=pi==="y"?"bottom":"right",Ca=va+hi[wa],el=va-hi[xa];va=Dn$2(Ca,va,el)}const ba=ci.fn({...ws,[ha]:ga,[pi]:va});return{...ba,data:{x:ba.x-oi,y:ba.y-si,enabled:{[ha]:ai,[pi]:li}}}}}},$a=function(Ws){return Ws===void 0&&(Ws={}),{options:Ws,fn(ws){const{x:oi,y:si,placement:ii,rects:ai,middlewareData:li}=ws,{offset:ci=0,mainAxis:ui=!0,crossAxis:di=!0}=Ne$1(Ws,ws),hi={x:oi,y:si},pi=He$2(ii),ha=Kn$2(pi);let ga=hi[ha],va=hi[pi];const ba=Ne$1(ci,ws),wa=typeof ba=="number"?{mainAxis:ba,crossAxis:0}:{mainAxis:0,crossAxis:0,...ba};if(ui){const el=ha==="y"?"height":"width",ku=ai.reference[ha]-ai.floating[el]+wa.mainAxis,gd=ai.reference[ha]+ai.reference[el]-wa.mainAxis;ga<ku?ga=ku:ga>gd&&(ga=gd)}if(di){var xa,Ca;const el=ha==="y"?"width":"height",ku=["top","left"].includes(Le$2(ii)),gd=ai.reference[pi]-ai.floating[el]+(ku&&((xa=li.offset)==null?void 0:xa[pi])||0)+(ku?0:wa.crossAxis),Ed=ai.reference[pi]+ai.reference[el]+(ku?0:((Ca=li.offset)==null?void 0:Ca[pi])||0)-(ku?wa.crossAxis:0);va<gd?va=gd:va>Ed&&(va=Ed)}return{[ha]:ga,[pi]:va}}}},za=function(Ws){return Ws===void 0&&(Ws={}),{name:"size",options:Ws,async fn(ws){var oi,si;const{placement:ii,rects:ai,platform:li,elements:ci}=ws,{apply:ui=()=>{},...di}=Ne$1(Ws,ws),hi=await Et$2(ws,di),pi=Le$2(ii),ha=lt$2(ii),ga=He$2(ii)==="y",{width:va,height:ba}=ai.floating;let wa,xa;pi==="top"||pi==="bottom"?(wa=pi,xa=ha===(await(li.isRTL==null?void 0:li.isRTL(ci.floating))?"start":"end")?"left":"right"):(xa=pi,wa=ha==="end"?"top":"bottom");const Ca=ba-hi.top-hi.bottom,el=va-hi.left-hi.right,ku=je$2(ba-hi[wa],Ca),gd=je$2(va-hi[xa],el),Ed=!ws.middlewareData.shift;let Od=ku,Nd=gd;if((oi=ws.middlewareData.shift)!=null&&oi.enabled.x&&(Nd=el),(si=ws.middlewareData.shift)!=null&&si.enabled.y&&(Od=Ca),Ed&&!ha){const Ld=ve$2(hi.left,0),rf=ve$2(hi.right,0),_d=ve$2(hi.top,0),Md=ve$2(hi.bottom,0);ga?Nd=va-2*(Ld!==0||rf!==0?Ld+rf:ve$2(hi.left,hi.right)):Od=ba-2*(_d!==0||Md!==0?_d+Md:ve$2(hi.top,hi.bottom))}await ui({...ws,availableWidth:Nd,availableHeight:Od});const Pd=await li.getDimensions(ci.floating);return va!==Pd.width||ba!==Pd.height?{reset:{rects:!0}}:{}}}};function on$1(){return typeof window<"u"}function ut$1(Ws){return _o(Ws)?(Ws.nodeName||"").toLowerCase():"#document"}function ye$2(Ws){var ws;return(Ws==null||(ws=Ws.ownerDocument)==null?void 0:ws.defaultView)||window}function De$2(Ws){var ws;return(ws=(_o(Ws)?Ws.ownerDocument:Ws.document)||window.document)==null?void 0:ws.documentElement}function _o(Ws){return on$1()?Ws instanceof Node||Ws instanceof ye$2(Ws).Node:!1}function Ce$2(Ws){return on$1()?Ws instanceof Element||Ws instanceof ye$2(Ws).Element:!1}function Oe$2(Ws){return on$1()?Ws instanceof HTMLElement||Ws instanceof ye$2(Ws).HTMLElement:!1}function Nr$2(Ws){return!on$1()||typeof ShadowRoot>"u"?!1:Ws instanceof ShadowRoot||Ws instanceof ye$2(Ws).ShadowRoot}function Tt$1(Ws){const{overflow:ws,overflowX:oi,overflowY:si,display:ii}=Se$2(Ws);return/auto|scroll|overlay|hidden|clip/.test(ws+si+oi)&&!["inline","contents"].includes(ii)}function Ga(Ws){return["table","td","th"].includes(ut$1(Ws))}function sn$1(Ws){return[":popover-open",":modal"].some(ws=>{try{return Ws.matches(ws)}catch{return!1}})}function qn$2(Ws){const ws=Zn$1(),oi=Ce$2(Ws)?Se$2(Ws):Ws;return["transform","translate","scale","rotate","perspective"].some(si=>oi[si]?oi[si]!=="none":!1)||(oi.containerType?oi.containerType!=="normal":!1)||!ws&&(oi.backdropFilter?oi.backdropFilter!=="none":!1)||!ws&&(oi.filter?oi.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(si=>(oi.willChange||"").includes(si))||["paint","layout","strict","content"].some(si=>(oi.contain||"").includes(si))}function ja(Ws){let ws=Ke$2(Ws);for(;Oe$2(ws)&&!at$2(ws);){if(qn$2(ws))return ws;if(sn$1(ws))return null;ws=Ke$2(ws)}return null}function Zn$1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function at$2(Ws){return["html","body","#document"].includes(ut$1(Ws))}function Se$2(Ws){return ye$2(Ws).getComputedStyle(Ws)}function an$1(Ws){return Ce$2(Ws)?{scrollLeft:Ws.scrollLeft,scrollTop:Ws.scrollTop}:{scrollLeft:Ws.scrollX,scrollTop:Ws.scrollY}}function Ke$2(Ws){if(ut$1(Ws)==="html")return Ws;const ws=Ws.assignedSlot||Ws.parentNode||Nr$2(Ws)&&Ws.host||De$2(Ws);return Nr$2(ws)?ws.host:ws}function Po(Ws){const ws=Ke$2(Ws);return at$2(ws)?Ws.ownerDocument?Ws.ownerDocument.body:Ws.body:Oe$2(ws)&&Tt$1(ws)?ws:Po(ws)}function At$2(Ws,ws,oi){var si;ws===void 0&&(ws=[]),oi===void 0&&(oi=!0);const ii=Po(Ws),ai=ii===((si=Ws.ownerDocument)==null?void 0:si.body),li=ye$2(ii);if(ai){const ci=Fn$2(li);return ws.concat(li,li.visualViewport||[],Tt$1(ii)?ii:[],ci&&oi?At$2(ci):[])}return ws.concat(ii,At$2(ii,[],oi))}function Fn$2(Ws){return Ws.parent&&Object.getPrototypeOf(Ws.parent)?Ws.frameElement:null}function To(Ws){const ws=Se$2(Ws);let oi=parseFloat(ws.width)||0,si=parseFloat(ws.height)||0;const ii=Oe$2(Ws),ai=ii?Ws.offsetWidth:oi,li=ii?Ws.offsetHeight:si,ci=Xt$1(oi)!==ai||Xt$1(si)!==li;return ci&&(oi=ai,si=li),{width:oi,height:si,$:ci}}function Qn$2(Ws){return Ce$2(Ws)?Ws:Ws.contextElement}function st$1(Ws){const ws=Qn$2(Ws);if(!Oe$2(ws))return ke$2(1);const oi=ws.getBoundingClientRect(),{width:si,height:ii,$:ai}=To(ws);let li=(ai?Xt$1(oi.width):oi.width)/si,ci=(ai?Xt$1(oi.height):oi.height)/ii;return(!li||!Number.isFinite(li))&&(li=1),(!ci||!Number.isFinite(ci))&&(ci=1),{x:li,y:ci}}const Ha=ke$2(0);function ko(Ws){const ws=ye$2(Ws);return!Zn$1()||!ws.visualViewport?Ha:{x:ws.visualViewport.offsetLeft,y:ws.visualViewport.offsetTop}}function Ka(Ws,ws,oi){return ws===void 0&&(ws=!1),!oi||ws&&oi!==ye$2(Ws)?!1:ws}function qe$1(Ws,ws,oi,si){ws===void 0&&(ws=!1),oi===void 0&&(oi=!1);const ii=Ws.getBoundingClientRect(),ai=Qn$2(Ws);let li=ke$2(1);ws&&(si?Ce$2(si)&&(li=st$1(si)):li=st$1(Ws));const ci=Ka(ai,oi,si)?ko(ai):ke$2(0);let ui=(ii.left+ci.x)/li.x,di=(ii.top+ci.y)/li.y,hi=ii.width/li.x,pi=ii.height/li.y;if(ai){const ha=ye$2(ai),ga=si&&Ce$2(si)?ye$2(si):si;let va=ha,ba=Fn$2(va);for(;ba&&si&&ga!==va;){const wa=st$1(ba),xa=ba.getBoundingClientRect(),Ca=Se$2(ba),el=xa.left+(ba.clientLeft+parseFloat(Ca.paddingLeft))*wa.x,ku=xa.top+(ba.clientTop+parseFloat(Ca.paddingTop))*wa.y;ui*=wa.x,di*=wa.y,hi*=wa.x,pi*=wa.y,ui+=el,di+=ku,va=ye$2(ba),ba=Fn$2(va)}}return Zt$1({width:hi,height:pi,x:ui,y:di})}function Jn$2(Ws,ws){const oi=an$1(Ws).scrollLeft;return ws?ws.left+oi:qe$1(De$2(Ws)).left+oi}function Oo(Ws,ws,oi){oi===void 0&&(oi=!1);const si=Ws.getBoundingClientRect(),ii=si.left+ws.scrollLeft-(oi?0:Jn$2(Ws,si)),ai=si.top+ws.scrollTop;return{x:ii,y:ai}}function Ya(Ws){let{elements:ws,rect:oi,offsetParent:si,strategy:ii}=Ws;const ai=ii==="fixed",li=De$2(si),ci=ws?sn$1(ws.floating):!1;if(si===li||ci&&ai)return oi;let ui={scrollLeft:0,scrollTop:0},di=ke$2(1);const hi=ke$2(0),pi=Oe$2(si);if((pi||!pi&&!ai)&&((ut$1(si)!=="body"||Tt$1(li))&&(ui=an$1(si)),Oe$2(si))){const ga=qe$1(si);di=st$1(si),hi.x=ga.x+si.clientLeft,hi.y=ga.y+si.clientTop}const ha=li&&!pi&&!ai?Oo(li,ui,!0):ke$2(0);return{width:oi.width*di.x,height:oi.height*di.y,x:oi.x*di.x-ui.scrollLeft*di.x+hi.x+ha.x,y:oi.y*di.y-ui.scrollTop*di.y+hi.y+ha.y}}function Xa(Ws){return Array.from(Ws.getClientRects())}function qa(Ws){const ws=De$2(Ws),oi=an$1(Ws),si=Ws.ownerDocument.body,ii=ve$2(ws.scrollWidth,ws.clientWidth,si.scrollWidth,si.clientWidth),ai=ve$2(ws.scrollHeight,ws.clientHeight,si.scrollHeight,si.clientHeight);let li=-oi.scrollLeft+Jn$2(Ws);const ci=-oi.scrollTop;return Se$2(si).direction==="rtl"&&(li+=ve$2(ws.clientWidth,si.clientWidth)-ii),{width:ii,height:ai,x:li,y:ci}}function Za$1(Ws,ws){const oi=ye$2(Ws),si=De$2(Ws),ii=oi.visualViewport;let ai=si.clientWidth,li=si.clientHeight,ci=0,ui=0;if(ii){ai=ii.width,li=ii.height;const di=Zn$1();(!di||di&&ws==="fixed")&&(ci=ii.offsetLeft,ui=ii.offsetTop)}return{width:ai,height:li,x:ci,y:ui}}function Qa$1(Ws,ws){const oi=qe$1(Ws,!0,ws==="fixed"),si=oi.top+Ws.clientTop,ii=oi.left+Ws.clientLeft,ai=Oe$2(Ws)?st$1(Ws):ke$2(1),li=Ws.clientWidth*ai.x,ci=Ws.clientHeight*ai.y,ui=ii*ai.x,di=si*ai.y;return{width:li,height:ci,x:ui,y:di}}function Lr$2(Ws,ws,oi){let si;if(ws==="viewport")si=Za$1(Ws,oi);else if(ws==="document")si=qa(De$2(Ws));else if(Ce$2(ws))si=Qa$1(ws,oi);else{const ii=ko(Ws);si={x:ws.x-ii.x,y:ws.y-ii.y,width:ws.width,height:ws.height}}return Zt$1(si)}function Do$1(Ws,ws){const oi=Ke$2(Ws);return oi===ws||!Ce$2(oi)||at$2(oi)?!1:Se$2(oi).position==="fixed"||Do$1(oi,ws)}function Ja$1(Ws,ws){const oi=ws.get(Ws);if(oi)return oi;let si=At$2(Ws,[],!1).filter(ci=>Ce$2(ci)&&ut$1(ci)!=="body"),ii=null;const ai=Se$2(Ws).position==="fixed";let li=ai?Ke$2(Ws):Ws;for(;Ce$2(li)&&!at$2(li);){const ci=Se$2(li),ui=qn$2(li);!ui&&ci.position==="fixed"&&(ii=null),(ai?!ui&&!ii:!ui&&ci.position==="static"&&ii&&["absolute","fixed"].includes(ii.position)||Tt$1(li)&&!ui&&Do$1(Ws,li))?si=si.filter(di=>di!==li):ii=ci,li=Ke$2(li)}return ws.set(Ws,si),si}function ec(Ws){let{element:ws,boundary:oi,rootBoundary:si,strategy:ii}=Ws;const ai=[...oi==="clippingAncestors"?sn$1(ws)?[]:Ja$1(ws,this._c):[].concat(oi),si],li=ai[0],ci=ai.reduce((ui,di)=>{const hi=Lr$2(ws,di,ii);return ui.top=ve$2(hi.top,ui.top),ui.right=je$2(hi.right,ui.right),ui.bottom=je$2(hi.bottom,ui.bottom),ui.left=ve$2(hi.left,ui.left),ui},Lr$2(ws,li,ii));return{width:ci.right-ci.left,height:ci.bottom-ci.top,x:ci.left,y:ci.top}}function tc(Ws){const{width:ws,height:oi}=To(Ws);return{width:ws,height:oi}}function nc(Ws,ws,oi){const si=Oe$2(ws),ii=De$2(ws),ai=oi==="fixed",li=qe$1(Ws,!0,ai,ws);let ci={scrollLeft:0,scrollTop:0};const ui=ke$2(0);if(si||!si&&!ai)if((ut$1(ws)!=="body"||Tt$1(ii))&&(ci=an$1(ws)),si){const ha=qe$1(ws,!0,ai,ws);ui.x=ha.x+ws.clientLeft,ui.y=ha.y+ws.clientTop}else ii&&(ui.x=Jn$2(ii));const di=ii&&!si&&!ai?Oo(ii,ci):ke$2(0),hi=li.left+ci.scrollLeft-ui.x-di.x,pi=li.top+ci.scrollTop-ui.y-di.y;return{x:hi,y:pi,width:li.width,height:li.height}}function wn$1(Ws){return Se$2(Ws).position==="static"}function Vr$2(Ws,ws){if(!Oe$2(Ws)||Se$2(Ws).position==="fixed")return null;if(ws)return ws(Ws);let oi=Ws.offsetParent;return De$2(Ws)===oi&&(oi=oi.ownerDocument.body),oi}function Io(Ws,ws){const oi=ye$2(Ws);if(sn$1(Ws))return oi;if(!Oe$2(Ws)){let ii=Ke$2(Ws);for(;ii&&!at$2(ii);){if(Ce$2(ii)&&!wn$1(ii))return ii;ii=Ke$2(ii)}return oi}let si=Vr$2(Ws,ws);for(;si&&Ga(si)&&wn$1(si);)si=Vr$2(si,ws);return si&&at$2(si)&&wn$1(si)&&!qn$2(si)?oi:si||ja(Ws)||oi}const rc=async function(Ws){const ws=this.getOffsetParent||Io,oi=this.getDimensions,si=await oi(Ws.floating);return{reference:nc(Ws.reference,await ws(Ws.floating),Ws.strategy),floating:{x:0,y:0,width:si.width,height:si.height}}};function oc(Ws){return Se$2(Ws).direction==="rtl"}const sc={convertOffsetParentRelativeRectToViewportRelativeRect:Ya,getDocumentElement:De$2,getClippingRect:ec,getOffsetParent:Io,getElementRects:rc,getClientRects:Xa,getDimensions:tc,getScale:st$1,isElement:Ce$2,isRTL:oc};function Fo(Ws,ws){return Ws.x===ws.x&&Ws.y===ws.y&&Ws.width===ws.width&&Ws.height===ws.height}function ic(Ws,ws){let oi=null,si;const ii=De$2(Ws);function ai(){var ci;clearTimeout(si),(ci=oi)==null||ci.disconnect(),oi=null}function li(ci,ui){ci===void 0&&(ci=!1),ui===void 0&&(ui=1),ai();const di=Ws.getBoundingClientRect(),{left:hi,top:pi,width:ha,height:ga}=di;if(ci||ws(),!ha||!ga)return;const va=Ft$2(pi),ba=Ft$2(ii.clientWidth-(hi+ha)),wa=Ft$2(ii.clientHeight-(pi+ga)),xa=Ft$2(hi),Ca={rootMargin:-va+"px "+-ba+"px "+-wa+"px "+-xa+"px",threshold:ve$2(0,je$2(1,ui))||1};let el=!0;function ku(gd){const Ed=gd[0].intersectionRatio;if(Ed!==ui){if(!el)return li();Ed?li(!1,Ed):si=setTimeout(()=>{li(!1,1e-7)},1e3)}Ed===1&&!Fo(di,Ws.getBoundingClientRect())&&li(),el=!1}try{oi=new IntersectionObserver(ku,{...Ca,root:ii.ownerDocument})}catch{oi=new IntersectionObserver(ku,Ca)}oi.observe(Ws)}return li(!0),ai}function ac(Ws,ws,oi,si){si===void 0&&(si={});const{ancestorScroll:ii=!0,ancestorResize:ai=!0,elementResize:li=typeof ResizeObserver=="function",layoutShift:ci=typeof IntersectionObserver=="function",animationFrame:ui=!1}=si,di=Qn$2(Ws),hi=ii||ai?[...di?At$2(di):[],...At$2(ws)]:[];hi.forEach(xa=>{ii&&xa.addEventListener("scroll",oi,{passive:!0}),ai&&xa.addEventListener("resize",oi)});const pi=di&&ci?ic(di,oi):null;let ha=-1,ga=null;li&&(ga=new ResizeObserver(xa=>{let[Ca]=xa;Ca&&Ca.target===di&&ga&&(ga.unobserve(ws),cancelAnimationFrame(ha),ha=requestAnimationFrame(()=>{var el;(el=ga)==null||el.observe(ws)})),oi()}),di&&!ui&&ga.observe(di),ga.observe(ws));let va,ba=ui?qe$1(Ws):null;ui&&wa();function wa(){const xa=qe$1(Ws);ba&&!Fo(ba,xa)&&oi(),ba=xa,va=requestAnimationFrame(wa)}return oi(),()=>{var xa;hi.forEach(Ca=>{ii&&Ca.removeEventListener("scroll",oi),ai&&Ca.removeEventListener("resize",oi)}),pi==null||pi(),(xa=ga)==null||xa.disconnect(),ga=null,ui&&cancelAnimationFrame(va)}}const cc=Ua,lc=Wa,uc=La,dc=za,fc=Va,Br$2=Na,pc=$a,mc=(Ws,ws,oi)=>{const si=new Map,ii={platform:sc,...oi},ai={...ii.platform,_c:si};return Fa(Ws,ws,{...ii,platform:ai})};function Y$2(Ws,ws,{checkForDefaultPrevented:oi=!0}={}){return function(si){if(Ws==null||Ws(si),oi===!1||!si.defaultPrevented)return ws==null?void 0:ws(si)}}function dt$2(Ws,ws=[]){let oi=[];function si(ai,li){const ci=React.createContext(li),ui=oi.length;oi=[...oi,li];const di=pi=>{var ha;const{scope:ga,children:va,...ba}=pi,wa=((ha=ga==null?void 0:ga[Ws])==null?void 0:ha[ui])||ci,xa=React.useMemo(()=>ba,Object.values(ba));return jsx(wa.Provider,{value:xa,children:va})};di.displayName=ai+"Provider";function hi(pi,ha){var ga;const va=((ga=ha==null?void 0:ha[Ws])==null?void 0:ga[ui])||ci,ba=React.useContext(va);if(ba)return ba;if(li!==void 0)return li;throw new Error(`\`${pi}\` must be used within \`${ai}\``)}return[di,hi]}const ii=()=>{const ai=oi.map(li=>React.createContext(li));return function(li){const ci=(li==null?void 0:li[Ws])||ai;return React.useMemo(()=>({[`__scope${Ws}`]:{...li,[Ws]:ci}}),[li,ci])}};return ii.scopeName=Ws,[si,hc(ii,...ws)]}function hc(...Ws){const ws=Ws[0];if(Ws.length===1)return ws;const oi=()=>{const si=Ws.map(ii=>({useScope:ii(),scopeName:ii.scopeName}));return function(ii){const ai=si.reduce((li,{useScope:ci,scopeName:ui})=>{const di=ci(ii)[`__scope${ui}`];return{...li,...di}},{});return React.useMemo(()=>({[`__scope${ws.scopeName}`]:ai}),[ai])}};return oi.scopeName=ws.scopeName,oi}function Ee$2(Ws){const ws=React.useRef(Ws);return React.useEffect(()=>{ws.current=Ws}),React.useMemo(()=>(...oi)=>{var si;return(si=ws.current)==null?void 0:si.call(ws,...oi)},[])}function er$1({prop:Ws,defaultProp:ws,onChange:oi=()=>{}}){const[si,ii]=gc({defaultProp:ws,onChange:oi}),ai=Ws!==void 0,li=ai?Ws:si,ci=Ee$2(oi),ui=React.useCallback(di=>{if(ai){const hi=typeof di=="function"?di(Ws):di;hi!==Ws&&ci(hi)}else ii(di)},[ai,Ws,ii,ci]);return[li,ui]}function gc({defaultProp:Ws,onChange:ws}){const oi=React.useState(Ws),[si]=oi,ii=React.useRef(si),ai=Ee$2(ws);return React.useEffect(()=>{ii.current!==si&&(ai(si),ii.current=si)},[si,ii,ai]),oi}function No$1(Ws){const ws=Ws+"CollectionProvider",[oi,si]=dt$2(ws),[ii,ai]=oi(ws,{collectionRef:{current:null},itemMap:new Map}),li=ga=>{const{scope:va,children:ba}=ga,wa=React__default.useRef(null),xa=React__default.useRef(new Map).current;return jsx(ii,{scope:va,itemMap:xa,collectionRef:wa,children:ba})};li.displayName=ws;const ci=Ws+"CollectionSlot",ui=React__default.forwardRef((ga,va)=>{const{scope:ba,children:wa}=ga,xa=ai(ci,ba),Ca=ge$2(va,xa.collectionRef);return jsx(St$2,{ref:Ca,children:wa})});ui.displayName=ci;const di=Ws+"CollectionItemSlot",hi="data-radix-collection-item",pi=React__default.forwardRef((ga,va)=>{const{scope:ba,children:wa,...xa}=ga,Ca=React__default.useRef(null),el=ge$2(va,Ca),ku=ai(di,ba);return React__default.useEffect(()=>(ku.itemMap.set(Ca,{ref:Ca,...xa}),()=>void ku.itemMap.delete(Ca))),jsx(St$2,{[hi]:"",ref:el,children:wa})});pi.displayName=di;function ha(ga){const va=ai(Ws+"CollectionConsumer",ga);return React__default.useCallback(()=>{const ba=va.collectionRef.current;if(!ba)return[];const wa=Array.from(ba.querySelectorAll(`[${hi}]`));return Array.from(va.itemMap.values()).sort((xa,Ca)=>wa.indexOf(xa.ref.current)-wa.indexOf(Ca.ref.current))},[va.collectionRef,va.itemMap])}return[{Provider:li,Slot:ui,ItemSlot:pi},ha,si]}var vc=React.createContext(void 0);function tr$1(Ws){const ws=React.useContext(vc);return Ws||ws||"ltr"}function yc(Ws,ws=globalThis==null?void 0:globalThis.document){const oi=Ee$2(Ws);React.useEffect(()=>{const si=ii=>{ii.key==="Escape"&&oi(ii)};return ws.addEventListener("keydown",si,{capture:!0}),()=>ws.removeEventListener("keydown",si,{capture:!0})},[oi,ws])}var bc="DismissableLayer",Nn$2="dismissableLayer.update",wc="dismissableLayer.pointerDownOutside",xc="dismissableLayer.focusOutside",Ur$2,Lo=React.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vo$1=React.forwardRef((Ws,ws)=>{const{disableOutsidePointerEvents:oi=!1,onEscapeKeyDown:si,onPointerDownOutside:ii,onFocusOutside:ai,onInteractOutside:li,onDismiss:ci,...ui}=Ws,di=React.useContext(Lo),[hi,pi]=React.useState(null),ha=(hi==null?void 0:hi.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,ga]=React.useState({}),va=ge$2(ws,Od=>pi(Od)),ba=Array.from(di.layers),[wa]=[...di.layersWithOutsidePointerEventsDisabled].slice(-1),xa=ba.indexOf(wa),Ca=hi?ba.indexOf(hi):-1,el=di.layersWithOutsidePointerEventsDisabled.size>0,ku=Ca>=xa,gd=Ec(Od=>{const Nd=Od.target,Pd=[...di.branches].some(Ld=>Ld.contains(Nd));!ku||Pd||(ii==null||ii(Od),li==null||li(Od),Od.defaultPrevented||ci==null||ci())},ha),Ed=Ac(Od=>{const Nd=Od.target;[...di.branches].some(Pd=>Pd.contains(Nd))||(ai==null||ai(Od),li==null||li(Od),Od.defaultPrevented||ci==null||ci())},ha);return yc(Od=>{Ca===di.layers.size-1&&(si==null||si(Od),!Od.defaultPrevented&&ci&&(Od.preventDefault(),ci()))},ha),React.useEffect(()=>{if(hi)return oi&&(di.layersWithOutsidePointerEventsDisabled.size===0&&(Ur$2=ha.body.style.pointerEvents,ha.body.style.pointerEvents="none"),di.layersWithOutsidePointerEventsDisabled.add(hi)),di.layers.add(hi),Wr$2(),()=>{oi&&di.layersWithOutsidePointerEventsDisabled.size===1&&(ha.body.style.pointerEvents=Ur$2)}},[hi,ha,oi,di]),React.useEffect(()=>()=>{hi&&(di.layers.delete(hi),di.layersWithOutsidePointerEventsDisabled.delete(hi),Wr$2())},[hi,di]),React.useEffect(()=>{const Od=()=>ga({});return document.addEventListener(Nn$2,Od),()=>document.removeEventListener(Nn$2,Od)},[]),jsx(se$2.div,{...ui,ref:va,style:{pointerEvents:el?ku?"auto":"none":void 0,...Ws.style},onFocusCapture:Y$2(Ws.onFocusCapture,Ed.onFocusCapture),onBlurCapture:Y$2(Ws.onBlurCapture,Ed.onBlurCapture),onPointerDownCapture:Y$2(Ws.onPointerDownCapture,gd.onPointerDownCapture)})});Vo$1.displayName=bc;var Cc="DismissableLayerBranch",Sc=React.forwardRef((Ws,ws)=>{const oi=React.useContext(Lo),si=React.useRef(null),ii=ge$2(ws,si);return React.useEffect(()=>{const ai=si.current;if(ai)return oi.branches.add(ai),()=>{oi.branches.delete(ai)}},[oi.branches]),jsx(se$2.div,{...Ws,ref:ii})});Sc.displayName=Cc;function Ec(Ws,ws=globalThis==null?void 0:globalThis.document){const oi=Ee$2(Ws),si=React.useRef(!1),ii=React.useRef(()=>{});return React.useEffect(()=>{const ai=ci=>{if(ci.target&&!si.current){let ui=function(){Bo(wc,oi,di,{discrete:!0})};const di={originalEvent:ci};ci.pointerType==="touch"?(ws.removeEventListener("click",ii.current),ii.current=ui,ws.addEventListener("click",ii.current,{once:!0})):ui()}else ws.removeEventListener("click",ii.current);si.current=!1},li=window.setTimeout(()=>{ws.addEventListener("pointerdown",ai)},0);return()=>{window.clearTimeout(li),ws.removeEventListener("pointerdown",ai),ws.removeEventListener("click",ii.current)}},[ws,oi]),{onPointerDownCapture:()=>si.current=!0}}function Ac(Ws,ws=globalThis==null?void 0:globalThis.document){const oi=Ee$2(Ws),si=React.useRef(!1);return React.useEffect(()=>{const ii=ai=>{ai.target&&!si.current&&Bo(xc,oi,{originalEvent:ai},{discrete:!1})};return ws.addEventListener("focusin",ii),()=>ws.removeEventListener("focusin",ii)},[ws,oi]),{onFocusCapture:()=>si.current=!0,onBlurCapture:()=>si.current=!1}}function Wr$2(){const Ws=new CustomEvent(Nn$2);document.dispatchEvent(Ws)}function Bo(Ws,ws,oi,{discrete:si}){const ii=oi.originalEvent.target,ai=new CustomEvent(Ws,{bubbles:!1,cancelable:!0,detail:oi});ws&&ii.addEventListener(Ws,ws,{once:!0}),si?wo$1(ii,ai):ii.dispatchEvent(ai)}var xn$1=0;function Rc(){React.useEffect(()=>{const Ws=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",Ws[0]??$r$2()),document.body.insertAdjacentElement("beforeend",Ws[1]??$r$2()),xn$1++,()=>{xn$1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(ws=>ws.remove()),xn$1--}},[])}function $r$2(){const Ws=document.createElement("span");return Ws.setAttribute("data-radix-focus-guard",""),Ws.tabIndex=0,Ws.style.outline="none",Ws.style.opacity="0",Ws.style.position="fixed",Ws.style.pointerEvents="none",Ws}var Cn$2="focusScope.autoFocusOnMount",Sn$1="focusScope.autoFocusOnUnmount",zr$2={bubbles:!1,cancelable:!0},Mc="FocusScope",Uo$1=React.forwardRef((Ws,ws)=>{const{loop:oi=!1,trapped:si=!1,onMountAutoFocus:ii,onUnmountAutoFocus:ai,...li}=Ws,[ci,ui]=React.useState(null),di=Ee$2(ii),hi=Ee$2(ai),pi=React.useRef(null),ha=ge$2(ws,ba=>ui(ba)),ga=React.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;React.useEffect(()=>{if(si){let ba=function(el){if(ga.paused||!ci)return;const ku=el.target;ci.contains(ku)?pi.current=ku:ze$2(pi.current,{select:!0})},wa=function(el){if(ga.paused||!ci)return;const ku=el.relatedTarget;ku!==null&&(ci.contains(ku)||ze$2(pi.current,{select:!0}))},xa=function(el){if(document.activeElement===document.body)for(const ku of el)ku.removedNodes.length>0&&ze$2(ci)};document.addEventListener("focusin",ba),document.addEventListener("focusout",wa);const Ca=new MutationObserver(xa);return ci&&Ca.observe(ci,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",ba),document.removeEventListener("focusout",wa),Ca.disconnect()}}},[si,ci,ga.paused]),React.useEffect(()=>{if(ci){jr$2.add(ga);const ba=document.activeElement;if(!ci.contains(ba)){const wa=new CustomEvent(Cn$2,zr$2);ci.addEventListener(Cn$2,di),ci.dispatchEvent(wa),wa.defaultPrevented||(_c(Dc(Wo$1(ci)),{select:!0}),document.activeElement===ba&&ze$2(ci))}return()=>{ci.removeEventListener(Cn$2,di),setTimeout(()=>{const wa=new CustomEvent(Sn$1,zr$2);ci.addEventListener(Sn$1,hi),ci.dispatchEvent(wa),wa.defaultPrevented||ze$2(ba??document.body,{select:!0}),ci.removeEventListener(Sn$1,hi),jr$2.remove(ga)},0)}}},[ci,di,hi,ga]);const va=React.useCallback(ba=>{if(!oi&&!si||ga.paused)return;const wa=ba.key==="Tab"&&!ba.altKey&&!ba.ctrlKey&&!ba.metaKey,xa=document.activeElement;if(wa&&xa){const Ca=ba.currentTarget,[el,ku]=Pc(Ca);el&&ku?!ba.shiftKey&&xa===ku?(ba.preventDefault(),oi&&ze$2(el,{select:!0})):ba.shiftKey&&xa===el&&(ba.preventDefault(),oi&&ze$2(ku,{select:!0})):xa===Ca&&ba.preventDefault()}},[oi,si,ga.paused]);return jsx(se$2.div,{tabIndex:-1,...li,ref:ha,onKeyDown:va})});Uo$1.displayName=Mc;function _c(Ws,{select:ws=!1}={}){const oi=document.activeElement;for(const si of Ws)if(ze$2(si,{select:ws}),document.activeElement!==oi)return}function Pc(Ws){const ws=Wo$1(Ws),oi=Gr$2(ws,Ws),si=Gr$2(ws.reverse(),Ws);return[oi,si]}function Wo$1(Ws){const ws=[],oi=document.createTreeWalker(Ws,NodeFilter.SHOW_ELEMENT,{acceptNode:si=>{const ii=si.tagName==="INPUT"&&si.type==="hidden";return si.disabled||si.hidden||ii?NodeFilter.FILTER_SKIP:si.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;oi.nextNode();)ws.push(oi.currentNode);return ws}function Gr$2(Ws,ws){for(const oi of Ws)if(!Tc(oi,{upTo:ws}))return oi}function Tc(Ws,{upTo:ws}){if(getComputedStyle(Ws).visibility==="hidden")return!0;for(;Ws;){if(ws!==void 0&&Ws===ws)return!1;if(getComputedStyle(Ws).display==="none")return!0;Ws=Ws.parentElement}return!1}function kc(Ws){return Ws instanceof HTMLInputElement&&"select"in Ws}function ze$2(Ws,{select:ws=!1}={}){if(Ws&&Ws.focus){const oi=document.activeElement;Ws.focus({preventScroll:!0}),Ws!==oi&&kc(Ws)&&ws&&Ws.select()}}var jr$2=Oc();function Oc(){let Ws=[];return{add(ws){const oi=Ws[0];ws!==oi&&(oi==null||oi.pause()),Ws=Hr$2(Ws,ws),Ws.unshift(ws)},remove(ws){var oi;Ws=Hr$2(Ws,ws),(oi=Ws[0])==null||oi.resume()}}}function Hr$2(Ws,ws){const oi=[...Ws],si=oi.indexOf(ws);return si!==-1&&oi.splice(si,1),oi}function Dc(Ws){return Ws.filter(ws=>ws.tagName!=="A")}var Ze$1=globalThis!=null&&globalThis.document?React.useLayoutEffect:()=>{},Ic=React.useId||(()=>{}),Fc=0;function Qt$2(Ws){const[ws,oi]=React.useState(Ic());return Ze$1(()=>{oi(si=>si??String(Fc++))},[Ws]),ws?`radix-${ws}`:""}var $t$2=typeof document<"u"?useLayoutEffect:useEffect;function Jt(Ws,ws){if(Ws===ws)return!0;if(typeof Ws!=typeof ws)return!1;if(typeof Ws=="function"&&Ws.toString()===ws.toString())return!0;let oi,si,ii;if(Ws&&ws&&typeof Ws=="object"){if(Array.isArray(Ws)){if(oi=Ws.length,oi!==ws.length)return!1;for(si=oi;si--!==0;)if(!Jt(Ws[si],ws[si]))return!1;return!0}if(ii=Object.keys(Ws),oi=ii.length,oi!==Object.keys(ws).length)return!1;for(si=oi;si--!==0;)if(!{}.hasOwnProperty.call(ws,ii[si]))return!1;for(si=oi;si--!==0;){const ai=ii[si];if(!(ai==="_owner"&&Ws.$$typeof)&&!Jt(Ws[ai],ws[ai]))return!1}return!0}return Ws!==Ws&&ws!==ws}function $o$2(Ws){return typeof window>"u"?1:(Ws.ownerDocument.defaultView||window).devicePixelRatio||1}function Kr$2(Ws,ws){const oi=$o$2(Ws);return Math.round(ws*oi)/oi}function En$1(Ws){const ws=React.useRef(Ws);return $t$2(()=>{ws.current=Ws}),ws}function Nc(Ws){Ws===void 0&&(Ws={});const{placement:ws="bottom",strategy:oi="absolute",middleware:si=[],platform:ii,elements:{reference:ai,floating:li}={},transform:ci=!0,whileElementsMounted:ui,open:di}=Ws,[hi,pi]=React.useState({x:0,y:0,strategy:oi,placement:ws,middlewareData:{},isPositioned:!1}),[ha,ga]=React.useState(si);Jt(ha,si)||ga(si);const[va,ba]=React.useState(null),[wa,xa]=React.useState(null),Ca=React.useCallback(of=>{of!==Ed.current&&(Ed.current=of,ba(of))},[]),el=React.useCallback(of=>{of!==Od.current&&(Od.current=of,xa(of))},[]),ku=ai||va,gd=li||wa,Ed=React.useRef(null),Od=React.useRef(null),Nd=React.useRef(hi),Pd=ui!=null,Ld=En$1(ui),rf=En$1(ii),_d=En$1(di),Md=React.useCallback(()=>{if(!Ed.current||!Od.current)return;const of={placement:ws,strategy:oi,middleware:ha};rf.current&&(of.platform=rf.current),mc(Ed.current,Od.current,of).then(Wd=>{const df={...Wd,isPositioned:_d.current!==!1};Td.current&&!Jt(Nd.current,df)&&(Nd.current=df,ReactDOM.flushSync(()=>{pi(df)}))})},[ha,ws,oi,rf,_d]);$t$2(()=>{di===!1&&Nd.current.isPositioned&&(Nd.current.isPositioned=!1,pi(of=>({...of,isPositioned:!1})))},[di]);const Td=React.useRef(!1);$t$2(()=>(Td.current=!0,()=>{Td.current=!1}),[]),$t$2(()=>{if(ku&&(Ed.current=ku),gd&&(Od.current=gd),ku&&gd){if(Ld.current)return Ld.current(ku,gd,Md);Md()}},[ku,gd,Md,Ld,Pd]);const wd=React.useMemo(()=>({reference:Ed,floating:Od,setReference:Ca,setFloating:el}),[Ca,el]),Cd=React.useMemo(()=>({reference:ku,floating:gd}),[ku,gd]),sf=React.useMemo(()=>{const of={position:oi,left:0,top:0};if(!Cd.floating)return of;const Wd=Kr$2(Cd.floating,hi.x),df=Kr$2(Cd.floating,hi.y);return ci?{...of,transform:"translate("+Wd+"px, "+df+"px)",...$o$2(Cd.floating)>=1.5&&{willChange:"transform"}}:{position:oi,left:Wd,top:df}},[oi,ci,Cd.floating,hi.x,hi.y]);return React.useMemo(()=>({...hi,update:Md,refs:wd,elements:Cd,floatingStyles:sf}),[hi,Md,wd,Cd,sf])}const Lc=Ws=>{function ws(oi){return{}.hasOwnProperty.call(oi,"current")}return{name:"arrow",options:Ws,fn(oi){const{element:si,padding:ii}=typeof Ws=="function"?Ws(oi):Ws;return si&&ws(si)?si.current!=null?Br$2({element:si.current,padding:ii}).fn(oi):{}:si?Br$2({element:si,padding:ii}).fn(oi):{}}}},Vc=(Ws,ws)=>({...cc(Ws),options:[Ws,ws]}),Bc=(Ws,ws)=>({...lc(Ws),options:[Ws,ws]}),Uc=(Ws,ws)=>({...pc(Ws),options:[Ws,ws]}),Wc=(Ws,ws)=>({...uc(Ws),options:[Ws,ws]}),$c=(Ws,ws)=>({...dc(Ws),options:[Ws,ws]}),zc=(Ws,ws)=>({...fc(Ws),options:[Ws,ws]}),Gc=(Ws,ws)=>({...Lc(Ws),options:[Ws,ws]});var jc="Arrow",zo=React.forwardRef((Ws,ws)=>{const{children:oi,width:si=10,height:ii=5,...ai}=Ws;return jsx(se$2.svg,{...ai,ref:ws,width:si,height:ii,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:Ws.asChild?oi:jsx("polygon",{points:"0,0 30,0 15,10"})})});zo.displayName=jc;var Hc=zo;function Kc(Ws){const[ws,oi]=React.useState(void 0);return Ze$1(()=>{if(Ws){oi({width:Ws.offsetWidth,height:Ws.offsetHeight});const si=new ResizeObserver(ii=>{if(!Array.isArray(ii)||!ii.length)return;const ai=ii[0];let li,ci;if("borderBoxSize"in ai){const ui=ai.borderBoxSize,di=Array.isArray(ui)?ui[0]:ui;li=di.inlineSize,ci=di.blockSize}else li=Ws.offsetWidth,ci=Ws.offsetHeight;oi({width:li,height:ci})});return si.observe(Ws,{box:"border-box"}),()=>si.unobserve(Ws)}else oi(void 0)},[Ws]),ws}var nr$1="Popper",[Go$1,jo]=dt$2(nr$1),[Yc,Ho$1]=Go$1(nr$1),Yo$1="PopperAnchor",Xo$1=React.forwardRef((Ws,ws)=>{const{__scopePopper:oi,virtualRef:si,...ii}=Ws,ai=Ho$1(Yo$1,oi),li=React.useRef(null),ci=ge$2(ws,li);return React.useEffect(()=>{ai.onAnchorChange((si==null?void 0:si.current)||li.current)}),si?null:jsx(se$2.div,{...ii,ref:ci})});Xo$1.displayName=Yo$1;var rr$1="PopperContent",[Xc,qc]=Go$1(rr$1),qo=React.forwardRef((Ws,ws)=>{var oi,si,ii,ai,li,ci;const{__scopePopper:ui,side:di="bottom",sideOffset:hi=0,align:pi="center",alignOffset:ha=0,arrowPadding:ga=0,avoidCollisions:va=!0,collisionBoundary:ba=[],collisionPadding:wa=0,sticky:xa="partial",hideWhenDetached:Ca=!1,updatePositionStrategy:el="optimized",onPlaced:ku,...gd}=Ws,Ed=Ho$1(rr$1,ui),[Od,Nd]=React.useState(null),Pd=ge$2(ws,Ef=>Nd(Ef)),[Ld,rf]=React.useState(null),_d=Kc(Ld),Md=(_d==null?void 0:_d.width)??0,Td=(_d==null?void 0:_d.height)??0,wd=di+(pi!=="center"?"-"+pi:""),Cd=typeof wa=="number"?wa:{top:0,right:0,bottom:0,left:0,...wa},sf=Array.isArray(ba)?ba:[ba],of=sf.length>0,Wd={padding:Cd,boundary:sf.filter(Qc),altBoundary:of},{refs:df,floatingStyles:hf,placement:xd,isPositioned:Fd,middlewareData:Vd}=Nc({strategy:"fixed",placement:wd,whileElementsMounted:(...Ef)=>ac(...Ef,{animationFrame:el==="always"}),elements:{reference:Ed.anchor},middleware:[Vc({mainAxis:hi+Td,alignmentAxis:ha}),va&&Bc({mainAxis:!0,crossAxis:!1,limiter:xa==="partial"?Uc():void 0,...Wd}),va&&Wc({...Wd}),$c({...Wd,apply:({elements:Ef,rects:xf,availableWidth:kd,availableHeight:Dd})=>{const{width:tf,height:vd}=xf.reference,Sd=Ef.floating.style;Sd.setProperty("--radix-popper-available-width",`${kd}px`),Sd.setProperty("--radix-popper-available-height",`${Dd}px`),Sd.setProperty("--radix-popper-anchor-width",`${tf}px`),Sd.setProperty("--radix-popper-anchor-height",`${vd}px`)}}),Ld&&Gc({element:Ld,padding:ga}),Jc({arrowWidth:Md,arrowHeight:Td}),Ca&&zc({strategy:"referenceHidden",...Wd})]}),[af,ff]=Jo$1(xd),uf=Ee$2(ku);Ze$1(()=>{Fd&&(uf==null||uf())},[Fd,uf]);const mf=(oi=Vd.arrow)==null?void 0:oi.x,yf=(si=Vd.arrow)==null?void 0:si.y,Sf=((ii=Vd.arrow)==null?void 0:ii.centerOffset)!==0,[Of,wf]=React.useState();return Ze$1(()=>{Od&&wf(window.getComputedStyle(Od).zIndex)},[Od]),jsx("div",{ref:df.setFloating,"data-radix-popper-content-wrapper":"",style:{...hf,transform:Fd?hf.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Of,"--radix-popper-transform-origin":[(ai=Vd.transformOrigin)==null?void 0:ai.x,(li=Vd.transformOrigin)==null?void 0:li.y].join(" "),...((ci=Vd.hide)==null?void 0:ci.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:Ws.dir,children:jsx(Xc,{scope:ui,placedSide:af,onArrowChange:rf,arrowX:mf,arrowY:yf,shouldHideArrow:Sf,children:jsx(se$2.div,{"data-side":af,"data-align":ff,...gd,ref:Pd,style:{...gd.style,animation:Fd?void 0:"none"}})})})});qo.displayName=rr$1;var Zo$1="PopperArrow",Zc={top:"bottom",right:"left",bottom:"top",left:"right"},Qo=React.forwardRef(function(Ws,ws){const{__scopePopper:oi,...si}=Ws,ii=qc(Zo$1,oi),ai=Zc[ii.placedSide];return jsx("span",{ref:ii.onArrowChange,style:{position:"absolute",left:ii.arrowX,top:ii.arrowY,[ai]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[ii.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[ii.placedSide],visibility:ii.shouldHideArrow?"hidden":void 0},children:jsx(Hc,{...si,ref:ws,style:{...si.style,display:"block"}})})});Qo.displayName=Zo$1;function Qc(Ws){return Ws!==null}var Jc=Ws=>({name:"transformOrigin",options:Ws,fn(ws){var oi,si,ii;const{placement:ai,rects:li,middlewareData:ci}=ws,ui=((oi=ci.arrow)==null?void 0:oi.centerOffset)!==0,di=ui?0:Ws.arrowWidth,hi=ui?0:Ws.arrowHeight,[pi,ha]=Jo$1(ai),ga={start:"0%",center:"50%",end:"100%"}[ha],va=(((si=ci.arrow)==null?void 0:si.x)??0)+di/2,ba=(((ii=ci.arrow)==null?void 0:ii.y)??0)+hi/2;let wa="",xa="";return pi==="bottom"?(wa=ui?ga:`${va}px`,xa=`${-hi}px`):pi==="top"?(wa=ui?ga:`${va}px`,xa=`${li.floating.height+hi}px`):pi==="right"?(wa=`${-hi}px`,xa=ui?ga:`${ba}px`):pi==="left"&&(wa=`${li.floating.width+hi}px`,xa=ui?ga:`${ba}px`),{data:{x:wa,y:xa}}}});function Jo$1(Ws){const[ws,oi="center"]=Ws.split("-");return[ws,oi]}var tl=Xo$1,nl=qo,rl=Qo,ol="Portal",es$1=React.forwardRef((Ws,ws)=>{var oi;const{container:si,...ii}=Ws,[ai,li]=React.useState(!1);Ze$1(()=>li(!0),[]);const ci=si||ai&&((oi=globalThis==null?void 0:globalThis.document)==null?void 0:oi.body);return ci?ReactDOM__default.createPortal(jsx(se$2.div,{...ii,ref:ws}),ci):null});es$1.displayName=ol;function sl(Ws,ws){return React.useReducer((oi,si)=>ws[oi][si]??oi,Ws)}var ft$2=Ws=>{const{present:ws,children:oi}=Ws,si=il(ws),ii=typeof oi=="function"?oi({present:si.isPresent}):React.Children.only(oi),ai=ge$2(si.ref,al(ii));return typeof oi=="function"||si.isPresent?React.cloneElement(ii,{ref:ai}):null};ft$2.displayName="Presence";function il(Ws){const[ws,oi]=React.useState(),si=React.useRef({}),ii=React.useRef(Ws),ai=React.useRef("none"),li=Ws?"mounted":"unmounted",[ci,ui]=sl(li,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return React.useEffect(()=>{const di=Nt$2(si.current);ai.current=ci==="mounted"?di:"none"},[ci]),Ze$1(()=>{const di=si.current,hi=ii.current;if(hi!==Ws){const pi=ai.current,ha=Nt$2(di);Ws?ui("MOUNT"):ha==="none"||(di==null?void 0:di.display)==="none"?ui("UNMOUNT"):ui(hi&&pi!==ha?"ANIMATION_OUT":"UNMOUNT"),ii.current=Ws}},[Ws,ui]),Ze$1(()=>{if(ws){let di;const hi=ws.ownerDocument.defaultView??window,pi=ga=>{const va=Nt$2(si.current).includes(ga.animationName);if(ga.target===ws&&va&&(ui("ANIMATION_END"),!ii.current)){const ba=ws.style.animationFillMode;ws.style.animationFillMode="forwards",di=hi.setTimeout(()=>{ws.style.animationFillMode==="forwards"&&(ws.style.animationFillMode=ba)})}},ha=ga=>{ga.target===ws&&(ai.current=Nt$2(si.current))};return ws.addEventListener("animationstart",ha),ws.addEventListener("animationcancel",pi),ws.addEventListener("animationend",pi),()=>{hi.clearTimeout(di),ws.removeEventListener("animationstart",ha),ws.removeEventListener("animationcancel",pi),ws.removeEventListener("animationend",pi)}}else ui("ANIMATION_END")},[ws,ui]),{isPresent:["mounted","unmountSuspended"].includes(ci),ref:React.useCallback(di=>{di&&(si.current=getComputedStyle(di)),oi(di)},[])}}function Nt$2(Ws){return(Ws==null?void 0:Ws.animationName)||"none"}function al(Ws){var ws,oi;let si=(ws=Object.getOwnPropertyDescriptor(Ws.props,"ref"))==null?void 0:ws.get,ii=si&&"isReactWarning"in si&&si.isReactWarning;return ii?Ws.ref:(si=(oi=Object.getOwnPropertyDescriptor(Ws,"ref"))==null?void 0:oi.get,ii=si&&"isReactWarning"in si&&si.isReactWarning,ii?Ws.props.ref:Ws.props.ref||Ws.ref)}var An$2="rovingFocusGroup.onEntryFocus",cl={bubbles:!1,cancelable:!0},cn$2="RovingFocusGroup",[Ln$2,ts$1,ll]=No$1(cn$2),[ul,ln$1]=dt$2(cn$2,[ll]),[dl,fl]=ul(cn$2),ns=React.forwardRef((Ws,ws)=>jsx(Ln$2.Provider,{scope:Ws.__scopeRovingFocusGroup,children:jsx(Ln$2.Slot,{scope:Ws.__scopeRovingFocusGroup,children:jsx(pl,{...Ws,ref:ws})})}));ns.displayName=cn$2;var pl=React.forwardRef((Ws,ws)=>{const{__scopeRovingFocusGroup:oi,orientation:si,loop:ii=!1,dir:ai,currentTabStopId:li,defaultCurrentTabStopId:ci,onCurrentTabStopIdChange:ui,onEntryFocus:di,preventScrollOnEntryFocus:hi=!1,...pi}=Ws,ha=React.useRef(null),ga=ge$2(ws,ha),va=tr$1(ai),[ba=null,wa]=er$1({prop:li,defaultProp:ci,onChange:ui}),[xa,Ca]=React.useState(!1),el=Ee$2(di),ku=ts$1(oi),gd=React.useRef(!1),[Ed,Od]=React.useState(0);return React.useEffect(()=>{const Nd=ha.current;if(Nd)return Nd.addEventListener(An$2,el),()=>Nd.removeEventListener(An$2,el)},[el]),jsx(dl,{scope:oi,orientation:si,dir:va,loop:ii,currentTabStopId:ba,onItemFocus:React.useCallback(Nd=>wa(Nd),[wa]),onItemShiftTab:React.useCallback(()=>Ca(!0),[]),onFocusableItemAdd:React.useCallback(()=>Od(Nd=>Nd+1),[]),onFocusableItemRemove:React.useCallback(()=>Od(Nd=>Nd-1),[]),children:jsx(se$2.div,{tabIndex:xa||Ed===0?-1:0,"data-orientation":si,...pi,ref:ga,style:{outline:"none",...Ws.style},onMouseDown:Y$2(Ws.onMouseDown,()=>{gd.current=!0}),onFocus:Y$2(Ws.onFocus,Nd=>{const Pd=!gd.current;if(Nd.target===Nd.currentTarget&&Pd&&!xa){const Ld=new CustomEvent(An$2,cl);if(Nd.currentTarget.dispatchEvent(Ld),!Ld.defaultPrevented){const rf=ku().filter(wd=>wd.focusable),_d=rf.find(wd=>wd.active),Md=rf.find(wd=>wd.id===ba),Td=[_d,Md,...rf].filter(Boolean).map(wd=>wd.ref.current);ss$1(Td,hi)}}gd.current=!1}),onBlur:Y$2(Ws.onBlur,()=>Ca(!1))})})}),rs$1="RovingFocusGroupItem",os$1=React.forwardRef((Ws,ws)=>{const{__scopeRovingFocusGroup:oi,focusable:si=!0,active:ii=!1,tabStopId:ai,...li}=Ws,ci=Qt$2(),ui=ai||ci,di=fl(rs$1,oi),hi=di.currentTabStopId===ui,pi=ts$1(oi),{onFocusableItemAdd:ha,onFocusableItemRemove:ga}=di;return React.useEffect(()=>{if(si)return ha(),()=>ga()},[si,ha,ga]),jsx(Ln$2.ItemSlot,{scope:oi,id:ui,focusable:si,active:ii,children:jsx(se$2.span,{tabIndex:hi?0:-1,"data-orientation":di.orientation,...li,ref:ws,onMouseDown:Y$2(Ws.onMouseDown,va=>{si?di.onItemFocus(ui):va.preventDefault()}),onFocus:Y$2(Ws.onFocus,()=>di.onItemFocus(ui)),onKeyDown:Y$2(Ws.onKeyDown,va=>{if(va.key==="Tab"&&va.shiftKey){di.onItemShiftTab();return}if(va.target!==va.currentTarget)return;const ba=gl(va,di.orientation,di.dir);if(ba!==void 0){if(va.metaKey||va.ctrlKey||va.altKey||va.shiftKey)return;va.preventDefault();let wa=pi().filter(xa=>xa.focusable).map(xa=>xa.ref.current);if(ba==="last")wa.reverse();else if(ba==="prev"||ba==="next"){ba==="prev"&&wa.reverse();const xa=wa.indexOf(va.currentTarget);wa=di.loop?vl(wa,xa+1):wa.slice(xa+1)}setTimeout(()=>ss$1(wa))}})})})});os$1.displayName=rs$1;var ml={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function hl(Ws,ws){return ws!=="rtl"?Ws:Ws==="ArrowLeft"?"ArrowRight":Ws==="ArrowRight"?"ArrowLeft":Ws}function gl(Ws,ws,oi){const si=hl(Ws.key,oi);if(!(ws==="vertical"&&["ArrowLeft","ArrowRight"].includes(si))&&!(ws==="horizontal"&&["ArrowUp","ArrowDown"].includes(si)))return ml[si]}function ss$1(Ws,ws=!1){const oi=document.activeElement;for(const si of Ws)if(si===oi||(si.focus({preventScroll:ws}),document.activeElement!==oi))return}function vl(Ws,ws){return Ws.map((oi,si)=>Ws[(ws+si)%Ws.length])}var is=ns,as=os$1,yl=function(Ws){if(typeof document>"u")return null;var ws=Array.isArray(Ws)?Ws[0]:Ws;return ws.ownerDocument.body},tt$2=new WeakMap,Lt$2=new WeakMap,Vt$1={},Rn$1=0,cs$1=function(Ws){return Ws&&(Ws.host||cs$1(Ws.parentNode))},bl=function(Ws,ws){return ws.map(function(oi){if(Ws.contains(oi))return oi;var si=cs$1(oi);return si&&Ws.contains(si)?si:(console.error("aria-hidden",oi,"in not contained inside",Ws,". Doing nothing"),null)}).filter(function(oi){return!!oi})},wl=function(Ws,ws,oi,si){var ii=bl(ws,Array.isArray(Ws)?Ws:[Ws]);Vt$1[oi]||(Vt$1[oi]=new WeakMap);var ai=Vt$1[oi],li=[],ci=new Set,ui=new Set(ii),di=function(pi){!pi||ci.has(pi)||(ci.add(pi),di(pi.parentNode))};ii.forEach(di);var hi=function(pi){!pi||ui.has(pi)||Array.prototype.forEach.call(pi.children,function(ha){if(ci.has(ha))hi(ha);else try{var ga=ha.getAttribute(si),va=ga!==null&&ga!=="false",ba=(tt$2.get(ha)||0)+1,wa=(ai.get(ha)||0)+1;tt$2.set(ha,ba),ai.set(ha,wa),li.push(ha),ba===1&&va&&Lt$2.set(ha,!0),wa===1&&ha.setAttribute(oi,"true"),va||ha.setAttribute(si,"true")}catch(xa){console.error("aria-hidden: cannot operate on ",ha,xa)}})};return hi(ws),ci.clear(),Rn$1++,function(){li.forEach(function(pi){var ha=tt$2.get(pi)-1,ga=ai.get(pi)-1;tt$2.set(pi,ha),ai.set(pi,ga),ha||(Lt$2.has(pi)||pi.removeAttribute(si),Lt$2.delete(pi)),ga||pi.removeAttribute(oi)}),Rn$1--,Rn$1||(tt$2=new WeakMap,tt$2=new WeakMap,Lt$2=new WeakMap,Vt$1={})}},xl=function(Ws,ws,oi){oi===void 0&&(oi="data-aria-hidden");var si=Array.from(Array.isArray(Ws)?Ws:[Ws]),ii=yl(Ws);return ii?(si.push.apply(si,Array.from(ii.querySelectorAll("[aria-live]"))),wl(si,ii,oi,"aria-hidden")):function(){return null}},Pe$2=function(){return Pe$2=Object.assign||function(Ws){for(var ws,oi=1,si=arguments.length;oi<si;oi++){ws=arguments[oi];for(var ii in ws)Object.prototype.hasOwnProperty.call(ws,ii)&&(Ws[ii]=ws[ii])}return Ws},Pe$2.apply(this,arguments)};function ls$1(Ws,ws){var oi={};for(var si in Ws)Object.prototype.hasOwnProperty.call(Ws,si)&&ws.indexOf(si)<0&&(oi[si]=Ws[si]);if(Ws!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ii=0,si=Object.getOwnPropertySymbols(Ws);ii<si.length;ii++)ws.indexOf(si[ii])<0&&Object.prototype.propertyIsEnumerable.call(Ws,si[ii])&&(oi[si[ii]]=Ws[si[ii]]);return oi}function Cl(Ws,ws,oi){for(var si=0,ii=ws.length,ai;si<ii;si++)(ai||!(si in ws))&&(ai||(ai=Array.prototype.slice.call(ws,0,si)),ai[si]=ws[si]);return Ws.concat(ai||Array.prototype.slice.call(ws))}var zt$2="right-scroll-bar-position",Gt$2="width-before-scroll-bar",Sl="with-scroll-bars-hidden",El="--removed-body-scroll-bar-size";function Mn$2(Ws,ws){return typeof Ws=="function"?Ws(ws):Ws&&(Ws.current=ws),Ws}function Al(Ws,ws){var oi=useState(function(){return{value:Ws,callback:ws,facade:{get current(){return oi.value},set current(si){var ii=oi.value;ii!==si&&(oi.value=si,oi.callback(si,ii))}}}})[0];return oi.callback=ws,oi.facade}var Rl=typeof window<"u"?React.useLayoutEffect:React.useEffect,Yr$2=new WeakMap;function Ml(Ws,ws){var oi=Al(null,function(si){return Ws.forEach(function(ii){return Mn$2(ii,si)})});return Rl(function(){var si=Yr$2.get(oi);if(si){var ii=new Set(si),ai=new Set(Ws),li=oi.current;ii.forEach(function(ci){ai.has(ci)||Mn$2(ci,null)}),ai.forEach(function(ci){ii.has(ci)||Mn$2(ci,li)})}Yr$2.set(oi,Ws)},[Ws]),oi}function _l(Ws){return Ws}function Pl(Ws,ws){ws===void 0&&(ws=_l);var oi=[],si=!1,ii={read:function(){if(si)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return oi.length?oi[oi.length-1]:Ws},useMedium:function(ai){var li=ws(ai,si);return oi.push(li),function(){oi=oi.filter(function(ci){return ci!==li})}},assignSyncMedium:function(ai){for(si=!0;oi.length;){var li=oi;oi=[],li.forEach(ai)}oi={push:function(ci){return ai(ci)},filter:function(){return oi}}},assignMedium:function(ai){si=!0;var li=[];if(oi.length){var ci=oi;oi=[],ci.forEach(ai),li=oi}var ui=function(){var hi=li;li=[],hi.forEach(ai)},di=function(){return Promise.resolve().then(ui)};di(),oi={push:function(hi){li.push(hi),di()},filter:function(hi){return li=li.filter(hi),oi}}}};return ii}function Tl(Ws){Ws===void 0&&(Ws={});var ws=Pl(null);return ws.options=Pe$2({async:!0,ssr:!1},Ws),ws}var us=function(Ws){var ws=Ws.sideCar,oi=ls$1(Ws,["sideCar"]);if(!ws)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var si=ws.read();if(!si)throw new Error("Sidecar medium not found");return React.createElement(si,Pe$2({},oi))};us.isSideCarExport=!0;function kl(Ws,ws){return Ws.useMedium(ws),us}var ds$1=Tl(),_n$2=function(){},un$1=React.forwardRef(function(Ws,ws){var oi=React.useRef(null),si=React.useState({onScrollCapture:_n$2,onWheelCapture:_n$2,onTouchMoveCapture:_n$2}),ii=si[0],ai=si[1],li=Ws.forwardProps,ci=Ws.children,ui=Ws.className,di=Ws.removeScrollBar,hi=Ws.enabled,pi=Ws.shards,ha=Ws.sideCar,ga=Ws.noIsolation,va=Ws.inert,ba=Ws.allowPinchZoom,wa=Ws.as,xa=wa===void 0?"div":wa,Ca=Ws.gapMode,el=ls$1(Ws,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),ku=ha,gd=Ml([oi,ws]),Ed=Pe$2(Pe$2({},el),ii);return React.createElement(React.Fragment,null,hi&&React.createElement(ku,{sideCar:ds$1,removeScrollBar:di,shards:pi,noIsolation:ga,inert:va,setCallbacks:ai,allowPinchZoom:!!ba,lockRef:oi,gapMode:Ca}),li?React.cloneElement(React.Children.only(ci),Pe$2(Pe$2({},Ed),{ref:gd})):React.createElement(xa,Pe$2({},Ed,{className:ui,ref:gd}),ci))});un$1.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};un$1.classNames={fullWidth:Gt$2,zeroRight:zt$2};var Ol=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Dl(){if(!document)return null;var Ws=document.createElement("style");Ws.type="text/css";var ws=Ol();return ws&&Ws.setAttribute("nonce",ws),Ws}function Il(Ws,ws){Ws.styleSheet?Ws.styleSheet.cssText=ws:Ws.appendChild(document.createTextNode(ws))}function Fl(Ws){var ws=document.head||document.getElementsByTagName("head")[0];ws.appendChild(Ws)}var Nl=function(){var Ws=0,ws=null;return{add:function(oi){Ws==0&&(ws=Dl())&&(Il(ws,oi),Fl(ws)),Ws++},remove:function(){Ws--,!Ws&&ws&&(ws.parentNode&&ws.parentNode.removeChild(ws),ws=null)}}},Ll=function(){var Ws=Nl();return function(ws,oi){React.useEffect(function(){return Ws.add(ws),function(){Ws.remove()}},[ws&&oi])}},fs=function(){var Ws=Ll(),ws=function(oi){var si=oi.styles,ii=oi.dynamic;return Ws(si,ii),null};return ws},Vl={left:0,top:0,right:0,gap:0},Pn$2=function(Ws){return parseInt(Ws||"",10)||0},Bl=function(Ws){var ws=window.getComputedStyle(document.body),oi=ws[Ws==="padding"?"paddingLeft":"marginLeft"],si=ws[Ws==="padding"?"paddingTop":"marginTop"],ii=ws[Ws==="padding"?"paddingRight":"marginRight"];return[Pn$2(oi),Pn$2(si),Pn$2(ii)]},Ul=function(Ws){if(Ws===void 0&&(Ws="margin"),typeof window>"u")return Vl;var ws=Bl(Ws),oi=document.documentElement.clientWidth,si=window.innerWidth;return{left:ws[0],top:ws[1],right:ws[2],gap:Math.max(0,si-oi+ws[2]-ws[0])}},Wl=fs(),it="data-scroll-locked",$l=function(Ws,ws,oi,si){var ii=Ws.left,ai=Ws.top,li=Ws.right,ci=Ws.gap;return oi===void 0&&(oi="margin"),`
|
|
1
|
+
import{_ as __vitePreload}from"./main.BmAe1Lus.js";import{jsx,Fragment,jsxs}from"react/jsx-runtime";import{cj as h$3,bO as index,c5 as applyMixins,b$ as BaseActions,cc as BaseDocument}from"./app-DvSjLYs-.js";import*as React from"react";import React__default,{forwardRef,useLayoutEffect,useEffect,useState,useMemo,Suspense,lazy,useRef,useCallback,useImperativeHandle,createContext,memo,useContext,useId}from"react";import{P as P$5}from"./json-CHCvwHN3.js";import*as ReactDOM from"react-dom";import ReactDOM__default from"react-dom";import{a as actions}from"./content-TOddMACx.js";import"./app-loader-Dn48G7po.js";import"./useUiNodes-D93b3yJT.js";import"./getEnsName-DiyJcfh8.js";var B$3=Object.defineProperty,N$3=(Ws,ws,oi)=>ws in Ws?B$3(Ws,ws,{enumerable:!0,configurable:!0,writable:!0,value:oi}):Ws[ws]=oi,h$2=(Ws,ws,oi)=>N$3(Ws,typeof ws!="symbol"?ws+"":ws,oi);const _$3=Ws=>Ws!=null;h$3.any().refine(Ws=>_$3(Ws));const g$1=h$3.enum(["CRY","HEART","LAUGH","THUMBS_DOWN","THUMBS_UP"]);function E$1(){return h$3.object({messageId:h$3.string(),reactedBy:h$3.string(),type:g$1})}function I$3(){return h$3.object({content:h$3.string(),messageId:h$3.string(),sender:S$3(),sentAt:h$3.string().datetime()})}function y$3(){return h$3.object({description:h$3.string()})}function D$4(){return h$3.object({name:h$3.string()})}function f$3(){return h$3.object({messageId:h$3.string(),senderId:h$3.string(),type:g$1})}function S$3(){return h$3.object({__typename:h$3.literal("Sender").optional(),avatarUrl:h$3.string().url().nullable(),id:h$3.string(),name:h$3.string().nullable()})}let z$6=class extends Error{constructor(ws="MessageContentCannotBeEmpty"){super(ws),h$2(this,"errorCode","MessageContentCannotBeEmpty")}};const d$1={addMessageOperation(Ws,ws,oi){if(ws.input.content==="")throw new z$6;Ws.messages.push({id:ws.input.messageId,content:ws.input.content,sender:ws.input.sender,sentAt:ws.input.sentAt,reactions:[]})},addEmojiReactionOperation(Ws,ws,oi){const si=Ws.messages.find(ai=>ai.id===ws.input.messageId);if(!si)throw new Error("Message not found");const ii=si.reactions||[];ii.find(ai=>ai.type===ws.input.type)?si.reactions=ii.map(ai=>ai.type===ws.input.type?{...ai,reactedBy:[...ai.reactedBy,ws.input.reactedBy]}:ai):si.reactions=[...ii,{reactedBy:[ws.input.reactedBy],type:ws.input.type}],Ws.messages=Ws.messages.map(ai=>ai.id===si.id?si:ai)},removeEmojiReactionOperation(Ws,ws,oi){Ws.messages=Ws.messages.map(si=>(si.id===ws.input.messageId&&(si.reactions=(si.reactions||[]).map(ii=>ii.type===ws.input.type?{...ii,reactedBy:ii.reactedBy.filter(ai=>ai!==ws.input.senderId)}:ii)),si))},editChatNameOperation(Ws,ws,oi){Ws.name=ws.input.name||""},editChatDescriptionOperation(Ws,ws,oi){Ws.description=ws.input.description||""}},G$5=(Ws,ws,oi)=>{if(index.isBaseAction(ws))return Ws;switch(ws.type){case"ADD_MESSAGE":I$3().parse(ws.input),d$1.addMessageOperation(Ws[ws.scope],ws,oi);break;case"ADD_EMOJI_REACTION":E$1().parse(ws.input),d$1.addEmojiReactionOperation(Ws[ws.scope],ws,oi);break;case"REMOVE_EMOJI_REACTION":f$3().parse(ws.input),d$1.removeEmojiReactionOperation(Ws[ws.scope],ws,oi);break;case"EDIT_CHAT_NAME":D$4().parse(ws.input),d$1.editChatNameOperation(Ws[ws.scope],ws,oi);break;case"EDIT_CHAT_DESCRIPTION":y$3().parse(ws.input),d$1.editChatDescriptionOperation(Ws[ws.scope],ws,oi);break;default:return Ws}},m$3=index.createReducer(G$5),L$3={id:"",name:"",description:"",createdAt:"2024-12-03T14:13:08.862Z",createdBy:"",messages:[]},J$6={},c$2={fileExtension:".phdm",createState(Ws){return{global:{...L$3,...Ws==null?void 0:Ws.global},local:{...J$6,...Ws==null?void 0:Ws.local}}},createExtendedState(Ws){return index.createExtendedState({...Ws,documentType:"powerhouse/chat-room"},c$2.createState)},createDocument(Ws){return index.createDocument(c$2.createExtendedState(Ws),c$2.createState)},saveToFile(Ws,ws,oi){return index.saveToFile(Ws,ws,".phdm",oi)},saveToFileHandle(Ws,ws){return index.saveToFileHandle(Ws,ws)},loadFromFile(Ws){return index.loadFromFile(Ws,m$3)},loadFromInput(Ws){return index.loadFromInput(Ws,m$3)}},{createAction:p$3}=index,C$6=Ws=>p$3("ADD_MESSAGE",{...Ws},void 0,I$3,"global"),O$3=Ws=>p$3("ADD_EMOJI_REACTION",{...Ws},void 0,E$1,"global"),M$4=Ws=>p$3("REMOVE_EMOJI_REACTION",{...Ws},void 0,f$3,"global"),j$2=Ws=>p$3("EDIT_CHAT_NAME",{...Ws},void 0,D$4,"global"),x$4=Ws=>p$3("EDIT_CHAT_DESCRIPTION",{...Ws},void 0,y$3,"global");let P$4=class extends BaseDocument{addMessage(ws){return this.dispatch(C$6(ws))}addEmojiReaction(ws){return this.dispatch(O$3(ws))}removeEmojiReaction(ws){return this.dispatch(M$4(ws))}editChatName(ws){return this.dispatch(j$2(ws))}editChatDescription(ws){return this.dispatch(x$4(ws))}};const u$3=class qf extends BaseDocument{constructor(ws,oi){super(m$3,c$2.createDocument(ws),oi)}saveToFile(ws,oi){return super.saveToFile(ws,qf.fileExtension,oi)}loadFromFile(ws){return super.loadFromFile(ws)}static async fromFile(ws){const oi=new this;return await oi.loadFromFile(ws),oi}};h$2(u$3,"fileExtension",".phdm");let l$2=u$3;applyMixins(l$2,[P$4]);const V$2=Object.freeze(Object.defineProperty({__proto__:null,addEmojiReaction:O$3,addMessage:C$6,editChatDescription:x$4,editChatName:j$2,removeEmojiReaction:M$4},Symbol.toStringTag,{value:"Module"})),Y$3=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));({...c$2,...Y$3});({...BaseActions,...V$2});var It$2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ud(Ws){return Ws&&Ws.__esModule&&Object.prototype.hasOwnProperty.call(Ws,"default")?Ws.default:Ws}var hn$1,br$2;function mi(){if(br$2)return hn$1;br$2=1;var Ws="Expected a function",ws=NaN,oi="[object Symbol]",si=/^\s+|\s+$/g,ii=/^[-+]0x[0-9a-f]+$/i,ai=/^0b[01]+$/i,li=/^0o[0-7]+$/i,ci=parseInt,ui=typeof It$2=="object"&&It$2&&It$2.Object===Object&&It$2,di=typeof self=="object"&&self&&self.Object===Object&&self,hi=ui||di||Function("return this")(),pi=Object.prototype,ha=pi.toString,ga=Math.max,va=Math.min,ba=function(){return hi.Date.now()};function wa(gd,Ed,Od){var Nd,Pd,Ld,rf,kd,Md,Td=0,wd=!1,Cd=!1,sf=!0;if(typeof gd!="function")throw new TypeError(Ws);Ed=ku(Ed)||0,xa(Od)&&(wd=!!Od.leading,Cd="maxWait"in Od,Ld=Cd?ga(ku(Od.maxWait)||0,Ed):Ld,sf="trailing"in Od?!!Od.trailing:sf);function of(uf){var mf=Nd,yf=Pd;return Nd=Pd=void 0,Td=uf,rf=gd.apply(yf,mf),rf}function Wd(uf){return Td=uf,kd=setTimeout(xd,Ed),wd?of(uf):rf}function df(uf){var mf=uf-Md,yf=uf-Td,Sf=Ed-mf;return Cd?va(Sf,Ld-yf):Sf}function hf(uf){var mf=uf-Md,yf=uf-Td;return Md===void 0||mf>=Ed||mf<0||Cd&&yf>=Ld}function xd(){var uf=ba();if(hf(uf))return Fd(uf);kd=setTimeout(xd,df(uf))}function Fd(uf){return kd=void 0,sf&&Nd?of(uf):(Nd=Pd=void 0,rf)}function Vd(){kd!==void 0&&clearTimeout(kd),Td=0,Nd=Md=Pd=kd=void 0}function af(){return kd===void 0?rf:Fd(ba())}function ff(){var uf=ba(),mf=hf(uf);if(Nd=arguments,Pd=this,Md=uf,mf){if(kd===void 0)return Wd(Md);if(Cd)return kd=setTimeout(xd,Ed),of(Md)}return kd===void 0&&(kd=setTimeout(xd,Ed)),rf}return ff.cancel=Vd,ff.flush=af,ff}function xa(gd){var Ed=typeof gd;return!!gd&&(Ed=="object"||Ed=="function")}function Ca(gd){return!!gd&&typeof gd=="object"}function el(gd){return typeof gd=="symbol"||Ca(gd)&&ha.call(gd)==oi}function ku(gd){if(typeof gd=="number")return gd;if(el(gd))return ws;if(xa(gd)){var Ed=typeof gd.valueOf=="function"?gd.valueOf():gd;gd=xa(Ed)?Ed+"":Ed}if(typeof gd!="string")return gd===0?gd:+gd;gd=gd.replace(si,"");var Od=ai.test(gd);return Od||li.test(gd)?ci(gd.slice(2),Od?2:8):ii.test(gd)?ws:+gd}return hn$1=wa,hn$1}mi();var Pt$2=Ws=>Ws.type==="checkbox",Ye$2=Ws=>Ws instanceof Date,de$2=Ws=>Ws==null;const oo=Ws=>typeof Ws=="object";var re$1=Ws=>!de$2(Ws)&&!Array.isArray(Ws)&&oo(Ws)&&!Ye$2(Ws),so$1=Ws=>re$1(Ws)&&Ws.target?Pt$2(Ws.target)?Ws.target.checked:Ws.target.value:Ws,gi=Ws=>Ws.substring(0,Ws.search(/\.\d+(\.|$)/))||Ws,io$1=(Ws,ws)=>Ws.has(gi(ws)),vi=Ws=>{const ws=Ws.constructor&&Ws.constructor.prototype;return re$1(ws)&&ws.hasOwnProperty("isPrototypeOf")},Un$1=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function pe$1(Ws){let ws;const oi=Array.isArray(Ws),si=typeof FileList<"u"?Ws instanceof FileList:!1;if(Ws instanceof Date)ws=new Date(Ws);else if(Ws instanceof Set)ws=new Set(Ws);else if(!(Un$1&&(Ws instanceof Blob||si))&&(oi||re$1(Ws)))if(ws=oi?[]:{},!oi&&!vi(Ws))ws=Ws;else for(const ii in Ws)Ws.hasOwnProperty(ii)&&(ws[ii]=pe$1(Ws[ii]));else return Ws;return ws}var nn$1=Ws=>Array.isArray(Ws)?Ws.filter(Boolean):[],ne$2=Ws=>Ws===void 0,k$6=(Ws,ws,oi)=>{if(!ws||!re$1(Ws))return oi;const si=nn$1(ws.split(/[,[\].]+?/)).reduce((ii,ai)=>de$2(ii)?ii:ii[ai],Ws);return ne$2(si)||si===Ws?ne$2(Ws[ws])?oi:Ws[ws]:si},be$2=Ws=>typeof Ws=="boolean",Wn$2=Ws=>/^\w*$/.test(Ws),ao$1=Ws=>nn$1(Ws.replace(/["|']|\]/g,"").split(/\.|\[/)),J$5=(Ws,ws,oi)=>{let si=-1;const ii=Wn$2(ws)?[ws]:ao$1(ws),ai=ii.length,li=ai-1;for(;++si<ai;){const ci=ii[si];let ui=oi;if(si!==li){const di=Ws[ci];ui=re$1(di)||Array.isArray(di)?di:isNaN(+ii[si+1])?{}:[]}if(ci==="__proto__"||ci==="constructor"||ci==="prototype")return;Ws[ci]=ui,Ws=Ws[ci]}return Ws};const jt$2={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xe$2={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ie$2={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},co$1=React__default.createContext(null),$n$2=()=>React__default.useContext(co$1),$d=Ws=>{const{children:ws,...oi}=Ws;return React__default.createElement(co$1.Provider,{value:oi},ws)};var lo$1=(Ws,ws,oi,si=!0)=>{const ii={defaultValues:ws._defaultValues};for(const ai in Ws)Object.defineProperty(ii,ai,{get:()=>{const li=ai;return ws._proxyFormState[li]!==xe$2.all&&(ws._proxyFormState[li]=!si||xe$2.all),oi&&(oi[li]=!0),Ws[li]}});return ii},me$2=Ws=>re$1(Ws)&&!Object.keys(Ws).length,uo$1=(Ws,ws,oi,si)=>{oi(Ws);const{name:ii,...ai}=Ws;return me$2(ai)||Object.keys(ai).length>=Object.keys(ws).length||Object.keys(ai).find(li=>ws[li]===(!si||xe$2.all))},xt$1=Ws=>Array.isArray(Ws)?Ws:[Ws],fo$1=(Ws,ws,oi)=>!Ws||!ws||Ws===ws||xt$1(Ws).some(si=>si&&(oi?si===ws:si.startsWith(ws)||ws.startsWith(si)));function zn$2(Ws){const ws=React__default.useRef(Ws);ws.current=Ws,React__default.useEffect(()=>{const oi=!Ws.disabled&&ws.current.subject&&ws.current.subject.subscribe({next:ws.current.next});return()=>{oi&&oi.unsubscribe()}},[Ws.disabled])}function yi$1(Ws){const ws=$n$2(),{control:oi=ws.control,disabled:si,name:ii,exact:ai}=Ws,[li,ci]=React__default.useState(oi._formState),ui=React__default.useRef(!0),di=React__default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),hi=React__default.useRef(ii);return hi.current=ii,zn$2({disabled:si,next:pi=>ui.current&&fo$1(hi.current,pi.name,ai)&&uo$1(pi,di.current,oi._updateFormState)&&ci({...oi._formState,...pi}),subject:oi._subjects.state}),React__default.useEffect(()=>(ui.current=!0,di.current.isValid&&oi._updateValid(!0),()=>{ui.current=!1}),[oi]),React__default.useMemo(()=>lo$1(li,oi,di.current,!1),[li,oi])}var Te$2=Ws=>typeof Ws=="string",po$1=(Ws,ws,oi,si,ii)=>Te$2(Ws)?(si&&ws.watch.add(Ws),k$6(oi,Ws,ii)):Array.isArray(Ws)?Ws.map(ai=>(si&&ws.watch.add(ai),k$6(oi,ai))):(si&&(ws.watchAll=!0),oi);function bi(Ws){const ws=$n$2(),{control:oi=ws.control,name:si,defaultValue:ii,disabled:ai,exact:li}=Ws,ci=React__default.useRef(si);ci.current=si,zn$2({disabled:ai,subject:oi._subjects.values,next:hi=>{fo$1(ci.current,hi.name,li)&&di(pe$1(po$1(ci.current,oi._names,hi.values||oi._formValues,!1,ii)))}});const[ui,di]=React__default.useState(oi._getWatch(si,ii));return React__default.useEffect(()=>oi._removeUnmounted()),ui}function wi(Ws){const ws=$n$2(),{name:oi,disabled:si,control:ii=ws.control,shouldUnregister:ai}=Ws,li=io$1(ii._names.array,oi),ci=bi({control:ii,name:oi,defaultValue:k$6(ii._formValues,oi,k$6(ii._defaultValues,oi,Ws.defaultValue)),exact:!0}),ui=yi$1({control:ii,name:oi,exact:!0}),di=React__default.useRef(ii.register(oi,{...Ws.rules,value:ci,...be$2(Ws.disabled)?{disabled:Ws.disabled}:{}})),hi=React__default.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!k$6(ui.errors,oi)},isDirty:{enumerable:!0,get:()=>!!k$6(ui.dirtyFields,oi)},isTouched:{enumerable:!0,get:()=>!!k$6(ui.touchedFields,oi)},isValidating:{enumerable:!0,get:()=>!!k$6(ui.validatingFields,oi)},error:{enumerable:!0,get:()=>k$6(ui.errors,oi)}}),[ui,oi]),pi=React__default.useMemo(()=>({name:oi,value:ci,...be$2(si)||ui.disabled?{disabled:ui.disabled||si}:{},onChange:ha=>di.current.onChange({target:{value:so$1(ha),name:oi},type:jt$2.CHANGE}),onBlur:()=>di.current.onBlur({target:{value:k$6(ii._formValues,oi),name:oi},type:jt$2.BLUR}),ref:ha=>{const ga=k$6(ii._fields,oi);ga&&ha&&(ga._f.ref={focus:()=>ha.focus(),select:()=>ha.select(),setCustomValidity:va=>ha.setCustomValidity(va),reportValidity:()=>ha.reportValidity()})}}),[oi,ii._formValues,si,ui.disabled,ci,ii._fields]);return React__default.useEffect(()=>{const ha=ii._options.shouldUnregister||ai,ga=(va,ba)=>{const wa=k$6(ii._fields,va);wa&&wa._f&&(wa._f.mount=ba)};if(ga(oi,!0),ha){const va=pe$1(k$6(ii._options.defaultValues,oi));J$5(ii._defaultValues,oi,va),ne$2(k$6(ii._formValues,oi))&&J$5(ii._formValues,oi,va)}return!li&&ii.register(oi),()=>{(li?ha&&!ii._state.action:ha)?ii.unregister(oi):ga(oi,!1)}},[oi,ii,li,ai]),React__default.useEffect(()=>{ii._updateDisabledField({disabled:si,fields:ii._fields,name:oi})},[si,oi,ii]),React__default.useMemo(()=>({field:pi,formState:ui,fieldState:hi}),[pi,ui,hi])}const zd=Ws=>Ws.render(wi(Ws));var xi=(Ws,ws,oi,si,ii)=>ws?{...oi[Ws],types:{...oi[Ws]&&oi[Ws].types?oi[Ws].types:{},[si]:ii||!0}}:{},wr$2=Ws=>({isOnSubmit:!Ws||Ws===xe$2.onSubmit,isOnBlur:Ws===xe$2.onBlur,isOnChange:Ws===xe$2.onChange,isOnAll:Ws===xe$2.all,isOnTouch:Ws===xe$2.onTouched}),xr$2=(Ws,ws,oi)=>!oi&&(ws.watchAll||ws.watch.has(Ws)||[...ws.watch].some(si=>Ws.startsWith(si)&&/^\.\w+/.test(Ws.slice(si.length))));const Ct$2=(Ws,ws,oi,si)=>{for(const ii of oi||Object.keys(Ws)){const ai=k$6(Ws,ii);if(ai){const{_f:li,...ci}=ai;if(li){if(li.refs&&li.refs[0]&&ws(li.refs[0],ii)&&!si||li.ref&&ws(li.ref,li.name)&&!si)return!0;if(Ct$2(ci,ws))break}else if(re$1(ci)&&Ct$2(ci,ws))break}}};var Ci=(Ws,ws,oi)=>{const si=xt$1(k$6(Ws,oi));return J$5(si,"root",ws[oi]),J$5(Ws,oi,si),Ws},Gn$1=Ws=>Ws.type==="file",_e$2=Ws=>typeof Ws=="function",Ht$1=Ws=>{if(!Un$1)return!1;const ws=Ws?Ws.ownerDocument:0;return Ws instanceof(ws&&ws.defaultView?ws.defaultView.HTMLElement:HTMLElement)},Wt$2=Ws=>Te$2(Ws),jn$2=Ws=>Ws.type==="radio",Kt$1=Ws=>Ws instanceof RegExp;const Cr$2={value:!1,isValid:!1},Sr$2={value:!0,isValid:!0};var mo$1=Ws=>{if(Array.isArray(Ws)){if(Ws.length>1){const ws=Ws.filter(oi=>oi&&oi.checked&&!oi.disabled).map(oi=>oi.value);return{value:ws,isValid:!!ws.length}}return Ws[0].checked&&!Ws[0].disabled?Ws[0].attributes&&!ne$2(Ws[0].attributes.value)?ne$2(Ws[0].value)||Ws[0].value===""?Sr$2:{value:Ws[0].value,isValid:!0}:Sr$2:Cr$2}return Cr$2};const Er$2={isValid:!1,value:null};var ho$1=Ws=>Array.isArray(Ws)?Ws.reduce((ws,oi)=>oi&&oi.checked&&!oi.disabled?{isValid:!0,value:oi.value}:ws,Er$2):Er$2;function Ar$2(Ws,ws,oi="validate"){if(Wt$2(Ws)||Array.isArray(Ws)&&Ws.every(Wt$2)||be$2(Ws)&&!Ws)return{type:oi,message:Wt$2(Ws)?Ws:"",ref:ws}}var et$2=Ws=>re$1(Ws)&&!Kt$1(Ws)?Ws:{value:Ws,message:""},Rr$2=async(Ws,ws,oi,si,ii,ai)=>{const{ref:li,refs:ci,required:ui,maxLength:di,minLength:hi,min:pi,max:ha,pattern:ga,validate:va,name:ba,valueAsNumber:wa,mount:xa}=Ws._f,Ca=k$6(oi,ba);if(!xa||ws.has(ba))return{};const el=ci?ci[0]:li,ku=kd=>{ii&&el.reportValidity&&(el.setCustomValidity(be$2(kd)?"":kd||""),el.reportValidity())},gd={},Ed=jn$2(li),Od=Pt$2(li),Nd=Ed||Od,Pd=(wa||Gn$1(li))&&ne$2(li.value)&&ne$2(Ca)||Ht$1(li)&&li.value===""||Ca===""||Array.isArray(Ca)&&!Ca.length,Ld=xi.bind(null,ba,si,gd),rf=(kd,Md,Td,wd=Ie$2.maxLength,Cd=Ie$2.minLength)=>{const sf=kd?Md:Td;gd[ba]={type:kd?wd:Cd,message:sf,ref:li,...Ld(kd?wd:Cd,sf)}};if(ai?!Array.isArray(Ca)||!Ca.length:ui&&(!Nd&&(Pd||de$2(Ca))||be$2(Ca)&&!Ca||Od&&!mo$1(ci).isValid||Ed&&!ho$1(ci).isValid)){const{value:kd,message:Md}=Wt$2(ui)?{value:!!ui,message:ui}:et$2(ui);if(kd&&(gd[ba]={type:Ie$2.required,message:Md,ref:el,...Ld(Ie$2.required,Md)},!si))return ku(Md),gd}if(!Pd&&(!de$2(pi)||!de$2(ha))){let kd,Md;const Td=et$2(ha),wd=et$2(pi);if(!de$2(Ca)&&!isNaN(Ca)){const Cd=li.valueAsNumber||Ca&&+Ca;de$2(Td.value)||(kd=Cd>Td.value),de$2(wd.value)||(Md=Cd<wd.value)}else{const Cd=li.valueAsDate||new Date(Ca),sf=df=>new Date(new Date().toDateString()+" "+df),of=li.type=="time",Wd=li.type=="week";Te$2(Td.value)&&Ca&&(kd=of?sf(Ca)>sf(Td.value):Wd?Ca>Td.value:Cd>new Date(Td.value)),Te$2(wd.value)&&Ca&&(Md=of?sf(Ca)<sf(wd.value):Wd?Ca<wd.value:Cd<new Date(wd.value))}if((kd||Md)&&(rf(!!kd,Td.message,wd.message,Ie$2.max,Ie$2.min),!si))return ku(gd[ba].message),gd}if((di||hi)&&!Pd&&(Te$2(Ca)||ai&&Array.isArray(Ca))){const kd=et$2(di),Md=et$2(hi),Td=!de$2(kd.value)&&Ca.length>+kd.value,wd=!de$2(Md.value)&&Ca.length<+Md.value;if((Td||wd)&&(rf(Td,kd.message,Md.message),!si))return ku(gd[ba].message),gd}if(ga&&!Pd&&Te$2(Ca)){const{value:kd,message:Md}=et$2(ga);if(Kt$1(kd)&&!Ca.match(kd)&&(gd[ba]={type:Ie$2.pattern,message:Md,ref:li,...Ld(Ie$2.pattern,Md)},!si))return ku(Md),gd}if(va){if(_e$2(va)){const kd=await va(Ca,oi),Md=Ar$2(kd,el);if(Md&&(gd[ba]={...Md,...Ld(Ie$2.validate,Md.message)},!si))return ku(Md.message),gd}else if(re$1(va)){let kd={};for(const Md in va){if(!me$2(kd)&&!si)break;const Td=Ar$2(await va[Md](Ca,oi),el,Md);Td&&(kd={...Td,...Ld(Md,Td.message)},ku(Td.message),si&&(gd[ba]=kd))}if(!me$2(kd)&&(gd[ba]={ref:el,...kd},!si))return gd}}return ku(!0),gd};function Si(Ws,ws){const oi=ws.slice(0,-1).length;let si=0;for(;si<oi;)Ws=ne$2(Ws)?si++:Ws[ws[si++]];return Ws}function Ei(Ws){for(const ws in Ws)if(Ws.hasOwnProperty(ws)&&!ne$2(Ws[ws]))return!1;return!0}function oe$3(Ws,ws){const oi=Array.isArray(ws)?ws:Wn$2(ws)?[ws]:ao$1(ws),si=oi.length===1?Ws:Si(Ws,oi),ii=oi.length-1,ai=oi[ii];return si&&delete si[ai],ii!==0&&(re$1(si)&&me$2(si)||Array.isArray(si)&&Ei(si))&&oe$3(Ws,oi.slice(0,-1)),Ws}var gn$1=()=>{let Ws=[];return{get observers(){return Ws},next:ws=>{for(const oi of Ws)oi.next&&oi.next(ws)},subscribe:ws=>(Ws.push(ws),{unsubscribe:()=>{Ws=Ws.filter(oi=>oi!==ws)}}),unsubscribe:()=>{Ws=[]}}},Tn$1=Ws=>de$2(Ws)||!oo(Ws);function Ge$2(Ws,ws){if(Tn$1(Ws)||Tn$1(ws))return Ws===ws;if(Ye$2(Ws)&&Ye$2(ws))return Ws.getTime()===ws.getTime();const oi=Object.keys(Ws),si=Object.keys(ws);if(oi.length!==si.length)return!1;for(const ii of oi){const ai=Ws[ii];if(!si.includes(ii))return!1;if(ii!=="ref"){const li=ws[ii];if(Ye$2(ai)&&Ye$2(li)||re$1(ai)&&re$1(li)||Array.isArray(ai)&&Array.isArray(li)?!Ge$2(ai,li):ai!==li)return!1}}return!0}var go$1=Ws=>Ws.type==="select-multiple",Ai=Ws=>jn$2(Ws)||Pt$2(Ws),vn$2=Ws=>Ht$1(Ws)&&Ws.isConnected,vo=Ws=>{for(const ws in Ws)if(_e$2(Ws[ws]))return!0;return!1};function Yt$1(Ws,ws={}){const oi=Array.isArray(Ws);if(re$1(Ws)||oi)for(const si in Ws)Array.isArray(Ws[si])||re$1(Ws[si])&&!vo(Ws[si])?(ws[si]=Array.isArray(Ws[si])?[]:{},Yt$1(Ws[si],ws[si])):de$2(Ws[si])||(ws[si]=!0);return ws}function yo(Ws,ws,oi){const si=Array.isArray(Ws);if(re$1(Ws)||si)for(const ii in Ws)Array.isArray(Ws[ii])||re$1(Ws[ii])&&!vo(Ws[ii])?ne$2(ws)||Tn$1(oi[ii])?oi[ii]=Array.isArray(Ws[ii])?Yt$1(Ws[ii],[]):{...Yt$1(Ws[ii])}:yo(Ws[ii],de$2(ws)?{}:ws[ii],oi[ii]):oi[ii]=!Ge$2(Ws[ii],ws[ii]);return oi}var gt$2=(Ws,ws)=>yo(Ws,ws,Yt$1(ws)),bo=(Ws,{valueAsNumber:ws,valueAsDate:oi,setValueAs:si})=>ne$2(Ws)?Ws:ws?Ws===""?NaN:Ws&&+Ws:oi&&Te$2(Ws)?new Date(Ws):si?si(Ws):Ws;function yn$2(Ws){const ws=Ws.ref;return Gn$1(ws)?ws.files:jn$2(ws)?ho$1(Ws.refs).value:go$1(ws)?[...ws.selectedOptions].map(({value:oi})=>oi):Pt$2(ws)?mo$1(Ws.refs).value:bo(ne$2(ws.value)?Ws.ref.value:ws.value,Ws)}var Ri=(Ws,ws,oi,si)=>{const ii={};for(const ai of Ws){const li=k$6(ws,ai);li&&J$5(ii,ai,li._f)}return{criteriaMode:oi,names:[...Ws],fields:ii,shouldUseNativeValidation:si}},vt$2=Ws=>ne$2(Ws)?Ws:Kt$1(Ws)?Ws.source:re$1(Ws)?Kt$1(Ws.value)?Ws.value.source:Ws.value:Ws;const Mr$2="AsyncFunction";var Mi$1=Ws=>!!Ws&&!!Ws.validate&&!!(_e$2(Ws.validate)&&Ws.validate.constructor.name===Mr$2||re$1(Ws.validate)&&Object.values(Ws.validate).find(ws=>ws.constructor.name===Mr$2)),_i$1=Ws=>Ws.mount&&(Ws.required||Ws.min||Ws.max||Ws.maxLength||Ws.minLength||Ws.pattern||Ws.validate);function _r$2(Ws,ws,oi){const si=k$6(Ws,oi);if(si||Wn$2(oi))return{error:si,name:oi};const ii=oi.split(".");for(;ii.length;){const ai=ii.join("."),li=k$6(ws,ai),ci=k$6(Ws,ai);if(li&&!Array.isArray(li)&&oi!==ai)return{name:oi};if(ci&&ci.type)return{name:ai,error:ci};ii.pop()}return{name:oi}}var Pi=(Ws,ws,oi,si,ii)=>ii.isOnAll?!1:!oi&&ii.isOnTouch?!(ws||Ws):(oi?si.isOnBlur:ii.isOnBlur)?!Ws:(oi?si.isOnChange:ii.isOnChange)?Ws:!0,Ti=(Ws,ws)=>!nn$1(k$6(Ws,ws)).length&&oe$3(Ws,ws);const ki$1={mode:xe$2.onSubmit,reValidateMode:xe$2.onChange,shouldFocusError:!0};function Oi(Ws={}){let ws={...ki$1,...Ws},oi={submitCount:0,isDirty:!1,isLoading:_e$2(ws.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:ws.errors||{},disabled:ws.disabled||!1},si={},ii=re$1(ws.defaultValues)||re$1(ws.values)?pe$1(ws.defaultValues||ws.values)||{}:{},ai=ws.shouldUnregister?{}:pe$1(ii),li={action:!1,mount:!1,watch:!1},ci={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},ui,di=0;const hi={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},pi={values:gn$1(),array:gn$1(),state:gn$1()},ha=wr$2(ws.mode),ga=wr$2(ws.reValidateMode),va=ws.criteriaMode===xe$2.all,ba=_d=>Dd=>{clearTimeout(di),di=setTimeout(_d,Dd)},wa=async _d=>{if(!ws.disabled&&(hi.isValid||_d)){const Dd=ws.resolver?me$2((await Nd()).errors):await Ld(si,!0);Dd!==oi.isValid&&pi.state.next({isValid:Dd})}},xa=(_d,Dd)=>{!ws.disabled&&(hi.isValidating||hi.validatingFields)&&((_d||Array.from(ci.mount)).forEach(tf=>{tf&&(Dd?J$5(oi.validatingFields,tf,Dd):oe$3(oi.validatingFields,tf))}),pi.state.next({validatingFields:oi.validatingFields,isValidating:!me$2(oi.validatingFields)}))},Ca=(_d,Dd=[],tf,vd,Sd=!0,Id=!0)=>{if(vd&&tf&&!ws.disabled){if(li.action=!0,Id&&Array.isArray(k$6(si,_d))){const Bd=tf(k$6(si,_d),vd.argA,vd.argB);Sd&&J$5(si,_d,Bd)}if(Id&&Array.isArray(k$6(oi.errors,_d))){const Bd=tf(k$6(oi.errors,_d),vd.argA,vd.argB);Sd&&J$5(oi.errors,_d,Bd),Ti(oi.errors,_d)}if(hi.touchedFields&&Id&&Array.isArray(k$6(oi.touchedFields,_d))){const Bd=tf(k$6(oi.touchedFields,_d),vd.argA,vd.argB);Sd&&J$5(oi.touchedFields,_d,Bd)}hi.dirtyFields&&(oi.dirtyFields=gt$2(ii,ai)),pi.state.next({name:_d,isDirty:kd(_d,Dd),dirtyFields:oi.dirtyFields,errors:oi.errors,isValid:oi.isValid})}else J$5(ai,_d,Dd)},el=(_d,Dd)=>{J$5(oi.errors,_d,Dd),pi.state.next({errors:oi.errors})},ku=_d=>{oi.errors=_d,pi.state.next({errors:oi.errors,isValid:!1})},gd=(_d,Dd,tf,vd)=>{const Sd=k$6(si,_d);if(Sd){const Id=k$6(ai,_d,ne$2(tf)?k$6(ii,_d):tf);ne$2(Id)||vd&&vd.defaultChecked||Dd?J$5(ai,_d,Dd?Id:yn$2(Sd._f)):wd(_d,Id),li.mount&&wa()}},Ed=(_d,Dd,tf,vd,Sd)=>{let Id=!1,Bd=!1;const nf={name:_d};if(!ws.disabled){const lf=!!(k$6(si,_d)&&k$6(si,_d)._f&&k$6(si,_d)._f.disabled);if(!tf||vd){hi.isDirty&&(Bd=oi.isDirty,oi.isDirty=nf.isDirty=kd(),Id=Bd!==nf.isDirty);const pf=lf||Ge$2(k$6(ii,_d),Dd);Bd=!!(!lf&&k$6(oi.dirtyFields,_d)),pf||lf?oe$3(oi.dirtyFields,_d):J$5(oi.dirtyFields,_d,!0),nf.dirtyFields=oi.dirtyFields,Id=Id||hi.dirtyFields&&Bd!==!pf}if(tf){const pf=k$6(oi.touchedFields,_d);pf||(J$5(oi.touchedFields,_d,tf),nf.touchedFields=oi.touchedFields,Id=Id||hi.touchedFields&&pf!==tf)}Id&&Sd&&pi.state.next(nf)}return Id?nf:{}},Od=(_d,Dd,tf,vd)=>{const Sd=k$6(oi.errors,_d),Id=hi.isValid&&be$2(Dd)&&oi.isValid!==Dd;if(ws.delayError&&tf?(ui=ba(()=>el(_d,tf)),ui(ws.delayError)):(clearTimeout(di),ui=null,tf?J$5(oi.errors,_d,tf):oe$3(oi.errors,_d)),(tf?!Ge$2(Sd,tf):Sd)||!me$2(vd)||Id){const Bd={...vd,...Id&&be$2(Dd)?{isValid:Dd}:{},errors:oi.errors,name:_d};oi={...oi,...Bd},pi.state.next(Bd)}},Nd=async _d=>{xa(_d,!0);const Dd=await ws.resolver(ai,ws.context,Ri(_d||ci.mount,si,ws.criteriaMode,ws.shouldUseNativeValidation));return xa(_d),Dd},Pd=async _d=>{const{errors:Dd}=await Nd(_d);if(_d)for(const tf of _d){const vd=k$6(Dd,tf);vd?J$5(oi.errors,tf,vd):oe$3(oi.errors,tf)}else oi.errors=Dd;return Dd},Ld=async(_d,Dd,tf={valid:!0})=>{for(const vd in _d){const Sd=_d[vd];if(Sd){const{_f:Id,...Bd}=Sd;if(Id){const nf=ci.array.has(Id.name),lf=Sd._f&&Mi$1(Sd._f);lf&&hi.validatingFields&&xa([vd],!0);const pf=await Rr$2(Sd,ci.disabled,ai,va,ws.shouldUseNativeValidation&&!Dd,nf);if(lf&&hi.validatingFields&&xa([vd]),pf[Id.name]&&(tf.valid=!1,Dd))break;!Dd&&(k$6(pf,Id.name)?nf?Ci(oi.errors,pf,Id.name):J$5(oi.errors,Id.name,pf[Id.name]):oe$3(oi.errors,Id.name))}!me$2(Bd)&&await Ld(Bd,Dd,tf)}}return tf.valid},rf=()=>{for(const _d of ci.unMount){const Dd=k$6(si,_d);Dd&&(Dd._f.refs?Dd._f.refs.every(tf=>!vn$2(tf)):!vn$2(Dd._f.ref))&&ff(_d)}ci.unMount=new Set},kd=(_d,Dd)=>!ws.disabled&&(_d&&Dd&&J$5(ai,_d,Dd),!Ge$2(hf(),ii)),Md=(_d,Dd,tf)=>po$1(_d,ci,{...li.mount?ai:ne$2(Dd)?ii:Te$2(_d)?{[_d]:Dd}:Dd},tf,Dd),Td=_d=>nn$1(k$6(li.mount?ai:ii,_d,ws.shouldUnregister?k$6(ii,_d,[]):[])),wd=(_d,Dd,tf={})=>{const vd=k$6(si,_d);let Sd=Dd;if(vd){const Id=vd._f;Id&&(!Id.disabled&&J$5(ai,_d,bo(Dd,Id)),Sd=Ht$1(Id.ref)&&de$2(Dd)?"":Dd,go$1(Id.ref)?[...Id.ref.options].forEach(Bd=>Bd.selected=Sd.includes(Bd.value)):Id.refs?Pt$2(Id.ref)?Id.refs.length>1?Id.refs.forEach(Bd=>(!Bd.defaultChecked||!Bd.disabled)&&(Bd.checked=Array.isArray(Sd)?!!Sd.find(nf=>nf===Bd.value):Sd===Bd.value)):Id.refs[0]&&(Id.refs[0].checked=!!Sd):Id.refs.forEach(Bd=>Bd.checked=Bd.value===Sd):Gn$1(Id.ref)?Id.ref.value="":(Id.ref.value=Sd,Id.ref.type||pi.values.next({name:_d,values:{...ai}})))}(tf.shouldDirty||tf.shouldTouch)&&Ed(_d,Sd,tf.shouldTouch,tf.shouldDirty,!0),tf.shouldValidate&&df(_d)},Cd=(_d,Dd,tf)=>{for(const vd in Dd){const Sd=Dd[vd],Id=`${_d}.${vd}`,Bd=k$6(si,Id);(ci.array.has(_d)||re$1(Sd)||Bd&&!Bd._f)&&!Ye$2(Sd)?Cd(Id,Sd,tf):wd(Id,Sd,tf)}},sf=(_d,Dd,tf={})=>{const vd=k$6(si,_d),Sd=ci.array.has(_d),Id=pe$1(Dd);J$5(ai,_d,Id),Sd?(pi.array.next({name:_d,values:{...ai}}),(hi.isDirty||hi.dirtyFields)&&tf.shouldDirty&&pi.state.next({name:_d,dirtyFields:gt$2(ii,ai),isDirty:kd(_d,Id)})):vd&&!vd._f&&!de$2(Id)?Cd(_d,Id,tf):wd(_d,Id,tf),xr$2(_d,ci)&&pi.state.next({...oi}),pi.values.next({name:li.mount?_d:void 0,values:{...ai}})},of=async _d=>{li.mount=!0;const Dd=_d.target;let tf=Dd.name,vd=!0;const Sd=k$6(si,tf),Id=()=>Dd.type?yn$2(Sd._f):so$1(_d),Bd=nf=>{vd=Number.isNaN(nf)||Ye$2(nf)&&isNaN(nf.getTime())||Ge$2(nf,k$6(ai,tf,nf))};if(Sd){let nf,lf;const pf=Id(),gf=_d.type===jt$2.BLUR||_d.type===jt$2.FOCUS_OUT,vf=!_i$1(Sd._f)&&!ws.resolver&&!k$6(oi.errors,tf)&&!Sd._f.deps||Pi(gf,k$6(oi.touchedFields,tf),oi.isSubmitted,ga,ha),bf=xr$2(tf,ci,gf);J$5(ai,tf,pf),gf?(Sd._f.onBlur&&Sd._f.onBlur(_d),ui&&ui(0)):Sd._f.onChange&&Sd._f.onChange(_d);const If=Ed(tf,pf,gf,!1),Af=!me$2(If)||bf;if(!gf&&pi.values.next({name:tf,type:_d.type,values:{...ai}}),vf)return hi.isValid&&(ws.mode==="onBlur"&&gf?wa():gf||wa()),Af&&pi.state.next({name:tf,...bf?{}:If});if(!gf&&bf&&pi.state.next({...oi}),ws.resolver){const{errors:$f}=await Nd([tf]);if(Bd(pf),vd){const Cf=_r$2(oi.errors,si,tf),kf=_r$2($f,si,Cf.name||tf);nf=kf.error,tf=kf.name,lf=me$2($f)}}else xa([tf],!0),nf=(await Rr$2(Sd,ci.disabled,ai,va,ws.shouldUseNativeValidation))[tf],xa([tf]),Bd(pf),vd&&(nf?lf=!1:hi.isValid&&(lf=await Ld(si,!0)));vd&&(Sd._f.deps&&df(Sd._f.deps),Od(tf,lf,nf,If))}},Wd=(_d,Dd)=>{if(k$6(oi.errors,Dd)&&_d.focus)return _d.focus(),1},df=async(_d,Dd={})=>{let tf,vd;const Sd=xt$1(_d);if(ws.resolver){const Id=await Pd(ne$2(_d)?_d:Sd);tf=me$2(Id),vd=_d?!Sd.some(Bd=>k$6(Id,Bd)):tf}else _d?(vd=(await Promise.all(Sd.map(async Id=>{const Bd=k$6(si,Id);return await Ld(Bd&&Bd._f?{[Id]:Bd}:Bd)}))).every(Boolean),!(!vd&&!oi.isValid)&&wa()):vd=tf=await Ld(si);return pi.state.next({...!Te$2(_d)||hi.isValid&&tf!==oi.isValid?{}:{name:_d},...ws.resolver||!_d?{isValid:tf}:{},errors:oi.errors}),Dd.shouldFocus&&!vd&&Ct$2(si,Wd,_d?Sd:ci.mount),vd},hf=_d=>{const Dd={...li.mount?ai:ii};return ne$2(_d)?Dd:Te$2(_d)?k$6(Dd,_d):_d.map(tf=>k$6(Dd,tf))},xd=(_d,Dd)=>({invalid:!!k$6((Dd||oi).errors,_d),isDirty:!!k$6((Dd||oi).dirtyFields,_d),error:k$6((Dd||oi).errors,_d),isValidating:!!k$6(oi.validatingFields,_d),isTouched:!!k$6((Dd||oi).touchedFields,_d)}),Fd=_d=>{_d&&xt$1(_d).forEach(Dd=>oe$3(oi.errors,Dd)),pi.state.next({errors:_d?oi.errors:{}})},Vd=(_d,Dd,tf)=>{const vd=(k$6(si,_d,{_f:{}})._f||{}).ref,Sd=k$6(oi.errors,_d)||{},{ref:Id,message:Bd,type:nf,...lf}=Sd;J$5(oi.errors,_d,{...lf,...Dd,ref:vd}),pi.state.next({name:_d,errors:oi.errors,isValid:!1}),tf&&tf.shouldFocus&&vd&&vd.focus&&vd.focus()},af=(_d,Dd)=>_e$2(_d)?pi.values.subscribe({next:tf=>_d(Md(void 0,Dd),tf)}):Md(_d,Dd,!0),ff=(_d,Dd={})=>{for(const tf of _d?xt$1(_d):ci.mount)ci.mount.delete(tf),ci.array.delete(tf),Dd.keepValue||(oe$3(si,tf),oe$3(ai,tf)),!Dd.keepError&&oe$3(oi.errors,tf),!Dd.keepDirty&&oe$3(oi.dirtyFields,tf),!Dd.keepTouched&&oe$3(oi.touchedFields,tf),!Dd.keepIsValidating&&oe$3(oi.validatingFields,tf),!ws.shouldUnregister&&!Dd.keepDefaultValue&&oe$3(ii,tf);pi.values.next({values:{...ai}}),pi.state.next({...oi,...Dd.keepDirty?{isDirty:kd()}:{}}),!Dd.keepIsValid&&wa()},uf=({disabled:_d,name:Dd,field:tf,fields:vd})=>{(be$2(_d)&&li.mount||_d||ci.disabled.has(Dd))&&(_d?ci.disabled.add(Dd):ci.disabled.delete(Dd),Ed(Dd,yn$2(tf?tf._f:k$6(vd,Dd)._f),!1,!1,!0))},mf=(_d,Dd={})=>{let tf=k$6(si,_d);const vd=be$2(Dd.disabled)||be$2(ws.disabled);return J$5(si,_d,{...tf||{},_f:{...tf&&tf._f?tf._f:{ref:{name:_d}},name:_d,mount:!0,...Dd}}),ci.mount.add(_d),tf?uf({field:tf,disabled:be$2(Dd.disabled)?Dd.disabled:ws.disabled,name:_d}):gd(_d,!0,Dd.value),{...vd?{disabled:Dd.disabled||ws.disabled}:{},...ws.progressive?{required:!!Dd.required,min:vt$2(Dd.min),max:vt$2(Dd.max),minLength:vt$2(Dd.minLength),maxLength:vt$2(Dd.maxLength),pattern:vt$2(Dd.pattern)}:{},name:_d,onChange:of,onBlur:of,ref:Sd=>{if(Sd){mf(_d,Dd),tf=k$6(si,_d);const Id=ne$2(Sd.value)&&Sd.querySelectorAll&&Sd.querySelectorAll("input,select,textarea")[0]||Sd,Bd=Ai(Id),nf=tf._f.refs||[];if(Bd?nf.find(lf=>lf===Id):Id===tf._f.ref)return;J$5(si,_d,{_f:{...tf._f,...Bd?{refs:[...nf.filter(vn$2),Id,...Array.isArray(k$6(ii,_d))?[{}]:[]],ref:{type:Id.type,name:_d}}:{ref:Id}}}),gd(_d,!1,void 0,Id)}else tf=k$6(si,_d,{}),tf._f&&(tf._f.mount=!1),(ws.shouldUnregister||Dd.shouldUnregister)&&!(io$1(ci.array,_d)&&li.action)&&ci.unMount.add(_d)}}},yf=()=>ws.shouldFocusError&&Ct$2(si,Wd,ci.mount),Sf=_d=>{be$2(_d)&&(pi.state.next({disabled:_d}),Ct$2(si,(Dd,tf)=>{const vd=k$6(si,tf);vd&&(Dd.disabled=vd._f.disabled||_d,Array.isArray(vd._f.refs)&&vd._f.refs.forEach(Sd=>{Sd.disabled=vd._f.disabled||_d}))},0,!1))},Of=(_d,Dd)=>async tf=>{let vd;tf&&(tf.preventDefault&&tf.preventDefault(),tf.persist&&tf.persist());let Sd=pe$1(ai);if(ci.disabled.size)for(const Id of ci.disabled)J$5(Sd,Id,void 0);if(pi.state.next({isSubmitting:!0}),ws.resolver){const{errors:Id,values:Bd}=await Nd();oi.errors=Id,Sd=Bd}else await Ld(si);if(oe$3(oi.errors,"root"),me$2(oi.errors)){pi.state.next({errors:{}});try{await _d(Sd,tf)}catch(Id){vd=Id}}else Dd&&await Dd({...oi.errors},tf),yf(),setTimeout(yf);if(pi.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:me$2(oi.errors)&&!vd,submitCount:oi.submitCount+1,errors:oi.errors}),vd)throw vd},wf=(_d,Dd={})=>{k$6(si,_d)&&(ne$2(Dd.defaultValue)?sf(_d,pe$1(k$6(ii,_d))):(sf(_d,Dd.defaultValue),J$5(ii,_d,pe$1(Dd.defaultValue))),Dd.keepTouched||oe$3(oi.touchedFields,_d),Dd.keepDirty||(oe$3(oi.dirtyFields,_d),oi.isDirty=Dd.defaultValue?kd(_d,pe$1(k$6(ii,_d))):kd()),Dd.keepError||(oe$3(oi.errors,_d),hi.isValid&&wa()),pi.state.next({...oi}))},Ef=(_d,Dd={})=>{const tf=_d?pe$1(_d):ii,vd=pe$1(tf),Sd=me$2(_d),Id=Sd?ii:vd;if(Dd.keepDefaultValues||(ii=tf),!Dd.keepValues){if(Dd.keepDirtyValues){const Bd=new Set([...ci.mount,...Object.keys(gt$2(ii,ai))]);for(const nf of Array.from(Bd))k$6(oi.dirtyFields,nf)?J$5(Id,nf,k$6(ai,nf)):sf(nf,k$6(Id,nf))}else{if(Un$1&&ne$2(_d))for(const Bd of ci.mount){const nf=k$6(si,Bd);if(nf&&nf._f){const lf=Array.isArray(nf._f.refs)?nf._f.refs[0]:nf._f.ref;if(Ht$1(lf)){const pf=lf.closest("form");if(pf){pf.reset();break}}}}si={}}ai=ws.shouldUnregister?Dd.keepDefaultValues?pe$1(ii):{}:pe$1(Id),pi.array.next({values:{...Id}}),pi.values.next({values:{...Id}})}ci={mount:Dd.keepDirtyValues?ci.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},li.mount=!hi.isValid||!!Dd.keepIsValid||!!Dd.keepDirtyValues,li.watch=!!ws.shouldUnregister,pi.state.next({submitCount:Dd.keepSubmitCount?oi.submitCount:0,isDirty:Sd?!1:Dd.keepDirty?oi.isDirty:!!(Dd.keepDefaultValues&&!Ge$2(_d,ii)),isSubmitted:Dd.keepIsSubmitted?oi.isSubmitted:!1,dirtyFields:Sd?{}:Dd.keepDirtyValues?Dd.keepDefaultValues&&ai?gt$2(ii,ai):oi.dirtyFields:Dd.keepDefaultValues&&_d?gt$2(ii,_d):Dd.keepDirty?oi.dirtyFields:{},touchedFields:Dd.keepTouched?oi.touchedFields:{},errors:Dd.keepErrors?oi.errors:{},isSubmitSuccessful:Dd.keepIsSubmitSuccessful?oi.isSubmitSuccessful:!1,isSubmitting:!1})},xf=(_d,Dd)=>Ef(_e$2(_d)?_d(ai):_d,Dd);return{control:{register:mf,unregister:ff,getFieldState:xd,handleSubmit:Of,setError:Vd,_executeSchema:Nd,_getWatch:Md,_getDirty:kd,_updateValid:wa,_removeUnmounted:rf,_updateFieldArray:Ca,_updateDisabledField:uf,_getFieldArray:Td,_reset:Ef,_resetDefaultValues:()=>_e$2(ws.defaultValues)&&ws.defaultValues().then(_d=>{xf(_d,ws.resetOptions),pi.state.next({isLoading:!1})}),_updateFormState:_d=>{oi={...oi,..._d}},_disableForm:Sf,_subjects:pi,_proxyFormState:hi,_setErrors:ku,get _fields(){return si},get _formValues(){return ai},get _state(){return li},set _state(_d){li=_d},get _defaultValues(){return ii},get _names(){return ci},set _names(_d){ci=_d},get _formState(){return oi},set _formState(_d){oi=_d},get _options(){return ws},set _options(_d){ws={...ws,..._d}}},trigger:df,register:mf,handleSubmit:Of,watch:af,setValue:sf,getValues:hf,reset:xf,resetField:wf,clearErrors:Fd,unregister:ff,setError:Vd,setFocus:(_d,Dd={})=>{const tf=k$6(si,_d),vd=tf&&tf._f;if(vd){const Sd=vd.refs?vd.refs[0]:vd.ref;Sd.focus&&(Sd.focus(),Dd.shouldSelect&&_e$2(Sd.select)&&Sd.select())}},getFieldState:xd}}function Gd(Ws={}){const ws=React__default.useRef(void 0),oi=React__default.useRef(void 0),[si,ii]=React__default.useState({isDirty:!1,isValidating:!1,isLoading:_e$2(Ws.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:Ws.errors||{},disabled:Ws.disabled||!1,defaultValues:_e$2(Ws.defaultValues)?void 0:Ws.defaultValues});ws.current||(ws.current={...Oi(Ws),formState:si});const ai=ws.current.control;return ai._options=Ws,zn$2({subject:ai._subjects.state,next:li=>{uo$1(li,ai._proxyFormState,ai._updateFormState,!0)&&ii({...ai._formState})}}),React__default.useEffect(()=>ai._disableForm(Ws.disabled),[ai,Ws.disabled]),React__default.useEffect(()=>{if(ai._proxyFormState.isDirty){const li=ai._getDirty();li!==si.isDirty&&ai._subjects.state.next({isDirty:li})}},[ai,si.isDirty]),React__default.useEffect(()=>{Ws.values&&!Ge$2(Ws.values,oi.current)?(ai._reset(Ws.values,ai._options.resetOptions),oi.current=Ws.values,ii(li=>({...li}))):ai._resetDefaultValues()},[Ws.values,ai]),React__default.useEffect(()=>{Ws.errors&&ai._setErrors(Ws.errors)},[Ws.errors,ai]),React__default.useEffect(()=>{ai._state.mount||(ai._updateValid(),ai._state.mount=!0),ai._state.watch&&(ai._state.watch=!1,ai._subjects.state.next({...ai._formState})),ai._removeUnmounted()}),React__default.useEffect(()=>{Ws.shouldUnregister&&ai._subjects.values.next({values:ai._getWatch()})},[Ws.shouldUnregister,ai]),ws.current.formState=lo$1(si,ai),ws.current}function Pr$2(Ws,ws){if(typeof Ws=="function")return Ws(ws);Ws!=null&&(Ws.current=ws)}function rn$1(...Ws){return ws=>{let oi=!1;const si=Ws.map(ii=>{const ai=Pr$2(ii,ws);return!oi&&typeof ai=="function"&&(oi=!0),ai});if(oi)return()=>{for(let ii=0;ii<si.length;ii++){const ai=si[ii];typeof ai=="function"?ai():Pr$2(Ws[ii],null)}}}}function ge$2(...Ws){return React.useCallback(rn$1(...Ws),Ws)}var St$2=React.forwardRef((Ws,ws)=>{const{children:oi,...si}=Ws,ii=React.Children.toArray(oi),ai=ii.find(Ii);if(ai){const li=ai.props.children,ci=ii.map(ui=>ui===ai?React.Children.count(li)>1?React.Children.only(null):React.isValidElement(li)?li.props.children:null:ui);return jsx(kn$1,{...si,ref:ws,children:React.isValidElement(li)?React.cloneElement(li,void 0,ci):null})}return jsx(kn$1,{...si,ref:ws,children:oi})});St$2.displayName="Slot";var kn$1=React.forwardRef((Ws,ws)=>{const{children:oi,...si}=Ws;if(React.isValidElement(oi)){const ii=Ni(oi);return React.cloneElement(oi,{...Fi(si,oi.props),ref:ws?rn$1(ws,ii):ii})}return React.Children.count(oi)>1?React.Children.only(null):null});kn$1.displayName="SlotClone";var Di$1=({children:Ws})=>jsx(Fragment,{children:Ws});function Ii(Ws){return React.isValidElement(Ws)&&Ws.type===Di$1}function Fi(Ws,ws){const oi={...ws};for(const si in ws){const ii=Ws[si],ai=ws[si];/^on[A-Z]/.test(si)?ii&&ai?oi[si]=(...li)=>{ai(...li),ii(...li)}:ii&&(oi[si]=ii):si==="style"?oi[si]={...ii,...ai}:si==="className"&&(oi[si]=[ii,ai].filter(Boolean).join(" "))}return{...Ws,...oi}}function Ni(Ws){var ws,oi;let si=(ws=Object.getOwnPropertyDescriptor(Ws.props,"ref"))==null?void 0:ws.get,ii=si&&"isReactWarning"in si&&si.isReactWarning;return ii?Ws.ref:(si=(oi=Object.getOwnPropertyDescriptor(Ws,"ref"))==null?void 0:oi.get,ii=si&&"isReactWarning"in si&&si.isReactWarning,ii?Ws.props.ref:Ws.props.ref||Ws.ref)}var Li$1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],se$2=Li$1.reduce((Ws,ws)=>{const oi=React.forwardRef((si,ii)=>{const{asChild:ai,...li}=si,ci=ai?St$2:ws;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),jsx(ci,{...li,ref:ii})});return oi.displayName=`Primitive.${ws}`,{...Ws,[ws]:oi}},{});function wo$1(Ws,ws){Ws&&ReactDOM.flushSync(()=>Ws.dispatchEvent(ws))}function xo(Ws){var ws,oi,si="";if(typeof Ws=="string"||typeof Ws=="number")si+=Ws;else if(typeof Ws=="object")if(Array.isArray(Ws)){var ii=Ws.length;for(ws=0;ws<ii;ws++)Ws[ws]&&(oi=xo(Ws[ws]))&&(si&&(si+=" "),si+=oi)}else for(oi in Ws)Ws[oi]&&(si&&(si+=" "),si+=oi);return si}function jd(){for(var Ws,ws,oi=0,si="",ii=arguments.length;oi<ii;oi++)(Ws=arguments[oi])&&(ws=xo(Ws))&&(si&&(si+=" "),si+=ws);return si}const Hn$1="-",Vi=Ws=>{const ws=Ui(Ws),{conflictingClassGroups:oi,conflictingClassGroupModifiers:si}=Ws;return{getClassGroupId:ii=>{const ai=ii.split(Hn$1);return ai[0]===""&&ai.length!==1&&ai.shift(),Co(ai,ws)||Bi(ii)},getConflictingClassGroupIds:(ii,ai)=>{const li=oi[ii]||[];return ai&&si[ii]?[...li,...si[ii]]:li}}},Co=(Ws,ws)=>{var oi;if(Ws.length===0)return ws.classGroupId;const si=Ws[0],ii=ws.nextPart.get(si),ai=ii?Co(Ws.slice(1),ii):void 0;if(ai)return ai;if(ws.validators.length===0)return;const li=Ws.join(Hn$1);return(oi=ws.validators.find(({validator:ci})=>ci(li)))==null?void 0:oi.classGroupId},Tr$2=/^\[(.+)\]$/,Bi=Ws=>{if(Tr$2.test(Ws)){const ws=Tr$2.exec(Ws)[1],oi=ws==null?void 0:ws.substring(0,ws.indexOf(":"));if(oi)return"arbitrary.."+oi}},Ui=Ws=>{const{theme:ws,prefix:oi}=Ws,si={nextPart:new Map,validators:[]};return $i(Object.entries(Ws.classGroups),oi).forEach(([ii,ai])=>{On$2(ai,si,ii,ws)}),si},On$2=(Ws,ws,oi,si)=>{Ws.forEach(ii=>{if(typeof ii=="string"){const ai=ii===""?ws:kr$2(ws,ii);ai.classGroupId=oi;return}if(typeof ii=="function"){if(Wi(ii)){On$2(ii(si),ws,oi,si);return}ws.validators.push({validator:ii,classGroupId:oi});return}Object.entries(ii).forEach(([ai,li])=>{On$2(li,kr$2(ws,ai),oi,si)})})},kr$2=(Ws,ws)=>{let oi=Ws;return ws.split(Hn$1).forEach(si=>{oi.nextPart.has(si)||oi.nextPart.set(si,{nextPart:new Map,validators:[]}),oi=oi.nextPart.get(si)}),oi},Wi=Ws=>Ws.isThemeGetter,$i=(Ws,ws)=>ws?Ws.map(([oi,si])=>{const ii=si.map(ai=>typeof ai=="string"?ws+ai:typeof ai=="object"?Object.fromEntries(Object.entries(ai).map(([li,ci])=>[ws+li,ci])):ai);return[oi,ii]}):Ws,zi=Ws=>{if(Ws<1)return{get:()=>{},set:()=>{}};let ws=0,oi=new Map,si=new Map;const ii=(ai,li)=>{oi.set(ai,li),ws++,ws>Ws&&(ws=0,si=oi,oi=new Map)};return{get(ai){let li=oi.get(ai);if(li!==void 0)return li;if((li=si.get(ai))!==void 0)return ii(ai,li),li},set(ai,li){oi.has(ai)?oi.set(ai,li):ii(ai,li)}}},So="!",Gi=Ws=>{const{separator:ws,experimentalParseClassName:oi}=Ws,si=ws.length===1,ii=ws[0],ai=ws.length,li=ci=>{const ui=[];let di=0,hi=0,pi;for(let wa=0;wa<ci.length;wa++){let xa=ci[wa];if(di===0){if(xa===ii&&(si||ci.slice(wa,wa+ai)===ws)){ui.push(ci.slice(hi,wa)),hi=wa+ai;continue}if(xa==="/"){pi=wa;continue}}xa==="["?di++:xa==="]"&&di--}const ha=ui.length===0?ci:ci.substring(hi),ga=ha.startsWith(So),va=ga?ha.substring(1):ha,ba=pi&&pi>hi?pi-hi:void 0;return{modifiers:ui,hasImportantModifier:ga,baseClassName:va,maybePostfixModifierPosition:ba}};return oi?ci=>oi({className:ci,parseClassName:li}):li},ji$1=Ws=>{if(Ws.length<=1)return Ws;const ws=[];let oi=[];return Ws.forEach(si=>{si[0]==="["?(ws.push(...oi.sort(),si),oi=[]):oi.push(si)}),ws.push(...oi.sort()),ws},Hi=Ws=>({cache:zi(Ws.cacheSize),parseClassName:Gi(Ws),...Vi(Ws)}),Ki=/\s+/,Yi=(Ws,ws)=>{const{parseClassName:oi,getClassGroupId:si,getConflictingClassGroupIds:ii}=ws,ai=[],li=Ws.trim().split(Ki);let ci="";for(let ui=li.length-1;ui>=0;ui-=1){const di=li[ui],{modifiers:hi,hasImportantModifier:pi,baseClassName:ha,maybePostfixModifierPosition:ga}=oi(di);let va=!!ga,ba=si(va?ha.substring(0,ga):ha);if(!ba){if(!va){ci=di+(ci.length>0?" "+ci:ci);continue}if(ba=si(ha),!ba){ci=di+(ci.length>0?" "+ci:ci);continue}va=!1}const wa=ji$1(hi).join(":"),xa=pi?wa+So:wa,Ca=xa+ba;if(ai.includes(Ca))continue;ai.push(Ca);const el=ii(ba,va);for(let ku=0;ku<el.length;++ku){const gd=el[ku];ai.push(xa+gd)}ci=di+(ci.length>0?" "+ci:ci)}return ci};function Xi(){let Ws=0,ws,oi,si="";for(;Ws<arguments.length;)(ws=arguments[Ws++])&&(oi=Eo$1(ws))&&(si&&(si+=" "),si+=oi);return si}const Eo$1=Ws=>{if(typeof Ws=="string")return Ws;let ws,oi="";for(let si=0;si<Ws.length;si++)Ws[si]&&(ws=Eo$1(Ws[si]))&&(oi&&(oi+=" "),oi+=ws);return oi};function qi(Ws,...ws){let oi,si,ii,ai=li;function li(ui){const di=ws.reduce((hi,pi)=>pi(hi),Ws());return oi=Hi(di),si=oi.cache.get,ii=oi.cache.set,ai=ci,ci(ui)}function ci(ui){const di=si(ui);if(di)return di;const hi=Yi(ui,oi);return ii(ui,hi),hi}return function(){return ai(Xi.apply(null,arguments))}}const ee$1=Ws=>{const ws=oi=>oi[Ws]||[];return ws.isThemeGetter=!0,ws},Ao=/^\[(?:([a-z-]+):)?(.+)\]$/i,Zi=/^\d+\/\d+$/,Qi=new Set(["px","full","screen"]),Ji=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ea=/\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$/,ta=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,na=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ra=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fe$2=Ws=>ot$1(Ws)||Qi.has(Ws)||Zi.test(Ws),We$2=Ws=>ct$1(Ws,"length",da$1),ot$1=Ws=>!!Ws&&!Number.isNaN(Number(Ws)),bn$1=Ws=>ct$1(Ws,"number",ot$1),yt$1=Ws=>!!Ws&&Number.isInteger(Number(Ws)),oa=Ws=>Ws.endsWith("%")&&ot$1(Ws.slice(0,-1)),z$5=Ws=>Ao.test(Ws),$e$2=Ws=>Ji.test(Ws),sa=new Set(["length","size","percentage"]),ia=Ws=>ct$1(Ws,sa,Ro),aa=Ws=>ct$1(Ws,"position",Ro),ca=new Set(["image","url"]),la=Ws=>ct$1(Ws,ca,pa$1),ua$1=Ws=>ct$1(Ws,"",fa$1),bt$2=()=>!0,ct$1=(Ws,ws,oi)=>{const si=Ao.exec(Ws);return si?si[1]?typeof ws=="string"?si[1]===ws:ws.has(si[1]):oi(si[2]):!1},da$1=Ws=>ea.test(Ws)&&!ta.test(Ws),Ro=()=>!1,fa$1=Ws=>na.test(Ws),pa$1=Ws=>ra.test(Ws),ma$1=()=>{const Ws=ee$1("colors"),ws=ee$1("spacing"),oi=ee$1("blur"),si=ee$1("brightness"),ii=ee$1("borderColor"),ai=ee$1("borderRadius"),li=ee$1("borderSpacing"),ci=ee$1("borderWidth"),ui=ee$1("contrast"),di=ee$1("grayscale"),hi=ee$1("hueRotate"),pi=ee$1("invert"),ha=ee$1("gap"),ga=ee$1("gradientColorStops"),va=ee$1("gradientColorStopPositions"),ba=ee$1("inset"),wa=ee$1("margin"),xa=ee$1("opacity"),Ca=ee$1("padding"),el=ee$1("saturate"),ku=ee$1("scale"),gd=ee$1("sepia"),Ed=ee$1("skew"),Od=ee$1("space"),Nd=ee$1("translate"),Pd=()=>["auto","contain","none"],Ld=()=>["auto","hidden","clip","visible","scroll"],rf=()=>["auto",z$5,ws],kd=()=>[z$5,ws],Md=()=>["",Fe$2,We$2],Td=()=>["auto",ot$1,z$5],wd=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Cd=()=>["solid","dashed","dotted","double","none"],sf=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],of=()=>["start","end","center","between","around","evenly","stretch"],Wd=()=>["","0",z$5],df=()=>["auto","avoid","all","avoid-page","page","left","right","column"],hf=()=>[ot$1,z$5];return{cacheSize:500,separator:":",theme:{colors:[bt$2],spacing:[Fe$2,We$2],blur:["none","",$e$2,z$5],brightness:hf(),borderColor:[Ws],borderRadius:["none","","full",$e$2,z$5],borderSpacing:kd(),borderWidth:Md(),contrast:hf(),grayscale:Wd(),hueRotate:hf(),invert:Wd(),gap:kd(),gradientColorStops:[Ws],gradientColorStopPositions:[oa,We$2],inset:rf(),margin:rf(),opacity:hf(),padding:kd(),saturate:hf(),scale:hf(),sepia:Wd(),skew:hf(),space:kd(),translate:kd()},classGroups:{aspect:[{aspect:["auto","square","video",z$5]}],container:["container"],columns:[{columns:[$e$2]}],"break-after":[{"break-after":df()}],"break-before":[{"break-before":df()}],"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"],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:[...wd(),z$5]}],overflow:[{overflow:Ld()}],"overflow-x":[{"overflow-x":Ld()}],"overflow-y":[{"overflow-y":Ld()}],overscroll:[{overscroll:Pd()}],"overscroll-x":[{"overscroll-x":Pd()}],"overscroll-y":[{"overscroll-y":Pd()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[ba]}],"inset-x":[{"inset-x":[ba]}],"inset-y":[{"inset-y":[ba]}],start:[{start:[ba]}],end:[{end:[ba]}],top:[{top:[ba]}],right:[{right:[ba]}],bottom:[{bottom:[ba]}],left:[{left:[ba]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",yt$1,z$5]}],basis:[{basis:rf()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",z$5]}],grow:[{grow:Wd()}],shrink:[{shrink:Wd()}],order:[{order:["first","last","none",yt$1,z$5]}],"grid-cols":[{"grid-cols":[bt$2]}],"col-start-end":[{col:["auto",{span:["full",yt$1,z$5]},z$5]}],"col-start":[{"col-start":Td()}],"col-end":[{"col-end":Td()}],"grid-rows":[{"grid-rows":[bt$2]}],"row-start-end":[{row:["auto",{span:[yt$1,z$5]},z$5]}],"row-start":[{"row-start":Td()}],"row-end":[{"row-end":Td()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",z$5]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",z$5]}],gap:[{gap:[ha]}],"gap-x":[{"gap-x":[ha]}],"gap-y":[{"gap-y":[ha]}],"justify-content":[{justify:["normal",...of()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...of(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...of(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[Ca]}],px:[{px:[Ca]}],py:[{py:[Ca]}],ps:[{ps:[Ca]}],pe:[{pe:[Ca]}],pt:[{pt:[Ca]}],pr:[{pr:[Ca]}],pb:[{pb:[Ca]}],pl:[{pl:[Ca]}],m:[{m:[wa]}],mx:[{mx:[wa]}],my:[{my:[wa]}],ms:[{ms:[wa]}],me:[{me:[wa]}],mt:[{mt:[wa]}],mr:[{mr:[wa]}],mb:[{mb:[wa]}],ml:[{ml:[wa]}],"space-x":[{"space-x":[Od]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Od]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",z$5,ws]}],"min-w":[{"min-w":[z$5,ws,"min","max","fit"]}],"max-w":[{"max-w":[z$5,ws,"none","full","min","max","fit","prose",{screen:[$e$2]},$e$2]}],h:[{h:[z$5,ws,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[z$5,ws,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[z$5,ws,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[z$5,ws,"auto","min","max","fit"]}],"font-size":[{text:["base",$e$2,We$2]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",bn$1]}],"font-family":[{font:[bt$2]}],"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:["tighter","tight","normal","wide","wider","widest",z$5]}],"line-clamp":[{"line-clamp":["none",ot$1,bn$1]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Fe$2,z$5]}],"list-image":[{"list-image":["none",z$5]}],"list-style-type":[{list:["none","disc","decimal",z$5]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[Ws]}],"placeholder-opacity":[{"placeholder-opacity":[xa]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[Ws]}],"text-opacity":[{"text-opacity":[xa]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Cd(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Fe$2,We$2]}],"underline-offset":[{"underline-offset":["auto",Fe$2,z$5]}],"text-decoration-color":[{decoration:[Ws]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:kd()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",z$5]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",z$5]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[xa]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...wd(),aa]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ia]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},la]}],"bg-color":[{bg:[Ws]}],"gradient-from-pos":[{from:[va]}],"gradient-via-pos":[{via:[va]}],"gradient-to-pos":[{to:[va]}],"gradient-from":[{from:[ga]}],"gradient-via":[{via:[ga]}],"gradient-to":[{to:[ga]}],rounded:[{rounded:[ai]}],"rounded-s":[{"rounded-s":[ai]}],"rounded-e":[{"rounded-e":[ai]}],"rounded-t":[{"rounded-t":[ai]}],"rounded-r":[{"rounded-r":[ai]}],"rounded-b":[{"rounded-b":[ai]}],"rounded-l":[{"rounded-l":[ai]}],"rounded-ss":[{"rounded-ss":[ai]}],"rounded-se":[{"rounded-se":[ai]}],"rounded-ee":[{"rounded-ee":[ai]}],"rounded-es":[{"rounded-es":[ai]}],"rounded-tl":[{"rounded-tl":[ai]}],"rounded-tr":[{"rounded-tr":[ai]}],"rounded-br":[{"rounded-br":[ai]}],"rounded-bl":[{"rounded-bl":[ai]}],"border-w":[{border:[ci]}],"border-w-x":[{"border-x":[ci]}],"border-w-y":[{"border-y":[ci]}],"border-w-s":[{"border-s":[ci]}],"border-w-e":[{"border-e":[ci]}],"border-w-t":[{"border-t":[ci]}],"border-w-r":[{"border-r":[ci]}],"border-w-b":[{"border-b":[ci]}],"border-w-l":[{"border-l":[ci]}],"border-opacity":[{"border-opacity":[xa]}],"border-style":[{border:[...Cd(),"hidden"]}],"divide-x":[{"divide-x":[ci]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[ci]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[xa]}],"divide-style":[{divide:Cd()}],"border-color":[{border:[ii]}],"border-color-x":[{"border-x":[ii]}],"border-color-y":[{"border-y":[ii]}],"border-color-s":[{"border-s":[ii]}],"border-color-e":[{"border-e":[ii]}],"border-color-t":[{"border-t":[ii]}],"border-color-r":[{"border-r":[ii]}],"border-color-b":[{"border-b":[ii]}],"border-color-l":[{"border-l":[ii]}],"divide-color":[{divide:[ii]}],"outline-style":[{outline:["",...Cd()]}],"outline-offset":[{"outline-offset":[Fe$2,z$5]}],"outline-w":[{outline:[Fe$2,We$2]}],"outline-color":[{outline:[Ws]}],"ring-w":[{ring:Md()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[Ws]}],"ring-opacity":[{"ring-opacity":[xa]}],"ring-offset-w":[{"ring-offset":[Fe$2,We$2]}],"ring-offset-color":[{"ring-offset":[Ws]}],shadow:[{shadow:["","inner","none",$e$2,ua$1]}],"shadow-color":[{shadow:[bt$2]}],opacity:[{opacity:[xa]}],"mix-blend":[{"mix-blend":[...sf(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":sf()}],filter:[{filter:["","none"]}],blur:[{blur:[oi]}],brightness:[{brightness:[si]}],contrast:[{contrast:[ui]}],"drop-shadow":[{"drop-shadow":["","none",$e$2,z$5]}],grayscale:[{grayscale:[di]}],"hue-rotate":[{"hue-rotate":[hi]}],invert:[{invert:[pi]}],saturate:[{saturate:[el]}],sepia:[{sepia:[gd]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[oi]}],"backdrop-brightness":[{"backdrop-brightness":[si]}],"backdrop-contrast":[{"backdrop-contrast":[ui]}],"backdrop-grayscale":[{"backdrop-grayscale":[di]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[hi]}],"backdrop-invert":[{"backdrop-invert":[pi]}],"backdrop-opacity":[{"backdrop-opacity":[xa]}],"backdrop-saturate":[{"backdrop-saturate":[el]}],"backdrop-sepia":[{"backdrop-sepia":[gd]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[li]}],"border-spacing-x":[{"border-spacing-x":[li]}],"border-spacing-y":[{"border-spacing-y":[li]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",z$5]}],duration:[{duration:hf()}],ease:[{ease:["linear","in","out","in-out",z$5]}],delay:[{delay:hf()}],animate:[{animate:["none","spin","ping","pulse","bounce",z$5]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[ku]}],"scale-x":[{"scale-x":[ku]}],"scale-y":[{"scale-y":[ku]}],rotate:[{rotate:[yt$1,z$5]}],"translate-x":[{"translate-x":[Nd]}],"translate-y":[{"translate-y":[Nd]}],"skew-x":[{"skew-x":[Ed]}],"skew-y":[{"skew-y":[Ed]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",z$5]}],accent:[{accent:["auto",Ws]}],appearance:[{appearance:["none","auto"]}],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",z$5]}],"caret-color":[{caret:[Ws]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":kd()}],"scroll-mx":[{"scroll-mx":kd()}],"scroll-my":[{"scroll-my":kd()}],"scroll-ms":[{"scroll-ms":kd()}],"scroll-me":[{"scroll-me":kd()}],"scroll-mt":[{"scroll-mt":kd()}],"scroll-mr":[{"scroll-mr":kd()}],"scroll-mb":[{"scroll-mb":kd()}],"scroll-ml":[{"scroll-ml":kd()}],"scroll-p":[{"scroll-p":kd()}],"scroll-px":[{"scroll-px":kd()}],"scroll-py":[{"scroll-py":kd()}],"scroll-ps":[{"scroll-ps":kd()}],"scroll-pe":[{"scroll-pe":kd()}],"scroll-pt":[{"scroll-pt":kd()}],"scroll-pr":[{"scroll-pr":kd()}],"scroll-pb":[{"scroll-pb":kd()}],"scroll-pl":[{"scroll-pl":kd()}],"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",z$5]}],fill:[{fill:[Ws,"none"]}],"stroke-w":[{stroke:[Fe$2,We$2,bn$1]}],stroke:[{stroke:[Ws,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Hd=qi(ma$1);function Sa(Ws){return Ws?typeof Ws=="number"?{width:Ws.toString()+"px",height:Ws.toString()+"px"}:{width:Ws,height:Ws}:{}}const Ea=(Ws,ws,oi)=>{const si=Ws[ws];return si?typeof si=="function"?si():Promise.resolve(si):new Promise((ii,ai)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(ai.bind(null,new Error("Unknown variable dynamic import: "+ws+(ws.split("/").length!==oi?". Note that variables only represent file names one level deep.":""))))})};function Aa(Ws){return jsx("div",{style:{width:Ws.width,height:Ws.height}})}function Ra(Ws){try{return lazy(()=>Ea(Object.assign({"../../../assets/icon-components/ArrowFilledRight.tsx":()=>__vitePreload(()=>import("./ArrowFilledRight-blx8xu7X-D3d8PUWh.js"),[]),"../../../assets/icon-components/ArrowLeft.tsx":()=>__vitePreload(()=>import("./ArrowLeft-7pYNK4eX-8ZR_YHAJ.js"),[]),"../../../assets/icon-components/ArrowUp.tsx":()=>__vitePreload(()=>import("./ArrowUp-Bbr_dwo_-C5ppCQo4.js"),[]),"../../../assets/icon-components/BarChart.tsx":()=>__vitePreload(()=>import("./BarChart-B0G05Nfd-CHDJ7OaJ.js"),[]),"../../../assets/icon-components/BaseArrowLeft.tsx":()=>__vitePreload(()=>import("./BaseArrowLeft-DBzhFHMt-Dkbf2sWs.js"),[]),"../../../assets/icon-components/BaseArrowRight.tsx":()=>__vitePreload(()=>import("./BaseArrowRight-DYQTBWAs-CkkPllYm.js"),[]),"../../../assets/icon-components/Braces.tsx":()=>__vitePreload(()=>import("./Braces-N-sH2Zyc-3LcexUsR.js"),[]),"../../../assets/icon-components/Branch.tsx":()=>__vitePreload(()=>import("./Branch-CWdBw1_P-CmGdOXsI.js"),[]),"../../../assets/icon-components/BrickGlobe.tsx":()=>__vitePreload(()=>import("./BrickGlobe-67zaG6_H-DP0By6z_.js"),[]),"../../../assets/icon-components/Briefcase.tsx":()=>__vitePreload(()=>import("./Briefcase-CedW3KRR-DO5_k15F.js"),[]),"../../../assets/icon-components/Calendar.tsx":()=>__vitePreload(()=>import("./Calendar-C-6HV96D-YetudWvP.js"),[]),"../../../assets/icon-components/CalendarTime.tsx":()=>__vitePreload(()=>import("./CalendarTime-Bhjzlgn_-BVlYgNLL.js"),[]),"../../../assets/icon-components/Caret.tsx":()=>__vitePreload(()=>import("./Caret-Ep0j0fz2-By3ojfim.js"),[]),"../../../assets/icon-components/CaretDown.tsx":()=>__vitePreload(()=>import("./CaretDown-3X7LFYBf-C43xdKg8.js"),[]),"../../../assets/icon-components/CaretLeft.tsx":()=>__vitePreload(()=>import("./CaretLeft-Df3E-68c-wke5zKLt.js"),[]),"../../../assets/icon-components/CaretRight.tsx":()=>__vitePreload(()=>import("./CaretRight-DSVWUSka-Cx0Mkcqa.js"),[]),"../../../assets/icon-components/CaretSort.tsx":()=>__vitePreload(()=>import("./CaretSort-BkGdLETT-DVOzEEqR.js"),[]),"../../../assets/icon-components/Check.tsx":()=>__vitePreload(()=>import("./Check-DV-U4AEq-B582NMZp.js"),[]),"../../../assets/icon-components/CheckCircle.tsx":()=>__vitePreload(()=>import("./CheckCircle-DI5fEgGd-CVF4LDhR.js"),[]),"../../../assets/icon-components/CheckCircleFill.tsx":()=>__vitePreload(()=>import("./CheckCircleFill-C-F0v5mB-BSW1YMqM.js"),[]),"../../../assets/icon-components/Checkmark.tsx":()=>__vitePreload(()=>import("./Checkmark-BXnfChpo-CyQitGI2.js"),[]),"../../../assets/icon-components/ChevronDown.tsx":()=>__vitePreload(()=>import("./ChevronDown-ouBxrU-k-eUsCPXcB.js"),[]),"../../../assets/icon-components/Circle.tsx":()=>__vitePreload(()=>import("./Circle-n3-Wh4HS-8dOehHQf.js"),[]),"../../../assets/icon-components/CircleInfo.tsx":()=>__vitePreload(()=>import("./CircleInfo-BhZY3C2Q-CZgYK1h2.js"),[]),"../../../assets/icon-components/Clock.tsx":()=>__vitePreload(()=>import("./Clock-DF-XMxha-CudavWaE.js"),[]),"../../../assets/icon-components/ClockFill.tsx":()=>__vitePreload(()=>import("./ClockFill-Bd0t48q7-CcfHiJtH.js"),[]),"../../../assets/icon-components/CloudSlash.tsx":()=>__vitePreload(()=>import("./CloudSlash-B-zJBjaD-CxVyp-Ac.js"),[]),"../../../assets/icon-components/Collapse.tsx":()=>__vitePreload(()=>import("./Collapse-DRDB8Czs-CGcuZQgy.js"),[]),"../../../assets/icon-components/Connect.tsx":()=>__vitePreload(()=>import("./Connect-Dme-qfKq-CgniLji8.js"),[]),"../../../assets/icon-components/Copy.tsx":()=>__vitePreload(()=>import("./Copy-ms9-7m7Y-CkOtWZ6m.js"),[]),"../../../assets/icon-components/CrossCircle.tsx":()=>__vitePreload(()=>import("./CrossCircle-B6ZawoOx-z5-kkOo3.js"),[]),"../../../assets/icon-components/Danger.tsx":()=>__vitePreload(()=>import("./Danger-KM8BZjue-CLu7nxgz.js"),[]),"../../../assets/icon-components/Discord.tsx":()=>__vitePreload(()=>import("./Discord-CAS0Cj7s-CcsBWpnf.js"),[]),"../../../assets/icon-components/Drive.tsx":()=>__vitePreload(()=>import("./Drive-GMcgBcIY-CzahDx9j.js"),[]),"../../../assets/icon-components/Edit.tsx":()=>__vitePreload(()=>import("./Edit-Dr-ZiMSE-D9GlgGu8.js"),[]),"../../../assets/icon-components/Ellipsis.tsx":()=>__vitePreload(()=>import("./Ellipsis-XK8AwMEC-BuVBeYhB.js"),[]),"../../../assets/icon-components/Error.tsx":()=>__vitePreload(()=>import("./Error-BmIZ2ZUy-CphzuMLn.js"),[]),"../../../assets/icon-components/Exclamation.tsx":()=>__vitePreload(()=>import("./Exclamation-CVsNS_QS-DLccamql.js"),[]),"../../../assets/icon-components/File.tsx":()=>__vitePreload(()=>import("./File-Ba7ClyaL-BU1g1wjO.js"),[]),"../../../assets/icon-components/FilesEarmark.tsx":()=>__vitePreload(()=>import("./FilesEarmark-CyrCQy8E-Bhut4E02.js"),[]),"../../../assets/icon-components/FolderClose.tsx":()=>__vitePreload(()=>import("./FolderClose-DG_qHisc-CH6NoBuu.js"),[]),"../../../assets/icon-components/FolderOpen.tsx":()=>__vitePreload(()=>import("./FolderOpen-kDoWFkJO-Cciutkdg.js"),[]),"../../../assets/icon-components/FolderPlus.tsx":()=>__vitePreload(()=>import("./FolderPlus-CSBSl9lZ-CifD0ek9.js"),[]),"../../../assets/icon-components/Forum.tsx":()=>__vitePreload(()=>import("./Forum-DZ-CkLFh-BwabccAX.js"),[]),"../../../assets/icon-components/Gear.tsx":()=>__vitePreload(()=>import("./Gear-cUlHJ4q6-B9R2l_9_.js"),[]),"../../../assets/icon-components/Github.tsx":()=>__vitePreload(()=>import("./Github-0PLiINY0-CjkZIHCO.js"),[]),"../../../assets/icon-components/Globe.tsx":()=>__vitePreload(()=>import("./Globe-CIYqVkpa-CL530H46.js"),[]),"../../../assets/icon-components/GlobeWww.tsx":()=>__vitePreload(()=>import("./GlobeWww-DN4yKujh-Ci7aa5CE.js"),[]),"../../../assets/icon-components/Hdd.tsx":()=>__vitePreload(()=>import("./Hdd-Dn_LdJIh-CJ6x9Bve.js"),[]),"../../../assets/icon-components/History.tsx":()=>__vitePreload(()=>import("./History-BP4SmaS_-P4WBKyqX.js"),[]),"../../../assets/icon-components/InfoSquare.tsx":()=>__vitePreload(()=>import("./InfoSquare-C98JaLiz-yPcGR71f.js"),[]),"../../../assets/icon-components/Link.tsx":()=>__vitePreload(()=>import("./Link-BF7aZjVu-CXIVQOz6.js"),[]),"../../../assets/icon-components/Linkedin.tsx":()=>__vitePreload(()=>import("./Linkedin-DJwIkS6q-Dkb5Tp_Z.js"),[]),"../../../assets/icon-components/Lock.tsx":()=>__vitePreload(()=>import("./Lock-PyaFHdNS-D_qxRTye.js"),[]),"../../../assets/icon-components/M.tsx":()=>__vitePreload(()=>import("./M-DozhhPMY-DBQw97P_.js"),[]),"../../../assets/icon-components/PackageManager.tsx":()=>__vitePreload(()=>import("./PackageManager-B-MUWliB-bW01ZQSP.js"),[]),"../../../assets/icon-components/Pencil.tsx":()=>__vitePreload(()=>import("./Pencil-D7lvxXIP-D830iveq.js"),[]),"../../../assets/icon-components/People.tsx":()=>__vitePreload(()=>import("./People-CUB8LYKf-CyJmMqcw.js"),[]),"../../../assets/icon-components/Person.tsx":()=>__vitePreload(()=>import("./Person-DuL4PQzm-ttQR0nPy.js"),[]),"../../../assets/icon-components/Pin.tsx":()=>__vitePreload(()=>import("./Pin-DF70btCU-D53eCMAz.js"),[]),"../../../assets/icon-components/PinFilled.tsx":()=>__vitePreload(()=>import("./PinFilled-vImzS0do-CMXfFW67.js"),[]),"../../../assets/icon-components/Plus.tsx":()=>__vitePreload(()=>import("./Plus-DPFWGJM4-BztpK8li.js"),[]),"../../../assets/icon-components/PlusCircle.tsx":()=>__vitePreload(()=>import("./PlusCircle-BEnWRjHa-w5zztKGx.js"),[]),"../../../assets/icon-components/PowerhouseLogoSmall.tsx":()=>__vitePreload(()=>import("./PowerhouseLogoSmall-CmO95IAS-CDGLkst3.js"),[]),"../../../assets/icon-components/Project.tsx":()=>__vitePreload(()=>import("./Project-BlXuclr0-EsBam9d0.js"),[]),"../../../assets/icon-components/QuestionSquare.tsx":()=>__vitePreload(()=>import("./QuestionSquare-B6O9Le7r-CDaw1i6L.js"),[]),"../../../assets/icon-components/RedoArrow.tsx":()=>__vitePreload(()=>import("./RedoArrow-BJeEsiph-BbidqIFP.js"),[]),"../../../assets/icon-components/Reload.tsx":()=>__vitePreload(()=>import("./Reload-6C2CYgrl-DPZbA7yl.js"),[]),"../../../assets/icon-components/Renown.tsx":()=>__vitePreload(()=>import("./Renown-6m7hx37h-CItksi2j.js"),[]),"../../../assets/icon-components/RenownHover.tsx":()=>__vitePreload(()=>import("./RenownHover-CQ0TZHZv-cYQgnwQW.js"),[]),"../../../assets/icon-components/Ring.tsx":()=>__vitePreload(()=>import("./Ring-DKv0gnwT-CDHLz87h.js"),[]),"../../../assets/icon-components/Save.tsx":()=>__vitePreload(()=>import("./Save-BBxj68pn-BkUvn89C.js"),[]),"../../../assets/icon-components/Search.tsx":()=>__vitePreload(()=>import("./Search-YUJuRBLe-CecGUkZA.js"),[]),"../../../assets/icon-components/Server.tsx":()=>__vitePreload(()=>import("./Server-Bfkkjui1-lBan_3Dm.js"),[]),"../../../assets/icon-components/Settings.tsx":()=>__vitePreload(()=>import("./Settings-mbbylBS5-Cca-sV-_.js"),[]),"../../../assets/icon-components/Synced.tsx":()=>__vitePreload(()=>import("./Synced-DKJXzPiw-Cui8pDsS.js"),[]),"../../../assets/icon-components/Syncing.tsx":()=>__vitePreload(()=>import("./Syncing-aT9WSMFf-2VhhyCcX.js"),[]),"../../../assets/icon-components/Trash.tsx":()=>__vitePreload(()=>import("./Trash-CgSbHk-P-DIYkVMER.js"),[]),"../../../assets/icon-components/TrashFill.tsx":()=>__vitePreload(()=>import("./TrashFill-DN50ercb-Oqx67xXN.js"),[]),"../../../assets/icon-components/TreeViewSlash.tsx":()=>__vitePreload(()=>import("./TreeViewSlash-BywCsx5o-CUTTXZi-.js"),[]),"../../../assets/icon-components/TriangleDown.tsx":()=>__vitePreload(()=>import("./TriangleDown-eCXwUfu8-F-V79AL3.js"),[]),"../../../assets/icon-components/VariantArrowLeft.tsx":()=>__vitePreload(()=>import("./VariantArrowLeft-CnuX59_e-6Zt_Q3tm.js"),[]),"../../../assets/icon-components/VerticalDots.tsx":()=>__vitePreload(()=>import("./VerticalDots-C8QYf7et-CCxZfvjq.js"),[]),"../../../assets/icon-components/WarningFill.tsx":()=>__vitePreload(()=>import("./WarningFill-WowAvi5P-D5XCckM6.js"),[]),"../../../assets/icon-components/XTwitter.tsx":()=>__vitePreload(()=>import("./XTwitter-k3Pt8itk-mvLk8TKx.js"),[]),"../../../assets/icon-components/Xmark.tsx":()=>__vitePreload(()=>import("./Xmark-8qnJCs2Y-CZ3t0Fap.js"),[]),"../../../assets/icon-components/XmarkLight.tsx":()=>__vitePreload(()=>import("./XmarkLight-GHzDR5_F-CloMvuzt.js"),[]),"../../../assets/icon-components/Youtube.tsx":()=>__vitePreload(()=>import("./Youtube-i8V0IXUU-Bkiwoayp.js"),[])}),`../../../assets/icon-components/${Ws}.tsx`,6))}catch(ws){return console.error(ws),Aa}}function Kd({name:Ws,size:ws=24,color:oi,style:si,...ii}){const ai=Sa(ws),li={color:oi,...ai,style:si},ci=useMemo(()=>Ra(Ws),[Ws]);return jsx(Suspense,{fallback:jsx("div",{"data-testid":"icon-fallback",style:ai}),name:"icon-component",children:jsx(ci,{...ii,style:li})})}const Ma=["top","right","bottom","left"],je$2=Math.min,ve$2=Math.max,Xt$1=Math.round,Ft$2=Math.floor,ke$2=Ws=>({x:Ws,y:Ws}),_a$1={left:"right",right:"left",bottom:"top",top:"bottom"},Pa={start:"end",end:"start"};function Dn$2(Ws,ws,oi){return ve$2(Ws,je$2(ws,oi))}function Ne$1(Ws,ws){return typeof Ws=="function"?Ws(ws):Ws}function Le$2(Ws){return Ws.split("-")[0]}function lt$2(Ws){return Ws.split("-")[1]}function Kn$2(Ws){return Ws==="x"?"y":"x"}function Yn$2(Ws){return Ws==="y"?"height":"width"}function He$2(Ws){return["top","bottom"].includes(Le$2(Ws))?"y":"x"}function Xn$1(Ws){return Kn$2(He$2(Ws))}function Ta(Ws,ws,oi){oi===void 0&&(oi=!1);const si=lt$2(Ws),ii=Xn$1(Ws),ai=Yn$2(ii);let li=ii==="x"?si===(oi?"end":"start")?"right":"left":si==="start"?"bottom":"top";return ws.reference[ai]>ws.floating[ai]&&(li=qt$1(li)),[li,qt$1(li)]}function ka(Ws){const ws=qt$1(Ws);return[In$2(Ws),ws,In$2(ws)]}function In$2(Ws){return Ws.replace(/start|end/g,ws=>Pa[ws])}function Oa(Ws,ws,oi){const si=["left","right"],ii=["right","left"],ai=["top","bottom"],li=["bottom","top"];switch(Ws){case"top":case"bottom":return oi?ws?ii:si:ws?si:ii;case"left":case"right":return ws?ai:li;default:return[]}}function Da(Ws,ws,oi,si){const ii=lt$2(Ws);let ai=Oa(Le$2(Ws),oi==="start",si);return ii&&(ai=ai.map(li=>li+"-"+ii),ws&&(ai=ai.concat(ai.map(In$2)))),ai}function qt$1(Ws){return Ws.replace(/left|right|bottom|top/g,ws=>_a$1[ws])}function Ia(Ws){return{top:0,right:0,bottom:0,left:0,...Ws}}function Mo(Ws){return typeof Ws!="number"?Ia(Ws):{top:Ws,right:Ws,bottom:Ws,left:Ws}}function Zt$1(Ws){const{x:ws,y:oi,width:si,height:ii}=Ws;return{width:si,height:ii,top:oi,left:ws,right:ws+si,bottom:oi+ii,x:ws,y:oi}}function Dr$1(Ws,ws,oi){let{reference:si,floating:ii}=Ws;const ai=He$2(ws),li=Xn$1(ws),ci=Yn$2(li),ui=Le$2(ws),di=ai==="y",hi=si.x+si.width/2-ii.width/2,pi=si.y+si.height/2-ii.height/2,ha=si[ci]/2-ii[ci]/2;let ga;switch(ui){case"top":ga={x:hi,y:si.y-ii.height};break;case"bottom":ga={x:hi,y:si.y+si.height};break;case"right":ga={x:si.x+si.width,y:pi};break;case"left":ga={x:si.x-ii.width,y:pi};break;default:ga={x:si.x,y:si.y}}switch(lt$2(ws)){case"start":ga[li]-=ha*(oi&&di?-1:1);break;case"end":ga[li]+=ha*(oi&&di?-1:1);break}return ga}const Fa=async(Ws,ws,oi)=>{const{placement:si="bottom",strategy:ii="absolute",middleware:ai=[],platform:li}=oi,ci=ai.filter(Boolean),ui=await(li.isRTL==null?void 0:li.isRTL(ws));let di=await li.getElementRects({reference:Ws,floating:ws,strategy:ii}),{x:hi,y:pi}=Dr$1(di,si,ui),ha=si,ga={},va=0;for(let ba=0;ba<ci.length;ba++){const{name:wa,fn:xa}=ci[ba],{x:Ca,y:el,data:ku,reset:gd}=await xa({x:hi,y:pi,initialPlacement:si,placement:ha,strategy:ii,middlewareData:ga,rects:di,platform:li,elements:{reference:Ws,floating:ws}});hi=Ca??hi,pi=el??pi,ga={...ga,[wa]:{...ga[wa],...ku}},gd&&va<=50&&(va++,typeof gd=="object"&&(gd.placement&&(ha=gd.placement),gd.rects&&(di=gd.rects===!0?await li.getElementRects({reference:Ws,floating:ws,strategy:ii}):gd.rects),{x:hi,y:pi}=Dr$1(di,ha,ui)),ba=-1)}return{x:hi,y:pi,placement:ha,strategy:ii,middlewareData:ga}};async function Et$2(Ws,ws){var oi;ws===void 0&&(ws={});const{x:si,y:ii,platform:ai,rects:li,elements:ci,strategy:ui}=Ws,{boundary:di="clippingAncestors",rootBoundary:hi="viewport",elementContext:pi="floating",altBoundary:ha=!1,padding:ga=0}=Ne$1(ws,Ws),va=Mo(ga),ba=ci[ha?pi==="floating"?"reference":"floating":pi],wa=Zt$1(await ai.getClippingRect({element:(oi=await(ai.isElement==null?void 0:ai.isElement(ba)))==null||oi?ba:ba.contextElement||await(ai.getDocumentElement==null?void 0:ai.getDocumentElement(ci.floating)),boundary:di,rootBoundary:hi,strategy:ui})),xa=pi==="floating"?{x:si,y:ii,width:li.floating.width,height:li.floating.height}:li.reference,Ca=await(ai.getOffsetParent==null?void 0:ai.getOffsetParent(ci.floating)),el=await(ai.isElement==null?void 0:ai.isElement(Ca))?await(ai.getScale==null?void 0:ai.getScale(Ca))||{x:1,y:1}:{x:1,y:1},ku=Zt$1(ai.convertOffsetParentRelativeRectToViewportRelativeRect?await ai.convertOffsetParentRelativeRectToViewportRelativeRect({elements:ci,rect:xa,offsetParent:Ca,strategy:ui}):xa);return{top:(wa.top-ku.top+va.top)/el.y,bottom:(ku.bottom-wa.bottom+va.bottom)/el.y,left:(wa.left-ku.left+va.left)/el.x,right:(ku.right-wa.right+va.right)/el.x}}const Na=Ws=>({name:"arrow",options:Ws,async fn(ws){const{x:oi,y:si,placement:ii,rects:ai,platform:li,elements:ci,middlewareData:ui}=ws,{element:di,padding:hi=0}=Ne$1(Ws,ws)||{};if(di==null)return{};const pi=Mo(hi),ha={x:oi,y:si},ga=Xn$1(ii),va=Yn$2(ga),ba=await li.getDimensions(di),wa=ga==="y",xa=wa?"top":"left",Ca=wa?"bottom":"right",el=wa?"clientHeight":"clientWidth",ku=ai.reference[va]+ai.reference[ga]-ha[ga]-ai.floating[va],gd=ha[ga]-ai.reference[ga],Ed=await(li.getOffsetParent==null?void 0:li.getOffsetParent(di));let Od=Ed?Ed[el]:0;(!Od||!await(li.isElement==null?void 0:li.isElement(Ed)))&&(Od=ci.floating[el]||ai.floating[va]);const Nd=ku/2-gd/2,Pd=Od/2-ba[va]/2-1,Ld=je$2(pi[xa],Pd),rf=je$2(pi[Ca],Pd),kd=Ld,Md=Od-ba[va]-rf,Td=Od/2-ba[va]/2+Nd,wd=Dn$2(kd,Td,Md),Cd=!ui.arrow&<$2(ii)!=null&&Td!==wd&&ai.reference[va]/2-(Td<kd?Ld:rf)-ba[va]/2<0,sf=Cd?Td<kd?Td-kd:Td-Md:0;return{[ga]:ha[ga]+sf,data:{[ga]:wd,centerOffset:Td-wd-sf,...Cd&&{alignmentOffset:sf}},reset:Cd}}}),La=function(Ws){return Ws===void 0&&(Ws={}),{name:"flip",options:Ws,async fn(ws){var oi,si;const{placement:ii,middlewareData:ai,rects:li,initialPlacement:ci,platform:ui,elements:di}=ws,{mainAxis:hi=!0,crossAxis:pi=!0,fallbackPlacements:ha,fallbackStrategy:ga="bestFit",fallbackAxisSideDirection:va="none",flipAlignment:ba=!0,...wa}=Ne$1(Ws,ws);if((oi=ai.arrow)!=null&&oi.alignmentOffset)return{};const xa=Le$2(ii),Ca=He$2(ci),el=Le$2(ci)===ci,ku=await(ui.isRTL==null?void 0:ui.isRTL(di.floating)),gd=ha||(el||!ba?[qt$1(ci)]:ka(ci)),Ed=va!=="none";!ha&&Ed&&gd.push(...Da(ci,ba,va,ku));const Od=[ci,...gd],Nd=await Et$2(ws,wa),Pd=[];let Ld=((si=ai.flip)==null?void 0:si.overflows)||[];if(hi&&Pd.push(Nd[xa]),pi){const Td=Ta(ii,li,ku);Pd.push(Nd[Td[0]],Nd[Td[1]])}if(Ld=[...Ld,{placement:ii,overflows:Pd}],!Pd.every(Td=>Td<=0)){var rf,kd;const Td=(((rf=ai.flip)==null?void 0:rf.index)||0)+1,wd=Od[Td];if(wd)return{data:{index:Td,overflows:Ld},reset:{placement:wd}};let Cd=(kd=Ld.filter(sf=>sf.overflows[0]<=0).sort((sf,of)=>sf.overflows[1]-of.overflows[1])[0])==null?void 0:kd.placement;if(!Cd)switch(ga){case"bestFit":{var Md;const sf=(Md=Ld.filter(of=>{if(Ed){const Wd=He$2(of.placement);return Wd===Ca||Wd==="y"}return!0}).map(of=>[of.placement,of.overflows.filter(Wd=>Wd>0).reduce((Wd,df)=>Wd+df,0)]).sort((of,Wd)=>of[1]-Wd[1])[0])==null?void 0:Md[0];sf&&(Cd=sf);break}case"initialPlacement":Cd=ci;break}if(ii!==Cd)return{reset:{placement:Cd}}}return{}}}};function Ir$1(Ws,ws){return{top:Ws.top-ws.height,right:Ws.right-ws.width,bottom:Ws.bottom-ws.height,left:Ws.left-ws.width}}function Fr$2(Ws){return Ma.some(ws=>Ws[ws]>=0)}const Va=function(Ws){return Ws===void 0&&(Ws={}),{name:"hide",options:Ws,async fn(ws){const{rects:oi}=ws,{strategy:si="referenceHidden",...ii}=Ne$1(Ws,ws);switch(si){case"referenceHidden":{const ai=await Et$2(ws,{...ii,elementContext:"reference"}),li=Ir$1(ai,oi.reference);return{data:{referenceHiddenOffsets:li,referenceHidden:Fr$2(li)}}}case"escaped":{const ai=await Et$2(ws,{...ii,altBoundary:!0}),li=Ir$1(ai,oi.floating);return{data:{escapedOffsets:li,escaped:Fr$2(li)}}}default:return{}}}}};async function Ba(Ws,ws){const{placement:oi,platform:si,elements:ii}=Ws,ai=await(si.isRTL==null?void 0:si.isRTL(ii.floating)),li=Le$2(oi),ci=lt$2(oi),ui=He$2(oi)==="y",di=["left","top"].includes(li)?-1:1,hi=ai&&ui?-1:1,pi=Ne$1(ws,Ws);let{mainAxis:ha,crossAxis:ga,alignmentAxis:va}=typeof pi=="number"?{mainAxis:pi,crossAxis:0,alignmentAxis:null}:{mainAxis:pi.mainAxis||0,crossAxis:pi.crossAxis||0,alignmentAxis:pi.alignmentAxis};return ci&&typeof va=="number"&&(ga=ci==="end"?va*-1:va),ui?{x:ga*hi,y:ha*di}:{x:ha*di,y:ga*hi}}const Ua=function(Ws){return Ws===void 0&&(Ws=0),{name:"offset",options:Ws,async fn(ws){var oi,si;const{x:ii,y:ai,placement:li,middlewareData:ci}=ws,ui=await Ba(ws,Ws);return li===((oi=ci.offset)==null?void 0:oi.placement)&&(si=ci.arrow)!=null&&si.alignmentOffset?{}:{x:ii+ui.x,y:ai+ui.y,data:{...ui,placement:li}}}}},Wa=function(Ws){return Ws===void 0&&(Ws={}),{name:"shift",options:Ws,async fn(ws){const{x:oi,y:si,placement:ii}=ws,{mainAxis:ai=!0,crossAxis:li=!1,limiter:ci={fn:wa=>{let{x:xa,y:Ca}=wa;return{x:xa,y:Ca}}},...ui}=Ne$1(Ws,ws),di={x:oi,y:si},hi=await Et$2(ws,ui),pi=He$2(Le$2(ii)),ha=Kn$2(pi);let ga=di[ha],va=di[pi];if(ai){const wa=ha==="y"?"top":"left",xa=ha==="y"?"bottom":"right",Ca=ga+hi[wa],el=ga-hi[xa];ga=Dn$2(Ca,ga,el)}if(li){const wa=pi==="y"?"top":"left",xa=pi==="y"?"bottom":"right",Ca=va+hi[wa],el=va-hi[xa];va=Dn$2(Ca,va,el)}const ba=ci.fn({...ws,[ha]:ga,[pi]:va});return{...ba,data:{x:ba.x-oi,y:ba.y-si,enabled:{[ha]:ai,[pi]:li}}}}}},$a=function(Ws){return Ws===void 0&&(Ws={}),{options:Ws,fn(ws){const{x:oi,y:si,placement:ii,rects:ai,middlewareData:li}=ws,{offset:ci=0,mainAxis:ui=!0,crossAxis:di=!0}=Ne$1(Ws,ws),hi={x:oi,y:si},pi=He$2(ii),ha=Kn$2(pi);let ga=hi[ha],va=hi[pi];const ba=Ne$1(ci,ws),wa=typeof ba=="number"?{mainAxis:ba,crossAxis:0}:{mainAxis:0,crossAxis:0,...ba};if(ui){const el=ha==="y"?"height":"width",ku=ai.reference[ha]-ai.floating[el]+wa.mainAxis,gd=ai.reference[ha]+ai.reference[el]-wa.mainAxis;ga<ku?ga=ku:ga>gd&&(ga=gd)}if(di){var xa,Ca;const el=ha==="y"?"width":"height",ku=["top","left"].includes(Le$2(ii)),gd=ai.reference[pi]-ai.floating[el]+(ku&&((xa=li.offset)==null?void 0:xa[pi])||0)+(ku?0:wa.crossAxis),Ed=ai.reference[pi]+ai.reference[el]+(ku?0:((Ca=li.offset)==null?void 0:Ca[pi])||0)-(ku?wa.crossAxis:0);va<gd?va=gd:va>Ed&&(va=Ed)}return{[ha]:ga,[pi]:va}}}},za=function(Ws){return Ws===void 0&&(Ws={}),{name:"size",options:Ws,async fn(ws){var oi,si;const{placement:ii,rects:ai,platform:li,elements:ci}=ws,{apply:ui=()=>{},...di}=Ne$1(Ws,ws),hi=await Et$2(ws,di),pi=Le$2(ii),ha=lt$2(ii),ga=He$2(ii)==="y",{width:va,height:ba}=ai.floating;let wa,xa;pi==="top"||pi==="bottom"?(wa=pi,xa=ha===(await(li.isRTL==null?void 0:li.isRTL(ci.floating))?"start":"end")?"left":"right"):(xa=pi,wa=ha==="end"?"top":"bottom");const Ca=ba-hi.top-hi.bottom,el=va-hi.left-hi.right,ku=je$2(ba-hi[wa],Ca),gd=je$2(va-hi[xa],el),Ed=!ws.middlewareData.shift;let Od=ku,Nd=gd;if((oi=ws.middlewareData.shift)!=null&&oi.enabled.x&&(Nd=el),(si=ws.middlewareData.shift)!=null&&si.enabled.y&&(Od=Ca),Ed&&!ha){const Ld=ve$2(hi.left,0),rf=ve$2(hi.right,0),kd=ve$2(hi.top,0),Md=ve$2(hi.bottom,0);ga?Nd=va-2*(Ld!==0||rf!==0?Ld+rf:ve$2(hi.left,hi.right)):Od=ba-2*(kd!==0||Md!==0?kd+Md:ve$2(hi.top,hi.bottom))}await ui({...ws,availableWidth:Nd,availableHeight:Od});const Pd=await li.getDimensions(ci.floating);return va!==Pd.width||ba!==Pd.height?{reset:{rects:!0}}:{}}}};function on$1(){return typeof window<"u"}function ut$1(Ws){return _o(Ws)?(Ws.nodeName||"").toLowerCase():"#document"}function ye$2(Ws){var ws;return(Ws==null||(ws=Ws.ownerDocument)==null?void 0:ws.defaultView)||window}function De$2(Ws){var ws;return(ws=(_o(Ws)?Ws.ownerDocument:Ws.document)||window.document)==null?void 0:ws.documentElement}function _o(Ws){return on$1()?Ws instanceof Node||Ws instanceof ye$2(Ws).Node:!1}function Ce$2(Ws){return on$1()?Ws instanceof Element||Ws instanceof ye$2(Ws).Element:!1}function Oe$2(Ws){return on$1()?Ws instanceof HTMLElement||Ws instanceof ye$2(Ws).HTMLElement:!1}function Nr$2(Ws){return!on$1()||typeof ShadowRoot>"u"?!1:Ws instanceof ShadowRoot||Ws instanceof ye$2(Ws).ShadowRoot}function Tt$1(Ws){const{overflow:ws,overflowX:oi,overflowY:si,display:ii}=Se$2(Ws);return/auto|scroll|overlay|hidden|clip/.test(ws+si+oi)&&!["inline","contents"].includes(ii)}function Ga(Ws){return["table","td","th"].includes(ut$1(Ws))}function sn$1(Ws){return[":popover-open",":modal"].some(ws=>{try{return Ws.matches(ws)}catch{return!1}})}function qn$2(Ws){const ws=Zn$1(),oi=Ce$2(Ws)?Se$2(Ws):Ws;return["transform","translate","scale","rotate","perspective"].some(si=>oi[si]?oi[si]!=="none":!1)||(oi.containerType?oi.containerType!=="normal":!1)||!ws&&(oi.backdropFilter?oi.backdropFilter!=="none":!1)||!ws&&(oi.filter?oi.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(si=>(oi.willChange||"").includes(si))||["paint","layout","strict","content"].some(si=>(oi.contain||"").includes(si))}function ja(Ws){let ws=Ke$2(Ws);for(;Oe$2(ws)&&!at$2(ws);){if(qn$2(ws))return ws;if(sn$1(ws))return null;ws=Ke$2(ws)}return null}function Zn$1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function at$2(Ws){return["html","body","#document"].includes(ut$1(Ws))}function Se$2(Ws){return ye$2(Ws).getComputedStyle(Ws)}function an$1(Ws){return Ce$2(Ws)?{scrollLeft:Ws.scrollLeft,scrollTop:Ws.scrollTop}:{scrollLeft:Ws.scrollX,scrollTop:Ws.scrollY}}function Ke$2(Ws){if(ut$1(Ws)==="html")return Ws;const ws=Ws.assignedSlot||Ws.parentNode||Nr$2(Ws)&&Ws.host||De$2(Ws);return Nr$2(ws)?ws.host:ws}function Po(Ws){const ws=Ke$2(Ws);return at$2(ws)?Ws.ownerDocument?Ws.ownerDocument.body:Ws.body:Oe$2(ws)&&Tt$1(ws)?ws:Po(ws)}function At$2(Ws,ws,oi){var si;ws===void 0&&(ws=[]),oi===void 0&&(oi=!0);const ii=Po(Ws),ai=ii===((si=Ws.ownerDocument)==null?void 0:si.body),li=ye$2(ii);if(ai){const ci=Fn$2(li);return ws.concat(li,li.visualViewport||[],Tt$1(ii)?ii:[],ci&&oi?At$2(ci):[])}return ws.concat(ii,At$2(ii,[],oi))}function Fn$2(Ws){return Ws.parent&&Object.getPrototypeOf(Ws.parent)?Ws.frameElement:null}function To(Ws){const ws=Se$2(Ws);let oi=parseFloat(ws.width)||0,si=parseFloat(ws.height)||0;const ii=Oe$2(Ws),ai=ii?Ws.offsetWidth:oi,li=ii?Ws.offsetHeight:si,ci=Xt$1(oi)!==ai||Xt$1(si)!==li;return ci&&(oi=ai,si=li),{width:oi,height:si,$:ci}}function Qn$2(Ws){return Ce$2(Ws)?Ws:Ws.contextElement}function st$1(Ws){const ws=Qn$2(Ws);if(!Oe$2(ws))return ke$2(1);const oi=ws.getBoundingClientRect(),{width:si,height:ii,$:ai}=To(ws);let li=(ai?Xt$1(oi.width):oi.width)/si,ci=(ai?Xt$1(oi.height):oi.height)/ii;return(!li||!Number.isFinite(li))&&(li=1),(!ci||!Number.isFinite(ci))&&(ci=1),{x:li,y:ci}}const Ha=ke$2(0);function ko(Ws){const ws=ye$2(Ws);return!Zn$1()||!ws.visualViewport?Ha:{x:ws.visualViewport.offsetLeft,y:ws.visualViewport.offsetTop}}function Ka(Ws,ws,oi){return ws===void 0&&(ws=!1),!oi||ws&&oi!==ye$2(Ws)?!1:ws}function qe$1(Ws,ws,oi,si){ws===void 0&&(ws=!1),oi===void 0&&(oi=!1);const ii=Ws.getBoundingClientRect(),ai=Qn$2(Ws);let li=ke$2(1);ws&&(si?Ce$2(si)&&(li=st$1(si)):li=st$1(Ws));const ci=Ka(ai,oi,si)?ko(ai):ke$2(0);let ui=(ii.left+ci.x)/li.x,di=(ii.top+ci.y)/li.y,hi=ii.width/li.x,pi=ii.height/li.y;if(ai){const ha=ye$2(ai),ga=si&&Ce$2(si)?ye$2(si):si;let va=ha,ba=Fn$2(va);for(;ba&&si&&ga!==va;){const wa=st$1(ba),xa=ba.getBoundingClientRect(),Ca=Se$2(ba),el=xa.left+(ba.clientLeft+parseFloat(Ca.paddingLeft))*wa.x,ku=xa.top+(ba.clientTop+parseFloat(Ca.paddingTop))*wa.y;ui*=wa.x,di*=wa.y,hi*=wa.x,pi*=wa.y,ui+=el,di+=ku,va=ye$2(ba),ba=Fn$2(va)}}return Zt$1({width:hi,height:pi,x:ui,y:di})}function Jn$2(Ws,ws){const oi=an$1(Ws).scrollLeft;return ws?ws.left+oi:qe$1(De$2(Ws)).left+oi}function Oo(Ws,ws,oi){oi===void 0&&(oi=!1);const si=Ws.getBoundingClientRect(),ii=si.left+ws.scrollLeft-(oi?0:Jn$2(Ws,si)),ai=si.top+ws.scrollTop;return{x:ii,y:ai}}function Ya(Ws){let{elements:ws,rect:oi,offsetParent:si,strategy:ii}=Ws;const ai=ii==="fixed",li=De$2(si),ci=ws?sn$1(ws.floating):!1;if(si===li||ci&&ai)return oi;let ui={scrollLeft:0,scrollTop:0},di=ke$2(1);const hi=ke$2(0),pi=Oe$2(si);if((pi||!pi&&!ai)&&((ut$1(si)!=="body"||Tt$1(li))&&(ui=an$1(si)),Oe$2(si))){const ga=qe$1(si);di=st$1(si),hi.x=ga.x+si.clientLeft,hi.y=ga.y+si.clientTop}const ha=li&&!pi&&!ai?Oo(li,ui,!0):ke$2(0);return{width:oi.width*di.x,height:oi.height*di.y,x:oi.x*di.x-ui.scrollLeft*di.x+hi.x+ha.x,y:oi.y*di.y-ui.scrollTop*di.y+hi.y+ha.y}}function Xa(Ws){return Array.from(Ws.getClientRects())}function qa(Ws){const ws=De$2(Ws),oi=an$1(Ws),si=Ws.ownerDocument.body,ii=ve$2(ws.scrollWidth,ws.clientWidth,si.scrollWidth,si.clientWidth),ai=ve$2(ws.scrollHeight,ws.clientHeight,si.scrollHeight,si.clientHeight);let li=-oi.scrollLeft+Jn$2(Ws);const ci=-oi.scrollTop;return Se$2(si).direction==="rtl"&&(li+=ve$2(ws.clientWidth,si.clientWidth)-ii),{width:ii,height:ai,x:li,y:ci}}function Za$1(Ws,ws){const oi=ye$2(Ws),si=De$2(Ws),ii=oi.visualViewport;let ai=si.clientWidth,li=si.clientHeight,ci=0,ui=0;if(ii){ai=ii.width,li=ii.height;const di=Zn$1();(!di||di&&ws==="fixed")&&(ci=ii.offsetLeft,ui=ii.offsetTop)}return{width:ai,height:li,x:ci,y:ui}}function Qa$1(Ws,ws){const oi=qe$1(Ws,!0,ws==="fixed"),si=oi.top+Ws.clientTop,ii=oi.left+Ws.clientLeft,ai=Oe$2(Ws)?st$1(Ws):ke$2(1),li=Ws.clientWidth*ai.x,ci=Ws.clientHeight*ai.y,ui=ii*ai.x,di=si*ai.y;return{width:li,height:ci,x:ui,y:di}}function Lr$2(Ws,ws,oi){let si;if(ws==="viewport")si=Za$1(Ws,oi);else if(ws==="document")si=qa(De$2(Ws));else if(Ce$2(ws))si=Qa$1(ws,oi);else{const ii=ko(Ws);si={x:ws.x-ii.x,y:ws.y-ii.y,width:ws.width,height:ws.height}}return Zt$1(si)}function Do$1(Ws,ws){const oi=Ke$2(Ws);return oi===ws||!Ce$2(oi)||at$2(oi)?!1:Se$2(oi).position==="fixed"||Do$1(oi,ws)}function Ja$1(Ws,ws){const oi=ws.get(Ws);if(oi)return oi;let si=At$2(Ws,[],!1).filter(ci=>Ce$2(ci)&&ut$1(ci)!=="body"),ii=null;const ai=Se$2(Ws).position==="fixed";let li=ai?Ke$2(Ws):Ws;for(;Ce$2(li)&&!at$2(li);){const ci=Se$2(li),ui=qn$2(li);!ui&&ci.position==="fixed"&&(ii=null),(ai?!ui&&!ii:!ui&&ci.position==="static"&&ii&&["absolute","fixed"].includes(ii.position)||Tt$1(li)&&!ui&&Do$1(Ws,li))?si=si.filter(di=>di!==li):ii=ci,li=Ke$2(li)}return ws.set(Ws,si),si}function ec(Ws){let{element:ws,boundary:oi,rootBoundary:si,strategy:ii}=Ws;const ai=[...oi==="clippingAncestors"?sn$1(ws)?[]:Ja$1(ws,this._c):[].concat(oi),si],li=ai[0],ci=ai.reduce((ui,di)=>{const hi=Lr$2(ws,di,ii);return ui.top=ve$2(hi.top,ui.top),ui.right=je$2(hi.right,ui.right),ui.bottom=je$2(hi.bottom,ui.bottom),ui.left=ve$2(hi.left,ui.left),ui},Lr$2(ws,li,ii));return{width:ci.right-ci.left,height:ci.bottom-ci.top,x:ci.left,y:ci.top}}function tc(Ws){const{width:ws,height:oi}=To(Ws);return{width:ws,height:oi}}function nc(Ws,ws,oi){const si=Oe$2(ws),ii=De$2(ws),ai=oi==="fixed",li=qe$1(Ws,!0,ai,ws);let ci={scrollLeft:0,scrollTop:0};const ui=ke$2(0);if(si||!si&&!ai)if((ut$1(ws)!=="body"||Tt$1(ii))&&(ci=an$1(ws)),si){const ha=qe$1(ws,!0,ai,ws);ui.x=ha.x+ws.clientLeft,ui.y=ha.y+ws.clientTop}else ii&&(ui.x=Jn$2(ii));const di=ii&&!si&&!ai?Oo(ii,ci):ke$2(0),hi=li.left+ci.scrollLeft-ui.x-di.x,pi=li.top+ci.scrollTop-ui.y-di.y;return{x:hi,y:pi,width:li.width,height:li.height}}function wn$1(Ws){return Se$2(Ws).position==="static"}function Vr$2(Ws,ws){if(!Oe$2(Ws)||Se$2(Ws).position==="fixed")return null;if(ws)return ws(Ws);let oi=Ws.offsetParent;return De$2(Ws)===oi&&(oi=oi.ownerDocument.body),oi}function Io(Ws,ws){const oi=ye$2(Ws);if(sn$1(Ws))return oi;if(!Oe$2(Ws)){let ii=Ke$2(Ws);for(;ii&&!at$2(ii);){if(Ce$2(ii)&&!wn$1(ii))return ii;ii=Ke$2(ii)}return oi}let si=Vr$2(Ws,ws);for(;si&&Ga(si)&&wn$1(si);)si=Vr$2(si,ws);return si&&at$2(si)&&wn$1(si)&&!qn$2(si)?oi:si||ja(Ws)||oi}const rc=async function(Ws){const ws=this.getOffsetParent||Io,oi=this.getDimensions,si=await oi(Ws.floating);return{reference:nc(Ws.reference,await ws(Ws.floating),Ws.strategy),floating:{x:0,y:0,width:si.width,height:si.height}}};function oc(Ws){return Se$2(Ws).direction==="rtl"}const sc={convertOffsetParentRelativeRectToViewportRelativeRect:Ya,getDocumentElement:De$2,getClippingRect:ec,getOffsetParent:Io,getElementRects:rc,getClientRects:Xa,getDimensions:tc,getScale:st$1,isElement:Ce$2,isRTL:oc};function Fo(Ws,ws){return Ws.x===ws.x&&Ws.y===ws.y&&Ws.width===ws.width&&Ws.height===ws.height}function ic(Ws,ws){let oi=null,si;const ii=De$2(Ws);function ai(){var ci;clearTimeout(si),(ci=oi)==null||ci.disconnect(),oi=null}function li(ci,ui){ci===void 0&&(ci=!1),ui===void 0&&(ui=1),ai();const di=Ws.getBoundingClientRect(),{left:hi,top:pi,width:ha,height:ga}=di;if(ci||ws(),!ha||!ga)return;const va=Ft$2(pi),ba=Ft$2(ii.clientWidth-(hi+ha)),wa=Ft$2(ii.clientHeight-(pi+ga)),xa=Ft$2(hi),Ca={rootMargin:-va+"px "+-ba+"px "+-wa+"px "+-xa+"px",threshold:ve$2(0,je$2(1,ui))||1};let el=!0;function ku(gd){const Ed=gd[0].intersectionRatio;if(Ed!==ui){if(!el)return li();Ed?li(!1,Ed):si=setTimeout(()=>{li(!1,1e-7)},1e3)}Ed===1&&!Fo(di,Ws.getBoundingClientRect())&&li(),el=!1}try{oi=new IntersectionObserver(ku,{...Ca,root:ii.ownerDocument})}catch{oi=new IntersectionObserver(ku,Ca)}oi.observe(Ws)}return li(!0),ai}function ac(Ws,ws,oi,si){si===void 0&&(si={});const{ancestorScroll:ii=!0,ancestorResize:ai=!0,elementResize:li=typeof ResizeObserver=="function",layoutShift:ci=typeof IntersectionObserver=="function",animationFrame:ui=!1}=si,di=Qn$2(Ws),hi=ii||ai?[...di?At$2(di):[],...At$2(ws)]:[];hi.forEach(xa=>{ii&&xa.addEventListener("scroll",oi,{passive:!0}),ai&&xa.addEventListener("resize",oi)});const pi=di&&ci?ic(di,oi):null;let ha=-1,ga=null;li&&(ga=new ResizeObserver(xa=>{let[Ca]=xa;Ca&&Ca.target===di&&ga&&(ga.unobserve(ws),cancelAnimationFrame(ha),ha=requestAnimationFrame(()=>{var el;(el=ga)==null||el.observe(ws)})),oi()}),di&&!ui&&ga.observe(di),ga.observe(ws));let va,ba=ui?qe$1(Ws):null;ui&&wa();function wa(){const xa=qe$1(Ws);ba&&!Fo(ba,xa)&&oi(),ba=xa,va=requestAnimationFrame(wa)}return oi(),()=>{var xa;hi.forEach(Ca=>{ii&&Ca.removeEventListener("scroll",oi),ai&&Ca.removeEventListener("resize",oi)}),pi==null||pi(),(xa=ga)==null||xa.disconnect(),ga=null,ui&&cancelAnimationFrame(va)}}const cc=Ua,lc=Wa,uc=La,dc=za,fc=Va,Br$2=Na,pc=$a,mc=(Ws,ws,oi)=>{const si=new Map,ii={platform:sc,...oi},ai={...ii.platform,_c:si};return Fa(Ws,ws,{...ii,platform:ai})};function Y$2(Ws,ws,{checkForDefaultPrevented:oi=!0}={}){return function(si){if(Ws==null||Ws(si),oi===!1||!si.defaultPrevented)return ws==null?void 0:ws(si)}}function dt$2(Ws,ws=[]){let oi=[];function si(ai,li){const ci=React.createContext(li),ui=oi.length;oi=[...oi,li];const di=pi=>{var ha;const{scope:ga,children:va,...ba}=pi,wa=((ha=ga==null?void 0:ga[Ws])==null?void 0:ha[ui])||ci,xa=React.useMemo(()=>ba,Object.values(ba));return jsx(wa.Provider,{value:xa,children:va})};di.displayName=ai+"Provider";function hi(pi,ha){var ga;const va=((ga=ha==null?void 0:ha[Ws])==null?void 0:ga[ui])||ci,ba=React.useContext(va);if(ba)return ba;if(li!==void 0)return li;throw new Error(`\`${pi}\` must be used within \`${ai}\``)}return[di,hi]}const ii=()=>{const ai=oi.map(li=>React.createContext(li));return function(li){const ci=(li==null?void 0:li[Ws])||ai;return React.useMemo(()=>({[`__scope${Ws}`]:{...li,[Ws]:ci}}),[li,ci])}};return ii.scopeName=Ws,[si,hc(ii,...ws)]}function hc(...Ws){const ws=Ws[0];if(Ws.length===1)return ws;const oi=()=>{const si=Ws.map(ii=>({useScope:ii(),scopeName:ii.scopeName}));return function(ii){const ai=si.reduce((li,{useScope:ci,scopeName:ui})=>{const di=ci(ii)[`__scope${ui}`];return{...li,...di}},{});return React.useMemo(()=>({[`__scope${ws.scopeName}`]:ai}),[ai])}};return oi.scopeName=ws.scopeName,oi}function Ee$2(Ws){const ws=React.useRef(Ws);return React.useEffect(()=>{ws.current=Ws}),React.useMemo(()=>(...oi)=>{var si;return(si=ws.current)==null?void 0:si.call(ws,...oi)},[])}function er$1({prop:Ws,defaultProp:ws,onChange:oi=()=>{}}){const[si,ii]=gc({defaultProp:ws,onChange:oi}),ai=Ws!==void 0,li=ai?Ws:si,ci=Ee$2(oi),ui=React.useCallback(di=>{if(ai){const hi=typeof di=="function"?di(Ws):di;hi!==Ws&&ci(hi)}else ii(di)},[ai,Ws,ii,ci]);return[li,ui]}function gc({defaultProp:Ws,onChange:ws}){const oi=React.useState(Ws),[si]=oi,ii=React.useRef(si),ai=Ee$2(ws);return React.useEffect(()=>{ii.current!==si&&(ai(si),ii.current=si)},[si,ii,ai]),oi}function No$1(Ws){const ws=Ws+"CollectionProvider",[oi,si]=dt$2(ws),[ii,ai]=oi(ws,{collectionRef:{current:null},itemMap:new Map}),li=ga=>{const{scope:va,children:ba}=ga,wa=React__default.useRef(null),xa=React__default.useRef(new Map).current;return jsx(ii,{scope:va,itemMap:xa,collectionRef:wa,children:ba})};li.displayName=ws;const ci=Ws+"CollectionSlot",ui=React__default.forwardRef((ga,va)=>{const{scope:ba,children:wa}=ga,xa=ai(ci,ba),Ca=ge$2(va,xa.collectionRef);return jsx(St$2,{ref:Ca,children:wa})});ui.displayName=ci;const di=Ws+"CollectionItemSlot",hi="data-radix-collection-item",pi=React__default.forwardRef((ga,va)=>{const{scope:ba,children:wa,...xa}=ga,Ca=React__default.useRef(null),el=ge$2(va,Ca),ku=ai(di,ba);return React__default.useEffect(()=>(ku.itemMap.set(Ca,{ref:Ca,...xa}),()=>void ku.itemMap.delete(Ca))),jsx(St$2,{[hi]:"",ref:el,children:wa})});pi.displayName=di;function ha(ga){const va=ai(Ws+"CollectionConsumer",ga);return React__default.useCallback(()=>{const ba=va.collectionRef.current;if(!ba)return[];const wa=Array.from(ba.querySelectorAll(`[${hi}]`));return Array.from(va.itemMap.values()).sort((xa,Ca)=>wa.indexOf(xa.ref.current)-wa.indexOf(Ca.ref.current))},[va.collectionRef,va.itemMap])}return[{Provider:li,Slot:ui,ItemSlot:pi},ha,si]}var vc=React.createContext(void 0);function tr$1(Ws){const ws=React.useContext(vc);return Ws||ws||"ltr"}function yc(Ws,ws=globalThis==null?void 0:globalThis.document){const oi=Ee$2(Ws);React.useEffect(()=>{const si=ii=>{ii.key==="Escape"&&oi(ii)};return ws.addEventListener("keydown",si,{capture:!0}),()=>ws.removeEventListener("keydown",si,{capture:!0})},[oi,ws])}var bc="DismissableLayer",Nn$2="dismissableLayer.update",wc="dismissableLayer.pointerDownOutside",xc="dismissableLayer.focusOutside",Ur$2,Lo=React.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vo$1=React.forwardRef((Ws,ws)=>{const{disableOutsidePointerEvents:oi=!1,onEscapeKeyDown:si,onPointerDownOutside:ii,onFocusOutside:ai,onInteractOutside:li,onDismiss:ci,...ui}=Ws,di=React.useContext(Lo),[hi,pi]=React.useState(null),ha=(hi==null?void 0:hi.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,ga]=React.useState({}),va=ge$2(ws,Od=>pi(Od)),ba=Array.from(di.layers),[wa]=[...di.layersWithOutsidePointerEventsDisabled].slice(-1),xa=ba.indexOf(wa),Ca=hi?ba.indexOf(hi):-1,el=di.layersWithOutsidePointerEventsDisabled.size>0,ku=Ca>=xa,gd=Ec(Od=>{const Nd=Od.target,Pd=[...di.branches].some(Ld=>Ld.contains(Nd));!ku||Pd||(ii==null||ii(Od),li==null||li(Od),Od.defaultPrevented||ci==null||ci())},ha),Ed=Ac(Od=>{const Nd=Od.target;[...di.branches].some(Pd=>Pd.contains(Nd))||(ai==null||ai(Od),li==null||li(Od),Od.defaultPrevented||ci==null||ci())},ha);return yc(Od=>{Ca===di.layers.size-1&&(si==null||si(Od),!Od.defaultPrevented&&ci&&(Od.preventDefault(),ci()))},ha),React.useEffect(()=>{if(hi)return oi&&(di.layersWithOutsidePointerEventsDisabled.size===0&&(Ur$2=ha.body.style.pointerEvents,ha.body.style.pointerEvents="none"),di.layersWithOutsidePointerEventsDisabled.add(hi)),di.layers.add(hi),Wr$2(),()=>{oi&&di.layersWithOutsidePointerEventsDisabled.size===1&&(ha.body.style.pointerEvents=Ur$2)}},[hi,ha,oi,di]),React.useEffect(()=>()=>{hi&&(di.layers.delete(hi),di.layersWithOutsidePointerEventsDisabled.delete(hi),Wr$2())},[hi,di]),React.useEffect(()=>{const Od=()=>ga({});return document.addEventListener(Nn$2,Od),()=>document.removeEventListener(Nn$2,Od)},[]),jsx(se$2.div,{...ui,ref:va,style:{pointerEvents:el?ku?"auto":"none":void 0,...Ws.style},onFocusCapture:Y$2(Ws.onFocusCapture,Ed.onFocusCapture),onBlurCapture:Y$2(Ws.onBlurCapture,Ed.onBlurCapture),onPointerDownCapture:Y$2(Ws.onPointerDownCapture,gd.onPointerDownCapture)})});Vo$1.displayName=bc;var Cc="DismissableLayerBranch",Sc=React.forwardRef((Ws,ws)=>{const oi=React.useContext(Lo),si=React.useRef(null),ii=ge$2(ws,si);return React.useEffect(()=>{const ai=si.current;if(ai)return oi.branches.add(ai),()=>{oi.branches.delete(ai)}},[oi.branches]),jsx(se$2.div,{...Ws,ref:ii})});Sc.displayName=Cc;function Ec(Ws,ws=globalThis==null?void 0:globalThis.document){const oi=Ee$2(Ws),si=React.useRef(!1),ii=React.useRef(()=>{});return React.useEffect(()=>{const ai=ci=>{if(ci.target&&!si.current){let ui=function(){Bo(wc,oi,di,{discrete:!0})};const di={originalEvent:ci};ci.pointerType==="touch"?(ws.removeEventListener("click",ii.current),ii.current=ui,ws.addEventListener("click",ii.current,{once:!0})):ui()}else ws.removeEventListener("click",ii.current);si.current=!1},li=window.setTimeout(()=>{ws.addEventListener("pointerdown",ai)},0);return()=>{window.clearTimeout(li),ws.removeEventListener("pointerdown",ai),ws.removeEventListener("click",ii.current)}},[ws,oi]),{onPointerDownCapture:()=>si.current=!0}}function Ac(Ws,ws=globalThis==null?void 0:globalThis.document){const oi=Ee$2(Ws),si=React.useRef(!1);return React.useEffect(()=>{const ii=ai=>{ai.target&&!si.current&&Bo(xc,oi,{originalEvent:ai},{discrete:!1})};return ws.addEventListener("focusin",ii),()=>ws.removeEventListener("focusin",ii)},[ws,oi]),{onFocusCapture:()=>si.current=!0,onBlurCapture:()=>si.current=!1}}function Wr$2(){const Ws=new CustomEvent(Nn$2);document.dispatchEvent(Ws)}function Bo(Ws,ws,oi,{discrete:si}){const ii=oi.originalEvent.target,ai=new CustomEvent(Ws,{bubbles:!1,cancelable:!0,detail:oi});ws&&ii.addEventListener(Ws,ws,{once:!0}),si?wo$1(ii,ai):ii.dispatchEvent(ai)}var xn$1=0;function Rc(){React.useEffect(()=>{const Ws=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",Ws[0]??$r$2()),document.body.insertAdjacentElement("beforeend",Ws[1]??$r$2()),xn$1++,()=>{xn$1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(ws=>ws.remove()),xn$1--}},[])}function $r$2(){const Ws=document.createElement("span");return Ws.setAttribute("data-radix-focus-guard",""),Ws.tabIndex=0,Ws.style.outline="none",Ws.style.opacity="0",Ws.style.position="fixed",Ws.style.pointerEvents="none",Ws}var Cn$2="focusScope.autoFocusOnMount",Sn$1="focusScope.autoFocusOnUnmount",zr$2={bubbles:!1,cancelable:!0},Mc="FocusScope",Uo$1=React.forwardRef((Ws,ws)=>{const{loop:oi=!1,trapped:si=!1,onMountAutoFocus:ii,onUnmountAutoFocus:ai,...li}=Ws,[ci,ui]=React.useState(null),di=Ee$2(ii),hi=Ee$2(ai),pi=React.useRef(null),ha=ge$2(ws,ba=>ui(ba)),ga=React.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;React.useEffect(()=>{if(si){let ba=function(el){if(ga.paused||!ci)return;const ku=el.target;ci.contains(ku)?pi.current=ku:ze$2(pi.current,{select:!0})},wa=function(el){if(ga.paused||!ci)return;const ku=el.relatedTarget;ku!==null&&(ci.contains(ku)||ze$2(pi.current,{select:!0}))},xa=function(el){if(document.activeElement===document.body)for(const ku of el)ku.removedNodes.length>0&&ze$2(ci)};document.addEventListener("focusin",ba),document.addEventListener("focusout",wa);const Ca=new MutationObserver(xa);return ci&&Ca.observe(ci,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",ba),document.removeEventListener("focusout",wa),Ca.disconnect()}}},[si,ci,ga.paused]),React.useEffect(()=>{if(ci){jr$2.add(ga);const ba=document.activeElement;if(!ci.contains(ba)){const wa=new CustomEvent(Cn$2,zr$2);ci.addEventListener(Cn$2,di),ci.dispatchEvent(wa),wa.defaultPrevented||(_c(Dc(Wo$1(ci)),{select:!0}),document.activeElement===ba&&ze$2(ci))}return()=>{ci.removeEventListener(Cn$2,di),setTimeout(()=>{const wa=new CustomEvent(Sn$1,zr$2);ci.addEventListener(Sn$1,hi),ci.dispatchEvent(wa),wa.defaultPrevented||ze$2(ba??document.body,{select:!0}),ci.removeEventListener(Sn$1,hi),jr$2.remove(ga)},0)}}},[ci,di,hi,ga]);const va=React.useCallback(ba=>{if(!oi&&!si||ga.paused)return;const wa=ba.key==="Tab"&&!ba.altKey&&!ba.ctrlKey&&!ba.metaKey,xa=document.activeElement;if(wa&&xa){const Ca=ba.currentTarget,[el,ku]=Pc(Ca);el&&ku?!ba.shiftKey&&xa===ku?(ba.preventDefault(),oi&&ze$2(el,{select:!0})):ba.shiftKey&&xa===el&&(ba.preventDefault(),oi&&ze$2(ku,{select:!0})):xa===Ca&&ba.preventDefault()}},[oi,si,ga.paused]);return jsx(se$2.div,{tabIndex:-1,...li,ref:ha,onKeyDown:va})});Uo$1.displayName=Mc;function _c(Ws,{select:ws=!1}={}){const oi=document.activeElement;for(const si of Ws)if(ze$2(si,{select:ws}),document.activeElement!==oi)return}function Pc(Ws){const ws=Wo$1(Ws),oi=Gr$2(ws,Ws),si=Gr$2(ws.reverse(),Ws);return[oi,si]}function Wo$1(Ws){const ws=[],oi=document.createTreeWalker(Ws,NodeFilter.SHOW_ELEMENT,{acceptNode:si=>{const ii=si.tagName==="INPUT"&&si.type==="hidden";return si.disabled||si.hidden||ii?NodeFilter.FILTER_SKIP:si.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;oi.nextNode();)ws.push(oi.currentNode);return ws}function Gr$2(Ws,ws){for(const oi of Ws)if(!Tc(oi,{upTo:ws}))return oi}function Tc(Ws,{upTo:ws}){if(getComputedStyle(Ws).visibility==="hidden")return!0;for(;Ws;){if(ws!==void 0&&Ws===ws)return!1;if(getComputedStyle(Ws).display==="none")return!0;Ws=Ws.parentElement}return!1}function kc(Ws){return Ws instanceof HTMLInputElement&&"select"in Ws}function ze$2(Ws,{select:ws=!1}={}){if(Ws&&Ws.focus){const oi=document.activeElement;Ws.focus({preventScroll:!0}),Ws!==oi&&kc(Ws)&&ws&&Ws.select()}}var jr$2=Oc();function Oc(){let Ws=[];return{add(ws){const oi=Ws[0];ws!==oi&&(oi==null||oi.pause()),Ws=Hr$2(Ws,ws),Ws.unshift(ws)},remove(ws){var oi;Ws=Hr$2(Ws,ws),(oi=Ws[0])==null||oi.resume()}}}function Hr$2(Ws,ws){const oi=[...Ws],si=oi.indexOf(ws);return si!==-1&&oi.splice(si,1),oi}function Dc(Ws){return Ws.filter(ws=>ws.tagName!=="A")}var Ze$1=globalThis!=null&&globalThis.document?React.useLayoutEffect:()=>{},Ic=React.useId||(()=>{}),Fc=0;function Qt$2(Ws){const[ws,oi]=React.useState(Ic());return Ze$1(()=>{oi(si=>si??String(Fc++))},[Ws]),ws?`radix-${ws}`:""}var $t$2=typeof document<"u"?useLayoutEffect:useEffect;function Jt(Ws,ws){if(Ws===ws)return!0;if(typeof Ws!=typeof ws)return!1;if(typeof Ws=="function"&&Ws.toString()===ws.toString())return!0;let oi,si,ii;if(Ws&&ws&&typeof Ws=="object"){if(Array.isArray(Ws)){if(oi=Ws.length,oi!==ws.length)return!1;for(si=oi;si--!==0;)if(!Jt(Ws[si],ws[si]))return!1;return!0}if(ii=Object.keys(Ws),oi=ii.length,oi!==Object.keys(ws).length)return!1;for(si=oi;si--!==0;)if(!{}.hasOwnProperty.call(ws,ii[si]))return!1;for(si=oi;si--!==0;){const ai=ii[si];if(!(ai==="_owner"&&Ws.$$typeof)&&!Jt(Ws[ai],ws[ai]))return!1}return!0}return Ws!==Ws&&ws!==ws}function $o$2(Ws){return typeof window>"u"?1:(Ws.ownerDocument.defaultView||window).devicePixelRatio||1}function Kr$2(Ws,ws){const oi=$o$2(Ws);return Math.round(ws*oi)/oi}function En$1(Ws){const ws=React.useRef(Ws);return $t$2(()=>{ws.current=Ws}),ws}function Nc(Ws){Ws===void 0&&(Ws={});const{placement:ws="bottom",strategy:oi="absolute",middleware:si=[],platform:ii,elements:{reference:ai,floating:li}={},transform:ci=!0,whileElementsMounted:ui,open:di}=Ws,[hi,pi]=React.useState({x:0,y:0,strategy:oi,placement:ws,middlewareData:{},isPositioned:!1}),[ha,ga]=React.useState(si);Jt(ha,si)||ga(si);const[va,ba]=React.useState(null),[wa,xa]=React.useState(null),Ca=React.useCallback(of=>{of!==Ed.current&&(Ed.current=of,ba(of))},[]),el=React.useCallback(of=>{of!==Od.current&&(Od.current=of,xa(of))},[]),ku=ai||va,gd=li||wa,Ed=React.useRef(null),Od=React.useRef(null),Nd=React.useRef(hi),Pd=ui!=null,Ld=En$1(ui),rf=En$1(ii),kd=En$1(di),Md=React.useCallback(()=>{if(!Ed.current||!Od.current)return;const of={placement:ws,strategy:oi,middleware:ha};rf.current&&(of.platform=rf.current),mc(Ed.current,Od.current,of).then(Wd=>{const df={...Wd,isPositioned:kd.current!==!1};Td.current&&!Jt(Nd.current,df)&&(Nd.current=df,ReactDOM.flushSync(()=>{pi(df)}))})},[ha,ws,oi,rf,kd]);$t$2(()=>{di===!1&&Nd.current.isPositioned&&(Nd.current.isPositioned=!1,pi(of=>({...of,isPositioned:!1})))},[di]);const Td=React.useRef(!1);$t$2(()=>(Td.current=!0,()=>{Td.current=!1}),[]),$t$2(()=>{if(ku&&(Ed.current=ku),gd&&(Od.current=gd),ku&&gd){if(Ld.current)return Ld.current(ku,gd,Md);Md()}},[ku,gd,Md,Ld,Pd]);const wd=React.useMemo(()=>({reference:Ed,floating:Od,setReference:Ca,setFloating:el}),[Ca,el]),Cd=React.useMemo(()=>({reference:ku,floating:gd}),[ku,gd]),sf=React.useMemo(()=>{const of={position:oi,left:0,top:0};if(!Cd.floating)return of;const Wd=Kr$2(Cd.floating,hi.x),df=Kr$2(Cd.floating,hi.y);return ci?{...of,transform:"translate("+Wd+"px, "+df+"px)",...$o$2(Cd.floating)>=1.5&&{willChange:"transform"}}:{position:oi,left:Wd,top:df}},[oi,ci,Cd.floating,hi.x,hi.y]);return React.useMemo(()=>({...hi,update:Md,refs:wd,elements:Cd,floatingStyles:sf}),[hi,Md,wd,Cd,sf])}const Lc=Ws=>{function ws(oi){return{}.hasOwnProperty.call(oi,"current")}return{name:"arrow",options:Ws,fn(oi){const{element:si,padding:ii}=typeof Ws=="function"?Ws(oi):Ws;return si&&ws(si)?si.current!=null?Br$2({element:si.current,padding:ii}).fn(oi):{}:si?Br$2({element:si,padding:ii}).fn(oi):{}}}},Vc=(Ws,ws)=>({...cc(Ws),options:[Ws,ws]}),Bc=(Ws,ws)=>({...lc(Ws),options:[Ws,ws]}),Uc=(Ws,ws)=>({...pc(Ws),options:[Ws,ws]}),Wc=(Ws,ws)=>({...uc(Ws),options:[Ws,ws]}),$c=(Ws,ws)=>({...dc(Ws),options:[Ws,ws]}),zc=(Ws,ws)=>({...fc(Ws),options:[Ws,ws]}),Gc=(Ws,ws)=>({...Lc(Ws),options:[Ws,ws]});var jc="Arrow",zo=React.forwardRef((Ws,ws)=>{const{children:oi,width:si=10,height:ii=5,...ai}=Ws;return jsx(se$2.svg,{...ai,ref:ws,width:si,height:ii,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:Ws.asChild?oi:jsx("polygon",{points:"0,0 30,0 15,10"})})});zo.displayName=jc;var Hc=zo;function Kc(Ws){const[ws,oi]=React.useState(void 0);return Ze$1(()=>{if(Ws){oi({width:Ws.offsetWidth,height:Ws.offsetHeight});const si=new ResizeObserver(ii=>{if(!Array.isArray(ii)||!ii.length)return;const ai=ii[0];let li,ci;if("borderBoxSize"in ai){const ui=ai.borderBoxSize,di=Array.isArray(ui)?ui[0]:ui;li=di.inlineSize,ci=di.blockSize}else li=Ws.offsetWidth,ci=Ws.offsetHeight;oi({width:li,height:ci})});return si.observe(Ws,{box:"border-box"}),()=>si.unobserve(Ws)}else oi(void 0)},[Ws]),ws}var nr$1="Popper",[Go$1,jo]=dt$2(nr$1),[Yc,Ho$1]=Go$1(nr$1),Yo$1="PopperAnchor",Xo$1=React.forwardRef((Ws,ws)=>{const{__scopePopper:oi,virtualRef:si,...ii}=Ws,ai=Ho$1(Yo$1,oi),li=React.useRef(null),ci=ge$2(ws,li);return React.useEffect(()=>{ai.onAnchorChange((si==null?void 0:si.current)||li.current)}),si?null:jsx(se$2.div,{...ii,ref:ci})});Xo$1.displayName=Yo$1;var rr$1="PopperContent",[Xc,qc]=Go$1(rr$1),qo=React.forwardRef((Ws,ws)=>{var oi,si,ii,ai,li,ci;const{__scopePopper:ui,side:di="bottom",sideOffset:hi=0,align:pi="center",alignOffset:ha=0,arrowPadding:ga=0,avoidCollisions:va=!0,collisionBoundary:ba=[],collisionPadding:wa=0,sticky:xa="partial",hideWhenDetached:Ca=!1,updatePositionStrategy:el="optimized",onPlaced:ku,...gd}=Ws,Ed=Ho$1(rr$1,ui),[Od,Nd]=React.useState(null),Pd=ge$2(ws,Ef=>Nd(Ef)),[Ld,rf]=React.useState(null),kd=Kc(Ld),Md=(kd==null?void 0:kd.width)??0,Td=(kd==null?void 0:kd.height)??0,wd=di+(pi!=="center"?"-"+pi:""),Cd=typeof wa=="number"?wa:{top:0,right:0,bottom:0,left:0,...wa},sf=Array.isArray(ba)?ba:[ba],of=sf.length>0,Wd={padding:Cd,boundary:sf.filter(Qc),altBoundary:of},{refs:df,floatingStyles:hf,placement:xd,isPositioned:Fd,middlewareData:Vd}=Nc({strategy:"fixed",placement:wd,whileElementsMounted:(...Ef)=>ac(...Ef,{animationFrame:el==="always"}),elements:{reference:Ed.anchor},middleware:[Vc({mainAxis:hi+Td,alignmentAxis:ha}),va&&Bc({mainAxis:!0,crossAxis:!1,limiter:xa==="partial"?Uc():void 0,...Wd}),va&&Wc({...Wd}),$c({...Wd,apply:({elements:Ef,rects:xf,availableWidth:_d,availableHeight:Dd})=>{const{width:tf,height:vd}=xf.reference,Sd=Ef.floating.style;Sd.setProperty("--radix-popper-available-width",`${_d}px`),Sd.setProperty("--radix-popper-available-height",`${Dd}px`),Sd.setProperty("--radix-popper-anchor-width",`${tf}px`),Sd.setProperty("--radix-popper-anchor-height",`${vd}px`)}}),Ld&&Gc({element:Ld,padding:ga}),Jc({arrowWidth:Md,arrowHeight:Td}),Ca&&zc({strategy:"referenceHidden",...Wd})]}),[af,ff]=Jo$1(xd),uf=Ee$2(ku);Ze$1(()=>{Fd&&(uf==null||uf())},[Fd,uf]);const mf=(oi=Vd.arrow)==null?void 0:oi.x,yf=(si=Vd.arrow)==null?void 0:si.y,Sf=((ii=Vd.arrow)==null?void 0:ii.centerOffset)!==0,[Of,wf]=React.useState();return Ze$1(()=>{Od&&wf(window.getComputedStyle(Od).zIndex)},[Od]),jsx("div",{ref:df.setFloating,"data-radix-popper-content-wrapper":"",style:{...hf,transform:Fd?hf.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Of,"--radix-popper-transform-origin":[(ai=Vd.transformOrigin)==null?void 0:ai.x,(li=Vd.transformOrigin)==null?void 0:li.y].join(" "),...((ci=Vd.hide)==null?void 0:ci.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:Ws.dir,children:jsx(Xc,{scope:ui,placedSide:af,onArrowChange:rf,arrowX:mf,arrowY:yf,shouldHideArrow:Sf,children:jsx(se$2.div,{"data-side":af,"data-align":ff,...gd,ref:Pd,style:{...gd.style,animation:Fd?void 0:"none"}})})})});qo.displayName=rr$1;var Zo$1="PopperArrow",Zc={top:"bottom",right:"left",bottom:"top",left:"right"},Qo=React.forwardRef(function(Ws,ws){const{__scopePopper:oi,...si}=Ws,ii=qc(Zo$1,oi),ai=Zc[ii.placedSide];return jsx("span",{ref:ii.onArrowChange,style:{position:"absolute",left:ii.arrowX,top:ii.arrowY,[ai]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[ii.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[ii.placedSide],visibility:ii.shouldHideArrow?"hidden":void 0},children:jsx(Hc,{...si,ref:ws,style:{...si.style,display:"block"}})})});Qo.displayName=Zo$1;function Qc(Ws){return Ws!==null}var Jc=Ws=>({name:"transformOrigin",options:Ws,fn(ws){var oi,si,ii;const{placement:ai,rects:li,middlewareData:ci}=ws,ui=((oi=ci.arrow)==null?void 0:oi.centerOffset)!==0,di=ui?0:Ws.arrowWidth,hi=ui?0:Ws.arrowHeight,[pi,ha]=Jo$1(ai),ga={start:"0%",center:"50%",end:"100%"}[ha],va=(((si=ci.arrow)==null?void 0:si.x)??0)+di/2,ba=(((ii=ci.arrow)==null?void 0:ii.y)??0)+hi/2;let wa="",xa="";return pi==="bottom"?(wa=ui?ga:`${va}px`,xa=`${-hi}px`):pi==="top"?(wa=ui?ga:`${va}px`,xa=`${li.floating.height+hi}px`):pi==="right"?(wa=`${-hi}px`,xa=ui?ga:`${ba}px`):pi==="left"&&(wa=`${li.floating.width+hi}px`,xa=ui?ga:`${ba}px`),{data:{x:wa,y:xa}}}});function Jo$1(Ws){const[ws,oi="center"]=Ws.split("-");return[ws,oi]}var tl=Xo$1,nl=qo,rl=Qo,ol="Portal",es$1=React.forwardRef((Ws,ws)=>{var oi;const{container:si,...ii}=Ws,[ai,li]=React.useState(!1);Ze$1(()=>li(!0),[]);const ci=si||ai&&((oi=globalThis==null?void 0:globalThis.document)==null?void 0:oi.body);return ci?ReactDOM__default.createPortal(jsx(se$2.div,{...ii,ref:ws}),ci):null});es$1.displayName=ol;function sl(Ws,ws){return React.useReducer((oi,si)=>ws[oi][si]??oi,Ws)}var ft$2=Ws=>{const{present:ws,children:oi}=Ws,si=il(ws),ii=typeof oi=="function"?oi({present:si.isPresent}):React.Children.only(oi),ai=ge$2(si.ref,al(ii));return typeof oi=="function"||si.isPresent?React.cloneElement(ii,{ref:ai}):null};ft$2.displayName="Presence";function il(Ws){const[ws,oi]=React.useState(),si=React.useRef({}),ii=React.useRef(Ws),ai=React.useRef("none"),li=Ws?"mounted":"unmounted",[ci,ui]=sl(li,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return React.useEffect(()=>{const di=Nt$2(si.current);ai.current=ci==="mounted"?di:"none"},[ci]),Ze$1(()=>{const di=si.current,hi=ii.current;if(hi!==Ws){const pi=ai.current,ha=Nt$2(di);Ws?ui("MOUNT"):ha==="none"||(di==null?void 0:di.display)==="none"?ui("UNMOUNT"):ui(hi&&pi!==ha?"ANIMATION_OUT":"UNMOUNT"),ii.current=Ws}},[Ws,ui]),Ze$1(()=>{if(ws){let di;const hi=ws.ownerDocument.defaultView??window,pi=ga=>{const va=Nt$2(si.current).includes(ga.animationName);if(ga.target===ws&&va&&(ui("ANIMATION_END"),!ii.current)){const ba=ws.style.animationFillMode;ws.style.animationFillMode="forwards",di=hi.setTimeout(()=>{ws.style.animationFillMode==="forwards"&&(ws.style.animationFillMode=ba)})}},ha=ga=>{ga.target===ws&&(ai.current=Nt$2(si.current))};return ws.addEventListener("animationstart",ha),ws.addEventListener("animationcancel",pi),ws.addEventListener("animationend",pi),()=>{hi.clearTimeout(di),ws.removeEventListener("animationstart",ha),ws.removeEventListener("animationcancel",pi),ws.removeEventListener("animationend",pi)}}else ui("ANIMATION_END")},[ws,ui]),{isPresent:["mounted","unmountSuspended"].includes(ci),ref:React.useCallback(di=>{di&&(si.current=getComputedStyle(di)),oi(di)},[])}}function Nt$2(Ws){return(Ws==null?void 0:Ws.animationName)||"none"}function al(Ws){var ws,oi;let si=(ws=Object.getOwnPropertyDescriptor(Ws.props,"ref"))==null?void 0:ws.get,ii=si&&"isReactWarning"in si&&si.isReactWarning;return ii?Ws.ref:(si=(oi=Object.getOwnPropertyDescriptor(Ws,"ref"))==null?void 0:oi.get,ii=si&&"isReactWarning"in si&&si.isReactWarning,ii?Ws.props.ref:Ws.props.ref||Ws.ref)}var An$2="rovingFocusGroup.onEntryFocus",cl={bubbles:!1,cancelable:!0},cn$2="RovingFocusGroup",[Ln$2,ts$1,ll]=No$1(cn$2),[ul,ln$1]=dt$2(cn$2,[ll]),[dl,fl]=ul(cn$2),ns=React.forwardRef((Ws,ws)=>jsx(Ln$2.Provider,{scope:Ws.__scopeRovingFocusGroup,children:jsx(Ln$2.Slot,{scope:Ws.__scopeRovingFocusGroup,children:jsx(pl,{...Ws,ref:ws})})}));ns.displayName=cn$2;var pl=React.forwardRef((Ws,ws)=>{const{__scopeRovingFocusGroup:oi,orientation:si,loop:ii=!1,dir:ai,currentTabStopId:li,defaultCurrentTabStopId:ci,onCurrentTabStopIdChange:ui,onEntryFocus:di,preventScrollOnEntryFocus:hi=!1,...pi}=Ws,ha=React.useRef(null),ga=ge$2(ws,ha),va=tr$1(ai),[ba=null,wa]=er$1({prop:li,defaultProp:ci,onChange:ui}),[xa,Ca]=React.useState(!1),el=Ee$2(di),ku=ts$1(oi),gd=React.useRef(!1),[Ed,Od]=React.useState(0);return React.useEffect(()=>{const Nd=ha.current;if(Nd)return Nd.addEventListener(An$2,el),()=>Nd.removeEventListener(An$2,el)},[el]),jsx(dl,{scope:oi,orientation:si,dir:va,loop:ii,currentTabStopId:ba,onItemFocus:React.useCallback(Nd=>wa(Nd),[wa]),onItemShiftTab:React.useCallback(()=>Ca(!0),[]),onFocusableItemAdd:React.useCallback(()=>Od(Nd=>Nd+1),[]),onFocusableItemRemove:React.useCallback(()=>Od(Nd=>Nd-1),[]),children:jsx(se$2.div,{tabIndex:xa||Ed===0?-1:0,"data-orientation":si,...pi,ref:ga,style:{outline:"none",...Ws.style},onMouseDown:Y$2(Ws.onMouseDown,()=>{gd.current=!0}),onFocus:Y$2(Ws.onFocus,Nd=>{const Pd=!gd.current;if(Nd.target===Nd.currentTarget&&Pd&&!xa){const Ld=new CustomEvent(An$2,cl);if(Nd.currentTarget.dispatchEvent(Ld),!Ld.defaultPrevented){const rf=ku().filter(wd=>wd.focusable),kd=rf.find(wd=>wd.active),Md=rf.find(wd=>wd.id===ba),Td=[kd,Md,...rf].filter(Boolean).map(wd=>wd.ref.current);ss$1(Td,hi)}}gd.current=!1}),onBlur:Y$2(Ws.onBlur,()=>Ca(!1))})})}),rs$1="RovingFocusGroupItem",os$1=React.forwardRef((Ws,ws)=>{const{__scopeRovingFocusGroup:oi,focusable:si=!0,active:ii=!1,tabStopId:ai,...li}=Ws,ci=Qt$2(),ui=ai||ci,di=fl(rs$1,oi),hi=di.currentTabStopId===ui,pi=ts$1(oi),{onFocusableItemAdd:ha,onFocusableItemRemove:ga}=di;return React.useEffect(()=>{if(si)return ha(),()=>ga()},[si,ha,ga]),jsx(Ln$2.ItemSlot,{scope:oi,id:ui,focusable:si,active:ii,children:jsx(se$2.span,{tabIndex:hi?0:-1,"data-orientation":di.orientation,...li,ref:ws,onMouseDown:Y$2(Ws.onMouseDown,va=>{si?di.onItemFocus(ui):va.preventDefault()}),onFocus:Y$2(Ws.onFocus,()=>di.onItemFocus(ui)),onKeyDown:Y$2(Ws.onKeyDown,va=>{if(va.key==="Tab"&&va.shiftKey){di.onItemShiftTab();return}if(va.target!==va.currentTarget)return;const ba=gl(va,di.orientation,di.dir);if(ba!==void 0){if(va.metaKey||va.ctrlKey||va.altKey||va.shiftKey)return;va.preventDefault();let wa=pi().filter(xa=>xa.focusable).map(xa=>xa.ref.current);if(ba==="last")wa.reverse();else if(ba==="prev"||ba==="next"){ba==="prev"&&wa.reverse();const xa=wa.indexOf(va.currentTarget);wa=di.loop?vl(wa,xa+1):wa.slice(xa+1)}setTimeout(()=>ss$1(wa))}})})})});os$1.displayName=rs$1;var ml={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function hl(Ws,ws){return ws!=="rtl"?Ws:Ws==="ArrowLeft"?"ArrowRight":Ws==="ArrowRight"?"ArrowLeft":Ws}function gl(Ws,ws,oi){const si=hl(Ws.key,oi);if(!(ws==="vertical"&&["ArrowLeft","ArrowRight"].includes(si))&&!(ws==="horizontal"&&["ArrowUp","ArrowDown"].includes(si)))return ml[si]}function ss$1(Ws,ws=!1){const oi=document.activeElement;for(const si of Ws)if(si===oi||(si.focus({preventScroll:ws}),document.activeElement!==oi))return}function vl(Ws,ws){return Ws.map((oi,si)=>Ws[(ws+si)%Ws.length])}var is=ns,as=os$1,yl=function(Ws){if(typeof document>"u")return null;var ws=Array.isArray(Ws)?Ws[0]:Ws;return ws.ownerDocument.body},tt$2=new WeakMap,Lt$2=new WeakMap,Vt$1={},Rn$1=0,cs$1=function(Ws){return Ws&&(Ws.host||cs$1(Ws.parentNode))},bl=function(Ws,ws){return ws.map(function(oi){if(Ws.contains(oi))return oi;var si=cs$1(oi);return si&&Ws.contains(si)?si:(console.error("aria-hidden",oi,"in not contained inside",Ws,". Doing nothing"),null)}).filter(function(oi){return!!oi})},wl=function(Ws,ws,oi,si){var ii=bl(ws,Array.isArray(Ws)?Ws:[Ws]);Vt$1[oi]||(Vt$1[oi]=new WeakMap);var ai=Vt$1[oi],li=[],ci=new Set,ui=new Set(ii),di=function(pi){!pi||ci.has(pi)||(ci.add(pi),di(pi.parentNode))};ii.forEach(di);var hi=function(pi){!pi||ui.has(pi)||Array.prototype.forEach.call(pi.children,function(ha){if(ci.has(ha))hi(ha);else try{var ga=ha.getAttribute(si),va=ga!==null&&ga!=="false",ba=(tt$2.get(ha)||0)+1,wa=(ai.get(ha)||0)+1;tt$2.set(ha,ba),ai.set(ha,wa),li.push(ha),ba===1&&va&&Lt$2.set(ha,!0),wa===1&&ha.setAttribute(oi,"true"),va||ha.setAttribute(si,"true")}catch(xa){console.error("aria-hidden: cannot operate on ",ha,xa)}})};return hi(ws),ci.clear(),Rn$1++,function(){li.forEach(function(pi){var ha=tt$2.get(pi)-1,ga=ai.get(pi)-1;tt$2.set(pi,ha),ai.set(pi,ga),ha||(Lt$2.has(pi)||pi.removeAttribute(si),Lt$2.delete(pi)),ga||pi.removeAttribute(oi)}),Rn$1--,Rn$1||(tt$2=new WeakMap,tt$2=new WeakMap,Lt$2=new WeakMap,Vt$1={})}},xl=function(Ws,ws,oi){oi===void 0&&(oi="data-aria-hidden");var si=Array.from(Array.isArray(Ws)?Ws:[Ws]),ii=yl(Ws);return ii?(si.push.apply(si,Array.from(ii.querySelectorAll("[aria-live]"))),wl(si,ii,oi,"aria-hidden")):function(){return null}},Pe$2=function(){return Pe$2=Object.assign||function(Ws){for(var ws,oi=1,si=arguments.length;oi<si;oi++){ws=arguments[oi];for(var ii in ws)Object.prototype.hasOwnProperty.call(ws,ii)&&(Ws[ii]=ws[ii])}return Ws},Pe$2.apply(this,arguments)};function ls$1(Ws,ws){var oi={};for(var si in Ws)Object.prototype.hasOwnProperty.call(Ws,si)&&ws.indexOf(si)<0&&(oi[si]=Ws[si]);if(Ws!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ii=0,si=Object.getOwnPropertySymbols(Ws);ii<si.length;ii++)ws.indexOf(si[ii])<0&&Object.prototype.propertyIsEnumerable.call(Ws,si[ii])&&(oi[si[ii]]=Ws[si[ii]]);return oi}function Cl(Ws,ws,oi){for(var si=0,ii=ws.length,ai;si<ii;si++)(ai||!(si in ws))&&(ai||(ai=Array.prototype.slice.call(ws,0,si)),ai[si]=ws[si]);return Ws.concat(ai||Array.prototype.slice.call(ws))}var zt$2="right-scroll-bar-position",Gt$2="width-before-scroll-bar",Sl="with-scroll-bars-hidden",El="--removed-body-scroll-bar-size";function Mn$2(Ws,ws){return typeof Ws=="function"?Ws(ws):Ws&&(Ws.current=ws),Ws}function Al(Ws,ws){var oi=useState(function(){return{value:Ws,callback:ws,facade:{get current(){return oi.value},set current(si){var ii=oi.value;ii!==si&&(oi.value=si,oi.callback(si,ii))}}}})[0];return oi.callback=ws,oi.facade}var Rl=typeof window<"u"?React.useLayoutEffect:React.useEffect,Yr$2=new WeakMap;function Ml(Ws,ws){var oi=Al(null,function(si){return Ws.forEach(function(ii){return Mn$2(ii,si)})});return Rl(function(){var si=Yr$2.get(oi);if(si){var ii=new Set(si),ai=new Set(Ws),li=oi.current;ii.forEach(function(ci){ai.has(ci)||Mn$2(ci,null)}),ai.forEach(function(ci){ii.has(ci)||Mn$2(ci,li)})}Yr$2.set(oi,Ws)},[Ws]),oi}function _l(Ws){return Ws}function Pl(Ws,ws){ws===void 0&&(ws=_l);var oi=[],si=!1,ii={read:function(){if(si)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return oi.length?oi[oi.length-1]:Ws},useMedium:function(ai){var li=ws(ai,si);return oi.push(li),function(){oi=oi.filter(function(ci){return ci!==li})}},assignSyncMedium:function(ai){for(si=!0;oi.length;){var li=oi;oi=[],li.forEach(ai)}oi={push:function(ci){return ai(ci)},filter:function(){return oi}}},assignMedium:function(ai){si=!0;var li=[];if(oi.length){var ci=oi;oi=[],ci.forEach(ai),li=oi}var ui=function(){var hi=li;li=[],hi.forEach(ai)},di=function(){return Promise.resolve().then(ui)};di(),oi={push:function(hi){li.push(hi),di()},filter:function(hi){return li=li.filter(hi),oi}}}};return ii}function Tl(Ws){Ws===void 0&&(Ws={});var ws=Pl(null);return ws.options=Pe$2({async:!0,ssr:!1},Ws),ws}var us=function(Ws){var ws=Ws.sideCar,oi=ls$1(Ws,["sideCar"]);if(!ws)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var si=ws.read();if(!si)throw new Error("Sidecar medium not found");return React.createElement(si,Pe$2({},oi))};us.isSideCarExport=!0;function kl(Ws,ws){return Ws.useMedium(ws),us}var ds$1=Tl(),_n$2=function(){},un$1=React.forwardRef(function(Ws,ws){var oi=React.useRef(null),si=React.useState({onScrollCapture:_n$2,onWheelCapture:_n$2,onTouchMoveCapture:_n$2}),ii=si[0],ai=si[1],li=Ws.forwardProps,ci=Ws.children,ui=Ws.className,di=Ws.removeScrollBar,hi=Ws.enabled,pi=Ws.shards,ha=Ws.sideCar,ga=Ws.noIsolation,va=Ws.inert,ba=Ws.allowPinchZoom,wa=Ws.as,xa=wa===void 0?"div":wa,Ca=Ws.gapMode,el=ls$1(Ws,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),ku=ha,gd=Ml([oi,ws]),Ed=Pe$2(Pe$2({},el),ii);return React.createElement(React.Fragment,null,hi&&React.createElement(ku,{sideCar:ds$1,removeScrollBar:di,shards:pi,noIsolation:ga,inert:va,setCallbacks:ai,allowPinchZoom:!!ba,lockRef:oi,gapMode:Ca}),li?React.cloneElement(React.Children.only(ci),Pe$2(Pe$2({},Ed),{ref:gd})):React.createElement(xa,Pe$2({},Ed,{className:ui,ref:gd}),ci))});un$1.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};un$1.classNames={fullWidth:Gt$2,zeroRight:zt$2};var Ol=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Dl(){if(!document)return null;var Ws=document.createElement("style");Ws.type="text/css";var ws=Ol();return ws&&Ws.setAttribute("nonce",ws),Ws}function Il(Ws,ws){Ws.styleSheet?Ws.styleSheet.cssText=ws:Ws.appendChild(document.createTextNode(ws))}function Fl(Ws){var ws=document.head||document.getElementsByTagName("head")[0];ws.appendChild(Ws)}var Nl=function(){var Ws=0,ws=null;return{add:function(oi){Ws==0&&(ws=Dl())&&(Il(ws,oi),Fl(ws)),Ws++},remove:function(){Ws--,!Ws&&ws&&(ws.parentNode&&ws.parentNode.removeChild(ws),ws=null)}}},Ll=function(){var Ws=Nl();return function(ws,oi){React.useEffect(function(){return Ws.add(ws),function(){Ws.remove()}},[ws&&oi])}},fs=function(){var Ws=Ll(),ws=function(oi){var si=oi.styles,ii=oi.dynamic;return Ws(si,ii),null};return ws},Vl={left:0,top:0,right:0,gap:0},Pn$2=function(Ws){return parseInt(Ws||"",10)||0},Bl=function(Ws){var ws=window.getComputedStyle(document.body),oi=ws[Ws==="padding"?"paddingLeft":"marginLeft"],si=ws[Ws==="padding"?"paddingTop":"marginTop"],ii=ws[Ws==="padding"?"paddingRight":"marginRight"];return[Pn$2(oi),Pn$2(si),Pn$2(ii)]},Ul=function(Ws){if(Ws===void 0&&(Ws="margin"),typeof window>"u")return Vl;var ws=Bl(Ws),oi=document.documentElement.clientWidth,si=window.innerWidth;return{left:ws[0],top:ws[1],right:ws[2],gap:Math.max(0,si-oi+ws[2]-ws[0])}},Wl=fs(),it="data-scroll-locked",$l=function(Ws,ws,oi,si){var ii=Ws.left,ai=Ws.top,li=Ws.right,ci=Ws.gap;return oi===void 0&&(oi="margin"),`
|
|
2
2
|
.`.concat(Sl,` {
|
|
3
3
|
overflow: hidden `).concat(si,`;
|
|
4
4
|
padding-right: `).concat(ci,"px ").concat(si,`;
|
|
@@ -38,13 +38,13 @@ import{_ as __vitePreload}from"./main.CJqJ7IgV.js";import{jsx,Fragment,jsxs}from
|
|
|
38
38
|
`)},Xr$2=function(){var Ws=parseInt(document.body.getAttribute(it)||"0",10);return isFinite(Ws)?Ws:0},zl=function(){React.useEffect(function(){return document.body.setAttribute(it,(Xr$2()+1).toString()),function(){var Ws=Xr$2()-1;Ws<=0?document.body.removeAttribute(it):document.body.setAttribute(it,Ws.toString())}},[])},Gl=function(Ws){var ws=Ws.noRelative,oi=Ws.noImportant,si=Ws.gapMode,ii=si===void 0?"margin":si;zl();var ai=React.useMemo(function(){return Ul(ii)},[ii]);return React.createElement(Wl,{styles:$l(ai,!ws,ii,oi?"":"!important")})},Vn$1=!1;if(typeof window<"u")try{var Bt$2=Object.defineProperty({},"passive",{get:function(){return Vn$1=!0,!0}});window.addEventListener("test",Bt$2,Bt$2),window.removeEventListener("test",Bt$2,Bt$2)}catch{Vn$1=!1}var nt$2=Vn$1?{passive:!1}:!1,jl=function(Ws){return Ws.tagName==="TEXTAREA"},ps$1=function(Ws,ws){if(!(Ws instanceof Element))return!1;var oi=window.getComputedStyle(Ws);return oi[ws]!=="hidden"&&!(oi.overflowY===oi.overflowX&&!jl(Ws)&&oi[ws]==="visible")},Hl=function(Ws){return ps$1(Ws,"overflowY")},Kl=function(Ws){return ps$1(Ws,"overflowX")},qr$2=function(Ws,ws){var oi=ws.ownerDocument,si=ws;do{typeof ShadowRoot<"u"&&si instanceof ShadowRoot&&(si=si.host);var ii=ms(Ws,si);if(ii){var ai=hs$1(Ws,si),li=ai[1],ci=ai[2];if(li>ci)return!0}si=si.parentNode}while(si&&si!==oi.body);return!1},Yl=function(Ws){var ws=Ws.scrollTop,oi=Ws.scrollHeight,si=Ws.clientHeight;return[ws,oi,si]},Xl=function(Ws){var ws=Ws.scrollLeft,oi=Ws.scrollWidth,si=Ws.clientWidth;return[ws,oi,si]},ms=function(Ws,ws){return Ws==="v"?Hl(ws):Kl(ws)},hs$1=function(Ws,ws){return Ws==="v"?Yl(ws):Xl(ws)},ql=function(Ws,ws){return Ws==="h"&&ws==="rtl"?-1:1},Zl=function(Ws,ws,oi,si,ii){var ai=ql(Ws,window.getComputedStyle(ws).direction),li=ai*si,ci=oi.target,ui=ws.contains(ci),di=!1,hi=li>0,pi=0,ha=0;do{var ga=hs$1(Ws,ci),va=ga[0],ba=ga[1],wa=ga[2],xa=ba-wa-ai*va;(va||xa)&&ms(Ws,ci)&&(pi+=xa,ha+=va),ci instanceof ShadowRoot?ci=ci.host:ci=ci.parentNode}while(!ui&&ci!==document.body||ui&&(ws.contains(ci)||ws===ci));return(hi&&Math.abs(pi)<1||!hi&&Math.abs(ha)<1)&&(di=!0),di},Ut$2=function(Ws){return"changedTouches"in Ws?[Ws.changedTouches[0].clientX,Ws.changedTouches[0].clientY]:[0,0]},Zr$2=function(Ws){return[Ws.deltaX,Ws.deltaY]},Qr$1=function(Ws){return Ws&&"current"in Ws?Ws.current:Ws},Ql=function(Ws,ws){return Ws[0]===ws[0]&&Ws[1]===ws[1]},Jl=function(Ws){return`
|
|
39
39
|
.block-interactivity-`.concat(Ws,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(Ws,` {pointer-events: all;}
|
|
41
|
-
`)},eu=0,rt$1=[];function tu(Ws){var ws=React.useRef([]),oi=React.useRef([0,0]),si=React.useRef(),ii=React.useState(eu++)[0],ai=React.useState(fs)[0],li=React.useRef(Ws);React.useEffect(function(){li.current=Ws},[Ws]),React.useEffect(function(){if(Ws.inert){document.body.classList.add("block-interactivity-".concat(ii));var ba=Cl([Ws.lockRef.current],(Ws.shards||[]).map(Qr$1)).filter(Boolean);return ba.forEach(function(wa){return wa.classList.add("allow-interactivity-".concat(ii))}),function(){document.body.classList.remove("block-interactivity-".concat(ii)),ba.forEach(function(wa){return wa.classList.remove("allow-interactivity-".concat(ii))})}}},[Ws.inert,Ws.lockRef.current,Ws.shards]);var ci=React.useCallback(function(ba,wa){if("touches"in ba&&ba.touches.length===2||ba.type==="wheel"&&ba.ctrlKey)return!li.current.allowPinchZoom;var xa=Ut$2(ba),Ca=oi.current,el="deltaX"in ba?ba.deltaX:Ca[0]-xa[0],ku="deltaY"in ba?ba.deltaY:Ca[1]-xa[1],gd,Ed=ba.target,Od=Math.abs(el)>Math.abs(ku)?"h":"v";if("touches"in ba&&Od==="h"&&Ed.type==="range")return!1;var Nd=qr$2(Od,Ed);if(!Nd)return!0;if(Nd?gd=Od:(gd=Od==="v"?"h":"v",Nd=qr$2(Od,Ed)),!Nd)return!1;if(!si.current&&"changedTouches"in ba&&(el||ku)&&(si.current=gd),!gd)return!0;var Pd=si.current||gd;return Zl(Pd,wa,ba,Pd==="h"?el:ku)},[]),ui=React.useCallback(function(ba){var wa=ba;if(!(!rt$1.length||rt$1[rt$1.length-1]!==ai)){var xa="deltaY"in wa?Zr$2(wa):Ut$2(wa),Ca=ws.current.filter(function(gd){return gd.name===wa.type&&(gd.target===wa.target||wa.target===gd.shadowParent)&&Ql(gd.delta,xa)})[0];if(Ca&&Ca.should){wa.cancelable&&wa.preventDefault();return}if(!Ca){var el=(li.current.shards||[]).map(Qr$1).filter(Boolean).filter(function(gd){return gd.contains(wa.target)}),ku=el.length>0?ci(wa,el[0]):!li.current.noIsolation;ku&&wa.cancelable&&wa.preventDefault()}}},[]),di=React.useCallback(function(ba,wa,xa,Ca){var el={name:ba,delta:wa,target:xa,should:Ca,shadowParent:nu(xa)};ws.current.push(el),setTimeout(function(){ws.current=ws.current.filter(function(ku){return ku!==el})},1)},[]),hi=React.useCallback(function(ba){oi.current=Ut$2(ba),si.current=void 0},[]),pi=React.useCallback(function(ba){di(ba.type,Zr$2(ba),ba.target,ci(ba,Ws.lockRef.current))},[]),ha=React.useCallback(function(ba){di(ba.type,Ut$2(ba),ba.target,ci(ba,Ws.lockRef.current))},[]);React.useEffect(function(){return rt$1.push(ai),Ws.setCallbacks({onScrollCapture:pi,onWheelCapture:pi,onTouchMoveCapture:ha}),document.addEventListener("wheel",ui,nt$2),document.addEventListener("touchmove",ui,nt$2),document.addEventListener("touchstart",hi,nt$2),function(){rt$1=rt$1.filter(function(ba){return ba!==ai}),document.removeEventListener("wheel",ui,nt$2),document.removeEventListener("touchmove",ui,nt$2),document.removeEventListener("touchstart",hi,nt$2)}},[]);var ga=Ws.removeScrollBar,va=Ws.inert;return React.createElement(React.Fragment,null,va?React.createElement(ai,{styles:Jl(ii)}):null,ga?React.createElement(Gl,{gapMode:Ws.gapMode}):null)}function nu(Ws){for(var ws=null;Ws!==null;)Ws instanceof ShadowRoot&&(ws=Ws.host,Ws=Ws.host),Ws=Ws.parentNode;return ws}const ru=kl(ds$1,tu);var gs=React.forwardRef(function(Ws,ws){return React.createElement(un$1,Pe$2({},Ws,{ref:ws,sideCar:ru}))});gs.classNames=un$1.classNames;var Bn$1=["Enter"," "],ou=["ArrowDown","PageUp","Home"],vs=["ArrowUp","PageDown","End"],su=[...ou,...vs],iu={ltr:[...Bn$1,"ArrowRight"],rtl:[...Bn$1,"ArrowLeft"]},au={ltr:["ArrowLeft"],rtl:["ArrowRight"]},kt$2="Menu",[Rt$2,cu,lu]=No$1(kt$2),[Qe$1,ys]=dt$2(kt$2,[lu,jo,ln$1]),dn$1=jo(),bs=ln$1(),[uu,Je$2]=Qe$1(kt$2),[du,Ot$1]=Qe$1(kt$2),fu="MenuAnchor",or$2=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,...si}=Ws,ii=dn$1(oi);return jsx(tl,{...ii,...si,ref:ws})});or$2.displayName=fu;var sr$1="MenuPortal",[pu,xs$1]=Qe$1(sr$1,{forceMount:void 0}),Cs$1=Ws=>{const{__scopeMenu:ws,forceMount:oi,children:si,container:ii}=Ws,ai=Je$2(sr$1,ws);return jsx(pu,{scope:ws,forceMount:oi,children:jsx(ft$2,{present:oi||ai.open,children:jsx(es$1,{asChild:!0,container:ii,children:si})})})};Cs$1.displayName=sr$1;var we$1="MenuContent",[mu,ir$1]=Qe$1(we$1),Ss$1=React.forwardRef((Ws,ws)=>{const oi=xs$1(we$1,Ws.__scopeMenu),{forceMount:si=oi.forceMount,...ii}=Ws,ai=Je$2(we$1,Ws.__scopeMenu),li=Ot$1(we$1,Ws.__scopeMenu);return jsx(Rt$2.Provider,{scope:Ws.__scopeMenu,children:jsx(ft$2,{present:si||ai.open,children:jsx(Rt$2.Slot,{scope:Ws.__scopeMenu,children:li.modal?jsx(hu,{...ii,ref:ws}):jsx(gu,{...ii,ref:ws})})})})}),hu=React.forwardRef((Ws,ws)=>{const oi=Je$2(we$1,Ws.__scopeMenu),si=React.useRef(null),ii=ge$2(ws,si);return React.useEffect(()=>{const ai=si.current;if(ai)return xl(ai)},[]),jsx(ar$1,{...Ws,ref:ii,trapFocus:oi.open,disableOutsidePointerEvents:oi.open,disableOutsideScroll:!0,onFocusOutside:Y$2(Ws.onFocusOutside,ai=>ai.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>oi.onOpenChange(!1)})}),gu=React.forwardRef((Ws,ws)=>{const oi=Je$2(we$1,Ws.__scopeMenu);return jsx(ar$1,{...Ws,ref:ws,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>oi.onOpenChange(!1)})}),ar$1=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,loop:si=!1,trapFocus:ii,onOpenAutoFocus:ai,onCloseAutoFocus:li,disableOutsidePointerEvents:ci,onEntryFocus:ui,onEscapeKeyDown:di,onPointerDownOutside:hi,onFocusOutside:pi,onInteractOutside:ha,onDismiss:ga,disableOutsideScroll:va,...ba}=Ws,wa=Je$2(we$1,oi),xa=Ot$1(we$1,oi),Ca=dn$1(oi),el=bs(oi),ku=cu(oi),[gd,Ed]=React.useState(null),Od=React.useRef(null),Nd=ge$2(ws,Od,wa.onContentChange),Pd=React.useRef(0),Ld=React.useRef(""),rf=React.useRef(0),_d=React.useRef(null),Md=React.useRef("right"),Td=React.useRef(0),wd=va?gs:React.Fragment,Cd=va?{as:St$2,allowPinchZoom:!0}:void 0,sf=Wd=>{var df,hf;const xd=Ld.current+Wd,Fd=ku().filter(yf=>!yf.disabled),Vd=document.activeElement,af=(df=Fd.find(yf=>yf.ref.current===Vd))==null?void 0:df.textValue,ff=Fd.map(yf=>yf.textValue),uf=_u(ff,xd,af),mf=(hf=Fd.find(yf=>yf.textValue===uf))==null?void 0:hf.ref.current;(function yf(Sf){Ld.current=Sf,window.clearTimeout(Pd.current),Sf!==""&&(Pd.current=window.setTimeout(()=>yf(""),1e3))})(xd),mf&&setTimeout(()=>mf.focus())};React.useEffect(()=>()=>window.clearTimeout(Pd.current),[]),Rc();const of=React.useCallback(Wd=>{var df,hf;return Md.current===((df=_d.current)==null?void 0:df.side)&&Tu(Wd,(hf=_d.current)==null?void 0:hf.area)},[]);return jsx(mu,{scope:oi,searchRef:Ld,onItemEnter:React.useCallback(Wd=>{of(Wd)&&Wd.preventDefault()},[of]),onItemLeave:React.useCallback(Wd=>{var df;of(Wd)||((df=Od.current)==null||df.focus(),Ed(null))},[of]),onTriggerLeave:React.useCallback(Wd=>{of(Wd)&&Wd.preventDefault()},[of]),pointerGraceTimerRef:rf,onPointerGraceIntentChange:React.useCallback(Wd=>{_d.current=Wd},[]),children:jsx(wd,{...Cd,children:jsx(Uo$1,{asChild:!0,trapped:ii,onMountAutoFocus:Y$2(ai,Wd=>{var df;Wd.preventDefault(),(df=Od.current)==null||df.focus({preventScroll:!0})}),onUnmountAutoFocus:li,children:jsx(Vo$1,{asChild:!0,disableOutsidePointerEvents:ci,onEscapeKeyDown:di,onPointerDownOutside:hi,onFocusOutside:pi,onInteractOutside:ha,onDismiss:ga,children:jsx(is,{asChild:!0,...el,dir:xa.dir,orientation:"vertical",loop:si,currentTabStopId:gd,onCurrentTabStopIdChange:Ed,onEntryFocus:Y$2(ui,Wd=>{xa.isUsingKeyboardRef.current||Wd.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsx(nl,{role:"menu","aria-orientation":"vertical","data-state":Bs(wa.open),"data-radix-menu-content":"",dir:xa.dir,...Ca,...ba,ref:Nd,style:{outline:"none",...ba.style},onKeyDown:Y$2(ba.onKeyDown,Wd=>{const df=Wd.target.closest("[data-radix-menu-content]")===Wd.currentTarget,hf=Wd.ctrlKey||Wd.altKey||Wd.metaKey,xd=Wd.key.length===1;df&&(Wd.key==="Tab"&&Wd.preventDefault(),!hf&&xd&&sf(Wd.key));const Fd=Od.current;if(Wd.target!==Fd||!su.includes(Wd.key))return;Wd.preventDefault();const Vd=ku().filter(af=>!af.disabled).map(af=>af.ref.current);vs.includes(Wd.key)&&Vd.reverse(),Ru(Vd)}),onBlur:Y$2(Ws.onBlur,Wd=>{Wd.currentTarget.contains(Wd.target)||(window.clearTimeout(Pd.current),Ld.current="")}),onPointerMove:Y$2(Ws.onPointerMove,Mt$2(Wd=>{const df=Wd.target,hf=Td.current!==Wd.clientX;if(Wd.currentTarget.contains(df)&&hf){const xd=Wd.clientX>Td.current?"right":"left";Md.current=xd,Td.current=Wd.clientX}}))})})})})})})});Ss$1.displayName=we$1;var vu="MenuGroup",cr$1=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,...si}=Ws;return jsx(se$2.div,{role:"group",...si,ref:ws})});cr$1.displayName=vu;var yu="MenuLabel",Es=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,...si}=Ws;return jsx(se$2.div,{...si,ref:ws})});Es.displayName=yu;var en$1="MenuItem",Jr$2="menu.itemSelect",fn$1=React.forwardRef((Ws,ws)=>{const{disabled:oi=!1,onSelect:si,...ii}=Ws,ai=React.useRef(null),li=Ot$1(en$1,Ws.__scopeMenu),ci=ir$1(en$1,Ws.__scopeMenu),ui=ge$2(ws,ai),di=React.useRef(!1),hi=()=>{const pi=ai.current;if(!oi&&pi){const ha=new CustomEvent(Jr$2,{bubbles:!0,cancelable:!0});pi.addEventListener(Jr$2,ga=>si==null?void 0:si(ga),{once:!0}),wo$1(pi,ha),ha.defaultPrevented?di.current=!1:li.onClose()}};return jsx(As,{...ii,ref:ui,disabled:oi,onClick:Y$2(Ws.onClick,hi),onPointerDown:pi=>{var ha;(ha=Ws.onPointerDown)==null||ha.call(Ws,pi),di.current=!0},onPointerUp:Y$2(Ws.onPointerUp,pi=>{var ha;di.current||(ha=pi.currentTarget)==null||ha.click()}),onKeyDown:Y$2(Ws.onKeyDown,pi=>{const ha=ci.searchRef.current!=="";oi||ha&&pi.key===" "||Bn$1.includes(pi.key)&&(pi.currentTarget.click(),pi.preventDefault())})})});fn$1.displayName=en$1;var As=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,disabled:si=!1,textValue:ii,...ai}=Ws,li=ir$1(en$1,oi),ci=bs(oi),ui=React.useRef(null),di=ge$2(ws,ui),[hi,pi]=React.useState(!1),[ha,ga]=React.useState("");return React.useEffect(()=>{const va=ui.current;va&&ga((va.textContent??"").trim())},[ai.children]),jsx(Rt$2.ItemSlot,{scope:oi,disabled:si,textValue:ii??ha,children:jsx(as,{asChild:!0,...ci,focusable:!si,children:jsx(se$2.div,{role:"menuitem","data-highlighted":hi?"":void 0,"aria-disabled":si||void 0,"data-disabled":si?"":void 0,...ai,ref:di,onPointerMove:Y$2(Ws.onPointerMove,Mt$2(va=>{si?li.onItemLeave(va):(li.onItemEnter(va),va.defaultPrevented||va.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Y$2(Ws.onPointerLeave,Mt$2(va=>li.onItemLeave(va))),onFocus:Y$2(Ws.onFocus,()=>pi(!0)),onBlur:Y$2(Ws.onBlur,()=>pi(!1))})})})}),bu="MenuCheckboxItem",Rs=React.forwardRef((Ws,ws)=>{const{checked:oi=!1,onCheckedChange:si,...ii}=Ws;return jsx(ks$1,{scope:Ws.__scopeMenu,checked:oi,children:jsx(fn$1,{role:"menuitemcheckbox","aria-checked":tn$1(oi)?"mixed":oi,...ii,ref:ws,"data-state":ur$2(oi),onSelect:Y$2(ii.onSelect,()=>si==null?void 0:si(tn$1(oi)?!0:!oi),{checkForDefaultPrevented:!1})})})});Rs.displayName=bu;var Ms$1="MenuRadioGroup",[wu,xu]=Qe$1(Ms$1,{value:void 0,onValueChange:()=>{}}),_s$1=React.forwardRef((Ws,ws)=>{const{value:oi,onValueChange:si,...ii}=Ws,ai=Ee$2(si);return jsx(wu,{scope:Ws.__scopeMenu,value:oi,onValueChange:ai,children:jsx(cr$1,{...ii,ref:ws})})});_s$1.displayName=Ms$1;var Ps="MenuRadioItem",Ts$1=React.forwardRef((Ws,ws)=>{const{value:oi,...si}=Ws,ii=xu(Ps,Ws.__scopeMenu),ai=oi===ii.value;return jsx(ks$1,{scope:Ws.__scopeMenu,checked:ai,children:jsx(fn$1,{role:"menuitemradio","aria-checked":ai,...si,ref:ws,"data-state":ur$2(ai),onSelect:Y$2(si.onSelect,()=>{var li;return(li=ii.onValueChange)==null?void 0:li.call(ii,oi)},{checkForDefaultPrevented:!1})})})});Ts$1.displayName=Ps;var lr$1="MenuItemIndicator",[ks$1,Cu]=Qe$1(lr$1,{checked:!1}),Os$1=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,forceMount:si,...ii}=Ws,ai=Cu(lr$1,oi);return jsx(ft$2,{present:si||tn$1(ai.checked)||ai.checked===!0,children:jsx(se$2.span,{...ii,ref:ws,"data-state":ur$2(ai.checked)})})});Os$1.displayName=lr$1;var Su="MenuSeparator",Ds$1=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,...si}=Ws;return jsx(se$2.div,{role:"separator","aria-orientation":"horizontal",...si,ref:ws})});Ds$1.displayName=Su;var Eu="MenuArrow",Is$1=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,...si}=Ws,ii=dn$1(oi);return jsx(rl,{...ii,...si,ref:ws})});Is$1.displayName=Eu;var Au="MenuSub",[Yd,Fs]=Qe$1(Au),wt$2="MenuSubTrigger",Ns$1=React.forwardRef((Ws,ws)=>{const oi=Je$2(wt$2,Ws.__scopeMenu),si=Ot$1(wt$2,Ws.__scopeMenu),ii=Fs(wt$2,Ws.__scopeMenu),ai=ir$1(wt$2,Ws.__scopeMenu),li=React.useRef(null),{pointerGraceTimerRef:ci,onPointerGraceIntentChange:ui}=ai,di={__scopeMenu:Ws.__scopeMenu},hi=React.useCallback(()=>{li.current&&window.clearTimeout(li.current),li.current=null},[]);return React.useEffect(()=>hi,[hi]),React.useEffect(()=>{const pi=ci.current;return()=>{window.clearTimeout(pi),ui(null)}},[ci,ui]),jsx(or$2,{asChild:!0,...di,children:jsx(As,{id:ii.triggerId,"aria-haspopup":"menu","aria-expanded":oi.open,"aria-controls":ii.contentId,"data-state":Bs(oi.open),...Ws,ref:rn$1(ws,ii.onTriggerChange),onClick:pi=>{var ha;(ha=Ws.onClick)==null||ha.call(Ws,pi),!(Ws.disabled||pi.defaultPrevented)&&(pi.currentTarget.focus(),oi.open||oi.onOpenChange(!0))},onPointerMove:Y$2(Ws.onPointerMove,Mt$2(pi=>{ai.onItemEnter(pi),!pi.defaultPrevented&&!Ws.disabled&&!oi.open&&!li.current&&(ai.onPointerGraceIntentChange(null),li.current=window.setTimeout(()=>{oi.onOpenChange(!0),hi()},100))})),onPointerLeave:Y$2(Ws.onPointerLeave,Mt$2(pi=>{var ha,ga;hi();const va=(ha=oi.content)==null?void 0:ha.getBoundingClientRect();if(va){const ba=(ga=oi.content)==null?void 0:ga.dataset.side,wa=ba==="right",xa=wa?-5:5,Ca=va[wa?"left":"right"],el=va[wa?"right":"left"];ai.onPointerGraceIntentChange({area:[{x:pi.clientX+xa,y:pi.clientY},{x:Ca,y:va.top},{x:el,y:va.top},{x:el,y:va.bottom},{x:Ca,y:va.bottom}],side:ba}),window.clearTimeout(ci.current),ci.current=window.setTimeout(()=>ai.onPointerGraceIntentChange(null),300)}else{if(ai.onTriggerLeave(pi),pi.defaultPrevented)return;ai.onPointerGraceIntentChange(null)}})),onKeyDown:Y$2(Ws.onKeyDown,pi=>{var ha;const ga=ai.searchRef.current!=="";Ws.disabled||ga&&pi.key===" "||iu[si.dir].includes(pi.key)&&(oi.onOpenChange(!0),(ha=oi.content)==null||ha.focus(),pi.preventDefault())})})})});Ns$1.displayName=wt$2;var Ls$1="MenuSubContent",Vs=React.forwardRef((Ws,ws)=>{const oi=xs$1(we$1,Ws.__scopeMenu),{forceMount:si=oi.forceMount,...ii}=Ws,ai=Je$2(we$1,Ws.__scopeMenu),li=Ot$1(we$1,Ws.__scopeMenu),ci=Fs(Ls$1,Ws.__scopeMenu),ui=React.useRef(null),di=ge$2(ws,ui);return jsx(Rt$2.Provider,{scope:Ws.__scopeMenu,children:jsx(ft$2,{present:si||ai.open,children:jsx(Rt$2.Slot,{scope:Ws.__scopeMenu,children:jsx(ar$1,{id:ci.contentId,"aria-labelledby":ci.triggerId,...ii,ref:di,align:"start",side:li.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:hi=>{var pi;li.isUsingKeyboardRef.current&&((pi=ui.current)==null||pi.focus()),hi.preventDefault()},onCloseAutoFocus:hi=>hi.preventDefault(),onFocusOutside:Y$2(Ws.onFocusOutside,hi=>{hi.target!==ci.trigger&&ai.onOpenChange(!1)}),onEscapeKeyDown:Y$2(Ws.onEscapeKeyDown,hi=>{li.onClose(),hi.preventDefault()}),onKeyDown:Y$2(Ws.onKeyDown,hi=>{var pi;const ha=hi.currentTarget.contains(hi.target),ga=au[li.dir].includes(hi.key);ha&&ga&&(ai.onOpenChange(!1),(pi=ci.trigger)==null||pi.focus(),hi.preventDefault())})})})})})});Vs.displayName=Ls$1;function Bs(Ws){return Ws?"open":"closed"}function tn$1(Ws){return Ws==="indeterminate"}function ur$2(Ws){return tn$1(Ws)?"indeterminate":Ws?"checked":"unchecked"}function Ru(Ws){const ws=document.activeElement;for(const oi of Ws)if(oi===ws||(oi.focus(),document.activeElement!==ws))return}function Mu(Ws,ws){return Ws.map((oi,si)=>Ws[(ws+si)%Ws.length])}function _u(Ws,ws,oi){const si=ws.length>1&&Array.from(ws).every(ci=>ci===ws[0])?ws[0]:ws,ii=oi?Ws.indexOf(oi):-1;let ai=Mu(Ws,Math.max(ii,0));si.length===1&&(ai=ai.filter(ci=>ci!==oi));const li=ai.find(ci=>ci.toLowerCase().startsWith(si.toLowerCase()));return li!==oi?li:void 0}function Pu(Ws,ws){const{x:oi,y:si}=Ws;let ii=!1;for(let ai=0,li=ws.length-1;ai<ws.length;li=ai++){const ci=ws[ai].x,ui=ws[ai].y,di=ws[li].x,hi=ws[li].y;ui>si!=hi>si&&oi<(di-ci)*(si-ui)/(hi-ui)+ci&&(ii=!ii)}return ii}function Tu(Ws,ws){if(!ws)return!1;const oi={x:Ws.clientX,y:Ws.clientY};return Pu(oi,ws)}function Mt$2(Ws){return ws=>ws.pointerType==="mouse"?Ws(ws):void 0}var Ou=or$2,Du=Cs$1,Iu=Ss$1,Fu=cr$1,Nu=Es,Lu=fn$1,Vu=Rs,Bu=_s$1,Uu=Ts$1,Wu=Os$1,$u=Ds$1,zu=Is$1,Gu=Ns$1,ju=Vs,dr$1="DropdownMenu",[Hu,Xd]=dt$2(dr$1,[ys]),fe$2=ys(),[Ku,Us]=Hu(dr$1),$s="DropdownMenuTrigger",zs=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,disabled:si=!1,...ii}=Ws,ai=Us($s,oi),li=fe$2(oi);return jsx(Ou,{asChild:!0,...li,children:jsx(se$2.button,{type:"button",id:ai.triggerId,"aria-haspopup":"menu","aria-expanded":ai.open,"aria-controls":ai.open?ai.contentId:void 0,"data-state":ai.open?"open":"closed","data-disabled":si?"":void 0,disabled:si,...ii,ref:rn$1(ws,ai.triggerRef),onPointerDown:Y$2(Ws.onPointerDown,ci=>{!si&&ci.button===0&&ci.ctrlKey===!1&&(ai.onOpenToggle(),ai.open||ci.preventDefault())}),onKeyDown:Y$2(Ws.onKeyDown,ci=>{si||(["Enter"," "].includes(ci.key)&&ai.onOpenToggle(),ci.key==="ArrowDown"&&ai.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(ci.key)&&ci.preventDefault())})})})});zs.displayName=$s;var Yu="DropdownMenuPortal",Gs$1=Ws=>{const{__scopeDropdownMenu:ws,...oi}=Ws,si=fe$2(ws);return jsx(Du,{...si,...oi})};Gs$1.displayName=Yu;var js$1="DropdownMenuContent",Hs=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=Us(js$1,oi),ai=fe$2(oi),li=React.useRef(!1);return jsx(Iu,{id:ii.contentId,"aria-labelledby":ii.triggerId,...ai,...si,ref:ws,onCloseAutoFocus:Y$2(Ws.onCloseAutoFocus,ci=>{var ui;li.current||(ui=ii.triggerRef.current)==null||ui.focus(),li.current=!1,ci.preventDefault()}),onInteractOutside:Y$2(Ws.onInteractOutside,ci=>{const ui=ci.detail.originalEvent,di=ui.button===0&&ui.ctrlKey===!0,hi=ui.button===2||di;(!ii.modal||hi)&&(li.current=!0)}),style:{...Ws.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Hs.displayName=js$1;var Xu="DropdownMenuGroup",qu=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Fu,{...ii,...si,ref:ws})});qu.displayName=Xu;var Zu="DropdownMenuLabel",Qu=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Nu,{...ii,...si,ref:ws})});Qu.displayName=Zu;var Ju="DropdownMenuItem",Ks=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Lu,{...ii,...si,ref:ws})});Ks.displayName=Ju;var ed="DropdownMenuCheckboxItem",td=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Vu,{...ii,...si,ref:ws})});td.displayName=ed;var nd="DropdownMenuRadioGroup",rd=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Bu,{...ii,...si,ref:ws})});rd.displayName=nd;var od="DropdownMenuRadioItem",sd=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Uu,{...ii,...si,ref:ws})});sd.displayName=od;var id="DropdownMenuItemIndicator",ad=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Wu,{...ii,...si,ref:ws})});ad.displayName=id;var cd="DropdownMenuSeparator",ld=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx($u,{...ii,...si,ref:ws})});ld.displayName=cd;var ud="DropdownMenuArrow",dd=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(zu,{...ii,...si,ref:ws})});dd.displayName=ud;var fd="DropdownMenuSubTrigger",pd=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Gu,{...ii,...si,ref:ws})});pd.displayName=fd;var md="DropdownMenuSubContent",hd=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(ju,{...ii,...si,ref:ws,style:{...Ws.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});hd.displayName=md;var yd=Gs$1,bd=Hs;forwardRef(function({children:Ws,...ws},oi){return jsx(yd,{children:jsx(bd,{...ws,ref:oi,children:Ws})})});var fr$2="Tabs",[Ad,qd]=dt$2(fr$2,[ln$1]),Ys=ln$1(),[Rd,pr$1]=Ad(fr$2),Xs=React.forwardRef((Ws,ws)=>{const{__scopeTabs:oi,value:si,onValueChange:ii,defaultValue:ai,orientation:li="horizontal",dir:ci,activationMode:ui="automatic",...di}=Ws,hi=tr$1(ci),[pi,ha]=er$1({prop:si,onChange:ii,defaultProp:ai});return jsx(Rd,{scope:oi,baseId:Qt$2(),value:pi,onValueChange:ha,orientation:li,dir:hi,activationMode:ui,children:jsx(se$2.div,{dir:hi,"data-orientation":li,...di,ref:ws})})});Xs.displayName=fr$2;var qs$1="TabsList",Zs=React.forwardRef((Ws,ws)=>{const{__scopeTabs:oi,loop:si=!0,...ii}=Ws,ai=pr$1(qs$1,oi),li=Ys(oi);return jsx(is,{asChild:!0,...li,orientation:ai.orientation,dir:ai.dir,loop:si,children:jsx(se$2.div,{role:"tablist","aria-orientation":ai.orientation,...ii,ref:ws})})});Zs.displayName=qs$1;var Qs="TabsTrigger",Js=React.forwardRef((Ws,ws)=>{const{__scopeTabs:oi,value:si,disabled:ii=!1,...ai}=Ws,li=pr$1(Qs,oi),ci=Ys(oi),ui=ni(li.baseId,si),di=ri(li.baseId,si),hi=si===li.value;return jsx(as,{asChild:!0,...ci,focusable:!ii,active:hi,children:jsx(se$2.button,{type:"button",role:"tab","aria-selected":hi,"aria-controls":di,"data-state":hi?"active":"inactive","data-disabled":ii?"":void 0,disabled:ii,id:ui,...ai,ref:ws,onMouseDown:Y$2(Ws.onMouseDown,pi=>{!ii&&pi.button===0&&pi.ctrlKey===!1?li.onValueChange(si):pi.preventDefault()}),onKeyDown:Y$2(Ws.onKeyDown,pi=>{[" ","Enter"].includes(pi.key)&&li.onValueChange(si)}),onFocus:Y$2(Ws.onFocus,()=>{const pi=li.activationMode!=="manual";!hi&&!ii&&pi&&li.onValueChange(si)})})})});Js.displayName=Qs;var ei="TabsContent",ti=React.forwardRef((Ws,ws)=>{const{__scopeTabs:oi,value:si,forceMount:ii,children:ai,...li}=Ws,ci=pr$1(ei,oi),ui=ni(ci.baseId,si),di=ri(ci.baseId,si),hi=si===ci.value,pi=React.useRef(hi);return React.useEffect(()=>{const ha=requestAnimationFrame(()=>pi.current=!1);return()=>cancelAnimationFrame(ha)},[]),jsx(ft$2,{present:ii||hi,children:({present:ha})=>jsx(se$2.div,{"data-state":hi?"active":"inactive","data-orientation":ci.orientation,role:"tabpanel","aria-labelledby":ui,hidden:!ha,id:di,tabIndex:0,...li,ref:ws,style:{...Ws.style,animationDuration:pi.current?"0s":void 0},children:ha&&ai})})});ti.displayName=ei;function ni(Ws,ws){return`${Ws}-trigger-${ws}`}function ri(Ws,ws){return`${Ws}-content-${ws}`}var Zd=Xs,Qd=Zs,Jd=Js,ef=ti;function devAssert$1(Ws,ws){if(!!!Ws)throw new Error(ws)}function isObjectLike$1(Ws){return typeof Ws=="object"&&Ws!==null}function invariant$2(Ws,ws){if(!!!Ws)throw new Error("Unexpected invariant triggered.")}const LineRegExp$1=/\r\n|[\n\r]/g;function getLocation$2(Ws,ws){let oi=0,si=1;for(const ii of Ws.body.matchAll(LineRegExp$1)){if(typeof ii.index=="number"||invariant$2(!1),ii.index>=ws)break;oi=ii.index+ii[0].length,si+=1}return{line:si,column:ws+1-oi}}function printLocation$1(Ws){return printSourceLocation$1(Ws.source,getLocation$2(Ws.source,Ws.start))}function printSourceLocation$1(Ws,ws){const oi=Ws.locationOffset.column-1,si="".padStart(oi)+Ws.body,ii=ws.line-1,ai=Ws.locationOffset.line-1,li=ws.line+ai,ci=ws.line===1?oi:0,ui=ws.column+ci,di=`${Ws.name}:${li}:${ui}
|
|
41
|
+
`)},eu=0,rt$1=[];function tu(Ws){var ws=React.useRef([]),oi=React.useRef([0,0]),si=React.useRef(),ii=React.useState(eu++)[0],ai=React.useState(fs)[0],li=React.useRef(Ws);React.useEffect(function(){li.current=Ws},[Ws]),React.useEffect(function(){if(Ws.inert){document.body.classList.add("block-interactivity-".concat(ii));var ba=Cl([Ws.lockRef.current],(Ws.shards||[]).map(Qr$1)).filter(Boolean);return ba.forEach(function(wa){return wa.classList.add("allow-interactivity-".concat(ii))}),function(){document.body.classList.remove("block-interactivity-".concat(ii)),ba.forEach(function(wa){return wa.classList.remove("allow-interactivity-".concat(ii))})}}},[Ws.inert,Ws.lockRef.current,Ws.shards]);var ci=React.useCallback(function(ba,wa){if("touches"in ba&&ba.touches.length===2||ba.type==="wheel"&&ba.ctrlKey)return!li.current.allowPinchZoom;var xa=Ut$2(ba),Ca=oi.current,el="deltaX"in ba?ba.deltaX:Ca[0]-xa[0],ku="deltaY"in ba?ba.deltaY:Ca[1]-xa[1],gd,Ed=ba.target,Od=Math.abs(el)>Math.abs(ku)?"h":"v";if("touches"in ba&&Od==="h"&&Ed.type==="range")return!1;var Nd=qr$2(Od,Ed);if(!Nd)return!0;if(Nd?gd=Od:(gd=Od==="v"?"h":"v",Nd=qr$2(Od,Ed)),!Nd)return!1;if(!si.current&&"changedTouches"in ba&&(el||ku)&&(si.current=gd),!gd)return!0;var Pd=si.current||gd;return Zl(Pd,wa,ba,Pd==="h"?el:ku)},[]),ui=React.useCallback(function(ba){var wa=ba;if(!(!rt$1.length||rt$1[rt$1.length-1]!==ai)){var xa="deltaY"in wa?Zr$2(wa):Ut$2(wa),Ca=ws.current.filter(function(gd){return gd.name===wa.type&&(gd.target===wa.target||wa.target===gd.shadowParent)&&Ql(gd.delta,xa)})[0];if(Ca&&Ca.should){wa.cancelable&&wa.preventDefault();return}if(!Ca){var el=(li.current.shards||[]).map(Qr$1).filter(Boolean).filter(function(gd){return gd.contains(wa.target)}),ku=el.length>0?ci(wa,el[0]):!li.current.noIsolation;ku&&wa.cancelable&&wa.preventDefault()}}},[]),di=React.useCallback(function(ba,wa,xa,Ca){var el={name:ba,delta:wa,target:xa,should:Ca,shadowParent:nu(xa)};ws.current.push(el),setTimeout(function(){ws.current=ws.current.filter(function(ku){return ku!==el})},1)},[]),hi=React.useCallback(function(ba){oi.current=Ut$2(ba),si.current=void 0},[]),pi=React.useCallback(function(ba){di(ba.type,Zr$2(ba),ba.target,ci(ba,Ws.lockRef.current))},[]),ha=React.useCallback(function(ba){di(ba.type,Ut$2(ba),ba.target,ci(ba,Ws.lockRef.current))},[]);React.useEffect(function(){return rt$1.push(ai),Ws.setCallbacks({onScrollCapture:pi,onWheelCapture:pi,onTouchMoveCapture:ha}),document.addEventListener("wheel",ui,nt$2),document.addEventListener("touchmove",ui,nt$2),document.addEventListener("touchstart",hi,nt$2),function(){rt$1=rt$1.filter(function(ba){return ba!==ai}),document.removeEventListener("wheel",ui,nt$2),document.removeEventListener("touchmove",ui,nt$2),document.removeEventListener("touchstart",hi,nt$2)}},[]);var ga=Ws.removeScrollBar,va=Ws.inert;return React.createElement(React.Fragment,null,va?React.createElement(ai,{styles:Jl(ii)}):null,ga?React.createElement(Gl,{gapMode:Ws.gapMode}):null)}function nu(Ws){for(var ws=null;Ws!==null;)Ws instanceof ShadowRoot&&(ws=Ws.host,Ws=Ws.host),Ws=Ws.parentNode;return ws}const ru=kl(ds$1,tu);var gs=React.forwardRef(function(Ws,ws){return React.createElement(un$1,Pe$2({},Ws,{ref:ws,sideCar:ru}))});gs.classNames=un$1.classNames;var Bn$1=["Enter"," "],ou=["ArrowDown","PageUp","Home"],vs=["ArrowUp","PageDown","End"],su=[...ou,...vs],iu={ltr:[...Bn$1,"ArrowRight"],rtl:[...Bn$1,"ArrowLeft"]},au={ltr:["ArrowLeft"],rtl:["ArrowRight"]},kt$2="Menu",[Rt$2,cu,lu]=No$1(kt$2),[Qe$1,ys]=dt$2(kt$2,[lu,jo,ln$1]),dn$1=jo(),bs=ln$1(),[uu,Je$2]=Qe$1(kt$2),[du,Ot$1]=Qe$1(kt$2),fu="MenuAnchor",or$2=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,...si}=Ws,ii=dn$1(oi);return jsx(tl,{...ii,...si,ref:ws})});or$2.displayName=fu;var sr$1="MenuPortal",[pu,xs$1]=Qe$1(sr$1,{forceMount:void 0}),Cs$1=Ws=>{const{__scopeMenu:ws,forceMount:oi,children:si,container:ii}=Ws,ai=Je$2(sr$1,ws);return jsx(pu,{scope:ws,forceMount:oi,children:jsx(ft$2,{present:oi||ai.open,children:jsx(es$1,{asChild:!0,container:ii,children:si})})})};Cs$1.displayName=sr$1;var we$1="MenuContent",[mu,ir$1]=Qe$1(we$1),Ss$1=React.forwardRef((Ws,ws)=>{const oi=xs$1(we$1,Ws.__scopeMenu),{forceMount:si=oi.forceMount,...ii}=Ws,ai=Je$2(we$1,Ws.__scopeMenu),li=Ot$1(we$1,Ws.__scopeMenu);return jsx(Rt$2.Provider,{scope:Ws.__scopeMenu,children:jsx(ft$2,{present:si||ai.open,children:jsx(Rt$2.Slot,{scope:Ws.__scopeMenu,children:li.modal?jsx(hu,{...ii,ref:ws}):jsx(gu,{...ii,ref:ws})})})})}),hu=React.forwardRef((Ws,ws)=>{const oi=Je$2(we$1,Ws.__scopeMenu),si=React.useRef(null),ii=ge$2(ws,si);return React.useEffect(()=>{const ai=si.current;if(ai)return xl(ai)},[]),jsx(ar$1,{...Ws,ref:ii,trapFocus:oi.open,disableOutsidePointerEvents:oi.open,disableOutsideScroll:!0,onFocusOutside:Y$2(Ws.onFocusOutside,ai=>ai.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>oi.onOpenChange(!1)})}),gu=React.forwardRef((Ws,ws)=>{const oi=Je$2(we$1,Ws.__scopeMenu);return jsx(ar$1,{...Ws,ref:ws,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>oi.onOpenChange(!1)})}),ar$1=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,loop:si=!1,trapFocus:ii,onOpenAutoFocus:ai,onCloseAutoFocus:li,disableOutsidePointerEvents:ci,onEntryFocus:ui,onEscapeKeyDown:di,onPointerDownOutside:hi,onFocusOutside:pi,onInteractOutside:ha,onDismiss:ga,disableOutsideScroll:va,...ba}=Ws,wa=Je$2(we$1,oi),xa=Ot$1(we$1,oi),Ca=dn$1(oi),el=bs(oi),ku=cu(oi),[gd,Ed]=React.useState(null),Od=React.useRef(null),Nd=ge$2(ws,Od,wa.onContentChange),Pd=React.useRef(0),Ld=React.useRef(""),rf=React.useRef(0),kd=React.useRef(null),Md=React.useRef("right"),Td=React.useRef(0),wd=va?gs:React.Fragment,Cd=va?{as:St$2,allowPinchZoom:!0}:void 0,sf=Wd=>{var df,hf;const xd=Ld.current+Wd,Fd=ku().filter(yf=>!yf.disabled),Vd=document.activeElement,af=(df=Fd.find(yf=>yf.ref.current===Vd))==null?void 0:df.textValue,ff=Fd.map(yf=>yf.textValue),uf=_u(ff,xd,af),mf=(hf=Fd.find(yf=>yf.textValue===uf))==null?void 0:hf.ref.current;(function yf(Sf){Ld.current=Sf,window.clearTimeout(Pd.current),Sf!==""&&(Pd.current=window.setTimeout(()=>yf(""),1e3))})(xd),mf&&setTimeout(()=>mf.focus())};React.useEffect(()=>()=>window.clearTimeout(Pd.current),[]),Rc();const of=React.useCallback(Wd=>{var df,hf;return Md.current===((df=kd.current)==null?void 0:df.side)&&Tu(Wd,(hf=kd.current)==null?void 0:hf.area)},[]);return jsx(mu,{scope:oi,searchRef:Ld,onItemEnter:React.useCallback(Wd=>{of(Wd)&&Wd.preventDefault()},[of]),onItemLeave:React.useCallback(Wd=>{var df;of(Wd)||((df=Od.current)==null||df.focus(),Ed(null))},[of]),onTriggerLeave:React.useCallback(Wd=>{of(Wd)&&Wd.preventDefault()},[of]),pointerGraceTimerRef:rf,onPointerGraceIntentChange:React.useCallback(Wd=>{kd.current=Wd},[]),children:jsx(wd,{...Cd,children:jsx(Uo$1,{asChild:!0,trapped:ii,onMountAutoFocus:Y$2(ai,Wd=>{var df;Wd.preventDefault(),(df=Od.current)==null||df.focus({preventScroll:!0})}),onUnmountAutoFocus:li,children:jsx(Vo$1,{asChild:!0,disableOutsidePointerEvents:ci,onEscapeKeyDown:di,onPointerDownOutside:hi,onFocusOutside:pi,onInteractOutside:ha,onDismiss:ga,children:jsx(is,{asChild:!0,...el,dir:xa.dir,orientation:"vertical",loop:si,currentTabStopId:gd,onCurrentTabStopIdChange:Ed,onEntryFocus:Y$2(ui,Wd=>{xa.isUsingKeyboardRef.current||Wd.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsx(nl,{role:"menu","aria-orientation":"vertical","data-state":Bs(wa.open),"data-radix-menu-content":"",dir:xa.dir,...Ca,...ba,ref:Nd,style:{outline:"none",...ba.style},onKeyDown:Y$2(ba.onKeyDown,Wd=>{const df=Wd.target.closest("[data-radix-menu-content]")===Wd.currentTarget,hf=Wd.ctrlKey||Wd.altKey||Wd.metaKey,xd=Wd.key.length===1;df&&(Wd.key==="Tab"&&Wd.preventDefault(),!hf&&xd&&sf(Wd.key));const Fd=Od.current;if(Wd.target!==Fd||!su.includes(Wd.key))return;Wd.preventDefault();const Vd=ku().filter(af=>!af.disabled).map(af=>af.ref.current);vs.includes(Wd.key)&&Vd.reverse(),Ru(Vd)}),onBlur:Y$2(Ws.onBlur,Wd=>{Wd.currentTarget.contains(Wd.target)||(window.clearTimeout(Pd.current),Ld.current="")}),onPointerMove:Y$2(Ws.onPointerMove,Mt$2(Wd=>{const df=Wd.target,hf=Td.current!==Wd.clientX;if(Wd.currentTarget.contains(df)&&hf){const xd=Wd.clientX>Td.current?"right":"left";Md.current=xd,Td.current=Wd.clientX}}))})})})})})})});Ss$1.displayName=we$1;var vu="MenuGroup",cr$1=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,...si}=Ws;return jsx(se$2.div,{role:"group",...si,ref:ws})});cr$1.displayName=vu;var yu="MenuLabel",Es=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,...si}=Ws;return jsx(se$2.div,{...si,ref:ws})});Es.displayName=yu;var en$1="MenuItem",Jr$2="menu.itemSelect",fn$1=React.forwardRef((Ws,ws)=>{const{disabled:oi=!1,onSelect:si,...ii}=Ws,ai=React.useRef(null),li=Ot$1(en$1,Ws.__scopeMenu),ci=ir$1(en$1,Ws.__scopeMenu),ui=ge$2(ws,ai),di=React.useRef(!1),hi=()=>{const pi=ai.current;if(!oi&&pi){const ha=new CustomEvent(Jr$2,{bubbles:!0,cancelable:!0});pi.addEventListener(Jr$2,ga=>si==null?void 0:si(ga),{once:!0}),wo$1(pi,ha),ha.defaultPrevented?di.current=!1:li.onClose()}};return jsx(As,{...ii,ref:ui,disabled:oi,onClick:Y$2(Ws.onClick,hi),onPointerDown:pi=>{var ha;(ha=Ws.onPointerDown)==null||ha.call(Ws,pi),di.current=!0},onPointerUp:Y$2(Ws.onPointerUp,pi=>{var ha;di.current||(ha=pi.currentTarget)==null||ha.click()}),onKeyDown:Y$2(Ws.onKeyDown,pi=>{const ha=ci.searchRef.current!=="";oi||ha&&pi.key===" "||Bn$1.includes(pi.key)&&(pi.currentTarget.click(),pi.preventDefault())})})});fn$1.displayName=en$1;var As=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,disabled:si=!1,textValue:ii,...ai}=Ws,li=ir$1(en$1,oi),ci=bs(oi),ui=React.useRef(null),di=ge$2(ws,ui),[hi,pi]=React.useState(!1),[ha,ga]=React.useState("");return React.useEffect(()=>{const va=ui.current;va&&ga((va.textContent??"").trim())},[ai.children]),jsx(Rt$2.ItemSlot,{scope:oi,disabled:si,textValue:ii??ha,children:jsx(as,{asChild:!0,...ci,focusable:!si,children:jsx(se$2.div,{role:"menuitem","data-highlighted":hi?"":void 0,"aria-disabled":si||void 0,"data-disabled":si?"":void 0,...ai,ref:di,onPointerMove:Y$2(Ws.onPointerMove,Mt$2(va=>{si?li.onItemLeave(va):(li.onItemEnter(va),va.defaultPrevented||va.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Y$2(Ws.onPointerLeave,Mt$2(va=>li.onItemLeave(va))),onFocus:Y$2(Ws.onFocus,()=>pi(!0)),onBlur:Y$2(Ws.onBlur,()=>pi(!1))})})})}),bu="MenuCheckboxItem",Rs=React.forwardRef((Ws,ws)=>{const{checked:oi=!1,onCheckedChange:si,...ii}=Ws;return jsx(ks$1,{scope:Ws.__scopeMenu,checked:oi,children:jsx(fn$1,{role:"menuitemcheckbox","aria-checked":tn$1(oi)?"mixed":oi,...ii,ref:ws,"data-state":ur$2(oi),onSelect:Y$2(ii.onSelect,()=>si==null?void 0:si(tn$1(oi)?!0:!oi),{checkForDefaultPrevented:!1})})})});Rs.displayName=bu;var Ms$1="MenuRadioGroup",[wu,xu]=Qe$1(Ms$1,{value:void 0,onValueChange:()=>{}}),_s$1=React.forwardRef((Ws,ws)=>{const{value:oi,onValueChange:si,...ii}=Ws,ai=Ee$2(si);return jsx(wu,{scope:Ws.__scopeMenu,value:oi,onValueChange:ai,children:jsx(cr$1,{...ii,ref:ws})})});_s$1.displayName=Ms$1;var Ps="MenuRadioItem",Ts$1=React.forwardRef((Ws,ws)=>{const{value:oi,...si}=Ws,ii=xu(Ps,Ws.__scopeMenu),ai=oi===ii.value;return jsx(ks$1,{scope:Ws.__scopeMenu,checked:ai,children:jsx(fn$1,{role:"menuitemradio","aria-checked":ai,...si,ref:ws,"data-state":ur$2(ai),onSelect:Y$2(si.onSelect,()=>{var li;return(li=ii.onValueChange)==null?void 0:li.call(ii,oi)},{checkForDefaultPrevented:!1})})})});Ts$1.displayName=Ps;var lr$1="MenuItemIndicator",[ks$1,Cu]=Qe$1(lr$1,{checked:!1}),Os$1=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,forceMount:si,...ii}=Ws,ai=Cu(lr$1,oi);return jsx(ft$2,{present:si||tn$1(ai.checked)||ai.checked===!0,children:jsx(se$2.span,{...ii,ref:ws,"data-state":ur$2(ai.checked)})})});Os$1.displayName=lr$1;var Su="MenuSeparator",Ds$1=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,...si}=Ws;return jsx(se$2.div,{role:"separator","aria-orientation":"horizontal",...si,ref:ws})});Ds$1.displayName=Su;var Eu="MenuArrow",Is$1=React.forwardRef((Ws,ws)=>{const{__scopeMenu:oi,...si}=Ws,ii=dn$1(oi);return jsx(rl,{...ii,...si,ref:ws})});Is$1.displayName=Eu;var Au="MenuSub",[Yd,Fs]=Qe$1(Au),wt$2="MenuSubTrigger",Ns$1=React.forwardRef((Ws,ws)=>{const oi=Je$2(wt$2,Ws.__scopeMenu),si=Ot$1(wt$2,Ws.__scopeMenu),ii=Fs(wt$2,Ws.__scopeMenu),ai=ir$1(wt$2,Ws.__scopeMenu),li=React.useRef(null),{pointerGraceTimerRef:ci,onPointerGraceIntentChange:ui}=ai,di={__scopeMenu:Ws.__scopeMenu},hi=React.useCallback(()=>{li.current&&window.clearTimeout(li.current),li.current=null},[]);return React.useEffect(()=>hi,[hi]),React.useEffect(()=>{const pi=ci.current;return()=>{window.clearTimeout(pi),ui(null)}},[ci,ui]),jsx(or$2,{asChild:!0,...di,children:jsx(As,{id:ii.triggerId,"aria-haspopup":"menu","aria-expanded":oi.open,"aria-controls":ii.contentId,"data-state":Bs(oi.open),...Ws,ref:rn$1(ws,ii.onTriggerChange),onClick:pi=>{var ha;(ha=Ws.onClick)==null||ha.call(Ws,pi),!(Ws.disabled||pi.defaultPrevented)&&(pi.currentTarget.focus(),oi.open||oi.onOpenChange(!0))},onPointerMove:Y$2(Ws.onPointerMove,Mt$2(pi=>{ai.onItemEnter(pi),!pi.defaultPrevented&&!Ws.disabled&&!oi.open&&!li.current&&(ai.onPointerGraceIntentChange(null),li.current=window.setTimeout(()=>{oi.onOpenChange(!0),hi()},100))})),onPointerLeave:Y$2(Ws.onPointerLeave,Mt$2(pi=>{var ha,ga;hi();const va=(ha=oi.content)==null?void 0:ha.getBoundingClientRect();if(va){const ba=(ga=oi.content)==null?void 0:ga.dataset.side,wa=ba==="right",xa=wa?-5:5,Ca=va[wa?"left":"right"],el=va[wa?"right":"left"];ai.onPointerGraceIntentChange({area:[{x:pi.clientX+xa,y:pi.clientY},{x:Ca,y:va.top},{x:el,y:va.top},{x:el,y:va.bottom},{x:Ca,y:va.bottom}],side:ba}),window.clearTimeout(ci.current),ci.current=window.setTimeout(()=>ai.onPointerGraceIntentChange(null),300)}else{if(ai.onTriggerLeave(pi),pi.defaultPrevented)return;ai.onPointerGraceIntentChange(null)}})),onKeyDown:Y$2(Ws.onKeyDown,pi=>{var ha;const ga=ai.searchRef.current!=="";Ws.disabled||ga&&pi.key===" "||iu[si.dir].includes(pi.key)&&(oi.onOpenChange(!0),(ha=oi.content)==null||ha.focus(),pi.preventDefault())})})})});Ns$1.displayName=wt$2;var Ls$1="MenuSubContent",Vs=React.forwardRef((Ws,ws)=>{const oi=xs$1(we$1,Ws.__scopeMenu),{forceMount:si=oi.forceMount,...ii}=Ws,ai=Je$2(we$1,Ws.__scopeMenu),li=Ot$1(we$1,Ws.__scopeMenu),ci=Fs(Ls$1,Ws.__scopeMenu),ui=React.useRef(null),di=ge$2(ws,ui);return jsx(Rt$2.Provider,{scope:Ws.__scopeMenu,children:jsx(ft$2,{present:si||ai.open,children:jsx(Rt$2.Slot,{scope:Ws.__scopeMenu,children:jsx(ar$1,{id:ci.contentId,"aria-labelledby":ci.triggerId,...ii,ref:di,align:"start",side:li.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:hi=>{var pi;li.isUsingKeyboardRef.current&&((pi=ui.current)==null||pi.focus()),hi.preventDefault()},onCloseAutoFocus:hi=>hi.preventDefault(),onFocusOutside:Y$2(Ws.onFocusOutside,hi=>{hi.target!==ci.trigger&&ai.onOpenChange(!1)}),onEscapeKeyDown:Y$2(Ws.onEscapeKeyDown,hi=>{li.onClose(),hi.preventDefault()}),onKeyDown:Y$2(Ws.onKeyDown,hi=>{var pi;const ha=hi.currentTarget.contains(hi.target),ga=au[li.dir].includes(hi.key);ha&&ga&&(ai.onOpenChange(!1),(pi=ci.trigger)==null||pi.focus(),hi.preventDefault())})})})})})});Vs.displayName=Ls$1;function Bs(Ws){return Ws?"open":"closed"}function tn$1(Ws){return Ws==="indeterminate"}function ur$2(Ws){return tn$1(Ws)?"indeterminate":Ws?"checked":"unchecked"}function Ru(Ws){const ws=document.activeElement;for(const oi of Ws)if(oi===ws||(oi.focus(),document.activeElement!==ws))return}function Mu(Ws,ws){return Ws.map((oi,si)=>Ws[(ws+si)%Ws.length])}function _u(Ws,ws,oi){const si=ws.length>1&&Array.from(ws).every(ci=>ci===ws[0])?ws[0]:ws,ii=oi?Ws.indexOf(oi):-1;let ai=Mu(Ws,Math.max(ii,0));si.length===1&&(ai=ai.filter(ci=>ci!==oi));const li=ai.find(ci=>ci.toLowerCase().startsWith(si.toLowerCase()));return li!==oi?li:void 0}function Pu(Ws,ws){const{x:oi,y:si}=Ws;let ii=!1;for(let ai=0,li=ws.length-1;ai<ws.length;li=ai++){const ci=ws[ai].x,ui=ws[ai].y,di=ws[li].x,hi=ws[li].y;ui>si!=hi>si&&oi<(di-ci)*(si-ui)/(hi-ui)+ci&&(ii=!ii)}return ii}function Tu(Ws,ws){if(!ws)return!1;const oi={x:Ws.clientX,y:Ws.clientY};return Pu(oi,ws)}function Mt$2(Ws){return ws=>ws.pointerType==="mouse"?Ws(ws):void 0}var Ou=or$2,Du=Cs$1,Iu=Ss$1,Fu=cr$1,Nu=Es,Lu=fn$1,Vu=Rs,Bu=_s$1,Uu=Ts$1,Wu=Os$1,$u=Ds$1,zu=Is$1,Gu=Ns$1,ju=Vs,dr$1="DropdownMenu",[Hu,Xd]=dt$2(dr$1,[ys]),fe$2=ys(),[Ku,Us]=Hu(dr$1),$s="DropdownMenuTrigger",zs=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,disabled:si=!1,...ii}=Ws,ai=Us($s,oi),li=fe$2(oi);return jsx(Ou,{asChild:!0,...li,children:jsx(se$2.button,{type:"button",id:ai.triggerId,"aria-haspopup":"menu","aria-expanded":ai.open,"aria-controls":ai.open?ai.contentId:void 0,"data-state":ai.open?"open":"closed","data-disabled":si?"":void 0,disabled:si,...ii,ref:rn$1(ws,ai.triggerRef),onPointerDown:Y$2(Ws.onPointerDown,ci=>{!si&&ci.button===0&&ci.ctrlKey===!1&&(ai.onOpenToggle(),ai.open||ci.preventDefault())}),onKeyDown:Y$2(Ws.onKeyDown,ci=>{si||(["Enter"," "].includes(ci.key)&&ai.onOpenToggle(),ci.key==="ArrowDown"&&ai.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(ci.key)&&ci.preventDefault())})})})});zs.displayName=$s;var Yu="DropdownMenuPortal",Gs$1=Ws=>{const{__scopeDropdownMenu:ws,...oi}=Ws,si=fe$2(ws);return jsx(Du,{...si,...oi})};Gs$1.displayName=Yu;var js$1="DropdownMenuContent",Hs=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=Us(js$1,oi),ai=fe$2(oi),li=React.useRef(!1);return jsx(Iu,{id:ii.contentId,"aria-labelledby":ii.triggerId,...ai,...si,ref:ws,onCloseAutoFocus:Y$2(Ws.onCloseAutoFocus,ci=>{var ui;li.current||(ui=ii.triggerRef.current)==null||ui.focus(),li.current=!1,ci.preventDefault()}),onInteractOutside:Y$2(Ws.onInteractOutside,ci=>{const ui=ci.detail.originalEvent,di=ui.button===0&&ui.ctrlKey===!0,hi=ui.button===2||di;(!ii.modal||hi)&&(li.current=!0)}),style:{...Ws.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Hs.displayName=js$1;var Xu="DropdownMenuGroup",qu=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Fu,{...ii,...si,ref:ws})});qu.displayName=Xu;var Zu="DropdownMenuLabel",Qu=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Nu,{...ii,...si,ref:ws})});Qu.displayName=Zu;var Ju="DropdownMenuItem",Ks=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Lu,{...ii,...si,ref:ws})});Ks.displayName=Ju;var ed="DropdownMenuCheckboxItem",td=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Vu,{...ii,...si,ref:ws})});td.displayName=ed;var nd="DropdownMenuRadioGroup",rd=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Bu,{...ii,...si,ref:ws})});rd.displayName=nd;var od="DropdownMenuRadioItem",sd=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Uu,{...ii,...si,ref:ws})});sd.displayName=od;var id="DropdownMenuItemIndicator",ad=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Wu,{...ii,...si,ref:ws})});ad.displayName=id;var cd="DropdownMenuSeparator",ld=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx($u,{...ii,...si,ref:ws})});ld.displayName=cd;var ud="DropdownMenuArrow",dd=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(zu,{...ii,...si,ref:ws})});dd.displayName=ud;var fd="DropdownMenuSubTrigger",pd=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(Gu,{...ii,...si,ref:ws})});pd.displayName=fd;var md="DropdownMenuSubContent",hd=React.forwardRef((Ws,ws)=>{const{__scopeDropdownMenu:oi,...si}=Ws,ii=fe$2(oi);return jsx(ju,{...ii,...si,ref:ws,style:{...Ws.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});hd.displayName=md;var yd=Gs$1,bd=Hs;forwardRef(function({children:Ws,...ws},oi){return jsx(yd,{children:jsx(bd,{...ws,ref:oi,children:Ws})})});var fr$2="Tabs",[Ad,qd]=dt$2(fr$2,[ln$1]),Ys=ln$1(),[Rd,pr$1]=Ad(fr$2),Xs=React.forwardRef((Ws,ws)=>{const{__scopeTabs:oi,value:si,onValueChange:ii,defaultValue:ai,orientation:li="horizontal",dir:ci,activationMode:ui="automatic",...di}=Ws,hi=tr$1(ci),[pi,ha]=er$1({prop:si,onChange:ii,defaultProp:ai});return jsx(Rd,{scope:oi,baseId:Qt$2(),value:pi,onValueChange:ha,orientation:li,dir:hi,activationMode:ui,children:jsx(se$2.div,{dir:hi,"data-orientation":li,...di,ref:ws})})});Xs.displayName=fr$2;var qs$1="TabsList",Zs=React.forwardRef((Ws,ws)=>{const{__scopeTabs:oi,loop:si=!0,...ii}=Ws,ai=pr$1(qs$1,oi),li=Ys(oi);return jsx(is,{asChild:!0,...li,orientation:ai.orientation,dir:ai.dir,loop:si,children:jsx(se$2.div,{role:"tablist","aria-orientation":ai.orientation,...ii,ref:ws})})});Zs.displayName=qs$1;var Qs="TabsTrigger",Js=React.forwardRef((Ws,ws)=>{const{__scopeTabs:oi,value:si,disabled:ii=!1,...ai}=Ws,li=pr$1(Qs,oi),ci=Ys(oi),ui=ni(li.baseId,si),di=ri(li.baseId,si),hi=si===li.value;return jsx(as,{asChild:!0,...ci,focusable:!ii,active:hi,children:jsx(se$2.button,{type:"button",role:"tab","aria-selected":hi,"aria-controls":di,"data-state":hi?"active":"inactive","data-disabled":ii?"":void 0,disabled:ii,id:ui,...ai,ref:ws,onMouseDown:Y$2(Ws.onMouseDown,pi=>{!ii&&pi.button===0&&pi.ctrlKey===!1?li.onValueChange(si):pi.preventDefault()}),onKeyDown:Y$2(Ws.onKeyDown,pi=>{[" ","Enter"].includes(pi.key)&&li.onValueChange(si)}),onFocus:Y$2(Ws.onFocus,()=>{const pi=li.activationMode!=="manual";!hi&&!ii&&pi&&li.onValueChange(si)})})})});Js.displayName=Qs;var ei="TabsContent",ti=React.forwardRef((Ws,ws)=>{const{__scopeTabs:oi,value:si,forceMount:ii,children:ai,...li}=Ws,ci=pr$1(ei,oi),ui=ni(ci.baseId,si),di=ri(ci.baseId,si),hi=si===ci.value,pi=React.useRef(hi);return React.useEffect(()=>{const ha=requestAnimationFrame(()=>pi.current=!1);return()=>cancelAnimationFrame(ha)},[]),jsx(ft$2,{present:ii||hi,children:({present:ha})=>jsx(se$2.div,{"data-state":hi?"active":"inactive","data-orientation":ci.orientation,role:"tabpanel","aria-labelledby":ui,hidden:!ha,id:di,tabIndex:0,...li,ref:ws,style:{...Ws.style,animationDuration:pi.current?"0s":void 0},children:ha&&ai})})});ti.displayName=ei;function ni(Ws,ws){return`${Ws}-trigger-${ws}`}function ri(Ws,ws){return`${Ws}-content-${ws}`}var Zd=Xs,Qd=Zs,Jd=Js,ef=ti;function devAssert$1(Ws,ws){if(!!!Ws)throw new Error(ws)}function isObjectLike$1(Ws){return typeof Ws=="object"&&Ws!==null}function invariant$2(Ws,ws){if(!!!Ws)throw new Error("Unexpected invariant triggered.")}const LineRegExp$1=/\r\n|[\n\r]/g;function getLocation$2(Ws,ws){let oi=0,si=1;for(const ii of Ws.body.matchAll(LineRegExp$1)){if(typeof ii.index=="number"||invariant$2(!1),ii.index>=ws)break;oi=ii.index+ii[0].length,si+=1}return{line:si,column:ws+1-oi}}function printLocation$1(Ws){return printSourceLocation$1(Ws.source,getLocation$2(Ws.source,Ws.start))}function printSourceLocation$1(Ws,ws){const oi=Ws.locationOffset.column-1,si="".padStart(oi)+Ws.body,ii=ws.line-1,ai=Ws.locationOffset.line-1,li=ws.line+ai,ci=ws.line===1?oi:0,ui=ws.column+ci,di=`${Ws.name}:${li}:${ui}
|
|
42
42
|
`,hi=si.split(/\r\n|[\n\r]/g),pi=hi[ii];if(pi.length>120){const ha=Math.floor(ui/80),ga=ui%80,va=[];for(let ba=0;ba<pi.length;ba+=80)va.push(pi.slice(ba,ba+80));return di+printPrefixedLines$1([[`${li} |`,va[0]],...va.slice(1,ha+1).map(ba=>["|",ba]),["|","^".padStart(ga)],["|",va[ha+1]]])}return di+printPrefixedLines$1([[`${li-1} |`,hi[ii-1]],[`${li} |`,pi],["|","^".padStart(ui)],[`${li+1} |`,hi[ii+1]]])}function printPrefixedLines$1(Ws){const ws=Ws.filter(([si,ii])=>ii!==void 0),oi=Math.max(...ws.map(([si])=>si.length));return ws.map(([si,ii])=>si.padStart(oi)+(ii?" "+ii:"")).join(`
|
|
43
43
|
`)}function toNormalizedOptions$1(Ws){const ws=Ws[0];return ws==null||"kind"in ws||"length"in ws?{nodes:ws,source:Ws[1],positions:Ws[2],path:Ws[3],originalError:Ws[4],extensions:Ws[5]}:ws}let GraphQLError$1=class Gf extends Error{constructor(ws,...oi){var si,ii,ai;const{nodes:li,source:ci,positions:ui,path:di,originalError:hi,extensions:pi}=toNormalizedOptions$1(oi);super(ws),this.name="GraphQLError",this.path=di??void 0,this.originalError=hi??void 0,this.nodes=undefinedIfEmpty$1(Array.isArray(li)?li:li?[li]:void 0);const ha=undefinedIfEmpty$1((si=this.nodes)===null||si===void 0?void 0:si.map(va=>va.loc).filter(va=>va!=null));this.source=ci??(ha==null||(ii=ha[0])===null||ii===void 0?void 0:ii.source),this.positions=ui??(ha==null?void 0:ha.map(va=>va.start)),this.locations=ui&&ci?ui.map(va=>getLocation$2(ci,va)):ha==null?void 0:ha.map(va=>getLocation$2(va.source,va.start));const ga=isObjectLike$1(hi==null?void 0:hi.extensions)?hi==null?void 0:hi.extensions:void 0;this.extensions=(ai=pi??ga)!==null&&ai!==void 0?ai:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),hi!=null&&hi.stack?Object.defineProperty(this,"stack",{value:hi.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Gf):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let ws=this.message;if(this.nodes)for(const oi of this.nodes)oi.loc&&(ws+=`
|
|
44
44
|
|
|
45
45
|
`+printLocation$1(oi.loc));else if(this.source&&this.locations)for(const oi of this.locations)ws+=`
|
|
46
46
|
|
|
47
|
-
`+printSourceLocation$1(this.source,oi);return ws}toJSON(){const ws={message:this.message};return this.locations!=null&&(ws.locations=this.locations),this.path!=null&&(ws.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(ws.extensions=this.extensions),ws}};function undefinedIfEmpty$1(Ws){return Ws===void 0||Ws.length===0?void 0:Ws}var Kind$1;(function(Ws){Ws.NAME="Name",Ws.DOCUMENT="Document",Ws.OPERATION_DEFINITION="OperationDefinition",Ws.VARIABLE_DEFINITION="VariableDefinition",Ws.SELECTION_SET="SelectionSet",Ws.FIELD="Field",Ws.ARGUMENT="Argument",Ws.FRAGMENT_SPREAD="FragmentSpread",Ws.INLINE_FRAGMENT="InlineFragment",Ws.FRAGMENT_DEFINITION="FragmentDefinition",Ws.VARIABLE="Variable",Ws.INT="IntValue",Ws.FLOAT="FloatValue",Ws.STRING="StringValue",Ws.BOOLEAN="BooleanValue",Ws.NULL="NullValue",Ws.ENUM="EnumValue",Ws.LIST="ListValue",Ws.OBJECT="ObjectValue",Ws.OBJECT_FIELD="ObjectField",Ws.DIRECTIVE="Directive",Ws.NAMED_TYPE="NamedType",Ws.LIST_TYPE="ListType",Ws.NON_NULL_TYPE="NonNullType",Ws.SCHEMA_DEFINITION="SchemaDefinition",Ws.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",Ws.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",Ws.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",Ws.FIELD_DEFINITION="FieldDefinition",Ws.INPUT_VALUE_DEFINITION="InputValueDefinition",Ws.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",Ws.UNION_TYPE_DEFINITION="UnionTypeDefinition",Ws.ENUM_TYPE_DEFINITION="EnumTypeDefinition",Ws.ENUM_VALUE_DEFINITION="EnumValueDefinition",Ws.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",Ws.DIRECTIVE_DEFINITION="DirectiveDefinition",Ws.SCHEMA_EXTENSION="SchemaExtension",Ws.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",Ws.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",Ws.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",Ws.UNION_TYPE_EXTENSION="UnionTypeExtension",Ws.ENUM_TYPE_EXTENSION="EnumTypeExtension",Ws.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(Kind$1||(Kind$1={}));function isDigit$2(Ws){return Ws>=48&&Ws<=57}function isLetter$1(Ws){return Ws>=97&&Ws<=122||Ws>=65&&Ws<=90}function isNameStart$1(Ws){return isLetter$1(Ws)||Ws===95}function isNameContinue$1(Ws){return isLetter$1(Ws)||isDigit$2(Ws)||Ws===95}const MAX_ARRAY_LENGTH$1=10,MAX_RECURSIVE_DEPTH$1=2;function inspect$1(Ws){return formatValue$1(Ws,[])}function formatValue$1(Ws,ws){switch(typeof Ws){case"string":return JSON.stringify(Ws);case"function":return Ws.name?`[function ${Ws.name}]`:"[function]";case"object":return formatObjectValue$1(Ws,ws);default:return String(Ws)}}function formatObjectValue$1(Ws,ws){if(Ws===null)return"null";if(ws.includes(Ws))return"[Circular]";const oi=[...ws,Ws];if(isJSONable$1(Ws)){const si=Ws.toJSON();if(si!==Ws)return typeof si=="string"?si:formatValue$1(si,oi)}else if(Array.isArray(Ws))return formatArray$1(Ws,oi);return formatObject$1(Ws,oi)}function isJSONable$1(Ws){return typeof Ws.toJSON=="function"}function formatObject$1(Ws,ws){const oi=Object.entries(Ws);return oi.length===0?"{}":ws.length>MAX_RECURSIVE_DEPTH$1?"["+getObjectTag$1(Ws)+"]":"{ "+oi.map(([ii,ai])=>ii+": "+formatValue$1(ai,ws)).join(", ")+" }"}function formatArray$1(Ws,ws){if(Ws.length===0)return"[]";if(ws.length>MAX_RECURSIVE_DEPTH$1)return"[Array]";const oi=Math.min(MAX_ARRAY_LENGTH$1,Ws.length),si=Ws.length-oi,ii=[];for(let ai=0;ai<oi;++ai)ii.push(formatValue$1(Ws[ai],ws));return si===1?ii.push("... 1 more item"):si>1&&ii.push(`... ${si} more items`),"["+ii.join(", ")+"]"}function getObjectTag$1(Ws){const ws=Object.prototype.toString.call(Ws).replace(/^\[object /,"").replace(/]$/,"");if(ws==="Object"&&typeof Ws.constructor=="function"){const oi=Ws.constructor.name;if(typeof oi=="string"&&oi!=="")return oi}return ws}function identityFunc$1(Ws){return Ws}function keyValMap$1(Ws,ws,oi){const si=Object.create(null);for(const ii of Ws)si[ws(ii)]=oi(ii);return si}function toObjMap$1(Ws){if(Ws==null)return Object.create(null);if(Object.getPrototypeOf(Ws)===null)return Ws;const ws=Object.create(null);for(const[oi,si]of Object.entries(Ws))ws[oi]=si;return ws}function valueFromASTUntyped$1(Ws,ws){switch(Ws.kind){case Kind$1.NULL:return null;case Kind$1.INT:return parseInt(Ws.value,10);case Kind$1.FLOAT:return parseFloat(Ws.value);case Kind$1.STRING:case Kind$1.ENUM:case Kind$1.BOOLEAN:return Ws.value;case Kind$1.LIST:return Ws.values.map(oi=>valueFromASTUntyped$1(oi,ws));case Kind$1.OBJECT:return keyValMap$1(Ws.fields,oi=>oi.name.value,oi=>valueFromASTUntyped$1(oi.value,ws));case Kind$1.VARIABLE:return ws==null?void 0:ws[Ws.name.value]}}function assertName$1(Ws){if(Ws!=null||devAssert$1(!1,"Must provide name."),typeof Ws=="string"||devAssert$1(!1,"Expected name to be a string."),Ws.length===0)throw new GraphQLError$1("Expected name to be a non-empty string.");for(let ws=1;ws<Ws.length;++ws)if(!isNameContinue$1(Ws.charCodeAt(ws)))throw new GraphQLError$1(`Names must only contain [_a-zA-Z0-9] but "${Ws}" does not.`);if(!isNameStart$1(Ws.charCodeAt(0)))throw new GraphQLError$1(`Names must start with [_a-zA-Z] but "${Ws}" does not.`);return Ws}let GraphQLScalarType$1=class{constructor(ws){var oi,si,ii,ai;const li=(oi=ws.parseValue)!==null&&oi!==void 0?oi:identityFunc$1;this.name=assertName$1(ws.name),this.description=ws.description,this.specifiedByURL=ws.specifiedByURL,this.serialize=(si=ws.serialize)!==null&&si!==void 0?si:identityFunc$1,this.parseValue=li,this.parseLiteral=(ii=ws.parseLiteral)!==null&&ii!==void 0?ii:(ci,ui)=>li(valueFromASTUntyped$1(ci,ui)),this.extensions=toObjMap$1(ws.extensions),this.astNode=ws.astNode,this.extensionASTNodes=(ai=ws.extensionASTNodes)!==null&&ai!==void 0?ai:[],ws.specifiedByURL==null||typeof ws.specifiedByURL=="string"||devAssert$1(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${inspect$1(ws.specifiedByURL)}.`),ws.serialize==null||typeof ws.serialize=="function"||devAssert$1(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),ws.parseLiteral&&(typeof ws.parseValue=="function"&&typeof ws.parseLiteral=="function"||devAssert$1(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};var util;(function(Ws){Ws.assertEqual=ii=>ii;function ws(ii){}Ws.assertIs=ws;function oi(ii){throw new Error}Ws.assertNever=oi,Ws.arrayToEnum=ii=>{const ai={};for(const li of ii)ai[li]=li;return ai},Ws.getValidEnumValues=ii=>{const ai=Ws.objectKeys(ii).filter(ci=>typeof ii[ii[ci]]!="number"),li={};for(const ci of ai)li[ci]=ii[ci];return Ws.objectValues(li)},Ws.objectValues=ii=>Ws.objectKeys(ii).map(function(ai){return ii[ai]}),Ws.objectKeys=typeof Object.keys=="function"?ii=>Object.keys(ii):ii=>{const ai=[];for(const li in ii)Object.prototype.hasOwnProperty.call(ii,li)&&ai.push(li);return ai},Ws.find=(ii,ai)=>{for(const li of ii)if(ai(li))return li},Ws.isInteger=typeof Number.isInteger=="function"?ii=>Number.isInteger(ii):ii=>typeof ii=="number"&&isFinite(ii)&&Math.floor(ii)===ii;function si(ii,ai=" | "){return ii.map(li=>typeof li=="string"?`'${li}'`:li).join(ai)}Ws.joinValues=si,Ws.jsonStringifyReplacer=(ii,ai)=>typeof ai=="bigint"?ai.toString():ai})(util||(util={}));var objectUtil;(function(Ws){Ws.mergeShapes=(ws,oi)=>({...ws,...oi})})(objectUtil||(objectUtil={}));const ZodParsedType=util.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=Ws=>{switch(typeof Ws){case"undefined":return ZodParsedType.undefined;case"string":return ZodParsedType.string;case"number":return isNaN(Ws)?ZodParsedType.nan:ZodParsedType.number;case"boolean":return ZodParsedType.boolean;case"function":return ZodParsedType.function;case"bigint":return ZodParsedType.bigint;case"symbol":return ZodParsedType.symbol;case"object":return Array.isArray(Ws)?ZodParsedType.array:Ws===null?ZodParsedType.null:Ws.then&&typeof Ws.then=="function"&&Ws.catch&&typeof Ws.catch=="function"?ZodParsedType.promise:typeof Map<"u"&&Ws instanceof Map?ZodParsedType.map:typeof Set<"u"&&Ws instanceof Set?ZodParsedType.set:typeof Date<"u"&&Ws instanceof Date?ZodParsedType.date:ZodParsedType.object;default:return ZodParsedType.unknown}},ZodIssueCode=util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),quotelessJson=Ws=>JSON.stringify(Ws,null,2).replace(/"([^"]+)":/g,"$1:");class ZodError extends Error{get errors(){return this.issues}constructor(ws){super(),this.issues=[],this.addIssue=si=>{this.issues=[...this.issues,si]},this.addIssues=(si=[])=>{this.issues=[...this.issues,...si]};const oi=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,oi):this.__proto__=oi,this.name="ZodError",this.issues=ws}format(ws){const oi=ws||function(ai){return ai.message},si={_errors:[]},ii=ai=>{for(const li of ai.issues)if(li.code==="invalid_union")li.unionErrors.map(ii);else if(li.code==="invalid_return_type")ii(li.returnTypeError);else if(li.code==="invalid_arguments")ii(li.argumentsError);else if(li.path.length===0)si._errors.push(oi(li));else{let ci=si,ui=0;for(;ui<li.path.length;){const di=li.path[ui];ui===li.path.length-1?(ci[di]=ci[di]||{_errors:[]},ci[di]._errors.push(oi(li))):ci[di]=ci[di]||{_errors:[]},ci=ci[di],ui++}}};return ii(this),si}static assert(ws){if(!(ws instanceof ZodError))throw new Error(`Not a ZodError: ${ws}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(ws=oi=>oi.message){const oi={},si=[];for(const ii of this.issues)ii.path.length>0?(oi[ii.path[0]]=oi[ii.path[0]]||[],oi[ii.path[0]].push(ws(ii))):si.push(ws(ii));return{formErrors:si,fieldErrors:oi}}get formErrors(){return this.flatten()}}ZodError.create=Ws=>new ZodError(Ws);const errorMap=(Ws,ws)=>{let oi;switch(Ws.code){case ZodIssueCode.invalid_type:Ws.received===ZodParsedType.undefined?oi="Required":oi=`Expected ${Ws.expected}, received ${Ws.received}`;break;case ZodIssueCode.invalid_literal:oi=`Invalid literal value, expected ${JSON.stringify(Ws.expected,util.jsonStringifyReplacer)}`;break;case ZodIssueCode.unrecognized_keys:oi=`Unrecognized key(s) in object: ${util.joinValues(Ws.keys,", ")}`;break;case ZodIssueCode.invalid_union:oi="Invalid input";break;case ZodIssueCode.invalid_union_discriminator:oi=`Invalid discriminator value. Expected ${util.joinValues(Ws.options)}`;break;case ZodIssueCode.invalid_enum_value:oi=`Invalid enum value. Expected ${util.joinValues(Ws.options)}, received '${Ws.received}'`;break;case ZodIssueCode.invalid_arguments:oi="Invalid function arguments";break;case ZodIssueCode.invalid_return_type:oi="Invalid function return type";break;case ZodIssueCode.invalid_date:oi="Invalid date";break;case ZodIssueCode.invalid_string:typeof Ws.validation=="object"?"includes"in Ws.validation?(oi=`Invalid input: must include "${Ws.validation.includes}"`,typeof Ws.validation.position=="number"&&(oi=`${oi} at one or more positions greater than or equal to ${Ws.validation.position}`)):"startsWith"in Ws.validation?oi=`Invalid input: must start with "${Ws.validation.startsWith}"`:"endsWith"in Ws.validation?oi=`Invalid input: must end with "${Ws.validation.endsWith}"`:util.assertNever(Ws.validation):Ws.validation!=="regex"?oi=`Invalid ${Ws.validation}`:oi="Invalid";break;case ZodIssueCode.too_small:Ws.type==="array"?oi=`Array must contain ${Ws.exact?"exactly":Ws.inclusive?"at least":"more than"} ${Ws.minimum} element(s)`:Ws.type==="string"?oi=`String must contain ${Ws.exact?"exactly":Ws.inclusive?"at least":"over"} ${Ws.minimum} character(s)`:Ws.type==="number"?oi=`Number must be ${Ws.exact?"exactly equal to ":Ws.inclusive?"greater than or equal to ":"greater than "}${Ws.minimum}`:Ws.type==="date"?oi=`Date must be ${Ws.exact?"exactly equal to ":Ws.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(Ws.minimum))}`:oi="Invalid input";break;case ZodIssueCode.too_big:Ws.type==="array"?oi=`Array must contain ${Ws.exact?"exactly":Ws.inclusive?"at most":"less than"} ${Ws.maximum} element(s)`:Ws.type==="string"?oi=`String must contain ${Ws.exact?"exactly":Ws.inclusive?"at most":"under"} ${Ws.maximum} character(s)`:Ws.type==="number"?oi=`Number must be ${Ws.exact?"exactly":Ws.inclusive?"less than or equal to":"less than"} ${Ws.maximum}`:Ws.type==="bigint"?oi=`BigInt must be ${Ws.exact?"exactly":Ws.inclusive?"less than or equal to":"less than"} ${Ws.maximum}`:Ws.type==="date"?oi=`Date must be ${Ws.exact?"exactly":Ws.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(Ws.maximum))}`:oi="Invalid input";break;case ZodIssueCode.custom:oi="Invalid input";break;case ZodIssueCode.invalid_intersection_types:oi="Intersection results could not be merged";break;case ZodIssueCode.not_multiple_of:oi=`Number must be a multiple of ${Ws.multipleOf}`;break;case ZodIssueCode.not_finite:oi="Number must be finite";break;default:oi=ws.defaultError,util.assertNever(Ws)}return{message:oi}};let overrideErrorMap=errorMap;function setErrorMap(Ws){overrideErrorMap=Ws}function getErrorMap(){return overrideErrorMap}const makeIssue=Ws=>{const{data:ws,path:oi,errorMaps:si,issueData:ii}=Ws,ai=[...oi,...ii.path||[]],li={...ii,path:ai};if(ii.message!==void 0)return{...ii,path:ai,message:ii.message};let ci="";const ui=si.filter(di=>!!di).slice().reverse();for(const di of ui)ci=di(li,{data:ws,defaultError:ci}).message;return{...ii,path:ai,message:ci}},EMPTY_PATH=[];function addIssueToContext(Ws,ws){const oi=getErrorMap(),si=makeIssue({issueData:ws,data:Ws.data,path:Ws.path,errorMaps:[Ws.common.contextualErrorMap,Ws.schemaErrorMap,oi,oi===errorMap?void 0:errorMap].filter(ii=>!!ii)});Ws.common.issues.push(si)}class ParseStatus{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(ws,oi){const si=[];for(const ii of oi){if(ii.status==="aborted")return INVALID;ii.status==="dirty"&&ws.dirty(),si.push(ii.value)}return{status:ws.value,value:si}}static async mergeObjectAsync(ws,oi){const si=[];for(const ii of oi){const ai=await ii.key,li=await ii.value;si.push({key:ai,value:li})}return ParseStatus.mergeObjectSync(ws,si)}static mergeObjectSync(ws,oi){const si={};for(const ii of oi){const{key:ai,value:li}=ii;if(ai.status==="aborted"||li.status==="aborted")return INVALID;ai.status==="dirty"&&ws.dirty(),li.status==="dirty"&&ws.dirty(),ai.value!=="__proto__"&&(typeof li.value<"u"||ii.alwaysSet)&&(si[ai.value]=li.value)}return{status:ws.value,value:si}}}const INVALID=Object.freeze({status:"aborted"}),DIRTY=Ws=>({status:"dirty",value:Ws}),OK=Ws=>({status:"valid",value:Ws}),isAborted=Ws=>Ws.status==="aborted",isDirty=Ws=>Ws.status==="dirty",isValid=Ws=>Ws.status==="valid",isAsync=Ws=>typeof Promise<"u"&&Ws instanceof Promise;function __classPrivateFieldGet(Ws,ws,oi,si){if(typeof ws=="function"?Ws!==ws||!0:!ws.has(Ws))throw new TypeError("Cannot read private member from an object whose class did not declare it");return ws.get(Ws)}function __classPrivateFieldSet(Ws,ws,oi,si,ii){if(typeof ws=="function"?Ws!==ws||!0:!ws.has(Ws))throw new TypeError("Cannot write private member to an object whose class did not declare it");return ws.set(Ws,oi),oi}typeof SuppressedError=="function"&&SuppressedError;var errorUtil;(function(Ws){Ws.errToObj=ws=>typeof ws=="string"?{message:ws}:ws||{},Ws.toString=ws=>typeof ws=="string"?ws:ws==null?void 0:ws.message})(errorUtil||(errorUtil={}));var _ZodEnum_cache,_ZodNativeEnum_cache;class ParseInputLazyPath{constructor(ws,oi,si,ii){this._cachedPath=[],this.parent=ws,this.data=oi,this._path=si,this._key=ii}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const handleResult=(Ws,ws)=>{if(isValid(ws))return{success:!0,data:ws.value};if(!Ws.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const oi=new ZodError(Ws.common.issues);return this._error=oi,this._error}}};function processCreateParams(Ws){if(!Ws)return{};const{errorMap:ws,invalid_type_error:oi,required_error:si,description:ii}=Ws;if(ws&&(oi||si))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return ws?{errorMap:ws,description:ii}:{errorMap:(li,ci)=>{var ui,di;const{message:hi}=Ws;return li.code==="invalid_enum_value"?{message:hi??ci.defaultError}:typeof ci.data>"u"?{message:(ui=hi??si)!==null&&ui!==void 0?ui:ci.defaultError}:li.code!=="invalid_type"?{message:ci.defaultError}:{message:(di=hi??oi)!==null&&di!==void 0?di:ci.defaultError}},description:ii}}class ZodType{get description(){return this._def.description}_getType(ws){return getParsedType(ws.data)}_getOrReturnCtx(ws,oi){return oi||{common:ws.parent.common,data:ws.data,parsedType:getParsedType(ws.data),schemaErrorMap:this._def.errorMap,path:ws.path,parent:ws.parent}}_processInputParams(ws){return{status:new ParseStatus,ctx:{common:ws.parent.common,data:ws.data,parsedType:getParsedType(ws.data),schemaErrorMap:this._def.errorMap,path:ws.path,parent:ws.parent}}}_parseSync(ws){const oi=this._parse(ws);if(isAsync(oi))throw new Error("Synchronous parse encountered promise.");return oi}_parseAsync(ws){const oi=this._parse(ws);return Promise.resolve(oi)}parse(ws,oi){const si=this.safeParse(ws,oi);if(si.success)return si.data;throw si.error}safeParse(ws,oi){var si;const ii={common:{issues:[],async:(si=oi==null?void 0:oi.async)!==null&&si!==void 0?si:!1,contextualErrorMap:oi==null?void 0:oi.errorMap},path:(oi==null?void 0:oi.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:ws,parsedType:getParsedType(ws)},ai=this._parseSync({data:ws,path:ii.path,parent:ii});return handleResult(ii,ai)}"~validate"(ws){var oi,si;const ii={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:ws,parsedType:getParsedType(ws)};if(!this["~standard"].async)try{const ai=this._parseSync({data:ws,path:[],parent:ii});return isValid(ai)?{value:ai.value}:{issues:ii.common.issues}}catch(ai){!((si=(oi=ai==null?void 0:ai.message)===null||oi===void 0?void 0:oi.toLowerCase())===null||si===void 0)&&si.includes("encountered")&&(this["~standard"].async=!0),ii.common={issues:[],async:!0}}return this._parseAsync({data:ws,path:[],parent:ii}).then(ai=>isValid(ai)?{value:ai.value}:{issues:ii.common.issues})}async parseAsync(ws,oi){const si=await this.safeParseAsync(ws,oi);if(si.success)return si.data;throw si.error}async safeParseAsync(ws,oi){const si={common:{issues:[],contextualErrorMap:oi==null?void 0:oi.errorMap,async:!0},path:(oi==null?void 0:oi.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:ws,parsedType:getParsedType(ws)},ii=this._parse({data:ws,path:si.path,parent:si}),ai=await(isAsync(ii)?ii:Promise.resolve(ii));return handleResult(si,ai)}refine(ws,oi){const si=ii=>typeof oi=="string"||typeof oi>"u"?{message:oi}:typeof oi=="function"?oi(ii):oi;return this._refinement((ii,ai)=>{const li=ws(ii),ci=()=>ai.addIssue({code:ZodIssueCode.custom,...si(ii)});return typeof Promise<"u"&&li instanceof Promise?li.then(ui=>ui?!0:(ci(),!1)):li?!0:(ci(),!1)})}refinement(ws,oi){return this._refinement((si,ii)=>ws(si)?!0:(ii.addIssue(typeof oi=="function"?oi(si,ii):oi),!1))}_refinement(ws){return new ZodEffects({schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"refinement",refinement:ws}})}superRefine(ws){return this._refinement(ws)}constructor(ws){this.spa=this.safeParseAsync,this._def=ws,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:oi=>this["~validate"](oi)}}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this)}promise(){return ZodPromise.create(this,this._def)}or(ws){return ZodUnion.create([this,ws],this._def)}and(ws){return ZodIntersection.create(this,ws,this._def)}transform(ws){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"transform",transform:ws}})}default(ws){const oi=typeof ws=="function"?ws:()=>ws;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:oi,typeName:ZodFirstPartyTypeKind.ZodDefault})}brand(){return new ZodBranded({typeName:ZodFirstPartyTypeKind.ZodBranded,type:this,...processCreateParams(this._def)})}catch(ws){const oi=typeof ws=="function"?ws:()=>ws;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:oi,typeName:ZodFirstPartyTypeKind.ZodCatch})}describe(ws){const oi=this.constructor;return new oi({...this._def,description:ws})}pipe(ws){return ZodPipeline.create(this,ws)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cuidRegex=/^c[^\s-]{8,}$/i,cuid2Regex=/^[0-9a-z]+$/,ulidRegex=/^[0-9A-HJKMNP-TV-Z]{26}$/i,uuidRegex=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,nanoidRegex=/^[a-z0-9_-]{21}$/i,jwtRegex=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,durationRegex=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,emailRegex=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_emojiRegex="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let emojiRegex;const ipv4Regex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4CidrRegex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6Regex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ipv6CidrRegex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64Regex=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64urlRegex=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dateRegexSource="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",dateRegex=new RegExp(`^${dateRegexSource}$`);function timeRegexSource(Ws){let ws="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return Ws.precision?ws=`${ws}\\.\\d{${Ws.precision}}`:Ws.precision==null&&(ws=`${ws}(\\.\\d+)?`),ws}function timeRegex(Ws){return new RegExp(`^${timeRegexSource(Ws)}$`)}function datetimeRegex(Ws){let ws=`${dateRegexSource}T${timeRegexSource(Ws)}`;const oi=[];return oi.push(Ws.local?"Z?":"Z"),Ws.offset&&oi.push("([+-]\\d{2}:?\\d{2})"),ws=`${ws}(${oi.join("|")})`,new RegExp(`^${ws}$`)}function isValidIP(Ws,ws){return!!((ws==="v4"||!ws)&&ipv4Regex.test(Ws)||(ws==="v6"||!ws)&&ipv6Regex.test(Ws))}function isValidJWT(Ws,ws){if(!jwtRegex.test(Ws))return!1;try{const[oi]=Ws.split("."),si=oi.replace(/-/g,"+").replace(/_/g,"/").padEnd(oi.length+(4-oi.length%4)%4,"="),ii=JSON.parse(atob(si));return!(typeof ii!="object"||ii===null||!ii.typ||!ii.alg||ws&&ii.alg!==ws)}catch{return!1}}function isValidCidr(Ws,ws){return!!((ws==="v4"||!ws)&&ipv4CidrRegex.test(Ws)||(ws==="v6"||!ws)&&ipv6CidrRegex.test(Ws))}class ZodString extends ZodType{_parse(ws){if(this._def.coerce&&(ws.data=String(ws.data)),this._getType(ws)!==ZodParsedType.string){const ai=this._getOrReturnCtx(ws);return addIssueToContext(ai,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.string,received:ai.parsedType}),INVALID}const si=new ParseStatus;let ii;for(const ai of this._def.checks)if(ai.kind==="min")ws.data.length<ai.value&&(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.too_small,minimum:ai.value,type:"string",inclusive:!0,exact:!1,message:ai.message}),si.dirty());else if(ai.kind==="max")ws.data.length>ai.value&&(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.too_big,maximum:ai.value,type:"string",inclusive:!0,exact:!1,message:ai.message}),si.dirty());else if(ai.kind==="length"){const li=ws.data.length>ai.value,ci=ws.data.length<ai.value;(li||ci)&&(ii=this._getOrReturnCtx(ws,ii),li?addIssueToContext(ii,{code:ZodIssueCode.too_big,maximum:ai.value,type:"string",inclusive:!0,exact:!0,message:ai.message}):ci&&addIssueToContext(ii,{code:ZodIssueCode.too_small,minimum:ai.value,type:"string",inclusive:!0,exact:!0,message:ai.message}),si.dirty())}else if(ai.kind==="email")emailRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"email",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty());else if(ai.kind==="emoji")emojiRegex||(emojiRegex=new RegExp(_emojiRegex,"u")),emojiRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"emoji",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty());else if(ai.kind==="uuid")uuidRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"uuid",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty());else if(ai.kind==="nanoid")nanoidRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"nanoid",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty());else if(ai.kind==="cuid")cuidRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"cuid",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty());else if(ai.kind==="cuid2")cuid2Regex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"cuid2",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty());else if(ai.kind==="ulid")ulidRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"ulid",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty());else if(ai.kind==="url")try{new URL(ws.data)}catch{ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"url",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty()}else ai.kind==="regex"?(ai.regex.lastIndex=0,ai.regex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"regex",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty())):ai.kind==="trim"?ws.data=ws.data.trim():ai.kind==="includes"?ws.data.includes(ai.value,ai.position)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.invalid_string,validation:{includes:ai.value,position:ai.position},message:ai.message}),si.dirty()):ai.kind==="toLowerCase"?ws.data=ws.data.toLowerCase():ai.kind==="toUpperCase"?ws.data=ws.data.toUpperCase():ai.kind==="startsWith"?ws.data.startsWith(ai.value)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.invalid_string,validation:{startsWith:ai.value},message:ai.message}),si.dirty()):ai.kind==="endsWith"?ws.data.endsWith(ai.value)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.invalid_string,validation:{endsWith:ai.value},message:ai.message}),si.dirty()):ai.kind==="datetime"?datetimeRegex(ai).test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.invalid_string,validation:"datetime",message:ai.message}),si.dirty()):ai.kind==="date"?dateRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.invalid_string,validation:"date",message:ai.message}),si.dirty()):ai.kind==="time"?timeRegex(ai).test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.invalid_string,validation:"time",message:ai.message}),si.dirty()):ai.kind==="duration"?durationRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"duration",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty()):ai.kind==="ip"?isValidIP(ws.data,ai.version)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"ip",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty()):ai.kind==="jwt"?isValidJWT(ws.data,ai.alg)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"jwt",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty()):ai.kind==="cidr"?isValidCidr(ws.data,ai.version)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"cidr",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty()):ai.kind==="base64"?base64Regex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"base64",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty()):ai.kind==="base64url"?base64urlRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"base64url",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty()):util.assertNever(ai);return{status:si.value,value:ws.data}}_regex(ws,oi,si){return this.refinement(ii=>ws.test(ii),{validation:oi,code:ZodIssueCode.invalid_string,...errorUtil.errToObj(si)})}_addCheck(ws){return new ZodString({...this._def,checks:[...this._def.checks,ws]})}email(ws){return this._addCheck({kind:"email",...errorUtil.errToObj(ws)})}url(ws){return this._addCheck({kind:"url",...errorUtil.errToObj(ws)})}emoji(ws){return this._addCheck({kind:"emoji",...errorUtil.errToObj(ws)})}uuid(ws){return this._addCheck({kind:"uuid",...errorUtil.errToObj(ws)})}nanoid(ws){return this._addCheck({kind:"nanoid",...errorUtil.errToObj(ws)})}cuid(ws){return this._addCheck({kind:"cuid",...errorUtil.errToObj(ws)})}cuid2(ws){return this._addCheck({kind:"cuid2",...errorUtil.errToObj(ws)})}ulid(ws){return this._addCheck({kind:"ulid",...errorUtil.errToObj(ws)})}base64(ws){return this._addCheck({kind:"base64",...errorUtil.errToObj(ws)})}base64url(ws){return this._addCheck({kind:"base64url",...errorUtil.errToObj(ws)})}jwt(ws){return this._addCheck({kind:"jwt",...errorUtil.errToObj(ws)})}ip(ws){return this._addCheck({kind:"ip",...errorUtil.errToObj(ws)})}cidr(ws){return this._addCheck({kind:"cidr",...errorUtil.errToObj(ws)})}datetime(ws){var oi,si;return typeof ws=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:ws}):this._addCheck({kind:"datetime",precision:typeof(ws==null?void 0:ws.precision)>"u"?null:ws==null?void 0:ws.precision,offset:(oi=ws==null?void 0:ws.offset)!==null&&oi!==void 0?oi:!1,local:(si=ws==null?void 0:ws.local)!==null&&si!==void 0?si:!1,...errorUtil.errToObj(ws==null?void 0:ws.message)})}date(ws){return this._addCheck({kind:"date",message:ws})}time(ws){return typeof ws=="string"?this._addCheck({kind:"time",precision:null,message:ws}):this._addCheck({kind:"time",precision:typeof(ws==null?void 0:ws.precision)>"u"?null:ws==null?void 0:ws.precision,...errorUtil.errToObj(ws==null?void 0:ws.message)})}duration(ws){return this._addCheck({kind:"duration",...errorUtil.errToObj(ws)})}regex(ws,oi){return this._addCheck({kind:"regex",regex:ws,...errorUtil.errToObj(oi)})}includes(ws,oi){return this._addCheck({kind:"includes",value:ws,position:oi==null?void 0:oi.position,...errorUtil.errToObj(oi==null?void 0:oi.message)})}startsWith(ws,oi){return this._addCheck({kind:"startsWith",value:ws,...errorUtil.errToObj(oi)})}endsWith(ws,oi){return this._addCheck({kind:"endsWith",value:ws,...errorUtil.errToObj(oi)})}min(ws,oi){return this._addCheck({kind:"min",value:ws,...errorUtil.errToObj(oi)})}max(ws,oi){return this._addCheck({kind:"max",value:ws,...errorUtil.errToObj(oi)})}length(ws,oi){return this._addCheck({kind:"length",value:ws,...errorUtil.errToObj(oi)})}nonempty(ws){return this.min(1,errorUtil.errToObj(ws))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(ws=>ws.kind==="datetime")}get isDate(){return!!this._def.checks.find(ws=>ws.kind==="date")}get isTime(){return!!this._def.checks.find(ws=>ws.kind==="time")}get isDuration(){return!!this._def.checks.find(ws=>ws.kind==="duration")}get isEmail(){return!!this._def.checks.find(ws=>ws.kind==="email")}get isURL(){return!!this._def.checks.find(ws=>ws.kind==="url")}get isEmoji(){return!!this._def.checks.find(ws=>ws.kind==="emoji")}get isUUID(){return!!this._def.checks.find(ws=>ws.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(ws=>ws.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(ws=>ws.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(ws=>ws.kind==="cuid2")}get isULID(){return!!this._def.checks.find(ws=>ws.kind==="ulid")}get isIP(){return!!this._def.checks.find(ws=>ws.kind==="ip")}get isCIDR(){return!!this._def.checks.find(ws=>ws.kind==="cidr")}get isBase64(){return!!this._def.checks.find(ws=>ws.kind==="base64")}get isBase64url(){return!!this._def.checks.find(ws=>ws.kind==="base64url")}get minLength(){let ws=null;for(const oi of this._def.checks)oi.kind==="min"&&(ws===null||oi.value>ws)&&(ws=oi.value);return ws}get maxLength(){let ws=null;for(const oi of this._def.checks)oi.kind==="max"&&(ws===null||oi.value<ws)&&(ws=oi.value);return ws}}ZodString.create=Ws=>{var ws;return new ZodString({checks:[],typeName:ZodFirstPartyTypeKind.ZodString,coerce:(ws=Ws==null?void 0:Ws.coerce)!==null&&ws!==void 0?ws:!1,...processCreateParams(Ws)})};function floatSafeRemainder(Ws,ws){const oi=(Ws.toString().split(".")[1]||"").length,si=(ws.toString().split(".")[1]||"").length,ii=oi>si?oi:si,ai=parseInt(Ws.toFixed(ii).replace(".","")),li=parseInt(ws.toFixed(ii).replace(".",""));return ai%li/Math.pow(10,ii)}class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(ws){if(this._def.coerce&&(ws.data=Number(ws.data)),this._getType(ws)!==ZodParsedType.number){const ai=this._getOrReturnCtx(ws);return addIssueToContext(ai,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.number,received:ai.parsedType}),INVALID}let si;const ii=new ParseStatus;for(const ai of this._def.checks)ai.kind==="int"?util.isInteger(ws.data)||(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:"integer",received:"float",message:ai.message}),ii.dirty()):ai.kind==="min"?(ai.inclusive?ws.data<ai.value:ws.data<=ai.value)&&(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.too_small,minimum:ai.value,type:"number",inclusive:ai.inclusive,exact:!1,message:ai.message}),ii.dirty()):ai.kind==="max"?(ai.inclusive?ws.data>ai.value:ws.data>=ai.value)&&(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.too_big,maximum:ai.value,type:"number",inclusive:ai.inclusive,exact:!1,message:ai.message}),ii.dirty()):ai.kind==="multipleOf"?floatSafeRemainder(ws.data,ai.value)!==0&&(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.not_multiple_of,multipleOf:ai.value,message:ai.message}),ii.dirty()):ai.kind==="finite"?Number.isFinite(ws.data)||(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.not_finite,message:ai.message}),ii.dirty()):util.assertNever(ai);return{status:ii.value,value:ws.data}}gte(ws,oi){return this.setLimit("min",ws,!0,errorUtil.toString(oi))}gt(ws,oi){return this.setLimit("min",ws,!1,errorUtil.toString(oi))}lte(ws,oi){return this.setLimit("max",ws,!0,errorUtil.toString(oi))}lt(ws,oi){return this.setLimit("max",ws,!1,errorUtil.toString(oi))}setLimit(ws,oi,si,ii){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:ws,value:oi,inclusive:si,message:errorUtil.toString(ii)}]})}_addCheck(ws){return new ZodNumber({...this._def,checks:[...this._def.checks,ws]})}int(ws){return this._addCheck({kind:"int",message:errorUtil.toString(ws)})}positive(ws){return this._addCheck({kind:"min",value:0,inclusive:!1,message:errorUtil.toString(ws)})}negative(ws){return this._addCheck({kind:"max",value:0,inclusive:!1,message:errorUtil.toString(ws)})}nonpositive(ws){return this._addCheck({kind:"max",value:0,inclusive:!0,message:errorUtil.toString(ws)})}nonnegative(ws){return this._addCheck({kind:"min",value:0,inclusive:!0,message:errorUtil.toString(ws)})}multipleOf(ws,oi){return this._addCheck({kind:"multipleOf",value:ws,message:errorUtil.toString(oi)})}finite(ws){return this._addCheck({kind:"finite",message:errorUtil.toString(ws)})}safe(ws){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:errorUtil.toString(ws)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:errorUtil.toString(ws)})}get minValue(){let ws=null;for(const oi of this._def.checks)oi.kind==="min"&&(ws===null||oi.value>ws)&&(ws=oi.value);return ws}get maxValue(){let ws=null;for(const oi of this._def.checks)oi.kind==="max"&&(ws===null||oi.value<ws)&&(ws=oi.value);return ws}get isInt(){return!!this._def.checks.find(ws=>ws.kind==="int"||ws.kind==="multipleOf"&&util.isInteger(ws.value))}get isFinite(){let ws=null,oi=null;for(const si of this._def.checks){if(si.kind==="finite"||si.kind==="int"||si.kind==="multipleOf")return!0;si.kind==="min"?(oi===null||si.value>oi)&&(oi=si.value):si.kind==="max"&&(ws===null||si.value<ws)&&(ws=si.value)}return Number.isFinite(oi)&&Number.isFinite(ws)}}ZodNumber.create=Ws=>new ZodNumber({checks:[],typeName:ZodFirstPartyTypeKind.ZodNumber,coerce:(Ws==null?void 0:Ws.coerce)||!1,...processCreateParams(Ws)});class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(ws){if(this._def.coerce)try{ws.data=BigInt(ws.data)}catch{return this._getInvalidInput(ws)}if(this._getType(ws)!==ZodParsedType.bigint)return this._getInvalidInput(ws);let si;const ii=new ParseStatus;for(const ai of this._def.checks)ai.kind==="min"?(ai.inclusive?ws.data<ai.value:ws.data<=ai.value)&&(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.too_small,type:"bigint",minimum:ai.value,inclusive:ai.inclusive,message:ai.message}),ii.dirty()):ai.kind==="max"?(ai.inclusive?ws.data>ai.value:ws.data>=ai.value)&&(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.too_big,type:"bigint",maximum:ai.value,inclusive:ai.inclusive,message:ai.message}),ii.dirty()):ai.kind==="multipleOf"?ws.data%ai.value!==BigInt(0)&&(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.not_multiple_of,multipleOf:ai.value,message:ai.message}),ii.dirty()):util.assertNever(ai);return{status:ii.value,value:ws.data}}_getInvalidInput(ws){const oi=this._getOrReturnCtx(ws);return addIssueToContext(oi,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.bigint,received:oi.parsedType}),INVALID}gte(ws,oi){return this.setLimit("min",ws,!0,errorUtil.toString(oi))}gt(ws,oi){return this.setLimit("min",ws,!1,errorUtil.toString(oi))}lte(ws,oi){return this.setLimit("max",ws,!0,errorUtil.toString(oi))}lt(ws,oi){return this.setLimit("max",ws,!1,errorUtil.toString(oi))}setLimit(ws,oi,si,ii){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:ws,value:oi,inclusive:si,message:errorUtil.toString(ii)}]})}_addCheck(ws){return new ZodBigInt({...this._def,checks:[...this._def.checks,ws]})}positive(ws){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:errorUtil.toString(ws)})}negative(ws){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:errorUtil.toString(ws)})}nonpositive(ws){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:errorUtil.toString(ws)})}nonnegative(ws){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:errorUtil.toString(ws)})}multipleOf(ws,oi){return this._addCheck({kind:"multipleOf",value:ws,message:errorUtil.toString(oi)})}get minValue(){let ws=null;for(const oi of this._def.checks)oi.kind==="min"&&(ws===null||oi.value>ws)&&(ws=oi.value);return ws}get maxValue(){let ws=null;for(const oi of this._def.checks)oi.kind==="max"&&(ws===null||oi.value<ws)&&(ws=oi.value);return ws}}ZodBigInt.create=Ws=>{var ws;return new ZodBigInt({checks:[],typeName:ZodFirstPartyTypeKind.ZodBigInt,coerce:(ws=Ws==null?void 0:Ws.coerce)!==null&&ws!==void 0?ws:!1,...processCreateParams(Ws)})};class ZodBoolean extends ZodType{_parse(ws){if(this._def.coerce&&(ws.data=!!ws.data),this._getType(ws)!==ZodParsedType.boolean){const si=this._getOrReturnCtx(ws);return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.boolean,received:si.parsedType}),INVALID}return OK(ws.data)}}ZodBoolean.create=Ws=>new ZodBoolean({typeName:ZodFirstPartyTypeKind.ZodBoolean,coerce:(Ws==null?void 0:Ws.coerce)||!1,...processCreateParams(Ws)});class ZodDate extends ZodType{_parse(ws){if(this._def.coerce&&(ws.data=new Date(ws.data)),this._getType(ws)!==ZodParsedType.date){const ai=this._getOrReturnCtx(ws);return addIssueToContext(ai,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.date,received:ai.parsedType}),INVALID}if(isNaN(ws.data.getTime())){const ai=this._getOrReturnCtx(ws);return addIssueToContext(ai,{code:ZodIssueCode.invalid_date}),INVALID}const si=new ParseStatus;let ii;for(const ai of this._def.checks)ai.kind==="min"?ws.data.getTime()<ai.value&&(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.too_small,message:ai.message,inclusive:!0,exact:!1,minimum:ai.value,type:"date"}),si.dirty()):ai.kind==="max"?ws.data.getTime()>ai.value&&(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.too_big,message:ai.message,inclusive:!0,exact:!1,maximum:ai.value,type:"date"}),si.dirty()):util.assertNever(ai);return{status:si.value,value:new Date(ws.data.getTime())}}_addCheck(ws){return new ZodDate({...this._def,checks:[...this._def.checks,ws]})}min(ws,oi){return this._addCheck({kind:"min",value:ws.getTime(),message:errorUtil.toString(oi)})}max(ws,oi){return this._addCheck({kind:"max",value:ws.getTime(),message:errorUtil.toString(oi)})}get minDate(){let ws=null;for(const oi of this._def.checks)oi.kind==="min"&&(ws===null||oi.value>ws)&&(ws=oi.value);return ws!=null?new Date(ws):null}get maxDate(){let ws=null;for(const oi of this._def.checks)oi.kind==="max"&&(ws===null||oi.value<ws)&&(ws=oi.value);return ws!=null?new Date(ws):null}}ZodDate.create=Ws=>new ZodDate({checks:[],coerce:(Ws==null?void 0:Ws.coerce)||!1,typeName:ZodFirstPartyTypeKind.ZodDate,...processCreateParams(Ws)});class ZodSymbol extends ZodType{_parse(ws){if(this._getType(ws)!==ZodParsedType.symbol){const si=this._getOrReturnCtx(ws);return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.symbol,received:si.parsedType}),INVALID}return OK(ws.data)}}ZodSymbol.create=Ws=>new ZodSymbol({typeName:ZodFirstPartyTypeKind.ZodSymbol,...processCreateParams(Ws)});class ZodUndefined extends ZodType{_parse(ws){if(this._getType(ws)!==ZodParsedType.undefined){const si=this._getOrReturnCtx(ws);return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.undefined,received:si.parsedType}),INVALID}return OK(ws.data)}}ZodUndefined.create=Ws=>new ZodUndefined({typeName:ZodFirstPartyTypeKind.ZodUndefined,...processCreateParams(Ws)});class ZodNull extends ZodType{_parse(ws){if(this._getType(ws)!==ZodParsedType.null){const si=this._getOrReturnCtx(ws);return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.null,received:si.parsedType}),INVALID}return OK(ws.data)}}ZodNull.create=Ws=>new ZodNull({typeName:ZodFirstPartyTypeKind.ZodNull,...processCreateParams(Ws)});class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(ws){return OK(ws.data)}}ZodAny.create=Ws=>new ZodAny({typeName:ZodFirstPartyTypeKind.ZodAny,...processCreateParams(Ws)});class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(ws){return OK(ws.data)}}ZodUnknown.create=Ws=>new ZodUnknown({typeName:ZodFirstPartyTypeKind.ZodUnknown,...processCreateParams(Ws)});class ZodNever extends ZodType{_parse(ws){const oi=this._getOrReturnCtx(ws);return addIssueToContext(oi,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.never,received:oi.parsedType}),INVALID}}ZodNever.create=Ws=>new ZodNever({typeName:ZodFirstPartyTypeKind.ZodNever,...processCreateParams(Ws)});class ZodVoid extends ZodType{_parse(ws){if(this._getType(ws)!==ZodParsedType.undefined){const si=this._getOrReturnCtx(ws);return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.void,received:si.parsedType}),INVALID}return OK(ws.data)}}ZodVoid.create=Ws=>new ZodVoid({typeName:ZodFirstPartyTypeKind.ZodVoid,...processCreateParams(Ws)});class ZodArray extends ZodType{_parse(ws){const{ctx:oi,status:si}=this._processInputParams(ws),ii=this._def;if(oi.parsedType!==ZodParsedType.array)return addIssueToContext(oi,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:oi.parsedType}),INVALID;if(ii.exactLength!==null){const li=oi.data.length>ii.exactLength.value,ci=oi.data.length<ii.exactLength.value;(li||ci)&&(addIssueToContext(oi,{code:li?ZodIssueCode.too_big:ZodIssueCode.too_small,minimum:ci?ii.exactLength.value:void 0,maximum:li?ii.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:ii.exactLength.message}),si.dirty())}if(ii.minLength!==null&&oi.data.length<ii.minLength.value&&(addIssueToContext(oi,{code:ZodIssueCode.too_small,minimum:ii.minLength.value,type:"array",inclusive:!0,exact:!1,message:ii.minLength.message}),si.dirty()),ii.maxLength!==null&&oi.data.length>ii.maxLength.value&&(addIssueToContext(oi,{code:ZodIssueCode.too_big,maximum:ii.maxLength.value,type:"array",inclusive:!0,exact:!1,message:ii.maxLength.message}),si.dirty()),oi.common.async)return Promise.all([...oi.data].map((li,ci)=>ii.type._parseAsync(new ParseInputLazyPath(oi,li,oi.path,ci)))).then(li=>ParseStatus.mergeArray(si,li));const ai=[...oi.data].map((li,ci)=>ii.type._parseSync(new ParseInputLazyPath(oi,li,oi.path,ci)));return ParseStatus.mergeArray(si,ai)}get element(){return this._def.type}min(ws,oi){return new ZodArray({...this._def,minLength:{value:ws,message:errorUtil.toString(oi)}})}max(ws,oi){return new ZodArray({...this._def,maxLength:{value:ws,message:errorUtil.toString(oi)}})}length(ws,oi){return new ZodArray({...this._def,exactLength:{value:ws,message:errorUtil.toString(oi)}})}nonempty(ws){return this.min(1,ws)}}ZodArray.create=(Ws,ws)=>new ZodArray({type:Ws,minLength:null,maxLength:null,exactLength:null,typeName:ZodFirstPartyTypeKind.ZodArray,...processCreateParams(ws)});function deepPartialify(Ws){if(Ws instanceof ZodObject){const ws={};for(const oi in Ws.shape){const si=Ws.shape[oi];ws[oi]=ZodOptional.create(deepPartialify(si))}return new ZodObject({...Ws._def,shape:()=>ws})}else return Ws instanceof ZodArray?new ZodArray({...Ws._def,type:deepPartialify(Ws.element)}):Ws instanceof ZodOptional?ZodOptional.create(deepPartialify(Ws.unwrap())):Ws instanceof ZodNullable?ZodNullable.create(deepPartialify(Ws.unwrap())):Ws instanceof ZodTuple?ZodTuple.create(Ws.items.map(ws=>deepPartialify(ws))):Ws}class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const ws=this._def.shape(),oi=util.objectKeys(ws);return this._cached={shape:ws,keys:oi}}_parse(ws){if(this._getType(ws)!==ZodParsedType.object){const di=this._getOrReturnCtx(ws);return addIssueToContext(di,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:di.parsedType}),INVALID}const{status:si,ctx:ii}=this._processInputParams(ws),{shape:ai,keys:li}=this._getCached(),ci=[];if(!(this._def.catchall instanceof ZodNever&&this._def.unknownKeys==="strip"))for(const di in ii.data)li.includes(di)||ci.push(di);const ui=[];for(const di of li){const hi=ai[di],pi=ii.data[di];ui.push({key:{status:"valid",value:di},value:hi._parse(new ParseInputLazyPath(ii,pi,ii.path,di)),alwaysSet:di in ii.data})}if(this._def.catchall instanceof ZodNever){const di=this._def.unknownKeys;if(di==="passthrough")for(const hi of ci)ui.push({key:{status:"valid",value:hi},value:{status:"valid",value:ii.data[hi]}});else if(di==="strict")ci.length>0&&(addIssueToContext(ii,{code:ZodIssueCode.unrecognized_keys,keys:ci}),si.dirty());else if(di!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const di=this._def.catchall;for(const hi of ci){const pi=ii.data[hi];ui.push({key:{status:"valid",value:hi},value:di._parse(new ParseInputLazyPath(ii,pi,ii.path,hi)),alwaysSet:hi in ii.data})}}return ii.common.async?Promise.resolve().then(async()=>{const di=[];for(const hi of ui){const pi=await hi.key,ha=await hi.value;di.push({key:pi,value:ha,alwaysSet:hi.alwaysSet})}return di}).then(di=>ParseStatus.mergeObjectSync(si,di)):ParseStatus.mergeObjectSync(si,ui)}get shape(){return this._def.shape()}strict(ws){return errorUtil.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...ws!==void 0?{errorMap:(oi,si)=>{var ii,ai,li,ci;const ui=(li=(ai=(ii=this._def).errorMap)===null||ai===void 0?void 0:ai.call(ii,oi,si).message)!==null&&li!==void 0?li:si.defaultError;return oi.code==="unrecognized_keys"?{message:(ci=errorUtil.errToObj(ws).message)!==null&&ci!==void 0?ci:ui}:{message:ui}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(ws){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...ws})})}merge(ws){return new ZodObject({unknownKeys:ws._def.unknownKeys,catchall:ws._def.catchall,shape:()=>({...this._def.shape(),...ws._def.shape()}),typeName:ZodFirstPartyTypeKind.ZodObject})}setKey(ws,oi){return this.augment({[ws]:oi})}catchall(ws){return new ZodObject({...this._def,catchall:ws})}pick(ws){const oi={};return util.objectKeys(ws).forEach(si=>{ws[si]&&this.shape[si]&&(oi[si]=this.shape[si])}),new ZodObject({...this._def,shape:()=>oi})}omit(ws){const oi={};return util.objectKeys(this.shape).forEach(si=>{ws[si]||(oi[si]=this.shape[si])}),new ZodObject({...this._def,shape:()=>oi})}deepPartial(){return deepPartialify(this)}partial(ws){const oi={};return util.objectKeys(this.shape).forEach(si=>{const ii=this.shape[si];ws&&!ws[si]?oi[si]=ii:oi[si]=ii.optional()}),new ZodObject({...this._def,shape:()=>oi})}required(ws){const oi={};return util.objectKeys(this.shape).forEach(si=>{if(ws&&!ws[si])oi[si]=this.shape[si];else{let ai=this.shape[si];for(;ai instanceof ZodOptional;)ai=ai._def.innerType;oi[si]=ai}}),new ZodObject({...this._def,shape:()=>oi})}keyof(){return createZodEnum(util.objectKeys(this.shape))}}ZodObject.create=(Ws,ws)=>new ZodObject({shape:()=>Ws,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(ws)});ZodObject.strictCreate=(Ws,ws)=>new ZodObject({shape:()=>Ws,unknownKeys:"strict",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(ws)});ZodObject.lazycreate=(Ws,ws)=>new ZodObject({shape:Ws,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(ws)});class ZodUnion extends ZodType{_parse(ws){const{ctx:oi}=this._processInputParams(ws),si=this._def.options;function ii(ai){for(const ci of ai)if(ci.result.status==="valid")return ci.result;for(const ci of ai)if(ci.result.status==="dirty")return oi.common.issues.push(...ci.ctx.common.issues),ci.result;const li=ai.map(ci=>new ZodError(ci.ctx.common.issues));return addIssueToContext(oi,{code:ZodIssueCode.invalid_union,unionErrors:li}),INVALID}if(oi.common.async)return Promise.all(si.map(async ai=>{const li={...oi,common:{...oi.common,issues:[]},parent:null};return{result:await ai._parseAsync({data:oi.data,path:oi.path,parent:li}),ctx:li}})).then(ii);{let ai;const li=[];for(const ui of si){const di={...oi,common:{...oi.common,issues:[]},parent:null},hi=ui._parseSync({data:oi.data,path:oi.path,parent:di});if(hi.status==="valid")return hi;hi.status==="dirty"&&!ai&&(ai={result:hi,ctx:di}),di.common.issues.length&&li.push(di.common.issues)}if(ai)return oi.common.issues.push(...ai.ctx.common.issues),ai.result;const ci=li.map(ui=>new ZodError(ui));return addIssueToContext(oi,{code:ZodIssueCode.invalid_union,unionErrors:ci}),INVALID}}get options(){return this._def.options}}ZodUnion.create=(Ws,ws)=>new ZodUnion({options:Ws,typeName:ZodFirstPartyTypeKind.ZodUnion,...processCreateParams(ws)});const getDiscriminator=Ws=>Ws instanceof ZodLazy?getDiscriminator(Ws.schema):Ws instanceof ZodEffects?getDiscriminator(Ws.innerType()):Ws instanceof ZodLiteral?[Ws.value]:Ws instanceof ZodEnum?Ws.options:Ws instanceof ZodNativeEnum?util.objectValues(Ws.enum):Ws instanceof ZodDefault?getDiscriminator(Ws._def.innerType):Ws instanceof ZodUndefined?[void 0]:Ws instanceof ZodNull?[null]:Ws instanceof ZodOptional?[void 0,...getDiscriminator(Ws.unwrap())]:Ws instanceof ZodNullable?[null,...getDiscriminator(Ws.unwrap())]:Ws instanceof ZodBranded||Ws instanceof ZodReadonly?getDiscriminator(Ws.unwrap()):Ws instanceof ZodCatch?getDiscriminator(Ws._def.innerType):[];class ZodDiscriminatedUnion extends ZodType{_parse(ws){const{ctx:oi}=this._processInputParams(ws);if(oi.parsedType!==ZodParsedType.object)return addIssueToContext(oi,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:oi.parsedType}),INVALID;const si=this.discriminator,ii=oi.data[si],ai=this.optionsMap.get(ii);return ai?oi.common.async?ai._parseAsync({data:oi.data,path:oi.path,parent:oi}):ai._parseSync({data:oi.data,path:oi.path,parent:oi}):(addIssueToContext(oi,{code:ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[si]}),INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(ws,oi,si){const ii=new Map;for(const ai of oi){const li=getDiscriminator(ai.shape[ws]);if(!li.length)throw new Error(`A discriminator value for key \`${ws}\` could not be extracted from all schema options`);for(const ci of li){if(ii.has(ci))throw new Error(`Discriminator property ${String(ws)} has duplicate value ${String(ci)}`);ii.set(ci,ai)}}return new ZodDiscriminatedUnion({typeName:ZodFirstPartyTypeKind.ZodDiscriminatedUnion,discriminator:ws,options:oi,optionsMap:ii,...processCreateParams(si)})}}function mergeValues(Ws,ws){const oi=getParsedType(Ws),si=getParsedType(ws);if(Ws===ws)return{valid:!0,data:Ws};if(oi===ZodParsedType.object&&si===ZodParsedType.object){const ii=util.objectKeys(ws),ai=util.objectKeys(Ws).filter(ci=>ii.indexOf(ci)!==-1),li={...Ws,...ws};for(const ci of ai){const ui=mergeValues(Ws[ci],ws[ci]);if(!ui.valid)return{valid:!1};li[ci]=ui.data}return{valid:!0,data:li}}else if(oi===ZodParsedType.array&&si===ZodParsedType.array){if(Ws.length!==ws.length)return{valid:!1};const ii=[];for(let ai=0;ai<Ws.length;ai++){const li=Ws[ai],ci=ws[ai],ui=mergeValues(li,ci);if(!ui.valid)return{valid:!1};ii.push(ui.data)}return{valid:!0,data:ii}}else return oi===ZodParsedType.date&&si===ZodParsedType.date&&+Ws==+ws?{valid:!0,data:Ws}:{valid:!1}}class ZodIntersection extends ZodType{_parse(ws){const{status:oi,ctx:si}=this._processInputParams(ws),ii=(ai,li)=>{if(isAborted(ai)||isAborted(li))return INVALID;const ci=mergeValues(ai.value,li.value);return ci.valid?((isDirty(ai)||isDirty(li))&&oi.dirty(),{status:oi.value,value:ci.data}):(addIssueToContext(si,{code:ZodIssueCode.invalid_intersection_types}),INVALID)};return si.common.async?Promise.all([this._def.left._parseAsync({data:si.data,path:si.path,parent:si}),this._def.right._parseAsync({data:si.data,path:si.path,parent:si})]).then(([ai,li])=>ii(ai,li)):ii(this._def.left._parseSync({data:si.data,path:si.path,parent:si}),this._def.right._parseSync({data:si.data,path:si.path,parent:si}))}}ZodIntersection.create=(Ws,ws,oi)=>new ZodIntersection({left:Ws,right:ws,typeName:ZodFirstPartyTypeKind.ZodIntersection,...processCreateParams(oi)});class ZodTuple extends ZodType{_parse(ws){const{status:oi,ctx:si}=this._processInputParams(ws);if(si.parsedType!==ZodParsedType.array)return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:si.parsedType}),INVALID;if(si.data.length<this._def.items.length)return addIssueToContext(si,{code:ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),INVALID;!this._def.rest&&si.data.length>this._def.items.length&&(addIssueToContext(si,{code:ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),oi.dirty());const ai=[...si.data].map((li,ci)=>{const ui=this._def.items[ci]||this._def.rest;return ui?ui._parse(new ParseInputLazyPath(si,li,si.path,ci)):null}).filter(li=>!!li);return si.common.async?Promise.all(ai).then(li=>ParseStatus.mergeArray(oi,li)):ParseStatus.mergeArray(oi,ai)}get items(){return this._def.items}rest(ws){return new ZodTuple({...this._def,rest:ws})}}ZodTuple.create=(Ws,ws)=>{if(!Array.isArray(Ws))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:Ws,typeName:ZodFirstPartyTypeKind.ZodTuple,rest:null,...processCreateParams(ws)})};class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(ws){const{status:oi,ctx:si}=this._processInputParams(ws);if(si.parsedType!==ZodParsedType.object)return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:si.parsedType}),INVALID;const ii=[],ai=this._def.keyType,li=this._def.valueType;for(const ci in si.data)ii.push({key:ai._parse(new ParseInputLazyPath(si,ci,si.path,ci)),value:li._parse(new ParseInputLazyPath(si,si.data[ci],si.path,ci)),alwaysSet:ci in si.data});return si.common.async?ParseStatus.mergeObjectAsync(oi,ii):ParseStatus.mergeObjectSync(oi,ii)}get element(){return this._def.valueType}static create(ws,oi,si){return oi instanceof ZodType?new ZodRecord({keyType:ws,valueType:oi,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(si)}):new ZodRecord({keyType:ZodString.create(),valueType:ws,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(oi)})}}class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(ws){const{status:oi,ctx:si}=this._processInputParams(ws);if(si.parsedType!==ZodParsedType.map)return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.map,received:si.parsedType}),INVALID;const ii=this._def.keyType,ai=this._def.valueType,li=[...si.data.entries()].map(([ci,ui],di)=>({key:ii._parse(new ParseInputLazyPath(si,ci,si.path,[di,"key"])),value:ai._parse(new ParseInputLazyPath(si,ui,si.path,[di,"value"]))}));if(si.common.async){const ci=new Map;return Promise.resolve().then(async()=>{for(const ui of li){const di=await ui.key,hi=await ui.value;if(di.status==="aborted"||hi.status==="aborted")return INVALID;(di.status==="dirty"||hi.status==="dirty")&&oi.dirty(),ci.set(di.value,hi.value)}return{status:oi.value,value:ci}})}else{const ci=new Map;for(const ui of li){const di=ui.key,hi=ui.value;if(di.status==="aborted"||hi.status==="aborted")return INVALID;(di.status==="dirty"||hi.status==="dirty")&&oi.dirty(),ci.set(di.value,hi.value)}return{status:oi.value,value:ci}}}}ZodMap.create=(Ws,ws,oi)=>new ZodMap({valueType:ws,keyType:Ws,typeName:ZodFirstPartyTypeKind.ZodMap,...processCreateParams(oi)});class ZodSet extends ZodType{_parse(ws){const{status:oi,ctx:si}=this._processInputParams(ws);if(si.parsedType!==ZodParsedType.set)return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.set,received:si.parsedType}),INVALID;const ii=this._def;ii.minSize!==null&&si.data.size<ii.minSize.value&&(addIssueToContext(si,{code:ZodIssueCode.too_small,minimum:ii.minSize.value,type:"set",inclusive:!0,exact:!1,message:ii.minSize.message}),oi.dirty()),ii.maxSize!==null&&si.data.size>ii.maxSize.value&&(addIssueToContext(si,{code:ZodIssueCode.too_big,maximum:ii.maxSize.value,type:"set",inclusive:!0,exact:!1,message:ii.maxSize.message}),oi.dirty());const ai=this._def.valueType;function li(ui){const di=new Set;for(const hi of ui){if(hi.status==="aborted")return INVALID;hi.status==="dirty"&&oi.dirty(),di.add(hi.value)}return{status:oi.value,value:di}}const ci=[...si.data.values()].map((ui,di)=>ai._parse(new ParseInputLazyPath(si,ui,si.path,di)));return si.common.async?Promise.all(ci).then(ui=>li(ui)):li(ci)}min(ws,oi){return new ZodSet({...this._def,minSize:{value:ws,message:errorUtil.toString(oi)}})}max(ws,oi){return new ZodSet({...this._def,maxSize:{value:ws,message:errorUtil.toString(oi)}})}size(ws,oi){return this.min(ws,oi).max(ws,oi)}nonempty(ws){return this.min(1,ws)}}ZodSet.create=(Ws,ws)=>new ZodSet({valueType:Ws,minSize:null,maxSize:null,typeName:ZodFirstPartyTypeKind.ZodSet,...processCreateParams(ws)});class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(ws){const{ctx:oi}=this._processInputParams(ws);if(oi.parsedType!==ZodParsedType.function)return addIssueToContext(oi,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.function,received:oi.parsedType}),INVALID;function si(ci,ui){return makeIssue({data:ci,path:oi.path,errorMaps:[oi.common.contextualErrorMap,oi.schemaErrorMap,getErrorMap(),errorMap].filter(di=>!!di),issueData:{code:ZodIssueCode.invalid_arguments,argumentsError:ui}})}function ii(ci,ui){return makeIssue({data:ci,path:oi.path,errorMaps:[oi.common.contextualErrorMap,oi.schemaErrorMap,getErrorMap(),errorMap].filter(di=>!!di),issueData:{code:ZodIssueCode.invalid_return_type,returnTypeError:ui}})}const ai={errorMap:oi.common.contextualErrorMap},li=oi.data;if(this._def.returns instanceof ZodPromise){const ci=this;return OK(async function(...ui){const di=new ZodError([]),hi=await ci._def.args.parseAsync(ui,ai).catch(ga=>{throw di.addIssue(si(ui,ga)),di}),pi=await Reflect.apply(li,this,hi);return await ci._def.returns._def.type.parseAsync(pi,ai).catch(ga=>{throw di.addIssue(ii(pi,ga)),di})})}else{const ci=this;return OK(function(...ui){const di=ci._def.args.safeParse(ui,ai);if(!di.success)throw new ZodError([si(ui,di.error)]);const hi=Reflect.apply(li,this,di.data),pi=ci._def.returns.safeParse(hi,ai);if(!pi.success)throw new ZodError([ii(hi,pi.error)]);return pi.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...ws){return new ZodFunction({...this._def,args:ZodTuple.create(ws).rest(ZodUnknown.create())})}returns(ws){return new ZodFunction({...this._def,returns:ws})}implement(ws){return this.parse(ws)}strictImplement(ws){return this.parse(ws)}static create(ws,oi,si){return new ZodFunction({args:ws||ZodTuple.create([]).rest(ZodUnknown.create()),returns:oi||ZodUnknown.create(),typeName:ZodFirstPartyTypeKind.ZodFunction,...processCreateParams(si)})}}class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(ws){const{ctx:oi}=this._processInputParams(ws);return this._def.getter()._parse({data:oi.data,path:oi.path,parent:oi})}}ZodLazy.create=(Ws,ws)=>new ZodLazy({getter:Ws,typeName:ZodFirstPartyTypeKind.ZodLazy,...processCreateParams(ws)});class ZodLiteral extends ZodType{_parse(ws){if(ws.data!==this._def.value){const oi=this._getOrReturnCtx(ws);return addIssueToContext(oi,{received:oi.data,code:ZodIssueCode.invalid_literal,expected:this._def.value}),INVALID}return{status:"valid",value:ws.data}}get value(){return this._def.value}}ZodLiteral.create=(Ws,ws)=>new ZodLiteral({value:Ws,typeName:ZodFirstPartyTypeKind.ZodLiteral,...processCreateParams(ws)});function createZodEnum(Ws,ws){return new ZodEnum({values:Ws,typeName:ZodFirstPartyTypeKind.ZodEnum,...processCreateParams(ws)})}class ZodEnum extends ZodType{constructor(){super(...arguments),_ZodEnum_cache.set(this,void 0)}_parse(ws){if(typeof ws.data!="string"){const oi=this._getOrReturnCtx(ws),si=this._def.values;return addIssueToContext(oi,{expected:util.joinValues(si),received:oi.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodEnum_cache)||__classPrivateFieldSet(this,_ZodEnum_cache,new Set(this._def.values)),!__classPrivateFieldGet(this,_ZodEnum_cache).has(ws.data)){const oi=this._getOrReturnCtx(ws),si=this._def.values;return addIssueToContext(oi,{received:oi.data,code:ZodIssueCode.invalid_enum_value,options:si}),INVALID}return OK(ws.data)}get options(){return this._def.values}get enum(){const ws={};for(const oi of this._def.values)ws[oi]=oi;return ws}get Values(){const ws={};for(const oi of this._def.values)ws[oi]=oi;return ws}get Enum(){const ws={};for(const oi of this._def.values)ws[oi]=oi;return ws}extract(ws,oi=this._def){return ZodEnum.create(ws,{...this._def,...oi})}exclude(ws,oi=this._def){return ZodEnum.create(this.options.filter(si=>!ws.includes(si)),{...this._def,...oi})}}_ZodEnum_cache=new WeakMap;ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{constructor(){super(...arguments),_ZodNativeEnum_cache.set(this,void 0)}_parse(ws){const oi=util.getValidEnumValues(this._def.values),si=this._getOrReturnCtx(ws);if(si.parsedType!==ZodParsedType.string&&si.parsedType!==ZodParsedType.number){const ii=util.objectValues(oi);return addIssueToContext(si,{expected:util.joinValues(ii),received:si.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodNativeEnum_cache)||__classPrivateFieldSet(this,_ZodNativeEnum_cache,new Set(util.getValidEnumValues(this._def.values))),!__classPrivateFieldGet(this,_ZodNativeEnum_cache).has(ws.data)){const ii=util.objectValues(oi);return addIssueToContext(si,{received:si.data,code:ZodIssueCode.invalid_enum_value,options:ii}),INVALID}return OK(ws.data)}get enum(){return this._def.values}}_ZodNativeEnum_cache=new WeakMap;ZodNativeEnum.create=(Ws,ws)=>new ZodNativeEnum({values:Ws,typeName:ZodFirstPartyTypeKind.ZodNativeEnum,...processCreateParams(ws)});class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(ws){const{ctx:oi}=this._processInputParams(ws);if(oi.parsedType!==ZodParsedType.promise&&oi.common.async===!1)return addIssueToContext(oi,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.promise,received:oi.parsedType}),INVALID;const si=oi.parsedType===ZodParsedType.promise?oi.data:Promise.resolve(oi.data);return OK(si.then(ii=>this._def.type.parseAsync(ii,{path:oi.path,errorMap:oi.common.contextualErrorMap})))}}ZodPromise.create=(Ws,ws)=>new ZodPromise({type:Ws,typeName:ZodFirstPartyTypeKind.ZodPromise,...processCreateParams(ws)});class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(ws){const{status:oi,ctx:si}=this._processInputParams(ws),ii=this._def.effect||null,ai={addIssue:li=>{addIssueToContext(si,li),li.fatal?oi.abort():oi.dirty()},get path(){return si.path}};if(ai.addIssue=ai.addIssue.bind(ai),ii.type==="preprocess"){const li=ii.transform(si.data,ai);if(si.common.async)return Promise.resolve(li).then(async ci=>{if(oi.value==="aborted")return INVALID;const ui=await this._def.schema._parseAsync({data:ci,path:si.path,parent:si});return ui.status==="aborted"?INVALID:ui.status==="dirty"||oi.value==="dirty"?DIRTY(ui.value):ui});{if(oi.value==="aborted")return INVALID;const ci=this._def.schema._parseSync({data:li,path:si.path,parent:si});return ci.status==="aborted"?INVALID:ci.status==="dirty"||oi.value==="dirty"?DIRTY(ci.value):ci}}if(ii.type==="refinement"){const li=ci=>{const ui=ii.refinement(ci,ai);if(si.common.async)return Promise.resolve(ui);if(ui instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return ci};if(si.common.async===!1){const ci=this._def.schema._parseSync({data:si.data,path:si.path,parent:si});return ci.status==="aborted"?INVALID:(ci.status==="dirty"&&oi.dirty(),li(ci.value),{status:oi.value,value:ci.value})}else return this._def.schema._parseAsync({data:si.data,path:si.path,parent:si}).then(ci=>ci.status==="aborted"?INVALID:(ci.status==="dirty"&&oi.dirty(),li(ci.value).then(()=>({status:oi.value,value:ci.value}))))}if(ii.type==="transform")if(si.common.async===!1){const li=this._def.schema._parseSync({data:si.data,path:si.path,parent:si});if(!isValid(li))return li;const ci=ii.transform(li.value,ai);if(ci instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:oi.value,value:ci}}else return this._def.schema._parseAsync({data:si.data,path:si.path,parent:si}).then(li=>isValid(li)?Promise.resolve(ii.transform(li.value,ai)).then(ci=>({status:oi.value,value:ci})):li);util.assertNever(ii)}}ZodEffects.create=(Ws,ws,oi)=>new ZodEffects({schema:Ws,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:ws,...processCreateParams(oi)});ZodEffects.createWithPreprocess=(Ws,ws,oi)=>new ZodEffects({schema:ws,effect:{type:"preprocess",transform:Ws},typeName:ZodFirstPartyTypeKind.ZodEffects,...processCreateParams(oi)});class ZodOptional extends ZodType{_parse(ws){return this._getType(ws)===ZodParsedType.undefined?OK(void 0):this._def.innerType._parse(ws)}unwrap(){return this._def.innerType}}ZodOptional.create=(Ws,ws)=>new ZodOptional({innerType:Ws,typeName:ZodFirstPartyTypeKind.ZodOptional,...processCreateParams(ws)});class ZodNullable extends ZodType{_parse(ws){return this._getType(ws)===ZodParsedType.null?OK(null):this._def.innerType._parse(ws)}unwrap(){return this._def.innerType}}ZodNullable.create=(Ws,ws)=>new ZodNullable({innerType:Ws,typeName:ZodFirstPartyTypeKind.ZodNullable,...processCreateParams(ws)});class ZodDefault extends ZodType{_parse(ws){const{ctx:oi}=this._processInputParams(ws);let si=oi.data;return oi.parsedType===ZodParsedType.undefined&&(si=this._def.defaultValue()),this._def.innerType._parse({data:si,path:oi.path,parent:oi})}removeDefault(){return this._def.innerType}}ZodDefault.create=(Ws,ws)=>new ZodDefault({innerType:Ws,typeName:ZodFirstPartyTypeKind.ZodDefault,defaultValue:typeof ws.default=="function"?ws.default:()=>ws.default,...processCreateParams(ws)});class ZodCatch extends ZodType{_parse(ws){const{ctx:oi}=this._processInputParams(ws),si={...oi,common:{...oi.common,issues:[]}},ii=this._def.innerType._parse({data:si.data,path:si.path,parent:{...si}});return isAsync(ii)?ii.then(ai=>({status:"valid",value:ai.status==="valid"?ai.value:this._def.catchValue({get error(){return new ZodError(si.common.issues)},input:si.data})})):{status:"valid",value:ii.status==="valid"?ii.value:this._def.catchValue({get error(){return new ZodError(si.common.issues)},input:si.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(Ws,ws)=>new ZodCatch({innerType:Ws,typeName:ZodFirstPartyTypeKind.ZodCatch,catchValue:typeof ws.catch=="function"?ws.catch:()=>ws.catch,...processCreateParams(ws)});class ZodNaN extends ZodType{_parse(ws){if(this._getType(ws)!==ZodParsedType.nan){const si=this._getOrReturnCtx(ws);return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.nan,received:si.parsedType}),INVALID}return{status:"valid",value:ws.data}}}ZodNaN.create=Ws=>new ZodNaN({typeName:ZodFirstPartyTypeKind.ZodNaN,...processCreateParams(Ws)});const BRAND=Symbol("zod_brand");class ZodBranded extends ZodType{_parse(ws){const{ctx:oi}=this._processInputParams(ws),si=oi.data;return this._def.type._parse({data:si,path:oi.path,parent:oi})}unwrap(){return this._def.type}}class ZodPipeline extends ZodType{_parse(ws){const{status:oi,ctx:si}=this._processInputParams(ws);if(si.common.async)return(async()=>{const ai=await this._def.in._parseAsync({data:si.data,path:si.path,parent:si});return ai.status==="aborted"?INVALID:ai.status==="dirty"?(oi.dirty(),DIRTY(ai.value)):this._def.out._parseAsync({data:ai.value,path:si.path,parent:si})})();{const ii=this._def.in._parseSync({data:si.data,path:si.path,parent:si});return ii.status==="aborted"?INVALID:ii.status==="dirty"?(oi.dirty(),{status:"dirty",value:ii.value}):this._def.out._parseSync({data:ii.value,path:si.path,parent:si})}}static create(ws,oi){return new ZodPipeline({in:ws,out:oi,typeName:ZodFirstPartyTypeKind.ZodPipeline})}}class ZodReadonly extends ZodType{_parse(ws){const oi=this._def.innerType._parse(ws),si=ii=>(isValid(ii)&&(ii.value=Object.freeze(ii.value)),ii);return isAsync(oi)?oi.then(ii=>si(ii)):si(oi)}unwrap(){return this._def.innerType}}ZodReadonly.create=(Ws,ws)=>new ZodReadonly({innerType:Ws,typeName:ZodFirstPartyTypeKind.ZodReadonly,...processCreateParams(ws)});function custom(Ws,ws={},oi){return Ws?ZodAny.create().superRefine((si,ii)=>{var ai,li;if(!Ws(si)){const ci=typeof ws=="function"?ws(si):typeof ws=="string"?{message:ws}:ws,ui=(li=(ai=ci.fatal)!==null&&ai!==void 0?ai:oi)!==null&&li!==void 0?li:!0,di=typeof ci=="string"?{message:ci}:ci;ii.addIssue({code:"custom",...di,fatal:ui})}}):ZodAny.create()}const late={object:ZodObject.lazycreate};var ZodFirstPartyTypeKind;(function(Ws){Ws.ZodString="ZodString",Ws.ZodNumber="ZodNumber",Ws.ZodNaN="ZodNaN",Ws.ZodBigInt="ZodBigInt",Ws.ZodBoolean="ZodBoolean",Ws.ZodDate="ZodDate",Ws.ZodSymbol="ZodSymbol",Ws.ZodUndefined="ZodUndefined",Ws.ZodNull="ZodNull",Ws.ZodAny="ZodAny",Ws.ZodUnknown="ZodUnknown",Ws.ZodNever="ZodNever",Ws.ZodVoid="ZodVoid",Ws.ZodArray="ZodArray",Ws.ZodObject="ZodObject",Ws.ZodUnion="ZodUnion",Ws.ZodDiscriminatedUnion="ZodDiscriminatedUnion",Ws.ZodIntersection="ZodIntersection",Ws.ZodTuple="ZodTuple",Ws.ZodRecord="ZodRecord",Ws.ZodMap="ZodMap",Ws.ZodSet="ZodSet",Ws.ZodFunction="ZodFunction",Ws.ZodLazy="ZodLazy",Ws.ZodLiteral="ZodLiteral",Ws.ZodEnum="ZodEnum",Ws.ZodEffects="ZodEffects",Ws.ZodNativeEnum="ZodNativeEnum",Ws.ZodOptional="ZodOptional",Ws.ZodNullable="ZodNullable",Ws.ZodDefault="ZodDefault",Ws.ZodCatch="ZodCatch",Ws.ZodPromise="ZodPromise",Ws.ZodBranded="ZodBranded",Ws.ZodPipeline="ZodPipeline",Ws.ZodReadonly="ZodReadonly"})(ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={}));const instanceOfType=(Ws,ws={message:`Input not instance of ${Ws.name}`})=>custom(oi=>oi instanceof Ws,ws),stringType=ZodString.create,numberType=ZodNumber.create,nanType=ZodNaN.create,bigIntType=ZodBigInt.create,booleanType=ZodBoolean.create,dateType=ZodDate.create,symbolType=ZodSymbol.create,undefinedType=ZodUndefined.create,nullType=ZodNull.create,anyType=ZodAny.create,unknownType=ZodUnknown.create,neverType=ZodNever.create,voidType=ZodVoid.create,arrayType=ZodArray.create,objectType=ZodObject.create,strictObjectType=ZodObject.strictCreate,unionType=ZodUnion.create,discriminatedUnionType=ZodDiscriminatedUnion.create,intersectionType=ZodIntersection.create,tupleType=ZodTuple.create,recordType=ZodRecord.create,mapType=ZodMap.create,setType=ZodSet.create,functionType=ZodFunction.create,lazyType=ZodLazy.create,literalType=ZodLiteral.create,enumType=ZodEnum.create,nativeEnumType=ZodNativeEnum.create,promiseType=ZodPromise.create,effectsType=ZodEffects.create,optionalType=ZodOptional.create,nullableType=ZodNullable.create,preprocessType=ZodEffects.createWithPreprocess,pipelineType=ZodPipeline.create,ostring=()=>stringType().optional(),onumber=()=>numberType().optional(),oboolean=()=>booleanType().optional(),coerce={string:Ws=>ZodString.create({...Ws,coerce:!0}),number:Ws=>ZodNumber.create({...Ws,coerce:!0}),boolean:Ws=>ZodBoolean.create({...Ws,coerce:!0}),bigint:Ws=>ZodBigInt.create({...Ws,coerce:!0}),date:Ws=>ZodDate.create({...Ws,coerce:!0})},NEVER=INVALID;var z$4=Object.freeze({__proto__:null,defaultErrorMap:errorMap,setErrorMap,getErrorMap,makeIssue,EMPTY_PATH,addIssueToContext,ParseStatus,INVALID,DIRTY,OK,isAborted,isDirty,isValid,isAsync,get util(){return util},get objectUtil(){return objectUtil},ZodParsedType,getParsedType,ZodType,datetimeRegex,ZodString,ZodNumber,ZodBigInt,ZodBoolean,ZodDate,ZodSymbol,ZodUndefined,ZodNull,ZodAny,ZodUnknown,ZodNever,ZodVoid,ZodArray,ZodObject,ZodUnion,ZodDiscriminatedUnion,ZodIntersection,ZodTuple,ZodRecord,ZodMap,ZodSet,ZodFunction,ZodLazy,ZodLiteral,ZodEnum,ZodNativeEnum,ZodPromise,ZodEffects,ZodTransformer:ZodEffects,ZodOptional,ZodNullable,ZodDefault,ZodCatch,ZodNaN,BRAND,ZodBranded,ZodPipeline,ZodReadonly,custom,Schema:ZodType,ZodSchema:ZodType,late,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},coerce,any:anyType,array:arrayType,bigint:bigIntType,boolean:booleanType,date:dateType,discriminatedUnion:discriminatedUnionType,effect:effectsType,enum:enumType,function:functionType,instanceof:instanceOfType,intersection:intersectionType,lazy:lazyType,literal:literalType,map:mapType,nan:nanType,nativeEnum:nativeEnumType,never:neverType,null:nullType,nullable:nullableType,number:numberType,object:objectType,oboolean,onumber,optional:optionalType,ostring,pipeline:pipelineType,preprocess:preprocessType,promise:promiseType,record:recordType,set:setType,strictObject:strictObjectType,string:stringType,symbol:symbolType,transformer:effectsType,tuple:tupleType,undefined:undefinedType,union:unionType,unknown:unknownType,void:voidType,NEVER,ZodIssueCode,quotelessJson,ZodError});const type$c="number",typedef$b="scalar Amount_Tokens",schema$b=z$4.number(),stringSchema$b="z.number()",amountTokensValidation=Ws=>{if(typeof Ws!="number")throw new GraphQLError$1(`Value is not number: ${JSON.stringify(Ws)}`);if(!Number.isFinite(Ws))throw new GraphQLError$1(`Value is not a finite number: ${Ws}`);const ws=schema$b.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$c={name:"Amount_Tokens",description:"A custom scalar that represents an amount of tokens",serialize:amountTokensValidation,parseValue:amountTokensValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.FLOAT)throw new GraphQLError$1("some error message",{nodes:Ws});const ws=parseFloat(Ws.value);return amountTokensValidation(ws)}},scalar$b=new GraphQLScalarType$1(config$c),AmountTokens=Object.freeze(Object.defineProperty({__proto__:null,config:config$c,scalar:scalar$b,schema:schema$b,stringSchema:stringSchema$b,type:type$c,typedef:typedef$b},Symbol.toStringTag,{value:"Module"})),type$b="string",typedef$a="scalar EthereumAddress",schema$a=z$4.string().regex(/^0x[a-fA-F0-9]{40}$/,{message:"Invalid Ethereum address format"}),stringSchema$a="z.string().regex(/^0x[a-fA-F0-9]{40}$/, { message: 'Invalid Ethereum address format' })",addressValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not string: ${JSON.stringify(Ws)}`);const ws=schema$a.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$b={name:"EthereumAddress",description:'A custom scalar representing an Ethereum address, validated as a 42-character hexadecimal string prefixed with "0x"',serialize:addressValidation,parseValue:addressValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1("some error message",{nodes:Ws});return addressValidation(Ws.value)}},scalar$a=new GraphQLScalarType$1(config$b),EthereumAddress=Object.freeze(Object.defineProperty({__proto__:null,config:config$b,scalar:scalar$a,schema:schema$a,stringSchema:stringSchema$a,type:type$b,typedef:typedef$a},Symbol.toStringTag,{value:"Module"})),type$a="number",typedef$9="scalar Amount_Percentage",schema$9=z$4.number(),stringSchema$9="z.number()",amountPercentageValidation=Ws=>{if(typeof Ws!="number")throw new GraphQLError$1(`Value is not number: ${JSON.stringify(Ws)}`);if(!Number.isFinite(Ws))throw new GraphQLError$1(`Value is not a finite number: ${Ws}`);const ws=schema$9.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$a={name:"Amount_Percentage",description:"",serialize:amountPercentageValidation,parseValue:amountPercentageValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.FLOAT)throw new GraphQLError$1("some error message",{nodes:Ws});const ws=parseFloat(Ws.value);return amountPercentageValidation(ws)}},scalar$9=new GraphQLScalarType$1(config$a),AmountPercentage=Object.freeze(Object.defineProperty({__proto__:null,config:config$a,scalar:scalar$9,schema:schema$9,stringSchema:stringSchema$9,type:type$a,typedef:typedef$9},Symbol.toStringTag,{value:"Module"})),type$9="string",typedef$8="scalar EmailAddress",schema$8=z$4.string().email(),stringSchema$8="z.string().email()",emailValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not string: ${JSON.stringify(Ws)}`);const ws=schema$8.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$9={name:"EmailAddress",description:"A field whose value conforms to the standard internet email address format as specified in RFC822: https://www.w3.org/Protocols/rfc822/.",serialize:emailValidation,parseValue:emailValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1(`Can only validate strings as email addresses but got a: ${Ws.kind}`,{nodes:Ws});return emailValidation(Ws.value)}},scalar$8=new GraphQLScalarType$1(config$9),EmailAddress=Object.freeze(Object.defineProperty({__proto__:null,config:config$9,scalar:scalar$8,schema:schema$8,stringSchema:stringSchema$8,type:type$9,typedef:typedef$8},Symbol.toStringTag,{value:"Module"})),type$8="string",typedef$7="scalar Date",schema$7=z$4.string().datetime(),stringSchema$7="z.string().datetime()",datetimeValidation$1=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not iso string: ${JSON.stringify(Ws)}`);const ws=schema$7.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$8={name:"Date",description:"A custom scalar that represents a datetime in ISO 8601 format (Time: 00:00:00)",serialize:datetimeValidation$1,parseValue:datetimeValidation$1,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1("Value is not an string",{nodes:Ws});return datetimeValidation$1(Ws.value)}},scalar$7=new GraphQLScalarType$1(config$8),Date$1=Object.freeze(Object.defineProperty({__proto__:null,config:config$8,scalar:scalar$7,schema:schema$7,stringSchema:stringSchema$7,type:type$8,typedef:typedef$7},Symbol.toStringTag,{value:"Module"})),type$7="string",typedef$6="scalar DateTime",schema$6=z$4.string().datetime(),stringSchema$6="z.string().datetime()",datetimeValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not iso string: ${JSON.stringify(Ws)}`);const ws=schema$6.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$7={name:"DateTime",description:"A custom scalar that represents a datetime in ISO 8601 format",serialize:datetimeValidation,parseValue:datetimeValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1("Value is not an string",{nodes:Ws});return datetimeValidation(Ws.value)}},scalar$6=new GraphQLScalarType$1(config$7),DateTime=Object.freeze(Object.defineProperty({__proto__:null,config:config$7,scalar:scalar$6,schema:schema$6,stringSchema:stringSchema$6,type:type$7,typedef:typedef$6},Symbol.toStringTag,{value:"Module"})),type$6="string",typedef$5="scalar URL",schema$5=z$4.string().url(),stringSchema$5="z.string().url()",urlValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not iso string: ${JSON.stringify(Ws)}`);const ws=schema$5.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$6={name:"URL",description:"A custom scalar that represents a URL string",serialize:urlValidation,parseValue:urlValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1("Value is not an string",{nodes:Ws});return urlValidation(Ws.value)}},scalar$5=new GraphQLScalarType$1(config$6),URL$1=Object.freeze(Object.defineProperty({__proto__:null,config:config$6,scalar:scalar$5,schema:schema$5,stringSchema:stringSchema$5,type:type$6,typedef:typedef$5},Symbol.toStringTag,{value:"Module"})),type$5="number",typedef$4="scalar Amount_Money",schema$4=z$4.number(),stringSchema$4="z.number()",amountMoneyValidation=Ws=>{if(typeof Ws!="number")throw new GraphQLError$1(`Value is not number: ${JSON.stringify(Ws)}`);if(!Number.isFinite(Ws))throw new GraphQLError$1(`Value is not a finite number: ${Ws}`);const ws=schema$4.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$5={name:"Amount_Money",description:"A custom scalar that represents a monetary amount in a currency",serialize:amountMoneyValidation,parseValue:amountMoneyValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.FLOAT)throw new GraphQLError$1("Value is not a float type",{nodes:Ws});const ws=parseFloat(Ws.value);return amountMoneyValidation(ws)}},scalar$4=new GraphQLScalarType$1(config$5),AmountMoney=Object.freeze(Object.defineProperty({__proto__:null,config:config$5,scalar:scalar$4,schema:schema$4,stringSchema:stringSchema$4,type:type$5,typedef:typedef$4},Symbol.toStringTag,{value:"Module"})),type$4="string",typedef$3="scalar OLabel",schema$3=z$4.string(),stringSchema$3="z.string()",oLabelValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not string: ${JSON.stringify(Ws)}`);const ws=schema$3.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$4={name:"OLabel",description:"A custom scalar that represents a OLabel string",serialize:oLabelValidation,parseValue:oLabelValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1(`Value is not a valid string: ${Ws.kind}`,{nodes:Ws});return oLabelValidation(Ws.value)}},scalar$3=new GraphQLScalarType$1(config$4),OLabel=Object.freeze(Object.defineProperty({__proto__:null,config:config$4,scalar:scalar$3,schema:schema$3,stringSchema:stringSchema$3,type:type$4,typedef:typedef$3},Symbol.toStringTag,{value:"Module"})),type$3="string",typedef$2="scalar Currency",schema$2=z$4.string(),stringSchema$2="z.string()",currencyValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not string: ${JSON.stringify(Ws)}`);const ws=schema$2.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$3={name:"Currency",description:"A custom scalar that represents a Currency Code string",serialize:currencyValidation,parseValue:currencyValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1(`Value is not a valid string: ${Ws.kind}`,{nodes:Ws});return currencyValidation(Ws.value)}},scalar$2=new GraphQLScalarType$1(config$3),Currency=Object.freeze(Object.defineProperty({__proto__:null,config:config$3,scalar:scalar$2,schema:schema$2,stringSchema:stringSchema$2,type:type$3,typedef:typedef$2},Symbol.toStringTag,{value:"Module"})),type$2="string",typedef$1="scalar PHID",schema$1=z$4.string(),stringSchema$1="z.string()",phidlValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not string: ${JSON.stringify(Ws)}`);const ws=schema$1.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$2={name:"PHID",description:"A custom scalar that represents a PowerhouseID string",serialize:phidlValidation,parseValue:phidlValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1(`Value is not a valid string: ${Ws.kind}`,{nodes:Ws});return phidlValidation(Ws.value)}},scalar$1=new GraphQLScalarType$1(config$2),PHID=Object.freeze(Object.defineProperty({__proto__:null,config:config$2,scalar:scalar$1,schema:schema$1,stringSchema:stringSchema$1,type:type$2,typedef:typedef$1},Symbol.toStringTag,{value:"Module"})),type$1="string",typedef="scalar OID",schema=z$4.string(),stringSchema="z.string()",oIdValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not string: ${JSON.stringify(Ws)}`);const ws=schema.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$1={name:"OID",description:"A custom scalar that represents a OID string",serialize:oIdValidation,parseValue:oIdValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1(`Value is not a valid string: ${Ws.kind}`,{nodes:Ws});return oIdValidation(Ws.value)}},scalar=new GraphQLScalarType$1(config$1),OID=Object.freeze(Object.defineProperty({__proto__:null,config:config$1,scalar,schema,stringSchema,type:type$1,typedef},Symbol.toStringTag,{value:"Module"})),resolvers={AmountTokens:scalar$b,EthereumAddress:scalar$a,AmountPercentage:scalar$9,EmailAddress:scalar$8,Date:scalar$7,DateTime:scalar$6,URL:scalar$5,AmountMoney:scalar$4,OLabel:scalar$3,Currency:scalar$2,PHID:scalar$1,OID:scalar},typeDefs=[typedef$b,typedef$a,typedef$9,typedef$8,typedef$7,typedef$6,typedef$5,typedef$4,typedef$3,typedef$2,typedef$1,typedef],generatorTypeDefs={[config$c.name]:type$c,[config$b.name]:type$b,[config$9.name]:type$9,[config$a.name]:type$a,[config$8.name]:type$8,[config$7.name]:type$7,[config$6.name]:type$6,[config$5.name]:type$5,[config$4.name]:type$4,[config$3.name]:type$3,[config$2.name]:type$2,[config$1.name]:type$1},validationSchema={[config$c.name]:stringSchema$b,[config$b.name]:stringSchema$a,[config$9.name]:stringSchema$8,[config$a.name]:stringSchema$9,[config$8.name]:stringSchema$7,[config$7.name]:stringSchema$6,[config$6.name]:stringSchema$5,[config$5.name]:stringSchema$4,[config$4.name]:stringSchema$3,[config$3.name]:stringSchema$2,[config$2.name]:stringSchema$1,[config$1.name]:stringSchema},customScalars=Object.freeze(Object.defineProperty({__proto__:null,AmountMoney,AmountPercentage,AmountTokens,Currency,DateScalar:Date$1,DateTime,EmailAddress,EthereumAddress,OID,OLabel,PHID,URLScalar:URL$1,generatorTypeDefs,resolvers,typeDefs,validationSchema},Symbol.toStringTag,{value:"Module"}));var define_process_env_default={};function DocumentEditor(Ws){const ws=["document-editor",`${Ws.mode}-mode`];return jsx("div",{className:ws.join(" "),children:Ws.children})}function EditorToolbar(Ws){const ws=Ws.left||[],oi=Ws.center||[],si=Ws.right||[];return jsxs("div",{className:"editor-toolbar",children:[jsx("div",{className:"editor-toolbar--column editor-toolbar--left",children:ws}),jsx("div",{className:"editor-toolbar--column editor-toolbar--center",children:oi}),jsx("div",{className:"editor-toolbar--column editor-toolbar--right",children:si})]})}function EditorWorksheet(Ws){return jsx("div",{className:"editor-worksheet",children:jsx("div",{className:"editor-worksheet--page",children:Ws.children})})}const colorScheme$1={light:{color:"#222222",bgColor:"#FFFFFF",border:"#EEEEEE",shadow:"rgba(128,128,128,0.65)",inputColor:"#222222",inputBg:"#F6F6F6"},dark:{color:"#E6E6E6",bgColor:"#181818",border:"#181818",shadow:"rgba(0, 0, 0, 0.25)",inputColor:"#E6E6E6",inputBg:"#222222"}},typographySizes$1={huge:{fontSize:"36pt",fontWeight:"bold",padding:"6pt",margin:"30pt 0 0 0"},larger:{fontSize:"24pt",fontWeight:"bold",padding:"6pt",margin:"18pt 0 0 0"},large:{fontSize:"18pt",fontWeight:"bold",padding:"6pt",margin:"12pt 0 0 0"},medium:{fontSize:"11pt",fontWeight:"bold",padding:"6pt",margin:"5pt 0 0 0"},small:{fontSize:"10pt",fontWeight:"normal",padding:"6pt",margin:"0"},smaller:{fontSize:"9pt",fontWeight:"normal",padding:"6pt",margin:"0"},tiny:{fontSize:"8pt",fontWeight:"normal",padding:"6pt",margin:"0"}},inputStyle$1=(Ws="light",ws=!1)=>{const oi=colorScheme$1[Ws];return{width:"100%",border:"none",boxSizing:"border-box",backgroundColor:ws?oi.inputBg:oi.bgColor,outline:"none",color:oi.inputColor,resize:"none",fontFamily:"Roboto, sans-serif",overflow:"hidden",lineHeight:"1.5"}};function TextInput(Ws){const[ws,oi]=useState({value:Ws.value||"",hasFocus:!1,pressingEnter:!1});useEffect(()=>{oi(di=>di.value!==Ws.value?{...di,value:Ws.value||""}:di)},[Ws.value]);const si=di=>{di.key==="Enter"&&(oi({...ws,pressingEnter:!0}),di.preventDefault())},ii=di=>{di.key==="Enter"&&(di.target&&Ws.onSubmit&&Ws.onSubmit(di.target.value),Ws.clearOnSubmit?oi({...ws,value:"",pressingEnter:!1}):oi({...ws,pressingEnter:!1}),di.preventDefault()),(di.key==="Backspace"||di.key==="Delete")&&(Ws.onEmpty&&di.target.value.length<1&&Ws.onEmpty(Ws.id||""),di.preventDefault())},ai=di=>{if(!ws.pressingEnter){const hi=di.target;oi({...ws,value:hi.value}),hi.style.height="1px",hi.style.height=hi.scrollHeight+"px"}},li=di=>{var hi;if(oi(pi=>({...pi,hasFocus:di})),!di){const pi=((hi=ci.current)==null?void 0:hi.value)||"",ha=Ws.value||"";pi!=ha&&Ws.onSubmit&&(Ws.onSubmit(pi),Ws.clearOnSubmit&&oi(ga=>({...ga,value:""})))}},ci=useRef(null);useEffect(()=>{const di=()=>{ci.current&&(ci.current.style.height="1px",ci.current.style.height=ci.current.scrollHeight+"px")};return window.addEventListener("resize",di),di(),()=>{window.removeEventListener("resize",di)}});const ui={...inputStyle$1(Ws.theme,ws.hasFocus),...typographySizes$1[Ws.size||"small"]};return jsxs("div",{children:[Ws.horizontalLine?jsx("hr",{style:{borderColor:inputStyle$1(Ws.theme,!1).backgroundColor}},"line"):"",jsx("textarea",{autoFocus:Ws.autoFocus||!1,onBlur:di=>li(!1),onFocus:di=>li(!0),onInput:ai,onKeyDown:si,onKeyUp:ii,placeholder:Ws.placeholder||"",ref:ci,style:ui,value:ws.value},"text")]})}function ToolbarButton(Ws){const ws=Ws.onClick||(()=>{console.log("No onClick handler attached to button.")});return jsx("div",{className:"toolbar-button",onClick:ws,style:{userSelect:"none"},children:Ws.children})}var u$2=Object.defineProperty,a$1=(Ws,ws)=>u$2(Ws,"name",{value:ws,configurable:!0}),y$1=(()=>{let Ws;return typeof window<"u"?Ws=window:typeof globalThis<"u"?Ws=globalThis:typeof global<"u"?Ws=global:typeof self<"u"?Ws=self:Ws={},Ws})(),{LOGLEVEL:b$3}=y$1,t$5={trace:1,debug:2,info:3,warn:4,error:5,silent:10},L$2=b$3,i$4=t$5[L$2]||t$5.info,s$3={trace:a$1((Ws,...ws)=>{i$4<=t$5.trace&&console.trace(Ws,...ws)},"trace"),debug:a$1((Ws,...ws)=>{i$4<=t$5.debug&&console.debug(Ws,...ws)},"debug"),info:a$1((Ws,...ws)=>{i$4<=t$5.info&&console.info(Ws,...ws)},"info"),warn:a$1((Ws,...ws)=>{i$4<=t$5.warn&&console.warn(Ws,...ws)},"warn"),error:a$1((Ws,...ws)=>{i$4<=t$5.error&&console.error(Ws,...ws)},"error"),log:a$1((Ws,...ws)=>{i$4<t$5.silent&&console.log(Ws,...ws)},"log")},c$1=new Set,n$2=a$1(Ws=>(ws,...oi)=>{if(!c$1.has(ws))return c$1.add(ws),s$3[Ws](ws,...oi)},"once");n$2.clear=()=>c$1.clear();n$2.trace=n$2("trace");n$2.debug=n$2("debug");n$2.info=n$2("info");n$2.warn=n$2("warn");n$2.error=n$2("error");n$2.log=n$2("log");var m$2=n$2("warn"),r$3=a$1(Ws=>(...ws)=>{let oi=[];if(ws.length){let si=/<span\s+style=(['"])([^'"]*)\1\s*>/gi,ii=/<\/span>/gi,ai;for(oi.push(ws[0].replace(si,"%c").replace(ii,"%c"));ai=si.exec(ws[0]);)oi.push(ai[2]),oi.push("");for(let li=1;li<ws.length;li++)oi.push(ws[li])}s$3[Ws].apply(s$3,oi)},"pretty");r$3.trace=r$3("trace");r$3.debug=r$3("debug");r$3.info=r$3("info");r$3.warn=r$3("warn");r$3.error=r$3("error");var _$2=(Ws=>(Ws.CHANNEL_WS_DISCONNECT="channelWSDisconnect",Ws.CHANNEL_CREATED="channelCreated",Ws.CONFIG_ERROR="configError",Ws.STORY_INDEX_INVALIDATED="storyIndexInvalidated",Ws.STORY_SPECIFIED="storySpecified",Ws.SET_CONFIG="setConfig",Ws.SET_STORIES="setStories",Ws.SET_INDEX="setIndex",Ws.SET_CURRENT_STORY="setCurrentStory",Ws.CURRENT_STORY_WAS_SET="currentStoryWasSet",Ws.FORCE_RE_RENDER="forceReRender",Ws.FORCE_REMOUNT="forceRemount",Ws.PRELOAD_ENTRIES="preloadStories",Ws.STORY_PREPARED="storyPrepared",Ws.DOCS_PREPARED="docsPrepared",Ws.STORY_CHANGED="storyChanged",Ws.STORY_UNCHANGED="storyUnchanged",Ws.STORY_RENDERED="storyRendered",Ws.STORY_FINISHED="storyFinished",Ws.STORY_MISSING="storyMissing",Ws.STORY_ERRORED="storyErrored",Ws.STORY_THREW_EXCEPTION="storyThrewException",Ws.STORY_RENDER_PHASE_CHANGED="storyRenderPhaseChanged",Ws.PLAY_FUNCTION_THREW_EXCEPTION="playFunctionThrewException",Ws.UNHANDLED_ERRORS_WHILE_PLAYING="unhandledErrorsWhilePlaying",Ws.UPDATE_STORY_ARGS="updateStoryArgs",Ws.STORY_ARGS_UPDATED="storyArgsUpdated",Ws.RESET_STORY_ARGS="resetStoryArgs",Ws.SET_FILTER="setFilter",Ws.SET_GLOBALS="setGlobals",Ws.UPDATE_GLOBALS="updateGlobals",Ws.GLOBALS_UPDATED="globalsUpdated",Ws.REGISTER_SUBSCRIPTION="registerSubscription",Ws.PREVIEW_KEYDOWN="previewKeydown",Ws.PREVIEW_BUILDER_PROGRESS="preview_builder_progress",Ws.SELECT_STORY="selectStory",Ws.STORIES_COLLAPSE_ALL="storiesCollapseAll",Ws.STORIES_EXPAND_ALL="storiesExpandAll",Ws.DOCS_RENDERED="docsRendered",Ws.SHARED_STATE_CHANGED="sharedStateChanged",Ws.SHARED_STATE_SET="sharedStateSet",Ws.NAVIGATE_URL="navigateUrl",Ws.UPDATE_QUERY_PARAMS="updateQueryParams",Ws.REQUEST_WHATS_NEW_DATA="requestWhatsNewData",Ws.RESULT_WHATS_NEW_DATA="resultWhatsNewData",Ws.SET_WHATS_NEW_CACHE="setWhatsNewCache",Ws.TOGGLE_WHATS_NEW_NOTIFICATIONS="toggleWhatsNewNotifications",Ws.TELEMETRY_ERROR="telemetryError",Ws.FILE_COMPONENT_SEARCH_REQUEST="fileComponentSearchRequest",Ws.FILE_COMPONENT_SEARCH_RESPONSE="fileComponentSearchResponse",Ws.SAVE_STORY_REQUEST="saveStoryRequest",Ws.SAVE_STORY_RESPONSE="saveStoryResponse",Ws.ARGTYPES_INFO_REQUEST="argtypesInfoRequest",Ws.ARGTYPES_INFO_RESPONSE="argtypesInfoResponse",Ws.CREATE_NEW_STORYFILE_REQUEST="createNewStoryfileRequest",Ws.CREATE_NEW_STORYFILE_RESPONSE="createNewStoryfileResponse",Ws.TESTING_MODULE_CRASH_REPORT="testingModuleCrashReport",Ws.TESTING_MODULE_PROGRESS_REPORT="testingModuleProgressReport",Ws.TESTING_MODULE_RUN_REQUEST="testingModuleRunRequest",Ws.TESTING_MODULE_RUN_ALL_REQUEST="testingModuleRunAllRequest",Ws.TESTING_MODULE_CANCEL_TEST_RUN_REQUEST="testingModuleCancelTestRunRequest",Ws.TESTING_MODULE_CANCEL_TEST_RUN_RESPONSE="testingModuleCancelTestRunResponse",Ws.TESTING_MODULE_WATCH_MODE_REQUEST="testingModuleWatchModeRequest",Ws.TESTING_MODULE_CONFIG_CHANGE="testingModuleConfigChange",Ws))(_$2||{}),R$2=_$2,{CHANNEL_WS_DISCONNECT:S$2,CHANNEL_CREATED:T$1,CONFIG_ERROR:N$2,CREATE_NEW_STORYFILE_REQUEST:O$2,CREATE_NEW_STORYFILE_RESPONSE:A$1,CURRENT_STORY_WAS_SET:r$2,DOCS_PREPARED:D$3,DOCS_RENDERED:I$2,FILE_COMPONENT_SEARCH_REQUEST:C$4,FILE_COMPONENT_SEARCH_RESPONSE:o$2,FORCE_RE_RENDER:L$1,FORCE_REMOUNT:U$2,GLOBALS_UPDATED:P$3,NAVIGATE_URL:G$4,PLAY_FUNCTION_THREW_EXCEPTION:a,UNHANDLED_ERRORS_WHILE_PLAYING:Y$1,PRELOAD_ENTRIES:t$4,PREVIEW_BUILDER_PROGRESS:e,PREVIEW_KEYDOWN:H$2,REGISTER_SUBSCRIPTION:d,RESET_STORY_ARGS:W$3,SELECT_STORY:l$1,SET_CONFIG:i$3,SET_CURRENT_STORY:M$3,SET_FILTER:p$2,SET_GLOBALS:u$1,SET_INDEX:F$3,SET_STORIES:g,SHARED_STATE_CHANGED:s$2,SHARED_STATE_SET:y$2,STORIES_COLLAPSE_ALL:c,STORIES_EXPAND_ALL:h$1,STORY_ARGS_UPDATED:f$2,STORY_CHANGED:Q$1,STORY_ERRORED:x$3,STORY_INDEX_INVALIDATED:m$1,STORY_MISSING:V$1,STORY_PREPARED:w$2,STORY_RENDER_PHASE_CHANGED:B$2,STORY_RENDERED:X$2,STORY_FINISHED:q$3,STORY_SPECIFIED:b$2,STORY_THREW_EXCEPTION:K$2,STORY_UNCHANGED:n$1,UPDATE_GLOBALS:j$1,UPDATE_QUERY_PARAMS:k$4,UPDATE_STORY_ARGS:z$3,REQUEST_WHATS_NEW_DATA:J$3,RESULT_WHATS_NEW_DATA:Z$1,SET_WHATS_NEW_CACHE:$$2,TOGGLE_WHATS_NEW_NOTIFICATIONS:v$2,TELEMETRY_ERROR:EE,SAVE_STORY_REQUEST:_E,SAVE_STORY_RESPONSE:RE,ARGTYPES_INFO_REQUEST:SE,ARGTYPES_INFO_RESPONSE:TE,TESTING_MODULE_CRASH_REPORT:NE,TESTING_MODULE_PROGRESS_REPORT:OE,TESTING_MODULE_RUN_REQUEST:AE,TESTING_MODULE_RUN_ALL_REQUEST:rE,TESTING_MODULE_CANCEL_TEST_RUN_REQUEST:DE,TESTING_MODULE_CANCEL_TEST_RUN_RESPONSE:IE,TESTING_MODULE_WATCH_MODE_REQUEST:CE,TESTING_MODULE_CONFIG_CHANGE:oE}=_$2;const Qn$1=Object.freeze(Object.defineProperty({__proto__:null,ARGTYPES_INFO_REQUEST:SE,ARGTYPES_INFO_RESPONSE:TE,CHANNEL_CREATED:T$1,CHANNEL_WS_DISCONNECT:S$2,CONFIG_ERROR:N$2,CREATE_NEW_STORYFILE_REQUEST:O$2,CREATE_NEW_STORYFILE_RESPONSE:A$1,CURRENT_STORY_WAS_SET:r$2,DOCS_PREPARED:D$3,DOCS_RENDERED:I$2,FILE_COMPONENT_SEARCH_REQUEST:C$4,FILE_COMPONENT_SEARCH_RESPONSE:o$2,FORCE_REMOUNT:U$2,FORCE_RE_RENDER:L$1,GLOBALS_UPDATED:P$3,NAVIGATE_URL:G$4,PLAY_FUNCTION_THREW_EXCEPTION:a,PRELOAD_ENTRIES:t$4,PREVIEW_BUILDER_PROGRESS:e,PREVIEW_KEYDOWN:H$2,REGISTER_SUBSCRIPTION:d,REQUEST_WHATS_NEW_DATA:J$3,RESET_STORY_ARGS:W$3,RESULT_WHATS_NEW_DATA:Z$1,SAVE_STORY_REQUEST:_E,SAVE_STORY_RESPONSE:RE,SELECT_STORY:l$1,SET_CONFIG:i$3,SET_CURRENT_STORY:M$3,SET_FILTER:p$2,SET_GLOBALS:u$1,SET_INDEX:F$3,SET_STORIES:g,SET_WHATS_NEW_CACHE:$$2,SHARED_STATE_CHANGED:s$2,SHARED_STATE_SET:y$2,STORIES_COLLAPSE_ALL:c,STORIES_EXPAND_ALL:h$1,STORY_ARGS_UPDATED:f$2,STORY_CHANGED:Q$1,STORY_ERRORED:x$3,STORY_FINISHED:q$3,STORY_INDEX_INVALIDATED:m$1,STORY_MISSING:V$1,STORY_PREPARED:w$2,STORY_RENDERED:X$2,STORY_RENDER_PHASE_CHANGED:B$2,STORY_SPECIFIED:b$2,STORY_THREW_EXCEPTION:K$2,STORY_UNCHANGED:n$1,TELEMETRY_ERROR:EE,TESTING_MODULE_CANCEL_TEST_RUN_REQUEST:DE,TESTING_MODULE_CANCEL_TEST_RUN_RESPONSE:IE,TESTING_MODULE_CONFIG_CHANGE:oE,TESTING_MODULE_CRASH_REPORT:NE,TESTING_MODULE_PROGRESS_REPORT:OE,TESTING_MODULE_RUN_ALL_REQUEST:rE,TESTING_MODULE_RUN_REQUEST:AE,TESTING_MODULE_WATCH_MODE_REQUEST:CE,TOGGLE_WHATS_NEW_NOTIFICATIONS:v$2,UNHANDLED_ERRORS_WHILE_PLAYING:Y$1,UPDATE_GLOBALS:j$1,UPDATE_QUERY_PARAMS:k$4,UPDATE_STORY_ARGS:z$3,default:R$2},Symbol.toStringTag,{value:"Module"}));var Qt$1=Object.create,st=Object.defineProperty,te$1=Object.getOwnPropertyDescriptor,ee=Object.getOwnPropertyNames,re=Object.getPrototypeOf,ne$1=Object.prototype.hasOwnProperty,i$2=(Ws,ws)=>st(Ws,"name",{value:ws,configurable:!0}),U$1=(Ws=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(Ws,{get:(ws,oi)=>(typeof require<"u"?require:ws)[oi]}):Ws)(function(Ws){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+Ws+'" is not supported')}),oe$2=(Ws,ws)=>()=>(ws||Ws((ws={exports:{}}).exports,ws),ws.exports),ae=(Ws,ws,oi,si)=>{if(ws&&typeof ws=="object"||typeof ws=="function")for(let ii of ee(ws))!ne$1.call(Ws,ii)&&ii!==oi&&st(Ws,ii,{get:()=>ws[ii],enumerable:!(si=te$1(ws,ii))||si.enumerable});return Ws},ie$3=(Ws,ws,oi)=>(oi=Ws!=null?Qt$1(re(Ws)):{},ae(st(oi,"default",{value:Ws,enumerable:!0}),Ws)),At$1=oe$2((Ws,ws)=>{(function(oi){if(typeof Ws=="object"&&typeof ws<"u")ws.exports=oi();else if(typeof define=="function"&&define.amd)define([],oi);else{var si;typeof window<"u"?si=window:typeof global<"u"?si=global:typeof self<"u"?si=self:si=this,si.memoizerific=oi()}})(function(){return i$2(function oi(si,ii,ai){function li(di,hi){if(!ii[di]){if(!si[di]){var pi=typeof U$1=="function"&&U$1;if(!hi&&pi)return pi(di,!0);if(ci)return ci(di,!0);var ha=new Error("Cannot find module '"+di+"'");throw ha.code="MODULE_NOT_FOUND",ha}var ga=ii[di]={exports:{}};si[di][0].call(ga.exports,function(va){var ba=si[di][1][va];return li(ba||va)},ga,ga.exports,oi,si,ii,ai)}return ii[di].exports}i$2(li,"s");for(var ci=typeof U$1=="function"&&U$1,ui=0;ui<ai.length;ui++)li(ai[ui]);return li},"e")({1:[function(oi,si,ii){si.exports=function(ai){if(typeof Map!="function"||ai){var li=oi("./similar");return new li}else return new Map}},{"./similar":2}],2:[function(oi,si,ii){function ai(){return this.list=[],this.lastItem=void 0,this.size=0,this}i$2(ai,"Similar"),ai.prototype.get=function(li){var ci;if(this.lastItem&&this.isEqual(this.lastItem.key,li))return this.lastItem.val;if(ci=this.indexOf(li),ci>=0)return this.lastItem=this.list[ci],this.list[ci].val},ai.prototype.set=function(li,ci){var ui;return this.lastItem&&this.isEqual(this.lastItem.key,li)?(this.lastItem.val=ci,this):(ui=this.indexOf(li),ui>=0?(this.lastItem=this.list[ui],this.list[ui].val=ci,this):(this.lastItem={key:li,val:ci},this.list.push(this.lastItem),this.size++,this))},ai.prototype.delete=function(li){var ci;if(this.lastItem&&this.isEqual(this.lastItem.key,li)&&(this.lastItem=void 0),ci=this.indexOf(li),ci>=0)return this.size--,this.list.splice(ci,1)[0]},ai.prototype.has=function(li){var ci;return this.lastItem&&this.isEqual(this.lastItem.key,li)?!0:(ci=this.indexOf(li),ci>=0?(this.lastItem=this.list[ci],!0):!1)},ai.prototype.forEach=function(li,ci){var ui;for(ui=0;ui<this.size;ui++)li.call(ci||this,this.list[ui].val,this.list[ui].key,this)},ai.prototype.indexOf=function(li){var ci;for(ci=0;ci<this.size;ci++)if(this.isEqual(this.list[ci].key,li))return ci;return-1},ai.prototype.isEqual=function(li,ci){return li===ci||li!==li&&ci!==ci},si.exports=ai},{}],3:[function(oi,si,ii){var ai=oi("map-or-similar");si.exports=function(di){var hi=new ai(!1),pi=[];return function(ha){var ga=i$2(function(){var va=hi,ba,wa,xa=arguments.length-1,Ca=Array(xa+1),el=!0,ku;if((ga.numArgs||ga.numArgs===0)&&ga.numArgs!==xa+1)throw new Error("Memoizerific functions should always be called with the same number of arguments");for(ku=0;ku<xa;ku++){if(Ca[ku]={cacheItem:va,arg:arguments[ku]},va.has(arguments[ku])){va=va.get(arguments[ku]);continue}el=!1,ba=new ai(!1),va.set(arguments[ku],ba),va=ba}return el&&(va.has(arguments[xa])?wa=va.get(arguments[xa]):el=!1),el||(wa=ha.apply(null,arguments),va.set(arguments[xa],wa)),di>0&&(Ca[xa]={cacheItem:va,arg:arguments[xa]},el?li(pi,Ca):pi.push(Ca),pi.length>di&&ci(pi.shift())),ga.wasMemoized=el,ga.numArgs=xa+1,wa},"memoizerific");return ga.limit=di,ga.wasMemoized=!1,ga.cache=hi,ga.lru=pi,ga}};function li(di,hi){var pi=di.length,ha=hi.length,ga,va,ba;for(va=0;va<pi;va++){for(ga=!0,ba=0;ba<ha;ba++)if(!ui(di[va][ba].arg,hi[ba].arg)){ga=!1;break}if(ga)break}di.push(di.splice(va,1)[0])}i$2(li,"moveToMostRecentLru");function ci(di){var hi=di.length,pi=di[hi-1],ha,ga;for(pi.cacheItem.delete(pi.arg),ga=hi-2;ga>=0&&(pi=di[ga],ha=pi.cacheItem.get(pi.arg),!ha||!ha.size);ga--)pi.cacheItem.delete(pi.arg)}i$2(ci,"removeCachedResult");function ui(di,hi){return di===hi||di!==di&&hi!==hi}i$2(ui,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})}),b$1=(()=>{let Ws;return typeof window<"u"?Ws=window:typeof globalThis<"u"?Ws=globalThis:typeof global<"u"?Ws=global:typeof self<"u"?Ws=self:Ws={},Ws})(),se$1=i$2(Ws=>Ws.transports!==void 0,"isMulti"),le=i$2(()=>Math.random().toString(16).slice(2),"generateRandomId"),lt$1=class{constructor(Ws={}){this.sender=le(),this.events={},this.data={},this.transports=[],this.isAsync=Ws.async||!1,se$1(Ws)?(this.transports=Ws.transports||[],this.transports.forEach(ws=>{ws.setHandler(oi=>this.handleEvent(oi))})):this.transports=Ws.transport?[Ws.transport]:[],this.transports.forEach(ws=>{ws.setHandler(oi=>this.handleEvent(oi))})}get hasTransport(){return this.transports.length>0}addListener(Ws,ws){this.events[Ws]=this.events[Ws]||[],this.events[Ws].push(ws)}emit(Ws,...ws){let oi={type:Ws,args:ws,from:this.sender},si={};ws.length>=1&&ws[0]&&ws[0].options&&(si=ws[0].options);let ii=i$2(()=>{this.transports.forEach(ai=>{ai.send(oi,si)}),this.handleEvent(oi)},"handler");this.isAsync?setImmediate(ii):ii()}last(Ws){return this.data[Ws]}eventNames(){return Object.keys(this.events)}listenerCount(Ws){let ws=this.listeners(Ws);return ws?ws.length:0}listeners(Ws){return this.events[Ws]||void 0}once(Ws,ws){let oi=this.onceListener(Ws,ws);this.addListener(Ws,oi)}removeAllListeners(Ws){Ws?this.events[Ws]&&delete this.events[Ws]:this.events={}}removeListener(Ws,ws){let oi=this.listeners(Ws);oi&&(this.events[Ws]=oi.filter(si=>si!==ws))}on(Ws,ws){this.addListener(Ws,ws)}off(Ws,ws){this.removeListener(Ws,ws)}handleEvent(Ws){let ws=this.listeners(Ws.type);ws&&ws.length&&ws.forEach(oi=>{oi.apply(Ws,Ws.args)}),this.data[Ws.type]=Ws.args}onceListener(Ws,ws){let oi=i$2((...si)=>(this.removeListener(Ws,oi),ws(...si)),"onceListener");return oi}};i$2(lt$1,"Channel");var z$2=lt$1,ce=Object.create,St$1=Object.defineProperty,fe$1=Object.getOwnPropertyDescriptor,wt$1=Object.getOwnPropertyNames,ue$1=Object.getPrototypeOf,pe=Object.prototype.hasOwnProperty,x$2=i$2((Ws,ws)=>i$2(function(){return ws||(0,Ws[wt$1(Ws)[0]])((ws={exports:{}}).exports,ws),ws.exports},"__require"),"__commonJS"),ye$1=i$2((Ws,ws,oi,si)=>{if(ws&&typeof ws=="object"||typeof ws=="function")for(let ii of wt$1(ws))!pe.call(Ws,ii)&&ii!==oi&&St$1(Ws,ii,{get:i$2(()=>ws[ii],"get"),enumerable:!(si=fe$1(ws,ii))||si.enumerable});return Ws},"__copyProps"),tt$1=i$2((Ws,ws,oi)=>(oi=Ws!=null?ce(ue$1(Ws)):{},ye$1(ws||!Ws||!Ws.__esModule?St$1(oi,"default",{value:Ws,enumerable:!0}):oi,Ws)),"__toESM"),de$1=["bubbles","cancelBubble","cancelable","composed","currentTarget","defaultPrevented","eventPhase","isTrusted","returnValue","srcElement","target","timeStamp","type"],he$1=["detail"];function Et$1(Ws){let ws=de$1.filter(oi=>Ws[oi]!==void 0).reduce((oi,si)=>({...oi,[si]:Ws[si]}),{});return Ws instanceof CustomEvent&&he$1.filter(oi=>Ws[oi]!==void 0).forEach(oi=>{ws[oi]=Ws[oi]}),ws}i$2(Et$1,"extractEventHiddenProperties");var Ut$1=ie$3(At$1()),Tt=x$2({"node_modules/has-symbols/shams.js"(Ws,ws){ws.exports=i$2(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var oi={},si=Symbol("test"),ii=Object(si);if(typeof si=="string"||Object.prototype.toString.call(si)!=="[object Symbol]"||Object.prototype.toString.call(ii)!=="[object Symbol]")return!1;var ai=42;oi[si]=ai;for(si in oi)return!1;if(typeof Object.keys=="function"&&Object.keys(oi).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(oi).length!==0)return!1;var li=Object.getOwnPropertySymbols(oi);if(li.length!==1||li[0]!==si||!Object.prototype.propertyIsEnumerable.call(oi,si))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var ci=Object.getOwnPropertyDescriptor(oi,si);if(ci.value!==ai||ci.enumerable!==!0)return!1}return!0},"hasSymbols")}}),Ft$1=x$2({"node_modules/has-symbols/index.js"(Ws,ws){var oi=typeof Symbol<"u"&&Symbol,si=Tt();ws.exports=i$2(function(){return typeof oi!="function"||typeof Symbol!="function"||typeof oi("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:si()},"hasNativeSymbols")}}),ge$1=x$2({"node_modules/function-bind/implementation.js"(Ws,ws){var oi="Function.prototype.bind called on incompatible ",si=Array.prototype.slice,ii=Object.prototype.toString,ai="[object Function]";ws.exports=i$2(function(li){var ci=this;if(typeof ci!="function"||ii.call(ci)!==ai)throw new TypeError(oi+ci);for(var ui=si.call(arguments,1),di,hi=i$2(function(){if(this instanceof di){var ba=ci.apply(this,ui.concat(si.call(arguments)));return Object(ba)===ba?ba:this}else return ci.apply(li,ui.concat(si.call(arguments)))},"binder"),pi=Math.max(0,ci.length-ui.length),ha=[],ga=0;ga<pi;ga++)ha.push("$"+ga);if(di=Function("binder","return function ("+ha.join(",")+"){ return binder.apply(this,arguments); }")(hi),ci.prototype){var va=i$2(function(){},"Empty2");va.prototype=ci.prototype,di.prototype=new va,va.prototype=null}return di},"bind")}}),ut=x$2({"node_modules/function-bind/index.js"(Ws,ws){var oi=ge$1();ws.exports=Function.prototype.bind||oi}}),me$1=x$2({"node_modules/has/src/index.js"(Ws,ws){var oi=ut();ws.exports=oi.call(Function.call,Object.prototype.hasOwnProperty)}}),Nt$1=x$2({"node_modules/get-intrinsic/index.js"(Ws,ws){var oi,si=SyntaxError,ii=Function,ai=TypeError,li=i$2(function(_d){try{return ii('"use strict"; return ('+_d+").constructor;")()}catch{}},"getEvalledConstructor"),ci=Object.getOwnPropertyDescriptor;if(ci)try{ci({},"")}catch{ci=null}var ui=i$2(function(){throw new ai},"throwTypeError"),di=ci?function(){try{return arguments.callee,ui}catch{try{return ci(arguments,"callee").get}catch{return ui}}}():ui,hi=Ft$1()(),pi=Object.getPrototypeOf||function(_d){return _d.__proto__},ha={},ga=typeof Uint8Array>"u"?oi:pi(Uint8Array),va={"%AggregateError%":typeof AggregateError>"u"?oi:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?oi:ArrayBuffer,"%ArrayIteratorPrototype%":hi?pi([][Symbol.iterator]()):oi,"%AsyncFromSyncIteratorPrototype%":oi,"%AsyncFunction%":ha,"%AsyncGenerator%":ha,"%AsyncGeneratorFunction%":ha,"%AsyncIteratorPrototype%":ha,"%Atomics%":typeof Atomics>"u"?oi:Atomics,"%BigInt%":typeof BigInt>"u"?oi:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?oi:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?oi:Float32Array,"%Float64Array%":typeof Float64Array>"u"?oi:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?oi:FinalizationRegistry,"%Function%":ii,"%GeneratorFunction%":ha,"%Int8Array%":typeof Int8Array>"u"?oi:Int8Array,"%Int16Array%":typeof Int16Array>"u"?oi:Int16Array,"%Int32Array%":typeof Int32Array>"u"?oi:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hi?pi(pi([][Symbol.iterator]())):oi,"%JSON%":typeof JSON=="object"?JSON:oi,"%Map%":typeof Map>"u"?oi:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hi?oi:pi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?oi:Promise,"%Proxy%":typeof Proxy>"u"?oi:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?oi:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?oi:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hi?oi:pi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?oi:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hi?pi(""[Symbol.iterator]()):oi,"%Symbol%":hi?Symbol:oi,"%SyntaxError%":si,"%ThrowTypeError%":di,"%TypedArray%":ga,"%TypeError%":ai,"%Uint8Array%":typeof Uint8Array>"u"?oi:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?oi:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?oi:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?oi:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?oi:WeakMap,"%WeakRef%":typeof WeakRef>"u"?oi:WeakRef,"%WeakSet%":typeof WeakSet>"u"?oi:WeakSet},ba=i$2(function _d(Md){var Td;if(Md==="%AsyncFunction%")Td=li("async function () {}");else if(Md==="%GeneratorFunction%")Td=li("function* () {}");else if(Md==="%AsyncGeneratorFunction%")Td=li("async function* () {}");else if(Md==="%AsyncGenerator%"){var wd=_d("%AsyncGeneratorFunction%");wd&&(Td=wd.prototype)}else if(Md==="%AsyncIteratorPrototype%"){var Cd=_d("%AsyncGenerator%");Cd&&(Td=pi(Cd.prototype))}return va[Md]=Td,Td},"doEval2"),wa={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},xa=ut(),Ca=me$1(),el=xa.call(Function.call,Array.prototype.concat),ku=xa.call(Function.apply,Array.prototype.splice),gd=xa.call(Function.call,String.prototype.replace),Ed=xa.call(Function.call,String.prototype.slice),Od=xa.call(Function.call,RegExp.prototype.exec),Nd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Pd=/\\(\\)?/g,Ld=i$2(function(_d){var Md=Ed(_d,0,1),Td=Ed(_d,-1);if(Md==="%"&&Td!=="%")throw new si("invalid intrinsic syntax, expected closing `%`");if(Td==="%"&&Md!=="%")throw new si("invalid intrinsic syntax, expected opening `%`");var wd=[];return gd(_d,Nd,function(Cd,sf,of,Wd){wd[wd.length]=of?gd(Wd,Pd,"$1"):sf||Cd}),wd},"stringToPath3"),rf=i$2(function(_d,Md){var Td=_d,wd;if(Ca(wa,Td)&&(wd=wa[Td],Td="%"+wd[0]+"%"),Ca(va,Td)){var Cd=va[Td];if(Cd===ha&&(Cd=ba(Td)),typeof Cd>"u"&&!Md)throw new ai("intrinsic "+_d+" exists, but is not available. Please file an issue!");return{alias:wd,name:Td,value:Cd}}throw new si("intrinsic "+_d+" does not exist!")},"getBaseIntrinsic2");ws.exports=i$2(function(_d,Md){if(typeof _d!="string"||_d.length===0)throw new ai("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Md!="boolean")throw new ai('"allowMissing" argument must be a boolean');if(Od(/^%?[^%]*%?$/,_d)===null)throw new si("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Td=Ld(_d),wd=Td.length>0?Td[0]:"",Cd=rf("%"+wd+"%",Md),sf=Cd.name,of=Cd.value,Wd=!1,df=Cd.alias;df&&(wd=df[0],ku(Td,el([0,1],df)));for(var hf=1,xd=!0;hf<Td.length;hf+=1){var Fd=Td[hf],Vd=Ed(Fd,0,1),af=Ed(Fd,-1);if((Vd==='"'||Vd==="'"||Vd==="`"||af==='"'||af==="'"||af==="`")&&Vd!==af)throw new si("property names with quotes must have matching quotes");if((Fd==="constructor"||!xd)&&(Wd=!0),wd+="."+Fd,sf="%"+wd+"%",Ca(va,sf))of=va[sf];else if(of!=null){if(!(Fd in of)){if(!Md)throw new ai("base intrinsic for "+_d+" exists, but the property is not available.");return}if(ci&&hf+1>=Td.length){var ff=ci(of,Fd);xd=!!ff,xd&&"get"in ff&&!("originalValue"in ff.get)?of=ff.get:of=of[Fd]}else xd=Ca(of,Fd),of=of[Fd];xd&&!Wd&&(va[sf]=of)}}return of},"GetIntrinsic")}}),ve$1=x$2({"node_modules/call-bind/index.js"(Ws,ws){var oi=ut(),si=Nt$1(),ii=si("%Function.prototype.apply%"),ai=si("%Function.prototype.call%"),li=si("%Reflect.apply%",!0)||oi.call(ai,ii),ci=si("%Object.getOwnPropertyDescriptor%",!0),ui=si("%Object.defineProperty%",!0),di=si("%Math.max%");if(ui)try{ui({},"a",{value:1})}catch{ui=null}ws.exports=i$2(function(pi){var ha=li(oi,ai,arguments);if(ci&&ui){var ga=ci(ha,"length");ga.configurable&&ui(ha,"length",{value:1+di(0,pi.length-(arguments.length-1))})}return ha},"callBind");var hi=i$2(function(){return li(oi,ii,arguments)},"applyBind2");ui?ui(ws.exports,"apply",{value:hi}):ws.exports.apply=hi}}),_e$1=x$2({"node_modules/call-bind/callBound.js"(Ws,ws){var oi=Nt$1(),si=ve$1(),ii=si(oi("String.prototype.indexOf"));ws.exports=i$2(function(ai,li){var ci=oi(ai,!!li);return typeof ci=="function"&&ii(ai,".prototype.")>-1?si(ci):ci},"callBoundIntrinsic")}}),be$1=x$2({"node_modules/has-tostringtag/shams.js"(Ws,ws){var oi=Tt();ws.exports=i$2(function(){return oi()&&!!Symbol.toStringTag},"hasToStringTagShams")}}),Se$1=x$2({"node_modules/is-regex/index.js"(Ws,ws){var oi=_e$1(),si=be$1()(),ii,ai,li,ci;si&&(ii=oi("Object.prototype.hasOwnProperty"),ai=oi("RegExp.prototype.exec"),li={},ui=i$2(function(){throw li},"throwRegexMarker"),ci={toString:ui,valueOf:ui},typeof Symbol.toPrimitive=="symbol"&&(ci[Symbol.toPrimitive]=ui));var ui,di=oi("Object.prototype.toString"),hi=Object.getOwnPropertyDescriptor,pi="[object RegExp]";ws.exports=i$2(si?function(ha){if(!ha||typeof ha!="object")return!1;var ga=hi(ha,"lastIndex"),va=ga&&ii(ga,"value");if(!va)return!1;try{ai(ha,ci)}catch(ba){return ba===li}}:function(ha){return!ha||typeof ha!="object"&&typeof ha!="function"?!1:di(ha)===pi},"isRegex")}}),we=x$2({"node_modules/is-function/index.js"(Ws,ws){ws.exports=si;var oi=Object.prototype.toString;function si(ii){if(!ii)return!1;var ai=oi.call(ii);return ai==="[object Function]"||typeof ii=="function"&&ai!=="[object RegExp]"||typeof window<"u"&&(ii===window.setTimeout||ii===window.alert||ii===window.confirm||ii===window.prompt)}i$2(si,"isFunction3")}}),Ee$1=x$2({"node_modules/is-symbol/index.js"(Ws,ws){var oi=Object.prototype.toString,si=Ft$1()();si?(ii=Symbol.prototype.toString,ai=/^Symbol\(.*\)$/,li=i$2(function(ci){return typeof ci.valueOf()!="symbol"?!1:ai.test(ii.call(ci))},"isRealSymbolObject"),ws.exports=i$2(function(ci){if(typeof ci=="symbol")return!0;if(oi.call(ci)!=="[object Symbol]")return!1;try{return li(ci)}catch{return!1}},"isSymbol3")):ws.exports=i$2(function(ci){return!1},"isSymbol3");var ii,ai,li}}),Oe$1=tt$1(Se$1()),Ae=tt$1(we()),Pe$1=tt$1(Ee$1());function xe$1(Ws){return Ws!=null&&typeof Ws=="object"&&Array.isArray(Ws)===!1}i$2(xe$1,"isObject");var Ce$1=typeof global=="object"&&global&&global.Object===Object&&global,Ie$1=Ce$1,je$1=typeof self=="object"&&self&&self.Object===Object&&self,Te$1=Ie$1||je$1||Function("return this")(),pt$1=Te$1,Fe$1=pt$1.Symbol,M$2=Fe$1,Rt$1=Object.prototype,Ne=Rt$1.hasOwnProperty,Re=Rt$1.toString,W$2=M$2?M$2.toStringTag:void 0;function Me$1(Ws){var ws=Ne.call(Ws,W$2),oi=Ws[W$2];try{Ws[W$2]=void 0;var si=!0}catch{}var ii=Re.call(Ws);return si&&(ws?Ws[W$2]=oi:delete Ws[W$2]),ii}i$2(Me$1,"getRawTag");var $e$1=Me$1,ke$1=Object.prototype,De$1=ke$1.toString;function Le$1(Ws){return De$1.call(Ws)}i$2(Le$1,"objectToString");var Ue$1=Le$1,ze$1="[object Null]",We$1="[object Undefined]",Pt$1=M$2?M$2.toStringTag:void 0;function Be$1(Ws){return Ws==null?Ws===void 0?We$1:ze$1:Pt$1&&Pt$1 in Object(Ws)?$e$1(Ws):Ue$1(Ws)}i$2(Be$1,"baseGetTag");var Mt$1=Be$1;function He$1(Ws){return Ws!=null&&typeof Ws=="object"}i$2(He$1,"isObjectLike");var qe=He$1,Ge$1="[object Symbol]";function Je$1(Ws){return typeof Ws=="symbol"||qe(Ws)&&Mt$1(Ws)==Ge$1}i$2(Je$1,"isSymbol");var yt=Je$1;function Ve$1(Ws,ws){for(var oi=-1,si=Ws==null?0:Ws.length,ii=Array(si);++oi<si;)ii[oi]=ws(Ws[oi],oi,Ws);return ii}i$2(Ve$1,"arrayMap");var Ke$1=Ve$1,Ye$1=Array.isArray,dt$1=Ye$1,xt=M$2?M$2.prototype:void 0,Ct$1=xt?xt.toString:void 0;function $t$1(Ws){if(typeof Ws=="string")return Ws;if(dt$1(Ws))return Ke$1(Ws,$t$1)+"";if(yt(Ws))return Ct$1?Ct$1.call(Ws):"";var ws=Ws+"";return ws=="0"&&1/Ws==-1/0?"-0":ws}i$2($t$1,"baseToString");var Xe$1=$t$1;function Qe(Ws){var ws=typeof Ws;return Ws!=null&&(ws=="object"||ws=="function")}i$2(Qe,"isObject2");var kt$1=Qe,tr="[object AsyncFunction]",er="[object Function]",rr="[object GeneratorFunction]",nr="[object Proxy]";function or$1(Ws){if(!kt$1(Ws))return!1;var ws=Mt$1(Ws);return ws==er||ws==rr||ws==tr||ws==nr}i$2(or$1,"isFunction");var ar=or$1,ir=pt$1["__core-js_shared__"],ft$1=ir,It$1=function(){var Ws=/[^.]+$/.exec(ft$1&&ft$1.keys&&ft$1.keys.IE_PROTO||"");return Ws?"Symbol(src)_1."+Ws:""}();function sr(Ws){return!!It$1&&It$1 in Ws}i$2(sr,"isMasked");var lr=sr,cr=Function.prototype,fr$1=cr.toString;function ur$1(Ws){if(Ws!=null){try{return fr$1.call(Ws)}catch{}try{return Ws+""}catch{}}return""}i$2(ur$1,"toSource");var pr=ur$1,yr$1=/[\\^$.*+?()[\]{}|]/g,dr=/^\[object .+?Constructor\]$/,hr$1=Function.prototype,gr$1=Object.prototype,mr$1=hr$1.toString,vr$1=gr$1.hasOwnProperty,_r$1=RegExp("^"+mr$1.call(vr$1).replace(yr$1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function br$1(Ws){if(!kt$1(Ws)||lr(Ws))return!1;var ws=ar(Ws)?_r$1:dr;return ws.test(pr(Ws))}i$2(br$1,"baseIsNative");var Sr$1=br$1;function wr$1(Ws,ws){return Ws==null?void 0:Ws[ws]}i$2(wr$1,"getValue");var Er$1=wr$1;function Or$1(Ws,ws){var oi=Er$1(Ws,ws);return Sr$1(oi)?oi:void 0}i$2(Or$1,"getNative");var Dt$1=Or$1;function Ar$1(Ws,ws){return Ws===ws||Ws!==Ws&&ws!==ws}i$2(Ar$1,"eq");var Pr$1=Ar$1,xr$1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cr$1=/^\w*$/;function Ir(Ws,ws){if(dt$1(Ws))return!1;var oi=typeof Ws;return oi=="number"||oi=="symbol"||oi=="boolean"||Ws==null||yt(Ws)?!0:Cr$1.test(Ws)||!xr$1.test(Ws)||ws!=null&&Ws in Object(ws)}i$2(Ir,"isKey");var jr$1=Ir,Tr$1=Dt$1(Object,"create"),B$1=Tr$1;function Fr$1(){this.__data__=B$1?B$1(null):{},this.size=0}i$2(Fr$1,"hashClear");var Nr$1=Fr$1;function Rr$1(Ws){var ws=this.has(Ws)&&delete this.__data__[Ws];return this.size-=ws?1:0,ws}i$2(Rr$1,"hashDelete");var Mr$1=Rr$1,$r$1="__lodash_hash_undefined__",kr$1=Object.prototype,Dr=kr$1.hasOwnProperty;function Lr$1(Ws){var ws=this.__data__;if(B$1){var oi=ws[Ws];return oi===$r$1?void 0:oi}return Dr.call(ws,Ws)?ws[Ws]:void 0}i$2(Lr$1,"hashGet");var Ur$1=Lr$1,zr$1=Object.prototype,Wr$1=zr$1.hasOwnProperty;function Br$1(Ws){var ws=this.__data__;return B$1?ws[Ws]!==void 0:Wr$1.call(ws,Ws)}i$2(Br$1,"hashHas");var Hr$1=Br$1,qr$1="__lodash_hash_undefined__";function Gr$1(Ws,ws){var oi=this.__data__;return this.size+=this.has(Ws)?0:1,oi[Ws]=B$1&&ws===void 0?qr$1:ws,this}i$2(Gr$1,"hashSet");var Jr$1=Gr$1;function $$1(Ws){var ws=-1,oi=Ws==null?0:Ws.length;for(this.clear();++ws<oi;){var si=Ws[ws];this.set(si[0],si[1])}}i$2($$1,"Hash");$$1.prototype.clear=Nr$1;$$1.prototype.delete=Mr$1;$$1.prototype.get=Ur$1;$$1.prototype.has=Hr$1;$$1.prototype.set=Jr$1;var jt$1=$$1;function Vr$1(){this.__data__=[],this.size=0}i$2(Vr$1,"listCacheClear");var Kr$1=Vr$1;function Yr$1(Ws,ws){for(var oi=Ws.length;oi--;)if(Pr$1(Ws[oi][0],ws))return oi;return-1}i$2(Yr$1,"assocIndexOf");var rt=Yr$1,Zr$1=Array.prototype,Xr$1=Zr$1.splice;function Qr(Ws){var ws=this.__data__,oi=rt(ws,Ws);if(oi<0)return!1;var si=ws.length-1;return oi==si?ws.pop():Xr$1.call(ws,oi,1),--this.size,!0}i$2(Qr,"listCacheDelete");var tn=Qr;function en(Ws){var ws=this.__data__,oi=rt(ws,Ws);return oi<0?void 0:ws[oi][1]}i$2(en,"listCacheGet");var rn=en;function nn(Ws){return rt(this.__data__,Ws)>-1}i$2(nn,"listCacheHas");var on=nn;function an(Ws,ws){var oi=this.__data__,si=rt(oi,Ws);return si<0?(++this.size,oi.push([Ws,ws])):oi[si][1]=ws,this}i$2(an,"listCacheSet");var sn=an;function k$3(Ws){var ws=-1,oi=Ws==null?0:Ws.length;for(this.clear();++ws<oi;){var si=Ws[ws];this.set(si[0],si[1])}}i$2(k$3,"ListCache");k$3.prototype.clear=Kr$1;k$3.prototype.delete=tn;k$3.prototype.get=rn;k$3.prototype.has=on;k$3.prototype.set=sn;var ln=k$3,cn$1=Dt$1(pt$1,"Map"),fn=cn$1;function un(){this.size=0,this.__data__={hash:new jt$1,map:new(fn||ln),string:new jt$1}}i$2(un,"mapCacheClear");var pn=un;function yn$1(Ws){var ws=typeof Ws;return ws=="string"||ws=="number"||ws=="symbol"||ws=="boolean"?Ws!=="__proto__":Ws===null}i$2(yn$1,"isKeyable");var dn=yn$1;function hn(Ws,ws){var oi=Ws.__data__;return dn(ws)?oi[typeof ws=="string"?"string":"hash"]:oi.map}i$2(hn,"getMapData");var nt$1=hn;function gn(Ws){var ws=nt$1(this,Ws).delete(Ws);return this.size-=ws?1:0,ws}i$2(gn,"mapCacheDelete");var mn=gn;function vn$1(Ws){return nt$1(this,Ws).get(Ws)}i$2(vn$1,"mapCacheGet");var _n$1=vn$1;function bn(Ws){return nt$1(this,Ws).has(Ws)}i$2(bn,"mapCacheHas");var Sn=bn;function wn(Ws,ws){var oi=nt$1(this,Ws),si=oi.size;return oi.set(Ws,ws),this.size+=oi.size==si?0:1,this}i$2(wn,"mapCacheSet");var En=wn;function D$2(Ws){var ws=-1,oi=Ws==null?0:Ws.length;for(this.clear();++ws<oi;){var si=Ws[ws];this.set(si[0],si[1])}}i$2(D$2,"MapCache");D$2.prototype.clear=pn;D$2.prototype.delete=mn;D$2.prototype.get=_n$1;D$2.prototype.has=Sn;D$2.prototype.set=En;var Lt$1=D$2,On$1="Expected a function";function ht$1(Ws,ws){if(typeof Ws!="function"||ws!=null&&typeof ws!="function")throw new TypeError(On$1);var oi=i$2(function(){var si=arguments,ii=ws?ws.apply(this,si):si[0],ai=oi.cache;if(ai.has(ii))return ai.get(ii);var li=Ws.apply(this,si);return oi.cache=ai.set(ii,li)||ai,li},"memoized");return oi.cache=new(ht$1.Cache||Lt$1),oi}i$2(ht$1,"memoize");ht$1.Cache=Lt$1;var An$1=ht$1,Pn$1=500;function xn(Ws){var ws=An$1(Ws,function(si){return oi.size===Pn$1&&oi.clear(),si}),oi=ws.cache;return ws}i$2(xn,"memoizeCapped");var Cn$1=xn,In$1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jn$1=/\\(\\)?/g,Tn=Cn$1(function(Ws){var ws=[];return Ws.charCodeAt(0)===46&&ws.push(""),Ws.replace(In$1,function(oi,si,ii,ai){ws.push(ii?ai.replace(jn$1,"$1"):si||oi)}),ws}),Fn$1=Tn;function Nn$1(Ws){return Ws==null?"":Xe$1(Ws)}i$2(Nn$1,"toString");var Rn=Nn$1;function Mn$1(Ws,ws){return dt$1(Ws)?Ws:jr$1(Ws,ws)?[Ws]:Fn$1(Rn(Ws))}i$2(Mn$1,"castPath");var $n$1=Mn$1;function Dn$1(Ws){if(typeof Ws=="string"||yt(Ws))return Ws;var ws=Ws+"";return ws=="0"&&1/Ws==-1/0?"-0":ws}i$2(Dn$1,"toKey");var Ln$1=Dn$1;function Un(Ws,ws){ws=$n$1(ws,Ws);for(var oi=0,si=ws.length;Ws!=null&&oi<si;)Ws=Ws[Ln$1(ws[oi++])];return oi&&oi==si?Ws:void 0}i$2(Un,"baseGet");var zn$1=Un;function Wn$1(Ws,ws,oi){var si=Ws==null?void 0:zn$1(Ws,ws);return si===void 0?oi:si}i$2(Wn$1,"get");var Bn=Wn$1,et$1=xe$1,Hn=i$2(Ws=>{let ws=null,oi=!1,si=!1,ii=!1,ai="";if(Ws.indexOf("//")>=0||Ws.indexOf("/*")>=0)for(let li=0;li<Ws.length;li+=1)!ws&&!oi&&!si&&!ii?Ws[li]==='"'||Ws[li]==="'"||Ws[li]==="`"?ws=Ws[li]:Ws[li]==="/"&&Ws[li+1]==="*"?oi=!0:Ws[li]==="/"&&Ws[li+1]==="/"?si=!0:Ws[li]==="/"&&Ws[li+1]!=="/"&&(ii=!0):(ws&&(Ws[li]===ws&&Ws[li-1]!=="\\"||Ws[li]===`
|
|
47
|
+
`+printSourceLocation$1(this.source,oi);return ws}toJSON(){const ws={message:this.message};return this.locations!=null&&(ws.locations=this.locations),this.path!=null&&(ws.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(ws.extensions=this.extensions),ws}};function undefinedIfEmpty$1(Ws){return Ws===void 0||Ws.length===0?void 0:Ws}var Kind$1;(function(Ws){Ws.NAME="Name",Ws.DOCUMENT="Document",Ws.OPERATION_DEFINITION="OperationDefinition",Ws.VARIABLE_DEFINITION="VariableDefinition",Ws.SELECTION_SET="SelectionSet",Ws.FIELD="Field",Ws.ARGUMENT="Argument",Ws.FRAGMENT_SPREAD="FragmentSpread",Ws.INLINE_FRAGMENT="InlineFragment",Ws.FRAGMENT_DEFINITION="FragmentDefinition",Ws.VARIABLE="Variable",Ws.INT="IntValue",Ws.FLOAT="FloatValue",Ws.STRING="StringValue",Ws.BOOLEAN="BooleanValue",Ws.NULL="NullValue",Ws.ENUM="EnumValue",Ws.LIST="ListValue",Ws.OBJECT="ObjectValue",Ws.OBJECT_FIELD="ObjectField",Ws.DIRECTIVE="Directive",Ws.NAMED_TYPE="NamedType",Ws.LIST_TYPE="ListType",Ws.NON_NULL_TYPE="NonNullType",Ws.SCHEMA_DEFINITION="SchemaDefinition",Ws.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",Ws.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",Ws.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",Ws.FIELD_DEFINITION="FieldDefinition",Ws.INPUT_VALUE_DEFINITION="InputValueDefinition",Ws.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",Ws.UNION_TYPE_DEFINITION="UnionTypeDefinition",Ws.ENUM_TYPE_DEFINITION="EnumTypeDefinition",Ws.ENUM_VALUE_DEFINITION="EnumValueDefinition",Ws.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",Ws.DIRECTIVE_DEFINITION="DirectiveDefinition",Ws.SCHEMA_EXTENSION="SchemaExtension",Ws.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",Ws.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",Ws.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",Ws.UNION_TYPE_EXTENSION="UnionTypeExtension",Ws.ENUM_TYPE_EXTENSION="EnumTypeExtension",Ws.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(Kind$1||(Kind$1={}));function isDigit$2(Ws){return Ws>=48&&Ws<=57}function isLetter$1(Ws){return Ws>=97&&Ws<=122||Ws>=65&&Ws<=90}function isNameStart$1(Ws){return isLetter$1(Ws)||Ws===95}function isNameContinue$1(Ws){return isLetter$1(Ws)||isDigit$2(Ws)||Ws===95}const MAX_ARRAY_LENGTH$1=10,MAX_RECURSIVE_DEPTH$1=2;function inspect$1(Ws){return formatValue$1(Ws,[])}function formatValue$1(Ws,ws){switch(typeof Ws){case"string":return JSON.stringify(Ws);case"function":return Ws.name?`[function ${Ws.name}]`:"[function]";case"object":return formatObjectValue$1(Ws,ws);default:return String(Ws)}}function formatObjectValue$1(Ws,ws){if(Ws===null)return"null";if(ws.includes(Ws))return"[Circular]";const oi=[...ws,Ws];if(isJSONable$1(Ws)){const si=Ws.toJSON();if(si!==Ws)return typeof si=="string"?si:formatValue$1(si,oi)}else if(Array.isArray(Ws))return formatArray$1(Ws,oi);return formatObject$1(Ws,oi)}function isJSONable$1(Ws){return typeof Ws.toJSON=="function"}function formatObject$1(Ws,ws){const oi=Object.entries(Ws);return oi.length===0?"{}":ws.length>MAX_RECURSIVE_DEPTH$1?"["+getObjectTag$1(Ws)+"]":"{ "+oi.map(([ii,ai])=>ii+": "+formatValue$1(ai,ws)).join(", ")+" }"}function formatArray$1(Ws,ws){if(Ws.length===0)return"[]";if(ws.length>MAX_RECURSIVE_DEPTH$1)return"[Array]";const oi=Math.min(MAX_ARRAY_LENGTH$1,Ws.length),si=Ws.length-oi,ii=[];for(let ai=0;ai<oi;++ai)ii.push(formatValue$1(Ws[ai],ws));return si===1?ii.push("... 1 more item"):si>1&&ii.push(`... ${si} more items`),"["+ii.join(", ")+"]"}function getObjectTag$1(Ws){const ws=Object.prototype.toString.call(Ws).replace(/^\[object /,"").replace(/]$/,"");if(ws==="Object"&&typeof Ws.constructor=="function"){const oi=Ws.constructor.name;if(typeof oi=="string"&&oi!=="")return oi}return ws}function identityFunc$1(Ws){return Ws}function keyValMap$1(Ws,ws,oi){const si=Object.create(null);for(const ii of Ws)si[ws(ii)]=oi(ii);return si}function toObjMap$1(Ws){if(Ws==null)return Object.create(null);if(Object.getPrototypeOf(Ws)===null)return Ws;const ws=Object.create(null);for(const[oi,si]of Object.entries(Ws))ws[oi]=si;return ws}function valueFromASTUntyped$1(Ws,ws){switch(Ws.kind){case Kind$1.NULL:return null;case Kind$1.INT:return parseInt(Ws.value,10);case Kind$1.FLOAT:return parseFloat(Ws.value);case Kind$1.STRING:case Kind$1.ENUM:case Kind$1.BOOLEAN:return Ws.value;case Kind$1.LIST:return Ws.values.map(oi=>valueFromASTUntyped$1(oi,ws));case Kind$1.OBJECT:return keyValMap$1(Ws.fields,oi=>oi.name.value,oi=>valueFromASTUntyped$1(oi.value,ws));case Kind$1.VARIABLE:return ws==null?void 0:ws[Ws.name.value]}}function assertName$1(Ws){if(Ws!=null||devAssert$1(!1,"Must provide name."),typeof Ws=="string"||devAssert$1(!1,"Expected name to be a string."),Ws.length===0)throw new GraphQLError$1("Expected name to be a non-empty string.");for(let ws=1;ws<Ws.length;++ws)if(!isNameContinue$1(Ws.charCodeAt(ws)))throw new GraphQLError$1(`Names must only contain [_a-zA-Z0-9] but "${Ws}" does not.`);if(!isNameStart$1(Ws.charCodeAt(0)))throw new GraphQLError$1(`Names must start with [_a-zA-Z] but "${Ws}" does not.`);return Ws}let GraphQLScalarType$1=class{constructor(ws){var oi,si,ii,ai;const li=(oi=ws.parseValue)!==null&&oi!==void 0?oi:identityFunc$1;this.name=assertName$1(ws.name),this.description=ws.description,this.specifiedByURL=ws.specifiedByURL,this.serialize=(si=ws.serialize)!==null&&si!==void 0?si:identityFunc$1,this.parseValue=li,this.parseLiteral=(ii=ws.parseLiteral)!==null&&ii!==void 0?ii:(ci,ui)=>li(valueFromASTUntyped$1(ci,ui)),this.extensions=toObjMap$1(ws.extensions),this.astNode=ws.astNode,this.extensionASTNodes=(ai=ws.extensionASTNodes)!==null&&ai!==void 0?ai:[],ws.specifiedByURL==null||typeof ws.specifiedByURL=="string"||devAssert$1(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${inspect$1(ws.specifiedByURL)}.`),ws.serialize==null||typeof ws.serialize=="function"||devAssert$1(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),ws.parseLiteral&&(typeof ws.parseValue=="function"&&typeof ws.parseLiteral=="function"||devAssert$1(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};var util;(function(Ws){Ws.assertEqual=ii=>ii;function ws(ii){}Ws.assertIs=ws;function oi(ii){throw new Error}Ws.assertNever=oi,Ws.arrayToEnum=ii=>{const ai={};for(const li of ii)ai[li]=li;return ai},Ws.getValidEnumValues=ii=>{const ai=Ws.objectKeys(ii).filter(ci=>typeof ii[ii[ci]]!="number"),li={};for(const ci of ai)li[ci]=ii[ci];return Ws.objectValues(li)},Ws.objectValues=ii=>Ws.objectKeys(ii).map(function(ai){return ii[ai]}),Ws.objectKeys=typeof Object.keys=="function"?ii=>Object.keys(ii):ii=>{const ai=[];for(const li in ii)Object.prototype.hasOwnProperty.call(ii,li)&&ai.push(li);return ai},Ws.find=(ii,ai)=>{for(const li of ii)if(ai(li))return li},Ws.isInteger=typeof Number.isInteger=="function"?ii=>Number.isInteger(ii):ii=>typeof ii=="number"&&isFinite(ii)&&Math.floor(ii)===ii;function si(ii,ai=" | "){return ii.map(li=>typeof li=="string"?`'${li}'`:li).join(ai)}Ws.joinValues=si,Ws.jsonStringifyReplacer=(ii,ai)=>typeof ai=="bigint"?ai.toString():ai})(util||(util={}));var objectUtil;(function(Ws){Ws.mergeShapes=(ws,oi)=>({...ws,...oi})})(objectUtil||(objectUtil={}));const ZodParsedType=util.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=Ws=>{switch(typeof Ws){case"undefined":return ZodParsedType.undefined;case"string":return ZodParsedType.string;case"number":return isNaN(Ws)?ZodParsedType.nan:ZodParsedType.number;case"boolean":return ZodParsedType.boolean;case"function":return ZodParsedType.function;case"bigint":return ZodParsedType.bigint;case"symbol":return ZodParsedType.symbol;case"object":return Array.isArray(Ws)?ZodParsedType.array:Ws===null?ZodParsedType.null:Ws.then&&typeof Ws.then=="function"&&Ws.catch&&typeof Ws.catch=="function"?ZodParsedType.promise:typeof Map<"u"&&Ws instanceof Map?ZodParsedType.map:typeof Set<"u"&&Ws instanceof Set?ZodParsedType.set:typeof Date<"u"&&Ws instanceof Date?ZodParsedType.date:ZodParsedType.object;default:return ZodParsedType.unknown}},ZodIssueCode=util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),quotelessJson=Ws=>JSON.stringify(Ws,null,2).replace(/"([^"]+)":/g,"$1:");class ZodError extends Error{get errors(){return this.issues}constructor(ws){super(),this.issues=[],this.addIssue=si=>{this.issues=[...this.issues,si]},this.addIssues=(si=[])=>{this.issues=[...this.issues,...si]};const oi=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,oi):this.__proto__=oi,this.name="ZodError",this.issues=ws}format(ws){const oi=ws||function(ai){return ai.message},si={_errors:[]},ii=ai=>{for(const li of ai.issues)if(li.code==="invalid_union")li.unionErrors.map(ii);else if(li.code==="invalid_return_type")ii(li.returnTypeError);else if(li.code==="invalid_arguments")ii(li.argumentsError);else if(li.path.length===0)si._errors.push(oi(li));else{let ci=si,ui=0;for(;ui<li.path.length;){const di=li.path[ui];ui===li.path.length-1?(ci[di]=ci[di]||{_errors:[]},ci[di]._errors.push(oi(li))):ci[di]=ci[di]||{_errors:[]},ci=ci[di],ui++}}};return ii(this),si}static assert(ws){if(!(ws instanceof ZodError))throw new Error(`Not a ZodError: ${ws}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(ws=oi=>oi.message){const oi={},si=[];for(const ii of this.issues)ii.path.length>0?(oi[ii.path[0]]=oi[ii.path[0]]||[],oi[ii.path[0]].push(ws(ii))):si.push(ws(ii));return{formErrors:si,fieldErrors:oi}}get formErrors(){return this.flatten()}}ZodError.create=Ws=>new ZodError(Ws);const errorMap=(Ws,ws)=>{let oi;switch(Ws.code){case ZodIssueCode.invalid_type:Ws.received===ZodParsedType.undefined?oi="Required":oi=`Expected ${Ws.expected}, received ${Ws.received}`;break;case ZodIssueCode.invalid_literal:oi=`Invalid literal value, expected ${JSON.stringify(Ws.expected,util.jsonStringifyReplacer)}`;break;case ZodIssueCode.unrecognized_keys:oi=`Unrecognized key(s) in object: ${util.joinValues(Ws.keys,", ")}`;break;case ZodIssueCode.invalid_union:oi="Invalid input";break;case ZodIssueCode.invalid_union_discriminator:oi=`Invalid discriminator value. Expected ${util.joinValues(Ws.options)}`;break;case ZodIssueCode.invalid_enum_value:oi=`Invalid enum value. Expected ${util.joinValues(Ws.options)}, received '${Ws.received}'`;break;case ZodIssueCode.invalid_arguments:oi="Invalid function arguments";break;case ZodIssueCode.invalid_return_type:oi="Invalid function return type";break;case ZodIssueCode.invalid_date:oi="Invalid date";break;case ZodIssueCode.invalid_string:typeof Ws.validation=="object"?"includes"in Ws.validation?(oi=`Invalid input: must include "${Ws.validation.includes}"`,typeof Ws.validation.position=="number"&&(oi=`${oi} at one or more positions greater than or equal to ${Ws.validation.position}`)):"startsWith"in Ws.validation?oi=`Invalid input: must start with "${Ws.validation.startsWith}"`:"endsWith"in Ws.validation?oi=`Invalid input: must end with "${Ws.validation.endsWith}"`:util.assertNever(Ws.validation):Ws.validation!=="regex"?oi=`Invalid ${Ws.validation}`:oi="Invalid";break;case ZodIssueCode.too_small:Ws.type==="array"?oi=`Array must contain ${Ws.exact?"exactly":Ws.inclusive?"at least":"more than"} ${Ws.minimum} element(s)`:Ws.type==="string"?oi=`String must contain ${Ws.exact?"exactly":Ws.inclusive?"at least":"over"} ${Ws.minimum} character(s)`:Ws.type==="number"?oi=`Number must be ${Ws.exact?"exactly equal to ":Ws.inclusive?"greater than or equal to ":"greater than "}${Ws.minimum}`:Ws.type==="date"?oi=`Date must be ${Ws.exact?"exactly equal to ":Ws.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(Ws.minimum))}`:oi="Invalid input";break;case ZodIssueCode.too_big:Ws.type==="array"?oi=`Array must contain ${Ws.exact?"exactly":Ws.inclusive?"at most":"less than"} ${Ws.maximum} element(s)`:Ws.type==="string"?oi=`String must contain ${Ws.exact?"exactly":Ws.inclusive?"at most":"under"} ${Ws.maximum} character(s)`:Ws.type==="number"?oi=`Number must be ${Ws.exact?"exactly":Ws.inclusive?"less than or equal to":"less than"} ${Ws.maximum}`:Ws.type==="bigint"?oi=`BigInt must be ${Ws.exact?"exactly":Ws.inclusive?"less than or equal to":"less than"} ${Ws.maximum}`:Ws.type==="date"?oi=`Date must be ${Ws.exact?"exactly":Ws.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(Ws.maximum))}`:oi="Invalid input";break;case ZodIssueCode.custom:oi="Invalid input";break;case ZodIssueCode.invalid_intersection_types:oi="Intersection results could not be merged";break;case ZodIssueCode.not_multiple_of:oi=`Number must be a multiple of ${Ws.multipleOf}`;break;case ZodIssueCode.not_finite:oi="Number must be finite";break;default:oi=ws.defaultError,util.assertNever(Ws)}return{message:oi}};let overrideErrorMap=errorMap;function setErrorMap(Ws){overrideErrorMap=Ws}function getErrorMap(){return overrideErrorMap}const makeIssue=Ws=>{const{data:ws,path:oi,errorMaps:si,issueData:ii}=Ws,ai=[...oi,...ii.path||[]],li={...ii,path:ai};if(ii.message!==void 0)return{...ii,path:ai,message:ii.message};let ci="";const ui=si.filter(di=>!!di).slice().reverse();for(const di of ui)ci=di(li,{data:ws,defaultError:ci}).message;return{...ii,path:ai,message:ci}},EMPTY_PATH=[];function addIssueToContext(Ws,ws){const oi=getErrorMap(),si=makeIssue({issueData:ws,data:Ws.data,path:Ws.path,errorMaps:[Ws.common.contextualErrorMap,Ws.schemaErrorMap,oi,oi===errorMap?void 0:errorMap].filter(ii=>!!ii)});Ws.common.issues.push(si)}class ParseStatus{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(ws,oi){const si=[];for(const ii of oi){if(ii.status==="aborted")return INVALID;ii.status==="dirty"&&ws.dirty(),si.push(ii.value)}return{status:ws.value,value:si}}static async mergeObjectAsync(ws,oi){const si=[];for(const ii of oi){const ai=await ii.key,li=await ii.value;si.push({key:ai,value:li})}return ParseStatus.mergeObjectSync(ws,si)}static mergeObjectSync(ws,oi){const si={};for(const ii of oi){const{key:ai,value:li}=ii;if(ai.status==="aborted"||li.status==="aborted")return INVALID;ai.status==="dirty"&&ws.dirty(),li.status==="dirty"&&ws.dirty(),ai.value!=="__proto__"&&(typeof li.value<"u"||ii.alwaysSet)&&(si[ai.value]=li.value)}return{status:ws.value,value:si}}}const INVALID=Object.freeze({status:"aborted"}),DIRTY=Ws=>({status:"dirty",value:Ws}),OK=Ws=>({status:"valid",value:Ws}),isAborted=Ws=>Ws.status==="aborted",isDirty=Ws=>Ws.status==="dirty",isValid=Ws=>Ws.status==="valid",isAsync=Ws=>typeof Promise<"u"&&Ws instanceof Promise;function __classPrivateFieldGet(Ws,ws,oi,si){if(typeof ws=="function"?Ws!==ws||!0:!ws.has(Ws))throw new TypeError("Cannot read private member from an object whose class did not declare it");return ws.get(Ws)}function __classPrivateFieldSet(Ws,ws,oi,si,ii){if(typeof ws=="function"?Ws!==ws||!0:!ws.has(Ws))throw new TypeError("Cannot write private member to an object whose class did not declare it");return ws.set(Ws,oi),oi}typeof SuppressedError=="function"&&SuppressedError;var errorUtil;(function(Ws){Ws.errToObj=ws=>typeof ws=="string"?{message:ws}:ws||{},Ws.toString=ws=>typeof ws=="string"?ws:ws==null?void 0:ws.message})(errorUtil||(errorUtil={}));var _ZodEnum_cache,_ZodNativeEnum_cache;class ParseInputLazyPath{constructor(ws,oi,si,ii){this._cachedPath=[],this.parent=ws,this.data=oi,this._path=si,this._key=ii}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const handleResult=(Ws,ws)=>{if(isValid(ws))return{success:!0,data:ws.value};if(!Ws.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const oi=new ZodError(Ws.common.issues);return this._error=oi,this._error}}};function processCreateParams(Ws){if(!Ws)return{};const{errorMap:ws,invalid_type_error:oi,required_error:si,description:ii}=Ws;if(ws&&(oi||si))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return ws?{errorMap:ws,description:ii}:{errorMap:(li,ci)=>{var ui,di;const{message:hi}=Ws;return li.code==="invalid_enum_value"?{message:hi??ci.defaultError}:typeof ci.data>"u"?{message:(ui=hi??si)!==null&&ui!==void 0?ui:ci.defaultError}:li.code!=="invalid_type"?{message:ci.defaultError}:{message:(di=hi??oi)!==null&&di!==void 0?di:ci.defaultError}},description:ii}}class ZodType{get description(){return this._def.description}_getType(ws){return getParsedType(ws.data)}_getOrReturnCtx(ws,oi){return oi||{common:ws.parent.common,data:ws.data,parsedType:getParsedType(ws.data),schemaErrorMap:this._def.errorMap,path:ws.path,parent:ws.parent}}_processInputParams(ws){return{status:new ParseStatus,ctx:{common:ws.parent.common,data:ws.data,parsedType:getParsedType(ws.data),schemaErrorMap:this._def.errorMap,path:ws.path,parent:ws.parent}}}_parseSync(ws){const oi=this._parse(ws);if(isAsync(oi))throw new Error("Synchronous parse encountered promise.");return oi}_parseAsync(ws){const oi=this._parse(ws);return Promise.resolve(oi)}parse(ws,oi){const si=this.safeParse(ws,oi);if(si.success)return si.data;throw si.error}safeParse(ws,oi){var si;const ii={common:{issues:[],async:(si=oi==null?void 0:oi.async)!==null&&si!==void 0?si:!1,contextualErrorMap:oi==null?void 0:oi.errorMap},path:(oi==null?void 0:oi.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:ws,parsedType:getParsedType(ws)},ai=this._parseSync({data:ws,path:ii.path,parent:ii});return handleResult(ii,ai)}"~validate"(ws){var oi,si;const ii={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:ws,parsedType:getParsedType(ws)};if(!this["~standard"].async)try{const ai=this._parseSync({data:ws,path:[],parent:ii});return isValid(ai)?{value:ai.value}:{issues:ii.common.issues}}catch(ai){!((si=(oi=ai==null?void 0:ai.message)===null||oi===void 0?void 0:oi.toLowerCase())===null||si===void 0)&&si.includes("encountered")&&(this["~standard"].async=!0),ii.common={issues:[],async:!0}}return this._parseAsync({data:ws,path:[],parent:ii}).then(ai=>isValid(ai)?{value:ai.value}:{issues:ii.common.issues})}async parseAsync(ws,oi){const si=await this.safeParseAsync(ws,oi);if(si.success)return si.data;throw si.error}async safeParseAsync(ws,oi){const si={common:{issues:[],contextualErrorMap:oi==null?void 0:oi.errorMap,async:!0},path:(oi==null?void 0:oi.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:ws,parsedType:getParsedType(ws)},ii=this._parse({data:ws,path:si.path,parent:si}),ai=await(isAsync(ii)?ii:Promise.resolve(ii));return handleResult(si,ai)}refine(ws,oi){const si=ii=>typeof oi=="string"||typeof oi>"u"?{message:oi}:typeof oi=="function"?oi(ii):oi;return this._refinement((ii,ai)=>{const li=ws(ii),ci=()=>ai.addIssue({code:ZodIssueCode.custom,...si(ii)});return typeof Promise<"u"&&li instanceof Promise?li.then(ui=>ui?!0:(ci(),!1)):li?!0:(ci(),!1)})}refinement(ws,oi){return this._refinement((si,ii)=>ws(si)?!0:(ii.addIssue(typeof oi=="function"?oi(si,ii):oi),!1))}_refinement(ws){return new ZodEffects({schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"refinement",refinement:ws}})}superRefine(ws){return this._refinement(ws)}constructor(ws){this.spa=this.safeParseAsync,this._def=ws,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:oi=>this["~validate"](oi)}}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this)}promise(){return ZodPromise.create(this,this._def)}or(ws){return ZodUnion.create([this,ws],this._def)}and(ws){return ZodIntersection.create(this,ws,this._def)}transform(ws){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"transform",transform:ws}})}default(ws){const oi=typeof ws=="function"?ws:()=>ws;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:oi,typeName:ZodFirstPartyTypeKind.ZodDefault})}brand(){return new ZodBranded({typeName:ZodFirstPartyTypeKind.ZodBranded,type:this,...processCreateParams(this._def)})}catch(ws){const oi=typeof ws=="function"?ws:()=>ws;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:oi,typeName:ZodFirstPartyTypeKind.ZodCatch})}describe(ws){const oi=this.constructor;return new oi({...this._def,description:ws})}pipe(ws){return ZodPipeline.create(this,ws)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cuidRegex=/^c[^\s-]{8,}$/i,cuid2Regex=/^[0-9a-z]+$/,ulidRegex=/^[0-9A-HJKMNP-TV-Z]{26}$/i,uuidRegex=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,nanoidRegex=/^[a-z0-9_-]{21}$/i,jwtRegex=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,durationRegex=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,emailRegex=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_emojiRegex="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let emojiRegex;const ipv4Regex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4CidrRegex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6Regex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ipv6CidrRegex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64Regex=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64urlRegex=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dateRegexSource="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",dateRegex=new RegExp(`^${dateRegexSource}$`);function timeRegexSource(Ws){let ws="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return Ws.precision?ws=`${ws}\\.\\d{${Ws.precision}}`:Ws.precision==null&&(ws=`${ws}(\\.\\d+)?`),ws}function timeRegex(Ws){return new RegExp(`^${timeRegexSource(Ws)}$`)}function datetimeRegex(Ws){let ws=`${dateRegexSource}T${timeRegexSource(Ws)}`;const oi=[];return oi.push(Ws.local?"Z?":"Z"),Ws.offset&&oi.push("([+-]\\d{2}:?\\d{2})"),ws=`${ws}(${oi.join("|")})`,new RegExp(`^${ws}$`)}function isValidIP(Ws,ws){return!!((ws==="v4"||!ws)&&ipv4Regex.test(Ws)||(ws==="v6"||!ws)&&ipv6Regex.test(Ws))}function isValidJWT(Ws,ws){if(!jwtRegex.test(Ws))return!1;try{const[oi]=Ws.split("."),si=oi.replace(/-/g,"+").replace(/_/g,"/").padEnd(oi.length+(4-oi.length%4)%4,"="),ii=JSON.parse(atob(si));return!(typeof ii!="object"||ii===null||!ii.typ||!ii.alg||ws&&ii.alg!==ws)}catch{return!1}}function isValidCidr(Ws,ws){return!!((ws==="v4"||!ws)&&ipv4CidrRegex.test(Ws)||(ws==="v6"||!ws)&&ipv6CidrRegex.test(Ws))}class ZodString extends ZodType{_parse(ws){if(this._def.coerce&&(ws.data=String(ws.data)),this._getType(ws)!==ZodParsedType.string){const ai=this._getOrReturnCtx(ws);return addIssueToContext(ai,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.string,received:ai.parsedType}),INVALID}const si=new ParseStatus;let ii;for(const ai of this._def.checks)if(ai.kind==="min")ws.data.length<ai.value&&(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.too_small,minimum:ai.value,type:"string",inclusive:!0,exact:!1,message:ai.message}),si.dirty());else if(ai.kind==="max")ws.data.length>ai.value&&(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.too_big,maximum:ai.value,type:"string",inclusive:!0,exact:!1,message:ai.message}),si.dirty());else if(ai.kind==="length"){const li=ws.data.length>ai.value,ci=ws.data.length<ai.value;(li||ci)&&(ii=this._getOrReturnCtx(ws,ii),li?addIssueToContext(ii,{code:ZodIssueCode.too_big,maximum:ai.value,type:"string",inclusive:!0,exact:!0,message:ai.message}):ci&&addIssueToContext(ii,{code:ZodIssueCode.too_small,minimum:ai.value,type:"string",inclusive:!0,exact:!0,message:ai.message}),si.dirty())}else if(ai.kind==="email")emailRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"email",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty());else if(ai.kind==="emoji")emojiRegex||(emojiRegex=new RegExp(_emojiRegex,"u")),emojiRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"emoji",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty());else if(ai.kind==="uuid")uuidRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"uuid",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty());else if(ai.kind==="nanoid")nanoidRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"nanoid",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty());else if(ai.kind==="cuid")cuidRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"cuid",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty());else if(ai.kind==="cuid2")cuid2Regex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"cuid2",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty());else if(ai.kind==="ulid")ulidRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"ulid",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty());else if(ai.kind==="url")try{new URL(ws.data)}catch{ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"url",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty()}else ai.kind==="regex"?(ai.regex.lastIndex=0,ai.regex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"regex",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty())):ai.kind==="trim"?ws.data=ws.data.trim():ai.kind==="includes"?ws.data.includes(ai.value,ai.position)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.invalid_string,validation:{includes:ai.value,position:ai.position},message:ai.message}),si.dirty()):ai.kind==="toLowerCase"?ws.data=ws.data.toLowerCase():ai.kind==="toUpperCase"?ws.data=ws.data.toUpperCase():ai.kind==="startsWith"?ws.data.startsWith(ai.value)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.invalid_string,validation:{startsWith:ai.value},message:ai.message}),si.dirty()):ai.kind==="endsWith"?ws.data.endsWith(ai.value)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.invalid_string,validation:{endsWith:ai.value},message:ai.message}),si.dirty()):ai.kind==="datetime"?datetimeRegex(ai).test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.invalid_string,validation:"datetime",message:ai.message}),si.dirty()):ai.kind==="date"?dateRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.invalid_string,validation:"date",message:ai.message}),si.dirty()):ai.kind==="time"?timeRegex(ai).test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.invalid_string,validation:"time",message:ai.message}),si.dirty()):ai.kind==="duration"?durationRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"duration",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty()):ai.kind==="ip"?isValidIP(ws.data,ai.version)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"ip",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty()):ai.kind==="jwt"?isValidJWT(ws.data,ai.alg)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"jwt",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty()):ai.kind==="cidr"?isValidCidr(ws.data,ai.version)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"cidr",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty()):ai.kind==="base64"?base64Regex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"base64",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty()):ai.kind==="base64url"?base64urlRegex.test(ws.data)||(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{validation:"base64url",code:ZodIssueCode.invalid_string,message:ai.message}),si.dirty()):util.assertNever(ai);return{status:si.value,value:ws.data}}_regex(ws,oi,si){return this.refinement(ii=>ws.test(ii),{validation:oi,code:ZodIssueCode.invalid_string,...errorUtil.errToObj(si)})}_addCheck(ws){return new ZodString({...this._def,checks:[...this._def.checks,ws]})}email(ws){return this._addCheck({kind:"email",...errorUtil.errToObj(ws)})}url(ws){return this._addCheck({kind:"url",...errorUtil.errToObj(ws)})}emoji(ws){return this._addCheck({kind:"emoji",...errorUtil.errToObj(ws)})}uuid(ws){return this._addCheck({kind:"uuid",...errorUtil.errToObj(ws)})}nanoid(ws){return this._addCheck({kind:"nanoid",...errorUtil.errToObj(ws)})}cuid(ws){return this._addCheck({kind:"cuid",...errorUtil.errToObj(ws)})}cuid2(ws){return this._addCheck({kind:"cuid2",...errorUtil.errToObj(ws)})}ulid(ws){return this._addCheck({kind:"ulid",...errorUtil.errToObj(ws)})}base64(ws){return this._addCheck({kind:"base64",...errorUtil.errToObj(ws)})}base64url(ws){return this._addCheck({kind:"base64url",...errorUtil.errToObj(ws)})}jwt(ws){return this._addCheck({kind:"jwt",...errorUtil.errToObj(ws)})}ip(ws){return this._addCheck({kind:"ip",...errorUtil.errToObj(ws)})}cidr(ws){return this._addCheck({kind:"cidr",...errorUtil.errToObj(ws)})}datetime(ws){var oi,si;return typeof ws=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:ws}):this._addCheck({kind:"datetime",precision:typeof(ws==null?void 0:ws.precision)>"u"?null:ws==null?void 0:ws.precision,offset:(oi=ws==null?void 0:ws.offset)!==null&&oi!==void 0?oi:!1,local:(si=ws==null?void 0:ws.local)!==null&&si!==void 0?si:!1,...errorUtil.errToObj(ws==null?void 0:ws.message)})}date(ws){return this._addCheck({kind:"date",message:ws})}time(ws){return typeof ws=="string"?this._addCheck({kind:"time",precision:null,message:ws}):this._addCheck({kind:"time",precision:typeof(ws==null?void 0:ws.precision)>"u"?null:ws==null?void 0:ws.precision,...errorUtil.errToObj(ws==null?void 0:ws.message)})}duration(ws){return this._addCheck({kind:"duration",...errorUtil.errToObj(ws)})}regex(ws,oi){return this._addCheck({kind:"regex",regex:ws,...errorUtil.errToObj(oi)})}includes(ws,oi){return this._addCheck({kind:"includes",value:ws,position:oi==null?void 0:oi.position,...errorUtil.errToObj(oi==null?void 0:oi.message)})}startsWith(ws,oi){return this._addCheck({kind:"startsWith",value:ws,...errorUtil.errToObj(oi)})}endsWith(ws,oi){return this._addCheck({kind:"endsWith",value:ws,...errorUtil.errToObj(oi)})}min(ws,oi){return this._addCheck({kind:"min",value:ws,...errorUtil.errToObj(oi)})}max(ws,oi){return this._addCheck({kind:"max",value:ws,...errorUtil.errToObj(oi)})}length(ws,oi){return this._addCheck({kind:"length",value:ws,...errorUtil.errToObj(oi)})}nonempty(ws){return this.min(1,errorUtil.errToObj(ws))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(ws=>ws.kind==="datetime")}get isDate(){return!!this._def.checks.find(ws=>ws.kind==="date")}get isTime(){return!!this._def.checks.find(ws=>ws.kind==="time")}get isDuration(){return!!this._def.checks.find(ws=>ws.kind==="duration")}get isEmail(){return!!this._def.checks.find(ws=>ws.kind==="email")}get isURL(){return!!this._def.checks.find(ws=>ws.kind==="url")}get isEmoji(){return!!this._def.checks.find(ws=>ws.kind==="emoji")}get isUUID(){return!!this._def.checks.find(ws=>ws.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(ws=>ws.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(ws=>ws.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(ws=>ws.kind==="cuid2")}get isULID(){return!!this._def.checks.find(ws=>ws.kind==="ulid")}get isIP(){return!!this._def.checks.find(ws=>ws.kind==="ip")}get isCIDR(){return!!this._def.checks.find(ws=>ws.kind==="cidr")}get isBase64(){return!!this._def.checks.find(ws=>ws.kind==="base64")}get isBase64url(){return!!this._def.checks.find(ws=>ws.kind==="base64url")}get minLength(){let ws=null;for(const oi of this._def.checks)oi.kind==="min"&&(ws===null||oi.value>ws)&&(ws=oi.value);return ws}get maxLength(){let ws=null;for(const oi of this._def.checks)oi.kind==="max"&&(ws===null||oi.value<ws)&&(ws=oi.value);return ws}}ZodString.create=Ws=>{var ws;return new ZodString({checks:[],typeName:ZodFirstPartyTypeKind.ZodString,coerce:(ws=Ws==null?void 0:Ws.coerce)!==null&&ws!==void 0?ws:!1,...processCreateParams(Ws)})};function floatSafeRemainder(Ws,ws){const oi=(Ws.toString().split(".")[1]||"").length,si=(ws.toString().split(".")[1]||"").length,ii=oi>si?oi:si,ai=parseInt(Ws.toFixed(ii).replace(".","")),li=parseInt(ws.toFixed(ii).replace(".",""));return ai%li/Math.pow(10,ii)}class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(ws){if(this._def.coerce&&(ws.data=Number(ws.data)),this._getType(ws)!==ZodParsedType.number){const ai=this._getOrReturnCtx(ws);return addIssueToContext(ai,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.number,received:ai.parsedType}),INVALID}let si;const ii=new ParseStatus;for(const ai of this._def.checks)ai.kind==="int"?util.isInteger(ws.data)||(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:"integer",received:"float",message:ai.message}),ii.dirty()):ai.kind==="min"?(ai.inclusive?ws.data<ai.value:ws.data<=ai.value)&&(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.too_small,minimum:ai.value,type:"number",inclusive:ai.inclusive,exact:!1,message:ai.message}),ii.dirty()):ai.kind==="max"?(ai.inclusive?ws.data>ai.value:ws.data>=ai.value)&&(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.too_big,maximum:ai.value,type:"number",inclusive:ai.inclusive,exact:!1,message:ai.message}),ii.dirty()):ai.kind==="multipleOf"?floatSafeRemainder(ws.data,ai.value)!==0&&(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.not_multiple_of,multipleOf:ai.value,message:ai.message}),ii.dirty()):ai.kind==="finite"?Number.isFinite(ws.data)||(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.not_finite,message:ai.message}),ii.dirty()):util.assertNever(ai);return{status:ii.value,value:ws.data}}gte(ws,oi){return this.setLimit("min",ws,!0,errorUtil.toString(oi))}gt(ws,oi){return this.setLimit("min",ws,!1,errorUtil.toString(oi))}lte(ws,oi){return this.setLimit("max",ws,!0,errorUtil.toString(oi))}lt(ws,oi){return this.setLimit("max",ws,!1,errorUtil.toString(oi))}setLimit(ws,oi,si,ii){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:ws,value:oi,inclusive:si,message:errorUtil.toString(ii)}]})}_addCheck(ws){return new ZodNumber({...this._def,checks:[...this._def.checks,ws]})}int(ws){return this._addCheck({kind:"int",message:errorUtil.toString(ws)})}positive(ws){return this._addCheck({kind:"min",value:0,inclusive:!1,message:errorUtil.toString(ws)})}negative(ws){return this._addCheck({kind:"max",value:0,inclusive:!1,message:errorUtil.toString(ws)})}nonpositive(ws){return this._addCheck({kind:"max",value:0,inclusive:!0,message:errorUtil.toString(ws)})}nonnegative(ws){return this._addCheck({kind:"min",value:0,inclusive:!0,message:errorUtil.toString(ws)})}multipleOf(ws,oi){return this._addCheck({kind:"multipleOf",value:ws,message:errorUtil.toString(oi)})}finite(ws){return this._addCheck({kind:"finite",message:errorUtil.toString(ws)})}safe(ws){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:errorUtil.toString(ws)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:errorUtil.toString(ws)})}get minValue(){let ws=null;for(const oi of this._def.checks)oi.kind==="min"&&(ws===null||oi.value>ws)&&(ws=oi.value);return ws}get maxValue(){let ws=null;for(const oi of this._def.checks)oi.kind==="max"&&(ws===null||oi.value<ws)&&(ws=oi.value);return ws}get isInt(){return!!this._def.checks.find(ws=>ws.kind==="int"||ws.kind==="multipleOf"&&util.isInteger(ws.value))}get isFinite(){let ws=null,oi=null;for(const si of this._def.checks){if(si.kind==="finite"||si.kind==="int"||si.kind==="multipleOf")return!0;si.kind==="min"?(oi===null||si.value>oi)&&(oi=si.value):si.kind==="max"&&(ws===null||si.value<ws)&&(ws=si.value)}return Number.isFinite(oi)&&Number.isFinite(ws)}}ZodNumber.create=Ws=>new ZodNumber({checks:[],typeName:ZodFirstPartyTypeKind.ZodNumber,coerce:(Ws==null?void 0:Ws.coerce)||!1,...processCreateParams(Ws)});class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(ws){if(this._def.coerce)try{ws.data=BigInt(ws.data)}catch{return this._getInvalidInput(ws)}if(this._getType(ws)!==ZodParsedType.bigint)return this._getInvalidInput(ws);let si;const ii=new ParseStatus;for(const ai of this._def.checks)ai.kind==="min"?(ai.inclusive?ws.data<ai.value:ws.data<=ai.value)&&(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.too_small,type:"bigint",minimum:ai.value,inclusive:ai.inclusive,message:ai.message}),ii.dirty()):ai.kind==="max"?(ai.inclusive?ws.data>ai.value:ws.data>=ai.value)&&(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.too_big,type:"bigint",maximum:ai.value,inclusive:ai.inclusive,message:ai.message}),ii.dirty()):ai.kind==="multipleOf"?ws.data%ai.value!==BigInt(0)&&(si=this._getOrReturnCtx(ws,si),addIssueToContext(si,{code:ZodIssueCode.not_multiple_of,multipleOf:ai.value,message:ai.message}),ii.dirty()):util.assertNever(ai);return{status:ii.value,value:ws.data}}_getInvalidInput(ws){const oi=this._getOrReturnCtx(ws);return addIssueToContext(oi,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.bigint,received:oi.parsedType}),INVALID}gte(ws,oi){return this.setLimit("min",ws,!0,errorUtil.toString(oi))}gt(ws,oi){return this.setLimit("min",ws,!1,errorUtil.toString(oi))}lte(ws,oi){return this.setLimit("max",ws,!0,errorUtil.toString(oi))}lt(ws,oi){return this.setLimit("max",ws,!1,errorUtil.toString(oi))}setLimit(ws,oi,si,ii){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:ws,value:oi,inclusive:si,message:errorUtil.toString(ii)}]})}_addCheck(ws){return new ZodBigInt({...this._def,checks:[...this._def.checks,ws]})}positive(ws){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:errorUtil.toString(ws)})}negative(ws){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:errorUtil.toString(ws)})}nonpositive(ws){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:errorUtil.toString(ws)})}nonnegative(ws){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:errorUtil.toString(ws)})}multipleOf(ws,oi){return this._addCheck({kind:"multipleOf",value:ws,message:errorUtil.toString(oi)})}get minValue(){let ws=null;for(const oi of this._def.checks)oi.kind==="min"&&(ws===null||oi.value>ws)&&(ws=oi.value);return ws}get maxValue(){let ws=null;for(const oi of this._def.checks)oi.kind==="max"&&(ws===null||oi.value<ws)&&(ws=oi.value);return ws}}ZodBigInt.create=Ws=>{var ws;return new ZodBigInt({checks:[],typeName:ZodFirstPartyTypeKind.ZodBigInt,coerce:(ws=Ws==null?void 0:Ws.coerce)!==null&&ws!==void 0?ws:!1,...processCreateParams(Ws)})};class ZodBoolean extends ZodType{_parse(ws){if(this._def.coerce&&(ws.data=!!ws.data),this._getType(ws)!==ZodParsedType.boolean){const si=this._getOrReturnCtx(ws);return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.boolean,received:si.parsedType}),INVALID}return OK(ws.data)}}ZodBoolean.create=Ws=>new ZodBoolean({typeName:ZodFirstPartyTypeKind.ZodBoolean,coerce:(Ws==null?void 0:Ws.coerce)||!1,...processCreateParams(Ws)});class ZodDate extends ZodType{_parse(ws){if(this._def.coerce&&(ws.data=new Date(ws.data)),this._getType(ws)!==ZodParsedType.date){const ai=this._getOrReturnCtx(ws);return addIssueToContext(ai,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.date,received:ai.parsedType}),INVALID}if(isNaN(ws.data.getTime())){const ai=this._getOrReturnCtx(ws);return addIssueToContext(ai,{code:ZodIssueCode.invalid_date}),INVALID}const si=new ParseStatus;let ii;for(const ai of this._def.checks)ai.kind==="min"?ws.data.getTime()<ai.value&&(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.too_small,message:ai.message,inclusive:!0,exact:!1,minimum:ai.value,type:"date"}),si.dirty()):ai.kind==="max"?ws.data.getTime()>ai.value&&(ii=this._getOrReturnCtx(ws,ii),addIssueToContext(ii,{code:ZodIssueCode.too_big,message:ai.message,inclusive:!0,exact:!1,maximum:ai.value,type:"date"}),si.dirty()):util.assertNever(ai);return{status:si.value,value:new Date(ws.data.getTime())}}_addCheck(ws){return new ZodDate({...this._def,checks:[...this._def.checks,ws]})}min(ws,oi){return this._addCheck({kind:"min",value:ws.getTime(),message:errorUtil.toString(oi)})}max(ws,oi){return this._addCheck({kind:"max",value:ws.getTime(),message:errorUtil.toString(oi)})}get minDate(){let ws=null;for(const oi of this._def.checks)oi.kind==="min"&&(ws===null||oi.value>ws)&&(ws=oi.value);return ws!=null?new Date(ws):null}get maxDate(){let ws=null;for(const oi of this._def.checks)oi.kind==="max"&&(ws===null||oi.value<ws)&&(ws=oi.value);return ws!=null?new Date(ws):null}}ZodDate.create=Ws=>new ZodDate({checks:[],coerce:(Ws==null?void 0:Ws.coerce)||!1,typeName:ZodFirstPartyTypeKind.ZodDate,...processCreateParams(Ws)});class ZodSymbol extends ZodType{_parse(ws){if(this._getType(ws)!==ZodParsedType.symbol){const si=this._getOrReturnCtx(ws);return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.symbol,received:si.parsedType}),INVALID}return OK(ws.data)}}ZodSymbol.create=Ws=>new ZodSymbol({typeName:ZodFirstPartyTypeKind.ZodSymbol,...processCreateParams(Ws)});class ZodUndefined extends ZodType{_parse(ws){if(this._getType(ws)!==ZodParsedType.undefined){const si=this._getOrReturnCtx(ws);return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.undefined,received:si.parsedType}),INVALID}return OK(ws.data)}}ZodUndefined.create=Ws=>new ZodUndefined({typeName:ZodFirstPartyTypeKind.ZodUndefined,...processCreateParams(Ws)});class ZodNull extends ZodType{_parse(ws){if(this._getType(ws)!==ZodParsedType.null){const si=this._getOrReturnCtx(ws);return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.null,received:si.parsedType}),INVALID}return OK(ws.data)}}ZodNull.create=Ws=>new ZodNull({typeName:ZodFirstPartyTypeKind.ZodNull,...processCreateParams(Ws)});class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(ws){return OK(ws.data)}}ZodAny.create=Ws=>new ZodAny({typeName:ZodFirstPartyTypeKind.ZodAny,...processCreateParams(Ws)});class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(ws){return OK(ws.data)}}ZodUnknown.create=Ws=>new ZodUnknown({typeName:ZodFirstPartyTypeKind.ZodUnknown,...processCreateParams(Ws)});class ZodNever extends ZodType{_parse(ws){const oi=this._getOrReturnCtx(ws);return addIssueToContext(oi,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.never,received:oi.parsedType}),INVALID}}ZodNever.create=Ws=>new ZodNever({typeName:ZodFirstPartyTypeKind.ZodNever,...processCreateParams(Ws)});class ZodVoid extends ZodType{_parse(ws){if(this._getType(ws)!==ZodParsedType.undefined){const si=this._getOrReturnCtx(ws);return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.void,received:si.parsedType}),INVALID}return OK(ws.data)}}ZodVoid.create=Ws=>new ZodVoid({typeName:ZodFirstPartyTypeKind.ZodVoid,...processCreateParams(Ws)});class ZodArray extends ZodType{_parse(ws){const{ctx:oi,status:si}=this._processInputParams(ws),ii=this._def;if(oi.parsedType!==ZodParsedType.array)return addIssueToContext(oi,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:oi.parsedType}),INVALID;if(ii.exactLength!==null){const li=oi.data.length>ii.exactLength.value,ci=oi.data.length<ii.exactLength.value;(li||ci)&&(addIssueToContext(oi,{code:li?ZodIssueCode.too_big:ZodIssueCode.too_small,minimum:ci?ii.exactLength.value:void 0,maximum:li?ii.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:ii.exactLength.message}),si.dirty())}if(ii.minLength!==null&&oi.data.length<ii.minLength.value&&(addIssueToContext(oi,{code:ZodIssueCode.too_small,minimum:ii.minLength.value,type:"array",inclusive:!0,exact:!1,message:ii.minLength.message}),si.dirty()),ii.maxLength!==null&&oi.data.length>ii.maxLength.value&&(addIssueToContext(oi,{code:ZodIssueCode.too_big,maximum:ii.maxLength.value,type:"array",inclusive:!0,exact:!1,message:ii.maxLength.message}),si.dirty()),oi.common.async)return Promise.all([...oi.data].map((li,ci)=>ii.type._parseAsync(new ParseInputLazyPath(oi,li,oi.path,ci)))).then(li=>ParseStatus.mergeArray(si,li));const ai=[...oi.data].map((li,ci)=>ii.type._parseSync(new ParseInputLazyPath(oi,li,oi.path,ci)));return ParseStatus.mergeArray(si,ai)}get element(){return this._def.type}min(ws,oi){return new ZodArray({...this._def,minLength:{value:ws,message:errorUtil.toString(oi)}})}max(ws,oi){return new ZodArray({...this._def,maxLength:{value:ws,message:errorUtil.toString(oi)}})}length(ws,oi){return new ZodArray({...this._def,exactLength:{value:ws,message:errorUtil.toString(oi)}})}nonempty(ws){return this.min(1,ws)}}ZodArray.create=(Ws,ws)=>new ZodArray({type:Ws,minLength:null,maxLength:null,exactLength:null,typeName:ZodFirstPartyTypeKind.ZodArray,...processCreateParams(ws)});function deepPartialify(Ws){if(Ws instanceof ZodObject){const ws={};for(const oi in Ws.shape){const si=Ws.shape[oi];ws[oi]=ZodOptional.create(deepPartialify(si))}return new ZodObject({...Ws._def,shape:()=>ws})}else return Ws instanceof ZodArray?new ZodArray({...Ws._def,type:deepPartialify(Ws.element)}):Ws instanceof ZodOptional?ZodOptional.create(deepPartialify(Ws.unwrap())):Ws instanceof ZodNullable?ZodNullable.create(deepPartialify(Ws.unwrap())):Ws instanceof ZodTuple?ZodTuple.create(Ws.items.map(ws=>deepPartialify(ws))):Ws}class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const ws=this._def.shape(),oi=util.objectKeys(ws);return this._cached={shape:ws,keys:oi}}_parse(ws){if(this._getType(ws)!==ZodParsedType.object){const di=this._getOrReturnCtx(ws);return addIssueToContext(di,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:di.parsedType}),INVALID}const{status:si,ctx:ii}=this._processInputParams(ws),{shape:ai,keys:li}=this._getCached(),ci=[];if(!(this._def.catchall instanceof ZodNever&&this._def.unknownKeys==="strip"))for(const di in ii.data)li.includes(di)||ci.push(di);const ui=[];for(const di of li){const hi=ai[di],pi=ii.data[di];ui.push({key:{status:"valid",value:di},value:hi._parse(new ParseInputLazyPath(ii,pi,ii.path,di)),alwaysSet:di in ii.data})}if(this._def.catchall instanceof ZodNever){const di=this._def.unknownKeys;if(di==="passthrough")for(const hi of ci)ui.push({key:{status:"valid",value:hi},value:{status:"valid",value:ii.data[hi]}});else if(di==="strict")ci.length>0&&(addIssueToContext(ii,{code:ZodIssueCode.unrecognized_keys,keys:ci}),si.dirty());else if(di!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const di=this._def.catchall;for(const hi of ci){const pi=ii.data[hi];ui.push({key:{status:"valid",value:hi},value:di._parse(new ParseInputLazyPath(ii,pi,ii.path,hi)),alwaysSet:hi in ii.data})}}return ii.common.async?Promise.resolve().then(async()=>{const di=[];for(const hi of ui){const pi=await hi.key,ha=await hi.value;di.push({key:pi,value:ha,alwaysSet:hi.alwaysSet})}return di}).then(di=>ParseStatus.mergeObjectSync(si,di)):ParseStatus.mergeObjectSync(si,ui)}get shape(){return this._def.shape()}strict(ws){return errorUtil.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...ws!==void 0?{errorMap:(oi,si)=>{var ii,ai,li,ci;const ui=(li=(ai=(ii=this._def).errorMap)===null||ai===void 0?void 0:ai.call(ii,oi,si).message)!==null&&li!==void 0?li:si.defaultError;return oi.code==="unrecognized_keys"?{message:(ci=errorUtil.errToObj(ws).message)!==null&&ci!==void 0?ci:ui}:{message:ui}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(ws){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...ws})})}merge(ws){return new ZodObject({unknownKeys:ws._def.unknownKeys,catchall:ws._def.catchall,shape:()=>({...this._def.shape(),...ws._def.shape()}),typeName:ZodFirstPartyTypeKind.ZodObject})}setKey(ws,oi){return this.augment({[ws]:oi})}catchall(ws){return new ZodObject({...this._def,catchall:ws})}pick(ws){const oi={};return util.objectKeys(ws).forEach(si=>{ws[si]&&this.shape[si]&&(oi[si]=this.shape[si])}),new ZodObject({...this._def,shape:()=>oi})}omit(ws){const oi={};return util.objectKeys(this.shape).forEach(si=>{ws[si]||(oi[si]=this.shape[si])}),new ZodObject({...this._def,shape:()=>oi})}deepPartial(){return deepPartialify(this)}partial(ws){const oi={};return util.objectKeys(this.shape).forEach(si=>{const ii=this.shape[si];ws&&!ws[si]?oi[si]=ii:oi[si]=ii.optional()}),new ZodObject({...this._def,shape:()=>oi})}required(ws){const oi={};return util.objectKeys(this.shape).forEach(si=>{if(ws&&!ws[si])oi[si]=this.shape[si];else{let ai=this.shape[si];for(;ai instanceof ZodOptional;)ai=ai._def.innerType;oi[si]=ai}}),new ZodObject({...this._def,shape:()=>oi})}keyof(){return createZodEnum(util.objectKeys(this.shape))}}ZodObject.create=(Ws,ws)=>new ZodObject({shape:()=>Ws,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(ws)});ZodObject.strictCreate=(Ws,ws)=>new ZodObject({shape:()=>Ws,unknownKeys:"strict",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(ws)});ZodObject.lazycreate=(Ws,ws)=>new ZodObject({shape:Ws,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(ws)});class ZodUnion extends ZodType{_parse(ws){const{ctx:oi}=this._processInputParams(ws),si=this._def.options;function ii(ai){for(const ci of ai)if(ci.result.status==="valid")return ci.result;for(const ci of ai)if(ci.result.status==="dirty")return oi.common.issues.push(...ci.ctx.common.issues),ci.result;const li=ai.map(ci=>new ZodError(ci.ctx.common.issues));return addIssueToContext(oi,{code:ZodIssueCode.invalid_union,unionErrors:li}),INVALID}if(oi.common.async)return Promise.all(si.map(async ai=>{const li={...oi,common:{...oi.common,issues:[]},parent:null};return{result:await ai._parseAsync({data:oi.data,path:oi.path,parent:li}),ctx:li}})).then(ii);{let ai;const li=[];for(const ui of si){const di={...oi,common:{...oi.common,issues:[]},parent:null},hi=ui._parseSync({data:oi.data,path:oi.path,parent:di});if(hi.status==="valid")return hi;hi.status==="dirty"&&!ai&&(ai={result:hi,ctx:di}),di.common.issues.length&&li.push(di.common.issues)}if(ai)return oi.common.issues.push(...ai.ctx.common.issues),ai.result;const ci=li.map(ui=>new ZodError(ui));return addIssueToContext(oi,{code:ZodIssueCode.invalid_union,unionErrors:ci}),INVALID}}get options(){return this._def.options}}ZodUnion.create=(Ws,ws)=>new ZodUnion({options:Ws,typeName:ZodFirstPartyTypeKind.ZodUnion,...processCreateParams(ws)});const getDiscriminator=Ws=>Ws instanceof ZodLazy?getDiscriminator(Ws.schema):Ws instanceof ZodEffects?getDiscriminator(Ws.innerType()):Ws instanceof ZodLiteral?[Ws.value]:Ws instanceof ZodEnum?Ws.options:Ws instanceof ZodNativeEnum?util.objectValues(Ws.enum):Ws instanceof ZodDefault?getDiscriminator(Ws._def.innerType):Ws instanceof ZodUndefined?[void 0]:Ws instanceof ZodNull?[null]:Ws instanceof ZodOptional?[void 0,...getDiscriminator(Ws.unwrap())]:Ws instanceof ZodNullable?[null,...getDiscriminator(Ws.unwrap())]:Ws instanceof ZodBranded||Ws instanceof ZodReadonly?getDiscriminator(Ws.unwrap()):Ws instanceof ZodCatch?getDiscriminator(Ws._def.innerType):[];class ZodDiscriminatedUnion extends ZodType{_parse(ws){const{ctx:oi}=this._processInputParams(ws);if(oi.parsedType!==ZodParsedType.object)return addIssueToContext(oi,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:oi.parsedType}),INVALID;const si=this.discriminator,ii=oi.data[si],ai=this.optionsMap.get(ii);return ai?oi.common.async?ai._parseAsync({data:oi.data,path:oi.path,parent:oi}):ai._parseSync({data:oi.data,path:oi.path,parent:oi}):(addIssueToContext(oi,{code:ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[si]}),INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(ws,oi,si){const ii=new Map;for(const ai of oi){const li=getDiscriminator(ai.shape[ws]);if(!li.length)throw new Error(`A discriminator value for key \`${ws}\` could not be extracted from all schema options`);for(const ci of li){if(ii.has(ci))throw new Error(`Discriminator property ${String(ws)} has duplicate value ${String(ci)}`);ii.set(ci,ai)}}return new ZodDiscriminatedUnion({typeName:ZodFirstPartyTypeKind.ZodDiscriminatedUnion,discriminator:ws,options:oi,optionsMap:ii,...processCreateParams(si)})}}function mergeValues(Ws,ws){const oi=getParsedType(Ws),si=getParsedType(ws);if(Ws===ws)return{valid:!0,data:Ws};if(oi===ZodParsedType.object&&si===ZodParsedType.object){const ii=util.objectKeys(ws),ai=util.objectKeys(Ws).filter(ci=>ii.indexOf(ci)!==-1),li={...Ws,...ws};for(const ci of ai){const ui=mergeValues(Ws[ci],ws[ci]);if(!ui.valid)return{valid:!1};li[ci]=ui.data}return{valid:!0,data:li}}else if(oi===ZodParsedType.array&&si===ZodParsedType.array){if(Ws.length!==ws.length)return{valid:!1};const ii=[];for(let ai=0;ai<Ws.length;ai++){const li=Ws[ai],ci=ws[ai],ui=mergeValues(li,ci);if(!ui.valid)return{valid:!1};ii.push(ui.data)}return{valid:!0,data:ii}}else return oi===ZodParsedType.date&&si===ZodParsedType.date&&+Ws==+ws?{valid:!0,data:Ws}:{valid:!1}}class ZodIntersection extends ZodType{_parse(ws){const{status:oi,ctx:si}=this._processInputParams(ws),ii=(ai,li)=>{if(isAborted(ai)||isAborted(li))return INVALID;const ci=mergeValues(ai.value,li.value);return ci.valid?((isDirty(ai)||isDirty(li))&&oi.dirty(),{status:oi.value,value:ci.data}):(addIssueToContext(si,{code:ZodIssueCode.invalid_intersection_types}),INVALID)};return si.common.async?Promise.all([this._def.left._parseAsync({data:si.data,path:si.path,parent:si}),this._def.right._parseAsync({data:si.data,path:si.path,parent:si})]).then(([ai,li])=>ii(ai,li)):ii(this._def.left._parseSync({data:si.data,path:si.path,parent:si}),this._def.right._parseSync({data:si.data,path:si.path,parent:si}))}}ZodIntersection.create=(Ws,ws,oi)=>new ZodIntersection({left:Ws,right:ws,typeName:ZodFirstPartyTypeKind.ZodIntersection,...processCreateParams(oi)});class ZodTuple extends ZodType{_parse(ws){const{status:oi,ctx:si}=this._processInputParams(ws);if(si.parsedType!==ZodParsedType.array)return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:si.parsedType}),INVALID;if(si.data.length<this._def.items.length)return addIssueToContext(si,{code:ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),INVALID;!this._def.rest&&si.data.length>this._def.items.length&&(addIssueToContext(si,{code:ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),oi.dirty());const ai=[...si.data].map((li,ci)=>{const ui=this._def.items[ci]||this._def.rest;return ui?ui._parse(new ParseInputLazyPath(si,li,si.path,ci)):null}).filter(li=>!!li);return si.common.async?Promise.all(ai).then(li=>ParseStatus.mergeArray(oi,li)):ParseStatus.mergeArray(oi,ai)}get items(){return this._def.items}rest(ws){return new ZodTuple({...this._def,rest:ws})}}ZodTuple.create=(Ws,ws)=>{if(!Array.isArray(Ws))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:Ws,typeName:ZodFirstPartyTypeKind.ZodTuple,rest:null,...processCreateParams(ws)})};class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(ws){const{status:oi,ctx:si}=this._processInputParams(ws);if(si.parsedType!==ZodParsedType.object)return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:si.parsedType}),INVALID;const ii=[],ai=this._def.keyType,li=this._def.valueType;for(const ci in si.data)ii.push({key:ai._parse(new ParseInputLazyPath(si,ci,si.path,ci)),value:li._parse(new ParseInputLazyPath(si,si.data[ci],si.path,ci)),alwaysSet:ci in si.data});return si.common.async?ParseStatus.mergeObjectAsync(oi,ii):ParseStatus.mergeObjectSync(oi,ii)}get element(){return this._def.valueType}static create(ws,oi,si){return oi instanceof ZodType?new ZodRecord({keyType:ws,valueType:oi,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(si)}):new ZodRecord({keyType:ZodString.create(),valueType:ws,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(oi)})}}class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(ws){const{status:oi,ctx:si}=this._processInputParams(ws);if(si.parsedType!==ZodParsedType.map)return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.map,received:si.parsedType}),INVALID;const ii=this._def.keyType,ai=this._def.valueType,li=[...si.data.entries()].map(([ci,ui],di)=>({key:ii._parse(new ParseInputLazyPath(si,ci,si.path,[di,"key"])),value:ai._parse(new ParseInputLazyPath(si,ui,si.path,[di,"value"]))}));if(si.common.async){const ci=new Map;return Promise.resolve().then(async()=>{for(const ui of li){const di=await ui.key,hi=await ui.value;if(di.status==="aborted"||hi.status==="aborted")return INVALID;(di.status==="dirty"||hi.status==="dirty")&&oi.dirty(),ci.set(di.value,hi.value)}return{status:oi.value,value:ci}})}else{const ci=new Map;for(const ui of li){const di=ui.key,hi=ui.value;if(di.status==="aborted"||hi.status==="aborted")return INVALID;(di.status==="dirty"||hi.status==="dirty")&&oi.dirty(),ci.set(di.value,hi.value)}return{status:oi.value,value:ci}}}}ZodMap.create=(Ws,ws,oi)=>new ZodMap({valueType:ws,keyType:Ws,typeName:ZodFirstPartyTypeKind.ZodMap,...processCreateParams(oi)});class ZodSet extends ZodType{_parse(ws){const{status:oi,ctx:si}=this._processInputParams(ws);if(si.parsedType!==ZodParsedType.set)return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.set,received:si.parsedType}),INVALID;const ii=this._def;ii.minSize!==null&&si.data.size<ii.minSize.value&&(addIssueToContext(si,{code:ZodIssueCode.too_small,minimum:ii.minSize.value,type:"set",inclusive:!0,exact:!1,message:ii.minSize.message}),oi.dirty()),ii.maxSize!==null&&si.data.size>ii.maxSize.value&&(addIssueToContext(si,{code:ZodIssueCode.too_big,maximum:ii.maxSize.value,type:"set",inclusive:!0,exact:!1,message:ii.maxSize.message}),oi.dirty());const ai=this._def.valueType;function li(ui){const di=new Set;for(const hi of ui){if(hi.status==="aborted")return INVALID;hi.status==="dirty"&&oi.dirty(),di.add(hi.value)}return{status:oi.value,value:di}}const ci=[...si.data.values()].map((ui,di)=>ai._parse(new ParseInputLazyPath(si,ui,si.path,di)));return si.common.async?Promise.all(ci).then(ui=>li(ui)):li(ci)}min(ws,oi){return new ZodSet({...this._def,minSize:{value:ws,message:errorUtil.toString(oi)}})}max(ws,oi){return new ZodSet({...this._def,maxSize:{value:ws,message:errorUtil.toString(oi)}})}size(ws,oi){return this.min(ws,oi).max(ws,oi)}nonempty(ws){return this.min(1,ws)}}ZodSet.create=(Ws,ws)=>new ZodSet({valueType:Ws,minSize:null,maxSize:null,typeName:ZodFirstPartyTypeKind.ZodSet,...processCreateParams(ws)});class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(ws){const{ctx:oi}=this._processInputParams(ws);if(oi.parsedType!==ZodParsedType.function)return addIssueToContext(oi,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.function,received:oi.parsedType}),INVALID;function si(ci,ui){return makeIssue({data:ci,path:oi.path,errorMaps:[oi.common.contextualErrorMap,oi.schemaErrorMap,getErrorMap(),errorMap].filter(di=>!!di),issueData:{code:ZodIssueCode.invalid_arguments,argumentsError:ui}})}function ii(ci,ui){return makeIssue({data:ci,path:oi.path,errorMaps:[oi.common.contextualErrorMap,oi.schemaErrorMap,getErrorMap(),errorMap].filter(di=>!!di),issueData:{code:ZodIssueCode.invalid_return_type,returnTypeError:ui}})}const ai={errorMap:oi.common.contextualErrorMap},li=oi.data;if(this._def.returns instanceof ZodPromise){const ci=this;return OK(async function(...ui){const di=new ZodError([]),hi=await ci._def.args.parseAsync(ui,ai).catch(ga=>{throw di.addIssue(si(ui,ga)),di}),pi=await Reflect.apply(li,this,hi);return await ci._def.returns._def.type.parseAsync(pi,ai).catch(ga=>{throw di.addIssue(ii(pi,ga)),di})})}else{const ci=this;return OK(function(...ui){const di=ci._def.args.safeParse(ui,ai);if(!di.success)throw new ZodError([si(ui,di.error)]);const hi=Reflect.apply(li,this,di.data),pi=ci._def.returns.safeParse(hi,ai);if(!pi.success)throw new ZodError([ii(hi,pi.error)]);return pi.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...ws){return new ZodFunction({...this._def,args:ZodTuple.create(ws).rest(ZodUnknown.create())})}returns(ws){return new ZodFunction({...this._def,returns:ws})}implement(ws){return this.parse(ws)}strictImplement(ws){return this.parse(ws)}static create(ws,oi,si){return new ZodFunction({args:ws||ZodTuple.create([]).rest(ZodUnknown.create()),returns:oi||ZodUnknown.create(),typeName:ZodFirstPartyTypeKind.ZodFunction,...processCreateParams(si)})}}class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(ws){const{ctx:oi}=this._processInputParams(ws);return this._def.getter()._parse({data:oi.data,path:oi.path,parent:oi})}}ZodLazy.create=(Ws,ws)=>new ZodLazy({getter:Ws,typeName:ZodFirstPartyTypeKind.ZodLazy,...processCreateParams(ws)});class ZodLiteral extends ZodType{_parse(ws){if(ws.data!==this._def.value){const oi=this._getOrReturnCtx(ws);return addIssueToContext(oi,{received:oi.data,code:ZodIssueCode.invalid_literal,expected:this._def.value}),INVALID}return{status:"valid",value:ws.data}}get value(){return this._def.value}}ZodLiteral.create=(Ws,ws)=>new ZodLiteral({value:Ws,typeName:ZodFirstPartyTypeKind.ZodLiteral,...processCreateParams(ws)});function createZodEnum(Ws,ws){return new ZodEnum({values:Ws,typeName:ZodFirstPartyTypeKind.ZodEnum,...processCreateParams(ws)})}class ZodEnum extends ZodType{constructor(){super(...arguments),_ZodEnum_cache.set(this,void 0)}_parse(ws){if(typeof ws.data!="string"){const oi=this._getOrReturnCtx(ws),si=this._def.values;return addIssueToContext(oi,{expected:util.joinValues(si),received:oi.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodEnum_cache)||__classPrivateFieldSet(this,_ZodEnum_cache,new Set(this._def.values)),!__classPrivateFieldGet(this,_ZodEnum_cache).has(ws.data)){const oi=this._getOrReturnCtx(ws),si=this._def.values;return addIssueToContext(oi,{received:oi.data,code:ZodIssueCode.invalid_enum_value,options:si}),INVALID}return OK(ws.data)}get options(){return this._def.values}get enum(){const ws={};for(const oi of this._def.values)ws[oi]=oi;return ws}get Values(){const ws={};for(const oi of this._def.values)ws[oi]=oi;return ws}get Enum(){const ws={};for(const oi of this._def.values)ws[oi]=oi;return ws}extract(ws,oi=this._def){return ZodEnum.create(ws,{...this._def,...oi})}exclude(ws,oi=this._def){return ZodEnum.create(this.options.filter(si=>!ws.includes(si)),{...this._def,...oi})}}_ZodEnum_cache=new WeakMap;ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{constructor(){super(...arguments),_ZodNativeEnum_cache.set(this,void 0)}_parse(ws){const oi=util.getValidEnumValues(this._def.values),si=this._getOrReturnCtx(ws);if(si.parsedType!==ZodParsedType.string&&si.parsedType!==ZodParsedType.number){const ii=util.objectValues(oi);return addIssueToContext(si,{expected:util.joinValues(ii),received:si.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodNativeEnum_cache)||__classPrivateFieldSet(this,_ZodNativeEnum_cache,new Set(util.getValidEnumValues(this._def.values))),!__classPrivateFieldGet(this,_ZodNativeEnum_cache).has(ws.data)){const ii=util.objectValues(oi);return addIssueToContext(si,{received:si.data,code:ZodIssueCode.invalid_enum_value,options:ii}),INVALID}return OK(ws.data)}get enum(){return this._def.values}}_ZodNativeEnum_cache=new WeakMap;ZodNativeEnum.create=(Ws,ws)=>new ZodNativeEnum({values:Ws,typeName:ZodFirstPartyTypeKind.ZodNativeEnum,...processCreateParams(ws)});class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(ws){const{ctx:oi}=this._processInputParams(ws);if(oi.parsedType!==ZodParsedType.promise&&oi.common.async===!1)return addIssueToContext(oi,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.promise,received:oi.parsedType}),INVALID;const si=oi.parsedType===ZodParsedType.promise?oi.data:Promise.resolve(oi.data);return OK(si.then(ii=>this._def.type.parseAsync(ii,{path:oi.path,errorMap:oi.common.contextualErrorMap})))}}ZodPromise.create=(Ws,ws)=>new ZodPromise({type:Ws,typeName:ZodFirstPartyTypeKind.ZodPromise,...processCreateParams(ws)});class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(ws){const{status:oi,ctx:si}=this._processInputParams(ws),ii=this._def.effect||null,ai={addIssue:li=>{addIssueToContext(si,li),li.fatal?oi.abort():oi.dirty()},get path(){return si.path}};if(ai.addIssue=ai.addIssue.bind(ai),ii.type==="preprocess"){const li=ii.transform(si.data,ai);if(si.common.async)return Promise.resolve(li).then(async ci=>{if(oi.value==="aborted")return INVALID;const ui=await this._def.schema._parseAsync({data:ci,path:si.path,parent:si});return ui.status==="aborted"?INVALID:ui.status==="dirty"||oi.value==="dirty"?DIRTY(ui.value):ui});{if(oi.value==="aborted")return INVALID;const ci=this._def.schema._parseSync({data:li,path:si.path,parent:si});return ci.status==="aborted"?INVALID:ci.status==="dirty"||oi.value==="dirty"?DIRTY(ci.value):ci}}if(ii.type==="refinement"){const li=ci=>{const ui=ii.refinement(ci,ai);if(si.common.async)return Promise.resolve(ui);if(ui instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return ci};if(si.common.async===!1){const ci=this._def.schema._parseSync({data:si.data,path:si.path,parent:si});return ci.status==="aborted"?INVALID:(ci.status==="dirty"&&oi.dirty(),li(ci.value),{status:oi.value,value:ci.value})}else return this._def.schema._parseAsync({data:si.data,path:si.path,parent:si}).then(ci=>ci.status==="aborted"?INVALID:(ci.status==="dirty"&&oi.dirty(),li(ci.value).then(()=>({status:oi.value,value:ci.value}))))}if(ii.type==="transform")if(si.common.async===!1){const li=this._def.schema._parseSync({data:si.data,path:si.path,parent:si});if(!isValid(li))return li;const ci=ii.transform(li.value,ai);if(ci instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:oi.value,value:ci}}else return this._def.schema._parseAsync({data:si.data,path:si.path,parent:si}).then(li=>isValid(li)?Promise.resolve(ii.transform(li.value,ai)).then(ci=>({status:oi.value,value:ci})):li);util.assertNever(ii)}}ZodEffects.create=(Ws,ws,oi)=>new ZodEffects({schema:Ws,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:ws,...processCreateParams(oi)});ZodEffects.createWithPreprocess=(Ws,ws,oi)=>new ZodEffects({schema:ws,effect:{type:"preprocess",transform:Ws},typeName:ZodFirstPartyTypeKind.ZodEffects,...processCreateParams(oi)});class ZodOptional extends ZodType{_parse(ws){return this._getType(ws)===ZodParsedType.undefined?OK(void 0):this._def.innerType._parse(ws)}unwrap(){return this._def.innerType}}ZodOptional.create=(Ws,ws)=>new ZodOptional({innerType:Ws,typeName:ZodFirstPartyTypeKind.ZodOptional,...processCreateParams(ws)});class ZodNullable extends ZodType{_parse(ws){return this._getType(ws)===ZodParsedType.null?OK(null):this._def.innerType._parse(ws)}unwrap(){return this._def.innerType}}ZodNullable.create=(Ws,ws)=>new ZodNullable({innerType:Ws,typeName:ZodFirstPartyTypeKind.ZodNullable,...processCreateParams(ws)});class ZodDefault extends ZodType{_parse(ws){const{ctx:oi}=this._processInputParams(ws);let si=oi.data;return oi.parsedType===ZodParsedType.undefined&&(si=this._def.defaultValue()),this._def.innerType._parse({data:si,path:oi.path,parent:oi})}removeDefault(){return this._def.innerType}}ZodDefault.create=(Ws,ws)=>new ZodDefault({innerType:Ws,typeName:ZodFirstPartyTypeKind.ZodDefault,defaultValue:typeof ws.default=="function"?ws.default:()=>ws.default,...processCreateParams(ws)});class ZodCatch extends ZodType{_parse(ws){const{ctx:oi}=this._processInputParams(ws),si={...oi,common:{...oi.common,issues:[]}},ii=this._def.innerType._parse({data:si.data,path:si.path,parent:{...si}});return isAsync(ii)?ii.then(ai=>({status:"valid",value:ai.status==="valid"?ai.value:this._def.catchValue({get error(){return new ZodError(si.common.issues)},input:si.data})})):{status:"valid",value:ii.status==="valid"?ii.value:this._def.catchValue({get error(){return new ZodError(si.common.issues)},input:si.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(Ws,ws)=>new ZodCatch({innerType:Ws,typeName:ZodFirstPartyTypeKind.ZodCatch,catchValue:typeof ws.catch=="function"?ws.catch:()=>ws.catch,...processCreateParams(ws)});class ZodNaN extends ZodType{_parse(ws){if(this._getType(ws)!==ZodParsedType.nan){const si=this._getOrReturnCtx(ws);return addIssueToContext(si,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.nan,received:si.parsedType}),INVALID}return{status:"valid",value:ws.data}}}ZodNaN.create=Ws=>new ZodNaN({typeName:ZodFirstPartyTypeKind.ZodNaN,...processCreateParams(Ws)});const BRAND=Symbol("zod_brand");class ZodBranded extends ZodType{_parse(ws){const{ctx:oi}=this._processInputParams(ws),si=oi.data;return this._def.type._parse({data:si,path:oi.path,parent:oi})}unwrap(){return this._def.type}}class ZodPipeline extends ZodType{_parse(ws){const{status:oi,ctx:si}=this._processInputParams(ws);if(si.common.async)return(async()=>{const ai=await this._def.in._parseAsync({data:si.data,path:si.path,parent:si});return ai.status==="aborted"?INVALID:ai.status==="dirty"?(oi.dirty(),DIRTY(ai.value)):this._def.out._parseAsync({data:ai.value,path:si.path,parent:si})})();{const ii=this._def.in._parseSync({data:si.data,path:si.path,parent:si});return ii.status==="aborted"?INVALID:ii.status==="dirty"?(oi.dirty(),{status:"dirty",value:ii.value}):this._def.out._parseSync({data:ii.value,path:si.path,parent:si})}}static create(ws,oi){return new ZodPipeline({in:ws,out:oi,typeName:ZodFirstPartyTypeKind.ZodPipeline})}}class ZodReadonly extends ZodType{_parse(ws){const oi=this._def.innerType._parse(ws),si=ii=>(isValid(ii)&&(ii.value=Object.freeze(ii.value)),ii);return isAsync(oi)?oi.then(ii=>si(ii)):si(oi)}unwrap(){return this._def.innerType}}ZodReadonly.create=(Ws,ws)=>new ZodReadonly({innerType:Ws,typeName:ZodFirstPartyTypeKind.ZodReadonly,...processCreateParams(ws)});function custom(Ws,ws={},oi){return Ws?ZodAny.create().superRefine((si,ii)=>{var ai,li;if(!Ws(si)){const ci=typeof ws=="function"?ws(si):typeof ws=="string"?{message:ws}:ws,ui=(li=(ai=ci.fatal)!==null&&ai!==void 0?ai:oi)!==null&&li!==void 0?li:!0,di=typeof ci=="string"?{message:ci}:ci;ii.addIssue({code:"custom",...di,fatal:ui})}}):ZodAny.create()}const late={object:ZodObject.lazycreate};var ZodFirstPartyTypeKind;(function(Ws){Ws.ZodString="ZodString",Ws.ZodNumber="ZodNumber",Ws.ZodNaN="ZodNaN",Ws.ZodBigInt="ZodBigInt",Ws.ZodBoolean="ZodBoolean",Ws.ZodDate="ZodDate",Ws.ZodSymbol="ZodSymbol",Ws.ZodUndefined="ZodUndefined",Ws.ZodNull="ZodNull",Ws.ZodAny="ZodAny",Ws.ZodUnknown="ZodUnknown",Ws.ZodNever="ZodNever",Ws.ZodVoid="ZodVoid",Ws.ZodArray="ZodArray",Ws.ZodObject="ZodObject",Ws.ZodUnion="ZodUnion",Ws.ZodDiscriminatedUnion="ZodDiscriminatedUnion",Ws.ZodIntersection="ZodIntersection",Ws.ZodTuple="ZodTuple",Ws.ZodRecord="ZodRecord",Ws.ZodMap="ZodMap",Ws.ZodSet="ZodSet",Ws.ZodFunction="ZodFunction",Ws.ZodLazy="ZodLazy",Ws.ZodLiteral="ZodLiteral",Ws.ZodEnum="ZodEnum",Ws.ZodEffects="ZodEffects",Ws.ZodNativeEnum="ZodNativeEnum",Ws.ZodOptional="ZodOptional",Ws.ZodNullable="ZodNullable",Ws.ZodDefault="ZodDefault",Ws.ZodCatch="ZodCatch",Ws.ZodPromise="ZodPromise",Ws.ZodBranded="ZodBranded",Ws.ZodPipeline="ZodPipeline",Ws.ZodReadonly="ZodReadonly"})(ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={}));const instanceOfType=(Ws,ws={message:`Input not instance of ${Ws.name}`})=>custom(oi=>oi instanceof Ws,ws),stringType=ZodString.create,numberType=ZodNumber.create,nanType=ZodNaN.create,bigIntType=ZodBigInt.create,booleanType=ZodBoolean.create,dateType=ZodDate.create,symbolType=ZodSymbol.create,undefinedType=ZodUndefined.create,nullType=ZodNull.create,anyType=ZodAny.create,unknownType=ZodUnknown.create,neverType=ZodNever.create,voidType=ZodVoid.create,arrayType=ZodArray.create,objectType=ZodObject.create,strictObjectType=ZodObject.strictCreate,unionType=ZodUnion.create,discriminatedUnionType=ZodDiscriminatedUnion.create,intersectionType=ZodIntersection.create,tupleType=ZodTuple.create,recordType=ZodRecord.create,mapType=ZodMap.create,setType=ZodSet.create,functionType=ZodFunction.create,lazyType=ZodLazy.create,literalType=ZodLiteral.create,enumType=ZodEnum.create,nativeEnumType=ZodNativeEnum.create,promiseType=ZodPromise.create,effectsType=ZodEffects.create,optionalType=ZodOptional.create,nullableType=ZodNullable.create,preprocessType=ZodEffects.createWithPreprocess,pipelineType=ZodPipeline.create,ostring=()=>stringType().optional(),onumber=()=>numberType().optional(),oboolean=()=>booleanType().optional(),coerce={string:Ws=>ZodString.create({...Ws,coerce:!0}),number:Ws=>ZodNumber.create({...Ws,coerce:!0}),boolean:Ws=>ZodBoolean.create({...Ws,coerce:!0}),bigint:Ws=>ZodBigInt.create({...Ws,coerce:!0}),date:Ws=>ZodDate.create({...Ws,coerce:!0})},NEVER=INVALID;var z$4=Object.freeze({__proto__:null,defaultErrorMap:errorMap,setErrorMap,getErrorMap,makeIssue,EMPTY_PATH,addIssueToContext,ParseStatus,INVALID,DIRTY,OK,isAborted,isDirty,isValid,isAsync,get util(){return util},get objectUtil(){return objectUtil},ZodParsedType,getParsedType,ZodType,datetimeRegex,ZodString,ZodNumber,ZodBigInt,ZodBoolean,ZodDate,ZodSymbol,ZodUndefined,ZodNull,ZodAny,ZodUnknown,ZodNever,ZodVoid,ZodArray,ZodObject,ZodUnion,ZodDiscriminatedUnion,ZodIntersection,ZodTuple,ZodRecord,ZodMap,ZodSet,ZodFunction,ZodLazy,ZodLiteral,ZodEnum,ZodNativeEnum,ZodPromise,ZodEffects,ZodTransformer:ZodEffects,ZodOptional,ZodNullable,ZodDefault,ZodCatch,ZodNaN,BRAND,ZodBranded,ZodPipeline,ZodReadonly,custom,Schema:ZodType,ZodSchema:ZodType,late,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},coerce,any:anyType,array:arrayType,bigint:bigIntType,boolean:booleanType,date:dateType,discriminatedUnion:discriminatedUnionType,effect:effectsType,enum:enumType,function:functionType,instanceof:instanceOfType,intersection:intersectionType,lazy:lazyType,literal:literalType,map:mapType,nan:nanType,nativeEnum:nativeEnumType,never:neverType,null:nullType,nullable:nullableType,number:numberType,object:objectType,oboolean,onumber,optional:optionalType,ostring,pipeline:pipelineType,preprocess:preprocessType,promise:promiseType,record:recordType,set:setType,strictObject:strictObjectType,string:stringType,symbol:symbolType,transformer:effectsType,tuple:tupleType,undefined:undefinedType,union:unionType,unknown:unknownType,void:voidType,NEVER,ZodIssueCode,quotelessJson,ZodError});const type$c="number",typedef$b="scalar Amount_Tokens",schema$b=z$4.number(),stringSchema$b="z.number()",amountTokensValidation=Ws=>{if(typeof Ws!="number")throw new GraphQLError$1(`Value is not number: ${JSON.stringify(Ws)}`);if(!Number.isFinite(Ws))throw new GraphQLError$1(`Value is not a finite number: ${Ws}`);const ws=schema$b.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$c={name:"Amount_Tokens",description:"A custom scalar that represents an amount of tokens",serialize:amountTokensValidation,parseValue:amountTokensValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.FLOAT)throw new GraphQLError$1("some error message",{nodes:Ws});const ws=parseFloat(Ws.value);return amountTokensValidation(ws)}},scalar$b=new GraphQLScalarType$1(config$c),AmountTokens=Object.freeze(Object.defineProperty({__proto__:null,config:config$c,scalar:scalar$b,schema:schema$b,stringSchema:stringSchema$b,type:type$c,typedef:typedef$b},Symbol.toStringTag,{value:"Module"})),type$b="string",typedef$a="scalar EthereumAddress",schema$a=z$4.string().regex(/^0x[a-fA-F0-9]{40}$/,{message:"Invalid Ethereum address format"}),stringSchema$a="z.string().regex(/^0x[a-fA-F0-9]{40}$/, { message: 'Invalid Ethereum address format' })",addressValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not string: ${JSON.stringify(Ws)}`);const ws=schema$a.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$b={name:"EthereumAddress",description:'A custom scalar representing an Ethereum address, validated as a 42-character hexadecimal string prefixed with "0x"',serialize:addressValidation,parseValue:addressValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1("some error message",{nodes:Ws});return addressValidation(Ws.value)}},scalar$a=new GraphQLScalarType$1(config$b),EthereumAddress=Object.freeze(Object.defineProperty({__proto__:null,config:config$b,scalar:scalar$a,schema:schema$a,stringSchema:stringSchema$a,type:type$b,typedef:typedef$a},Symbol.toStringTag,{value:"Module"})),type$a="number",typedef$9="scalar Amount_Percentage",schema$9=z$4.number(),stringSchema$9="z.number()",amountPercentageValidation=Ws=>{if(typeof Ws!="number")throw new GraphQLError$1(`Value is not number: ${JSON.stringify(Ws)}`);if(!Number.isFinite(Ws))throw new GraphQLError$1(`Value is not a finite number: ${Ws}`);const ws=schema$9.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$a={name:"Amount_Percentage",description:"",serialize:amountPercentageValidation,parseValue:amountPercentageValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.FLOAT)throw new GraphQLError$1("some error message",{nodes:Ws});const ws=parseFloat(Ws.value);return amountPercentageValidation(ws)}},scalar$9=new GraphQLScalarType$1(config$a),AmountPercentage=Object.freeze(Object.defineProperty({__proto__:null,config:config$a,scalar:scalar$9,schema:schema$9,stringSchema:stringSchema$9,type:type$a,typedef:typedef$9},Symbol.toStringTag,{value:"Module"})),type$9="string",typedef$8="scalar EmailAddress",schema$8=z$4.string().email(),stringSchema$8="z.string().email()",emailValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not string: ${JSON.stringify(Ws)}`);const ws=schema$8.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$9={name:"EmailAddress",description:"A field whose value conforms to the standard internet email address format as specified in RFC822: https://www.w3.org/Protocols/rfc822/.",serialize:emailValidation,parseValue:emailValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1(`Can only validate strings as email addresses but got a: ${Ws.kind}`,{nodes:Ws});return emailValidation(Ws.value)}},scalar$8=new GraphQLScalarType$1(config$9),EmailAddress=Object.freeze(Object.defineProperty({__proto__:null,config:config$9,scalar:scalar$8,schema:schema$8,stringSchema:stringSchema$8,type:type$9,typedef:typedef$8},Symbol.toStringTag,{value:"Module"})),type$8="string",typedef$7="scalar Date",schema$7=z$4.string().datetime(),stringSchema$7="z.string().datetime()",datetimeValidation$1=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not iso string: ${JSON.stringify(Ws)}`);const ws=schema$7.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$8={name:"Date",description:"A custom scalar that represents a datetime in ISO 8601 format (Time: 00:00:00)",serialize:datetimeValidation$1,parseValue:datetimeValidation$1,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1("Value is not an string",{nodes:Ws});return datetimeValidation$1(Ws.value)}},scalar$7=new GraphQLScalarType$1(config$8),Date$1=Object.freeze(Object.defineProperty({__proto__:null,config:config$8,scalar:scalar$7,schema:schema$7,stringSchema:stringSchema$7,type:type$8,typedef:typedef$7},Symbol.toStringTag,{value:"Module"})),type$7="string",typedef$6="scalar DateTime",schema$6=z$4.string().datetime(),stringSchema$6="z.string().datetime()",datetimeValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not iso string: ${JSON.stringify(Ws)}`);const ws=schema$6.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$7={name:"DateTime",description:"A custom scalar that represents a datetime in ISO 8601 format",serialize:datetimeValidation,parseValue:datetimeValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1("Value is not an string",{nodes:Ws});return datetimeValidation(Ws.value)}},scalar$6=new GraphQLScalarType$1(config$7),DateTime=Object.freeze(Object.defineProperty({__proto__:null,config:config$7,scalar:scalar$6,schema:schema$6,stringSchema:stringSchema$6,type:type$7,typedef:typedef$6},Symbol.toStringTag,{value:"Module"})),type$6="string",typedef$5="scalar URL",schema$5=z$4.string().url(),stringSchema$5="z.string().url()",urlValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not iso string: ${JSON.stringify(Ws)}`);const ws=schema$5.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$6={name:"URL",description:"A custom scalar that represents a URL string",serialize:urlValidation,parseValue:urlValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1("Value is not an string",{nodes:Ws});return urlValidation(Ws.value)}},scalar$5=new GraphQLScalarType$1(config$6),URL$1=Object.freeze(Object.defineProperty({__proto__:null,config:config$6,scalar:scalar$5,schema:schema$5,stringSchema:stringSchema$5,type:type$6,typedef:typedef$5},Symbol.toStringTag,{value:"Module"})),type$5="number",typedef$4="scalar Amount_Money",schema$4=z$4.number(),stringSchema$4="z.number()",amountMoneyValidation=Ws=>{if(typeof Ws!="number")throw new GraphQLError$1(`Value is not number: ${JSON.stringify(Ws)}`);if(!Number.isFinite(Ws))throw new GraphQLError$1(`Value is not a finite number: ${Ws}`);const ws=schema$4.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$5={name:"Amount_Money",description:"A custom scalar that represents a monetary amount in a currency",serialize:amountMoneyValidation,parseValue:amountMoneyValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.FLOAT)throw new GraphQLError$1("Value is not a float type",{nodes:Ws});const ws=parseFloat(Ws.value);return amountMoneyValidation(ws)}},scalar$4=new GraphQLScalarType$1(config$5),AmountMoney=Object.freeze(Object.defineProperty({__proto__:null,config:config$5,scalar:scalar$4,schema:schema$4,stringSchema:stringSchema$4,type:type$5,typedef:typedef$4},Symbol.toStringTag,{value:"Module"})),type$4="string",typedef$3="scalar OLabel",schema$3=z$4.string(),stringSchema$3="z.string()",oLabelValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not string: ${JSON.stringify(Ws)}`);const ws=schema$3.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$4={name:"OLabel",description:"A custom scalar that represents a OLabel string",serialize:oLabelValidation,parseValue:oLabelValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1(`Value is not a valid string: ${Ws.kind}`,{nodes:Ws});return oLabelValidation(Ws.value)}},scalar$3=new GraphQLScalarType$1(config$4),OLabel=Object.freeze(Object.defineProperty({__proto__:null,config:config$4,scalar:scalar$3,schema:schema$3,stringSchema:stringSchema$3,type:type$4,typedef:typedef$3},Symbol.toStringTag,{value:"Module"})),type$3="string",typedef$2="scalar Currency",schema$2=z$4.string(),stringSchema$2="z.string()",currencyValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not string: ${JSON.stringify(Ws)}`);const ws=schema$2.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$3={name:"Currency",description:"A custom scalar that represents a Currency Code string",serialize:currencyValidation,parseValue:currencyValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1(`Value is not a valid string: ${Ws.kind}`,{nodes:Ws});return currencyValidation(Ws.value)}},scalar$2=new GraphQLScalarType$1(config$3),Currency=Object.freeze(Object.defineProperty({__proto__:null,config:config$3,scalar:scalar$2,schema:schema$2,stringSchema:stringSchema$2,type:type$3,typedef:typedef$2},Symbol.toStringTag,{value:"Module"})),type$2="string",typedef$1="scalar PHID",schema$1=z$4.string(),stringSchema$1="z.string()",phidlValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not string: ${JSON.stringify(Ws)}`);const ws=schema$1.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$2={name:"PHID",description:"A custom scalar that represents a PowerhouseID string",serialize:phidlValidation,parseValue:phidlValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1(`Value is not a valid string: ${Ws.kind}`,{nodes:Ws});return phidlValidation(Ws.value)}},scalar$1=new GraphQLScalarType$1(config$2),PHID=Object.freeze(Object.defineProperty({__proto__:null,config:config$2,scalar:scalar$1,schema:schema$1,stringSchema:stringSchema$1,type:type$2,typedef:typedef$1},Symbol.toStringTag,{value:"Module"})),type$1="string",typedef="scalar OID",schema=z$4.string(),stringSchema="z.string()",oIdValidation=Ws=>{if(typeof Ws!="string")throw new GraphQLError$1(`Value is not string: ${JSON.stringify(Ws)}`);const ws=schema.safeParse(Ws);if(ws.success)return ws.data;throw new GraphQLError$1(ws.error.message)},config$1={name:"OID",description:"A custom scalar that represents a OID string",serialize:oIdValidation,parseValue:oIdValidation,parseLiteral:Ws=>{if(Ws.kind!==Kind$1.STRING)throw new GraphQLError$1(`Value is not a valid string: ${Ws.kind}`,{nodes:Ws});return oIdValidation(Ws.value)}},scalar=new GraphQLScalarType$1(config$1),OID=Object.freeze(Object.defineProperty({__proto__:null,config:config$1,scalar,schema,stringSchema,type:type$1,typedef},Symbol.toStringTag,{value:"Module"})),resolvers={AmountTokens:scalar$b,EthereumAddress:scalar$a,AmountPercentage:scalar$9,EmailAddress:scalar$8,Date:scalar$7,DateTime:scalar$6,URL:scalar$5,AmountMoney:scalar$4,OLabel:scalar$3,Currency:scalar$2,PHID:scalar$1,OID:scalar},typeDefs=[typedef$b,typedef$a,typedef$9,typedef$8,typedef$7,typedef$6,typedef$5,typedef$4,typedef$3,typedef$2,typedef$1,typedef],generatorTypeDefs={[config$c.name]:type$c,[config$b.name]:type$b,[config$9.name]:type$9,[config$a.name]:type$a,[config$8.name]:type$8,[config$7.name]:type$7,[config$6.name]:type$6,[config$5.name]:type$5,[config$4.name]:type$4,[config$3.name]:type$3,[config$2.name]:type$2,[config$1.name]:type$1},validationSchema={[config$c.name]:stringSchema$b,[config$b.name]:stringSchema$a,[config$9.name]:stringSchema$8,[config$a.name]:stringSchema$9,[config$8.name]:stringSchema$7,[config$7.name]:stringSchema$6,[config$6.name]:stringSchema$5,[config$5.name]:stringSchema$4,[config$4.name]:stringSchema$3,[config$3.name]:stringSchema$2,[config$2.name]:stringSchema$1,[config$1.name]:stringSchema},customScalars=Object.freeze(Object.defineProperty({__proto__:null,AmountMoney,AmountPercentage,AmountTokens,Currency,DateScalar:Date$1,DateTime,EmailAddress,EthereumAddress,OID,OLabel,PHID,URLScalar:URL$1,generatorTypeDefs,resolvers,typeDefs,validationSchema},Symbol.toStringTag,{value:"Module"}));var define_process_env_default={};function DocumentEditor(Ws){const ws=["document-editor",`${Ws.mode}-mode`];return jsx("div",{className:ws.join(" "),children:Ws.children})}function EditorToolbar(Ws){const ws=Ws.left||[],oi=Ws.center||[],si=Ws.right||[];return jsxs("div",{className:"editor-toolbar",children:[jsx("div",{className:"editor-toolbar--column editor-toolbar--left",children:ws}),jsx("div",{className:"editor-toolbar--column editor-toolbar--center",children:oi}),jsx("div",{className:"editor-toolbar--column editor-toolbar--right",children:si})]})}function EditorWorksheet(Ws){return jsx("div",{className:"editor-worksheet",children:jsx("div",{className:"editor-worksheet--page",children:Ws.children})})}const colorScheme$1={light:{color:"#222222",bgColor:"#FFFFFF",border:"#EEEEEE",shadow:"rgba(128,128,128,0.65)",inputColor:"#222222",inputBg:"#F6F6F6"},dark:{color:"#E6E6E6",bgColor:"#181818",border:"#181818",shadow:"rgba(0, 0, 0, 0.25)",inputColor:"#E6E6E6",inputBg:"#222222"}},typographySizes$1={huge:{fontSize:"36pt",fontWeight:"bold",padding:"6pt",margin:"30pt 0 0 0"},larger:{fontSize:"24pt",fontWeight:"bold",padding:"6pt",margin:"18pt 0 0 0"},large:{fontSize:"18pt",fontWeight:"bold",padding:"6pt",margin:"12pt 0 0 0"},medium:{fontSize:"11pt",fontWeight:"bold",padding:"6pt",margin:"5pt 0 0 0"},small:{fontSize:"10pt",fontWeight:"normal",padding:"6pt",margin:"0"},smaller:{fontSize:"9pt",fontWeight:"normal",padding:"6pt",margin:"0"},tiny:{fontSize:"8pt",fontWeight:"normal",padding:"6pt",margin:"0"}},inputStyle$1=(Ws="light",ws=!1)=>{const oi=colorScheme$1[Ws];return{width:"100%",border:"none",boxSizing:"border-box",backgroundColor:ws?oi.inputBg:oi.bgColor,outline:"none",color:oi.inputColor,resize:"none",fontFamily:"Roboto, sans-serif",overflow:"hidden",lineHeight:"1.5"}};function TextInput(Ws){const[ws,oi]=useState({value:Ws.value||"",hasFocus:!1,pressingEnter:!1});useEffect(()=>{oi(di=>di.value!==Ws.value?{...di,value:Ws.value||""}:di)},[Ws.value]);const si=di=>{di.key==="Enter"&&(oi({...ws,pressingEnter:!0}),di.preventDefault())},ii=di=>{di.key==="Enter"&&(di.target&&Ws.onSubmit&&Ws.onSubmit(di.target.value),Ws.clearOnSubmit?oi({...ws,value:"",pressingEnter:!1}):oi({...ws,pressingEnter:!1}),di.preventDefault()),(di.key==="Backspace"||di.key==="Delete")&&(Ws.onEmpty&&di.target.value.length<1&&Ws.onEmpty(Ws.id||""),di.preventDefault())},ai=di=>{if(!ws.pressingEnter){const hi=di.target;oi({...ws,value:hi.value}),hi.style.height="1px",hi.style.height=hi.scrollHeight+"px"}},li=di=>{var hi;if(oi(pi=>({...pi,hasFocus:di})),!di){const pi=((hi=ci.current)==null?void 0:hi.value)||"",ha=Ws.value||"";pi!=ha&&Ws.onSubmit&&(Ws.onSubmit(pi),Ws.clearOnSubmit&&oi(ga=>({...ga,value:""})))}},ci=useRef(null);useEffect(()=>{const di=()=>{ci.current&&(ci.current.style.height="1px",ci.current.style.height=ci.current.scrollHeight+"px")};return window.addEventListener("resize",di),di(),()=>{window.removeEventListener("resize",di)}});const ui={...inputStyle$1(Ws.theme,ws.hasFocus),...typographySizes$1[Ws.size||"small"]};return jsxs("div",{children:[Ws.horizontalLine?jsx("hr",{style:{borderColor:inputStyle$1(Ws.theme,!1).backgroundColor}},"line"):"",jsx("textarea",{autoFocus:Ws.autoFocus||!1,onBlur:di=>li(!1),onFocus:di=>li(!0),onInput:ai,onKeyDown:si,onKeyUp:ii,placeholder:Ws.placeholder||"",ref:ci,style:ui,value:ws.value},"text")]})}function ToolbarButton(Ws){const ws=Ws.onClick||(()=>{console.log("No onClick handler attached to button.")});return jsx("div",{className:"toolbar-button",onClick:ws,style:{userSelect:"none"},children:Ws.children})}var u$2=Object.defineProperty,a$1=(Ws,ws)=>u$2(Ws,"name",{value:ws,configurable:!0}),y$1=(()=>{let Ws;return typeof window<"u"?Ws=window:typeof globalThis<"u"?Ws=globalThis:typeof global<"u"?Ws=global:typeof self<"u"?Ws=self:Ws={},Ws})(),{LOGLEVEL:b$3}=y$1,t$5={trace:1,debug:2,info:3,warn:4,error:5,silent:10},L$2=b$3,i$4=t$5[L$2]||t$5.info,s$3={trace:a$1((Ws,...ws)=>{i$4<=t$5.trace&&console.trace(Ws,...ws)},"trace"),debug:a$1((Ws,...ws)=>{i$4<=t$5.debug&&console.debug(Ws,...ws)},"debug"),info:a$1((Ws,...ws)=>{i$4<=t$5.info&&console.info(Ws,...ws)},"info"),warn:a$1((Ws,...ws)=>{i$4<=t$5.warn&&console.warn(Ws,...ws)},"warn"),error:a$1((Ws,...ws)=>{i$4<=t$5.error&&console.error(Ws,...ws)},"error"),log:a$1((Ws,...ws)=>{i$4<t$5.silent&&console.log(Ws,...ws)},"log")},c$1=new Set,n$2=a$1(Ws=>(ws,...oi)=>{if(!c$1.has(ws))return c$1.add(ws),s$3[Ws](ws,...oi)},"once");n$2.clear=()=>c$1.clear();n$2.trace=n$2("trace");n$2.debug=n$2("debug");n$2.info=n$2("info");n$2.warn=n$2("warn");n$2.error=n$2("error");n$2.log=n$2("log");var m$2=n$2("warn"),r$3=a$1(Ws=>(...ws)=>{let oi=[];if(ws.length){let si=/<span\s+style=(['"])([^'"]*)\1\s*>/gi,ii=/<\/span>/gi,ai;for(oi.push(ws[0].replace(si,"%c").replace(ii,"%c"));ai=si.exec(ws[0]);)oi.push(ai[2]),oi.push("");for(let li=1;li<ws.length;li++)oi.push(ws[li])}s$3[Ws].apply(s$3,oi)},"pretty");r$3.trace=r$3("trace");r$3.debug=r$3("debug");r$3.info=r$3("info");r$3.warn=r$3("warn");r$3.error=r$3("error");var _$2=(Ws=>(Ws.CHANNEL_WS_DISCONNECT="channelWSDisconnect",Ws.CHANNEL_CREATED="channelCreated",Ws.CONFIG_ERROR="configError",Ws.STORY_INDEX_INVALIDATED="storyIndexInvalidated",Ws.STORY_SPECIFIED="storySpecified",Ws.SET_CONFIG="setConfig",Ws.SET_STORIES="setStories",Ws.SET_INDEX="setIndex",Ws.SET_CURRENT_STORY="setCurrentStory",Ws.CURRENT_STORY_WAS_SET="currentStoryWasSet",Ws.FORCE_RE_RENDER="forceReRender",Ws.FORCE_REMOUNT="forceRemount",Ws.PRELOAD_ENTRIES="preloadStories",Ws.STORY_PREPARED="storyPrepared",Ws.DOCS_PREPARED="docsPrepared",Ws.STORY_CHANGED="storyChanged",Ws.STORY_UNCHANGED="storyUnchanged",Ws.STORY_RENDERED="storyRendered",Ws.STORY_FINISHED="storyFinished",Ws.STORY_MISSING="storyMissing",Ws.STORY_ERRORED="storyErrored",Ws.STORY_THREW_EXCEPTION="storyThrewException",Ws.STORY_RENDER_PHASE_CHANGED="storyRenderPhaseChanged",Ws.PLAY_FUNCTION_THREW_EXCEPTION="playFunctionThrewException",Ws.UNHANDLED_ERRORS_WHILE_PLAYING="unhandledErrorsWhilePlaying",Ws.UPDATE_STORY_ARGS="updateStoryArgs",Ws.STORY_ARGS_UPDATED="storyArgsUpdated",Ws.RESET_STORY_ARGS="resetStoryArgs",Ws.SET_FILTER="setFilter",Ws.SET_GLOBALS="setGlobals",Ws.UPDATE_GLOBALS="updateGlobals",Ws.GLOBALS_UPDATED="globalsUpdated",Ws.REGISTER_SUBSCRIPTION="registerSubscription",Ws.PREVIEW_KEYDOWN="previewKeydown",Ws.PREVIEW_BUILDER_PROGRESS="preview_builder_progress",Ws.SELECT_STORY="selectStory",Ws.STORIES_COLLAPSE_ALL="storiesCollapseAll",Ws.STORIES_EXPAND_ALL="storiesExpandAll",Ws.DOCS_RENDERED="docsRendered",Ws.SHARED_STATE_CHANGED="sharedStateChanged",Ws.SHARED_STATE_SET="sharedStateSet",Ws.NAVIGATE_URL="navigateUrl",Ws.UPDATE_QUERY_PARAMS="updateQueryParams",Ws.REQUEST_WHATS_NEW_DATA="requestWhatsNewData",Ws.RESULT_WHATS_NEW_DATA="resultWhatsNewData",Ws.SET_WHATS_NEW_CACHE="setWhatsNewCache",Ws.TOGGLE_WHATS_NEW_NOTIFICATIONS="toggleWhatsNewNotifications",Ws.TELEMETRY_ERROR="telemetryError",Ws.FILE_COMPONENT_SEARCH_REQUEST="fileComponentSearchRequest",Ws.FILE_COMPONENT_SEARCH_RESPONSE="fileComponentSearchResponse",Ws.SAVE_STORY_REQUEST="saveStoryRequest",Ws.SAVE_STORY_RESPONSE="saveStoryResponse",Ws.ARGTYPES_INFO_REQUEST="argtypesInfoRequest",Ws.ARGTYPES_INFO_RESPONSE="argtypesInfoResponse",Ws.CREATE_NEW_STORYFILE_REQUEST="createNewStoryfileRequest",Ws.CREATE_NEW_STORYFILE_RESPONSE="createNewStoryfileResponse",Ws.TESTING_MODULE_CRASH_REPORT="testingModuleCrashReport",Ws.TESTING_MODULE_PROGRESS_REPORT="testingModuleProgressReport",Ws.TESTING_MODULE_RUN_REQUEST="testingModuleRunRequest",Ws.TESTING_MODULE_RUN_ALL_REQUEST="testingModuleRunAllRequest",Ws.TESTING_MODULE_CANCEL_TEST_RUN_REQUEST="testingModuleCancelTestRunRequest",Ws.TESTING_MODULE_CANCEL_TEST_RUN_RESPONSE="testingModuleCancelTestRunResponse",Ws.TESTING_MODULE_WATCH_MODE_REQUEST="testingModuleWatchModeRequest",Ws.TESTING_MODULE_CONFIG_CHANGE="testingModuleConfigChange",Ws))(_$2||{}),R$2=_$2,{CHANNEL_WS_DISCONNECT:S$2,CHANNEL_CREATED:T$1,CONFIG_ERROR:N$2,CREATE_NEW_STORYFILE_REQUEST:O$2,CREATE_NEW_STORYFILE_RESPONSE:A$1,CURRENT_STORY_WAS_SET:r$2,DOCS_PREPARED:D$3,DOCS_RENDERED:I$2,FILE_COMPONENT_SEARCH_REQUEST:C$4,FILE_COMPONENT_SEARCH_RESPONSE:o$2,FORCE_RE_RENDER:L$1,FORCE_REMOUNT:U$2,GLOBALS_UPDATED:P$3,NAVIGATE_URL:G$4,PLAY_FUNCTION_THREW_EXCEPTION:a,UNHANDLED_ERRORS_WHILE_PLAYING:Y$1,PRELOAD_ENTRIES:t$4,PREVIEW_BUILDER_PROGRESS:e,PREVIEW_KEYDOWN:H$2,REGISTER_SUBSCRIPTION:d,RESET_STORY_ARGS:W$3,SELECT_STORY:l$1,SET_CONFIG:i$3,SET_CURRENT_STORY:M$3,SET_FILTER:p$2,SET_GLOBALS:u$1,SET_INDEX:F$3,SET_STORIES:g,SHARED_STATE_CHANGED:s$2,SHARED_STATE_SET:y$2,STORIES_COLLAPSE_ALL:c,STORIES_EXPAND_ALL:h$1,STORY_ARGS_UPDATED:f$2,STORY_CHANGED:Q$1,STORY_ERRORED:x$3,STORY_INDEX_INVALIDATED:m$1,STORY_MISSING:V$1,STORY_PREPARED:w$2,STORY_RENDER_PHASE_CHANGED:B$2,STORY_RENDERED:X$2,STORY_FINISHED:q$3,STORY_SPECIFIED:b$2,STORY_THREW_EXCEPTION:K$2,STORY_UNCHANGED:n$1,UPDATE_GLOBALS:j$1,UPDATE_QUERY_PARAMS:k$4,UPDATE_STORY_ARGS:z$3,REQUEST_WHATS_NEW_DATA:J$3,RESULT_WHATS_NEW_DATA:Z$1,SET_WHATS_NEW_CACHE:$$2,TOGGLE_WHATS_NEW_NOTIFICATIONS:v$2,TELEMETRY_ERROR:EE,SAVE_STORY_REQUEST:_E,SAVE_STORY_RESPONSE:RE,ARGTYPES_INFO_REQUEST:SE,ARGTYPES_INFO_RESPONSE:TE,TESTING_MODULE_CRASH_REPORT:NE,TESTING_MODULE_PROGRESS_REPORT:OE,TESTING_MODULE_RUN_REQUEST:AE,TESTING_MODULE_RUN_ALL_REQUEST:rE,TESTING_MODULE_CANCEL_TEST_RUN_REQUEST:DE,TESTING_MODULE_CANCEL_TEST_RUN_RESPONSE:IE,TESTING_MODULE_WATCH_MODE_REQUEST:CE,TESTING_MODULE_CONFIG_CHANGE:oE}=_$2;const Qn$1=Object.freeze(Object.defineProperty({__proto__:null,ARGTYPES_INFO_REQUEST:SE,ARGTYPES_INFO_RESPONSE:TE,CHANNEL_CREATED:T$1,CHANNEL_WS_DISCONNECT:S$2,CONFIG_ERROR:N$2,CREATE_NEW_STORYFILE_REQUEST:O$2,CREATE_NEW_STORYFILE_RESPONSE:A$1,CURRENT_STORY_WAS_SET:r$2,DOCS_PREPARED:D$3,DOCS_RENDERED:I$2,FILE_COMPONENT_SEARCH_REQUEST:C$4,FILE_COMPONENT_SEARCH_RESPONSE:o$2,FORCE_REMOUNT:U$2,FORCE_RE_RENDER:L$1,GLOBALS_UPDATED:P$3,NAVIGATE_URL:G$4,PLAY_FUNCTION_THREW_EXCEPTION:a,PRELOAD_ENTRIES:t$4,PREVIEW_BUILDER_PROGRESS:e,PREVIEW_KEYDOWN:H$2,REGISTER_SUBSCRIPTION:d,REQUEST_WHATS_NEW_DATA:J$3,RESET_STORY_ARGS:W$3,RESULT_WHATS_NEW_DATA:Z$1,SAVE_STORY_REQUEST:_E,SAVE_STORY_RESPONSE:RE,SELECT_STORY:l$1,SET_CONFIG:i$3,SET_CURRENT_STORY:M$3,SET_FILTER:p$2,SET_GLOBALS:u$1,SET_INDEX:F$3,SET_STORIES:g,SET_WHATS_NEW_CACHE:$$2,SHARED_STATE_CHANGED:s$2,SHARED_STATE_SET:y$2,STORIES_COLLAPSE_ALL:c,STORIES_EXPAND_ALL:h$1,STORY_ARGS_UPDATED:f$2,STORY_CHANGED:Q$1,STORY_ERRORED:x$3,STORY_FINISHED:q$3,STORY_INDEX_INVALIDATED:m$1,STORY_MISSING:V$1,STORY_PREPARED:w$2,STORY_RENDERED:X$2,STORY_RENDER_PHASE_CHANGED:B$2,STORY_SPECIFIED:b$2,STORY_THREW_EXCEPTION:K$2,STORY_UNCHANGED:n$1,TELEMETRY_ERROR:EE,TESTING_MODULE_CANCEL_TEST_RUN_REQUEST:DE,TESTING_MODULE_CANCEL_TEST_RUN_RESPONSE:IE,TESTING_MODULE_CONFIG_CHANGE:oE,TESTING_MODULE_CRASH_REPORT:NE,TESTING_MODULE_PROGRESS_REPORT:OE,TESTING_MODULE_RUN_ALL_REQUEST:rE,TESTING_MODULE_RUN_REQUEST:AE,TESTING_MODULE_WATCH_MODE_REQUEST:CE,TOGGLE_WHATS_NEW_NOTIFICATIONS:v$2,UNHANDLED_ERRORS_WHILE_PLAYING:Y$1,UPDATE_GLOBALS:j$1,UPDATE_QUERY_PARAMS:k$4,UPDATE_STORY_ARGS:z$3,default:R$2},Symbol.toStringTag,{value:"Module"}));var Qt$1=Object.create,st=Object.defineProperty,te$1=Object.getOwnPropertyDescriptor,ee=Object.getOwnPropertyNames,re=Object.getPrototypeOf,ne$1=Object.prototype.hasOwnProperty,i$2=(Ws,ws)=>st(Ws,"name",{value:ws,configurable:!0}),U$1=(Ws=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(Ws,{get:(ws,oi)=>(typeof require<"u"?require:ws)[oi]}):Ws)(function(Ws){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+Ws+'" is not supported')}),oe$2=(Ws,ws)=>()=>(ws||Ws((ws={exports:{}}).exports,ws),ws.exports),ae=(Ws,ws,oi,si)=>{if(ws&&typeof ws=="object"||typeof ws=="function")for(let ii of ee(ws))!ne$1.call(Ws,ii)&&ii!==oi&&st(Ws,ii,{get:()=>ws[ii],enumerable:!(si=te$1(ws,ii))||si.enumerable});return Ws},ie$3=(Ws,ws,oi)=>(oi=Ws!=null?Qt$1(re(Ws)):{},ae(st(oi,"default",{value:Ws,enumerable:!0}),Ws)),At$1=oe$2((Ws,ws)=>{(function(oi){if(typeof Ws=="object"&&typeof ws<"u")ws.exports=oi();else if(typeof define=="function"&&define.amd)define([],oi);else{var si;typeof window<"u"?si=window:typeof global<"u"?si=global:typeof self<"u"?si=self:si=this,si.memoizerific=oi()}})(function(){return i$2(function oi(si,ii,ai){function li(di,hi){if(!ii[di]){if(!si[di]){var pi=typeof U$1=="function"&&U$1;if(!hi&&pi)return pi(di,!0);if(ci)return ci(di,!0);var ha=new Error("Cannot find module '"+di+"'");throw ha.code="MODULE_NOT_FOUND",ha}var ga=ii[di]={exports:{}};si[di][0].call(ga.exports,function(va){var ba=si[di][1][va];return li(ba||va)},ga,ga.exports,oi,si,ii,ai)}return ii[di].exports}i$2(li,"s");for(var ci=typeof U$1=="function"&&U$1,ui=0;ui<ai.length;ui++)li(ai[ui]);return li},"e")({1:[function(oi,si,ii){si.exports=function(ai){if(typeof Map!="function"||ai){var li=oi("./similar");return new li}else return new Map}},{"./similar":2}],2:[function(oi,si,ii){function ai(){return this.list=[],this.lastItem=void 0,this.size=0,this}i$2(ai,"Similar"),ai.prototype.get=function(li){var ci;if(this.lastItem&&this.isEqual(this.lastItem.key,li))return this.lastItem.val;if(ci=this.indexOf(li),ci>=0)return this.lastItem=this.list[ci],this.list[ci].val},ai.prototype.set=function(li,ci){var ui;return this.lastItem&&this.isEqual(this.lastItem.key,li)?(this.lastItem.val=ci,this):(ui=this.indexOf(li),ui>=0?(this.lastItem=this.list[ui],this.list[ui].val=ci,this):(this.lastItem={key:li,val:ci},this.list.push(this.lastItem),this.size++,this))},ai.prototype.delete=function(li){var ci;if(this.lastItem&&this.isEqual(this.lastItem.key,li)&&(this.lastItem=void 0),ci=this.indexOf(li),ci>=0)return this.size--,this.list.splice(ci,1)[0]},ai.prototype.has=function(li){var ci;return this.lastItem&&this.isEqual(this.lastItem.key,li)?!0:(ci=this.indexOf(li),ci>=0?(this.lastItem=this.list[ci],!0):!1)},ai.prototype.forEach=function(li,ci){var ui;for(ui=0;ui<this.size;ui++)li.call(ci||this,this.list[ui].val,this.list[ui].key,this)},ai.prototype.indexOf=function(li){var ci;for(ci=0;ci<this.size;ci++)if(this.isEqual(this.list[ci].key,li))return ci;return-1},ai.prototype.isEqual=function(li,ci){return li===ci||li!==li&&ci!==ci},si.exports=ai},{}],3:[function(oi,si,ii){var ai=oi("map-or-similar");si.exports=function(di){var hi=new ai(!1),pi=[];return function(ha){var ga=i$2(function(){var va=hi,ba,wa,xa=arguments.length-1,Ca=Array(xa+1),el=!0,ku;if((ga.numArgs||ga.numArgs===0)&&ga.numArgs!==xa+1)throw new Error("Memoizerific functions should always be called with the same number of arguments");for(ku=0;ku<xa;ku++){if(Ca[ku]={cacheItem:va,arg:arguments[ku]},va.has(arguments[ku])){va=va.get(arguments[ku]);continue}el=!1,ba=new ai(!1),va.set(arguments[ku],ba),va=ba}return el&&(va.has(arguments[xa])?wa=va.get(arguments[xa]):el=!1),el||(wa=ha.apply(null,arguments),va.set(arguments[xa],wa)),di>0&&(Ca[xa]={cacheItem:va,arg:arguments[xa]},el?li(pi,Ca):pi.push(Ca),pi.length>di&&ci(pi.shift())),ga.wasMemoized=el,ga.numArgs=xa+1,wa},"memoizerific");return ga.limit=di,ga.wasMemoized=!1,ga.cache=hi,ga.lru=pi,ga}};function li(di,hi){var pi=di.length,ha=hi.length,ga,va,ba;for(va=0;va<pi;va++){for(ga=!0,ba=0;ba<ha;ba++)if(!ui(di[va][ba].arg,hi[ba].arg)){ga=!1;break}if(ga)break}di.push(di.splice(va,1)[0])}i$2(li,"moveToMostRecentLru");function ci(di){var hi=di.length,pi=di[hi-1],ha,ga;for(pi.cacheItem.delete(pi.arg),ga=hi-2;ga>=0&&(pi=di[ga],ha=pi.cacheItem.get(pi.arg),!ha||!ha.size);ga--)pi.cacheItem.delete(pi.arg)}i$2(ci,"removeCachedResult");function ui(di,hi){return di===hi||di!==di&&hi!==hi}i$2(ui,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})}),b$1=(()=>{let Ws;return typeof window<"u"?Ws=window:typeof globalThis<"u"?Ws=globalThis:typeof global<"u"?Ws=global:typeof self<"u"?Ws=self:Ws={},Ws})(),se$1=i$2(Ws=>Ws.transports!==void 0,"isMulti"),le=i$2(()=>Math.random().toString(16).slice(2),"generateRandomId"),lt$1=class{constructor(Ws={}){this.sender=le(),this.events={},this.data={},this.transports=[],this.isAsync=Ws.async||!1,se$1(Ws)?(this.transports=Ws.transports||[],this.transports.forEach(ws=>{ws.setHandler(oi=>this.handleEvent(oi))})):this.transports=Ws.transport?[Ws.transport]:[],this.transports.forEach(ws=>{ws.setHandler(oi=>this.handleEvent(oi))})}get hasTransport(){return this.transports.length>0}addListener(Ws,ws){this.events[Ws]=this.events[Ws]||[],this.events[Ws].push(ws)}emit(Ws,...ws){let oi={type:Ws,args:ws,from:this.sender},si={};ws.length>=1&&ws[0]&&ws[0].options&&(si=ws[0].options);let ii=i$2(()=>{this.transports.forEach(ai=>{ai.send(oi,si)}),this.handleEvent(oi)},"handler");this.isAsync?setImmediate(ii):ii()}last(Ws){return this.data[Ws]}eventNames(){return Object.keys(this.events)}listenerCount(Ws){let ws=this.listeners(Ws);return ws?ws.length:0}listeners(Ws){return this.events[Ws]||void 0}once(Ws,ws){let oi=this.onceListener(Ws,ws);this.addListener(Ws,oi)}removeAllListeners(Ws){Ws?this.events[Ws]&&delete this.events[Ws]:this.events={}}removeListener(Ws,ws){let oi=this.listeners(Ws);oi&&(this.events[Ws]=oi.filter(si=>si!==ws))}on(Ws,ws){this.addListener(Ws,ws)}off(Ws,ws){this.removeListener(Ws,ws)}handleEvent(Ws){let ws=this.listeners(Ws.type);ws&&ws.length&&ws.forEach(oi=>{oi.apply(Ws,Ws.args)}),this.data[Ws.type]=Ws.args}onceListener(Ws,ws){let oi=i$2((...si)=>(this.removeListener(Ws,oi),ws(...si)),"onceListener");return oi}};i$2(lt$1,"Channel");var z$2=lt$1,ce=Object.create,St$1=Object.defineProperty,fe$1=Object.getOwnPropertyDescriptor,wt$1=Object.getOwnPropertyNames,ue$1=Object.getPrototypeOf,pe=Object.prototype.hasOwnProperty,x$2=i$2((Ws,ws)=>i$2(function(){return ws||(0,Ws[wt$1(Ws)[0]])((ws={exports:{}}).exports,ws),ws.exports},"__require"),"__commonJS"),ye$1=i$2((Ws,ws,oi,si)=>{if(ws&&typeof ws=="object"||typeof ws=="function")for(let ii of wt$1(ws))!pe.call(Ws,ii)&&ii!==oi&&St$1(Ws,ii,{get:i$2(()=>ws[ii],"get"),enumerable:!(si=fe$1(ws,ii))||si.enumerable});return Ws},"__copyProps"),tt$1=i$2((Ws,ws,oi)=>(oi=Ws!=null?ce(ue$1(Ws)):{},ye$1(ws||!Ws||!Ws.__esModule?St$1(oi,"default",{value:Ws,enumerable:!0}):oi,Ws)),"__toESM"),de$1=["bubbles","cancelBubble","cancelable","composed","currentTarget","defaultPrevented","eventPhase","isTrusted","returnValue","srcElement","target","timeStamp","type"],he$1=["detail"];function Et$1(Ws){let ws=de$1.filter(oi=>Ws[oi]!==void 0).reduce((oi,si)=>({...oi,[si]:Ws[si]}),{});return Ws instanceof CustomEvent&&he$1.filter(oi=>Ws[oi]!==void 0).forEach(oi=>{ws[oi]=Ws[oi]}),ws}i$2(Et$1,"extractEventHiddenProperties");var Ut$1=ie$3(At$1()),Tt=x$2({"node_modules/has-symbols/shams.js"(Ws,ws){ws.exports=i$2(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var oi={},si=Symbol("test"),ii=Object(si);if(typeof si=="string"||Object.prototype.toString.call(si)!=="[object Symbol]"||Object.prototype.toString.call(ii)!=="[object Symbol]")return!1;var ai=42;oi[si]=ai;for(si in oi)return!1;if(typeof Object.keys=="function"&&Object.keys(oi).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(oi).length!==0)return!1;var li=Object.getOwnPropertySymbols(oi);if(li.length!==1||li[0]!==si||!Object.prototype.propertyIsEnumerable.call(oi,si))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var ci=Object.getOwnPropertyDescriptor(oi,si);if(ci.value!==ai||ci.enumerable!==!0)return!1}return!0},"hasSymbols")}}),Ft$1=x$2({"node_modules/has-symbols/index.js"(Ws,ws){var oi=typeof Symbol<"u"&&Symbol,si=Tt();ws.exports=i$2(function(){return typeof oi!="function"||typeof Symbol!="function"||typeof oi("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:si()},"hasNativeSymbols")}}),ge$1=x$2({"node_modules/function-bind/implementation.js"(Ws,ws){var oi="Function.prototype.bind called on incompatible ",si=Array.prototype.slice,ii=Object.prototype.toString,ai="[object Function]";ws.exports=i$2(function(li){var ci=this;if(typeof ci!="function"||ii.call(ci)!==ai)throw new TypeError(oi+ci);for(var ui=si.call(arguments,1),di,hi=i$2(function(){if(this instanceof di){var ba=ci.apply(this,ui.concat(si.call(arguments)));return Object(ba)===ba?ba:this}else return ci.apply(li,ui.concat(si.call(arguments)))},"binder"),pi=Math.max(0,ci.length-ui.length),ha=[],ga=0;ga<pi;ga++)ha.push("$"+ga);if(di=Function("binder","return function ("+ha.join(",")+"){ return binder.apply(this,arguments); }")(hi),ci.prototype){var va=i$2(function(){},"Empty2");va.prototype=ci.prototype,di.prototype=new va,va.prototype=null}return di},"bind")}}),ut=x$2({"node_modules/function-bind/index.js"(Ws,ws){var oi=ge$1();ws.exports=Function.prototype.bind||oi}}),me$1=x$2({"node_modules/has/src/index.js"(Ws,ws){var oi=ut();ws.exports=oi.call(Function.call,Object.prototype.hasOwnProperty)}}),Nt$1=x$2({"node_modules/get-intrinsic/index.js"(Ws,ws){var oi,si=SyntaxError,ii=Function,ai=TypeError,li=i$2(function(kd){try{return ii('"use strict"; return ('+kd+").constructor;")()}catch{}},"getEvalledConstructor"),ci=Object.getOwnPropertyDescriptor;if(ci)try{ci({},"")}catch{ci=null}var ui=i$2(function(){throw new ai},"throwTypeError"),di=ci?function(){try{return arguments.callee,ui}catch{try{return ci(arguments,"callee").get}catch{return ui}}}():ui,hi=Ft$1()(),pi=Object.getPrototypeOf||function(kd){return kd.__proto__},ha={},ga=typeof Uint8Array>"u"?oi:pi(Uint8Array),va={"%AggregateError%":typeof AggregateError>"u"?oi:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?oi:ArrayBuffer,"%ArrayIteratorPrototype%":hi?pi([][Symbol.iterator]()):oi,"%AsyncFromSyncIteratorPrototype%":oi,"%AsyncFunction%":ha,"%AsyncGenerator%":ha,"%AsyncGeneratorFunction%":ha,"%AsyncIteratorPrototype%":ha,"%Atomics%":typeof Atomics>"u"?oi:Atomics,"%BigInt%":typeof BigInt>"u"?oi:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?oi:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?oi:Float32Array,"%Float64Array%":typeof Float64Array>"u"?oi:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?oi:FinalizationRegistry,"%Function%":ii,"%GeneratorFunction%":ha,"%Int8Array%":typeof Int8Array>"u"?oi:Int8Array,"%Int16Array%":typeof Int16Array>"u"?oi:Int16Array,"%Int32Array%":typeof Int32Array>"u"?oi:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hi?pi(pi([][Symbol.iterator]())):oi,"%JSON%":typeof JSON=="object"?JSON:oi,"%Map%":typeof Map>"u"?oi:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hi?oi:pi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?oi:Promise,"%Proxy%":typeof Proxy>"u"?oi:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?oi:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?oi:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hi?oi:pi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?oi:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hi?pi(""[Symbol.iterator]()):oi,"%Symbol%":hi?Symbol:oi,"%SyntaxError%":si,"%ThrowTypeError%":di,"%TypedArray%":ga,"%TypeError%":ai,"%Uint8Array%":typeof Uint8Array>"u"?oi:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?oi:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?oi:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?oi:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?oi:WeakMap,"%WeakRef%":typeof WeakRef>"u"?oi:WeakRef,"%WeakSet%":typeof WeakSet>"u"?oi:WeakSet},ba=i$2(function kd(Md){var Td;if(Md==="%AsyncFunction%")Td=li("async function () {}");else if(Md==="%GeneratorFunction%")Td=li("function* () {}");else if(Md==="%AsyncGeneratorFunction%")Td=li("async function* () {}");else if(Md==="%AsyncGenerator%"){var wd=kd("%AsyncGeneratorFunction%");wd&&(Td=wd.prototype)}else if(Md==="%AsyncIteratorPrototype%"){var Cd=kd("%AsyncGenerator%");Cd&&(Td=pi(Cd.prototype))}return va[Md]=Td,Td},"doEval2"),wa={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},xa=ut(),Ca=me$1(),el=xa.call(Function.call,Array.prototype.concat),ku=xa.call(Function.apply,Array.prototype.splice),gd=xa.call(Function.call,String.prototype.replace),Ed=xa.call(Function.call,String.prototype.slice),Od=xa.call(Function.call,RegExp.prototype.exec),Nd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Pd=/\\(\\)?/g,Ld=i$2(function(kd){var Md=Ed(kd,0,1),Td=Ed(kd,-1);if(Md==="%"&&Td!=="%")throw new si("invalid intrinsic syntax, expected closing `%`");if(Td==="%"&&Md!=="%")throw new si("invalid intrinsic syntax, expected opening `%`");var wd=[];return gd(kd,Nd,function(Cd,sf,of,Wd){wd[wd.length]=of?gd(Wd,Pd,"$1"):sf||Cd}),wd},"stringToPath3"),rf=i$2(function(kd,Md){var Td=kd,wd;if(Ca(wa,Td)&&(wd=wa[Td],Td="%"+wd[0]+"%"),Ca(va,Td)){var Cd=va[Td];if(Cd===ha&&(Cd=ba(Td)),typeof Cd>"u"&&!Md)throw new ai("intrinsic "+kd+" exists, but is not available. Please file an issue!");return{alias:wd,name:Td,value:Cd}}throw new si("intrinsic "+kd+" does not exist!")},"getBaseIntrinsic2");ws.exports=i$2(function(kd,Md){if(typeof kd!="string"||kd.length===0)throw new ai("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Md!="boolean")throw new ai('"allowMissing" argument must be a boolean');if(Od(/^%?[^%]*%?$/,kd)===null)throw new si("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Td=Ld(kd),wd=Td.length>0?Td[0]:"",Cd=rf("%"+wd+"%",Md),sf=Cd.name,of=Cd.value,Wd=!1,df=Cd.alias;df&&(wd=df[0],ku(Td,el([0,1],df)));for(var hf=1,xd=!0;hf<Td.length;hf+=1){var Fd=Td[hf],Vd=Ed(Fd,0,1),af=Ed(Fd,-1);if((Vd==='"'||Vd==="'"||Vd==="`"||af==='"'||af==="'"||af==="`")&&Vd!==af)throw new si("property names with quotes must have matching quotes");if((Fd==="constructor"||!xd)&&(Wd=!0),wd+="."+Fd,sf="%"+wd+"%",Ca(va,sf))of=va[sf];else if(of!=null){if(!(Fd in of)){if(!Md)throw new ai("base intrinsic for "+kd+" exists, but the property is not available.");return}if(ci&&hf+1>=Td.length){var ff=ci(of,Fd);xd=!!ff,xd&&"get"in ff&&!("originalValue"in ff.get)?of=ff.get:of=of[Fd]}else xd=Ca(of,Fd),of=of[Fd];xd&&!Wd&&(va[sf]=of)}}return of},"GetIntrinsic")}}),ve$1=x$2({"node_modules/call-bind/index.js"(Ws,ws){var oi=ut(),si=Nt$1(),ii=si("%Function.prototype.apply%"),ai=si("%Function.prototype.call%"),li=si("%Reflect.apply%",!0)||oi.call(ai,ii),ci=si("%Object.getOwnPropertyDescriptor%",!0),ui=si("%Object.defineProperty%",!0),di=si("%Math.max%");if(ui)try{ui({},"a",{value:1})}catch{ui=null}ws.exports=i$2(function(pi){var ha=li(oi,ai,arguments);if(ci&&ui){var ga=ci(ha,"length");ga.configurable&&ui(ha,"length",{value:1+di(0,pi.length-(arguments.length-1))})}return ha},"callBind");var hi=i$2(function(){return li(oi,ii,arguments)},"applyBind2");ui?ui(ws.exports,"apply",{value:hi}):ws.exports.apply=hi}}),_e$1=x$2({"node_modules/call-bind/callBound.js"(Ws,ws){var oi=Nt$1(),si=ve$1(),ii=si(oi("String.prototype.indexOf"));ws.exports=i$2(function(ai,li){var ci=oi(ai,!!li);return typeof ci=="function"&&ii(ai,".prototype.")>-1?si(ci):ci},"callBoundIntrinsic")}}),be$1=x$2({"node_modules/has-tostringtag/shams.js"(Ws,ws){var oi=Tt();ws.exports=i$2(function(){return oi()&&!!Symbol.toStringTag},"hasToStringTagShams")}}),Se$1=x$2({"node_modules/is-regex/index.js"(Ws,ws){var oi=_e$1(),si=be$1()(),ii,ai,li,ci;si&&(ii=oi("Object.prototype.hasOwnProperty"),ai=oi("RegExp.prototype.exec"),li={},ui=i$2(function(){throw li},"throwRegexMarker"),ci={toString:ui,valueOf:ui},typeof Symbol.toPrimitive=="symbol"&&(ci[Symbol.toPrimitive]=ui));var ui,di=oi("Object.prototype.toString"),hi=Object.getOwnPropertyDescriptor,pi="[object RegExp]";ws.exports=i$2(si?function(ha){if(!ha||typeof ha!="object")return!1;var ga=hi(ha,"lastIndex"),va=ga&&ii(ga,"value");if(!va)return!1;try{ai(ha,ci)}catch(ba){return ba===li}}:function(ha){return!ha||typeof ha!="object"&&typeof ha!="function"?!1:di(ha)===pi},"isRegex")}}),we=x$2({"node_modules/is-function/index.js"(Ws,ws){ws.exports=si;var oi=Object.prototype.toString;function si(ii){if(!ii)return!1;var ai=oi.call(ii);return ai==="[object Function]"||typeof ii=="function"&&ai!=="[object RegExp]"||typeof window<"u"&&(ii===window.setTimeout||ii===window.alert||ii===window.confirm||ii===window.prompt)}i$2(si,"isFunction3")}}),Ee$1=x$2({"node_modules/is-symbol/index.js"(Ws,ws){var oi=Object.prototype.toString,si=Ft$1()();si?(ii=Symbol.prototype.toString,ai=/^Symbol\(.*\)$/,li=i$2(function(ci){return typeof ci.valueOf()!="symbol"?!1:ai.test(ii.call(ci))},"isRealSymbolObject"),ws.exports=i$2(function(ci){if(typeof ci=="symbol")return!0;if(oi.call(ci)!=="[object Symbol]")return!1;try{return li(ci)}catch{return!1}},"isSymbol3")):ws.exports=i$2(function(ci){return!1},"isSymbol3");var ii,ai,li}}),Oe$1=tt$1(Se$1()),Ae=tt$1(we()),Pe$1=tt$1(Ee$1());function xe$1(Ws){return Ws!=null&&typeof Ws=="object"&&Array.isArray(Ws)===!1}i$2(xe$1,"isObject");var Ce$1=typeof global=="object"&&global&&global.Object===Object&&global,Ie$1=Ce$1,je$1=typeof self=="object"&&self&&self.Object===Object&&self,Te$1=Ie$1||je$1||Function("return this")(),pt$1=Te$1,Fe$1=pt$1.Symbol,M$2=Fe$1,Rt$1=Object.prototype,Ne=Rt$1.hasOwnProperty,Re=Rt$1.toString,W$2=M$2?M$2.toStringTag:void 0;function Me$1(Ws){var ws=Ne.call(Ws,W$2),oi=Ws[W$2];try{Ws[W$2]=void 0;var si=!0}catch{}var ii=Re.call(Ws);return si&&(ws?Ws[W$2]=oi:delete Ws[W$2]),ii}i$2(Me$1,"getRawTag");var $e$1=Me$1,ke$1=Object.prototype,De$1=ke$1.toString;function Le$1(Ws){return De$1.call(Ws)}i$2(Le$1,"objectToString");var Ue$1=Le$1,ze$1="[object Null]",We$1="[object Undefined]",Pt$1=M$2?M$2.toStringTag:void 0;function Be$1(Ws){return Ws==null?Ws===void 0?We$1:ze$1:Pt$1&&Pt$1 in Object(Ws)?$e$1(Ws):Ue$1(Ws)}i$2(Be$1,"baseGetTag");var Mt$1=Be$1;function He$1(Ws){return Ws!=null&&typeof Ws=="object"}i$2(He$1,"isObjectLike");var qe=He$1,Ge$1="[object Symbol]";function Je$1(Ws){return typeof Ws=="symbol"||qe(Ws)&&Mt$1(Ws)==Ge$1}i$2(Je$1,"isSymbol");var yt=Je$1;function Ve$1(Ws,ws){for(var oi=-1,si=Ws==null?0:Ws.length,ii=Array(si);++oi<si;)ii[oi]=ws(Ws[oi],oi,Ws);return ii}i$2(Ve$1,"arrayMap");var Ke$1=Ve$1,Ye$1=Array.isArray,dt$1=Ye$1,xt=M$2?M$2.prototype:void 0,Ct$1=xt?xt.toString:void 0;function $t$1(Ws){if(typeof Ws=="string")return Ws;if(dt$1(Ws))return Ke$1(Ws,$t$1)+"";if(yt(Ws))return Ct$1?Ct$1.call(Ws):"";var ws=Ws+"";return ws=="0"&&1/Ws==-1/0?"-0":ws}i$2($t$1,"baseToString");var Xe$1=$t$1;function Qe(Ws){var ws=typeof Ws;return Ws!=null&&(ws=="object"||ws=="function")}i$2(Qe,"isObject2");var kt$1=Qe,tr="[object AsyncFunction]",er="[object Function]",rr="[object GeneratorFunction]",nr="[object Proxy]";function or$1(Ws){if(!kt$1(Ws))return!1;var ws=Mt$1(Ws);return ws==er||ws==rr||ws==tr||ws==nr}i$2(or$1,"isFunction");var ar=or$1,ir=pt$1["__core-js_shared__"],ft$1=ir,It$1=function(){var Ws=/[^.]+$/.exec(ft$1&&ft$1.keys&&ft$1.keys.IE_PROTO||"");return Ws?"Symbol(src)_1."+Ws:""}();function sr(Ws){return!!It$1&&It$1 in Ws}i$2(sr,"isMasked");var lr=sr,cr=Function.prototype,fr$1=cr.toString;function ur$1(Ws){if(Ws!=null){try{return fr$1.call(Ws)}catch{}try{return Ws+""}catch{}}return""}i$2(ur$1,"toSource");var pr=ur$1,yr$1=/[\\^$.*+?()[\]{}|]/g,dr=/^\[object .+?Constructor\]$/,hr$1=Function.prototype,gr$1=Object.prototype,mr$1=hr$1.toString,vr$1=gr$1.hasOwnProperty,_r$1=RegExp("^"+mr$1.call(vr$1).replace(yr$1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function br$1(Ws){if(!kt$1(Ws)||lr(Ws))return!1;var ws=ar(Ws)?_r$1:dr;return ws.test(pr(Ws))}i$2(br$1,"baseIsNative");var Sr$1=br$1;function wr$1(Ws,ws){return Ws==null?void 0:Ws[ws]}i$2(wr$1,"getValue");var Er$1=wr$1;function Or$1(Ws,ws){var oi=Er$1(Ws,ws);return Sr$1(oi)?oi:void 0}i$2(Or$1,"getNative");var Dt$1=Or$1;function Ar$1(Ws,ws){return Ws===ws||Ws!==Ws&&ws!==ws}i$2(Ar$1,"eq");var Pr$1=Ar$1,xr$1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cr$1=/^\w*$/;function Ir(Ws,ws){if(dt$1(Ws))return!1;var oi=typeof Ws;return oi=="number"||oi=="symbol"||oi=="boolean"||Ws==null||yt(Ws)?!0:Cr$1.test(Ws)||!xr$1.test(Ws)||ws!=null&&Ws in Object(ws)}i$2(Ir,"isKey");var jr$1=Ir,Tr$1=Dt$1(Object,"create"),B$1=Tr$1;function Fr$1(){this.__data__=B$1?B$1(null):{},this.size=0}i$2(Fr$1,"hashClear");var Nr$1=Fr$1;function Rr$1(Ws){var ws=this.has(Ws)&&delete this.__data__[Ws];return this.size-=ws?1:0,ws}i$2(Rr$1,"hashDelete");var Mr$1=Rr$1,$r$1="__lodash_hash_undefined__",kr$1=Object.prototype,Dr=kr$1.hasOwnProperty;function Lr$1(Ws){var ws=this.__data__;if(B$1){var oi=ws[Ws];return oi===$r$1?void 0:oi}return Dr.call(ws,Ws)?ws[Ws]:void 0}i$2(Lr$1,"hashGet");var Ur$1=Lr$1,zr$1=Object.prototype,Wr$1=zr$1.hasOwnProperty;function Br$1(Ws){var ws=this.__data__;return B$1?ws[Ws]!==void 0:Wr$1.call(ws,Ws)}i$2(Br$1,"hashHas");var Hr$1=Br$1,qr$1="__lodash_hash_undefined__";function Gr$1(Ws,ws){var oi=this.__data__;return this.size+=this.has(Ws)?0:1,oi[Ws]=B$1&&ws===void 0?qr$1:ws,this}i$2(Gr$1,"hashSet");var Jr$1=Gr$1;function $$1(Ws){var ws=-1,oi=Ws==null?0:Ws.length;for(this.clear();++ws<oi;){var si=Ws[ws];this.set(si[0],si[1])}}i$2($$1,"Hash");$$1.prototype.clear=Nr$1;$$1.prototype.delete=Mr$1;$$1.prototype.get=Ur$1;$$1.prototype.has=Hr$1;$$1.prototype.set=Jr$1;var jt$1=$$1;function Vr$1(){this.__data__=[],this.size=0}i$2(Vr$1,"listCacheClear");var Kr$1=Vr$1;function Yr$1(Ws,ws){for(var oi=Ws.length;oi--;)if(Pr$1(Ws[oi][0],ws))return oi;return-1}i$2(Yr$1,"assocIndexOf");var rt=Yr$1,Zr$1=Array.prototype,Xr$1=Zr$1.splice;function Qr(Ws){var ws=this.__data__,oi=rt(ws,Ws);if(oi<0)return!1;var si=ws.length-1;return oi==si?ws.pop():Xr$1.call(ws,oi,1),--this.size,!0}i$2(Qr,"listCacheDelete");var tn=Qr;function en(Ws){var ws=this.__data__,oi=rt(ws,Ws);return oi<0?void 0:ws[oi][1]}i$2(en,"listCacheGet");var rn=en;function nn(Ws){return rt(this.__data__,Ws)>-1}i$2(nn,"listCacheHas");var on=nn;function an(Ws,ws){var oi=this.__data__,si=rt(oi,Ws);return si<0?(++this.size,oi.push([Ws,ws])):oi[si][1]=ws,this}i$2(an,"listCacheSet");var sn=an;function k$3(Ws){var ws=-1,oi=Ws==null?0:Ws.length;for(this.clear();++ws<oi;){var si=Ws[ws];this.set(si[0],si[1])}}i$2(k$3,"ListCache");k$3.prototype.clear=Kr$1;k$3.prototype.delete=tn;k$3.prototype.get=rn;k$3.prototype.has=on;k$3.prototype.set=sn;var ln=k$3,cn$1=Dt$1(pt$1,"Map"),fn=cn$1;function un(){this.size=0,this.__data__={hash:new jt$1,map:new(fn||ln),string:new jt$1}}i$2(un,"mapCacheClear");var pn=un;function yn$1(Ws){var ws=typeof Ws;return ws=="string"||ws=="number"||ws=="symbol"||ws=="boolean"?Ws!=="__proto__":Ws===null}i$2(yn$1,"isKeyable");var dn=yn$1;function hn(Ws,ws){var oi=Ws.__data__;return dn(ws)?oi[typeof ws=="string"?"string":"hash"]:oi.map}i$2(hn,"getMapData");var nt$1=hn;function gn(Ws){var ws=nt$1(this,Ws).delete(Ws);return this.size-=ws?1:0,ws}i$2(gn,"mapCacheDelete");var mn=gn;function vn$1(Ws){return nt$1(this,Ws).get(Ws)}i$2(vn$1,"mapCacheGet");var _n$1=vn$1;function bn(Ws){return nt$1(this,Ws).has(Ws)}i$2(bn,"mapCacheHas");var Sn=bn;function wn(Ws,ws){var oi=nt$1(this,Ws),si=oi.size;return oi.set(Ws,ws),this.size+=oi.size==si?0:1,this}i$2(wn,"mapCacheSet");var En=wn;function D$2(Ws){var ws=-1,oi=Ws==null?0:Ws.length;for(this.clear();++ws<oi;){var si=Ws[ws];this.set(si[0],si[1])}}i$2(D$2,"MapCache");D$2.prototype.clear=pn;D$2.prototype.delete=mn;D$2.prototype.get=_n$1;D$2.prototype.has=Sn;D$2.prototype.set=En;var Lt$1=D$2,On$1="Expected a function";function ht$1(Ws,ws){if(typeof Ws!="function"||ws!=null&&typeof ws!="function")throw new TypeError(On$1);var oi=i$2(function(){var si=arguments,ii=ws?ws.apply(this,si):si[0],ai=oi.cache;if(ai.has(ii))return ai.get(ii);var li=Ws.apply(this,si);return oi.cache=ai.set(ii,li)||ai,li},"memoized");return oi.cache=new(ht$1.Cache||Lt$1),oi}i$2(ht$1,"memoize");ht$1.Cache=Lt$1;var An$1=ht$1,Pn$1=500;function xn(Ws){var ws=An$1(Ws,function(si){return oi.size===Pn$1&&oi.clear(),si}),oi=ws.cache;return ws}i$2(xn,"memoizeCapped");var Cn$1=xn,In$1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jn$1=/\\(\\)?/g,Tn=Cn$1(function(Ws){var ws=[];return Ws.charCodeAt(0)===46&&ws.push(""),Ws.replace(In$1,function(oi,si,ii,ai){ws.push(ii?ai.replace(jn$1,"$1"):si||oi)}),ws}),Fn$1=Tn;function Nn$1(Ws){return Ws==null?"":Xe$1(Ws)}i$2(Nn$1,"toString");var Rn=Nn$1;function Mn$1(Ws,ws){return dt$1(Ws)?Ws:jr$1(Ws,ws)?[Ws]:Fn$1(Rn(Ws))}i$2(Mn$1,"castPath");var $n$1=Mn$1;function Dn$1(Ws){if(typeof Ws=="string"||yt(Ws))return Ws;var ws=Ws+"";return ws=="0"&&1/Ws==-1/0?"-0":ws}i$2(Dn$1,"toKey");var Ln$1=Dn$1;function Un(Ws,ws){ws=$n$1(ws,Ws);for(var oi=0,si=ws.length;Ws!=null&&oi<si;)Ws=Ws[Ln$1(ws[oi++])];return oi&&oi==si?Ws:void 0}i$2(Un,"baseGet");var zn$1=Un;function Wn$1(Ws,ws,oi){var si=Ws==null?void 0:zn$1(Ws,ws);return si===void 0?oi:si}i$2(Wn$1,"get");var Bn=Wn$1,et$1=xe$1,Hn=i$2(Ws=>{let ws=null,oi=!1,si=!1,ii=!1,ai="";if(Ws.indexOf("//")>=0||Ws.indexOf("/*")>=0)for(let li=0;li<Ws.length;li+=1)!ws&&!oi&&!si&&!ii?Ws[li]==='"'||Ws[li]==="'"||Ws[li]==="`"?ws=Ws[li]:Ws[li]==="/"&&Ws[li+1]==="*"?oi=!0:Ws[li]==="/"&&Ws[li+1]==="/"?si=!0:Ws[li]==="/"&&Ws[li+1]!=="/"&&(ii=!0):(ws&&(Ws[li]===ws&&Ws[li-1]!=="\\"||Ws[li]===`
|
|
48
48
|
`&&ws!=="`")&&(ws=null),ii&&(Ws[li]==="/"&&Ws[li-1]!=="\\"||Ws[li]===`
|
|
49
49
|
`)&&(ii=!1),oi&&Ws[li-1]==="/"&&Ws[li-2]==="*"&&(oi=!1),si&&Ws[li]===`
|
|
50
50
|
`&&(si=!1)),!oi&&!si&&(ai+=Ws[li]);else ai=Ws;return ai},"removeCodeComments"),qn$1=(0,Ut$1.default)(1e4)(Ws=>Hn(Ws).replace(/\n\s*/g,"").trim()),Gn=i$2(function(Ws,ws){let oi=ws.slice(0,ws.indexOf("{")),si=ws.slice(ws.indexOf("{"));if(oi.includes("=>")||oi.includes("function"))return ws;let ii=oi;return ii=ii.replace(Ws,"function"),ii+si},"convertShorthandMethods2"),Jn$1=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/,H$1=i$2(Ws=>Ws.match(/^[\[\{\"\}].*[\]\}\"]$/),"isJSON");function zt$1(Ws){if(!et$1(Ws))return Ws;let ws=Ws,oi=!1;return typeof Event<"u"&&Ws instanceof Event&&(ws=Et$1(ws),oi=!0),ws=Object.keys(ws).reduce((si,ii)=>{try{ws[ii]&&ws[ii].toJSON,si[ii]=ws[ii]}catch{oi=!0}return si},{}),oi?ws:Ws}i$2(zt$1,"convertUnconventionalData");var Vn=i$2(function(Ws){let ws,oi,si,ii;return i$2(function(ai,li){try{if(ai==="")return ii=[],ws=new Map([[li,"[]"]]),oi=new Map,si=[],li;let ci=oi.get(this)||this;for(;si.length&&ci!==si[0];)si.shift(),ii.pop();if(typeof li=="boolean")return li;if(li===void 0)return Ws.allowUndefined?"_undefined_":void 0;if(li===null)return null;if(typeof li=="number")return li===-1/0?"_-Infinity_":li===1/0?"_Infinity_":Number.isNaN(li)?"_NaN_":li;if(typeof li=="bigint")return`_bigint_${li.toString()}`;if(typeof li=="string")return Jn$1.test(li)?Ws.allowDate?`_date_${li}`:void 0:li;if((0,Oe$1.default)(li))return Ws.allowRegExp?`_regexp_${li.flags}|${li.source}`:void 0;if((0,Ae.default)(li)){if(!Ws.allowFunction)return;let{name:di}=li,hi=li.toString();return hi.match(/(\[native code\]|WEBPACK_IMPORTED_MODULE|__webpack_exports__|__webpack_require__)/)?`_function_${di}|${(()=>{}).toString()}`:`_function_${di}|${qn$1(Gn(ai,hi))}`}if((0,Pe$1.default)(li)){if(!Ws.allowSymbol)return;let di=Symbol.keyFor(li);return di!==void 0?`_gsymbol_${di}`:`_symbol_${li.toString().slice(7,-1)}`}if(si.length>=Ws.maxDepth)return Array.isArray(li)?`[Array(${li.length})]`:"[Object]";if(li===this)return`_duplicate_${JSON.stringify(ii)}`;if(li instanceof Error&&Ws.allowError)return{__isConvertedError__:!0,errorProperties:{...li.cause?{cause:li.cause}:{},...li,name:li.name,message:li.message,stack:li.stack,"_constructor-name_":li.constructor.name}};if(li.constructor&&li.constructor.name&&li.constructor.name!=="Object"&&!Array.isArray(li)&&!Ws.allowClass)return;let ui=ws.get(li);if(!ui){let di=Array.isArray(li)?li:zt$1(li);if(li.constructor&&li.constructor.name&&li.constructor.name!=="Object"&&!Array.isArray(li)&&Ws.allowClass)try{Object.assign(di,{"_constructor-name_":li.constructor.name})}catch{}return ii.push(ai),si.unshift(di),ws.set(li,JSON.stringify(ii)),li!==di&&oi.set(li,di),di}return`_duplicate_${ui}`}catch{return}},"replace")},"replacer2"),Kn$1=i$2(function reviver(options){let refs=[],root;return i$2(function revive(key,value){if(key===""&&(root=value,refs.forEach(({target:Ws,container:ws,replacement:oi})=>{let si=H$1(oi)?JSON.parse(oi):oi.split(".");si.length===0?ws[Ws]=root:ws[Ws]=Bn(root,si)})),key==="_constructor-name_")return value;if(et$1(value)&&value.__isConvertedError__){let{message:Ws,...ws}=value.errorProperties,oi=new Error(Ws);return Object.assign(oi,ws),oi}if(et$1(value)&&value["_constructor-name_"]&&options.allowFunction){let Ws=value["_constructor-name_"];if(Ws!=="Object"){let ws=new Function(`return function ${Ws.replace(/[^a-zA-Z0-9$_]+/g,"")}(){}`)();Object.setPrototypeOf(value,new ws)}return delete value["_constructor-name_"],value}if(typeof value=="string"&&value.startsWith("_function_")&&options.allowFunction){let[,name,source]=value.match(/_function_([^|]*)\|(.*)/)||[],sourceSanitized=source.replace(/[(\(\))|\\| |\]|`]*$/,"");if(!options.lazyEval)return eval(`(${sourceSanitized})`);let result=i$2((...args)=>{let f=eval(`(${sourceSanitized})`);return f(...args)},"result");return Object.defineProperty(result,"toString",{value:i$2(()=>sourceSanitized,"value")}),Object.defineProperty(result,"name",{value:name}),result}if(typeof value=="string"&&value.startsWith("_regexp_")&&options.allowRegExp){let[,Ws,ws]=value.match(/_regexp_([^|]*)\|(.*)/)||[];return new RegExp(ws,Ws)}return typeof value=="string"&&value.startsWith("_date_")&&options.allowDate?new Date(value.replace("_date_","")):typeof value=="string"&&value.startsWith("_duplicate_")?(refs.push({target:key,container:this,replacement:value.replace(/^_duplicate_/,"")}),null):typeof value=="string"&&value.startsWith("_symbol_")&&options.allowSymbol?Symbol(value.replace("_symbol_","")):typeof value=="string"&&value.startsWith("_gsymbol_")&&options.allowSymbol?Symbol.for(value.replace("_gsymbol_","")):typeof value=="string"&&value==="_-Infinity_"?-1/0:typeof value=="string"&&value==="_Infinity_"?1/0:typeof value=="string"&&value==="_NaN_"?NaN:typeof value=="string"&&value.startsWith("_bigint_")&&typeof BigInt=="function"?BigInt(value.replace("_bigint_","")):value},"revive")},"reviver"),Wt$1={maxDepth:10,space:void 0,allowFunction:!0,allowRegExp:!0,allowDate:!0,allowClass:!0,allowError:!0,allowUndefined:!0,allowSymbol:!0,lazyEval:!0},ot=i$2((Ws,ws={})=>{let oi={...Wt$1,...ws};return JSON.stringify(zt$1(Ws),Vn(oi),ws.space)},"stringify"),Yn$1=i$2(()=>{let Ws=new Map;return i$2(function ws(oi){et$1(oi)&&Object.entries(oi).forEach(([si,ii])=>{ii==="_undefined_"?oi[si]=void 0:Ws.get(ii)||(Ws.set(ii,!0),ws(ii))}),Array.isArray(oi)&&oi.forEach((si,ii)=>{si==="_undefined_"?(Ws.set(si,!0),oi[ii]=void 0):Ws.get(si)||(Ws.set(si,!0),ws(si))})},"mutateUndefined")},"mutator"),at$1=i$2((Ws,ws={})=>{let oi={...Wt$1,...ws},si=JSON.parse(Ws,Kn$1(oi));return Yn$1()(si),si},"parse"),gt$1="Invariant failed";function q$2(Ws,ws){if(!Ws){var oi=typeof ws=="function"?ws():ws,si=oi?"".concat(gt$1,": ").concat(oi):gt$1;throw new Error(si)}}i$2(q$2,"invariant");var Bt$1=i$2(Ws=>{let ws=Array.from(document.querySelectorAll("iframe[data-is-storybook]")),[oi,...si]=ws.filter(ai=>{var li,ci;try{return((li=ai.contentWindow)==null?void 0:li.location.origin)===Ws.source.location.origin&&((ci=ai.contentWindow)==null?void 0:ci.location.pathname)===Ws.source.location.pathname}catch{}try{return ai.contentWindow===Ws.source}catch{}let ui=ai.getAttribute("src"),di;try{if(!ui)return!1;({origin:di}=new URL(ui,document.location.toString()))}catch{return!1}return di===Ws.origin}),ii=oi==null?void 0:oi.getAttribute("src");if(ii&&si.length===0){let{protocol:ai,host:li,pathname:ci}=new URL(ii,document.location.toString());return`${ai}//${li}${ci}`}return si.length>0&&s$3.error("found multiple candidates for event source"),null},"getEventSourceUrl"),{document:mt$1,location:vt$1}=b$1,Gt$1="storybook-channel",to$1={allowFunction:!1,maxDepth:25},_t$1=class{constructor(Ws){if(this.config=Ws,this.connected=!1,this.buffer=[],typeof(b$1==null?void 0:b$1.addEventListener)=="function"&&b$1.addEventListener("message",this.handleEvent.bind(this),!1),Ws.page!=="manager"&&Ws.page!=="preview")throw new Error(`postmsg-channel: "config.page" cannot be "${Ws.page}"`)}setHandler(Ws){this.handler=(...ws)=>{Ws.apply(this,ws),!this.connected&&this.getLocalFrame().length&&(this.flush(),this.connected=!0)}}send(Ws,ws){let{target:oi,allowRegExp:si,allowFunction:ii,allowSymbol:ai,allowDate:li,allowError:ci,allowUndefined:ui,allowClass:di,maxDepth:hi,space:pi,lazyEval:ha}=ws||{},ga=Object.fromEntries(Object.entries({allowRegExp:si,allowFunction:ii,allowSymbol:ai,allowDate:li,allowError:ci,allowUndefined:ui,allowClass:di,maxDepth:hi,space:pi,lazyEval:ha}).filter(([Ca,el])=>typeof el<"u")),va={...to$1,...b$1.CHANNEL_OPTIONS||{},...ga},ba=this.getFrames(oi),wa=new URLSearchParams((vt$1==null?void 0:vt$1.search)||""),xa=ot({key:Gt$1,event:Ws,refId:wa.get("refId")},va);return ba.length?(this.buffer.length&&this.flush(),ba.forEach(Ca=>{try{Ca.postMessage(xa,"*")}catch{s$3.error("sending over postmessage fail")}}),Promise.resolve(null)):new Promise((Ca,el)=>{this.buffer.push({event:Ws,resolve:Ca,reject:el})})}flush(){let{buffer:Ws}=this;this.buffer=[],Ws.forEach(ws=>{this.send(ws.event).then(ws.resolve).catch(ws.reject)})}getFrames(Ws){if(this.config.page==="manager"){let ws=Array.from(mt$1.querySelectorAll("iframe[data-is-storybook][data-is-loaded]")).flatMap(oi=>{try{return oi.contentWindow&&oi.dataset.isStorybook!==void 0&&oi.id===Ws?[oi.contentWindow]:[]}catch{return[]}});return ws!=null&&ws.length?ws:this.getCurrentFrames()}return b$1&&b$1.parent&&b$1.parent!==b$1.self?[b$1.parent]:[]}getCurrentFrames(){return this.config.page==="manager"?Array.from(mt$1.querySelectorAll('[data-is-storybook="true"]')).flatMap(Ws=>Ws.contentWindow?[Ws.contentWindow]:[]):b$1&&b$1.parent?[b$1.parent]:[]}getLocalFrame(){return this.config.page==="manager"?Array.from(mt$1.querySelectorAll("#storybook-preview-iframe")).flatMap(Ws=>Ws.contentWindow?[Ws.contentWindow]:[]):b$1&&b$1.parent?[b$1.parent]:[]}handleEvent(Ws){try{let{data:ws}=Ws,{key:oi,event:si,refId:ii}=typeof ws=="string"&&H$1(ws)?at$1(ws,b$1.CHANNEL_OPTIONS||{}):ws;if(oi===Gt$1){let ai=this.config.page==="manager"?'<span style="color: #37D5D3; background: black"> manager </span>':'<span style="color: #1EA7FD; background: black"> preview </span>',li=Object.values(Qn$1).includes(si.type)?`<span style="color: #FF4785">${si.type}</span>`:`<span style="color: #FFAE00">${si.type}</span>`;if(ii&&(si.refId=ii),si.source=this.config.page==="preview"?Ws.origin:Bt$1(Ws),!si.source){r$3.error(`${ai} received ${li} but was unable to determine the source of the event`);return}let ci=`${ai} received ${li} (${ws.length})`;r$3.debug(vt$1.origin!==si.source?ci:`${ci} <span style="color: gray">(on ${vt$1.origin} from ${si.source})</span>`,...si.args),q$2(this.handler,"ChannelHandler should be set"),this.handler(si)}}catch(ws){s$3.error(ws)}}};i$2(_t$1,"PostMessageTransport");var G$3=_t$1,{WebSocket:eo$1}=b$1,bt$1=class{constructor({url:Ws,onError:ws,page:oi}){this.buffer=[],this.isReady=!1,this.socket=new eo$1(Ws),this.socket.onopen=()=>{this.isReady=!0,this.flush()},this.socket.onmessage=({data:si})=>{let ii=typeof si=="string"&&H$1(si)?at$1(si):si;q$2(this.handler,"WebsocketTransport handler should be set"),this.handler(ii)},this.socket.onerror=si=>{ws&&ws(si)},this.socket.onclose=()=>{q$2(this.handler,"WebsocketTransport handler should be set"),this.handler({type:S$2,args:[],from:oi||"preview"})}}setHandler(Ws){this.handler=Ws}send(Ws){this.isReady?this.sendNow(Ws):this.sendLater(Ws)}sendLater(Ws){this.buffer.push(Ws)}sendNow(Ws){let ws=ot(Ws,{maxDepth:15,allowFunction:!1,...b$1.CHANNEL_OPTIONS});this.socket.send(ws)}flush(){let{buffer:Ws}=this;this.buffer=[],Ws.forEach(ws=>this.send(ws))}};i$2(bt$1,"WebsocketTransport");var J$2=bt$1,{CONFIG_TYPE:ro$1}=b$1;function $o$1({page:Ws,extraTransports:ws=[]}){let oi=[new G$3({page:Ws}),...ws];if(ro$1==="DEVELOPMENT"){let si=window.location.protocol==="http:"?"ws":"wss",{hostname:ii,port:ai}=window.location,li=`${si}://${ii}:${ai}/storybook-server-channel`;oi.push(new J$2({url:li,onError:i$2(()=>{},"onError"),page:Ws}))}return new z$2({transports:oi})}i$2($o$1,"createBrowserChannel");var oe$1=Object.defineProperty,t$3=(Ws,ws)=>oe$1(Ws,"name",{value:ws,configurable:!0});function r$1(Ws){for(var ws=[],oi=1;oi<arguments.length;oi++)ws[oi-1]=arguments[oi];var si=Array.from(typeof Ws=="string"?[Ws]:Ws);si[si.length-1]=si[si.length-1].replace(/\r?\n([\t ]*)$/,"");var ii=si.reduce(function(ci,ui){var di=ui.match(/\n([\t ]+|(?!\s).)/g);return di?ci.concat(di.map(function(hi){var pi,ha;return(ha=(pi=hi.match(/[\t ]/g))===null||pi===void 0?void 0:pi.length)!==null&&ha!==void 0?ha:0})):ci},[]);if(ii.length){var ai=new RegExp(`
|
|
@@ -176,9 +176,9 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
176
176
|
- px, vh, vw, em, rem and %.
|
|
177
177
|
|
|
178
178
|
You can either change the viewport for this story to use one of the supported units or skip the test by adding '!test' to the story's tags per https://storybook.js.org/docs/writing-stories/tags
|
|
179
|
-
`}),this.data=Ws}};t$3(O$1,"UnsupportedViewportDimensionError");var C$2=Object.create,u=Object.defineProperty,B=Object.getOwnPropertyDescriptor,F$1=Object.getOwnPropertyNames,h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,E=(Ws,ws)=>()=>(ws||Ws((ws={exports:{}}).exports,ws),ws.exports),v=(Ws,ws,oi,si)=>{if(ws&&typeof ws=="object"||typeof ws=="function")for(let ii of F$1(ws))!w.call(Ws,ii)&&ii!==oi&&u(Ws,ii,{get:()=>ws[ii],enumerable:!(si=B(ws,ii))||si.enumerable});return Ws},I=(Ws,ws,oi)=>(oi=Ws!=null?C$2(h(Ws)):{},v(!Ws||!Ws.__esModule?u(oi,"default",{value:Ws,enumerable:!0}):oi,Ws)),x=E(Ws=>{Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.isEqual=function(){var ws=Object.prototype.toString,oi=Object.getPrototypeOf,si=Object.getOwnPropertySymbols?function(ii){return Object.keys(ii).concat(Object.getOwnPropertySymbols(ii))}:Object.keys;return function(ii,ai){return function li(ci,ui,di){var hi,pi,ha,ga=ws.call(ci),va=ws.call(ui);if(ci===ui)return!0;if(ci==null||ui==null)return!1;if(di.indexOf(ci)>-1&&di.indexOf(ui)>-1)return!0;if(di.push(ci,ui),ga!=va||(hi=si(ci),pi=si(ui),hi.length!=pi.length||hi.some(function(ba){return!li(ci[ba],ui[ba],di)})))return!1;switch(ga.slice(8,-1)){case"Symbol":return ci.valueOf()==ui.valueOf();case"Date":case"Number":return+ci==+ui||+ci!=+ci&&+ui!=+ui;case"RegExp":case"Function":case"String":case"Boolean":return""+ci==""+ui;case"Set":case"Map":hi=ci.entries(),pi=ui.entries();do if(!li((ha=hi.next()).value,pi.next().value,di))return!1;while(!ha.done);return!0;case"ArrayBuffer":ci=new Uint8Array(ci),ui=new Uint8Array(ui);case"DataView":ci=new Uint8Array(ci.buffer),ui=new Uint8Array(ui.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(ci.length!=ui.length)return!1;for(ha=0;ha<ci.length;ha++)if((ha in ci||ha in ui)&&(ha in ci!=ha in ui||!li(ci[ha],ui[ha],di)))return!1;return!0;case"Object":return li(oi(ci),oi(ui),di);default:return!1}}(ii,ai,[])}}()});function R(Ws){return Ws.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(ws,oi,si,ii)=>`${oi} ${si}${ii}`).replace(/([a-z])([A-Z])/g,(ws,oi,si)=>`${oi} ${si}`).replace(/([a-z])([0-9])/gi,(ws,oi,si)=>`${oi} ${si}`).replace(/([0-9])([a-z])/gi,(ws,oi,si)=>`${oi} ${si}`).replace(/(\s|^)(\w)/g,(ws,oi,si)=>`${oi}${si.toUpperCase()}`).replace(/ +/g," ").trim()}var l=I(x()),S=Ws=>Ws.map(ws=>typeof ws<"u").filter(Boolean).length,k$1=(Ws,ws)=>{let{exists:oi,eq:si,neq:ii,truthy:ai}=Ws;if(S([oi,si,ii,ai])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:oi,eq:si,neq:ii})}`);if(typeof si<"u")return(0,l.isEqual)(ws,si);if(typeof ii<"u")return!(0,l.isEqual)(ws,ii);if(typeof oi<"u"){let li=typeof ws<"u";return oi?li:!li}return typeof ai>"u"||ai?!!ws:!ws},P$1=(Ws,ws,oi)=>{if(!Ws.if)return!0;let{arg:si,global:ii}=Ws.if;if(S([si,ii])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:si,global:ii})}`);let ai=si?ws[si]:oi[ii];return k$1(Ws.if,ai)},O=Ws=>Ws.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),f=(Ws,ws)=>{let oi=O(Ws);if(oi==="")throw new Error(`Invalid ${ws} '${Ws}', must include alphanumeric characters`);return oi},G$1=(Ws,ws)=>`${f(Ws,"kind")}${ws?`--${f(ws,"name")}`:""}`,N=Ws=>R(Ws);function m(Ws,ws){return Array.isArray(ws)?ws.includes(Ws):Ws.match(ws)}function M(Ws,{includeStories:ws,excludeStories:oi}){return Ws!=="__esModule"&&(!ws||m(Ws,ws))&&(!oi||!m(Ws,oi))}var z=(...Ws)=>{let ws=Ws.reduce((oi,si)=>(si.startsWith("!")?oi.delete(si.slice(1)):oi.add(si),oi),new Set);return Array.from(ws)},jn=Object.create,fr=Object.defineProperty,Mn=Object.getOwnPropertyDescriptor,_n=Object.getOwnPropertyNames,Ln=Object.getPrototypeOf,Nn=Object.prototype.hasOwnProperty,s$1=(Ws,ws)=>fr(Ws,"name",{value:ws,configurable:!0}),Ee=(Ws=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(Ws,{get:(ws,oi)=>(typeof require<"u"?require:ws)[oi]}):Ws)(function(Ws){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+Ws+'" is not supported')}),D=(Ws,ws)=>()=>(ws||Ws((ws={exports:{}}).exports,ws),ws.exports),qn=(Ws,ws,oi,si)=>{if(ws&&typeof ws=="object"||typeof ws=="function")for(let ii of _n(ws))!Nn.call(Ws,ii)&&ii!==oi&&fr(Ws,ii,{get:()=>ws[ii],enumerable:!(si=Mn(ws,ii))||si.enumerable});return Ws},ue=(Ws,ws,oi)=>(oi=Ws!=null?jn(Ln(Ws)):{},qn(fr(oi,"default",{value:Ws,enumerable:!0}),Ws)),Or=D((Ws,ws)=>{(function(oi){if(typeof Ws=="object"&&typeof ws<"u")ws.exports=oi();else if(typeof define=="function"&&define.amd)define([],oi);else{var si;typeof window<"u"?si=window:typeof global<"u"?si=global:typeof self<"u"?si=self:si=this,si.memoizerific=oi()}})(function(){return s$1(function oi(si,ii,ai){function li(di,hi){if(!ii[di]){if(!si[di]){var pi=typeof Ee=="function"&&Ee;if(!hi&&pi)return pi(di,!0);if(ci)return ci(di,!0);var ha=new Error("Cannot find module '"+di+"'");throw ha.code="MODULE_NOT_FOUND",ha}var ga=ii[di]={exports:{}};si[di][0].call(ga.exports,function(va){var ba=si[di][1][va];return li(ba||va)},ga,ga.exports,oi,si,ii,ai)}return ii[di].exports}s$1(li,"s");for(var ci=typeof Ee=="function"&&Ee,ui=0;ui<ai.length;ui++)li(ai[ui]);return li},"e")({1:[function(oi,si,ii){si.exports=function(ai){if(typeof Map!="function"||ai){var li=oi("./similar");return new li}else return new Map}},{"./similar":2}],2:[function(oi,si,ii){function ai(){return this.list=[],this.lastItem=void 0,this.size=0,this}s$1(ai,"Similar"),ai.prototype.get=function(li){var ci;if(this.lastItem&&this.isEqual(this.lastItem.key,li))return this.lastItem.val;if(ci=this.indexOf(li),ci>=0)return this.lastItem=this.list[ci],this.list[ci].val},ai.prototype.set=function(li,ci){var ui;return this.lastItem&&this.isEqual(this.lastItem.key,li)?(this.lastItem.val=ci,this):(ui=this.indexOf(li),ui>=0?(this.lastItem=this.list[ui],this.list[ui].val=ci,this):(this.lastItem={key:li,val:ci},this.list.push(this.lastItem),this.size++,this))},ai.prototype.delete=function(li){var ci;if(this.lastItem&&this.isEqual(this.lastItem.key,li)&&(this.lastItem=void 0),ci=this.indexOf(li),ci>=0)return this.size--,this.list.splice(ci,1)[0]},ai.prototype.has=function(li){var ci;return this.lastItem&&this.isEqual(this.lastItem.key,li)?!0:(ci=this.indexOf(li),ci>=0?(this.lastItem=this.list[ci],!0):!1)},ai.prototype.forEach=function(li,ci){var ui;for(ui=0;ui<this.size;ui++)li.call(ci||this,this.list[ui].val,this.list[ui].key,this)},ai.prototype.indexOf=function(li){var ci;for(ci=0;ci<this.size;ci++)if(this.isEqual(this.list[ci].key,li))return ci;return-1},ai.prototype.isEqual=function(li,ci){return li===ci||li!==li&&ci!==ci},si.exports=ai},{}],3:[function(oi,si,ii){var ai=oi("map-or-similar");si.exports=function(di){var hi=new ai(!1),pi=[];return function(ha){var ga=s$1(function(){var va=hi,ba,wa,xa=arguments.length-1,Ca=Array(xa+1),el=!0,ku;if((ga.numArgs||ga.numArgs===0)&&ga.numArgs!==xa+1)throw new Error("Memoizerific functions should always be called with the same number of arguments");for(ku=0;ku<xa;ku++){if(Ca[ku]={cacheItem:va,arg:arguments[ku]},va.has(arguments[ku])){va=va.get(arguments[ku]);continue}el=!1,ba=new ai(!1),va.set(arguments[ku],ba),va=ba}return el&&(va.has(arguments[xa])?wa=va.get(arguments[xa]):el=!1),el||(wa=ha.apply(null,arguments),va.set(arguments[xa],wa)),di>0&&(Ca[xa]={cacheItem:va,arg:arguments[xa]},el?li(pi,Ca):pi.push(Ca),pi.length>di&&ci(pi.shift())),ga.wasMemoized=el,ga.numArgs=xa+1,wa},"memoizerific");return ga.limit=di,ga.wasMemoized=!1,ga.cache=hi,ga.lru=pi,ga}};function li(di,hi){var pi=di.length,ha=hi.length,ga,va,ba;for(va=0;va<pi;va++){for(ga=!0,ba=0;ba<ha;ba++)if(!ui(di[va][ba].arg,hi[ba].arg)){ga=!1;break}if(ga)break}di.push(di.splice(va,1)[0])}s$1(li,"moveToMostRecentLru");function ci(di){var hi=di.length,pi=di[hi-1],ha,ga;for(pi.cacheItem.delete(pi.arg),ga=hi-2;ga>=0&&(pi=di[ga],ha=pi.cacheItem.get(pi.arg),!ha||!ha.size);ga--)pi.cacheItem.delete(pi.arg)}s$1(ci,"removeCachedResult");function ui(di,hi){return di===hi||di!==di&&hi!==hi}s$1(ui,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})}),tt=D(Ws=>{Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.encodeString=si;var ws=Array.from({length:256},(ii,ai)=>"%"+((ai<16?"0":"")+ai.toString(16)).toUpperCase()),oi=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function si(ii){let ai=ii.length;if(ai===0)return"";let li="",ci=0,ui=0;e:for(;ui<ai;ui++){let di=ii.charCodeAt(ui);for(;di<128;){if(oi[di]!==1&&(ci<ui&&(li+=ii.slice(ci,ui)),ci=ui+1,li+=ws[di]),++ui===ai)break e;di=ii.charCodeAt(ui)}if(ci<ui&&(li+=ii.slice(ci,ui)),di<2048){ci=ui+1,li+=ws[192|di>>6]+ws[128|di&63];continue}if(di<55296||di>=57344){ci=ui+1,li+=ws[224|di>>12]+ws[128|di>>6&63]+ws[128|di&63];continue}if(++ui,ui>=ai)throw new Error("URI malformed");let hi=ii.charCodeAt(ui)&1023;ci=ui+1,di=65536+((di&1023)<<10|hi),li+=ws[240|di>>18]+ws[128|di>>12&63]+ws[128|di>>6&63]+ws[128|di&63]}return ci===0?ii:ci<ai?li+ii.slice(ci):li}s$1(si,"encodeString")}),Ze=D(Ws=>{Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.defaultOptions=Ws.defaultShouldSerializeObject=Ws.defaultValueSerializer=void 0;var ws=tt(),oi=s$1(ai=>{switch(typeof ai){case"string":return(0,ws.encodeString)(ai);case"bigint":case"boolean":return""+ai;case"number":if(Number.isFinite(ai))return ai<1e21?""+ai:(0,ws.encodeString)(""+ai);break}return ai instanceof Date?(0,ws.encodeString)(ai.toISOString()):""},"defaultValueSerializer");Ws.defaultValueSerializer=oi;var si=s$1(ai=>ai instanceof Date,"defaultShouldSerializeObject");Ws.defaultShouldSerializeObject=si;var ii=s$1(ai=>ai,"identityFunc");Ws.defaultOptions={nesting:!0,nestingSyntax:"dot",arrayRepeat:!1,arrayRepeatSyntax:"repeat",delimiter:38,valueDeserializer:ii,valueSerializer:Ws.defaultValueSerializer,keyDeserializer:ii,shouldSerializeObject:Ws.defaultShouldSerializeObject}}),nt=D(Ws=>{Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.getDeepObject=ii,Ws.stringifyObject=hi;var ws=Ze(),oi=tt();function si(pi){return pi==="__proto__"||pi==="constructor"||pi==="prototype"}s$1(si,"isPrototypeKey");function ii(pi,ha,ga,va,ba){if(si(ha))return pi;let wa=pi[ha];return typeof wa=="object"&&wa!==null?wa:!va&&(ba||typeof ga=="number"||typeof ga=="string"&&ga*0===0&&ga.indexOf(".")===-1)?pi[ha]=[]:pi[ha]={}}s$1(ii,"getDeepObject");var ai=20,li="[]",ci="[",ui="]",di=".";function hi(pi,ha,ga=0,va,ba){let{nestingSyntax:wa=ws.defaultOptions.nestingSyntax,arrayRepeat:xa=ws.defaultOptions.arrayRepeat,arrayRepeatSyntax:Ca=ws.defaultOptions.arrayRepeatSyntax,nesting:el=ws.defaultOptions.nesting,delimiter:ku=ws.defaultOptions.delimiter,valueSerializer:gd=ws.defaultOptions.valueSerializer,shouldSerializeObject:Ed=ws.defaultOptions.shouldSerializeObject}=ha,Od=typeof ku=="number"?String.fromCharCode(ku):ku,Nd=ba===!0&&xa,Pd=wa==="dot"||wa==="js"&&!ba;if(ga>ai)return"";let Ld="",rf=!0,_d=!1;for(let Md in pi){let Td=pi[Md],wd;va?(wd=va,Nd?Ca==="bracket"&&(wd+=li):Pd?(wd+=di,wd+=Md):(wd+=ci,wd+=Md,wd+=ui)):wd=Md,rf||(Ld+=Od),typeof Td=="object"&&Td!==null&&!Ed(Td)?(_d=Td.pop!==void 0,(el||xa&&_d)&&(Ld+=hi(Td,ha,ga+1,wd,_d))):(Ld+=(0,oi.encodeString)(wd),Ld+="=",Ld+=gd(Td,Md)),rf&&(rf=!1)}return Ld}s$1(hi,"stringifyObject")}),No=D((Ws,ws)=>{var oi=12,si=0,ii=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function ai(ui){var di=ui.indexOf("%");if(di===-1)return ui;for(var hi=ui.length,pi="",ha=0,ga=0,va=di,ba=oi;di>-1&&di<hi;){var wa=ci(ui[di+1],4),xa=ci(ui[di+2],0),Ca=wa|xa,el=ii[Ca];if(ba=ii[256+ba+el],ga=ga<<6|Ca&ii[364+el],ba===oi)pi+=ui.slice(ha,va),pi+=ga<=65535?String.fromCharCode(ga):String.fromCharCode(55232+(ga>>10),56320+(ga&1023)),ga=0,ha=di+3,di=va=ui.indexOf("%",ha);else{if(ba===si)return null;if(di+=3,di<hi&&ui.charCodeAt(di)===37)continue;return null}}return pi+ui.slice(ha)}s$1(ai,"decodeURIComponent");var li={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function ci(ui,di){var hi=li[ui];return hi===void 0?255:hi<<di}s$1(ci,"hexCodeToInt"),ws.exports=ai}),Go=D(Ws=>{var ws=Ws&&Ws.__importDefault||function(pi){return pi&&pi.__esModule?pi:{default:pi}};Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.numberValueDeserializer=Ws.numberKeyDeserializer=void 0,Ws.parse=hi;var oi=nt(),si=Ze(),ii=ws(No()),ai=s$1(pi=>{let ha=Number(pi);return Number.isNaN(ha)?pi:ha},"numberKeyDeserializer");Ws.numberKeyDeserializer=ai;var li=s$1(pi=>{let ha=Number(pi);return Number.isNaN(ha)?pi:ha},"numberValueDeserializer");Ws.numberValueDeserializer=li;var ci=/\+/g,ui=s$1(function(){},"Empty");ui.prototype=Object.create(null);function di(pi,ha,ga,va,ba){let wa=pi.substring(ha,ga);return va&&(wa=wa.replace(ci," ")),ba&&(wa=(0,ii.default)(wa)||wa),wa}s$1(di,"computeKeySlice");function hi(pi,ha){let{valueDeserializer:ga=si.defaultOptions.valueDeserializer,keyDeserializer:va=si.defaultOptions.keyDeserializer,arrayRepeatSyntax:ba=si.defaultOptions.arrayRepeatSyntax,nesting:wa=si.defaultOptions.nesting,arrayRepeat:xa=si.defaultOptions.arrayRepeat,nestingSyntax:Ca=si.defaultOptions.nestingSyntax,delimiter:el=si.defaultOptions.delimiter}=ha??{},ku=typeof el=="string"?el.charCodeAt(0):el,gd=Ca==="js",Ed=new ui;if(typeof pi!="string")return Ed;let Od=pi.length,Nd="",Pd=-1,Ld=-1,rf=-1,_d=Ed,Md,Td="",wd="",Cd=!1,sf=!1,of=!1,Wd=!1,df=!1,hf=!1,xd=!1,Fd=0,Vd=-1,af=-1,ff=-1;for(let uf=0;uf<Od+1;uf++){if(Fd=uf!==Od?pi.charCodeAt(uf):ku,Fd===ku){if(xd=Ld>Pd,xd||(Ld=uf),rf!==Ld-1&&(wd=di(pi,rf+1,Vd>-1?Vd:Ld,of,Cd),Td=va(wd),Md!==void 0&&(_d=(0,oi.getDeepObject)(_d,Md,Td,gd&&df,gd&&hf))),xd||Td!==""){xd&&(Nd=pi.slice(Ld+1,uf),Wd&&(Nd=Nd.replace(ci," ")),sf&&(Nd=(0,ii.default)(Nd)||Nd));let mf=ga(Nd,Td);if(xa){let yf=_d[Td];yf===void 0?Vd>-1?_d[Td]=[mf]:_d[Td]=mf:yf.pop?yf.push(mf):_d[Td]=[yf,mf]}else _d[Td]=mf}Nd="",Pd=uf,Ld=uf,Cd=!1,sf=!1,of=!1,Wd=!1,df=!1,hf=!1,Vd=-1,rf=uf,_d=Ed,Md=void 0,Td=""}else Fd===93?(xa&&ba==="bracket"&&ff===91&&(Vd=af),wa&&(Ca==="index"||gd)&&Ld<=Pd&&(rf!==af&&(wd=di(pi,rf+1,uf,of,Cd),Td=va(wd),Md!==void 0&&(_d=(0,oi.getDeepObject)(_d,Md,Td,void 0,gd)),Md=Td,of=!1,Cd=!1),rf=uf,hf=!0,df=!1)):Fd===46?wa&&(Ca==="dot"||gd)&&Ld<=Pd&&(rf!==af&&(wd=di(pi,rf+1,uf,of,Cd),Td=va(wd),Md!==void 0&&(_d=(0,oi.getDeepObject)(_d,Md,Td,gd)),Md=Td,of=!1,Cd=!1),df=!0,hf=!1,rf=uf):Fd===91?wa&&(Ca==="index"||gd)&&Ld<=Pd&&(rf!==af&&(wd=di(pi,rf+1,uf,of,Cd),Td=va(wd),gd&&Md!==void 0&&(_d=(0,oi.getDeepObject)(_d,Md,Td,gd)),Md=Td,of=!1,Cd=!1,df=!1,hf=!0),rf=uf):Fd===61?Ld<=Pd?Ld=uf:sf=!0:Fd===43?Ld>Pd?Wd=!0:of=!0:Fd===37&&(Ld>Pd?sf=!0:Cd=!0);af=uf,ff=Fd}return Ed}s$1(hi,"parse")}),Vo=D(Ws=>{Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.stringify=oi;var ws=nt();function oi(si,ii){if(si===null||typeof si!="object")return"";let ai=ii??{};return(0,ws.stringifyObject)(si,ai)}s$1(oi,"stringify")}),or=D(Ws=>{var ws=Ws&&Ws.__createBinding||(Object.create?function(ai,li,ci,ui){ui===void 0&&(ui=ci);var di=Object.getOwnPropertyDescriptor(li,ci);(!di||("get"in di?!li.__esModule:di.writable||di.configurable))&&(di={enumerable:!0,get:s$1(function(){return li[ci]},"get")}),Object.defineProperty(ai,ui,di)}:function(ai,li,ci,ui){ui===void 0&&(ui=ci),ai[ui]=li[ci]}),oi=Ws&&Ws.__exportStar||function(ai,li){for(var ci in ai)ci!=="default"&&!Object.prototype.hasOwnProperty.call(li,ci)&&ws(li,ai,ci)};Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.stringify=Ws.parse=void 0;var si=Go();Object.defineProperty(Ws,"parse",{enumerable:!0,get:s$1(function(){return si.parse},"get")});var ii=Vo();Object.defineProperty(Ws,"stringify",{enumerable:!0,get:s$1(function(){return ii.stringify},"get")}),oi(Ze(),Ws)}),dt=D((Ws,ws)=>{ws.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
179
|
+
`}),this.data=Ws}};t$3(O$1,"UnsupportedViewportDimensionError");var C$2=Object.create,u=Object.defineProperty,B=Object.getOwnPropertyDescriptor,F$1=Object.getOwnPropertyNames,h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,E=(Ws,ws)=>()=>(ws||Ws((ws={exports:{}}).exports,ws),ws.exports),v=(Ws,ws,oi,si)=>{if(ws&&typeof ws=="object"||typeof ws=="function")for(let ii of F$1(ws))!w.call(Ws,ii)&&ii!==oi&&u(Ws,ii,{get:()=>ws[ii],enumerable:!(si=B(ws,ii))||si.enumerable});return Ws},I=(Ws,ws,oi)=>(oi=Ws!=null?C$2(h(Ws)):{},v(!Ws||!Ws.__esModule?u(oi,"default",{value:Ws,enumerable:!0}):oi,Ws)),x=E(Ws=>{Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.isEqual=function(){var ws=Object.prototype.toString,oi=Object.getPrototypeOf,si=Object.getOwnPropertySymbols?function(ii){return Object.keys(ii).concat(Object.getOwnPropertySymbols(ii))}:Object.keys;return function(ii,ai){return function li(ci,ui,di){var hi,pi,ha,ga=ws.call(ci),va=ws.call(ui);if(ci===ui)return!0;if(ci==null||ui==null)return!1;if(di.indexOf(ci)>-1&&di.indexOf(ui)>-1)return!0;if(di.push(ci,ui),ga!=va||(hi=si(ci),pi=si(ui),hi.length!=pi.length||hi.some(function(ba){return!li(ci[ba],ui[ba],di)})))return!1;switch(ga.slice(8,-1)){case"Symbol":return ci.valueOf()==ui.valueOf();case"Date":case"Number":return+ci==+ui||+ci!=+ci&&+ui!=+ui;case"RegExp":case"Function":case"String":case"Boolean":return""+ci==""+ui;case"Set":case"Map":hi=ci.entries(),pi=ui.entries();do if(!li((ha=hi.next()).value,pi.next().value,di))return!1;while(!ha.done);return!0;case"ArrayBuffer":ci=new Uint8Array(ci),ui=new Uint8Array(ui);case"DataView":ci=new Uint8Array(ci.buffer),ui=new Uint8Array(ui.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(ci.length!=ui.length)return!1;for(ha=0;ha<ci.length;ha++)if((ha in ci||ha in ui)&&(ha in ci!=ha in ui||!li(ci[ha],ui[ha],di)))return!1;return!0;case"Object":return li(oi(ci),oi(ui),di);default:return!1}}(ii,ai,[])}}()});function R(Ws){return Ws.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(ws,oi,si,ii)=>`${oi} ${si}${ii}`).replace(/([a-z])([A-Z])/g,(ws,oi,si)=>`${oi} ${si}`).replace(/([a-z])([0-9])/gi,(ws,oi,si)=>`${oi} ${si}`).replace(/([0-9])([a-z])/gi,(ws,oi,si)=>`${oi} ${si}`).replace(/(\s|^)(\w)/g,(ws,oi,si)=>`${oi}${si.toUpperCase()}`).replace(/ +/g," ").trim()}var l=I(x()),S=Ws=>Ws.map(ws=>typeof ws<"u").filter(Boolean).length,k$1=(Ws,ws)=>{let{exists:oi,eq:si,neq:ii,truthy:ai}=Ws;if(S([oi,si,ii,ai])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:oi,eq:si,neq:ii})}`);if(typeof si<"u")return(0,l.isEqual)(ws,si);if(typeof ii<"u")return!(0,l.isEqual)(ws,ii);if(typeof oi<"u"){let li=typeof ws<"u";return oi?li:!li}return typeof ai>"u"||ai?!!ws:!ws},P$1=(Ws,ws,oi)=>{if(!Ws.if)return!0;let{arg:si,global:ii}=Ws.if;if(S([si,ii])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:si,global:ii})}`);let ai=si?ws[si]:oi[ii];return k$1(Ws.if,ai)},O=Ws=>Ws.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),f=(Ws,ws)=>{let oi=O(Ws);if(oi==="")throw new Error(`Invalid ${ws} '${Ws}', must include alphanumeric characters`);return oi},G$1=(Ws,ws)=>`${f(Ws,"kind")}${ws?`--${f(ws,"name")}`:""}`,N=Ws=>R(Ws);function m(Ws,ws){return Array.isArray(ws)?ws.includes(Ws):Ws.match(ws)}function M(Ws,{includeStories:ws,excludeStories:oi}){return Ws!=="__esModule"&&(!ws||m(Ws,ws))&&(!oi||!m(Ws,oi))}var z=(...Ws)=>{let ws=Ws.reduce((oi,si)=>(si.startsWith("!")?oi.delete(si.slice(1)):oi.add(si),oi),new Set);return Array.from(ws)},jn=Object.create,fr=Object.defineProperty,Mn=Object.getOwnPropertyDescriptor,_n=Object.getOwnPropertyNames,Ln=Object.getPrototypeOf,Nn=Object.prototype.hasOwnProperty,s$1=(Ws,ws)=>fr(Ws,"name",{value:ws,configurable:!0}),Ee=(Ws=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(Ws,{get:(ws,oi)=>(typeof require<"u"?require:ws)[oi]}):Ws)(function(Ws){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+Ws+'" is not supported')}),D=(Ws,ws)=>()=>(ws||Ws((ws={exports:{}}).exports,ws),ws.exports),qn=(Ws,ws,oi,si)=>{if(ws&&typeof ws=="object"||typeof ws=="function")for(let ii of _n(ws))!Nn.call(Ws,ii)&&ii!==oi&&fr(Ws,ii,{get:()=>ws[ii],enumerable:!(si=Mn(ws,ii))||si.enumerable});return Ws},ue=(Ws,ws,oi)=>(oi=Ws!=null?jn(Ln(Ws)):{},qn(fr(oi,"default",{value:Ws,enumerable:!0}),Ws)),Or=D((Ws,ws)=>{(function(oi){if(typeof Ws=="object"&&typeof ws<"u")ws.exports=oi();else if(typeof define=="function"&&define.amd)define([],oi);else{var si;typeof window<"u"?si=window:typeof global<"u"?si=global:typeof self<"u"?si=self:si=this,si.memoizerific=oi()}})(function(){return s$1(function oi(si,ii,ai){function li(di,hi){if(!ii[di]){if(!si[di]){var pi=typeof Ee=="function"&&Ee;if(!hi&&pi)return pi(di,!0);if(ci)return ci(di,!0);var ha=new Error("Cannot find module '"+di+"'");throw ha.code="MODULE_NOT_FOUND",ha}var ga=ii[di]={exports:{}};si[di][0].call(ga.exports,function(va){var ba=si[di][1][va];return li(ba||va)},ga,ga.exports,oi,si,ii,ai)}return ii[di].exports}s$1(li,"s");for(var ci=typeof Ee=="function"&&Ee,ui=0;ui<ai.length;ui++)li(ai[ui]);return li},"e")({1:[function(oi,si,ii){si.exports=function(ai){if(typeof Map!="function"||ai){var li=oi("./similar");return new li}else return new Map}},{"./similar":2}],2:[function(oi,si,ii){function ai(){return this.list=[],this.lastItem=void 0,this.size=0,this}s$1(ai,"Similar"),ai.prototype.get=function(li){var ci;if(this.lastItem&&this.isEqual(this.lastItem.key,li))return this.lastItem.val;if(ci=this.indexOf(li),ci>=0)return this.lastItem=this.list[ci],this.list[ci].val},ai.prototype.set=function(li,ci){var ui;return this.lastItem&&this.isEqual(this.lastItem.key,li)?(this.lastItem.val=ci,this):(ui=this.indexOf(li),ui>=0?(this.lastItem=this.list[ui],this.list[ui].val=ci,this):(this.lastItem={key:li,val:ci},this.list.push(this.lastItem),this.size++,this))},ai.prototype.delete=function(li){var ci;if(this.lastItem&&this.isEqual(this.lastItem.key,li)&&(this.lastItem=void 0),ci=this.indexOf(li),ci>=0)return this.size--,this.list.splice(ci,1)[0]},ai.prototype.has=function(li){var ci;return this.lastItem&&this.isEqual(this.lastItem.key,li)?!0:(ci=this.indexOf(li),ci>=0?(this.lastItem=this.list[ci],!0):!1)},ai.prototype.forEach=function(li,ci){var ui;for(ui=0;ui<this.size;ui++)li.call(ci||this,this.list[ui].val,this.list[ui].key,this)},ai.prototype.indexOf=function(li){var ci;for(ci=0;ci<this.size;ci++)if(this.isEqual(this.list[ci].key,li))return ci;return-1},ai.prototype.isEqual=function(li,ci){return li===ci||li!==li&&ci!==ci},si.exports=ai},{}],3:[function(oi,si,ii){var ai=oi("map-or-similar");si.exports=function(di){var hi=new ai(!1),pi=[];return function(ha){var ga=s$1(function(){var va=hi,ba,wa,xa=arguments.length-1,Ca=Array(xa+1),el=!0,ku;if((ga.numArgs||ga.numArgs===0)&&ga.numArgs!==xa+1)throw new Error("Memoizerific functions should always be called with the same number of arguments");for(ku=0;ku<xa;ku++){if(Ca[ku]={cacheItem:va,arg:arguments[ku]},va.has(arguments[ku])){va=va.get(arguments[ku]);continue}el=!1,ba=new ai(!1),va.set(arguments[ku],ba),va=ba}return el&&(va.has(arguments[xa])?wa=va.get(arguments[xa]):el=!1),el||(wa=ha.apply(null,arguments),va.set(arguments[xa],wa)),di>0&&(Ca[xa]={cacheItem:va,arg:arguments[xa]},el?li(pi,Ca):pi.push(Ca),pi.length>di&&ci(pi.shift())),ga.wasMemoized=el,ga.numArgs=xa+1,wa},"memoizerific");return ga.limit=di,ga.wasMemoized=!1,ga.cache=hi,ga.lru=pi,ga}};function li(di,hi){var pi=di.length,ha=hi.length,ga,va,ba;for(va=0;va<pi;va++){for(ga=!0,ba=0;ba<ha;ba++)if(!ui(di[va][ba].arg,hi[ba].arg)){ga=!1;break}if(ga)break}di.push(di.splice(va,1)[0])}s$1(li,"moveToMostRecentLru");function ci(di){var hi=di.length,pi=di[hi-1],ha,ga;for(pi.cacheItem.delete(pi.arg),ga=hi-2;ga>=0&&(pi=di[ga],ha=pi.cacheItem.get(pi.arg),!ha||!ha.size);ga--)pi.cacheItem.delete(pi.arg)}s$1(ci,"removeCachedResult");function ui(di,hi){return di===hi||di!==di&&hi!==hi}s$1(ui,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})}),tt=D(Ws=>{Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.encodeString=si;var ws=Array.from({length:256},(ii,ai)=>"%"+((ai<16?"0":"")+ai.toString(16)).toUpperCase()),oi=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function si(ii){let ai=ii.length;if(ai===0)return"";let li="",ci=0,ui=0;e:for(;ui<ai;ui++){let di=ii.charCodeAt(ui);for(;di<128;){if(oi[di]!==1&&(ci<ui&&(li+=ii.slice(ci,ui)),ci=ui+1,li+=ws[di]),++ui===ai)break e;di=ii.charCodeAt(ui)}if(ci<ui&&(li+=ii.slice(ci,ui)),di<2048){ci=ui+1,li+=ws[192|di>>6]+ws[128|di&63];continue}if(di<55296||di>=57344){ci=ui+1,li+=ws[224|di>>12]+ws[128|di>>6&63]+ws[128|di&63];continue}if(++ui,ui>=ai)throw new Error("URI malformed");let hi=ii.charCodeAt(ui)&1023;ci=ui+1,di=65536+((di&1023)<<10|hi),li+=ws[240|di>>18]+ws[128|di>>12&63]+ws[128|di>>6&63]+ws[128|di&63]}return ci===0?ii:ci<ai?li+ii.slice(ci):li}s$1(si,"encodeString")}),Ze=D(Ws=>{Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.defaultOptions=Ws.defaultShouldSerializeObject=Ws.defaultValueSerializer=void 0;var ws=tt(),oi=s$1(ai=>{switch(typeof ai){case"string":return(0,ws.encodeString)(ai);case"bigint":case"boolean":return""+ai;case"number":if(Number.isFinite(ai))return ai<1e21?""+ai:(0,ws.encodeString)(""+ai);break}return ai instanceof Date?(0,ws.encodeString)(ai.toISOString()):""},"defaultValueSerializer");Ws.defaultValueSerializer=oi;var si=s$1(ai=>ai instanceof Date,"defaultShouldSerializeObject");Ws.defaultShouldSerializeObject=si;var ii=s$1(ai=>ai,"identityFunc");Ws.defaultOptions={nesting:!0,nestingSyntax:"dot",arrayRepeat:!1,arrayRepeatSyntax:"repeat",delimiter:38,valueDeserializer:ii,valueSerializer:Ws.defaultValueSerializer,keyDeserializer:ii,shouldSerializeObject:Ws.defaultShouldSerializeObject}}),nt=D(Ws=>{Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.getDeepObject=ii,Ws.stringifyObject=hi;var ws=Ze(),oi=tt();function si(pi){return pi==="__proto__"||pi==="constructor"||pi==="prototype"}s$1(si,"isPrototypeKey");function ii(pi,ha,ga,va,ba){if(si(ha))return pi;let wa=pi[ha];return typeof wa=="object"&&wa!==null?wa:!va&&(ba||typeof ga=="number"||typeof ga=="string"&&ga*0===0&&ga.indexOf(".")===-1)?pi[ha]=[]:pi[ha]={}}s$1(ii,"getDeepObject");var ai=20,li="[]",ci="[",ui="]",di=".";function hi(pi,ha,ga=0,va,ba){let{nestingSyntax:wa=ws.defaultOptions.nestingSyntax,arrayRepeat:xa=ws.defaultOptions.arrayRepeat,arrayRepeatSyntax:Ca=ws.defaultOptions.arrayRepeatSyntax,nesting:el=ws.defaultOptions.nesting,delimiter:ku=ws.defaultOptions.delimiter,valueSerializer:gd=ws.defaultOptions.valueSerializer,shouldSerializeObject:Ed=ws.defaultOptions.shouldSerializeObject}=ha,Od=typeof ku=="number"?String.fromCharCode(ku):ku,Nd=ba===!0&&xa,Pd=wa==="dot"||wa==="js"&&!ba;if(ga>ai)return"";let Ld="",rf=!0,kd=!1;for(let Md in pi){let Td=pi[Md],wd;va?(wd=va,Nd?Ca==="bracket"&&(wd+=li):Pd?(wd+=di,wd+=Md):(wd+=ci,wd+=Md,wd+=ui)):wd=Md,rf||(Ld+=Od),typeof Td=="object"&&Td!==null&&!Ed(Td)?(kd=Td.pop!==void 0,(el||xa&&kd)&&(Ld+=hi(Td,ha,ga+1,wd,kd))):(Ld+=(0,oi.encodeString)(wd),Ld+="=",Ld+=gd(Td,Md)),rf&&(rf=!1)}return Ld}s$1(hi,"stringifyObject")}),No=D((Ws,ws)=>{var oi=12,si=0,ii=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function ai(ui){var di=ui.indexOf("%");if(di===-1)return ui;for(var hi=ui.length,pi="",ha=0,ga=0,va=di,ba=oi;di>-1&&di<hi;){var wa=ci(ui[di+1],4),xa=ci(ui[di+2],0),Ca=wa|xa,el=ii[Ca];if(ba=ii[256+ba+el],ga=ga<<6|Ca&ii[364+el],ba===oi)pi+=ui.slice(ha,va),pi+=ga<=65535?String.fromCharCode(ga):String.fromCharCode(55232+(ga>>10),56320+(ga&1023)),ga=0,ha=di+3,di=va=ui.indexOf("%",ha);else{if(ba===si)return null;if(di+=3,di<hi&&ui.charCodeAt(di)===37)continue;return null}}return pi+ui.slice(ha)}s$1(ai,"decodeURIComponent");var li={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function ci(ui,di){var hi=li[ui];return hi===void 0?255:hi<<di}s$1(ci,"hexCodeToInt"),ws.exports=ai}),Go=D(Ws=>{var ws=Ws&&Ws.__importDefault||function(pi){return pi&&pi.__esModule?pi:{default:pi}};Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.numberValueDeserializer=Ws.numberKeyDeserializer=void 0,Ws.parse=hi;var oi=nt(),si=Ze(),ii=ws(No()),ai=s$1(pi=>{let ha=Number(pi);return Number.isNaN(ha)?pi:ha},"numberKeyDeserializer");Ws.numberKeyDeserializer=ai;var li=s$1(pi=>{let ha=Number(pi);return Number.isNaN(ha)?pi:ha},"numberValueDeserializer");Ws.numberValueDeserializer=li;var ci=/\+/g,ui=s$1(function(){},"Empty");ui.prototype=Object.create(null);function di(pi,ha,ga,va,ba){let wa=pi.substring(ha,ga);return va&&(wa=wa.replace(ci," ")),ba&&(wa=(0,ii.default)(wa)||wa),wa}s$1(di,"computeKeySlice");function hi(pi,ha){let{valueDeserializer:ga=si.defaultOptions.valueDeserializer,keyDeserializer:va=si.defaultOptions.keyDeserializer,arrayRepeatSyntax:ba=si.defaultOptions.arrayRepeatSyntax,nesting:wa=si.defaultOptions.nesting,arrayRepeat:xa=si.defaultOptions.arrayRepeat,nestingSyntax:Ca=si.defaultOptions.nestingSyntax,delimiter:el=si.defaultOptions.delimiter}=ha??{},ku=typeof el=="string"?el.charCodeAt(0):el,gd=Ca==="js",Ed=new ui;if(typeof pi!="string")return Ed;let Od=pi.length,Nd="",Pd=-1,Ld=-1,rf=-1,kd=Ed,Md,Td="",wd="",Cd=!1,sf=!1,of=!1,Wd=!1,df=!1,hf=!1,xd=!1,Fd=0,Vd=-1,af=-1,ff=-1;for(let uf=0;uf<Od+1;uf++){if(Fd=uf!==Od?pi.charCodeAt(uf):ku,Fd===ku){if(xd=Ld>Pd,xd||(Ld=uf),rf!==Ld-1&&(wd=di(pi,rf+1,Vd>-1?Vd:Ld,of,Cd),Td=va(wd),Md!==void 0&&(kd=(0,oi.getDeepObject)(kd,Md,Td,gd&&df,gd&&hf))),xd||Td!==""){xd&&(Nd=pi.slice(Ld+1,uf),Wd&&(Nd=Nd.replace(ci," ")),sf&&(Nd=(0,ii.default)(Nd)||Nd));let mf=ga(Nd,Td);if(xa){let yf=kd[Td];yf===void 0?Vd>-1?kd[Td]=[mf]:kd[Td]=mf:yf.pop?yf.push(mf):kd[Td]=[yf,mf]}else kd[Td]=mf}Nd="",Pd=uf,Ld=uf,Cd=!1,sf=!1,of=!1,Wd=!1,df=!1,hf=!1,Vd=-1,rf=uf,kd=Ed,Md=void 0,Td=""}else Fd===93?(xa&&ba==="bracket"&&ff===91&&(Vd=af),wa&&(Ca==="index"||gd)&&Ld<=Pd&&(rf!==af&&(wd=di(pi,rf+1,uf,of,Cd),Td=va(wd),Md!==void 0&&(kd=(0,oi.getDeepObject)(kd,Md,Td,void 0,gd)),Md=Td,of=!1,Cd=!1),rf=uf,hf=!0,df=!1)):Fd===46?wa&&(Ca==="dot"||gd)&&Ld<=Pd&&(rf!==af&&(wd=di(pi,rf+1,uf,of,Cd),Td=va(wd),Md!==void 0&&(kd=(0,oi.getDeepObject)(kd,Md,Td,gd)),Md=Td,of=!1,Cd=!1),df=!0,hf=!1,rf=uf):Fd===91?wa&&(Ca==="index"||gd)&&Ld<=Pd&&(rf!==af&&(wd=di(pi,rf+1,uf,of,Cd),Td=va(wd),gd&&Md!==void 0&&(kd=(0,oi.getDeepObject)(kd,Md,Td,gd)),Md=Td,of=!1,Cd=!1,df=!1,hf=!0),rf=uf):Fd===61?Ld<=Pd?Ld=uf:sf=!0:Fd===43?Ld>Pd?Wd=!0:of=!0:Fd===37&&(Ld>Pd?sf=!0:Cd=!0);af=uf,ff=Fd}return Ed}s$1(hi,"parse")}),Vo=D(Ws=>{Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.stringify=oi;var ws=nt();function oi(si,ii){if(si===null||typeof si!="object")return"";let ai=ii??{};return(0,ws.stringifyObject)(si,ai)}s$1(oi,"stringify")}),or=D(Ws=>{var ws=Ws&&Ws.__createBinding||(Object.create?function(ai,li,ci,ui){ui===void 0&&(ui=ci);var di=Object.getOwnPropertyDescriptor(li,ci);(!di||("get"in di?!li.__esModule:di.writable||di.configurable))&&(di={enumerable:!0,get:s$1(function(){return li[ci]},"get")}),Object.defineProperty(ai,ui,di)}:function(ai,li,ci,ui){ui===void 0&&(ui=ci),ai[ui]=li[ci]}),oi=Ws&&Ws.__exportStar||function(ai,li){for(var ci in ai)ci!=="default"&&!Object.prototype.hasOwnProperty.call(li,ci)&&ws(li,ai,ci)};Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.stringify=Ws.parse=void 0;var si=Go();Object.defineProperty(Ws,"parse",{enumerable:!0,get:s$1(function(){return si.parse},"get")});var ii=Vo();Object.defineProperty(Ws,"stringify",{enumerable:!0,get:s$1(function(){return ii.stringify},"get")}),oi(Ze(),Ws)}),dt=D((Ws,ws)=>{ws.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
180
180
|
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}}),Xo=D((Ws,ws)=>{ws.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}}),pt=D((Ws,ws)=>{ws.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}}),Jo=D((Ws,ws)=>{ws.exports={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}}),Zo=D(Ws=>{var ws=Ws&&Ws.__importDefault||function(ai){return ai&&ai.__esModule?ai:{default:ai}};Object.defineProperty(Ws,"__esModule",{value:!0});var oi=ws(Jo()),si=String.fromCodePoint||function(ai){var li="";return ai>65535&&(ai-=65536,li+=String.fromCharCode(ai>>>10&1023|55296),ai=56320|ai&1023),li+=String.fromCharCode(ai),li};function ii(ai){return ai>=55296&&ai<=57343||ai>1114111?"�":(ai in oi.default&&(ai=oi.default[ai]),si(ai))}s$1(ii,"decodeCodePoint"),Ws.default=ii}),ft=D(Ws=>{var ws=Ws&&Ws.__importDefault||function(hi){return hi&&hi.__esModule?hi:{default:hi}};Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.decodeHTML=Ws.decodeHTMLStrict=Ws.decodeXML=void 0;var oi=ws(dt()),si=ws(Xo()),ii=ws(pt()),ai=ws(Zo()),li=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;Ws.decodeXML=ci(ii.default),Ws.decodeHTMLStrict=ci(oi.default);function ci(hi){var pi=di(hi);return function(ha){return String(ha).replace(li,pi)}}s$1(ci,"getStrictDecoder");var ui=s$1(function(hi,pi){return hi<pi?1:-1},"sorter");Ws.decodeHTML=function(){for(var hi=Object.keys(si.default).sort(ui),pi=Object.keys(oi.default).sort(ui),ha=0,ga=0;ha<pi.length;ha++)hi[ga]===pi[ha]?(pi[ha]+=";?",ga++):pi[ha]+=";";var va=new RegExp("&(?:"+pi.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),ba=di(oi.default);function wa(xa){return xa.substr(-1)!==";"&&(xa+=";"),ba(xa)}return s$1(wa,"replacer"),function(xa){return String(xa).replace(va,wa)}}();function di(hi){return s$1(function(pi){if(pi.charAt(1)==="#"){var ha=pi.charAt(2);return ha==="X"||ha==="x"?ai.default(parseInt(pi.substr(3),16)):ai.default(parseInt(pi.substr(2),10))}return hi[pi.slice(1,-1)]||pi},"replace")}s$1(di,"getReplacer")}),mt=D(Ws=>{var ws=Ws&&Ws.__importDefault||function(Ca){return Ca&&Ca.__esModule?Ca:{default:Ca}};Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.escapeUTF8=Ws.escape=Ws.encodeNonAsciiHTML=Ws.encodeHTML=Ws.encodeXML=void 0;var oi=ws(pt()),si=ui(oi.default),ii=di(si);Ws.encodeXML=xa(si);var ai=ws(dt()),li=ui(ai.default),ci=di(li);Ws.encodeHTML=ga(li,ci),Ws.encodeNonAsciiHTML=xa(li);function ui(Ca){return Object.keys(Ca).sort().reduce(function(el,ku){return el[Ca[ku]]="&"+ku+";",el},{})}s$1(ui,"getInverseObj");function di(Ca){for(var el=[],ku=[],gd=0,Ed=Object.keys(Ca);gd<Ed.length;gd++){var Od=Ed[gd];Od.length===1?el.push("\\"+Od):ku.push(Od)}el.sort();for(var Nd=0;Nd<el.length-1;Nd++){for(var Pd=Nd;Pd<el.length-1&&el[Pd].charCodeAt(1)+1===el[Pd+1].charCodeAt(1);)Pd+=1;var Ld=1+Pd-Nd;Ld<3||el.splice(Nd,Ld,el[Nd]+"-"+el[Pd])}return ku.unshift("["+el.join("")+"]"),new RegExp(ku.join("|"),"g")}s$1(di,"getInverseReplacer");var hi=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,pi=String.prototype.codePointAt!=null?function(Ca){return Ca.codePointAt(0)}:function(Ca){return(Ca.charCodeAt(0)-55296)*1024+Ca.charCodeAt(1)-56320+65536};function ha(Ca){return"&#x"+(Ca.length>1?pi(Ca):Ca.charCodeAt(0)).toString(16).toUpperCase()+";"}s$1(ha,"singleCharReplacer");function ga(Ca,el){return function(ku){return ku.replace(el,function(gd){return Ca[gd]}).replace(hi,ha)}}s$1(ga,"getInverse");var va=new RegExp(ii.source+"|"+hi.source,"g");function ba(Ca){return Ca.replace(va,ha)}s$1(ba,"escape"),Ws.escape=ba;function wa(Ca){return Ca.replace(ii,ha)}s$1(wa,"escapeUTF8"),Ws.escapeUTF8=wa;function xa(Ca){return function(el){return el.replace(va,function(ku){return Ca[ku]||ha(ku)})}}s$1(xa,"getASCIIEncoder")}),yn=D(Ws=>{Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.decodeXMLStrict=Ws.decodeHTML5Strict=Ws.decodeHTML4Strict=Ws.decodeHTML5=Ws.decodeHTML4=Ws.decodeHTMLStrict=Ws.decodeHTML=Ws.decodeXML=Ws.encodeHTML5=Ws.encodeHTML4=Ws.escapeUTF8=Ws.escape=Ws.encodeNonAsciiHTML=Ws.encodeHTML=Ws.encodeXML=Ws.encode=Ws.decodeStrict=Ws.decode=void 0;var ws=ft(),oi=mt();function si(ui,di){return(!di||di<=0?ws.decodeXML:ws.decodeHTML)(ui)}s$1(si,"decode"),Ws.decode=si;function ii(ui,di){return(!di||di<=0?ws.decodeXML:ws.decodeHTMLStrict)(ui)}s$1(ii,"decodeStrict"),Ws.decodeStrict=ii;function ai(ui,di){return(!di||di<=0?oi.encodeXML:oi.encodeHTML)(ui)}s$1(ai,"encode"),Ws.encode=ai;var li=mt();Object.defineProperty(Ws,"encodeXML",{enumerable:!0,get:s$1(function(){return li.encodeXML},"get")}),Object.defineProperty(Ws,"encodeHTML",{enumerable:!0,get:s$1(function(){return li.encodeHTML},"get")}),Object.defineProperty(Ws,"encodeNonAsciiHTML",{enumerable:!0,get:s$1(function(){return li.encodeNonAsciiHTML},"get")}),Object.defineProperty(Ws,"escape",{enumerable:!0,get:s$1(function(){return li.escape},"get")}),Object.defineProperty(Ws,"escapeUTF8",{enumerable:!0,get:s$1(function(){return li.escapeUTF8},"get")}),Object.defineProperty(Ws,"encodeHTML4",{enumerable:!0,get:s$1(function(){return li.encodeHTML},"get")}),Object.defineProperty(Ws,"encodeHTML5",{enumerable:!0,get:s$1(function(){return li.encodeHTML},"get")});var ci=ft();Object.defineProperty(Ws,"decodeXML",{enumerable:!0,get:s$1(function(){return ci.decodeXML},"get")}),Object.defineProperty(Ws,"decodeHTML",{enumerable:!0,get:s$1(function(){return ci.decodeHTML},"get")}),Object.defineProperty(Ws,"decodeHTMLStrict",{enumerable:!0,get:s$1(function(){return ci.decodeHTMLStrict},"get")}),Object.defineProperty(Ws,"decodeHTML4",{enumerable:!0,get:s$1(function(){return ci.decodeHTML},"get")}),Object.defineProperty(Ws,"decodeHTML5",{enumerable:!0,get:s$1(function(){return ci.decodeHTML},"get")}),Object.defineProperty(Ws,"decodeHTML4Strict",{enumerable:!0,get:s$1(function(){return ci.decodeHTMLStrict},"get")}),Object.defineProperty(Ws,"decodeHTML5Strict",{enumerable:!0,get:s$1(function(){return ci.decodeHTMLStrict},"get")}),Object.defineProperty(Ws,"decodeXMLStrict",{enumerable:!0,get:s$1(function(){return ci.decodeXML},"get")})}),An=D((Ws,ws)=>{function oi(Td,wd){if(!(Td instanceof wd))throw new TypeError("Cannot call a class as a function")}s$1(oi,"_classCallCheck");function si(Td,wd){for(var Cd=0;Cd<wd.length;Cd++){var sf=wd[Cd];sf.enumerable=sf.enumerable||!1,sf.configurable=!0,"value"in sf&&(sf.writable=!0),Object.defineProperty(Td,sf.key,sf)}}s$1(si,"_defineProperties");function ii(Td,wd,Cd){return wd&&si(Td.prototype,wd),Cd&&si(Td,Cd),Td}s$1(ii,"_createClass");function ai(Td,wd){var Cd=typeof Symbol<"u"&&Td[Symbol.iterator]||Td["@@iterator"];if(!Cd){if(Array.isArray(Td)||(Cd=li(Td))||wd&&Td&&typeof Td.length=="number"){Cd&&(Td=Cd);var sf=0,of=s$1(function(){},"F");return{s:of,n:s$1(function(){return sf>=Td.length?{done:!0}:{done:!1,value:Td[sf++]}},"n"),e:s$1(function(xd){throw xd},"e"),f:of}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
181
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Wd=!0,df=!1,hf;return{s:s$1(function(){Cd=Cd.call(Td)},"s"),n:s$1(function(){var xd=Cd.next();return Wd=xd.done,xd},"n"),e:s$1(function(xd){df=!0,hf=xd},"e"),f:s$1(function(){try{!Wd&&Cd.return!=null&&Cd.return()}finally{if(df)throw hf}},"f")}}s$1(ai,"_createForOfIteratorHelper");function li(Td,wd){if(Td){if(typeof Td=="string")return ci(Td,wd);var Cd=Object.prototype.toString.call(Td).slice(8,-1);if(Cd==="Object"&&Td.constructor&&(Cd=Td.constructor.name),Cd==="Map"||Cd==="Set")return Array.from(Td);if(Cd==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Cd))return ci(Td,wd)}}s$1(li,"_unsupportedIterableToArray");function ci(Td,wd){(wd==null||wd>Td.length)&&(wd=Td.length);for(var Cd=0,sf=new Array(wd);Cd<wd;Cd++)sf[Cd]=Td[Cd];return sf}s$1(ci,"_arrayLikeToArray");var ui=yn(),di={fg:"#FFF",bg:"#000",newline:!1,escapeXML:!1,stream:!1,colors:hi()};function hi(){var Td={0:"#000",1:"#A00",2:"#0A0",3:"#A50",4:"#00A",5:"#A0A",6:"#0AA",7:"#AAA",8:"#555",9:"#F55",10:"#5F5",11:"#FF5",12:"#55F",13:"#F5F",14:"#5FF",15:"#FFF"};return Ca(0,5).forEach(function(wd){Ca(0,5).forEach(function(Cd){Ca(0,5).forEach(function(sf){return pi(wd,Cd,sf,Td)})})}),Ca(0,23).forEach(function(wd){var Cd=wd+232,sf=ha(wd*10+8);Td[Cd]="#"+sf+sf+sf}),Td}s$1(hi,"getDefaultColors");function pi(Td,wd,Cd,sf){var of=16+Td*36+wd*6+Cd,Wd=Td>0?Td*40+55:0,df=wd>0?wd*40+55:0,hf=Cd>0?Cd*40+55:0;sf[of]=ga([Wd,df,hf])}s$1(pi,"setStyleColor");function ha(Td){for(var wd=Td.toString(16);wd.length<2;)wd="0"+wd;return wd}s$1(ha,"toHexString");function ga(Td){var wd=[],Cd=ai(Td),sf;try{for(Cd.s();!(sf=Cd.n()).done;){var of=sf.value;wd.push(ha(of))}}catch(Wd){Cd.e(Wd)}finally{Cd.f()}return"#"+wd.join("")}s$1(ga,"toColorHexString");function va(Td,wd,Cd,sf){var of;return wd==="text"?of=gd(Cd,sf):wd==="display"?of=wa(Td,Cd,sf):wd==="xterm256Foreground"?of=Nd(Td,sf.colors[Cd]):wd==="xterm256Background"?of=Pd(Td,sf.colors[Cd]):wd==="rgb"&&(of=ba(Td,Cd)),of}s$1(va,"generateOutput");function ba(Td,wd){wd=wd.substring(2).slice(0,-1);var Cd=+wd.substr(0,2),sf=wd.substring(5).split(";"),of=sf.map(function(Wd){return("0"+Number(Wd).toString(16)).substr(-2)}).join("");return Od(Td,(Cd===38?"color:#":"background-color:#")+of)}s$1(ba,"handleRgb");function wa(Td,wd,Cd){wd=parseInt(wd,10);var sf={"-1":s$1(function(){return"<br/>"},"_"),0:s$1(function(){return Td.length&&xa(Td)},"_"),1:s$1(function(){return Ed(Td,"b")},"_"),3:s$1(function(){return Ed(Td,"i")},"_"),4:s$1(function(){return Ed(Td,"u")},"_"),8:s$1(function(){return Od(Td,"display:none")},"_"),9:s$1(function(){return Ed(Td,"strike")},"_"),22:s$1(function(){return Od(Td,"font-weight:normal;text-decoration:none;font-style:normal")},"_"),23:s$1(function(){return Ld(Td,"i")},"_"),24:s$1(function(){return Ld(Td,"u")},"_"),39:s$1(function(){return Nd(Td,Cd.fg)},"_"),49:s$1(function(){return Pd(Td,Cd.bg)},"_"),53:s$1(function(){return Od(Td,"text-decoration:overline")},"_")},of;return sf[wd]?of=sf[wd]():4<wd&&wd<7?of=Ed(Td,"blink"):29<wd&&wd<38?of=Nd(Td,Cd.colors[wd-30]):39<wd&&wd<48?of=Pd(Td,Cd.colors[wd-40]):89<wd&&wd<98?of=Nd(Td,Cd.colors[8+(wd-90)]):99<wd&&wd<108&&(of=Pd(Td,Cd.colors[8+(wd-100)])),of}s$1(wa,"handleDisplay");function xa(Td){var wd=Td.slice(0);return Td.length=0,wd.reverse().map(function(Cd){return"</"+Cd+">"}).join("")}s$1(xa,"resetStyles");function Ca(Td,wd){for(var Cd=[],sf=Td;sf<=wd;sf++)Cd.push(sf);return Cd}s$1(Ca,"range");function el(Td){return function(wd){return(Td===null||wd.category!==Td)&&Td!=="all"}}s$1(el,"notCategory");function ku(Td){Td=parseInt(Td,10);var wd=null;return Td===0?wd="all":Td===1?wd="bold":2<Td&&Td<5?wd="underline":4<Td&&Td<7?wd="blink":Td===8?wd="hide":Td===9?wd="strike":29<Td&&Td<38||Td===39||89<Td&&Td<98?wd="foreground-color":(39<Td&&Td<48||Td===49||99<Td&&Td<108)&&(wd="background-color"),wd}s$1(ku,"categoryForCode");function gd(Td,wd){return wd.escapeXML?ui.encodeXML(Td):Td}s$1(gd,"pushText");function Ed(Td,wd,Cd){return Cd||(Cd=""),Td.push(wd),"<".concat(wd).concat(Cd?' style="'.concat(Cd,'"'):"",">")}s$1(Ed,"pushTag");function Od(Td,wd){return Ed(Td,"span",wd)}s$1(Od,"pushStyle");function Nd(Td,wd){return Ed(Td,"span","color:"+wd)}s$1(Nd,"pushForegroundColor");function Pd(Td,wd){return Ed(Td,"span","background-color:"+wd)}s$1(Pd,"pushBackgroundColor");function Ld(Td,wd){var Cd;if(Td.slice(-1)[0]===wd&&(Cd=Td.pop()),Cd)return"</"+wd+">"}s$1(Ld,"closeTag");function rf(Td,wd,Cd){var sf=!1,of=3;function Wd(){return""}s$1(Wd,"remove");function df(kd,Dd){return Cd("xterm256Foreground",Dd),""}s$1(df,"removeXterm256Foreground");function hf(kd,Dd){return Cd("xterm256Background",Dd),""}s$1(hf,"removeXterm256Background");function xd(kd){return wd.newline?Cd("display",-1):Cd("text",kd),""}s$1(xd,"newline");function Fd(kd,Dd){sf=!0,Dd.trim().length===0&&(Dd="0"),Dd=Dd.trimRight(";").split(";");var tf=ai(Dd),vd;try{for(tf.s();!(vd=tf.n()).done;){var Sd=vd.value;Cd("display",Sd)}}catch(Id){tf.e(Id)}finally{tf.f()}return""}s$1(Fd,"ansiMess");function Vd(kd){return Cd("text",kd),""}s$1(Vd,"realText");function af(kd){return Cd("rgb",kd),""}s$1(af,"rgb");var ff=[{pattern:/^\x08+/,sub:Wd},{pattern:/^\x1b\[[012]?K/,sub:Wd},{pattern:/^\x1b\[\(B/,sub:Wd},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:af},{pattern:/^\x1b\[38;5;(\d+)m/,sub:df},{pattern:/^\x1b\[48;5;(\d+)m/,sub:hf},{pattern:/^\n/,sub:xd},{pattern:/^\r+\n/,sub:xd},{pattern:/^\r/,sub:xd},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:Fd},{pattern:/^\x1b\[\d?J/,sub:Wd},{pattern:/^\x1b\[\d{0,3};\d{0,3}f/,sub:Wd},{pattern:/^\x1b\[?[\d;]{0,3}/,sub:Wd},{pattern:/^(([^\x1b\x08\r\n])+)/,sub:Vd}];function uf(kd,Dd){Dd>of&&sf||(sf=!1,Td=Td.replace(kd.pattern,kd.sub))}s$1(uf,"process");var mf=[],yf=Td,Sf=yf.length;e:for(;Sf>0;){for(var Of=0,wf=0,Ef=ff.length;wf<Ef;Of=++wf){var xf=ff[Of];if(uf(xf,Of),Td.length!==Sf){Sf=Td.length;continue e}}if(Td.length===Sf)break;mf.push(0),Sf=Td.length}return mf}s$1(rf,"tokenize");function _d(Td,wd,Cd){return wd!=="text"&&(Td=Td.filter(el(ku(Cd))),Td.push({token:wd,data:Cd,category:ku(Cd)})),Td}s$1(_d,"updateStickyStack");var Md=function(){function Td(wd){oi(this,Td),wd=wd||{},wd.colors&&(wd.colors=Object.assign({},di.colors,wd.colors)),this.options=Object.assign({},di,wd),this.stack=[],this.stickyStack=[]}return s$1(Td,"Filter"),ii(Td,[{key:"toHtml",value:s$1(function(wd){var Cd=this;wd=typeof wd=="string"?[wd]:wd;var sf=this.stack,of=this.options,Wd=[];return this.stickyStack.forEach(function(df){var hf=va(sf,df.token,df.data,of);hf&&Wd.push(hf)}),rf(wd.join(""),of,function(df,hf){var xd=va(sf,df,hf,of);xd&&Wd.push(xd),of.stream&&(Cd.stickyStack=_d(Cd.stickyStack,df,hf))}),sf.length&&Wd.push(xa(sf)),Wd.join("")},"toHtml")}]),Td}();ws.exports=Md}),P=(()=>{let Ws;return typeof window<"u"?Ws=window:typeof globalThis<"u"?Ws=globalThis:typeof global<"u"?Ws=global:typeof self<"u"?Ws=self:Ws={},Ws})();function yr(){let Ws={setHandler:s$1(()=>{},"setHandler"),send:s$1(()=>{},"send")};return new z$2({transport:Ws})}s$1(yr,"mockChannel");var gr=class{constructor(){this.getChannel=s$1(()=>{if(!this.channel){let Ws=yr();return this.setChannel(Ws),Ws}return this.channel},"getChannel"),this.ready=s$1(()=>this.promise,"ready"),this.hasChannel=s$1(()=>!!this.channel,"hasChannel"),this.setChannel=s$1(Ws=>{this.channel=Ws,this.resolve()},"setChannel"),this.promise=new Promise(Ws=>{this.resolve=()=>Ws(this.getChannel())})}};s$1(gr,"AddonStore");var hr=gr,mr="__STORYBOOK_ADDONS_PREVIEW";function zn(){return P[mr]||(P[mr]=new hr),P[mr]}s$1(zn,"getAddonsStore");var G=zn(),Rr=class{constructor(){this.hookListsMap=void 0,this.mountedDecorators=void 0,this.prevMountedDecorators=void 0,this.currentHooks=void 0,this.nextHookIndex=void 0,this.currentPhase=void 0,this.currentEffects=void 0,this.prevEffects=void 0,this.currentDecoratorName=void 0,this.hasUpdates=void 0,this.currentContext=void 0,this.renderListener=s$1(Ws=>{var ws;Ws===((ws=this.currentContext)==null?void 0:ws.id)&&(this.triggerEffects(),this.currentContext=null,this.removeRenderListeners())},"renderListener"),this.init()}init(){this.hookListsMap=new WeakMap,this.mountedDecorators=new Set,this.prevMountedDecorators=new Set,this.currentHooks=[],this.nextHookIndex=0,this.currentPhase="NONE",this.currentEffects=[],this.prevEffects=[],this.currentDecoratorName=null,this.hasUpdates=!1,this.currentContext=null}clean(){this.prevEffects.forEach(Ws=>{Ws.destroy&&Ws.destroy()}),this.init(),this.removeRenderListeners()}getNextHook(){let Ws=this.currentHooks[this.nextHookIndex];return this.nextHookIndex+=1,Ws}triggerEffects(){this.prevEffects.forEach(Ws=>{!this.currentEffects.includes(Ws)&&Ws.destroy&&Ws.destroy()}),this.currentEffects.forEach(Ws=>{this.prevEffects.includes(Ws)||(Ws.destroy=Ws.create())}),this.prevEffects=this.currentEffects,this.currentEffects=[]}addRenderListeners(){this.removeRenderListeners(),G.getChannel().on(X$2,this.renderListener)}removeRenderListeners(){G.getChannel().removeListener(X$2,this.renderListener)}};s$1(Rr,"HooksContext");var te=Rr;function Rt(Ws){let ws=s$1((...oi)=>{let{hooks:si}=typeof oi[0]=="function"?oi[1]:oi[0],ii=si.currentPhase,ai=si.currentHooks,li=si.nextHookIndex,ci=si.currentDecoratorName;si.currentDecoratorName=Ws.name,si.prevMountedDecorators.has(Ws)?(si.currentPhase="UPDATE",si.currentHooks=si.hookListsMap.get(Ws)||[]):(si.currentPhase="MOUNT",si.currentHooks=[],si.hookListsMap.set(Ws,si.currentHooks),si.prevMountedDecorators.add(Ws)),si.nextHookIndex=0;let ui=P.STORYBOOK_HOOKS_CONTEXT;P.STORYBOOK_HOOKS_CONTEXT=si;let di=Ws(...oi);if(P.STORYBOOK_HOOKS_CONTEXT=ui,si.currentPhase==="UPDATE"&&si.getNextHook()!=null)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return si.currentPhase=ii,si.currentHooks=ai,si.nextHookIndex=li,si.currentDecoratorName=ci,di},"hookified");return ws.originalFn=Ws,ws}s$1(Rt,"hookify");var br=0,Wn=25,Sr=s$1(Ws=>(ws,oi)=>{let si=Ws(Rt(ws),oi.map(ii=>Rt(ii)));return ii=>{let{hooks:ai}=ii;ai.prevMountedDecorators??(ai.prevMountedDecorators=new Set),ai.mountedDecorators=new Set([ws,...oi]),ai.currentContext=ii,ai.hasUpdates=!1;let li=si(ii);for(br=1;ai.hasUpdates;)if(ai.hasUpdates=!1,ai.currentEffects=[],li=si(ii),br+=1,br>Wn)throw new Error("Too many re-renders. Storybook limits the number of renders to prevent an infinite loop.");return ai.addRenderListeners(),li}},"applyHooks"),$n=s$1((Ws,ws)=>Ws.length===ws.length&&Ws.every((oi,si)=>oi===ws[si]),"areDepsEqual"),Tr=s$1(()=>new Error("Storybook preview hooks can only be called inside decorators and story functions."),"invalidHooksError");function wt(){return P.STORYBOOK_HOOKS_CONTEXT||null}s$1(wt,"getHooksContextOrNull");function xr(){let Ws=wt();if(Ws==null)throw Tr();return Ws}s$1(xr,"getHooksContextOrThrow");function Yn(Ws,ws,oi){let si=xr();if(si.currentPhase==="MOUNT"){oi!=null&&!Array.isArray(oi)&&s$3.warn(`${Ws} received a final argument that is not an array (instead, received ${oi}). When specified, the final argument must be an array.`);let ii={name:Ws,deps:oi};return si.currentHooks.push(ii),ws(ii),ii}if(si.currentPhase==="UPDATE"){let ii=si.getNextHook();if(ii==null)throw new Error("Rendered more hooks than during the previous render.");return ii.name!==Ws&&s$3.warn(`Storybook has detected a change in the order of Hooks${si.currentDecoratorName?` called by ${si.currentDecoratorName}`:""}. This will lead to bugs and errors if not fixed.`),oi!=null&&ii.deps==null&&s$3.warn(`${Ws} received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.`),oi!=null&&ii.deps!=null&&oi.length!==ii.deps.length&&s$3.warn(`The final argument passed to ${Ws} changed size between renders. The order and size of this array must remain constant.
|
|
181
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Wd=!0,df=!1,hf;return{s:s$1(function(){Cd=Cd.call(Td)},"s"),n:s$1(function(){var xd=Cd.next();return Wd=xd.done,xd},"n"),e:s$1(function(xd){df=!0,hf=xd},"e"),f:s$1(function(){try{!Wd&&Cd.return!=null&&Cd.return()}finally{if(df)throw hf}},"f")}}s$1(ai,"_createForOfIteratorHelper");function li(Td,wd){if(Td){if(typeof Td=="string")return ci(Td,wd);var Cd=Object.prototype.toString.call(Td).slice(8,-1);if(Cd==="Object"&&Td.constructor&&(Cd=Td.constructor.name),Cd==="Map"||Cd==="Set")return Array.from(Td);if(Cd==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Cd))return ci(Td,wd)}}s$1(li,"_unsupportedIterableToArray");function ci(Td,wd){(wd==null||wd>Td.length)&&(wd=Td.length);for(var Cd=0,sf=new Array(wd);Cd<wd;Cd++)sf[Cd]=Td[Cd];return sf}s$1(ci,"_arrayLikeToArray");var ui=yn(),di={fg:"#FFF",bg:"#000",newline:!1,escapeXML:!1,stream:!1,colors:hi()};function hi(){var Td={0:"#000",1:"#A00",2:"#0A0",3:"#A50",4:"#00A",5:"#A0A",6:"#0AA",7:"#AAA",8:"#555",9:"#F55",10:"#5F5",11:"#FF5",12:"#55F",13:"#F5F",14:"#5FF",15:"#FFF"};return Ca(0,5).forEach(function(wd){Ca(0,5).forEach(function(Cd){Ca(0,5).forEach(function(sf){return pi(wd,Cd,sf,Td)})})}),Ca(0,23).forEach(function(wd){var Cd=wd+232,sf=ha(wd*10+8);Td[Cd]="#"+sf+sf+sf}),Td}s$1(hi,"getDefaultColors");function pi(Td,wd,Cd,sf){var of=16+Td*36+wd*6+Cd,Wd=Td>0?Td*40+55:0,df=wd>0?wd*40+55:0,hf=Cd>0?Cd*40+55:0;sf[of]=ga([Wd,df,hf])}s$1(pi,"setStyleColor");function ha(Td){for(var wd=Td.toString(16);wd.length<2;)wd="0"+wd;return wd}s$1(ha,"toHexString");function ga(Td){var wd=[],Cd=ai(Td),sf;try{for(Cd.s();!(sf=Cd.n()).done;){var of=sf.value;wd.push(ha(of))}}catch(Wd){Cd.e(Wd)}finally{Cd.f()}return"#"+wd.join("")}s$1(ga,"toColorHexString");function va(Td,wd,Cd,sf){var of;return wd==="text"?of=gd(Cd,sf):wd==="display"?of=wa(Td,Cd,sf):wd==="xterm256Foreground"?of=Nd(Td,sf.colors[Cd]):wd==="xterm256Background"?of=Pd(Td,sf.colors[Cd]):wd==="rgb"&&(of=ba(Td,Cd)),of}s$1(va,"generateOutput");function ba(Td,wd){wd=wd.substring(2).slice(0,-1);var Cd=+wd.substr(0,2),sf=wd.substring(5).split(";"),of=sf.map(function(Wd){return("0"+Number(Wd).toString(16)).substr(-2)}).join("");return Od(Td,(Cd===38?"color:#":"background-color:#")+of)}s$1(ba,"handleRgb");function wa(Td,wd,Cd){wd=parseInt(wd,10);var sf={"-1":s$1(function(){return"<br/>"},"_"),0:s$1(function(){return Td.length&&xa(Td)},"_"),1:s$1(function(){return Ed(Td,"b")},"_"),3:s$1(function(){return Ed(Td,"i")},"_"),4:s$1(function(){return Ed(Td,"u")},"_"),8:s$1(function(){return Od(Td,"display:none")},"_"),9:s$1(function(){return Ed(Td,"strike")},"_"),22:s$1(function(){return Od(Td,"font-weight:normal;text-decoration:none;font-style:normal")},"_"),23:s$1(function(){return Ld(Td,"i")},"_"),24:s$1(function(){return Ld(Td,"u")},"_"),39:s$1(function(){return Nd(Td,Cd.fg)},"_"),49:s$1(function(){return Pd(Td,Cd.bg)},"_"),53:s$1(function(){return Od(Td,"text-decoration:overline")},"_")},of;return sf[wd]?of=sf[wd]():4<wd&&wd<7?of=Ed(Td,"blink"):29<wd&&wd<38?of=Nd(Td,Cd.colors[wd-30]):39<wd&&wd<48?of=Pd(Td,Cd.colors[wd-40]):89<wd&&wd<98?of=Nd(Td,Cd.colors[8+(wd-90)]):99<wd&&wd<108&&(of=Pd(Td,Cd.colors[8+(wd-100)])),of}s$1(wa,"handleDisplay");function xa(Td){var wd=Td.slice(0);return Td.length=0,wd.reverse().map(function(Cd){return"</"+Cd+">"}).join("")}s$1(xa,"resetStyles");function Ca(Td,wd){for(var Cd=[],sf=Td;sf<=wd;sf++)Cd.push(sf);return Cd}s$1(Ca,"range");function el(Td){return function(wd){return(Td===null||wd.category!==Td)&&Td!=="all"}}s$1(el,"notCategory");function ku(Td){Td=parseInt(Td,10);var wd=null;return Td===0?wd="all":Td===1?wd="bold":2<Td&&Td<5?wd="underline":4<Td&&Td<7?wd="blink":Td===8?wd="hide":Td===9?wd="strike":29<Td&&Td<38||Td===39||89<Td&&Td<98?wd="foreground-color":(39<Td&&Td<48||Td===49||99<Td&&Td<108)&&(wd="background-color"),wd}s$1(ku,"categoryForCode");function gd(Td,wd){return wd.escapeXML?ui.encodeXML(Td):Td}s$1(gd,"pushText");function Ed(Td,wd,Cd){return Cd||(Cd=""),Td.push(wd),"<".concat(wd).concat(Cd?' style="'.concat(Cd,'"'):"",">")}s$1(Ed,"pushTag");function Od(Td,wd){return Ed(Td,"span",wd)}s$1(Od,"pushStyle");function Nd(Td,wd){return Ed(Td,"span","color:"+wd)}s$1(Nd,"pushForegroundColor");function Pd(Td,wd){return Ed(Td,"span","background-color:"+wd)}s$1(Pd,"pushBackgroundColor");function Ld(Td,wd){var Cd;if(Td.slice(-1)[0]===wd&&(Cd=Td.pop()),Cd)return"</"+wd+">"}s$1(Ld,"closeTag");function rf(Td,wd,Cd){var sf=!1,of=3;function Wd(){return""}s$1(Wd,"remove");function df(_d,Dd){return Cd("xterm256Foreground",Dd),""}s$1(df,"removeXterm256Foreground");function hf(_d,Dd){return Cd("xterm256Background",Dd),""}s$1(hf,"removeXterm256Background");function xd(_d){return wd.newline?Cd("display",-1):Cd("text",_d),""}s$1(xd,"newline");function Fd(_d,Dd){sf=!0,Dd.trim().length===0&&(Dd="0"),Dd=Dd.trimRight(";").split(";");var tf=ai(Dd),vd;try{for(tf.s();!(vd=tf.n()).done;){var Sd=vd.value;Cd("display",Sd)}}catch(Id){tf.e(Id)}finally{tf.f()}return""}s$1(Fd,"ansiMess");function Vd(_d){return Cd("text",_d),""}s$1(Vd,"realText");function af(_d){return Cd("rgb",_d),""}s$1(af,"rgb");var ff=[{pattern:/^\x08+/,sub:Wd},{pattern:/^\x1b\[[012]?K/,sub:Wd},{pattern:/^\x1b\[\(B/,sub:Wd},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:af},{pattern:/^\x1b\[38;5;(\d+)m/,sub:df},{pattern:/^\x1b\[48;5;(\d+)m/,sub:hf},{pattern:/^\n/,sub:xd},{pattern:/^\r+\n/,sub:xd},{pattern:/^\r/,sub:xd},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:Fd},{pattern:/^\x1b\[\d?J/,sub:Wd},{pattern:/^\x1b\[\d{0,3};\d{0,3}f/,sub:Wd},{pattern:/^\x1b\[?[\d;]{0,3}/,sub:Wd},{pattern:/^(([^\x1b\x08\r\n])+)/,sub:Vd}];function uf(_d,Dd){Dd>of&&sf||(sf=!1,Td=Td.replace(_d.pattern,_d.sub))}s$1(uf,"process");var mf=[],yf=Td,Sf=yf.length;e:for(;Sf>0;){for(var Of=0,wf=0,Ef=ff.length;wf<Ef;Of=++wf){var xf=ff[Of];if(uf(xf,Of),Td.length!==Sf){Sf=Td.length;continue e}}if(Td.length===Sf)break;mf.push(0),Sf=Td.length}return mf}s$1(rf,"tokenize");function kd(Td,wd,Cd){return wd!=="text"&&(Td=Td.filter(el(ku(Cd))),Td.push({token:wd,data:Cd,category:ku(Cd)})),Td}s$1(kd,"updateStickyStack");var Md=function(){function Td(wd){oi(this,Td),wd=wd||{},wd.colors&&(wd.colors=Object.assign({},di.colors,wd.colors)),this.options=Object.assign({},di,wd),this.stack=[],this.stickyStack=[]}return s$1(Td,"Filter"),ii(Td,[{key:"toHtml",value:s$1(function(wd){var Cd=this;wd=typeof wd=="string"?[wd]:wd;var sf=this.stack,of=this.options,Wd=[];return this.stickyStack.forEach(function(df){var hf=va(sf,df.token,df.data,of);hf&&Wd.push(hf)}),rf(wd.join(""),of,function(df,hf){var xd=va(sf,df,hf,of);xd&&Wd.push(xd),of.stream&&(Cd.stickyStack=kd(Cd.stickyStack,df,hf))}),sf.length&&Wd.push(xa(sf)),Wd.join("")},"toHtml")}]),Td}();ws.exports=Md}),P=(()=>{let Ws;return typeof window<"u"?Ws=window:typeof globalThis<"u"?Ws=globalThis:typeof global<"u"?Ws=global:typeof self<"u"?Ws=self:Ws={},Ws})();function yr(){let Ws={setHandler:s$1(()=>{},"setHandler"),send:s$1(()=>{},"send")};return new z$2({transport:Ws})}s$1(yr,"mockChannel");var gr=class{constructor(){this.getChannel=s$1(()=>{if(!this.channel){let Ws=yr();return this.setChannel(Ws),Ws}return this.channel},"getChannel"),this.ready=s$1(()=>this.promise,"ready"),this.hasChannel=s$1(()=>!!this.channel,"hasChannel"),this.setChannel=s$1(Ws=>{this.channel=Ws,this.resolve()},"setChannel"),this.promise=new Promise(Ws=>{this.resolve=()=>Ws(this.getChannel())})}};s$1(gr,"AddonStore");var hr=gr,mr="__STORYBOOK_ADDONS_PREVIEW";function zn(){return P[mr]||(P[mr]=new hr),P[mr]}s$1(zn,"getAddonsStore");var G=zn(),Rr=class{constructor(){this.hookListsMap=void 0,this.mountedDecorators=void 0,this.prevMountedDecorators=void 0,this.currentHooks=void 0,this.nextHookIndex=void 0,this.currentPhase=void 0,this.currentEffects=void 0,this.prevEffects=void 0,this.currentDecoratorName=void 0,this.hasUpdates=void 0,this.currentContext=void 0,this.renderListener=s$1(Ws=>{var ws;Ws===((ws=this.currentContext)==null?void 0:ws.id)&&(this.triggerEffects(),this.currentContext=null,this.removeRenderListeners())},"renderListener"),this.init()}init(){this.hookListsMap=new WeakMap,this.mountedDecorators=new Set,this.prevMountedDecorators=new Set,this.currentHooks=[],this.nextHookIndex=0,this.currentPhase="NONE",this.currentEffects=[],this.prevEffects=[],this.currentDecoratorName=null,this.hasUpdates=!1,this.currentContext=null}clean(){this.prevEffects.forEach(Ws=>{Ws.destroy&&Ws.destroy()}),this.init(),this.removeRenderListeners()}getNextHook(){let Ws=this.currentHooks[this.nextHookIndex];return this.nextHookIndex+=1,Ws}triggerEffects(){this.prevEffects.forEach(Ws=>{!this.currentEffects.includes(Ws)&&Ws.destroy&&Ws.destroy()}),this.currentEffects.forEach(Ws=>{this.prevEffects.includes(Ws)||(Ws.destroy=Ws.create())}),this.prevEffects=this.currentEffects,this.currentEffects=[]}addRenderListeners(){this.removeRenderListeners(),G.getChannel().on(X$2,this.renderListener)}removeRenderListeners(){G.getChannel().removeListener(X$2,this.renderListener)}};s$1(Rr,"HooksContext");var te=Rr;function Rt(Ws){let ws=s$1((...oi)=>{let{hooks:si}=typeof oi[0]=="function"?oi[1]:oi[0],ii=si.currentPhase,ai=si.currentHooks,li=si.nextHookIndex,ci=si.currentDecoratorName;si.currentDecoratorName=Ws.name,si.prevMountedDecorators.has(Ws)?(si.currentPhase="UPDATE",si.currentHooks=si.hookListsMap.get(Ws)||[]):(si.currentPhase="MOUNT",si.currentHooks=[],si.hookListsMap.set(Ws,si.currentHooks),si.prevMountedDecorators.add(Ws)),si.nextHookIndex=0;let ui=P.STORYBOOK_HOOKS_CONTEXT;P.STORYBOOK_HOOKS_CONTEXT=si;let di=Ws(...oi);if(P.STORYBOOK_HOOKS_CONTEXT=ui,si.currentPhase==="UPDATE"&&si.getNextHook()!=null)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return si.currentPhase=ii,si.currentHooks=ai,si.nextHookIndex=li,si.currentDecoratorName=ci,di},"hookified");return ws.originalFn=Ws,ws}s$1(Rt,"hookify");var br=0,Wn=25,Sr=s$1(Ws=>(ws,oi)=>{let si=Ws(Rt(ws),oi.map(ii=>Rt(ii)));return ii=>{let{hooks:ai}=ii;ai.prevMountedDecorators??(ai.prevMountedDecorators=new Set),ai.mountedDecorators=new Set([ws,...oi]),ai.currentContext=ii,ai.hasUpdates=!1;let li=si(ii);for(br=1;ai.hasUpdates;)if(ai.hasUpdates=!1,ai.currentEffects=[],li=si(ii),br+=1,br>Wn)throw new Error("Too many re-renders. Storybook limits the number of renders to prevent an infinite loop.");return ai.addRenderListeners(),li}},"applyHooks"),$n=s$1((Ws,ws)=>Ws.length===ws.length&&Ws.every((oi,si)=>oi===ws[si]),"areDepsEqual"),Tr=s$1(()=>new Error("Storybook preview hooks can only be called inside decorators and story functions."),"invalidHooksError");function wt(){return P.STORYBOOK_HOOKS_CONTEXT||null}s$1(wt,"getHooksContextOrNull");function xr(){let Ws=wt();if(Ws==null)throw Tr();return Ws}s$1(xr,"getHooksContextOrThrow");function Yn(Ws,ws,oi){let si=xr();if(si.currentPhase==="MOUNT"){oi!=null&&!Array.isArray(oi)&&s$3.warn(`${Ws} received a final argument that is not an array (instead, received ${oi}). When specified, the final argument must be an array.`);let ii={name:Ws,deps:oi};return si.currentHooks.push(ii),ws(ii),ii}if(si.currentPhase==="UPDATE"){let ii=si.getNextHook();if(ii==null)throw new Error("Rendered more hooks than during the previous render.");return ii.name!==Ws&&s$3.warn(`Storybook has detected a change in the order of Hooks${si.currentDecoratorName?` called by ${si.currentDecoratorName}`:""}. This will lead to bugs and errors if not fixed.`),oi!=null&&ii.deps==null&&s$3.warn(`${Ws} received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.`),oi!=null&&ii.deps!=null&&oi.length!==ii.deps.length&&s$3.warn(`The final argument passed to ${Ws} changed size between renders. The order and size of this array must remain constant.
|
|
182
182
|
Previous: ${ii.deps}
|
|
183
183
|
Incoming: ${oi}`),(oi==null||ii.deps==null||!$n(oi,ii.deps))&&(ws(ii),ii.deps=oi),ii}throw Tr()}s$1(Yn,"useHook");function Be(Ws,ws,oi){let{memoizedState:si}=Yn(Ws,ii=>{ii.memoizedState=ws()},oi);return si}s$1(Be,"useMemoLike");function Kn(Ws,ws){return Be("useMemo",Ws,ws)}s$1(Kn,"useMemo");function ve(Ws,ws){return Be("useCallback",()=>Ws,ws)}s$1(ve,"useCallback");function Et(Ws,ws){return Be(Ws,()=>({current:ws}),[])}s$1(Et,"useRefLike");function Xn(Ws){return Et("useRef",Ws)}s$1(Xn,"useRef");function Jn(){let Ws=wt();if(Ws!=null&&Ws.currentPhase!=="NONE")Ws.hasUpdates=!0;else try{G.getChannel().emit(L$1)}catch{s$3.warn("State updates of Storybook preview hooks work only in browser")}}s$1(Jn,"triggerUpdate");function At(Ws,ws){let oi=Et(Ws,typeof ws=="function"?ws():ws),si=s$1(ii=>{oi.current=typeof ii=="function"?ii(oi.current):ii,Jn()},"setState");return[oi.current,si]}s$1(At,"useStateLike");function Qn(Ws){return At("useState",Ws)}s$1(Qn,"useState");function Zn(Ws,ws,oi){let si=oi!=null?()=>oi(ws):ws,[ii,ai]=At("useReducer",si);return[ii,s$1(li=>ai(ci=>Ws(ci,li)),"dispatch")]}s$1(Zn,"useReducer");function vt(Ws,ws){let oi=xr(),si=Be("useEffect",()=>({create:Ws}),ws);oi.currentEffects.includes(si)||oi.currentEffects.push(si)}s$1(vt,"useEffect");function es(Ws,ws=[]){let oi=G.getChannel();return vt(()=>(Object.entries(Ws).forEach(([si,ii])=>oi.on(si,ii)),()=>{Object.entries(Ws).forEach(([si,ii])=>oi.removeListener(si,ii))}),[...Object.keys(Ws),...ws]),ve(oi.emit.bind(oi),[oi])}s$1(es,"useChannel");function ze(){let{currentContext:Ws}=xr();if(Ws==null)throw Tr();return Ws}s$1(ze,"useStoryContext");function rs(Ws,ws){let{parameters:oi}=ze();if(Ws)return oi[Ws]??ws}s$1(rs,"useParameter");function ts(){let Ws=G.getChannel(),{id:ws,args:oi}=ze(),si=ve(ai=>Ws.emit(z$3,{storyId:ws,updatedArgs:ai}),[Ws,ws]),ii=ve(ai=>Ws.emit(W$3,{storyId:ws,argNames:ai}),[Ws,ws]);return[oi,si,ii]}s$1(ts,"useArgs");function os(){let Ws=G.getChannel(),{globals:ws}=ze(),oi=ve(si=>Ws.emit(j$1,{globals:si}),[Ws]);return[ws,oi]}s$1(os,"useGlobals");function wr(Ws,ws){let oi={},si=Object.entries(Ws);for(let ii=0;ii<si.length;ii++){let[ai,li]=si[ii];ws(li,ai)||(oi[ai]=li)}return oi}s$1(wr,"omitBy");function Er(Ws,ws){let oi={};for(let si=0;si<ws.length;si++){let ii=ws[si];Object.prototype.hasOwnProperty.call(Ws,ii)&&(oi[ii]=Ws[ii])}return oi}s$1(Er,"pick");function Ar(Ws,ws){let oi={},si=Object.entries(Ws);for(let ii=0;ii<si.length;ii++){let[ai,li]=si[ii];ws(li,ai)&&(oi[ai]=li)}return oi}s$1(Ar,"pickBy");function j(Ws){if(typeof Ws!="object"||Ws==null)return!1;if(Object.getPrototypeOf(Ws)===null)return!0;if(Ws.toString()!=="[object Object]")return!1;let ws=Ws;for(;Object.getPrototypeOf(ws)!==null;)ws=Object.getPrototypeOf(ws);return Object.getPrototypeOf(Ws)===ws}s$1(j,"isPlainObject");function q(Ws,ws){let oi={},si=Object.keys(Ws);for(let ii=0;ii<si.length;ii++){let ai=si[ii],li=Ws[ai];oi[ai]=ws(li,ai,Ws)}return oi}s$1(q,"mapValues");var Ct="[object RegExp]",Pt="[object String]",Ft="[object Number]",It="[object Boolean]",vr="[object Arguments]",Ot="[object Symbol]",Dt="[object Date]",kt="[object Map]",jt="[object Set]",Mt="[object Array]",_t="[object Function]",Lt="[object ArrayBuffer]",Ge="[object Object]",Nt="[object Error]",qt="[object DataView]",Bt="[object Uint8Array]",zt="[object Uint8ClampedArray]",Gt="[object Uint16Array]",Vt="[object Uint32Array]",Ut="[object BigUint64Array]",Ht="[object Int8Array]",Wt="[object Int16Array]",$t="[object Int32Array]",Yt="[object BigInt64Array]",Kt="[object Float32Array]",Xt="[object Float64Array]";function Cr(Ws){return Object.getOwnPropertySymbols(Ws).filter(ws=>Object.prototype.propertyIsEnumerable.call(Ws,ws))}s$1(Cr,"getSymbols");function Pr(Ws){return Ws==null?Ws===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(Ws)}s$1(Pr,"getTag");function Fr(Ws,ws){if(typeof Ws==typeof ws)switch(typeof Ws){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return Ws===ws;case"number":return Ws===ws||Object.is(Ws,ws);case"function":return Ws===ws;case"object":return W(Ws,ws)}return W(Ws,ws)}s$1(Fr,"isEqual");function W(Ws,ws,oi){if(Object.is(Ws,ws))return!0;let si=Pr(Ws),ii=Pr(ws);if(si===vr&&(si=Ge),ii===vr&&(ii=Ge),si!==ii)return!1;switch(si){case Pt:return Ws.toString()===ws.toString();case Ft:{let ci=Ws.valueOf(),ui=ws.valueOf();return ci===ui||Number.isNaN(ci)&&Number.isNaN(ui)}case It:case Dt:case Ot:return Object.is(Ws.valueOf(),ws.valueOf());case Ct:return Ws.source===ws.source&&Ws.flags===ws.flags;case _t:return Ws===ws}oi=oi??new Map;let ai=oi.get(Ws),li=oi.get(ws);if(ai!=null&&li!=null)return ai===ws;oi.set(Ws,ws),oi.set(ws,Ws);try{switch(si){case kt:{if(Ws.size!==ws.size)return!1;for(let[ci,ui]of Ws.entries())if(!ws.has(ci)||!W(ui,ws.get(ci),oi))return!1;return!0}case jt:{if(Ws.size!==ws.size)return!1;let ci=Array.from(Ws.values()),ui=Array.from(ws.values());for(let di=0;di<ci.length;di++){let hi=ci[di],pi=ui.findIndex(ha=>W(hi,ha,oi));if(pi===-1)return!1;ui.splice(pi,1)}return!0}case Mt:case Bt:case zt:case Gt:case Vt:case Ut:case Ht:case Wt:case $t:case Yt:case Kt:case Xt:{if(typeof Buffer<"u"&&Buffer.isBuffer(Ws)!==Buffer.isBuffer(ws)||Ws.length!==ws.length)return!1;for(let ci=0;ci<Ws.length;ci++)if(!W(Ws[ci],ws[ci],oi))return!1;return!0}case Lt:return Ws.byteLength!==ws.byteLength?!1:W(new Uint8Array(Ws),new Uint8Array(ws),oi);case qt:return Ws.byteLength!==ws.byteLength||Ws.byteOffset!==ws.byteOffset?!1:W(Ws.buffer,ws.buffer,oi);case Nt:return Ws.name===ws.name&&Ws.message===ws.message;case Ge:{if(!(W(Ws.constructor,ws.constructor,oi)||j(Ws)&&j(ws)))return!1;let ci=[...Object.keys(Ws),...Cr(Ws)],ui=[...Object.keys(ws),...Cr(ws)];if(ci.length!==ui.length)return!1;for(let di=0;di<ci.length;di++){let hi=ci[di],pi=Ws[hi];if(!Object.prototype.hasOwnProperty.call(ws,hi))return!1;let ha=ws[hi];if(!W(pi,ha,oi))return!1}return!0}default:return!1}}finally{oi.delete(Ws),oi.delete(ws)}}s$1(W,"areObjectsEqual");var Xe=ue(Or());function F(Ws){for(var ws=[],oi=1;oi<arguments.length;oi++)ws[oi-1]=arguments[oi];var si=Array.from(typeof Ws=="string"?[Ws]:Ws);si[si.length-1]=si[si.length-1].replace(/\r?\n([\t ]*)$/,"");var ii=si.reduce(function(ci,ui){var di=ui.match(/\n([\t ]+|(?!\s).)/g);return di?ci.concat(di.map(function(hi){var pi,ha;return(ha=(pi=hi.match(/[\t ]/g))===null||pi===void 0?void 0:pi.length)!==null&&ha!==void 0?ha:0})):ci},[]);if(ii.length){var ai=new RegExp(`
|
|
184
184
|
[ ]{`+Math.min.apply(Math,ii)+"}","g");si=si.map(function(ci){return ci.replace(ai,`
|
|
@@ -221,7 +221,7 @@ ${gd.description}`)},"showError"),showException:s$1(gd=>{throw gd},"showExceptio
|
|
|
221
221
|
await mount(<MyComponent foo="bar"/>)
|
|
222
222
|
|
|
223
223
|
More info: https://storybook.js.org/docs/api/portable-stories-playwright
|
|
224
|
-
`);await oi.evaluate(async ci=>{var ui,di,hi;let pi=await((ui=globalThis.__pwUnwrapObject)==null?void 0:ui.call(globalThis,ci));return(hi=(di="__pw_type"in pi?pi.type:pi)==null?void 0:di.load)==null?void 0:hi.call(di)},ii);let li=await ws(ii,...ai);return await oi.evaluate(async ci=>{var ui,di;let hi=await((ui=globalThis.__pwUnwrapObject)==null?void 0:ui.call(globalThis,ci)),pi="__pw_type"in hi?hi.type:hi,ha=document.querySelector("#root");return(di=pi==null?void 0:pi.play)==null?void 0:di.call(pi,{canvasElement:ha})},ii),li})},"mount")})}s$1(Ns,"createPlaywrightTest");async function qs(Ws,ws){var oi,si;for(let li of[...X].reverse())await li();if(X.length=0,!ws.canvasElement){let li=document.createElement("div");(si=(oi=globalThis==null?void 0:globalThis.document)==null?void 0:oi.body)==null||si.appendChild(li),ws.canvasElement=li,X.push(()=>{var ci,ui,di,hi;(ui=(ci=globalThis==null?void 0:globalThis.document)==null?void 0:ci.body)!=null&&ui.contains(li)&&((hi=(di=globalThis==null?void 0:globalThis.document)==null?void 0:di.body)==null||hi.removeChild(li))})}if(ws.loaded=await Ws.applyLoaders(ws),ws.abortSignal.aborted)return;X.push(...(await Ws.applyBeforeEach(ws)).filter(Boolean));let ii=Ws.playFunction,ai=Ws.usesMount;ai||await ws.mount(),!ws.abortSignal.aborted&&(ii&&(ai||(ws.mount=async()=>{throw new J$1({playFunction:ii.toString()})}),await ii(ws)),await Ws.applyAfterEach(ws))}s$1(qs,"runStory");function mo(Ws,ws){return wr(Er(Ws,ws),oi=>oi===void 0)}s$1(mo,"picky");var ho=1e3,Gs=1e4,Ur=class{constructor(Ws,ws,oi){this.importFn=ws,this.getStoriesJsonData=s$1(()=>{let ai=this.getSetStoriesPayload(),li=["fileName","docsOnly","framework","__id","__isArgsStory"];return{v:3,stories:q(ai.stories,ci=>{let{importPath:ui}=this.storyIndex.entries[ci.id];return{...mo(ci,["id","name","title"]),importPath:ui,kind:ci.title,story:ci.name,parameters:{...mo(ci.parameters,li),fileName:ui}}})}},"getStoriesJsonData"),this.storyIndex=new We(Ws),this.projectAnnotations=Oe(oi);let{initialGlobals:si,globalTypes:ii}=this.projectAnnotations;this.args=new Ve,this.userGlobals=new He({globals:si,globalTypes:ii}),this.hooks={},this.cleanupCallbacks={},this.processCSFFileWithCache=(0,Xe.default)(ho)(no),this.prepareMetaWithCache=(0,Xe.default)(ho)(qr),this.prepareStoryWithCache=(0,Xe.default)(Gs)(Fe)}setProjectAnnotations(Ws){this.projectAnnotations=Oe(Ws);let{initialGlobals:ws,globalTypes:oi}=Ws;this.userGlobals.set({globals:ws,globalTypes:oi})}async onStoriesChanged({importFn:Ws,storyIndex:ws}){Ws&&(this.importFn=Ws),ws&&(this.storyIndex.entries=ws.entries),this.cachedCSFFiles&&await this.cacheAllCSFFiles()}async storyIdToEntry(Ws){return this.storyIndex.storyIdToEntry(Ws)}async loadCSFFileByStoryId(Ws){let{importPath:ws,title:oi}=this.storyIndex.storyIdToEntry(Ws),si=await this.importFn(ws);return this.processCSFFileWithCache(si,ws,oi)}async loadAllCSFFiles(){let Ws={};return Object.entries(this.storyIndex.entries).forEach(([ws,{importPath:oi}])=>{Ws[oi]=ws}),(await Promise.all(Object.entries(Ws).map(async([ws,oi])=>({importPath:ws,csfFile:await this.loadCSFFileByStoryId(oi)})))).reduce((ws,{importPath:oi,csfFile:si})=>(ws[oi]=si,ws),{})}async cacheAllCSFFiles(){this.cachedCSFFiles=await this.loadAllCSFFiles()}preparedMetaFromCSFFile({csfFile:Ws}){let ws=Ws.meta;return this.prepareMetaWithCache(ws,this.projectAnnotations,Ws.moduleExports.default)}async loadStory({storyId:Ws}){let ws=await this.loadCSFFileByStoryId(Ws);return this.storyFromCSFFile({storyId:Ws,csfFile:ws})}storyFromCSFFile({storyId:Ws,csfFile:ws}){let oi=ws.stories[Ws];if(!oi)throw new X$1({storyId:Ws});let si=ws.meta,ii=this.prepareStoryWithCache(oi,si,this.projectAnnotations);return this.args.setInitial(ii),this.hooks[ii.id]=this.hooks[ii.id]||new te,ii}componentStoriesFromCSFFile({csfFile:Ws}){return Object.keys(this.storyIndex.entries).filter(ws=>!!Ws.stories[ws]).map(ws=>this.storyFromCSFFile({storyId:ws,csfFile:Ws}))}async loadEntry(Ws){let ws=await this.storyIdToEntry(Ws),oi=ws.type==="docs"?ws.storiesImports:[],[si,...ii]=await Promise.all([this.importFn(ws.importPath),...oi.map(ai=>{let li=this.storyIndex.importPathToEntry(ai);return this.loadCSFFileByStoryId(li.id)})]);return{entryExports:si,csfFiles:ii}}getStoryContext(Ws,{forceInitialArgs:ws=!1}={}){let oi=this.userGlobals.get(),{initialGlobals:si}=this.userGlobals,ii=new se;return Ye({...Ws,args:ws?Ws.initialArgs:this.args.get(Ws.id),initialGlobals:si,globalTypes:this.projectAnnotations.globalTypes,userGlobals:oi,reporting:ii,globals:{...oi,...Ws.storyGlobals},hooks:this.hooks[Ws.id]})}addCleanupCallbacks(Ws,ws){this.cleanupCallbacks[Ws.id]=ws}async cleanupStory(Ws){this.hooks[Ws.id].clean();let ws=this.cleanupCallbacks[Ws.id];if(ws)for(let oi of[...ws].reverse())await oi();delete this.cleanupCallbacks[Ws.id]}extract(Ws={includeDocsOnly:!1}){let{cachedCSFFiles:ws}=this;if(!ws)throw new L;return Object.entries(this.storyIndex.entries).reduce((oi,[si,{type:ii,importPath:ai}])=>{if(ii==="docs")return oi;let li=ws[ai],ci=this.storyFromCSFFile({storyId:si,csfFile:li});return!Ws.includeDocsOnly&&ci.parameters.docsOnly||(oi[si]=Object.entries(ci).reduce((ui,[di,hi])=>di==="moduleExport"||typeof hi=="function"?ui:Array.isArray(hi)?Object.assign(ui,{[di]:hi.slice().sort()}):Object.assign(ui,{[di]:hi}),{args:ci.initialArgs})),oi},{})}getSetStoriesPayload(){let Ws=this.extract({includeDocsOnly:!0}),ws=Object.values(Ws).reduce((oi,{title:si})=>(oi[si]={},oi),{});return{v:2,globals:this.userGlobals.get(),globalParameters:{},kindParameters:ws,stories:Ws}}raw(){return m$2("StoryStore.raw() is deprecated and will be removed in 9.0, please use extract() instead"),Object.values(this.extract()).map(({id:Ws})=>this.fromId(Ws)).filter(Boolean)}fromId(Ws){if(m$2("StoryStore.fromId() is deprecated and will be removed in 9.0, please use loadStory() instead"),!this.cachedCSFFiles)throw new Error("Cannot call fromId/raw() unless you call cacheAllCSFFiles() first.");let ws;try{({importPath:ws}=this.storyIndex.storyIdToEntry(Ws))}catch{return null}let oi=this.cachedCSFFiles[ws],si=this.storyFromCSFFile({storyId:Ws,csfFile:oi});return{...si,storyFn:s$1(ii=>{let ai={...this.getStoryContext(si),abortSignal:new AbortController().signal,canvasElement:null,loaded:{},step:s$1((li,ci)=>si.runStep(li,ci,ai),"step"),context:null,mount:null,canvas:{},viewMode:"story"};return si.unboundStoryFn({...ai,...ii})},"storyFn")}}};s$1(Ur,"StoryStore");var ge=Ur;function Hr(Ws){return Ws.startsWith("\\\\?\\")?Ws:Ws.replace(/\\/g,"/")}s$1(Hr,"slash");function go(Ws){return Ws.flatMap(ws=>ws.split("/")).filter(Boolean).join("/")}s$1(go,"pathJoin");var J$4=new Error("prepareAborted"),{AbortController:wo}=globalThis;function Eo(Ws){try{let{name:ws="Error",message:oi=String(Ws),stack:si}=Ws;return{name:ws,message:oi,stack:si}}catch{return{name:"Error",message:String(Ws)}}}s$1(Eo,"serializeError");var Wr=class{constructor(Ws,ws,oi,si,ii,ai,li={autoplay:!0,forceInitialArgs:!1},ci){this.channel=Ws,this.store=ws,this.renderToScreen=oi,this.callbacks=si,this.id=ii,this.viewMode=ai,this.renderOptions=li,this.type="story",this.notYetRendered=!0,this.rerenderEnqueued=!1,this.disableKeyListeners=!1,this.teardownRender=s$1(()=>{},"teardownRender"),this.torndown=!1,this.abortController=new wo,ci&&(this.story=ci,this.phase="preparing")}async runPhase(Ws,ws,oi){this.phase=ws,this.channel.emit(B$2,{newPhase:this.phase,storyId:this.id}),oi&&(await oi(),this.checkIfAborted(Ws))}checkIfAborted(Ws){return Ws.aborted?(this.phase="aborted",this.channel.emit(B$2,{newPhase:this.phase,storyId:this.id}),!0):!1}async prepare(){if(await this.runPhase(this.abortController.signal,"preparing",async()=>{this.story=await this.store.loadStory({storyId:this.id})}),this.abortController.signal.aborted)throw await this.store.cleanupStory(this.story),J$4}isEqual(Ws){return!!(this.id===Ws.id&&this.story&&this.story===Ws.story)}isPreparing(){return["preparing"].includes(this.phase)}isPending(){return["loading","beforeEach","rendering","playing","afterEach"].includes(this.phase)}async renderToElement(Ws){return this.canvasElement=Ws,this.render({initial:!0,forceRemount:!0})}storyContext(){if(!this.story)throw new Error("Cannot call storyContext before preparing");let{forceInitialArgs:Ws}=this.renderOptions;return this.store.getStoryContext(this.story,{forceInitialArgs:Ws})}async render({initial:Ws=!1,forceRemount:ws=!1}={}){var oi,si,ii,ai;let{canvasElement:li}=this;if(!this.story)throw new Error("cannot render when not prepared");let ci=this.story;if(!li)throw new Error("cannot render when canvasElement is unset");let{id:ui,componentId:di,title:hi,name:pi,tags:ha,applyLoaders:ga,applyBeforeEach:va,applyAfterEach:ba,unboundStoryFn:wa,playFunction:xa,runStep:Ca}=ci;ws&&!Ws&&(this.cancelRender(),this.abortController=new wo);let el=this.abortController.signal,ku=!1,gd=ci.usesMount;try{let Ed={...this.storyContext(),viewMode:this.viewMode,abortSignal:el,canvasElement:li,loaded:{},step:s$1((wd,Cd)=>Ca(wd,Cd,Ed),"step"),context:null,canvas:{},renderToCanvas:s$1(async()=>{let wd=await this.renderToScreen(Od,li);this.teardownRender=wd||(()=>{}),ku=!0},"renderToCanvas"),mount:s$1(async(...wd)=>{var Cd,sf;(sf=(Cd=this.callbacks).showStoryDuringRender)==null||sf.call(Cd);let of=null;return await this.runPhase(el,"rendering",async()=>{of=await ci.mount(Ed)(...wd)}),gd&&await this.runPhase(el,"playing"),of},"mount")};Ed.context=Ed;let Od={componentId:di,title:hi,kind:hi,id:ui,name:pi,story:pi,tags:ha,...this.callbacks,showError:s$1(wd=>(this.phase="errored",this.callbacks.showError(wd)),"showError"),showException:s$1(wd=>(this.phase="errored",this.callbacks.showException(wd)),"showException"),forceRemount:ws||this.notYetRendered,storyContext:Ed,storyFn:s$1(()=>wa(Ed),"storyFn"),unboundStoryFn:wa};if(await this.runPhase(el,"loading",async()=>{Ed.loaded=await ga(Ed)}),el.aborted)return;let Nd=await va(Ed);if(this.store.addCleanupCallbacks(ci,Nd),this.checkIfAborted(el)||(!ku&&!gd&&await Ed.mount(),this.notYetRendered=!1,el.aborted))return;let Pd=((si=(oi=this.story.parameters)==null?void 0:oi.test)==null?void 0:si.dangerouslyIgnoreUnhandledErrors)===!0,Ld=new Set,rf=s$1(wd=>Ld.add("error"in wd?wd.error:wd.reason),"onError");if(this.renderOptions.autoplay&&ws&&xa&&this.phase!=="errored"){window.addEventListener("error",rf),window.addEventListener("unhandledrejection",rf),this.disableKeyListeners=!0;try{if(gd?await xa(Ed):(Ed.mount=async()=>{throw new J$1({playFunction:xa.toString()})},await this.runPhase(el,"playing",async()=>xa(Ed))),!ku)throw new z$1;this.checkIfAborted(el),!Pd&&Ld.size>0?await this.runPhase(el,"errored"):await this.runPhase(el,"played")}catch(wd){if((ai=(ii=this.callbacks).showStoryDuringRender)==null||ai.call(ii),await this.runPhase(el,"errored",async()=>{this.channel.emit(a,Eo(wd))}),this.story.parameters.throwPlayFunctionExceptions!==!1)throw wd;console.error(wd)}if(!Pd&&Ld.size>0&&this.channel.emit(Y$1,Array.from(Ld).map(Eo)),this.disableKeyListeners=!1,window.removeEventListener("unhandledrejection",rf),window.removeEventListener("error",rf),el.aborted)return}await this.runPhase(el,"completed",async()=>this.channel.emit(X$2,ui)),this.phase!=="errored"&&await this.runPhase(el,"afterEach",async()=>{await ba(Ed)});let _d=!Pd&&Ld.size>0,Md=Ed.reporting.reports.some(wd=>wd.status==="failed"),Td=_d||Md;await this.runPhase(el,"finished",async()=>this.channel.emit(q$3,{storyId:ui,status:Td?"error":"success",reporters:Ed.reporting.reports}))}catch(Ed){this.phase="errored",this.callbacks.showException(Ed),await this.runPhase(el,"finished",async()=>this.channel.emit(q$3,{storyId:ui,status:"error",reporters:[]}))}this.rerenderEnqueued&&(this.rerenderEnqueued=!1,this.render())}async rerender(){if(this.isPending()&&this.phase!=="playing")this.rerenderEnqueued=!0;else return this.render()}async remount(){return await this.teardown(),this.render({forceRemount:!0})}cancelRender(){var Ws;(Ws=this.abortController)==null||Ws.abort()}async teardown(){this.torndown=!0,this.cancelRender(),this.story&&await this.store.cleanupStory(this.story);for(let Ws=0;Ws<3;Ws+=1){if(!this.isPending()){await this.teardownRender();return}await new Promise(ws=>setTimeout(ws,0))}window.location.reload(),await new Promise(()=>{})}};s$1(Wr,"StoryRender");var ie$2=Wr,{fetch:fi}=P,yi="./index.json",$r=class{constructor(Ws,ws,oi=G.getChannel(),si=!0){this.importFn=Ws,this.getProjectAnnotations=ws,this.channel=oi,this.storyRenders=[],this.storeInitializationPromise=new Promise((ii,ai)=>{this.resolveStoreInitializationPromise=ii,this.rejectStoreInitializationPromise=ai}),si&&this.initialize()}get storyStore(){return new Proxy({},{get:s$1((Ws,ws)=>{if(this.storyStoreValue)return m$2("Accessing the Story Store is deprecated and will be removed in 9.0"),this.storyStoreValue[ws];throw new U},"get")})}async initialize(){this.setupListeners();try{let Ws=await this.getProjectAnnotationsOrRenderError();await this.runBeforeAllHook(Ws),await this.initializeWithProjectAnnotations(Ws)}catch(Ws){this.rejectStoreInitializationPromise(Ws)}}ready(){return this.storeInitializationPromise}setupListeners(){this.channel.on(m$1,this.onStoryIndexChanged.bind(this)),this.channel.on(j$1,this.onUpdateGlobals.bind(this)),this.channel.on(z$3,this.onUpdateArgs.bind(this)),this.channel.on(SE,this.onRequestArgTypesInfo.bind(this)),this.channel.on(W$3,this.onResetArgs.bind(this)),this.channel.on(L$1,this.onForceReRender.bind(this)),this.channel.on(U$2,this.onForceRemount.bind(this))}async getProjectAnnotationsOrRenderError(){try{let Ws=await this.getProjectAnnotations();if(this.renderToCanvas=Ws.renderToCanvas,!this.renderToCanvas)throw new G$2;return Ws}catch(Ws){throw this.renderPreviewEntryError("Error reading preview.js:",Ws),Ws}}async initializeWithProjectAnnotations(Ws){this.projectAnnotationsBeforeInitialization=Ws;try{let ws=await this.getStoryIndexFromServer();return this.initializeWithStoryIndex(ws)}catch(ws){throw this.renderPreviewEntryError("Error loading story index:",ws),ws}}async runBeforeAllHook(Ws){var ws,oi;try{await((ws=this.beforeAllCleanup)==null?void 0:ws.call(this)),this.beforeAllCleanup=await((oi=Ws.beforeAll)==null?void 0:oi.call(Ws))}catch(si){throw this.renderPreviewEntryError("Error in beforeAll hook:",si),si}}async getStoryIndexFromServer(){let Ws=await fi(yi);if(Ws.status===200)return Ws.json();throw new M$1({text:await Ws.text()})}initializeWithStoryIndex(Ws){if(!this.projectAnnotationsBeforeInitialization)throw new Error("Cannot call initializeWithStoryIndex until project annotations resolve");this.storyStoreValue=new ge(Ws,this.importFn,this.projectAnnotationsBeforeInitialization),delete this.projectAnnotationsBeforeInitialization,this.setInitialGlobals(),this.resolveStoreInitializationPromise()}async setInitialGlobals(){this.emitGlobals()}emitGlobals(){if(!this.storyStoreValue)throw new Y({methodName:"emitGlobals"});let Ws={globals:this.storyStoreValue.userGlobals.get()||{},globalTypes:this.storyStoreValue.projectAnnotations.globalTypes||{}};this.channel.emit(u$1,Ws)}async onGetProjectAnnotationsChanged({getProjectAnnotations:Ws}){delete this.previewEntryError,this.getProjectAnnotations=Ws;let ws=await this.getProjectAnnotationsOrRenderError();if(await this.runBeforeAllHook(ws),!this.storyStoreValue){await this.initializeWithProjectAnnotations(ws);return}this.storyStoreValue.setProjectAnnotations(ws),this.emitGlobals()}async onStoryIndexChanged(){if(delete this.previewEntryError,!(!this.storyStoreValue&&!this.projectAnnotationsBeforeInitialization))try{let Ws=await this.getStoryIndexFromServer();if(this.projectAnnotationsBeforeInitialization){this.initializeWithStoryIndex(Ws);return}await this.onStoriesChanged({storyIndex:Ws})}catch(Ws){throw this.renderPreviewEntryError("Error loading story index:",Ws),Ws}}async onStoriesChanged({importFn:Ws,storyIndex:ws}){if(!this.storyStoreValue)throw new Y({methodName:"onStoriesChanged"});await this.storyStoreValue.onStoriesChanged({importFn:Ws,storyIndex:ws})}async onUpdateGlobals({globals:Ws,currentStory:ws}){if(this.storyStoreValue||await this.storeInitializationPromise,!this.storyStoreValue)throw new Y({methodName:"onUpdateGlobals"});if(this.storyStoreValue.userGlobals.update(Ws),ws){let{initialGlobals:oi,storyGlobals:si,userGlobals:ii,globals:ai}=this.storyStoreValue.getStoryContext(ws);this.channel.emit(P$3,{initialGlobals:oi,userGlobals:ii,storyGlobals:si,globals:ai})}else{let{initialGlobals:oi,globals:si}=this.storyStoreValue.userGlobals;this.channel.emit(P$3,{initialGlobals:oi,userGlobals:si,storyGlobals:{},globals:si})}await Promise.all(this.storyRenders.map(oi=>oi.rerender()))}async onUpdateArgs({storyId:Ws,updatedArgs:ws}){if(!this.storyStoreValue)throw new Y({methodName:"onUpdateArgs"});this.storyStoreValue.args.update(Ws,ws),await Promise.all(this.storyRenders.filter(oi=>oi.id===Ws&&!oi.renderOptions.forceInitialArgs).map(oi=>oi.story&&oi.story.usesMount?oi.remount():oi.rerender())),this.channel.emit(f$2,{storyId:Ws,args:this.storyStoreValue.args.get(Ws)})}async onRequestArgTypesInfo({id:Ws,payload:ws}){var oi;try{await this.storeInitializationPromise;let si=await((oi=this.storyStoreValue)==null?void 0:oi.loadStory(ws));this.channel.emit(TE,{id:Ws,success:!0,payload:{argTypes:(si==null?void 0:si.argTypes)||{}},error:null})}catch(si){this.channel.emit(TE,{id:Ws,success:!1,error:si==null?void 0:si.message})}}async onResetArgs({storyId:Ws,argNames:ws}){var oi;if(!this.storyStoreValue)throw new Y({methodName:"onResetArgs"});let si=((oi=this.storyRenders.find(ai=>ai.id===Ws))==null?void 0:oi.story)||await this.storyStoreValue.loadStory({storyId:Ws}),ii=(ws||[...new Set([...Object.keys(si.initialArgs),...Object.keys(this.storyStoreValue.args.get(Ws))])]).reduce((ai,li)=>(ai[li]=si.initialArgs[li],ai),{});await this.onUpdateArgs({storyId:Ws,updatedArgs:ii})}async onForceReRender(){await Promise.all(this.storyRenders.map(Ws=>Ws.rerender()))}async onForceRemount({storyId:Ws}){await Promise.all(this.storyRenders.filter(ws=>ws.id===Ws).map(ws=>ws.remount()))}renderStoryToElement(Ws,ws,oi,si){if(!this.renderToCanvas||!this.storyStoreValue)throw new Y({methodName:"renderStoryToElement"});let ii=new ie$2(this.channel,this.storyStoreValue,this.renderToCanvas,oi,Ws.id,"docs",si,Ws);return ii.renderToElement(ws),this.storyRenders.push(ii),async()=>{await this.teardownRender(ii)}}async teardownRender(Ws,{viewModeChanged:ws}={}){var oi;this.storyRenders=this.storyRenders.filter(si=>si!==Ws),await((oi=Ws==null?void 0:Ws.teardown)==null?void 0:oi.call(Ws,{viewModeChanged:ws}))}async loadStory({storyId:Ws}){if(!this.storyStoreValue)throw new Y({methodName:"loadStory"});return this.storyStoreValue.loadStory({storyId:Ws})}getStoryContext(Ws,{forceInitialArgs:ws=!1}={}){if(!this.storyStoreValue)throw new Y({methodName:"getStoryContext"});return this.storyStoreValue.getStoryContext(Ws,{forceInitialArgs:ws})}async extract(Ws){if(!this.storyStoreValue)throw new Y({methodName:"extract"});if(this.previewEntryError)throw this.previewEntryError;return await this.storyStoreValue.cacheAllCSFFiles(),this.storyStoreValue.extract(Ws)}renderPreviewEntryError(Ws,ws){this.previewEntryError=ws,s$3.error(Ws),s$3.error(ws),this.channel.emit(N$2,ws)}};s$1($r,"Preview");var be=$r,Yr="Invariant failed";function Je(Ws,ws){if(!Ws){var oi=typeof ws=="function"?ws():ws,si=oi?"".concat(Yr,": ").concat(oi):Yr;throw new Error(si)}}s$1(Je,"invariant");var Kr=class{constructor(Ws,ws,oi,si){this.channel=Ws,this.store=ws,this.renderStoryToElement=oi,this.storyIdByName=s$1(ii=>{let ai=this.nameToStoryId.get(ii);if(ai)return ai;throw new Error(`No story found with that name: ${ii}`)},"storyIdByName"),this.componentStories=s$1(()=>this.componentStoriesValue,"componentStories"),this.componentStoriesFromCSFFile=s$1(ii=>this.store.componentStoriesFromCSFFile({csfFile:ii}),"componentStoriesFromCSFFile"),this.storyById=s$1(ii=>{if(!ii){if(!this.primaryStory)throw new Error("No primary story defined for docs entry. Did you forget to use `<Meta>`?");return this.primaryStory}let ai=this.storyIdToCSFFile.get(ii);if(!ai)throw new Error(`Called \`storyById\` for story that was never loaded: ${ii}`);return this.store.storyFromCSFFile({storyId:ii,csfFile:ai})},"storyById"),this.getStoryContext=s$1(ii=>({...this.store.getStoryContext(ii),loaded:{},viewMode:"docs"}),"getStoryContext"),this.loadStory=s$1(ii=>this.store.loadStory({storyId:ii}),"loadStory"),this.componentStoriesValue=[],this.storyIdToCSFFile=new Map,this.exportToStory=new Map,this.exportsToCSFFile=new Map,this.nameToStoryId=new Map,this.attachedCSFFiles=new Set,si.forEach((ii,ai)=>{this.referenceCSFFile(ii)})}referenceCSFFile(Ws){this.exportsToCSFFile.set(Ws.moduleExports,Ws),this.exportsToCSFFile.set(Ws.moduleExports.default,Ws),this.store.componentStoriesFromCSFFile({csfFile:Ws}).forEach(ws=>{let oi=Ws.stories[ws.id];this.storyIdToCSFFile.set(oi.id,Ws),this.exportToStory.set(oi.moduleExport,ws)})}attachCSFFile(Ws){if(!this.exportsToCSFFile.has(Ws.moduleExports))throw new Error("Cannot attach a CSF file that has not been referenced");this.attachedCSFFiles.has(Ws)||(this.attachedCSFFiles.add(Ws),this.store.componentStoriesFromCSFFile({csfFile:Ws}).forEach(ws=>{this.nameToStoryId.set(ws.name,ws.id),this.componentStoriesValue.push(ws),this.primaryStory||(this.primaryStory=ws)}))}referenceMeta(Ws,ws){let oi=this.resolveModuleExport(Ws);if(oi.type!=="meta")throw new Error("<Meta of={} /> must reference a CSF file module export or meta export. Did you mistakenly reference your component instead of your CSF file?");ws&&this.attachCSFFile(oi.csfFile)}get projectAnnotations(){let{projectAnnotations:Ws}=this.store;if(!Ws)throw new Error("Can't get projectAnnotations from DocsContext before they are initialized");return Ws}resolveAttachedModuleExportType(Ws){if(Ws==="story"){if(!this.primaryStory)throw new Error("No primary story attached to this docs file, did you forget to use <Meta of={} />?");return{type:"story",story:this.primaryStory}}if(this.attachedCSFFiles.size===0)throw new Error("No CSF file attached to this docs file, did you forget to use <Meta of={} />?");let ws=Array.from(this.attachedCSFFiles)[0];if(Ws==="meta")return{type:"meta",csfFile:ws};let{component:oi}=ws.meta;if(!oi)throw new Error("Attached CSF file does not defined a component, did you forget to export one?");return{type:"component",component:oi}}resolveModuleExport(Ws){let ws=this.exportsToCSFFile.get(Ws);if(ws)return{type:"meta",csfFile:ws};let oi=this.exportToStory.get(Ws);return oi?{type:"story",story:oi}:{type:"component",component:Ws}}resolveOf(Ws,ws=[]){let oi;if(["component","meta","story"].includes(Ws)){let si=Ws;oi=this.resolveAttachedModuleExportType(si)}else oi=this.resolveModuleExport(Ws);if(ws.length&&!ws.includes(oi.type)){let si=oi.type==="component"?"component or unknown":oi.type;throw new Error(F`Invalid value passed to the 'of' prop. The value was resolved to a '${si}' type but the only types for this block are: ${ws.join(", ")}.
|
|
224
|
+
`);await oi.evaluate(async ci=>{var ui,di,hi;let pi=await((ui=globalThis.__pwUnwrapObject)==null?void 0:ui.call(globalThis,ci));return(hi=(di="__pw_type"in pi?pi.type:pi)==null?void 0:di.load)==null?void 0:hi.call(di)},ii);let li=await ws(ii,...ai);return await oi.evaluate(async ci=>{var ui,di;let hi=await((ui=globalThis.__pwUnwrapObject)==null?void 0:ui.call(globalThis,ci)),pi="__pw_type"in hi?hi.type:hi,ha=document.querySelector("#root");return(di=pi==null?void 0:pi.play)==null?void 0:di.call(pi,{canvasElement:ha})},ii),li})},"mount")})}s$1(Ns,"createPlaywrightTest");async function qs(Ws,ws){var oi,si;for(let li of[...X].reverse())await li();if(X.length=0,!ws.canvasElement){let li=document.createElement("div");(si=(oi=globalThis==null?void 0:globalThis.document)==null?void 0:oi.body)==null||si.appendChild(li),ws.canvasElement=li,X.push(()=>{var ci,ui,di,hi;(ui=(ci=globalThis==null?void 0:globalThis.document)==null?void 0:ci.body)!=null&&ui.contains(li)&&((hi=(di=globalThis==null?void 0:globalThis.document)==null?void 0:di.body)==null||hi.removeChild(li))})}if(ws.loaded=await Ws.applyLoaders(ws),ws.abortSignal.aborted)return;X.push(...(await Ws.applyBeforeEach(ws)).filter(Boolean));let ii=Ws.playFunction,ai=Ws.usesMount;ai||await ws.mount(),!ws.abortSignal.aborted&&(ii&&(ai||(ws.mount=async()=>{throw new J$1({playFunction:ii.toString()})}),await ii(ws)),await Ws.applyAfterEach(ws))}s$1(qs,"runStory");function mo(Ws,ws){return wr(Er(Ws,ws),oi=>oi===void 0)}s$1(mo,"picky");var ho=1e3,Gs=1e4,Ur=class{constructor(Ws,ws,oi){this.importFn=ws,this.getStoriesJsonData=s$1(()=>{let ai=this.getSetStoriesPayload(),li=["fileName","docsOnly","framework","__id","__isArgsStory"];return{v:3,stories:q(ai.stories,ci=>{let{importPath:ui}=this.storyIndex.entries[ci.id];return{...mo(ci,["id","name","title"]),importPath:ui,kind:ci.title,story:ci.name,parameters:{...mo(ci.parameters,li),fileName:ui}}})}},"getStoriesJsonData"),this.storyIndex=new We(Ws),this.projectAnnotations=Oe(oi);let{initialGlobals:si,globalTypes:ii}=this.projectAnnotations;this.args=new Ve,this.userGlobals=new He({globals:si,globalTypes:ii}),this.hooks={},this.cleanupCallbacks={},this.processCSFFileWithCache=(0,Xe.default)(ho)(no),this.prepareMetaWithCache=(0,Xe.default)(ho)(qr),this.prepareStoryWithCache=(0,Xe.default)(Gs)(Fe)}setProjectAnnotations(Ws){this.projectAnnotations=Oe(Ws);let{initialGlobals:ws,globalTypes:oi}=Ws;this.userGlobals.set({globals:ws,globalTypes:oi})}async onStoriesChanged({importFn:Ws,storyIndex:ws}){Ws&&(this.importFn=Ws),ws&&(this.storyIndex.entries=ws.entries),this.cachedCSFFiles&&await this.cacheAllCSFFiles()}async storyIdToEntry(Ws){return this.storyIndex.storyIdToEntry(Ws)}async loadCSFFileByStoryId(Ws){let{importPath:ws,title:oi}=this.storyIndex.storyIdToEntry(Ws),si=await this.importFn(ws);return this.processCSFFileWithCache(si,ws,oi)}async loadAllCSFFiles(){let Ws={};return Object.entries(this.storyIndex.entries).forEach(([ws,{importPath:oi}])=>{Ws[oi]=ws}),(await Promise.all(Object.entries(Ws).map(async([ws,oi])=>({importPath:ws,csfFile:await this.loadCSFFileByStoryId(oi)})))).reduce((ws,{importPath:oi,csfFile:si})=>(ws[oi]=si,ws),{})}async cacheAllCSFFiles(){this.cachedCSFFiles=await this.loadAllCSFFiles()}preparedMetaFromCSFFile({csfFile:Ws}){let ws=Ws.meta;return this.prepareMetaWithCache(ws,this.projectAnnotations,Ws.moduleExports.default)}async loadStory({storyId:Ws}){let ws=await this.loadCSFFileByStoryId(Ws);return this.storyFromCSFFile({storyId:Ws,csfFile:ws})}storyFromCSFFile({storyId:Ws,csfFile:ws}){let oi=ws.stories[Ws];if(!oi)throw new X$1({storyId:Ws});let si=ws.meta,ii=this.prepareStoryWithCache(oi,si,this.projectAnnotations);return this.args.setInitial(ii),this.hooks[ii.id]=this.hooks[ii.id]||new te,ii}componentStoriesFromCSFFile({csfFile:Ws}){return Object.keys(this.storyIndex.entries).filter(ws=>!!Ws.stories[ws]).map(ws=>this.storyFromCSFFile({storyId:ws,csfFile:Ws}))}async loadEntry(Ws){let ws=await this.storyIdToEntry(Ws),oi=ws.type==="docs"?ws.storiesImports:[],[si,...ii]=await Promise.all([this.importFn(ws.importPath),...oi.map(ai=>{let li=this.storyIndex.importPathToEntry(ai);return this.loadCSFFileByStoryId(li.id)})]);return{entryExports:si,csfFiles:ii}}getStoryContext(Ws,{forceInitialArgs:ws=!1}={}){let oi=this.userGlobals.get(),{initialGlobals:si}=this.userGlobals,ii=new se;return Ye({...Ws,args:ws?Ws.initialArgs:this.args.get(Ws.id),initialGlobals:si,globalTypes:this.projectAnnotations.globalTypes,userGlobals:oi,reporting:ii,globals:{...oi,...Ws.storyGlobals},hooks:this.hooks[Ws.id]})}addCleanupCallbacks(Ws,ws){this.cleanupCallbacks[Ws.id]=ws}async cleanupStory(Ws){this.hooks[Ws.id].clean();let ws=this.cleanupCallbacks[Ws.id];if(ws)for(let oi of[...ws].reverse())await oi();delete this.cleanupCallbacks[Ws.id]}extract(Ws={includeDocsOnly:!1}){let{cachedCSFFiles:ws}=this;if(!ws)throw new L;return Object.entries(this.storyIndex.entries).reduce((oi,[si,{type:ii,importPath:ai}])=>{if(ii==="docs")return oi;let li=ws[ai],ci=this.storyFromCSFFile({storyId:si,csfFile:li});return!Ws.includeDocsOnly&&ci.parameters.docsOnly||(oi[si]=Object.entries(ci).reduce((ui,[di,hi])=>di==="moduleExport"||typeof hi=="function"?ui:Array.isArray(hi)?Object.assign(ui,{[di]:hi.slice().sort()}):Object.assign(ui,{[di]:hi}),{args:ci.initialArgs})),oi},{})}getSetStoriesPayload(){let Ws=this.extract({includeDocsOnly:!0}),ws=Object.values(Ws).reduce((oi,{title:si})=>(oi[si]={},oi),{});return{v:2,globals:this.userGlobals.get(),globalParameters:{},kindParameters:ws,stories:Ws}}raw(){return m$2("StoryStore.raw() is deprecated and will be removed in 9.0, please use extract() instead"),Object.values(this.extract()).map(({id:Ws})=>this.fromId(Ws)).filter(Boolean)}fromId(Ws){if(m$2("StoryStore.fromId() is deprecated and will be removed in 9.0, please use loadStory() instead"),!this.cachedCSFFiles)throw new Error("Cannot call fromId/raw() unless you call cacheAllCSFFiles() first.");let ws;try{({importPath:ws}=this.storyIndex.storyIdToEntry(Ws))}catch{return null}let oi=this.cachedCSFFiles[ws],si=this.storyFromCSFFile({storyId:Ws,csfFile:oi});return{...si,storyFn:s$1(ii=>{let ai={...this.getStoryContext(si),abortSignal:new AbortController().signal,canvasElement:null,loaded:{},step:s$1((li,ci)=>si.runStep(li,ci,ai),"step"),context:null,mount:null,canvas:{},viewMode:"story"};return si.unboundStoryFn({...ai,...ii})},"storyFn")}}};s$1(Ur,"StoryStore");var ge=Ur;function Hr(Ws){return Ws.startsWith("\\\\?\\")?Ws:Ws.replace(/\\/g,"/")}s$1(Hr,"slash");function go(Ws){return Ws.flatMap(ws=>ws.split("/")).filter(Boolean).join("/")}s$1(go,"pathJoin");var J$4=new Error("prepareAborted"),{AbortController:wo}=globalThis;function Eo(Ws){try{let{name:ws="Error",message:oi=String(Ws),stack:si}=Ws;return{name:ws,message:oi,stack:si}}catch{return{name:"Error",message:String(Ws)}}}s$1(Eo,"serializeError");var Wr=class{constructor(Ws,ws,oi,si,ii,ai,li={autoplay:!0,forceInitialArgs:!1},ci){this.channel=Ws,this.store=ws,this.renderToScreen=oi,this.callbacks=si,this.id=ii,this.viewMode=ai,this.renderOptions=li,this.type="story",this.notYetRendered=!0,this.rerenderEnqueued=!1,this.disableKeyListeners=!1,this.teardownRender=s$1(()=>{},"teardownRender"),this.torndown=!1,this.abortController=new wo,ci&&(this.story=ci,this.phase="preparing")}async runPhase(Ws,ws,oi){this.phase=ws,this.channel.emit(B$2,{newPhase:this.phase,storyId:this.id}),oi&&(await oi(),this.checkIfAborted(Ws))}checkIfAborted(Ws){return Ws.aborted?(this.phase="aborted",this.channel.emit(B$2,{newPhase:this.phase,storyId:this.id}),!0):!1}async prepare(){if(await this.runPhase(this.abortController.signal,"preparing",async()=>{this.story=await this.store.loadStory({storyId:this.id})}),this.abortController.signal.aborted)throw await this.store.cleanupStory(this.story),J$4}isEqual(Ws){return!!(this.id===Ws.id&&this.story&&this.story===Ws.story)}isPreparing(){return["preparing"].includes(this.phase)}isPending(){return["loading","beforeEach","rendering","playing","afterEach"].includes(this.phase)}async renderToElement(Ws){return this.canvasElement=Ws,this.render({initial:!0,forceRemount:!0})}storyContext(){if(!this.story)throw new Error("Cannot call storyContext before preparing");let{forceInitialArgs:Ws}=this.renderOptions;return this.store.getStoryContext(this.story,{forceInitialArgs:Ws})}async render({initial:Ws=!1,forceRemount:ws=!1}={}){var oi,si,ii,ai;let{canvasElement:li}=this;if(!this.story)throw new Error("cannot render when not prepared");let ci=this.story;if(!li)throw new Error("cannot render when canvasElement is unset");let{id:ui,componentId:di,title:hi,name:pi,tags:ha,applyLoaders:ga,applyBeforeEach:va,applyAfterEach:ba,unboundStoryFn:wa,playFunction:xa,runStep:Ca}=ci;ws&&!Ws&&(this.cancelRender(),this.abortController=new wo);let el=this.abortController.signal,ku=!1,gd=ci.usesMount;try{let Ed={...this.storyContext(),viewMode:this.viewMode,abortSignal:el,canvasElement:li,loaded:{},step:s$1((wd,Cd)=>Ca(wd,Cd,Ed),"step"),context:null,canvas:{},renderToCanvas:s$1(async()=>{let wd=await this.renderToScreen(Od,li);this.teardownRender=wd||(()=>{}),ku=!0},"renderToCanvas"),mount:s$1(async(...wd)=>{var Cd,sf;(sf=(Cd=this.callbacks).showStoryDuringRender)==null||sf.call(Cd);let of=null;return await this.runPhase(el,"rendering",async()=>{of=await ci.mount(Ed)(...wd)}),gd&&await this.runPhase(el,"playing"),of},"mount")};Ed.context=Ed;let Od={componentId:di,title:hi,kind:hi,id:ui,name:pi,story:pi,tags:ha,...this.callbacks,showError:s$1(wd=>(this.phase="errored",this.callbacks.showError(wd)),"showError"),showException:s$1(wd=>(this.phase="errored",this.callbacks.showException(wd)),"showException"),forceRemount:ws||this.notYetRendered,storyContext:Ed,storyFn:s$1(()=>wa(Ed),"storyFn"),unboundStoryFn:wa};if(await this.runPhase(el,"loading",async()=>{Ed.loaded=await ga(Ed)}),el.aborted)return;let Nd=await va(Ed);if(this.store.addCleanupCallbacks(ci,Nd),this.checkIfAborted(el)||(!ku&&!gd&&await Ed.mount(),this.notYetRendered=!1,el.aborted))return;let Pd=((si=(oi=this.story.parameters)==null?void 0:oi.test)==null?void 0:si.dangerouslyIgnoreUnhandledErrors)===!0,Ld=new Set,rf=s$1(wd=>Ld.add("error"in wd?wd.error:wd.reason),"onError");if(this.renderOptions.autoplay&&ws&&xa&&this.phase!=="errored"){window.addEventListener("error",rf),window.addEventListener("unhandledrejection",rf),this.disableKeyListeners=!0;try{if(gd?await xa(Ed):(Ed.mount=async()=>{throw new J$1({playFunction:xa.toString()})},await this.runPhase(el,"playing",async()=>xa(Ed))),!ku)throw new z$1;this.checkIfAborted(el),!Pd&&Ld.size>0?await this.runPhase(el,"errored"):await this.runPhase(el,"played")}catch(wd){if((ai=(ii=this.callbacks).showStoryDuringRender)==null||ai.call(ii),await this.runPhase(el,"errored",async()=>{this.channel.emit(a,Eo(wd))}),this.story.parameters.throwPlayFunctionExceptions!==!1)throw wd;console.error(wd)}if(!Pd&&Ld.size>0&&this.channel.emit(Y$1,Array.from(Ld).map(Eo)),this.disableKeyListeners=!1,window.removeEventListener("unhandledrejection",rf),window.removeEventListener("error",rf),el.aborted)return}await this.runPhase(el,"completed",async()=>this.channel.emit(X$2,ui)),this.phase!=="errored"&&await this.runPhase(el,"afterEach",async()=>{await ba(Ed)});let kd=!Pd&&Ld.size>0,Md=Ed.reporting.reports.some(wd=>wd.status==="failed"),Td=kd||Md;await this.runPhase(el,"finished",async()=>this.channel.emit(q$3,{storyId:ui,status:Td?"error":"success",reporters:Ed.reporting.reports}))}catch(Ed){this.phase="errored",this.callbacks.showException(Ed),await this.runPhase(el,"finished",async()=>this.channel.emit(q$3,{storyId:ui,status:"error",reporters:[]}))}this.rerenderEnqueued&&(this.rerenderEnqueued=!1,this.render())}async rerender(){if(this.isPending()&&this.phase!=="playing")this.rerenderEnqueued=!0;else return this.render()}async remount(){return await this.teardown(),this.render({forceRemount:!0})}cancelRender(){var Ws;(Ws=this.abortController)==null||Ws.abort()}async teardown(){this.torndown=!0,this.cancelRender(),this.story&&await this.store.cleanupStory(this.story);for(let Ws=0;Ws<3;Ws+=1){if(!this.isPending()){await this.teardownRender();return}await new Promise(ws=>setTimeout(ws,0))}window.location.reload(),await new Promise(()=>{})}};s$1(Wr,"StoryRender");var ie$2=Wr,{fetch:fi}=P,yi="./index.json",$r=class{constructor(Ws,ws,oi=G.getChannel(),si=!0){this.importFn=Ws,this.getProjectAnnotations=ws,this.channel=oi,this.storyRenders=[],this.storeInitializationPromise=new Promise((ii,ai)=>{this.resolveStoreInitializationPromise=ii,this.rejectStoreInitializationPromise=ai}),si&&this.initialize()}get storyStore(){return new Proxy({},{get:s$1((Ws,ws)=>{if(this.storyStoreValue)return m$2("Accessing the Story Store is deprecated and will be removed in 9.0"),this.storyStoreValue[ws];throw new U},"get")})}async initialize(){this.setupListeners();try{let Ws=await this.getProjectAnnotationsOrRenderError();await this.runBeforeAllHook(Ws),await this.initializeWithProjectAnnotations(Ws)}catch(Ws){this.rejectStoreInitializationPromise(Ws)}}ready(){return this.storeInitializationPromise}setupListeners(){this.channel.on(m$1,this.onStoryIndexChanged.bind(this)),this.channel.on(j$1,this.onUpdateGlobals.bind(this)),this.channel.on(z$3,this.onUpdateArgs.bind(this)),this.channel.on(SE,this.onRequestArgTypesInfo.bind(this)),this.channel.on(W$3,this.onResetArgs.bind(this)),this.channel.on(L$1,this.onForceReRender.bind(this)),this.channel.on(U$2,this.onForceRemount.bind(this))}async getProjectAnnotationsOrRenderError(){try{let Ws=await this.getProjectAnnotations();if(this.renderToCanvas=Ws.renderToCanvas,!this.renderToCanvas)throw new G$2;return Ws}catch(Ws){throw this.renderPreviewEntryError("Error reading preview.js:",Ws),Ws}}async initializeWithProjectAnnotations(Ws){this.projectAnnotationsBeforeInitialization=Ws;try{let ws=await this.getStoryIndexFromServer();return this.initializeWithStoryIndex(ws)}catch(ws){throw this.renderPreviewEntryError("Error loading story index:",ws),ws}}async runBeforeAllHook(Ws){var ws,oi;try{await((ws=this.beforeAllCleanup)==null?void 0:ws.call(this)),this.beforeAllCleanup=await((oi=Ws.beforeAll)==null?void 0:oi.call(Ws))}catch(si){throw this.renderPreviewEntryError("Error in beforeAll hook:",si),si}}async getStoryIndexFromServer(){let Ws=await fi(yi);if(Ws.status===200)return Ws.json();throw new M$1({text:await Ws.text()})}initializeWithStoryIndex(Ws){if(!this.projectAnnotationsBeforeInitialization)throw new Error("Cannot call initializeWithStoryIndex until project annotations resolve");this.storyStoreValue=new ge(Ws,this.importFn,this.projectAnnotationsBeforeInitialization),delete this.projectAnnotationsBeforeInitialization,this.setInitialGlobals(),this.resolveStoreInitializationPromise()}async setInitialGlobals(){this.emitGlobals()}emitGlobals(){if(!this.storyStoreValue)throw new Y({methodName:"emitGlobals"});let Ws={globals:this.storyStoreValue.userGlobals.get()||{},globalTypes:this.storyStoreValue.projectAnnotations.globalTypes||{}};this.channel.emit(u$1,Ws)}async onGetProjectAnnotationsChanged({getProjectAnnotations:Ws}){delete this.previewEntryError,this.getProjectAnnotations=Ws;let ws=await this.getProjectAnnotationsOrRenderError();if(await this.runBeforeAllHook(ws),!this.storyStoreValue){await this.initializeWithProjectAnnotations(ws);return}this.storyStoreValue.setProjectAnnotations(ws),this.emitGlobals()}async onStoryIndexChanged(){if(delete this.previewEntryError,!(!this.storyStoreValue&&!this.projectAnnotationsBeforeInitialization))try{let Ws=await this.getStoryIndexFromServer();if(this.projectAnnotationsBeforeInitialization){this.initializeWithStoryIndex(Ws);return}await this.onStoriesChanged({storyIndex:Ws})}catch(Ws){throw this.renderPreviewEntryError("Error loading story index:",Ws),Ws}}async onStoriesChanged({importFn:Ws,storyIndex:ws}){if(!this.storyStoreValue)throw new Y({methodName:"onStoriesChanged"});await this.storyStoreValue.onStoriesChanged({importFn:Ws,storyIndex:ws})}async onUpdateGlobals({globals:Ws,currentStory:ws}){if(this.storyStoreValue||await this.storeInitializationPromise,!this.storyStoreValue)throw new Y({methodName:"onUpdateGlobals"});if(this.storyStoreValue.userGlobals.update(Ws),ws){let{initialGlobals:oi,storyGlobals:si,userGlobals:ii,globals:ai}=this.storyStoreValue.getStoryContext(ws);this.channel.emit(P$3,{initialGlobals:oi,userGlobals:ii,storyGlobals:si,globals:ai})}else{let{initialGlobals:oi,globals:si}=this.storyStoreValue.userGlobals;this.channel.emit(P$3,{initialGlobals:oi,userGlobals:si,storyGlobals:{},globals:si})}await Promise.all(this.storyRenders.map(oi=>oi.rerender()))}async onUpdateArgs({storyId:Ws,updatedArgs:ws}){if(!this.storyStoreValue)throw new Y({methodName:"onUpdateArgs"});this.storyStoreValue.args.update(Ws,ws),await Promise.all(this.storyRenders.filter(oi=>oi.id===Ws&&!oi.renderOptions.forceInitialArgs).map(oi=>oi.story&&oi.story.usesMount?oi.remount():oi.rerender())),this.channel.emit(f$2,{storyId:Ws,args:this.storyStoreValue.args.get(Ws)})}async onRequestArgTypesInfo({id:Ws,payload:ws}){var oi;try{await this.storeInitializationPromise;let si=await((oi=this.storyStoreValue)==null?void 0:oi.loadStory(ws));this.channel.emit(TE,{id:Ws,success:!0,payload:{argTypes:(si==null?void 0:si.argTypes)||{}},error:null})}catch(si){this.channel.emit(TE,{id:Ws,success:!1,error:si==null?void 0:si.message})}}async onResetArgs({storyId:Ws,argNames:ws}){var oi;if(!this.storyStoreValue)throw new Y({methodName:"onResetArgs"});let si=((oi=this.storyRenders.find(ai=>ai.id===Ws))==null?void 0:oi.story)||await this.storyStoreValue.loadStory({storyId:Ws}),ii=(ws||[...new Set([...Object.keys(si.initialArgs),...Object.keys(this.storyStoreValue.args.get(Ws))])]).reduce((ai,li)=>(ai[li]=si.initialArgs[li],ai),{});await this.onUpdateArgs({storyId:Ws,updatedArgs:ii})}async onForceReRender(){await Promise.all(this.storyRenders.map(Ws=>Ws.rerender()))}async onForceRemount({storyId:Ws}){await Promise.all(this.storyRenders.filter(ws=>ws.id===Ws).map(ws=>ws.remount()))}renderStoryToElement(Ws,ws,oi,si){if(!this.renderToCanvas||!this.storyStoreValue)throw new Y({methodName:"renderStoryToElement"});let ii=new ie$2(this.channel,this.storyStoreValue,this.renderToCanvas,oi,Ws.id,"docs",si,Ws);return ii.renderToElement(ws),this.storyRenders.push(ii),async()=>{await this.teardownRender(ii)}}async teardownRender(Ws,{viewModeChanged:ws}={}){var oi;this.storyRenders=this.storyRenders.filter(si=>si!==Ws),await((oi=Ws==null?void 0:Ws.teardown)==null?void 0:oi.call(Ws,{viewModeChanged:ws}))}async loadStory({storyId:Ws}){if(!this.storyStoreValue)throw new Y({methodName:"loadStory"});return this.storyStoreValue.loadStory({storyId:Ws})}getStoryContext(Ws,{forceInitialArgs:ws=!1}={}){if(!this.storyStoreValue)throw new Y({methodName:"getStoryContext"});return this.storyStoreValue.getStoryContext(Ws,{forceInitialArgs:ws})}async extract(Ws){if(!this.storyStoreValue)throw new Y({methodName:"extract"});if(this.previewEntryError)throw this.previewEntryError;return await this.storyStoreValue.cacheAllCSFFiles(),this.storyStoreValue.extract(Ws)}renderPreviewEntryError(Ws,ws){this.previewEntryError=ws,s$3.error(Ws),s$3.error(ws),this.channel.emit(N$2,ws)}};s$1($r,"Preview");var be=$r,Yr="Invariant failed";function Je(Ws,ws){if(!Ws){var oi=typeof ws=="function"?ws():ws,si=oi?"".concat(Yr,": ").concat(oi):Yr;throw new Error(si)}}s$1(Je,"invariant");var Kr=class{constructor(Ws,ws,oi,si){this.channel=Ws,this.store=ws,this.renderStoryToElement=oi,this.storyIdByName=s$1(ii=>{let ai=this.nameToStoryId.get(ii);if(ai)return ai;throw new Error(`No story found with that name: ${ii}`)},"storyIdByName"),this.componentStories=s$1(()=>this.componentStoriesValue,"componentStories"),this.componentStoriesFromCSFFile=s$1(ii=>this.store.componentStoriesFromCSFFile({csfFile:ii}),"componentStoriesFromCSFFile"),this.storyById=s$1(ii=>{if(!ii){if(!this.primaryStory)throw new Error("No primary story defined for docs entry. Did you forget to use `<Meta>`?");return this.primaryStory}let ai=this.storyIdToCSFFile.get(ii);if(!ai)throw new Error(`Called \`storyById\` for story that was never loaded: ${ii}`);return this.store.storyFromCSFFile({storyId:ii,csfFile:ai})},"storyById"),this.getStoryContext=s$1(ii=>({...this.store.getStoryContext(ii),loaded:{},viewMode:"docs"}),"getStoryContext"),this.loadStory=s$1(ii=>this.store.loadStory({storyId:ii}),"loadStory"),this.componentStoriesValue=[],this.storyIdToCSFFile=new Map,this.exportToStory=new Map,this.exportsToCSFFile=new Map,this.nameToStoryId=new Map,this.attachedCSFFiles=new Set,si.forEach((ii,ai)=>{this.referenceCSFFile(ii)})}referenceCSFFile(Ws){this.exportsToCSFFile.set(Ws.moduleExports,Ws),this.exportsToCSFFile.set(Ws.moduleExports.default,Ws),this.store.componentStoriesFromCSFFile({csfFile:Ws}).forEach(ws=>{let oi=Ws.stories[ws.id];this.storyIdToCSFFile.set(oi.id,Ws),this.exportToStory.set(oi.moduleExport,ws)})}attachCSFFile(Ws){if(!this.exportsToCSFFile.has(Ws.moduleExports))throw new Error("Cannot attach a CSF file that has not been referenced");this.attachedCSFFiles.has(Ws)||(this.attachedCSFFiles.add(Ws),this.store.componentStoriesFromCSFFile({csfFile:Ws}).forEach(ws=>{this.nameToStoryId.set(ws.name,ws.id),this.componentStoriesValue.push(ws),this.primaryStory||(this.primaryStory=ws)}))}referenceMeta(Ws,ws){let oi=this.resolveModuleExport(Ws);if(oi.type!=="meta")throw new Error("<Meta of={} /> must reference a CSF file module export or meta export. Did you mistakenly reference your component instead of your CSF file?");ws&&this.attachCSFFile(oi.csfFile)}get projectAnnotations(){let{projectAnnotations:Ws}=this.store;if(!Ws)throw new Error("Can't get projectAnnotations from DocsContext before they are initialized");return Ws}resolveAttachedModuleExportType(Ws){if(Ws==="story"){if(!this.primaryStory)throw new Error("No primary story attached to this docs file, did you forget to use <Meta of={} />?");return{type:"story",story:this.primaryStory}}if(this.attachedCSFFiles.size===0)throw new Error("No CSF file attached to this docs file, did you forget to use <Meta of={} />?");let ws=Array.from(this.attachedCSFFiles)[0];if(Ws==="meta")return{type:"meta",csfFile:ws};let{component:oi}=ws.meta;if(!oi)throw new Error("Attached CSF file does not defined a component, did you forget to export one?");return{type:"component",component:oi}}resolveModuleExport(Ws){let ws=this.exportsToCSFFile.get(Ws);if(ws)return{type:"meta",csfFile:ws};let oi=this.exportToStory.get(Ws);return oi?{type:"story",story:oi}:{type:"component",component:Ws}}resolveOf(Ws,ws=[]){let oi;if(["component","meta","story"].includes(Ws)){let si=Ws;oi=this.resolveAttachedModuleExportType(si)}else oi=this.resolveModuleExport(Ws);if(ws.length&&!ws.includes(oi.type)){let si=oi.type==="component"?"component or unknown":oi.type;throw new Error(F`Invalid value passed to the 'of' prop. The value was resolved to a '${si}' type but the only types for this block are: ${ws.join(", ")}.
|
|
225
225
|
- Did you pass a component to the 'of' prop when the block only supports a story or a meta?
|
|
226
226
|
- ... or vice versa?
|
|
227
227
|
- Did you pass a story, CSF file or meta to the 'of' prop that is not indexed, ie. is not targeted by the 'stories' globs in the main configuration?`)}switch(oi.type){case"component":return{...oi,projectAnnotations:this.projectAnnotations};case"meta":return{...oi,preparedMeta:this.store.preparedMetaFromCSFFile({csfFile:oi.csfFile})};case"story":default:return oi}}};s$1(Kr,"DocsContext");var Q=Kr,Xr=class{constructor(Ws,ws,oi,si){this.channel=Ws,this.store=ws,this.entry=oi,this.callbacks=si,this.type="docs",this.subtype="csf",this.torndown=!1,this.disableKeyListeners=!1,this.preparing=!1,this.id=oi.id}isPreparing(){return this.preparing}async prepare(){this.preparing=!0;let{entryExports:Ws,csfFiles:ws=[]}=await this.store.loadEntry(this.id);if(this.torndown)throw J$4;let{importPath:oi,title:si}=this.entry,ii=this.store.processCSFFileWithCache(Ws,oi,si),ai=Object.keys(ii.stories)[0];this.story=this.store.storyFromCSFFile({storyId:ai,csfFile:ii}),this.csfFiles=[ii,...ws],this.preparing=!1}isEqual(Ws){return!!(this.id===Ws.id&&this.story&&this.story===Ws.story)}docsContext(Ws){if(!this.csfFiles)throw new Error("Cannot render docs before preparing");let ws=new Q(this.channel,this.store,Ws,this.csfFiles);return this.csfFiles.forEach(oi=>ws.attachCSFFile(oi)),ws}async renderToElement(Ws,ws){if(!this.story||!this.csfFiles)throw new Error("Cannot render docs before preparing");let oi=this.docsContext(ws),{docs:si}=this.story.parameters||{};if(!si)throw new Error("Cannot render a story in viewMode=docs if `@storybook/addon-docs` is not installed");let ii=await si.renderer(),{render:ai}=ii,li=s$1(async()=>{try{await ai(oi,si,Ws),this.channel.emit(I$2,this.id)}catch(ci){this.callbacks.showException(ci)}},"renderDocs");return this.rerender=async()=>li(),this.teardownRender=async({viewModeChanged:ci})=>{!ci||!Ws||ii.unmount(Ws)},li()}async teardown({viewModeChanged:Ws}={}){var ws;(ws=this.teardownRender)==null||ws.call(this,{viewModeChanged:Ws}),this.torndown=!0}};s$1(Xr,"CsfDocsRender");var je=Xr,Jr=class{constructor(Ws,ws,oi,si){this.channel=Ws,this.store=ws,this.entry=oi,this.callbacks=si,this.type="docs",this.subtype="mdx",this.torndown=!1,this.disableKeyListeners=!1,this.preparing=!1,this.id=oi.id}isPreparing(){return this.preparing}async prepare(){this.preparing=!0;let{entryExports:Ws,csfFiles:ws=[]}=await this.store.loadEntry(this.id);if(this.torndown)throw J$4;this.csfFiles=ws,this.exports=Ws,this.preparing=!1}isEqual(Ws){return!!(this.id===Ws.id&&this.exports&&this.exports===Ws.exports)}docsContext(Ws){if(!this.csfFiles)throw new Error("Cannot render docs before preparing");return new Q(this.channel,this.store,Ws,this.csfFiles)}async renderToElement(Ws,ws){if(!this.exports||!this.csfFiles||!this.store.projectAnnotations)throw new Error("Cannot render docs before preparing");let oi=this.docsContext(ws),{docs:si}=this.store.projectAnnotations.parameters||{};if(!si)throw new Error("Cannot render a story in viewMode=docs if `@storybook/addon-docs` is not installed");let ii={...si,page:this.exports.default},ai=await si.renderer(),{render:li}=ai,ci=s$1(async()=>{try{await li(oi,ii,Ws),this.channel.emit(I$2,this.id)}catch(ui){this.callbacks.showException(ui)}},"renderDocs");return this.rerender=async()=>ci(),this.teardownRender=async({viewModeChanged:ui}={})=>{!ui||!Ws||(ai.unmount(Ws),this.torndown=!0)},ci()}async teardown({viewModeChanged:Ws}={}){var ws;(ws=this.teardownRender)==null||ws.call(this,{viewModeChanged:Ws}),this.torndown=!0}};s$1(Jr,"MdxDocsRender");var Me=Jr,Di=globalThis;function ki(Ws){let ws=Ws.composedPath&&Ws.composedPath()[0]||Ws.target;return/input|textarea/i.test(ws.tagName)||ws.getAttribute("contenteditable")!==null}s$1(ki,"focusInInput");var Do="attached-mdx",ji="unattached-mdx";function Mi({tags:Ws}){return(Ws==null?void 0:Ws.includes(ji))||(Ws==null?void 0:Ws.includes(Do))}s$1(Mi,"isMdxEntry");function Zr(Ws){return Ws.type==="story"}s$1(Zr,"isStoryRender");function _i(Ws){return Ws.type==="docs"}s$1(_i,"isDocsRender");function Li(Ws){return _i(Ws)&&Ws.subtype==="csf"}s$1(Li,"isCsfDocsRender");var et=class extends be{constructor(Ws,ws,oi,si){super(Ws,ws,void 0,!1),this.importFn=Ws,this.getProjectAnnotations=ws,this.selectionStore=oi,this.view=si,this.initialize()}setupListeners(){super.setupListeners(),Di.onkeydown=this.onKeydown.bind(this),this.channel.on(M$3,this.onSetCurrentStory.bind(this)),this.channel.on(k$4,this.onUpdateQueryParams.bind(this)),this.channel.on(t$4,this.onPreloadStories.bind(this))}async setInitialGlobals(){if(!this.storyStoreValue)throw new Y({methodName:"setInitialGlobals"});let{globals:Ws}=this.selectionStore.selectionSpecifier||{};Ws&&this.storyStoreValue.userGlobals.updateFromPersisted(Ws),this.emitGlobals()}async initializeWithStoryIndex(Ws){return await super.initializeWithStoryIndex(Ws),this.selectSpecifiedStory()}async selectSpecifiedStory(){if(!this.storyStoreValue)throw new Y({methodName:"selectSpecifiedStory"});if(this.selectionStore.selection){await this.renderSelection();return}if(!this.selectionStore.selectionSpecifier){this.renderMissingStory();return}let{storySpecifier:Ws,args:ws}=this.selectionStore.selectionSpecifier,oi=this.storyStoreValue.storyIndex.entryFromSpecifier(Ws);if(!oi){Ws==="*"?this.renderStoryLoadingException(Ws,new F$2):this.renderStoryLoadingException(Ws,new K$1({storySpecifier:Ws.toString()}));return}let{id:si,type:ii}=oi;this.selectionStore.setSelection({storyId:si,viewMode:ii}),this.channel.emit(b$2,this.selectionStore.selection),this.channel.emit(r$2,this.selectionStore.selection),await this.renderSelection({persistedArgs:ws})}async onGetProjectAnnotationsChanged({getProjectAnnotations:Ws}){await super.onGetProjectAnnotationsChanged({getProjectAnnotations:Ws}),this.selectionStore.selection&&this.renderSelection()}async onStoriesChanged({importFn:Ws,storyIndex:ws}){await super.onStoriesChanged({importFn:Ws,storyIndex:ws}),this.selectionStore.selection?await this.renderSelection():await this.selectSpecifiedStory()}onKeydown(Ws){if(!this.storyRenders.find(ws=>ws.disableKeyListeners)&&!ki(Ws)){let{altKey:ws,ctrlKey:oi,metaKey:si,shiftKey:ii,key:ai,code:li,keyCode:ci}=Ws;this.channel.emit(H$2,{event:{altKey:ws,ctrlKey:oi,metaKey:si,shiftKey:ii,key:ai,code:li,keyCode:ci}})}}async onSetCurrentStory(Ws){this.selectionStore.setSelection({viewMode:"story",...Ws}),await this.storeInitializationPromise,this.channel.emit(r$2,this.selectionStore.selection),this.renderSelection()}onUpdateQueryParams(Ws){this.selectionStore.setQueryParams(Ws)}async onUpdateGlobals({globals:Ws}){var ws,oi;let si=this.currentRender instanceof ie$2&&this.currentRender.story||void 0;super.onUpdateGlobals({globals:Ws,currentStory:si}),(this.currentRender instanceof Me||this.currentRender instanceof je)&&await((oi=(ws=this.currentRender).rerender)==null?void 0:oi.call(ws))}async onUpdateArgs({storyId:Ws,updatedArgs:ws}){super.onUpdateArgs({storyId:Ws,updatedArgs:ws})}async onPreloadStories({ids:Ws}){await this.storeInitializationPromise,this.storyStoreValue&&await Promise.allSettled(Ws.map(ws=>{var oi;return(oi=this.storyStoreValue)==null?void 0:oi.loadEntry(ws)}))}async renderSelection({persistedArgs:Ws}={}){var ws,oi,si,ii;let{renderToCanvas:ai}=this;if(!this.storyStoreValue||!ai)throw new Y({methodName:"renderSelection"});let{selection:li}=this.selectionStore;if(!li)throw new Error("Cannot call renderSelection as no selection was made");let{storyId:ci}=li,ui;try{ui=await this.storyStoreValue.storyIdToEntry(ci)}catch(ba){this.currentRender&&await this.teardownRender(this.currentRender),this.renderStoryLoadingException(ci,ba);return}let di=((ws=this.currentSelection)==null?void 0:ws.storyId)!==ci,hi=((oi=this.currentRender)==null?void 0:oi.type)!==ui.type;ui.type==="story"?this.view.showPreparingStory({immediate:hi}):this.view.showPreparingDocs({immediate:hi}),(si=this.currentRender)!=null&&si.isPreparing()&&await this.teardownRender(this.currentRender);let pi;ui.type==="story"?pi=new ie$2(this.channel,this.storyStoreValue,ai,this.mainStoryCallbacks(ci),ci,"story"):Mi(ui)?pi=new Me(this.channel,this.storyStoreValue,ui,this.mainStoryCallbacks(ci)):pi=new je(this.channel,this.storyStoreValue,ui,this.mainStoryCallbacks(ci));let ha=this.currentSelection;this.currentSelection=li;let ga=this.currentRender;this.currentRender=pi;try{await pi.prepare()}catch(ba){ga&&await this.teardownRender(ga),ba!==J$4&&this.renderStoryLoadingException(ci,ba);return}let va=!di&&ga&&!pi.isEqual(ga);if(Ws&&Zr(pi)&&(Je(!!pi.story),this.storyStoreValue.args.updateFromPersisted(pi.story,Ws)),ga&&!ga.torndown&&!di&&!va&&!hi){this.currentRender=ga,this.channel.emit(n$1,ci),this.view.showMain();return}if(ga&&await this.teardownRender(ga,{viewModeChanged:hi}),ha&&(di||hi)&&this.channel.emit(Q$1,ci),Zr(pi)){Je(!!pi.story);let{parameters:ba,initialArgs:wa,argTypes:xa,unmappedArgs:Ca,initialGlobals:el,userGlobals:ku,storyGlobals:gd,globals:Ed}=this.storyStoreValue.getStoryContext(pi.story);this.channel.emit(w$2,{id:ci,parameters:ba,initialArgs:wa,argTypes:xa,args:Ca}),this.channel.emit(P$3,{userGlobals:ku,storyGlobals:gd,globals:Ed,initialGlobals:el})}else{let{parameters:ba}=this.storyStoreValue.projectAnnotations,{initialGlobals:wa,globals:xa}=this.storyStoreValue.userGlobals;if(this.channel.emit(P$3,{globals:xa,initialGlobals:wa,storyGlobals:{},userGlobals:xa}),Li(pi)||((ii=pi.entry.tags)==null?void 0:ii.includes(Do))){if(!pi.csfFiles)throw new H({storyId:ci});({parameters:ba}=this.storyStoreValue.preparedMetaFromCSFFile({csfFile:pi.csfFiles[0]}))}this.channel.emit(D$3,{id:ci,parameters:ba})}Zr(pi)?(Je(!!pi.story),this.storyRenders.push(pi),this.currentRender.renderToElement(this.view.prepareForStory(pi.story))):this.currentRender.renderToElement(this.view.prepareForDocs(),this.renderStoryToElement.bind(this))}async teardownRender(Ws,{viewModeChanged:ws=!1}={}){var oi;this.storyRenders=this.storyRenders.filter(si=>si!==Ws),await((oi=Ws==null?void 0:Ws.teardown)==null?void 0:oi.call(Ws,{viewModeChanged:ws}))}mainStoryCallbacks(Ws){return{showStoryDuringRender:s$1(()=>this.view.showStoryDuringRender(),"showStoryDuringRender"),showMain:s$1(()=>this.view.showMain(),"showMain"),showError:s$1(ws=>this.renderError(Ws,ws),"showError"),showException:s$1(ws=>this.renderException(Ws,ws),"showException")}}renderPreviewEntryError(Ws,ws){super.renderPreviewEntryError(Ws,ws),this.view.showErrorDisplay(ws)}renderMissingStory(){this.view.showNoPreview(),this.channel.emit(V$1)}renderStoryLoadingException(Ws,ws){s$3.error(ws),this.view.showErrorDisplay(ws),this.channel.emit(V$1,Ws)}renderException(Ws,ws){let{name:oi="Error",message:si=String(ws),stack:ii}=ws;this.channel.emit(K$2,{name:oi,message:si,stack:ii}),this.channel.emit(B$2,{newPhase:"errored",storyId:Ws}),this.view.showErrorDisplay(ws),s$3.error(`Error rendering story '${Ws}':`),s$3.error(ws)}renderError(Ws,{title:ws,description:oi}){s$3.error(`Error rendering story ${ws}: ${oi}`),this.channel.emit(x$3,{title:ws,description:oi}),this.channel.emit(B$2,{newPhase:"errored",storyId:Ws}),this.view.showErrorDisplay({message:ws,stack:oi})}};s$1(et,"PreviewWithSelection");var Se=et,Le=ue(or()),Ho=ue(or()),Uo=/^[a-zA-Z0-9 _-]*$/,Wo=/^-?[0-9]+(\.[0-9]+)?$/,da=/^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i,$o=/^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,at=s$1((Ws="",ws)=>Ws===null||Ws===""||!Uo.test(Ws)?!1:ws==null||ws instanceof Date||typeof ws=="number"||typeof ws=="boolean"?!0:typeof ws=="string"?Uo.test(ws)||Wo.test(ws)||da.test(ws)||$o.test(ws):Array.isArray(ws)?ws.every(oi=>at(Ws,oi)):j(ws)?Object.entries(ws).every(([oi,si])=>at(oi,si)):!1,"validateArgs"),pa={delimiter:";",nesting:!0,arrayRepeat:!0,arrayRepeatSyntax:"bracket",nestingSyntax:"js",valueDeserializer(Ws){if(Ws.startsWith("!")){if(Ws==="!undefined")return;if(Ws==="!null")return null;if(Ws==="!true")return!0;if(Ws==="!false")return!1;if(Ws.startsWith("!date(")&&Ws.endsWith(")"))return new Date(Ws.replaceAll(" ","+").slice(6,-1));if(Ws.startsWith("!hex(")&&Ws.endsWith(")"))return`#${Ws.slice(5,-1)}`;let ws=Ws.slice(1).match($o);if(ws)return Ws.startsWith("!rgba")||Ws.startsWith("!RGBA")?`${ws[1]}(${ws[2]}, ${ws[3]}, ${ws[4]}, ${ws[5]})`:Ws.startsWith("!hsla")||Ws.startsWith("!HSLA")?`${ws[1]}(${ws[2]}, ${ws[3]}%, ${ws[4]}%, ${ws[5]})`:Ws.startsWith("!rgb")||Ws.startsWith("!RGB")?`${ws[1]}(${ws[2]}, ${ws[3]}, ${ws[4]})`:`${ws[1]}(${ws[2]}, ${ws[3]}%, ${ws[4]}%)`}return Wo.test(Ws)?Number(Ws):Ws}},lt=s$1(Ws=>{let ws=Ws.split(";").map(oi=>oi.replace("=","~").replace(":","="));return Object.entries((0,Ho.parse)(ws.join(";"),pa)).reduce((oi,[si,ii])=>at(si,ii)?Object.assign(oi,{[si]:ii}):(n$2.warn(F`
|
|
@@ -289,7 +289,7 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
|
|
|
289
289
|
|
|
290
290
|
`))}function assertValidSDLExtension(Ws,ws){const oi=validateSDL(Ws,ws);if(oi.length!==0)throw new Error(oi.map(si=>si.message).join(`
|
|
291
291
|
|
|
292
|
-
`))}function toError(Ws){return Ws instanceof Error?Ws:new NonErrorThrown(Ws)}class NonErrorThrown extends Error{constructor(ws){super("Unexpected error value: "+inspect(ws)),this.name="NonErrorThrown",this.thrownValue=ws}}function locatedError(Ws,ws,oi){var si;const ii=toError(Ws);return isLocatedGraphQLError(ii)?ii:new GraphQLError(ii.message,{nodes:(si=ii.nodes)!==null&&si!==void 0?si:ws,source:ii.source,positions:ii.positions,path:oi,originalError:ii})}function isLocatedGraphQLError(Ws){return Array.isArray(Ws.path)}function NoDeprecatedCustomRule(Ws){return{Field(ws){const oi=Ws.getFieldDef(),si=oi==null?void 0:oi.deprecationReason;if(oi&&si!=null){const ii=Ws.getParentType();ii!=null||invariant$1(),Ws.reportError(new GraphQLError(`The field ${ii.name}.${oi.name} is deprecated. ${si}`,{nodes:ws}))}},Argument(ws){const oi=Ws.getArgument(),si=oi==null?void 0:oi.deprecationReason;if(oi&&si!=null){const ii=Ws.getDirective();if(ii!=null)Ws.reportError(new GraphQLError(`Directive "@${ii.name}" argument "${oi.name}" is deprecated. ${si}`,{nodes:ws}));else{const ai=Ws.getParentType(),li=Ws.getFieldDef();ai!=null&&li!=null||invariant$1(),Ws.reportError(new GraphQLError(`Field "${ai.name}.${li.name}" argument "${oi.name}" is deprecated. ${si}`,{nodes:ws}))}}},ObjectField(ws){const oi=getNamedType(Ws.getParentInputType());if(isInputObjectType(oi)){const si=oi.getFields()[ws.name.value],ii=si==null?void 0:si.deprecationReason;ii!=null&&Ws.reportError(new GraphQLError(`The input field ${oi.name}.${si.name} is deprecated. ${ii}`,{nodes:ws}))}},EnumValue(ws){const oi=Ws.getEnumValue(),si=oi==null?void 0:oi.deprecationReason;if(oi&&si!=null){const ii=getNamedType(Ws.getInputType());ii!=null||invariant$1(),Ws.reportError(new GraphQLError(`The enum value "${ii.name}.${oi.name}" is deprecated. ${si}`,{nodes:ws}))}}}}function extendSchema(Ws,ws,oi){assertSchema(Ws),ws!=null&&ws.kind===Kind.DOCUMENT||devAssert(!1,"Must provide valid Document AST."),assertValidSDLExtension(ws,Ws);const si=Ws.toConfig(),ii=extendSchemaImpl(si,ws,oi);return si===ii?Ws:new GraphQLSchema(ii)}function extendSchemaImpl(Ws,ws,oi){var si,ii,ai,li;const ci=[],ui=Object.create(null),di=[];let hi;const pi=[];for(const xd of ws.definitions)if(xd.kind===Kind.SCHEMA_DEFINITION)hi=xd;else if(xd.kind===Kind.SCHEMA_EXTENSION)pi.push(xd);else if(isTypeDefinitionNode(xd))ci.push(xd);else if(isTypeExtensionNode(xd)){const Fd=xd.name.value,Vd=ui[Fd];ui[Fd]=Vd?Vd.concat([xd]):[xd]}else xd.kind===Kind.DIRECTIVE_DEFINITION&&di.push(xd);if(Object.keys(ui).length===0&&ci.length===0&&di.length===0&&pi.length===0&&hi==null)return Ws;const ha=Object.create(null);for(const xd of Ws.types)ha[xd.name]=Ca(xd);for(const xd of ci){var ga;const Fd=xd.name.value;ha[Fd]=(ga=stdTypeMap[Fd])!==null&&ga!==void 0?ga:hf(xd)}const va={query:Ws.query&&wa(Ws.query),mutation:Ws.mutation&&wa(Ws.mutation),subscription:Ws.subscription&&wa(Ws.subscription),...hi&&rf([hi]),...rf(pi)};return{description:(si=hi)===null||si===void 0||(ii=si.description)===null||ii===void 0?void 0:ii.value,...va,types:Object.values(ha),directives:[...Ws.directives.map(xa),...di.map(Td)],extensions:Object.create(null),astNode:(ai=hi)!==null&&ai!==void 0?ai:Ws.astNode,extensionASTNodes:Ws.extensionASTNodes.concat(pi),assumeValid:(li=oi==null?void 0:oi.assumeValid)!==null&&li!==void 0?li:!1};function ba(xd){return isListType(xd)?new GraphQLList(ba(xd.ofType)):isNonNullType(xd)?new GraphQLNonNull(ba(xd.ofType)):wa(xd)}function wa(xd){return ha[xd.name]}function xa(xd){const Fd=xd.toConfig();return new GraphQLDirective({...Fd,args:mapValue(Fd.args,Ld)})}function Ca(xd){if(isIntrospectionType(xd)||isSpecifiedScalarType(xd))return xd;if(isScalarType(xd))return gd(xd);if(isObjectType(xd))return Ed(xd);if(isInterfaceType(xd))return Od(xd);if(isUnionType(xd))return Nd(xd);if(isEnumType(xd))return ku(xd);if(isInputObjectType(xd))return el(xd);invariant$1(!1,"Unexpected type: "+inspect(xd))}function el(xd){var Fd;const Vd=xd.toConfig(),af=(Fd=ui[Vd.name])!==null&&Fd!==void 0?Fd:[];return new GraphQLInputObjectType({...Vd,fields:()=>({...mapValue(Vd.fields,ff=>({...ff,type:ba(ff.type)})),...sf(af)}),extensionASTNodes:Vd.extensionASTNodes.concat(af)})}function ku(xd){var Fd;const Vd=xd.toConfig(),af=(Fd=ui[xd.name])!==null&&Fd!==void 0?Fd:[];return new GraphQLEnumType({...Vd,values:{...Vd.values,...of(af)},extensionASTNodes:Vd.extensionASTNodes.concat(af)})}function gd(xd){var Fd;const Vd=xd.toConfig(),af=(Fd=ui[Vd.name])!==null&&Fd!==void 0?Fd:[];let ff=Vd.specifiedByURL;for(const mf of af){var uf;ff=(uf=getSpecifiedByURL(mf))!==null&&uf!==void 0?uf:ff}return new GraphQLScalarType({...Vd,specifiedByURL:ff,extensionASTNodes:Vd.extensionASTNodes.concat(af)})}function Ed(xd){var Fd;const Vd=xd.toConfig(),af=(Fd=ui[Vd.name])!==null&&Fd!==void 0?Fd:[];return new GraphQLObjectType({...Vd,interfaces:()=>[...xd.getInterfaces().map(wa),...Wd(af)],fields:()=>({...mapValue(Vd.fields,Pd),...wd(af)}),extensionASTNodes:Vd.extensionASTNodes.concat(af)})}function Od(xd){var Fd;const Vd=xd.toConfig(),af=(Fd=ui[Vd.name])!==null&&Fd!==void 0?Fd:[];return new GraphQLInterfaceType({...Vd,interfaces:()=>[...xd.getInterfaces().map(wa),...Wd(af)],fields:()=>({...mapValue(Vd.fields,Pd),...wd(af)}),extensionASTNodes:Vd.extensionASTNodes.concat(af)})}function Nd(xd){var Fd;const Vd=xd.toConfig(),af=(Fd=ui[Vd.name])!==null&&Fd!==void 0?Fd:[];return new GraphQLUnionType({...Vd,types:()=>[...xd.getTypes().map(wa),...df(af)],extensionASTNodes:Vd.extensionASTNodes.concat(af)})}function Pd(xd){return{...xd,type:ba(xd.type),args:xd.args&&mapValue(xd.args,Ld)}}function Ld(xd){return{...xd,type:ba(xd.type)}}function rf(xd){const Fd={};for(const af of xd){var Vd;const ff=(Vd=af.operationTypes)!==null&&Vd!==void 0?Vd:[];for(const uf of ff)Fd[uf.operation]=_d(uf.type)}return Fd}function _d(xd){var Fd;const Vd=xd.name.value,af=(Fd=stdTypeMap[Vd])!==null&&Fd!==void 0?Fd:ha[Vd];if(af===void 0)throw new Error(`Unknown type: "${Vd}".`);return af}function Md(xd){return xd.kind===Kind.LIST_TYPE?new GraphQLList(Md(xd.type)):xd.kind===Kind.NON_NULL_TYPE?new GraphQLNonNull(Md(xd.type)):_d(xd)}function Td(xd){var Fd;return new GraphQLDirective({name:xd.name.value,description:(Fd=xd.description)===null||Fd===void 0?void 0:Fd.value,locations:xd.locations.map(({value:Vd})=>Vd),isRepeatable:xd.repeatable,args:Cd(xd.arguments),astNode:xd})}function wd(xd){const Fd=Object.create(null);for(const ff of xd){var Vd;const uf=(Vd=ff.fields)!==null&&Vd!==void 0?Vd:[];for(const mf of uf){var af;Fd[mf.name.value]={type:Md(mf.type),description:(af=mf.description)===null||af===void 0?void 0:af.value,args:Cd(mf.arguments),deprecationReason:getDeprecationReason(mf),astNode:mf}}}return Fd}function Cd(xd){const Fd=xd??[],Vd=Object.create(null);for(const ff of Fd){var af;const uf=Md(ff.type);Vd[ff.name.value]={type:uf,description:(af=ff.description)===null||af===void 0?void 0:af.value,defaultValue:valueFromAST(ff.defaultValue,uf),deprecationReason:getDeprecationReason(ff),astNode:ff}}return Vd}function sf(xd){const Fd=Object.create(null);for(const ff of xd){var Vd;const uf=(Vd=ff.fields)!==null&&Vd!==void 0?Vd:[];for(const mf of uf){var af;const yf=Md(mf.type);Fd[mf.name.value]={type:yf,description:(af=mf.description)===null||af===void 0?void 0:af.value,defaultValue:valueFromAST(mf.defaultValue,yf),deprecationReason:getDeprecationReason(mf),astNode:mf}}}return Fd}function of(xd){const Fd=Object.create(null);for(const ff of xd){var Vd;const uf=(Vd=ff.values)!==null&&Vd!==void 0?Vd:[];for(const mf of uf){var af;Fd[mf.name.value]={description:(af=mf.description)===null||af===void 0?void 0:af.value,deprecationReason:getDeprecationReason(mf),astNode:mf}}}return Fd}function Wd(xd){return xd.flatMap(Fd=>{var Vd,af;return(Vd=(af=Fd.interfaces)===null||af===void 0?void 0:af.map(_d))!==null&&Vd!==void 0?Vd:[]})}function df(xd){return xd.flatMap(Fd=>{var Vd,af;return(Vd=(af=Fd.types)===null||af===void 0?void 0:af.map(_d))!==null&&Vd!==void 0?Vd:[]})}function hf(xd){var Fd;const Vd=xd.name.value,af=(Fd=ui[Vd])!==null&&Fd!==void 0?Fd:[];switch(xd.kind){case Kind.OBJECT_TYPE_DEFINITION:{var ff;const wf=[xd,...af];return new GraphQLObjectType({name:Vd,description:(ff=xd.description)===null||ff===void 0?void 0:ff.value,interfaces:()=>Wd(wf),fields:()=>wd(wf),astNode:xd,extensionASTNodes:af})}case Kind.INTERFACE_TYPE_DEFINITION:{var uf;const wf=[xd,...af];return new GraphQLInterfaceType({name:Vd,description:(uf=xd.description)===null||uf===void 0?void 0:uf.value,interfaces:()=>Wd(wf),fields:()=>wd(wf),astNode:xd,extensionASTNodes:af})}case Kind.ENUM_TYPE_DEFINITION:{var mf;const wf=[xd,...af];return new GraphQLEnumType({name:Vd,description:(mf=xd.description)===null||mf===void 0?void 0:mf.value,values:of(wf),astNode:xd,extensionASTNodes:af})}case Kind.UNION_TYPE_DEFINITION:{var yf;const wf=[xd,...af];return new GraphQLUnionType({name:Vd,description:(yf=xd.description)===null||yf===void 0?void 0:yf.value,types:()=>df(wf),astNode:xd,extensionASTNodes:af})}case Kind.SCALAR_TYPE_DEFINITION:{var Sf;return new GraphQLScalarType({name:Vd,description:(Sf=xd.description)===null||Sf===void 0?void 0:Sf.value,specifiedByURL:getSpecifiedByURL(xd),astNode:xd,extensionASTNodes:af})}case Kind.INPUT_OBJECT_TYPE_DEFINITION:{var Of;const wf=[xd,...af];return new GraphQLInputObjectType({name:Vd,description:(Of=xd.description)===null||Of===void 0?void 0:Of.value,fields:()=>sf(wf),astNode:xd,extensionASTNodes:af,isOneOf:isOneOf(xd)})}}}}const stdTypeMap=keyMap([...specifiedScalarTypes,...introspectionTypes],Ws=>Ws.name);function getDeprecationReason(Ws){const ws=getDirectiveValues(GraphQLDeprecatedDirective,Ws);return ws==null?void 0:ws.reason}function getSpecifiedByURL(Ws){const ws=getDirectiveValues(GraphQLSpecifiedByDirective,Ws);return ws==null?void 0:ws.url}function isOneOf(Ws){return!!getDirectiveValues(GraphQLOneOfDirective,Ws)}function buildASTSchema(Ws,ws){Ws!=null&&Ws.kind===Kind.DOCUMENT||devAssert(!1,"Must provide valid Document AST."),(ws==null?void 0:ws.assumeValid)!==!0&&(ws==null?void 0:ws.assumeValidSDL)!==!0&&assertValidSDL(Ws);const oi=extendSchemaImpl({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},Ws,ws);if(oi.astNode==null)for(const ii of oi.types)switch(ii.name){case"Query":oi.query=ii;break;case"Mutation":oi.mutation=ii;break;case"Subscription":oi.subscription=ii;break}const si=[...oi.directives,...specifiedDirectives.filter(ii=>oi.directives.every(ai=>ai.name!==ii.name))];return new GraphQLSchema({...oi,directives:si})}function buildSchema(Ws,ws){const oi=parse(Ws,{noLocation:void 0,allowLegacyFragmentVariables:void 0});return buildASTSchema(oi,{assumeValidSDL:void 0,assumeValid:void 0})}function printSchema(Ws){return printFilteredSchema(Ws,ws=>!isSpecifiedDirective(ws),isDefinedType)}function isDefinedType(Ws){return!isSpecifiedScalarType(Ws)&&!isIntrospectionType(Ws)}function printFilteredSchema(Ws,ws,oi){const si=Ws.getDirectives().filter(ws),ii=Object.values(Ws.getTypeMap()).filter(oi);return[printSchemaDefinition(Ws),...si.map(ai=>printDirective(ai)),...ii.map(ai=>printType(ai))].filter(Boolean).join(`
|
|
292
|
+
`))}function toError(Ws){return Ws instanceof Error?Ws:new NonErrorThrown(Ws)}class NonErrorThrown extends Error{constructor(ws){super("Unexpected error value: "+inspect(ws)),this.name="NonErrorThrown",this.thrownValue=ws}}function locatedError(Ws,ws,oi){var si;const ii=toError(Ws);return isLocatedGraphQLError(ii)?ii:new GraphQLError(ii.message,{nodes:(si=ii.nodes)!==null&&si!==void 0?si:ws,source:ii.source,positions:ii.positions,path:oi,originalError:ii})}function isLocatedGraphQLError(Ws){return Array.isArray(Ws.path)}function NoDeprecatedCustomRule(Ws){return{Field(ws){const oi=Ws.getFieldDef(),si=oi==null?void 0:oi.deprecationReason;if(oi&&si!=null){const ii=Ws.getParentType();ii!=null||invariant$1(),Ws.reportError(new GraphQLError(`The field ${ii.name}.${oi.name} is deprecated. ${si}`,{nodes:ws}))}},Argument(ws){const oi=Ws.getArgument(),si=oi==null?void 0:oi.deprecationReason;if(oi&&si!=null){const ii=Ws.getDirective();if(ii!=null)Ws.reportError(new GraphQLError(`Directive "@${ii.name}" argument "${oi.name}" is deprecated. ${si}`,{nodes:ws}));else{const ai=Ws.getParentType(),li=Ws.getFieldDef();ai!=null&&li!=null||invariant$1(),Ws.reportError(new GraphQLError(`Field "${ai.name}.${li.name}" argument "${oi.name}" is deprecated. ${si}`,{nodes:ws}))}}},ObjectField(ws){const oi=getNamedType(Ws.getParentInputType());if(isInputObjectType(oi)){const si=oi.getFields()[ws.name.value],ii=si==null?void 0:si.deprecationReason;ii!=null&&Ws.reportError(new GraphQLError(`The input field ${oi.name}.${si.name} is deprecated. ${ii}`,{nodes:ws}))}},EnumValue(ws){const oi=Ws.getEnumValue(),si=oi==null?void 0:oi.deprecationReason;if(oi&&si!=null){const ii=getNamedType(Ws.getInputType());ii!=null||invariant$1(),Ws.reportError(new GraphQLError(`The enum value "${ii.name}.${oi.name}" is deprecated. ${si}`,{nodes:ws}))}}}}function extendSchema(Ws,ws,oi){assertSchema(Ws),ws!=null&&ws.kind===Kind.DOCUMENT||devAssert(!1,"Must provide valid Document AST."),assertValidSDLExtension(ws,Ws);const si=Ws.toConfig(),ii=extendSchemaImpl(si,ws,oi);return si===ii?Ws:new GraphQLSchema(ii)}function extendSchemaImpl(Ws,ws,oi){var si,ii,ai,li;const ci=[],ui=Object.create(null),di=[];let hi;const pi=[];for(const xd of ws.definitions)if(xd.kind===Kind.SCHEMA_DEFINITION)hi=xd;else if(xd.kind===Kind.SCHEMA_EXTENSION)pi.push(xd);else if(isTypeDefinitionNode(xd))ci.push(xd);else if(isTypeExtensionNode(xd)){const Fd=xd.name.value,Vd=ui[Fd];ui[Fd]=Vd?Vd.concat([xd]):[xd]}else xd.kind===Kind.DIRECTIVE_DEFINITION&&di.push(xd);if(Object.keys(ui).length===0&&ci.length===0&&di.length===0&&pi.length===0&&hi==null)return Ws;const ha=Object.create(null);for(const xd of Ws.types)ha[xd.name]=Ca(xd);for(const xd of ci){var ga;const Fd=xd.name.value;ha[Fd]=(ga=stdTypeMap[Fd])!==null&&ga!==void 0?ga:hf(xd)}const va={query:Ws.query&&wa(Ws.query),mutation:Ws.mutation&&wa(Ws.mutation),subscription:Ws.subscription&&wa(Ws.subscription),...hi&&rf([hi]),...rf(pi)};return{description:(si=hi)===null||si===void 0||(ii=si.description)===null||ii===void 0?void 0:ii.value,...va,types:Object.values(ha),directives:[...Ws.directives.map(xa),...di.map(Td)],extensions:Object.create(null),astNode:(ai=hi)!==null&&ai!==void 0?ai:Ws.astNode,extensionASTNodes:Ws.extensionASTNodes.concat(pi),assumeValid:(li=oi==null?void 0:oi.assumeValid)!==null&&li!==void 0?li:!1};function ba(xd){return isListType(xd)?new GraphQLList(ba(xd.ofType)):isNonNullType(xd)?new GraphQLNonNull(ba(xd.ofType)):wa(xd)}function wa(xd){return ha[xd.name]}function xa(xd){const Fd=xd.toConfig();return new GraphQLDirective({...Fd,args:mapValue(Fd.args,Ld)})}function Ca(xd){if(isIntrospectionType(xd)||isSpecifiedScalarType(xd))return xd;if(isScalarType(xd))return gd(xd);if(isObjectType(xd))return Ed(xd);if(isInterfaceType(xd))return Od(xd);if(isUnionType(xd))return Nd(xd);if(isEnumType(xd))return ku(xd);if(isInputObjectType(xd))return el(xd);invariant$1(!1,"Unexpected type: "+inspect(xd))}function el(xd){var Fd;const Vd=xd.toConfig(),af=(Fd=ui[Vd.name])!==null&&Fd!==void 0?Fd:[];return new GraphQLInputObjectType({...Vd,fields:()=>({...mapValue(Vd.fields,ff=>({...ff,type:ba(ff.type)})),...sf(af)}),extensionASTNodes:Vd.extensionASTNodes.concat(af)})}function ku(xd){var Fd;const Vd=xd.toConfig(),af=(Fd=ui[xd.name])!==null&&Fd!==void 0?Fd:[];return new GraphQLEnumType({...Vd,values:{...Vd.values,...of(af)},extensionASTNodes:Vd.extensionASTNodes.concat(af)})}function gd(xd){var Fd;const Vd=xd.toConfig(),af=(Fd=ui[Vd.name])!==null&&Fd!==void 0?Fd:[];let ff=Vd.specifiedByURL;for(const mf of af){var uf;ff=(uf=getSpecifiedByURL(mf))!==null&&uf!==void 0?uf:ff}return new GraphQLScalarType({...Vd,specifiedByURL:ff,extensionASTNodes:Vd.extensionASTNodes.concat(af)})}function Ed(xd){var Fd;const Vd=xd.toConfig(),af=(Fd=ui[Vd.name])!==null&&Fd!==void 0?Fd:[];return new GraphQLObjectType({...Vd,interfaces:()=>[...xd.getInterfaces().map(wa),...Wd(af)],fields:()=>({...mapValue(Vd.fields,Pd),...wd(af)}),extensionASTNodes:Vd.extensionASTNodes.concat(af)})}function Od(xd){var Fd;const Vd=xd.toConfig(),af=(Fd=ui[Vd.name])!==null&&Fd!==void 0?Fd:[];return new GraphQLInterfaceType({...Vd,interfaces:()=>[...xd.getInterfaces().map(wa),...Wd(af)],fields:()=>({...mapValue(Vd.fields,Pd),...wd(af)}),extensionASTNodes:Vd.extensionASTNodes.concat(af)})}function Nd(xd){var Fd;const Vd=xd.toConfig(),af=(Fd=ui[Vd.name])!==null&&Fd!==void 0?Fd:[];return new GraphQLUnionType({...Vd,types:()=>[...xd.getTypes().map(wa),...df(af)],extensionASTNodes:Vd.extensionASTNodes.concat(af)})}function Pd(xd){return{...xd,type:ba(xd.type),args:xd.args&&mapValue(xd.args,Ld)}}function Ld(xd){return{...xd,type:ba(xd.type)}}function rf(xd){const Fd={};for(const af of xd){var Vd;const ff=(Vd=af.operationTypes)!==null&&Vd!==void 0?Vd:[];for(const uf of ff)Fd[uf.operation]=kd(uf.type)}return Fd}function kd(xd){var Fd;const Vd=xd.name.value,af=(Fd=stdTypeMap[Vd])!==null&&Fd!==void 0?Fd:ha[Vd];if(af===void 0)throw new Error(`Unknown type: "${Vd}".`);return af}function Md(xd){return xd.kind===Kind.LIST_TYPE?new GraphQLList(Md(xd.type)):xd.kind===Kind.NON_NULL_TYPE?new GraphQLNonNull(Md(xd.type)):kd(xd)}function Td(xd){var Fd;return new GraphQLDirective({name:xd.name.value,description:(Fd=xd.description)===null||Fd===void 0?void 0:Fd.value,locations:xd.locations.map(({value:Vd})=>Vd),isRepeatable:xd.repeatable,args:Cd(xd.arguments),astNode:xd})}function wd(xd){const Fd=Object.create(null);for(const ff of xd){var Vd;const uf=(Vd=ff.fields)!==null&&Vd!==void 0?Vd:[];for(const mf of uf){var af;Fd[mf.name.value]={type:Md(mf.type),description:(af=mf.description)===null||af===void 0?void 0:af.value,args:Cd(mf.arguments),deprecationReason:getDeprecationReason(mf),astNode:mf}}}return Fd}function Cd(xd){const Fd=xd??[],Vd=Object.create(null);for(const ff of Fd){var af;const uf=Md(ff.type);Vd[ff.name.value]={type:uf,description:(af=ff.description)===null||af===void 0?void 0:af.value,defaultValue:valueFromAST(ff.defaultValue,uf),deprecationReason:getDeprecationReason(ff),astNode:ff}}return Vd}function sf(xd){const Fd=Object.create(null);for(const ff of xd){var Vd;const uf=(Vd=ff.fields)!==null&&Vd!==void 0?Vd:[];for(const mf of uf){var af;const yf=Md(mf.type);Fd[mf.name.value]={type:yf,description:(af=mf.description)===null||af===void 0?void 0:af.value,defaultValue:valueFromAST(mf.defaultValue,yf),deprecationReason:getDeprecationReason(mf),astNode:mf}}}return Fd}function of(xd){const Fd=Object.create(null);for(const ff of xd){var Vd;const uf=(Vd=ff.values)!==null&&Vd!==void 0?Vd:[];for(const mf of uf){var af;Fd[mf.name.value]={description:(af=mf.description)===null||af===void 0?void 0:af.value,deprecationReason:getDeprecationReason(mf),astNode:mf}}}return Fd}function Wd(xd){return xd.flatMap(Fd=>{var Vd,af;return(Vd=(af=Fd.interfaces)===null||af===void 0?void 0:af.map(kd))!==null&&Vd!==void 0?Vd:[]})}function df(xd){return xd.flatMap(Fd=>{var Vd,af;return(Vd=(af=Fd.types)===null||af===void 0?void 0:af.map(kd))!==null&&Vd!==void 0?Vd:[]})}function hf(xd){var Fd;const Vd=xd.name.value,af=(Fd=ui[Vd])!==null&&Fd!==void 0?Fd:[];switch(xd.kind){case Kind.OBJECT_TYPE_DEFINITION:{var ff;const wf=[xd,...af];return new GraphQLObjectType({name:Vd,description:(ff=xd.description)===null||ff===void 0?void 0:ff.value,interfaces:()=>Wd(wf),fields:()=>wd(wf),astNode:xd,extensionASTNodes:af})}case Kind.INTERFACE_TYPE_DEFINITION:{var uf;const wf=[xd,...af];return new GraphQLInterfaceType({name:Vd,description:(uf=xd.description)===null||uf===void 0?void 0:uf.value,interfaces:()=>Wd(wf),fields:()=>wd(wf),astNode:xd,extensionASTNodes:af})}case Kind.ENUM_TYPE_DEFINITION:{var mf;const wf=[xd,...af];return new GraphQLEnumType({name:Vd,description:(mf=xd.description)===null||mf===void 0?void 0:mf.value,values:of(wf),astNode:xd,extensionASTNodes:af})}case Kind.UNION_TYPE_DEFINITION:{var yf;const wf=[xd,...af];return new GraphQLUnionType({name:Vd,description:(yf=xd.description)===null||yf===void 0?void 0:yf.value,types:()=>df(wf),astNode:xd,extensionASTNodes:af})}case Kind.SCALAR_TYPE_DEFINITION:{var Sf;return new GraphQLScalarType({name:Vd,description:(Sf=xd.description)===null||Sf===void 0?void 0:Sf.value,specifiedByURL:getSpecifiedByURL(xd),astNode:xd,extensionASTNodes:af})}case Kind.INPUT_OBJECT_TYPE_DEFINITION:{var Of;const wf=[xd,...af];return new GraphQLInputObjectType({name:Vd,description:(Of=xd.description)===null||Of===void 0?void 0:Of.value,fields:()=>sf(wf),astNode:xd,extensionASTNodes:af,isOneOf:isOneOf(xd)})}}}}const stdTypeMap=keyMap([...specifiedScalarTypes,...introspectionTypes],Ws=>Ws.name);function getDeprecationReason(Ws){const ws=getDirectiveValues(GraphQLDeprecatedDirective,Ws);return ws==null?void 0:ws.reason}function getSpecifiedByURL(Ws){const ws=getDirectiveValues(GraphQLSpecifiedByDirective,Ws);return ws==null?void 0:ws.url}function isOneOf(Ws){return!!getDirectiveValues(GraphQLOneOfDirective,Ws)}function buildASTSchema(Ws,ws){Ws!=null&&Ws.kind===Kind.DOCUMENT||devAssert(!1,"Must provide valid Document AST."),(ws==null?void 0:ws.assumeValid)!==!0&&(ws==null?void 0:ws.assumeValidSDL)!==!0&&assertValidSDL(Ws);const oi=extendSchemaImpl({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},Ws,ws);if(oi.astNode==null)for(const ii of oi.types)switch(ii.name){case"Query":oi.query=ii;break;case"Mutation":oi.mutation=ii;break;case"Subscription":oi.subscription=ii;break}const si=[...oi.directives,...specifiedDirectives.filter(ii=>oi.directives.every(ai=>ai.name!==ii.name))];return new GraphQLSchema({...oi,directives:si})}function buildSchema(Ws,ws){const oi=parse(Ws,{noLocation:void 0,allowLegacyFragmentVariables:void 0});return buildASTSchema(oi,{assumeValidSDL:void 0,assumeValid:void 0})}function printSchema(Ws){return printFilteredSchema(Ws,ws=>!isSpecifiedDirective(ws),isDefinedType)}function isDefinedType(Ws){return!isSpecifiedScalarType(Ws)&&!isIntrospectionType(Ws)}function printFilteredSchema(Ws,ws,oi){const si=Ws.getDirectives().filter(ws),ii=Object.values(Ws.getTypeMap()).filter(oi);return[printSchemaDefinition(Ws),...si.map(ai=>printDirective(ai)),...ii.map(ai=>printType(ai))].filter(Boolean).join(`
|
|
293
293
|
|
|
294
294
|
`)}function printSchemaDefinition(Ws){if(Ws.description==null&&isSchemaOfCommonNames(Ws))return;const ws=[],oi=Ws.getQueryType();oi&&ws.push(` query: ${oi.name}`);const si=Ws.getMutationType();si&&ws.push(` mutation: ${si.name}`);const ii=Ws.getSubscriptionType();return ii&&ws.push(` subscription: ${ii.name}`),printDescription(Ws)+`schema {
|
|
295
295
|
${ws.join(`
|
|
@@ -303,13 +303,13 @@ ${ws.join(`
|
|
|
303
303
|
`+ws+")"}function printInputValue(Ws){const ws=astFromValue(Ws.defaultValue,Ws.type);let oi=Ws.name+": "+String(Ws.type);return ws&&(oi+=` = ${print(ws)}`),oi+printDeprecated(Ws.deprecationReason)}function printDirective(Ws){return printDescription(Ws)+"directive @"+Ws.name+printArgs(Ws.args)+(Ws.isRepeatable?" repeatable":"")+" on "+Ws.locations.join(" | ")}function printDeprecated(Ws){return Ws==null?"":Ws!==DEFAULT_DEPRECATION_REASON?` @deprecated(reason: ${print({kind:Kind.STRING,value:Ws})})`:" @deprecated"}function printSpecifiedByURL(Ws){return Ws.specifiedByURL==null?"":` @specifiedBy(url: ${print({kind:Kind.STRING,value:Ws.specifiedByURL})})`}function printDescription(Ws,ws="",oi=!0){const{description:si}=Ws;if(si==null)return"";const ii=print({kind:Kind.STRING,value:si,block:isPrintableAsBlockString(si)});return(ws&&!oi?`
|
|
304
304
|
`+ws:ws)+ii.replace(/\n/g,`
|
|
305
305
|
`+ws)+`
|
|
306
|
-
`}function makeStateObject(Ws,ws){const oi=makeStateObjectName(Ws,ws),si={kind:Kind.OBJECT_TYPE_DEFINITION,name:{kind:Kind.NAME,value:oi},fields:[{description:{kind:Kind.STRING,value:`Add your ${ws} state fields here`,block:!1},kind:Kind.FIELD_DEFINITION,name:{kind:Kind.NAME,value:"_placeholder"},type:{kind:Kind.NAMED_TYPE,name:{kind:Kind.NAME,value:"String"}}}]};return print(si)}function makeEmptyInputObject(Ws){const ws={kind:Kind.INPUT_OBJECT_TYPE_DEFINITION,name:{kind:Kind.NAME,value:Ws},fields:[{description:{kind:Kind.STRING,value:"Add your inputs here",block:!1},kind:Kind.INPUT_VALUE_DEFINITION,name:{kind:Kind.NAME,value:"_placeholder"},type:{kind:Kind.NAMED_TYPE,name:{kind:Kind.NAME,value:"String"}}}]};return print(ws)}function makeOperationInputName(Ws){return`${pascalCase(Ws)}Input`}function makeStateObjectName(Ws,ws){return`${pascalCase(Ws)}${ws==="local"?"Local":""}State`}function makeOperationInitialDoc(Ws){const ws=makeOperationInputName(Ws);return makeEmptyInputObject(ws)}function makeInitialSchemaDoc(Ws,ws){return makeStateObject(Ws,ws)}function isValidScalarValue(Ws,ws){if(Ws in customScalars){const oi=customScalars[Ws];if(oi instanceof GraphQLScalarType)return oi.parseValue(ws)!==void 0}switch(Ws){case"Int":return Number.isInteger(ws);case"Float":return typeof ws=="number";case"Boolean":return typeof ws=="boolean";case"DateTime":return typeof ws=="string"&&!isNaN(Date.parse(ws));case"ID":case"String":default:return typeof ws=="string"}}function getMinimalValue(Ws,ws,oi){const si=getNullableType(Ws);if(isScalarType(si)){const ii=si.name;if(oi!==void 0&&isValidScalarValue(ii,oi))return oi;switch(ii){case"Int":case"Float":return 0;case"Boolean":return!1;case"DateTime":return new Date().toISOString();case"ID":case"String":default:return""}}if(isEnumType(si)){const ii=si.getValues().map(ai=>ai.value);return oi!==void 0&&ii.includes(oi)?oi:ii[0]||null}if(isListType(si))return oi!==void 0&&Array.isArray(oi)?oi:[];if(isObjectType(si)){const ii={},ai=si.getFields(),li=oi;for(const ci in ai){const ui=ai[ci],di=li?li[ci]:void 0;ii[ci]=getMinimalValue(ui.type,ws,di)}return ii}return null}function makeMinimalObjectFromSDL(Ws,ws,oi){const si=buildASTSchema(parse(Ws)),ii=parse(ws),ai=[];if(ii.definitions.forEach(hi=>{(hi.kind===Kind.OBJECT_TYPE_DEFINITION||hi.kind===Kind.OBJECT_TYPE_EXTENSION)&&ai.push(hi.name.value)}),ai.length===0)throw new Error("No object type definition found in SDL.");const li=ai[0];let ci=si.getType(li),ui=si;if((!ci||!isObjectType(ci))&&(ui=extendSchema(si,ii),ci=ui.getType(li)),!ci||!isObjectType(ci))throw new Error(`Type "${li}" is not a valid ObjectType.`);const di=getMinimalValue(ci,ui,oi);return JSON.stringify(di,null,2)}function removeWhitespace(Ws){return Ws.replace(/\s+|\\n|\\t/g,"").toLowerCase()}function compareStringsWithoutWhitespace(Ws,ws){return removeWhitespace(Ws)===removeWhitespace(ws)}function renameSchemaType(Ws,ws,oi,si){const ii=si==="global"?"State":"LocalState",ai=`${pascalCase(ws)}${ii}`,li=`${pascalCase(oi)}${ii}`,ci=parse(Ws),ui=visit(ci,{ObjectTypeDefinition:di=>{if(di.name.value===ai)return{...di,name:{...di.name,value:li}}}});return print(ui)}function initializeModelSchema(Ws){const{modelName:ws,setStateSchema:oi}=Ws,si=makeInitialSchemaDoc(ws,"global");oi(si,"global")}function updateModelSchemaNames(Ws){const{oldName:ws,newName:oi,globalStateSchema:si,localStateSchema:ii,setStateSchema:ai}=Ws,li=renameSchemaType(si,ws,oi,"global");if(ai(li,"global"),ii){const ci=renameSchemaType(ii,ws,oi,"local");ai(ci,"local")}}function handleModelNameChange(Ws){const{oldName:ws,newName:oi,globalStateSchema:si,setStateSchema:ii}=Ws;if(!si){initializeModelSchema({modelName:oi,setStateSchema:ii});return}updateModelSchemaNames(Ws)}const labelVariants=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Label=React.forwardRef(({className:Ws,...ws},oi)=>jsx(Root,{ref:oi,className:cn(labelVariants(),Ws),...ws}));Label.displayName=Root.displayName;var validator$1={exports:{}},toDate={exports:{}},assertString={exports:{}},hasRequiredAssertString;function requireAssertString(){return hasRequiredAssertString||(hasRequiredAssertString=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=si;function oi(ii){"@babel/helpers - typeof";return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ai){return typeof ai}:function(ai){return ai&&typeof Symbol=="function"&&ai.constructor===Symbol&&ai!==Symbol.prototype?"symbol":typeof ai},oi(ii)}function si(ii){var ai=typeof ii=="string"||ii instanceof String;if(!ai){var li=oi(ii);throw ii===null?li="null":li==="object"&&(li=ii.constructor.name),new TypeError("Expected a string but received a ".concat(li))}}Ws.exports=ws.default,Ws.exports.default=ws.default}(assertString,assertString.exports)),assertString.exports}var hasRequiredToDate;function requireToDate(){return hasRequiredToDate||(hasRequiredToDate=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){return(0,oi.default)(ai),ai=Date.parse(ai),isNaN(ai)?null:new Date(ai)}Ws.exports=ws.default,Ws.exports.default=ws.default}(toDate,toDate.exports)),toDate.exports}var toFloat={exports:{}},isFloat={},alpha={},hasRequiredAlpha;function requireAlpha(){if(hasRequiredAlpha)return alpha;hasRequiredAlpha=1,Object.defineProperty(alpha,"__esModule",{value:!0}),alpha.farsiLocales=alpha.englishLocales=alpha.dotDecimal=alpha.decimal=alpha.commaDecimal=alpha.bengaliLocales=alpha.arabicLocales=alpha.alphanumeric=alpha.alpha=void 0;for(var Ws=alpha.alpha={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[А-Я]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"el-GR":/^[Α-ώ]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fa-IR":/^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,"fi-FI":/^[A-ZÅÄÖ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"nb-NO":/^[A-ZÆØÅ]+$/i,"nl-NL":/^[A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[A-ZÆØÅ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"kk-KZ":/^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๐\s]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[А-ЩЬЮЯЄIЇҐі]+$/i,"vi-VN":/^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,"ko-KR":/^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[א-ת]+$/,fa:/^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/},ws=alpha.alphanumeric={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[0-9А-Я]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]+$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"el-GR":/^[0-9Α-ω]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fi-FI":/^[0-9A-ZÅÄÖ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nb-NO":/^[0-9A-ZÆØÅ]+$/i,"nl-NL":/^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[0-9A-ZÆØÅ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"kk-KZ":/^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[0-9A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[0-9A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๙\s]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,"ko-KR":/^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,"vi-VN":/^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[0-9א-ת]+$/,fa:/^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i,"si-LK":/^[0-9\u0D80-\u0DFF]+$/},oi=alpha.decimal={"en-US":".",ar:"٫"},si=alpha.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"],ii,ai=0;ai<si.length;ai++)ii="en-".concat(si[ai]),Ws[ii]=Ws["en-US"],ws[ii]=ws["en-US"],oi[ii]=oi["en-US"];for(var li=alpha.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"],ci,ui=0;ui<li.length;ui++)ci="ar-".concat(li[ui]),Ws[ci]=Ws.ar,ws[ci]=ws.ar,oi[ci]=oi.ar;for(var di=alpha.farsiLocales=["IR","AF"],hi,pi=0;pi<di.length;pi++)hi="fa-".concat(di[pi]),ws[hi]=ws.fa,oi[hi]=oi.ar;for(var ha=alpha.bengaliLocales=["BD","IN"],ga,va=0;va<ha.length;va++)ga="bn-".concat(ha[va]),Ws[ga]=Ws.bn,ws[ga]=ws.bn,oi[ga]=oi["en-US"];for(var ba=alpha.dotDecimal=["ar-EG","ar-LB","ar-LY"],wa=alpha.commaDecimal=["bg-BG","cs-CZ","da-DK","de-DE","el-GR","en-ZM","eo","es-ES","fr-CA","fr-FR","id-ID","it-IT","ku-IQ","hi-IN","hu-HU","nb-NO","nn-NO","nl-NL","pl-PL","pt-PT","ru-RU","kk-KZ","si-LK","sl-SI","sr-RS@latin","sr-RS","sv-SE","tr-TR","uk-UA","vi-VN"],xa=0;xa<ba.length;xa++)oi[ba[xa]]=oi["en-US"];for(var Ca=0;Ca<wa.length;Ca++)oi[wa[Ca]]=",";return Ws["fr-CA"]=Ws["fr-FR"],ws["fr-CA"]=ws["fr-FR"],Ws["pt-BR"]=Ws["pt-PT"],ws["pt-BR"]=ws["pt-PT"],oi["pt-BR"]=oi["pt-PT"],Ws["pl-Pl"]=Ws["pl-PL"],ws["pl-Pl"]=ws["pl-PL"],oi["pl-Pl"]=oi["pl-PL"],Ws["fa-AF"]=Ws.fa,alpha}var hasRequiredIsFloat;function requireIsFloat(){if(hasRequiredIsFloat)return isFloat;hasRequiredIsFloat=1,Object.defineProperty(isFloat,"__esModule",{value:!0}),isFloat.default=si,isFloat.locales=void 0;var Ws=oi(requireAssertString()),ws=requireAlpha();function oi(ii){return ii&&ii.__esModule?ii:{default:ii}}function si(ii,ai){(0,Ws.default)(ii),ai=ai||{};var li=new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(ai.locale?ws.decimal[ai.locale]:".","[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$"));if(ii===""||ii==="."||ii===","||ii==="-"||ii==="+")return!1;var ci=parseFloat(ii.replace(",","."));return li.test(ii)&&(!ai.hasOwnProperty("min")||ci>=ai.min)&&(!ai.hasOwnProperty("max")||ci<=ai.max)&&(!ai.hasOwnProperty("lt")||ci<ai.lt)&&(!ai.hasOwnProperty("gt")||ci>ai.gt)}return isFloat.locales=Object.keys(ws.decimal),isFloat}var hasRequiredToFloat;function requireToFloat(){return hasRequiredToFloat||(hasRequiredToFloat=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireIsFloat());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){return(0,oi.default)(ai)?parseFloat(ai):NaN}Ws.exports=ws.default,Ws.exports.default=ws.default}(toFloat,toFloat.exports)),toFloat.exports}var toInt={exports:{}},hasRequiredToInt;function requireToInt(){return hasRequiredToInt||(hasRequiredToInt=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){return(0,oi.default)(ai),parseInt(ai,li||10)}Ws.exports=ws.default,Ws.exports.default=ws.default}(toInt,toInt.exports)),toInt.exports}var toBoolean={exports:{}},hasRequiredToBoolean;function requireToBoolean(){return hasRequiredToBoolean||(hasRequiredToBoolean=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){return(0,oi.default)(ai),li?ai==="1"||/^true$/i.test(ai):ai!=="0"&&!/^false$/i.test(ai)&&ai!==""}Ws.exports=ws.default,Ws.exports.default=ws.default}(toBoolean,toBoolean.exports)),toBoolean.exports}var equals={exports:{}},hasRequiredEquals;function requireEquals(){return hasRequiredEquals||(hasRequiredEquals=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){return(0,oi.default)(ai),ai===li}Ws.exports=ws.default,Ws.exports.default=ws.default}(equals,equals.exports)),equals.exports}var contains$1={exports:{}},toString$1={exports:{}},hasRequiredToString;function requireToString(){return hasRequiredToString||(hasRequiredToString=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=si;function oi(ii){"@babel/helpers - typeof";return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ai){return typeof ai}:function(ai){return ai&&typeof Symbol=="function"&&ai.constructor===Symbol&&ai!==Symbol.prototype?"symbol":typeof ai},oi(ii)}function si(ii){return oi(ii)==="object"&&ii!==null?typeof ii.toString=="function"?ii=ii.toString():ii="[object Object]":(ii===null||typeof ii>"u"||isNaN(ii)&&!ii.length)&&(ii=""),String(ii)}Ws.exports=ws.default,Ws.exports.default=ws.default}(toString$1,toString$1.exports)),toString$1.exports}var merge={exports:{}},hasRequiredMerge;function requireMerge(){return hasRequiredMerge||(hasRequiredMerge=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=oi;function oi(){var si=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ii=arguments.length>1?arguments[1]:void 0;for(var ai in ii)typeof si[ai]>"u"&&(si[ai]=ii[ai]);return si}Ws.exports=ws.default,Ws.exports.default=ws.default}(merge,merge.exports)),merge.exports}var hasRequiredContains;function requireContains(){return hasRequiredContains||(hasRequiredContains=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=ai(requireAssertString()),si=ai(requireToString()),ii=ai(requireMerge());function ai(ui){return ui&&ui.__esModule?ui:{default:ui}}var li={ignoreCase:!1,minOccurrences:1};function ci(ui,di,hi){return(0,oi.default)(ui),hi=(0,ii.default)(hi,li),hi.ignoreCase?ui.toLowerCase().split((0,si.default)(di).toLowerCase()).length>hi.minOccurrences:ui.split((0,si.default)(di)).length>hi.minOccurrences}Ws.exports=ws.default,Ws.exports.default=ws.default}(contains$1,contains$1.exports)),contains$1.exports}var matches={exports:{}},hasRequiredMatches;function requireMatches(){return hasRequiredMatches||(hasRequiredMatches=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li,ci){return(0,oi.default)(ai),Object.prototype.toString.call(li)!=="[object RegExp]"&&(li=new RegExp(li,ci)),!!ai.match(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(matches,matches.exports)),matches.exports}var isEmail={exports:{}},isByteLength={exports:{}},hasRequiredIsByteLength;function requireIsByteLength(){return hasRequiredIsByteLength||(hasRequiredIsByteLength=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}function ii(li){"@babel/helpers - typeof";return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ci){return typeof ci}:function(ci){return ci&&typeof Symbol=="function"&&ci.constructor===Symbol&&ci!==Symbol.prototype?"symbol":typeof ci},ii(li)}function ai(li,ci){(0,oi.default)(li);var ui,di;ii(ci)==="object"?(ui=ci.min||0,di=ci.max):(ui=arguments[1],di=arguments[2]);var hi=encodeURI(li).split(/%..|./).length-1;return hi>=ui&&(typeof di>"u"||hi<=di)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isByteLength,isByteLength.exports)),isByteLength.exports}var isFQDN={exports:{}},hasRequiredIsFQDN;function requireIsFQDN(){return hasRequiredIsFQDN||(hasRequiredIsFQDN=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ii(requireAssertString()),si=ii(requireMerge());function ii(ci){return ci&&ci.__esModule?ci:{default:ci}}var ai={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function li(ci,ui){(0,oi.default)(ci),ui=(0,si.default)(ui,ai),ui.allow_trailing_dot&&ci[ci.length-1]==="."&&(ci=ci.substring(0,ci.length-1)),ui.allow_wildcard===!0&&ci.indexOf("*.")===0&&(ci=ci.substring(2));var di=ci.split("."),hi=di[di.length-1];return ui.require_tld&&(di.length<2||!ui.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(hi)||/\s/.test(hi))||!ui.allow_numeric_tld&&/^\d+$/.test(hi)?!1:di.every(function(pi){return!(pi.length>63&&!ui.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(pi)||/[\uff01-\uff5e]/.test(pi)||/^-|-$/.test(pi)||!ui.allow_underscores&&/_/.test(pi))})}Ws.exports=ws.default,Ws.exports.default=ws.default}(isFQDN,isFQDN.exports)),isFQDN.exports}var isIP={exports:{}},hasRequiredIsIP;function requireIsIP(){return hasRequiredIsIP||(hasRequiredIsIP=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=di;var oi=si(requireAssertString());function si(hi){return hi&&hi.__esModule?hi:{default:hi}}var ii="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",ai="(".concat(ii,"[.]){3}").concat(ii),li=new RegExp("^".concat(ai,"$")),ci="(?:[0-9a-fA-F]{1,4})",ui=new RegExp("^("+"(?:".concat(ci,":){7}(?:").concat(ci,"|:)|")+"(?:".concat(ci,":){6}(?:").concat(ai,"|:").concat(ci,"|:)|")+"(?:".concat(ci,":){5}(?::").concat(ai,"|(:").concat(ci,"){1,2}|:)|")+"(?:".concat(ci,":){4}(?:(:").concat(ci,"){0,1}:").concat(ai,"|(:").concat(ci,"){1,3}|:)|")+"(?:".concat(ci,":){3}(?:(:").concat(ci,"){0,2}:").concat(ai,"|(:").concat(ci,"){1,4}|:)|")+"(?:".concat(ci,":){2}(?:(:").concat(ci,"){0,3}:").concat(ai,"|(:").concat(ci,"){1,5}|:)|")+"(?:".concat(ci,":){1}(?:(:").concat(ci,"){0,4}:").concat(ai,"|(:").concat(ci,"){1,6}|:)|")+"(?::((?::".concat(ci,"){0,5}:").concat(ai,"|(?::").concat(ci,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function di(hi){var pi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,oi.default)(hi),pi=String(pi),pi?pi==="4"?li.test(hi):pi==="6"?ui.test(hi):!1:di(hi,4)||di(hi,6)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isIP,isIP.exports)),isIP.exports}var hasRequiredIsEmail;function requireIsEmail(){return hasRequiredIsEmail||(hasRequiredIsEmail=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=xa;var oi=ci(requireAssertString()),si=ci(requireIsByteLength()),ii=ci(requireIsFQDN()),ai=ci(requireIsIP()),li=ci(requireMerge());function ci(Ca){return Ca&&Ca.__esModule?Ca:{default:Ca}}var ui={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},di=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,hi=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,pi=/^[a-z\d]+$/,ha=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,ga=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,va=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,ba=254;function wa(Ca){var el=Ca.replace(/^"(.+)"$/,"$1");if(!el.trim())return!1;var ku=/[\.";<>]/.test(el);if(ku){if(el===Ca)return!1;var gd=el.split('"').length===el.split('\\"').length;if(!gd)return!1}return!0}function xa(Ca,el){if((0,oi.default)(Ca),el=(0,li.default)(el,ui),el.require_display_name||el.allow_display_name){var ku=Ca.match(di);if(ku){var gd=ku[1];if(Ca=Ca.replace(gd,"").replace(/(^<|>$)/g,""),gd.endsWith(" ")&&(gd=gd.slice(0,-1)),!wa(gd))return!1}else if(el.require_display_name)return!1}if(!el.ignore_max_length&&Ca.length>ba)return!1;var Ed=Ca.split("@"),Od=Ed.pop(),Nd=Od.toLowerCase();if(el.host_blacklist.includes(Nd)||el.host_whitelist.length>0&&!el.host_whitelist.includes(Nd))return!1;var Pd=Ed.join("@");if(el.domain_specific_validation&&(Nd==="gmail.com"||Nd==="googlemail.com")){Pd=Pd.toLowerCase();var Ld=Pd.split("+")[0];if(!(0,si.default)(Ld.replace(/\./g,""),{min:6,max:30}))return!1;for(var rf=Ld.split("."),_d=0;_d<rf.length;_d++)if(!pi.test(rf[_d]))return!1}if(el.ignore_max_length===!1&&(!(0,si.default)(Pd,{max:64})||!(0,si.default)(Od,{max:254})))return!1;if(!(0,ii.default)(Od,{require_tld:el.require_tld,ignore_max_length:el.ignore_max_length,allow_underscores:el.allow_underscores})){if(!el.allow_ip_domain)return!1;if(!(0,ai.default)(Od)){if(!Od.startsWith("[")||!Od.endsWith("]"))return!1;var Md=Od.slice(1,-1);if(Md.length===0||!(0,ai.default)(Md))return!1}}if(Pd[0]==='"')return Pd=Pd.slice(1,Pd.length-1),el.allow_utf8_local_part?va.test(Pd):ha.test(Pd);for(var Td=el.allow_utf8_local_part?ga:hi,wd=Pd.split("."),Cd=0;Cd<wd.length;Cd++)if(!Td.test(wd[Cd]))return!1;return!(el.blacklisted_chars&&Pd.search(new RegExp("[".concat(el.blacklisted_chars,"]+"),"g"))!==-1)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isEmail,isEmail.exports)),isEmail.exports}var isURL$1={exports:{}},hasRequiredIsURL;function requireIsURL(){return hasRequiredIsURL||(hasRequiredIsURL=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=xa;var oi=li(requireAssertString()),si=li(requireIsFQDN()),ii=li(requireIsIP()),ai=li(requireMerge());function li(Ca){return Ca&&Ca.__esModule?Ca:{default:Ca}}function ci(Ca,el){return ha(Ca)||pi(Ca,el)||di(Ca,el)||ui()}function ui(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
307
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function di(Ca,el){if(Ca){if(typeof Ca=="string")return hi(Ca,el);var ku=Object.prototype.toString.call(Ca).slice(8,-1);if(ku==="Object"&&Ca.constructor&&(ku=Ca.constructor.name),ku==="Map"||ku==="Set")return Array.from(Ca);if(ku==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ku))return hi(Ca,el)}}function hi(Ca,el){(el==null||el>Ca.length)&&(el=Ca.length);for(var ku=0,gd=new Array(el);ku<el;ku++)gd[ku]=Ca[ku];return gd}function pi(Ca,el){var ku=Ca==null?null:typeof Symbol<"u"&&Ca[Symbol.iterator]||Ca["@@iterator"];if(ku!=null){var gd,Ed,Od,Nd,Pd=[],Ld=!0,rf=!1;try{if(Od=(ku=ku.call(Ca)).next,el!==0)for(;!(Ld=(gd=Od.call(ku)).done)&&(Pd.push(gd.value),Pd.length!==el);Ld=!0);}catch(
|
|
306
|
+
`}function makeStateObject(Ws,ws){const oi=makeStateObjectName(Ws,ws),si={kind:Kind.OBJECT_TYPE_DEFINITION,name:{kind:Kind.NAME,value:oi},fields:[{description:{kind:Kind.STRING,value:`Add your ${ws} state fields here`,block:!1},kind:Kind.FIELD_DEFINITION,name:{kind:Kind.NAME,value:"_placeholder"},type:{kind:Kind.NAMED_TYPE,name:{kind:Kind.NAME,value:"String"}}}]};return print(si)}function makeEmptyInputObject(Ws){const ws={kind:Kind.INPUT_OBJECT_TYPE_DEFINITION,name:{kind:Kind.NAME,value:Ws},fields:[{description:{kind:Kind.STRING,value:"Add your inputs here",block:!1},kind:Kind.INPUT_VALUE_DEFINITION,name:{kind:Kind.NAME,value:"_placeholder"},type:{kind:Kind.NAMED_TYPE,name:{kind:Kind.NAME,value:"String"}}}]};return print(ws)}function makeOperationInputName(Ws){return`${pascalCase(Ws)}Input`}function makeStateObjectName(Ws,ws){return`${pascalCase(Ws)}${ws==="local"?"Local":""}State`}function makeOperationInitialDoc(Ws){const ws=makeOperationInputName(Ws);return makeEmptyInputObject(ws)}function makeInitialSchemaDoc(Ws,ws){return makeStateObject(Ws,ws)}function isValidScalarValue(Ws,ws){if(Ws in customScalars){const oi=customScalars[Ws];if(oi instanceof GraphQLScalarType)return oi.parseValue(ws)!==void 0}switch(Ws){case"Int":return Number.isInteger(ws);case"Float":return typeof ws=="number";case"Boolean":return typeof ws=="boolean";case"DateTime":return typeof ws=="string"&&!isNaN(Date.parse(ws));case"ID":case"String":default:return typeof ws=="string"}}function getMinimalValue(Ws,ws,oi){const si=getNullableType(Ws);if(isScalarType(si)){const ii=si.name;if(oi!==void 0&&isValidScalarValue(ii,oi))return oi;switch(ii){case"Int":case"Float":return 0;case"Boolean":return!1;case"DateTime":return new Date().toISOString();case"ID":case"String":default:return""}}if(isEnumType(si)){const ii=si.getValues().map(ai=>ai.value);return oi!==void 0&&ii.includes(oi)?oi:ii[0]||null}if(isListType(si))return oi!==void 0&&Array.isArray(oi)?oi:[];if(isObjectType(si)){const ii={},ai=si.getFields(),li=oi;for(const ci in ai){const ui=ai[ci],di=li?li[ci]:void 0;ii[ci]=getMinimalValue(ui.type,ws,di)}return ii}return null}function makeMinimalObjectFromSDL(Ws,ws,oi){const si=buildASTSchema(parse(Ws)),ii=parse(ws),ai=[];if(ii.definitions.forEach(hi=>{(hi.kind===Kind.OBJECT_TYPE_DEFINITION||hi.kind===Kind.OBJECT_TYPE_EXTENSION)&&ai.push(hi.name.value)}),ai.length===0)throw new Error("No object type definition found in SDL.");const li=ai[0];let ci=si.getType(li),ui=si;if((!ci||!isObjectType(ci))&&(ui=extendSchema(si,ii),ci=ui.getType(li)),!ci||!isObjectType(ci))throw new Error(`Type "${li}" is not a valid ObjectType.`);const di=getMinimalValue(ci,ui,oi);return JSON.stringify(di,null,2)}function removeWhitespace(Ws){return Ws.replace(/\s+|\\n|\\t/g,"").toLowerCase()}function compareStringsWithoutWhitespace(Ws,ws){return removeWhitespace(Ws)===removeWhitespace(ws)}function renameSchemaType(Ws,ws,oi,si){const ii=si==="global"?"State":"LocalState",ai=`${pascalCase(ws)}${ii}`,li=`${pascalCase(oi)}${ii}`,ci=parse(Ws),ui=visit(ci,{ObjectTypeDefinition:di=>{if(di.name.value===ai)return{...di,name:{...di.name,value:li}}}});return print(ui)}function initializeModelSchema(Ws){const{modelName:ws,setStateSchema:oi}=Ws,si=makeInitialSchemaDoc(ws,"global");oi(si,"global")}function updateModelSchemaNames(Ws){const{oldName:ws,newName:oi,globalStateSchema:si,localStateSchema:ii,setStateSchema:ai}=Ws,li=renameSchemaType(si,ws,oi,"global");if(ai(li,"global"),ii){const ci=renameSchemaType(ii,ws,oi,"local");ai(ci,"local")}}function handleModelNameChange(Ws){const{oldName:ws,newName:oi,globalStateSchema:si,setStateSchema:ii}=Ws;if(!si){initializeModelSchema({modelName:oi,setStateSchema:ii});return}updateModelSchemaNames(Ws)}const labelVariants=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Label=React.forwardRef(({className:Ws,...ws},oi)=>jsx(Root,{ref:oi,className:cn(labelVariants(),Ws),...ws}));Label.displayName=Root.displayName;var validator$1={exports:{}},toDate={exports:{}},assertString={exports:{}},hasRequiredAssertString;function requireAssertString(){return hasRequiredAssertString||(hasRequiredAssertString=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=si;function oi(ii){"@babel/helpers - typeof";return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ai){return typeof ai}:function(ai){return ai&&typeof Symbol=="function"&&ai.constructor===Symbol&&ai!==Symbol.prototype?"symbol":typeof ai},oi(ii)}function si(ii){var ai=typeof ii=="string"||ii instanceof String;if(!ai){var li=oi(ii);throw ii===null?li="null":li==="object"&&(li=ii.constructor.name),new TypeError("Expected a string but received a ".concat(li))}}Ws.exports=ws.default,Ws.exports.default=ws.default}(assertString,assertString.exports)),assertString.exports}var hasRequiredToDate;function requireToDate(){return hasRequiredToDate||(hasRequiredToDate=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){return(0,oi.default)(ai),ai=Date.parse(ai),isNaN(ai)?null:new Date(ai)}Ws.exports=ws.default,Ws.exports.default=ws.default}(toDate,toDate.exports)),toDate.exports}var toFloat={exports:{}},isFloat={},alpha={},hasRequiredAlpha;function requireAlpha(){if(hasRequiredAlpha)return alpha;hasRequiredAlpha=1,Object.defineProperty(alpha,"__esModule",{value:!0}),alpha.farsiLocales=alpha.englishLocales=alpha.dotDecimal=alpha.decimal=alpha.commaDecimal=alpha.bengaliLocales=alpha.arabicLocales=alpha.alphanumeric=alpha.alpha=void 0;for(var Ws=alpha.alpha={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[А-Я]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"el-GR":/^[Α-ώ]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fa-IR":/^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,"fi-FI":/^[A-ZÅÄÖ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"nb-NO":/^[A-ZÆØÅ]+$/i,"nl-NL":/^[A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[A-ZÆØÅ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"kk-KZ":/^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๐\s]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[А-ЩЬЮЯЄIЇҐі]+$/i,"vi-VN":/^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,"ko-KR":/^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[א-ת]+$/,fa:/^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/},ws=alpha.alphanumeric={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[0-9А-Я]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]+$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"el-GR":/^[0-9Α-ω]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fi-FI":/^[0-9A-ZÅÄÖ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nb-NO":/^[0-9A-ZÆØÅ]+$/i,"nl-NL":/^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[0-9A-ZÆØÅ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"kk-KZ":/^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[0-9A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[0-9A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๙\s]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,"ko-KR":/^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,"vi-VN":/^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[0-9א-ת]+$/,fa:/^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i,"si-LK":/^[0-9\u0D80-\u0DFF]+$/},oi=alpha.decimal={"en-US":".",ar:"٫"},si=alpha.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"],ii,ai=0;ai<si.length;ai++)ii="en-".concat(si[ai]),Ws[ii]=Ws["en-US"],ws[ii]=ws["en-US"],oi[ii]=oi["en-US"];for(var li=alpha.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"],ci,ui=0;ui<li.length;ui++)ci="ar-".concat(li[ui]),Ws[ci]=Ws.ar,ws[ci]=ws.ar,oi[ci]=oi.ar;for(var di=alpha.farsiLocales=["IR","AF"],hi,pi=0;pi<di.length;pi++)hi="fa-".concat(di[pi]),ws[hi]=ws.fa,oi[hi]=oi.ar;for(var ha=alpha.bengaliLocales=["BD","IN"],ga,va=0;va<ha.length;va++)ga="bn-".concat(ha[va]),Ws[ga]=Ws.bn,ws[ga]=ws.bn,oi[ga]=oi["en-US"];for(var ba=alpha.dotDecimal=["ar-EG","ar-LB","ar-LY"],wa=alpha.commaDecimal=["bg-BG","cs-CZ","da-DK","de-DE","el-GR","en-ZM","eo","es-ES","fr-CA","fr-FR","id-ID","it-IT","ku-IQ","hi-IN","hu-HU","nb-NO","nn-NO","nl-NL","pl-PL","pt-PT","ru-RU","kk-KZ","si-LK","sl-SI","sr-RS@latin","sr-RS","sv-SE","tr-TR","uk-UA","vi-VN"],xa=0;xa<ba.length;xa++)oi[ba[xa]]=oi["en-US"];for(var Ca=0;Ca<wa.length;Ca++)oi[wa[Ca]]=",";return Ws["fr-CA"]=Ws["fr-FR"],ws["fr-CA"]=ws["fr-FR"],Ws["pt-BR"]=Ws["pt-PT"],ws["pt-BR"]=ws["pt-PT"],oi["pt-BR"]=oi["pt-PT"],Ws["pl-Pl"]=Ws["pl-PL"],ws["pl-Pl"]=ws["pl-PL"],oi["pl-Pl"]=oi["pl-PL"],Ws["fa-AF"]=Ws.fa,alpha}var hasRequiredIsFloat;function requireIsFloat(){if(hasRequiredIsFloat)return isFloat;hasRequiredIsFloat=1,Object.defineProperty(isFloat,"__esModule",{value:!0}),isFloat.default=si,isFloat.locales=void 0;var Ws=oi(requireAssertString()),ws=requireAlpha();function oi(ii){return ii&&ii.__esModule?ii:{default:ii}}function si(ii,ai){(0,Ws.default)(ii),ai=ai||{};var li=new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(ai.locale?ws.decimal[ai.locale]:".","[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$"));if(ii===""||ii==="."||ii===","||ii==="-"||ii==="+")return!1;var ci=parseFloat(ii.replace(",","."));return li.test(ii)&&(!ai.hasOwnProperty("min")||ci>=ai.min)&&(!ai.hasOwnProperty("max")||ci<=ai.max)&&(!ai.hasOwnProperty("lt")||ci<ai.lt)&&(!ai.hasOwnProperty("gt")||ci>ai.gt)}return isFloat.locales=Object.keys(ws.decimal),isFloat}var hasRequiredToFloat;function requireToFloat(){return hasRequiredToFloat||(hasRequiredToFloat=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireIsFloat());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){return(0,oi.default)(ai)?parseFloat(ai):NaN}Ws.exports=ws.default,Ws.exports.default=ws.default}(toFloat,toFloat.exports)),toFloat.exports}var toInt={exports:{}},hasRequiredToInt;function requireToInt(){return hasRequiredToInt||(hasRequiredToInt=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){return(0,oi.default)(ai),parseInt(ai,li||10)}Ws.exports=ws.default,Ws.exports.default=ws.default}(toInt,toInt.exports)),toInt.exports}var toBoolean={exports:{}},hasRequiredToBoolean;function requireToBoolean(){return hasRequiredToBoolean||(hasRequiredToBoolean=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){return(0,oi.default)(ai),li?ai==="1"||/^true$/i.test(ai):ai!=="0"&&!/^false$/i.test(ai)&&ai!==""}Ws.exports=ws.default,Ws.exports.default=ws.default}(toBoolean,toBoolean.exports)),toBoolean.exports}var equals={exports:{}},hasRequiredEquals;function requireEquals(){return hasRequiredEquals||(hasRequiredEquals=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){return(0,oi.default)(ai),ai===li}Ws.exports=ws.default,Ws.exports.default=ws.default}(equals,equals.exports)),equals.exports}var contains$1={exports:{}},toString$1={exports:{}},hasRequiredToString;function requireToString(){return hasRequiredToString||(hasRequiredToString=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=si;function oi(ii){"@babel/helpers - typeof";return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ai){return typeof ai}:function(ai){return ai&&typeof Symbol=="function"&&ai.constructor===Symbol&&ai!==Symbol.prototype?"symbol":typeof ai},oi(ii)}function si(ii){return oi(ii)==="object"&&ii!==null?typeof ii.toString=="function"?ii=ii.toString():ii="[object Object]":(ii===null||typeof ii>"u"||isNaN(ii)&&!ii.length)&&(ii=""),String(ii)}Ws.exports=ws.default,Ws.exports.default=ws.default}(toString$1,toString$1.exports)),toString$1.exports}var merge={exports:{}},hasRequiredMerge;function requireMerge(){return hasRequiredMerge||(hasRequiredMerge=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=oi;function oi(){var si=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ii=arguments.length>1?arguments[1]:void 0;for(var ai in ii)typeof si[ai]>"u"&&(si[ai]=ii[ai]);return si}Ws.exports=ws.default,Ws.exports.default=ws.default}(merge,merge.exports)),merge.exports}var hasRequiredContains;function requireContains(){return hasRequiredContains||(hasRequiredContains=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=ai(requireAssertString()),si=ai(requireToString()),ii=ai(requireMerge());function ai(ui){return ui&&ui.__esModule?ui:{default:ui}}var li={ignoreCase:!1,minOccurrences:1};function ci(ui,di,hi){return(0,oi.default)(ui),hi=(0,ii.default)(hi,li),hi.ignoreCase?ui.toLowerCase().split((0,si.default)(di).toLowerCase()).length>hi.minOccurrences:ui.split((0,si.default)(di)).length>hi.minOccurrences}Ws.exports=ws.default,Ws.exports.default=ws.default}(contains$1,contains$1.exports)),contains$1.exports}var matches={exports:{}},hasRequiredMatches;function requireMatches(){return hasRequiredMatches||(hasRequiredMatches=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li,ci){return(0,oi.default)(ai),Object.prototype.toString.call(li)!=="[object RegExp]"&&(li=new RegExp(li,ci)),!!ai.match(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(matches,matches.exports)),matches.exports}var isEmail={exports:{}},isByteLength={exports:{}},hasRequiredIsByteLength;function requireIsByteLength(){return hasRequiredIsByteLength||(hasRequiredIsByteLength=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}function ii(li){"@babel/helpers - typeof";return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ci){return typeof ci}:function(ci){return ci&&typeof Symbol=="function"&&ci.constructor===Symbol&&ci!==Symbol.prototype?"symbol":typeof ci},ii(li)}function ai(li,ci){(0,oi.default)(li);var ui,di;ii(ci)==="object"?(ui=ci.min||0,di=ci.max):(ui=arguments[1],di=arguments[2]);var hi=encodeURI(li).split(/%..|./).length-1;return hi>=ui&&(typeof di>"u"||hi<=di)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isByteLength,isByteLength.exports)),isByteLength.exports}var isFQDN={exports:{}},hasRequiredIsFQDN;function requireIsFQDN(){return hasRequiredIsFQDN||(hasRequiredIsFQDN=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ii(requireAssertString()),si=ii(requireMerge());function ii(ci){return ci&&ci.__esModule?ci:{default:ci}}var ai={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function li(ci,ui){(0,oi.default)(ci),ui=(0,si.default)(ui,ai),ui.allow_trailing_dot&&ci[ci.length-1]==="."&&(ci=ci.substring(0,ci.length-1)),ui.allow_wildcard===!0&&ci.indexOf("*.")===0&&(ci=ci.substring(2));var di=ci.split("."),hi=di[di.length-1];return ui.require_tld&&(di.length<2||!ui.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(hi)||/\s/.test(hi))||!ui.allow_numeric_tld&&/^\d+$/.test(hi)?!1:di.every(function(pi){return!(pi.length>63&&!ui.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(pi)||/[\uff01-\uff5e]/.test(pi)||/^-|-$/.test(pi)||!ui.allow_underscores&&/_/.test(pi))})}Ws.exports=ws.default,Ws.exports.default=ws.default}(isFQDN,isFQDN.exports)),isFQDN.exports}var isIP={exports:{}},hasRequiredIsIP;function requireIsIP(){return hasRequiredIsIP||(hasRequiredIsIP=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=di;var oi=si(requireAssertString());function si(hi){return hi&&hi.__esModule?hi:{default:hi}}var ii="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",ai="(".concat(ii,"[.]){3}").concat(ii),li=new RegExp("^".concat(ai,"$")),ci="(?:[0-9a-fA-F]{1,4})",ui=new RegExp("^("+"(?:".concat(ci,":){7}(?:").concat(ci,"|:)|")+"(?:".concat(ci,":){6}(?:").concat(ai,"|:").concat(ci,"|:)|")+"(?:".concat(ci,":){5}(?::").concat(ai,"|(:").concat(ci,"){1,2}|:)|")+"(?:".concat(ci,":){4}(?:(:").concat(ci,"){0,1}:").concat(ai,"|(:").concat(ci,"){1,3}|:)|")+"(?:".concat(ci,":){3}(?:(:").concat(ci,"){0,2}:").concat(ai,"|(:").concat(ci,"){1,4}|:)|")+"(?:".concat(ci,":){2}(?:(:").concat(ci,"){0,3}:").concat(ai,"|(:").concat(ci,"){1,5}|:)|")+"(?:".concat(ci,":){1}(?:(:").concat(ci,"){0,4}:").concat(ai,"|(:").concat(ci,"){1,6}|:)|")+"(?::((?::".concat(ci,"){0,5}:").concat(ai,"|(?::").concat(ci,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function di(hi){var pi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,oi.default)(hi),pi=String(pi),pi?pi==="4"?li.test(hi):pi==="6"?ui.test(hi):!1:di(hi,4)||di(hi,6)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isIP,isIP.exports)),isIP.exports}var hasRequiredIsEmail;function requireIsEmail(){return hasRequiredIsEmail||(hasRequiredIsEmail=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=xa;var oi=ci(requireAssertString()),si=ci(requireIsByteLength()),ii=ci(requireIsFQDN()),ai=ci(requireIsIP()),li=ci(requireMerge());function ci(Ca){return Ca&&Ca.__esModule?Ca:{default:Ca}}var ui={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},di=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,hi=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,pi=/^[a-z\d]+$/,ha=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,ga=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,va=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,ba=254;function wa(Ca){var el=Ca.replace(/^"(.+)"$/,"$1");if(!el.trim())return!1;var ku=/[\.";<>]/.test(el);if(ku){if(el===Ca)return!1;var gd=el.split('"').length===el.split('\\"').length;if(!gd)return!1}return!0}function xa(Ca,el){if((0,oi.default)(Ca),el=(0,li.default)(el,ui),el.require_display_name||el.allow_display_name){var ku=Ca.match(di);if(ku){var gd=ku[1];if(Ca=Ca.replace(gd,"").replace(/(^<|>$)/g,""),gd.endsWith(" ")&&(gd=gd.slice(0,-1)),!wa(gd))return!1}else if(el.require_display_name)return!1}if(!el.ignore_max_length&&Ca.length>ba)return!1;var Ed=Ca.split("@"),Od=Ed.pop(),Nd=Od.toLowerCase();if(el.host_blacklist.includes(Nd)||el.host_whitelist.length>0&&!el.host_whitelist.includes(Nd))return!1;var Pd=Ed.join("@");if(el.domain_specific_validation&&(Nd==="gmail.com"||Nd==="googlemail.com")){Pd=Pd.toLowerCase();var Ld=Pd.split("+")[0];if(!(0,si.default)(Ld.replace(/\./g,""),{min:6,max:30}))return!1;for(var rf=Ld.split("."),kd=0;kd<rf.length;kd++)if(!pi.test(rf[kd]))return!1}if(el.ignore_max_length===!1&&(!(0,si.default)(Pd,{max:64})||!(0,si.default)(Od,{max:254})))return!1;if(!(0,ii.default)(Od,{require_tld:el.require_tld,ignore_max_length:el.ignore_max_length,allow_underscores:el.allow_underscores})){if(!el.allow_ip_domain)return!1;if(!(0,ai.default)(Od)){if(!Od.startsWith("[")||!Od.endsWith("]"))return!1;var Md=Od.slice(1,-1);if(Md.length===0||!(0,ai.default)(Md))return!1}}if(Pd[0]==='"')return Pd=Pd.slice(1,Pd.length-1),el.allow_utf8_local_part?va.test(Pd):ha.test(Pd);for(var Td=el.allow_utf8_local_part?ga:hi,wd=Pd.split("."),Cd=0;Cd<wd.length;Cd++)if(!Td.test(wd[Cd]))return!1;return!(el.blacklisted_chars&&Pd.search(new RegExp("[".concat(el.blacklisted_chars,"]+"),"g"))!==-1)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isEmail,isEmail.exports)),isEmail.exports}var isURL$1={exports:{}},hasRequiredIsURL;function requireIsURL(){return hasRequiredIsURL||(hasRequiredIsURL=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=xa;var oi=li(requireAssertString()),si=li(requireIsFQDN()),ii=li(requireIsIP()),ai=li(requireMerge());function li(Ca){return Ca&&Ca.__esModule?Ca:{default:Ca}}function ci(Ca,el){return ha(Ca)||pi(Ca,el)||di(Ca,el)||ui()}function ui(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
307
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function di(Ca,el){if(Ca){if(typeof Ca=="string")return hi(Ca,el);var ku=Object.prototype.toString.call(Ca).slice(8,-1);if(ku==="Object"&&Ca.constructor&&(ku=Ca.constructor.name),ku==="Map"||ku==="Set")return Array.from(Ca);if(ku==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ku))return hi(Ca,el)}}function hi(Ca,el){(el==null||el>Ca.length)&&(el=Ca.length);for(var ku=0,gd=new Array(el);ku<el;ku++)gd[ku]=Ca[ku];return gd}function pi(Ca,el){var ku=Ca==null?null:typeof Symbol<"u"&&Ca[Symbol.iterator]||Ca["@@iterator"];if(ku!=null){var gd,Ed,Od,Nd,Pd=[],Ld=!0,rf=!1;try{if(Od=(ku=ku.call(Ca)).next,el!==0)for(;!(Ld=(gd=Od.call(ku)).done)&&(Pd.push(gd.value),Pd.length!==el);Ld=!0);}catch(kd){rf=!0,Ed=kd}finally{try{if(!Ld&&ku.return!=null&&(Nd=ku.return(),Object(Nd)!==Nd))return}finally{if(rf)throw Ed}}return Pd}}function ha(Ca){if(Array.isArray(Ca))return Ca}var ga={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},va=/^\[([^\]]+)\](?::([0-9]+))?$/;function ba(Ca){return Object.prototype.toString.call(Ca)==="[object RegExp]"}function wa(Ca,el){for(var ku=0;ku<el.length;ku++){var gd=el[ku];if(Ca===gd||ba(gd)&&gd.test(Ca))return!0}return!1}function xa(Ca,el){if((0,oi.default)(Ca),!Ca||/[\s<>]/.test(Ca)||Ca.indexOf("mailto:")===0||(el=(0,ai.default)(el,ga),el.validate_length&&Ca.length>=2083)||!el.allow_fragments&&Ca.includes("#")||!el.allow_query_components&&(Ca.includes("?")||Ca.includes("&")))return!1;var ku,gd,Ed,Od,Nd,Pd,Ld,rf;if(Ld=Ca.split("#"),Ca=Ld.shift(),Ld=Ca.split("?"),Ca=Ld.shift(),Ld=Ca.split("://"),Ld.length>1){if(ku=Ld.shift().toLowerCase(),el.require_valid_protocol&&el.protocols.indexOf(ku)===-1)return!1}else{if(el.require_protocol)return!1;if(Ca.slice(0,2)==="//"){if(!el.allow_protocol_relative_urls)return!1;Ld[0]=Ca.slice(2)}}if(Ca=Ld.join("://"),Ca==="")return!1;if(Ld=Ca.split("/"),Ca=Ld.shift(),Ca===""&&!el.require_host)return!0;if(Ld=Ca.split("@"),Ld.length>1){if(el.disallow_auth||Ld[0]===""||(gd=Ld.shift(),gd.indexOf(":")>=0&&gd.split(":").length>2))return!1;var kd=gd.split(":"),Md=ci(kd,2),Td=Md[0],wd=Md[1];if(Td===""&&wd==="")return!1}Od=Ld.join("@"),Pd=null,rf=null;var Cd=Od.match(va);if(Cd?(Ed="",rf=Cd[1],Pd=Cd[2]||null):(Ld=Od.split(":"),Ed=Ld.shift(),Ld.length&&(Pd=Ld.join(":"))),Pd!==null&&Pd.length>0){if(Nd=parseInt(Pd,10),!/^[0-9]+$/.test(Pd)||Nd<=0||Nd>65535)return!1}else if(el.require_port)return!1;return el.host_whitelist?wa(Ed,el.host_whitelist):Ed===""&&!el.require_host?!0:!(!(0,ii.default)(Ed)&&!(0,si.default)(Ed,el)&&(!rf||!(0,ii.default)(rf,6))||(Ed=Ed||rf,el.host_blacklist&&wa(Ed,el.host_blacklist)))}Ws.exports=ws.default,Ws.exports.default=ws.default}(isURL$1,isURL$1.exports)),isURL$1.exports}var isMACAddress={exports:{}},hasRequiredIsMACAddress;function requireIsMACAddress(){return hasRequiredIsMACAddress||(hasRequiredIsMACAddress=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=hi;var oi=si(requireAssertString());function si(pi){return pi&&pi.__esModule?pi:{default:pi}}var ii=/^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/,ai=/^([0-9a-fA-F]){12}$/,li=/^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/,ci=/^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/,ui=/^([0-9a-fA-F]){16}$/,di=/^([0-9a-fA-F]{4}\.){3}([0-9a-fA-F]{4})$/;function hi(pi,ha){return(0,oi.default)(pi),ha!=null&&ha.eui&&(ha.eui=String(ha.eui)),ha!=null&&ha.no_colons||ha!=null&&ha.no_separators?ha.eui==="48"?ai.test(pi):ha.eui==="64"?ui.test(pi):ai.test(pi)||ui.test(pi):(ha==null?void 0:ha.eui)==="48"?ii.test(pi)||li.test(pi):(ha==null?void 0:ha.eui)==="64"?ci.test(pi)||di.test(pi):hi(pi,{eui:"48"})||hi(pi,{eui:"64"})}Ws.exports=ws.default,Ws.exports.default=ws.default}(isMACAddress,isMACAddress.exports)),isMACAddress.exports}var isIPRange={exports:{}},hasRequiredIsIPRange;function requireIsIPRange(){return hasRequiredIsIPRange||(hasRequiredIsIPRange=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ui;var oi=ii(requireAssertString()),si=ii(requireIsIP());function ii(di){return di&&di.__esModule?di:{default:di}}var ai=/^\d{1,3}$/,li=32,ci=128;function ui(di){var hi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(0,oi.default)(di);var pi=di.split("/");if(pi.length!==2||!ai.test(pi[1])||pi[1].length>1&&pi[1].startsWith("0"))return!1;var ha=(0,si.default)(pi[0],hi);if(!ha)return!1;var ga=null;switch(String(hi)){case"4":ga=li;break;case"6":ga=ci;break;default:ga=(0,si.default)(pi[0],"6")?ci:li}return pi[1]<=ga&&pi[1]>=0}Ws.exports=ws.default,Ws.exports.default=ws.default}(isIPRange,isIPRange.exports)),isIPRange.exports}var isDate={exports:{}},hasRequiredIsDate;function requireIsDate(){return hasRequiredIsDate||(hasRequiredIsDate=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=va;var oi=si(requireMerge());function si(ba){return ba&&ba.__esModule?ba:{default:ba}}function ii(ba,wa){return ci(ba)||li(ba,wa)||di(ba,wa)||ai()}function ai(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
308
308
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function li(ba,wa){var xa=ba==null?null:typeof Symbol<"u"&&ba[Symbol.iterator]||ba["@@iterator"];if(xa!=null){var Ca,el,ku,gd,Ed=[],Od=!0,Nd=!1;try{if(ku=(xa=xa.call(ba)).next,wa!==0)for(;!(Od=(Ca=ku.call(xa)).done)&&(Ed.push(Ca.value),Ed.length!==wa);Od=!0);}catch(Pd){Nd=!0,el=Pd}finally{try{if(!Od&&xa.return!=null&&(gd=xa.return(),Object(gd)!==gd))return}finally{if(Nd)throw el}}return Ed}}function ci(ba){if(Array.isArray(ba))return ba}function ui(ba,wa){var xa=typeof Symbol<"u"&&ba[Symbol.iterator]||ba["@@iterator"];if(!xa){if(Array.isArray(ba)||(xa=di(ba))||wa){xa&&(ba=xa);var Ca=0,el=function(){};return{s:el,n:function(){return Ca>=ba.length?{done:!0}:{done:!1,value:ba[Ca++]}},e:function(Od){throw Od},f:el}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
309
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ku=!0,gd=!1,Ed;return{s:function(){xa=xa.call(ba)},n:function(){var Od=xa.next();return ku=Od.done,Od},e:function(Od){gd=!0,Ed=Od},f:function(){try{!ku&&xa.return!=null&&xa.return()}finally{if(gd)throw Ed}}}}function di(ba,wa){if(ba){if(typeof ba=="string")return hi(ba,wa);var xa=Object.prototype.toString.call(ba).slice(8,-1);if(xa==="Object"&&ba.constructor&&(xa=ba.constructor.name),xa==="Map"||xa==="Set")return Array.from(ba);if(xa==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(xa))return hi(ba,wa)}}function hi(ba,wa){(wa==null||wa>ba.length)&&(wa=ba.length);for(var xa=0,Ca=new Array(wa);xa<wa;xa++)Ca[xa]=ba[xa];return Ca}var pi={format:"YYYY/MM/DD",delimiters:["/","-"],strictMode:!1};function ha(ba){return/(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(ba)}function ga(ba,wa){for(var xa=[],Ca=Math.min(ba.length,wa.length),el=0;el<Ca;el++)xa.push([ba[el],wa[el]]);return xa}function va(ba,wa){if(typeof wa=="string"?wa=(0,oi.default)({format:wa},pi):wa=(0,oi.default)(wa,pi),typeof ba=="string"&&ha(wa.format)){var xa=wa.delimiters.find(function(wd){return wa.format.indexOf(wd)!==-1}),Ca=wa.strictMode?xa:wa.delimiters.find(function(wd){return ba.indexOf(wd)!==-1}),el=ga(ba.split(Ca),wa.format.toLowerCase().split(xa)),ku={},gd=ui(el),Ed;try{for(gd.s();!(Ed=gd.n()).done;){var Od=ii(Ed.value,2),Nd=Od[0],Pd=Od[1];if(Nd.length!==Pd.length)return!1;ku[Pd.charAt(0)]=Nd}}catch(wd){gd.e(wd)}finally{gd.f()}var Ld=ku.y;if(Ld.startsWith("-"))return!1;if(ku.y.length===2){var rf=parseInt(ku.y,10);if(isNaN(rf))return!1;var _d=new Date().getFullYear()%100;rf<_d?Ld="20".concat(ku.y):Ld="19".concat(ku.y)}var Md=ku.m;ku.m.length===1&&(Md="0".concat(ku.m));var Td=ku.d;return ku.d.length===1&&(Td="0".concat(ku.d)),new Date("".concat(Ld,"-").concat(Md,"-").concat(Td,"T00:00:00.000Z")).getUTCDate()===+ku.d}return wa.strictMode?!1:Object.prototype.toString.call(ba)==="[object Date]"&&isFinite(ba)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isDate,isDate.exports)),isDate.exports}var isTime={exports:{}},hasRequiredIsTime;function requireIsTime(){return hasRequiredIsTime||(hasRequiredIsTime=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=si(requireMerge());function si(ci){return ci&&ci.__esModule?ci:{default:ci}}var ii={hourFormat:"hour24",mode:"default"},ai={hour24:{default:/^([01]?[0-9]|2[0-3]):([0-5][0-9])$/,withSeconds:/^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/},hour12:{default:/^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/,withSeconds:/^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/}};function li(ci,ui){return ui=(0,oi.default)(ui,ii),typeof ci!="string"?!1:ai[ui.hourFormat][ui.mode].test(ci)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isTime,isTime.exports)),isTime.exports}var isBoolean={exports:{}},hasRequiredIsBoolean;function requireIsBoolean(){return hasRequiredIsBoolean||(hasRequiredIsBoolean=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=si(requireAssertString());function si(ui){return ui&&ui.__esModule?ui:{default:ui}}var ii={loose:!1},ai=["true","false","1","0"],li=[].concat(ai,["yes","no"]);function ci(ui){var di=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ii;return(0,oi.default)(ui),di.loose?li.includes(ui.toLowerCase()):ai.includes(ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isBoolean,isBoolean.exports)),isBoolean.exports}var isLocale={exports:{}},hasRequiredIsLocale;function requireIsLocale(){return hasRequiredIsLocale||(hasRequiredIsLocale=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=Ca;var oi=si(requireAssertString());function si(el){return el&&el.__esModule?el:{default:el}}var ii="([A-Za-z]{3}(-[A-Za-z]{3}){0,2})",ai="(([a-zA-Z]{2,3}(-".concat(ii,")?)|([a-zA-Z]{5,8}))"),li="([A-Za-z]{4})",ci="([A-Za-z]{2}|\\d{3})",ui="([A-Za-z0-9]{5,8}|(\\d[A-Z-a-z0-9]{3}))",di="(\\d|[A-W]|[Y-Z]|[a-w]|[y-z])",hi="(".concat(di,"(-[A-Za-z0-9]{2,8})+)"),pi="(x(-[A-Za-z0-9]{1,8})+)",ha="((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))",ga="((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))",va="(".concat(ha,"|").concat(ga,")"),ba="(-|_)",wa="".concat(ai,"(").concat(ba).concat(li,")?(").concat(ba).concat(ci,")?(").concat(ba).concat(ui,")*(").concat(ba).concat(hi,")*(").concat(ba).concat(pi,")?"),xa=new RegExp("(^".concat(pi,"$)|(^").concat(va,"$)|(^").concat(wa,"$)"));function Ca(el){return(0,oi.default)(el),xa.test(el)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isLocale,isLocale.exports)),isLocale.exports}var isAbaRouting={exports:{}},hasRequiredIsAbaRouting;function requireIsAbaRouting(){return hasRequiredIsAbaRouting||(hasRequiredIsAbaRouting=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^(?!(1[3-9])|(20)|(3[3-9])|(4[0-9])|(5[0-9])|(60)|(7[3-9])|(8[1-9])|(9[0-2])|(9[3-9]))[0-9]{9}$/;function ai(li){if((0,oi.default)(li),!ii.test(li))return!1;for(var ci=0,ui=0;ui<li.length;ui++)ui%3===0?ci+=li[ui]*3:ui%3===1?ci+=li[ui]*7:ci+=li[ui]*1;return ci%10===0}Ws.exports=ws.default,Ws.exports.default=ws.default}(isAbaRouting,isAbaRouting.exports)),isAbaRouting.exports}var isAlpha={},hasRequiredIsAlpha;function requireIsAlpha(){if(hasRequiredIsAlpha)return isAlpha;hasRequiredIsAlpha=1,Object.defineProperty(isAlpha,"__esModule",{value:!0}),isAlpha.default=si,isAlpha.locales=void 0;var Ws=oi(requireAssertString()),ws=requireAlpha();function oi(ii){return ii&&ii.__esModule?ii:{default:ii}}function si(ii){var ai=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",li=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};(0,Ws.default)(ii);var ci=ii,ui=li.ignore;if(ui)if(ui instanceof RegExp)ci=ci.replace(ui,"");else if(typeof ui=="string")ci=ci.replace(new RegExp("[".concat(ui.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(ai in ws.alpha)return ws.alpha[ai].test(ci);throw new Error("Invalid locale '".concat(ai,"'"))}return isAlpha.locales=Object.keys(ws.alpha),isAlpha}var isAlphanumeric={},hasRequiredIsAlphanumeric;function requireIsAlphanumeric(){if(hasRequiredIsAlphanumeric)return isAlphanumeric;hasRequiredIsAlphanumeric=1,Object.defineProperty(isAlphanumeric,"__esModule",{value:!0}),isAlphanumeric.default=si,isAlphanumeric.locales=void 0;var Ws=oi(requireAssertString()),ws=requireAlpha();function oi(ii){return ii&&ii.__esModule?ii:{default:ii}}function si(ii){var ai=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",li=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};(0,Ws.default)(ii);var ci=ii,ui=li.ignore;if(ui)if(ui instanceof RegExp)ci=ci.replace(ui,"");else if(typeof ui=="string")ci=ci.replace(new RegExp("[".concat(ui.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(ai in ws.alphanumeric)return ws.alphanumeric[ai].test(ci);throw new Error("Invalid locale '".concat(ai,"'"))}return isAlphanumeric.locales=Object.keys(ws.alphanumeric),isAlphanumeric}var isNumeric={exports:{}},hasRequiredIsNumeric;function requireIsNumeric(){return hasRequiredIsNumeric||(hasRequiredIsNumeric=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ii(requireAssertString()),si=requireAlpha();function ii(ci){return ci&&ci.__esModule?ci:{default:ci}}var ai=/^[0-9]+$/;function li(ci,ui){return(0,oi.default)(ci),ui&&ui.no_symbols?ai.test(ci):new RegExp("^[+-]?([0-9]*[".concat((ui||{}).locale?si.decimal[ui.locale]:".","])?[0-9]+$")).test(ci)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isNumeric,isNumeric.exports)),isNumeric.exports}var isPassportNumber={exports:{}},hasRequiredIsPassportNumber;function requireIsPassportNumber(){return hasRequiredIsPassportNumber||(hasRequiredIsPassportNumber=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii={AM:/^[A-Z]{2}\d{7}$/,AR:/^[A-Z]{3}\d{6}$/,AT:/^[A-Z]\d{7}$/,AU:/^[A-Z]\d{7}$/,AZ:/^[A-Z]{1}\d{8}$/,BE:/^[A-Z]{2}\d{6}$/,BG:/^\d{9}$/,BR:/^[A-Z]{2}\d{6}$/,BY:/^[A-Z]{2}\d{7}$/,CA:/^[A-Z]{2}\d{6}$/,CH:/^[A-Z]\d{7}$/,CN:/^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,CY:/^[A-Z](\d{6}|\d{8})$/,CZ:/^\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\d{9}$/,DZ:/^\d{9}$/,EE:/^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,FI:/^[A-Z]{2}\d{7}$/,FR:/^\d{2}[A-Z]{2}\d{5}$/,GB:/^\d{9}$/,GR:/^[A-Z]{2}\d{7}$/,HR:/^\d{9}$/,HU:/^[A-Z]{2}(\d{6}|\d{7})$/,IE:/^[A-Z0-9]{2}\d{7}$/,IN:/^[A-Z]{1}-?\d{7}$/,ID:/^[A-C]\d{7}$/,IR:/^[A-Z]\d{8}$/,IS:/^(A)\d{7}$/,IT:/^[A-Z0-9]{2}\d{7}$/,JM:/^[Aa]\d{7}$/,JP:/^[A-Z]{2}\d{7}$/,KR:/^[MS]\d{8}$/,KZ:/^[a-zA-Z]\d{7}$/,LI:/^[a-zA-Z]\d{5}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\d{7}$/,MZ:/^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,MY:/^[AHK]\d{8}$/,MX:/^\d{10,11}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\d$/,NZ:/^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/,PH:/^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/,PK:/^[A-Z]{2}\d{7}$/,PL:/^[A-Z]{2}\d{7}$/,PT:/^[A-Z]\d{6}$/,RO:/^\d{8,9}$/,RU:/^\d{9}$/,SE:/^\d{8}$/,SL:/^(P)[A-Z]\d{7}$/,SK:/^[0-9A-Z]\d{7}$/,TH:/^[A-Z]{1,2}\d{6,7}$/,TR:/^[A-Z]\d{8}$/,UA:/^[A-Z]{2}\d{6}$/,US:/^\d{9}$/,ZA:/^[TAMD]\d{8}$/};function ai(li,ci){(0,oi.default)(li);var ui=li.replace(/\s/g,"").toUpperCase();return ci.toUpperCase()in ii&&ii[ci].test(ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isPassportNumber,isPassportNumber.exports)),isPassportNumber.exports}var isPort={exports:{}},isInt={exports:{}},hasRequiredIsInt;function requireIsInt(){return hasRequiredIsInt||(hasRequiredIsInt=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=si(requireAssertString());function si(ci){return ci&&ci.__esModule?ci:{default:ci}}var ii=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,ai=/^[-+]?[0-9]+$/;function li(ci,ui){(0,oi.default)(ci),ui=ui||{};var di=ui.allow_leading_zeroes===!1?ii:ai,hi=!ui.hasOwnProperty("min")||ci>=ui.min,pi=!ui.hasOwnProperty("max")||ci<=ui.max,ha=!ui.hasOwnProperty("lt")||ci<ui.lt,ga=!ui.hasOwnProperty("gt")||ci>ui.gt;return di.test(ci)&&hi&&pi&&ha&&ga}Ws.exports=ws.default,Ws.exports.default=ws.default}(isInt,isInt.exports)),isInt.exports}var hasRequiredIsPort;function requireIsPort(){return hasRequiredIsPort||(hasRequiredIsPort=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireIsInt());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){return(0,oi.default)(ai,{allow_leading_zeroes:!1,min:0,max:65535})}Ws.exports=ws.default,Ws.exports.default=ws.default}(isPort,isPort.exports)),isPort.exports}var isLowercase={exports:{}},hasRequiredIsLowercase;function requireIsLowercase(){return hasRequiredIsLowercase||(hasRequiredIsLowercase=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){return(0,oi.default)(ai),ai===ai.toLowerCase()}Ws.exports=ws.default,Ws.exports.default=ws.default}(isLowercase,isLowercase.exports)),isLowercase.exports}var isUppercase={exports:{}},hasRequiredIsUppercase;function requireIsUppercase(){return hasRequiredIsUppercase||(hasRequiredIsUppercase=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){return(0,oi.default)(ai),ai===ai.toUpperCase()}Ws.exports=ws.default,Ws.exports.default=ws.default}(isUppercase,isUppercase.exports)),isUppercase.exports}var isIMEI={exports:{}},hasRequiredIsIMEI;function requireIsIMEI(){return hasRequiredIsIMEI||(hasRequiredIsIMEI=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=si(requireAssertString());function si(ci){return ci&&ci.__esModule?ci:{default:ci}}var ii=/^[0-9]{15}$/,ai=/^\d{2}-\d{6}-\d{6}-\d{1}$/;function li(ci,ui){(0,oi.default)(ci),ui=ui||{};var di=ii;if(ui.allow_hyphens&&(di=ai),!di.test(ci))return!1;ci=ci.replace(/-/g,"");for(var hi=0,pi=2,ha=14,ga=0;ga<ha;ga++){var va=ci.substring(ha-ga-1,ha-ga),ba=parseInt(va,10)*pi;ba>=10?hi+=ba%10+1:hi+=ba,pi===1?pi+=1:pi-=1}var wa=(10-hi%10)%10;return wa===parseInt(ci.substring(14,15),10)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isIMEI,isIMEI.exports)),isIMEI.exports}var isAscii={exports:{}},hasRequiredIsAscii;function requireIsAscii(){return hasRequiredIsAscii||(hasRequiredIsAscii=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^[\x00-\x7F]+$/;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isAscii,isAscii.exports)),isAscii.exports}var isFullWidth={},hasRequiredIsFullWidth;function requireIsFullWidth(){if(hasRequiredIsFullWidth)return isFullWidth;hasRequiredIsFullWidth=1,Object.defineProperty(isFullWidth,"__esModule",{value:!0}),isFullWidth.default=si,isFullWidth.fullWidth=void 0;var Ws=ws(requireAssertString());function ws(ii){return ii&&ii.__esModule?ii:{default:ii}}var oi=isFullWidth.fullWidth=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;function si(ii){return(0,Ws.default)(ii),oi.test(ii)}return isFullWidth}var isHalfWidth={},hasRequiredIsHalfWidth;function requireIsHalfWidth(){if(hasRequiredIsHalfWidth)return isHalfWidth;hasRequiredIsHalfWidth=1,Object.defineProperty(isHalfWidth,"__esModule",{value:!0}),isHalfWidth.default=si,isHalfWidth.halfWidth=void 0;var Ws=ws(requireAssertString());function ws(ii){return ii&&ii.__esModule?ii:{default:ii}}var oi=isHalfWidth.halfWidth=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;function si(ii){return(0,Ws.default)(ii),oi.test(ii)}return isHalfWidth}var isVariableWidth={exports:{}},hasRequiredIsVariableWidth;function requireIsVariableWidth(){return hasRequiredIsVariableWidth||(hasRequiredIsVariableWidth=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ai(requireAssertString()),si=requireIsFullWidth(),ii=requireIsHalfWidth();function ai(ci){return ci&&ci.__esModule?ci:{default:ci}}function li(ci){return(0,oi.default)(ci),si.fullWidth.test(ci)&&ii.halfWidth.test(ci)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isVariableWidth,isVariableWidth.exports)),isVariableWidth.exports}var isMultibyte={exports:{}},hasRequiredIsMultibyte;function requireIsMultibyte(){return hasRequiredIsMultibyte||(hasRequiredIsMultibyte=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/[^\x00-\x7F]/;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isMultibyte,isMultibyte.exports)),isMultibyte.exports}var isSemVer={exports:{}},multilineRegex={exports:{}},hasRequiredMultilineRegex;function requireMultilineRegex(){return hasRequiredMultilineRegex||(hasRequiredMultilineRegex=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=oi;function oi(si,ii){var ai=si.join("");return new RegExp(ai,ii)}Ws.exports=ws.default,Ws.exports.default=ws.default}(multilineRegex,multilineRegex.exports)),multilineRegex.exports}var hasRequiredIsSemVer;function requireIsSemVer(){return hasRequiredIsSemVer||(hasRequiredIsSemVer=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ii(requireAssertString()),si=ii(requireMultilineRegex());function ii(ci){return ci&&ci.__esModule?ci:{default:ci}}var ai=(0,si.default)(["^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)","(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))","?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$"],"i");function li(ci){return(0,oi.default)(ci),ai.test(ci)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isSemVer,isSemVer.exports)),isSemVer.exports}var isSurrogatePair={exports:{}},hasRequiredIsSurrogatePair;function requireIsSurrogatePair(){return hasRequiredIsSurrogatePair||(hasRequiredIsSurrogatePair=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/[\uD800-\uDBFF][\uDC00-\uDFFF]/;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isSurrogatePair,isSurrogatePair.exports)),isSurrogatePair.exports}var isDecimal={exports:{}},includes={exports:{}},hasRequiredIncludes;function requireIncludes(){return hasRequiredIncludes||(hasRequiredIncludes=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=void 0;var oi=function(si,ii){return si.some(function(ai){return ii===ai})};ws.default=oi,Ws.exports=ws.default,Ws.exports.default=ws.default}(includes,includes.exports)),includes.exports}var hasRequiredIsDecimal;function requireIsDecimal(){return hasRequiredIsDecimal||(hasRequiredIsDecimal=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=hi;var oi=li(requireMerge()),si=li(requireAssertString()),ii=li(requireIncludes()),ai=requireAlpha();function li(pi){return pi&&pi.__esModule?pi:{default:pi}}function ci(pi){var ha=new RegExp("^[-+]?([0-9]+)?(\\".concat(ai.decimal[pi.locale],"[0-9]{").concat(pi.decimal_digits,"})").concat(pi.force_decimal?"":"?","$"));return ha}var ui={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},di=["","-","+"];function hi(pi,ha){if((0,si.default)(pi),ha=(0,oi.default)(ha,ui),ha.locale in ai.decimal)return!(0,ii.default)(di,pi.replace(/ /g,""))&&ci(ha).test(pi);throw new Error("Invalid locale '".concat(ha.locale,"'"))}Ws.exports=ws.default,Ws.exports.default=ws.default}(isDecimal,isDecimal.exports)),isDecimal.exports}var isHexadecimal={exports:{}},hasRequiredIsHexadecimal;function requireIsHexadecimal(){return hasRequiredIsHexadecimal||(hasRequiredIsHexadecimal=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^(0x|0h)?[0-9A-F]+$/i;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isHexadecimal,isHexadecimal.exports)),isHexadecimal.exports}var isOctal={exports:{}},hasRequiredIsOctal;function requireIsOctal(){return hasRequiredIsOctal||(hasRequiredIsOctal=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^(0o)?[0-7]+$/i;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isOctal,isOctal.exports)),isOctal.exports}var isDivisibleBy={exports:{}},hasRequiredIsDivisibleBy;function requireIsDivisibleBy(){return hasRequiredIsDivisibleBy||(hasRequiredIsDivisibleBy=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=ii(requireAssertString()),si=ii(requireToFloat());function ii(li){return li&&li.__esModule?li:{default:li}}function ai(li,ci){return(0,oi.default)(li),(0,si.default)(li)%parseInt(ci,10)===0}Ws.exports=ws.default,Ws.exports.default=ws.default}(isDivisibleBy,isDivisibleBy.exports)),isDivisibleBy.exports}var isHexColor={exports:{}},hasRequiredIsHexColor;function requireIsHexColor(){return hasRequiredIsHexColor||(hasRequiredIsHexColor=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isHexColor,isHexColor.exports)),isHexColor.exports}var isRgbColor={exports:{}},hasRequiredIsRgbColor;function requireIsRgbColor(){return hasRequiredIsRgbColor||(hasRequiredIsRgbColor=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ui;var oi=si(requireAssertString());function si(di){return di&&di.__esModule?di:{default:di}}var ii=/^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/,ai=/^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/,li=/^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/,ci=/^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/;function ui(di){var hi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,oi.default)(di),hi?ii.test(di)||ai.test(di)||li.test(di)||ci.test(di):ii.test(di)||ai.test(di)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isRgbColor,isRgbColor.exports)),isRgbColor.exports}var isHSL={exports:{}},hasRequiredIsHSL;function requireIsHSL(){return hasRequiredIsHSL||(hasRequiredIsHSL=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=si(requireAssertString());function si(ci){return ci&&ci.__esModule?ci:{default:ci}}var ii=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i,ai=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i;function li(ci){(0,oi.default)(ci);var ui=ci.replace(/\s+/g," ").replace(/\s?(hsla?\(|\)|,)\s?/ig,"$1");return ui.indexOf(",")!==-1?ii.test(ui):ai.test(ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isHSL,isHSL.exports)),isHSL.exports}var isISRC={exports:{}},hasRequiredIsISRC;function requireIsISRC(){return hasRequiredIsISRC||(hasRequiredIsISRC=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isISRC,isISRC.exports)),isISRC.exports}var isIBAN={},hasRequiredIsIBAN;function requireIsIBAN(){if(hasRequiredIsIBAN)return isIBAN;hasRequiredIsIBAN=1,Object.defineProperty(isIBAN,"__esModule",{value:!0}),isIBAN.default=li,isIBAN.locales=void 0;var Ws=ws(requireAssertString());function ws(ci){return ci&&ci.__esModule?ci:{default:ci}}var oi={AD:/^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\d{3}\d{16}$/,AL:/^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,BA:/^(BA[0-9]{2})\d{16}$/,BE:/^(BE[0-9]{2})\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,CH:/^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\d{18}$/,CY:/^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\d{20}$/,DE:/^(DE[0-9]{2})\d{18}$/,DK:/^(DK[0-9]{2})\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\d{20}$/,DZ:/^(DZ\d{24})$/,EE:/^(EE[0-9]{2})\d{16}$/,EG:/^(EG[0-9]{2})\d{25}$/,ES:/^(ES[0-9]{2})\d{20}$/,FI:/^(FI[0-9]{2})\d{14}$/,FO:/^(FO[0-9]{2})\d{14}$/,FR:/^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\d{14}$/,GR:/^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\d{17}$/,HU:/^(HU[0-9]{2})\d{24}$/,IE:/^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/,IL:/^(IL[0-9]{2})\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,IR:/^(IR[0-9]{2})0\d{2}0\d{18}$/,IS:/^(IS[0-9]{2})\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\d{16}$/,LU:/^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MA:/^(MA[0-9]{26})$/,MC:/^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\d{18}$/,MK:/^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,MR:/^(MR[0-9]{2})\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\d{10}$/,NO:/^(NO[0-9]{2})\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,PL:/^(PL[0-9]{2})\d{24}$/,PS:/^(PS[0-9]{2})[A-Z0-9]{4}\d{21}$/,PT:/^(PT[0-9]{2})\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\d{18}$/,SA:/^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z0-9]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/};function si(ci){var ui=ci.filter(function(di){return!(di in oi)});return!(ui.length>0)}function ii(ci,ui){var di=ci.replace(/[\s\-]+/gi,"").toUpperCase(),hi=di.slice(0,2).toUpperCase(),pi=hi in oi;if(ui.whitelist){if(!si(ui.whitelist))return!1;var ha=ui.whitelist.includes(hi);if(!ha)return!1}if(ui.blacklist){var ga=ui.blacklist.includes(hi);if(ga)return!1}return pi&&oi[hi].test(di)}function ai(ci){var ui=ci.replace(/[^A-Z0-9]+/gi,"").toUpperCase(),di=ui.slice(4)+ui.slice(0,4),hi=di.replace(/[A-Z]/g,function(ha){return ha.charCodeAt(0)-55}),pi=hi.match(/\d{1,7}/g).reduce(function(ha,ga){return Number(ha+ga)%97},"");return pi===1}function li(ci){var ui=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,Ws.default)(ci),ii(ci,ui)&&ai(ci)}return isIBAN.locales=Object.keys(oi),isIBAN}var isBIC={exports:{}},isISO31661Alpha2={},hasRequiredIsISO31661Alpha2;function requireIsISO31661Alpha2(){if(hasRequiredIsISO31661Alpha2)return isISO31661Alpha2;hasRequiredIsISO31661Alpha2=1,Object.defineProperty(isISO31661Alpha2,"__esModule",{value:!0}),isISO31661Alpha2.CountryCodes=void 0,isISO31661Alpha2.default=si;var Ws=ws(requireAssertString());function ws(ii){return ii&&ii.__esModule?ii:{default:ii}}var oi=new Set(["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]);function si(ii){return(0,Ws.default)(ii),oi.has(ii.toUpperCase())}return isISO31661Alpha2.CountryCodes=oi,isISO31661Alpha2}var hasRequiredIsBIC;function requireIsBIC(){return hasRequiredIsBIC||(hasRequiredIsBIC=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ii(requireAssertString()),si=requireIsISO31661Alpha2();function ii(ci){return ci&&ci.__esModule?ci:{default:ci}}var ai=/^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;function li(ci){(0,oi.default)(ci);var ui=ci.slice(4,6).toUpperCase();return!si.CountryCodes.has(ui)&&ui!=="XK"?!1:ai.test(ci)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isBIC,isBIC.exports)),isBIC.exports}var isMD5={exports:{}},hasRequiredIsMD5;function requireIsMD5(){return hasRequiredIsMD5||(hasRequiredIsMD5=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^[a-f0-9]{32}$/;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isMD5,isMD5.exports)),isMD5.exports}var isHash={exports:{}},hasRequiredIsHash;function requireIsHash(){return hasRequiredIsHash||(hasRequiredIsHash=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};function ai(li,ci){(0,oi.default)(li);var ui=new RegExp("^[a-fA-F0-9]{".concat(ii[ci],"}$"));return ui.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isHash,isHash.exports)),isHash.exports}var isJWT={exports:{}},isBase64={exports:{}},hasRequiredIsBase64;function requireIsBase64(){return hasRequiredIsBase64||(hasRequiredIsBase64=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ui;var oi=ii(requireAssertString()),si=ii(requireMerge());function ii(di){return di&&di.__esModule?di:{default:di}}var ai=/[^A-Z0-9+\/=]/i,li=/^[A-Z0-9_\-]*$/i,ci={urlSafe:!1};function ui(di,hi){(0,oi.default)(di),hi=(0,si.default)(hi,ci);var pi=di.length;if(hi.urlSafe)return li.test(di);if(pi%4!==0||ai.test(di))return!1;var ha=di.indexOf("=");return ha===-1||ha===pi-1||ha===pi-2&&di[pi-1]==="="}Ws.exports=ws.default,Ws.exports.default=ws.default}(isBase64,isBase64.exports)),isBase64.exports}var hasRequiredIsJWT;function requireIsJWT(){return hasRequiredIsJWT||(hasRequiredIsJWT=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=ii(requireAssertString()),si=ii(requireIsBase64());function ii(li){return li&&li.__esModule?li:{default:li}}function ai(li){(0,oi.default)(li);var ci=li.split("."),ui=ci.length;return ui!==3?!1:ci.reduce(function(di,hi){return di&&(0,si.default)(hi,{urlSafe:!0})},!0)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isJWT,isJWT.exports)),isJWT.exports}var isJSON={exports:{}},hasRequiredIsJSON;function requireIsJSON(){return hasRequiredIsJSON||(hasRequiredIsJSON=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=ii(requireAssertString()),si=ii(requireMerge());function ii(ui){return ui&&ui.__esModule?ui:{default:ui}}function ai(ui){"@babel/helpers - typeof";return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(di){return typeof di}:function(di){return di&&typeof Symbol=="function"&&di.constructor===Symbol&&di!==Symbol.prototype?"symbol":typeof di},ai(ui)}var li={allow_primitives:!1};function ci(ui,di){(0,oi.default)(ui);try{di=(0,si.default)(di,li);var hi=[];di.allow_primitives&&(hi=[null,!1,!0]);var pi=JSON.parse(ui);return hi.includes(pi)||!!pi&&ai(pi)==="object"}catch{}return!1}Ws.exports=ws.default,Ws.exports.default=ws.default}(isJSON,isJSON.exports)),isJSON.exports}var isEmpty={exports:{}},hasRequiredIsEmpty;function requireIsEmpty(){return hasRequiredIsEmpty||(hasRequiredIsEmpty=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ii(requireAssertString()),si=ii(requireMerge());function ii(ci){return ci&&ci.__esModule?ci:{default:ci}}var ai={ignore_whitespace:!1};function li(ci,ui){return(0,oi.default)(ci),ui=(0,si.default)(ui,ai),(ui.ignore_whitespace?ci.trim().length:ci.length)===0}Ws.exports=ws.default,Ws.exports.default=ws.default}(isEmpty,isEmpty.exports)),isEmpty.exports}var isLength={exports:{}},hasRequiredIsLength;function requireIsLength(){return hasRequiredIsLength||(hasRequiredIsLength=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}function ii(li){"@babel/helpers - typeof";return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ci){return typeof ci}:function(ci){return ci&&typeof Symbol=="function"&&ci.constructor===Symbol&&ci!==Symbol.prototype?"symbol":typeof ci},ii(li)}function ai(li,ci){(0,oi.default)(li);var ui,di;ii(ci)==="object"?(ui=ci.min||0,di=ci.max):(ui=arguments[1]||0,di=arguments[2]);var hi=li.match(/(\uFE0F|\uFE0E)/g)||[],pi=li.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],ha=li.length-hi.length-pi.length;return ha>=ui&&(typeof di>"u"||ha<=di)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isLength,isLength.exports)),isLength.exports}var isUUID={exports:{}},hasRequiredIsUUID;function requireIsUUID(){return hasRequiredIsUUID||(hasRequiredIsUUID=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};function ai(li,ci){(0,oi.default)(li);var ui=ii[[void 0,null].includes(ci)?"all":ci];return!!ui&&ui.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isUUID,isUUID.exports)),isUUID.exports}var isMongoId={exports:{}},hasRequiredIsMongoId;function requireIsMongoId(){return hasRequiredIsMongoId||(hasRequiredIsMongoId=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=ii(requireAssertString()),si=ii(requireIsHexadecimal());function ii(li){return li&&li.__esModule?li:{default:li}}function ai(li){return(0,oi.default)(li),(0,si.default)(li)&&li.length===24}Ws.exports=ws.default,Ws.exports.default=ws.default}(isMongoId,isMongoId.exports)),isMongoId.exports}var isAfter={exports:{}},hasRequiredIsAfter;function requireIsAfter(){return hasRequiredIsAfter||(hasRequiredIsAfter=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireToDate());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){var ci=(li==null?void 0:li.comparisonDate)||li||Date().toString(),ui=(0,oi.default)(ci),di=(0,oi.default)(ai);return!!(di&&ui&&di>ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isAfter,isAfter.exports)),isAfter.exports}var isBefore={exports:{}},hasRequiredIsBefore;function requireIsBefore(){return hasRequiredIsBefore||(hasRequiredIsBefore=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=ii(requireAssertString()),si=ii(requireToDate());function ii(li){return li&&li.__esModule?li:{default:li}}function ai(li){var ci=arguments.length>1&&arguments[1]!==void 0?arguments[1]:String(new Date);(0,oi.default)(li);var ui=(0,si.default)(ci),di=(0,si.default)(li);return!!(di&&ui&&di<ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isBefore,isBefore.exports)),isBefore.exports}var isIn={exports:{}},hasRequiredIsIn;function requireIsIn(){return hasRequiredIsIn||(hasRequiredIsIn=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ii(requireAssertString()),si=ii(requireToString());function ii(ci){return ci&&ci.__esModule?ci:{default:ci}}function ai(ci){"@babel/helpers - typeof";return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ui){return typeof ui}:function(ui){return ui&&typeof Symbol=="function"&&ui.constructor===Symbol&&ui!==Symbol.prototype?"symbol":typeof ui},ai(ci)}function li(ci,ui){(0,oi.default)(ci);var di;if(Object.prototype.toString.call(ui)==="[object Array]"){var hi=[];for(di in ui)({}).hasOwnProperty.call(ui,di)&&(hi[di]=(0,si.default)(ui[di]));return hi.indexOf(ci)>=0}else{if(ai(ui)==="object")return ui.hasOwnProperty(ci);if(ui&&typeof ui.indexOf=="function")return ui.indexOf(ci)>=0}return!1}Ws.exports=ws.default,Ws.exports.default=ws.default}(isIn,isIn.exports)),isIn.exports}var isLuhnNumber={exports:{}},hasRequiredIsLuhnNumber;function requireIsLuhnNumber(){return hasRequiredIsLuhnNumber||(hasRequiredIsLuhnNumber=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){(0,oi.default)(ai);for(var li=ai.replace(/[- ]+/g,""),ci=0,ui,di,hi,pi=li.length-1;pi>=0;pi--)ui=li.substring(pi,pi+1),di=parseInt(ui,10),hi?(di*=2,di>=10?ci+=di%10+1:ci+=di):ci+=di,hi=!hi;return!!(ci%10===0&&li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isLuhnNumber,isLuhnNumber.exports)),isLuhnNumber.exports}var isCreditCard={exports:{}},hasRequiredIsCreditCard;function requireIsCreditCard(){return hasRequiredIsCreditCard||(hasRequiredIsCreditCard=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=ii(requireAssertString()),si=ii(requireIsLuhnNumber());function ii(ui){return ui&&ui.__esModule?ui:{default:ui}}var ai={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\d{3})\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},li=function(){var ui=[];for(var di in ai)ai.hasOwnProperty(di)&&ui.push(ai[di]);return ui}();function ci(ui){var di=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,oi.default)(ui);var hi=di.provider,pi=ui.replace(/[- ]+/g,"");if(hi&&hi.toLowerCase()in ai){if(!ai[hi.toLowerCase()].test(pi))return!1}else{if(hi&&!(hi.toLowerCase()in ai))throw new Error("".concat(hi," is not a valid credit card provider."));if(!li.some(function(ha){return ha.test(pi)}))return!1}return(0,si.default)(ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isCreditCard,isCreditCard.exports)),isCreditCard.exports}var isIdentityCard={exports:{}},hasRequiredIsIdentityCard;function requireIsIdentityCard(){return hasRequiredIsIdentityCard||(hasRequiredIsIdentityCard=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ii(requireAssertString()),si=ii(requireIsInt());function ii(ci){return ci&&ci.__esModule?ci:{default:ci}}var ai={PL:function(ci){(0,oi.default)(ci);var ui={1:1,2:3,3:7,4:9,5:1,6:3,7:7,8:9,9:1,10:3,11:0};if(ci!=null&&ci.length===11&&(0,si.default)(ci,{allow_leading_zeroes:!0})){var di=ci.split("").slice(0,-1),hi=di.reduce(function(ga,va,ba){return ga+Number(va)*ui[ba+1]},0),pi=hi%10,ha=Number(ci.charAt(ci.length-1));if(pi===0&&ha===0||ha===10-pi)return!0}return!1},ES:function(ci){(0,oi.default)(ci);var ui=/^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/,di={X:0,Y:1,Z:2},hi=["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"],pi=ci.trim().toUpperCase();if(!ui.test(pi))return!1;var ha=pi.slice(0,-1).replace(/[X,Y,Z]/g,function(ga){return di[ga]});return pi.endsWith(hi[ha%23])},FI:function(ci){if((0,oi.default)(ci),ci.length!==11||!ci.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/))return!1;var ui="0123456789ABCDEFHJKLMNPRSTUVWXY",di=parseInt(ci.slice(0,6),10)*1e3+parseInt(ci.slice(7,10),10),hi=di%31,pi=ui[hi];return pi===ci.slice(10,11)},IN:function(ci){var ui=/^[1-9]\d{3}\s?\d{4}\s?\d{4}$/,di=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],hi=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],pi=ci.trim();if(!ui.test(pi))return!1;var ha=0,ga=pi.replace(/\s/g,"").split("").map(Number).reverse();return ga.forEach(function(va,ba){ha=di[ha][hi[ba%8][va]]}),ha===0},IR:function(ci){if(!ci.match(/^\d{10}$/)||(ci="0000".concat(ci).slice(ci.length-6),parseInt(ci.slice(3,9),10)===0))return!1;for(var ui=parseInt(ci.slice(9,10),10),di=0,hi=0;hi<9;hi++)di+=parseInt(ci.slice(hi,hi+1),10)*(10-hi);return di%=11,di<2&&ui===di||di>=2&&ui===11-di},IT:function(ci){return ci.length!==9||ci==="CA00000AA"?!1:ci.search(/C[A-Z]\d{5}[A-Z]{2}/i)>-1},NO:function(ci){var ui=ci.trim();if(isNaN(Number(ui))||ui.length!==11||ui==="00000000000")return!1;var di=ui.split("").map(Number),hi=(11-(3*di[0]+7*di[1]+6*di[2]+1*di[3]+8*di[4]+9*di[5]+4*di[6]+5*di[7]+2*di[8])%11)%11,pi=(11-(5*di[0]+4*di[1]+3*di[2]+2*di[3]+7*di[4]+6*di[5]+5*di[6]+4*di[7]+3*di[8]+2*hi)%11)%11;return!(hi!==di[9]||pi!==di[10])},TH:function(ci){if(!ci.match(/^[1-8]\d{12}$/))return!1;for(var ui=0,di=0;di<12;di++)ui+=parseInt(ci[di],10)*(13-di);return ci[12]===((11-ui%11)%10).toString()},LK:function(ci){var ui=/^[1-9]\d{8}[vx]$/i,di=/^[1-9]\d{11}$/i;return ci.length===10&&ui.test(ci)?!0:!!(ci.length===12&&di.test(ci))},"he-IL":function(ci){var ui=/^\d{9}$/,di=ci.trim();if(!ui.test(di))return!1;for(var hi=di,pi=0,ha,ga=0;ga<hi.length;ga++)ha=Number(hi[ga])*(ga%2+1),pi+=ha>9?ha-9:ha;return pi%10===0},"ar-LY":function(ci){var ui=/^(1|2)\d{11}$/,di=ci.trim();return!!ui.test(di)},"ar-TN":function(ci){var ui=/^\d{8}$/,di=ci.trim();return!!ui.test(di)},"zh-CN":function(ci){var ui=["11","12","13","14","15","21","22","23","31","32","33","34","35","36","37","41","42","43","44","45","46","50","51","52","53","54","61","62","63","64","65","71","81","82","91"],di=["7","9","10","5","8","4","2","1","6","3","7","9","10","5","8","4","2"],hi=["1","0","X","9","8","7","6","5","4","3","2"],pi=function(Ca){return ui.includes(Ca)},ha=function(Ca){var el=parseInt(Ca.substring(0,4),10),ku=parseInt(Ca.substring(4,6),10),gd=parseInt(Ca.substring(6),10),Ed=new Date(el,ku-1,gd);return Ed>new Date?!1:Ed.getFullYear()===el&&Ed.getMonth()===ku-1&&Ed.getDate()===gd},ga=function(Ca){for(var el=Ca.substring(0,17),ku=0,gd=0;gd<17;gd++)ku+=parseInt(el.charAt(gd),10)*parseInt(di[gd],10);var Ed=ku%11;return hi[Ed]},va=function(Ca){return ga(Ca)===Ca.charAt(17).toUpperCase()},ba=function(Ca){var el=/^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(Ca);if(!el)return!1;var ku=Ca.substring(0,2);if(el=pi(ku),!el)return!1;var gd="19".concat(Ca.substring(6,12));return el=ha(gd),!!el},wa=function(Ca){var el=/^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(Ca);if(!el)return!1;var ku=Ca.substring(0,2);if(el=pi(ku),!el)return!1;var gd=Ca.substring(6,14);return el=ha(gd),el?va(Ca):!1},xa=function(Ca){var el=/^\d{15}|(\d{17}(\d|x|X))$/.test(Ca);return el?Ca.length===15?ba(Ca):wa(Ca):!1};return xa(ci)},"zh-HK":function(ci){ci=ci.trim();var ui=/^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/,di=/^[0-9]$/;if(ci=ci.toUpperCase(),!ui.test(ci))return!1;ci=ci.replace(/\[|\]|\(|\)/g,""),ci.length===8&&(ci="3".concat(ci));for(var hi=0,pi=0;pi<=7;pi++){var ha=void 0;di.test(ci[pi])?ha=ci[pi]:ha=(ci[pi].charCodeAt(0)-55)%11,hi+=ha*(9-pi)}hi%=11;var ga;return hi===0?ga="0":hi===1?ga="A":ga=String(11-hi),ga===ci[ci.length-1]},"zh-TW":function(ci){var ui={A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:34,J:18,K:19,L:20,M:21,N:22,O:35,P:23,Q:24,R:25,S:26,T:27,U:28,V:29,W:32,X:30,Y:31,Z:33},di=ci.trim().toUpperCase();return/^[A-Z][0-9]{9}$/.test(di)?Array.from(di).reduce(function(hi,pi,ha){if(ha===0){var ga=ui[pi];return ga%10*9+Math.floor(ga/10)}return ha===9?(10-hi%10-Number(pi))%10===0:hi+Number(pi)*(9-ha)},0):!1}};function li(ci,ui){if((0,oi.default)(ci),ui in ai)return ai[ui](ci);if(ui==="any"){for(var di in ai)if(ai.hasOwnProperty(di)){var hi=ai[di];if(hi(ci))return!0}return!1}throw new Error("Invalid locale '".concat(ui,"'"))}Ws.exports=ws.default,Ws.exports.default=ws.default}(isIdentityCard,isIdentityCard.exports)),isIdentityCard.exports}var isEAN={exports:{}},hasRequiredIsEAN;function requireIsEAN(){return hasRequiredIsEAN||(hasRequiredIsEAN=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=di;var oi=si(requireAssertString());function si(hi){return hi&&hi.__esModule?hi:{default:hi}}var ii=8,ai=14,li=/^(\d{8}|\d{13}|\d{14})$/;function ci(hi,pi){return hi===ii||hi===ai?pi%2===0?3:1:pi%2===0?1:3}function ui(hi){var pi=hi.slice(0,-1).split("").map(function(ga,va){return Number(ga)*ci(hi.length,va)}).reduce(function(ga,va){return ga+va},0),ha=10-pi%10;return ha<10?ha:0}function di(hi){(0,oi.default)(hi);var pi=Number(hi.slice(-1));return li.test(hi)&&pi===ui(hi)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isEAN,isEAN.exports)),isEAN.exports}var isISIN={exports:{}},hasRequiredIsISIN;function requireIsISIN(){return hasRequiredIsISIN||(hasRequiredIsISIN=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;function ai(li){if((0,oi.default)(li),!ii.test(li))return!1;for(var ci=!0,ui=0,di=li.length-2;di>=0;di--)if(li[di]>="A"&&li[di]<="Z")for(var hi=li[di].charCodeAt(0)-55,pi=hi%10,ha=Math.trunc(hi/10),ga=0,va=[pi,ha];ga<va.length;ga++){var ba=va[ga];ci?ba>=5?ui+=1+(ba-5)*2:ui+=ba*2:ui+=ba,ci=!ci}else{var wa=li[di].charCodeAt(0)-48;ci?wa>=5?ui+=1+(wa-5)*2:ui+=wa*2:ui+=wa,ci=!ci}var xa=Math.trunc((ui+9)/10)*10-ui;return+li[li.length-1]===xa}Ws.exports=ws.default,Ws.exports.default=ws.default}(isISIN,isISIN.exports)),isISIN.exports}var isISBN={exports:{}},hasRequiredIsISBN;function requireIsISBN(){return hasRequiredIsISBN||(hasRequiredIsISBN=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=si(requireAssertString());function si(ui){return ui&&ui.__esModule?ui:{default:ui}}var ii=/^(?:[0-9]{9}X|[0-9]{10})$/,ai=/^(?:[0-9]{13})$/,li=[1,3];function ci(ui,di){(0,oi.default)(ui);var hi=String((di==null?void 0:di.version)||di);if(!(di!=null&&di.version||di))return ci(ui,{version:10})||ci(ui,{version:13});var pi=ui.replace(/[\s-]+/g,""),ha=0;if(hi==="10"){if(!ii.test(pi))return!1;for(var ga=0;ga<hi-1;ga++)ha+=(ga+1)*pi.charAt(ga);if(pi.charAt(9)==="X"?ha+=10*10:ha+=10*pi.charAt(9),ha%11===0)return!0}else if(hi==="13"){if(!ai.test(pi))return!1;for(var va=0;va<12;va++)ha+=li[va%2]*pi.charAt(va);if(pi.charAt(12)-(10-ha%10)%10===0)return!0}return!1}Ws.exports=ws.default,Ws.exports.default=ws.default}(isISBN,isISBN.exports)),isISBN.exports}var isISSN={exports:{}},hasRequiredIsISSN;function requireIsISSN(){return hasRequiredIsISSN||(hasRequiredIsISSN=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii="^\\d{4}-?\\d{3}[\\dX]$";function ai(li){var ci=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,oi.default)(li);var ui=ii;if(ui=ci.require_hyphen?ui.replace("?",""):ui,ui=ci.case_sensitive?new RegExp(ui):new RegExp(ui,"i"),!ui.test(li))return!1;for(var di=li.replace("-","").toUpperCase(),hi=0,pi=0;pi<di.length;pi++){var ha=di[pi];hi+=(ha==="X"?10:+ha)*(8-pi)}return hi%11===0}Ws.exports=ws.default,Ws.exports.default=ws.default}(isISSN,isISSN.exports)),isISSN.exports}var isTaxID={exports:{}},algorithms={},hasRequiredAlgorithms;function requireAlgorithms(){if(hasRequiredAlgorithms)return algorithms;hasRequiredAlgorithms=1,Object.defineProperty(algorithms,"__esModule",{value:!0}),algorithms.iso7064Check=Ws,algorithms.luhnCheck=ws,algorithms.reverseMultiplyAndSum=oi,algorithms.verhoeffCheck=si;function Ws(ii){for(var ai=10,li=0;li<ii.length-1;li++)ai=(parseInt(ii[li],10)+ai)%10===0?10*2%11:(parseInt(ii[li],10)+ai)%10*2%11;return ai=ai===1?0:11-ai,ai===parseInt(ii[10],10)}function ws(ii){for(var ai=0,li=!1,ci=ii.length-1;ci>=0;ci--){if(li){var ui=parseInt(ii[ci],10)*2;ui>9?ai+=ui.toString().split("").map(function(di){return parseInt(di,10)}).reduce(function(di,hi){return di+hi},0):ai+=ui}else ai+=parseInt(ii[ci],10);li=!li}return ai%10===0}function oi(ii,ai){for(var li=0,ci=0;ci<ii.length;ci++)li+=ii[ci]*(ai-ci);return li}function si(ii){for(var ai=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],li=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],ci=ii.split("").reverse().join(""),ui=0,di=0;di<ci.length;di++)ui=ai[ui][li[di%8][parseInt(ci[di],10)]];return ui===0}return algorithms}var hasRequiredIsTaxID;function requireIsTaxID(){return hasRequiredIsTaxID||(hasRequiredIsTaxID=1,function(Ws,ws){function oi(vd){"@babel/helpers - typeof";return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Sd){return typeof Sd}:function(Sd){return Sd&&typeof Symbol=="function"&&Sd.constructor===Symbol&&Sd!==Symbol.prototype?"symbol":typeof Sd},oi(vd)}Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=tf;var si=ui(requireAssertString()),ii=ci(requireAlgorithms()),ai=ui(requireIsDate());function li(vd){if(typeof WeakMap!="function")return null;var Sd=new WeakMap,Id=new WeakMap;return(li=function(Bd){return Bd?Id:Sd})(vd)}function ci(vd,Sd){if(vd&&vd.__esModule)return vd;if(vd===null||oi(vd)!="object"&&typeof vd!="function")return{default:vd};var Id=li(Sd);if(Id&&Id.has(vd))return Id.get(vd);var Bd={__proto__:null},nf=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var lf in vd)if(lf!=="default"&&{}.hasOwnProperty.call(vd,lf)){var pf=nf?Object.getOwnPropertyDescriptor(vd,lf):null;pf&&(pf.get||pf.set)?Object.defineProperty(Bd,lf,pf):Bd[lf]=vd[lf]}return Bd.default=vd,Id&&Id.set(vd,Bd),Bd}function ui(vd){return vd&&vd.__esModule?vd:{default:vd}}function di(vd){return ga(vd)||ha(vd)||pi(vd)||hi()}function hi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
310
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pi(vd,Sd){if(vd){if(typeof vd=="string")return va(vd,Sd);var Id=Object.prototype.toString.call(vd).slice(8,-1);if(Id==="Object"&&vd.constructor&&(Id=vd.constructor.name),Id==="Map"||Id==="Set")return Array.from(vd);if(Id==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Id))return va(vd,Sd)}}function ha(vd){if(typeof Symbol<"u"&&vd[Symbol.iterator]!=null||vd["@@iterator"]!=null)return Array.from(vd)}function ga(vd){if(Array.isArray(vd))return va(vd)}function va(vd,Sd){(Sd==null||Sd>vd.length)&&(Sd=vd.length);for(var Id=0,Bd=new Array(Sd);Id<Sd;Id++)Bd[Id]=vd[Id];return Bd}function ba(vd){var Sd=vd.slice(0,2),Id=parseInt(vd.slice(2,4),10);Id>40?(Id-=40,Sd="20".concat(Sd)):Id>20?(Id-=20,Sd="18".concat(Sd)):Sd="19".concat(Sd),Id<10&&(Id="0".concat(Id));var Bd="".concat(Sd,"/").concat(Id,"/").concat(vd.slice(4,6));if(!(0,ai.default)(Bd,"YYYY/MM/DD"))return!1;for(var nf=vd.split("").map(function(vf){return parseInt(vf,10)}),lf=[2,4,8,5,10,9,7,3,6],pf=0,gf=0;gf<lf.length;gf++)pf+=nf[gf]*lf[gf];return pf=pf%11===10?0:pf%11,pf===nf[9]}function wa(vd){var Sd=vd.split(""),Id=Sd.filter(function(nf,lf){return lf%2}).map(function(nf){return Number(nf)*2}).join("").split(""),Bd=Sd.filter(function(nf,lf){return!(lf%2)}).concat(Id).map(function(nf){return Number(nf)}).reduce(function(nf,lf){return nf+lf});return Bd%10===0}function xa(vd){vd=vd.replace(/\W/,"");var Sd=parseInt(vd.slice(0,2),10);if(vd.length===10)Sd<54?Sd="20".concat(Sd):Sd="19".concat(Sd);else{if(vd.slice(6)==="000")return!1;if(Sd<54)Sd="19".concat(Sd);else return!1}Sd.length===3&&(Sd=[Sd.slice(0,2),"0",Sd.slice(2)].join(""));var Id=parseInt(vd.slice(2,4),10);if(Id>50&&(Id-=50),Id>20){if(parseInt(Sd,10)<2004)return!1;Id-=20}Id<10&&(Id="0".concat(Id));var Bd="".concat(Sd,"/").concat(Id,"/").concat(vd.slice(4,6));if(!(0,ai.default)(Bd,"YYYY/MM/DD"))return!1;if(vd.length===10&&parseInt(vd,10)%11!==0){var nf=parseInt(vd.slice(0,9),10)%11;if(parseInt(Sd,10)<1986&&nf===10){if(parseInt(vd.slice(9),10)!==0)return!1}else return!1}return!0}function Ca(vd){return ii.luhnCheck(vd)}function el(vd){for(var Sd=vd.split("").map(function(vf){return parseInt(vf,10)}),Id=[],Bd=0;Bd<Sd.length-1;Bd++){Id.push("");for(var nf=0;nf<Sd.length-1;nf++)Sd[Bd]===Sd[nf]&&(Id[Bd]+=nf)}if(Id=Id.filter(function(vf){return vf.length>1}),Id.length!==2&&Id.length!==3)return!1;if(Id[0].length===3){for(var lf=Id[0].split("").map(function(vf){return parseInt(vf,10)}),pf=0,gf=0;gf<lf.length-1;gf++)lf[gf]+1===lf[gf+1]&&(pf+=1);if(pf===2)return!1}return ii.iso7064Check(vd)}function ku(vd){vd=vd.replace(/\W/,"");var Sd=parseInt(vd.slice(4,6),10),Id=vd.slice(6,7);switch(Id){case"0":case"1":case"2":case"3":Sd="19".concat(Sd);break;case"4":case"9":Sd<37?Sd="20".concat(Sd):Sd="19".concat(Sd);break;default:if(Sd<37)Sd="20".concat(Sd);else if(Sd>58)Sd="18".concat(Sd);else return!1;break}Sd.length===3&&(Sd=[Sd.slice(0,2),"0",Sd.slice(2)].join(""));var Bd="".concat(Sd,"/").concat(vd.slice(2,4),"/").concat(vd.slice(0,2));if(!(0,ai.default)(Bd,"YYYY/MM/DD"))return!1;for(var nf=vd.split("").map(function(vf){return parseInt(vf,10)}),lf=0,pf=4,gf=0;gf<9;gf++)lf+=nf[gf]*pf,pf-=1,pf===1&&(pf=7);return lf%=11,lf===1?!1:lf===0?nf[9]===0:nf[9]===11-lf}function gd(vd){for(var Sd=vd.slice(0,8).split("").map(function(lf){return parseInt(lf,10)}),Id=0,Bd=1;Bd<Sd.length;Bd+=2)Id+=Sd[Bd];for(var nf=0;nf<Sd.length;nf+=2)Sd[nf]<2?Id+=1-Sd[nf]:(Id+=2*(Sd[nf]-2)+5,Sd[nf]>4&&(Id+=2));return String.fromCharCode(Id%26+65)===vd.charAt(8)}function Ed(vd){for(var Sd=vd.split("").map(function(nf){return parseInt(nf,10)}),Id=0,Bd=0;Bd<8;Bd++)Id+=Sd[Bd]*Math.pow(2,8-Bd);return Id%11%10===Sd[8]}function Od(vd){var Sd=ii.reverseMultiplyAndSum(vd.split("").slice(0,7).map(function(Id){return parseInt(Id,10)}),8);return vd.length===9&&vd[8]!=="W"&&(Sd+=(vd[8].charCodeAt(0)-64)*9),Sd%=23,Sd===0?vd[7].toUpperCase()==="W":vd[7].toUpperCase()===String.fromCharCode(64+Sd)}var Nd={andover:["10","12"],atlanta:["60","67"],austin:["50","53"],brookhaven:["01","02","03","04","05","06","11","13","14","16","21","22","23","25","34","51","52","54","55","56","57","58","59","65"],cincinnati:["30","32","35","36","37","38","61"],fresno:["15","24"],internet:["20","26","27","45","46","47"],kansas:["40","44"],memphis:["94","95"],ogden:["80","90"],philadelphia:["33","39","41","42","43","46","48","62","63","64","66","68","71","72","73","74","75","76","77","81","82","83","84","85","86","87","88","91","92","93","98","99"],sba:["31"]};function Pd(){var vd=[];for(var Sd in Nd)Nd.hasOwnProperty(Sd)&&vd.push.apply(vd,di(Nd[Sd]));return vd}function Ld(vd){return Pd().indexOf(vd.slice(0,2))!==-1}function rf(vd){for(var Sd=0,Id=vd.split(""),Bd=parseInt(Id.pop(),10),nf=0;nf<Id.length;nf++)Sd+=Id[9-nf]*(2+nf%6);var lf=11-Sd%11;return lf===11?lf=0:lf===10&&(lf=9),Bd===lf}function _d(vd){var Sd=vd.toUpperCase().split("");if(isNaN(parseInt(Sd[0],10))&&Sd.length>1){var Id=0;switch(Sd[0]){case"Y":Id=1;break;case"Z":Id=2;break}Sd.splice(0,1,Id)}else for(;Sd.length<9;)Sd.unshift(0);var Bd=["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"];Sd=Sd.join("");var nf=parseInt(Sd.slice(0,8),10)%23;return Sd[8]===Bd[nf]}function Md(vd){var Sd=vd.slice(1,3),Id=vd.slice(0,1);switch(Id){case"1":case"2":Sd="18".concat(Sd);break;case"3":case"4":Sd="19".concat(Sd);break;default:Sd="20".concat(Sd);break}var Bd="".concat(Sd,"/").concat(vd.slice(3,5),"/").concat(vd.slice(5,7));if(!(0,ai.default)(Bd,"YYYY/MM/DD"))return!1;for(var nf=vd.split("").map(function(bf){return parseInt(bf,10)}),lf=0,pf=1,gf=0;gf<10;gf++)lf+=nf[gf]*pf,pf+=1,pf===10&&(pf=1);if(lf%11===10){lf=0,pf=3;for(var vf=0;vf<10;vf++)lf+=nf[vf]*pf,pf+=1,pf===10&&(pf=1);if(lf%11===10)return nf[10]===0}return lf%11===nf[10]}function Td(vd){var Sd=vd.slice(4,6),Id=vd.slice(6,7);switch(Id){case"+":Sd="18".concat(Sd);break;case"-":Sd="19".concat(Sd);break;default:Sd="20".concat(Sd);break}var Bd="".concat(Sd,"/").concat(vd.slice(2,4),"/").concat(vd.slice(0,2));if(!(0,ai.default)(Bd,"YYYY/MM/DD"))return!1;var nf=parseInt(vd.slice(0,6)+vd.slice(7,10),10)%31;if(nf<10)return nf===parseInt(vd.slice(10),10);nf-=10;var lf=["A","B","C","D","E","F","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y"];return lf[nf]===vd.slice(10)}function wd(vd){if(vd.slice(2,4)!=="00"||vd.slice(4,6)!=="00"){var Sd="".concat(vd.slice(0,2),"/").concat(vd.slice(2,4),"/").concat(vd.slice(4,6));if(!(0,ai.default)(Sd,"YY/MM/DD"))return!1}var Id=97-parseInt(vd.slice(0,9),10)%97,Bd=parseInt(vd.slice(9,11),10);return!(Id!==Bd&&(Id=97-parseInt("2".concat(vd.slice(0,9)),10)%97,Id!==Bd))}function Cd(vd){vd=vd.replace(/\s/g,"");var Sd=parseInt(vd.slice(0,10),10)%511,Id=parseInt(vd.slice(10,13),10);return Sd===Id}function sf(vd){var Sd="".concat(vd.slice(0,4),"/").concat(vd.slice(4,6),"/").concat(vd.slice(6,8));return!(0,ai.default)(Sd,"YYYY/MM/DD")||!ii.luhnCheck(vd.slice(0,12))?!1:ii.verhoeffCheck("".concat(vd.slice(0,11)).concat(vd[12]))}function of(vd){return ii.iso7064Check(vd)}function Wd(vd){for(var Sd=vd.split("").map(function(nf){return parseInt(nf,10)}),Id=8,Bd=1;Bd<9;Bd++)Id+=Sd[Bd]*(Bd+1);return Id%11===Sd[9]}function df(vd){for(var Sd=!1,Id=!1,Bd=0;Bd<3;Bd++)if(!Sd&&/[AEIOU]/.test(vd[Bd]))Sd=!0;else if(!Id&&Sd&&vd[Bd]==="X")Id=!0;else if(Bd>0&&(Sd&&!Id&&!/[AEIOU]/.test(vd[Bd])||Id&&!/X/.test(vd[Bd])))return!1;return!0}function hf(vd){var Sd=vd.toUpperCase().split("");if(!df(Sd.slice(0,3))||!df(Sd.slice(3,6)))return!1;for(var Id=[6,7,9,10,12,13,14],Bd={L:"0",M:"1",N:"2",P:"3",Q:"4",R:"5",S:"6",T:"7",U:"8",V:"9"},nf=0,lf=Id;nf<lf.length;nf++){var pf=lf[nf];Sd[pf]in Bd&&Sd.splice(pf,1,Bd[Sd[pf]])}var gf={A:"01",B:"02",C:"03",D:"04",E:"05",H:"06",L:"07",M:"08",P:"09",R:"10",S:"11",T:"12"},vf=gf[Sd[8]],bf=parseInt(Sd[9]+Sd[10],10);bf>40&&(bf-=40),bf<10&&(bf="0".concat(bf));var If="".concat(Sd[6]).concat(Sd[7],"/").concat(vf,"/").concat(bf);if(!(0,ai.default)(If,"YY/MM/DD"))return!1;for(var Af=0,$f=1;$f<Sd.length-1;$f+=2){var Cf=parseInt(Sd[$f],10);isNaN(Cf)&&(Cf=Sd[$f].charCodeAt(0)-65),Af+=Cf}for(var _f={A:1,B:0,C:5,D:7,E:9,F:13,G:15,H:17,I:19,J:21,K:2,L:4,M:18,N:20,O:11,P:3,Q:6,R:8,S:12,T:14,U:16,V:10,W:22,X:25,Y:24,Z:23,0:1,1:0},Rf=0;Rf<Sd.length-1;Rf+=2){var Pf=0;if(Sd[Rf]in _f)Pf=_f[Sd[Rf]];else{var Ff=parseInt(Sd[Rf],10);Pf=2*Ff+1,Ff>4&&(Pf+=2)}Af+=Pf}return String.fromCharCode(65+Af%26)===Sd[15]}function xd(vd){vd=vd.replace(/\W/,"");var Sd=vd.slice(0,2);if(Sd!=="32"){var Id=vd.slice(2,4);if(Id!=="00"){var Bd=vd.slice(4,6);switch(vd[6]){case"0":Bd="18".concat(Bd);break;case"1":Bd="19".concat(Bd);break;default:Bd="20".concat(Bd);break}var nf="".concat(Bd,"/").concat(vd.slice(2,4),"/").concat(Sd);if(!(0,ai.default)(nf,"YYYY/MM/DD"))return!1}for(var lf=1101,pf=[1,6,3,7,9,10,5,8,4,2],gf=0;gf<vd.length-1;gf++)lf-=parseInt(vd[gf],10)*pf[gf];return parseInt(vd[10],10)===lf%11}return!0}function Fd(vd){if(vd.length!==9){for(var Sd=vd.toUpperCase().split("");Sd.length<8;)Sd.unshift(0);switch(vd[7]){case"A":case"P":if(parseInt(Sd[6],10)===0)return!1;break;default:{var Id=parseInt(Sd.join("").slice(0,5),10);if(Id>32e3)return!1;var Bd=parseInt(Sd.join("").slice(5,7),10);if(Id===Bd)return!1}}}return!0}function Vd(vd){return ii.reverseMultiplyAndSum(vd.split("").slice(0,8).map(function(Sd){return parseInt(Sd,10)}),9)%11===parseInt(vd[8],10)}function af(vd){if(vd.length===10){for(var Sd=[6,5,7,2,3,4,5,6,7],Id=0,Bd=0;Bd<Sd.length;Bd++)Id+=parseInt(vd[Bd],10)*Sd[Bd];return Id%=11,Id===10?!1:Id===parseInt(vd[9],10)}var nf=vd.slice(0,2),lf=parseInt(vd.slice(2,4),10);lf>80?(nf="18".concat(nf),lf-=80):lf>60?(nf="22".concat(nf),lf-=60):lf>40?(nf="21".concat(nf),lf-=40):lf>20?(nf="20".concat(nf),lf-=20):nf="19".concat(nf),lf<10&&(lf="0".concat(lf));var pf="".concat(nf,"/").concat(lf,"/").concat(vd.slice(4,6));if(!(0,ai.default)(pf,"YYYY/MM/DD"))return!1;for(var gf=0,vf=1,bf=0;bf<vd.length-1;bf++)gf+=parseInt(vd[bf],10)*vf%10,vf+=2,vf>10?vf=1:vf===5&&(vf+=2);return gf=10-gf%10,gf===parseInt(vd[10],10)}function ff(vd){if(vd.length===11){var Sd,Id;if(Sd=0,vd==="11111111111"||vd==="22222222222"||vd==="33333333333"||vd==="44444444444"||vd==="55555555555"||vd==="66666666666"||vd==="77777777777"||vd==="88888888888"||vd==="99999999999"||vd==="00000000000")return!1;for(var Bd=1;Bd<=9;Bd++)Sd+=parseInt(vd.substring(Bd-1,Bd),10)*(11-Bd);if(Id=Sd*10%11,Id===10&&(Id=0),Id!==parseInt(vd.substring(9,10),10))return!1;Sd=0;for(var nf=1;nf<=10;nf++)Sd+=parseInt(vd.substring(nf-1,nf),10)*(12-nf);return Id=Sd*10%11,Id===10&&(Id=0),Id===parseInt(vd.substring(10,11),10)}if(vd==="00000000000000"||vd==="11111111111111"||vd==="22222222222222"||vd==="33333333333333"||vd==="44444444444444"||vd==="55555555555555"||vd==="66666666666666"||vd==="77777777777777"||vd==="88888888888888"||vd==="99999999999999")return!1;for(var lf=vd.length-2,pf=vd.substring(0,lf),gf=vd.substring(lf),vf=0,bf=lf-7,If=lf;If>=1;If--)vf+=pf.charAt(lf-If)*bf,bf-=1,bf<2&&(bf=9);var Af=vf%11<2?0:11-vf%11;if(Af!==parseInt(gf.charAt(0),10))return!1;lf+=1,pf=vd.substring(0,lf),vf=0,bf=lf-7;for(var $f=lf;$f>=1;$f--)vf+=pf.charAt(lf-$f)*bf,bf-=1,bf<2&&(bf=9);return Af=vf%11<2?0:11-vf%11,Af===parseInt(gf.charAt(1),10)}function uf(vd){var Sd=11-ii.reverseMultiplyAndSum(vd.split("").slice(0,8).map(function(Id){return parseInt(Id,10)}),9)%11;return Sd>9?parseInt(vd[8],10)===0:Sd===parseInt(vd[8],10)}function mf(vd){if(vd.slice(0,4)!=="9000"){var Sd=vd.slice(1,3);switch(vd[0]){case"1":case"2":Sd="19".concat(Sd);break;case"3":case"4":Sd="18".concat(Sd);break;case"5":case"6":Sd="20".concat(Sd);break}var Id="".concat(Sd,"/").concat(vd.slice(3,5),"/").concat(vd.slice(5,7));if(Id.length===8){if(!(0,ai.default)(Id,"YY/MM/DD"))return!1}else if(!(0,ai.default)(Id,"YYYY/MM/DD"))return!1;for(var Bd=vd.split("").map(function(gf){return parseInt(gf,10)}),nf=[2,7,9,1,4,6,3,5,8,2,7,9],lf=0,pf=0;pf<nf.length;pf++)lf+=Bd[pf]*nf[pf];return lf%11===10?Bd[12]===1:Bd[12]===lf%11}return!0}function yf(vd){if(vd.length===9){if(vd=vd.replace(/\W/,""),vd.slice(6)==="000")return!1;var Sd=parseInt(vd.slice(0,2),10);if(Sd>53)return!1;Sd<10?Sd="190".concat(Sd):Sd="19".concat(Sd);var Id=parseInt(vd.slice(2,4),10);Id>50&&(Id-=50),Id<10&&(Id="0".concat(Id));var Bd="".concat(Sd,"/").concat(Id,"/").concat(vd.slice(4,6));if(!(0,ai.default)(Bd,"YYYY/MM/DD"))return!1}return!0}function Sf(vd){var Sd=11-ii.reverseMultiplyAndSum(vd.split("").slice(0,7).map(function(Id){return parseInt(Id,10)}),8)%11;return Sd===10?parseInt(vd[7],10)===0:Sd===parseInt(vd[7],10)}function Of(vd){var Sd=vd.slice(0);vd.length>11&&(Sd=Sd.slice(2));var Id="",Bd=Sd.slice(2,4),nf=parseInt(Sd.slice(4,6),10);if(vd.length>11)Id=vd.slice(0,4);else if(Id=vd.slice(0,2),vd.length===11&&nf<60){var lf=new Date().getFullYear().toString(),pf=parseInt(lf.slice(0,2),10);if(lf=parseInt(lf,10),vd[6]==="-")parseInt("".concat(pf).concat(Id),10)>lf?Id="".concat(pf-1).concat(Id):Id="".concat(pf).concat(Id);else if(Id="".concat(pf-1).concat(Id),lf-parseInt(Id,10)<100)return!1}nf>60&&(nf-=60),nf<10&&(nf="0".concat(nf));var gf="".concat(Id,"/").concat(Bd,"/").concat(nf);if(gf.length===8){if(!(0,ai.default)(gf,"YY/MM/DD"))return!1}else if(!(0,ai.default)(gf,"YYYY/MM/DD"))return!1;return ii.luhnCheck(vd.replace(/\W/,""))}function wf(vd){for(var Sd=vd.split("").map(function(lf){return parseInt(lf,10)}),Id=[-1,5,7,9,4,6,10,5,7],Bd=0,nf=0;nf<Id.length;nf++)Bd+=Sd[nf]*Id[nf];return Bd%11===10?Sd[9]===0:Sd[9]===Bd%11}var Ef={"bg-BG":/^\d{10}$/,"cs-CZ":/^\d{6}\/{0,1}\d{3,4}$/,"de-AT":/^\d{9}$/,"de-DE":/^[1-9]\d{10}$/,"dk-DK":/^\d{6}-{0,1}\d{4}$/,"el-CY":/^[09]\d{7}[A-Z]$/,"el-GR":/^([0-4]|[7-9])\d{8}$/,"en-CA":/^\d{9}$/,"en-GB":/^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i,"en-IE":/^\d{7}[A-W][A-IW]{0,1}$/i,"en-US":/^\d{2}[- ]{0,1}\d{7}$/,"es-AR":/(20|23|24|27|30|33|34)[0-9]{8}[0-9]/,"es-ES":/^(\d{0,8}|[XYZKLM]\d{7})[A-HJ-NP-TV-Z]$/i,"et-EE":/^[1-6]\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\d$/,"fi-FI":/^\d{6}[-+A]\d{3}[0-9A-FHJ-NPR-Y]$/i,"fr-BE":/^\d{11}$/,"fr-FR":/^[0-3]\d{12}$|^[0-3]\d\s\d{2}(\s\d{3}){3}$/,"fr-LU":/^\d{13}$/,"hr-HR":/^\d{11}$/,"hu-HU":/^8\d{9}$/,"it-IT":/^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i,"lv-LV":/^\d{6}-{0,1}\d{5}$/,"mt-MT":/^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i,"nl-NL":/^\d{9}$/,"pl-PL":/^\d{10,11}$/,"pt-BR":/(?:^\d{11}$)|(?:^\d{14}$)/,"pt-PT":/^\d{9}$/,"ro-RO":/^\d{13}$/,"sk-SK":/^\d{6}\/{0,1}\d{3,4}$/,"sl-SI":/^[1-9]\d{7}$/,"sv-SE":/^(\d{6}[-+]{0,1}\d{4}|(18|19|20)\d{6}[-+]{0,1}\d{4})$/,"uk-UA":/^\d{10}$/};Ef["lb-LU"]=Ef["fr-LU"],Ef["lt-LT"]=Ef["et-EE"],Ef["nl-BE"]=Ef["fr-BE"],Ef["fr-CA"]=Ef["en-CA"];var xf={"bg-BG":ba,"cs-CZ":xa,"de-AT":Ca,"de-DE":el,"dk-DK":ku,"el-CY":gd,"el-GR":Ed,"en-CA":wa,"en-IE":Od,"en-US":Ld,"es-AR":rf,"es-ES":_d,"et-EE":Md,"fi-FI":Td,"fr-BE":wd,"fr-FR":Cd,"fr-LU":sf,"hr-HR":of,"hu-HU":Wd,"it-IT":hf,"lv-LV":xd,"mt-MT":Fd,"nl-NL":Vd,"pl-PL":af,"pt-BR":ff,"pt-PT":uf,"ro-RO":mf,"sk-SK":yf,"sl-SI":Sf,"sv-SE":Of,"uk-UA":wf};xf["lb-LU"]=xf["fr-LU"],xf["lt-LT"]=xf["et-EE"],xf["nl-BE"]=xf["fr-BE"],xf["fr-CA"]=xf["en-CA"];var kd=/[-\\\/!@#$%\^&\*\(\)\+\=\[\]]+/g,Dd={"de-AT":kd,"de-DE":/[\/\\]/g,"fr-BE":kd};Dd["nl-BE"]=Dd["fr-BE"];function tf(vd){var Sd=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US";(0,si.default)(vd);var Id=vd.slice(0);if(Sd in Ef)return Sd in Dd&&(Id=Id.replace(Dd[Sd],"")),Ef[Sd].test(Id)?Sd in xf?xf[Sd](Id):!0:!1;throw new Error("Invalid locale '".concat(Sd,"'"))}Ws.exports=ws.default,Ws.exports.default=ws.default}(isTaxID,isTaxID.exports)),isTaxID.exports}var isMobilePhone={},hasRequiredIsMobilePhone;function requireIsMobilePhone(){if(hasRequiredIsMobilePhone)return isMobilePhone;hasRequiredIsMobilePhone=1,Object.defineProperty(isMobilePhone,"__esModule",{value:!0}),isMobilePhone.default=si,isMobilePhone.locales=void 0;var Ws=ws(requireAssertString());function ws(ii){return ii&&ii.__esModule?ii:{default:ii}}var oi={"am-AM":/^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/,"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-BH":/^(\+?973)?(3|6)\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-LB":/^(\+?961)?((3|81)\d{6}|7\d{7})$/,"ar-EG":/^((\+?20)|0)?1[0125]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)([569]\d{7}|41\d{6})$/,"ar-LY":/^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,"ar-MA":/^(?:(?:\+|00)212|0)[5-7]\d{8}$/,"ar-OM":/^((\+|00)968)?(9[1-9])\d{6}$/,"ar-PS":/^(\+?970|0)5[6|9](\d{7})$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SD":/^((\+?249)|0)?(9[012369]|1[012])\d{7}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"az-AZ":/^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/,"bs-BA":/^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/^(\+?880|0)1[13456789][0-9]{8}$/,"ca-AD":/^(\+376)?[346]\d{5}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,"de-AT":/^(\+43|0)\d{1,4}\d{3,12}$/,"de-CH":/^(\+41|0)([1-9])\d{1,9}$/,"de-LU":/^(\+352)?((6\d1)\d{6})$/,"dv-MV":/^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,"el-GR":/^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,"el-CY":/^(\+?357?)?(9(9|6)\d{6})$/,"en-AI":/^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-AG":/^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,"en-BM":/^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,"en-BS":/^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-GG":/^(\+?44|0)1481\d{6}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,"en-GY":/^(\+592|0)6\d{6}$/,"en-HK":/^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,"en-MO":/^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-JM":/^(\+?876)?\d{7}$/,"en-KE":/^(\+?254|0)(7|1)\d{8}$/,"fr-CF":/^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/,"en-SS":/^(\+?211|0)(9[1257])\d{7}$/,"en-KI":/^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,"en-KN":/^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,"en-LS":/^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,"en-MT":/^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-MW":/^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/,"en-NA":/^(\+?264|0)(6|8)\d{7}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PG":/^(\+?675|0)?(7\d|8[18])\d{6}$/,"en-PK":/^((00|\+)?92|0)3[0-6]\d{8}$/,"en-PH":/^(09|\+639)\d{9}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[3689]\d{7}$/,"en-SL":/^(\+?232|0)\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"en-ZW":/^(\+263)[0-9]{9}$/,"en-BW":/^(\+?267)?(7[1-8]{1})\d{6}$/,"es-AR":/^\+?549(11|[2368]\d)\d{8}$/,"es-BO":/^(\+?591)?(6|7)\d{7}$/,"es-CO":/^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,"es-CL":/^(\+?56|0)[2-9]\d{1}\d{7}$/,"es-CR":/^(\+506)?[2-8]\d{7}$/,"es-CU":/^(\+53|0053)?5\d{7}$/,"es-DO":/^(\+?1)?8[024]9\d{7}$/,"es-HN":/^(\+?504)?[9|8|3|2]\d{7}$/,"es-EC":/^(\+?593|0)([2-7]|9[2-9])\d{7}$/,"es-ES":/^(\+?34)?[6|7]\d{8}$/,"es-PE":/^(\+?51)?9\d{8}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-NI":/^(\+?505)\d{7,8}$/,"es-PA":/^(\+?507)\d{7,8}$/,"es-PY":/^(\+?595|0)9[9876]\d{7}$/,"es-SV":/^(\+?503)?[67]\d{7}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"es-VE":/^(\+?58)?(2|4)\d{9}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,"fj-FJ":/^(\+?679)?\s?\d{3}\s?\d{4}$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-BF":/^(\+226|0)[67]\d{7}$/,"fr-BJ":/^(\+229)\d{8}$/,"fr-CD":/^(\+?243|0)?(8|9)\d{8}$/,"fr-CM":/^(\+?237)6[0-9]{8}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"fr-GF":/^(\+?594|0|00594)[67]\d{8}$/,"fr-GP":/^(\+?590|0|00590)[67]\d{8}$/,"fr-MQ":/^(\+?596|0|00596)[67]\d{8}$/,"fr-PF":/^(\+?689)?8[789]\d{6}$/,"fr-RE":/^(\+?262|0|00262)[67]\d{8}$/,"fr-WF":/^(\+681)?\d{6}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36|06)(20|30|31|50|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"ir-IR":/^(\+98|0)?9\d{9}$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"it-SM":/^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,"ja-JP":/^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,"ka-GE":/^(\+?995)?(79\d{7}|5\d{8})$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"ky-KG":/^(\+?7\s?\+?7|0)\s?\d{2}\s?\d{3}\s?\d{4}$/,"lt-LT":/^(\+370|8)\d{8}$/,"lv-LV":/^(\+?371)2\d{7}$/,"mg-MG":/^((\+?261|0)(2|3)\d)?\d{7}$/,"mn-MN":/^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/,"my-MM":/^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,"ms-MY":/^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/,"mz-MZ":/^(\+?258)?8[234567]\d{7}$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"ne-NP":/^(\+?977)?9[78]\d{8}$/,"nl-BE":/^(\+?32|0)4\d{8}$/,"nl-NL":/^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,"nl-AW":/^(\+)?297(56|59|64|73|74|99)\d{5}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"pt-AO":/^(\+244)\d{9}$/,"ro-MD":/^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,"ro-RO":/^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"si-LK":/^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"so-SO":/^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/,"sq-AL":/^(\+355|0)6[789]\d{6}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"tg-TJ":/^(\+?992)?[5][5]\d{7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"tk-TM":/^(\+993|993|8)\d{8}$/,"uk-UA":/^(\+?38|8)?0\d{9}$/,"uz-UZ":/^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,"vi-VN":/^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/,"dz-BT":/^(\+?975|0)?(17|16|77|02)\d{6}$/,"ar-YE":/^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/,"ar-EH":/^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,"fa-AF":/^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/};oi["en-CA"]=oi["en-US"],oi["fr-CA"]=oi["en-CA"],oi["fr-BE"]=oi["nl-BE"],oi["zh-HK"]=oi["en-HK"],oi["zh-MO"]=oi["en-MO"],oi["ga-IE"]=oi["en-IE"],oi["fr-CH"]=oi["de-CH"],oi["it-CH"]=oi["fr-CH"];function si(ii,ai,li){if((0,Ws.default)(ii),li&&li.strictMode&&!ii.startsWith("+"))return!1;if(Array.isArray(ai))return ai.some(function(di){if(oi.hasOwnProperty(di)){var hi=oi[di];if(hi.test(ii))return!0}return!1});if(ai in oi)return oi[ai].test(ii);if(!ai||ai==="any"){for(var ci in oi)if(oi.hasOwnProperty(ci)){var ui=oi[ci];if(ui.test(ii))return!0}return!1}throw new Error("Invalid locale '".concat(ai,"'"))}return isMobilePhone.locales=Object.keys(oi),isMobilePhone}var isEthereumAddress={exports:{}},hasRequiredIsEthereumAddress;function requireIsEthereumAddress(){return hasRequiredIsEthereumAddress||(hasRequiredIsEthereumAddress=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^(0x)[0-9a-f]{40}$/i;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isEthereumAddress,isEthereumAddress.exports)),isEthereumAddress.exports}var isCurrency={exports:{}},hasRequiredIsCurrency;function requireIsCurrency(){return hasRequiredIsCurrency||(hasRequiredIsCurrency=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=ii(requireMerge()),si=ii(requireAssertString());function ii(ui){return ui&&ui.__esModule?ui:{default:ui}}function ai(ui){var di="\\d{".concat(ui.digits_after_decimal[0],"}");ui.digits_after_decimal.forEach(function(Ca,el){el!==0&&(di="".concat(di,"|\\d{").concat(Ca,"}"))});var hi="(".concat(ui.symbol.replace(/\W/,function(Ca){return"\\".concat(Ca)}),")").concat(ui.require_symbol?"":"?"),pi="-?",ha="[1-9]\\d*",ga="[1-9]\\d{0,2}(\\".concat(ui.thousands_separator,"\\d{3})*"),va=["0",ha,ga],ba="(".concat(va.join("|"),")?"),wa="(\\".concat(ui.decimal_separator,"(").concat(di,"))").concat(ui.require_decimal?"":"?"),xa=ba+(ui.allow_decimal||ui.require_decimal?wa:"");return ui.allow_negatives&&!ui.parens_for_negatives&&(ui.negative_sign_after_digits?xa+=pi:ui.negative_sign_before_digits&&(xa=pi+xa)),ui.allow_negative_sign_placeholder?xa="( (?!\\-))?".concat(xa):ui.allow_space_after_symbol?xa=" ?".concat(xa):ui.allow_space_after_digits&&(xa+="( (?!$))?"),ui.symbol_after_digits?xa+=hi:xa=hi+xa,ui.allow_negatives&&(ui.parens_for_negatives?xa="(\\(".concat(xa,"\\)|").concat(xa,")"):ui.negative_sign_before_digits||ui.negative_sign_after_digits||(xa=pi+xa)),new RegExp("^(?!-? )(?=.*\\d)".concat(xa,"$"))}var li={symbol:"$",require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:",",decimal_separator:".",allow_decimal:!0,require_decimal:!1,digits_after_decimal:[2],allow_space_after_digits:!1};function ci(ui,di){return(0,si.default)(ui),di=(0,oi.default)(di,li),ai(di).test(ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isCurrency,isCurrency.exports)),isCurrency.exports}var isBtcAddress={exports:{}},hasRequiredIsBtcAddress;function requireIsBtcAddress(){return hasRequiredIsBtcAddress||(hasRequiredIsBtcAddress=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=si(requireAssertString());function si(ci){return ci&&ci.__esModule?ci:{default:ci}}var ii=/^(bc1)[a-z0-9]{25,39}$/,ai=/^(1|3)[A-HJ-NP-Za-km-z1-9]{25,39}$/;function li(ci){return(0,oi.default)(ci),ii.test(ci)||ai.test(ci)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isBtcAddress,isBtcAddress.exports)),isBtcAddress.exports}var isISO6346={},hasRequiredIsISO6346;function requireIsISO6346(){if(hasRequiredIsISO6346)return isISO6346;hasRequiredIsISO6346=1,Object.defineProperty(isISO6346,"__esModule",{value:!0}),isISO6346.isFreightContainerID=void 0,isISO6346.isISO6346=ii;var Ws=ws(requireAssertString());function ws(ai){return ai&&ai.__esModule?ai:{default:ai}}var oi=/^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/,si=/^[0-9]$/;function ii(ai){if((0,Ws.default)(ai),ai=ai.toUpperCase(),!oi.test(ai))return!1;if(ai.length===11){for(var li=0,ci=0;ci<ai.length-1;ci++)if(si.test(ai[ci]))li+=ai[ci]*Math.pow(2,ci);else{var ui=void 0,di=ai.charCodeAt(ci)-55;di<11?ui=di:di>=11&&di<=20?ui=12+di%11:di>=21&&di<=30?ui=23+di%21:ui=34+di%31,li+=ui*Math.pow(2,ci)}var hi=li%11;return Number(ai[ai.length-1])===hi}return!0}return isISO6346.isFreightContainerID=ii,isISO6346}var isISO6391={exports:{}},hasRequiredIsISO6391;function requireIsISO6391(){return hasRequiredIsISO6391||(hasRequiredIsISO6391=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=new Set(["aa","ab","ae","af","ak","am","an","ar","as","av","ay","az","az","ba","be","bg","bh","bi","bm","bn","bo","br","bs","ca","ce","ch","co","cr","cs","cu","cv","cy","da","de","dv","dz","ee","el","en","eo","es","et","eu","fa","ff","fi","fj","fo","fr","fy","ga","gd","gl","gn","gu","gv","ha","he","hi","ho","hr","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","io","is","it","iu","ja","jv","ka","kg","ki","kj","kk","kl","km","kn","ko","kr","ks","ku","kv","kw","ky","la","lb","lg","li","ln","lo","lt","lu","lv","mg","mh","mi","mk","ml","mn","mr","ms","mt","my","na","nb","nd","ne","ng","nl","nn","no","nr","nv","ny","oc","oj","om","or","os","pa","pi","pl","ps","pt","qu","rm","rn","ro","ru","rw","sa","sc","sd","se","sg","si","sk","sl","sm","sn","so","sq","sr","ss","st","su","sv","sw","ta","te","tg","th","ti","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","wo","xh","yi","yo","za","zh","zu"]);function ai(li){return(0,oi.default)(li),ii.has(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isISO6391,isISO6391.exports)),isISO6391.exports}var isISO8601={exports:{}},hasRequiredIsISO8601;function requireIsISO8601(){return hasRequiredIsISO8601||(hasRequiredIsISO8601=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=si(requireAssertString());function si(ui){return ui&&ui.__esModule?ui:{default:ui}}var ii=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,ai=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,li=function(ui){var di=ui.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/);if(di){var hi=Number(di[1]),pi=Number(di[2]);return hi%4===0&&hi%100!==0||hi%400===0?pi<=366:pi<=365}var ha=ui.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number),ga=ha[1],va=ha[2],ba=ha[3],wa=va&&"0".concat(va).slice(-2),xa=ba&&"0".concat(ba).slice(-2),Ca=new Date("".concat(ga,"-").concat(wa||"01","-").concat(xa||"01"));return va&&ba?Ca.getUTCFullYear()===ga&&Ca.getUTCMonth()+1===va&&Ca.getUTCDate()===ba:!0};function ci(ui){var di=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,oi.default)(ui);var hi=di.strictSeparator?ai.test(ui):ii.test(ui);return hi&&di.strict?li(ui):hi}Ws.exports=ws.default,Ws.exports.default=ws.default}(isISO8601,isISO8601.exports)),isISO8601.exports}var isRFC3339={exports:{}},hasRequiredIsRFC3339;function requireIsRFC3339(){return hasRequiredIsRFC3339||(hasRequiredIsRFC3339=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=xa;var oi=si(requireAssertString());function si(Ca){return Ca&&Ca.__esModule?Ca:{default:Ca}}var ii=/[0-9]{4}/,ai=/(0[1-9]|1[0-2])/,li=/([12]\d|0[1-9]|3[01])/,ci=/([01][0-9]|2[0-3])/,ui=/[0-5][0-9]/,di=/([0-5][0-9]|60)/,hi=/(\.[0-9]+)?/,pi=new RegExp("[-+]".concat(ci.source,":").concat(ui.source)),ha=new RegExp("([zZ]|".concat(pi.source,")")),ga=new RegExp("".concat(ci.source,":").concat(ui.source,":").concat(di.source).concat(hi.source)),va=new RegExp("".concat(ii.source,"-").concat(ai.source,"-").concat(li.source)),ba=new RegExp("".concat(ga.source).concat(ha.source)),wa=new RegExp("^".concat(va.source,"[ tT]").concat(ba.source,"$"));function xa(Ca){return(0,oi.default)(Ca),wa.test(Ca)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isRFC3339,isRFC3339.exports)),isRFC3339.exports}var isISO31661Alpha3={exports:{}},hasRequiredIsISO31661Alpha3;function requireIsISO31661Alpha3(){return hasRequiredIsISO31661Alpha3||(hasRequiredIsISO31661Alpha3=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=new Set(["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","VAT","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWZ","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","URY","UZB","VUT","VEN","VNM","VGB","VIR","WLF","ESH","YEM","ZMB","ZWE"]);function ai(li){return(0,oi.default)(li),ii.has(li.toUpperCase())}Ws.exports=ws.default,Ws.exports.default=ws.default}(isISO31661Alpha3,isISO31661Alpha3.exports)),isISO31661Alpha3.exports}var isISO4217={},hasRequiredIsISO4217;function requireIsISO4217(){if(hasRequiredIsISO4217)return isISO4217;hasRequiredIsISO4217=1,Object.defineProperty(isISO4217,"__esModule",{value:!0}),isISO4217.CurrencyCodes=void 0,isISO4217.default=si;var Ws=ws(requireAssertString());function ws(ii){return ii&&ii.__esModule?ii:{default:ii}}var oi=new Set(["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SLL","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VES","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"]);function si(ii){return(0,Ws.default)(ii),oi.has(ii.toUpperCase())}return isISO4217.CurrencyCodes=oi,isISO4217}var isBase32={exports:{}},hasRequiredIsBase32;function requireIsBase32(){return hasRequiredIsBase32||(hasRequiredIsBase32=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ui;var oi=ii(requireAssertString()),si=ii(requireMerge());function ii(di){return di&&di.__esModule?di:{default:di}}var ai=/^[A-Z2-7]+=*$/,li=/^[A-HJKMNP-TV-Z0-9]+$/,ci={crockford:!1};function ui(di,hi){if((0,oi.default)(di),hi=(0,si.default)(hi,ci),hi.crockford)return li.test(di);var pi=di.length;return!!(pi%8===0&&ai.test(di))}Ws.exports=ws.default,Ws.exports.default=ws.default}(isBase32,isBase32.exports)),isBase32.exports}var isBase58={exports:{}},hasRequiredIsBase58;function requireIsBase58(){return hasRequiredIsBase58||(hasRequiredIsBase58=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^[A-HJ-NP-Za-km-z1-9]*$/;function ai(li){return(0,oi.default)(li),!!ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isBase58,isBase58.exports)),isBase58.exports}var isDataURI={exports:{}},hasRequiredIsDataURI;function requireIsDataURI(){return hasRequiredIsDataURI||(hasRequiredIsDataURI=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=si(requireAssertString());function si(ui){return ui&&ui.__esModule?ui:{default:ui}}var ii=/^[a-z]+\/[a-z0-9\-\+\._]+$/i,ai=/^[a-z\-]+=[a-z0-9\-]+$/i,li=/^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i;function ci(ui){(0,oi.default)(ui);var di=ui.split(",");if(di.length<2)return!1;var hi=di.shift().trim().split(";"),pi=hi.shift();if(pi.slice(0,5)!=="data:")return!1;var ha=pi.slice(5);if(ha!==""&&!ii.test(ha))return!1;for(var ga=0;ga<hi.length;ga++)if(!(ga===hi.length-1&&hi[ga].toLowerCase()==="base64")&&!ai.test(hi[ga]))return!1;for(var va=0;va<di.length;va++)if(!li.test(di[va]))return!1;return!0}Ws.exports=ws.default,Ws.exports.default=ws.default}(isDataURI,isDataURI.exports)),isDataURI.exports}var isMagnetURI={exports:{}},hasRequiredIsMagnetURI;function requireIsMagnetURI(){return hasRequiredIsMagnetURI||(hasRequiredIsMagnetURI=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;function ai(li){return(0,oi.default)(li),li.indexOf("magnet:?")!==0?!1:ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isMagnetURI,isMagnetURI.exports)),isMagnetURI.exports}var isMailtoURI={exports:{}},trim={exports:{}},rtrim={exports:{}},hasRequiredRtrim;function requireRtrim(){return hasRequiredRtrim||(hasRequiredRtrim=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){if((0,oi.default)(ai),li){var ci=new RegExp("[".concat(li.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+$"),"g");return ai.replace(ci,"")}for(var ui=ai.length-1;/\s/.test(ai.charAt(ui));)ui-=1;return ai.slice(0,ui+1)}Ws.exports=ws.default,Ws.exports.default=ws.default}(rtrim,rtrim.exports)),rtrim.exports}var ltrim={exports:{}},hasRequiredLtrim;function requireLtrim(){return hasRequiredLtrim||(hasRequiredLtrim=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){(0,oi.default)(ai);var ci=li?new RegExp("^[".concat(li.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+"),"g"):/^\s+/g;return ai.replace(ci,"")}Ws.exports=ws.default,Ws.exports.default=ws.default}(ltrim,ltrim.exports)),ltrim.exports}var hasRequiredTrim;function requireTrim(){return hasRequiredTrim||(hasRequiredTrim=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=ii(requireRtrim()),si=ii(requireLtrim());function ii(li){return li&&li.__esModule?li:{default:li}}function ai(li,ci){return(0,oi.default)((0,si.default)(li,ci),ci)}Ws.exports=ws.default,Ws.exports.default=ws.default}(trim,trim.exports)),trim.exports}var hasRequiredIsMailtoURI;function requireIsMailtoURI(){return hasRequiredIsMailtoURI||(hasRequiredIsMailtoURI=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=va;var oi=ai(requireTrim()),si=ai(requireIsEmail()),ii=ai(requireAssertString());function ai(ba){return ba&&ba.__esModule?ba:{default:ba}}function li(ba,wa){return di(ba)||ui(ba,wa)||pi(ba,wa)||ci()}function ci(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
309
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ku=!0,gd=!1,Ed;return{s:function(){xa=xa.call(ba)},n:function(){var Od=xa.next();return ku=Od.done,Od},e:function(Od){gd=!0,Ed=Od},f:function(){try{!ku&&xa.return!=null&&xa.return()}finally{if(gd)throw Ed}}}}function di(ba,wa){if(ba){if(typeof ba=="string")return hi(ba,wa);var xa=Object.prototype.toString.call(ba).slice(8,-1);if(xa==="Object"&&ba.constructor&&(xa=ba.constructor.name),xa==="Map"||xa==="Set")return Array.from(ba);if(xa==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(xa))return hi(ba,wa)}}function hi(ba,wa){(wa==null||wa>ba.length)&&(wa=ba.length);for(var xa=0,Ca=new Array(wa);xa<wa;xa++)Ca[xa]=ba[xa];return Ca}var pi={format:"YYYY/MM/DD",delimiters:["/","-"],strictMode:!1};function ha(ba){return/(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(ba)}function ga(ba,wa){for(var xa=[],Ca=Math.min(ba.length,wa.length),el=0;el<Ca;el++)xa.push([ba[el],wa[el]]);return xa}function va(ba,wa){if(typeof wa=="string"?wa=(0,oi.default)({format:wa},pi):wa=(0,oi.default)(wa,pi),typeof ba=="string"&&ha(wa.format)){var xa=wa.delimiters.find(function(wd){return wa.format.indexOf(wd)!==-1}),Ca=wa.strictMode?xa:wa.delimiters.find(function(wd){return ba.indexOf(wd)!==-1}),el=ga(ba.split(Ca),wa.format.toLowerCase().split(xa)),ku={},gd=ui(el),Ed;try{for(gd.s();!(Ed=gd.n()).done;){var Od=ii(Ed.value,2),Nd=Od[0],Pd=Od[1];if(Nd.length!==Pd.length)return!1;ku[Pd.charAt(0)]=Nd}}catch(wd){gd.e(wd)}finally{gd.f()}var Ld=ku.y;if(Ld.startsWith("-"))return!1;if(ku.y.length===2){var rf=parseInt(ku.y,10);if(isNaN(rf))return!1;var kd=new Date().getFullYear()%100;rf<kd?Ld="20".concat(ku.y):Ld="19".concat(ku.y)}var Md=ku.m;ku.m.length===1&&(Md="0".concat(ku.m));var Td=ku.d;return ku.d.length===1&&(Td="0".concat(ku.d)),new Date("".concat(Ld,"-").concat(Md,"-").concat(Td,"T00:00:00.000Z")).getUTCDate()===+ku.d}return wa.strictMode?!1:Object.prototype.toString.call(ba)==="[object Date]"&&isFinite(ba)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isDate,isDate.exports)),isDate.exports}var isTime={exports:{}},hasRequiredIsTime;function requireIsTime(){return hasRequiredIsTime||(hasRequiredIsTime=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=si(requireMerge());function si(ci){return ci&&ci.__esModule?ci:{default:ci}}var ii={hourFormat:"hour24",mode:"default"},ai={hour24:{default:/^([01]?[0-9]|2[0-3]):([0-5][0-9])$/,withSeconds:/^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/},hour12:{default:/^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/,withSeconds:/^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/}};function li(ci,ui){return ui=(0,oi.default)(ui,ii),typeof ci!="string"?!1:ai[ui.hourFormat][ui.mode].test(ci)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isTime,isTime.exports)),isTime.exports}var isBoolean={exports:{}},hasRequiredIsBoolean;function requireIsBoolean(){return hasRequiredIsBoolean||(hasRequiredIsBoolean=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=si(requireAssertString());function si(ui){return ui&&ui.__esModule?ui:{default:ui}}var ii={loose:!1},ai=["true","false","1","0"],li=[].concat(ai,["yes","no"]);function ci(ui){var di=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ii;return(0,oi.default)(ui),di.loose?li.includes(ui.toLowerCase()):ai.includes(ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isBoolean,isBoolean.exports)),isBoolean.exports}var isLocale={exports:{}},hasRequiredIsLocale;function requireIsLocale(){return hasRequiredIsLocale||(hasRequiredIsLocale=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=Ca;var oi=si(requireAssertString());function si(el){return el&&el.__esModule?el:{default:el}}var ii="([A-Za-z]{3}(-[A-Za-z]{3}){0,2})",ai="(([a-zA-Z]{2,3}(-".concat(ii,")?)|([a-zA-Z]{5,8}))"),li="([A-Za-z]{4})",ci="([A-Za-z]{2}|\\d{3})",ui="([A-Za-z0-9]{5,8}|(\\d[A-Z-a-z0-9]{3}))",di="(\\d|[A-W]|[Y-Z]|[a-w]|[y-z])",hi="(".concat(di,"(-[A-Za-z0-9]{2,8})+)"),pi="(x(-[A-Za-z0-9]{1,8})+)",ha="((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))",ga="((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))",va="(".concat(ha,"|").concat(ga,")"),ba="(-|_)",wa="".concat(ai,"(").concat(ba).concat(li,")?(").concat(ba).concat(ci,")?(").concat(ba).concat(ui,")*(").concat(ba).concat(hi,")*(").concat(ba).concat(pi,")?"),xa=new RegExp("(^".concat(pi,"$)|(^").concat(va,"$)|(^").concat(wa,"$)"));function Ca(el){return(0,oi.default)(el),xa.test(el)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isLocale,isLocale.exports)),isLocale.exports}var isAbaRouting={exports:{}},hasRequiredIsAbaRouting;function requireIsAbaRouting(){return hasRequiredIsAbaRouting||(hasRequiredIsAbaRouting=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^(?!(1[3-9])|(20)|(3[3-9])|(4[0-9])|(5[0-9])|(60)|(7[3-9])|(8[1-9])|(9[0-2])|(9[3-9]))[0-9]{9}$/;function ai(li){if((0,oi.default)(li),!ii.test(li))return!1;for(var ci=0,ui=0;ui<li.length;ui++)ui%3===0?ci+=li[ui]*3:ui%3===1?ci+=li[ui]*7:ci+=li[ui]*1;return ci%10===0}Ws.exports=ws.default,Ws.exports.default=ws.default}(isAbaRouting,isAbaRouting.exports)),isAbaRouting.exports}var isAlpha={},hasRequiredIsAlpha;function requireIsAlpha(){if(hasRequiredIsAlpha)return isAlpha;hasRequiredIsAlpha=1,Object.defineProperty(isAlpha,"__esModule",{value:!0}),isAlpha.default=si,isAlpha.locales=void 0;var Ws=oi(requireAssertString()),ws=requireAlpha();function oi(ii){return ii&&ii.__esModule?ii:{default:ii}}function si(ii){var ai=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",li=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};(0,Ws.default)(ii);var ci=ii,ui=li.ignore;if(ui)if(ui instanceof RegExp)ci=ci.replace(ui,"");else if(typeof ui=="string")ci=ci.replace(new RegExp("[".concat(ui.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(ai in ws.alpha)return ws.alpha[ai].test(ci);throw new Error("Invalid locale '".concat(ai,"'"))}return isAlpha.locales=Object.keys(ws.alpha),isAlpha}var isAlphanumeric={},hasRequiredIsAlphanumeric;function requireIsAlphanumeric(){if(hasRequiredIsAlphanumeric)return isAlphanumeric;hasRequiredIsAlphanumeric=1,Object.defineProperty(isAlphanumeric,"__esModule",{value:!0}),isAlphanumeric.default=si,isAlphanumeric.locales=void 0;var Ws=oi(requireAssertString()),ws=requireAlpha();function oi(ii){return ii&&ii.__esModule?ii:{default:ii}}function si(ii){var ai=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",li=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};(0,Ws.default)(ii);var ci=ii,ui=li.ignore;if(ui)if(ui instanceof RegExp)ci=ci.replace(ui,"");else if(typeof ui=="string")ci=ci.replace(new RegExp("[".concat(ui.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(ai in ws.alphanumeric)return ws.alphanumeric[ai].test(ci);throw new Error("Invalid locale '".concat(ai,"'"))}return isAlphanumeric.locales=Object.keys(ws.alphanumeric),isAlphanumeric}var isNumeric={exports:{}},hasRequiredIsNumeric;function requireIsNumeric(){return hasRequiredIsNumeric||(hasRequiredIsNumeric=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ii(requireAssertString()),si=requireAlpha();function ii(ci){return ci&&ci.__esModule?ci:{default:ci}}var ai=/^[0-9]+$/;function li(ci,ui){return(0,oi.default)(ci),ui&&ui.no_symbols?ai.test(ci):new RegExp("^[+-]?([0-9]*[".concat((ui||{}).locale?si.decimal[ui.locale]:".","])?[0-9]+$")).test(ci)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isNumeric,isNumeric.exports)),isNumeric.exports}var isPassportNumber={exports:{}},hasRequiredIsPassportNumber;function requireIsPassportNumber(){return hasRequiredIsPassportNumber||(hasRequiredIsPassportNumber=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii={AM:/^[A-Z]{2}\d{7}$/,AR:/^[A-Z]{3}\d{6}$/,AT:/^[A-Z]\d{7}$/,AU:/^[A-Z]\d{7}$/,AZ:/^[A-Z]{1}\d{8}$/,BE:/^[A-Z]{2}\d{6}$/,BG:/^\d{9}$/,BR:/^[A-Z]{2}\d{6}$/,BY:/^[A-Z]{2}\d{7}$/,CA:/^[A-Z]{2}\d{6}$/,CH:/^[A-Z]\d{7}$/,CN:/^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,CY:/^[A-Z](\d{6}|\d{8})$/,CZ:/^\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\d{9}$/,DZ:/^\d{9}$/,EE:/^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,FI:/^[A-Z]{2}\d{7}$/,FR:/^\d{2}[A-Z]{2}\d{5}$/,GB:/^\d{9}$/,GR:/^[A-Z]{2}\d{7}$/,HR:/^\d{9}$/,HU:/^[A-Z]{2}(\d{6}|\d{7})$/,IE:/^[A-Z0-9]{2}\d{7}$/,IN:/^[A-Z]{1}-?\d{7}$/,ID:/^[A-C]\d{7}$/,IR:/^[A-Z]\d{8}$/,IS:/^(A)\d{7}$/,IT:/^[A-Z0-9]{2}\d{7}$/,JM:/^[Aa]\d{7}$/,JP:/^[A-Z]{2}\d{7}$/,KR:/^[MS]\d{8}$/,KZ:/^[a-zA-Z]\d{7}$/,LI:/^[a-zA-Z]\d{5}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\d{7}$/,MZ:/^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,MY:/^[AHK]\d{8}$/,MX:/^\d{10,11}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\d$/,NZ:/^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/,PH:/^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/,PK:/^[A-Z]{2}\d{7}$/,PL:/^[A-Z]{2}\d{7}$/,PT:/^[A-Z]\d{6}$/,RO:/^\d{8,9}$/,RU:/^\d{9}$/,SE:/^\d{8}$/,SL:/^(P)[A-Z]\d{7}$/,SK:/^[0-9A-Z]\d{7}$/,TH:/^[A-Z]{1,2}\d{6,7}$/,TR:/^[A-Z]\d{8}$/,UA:/^[A-Z]{2}\d{6}$/,US:/^\d{9}$/,ZA:/^[TAMD]\d{8}$/};function ai(li,ci){(0,oi.default)(li);var ui=li.replace(/\s/g,"").toUpperCase();return ci.toUpperCase()in ii&&ii[ci].test(ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isPassportNumber,isPassportNumber.exports)),isPassportNumber.exports}var isPort={exports:{}},isInt={exports:{}},hasRequiredIsInt;function requireIsInt(){return hasRequiredIsInt||(hasRequiredIsInt=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=si(requireAssertString());function si(ci){return ci&&ci.__esModule?ci:{default:ci}}var ii=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,ai=/^[-+]?[0-9]+$/;function li(ci,ui){(0,oi.default)(ci),ui=ui||{};var di=ui.allow_leading_zeroes===!1?ii:ai,hi=!ui.hasOwnProperty("min")||ci>=ui.min,pi=!ui.hasOwnProperty("max")||ci<=ui.max,ha=!ui.hasOwnProperty("lt")||ci<ui.lt,ga=!ui.hasOwnProperty("gt")||ci>ui.gt;return di.test(ci)&&hi&&pi&&ha&&ga}Ws.exports=ws.default,Ws.exports.default=ws.default}(isInt,isInt.exports)),isInt.exports}var hasRequiredIsPort;function requireIsPort(){return hasRequiredIsPort||(hasRequiredIsPort=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireIsInt());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){return(0,oi.default)(ai,{allow_leading_zeroes:!1,min:0,max:65535})}Ws.exports=ws.default,Ws.exports.default=ws.default}(isPort,isPort.exports)),isPort.exports}var isLowercase={exports:{}},hasRequiredIsLowercase;function requireIsLowercase(){return hasRequiredIsLowercase||(hasRequiredIsLowercase=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){return(0,oi.default)(ai),ai===ai.toLowerCase()}Ws.exports=ws.default,Ws.exports.default=ws.default}(isLowercase,isLowercase.exports)),isLowercase.exports}var isUppercase={exports:{}},hasRequiredIsUppercase;function requireIsUppercase(){return hasRequiredIsUppercase||(hasRequiredIsUppercase=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){return(0,oi.default)(ai),ai===ai.toUpperCase()}Ws.exports=ws.default,Ws.exports.default=ws.default}(isUppercase,isUppercase.exports)),isUppercase.exports}var isIMEI={exports:{}},hasRequiredIsIMEI;function requireIsIMEI(){return hasRequiredIsIMEI||(hasRequiredIsIMEI=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=si(requireAssertString());function si(ci){return ci&&ci.__esModule?ci:{default:ci}}var ii=/^[0-9]{15}$/,ai=/^\d{2}-\d{6}-\d{6}-\d{1}$/;function li(ci,ui){(0,oi.default)(ci),ui=ui||{};var di=ii;if(ui.allow_hyphens&&(di=ai),!di.test(ci))return!1;ci=ci.replace(/-/g,"");for(var hi=0,pi=2,ha=14,ga=0;ga<ha;ga++){var va=ci.substring(ha-ga-1,ha-ga),ba=parseInt(va,10)*pi;ba>=10?hi+=ba%10+1:hi+=ba,pi===1?pi+=1:pi-=1}var wa=(10-hi%10)%10;return wa===parseInt(ci.substring(14,15),10)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isIMEI,isIMEI.exports)),isIMEI.exports}var isAscii={exports:{}},hasRequiredIsAscii;function requireIsAscii(){return hasRequiredIsAscii||(hasRequiredIsAscii=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^[\x00-\x7F]+$/;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isAscii,isAscii.exports)),isAscii.exports}var isFullWidth={},hasRequiredIsFullWidth;function requireIsFullWidth(){if(hasRequiredIsFullWidth)return isFullWidth;hasRequiredIsFullWidth=1,Object.defineProperty(isFullWidth,"__esModule",{value:!0}),isFullWidth.default=si,isFullWidth.fullWidth=void 0;var Ws=ws(requireAssertString());function ws(ii){return ii&&ii.__esModule?ii:{default:ii}}var oi=isFullWidth.fullWidth=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;function si(ii){return(0,Ws.default)(ii),oi.test(ii)}return isFullWidth}var isHalfWidth={},hasRequiredIsHalfWidth;function requireIsHalfWidth(){if(hasRequiredIsHalfWidth)return isHalfWidth;hasRequiredIsHalfWidth=1,Object.defineProperty(isHalfWidth,"__esModule",{value:!0}),isHalfWidth.default=si,isHalfWidth.halfWidth=void 0;var Ws=ws(requireAssertString());function ws(ii){return ii&&ii.__esModule?ii:{default:ii}}var oi=isHalfWidth.halfWidth=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;function si(ii){return(0,Ws.default)(ii),oi.test(ii)}return isHalfWidth}var isVariableWidth={exports:{}},hasRequiredIsVariableWidth;function requireIsVariableWidth(){return hasRequiredIsVariableWidth||(hasRequiredIsVariableWidth=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ai(requireAssertString()),si=requireIsFullWidth(),ii=requireIsHalfWidth();function ai(ci){return ci&&ci.__esModule?ci:{default:ci}}function li(ci){return(0,oi.default)(ci),si.fullWidth.test(ci)&&ii.halfWidth.test(ci)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isVariableWidth,isVariableWidth.exports)),isVariableWidth.exports}var isMultibyte={exports:{}},hasRequiredIsMultibyte;function requireIsMultibyte(){return hasRequiredIsMultibyte||(hasRequiredIsMultibyte=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/[^\x00-\x7F]/;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isMultibyte,isMultibyte.exports)),isMultibyte.exports}var isSemVer={exports:{}},multilineRegex={exports:{}},hasRequiredMultilineRegex;function requireMultilineRegex(){return hasRequiredMultilineRegex||(hasRequiredMultilineRegex=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=oi;function oi(si,ii){var ai=si.join("");return new RegExp(ai,ii)}Ws.exports=ws.default,Ws.exports.default=ws.default}(multilineRegex,multilineRegex.exports)),multilineRegex.exports}var hasRequiredIsSemVer;function requireIsSemVer(){return hasRequiredIsSemVer||(hasRequiredIsSemVer=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ii(requireAssertString()),si=ii(requireMultilineRegex());function ii(ci){return ci&&ci.__esModule?ci:{default:ci}}var ai=(0,si.default)(["^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)","(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))","?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$"],"i");function li(ci){return(0,oi.default)(ci),ai.test(ci)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isSemVer,isSemVer.exports)),isSemVer.exports}var isSurrogatePair={exports:{}},hasRequiredIsSurrogatePair;function requireIsSurrogatePair(){return hasRequiredIsSurrogatePair||(hasRequiredIsSurrogatePair=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/[\uD800-\uDBFF][\uDC00-\uDFFF]/;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isSurrogatePair,isSurrogatePair.exports)),isSurrogatePair.exports}var isDecimal={exports:{}},includes={exports:{}},hasRequiredIncludes;function requireIncludes(){return hasRequiredIncludes||(hasRequiredIncludes=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=void 0;var oi=function(si,ii){return si.some(function(ai){return ii===ai})};ws.default=oi,Ws.exports=ws.default,Ws.exports.default=ws.default}(includes,includes.exports)),includes.exports}var hasRequiredIsDecimal;function requireIsDecimal(){return hasRequiredIsDecimal||(hasRequiredIsDecimal=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=hi;var oi=li(requireMerge()),si=li(requireAssertString()),ii=li(requireIncludes()),ai=requireAlpha();function li(pi){return pi&&pi.__esModule?pi:{default:pi}}function ci(pi){var ha=new RegExp("^[-+]?([0-9]+)?(\\".concat(ai.decimal[pi.locale],"[0-9]{").concat(pi.decimal_digits,"})").concat(pi.force_decimal?"":"?","$"));return ha}var ui={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},di=["","-","+"];function hi(pi,ha){if((0,si.default)(pi),ha=(0,oi.default)(ha,ui),ha.locale in ai.decimal)return!(0,ii.default)(di,pi.replace(/ /g,""))&&ci(ha).test(pi);throw new Error("Invalid locale '".concat(ha.locale,"'"))}Ws.exports=ws.default,Ws.exports.default=ws.default}(isDecimal,isDecimal.exports)),isDecimal.exports}var isHexadecimal={exports:{}},hasRequiredIsHexadecimal;function requireIsHexadecimal(){return hasRequiredIsHexadecimal||(hasRequiredIsHexadecimal=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^(0x|0h)?[0-9A-F]+$/i;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isHexadecimal,isHexadecimal.exports)),isHexadecimal.exports}var isOctal={exports:{}},hasRequiredIsOctal;function requireIsOctal(){return hasRequiredIsOctal||(hasRequiredIsOctal=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^(0o)?[0-7]+$/i;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isOctal,isOctal.exports)),isOctal.exports}var isDivisibleBy={exports:{}},hasRequiredIsDivisibleBy;function requireIsDivisibleBy(){return hasRequiredIsDivisibleBy||(hasRequiredIsDivisibleBy=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=ii(requireAssertString()),si=ii(requireToFloat());function ii(li){return li&&li.__esModule?li:{default:li}}function ai(li,ci){return(0,oi.default)(li),(0,si.default)(li)%parseInt(ci,10)===0}Ws.exports=ws.default,Ws.exports.default=ws.default}(isDivisibleBy,isDivisibleBy.exports)),isDivisibleBy.exports}var isHexColor={exports:{}},hasRequiredIsHexColor;function requireIsHexColor(){return hasRequiredIsHexColor||(hasRequiredIsHexColor=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isHexColor,isHexColor.exports)),isHexColor.exports}var isRgbColor={exports:{}},hasRequiredIsRgbColor;function requireIsRgbColor(){return hasRequiredIsRgbColor||(hasRequiredIsRgbColor=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ui;var oi=si(requireAssertString());function si(di){return di&&di.__esModule?di:{default:di}}var ii=/^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/,ai=/^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/,li=/^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/,ci=/^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/;function ui(di){var hi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,oi.default)(di),hi?ii.test(di)||ai.test(di)||li.test(di)||ci.test(di):ii.test(di)||ai.test(di)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isRgbColor,isRgbColor.exports)),isRgbColor.exports}var isHSL={exports:{}},hasRequiredIsHSL;function requireIsHSL(){return hasRequiredIsHSL||(hasRequiredIsHSL=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=si(requireAssertString());function si(ci){return ci&&ci.__esModule?ci:{default:ci}}var ii=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i,ai=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i;function li(ci){(0,oi.default)(ci);var ui=ci.replace(/\s+/g," ").replace(/\s?(hsla?\(|\)|,)\s?/ig,"$1");return ui.indexOf(",")!==-1?ii.test(ui):ai.test(ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isHSL,isHSL.exports)),isHSL.exports}var isISRC={exports:{}},hasRequiredIsISRC;function requireIsISRC(){return hasRequiredIsISRC||(hasRequiredIsISRC=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isISRC,isISRC.exports)),isISRC.exports}var isIBAN={},hasRequiredIsIBAN;function requireIsIBAN(){if(hasRequiredIsIBAN)return isIBAN;hasRequiredIsIBAN=1,Object.defineProperty(isIBAN,"__esModule",{value:!0}),isIBAN.default=li,isIBAN.locales=void 0;var Ws=ws(requireAssertString());function ws(ci){return ci&&ci.__esModule?ci:{default:ci}}var oi={AD:/^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\d{3}\d{16}$/,AL:/^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,BA:/^(BA[0-9]{2})\d{16}$/,BE:/^(BE[0-9]{2})\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,CH:/^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\d{18}$/,CY:/^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\d{20}$/,DE:/^(DE[0-9]{2})\d{18}$/,DK:/^(DK[0-9]{2})\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\d{20}$/,DZ:/^(DZ\d{24})$/,EE:/^(EE[0-9]{2})\d{16}$/,EG:/^(EG[0-9]{2})\d{25}$/,ES:/^(ES[0-9]{2})\d{20}$/,FI:/^(FI[0-9]{2})\d{14}$/,FO:/^(FO[0-9]{2})\d{14}$/,FR:/^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\d{14}$/,GR:/^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\d{17}$/,HU:/^(HU[0-9]{2})\d{24}$/,IE:/^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/,IL:/^(IL[0-9]{2})\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,IR:/^(IR[0-9]{2})0\d{2}0\d{18}$/,IS:/^(IS[0-9]{2})\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\d{16}$/,LU:/^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MA:/^(MA[0-9]{26})$/,MC:/^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\d{18}$/,MK:/^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,MR:/^(MR[0-9]{2})\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\d{10}$/,NO:/^(NO[0-9]{2})\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,PL:/^(PL[0-9]{2})\d{24}$/,PS:/^(PS[0-9]{2})[A-Z0-9]{4}\d{21}$/,PT:/^(PT[0-9]{2})\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\d{18}$/,SA:/^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z0-9]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/};function si(ci){var ui=ci.filter(function(di){return!(di in oi)});return!(ui.length>0)}function ii(ci,ui){var di=ci.replace(/[\s\-]+/gi,"").toUpperCase(),hi=di.slice(0,2).toUpperCase(),pi=hi in oi;if(ui.whitelist){if(!si(ui.whitelist))return!1;var ha=ui.whitelist.includes(hi);if(!ha)return!1}if(ui.blacklist){var ga=ui.blacklist.includes(hi);if(ga)return!1}return pi&&oi[hi].test(di)}function ai(ci){var ui=ci.replace(/[^A-Z0-9]+/gi,"").toUpperCase(),di=ui.slice(4)+ui.slice(0,4),hi=di.replace(/[A-Z]/g,function(ha){return ha.charCodeAt(0)-55}),pi=hi.match(/\d{1,7}/g).reduce(function(ha,ga){return Number(ha+ga)%97},"");return pi===1}function li(ci){var ui=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,Ws.default)(ci),ii(ci,ui)&&ai(ci)}return isIBAN.locales=Object.keys(oi),isIBAN}var isBIC={exports:{}},isISO31661Alpha2={},hasRequiredIsISO31661Alpha2;function requireIsISO31661Alpha2(){if(hasRequiredIsISO31661Alpha2)return isISO31661Alpha2;hasRequiredIsISO31661Alpha2=1,Object.defineProperty(isISO31661Alpha2,"__esModule",{value:!0}),isISO31661Alpha2.CountryCodes=void 0,isISO31661Alpha2.default=si;var Ws=ws(requireAssertString());function ws(ii){return ii&&ii.__esModule?ii:{default:ii}}var oi=new Set(["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]);function si(ii){return(0,Ws.default)(ii),oi.has(ii.toUpperCase())}return isISO31661Alpha2.CountryCodes=oi,isISO31661Alpha2}var hasRequiredIsBIC;function requireIsBIC(){return hasRequiredIsBIC||(hasRequiredIsBIC=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ii(requireAssertString()),si=requireIsISO31661Alpha2();function ii(ci){return ci&&ci.__esModule?ci:{default:ci}}var ai=/^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;function li(ci){(0,oi.default)(ci);var ui=ci.slice(4,6).toUpperCase();return!si.CountryCodes.has(ui)&&ui!=="XK"?!1:ai.test(ci)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isBIC,isBIC.exports)),isBIC.exports}var isMD5={exports:{}},hasRequiredIsMD5;function requireIsMD5(){return hasRequiredIsMD5||(hasRequiredIsMD5=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^[a-f0-9]{32}$/;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isMD5,isMD5.exports)),isMD5.exports}var isHash={exports:{}},hasRequiredIsHash;function requireIsHash(){return hasRequiredIsHash||(hasRequiredIsHash=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};function ai(li,ci){(0,oi.default)(li);var ui=new RegExp("^[a-fA-F0-9]{".concat(ii[ci],"}$"));return ui.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isHash,isHash.exports)),isHash.exports}var isJWT={exports:{}},isBase64={exports:{}},hasRequiredIsBase64;function requireIsBase64(){return hasRequiredIsBase64||(hasRequiredIsBase64=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ui;var oi=ii(requireAssertString()),si=ii(requireMerge());function ii(di){return di&&di.__esModule?di:{default:di}}var ai=/[^A-Z0-9+\/=]/i,li=/^[A-Z0-9_\-]*$/i,ci={urlSafe:!1};function ui(di,hi){(0,oi.default)(di),hi=(0,si.default)(hi,ci);var pi=di.length;if(hi.urlSafe)return li.test(di);if(pi%4!==0||ai.test(di))return!1;var ha=di.indexOf("=");return ha===-1||ha===pi-1||ha===pi-2&&di[pi-1]==="="}Ws.exports=ws.default,Ws.exports.default=ws.default}(isBase64,isBase64.exports)),isBase64.exports}var hasRequiredIsJWT;function requireIsJWT(){return hasRequiredIsJWT||(hasRequiredIsJWT=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=ii(requireAssertString()),si=ii(requireIsBase64());function ii(li){return li&&li.__esModule?li:{default:li}}function ai(li){(0,oi.default)(li);var ci=li.split("."),ui=ci.length;return ui!==3?!1:ci.reduce(function(di,hi){return di&&(0,si.default)(hi,{urlSafe:!0})},!0)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isJWT,isJWT.exports)),isJWT.exports}var isJSON={exports:{}},hasRequiredIsJSON;function requireIsJSON(){return hasRequiredIsJSON||(hasRequiredIsJSON=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=ii(requireAssertString()),si=ii(requireMerge());function ii(ui){return ui&&ui.__esModule?ui:{default:ui}}function ai(ui){"@babel/helpers - typeof";return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(di){return typeof di}:function(di){return di&&typeof Symbol=="function"&&di.constructor===Symbol&&di!==Symbol.prototype?"symbol":typeof di},ai(ui)}var li={allow_primitives:!1};function ci(ui,di){(0,oi.default)(ui);try{di=(0,si.default)(di,li);var hi=[];di.allow_primitives&&(hi=[null,!1,!0]);var pi=JSON.parse(ui);return hi.includes(pi)||!!pi&&ai(pi)==="object"}catch{}return!1}Ws.exports=ws.default,Ws.exports.default=ws.default}(isJSON,isJSON.exports)),isJSON.exports}var isEmpty={exports:{}},hasRequiredIsEmpty;function requireIsEmpty(){return hasRequiredIsEmpty||(hasRequiredIsEmpty=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ii(requireAssertString()),si=ii(requireMerge());function ii(ci){return ci&&ci.__esModule?ci:{default:ci}}var ai={ignore_whitespace:!1};function li(ci,ui){return(0,oi.default)(ci),ui=(0,si.default)(ui,ai),(ui.ignore_whitespace?ci.trim().length:ci.length)===0}Ws.exports=ws.default,Ws.exports.default=ws.default}(isEmpty,isEmpty.exports)),isEmpty.exports}var isLength={exports:{}},hasRequiredIsLength;function requireIsLength(){return hasRequiredIsLength||(hasRequiredIsLength=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}function ii(li){"@babel/helpers - typeof";return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ci){return typeof ci}:function(ci){return ci&&typeof Symbol=="function"&&ci.constructor===Symbol&&ci!==Symbol.prototype?"symbol":typeof ci},ii(li)}function ai(li,ci){(0,oi.default)(li);var ui,di;ii(ci)==="object"?(ui=ci.min||0,di=ci.max):(ui=arguments[1]||0,di=arguments[2]);var hi=li.match(/(\uFE0F|\uFE0E)/g)||[],pi=li.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],ha=li.length-hi.length-pi.length;return ha>=ui&&(typeof di>"u"||ha<=di)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isLength,isLength.exports)),isLength.exports}var isUUID={exports:{}},hasRequiredIsUUID;function requireIsUUID(){return hasRequiredIsUUID||(hasRequiredIsUUID=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};function ai(li,ci){(0,oi.default)(li);var ui=ii[[void 0,null].includes(ci)?"all":ci];return!!ui&&ui.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isUUID,isUUID.exports)),isUUID.exports}var isMongoId={exports:{}},hasRequiredIsMongoId;function requireIsMongoId(){return hasRequiredIsMongoId||(hasRequiredIsMongoId=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=ii(requireAssertString()),si=ii(requireIsHexadecimal());function ii(li){return li&&li.__esModule?li:{default:li}}function ai(li){return(0,oi.default)(li),(0,si.default)(li)&&li.length===24}Ws.exports=ws.default,Ws.exports.default=ws.default}(isMongoId,isMongoId.exports)),isMongoId.exports}var isAfter={exports:{}},hasRequiredIsAfter;function requireIsAfter(){return hasRequiredIsAfter||(hasRequiredIsAfter=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireToDate());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){var ci=(li==null?void 0:li.comparisonDate)||li||Date().toString(),ui=(0,oi.default)(ci),di=(0,oi.default)(ai);return!!(di&&ui&&di>ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isAfter,isAfter.exports)),isAfter.exports}var isBefore={exports:{}},hasRequiredIsBefore;function requireIsBefore(){return hasRequiredIsBefore||(hasRequiredIsBefore=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=ii(requireAssertString()),si=ii(requireToDate());function ii(li){return li&&li.__esModule?li:{default:li}}function ai(li){var ci=arguments.length>1&&arguments[1]!==void 0?arguments[1]:String(new Date);(0,oi.default)(li);var ui=(0,si.default)(ci),di=(0,si.default)(li);return!!(di&&ui&&di<ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isBefore,isBefore.exports)),isBefore.exports}var isIn={exports:{}},hasRequiredIsIn;function requireIsIn(){return hasRequiredIsIn||(hasRequiredIsIn=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ii(requireAssertString()),si=ii(requireToString());function ii(ci){return ci&&ci.__esModule?ci:{default:ci}}function ai(ci){"@babel/helpers - typeof";return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ui){return typeof ui}:function(ui){return ui&&typeof Symbol=="function"&&ui.constructor===Symbol&&ui!==Symbol.prototype?"symbol":typeof ui},ai(ci)}function li(ci,ui){(0,oi.default)(ci);var di;if(Object.prototype.toString.call(ui)==="[object Array]"){var hi=[];for(di in ui)({}).hasOwnProperty.call(ui,di)&&(hi[di]=(0,si.default)(ui[di]));return hi.indexOf(ci)>=0}else{if(ai(ui)==="object")return ui.hasOwnProperty(ci);if(ui&&typeof ui.indexOf=="function")return ui.indexOf(ci)>=0}return!1}Ws.exports=ws.default,Ws.exports.default=ws.default}(isIn,isIn.exports)),isIn.exports}var isLuhnNumber={exports:{}},hasRequiredIsLuhnNumber;function requireIsLuhnNumber(){return hasRequiredIsLuhnNumber||(hasRequiredIsLuhnNumber=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){(0,oi.default)(ai);for(var li=ai.replace(/[- ]+/g,""),ci=0,ui,di,hi,pi=li.length-1;pi>=0;pi--)ui=li.substring(pi,pi+1),di=parseInt(ui,10),hi?(di*=2,di>=10?ci+=di%10+1:ci+=di):ci+=di,hi=!hi;return!!(ci%10===0&&li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isLuhnNumber,isLuhnNumber.exports)),isLuhnNumber.exports}var isCreditCard={exports:{}},hasRequiredIsCreditCard;function requireIsCreditCard(){return hasRequiredIsCreditCard||(hasRequiredIsCreditCard=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=ii(requireAssertString()),si=ii(requireIsLuhnNumber());function ii(ui){return ui&&ui.__esModule?ui:{default:ui}}var ai={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\d{3})\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},li=function(){var ui=[];for(var di in ai)ai.hasOwnProperty(di)&&ui.push(ai[di]);return ui}();function ci(ui){var di=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,oi.default)(ui);var hi=di.provider,pi=ui.replace(/[- ]+/g,"");if(hi&&hi.toLowerCase()in ai){if(!ai[hi.toLowerCase()].test(pi))return!1}else{if(hi&&!(hi.toLowerCase()in ai))throw new Error("".concat(hi," is not a valid credit card provider."));if(!li.some(function(ha){return ha.test(pi)}))return!1}return(0,si.default)(ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isCreditCard,isCreditCard.exports)),isCreditCard.exports}var isIdentityCard={exports:{}},hasRequiredIsIdentityCard;function requireIsIdentityCard(){return hasRequiredIsIdentityCard||(hasRequiredIsIdentityCard=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=ii(requireAssertString()),si=ii(requireIsInt());function ii(ci){return ci&&ci.__esModule?ci:{default:ci}}var ai={PL:function(ci){(0,oi.default)(ci);var ui={1:1,2:3,3:7,4:9,5:1,6:3,7:7,8:9,9:1,10:3,11:0};if(ci!=null&&ci.length===11&&(0,si.default)(ci,{allow_leading_zeroes:!0})){var di=ci.split("").slice(0,-1),hi=di.reduce(function(ga,va,ba){return ga+Number(va)*ui[ba+1]},0),pi=hi%10,ha=Number(ci.charAt(ci.length-1));if(pi===0&&ha===0||ha===10-pi)return!0}return!1},ES:function(ci){(0,oi.default)(ci);var ui=/^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/,di={X:0,Y:1,Z:2},hi=["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"],pi=ci.trim().toUpperCase();if(!ui.test(pi))return!1;var ha=pi.slice(0,-1).replace(/[X,Y,Z]/g,function(ga){return di[ga]});return pi.endsWith(hi[ha%23])},FI:function(ci){if((0,oi.default)(ci),ci.length!==11||!ci.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/))return!1;var ui="0123456789ABCDEFHJKLMNPRSTUVWXY",di=parseInt(ci.slice(0,6),10)*1e3+parseInt(ci.slice(7,10),10),hi=di%31,pi=ui[hi];return pi===ci.slice(10,11)},IN:function(ci){var ui=/^[1-9]\d{3}\s?\d{4}\s?\d{4}$/,di=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],hi=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],pi=ci.trim();if(!ui.test(pi))return!1;var ha=0,ga=pi.replace(/\s/g,"").split("").map(Number).reverse();return ga.forEach(function(va,ba){ha=di[ha][hi[ba%8][va]]}),ha===0},IR:function(ci){if(!ci.match(/^\d{10}$/)||(ci="0000".concat(ci).slice(ci.length-6),parseInt(ci.slice(3,9),10)===0))return!1;for(var ui=parseInt(ci.slice(9,10),10),di=0,hi=0;hi<9;hi++)di+=parseInt(ci.slice(hi,hi+1),10)*(10-hi);return di%=11,di<2&&ui===di||di>=2&&ui===11-di},IT:function(ci){return ci.length!==9||ci==="CA00000AA"?!1:ci.search(/C[A-Z]\d{5}[A-Z]{2}/i)>-1},NO:function(ci){var ui=ci.trim();if(isNaN(Number(ui))||ui.length!==11||ui==="00000000000")return!1;var di=ui.split("").map(Number),hi=(11-(3*di[0]+7*di[1]+6*di[2]+1*di[3]+8*di[4]+9*di[5]+4*di[6]+5*di[7]+2*di[8])%11)%11,pi=(11-(5*di[0]+4*di[1]+3*di[2]+2*di[3]+7*di[4]+6*di[5]+5*di[6]+4*di[7]+3*di[8]+2*hi)%11)%11;return!(hi!==di[9]||pi!==di[10])},TH:function(ci){if(!ci.match(/^[1-8]\d{12}$/))return!1;for(var ui=0,di=0;di<12;di++)ui+=parseInt(ci[di],10)*(13-di);return ci[12]===((11-ui%11)%10).toString()},LK:function(ci){var ui=/^[1-9]\d{8}[vx]$/i,di=/^[1-9]\d{11}$/i;return ci.length===10&&ui.test(ci)?!0:!!(ci.length===12&&di.test(ci))},"he-IL":function(ci){var ui=/^\d{9}$/,di=ci.trim();if(!ui.test(di))return!1;for(var hi=di,pi=0,ha,ga=0;ga<hi.length;ga++)ha=Number(hi[ga])*(ga%2+1),pi+=ha>9?ha-9:ha;return pi%10===0},"ar-LY":function(ci){var ui=/^(1|2)\d{11}$/,di=ci.trim();return!!ui.test(di)},"ar-TN":function(ci){var ui=/^\d{8}$/,di=ci.trim();return!!ui.test(di)},"zh-CN":function(ci){var ui=["11","12","13","14","15","21","22","23","31","32","33","34","35","36","37","41","42","43","44","45","46","50","51","52","53","54","61","62","63","64","65","71","81","82","91"],di=["7","9","10","5","8","4","2","1","6","3","7","9","10","5","8","4","2"],hi=["1","0","X","9","8","7","6","5","4","3","2"],pi=function(Ca){return ui.includes(Ca)},ha=function(Ca){var el=parseInt(Ca.substring(0,4),10),ku=parseInt(Ca.substring(4,6),10),gd=parseInt(Ca.substring(6),10),Ed=new Date(el,ku-1,gd);return Ed>new Date?!1:Ed.getFullYear()===el&&Ed.getMonth()===ku-1&&Ed.getDate()===gd},ga=function(Ca){for(var el=Ca.substring(0,17),ku=0,gd=0;gd<17;gd++)ku+=parseInt(el.charAt(gd),10)*parseInt(di[gd],10);var Ed=ku%11;return hi[Ed]},va=function(Ca){return ga(Ca)===Ca.charAt(17).toUpperCase()},ba=function(Ca){var el=/^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(Ca);if(!el)return!1;var ku=Ca.substring(0,2);if(el=pi(ku),!el)return!1;var gd="19".concat(Ca.substring(6,12));return el=ha(gd),!!el},wa=function(Ca){var el=/^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(Ca);if(!el)return!1;var ku=Ca.substring(0,2);if(el=pi(ku),!el)return!1;var gd=Ca.substring(6,14);return el=ha(gd),el?va(Ca):!1},xa=function(Ca){var el=/^\d{15}|(\d{17}(\d|x|X))$/.test(Ca);return el?Ca.length===15?ba(Ca):wa(Ca):!1};return xa(ci)},"zh-HK":function(ci){ci=ci.trim();var ui=/^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/,di=/^[0-9]$/;if(ci=ci.toUpperCase(),!ui.test(ci))return!1;ci=ci.replace(/\[|\]|\(|\)/g,""),ci.length===8&&(ci="3".concat(ci));for(var hi=0,pi=0;pi<=7;pi++){var ha=void 0;di.test(ci[pi])?ha=ci[pi]:ha=(ci[pi].charCodeAt(0)-55)%11,hi+=ha*(9-pi)}hi%=11;var ga;return hi===0?ga="0":hi===1?ga="A":ga=String(11-hi),ga===ci[ci.length-1]},"zh-TW":function(ci){var ui={A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:34,J:18,K:19,L:20,M:21,N:22,O:35,P:23,Q:24,R:25,S:26,T:27,U:28,V:29,W:32,X:30,Y:31,Z:33},di=ci.trim().toUpperCase();return/^[A-Z][0-9]{9}$/.test(di)?Array.from(di).reduce(function(hi,pi,ha){if(ha===0){var ga=ui[pi];return ga%10*9+Math.floor(ga/10)}return ha===9?(10-hi%10-Number(pi))%10===0:hi+Number(pi)*(9-ha)},0):!1}};function li(ci,ui){if((0,oi.default)(ci),ui in ai)return ai[ui](ci);if(ui==="any"){for(var di in ai)if(ai.hasOwnProperty(di)){var hi=ai[di];if(hi(ci))return!0}return!1}throw new Error("Invalid locale '".concat(ui,"'"))}Ws.exports=ws.default,Ws.exports.default=ws.default}(isIdentityCard,isIdentityCard.exports)),isIdentityCard.exports}var isEAN={exports:{}},hasRequiredIsEAN;function requireIsEAN(){return hasRequiredIsEAN||(hasRequiredIsEAN=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=di;var oi=si(requireAssertString());function si(hi){return hi&&hi.__esModule?hi:{default:hi}}var ii=8,ai=14,li=/^(\d{8}|\d{13}|\d{14})$/;function ci(hi,pi){return hi===ii||hi===ai?pi%2===0?3:1:pi%2===0?1:3}function ui(hi){var pi=hi.slice(0,-1).split("").map(function(ga,va){return Number(ga)*ci(hi.length,va)}).reduce(function(ga,va){return ga+va},0),ha=10-pi%10;return ha<10?ha:0}function di(hi){(0,oi.default)(hi);var pi=Number(hi.slice(-1));return li.test(hi)&&pi===ui(hi)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isEAN,isEAN.exports)),isEAN.exports}var isISIN={exports:{}},hasRequiredIsISIN;function requireIsISIN(){return hasRequiredIsISIN||(hasRequiredIsISIN=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;function ai(li){if((0,oi.default)(li),!ii.test(li))return!1;for(var ci=!0,ui=0,di=li.length-2;di>=0;di--)if(li[di]>="A"&&li[di]<="Z")for(var hi=li[di].charCodeAt(0)-55,pi=hi%10,ha=Math.trunc(hi/10),ga=0,va=[pi,ha];ga<va.length;ga++){var ba=va[ga];ci?ba>=5?ui+=1+(ba-5)*2:ui+=ba*2:ui+=ba,ci=!ci}else{var wa=li[di].charCodeAt(0)-48;ci?wa>=5?ui+=1+(wa-5)*2:ui+=wa*2:ui+=wa,ci=!ci}var xa=Math.trunc((ui+9)/10)*10-ui;return+li[li.length-1]===xa}Ws.exports=ws.default,Ws.exports.default=ws.default}(isISIN,isISIN.exports)),isISIN.exports}var isISBN={exports:{}},hasRequiredIsISBN;function requireIsISBN(){return hasRequiredIsISBN||(hasRequiredIsISBN=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=si(requireAssertString());function si(ui){return ui&&ui.__esModule?ui:{default:ui}}var ii=/^(?:[0-9]{9}X|[0-9]{10})$/,ai=/^(?:[0-9]{13})$/,li=[1,3];function ci(ui,di){(0,oi.default)(ui);var hi=String((di==null?void 0:di.version)||di);if(!(di!=null&&di.version||di))return ci(ui,{version:10})||ci(ui,{version:13});var pi=ui.replace(/[\s-]+/g,""),ha=0;if(hi==="10"){if(!ii.test(pi))return!1;for(var ga=0;ga<hi-1;ga++)ha+=(ga+1)*pi.charAt(ga);if(pi.charAt(9)==="X"?ha+=10*10:ha+=10*pi.charAt(9),ha%11===0)return!0}else if(hi==="13"){if(!ai.test(pi))return!1;for(var va=0;va<12;va++)ha+=li[va%2]*pi.charAt(va);if(pi.charAt(12)-(10-ha%10)%10===0)return!0}return!1}Ws.exports=ws.default,Ws.exports.default=ws.default}(isISBN,isISBN.exports)),isISBN.exports}var isISSN={exports:{}},hasRequiredIsISSN;function requireIsISSN(){return hasRequiredIsISSN||(hasRequiredIsISSN=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii="^\\d{4}-?\\d{3}[\\dX]$";function ai(li){var ci=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,oi.default)(li);var ui=ii;if(ui=ci.require_hyphen?ui.replace("?",""):ui,ui=ci.case_sensitive?new RegExp(ui):new RegExp(ui,"i"),!ui.test(li))return!1;for(var di=li.replace("-","").toUpperCase(),hi=0,pi=0;pi<di.length;pi++){var ha=di[pi];hi+=(ha==="X"?10:+ha)*(8-pi)}return hi%11===0}Ws.exports=ws.default,Ws.exports.default=ws.default}(isISSN,isISSN.exports)),isISSN.exports}var isTaxID={exports:{}},algorithms={},hasRequiredAlgorithms;function requireAlgorithms(){if(hasRequiredAlgorithms)return algorithms;hasRequiredAlgorithms=1,Object.defineProperty(algorithms,"__esModule",{value:!0}),algorithms.iso7064Check=Ws,algorithms.luhnCheck=ws,algorithms.reverseMultiplyAndSum=oi,algorithms.verhoeffCheck=si;function Ws(ii){for(var ai=10,li=0;li<ii.length-1;li++)ai=(parseInt(ii[li],10)+ai)%10===0?10*2%11:(parseInt(ii[li],10)+ai)%10*2%11;return ai=ai===1?0:11-ai,ai===parseInt(ii[10],10)}function ws(ii){for(var ai=0,li=!1,ci=ii.length-1;ci>=0;ci--){if(li){var ui=parseInt(ii[ci],10)*2;ui>9?ai+=ui.toString().split("").map(function(di){return parseInt(di,10)}).reduce(function(di,hi){return di+hi},0):ai+=ui}else ai+=parseInt(ii[ci],10);li=!li}return ai%10===0}function oi(ii,ai){for(var li=0,ci=0;ci<ii.length;ci++)li+=ii[ci]*(ai-ci);return li}function si(ii){for(var ai=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],li=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],ci=ii.split("").reverse().join(""),ui=0,di=0;di<ci.length;di++)ui=ai[ui][li[di%8][parseInt(ci[di],10)]];return ui===0}return algorithms}var hasRequiredIsTaxID;function requireIsTaxID(){return hasRequiredIsTaxID||(hasRequiredIsTaxID=1,function(Ws,ws){function oi(vd){"@babel/helpers - typeof";return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Sd){return typeof Sd}:function(Sd){return Sd&&typeof Symbol=="function"&&Sd.constructor===Symbol&&Sd!==Symbol.prototype?"symbol":typeof Sd},oi(vd)}Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=tf;var si=ui(requireAssertString()),ii=ci(requireAlgorithms()),ai=ui(requireIsDate());function li(vd){if(typeof WeakMap!="function")return null;var Sd=new WeakMap,Id=new WeakMap;return(li=function(Bd){return Bd?Id:Sd})(vd)}function ci(vd,Sd){if(vd&&vd.__esModule)return vd;if(vd===null||oi(vd)!="object"&&typeof vd!="function")return{default:vd};var Id=li(Sd);if(Id&&Id.has(vd))return Id.get(vd);var Bd={__proto__:null},nf=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var lf in vd)if(lf!=="default"&&{}.hasOwnProperty.call(vd,lf)){var pf=nf?Object.getOwnPropertyDescriptor(vd,lf):null;pf&&(pf.get||pf.set)?Object.defineProperty(Bd,lf,pf):Bd[lf]=vd[lf]}return Bd.default=vd,Id&&Id.set(vd,Bd),Bd}function ui(vd){return vd&&vd.__esModule?vd:{default:vd}}function di(vd){return ga(vd)||ha(vd)||pi(vd)||hi()}function hi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
310
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pi(vd,Sd){if(vd){if(typeof vd=="string")return va(vd,Sd);var Id=Object.prototype.toString.call(vd).slice(8,-1);if(Id==="Object"&&vd.constructor&&(Id=vd.constructor.name),Id==="Map"||Id==="Set")return Array.from(vd);if(Id==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Id))return va(vd,Sd)}}function ha(vd){if(typeof Symbol<"u"&&vd[Symbol.iterator]!=null||vd["@@iterator"]!=null)return Array.from(vd)}function ga(vd){if(Array.isArray(vd))return va(vd)}function va(vd,Sd){(Sd==null||Sd>vd.length)&&(Sd=vd.length);for(var Id=0,Bd=new Array(Sd);Id<Sd;Id++)Bd[Id]=vd[Id];return Bd}function ba(vd){var Sd=vd.slice(0,2),Id=parseInt(vd.slice(2,4),10);Id>40?(Id-=40,Sd="20".concat(Sd)):Id>20?(Id-=20,Sd="18".concat(Sd)):Sd="19".concat(Sd),Id<10&&(Id="0".concat(Id));var Bd="".concat(Sd,"/").concat(Id,"/").concat(vd.slice(4,6));if(!(0,ai.default)(Bd,"YYYY/MM/DD"))return!1;for(var nf=vd.split("").map(function(vf){return parseInt(vf,10)}),lf=[2,4,8,5,10,9,7,3,6],pf=0,gf=0;gf<lf.length;gf++)pf+=nf[gf]*lf[gf];return pf=pf%11===10?0:pf%11,pf===nf[9]}function wa(vd){var Sd=vd.split(""),Id=Sd.filter(function(nf,lf){return lf%2}).map(function(nf){return Number(nf)*2}).join("").split(""),Bd=Sd.filter(function(nf,lf){return!(lf%2)}).concat(Id).map(function(nf){return Number(nf)}).reduce(function(nf,lf){return nf+lf});return Bd%10===0}function xa(vd){vd=vd.replace(/\W/,"");var Sd=parseInt(vd.slice(0,2),10);if(vd.length===10)Sd<54?Sd="20".concat(Sd):Sd="19".concat(Sd);else{if(vd.slice(6)==="000")return!1;if(Sd<54)Sd="19".concat(Sd);else return!1}Sd.length===3&&(Sd=[Sd.slice(0,2),"0",Sd.slice(2)].join(""));var Id=parseInt(vd.slice(2,4),10);if(Id>50&&(Id-=50),Id>20){if(parseInt(Sd,10)<2004)return!1;Id-=20}Id<10&&(Id="0".concat(Id));var Bd="".concat(Sd,"/").concat(Id,"/").concat(vd.slice(4,6));if(!(0,ai.default)(Bd,"YYYY/MM/DD"))return!1;if(vd.length===10&&parseInt(vd,10)%11!==0){var nf=parseInt(vd.slice(0,9),10)%11;if(parseInt(Sd,10)<1986&&nf===10){if(parseInt(vd.slice(9),10)!==0)return!1}else return!1}return!0}function Ca(vd){return ii.luhnCheck(vd)}function el(vd){for(var Sd=vd.split("").map(function(vf){return parseInt(vf,10)}),Id=[],Bd=0;Bd<Sd.length-1;Bd++){Id.push("");for(var nf=0;nf<Sd.length-1;nf++)Sd[Bd]===Sd[nf]&&(Id[Bd]+=nf)}if(Id=Id.filter(function(vf){return vf.length>1}),Id.length!==2&&Id.length!==3)return!1;if(Id[0].length===3){for(var lf=Id[0].split("").map(function(vf){return parseInt(vf,10)}),pf=0,gf=0;gf<lf.length-1;gf++)lf[gf]+1===lf[gf+1]&&(pf+=1);if(pf===2)return!1}return ii.iso7064Check(vd)}function ku(vd){vd=vd.replace(/\W/,"");var Sd=parseInt(vd.slice(4,6),10),Id=vd.slice(6,7);switch(Id){case"0":case"1":case"2":case"3":Sd="19".concat(Sd);break;case"4":case"9":Sd<37?Sd="20".concat(Sd):Sd="19".concat(Sd);break;default:if(Sd<37)Sd="20".concat(Sd);else if(Sd>58)Sd="18".concat(Sd);else return!1;break}Sd.length===3&&(Sd=[Sd.slice(0,2),"0",Sd.slice(2)].join(""));var Bd="".concat(Sd,"/").concat(vd.slice(2,4),"/").concat(vd.slice(0,2));if(!(0,ai.default)(Bd,"YYYY/MM/DD"))return!1;for(var nf=vd.split("").map(function(vf){return parseInt(vf,10)}),lf=0,pf=4,gf=0;gf<9;gf++)lf+=nf[gf]*pf,pf-=1,pf===1&&(pf=7);return lf%=11,lf===1?!1:lf===0?nf[9]===0:nf[9]===11-lf}function gd(vd){for(var Sd=vd.slice(0,8).split("").map(function(lf){return parseInt(lf,10)}),Id=0,Bd=1;Bd<Sd.length;Bd+=2)Id+=Sd[Bd];for(var nf=0;nf<Sd.length;nf+=2)Sd[nf]<2?Id+=1-Sd[nf]:(Id+=2*(Sd[nf]-2)+5,Sd[nf]>4&&(Id+=2));return String.fromCharCode(Id%26+65)===vd.charAt(8)}function Ed(vd){for(var Sd=vd.split("").map(function(nf){return parseInt(nf,10)}),Id=0,Bd=0;Bd<8;Bd++)Id+=Sd[Bd]*Math.pow(2,8-Bd);return Id%11%10===Sd[8]}function Od(vd){var Sd=ii.reverseMultiplyAndSum(vd.split("").slice(0,7).map(function(Id){return parseInt(Id,10)}),8);return vd.length===9&&vd[8]!=="W"&&(Sd+=(vd[8].charCodeAt(0)-64)*9),Sd%=23,Sd===0?vd[7].toUpperCase()==="W":vd[7].toUpperCase()===String.fromCharCode(64+Sd)}var Nd={andover:["10","12"],atlanta:["60","67"],austin:["50","53"],brookhaven:["01","02","03","04","05","06","11","13","14","16","21","22","23","25","34","51","52","54","55","56","57","58","59","65"],cincinnati:["30","32","35","36","37","38","61"],fresno:["15","24"],internet:["20","26","27","45","46","47"],kansas:["40","44"],memphis:["94","95"],ogden:["80","90"],philadelphia:["33","39","41","42","43","46","48","62","63","64","66","68","71","72","73","74","75","76","77","81","82","83","84","85","86","87","88","91","92","93","98","99"],sba:["31"]};function Pd(){var vd=[];for(var Sd in Nd)Nd.hasOwnProperty(Sd)&&vd.push.apply(vd,di(Nd[Sd]));return vd}function Ld(vd){return Pd().indexOf(vd.slice(0,2))!==-1}function rf(vd){for(var Sd=0,Id=vd.split(""),Bd=parseInt(Id.pop(),10),nf=0;nf<Id.length;nf++)Sd+=Id[9-nf]*(2+nf%6);var lf=11-Sd%11;return lf===11?lf=0:lf===10&&(lf=9),Bd===lf}function kd(vd){var Sd=vd.toUpperCase().split("");if(isNaN(parseInt(Sd[0],10))&&Sd.length>1){var Id=0;switch(Sd[0]){case"Y":Id=1;break;case"Z":Id=2;break}Sd.splice(0,1,Id)}else for(;Sd.length<9;)Sd.unshift(0);var Bd=["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"];Sd=Sd.join("");var nf=parseInt(Sd.slice(0,8),10)%23;return Sd[8]===Bd[nf]}function Md(vd){var Sd=vd.slice(1,3),Id=vd.slice(0,1);switch(Id){case"1":case"2":Sd="18".concat(Sd);break;case"3":case"4":Sd="19".concat(Sd);break;default:Sd="20".concat(Sd);break}var Bd="".concat(Sd,"/").concat(vd.slice(3,5),"/").concat(vd.slice(5,7));if(!(0,ai.default)(Bd,"YYYY/MM/DD"))return!1;for(var nf=vd.split("").map(function(bf){return parseInt(bf,10)}),lf=0,pf=1,gf=0;gf<10;gf++)lf+=nf[gf]*pf,pf+=1,pf===10&&(pf=1);if(lf%11===10){lf=0,pf=3;for(var vf=0;vf<10;vf++)lf+=nf[vf]*pf,pf+=1,pf===10&&(pf=1);if(lf%11===10)return nf[10]===0}return lf%11===nf[10]}function Td(vd){var Sd=vd.slice(4,6),Id=vd.slice(6,7);switch(Id){case"+":Sd="18".concat(Sd);break;case"-":Sd="19".concat(Sd);break;default:Sd="20".concat(Sd);break}var Bd="".concat(Sd,"/").concat(vd.slice(2,4),"/").concat(vd.slice(0,2));if(!(0,ai.default)(Bd,"YYYY/MM/DD"))return!1;var nf=parseInt(vd.slice(0,6)+vd.slice(7,10),10)%31;if(nf<10)return nf===parseInt(vd.slice(10),10);nf-=10;var lf=["A","B","C","D","E","F","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y"];return lf[nf]===vd.slice(10)}function wd(vd){if(vd.slice(2,4)!=="00"||vd.slice(4,6)!=="00"){var Sd="".concat(vd.slice(0,2),"/").concat(vd.slice(2,4),"/").concat(vd.slice(4,6));if(!(0,ai.default)(Sd,"YY/MM/DD"))return!1}var Id=97-parseInt(vd.slice(0,9),10)%97,Bd=parseInt(vd.slice(9,11),10);return!(Id!==Bd&&(Id=97-parseInt("2".concat(vd.slice(0,9)),10)%97,Id!==Bd))}function Cd(vd){vd=vd.replace(/\s/g,"");var Sd=parseInt(vd.slice(0,10),10)%511,Id=parseInt(vd.slice(10,13),10);return Sd===Id}function sf(vd){var Sd="".concat(vd.slice(0,4),"/").concat(vd.slice(4,6),"/").concat(vd.slice(6,8));return!(0,ai.default)(Sd,"YYYY/MM/DD")||!ii.luhnCheck(vd.slice(0,12))?!1:ii.verhoeffCheck("".concat(vd.slice(0,11)).concat(vd[12]))}function of(vd){return ii.iso7064Check(vd)}function Wd(vd){for(var Sd=vd.split("").map(function(nf){return parseInt(nf,10)}),Id=8,Bd=1;Bd<9;Bd++)Id+=Sd[Bd]*(Bd+1);return Id%11===Sd[9]}function df(vd){for(var Sd=!1,Id=!1,Bd=0;Bd<3;Bd++)if(!Sd&&/[AEIOU]/.test(vd[Bd]))Sd=!0;else if(!Id&&Sd&&vd[Bd]==="X")Id=!0;else if(Bd>0&&(Sd&&!Id&&!/[AEIOU]/.test(vd[Bd])||Id&&!/X/.test(vd[Bd])))return!1;return!0}function hf(vd){var Sd=vd.toUpperCase().split("");if(!df(Sd.slice(0,3))||!df(Sd.slice(3,6)))return!1;for(var Id=[6,7,9,10,12,13,14],Bd={L:"0",M:"1",N:"2",P:"3",Q:"4",R:"5",S:"6",T:"7",U:"8",V:"9"},nf=0,lf=Id;nf<lf.length;nf++){var pf=lf[nf];Sd[pf]in Bd&&Sd.splice(pf,1,Bd[Sd[pf]])}var gf={A:"01",B:"02",C:"03",D:"04",E:"05",H:"06",L:"07",M:"08",P:"09",R:"10",S:"11",T:"12"},vf=gf[Sd[8]],bf=parseInt(Sd[9]+Sd[10],10);bf>40&&(bf-=40),bf<10&&(bf="0".concat(bf));var If="".concat(Sd[6]).concat(Sd[7],"/").concat(vf,"/").concat(bf);if(!(0,ai.default)(If,"YY/MM/DD"))return!1;for(var Af=0,$f=1;$f<Sd.length-1;$f+=2){var Cf=parseInt(Sd[$f],10);isNaN(Cf)&&(Cf=Sd[$f].charCodeAt(0)-65),Af+=Cf}for(var kf={A:1,B:0,C:5,D:7,E:9,F:13,G:15,H:17,I:19,J:21,K:2,L:4,M:18,N:20,O:11,P:3,Q:6,R:8,S:12,T:14,U:16,V:10,W:22,X:25,Y:24,Z:23,0:1,1:0},Rf=0;Rf<Sd.length-1;Rf+=2){var Pf=0;if(Sd[Rf]in kf)Pf=kf[Sd[Rf]];else{var Ff=parseInt(Sd[Rf],10);Pf=2*Ff+1,Ff>4&&(Pf+=2)}Af+=Pf}return String.fromCharCode(65+Af%26)===Sd[15]}function xd(vd){vd=vd.replace(/\W/,"");var Sd=vd.slice(0,2);if(Sd!=="32"){var Id=vd.slice(2,4);if(Id!=="00"){var Bd=vd.slice(4,6);switch(vd[6]){case"0":Bd="18".concat(Bd);break;case"1":Bd="19".concat(Bd);break;default:Bd="20".concat(Bd);break}var nf="".concat(Bd,"/").concat(vd.slice(2,4),"/").concat(Sd);if(!(0,ai.default)(nf,"YYYY/MM/DD"))return!1}for(var lf=1101,pf=[1,6,3,7,9,10,5,8,4,2],gf=0;gf<vd.length-1;gf++)lf-=parseInt(vd[gf],10)*pf[gf];return parseInt(vd[10],10)===lf%11}return!0}function Fd(vd){if(vd.length!==9){for(var Sd=vd.toUpperCase().split("");Sd.length<8;)Sd.unshift(0);switch(vd[7]){case"A":case"P":if(parseInt(Sd[6],10)===0)return!1;break;default:{var Id=parseInt(Sd.join("").slice(0,5),10);if(Id>32e3)return!1;var Bd=parseInt(Sd.join("").slice(5,7),10);if(Id===Bd)return!1}}}return!0}function Vd(vd){return ii.reverseMultiplyAndSum(vd.split("").slice(0,8).map(function(Sd){return parseInt(Sd,10)}),9)%11===parseInt(vd[8],10)}function af(vd){if(vd.length===10){for(var Sd=[6,5,7,2,3,4,5,6,7],Id=0,Bd=0;Bd<Sd.length;Bd++)Id+=parseInt(vd[Bd],10)*Sd[Bd];return Id%=11,Id===10?!1:Id===parseInt(vd[9],10)}var nf=vd.slice(0,2),lf=parseInt(vd.slice(2,4),10);lf>80?(nf="18".concat(nf),lf-=80):lf>60?(nf="22".concat(nf),lf-=60):lf>40?(nf="21".concat(nf),lf-=40):lf>20?(nf="20".concat(nf),lf-=20):nf="19".concat(nf),lf<10&&(lf="0".concat(lf));var pf="".concat(nf,"/").concat(lf,"/").concat(vd.slice(4,6));if(!(0,ai.default)(pf,"YYYY/MM/DD"))return!1;for(var gf=0,vf=1,bf=0;bf<vd.length-1;bf++)gf+=parseInt(vd[bf],10)*vf%10,vf+=2,vf>10?vf=1:vf===5&&(vf+=2);return gf=10-gf%10,gf===parseInt(vd[10],10)}function ff(vd){if(vd.length===11){var Sd,Id;if(Sd=0,vd==="11111111111"||vd==="22222222222"||vd==="33333333333"||vd==="44444444444"||vd==="55555555555"||vd==="66666666666"||vd==="77777777777"||vd==="88888888888"||vd==="99999999999"||vd==="00000000000")return!1;for(var Bd=1;Bd<=9;Bd++)Sd+=parseInt(vd.substring(Bd-1,Bd),10)*(11-Bd);if(Id=Sd*10%11,Id===10&&(Id=0),Id!==parseInt(vd.substring(9,10),10))return!1;Sd=0;for(var nf=1;nf<=10;nf++)Sd+=parseInt(vd.substring(nf-1,nf),10)*(12-nf);return Id=Sd*10%11,Id===10&&(Id=0),Id===parseInt(vd.substring(10,11),10)}if(vd==="00000000000000"||vd==="11111111111111"||vd==="22222222222222"||vd==="33333333333333"||vd==="44444444444444"||vd==="55555555555555"||vd==="66666666666666"||vd==="77777777777777"||vd==="88888888888888"||vd==="99999999999999")return!1;for(var lf=vd.length-2,pf=vd.substring(0,lf),gf=vd.substring(lf),vf=0,bf=lf-7,If=lf;If>=1;If--)vf+=pf.charAt(lf-If)*bf,bf-=1,bf<2&&(bf=9);var Af=vf%11<2?0:11-vf%11;if(Af!==parseInt(gf.charAt(0),10))return!1;lf+=1,pf=vd.substring(0,lf),vf=0,bf=lf-7;for(var $f=lf;$f>=1;$f--)vf+=pf.charAt(lf-$f)*bf,bf-=1,bf<2&&(bf=9);return Af=vf%11<2?0:11-vf%11,Af===parseInt(gf.charAt(1),10)}function uf(vd){var Sd=11-ii.reverseMultiplyAndSum(vd.split("").slice(0,8).map(function(Id){return parseInt(Id,10)}),9)%11;return Sd>9?parseInt(vd[8],10)===0:Sd===parseInt(vd[8],10)}function mf(vd){if(vd.slice(0,4)!=="9000"){var Sd=vd.slice(1,3);switch(vd[0]){case"1":case"2":Sd="19".concat(Sd);break;case"3":case"4":Sd="18".concat(Sd);break;case"5":case"6":Sd="20".concat(Sd);break}var Id="".concat(Sd,"/").concat(vd.slice(3,5),"/").concat(vd.slice(5,7));if(Id.length===8){if(!(0,ai.default)(Id,"YY/MM/DD"))return!1}else if(!(0,ai.default)(Id,"YYYY/MM/DD"))return!1;for(var Bd=vd.split("").map(function(gf){return parseInt(gf,10)}),nf=[2,7,9,1,4,6,3,5,8,2,7,9],lf=0,pf=0;pf<nf.length;pf++)lf+=Bd[pf]*nf[pf];return lf%11===10?Bd[12]===1:Bd[12]===lf%11}return!0}function yf(vd){if(vd.length===9){if(vd=vd.replace(/\W/,""),vd.slice(6)==="000")return!1;var Sd=parseInt(vd.slice(0,2),10);if(Sd>53)return!1;Sd<10?Sd="190".concat(Sd):Sd="19".concat(Sd);var Id=parseInt(vd.slice(2,4),10);Id>50&&(Id-=50),Id<10&&(Id="0".concat(Id));var Bd="".concat(Sd,"/").concat(Id,"/").concat(vd.slice(4,6));if(!(0,ai.default)(Bd,"YYYY/MM/DD"))return!1}return!0}function Sf(vd){var Sd=11-ii.reverseMultiplyAndSum(vd.split("").slice(0,7).map(function(Id){return parseInt(Id,10)}),8)%11;return Sd===10?parseInt(vd[7],10)===0:Sd===parseInt(vd[7],10)}function Of(vd){var Sd=vd.slice(0);vd.length>11&&(Sd=Sd.slice(2));var Id="",Bd=Sd.slice(2,4),nf=parseInt(Sd.slice(4,6),10);if(vd.length>11)Id=vd.slice(0,4);else if(Id=vd.slice(0,2),vd.length===11&&nf<60){var lf=new Date().getFullYear().toString(),pf=parseInt(lf.slice(0,2),10);if(lf=parseInt(lf,10),vd[6]==="-")parseInt("".concat(pf).concat(Id),10)>lf?Id="".concat(pf-1).concat(Id):Id="".concat(pf).concat(Id);else if(Id="".concat(pf-1).concat(Id),lf-parseInt(Id,10)<100)return!1}nf>60&&(nf-=60),nf<10&&(nf="0".concat(nf));var gf="".concat(Id,"/").concat(Bd,"/").concat(nf);if(gf.length===8){if(!(0,ai.default)(gf,"YY/MM/DD"))return!1}else if(!(0,ai.default)(gf,"YYYY/MM/DD"))return!1;return ii.luhnCheck(vd.replace(/\W/,""))}function wf(vd){for(var Sd=vd.split("").map(function(lf){return parseInt(lf,10)}),Id=[-1,5,7,9,4,6,10,5,7],Bd=0,nf=0;nf<Id.length;nf++)Bd+=Sd[nf]*Id[nf];return Bd%11===10?Sd[9]===0:Sd[9]===Bd%11}var Ef={"bg-BG":/^\d{10}$/,"cs-CZ":/^\d{6}\/{0,1}\d{3,4}$/,"de-AT":/^\d{9}$/,"de-DE":/^[1-9]\d{10}$/,"dk-DK":/^\d{6}-{0,1}\d{4}$/,"el-CY":/^[09]\d{7}[A-Z]$/,"el-GR":/^([0-4]|[7-9])\d{8}$/,"en-CA":/^\d{9}$/,"en-GB":/^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i,"en-IE":/^\d{7}[A-W][A-IW]{0,1}$/i,"en-US":/^\d{2}[- ]{0,1}\d{7}$/,"es-AR":/(20|23|24|27|30|33|34)[0-9]{8}[0-9]/,"es-ES":/^(\d{0,8}|[XYZKLM]\d{7})[A-HJ-NP-TV-Z]$/i,"et-EE":/^[1-6]\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\d$/,"fi-FI":/^\d{6}[-+A]\d{3}[0-9A-FHJ-NPR-Y]$/i,"fr-BE":/^\d{11}$/,"fr-FR":/^[0-3]\d{12}$|^[0-3]\d\s\d{2}(\s\d{3}){3}$/,"fr-LU":/^\d{13}$/,"hr-HR":/^\d{11}$/,"hu-HU":/^8\d{9}$/,"it-IT":/^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i,"lv-LV":/^\d{6}-{0,1}\d{5}$/,"mt-MT":/^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i,"nl-NL":/^\d{9}$/,"pl-PL":/^\d{10,11}$/,"pt-BR":/(?:^\d{11}$)|(?:^\d{14}$)/,"pt-PT":/^\d{9}$/,"ro-RO":/^\d{13}$/,"sk-SK":/^\d{6}\/{0,1}\d{3,4}$/,"sl-SI":/^[1-9]\d{7}$/,"sv-SE":/^(\d{6}[-+]{0,1}\d{4}|(18|19|20)\d{6}[-+]{0,1}\d{4})$/,"uk-UA":/^\d{10}$/};Ef["lb-LU"]=Ef["fr-LU"],Ef["lt-LT"]=Ef["et-EE"],Ef["nl-BE"]=Ef["fr-BE"],Ef["fr-CA"]=Ef["en-CA"];var xf={"bg-BG":ba,"cs-CZ":xa,"de-AT":Ca,"de-DE":el,"dk-DK":ku,"el-CY":gd,"el-GR":Ed,"en-CA":wa,"en-IE":Od,"en-US":Ld,"es-AR":rf,"es-ES":kd,"et-EE":Md,"fi-FI":Td,"fr-BE":wd,"fr-FR":Cd,"fr-LU":sf,"hr-HR":of,"hu-HU":Wd,"it-IT":hf,"lv-LV":xd,"mt-MT":Fd,"nl-NL":Vd,"pl-PL":af,"pt-BR":ff,"pt-PT":uf,"ro-RO":mf,"sk-SK":yf,"sl-SI":Sf,"sv-SE":Of,"uk-UA":wf};xf["lb-LU"]=xf["fr-LU"],xf["lt-LT"]=xf["et-EE"],xf["nl-BE"]=xf["fr-BE"],xf["fr-CA"]=xf["en-CA"];var _d=/[-\\\/!@#$%\^&\*\(\)\+\=\[\]]+/g,Dd={"de-AT":_d,"de-DE":/[\/\\]/g,"fr-BE":_d};Dd["nl-BE"]=Dd["fr-BE"];function tf(vd){var Sd=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US";(0,si.default)(vd);var Id=vd.slice(0);if(Sd in Ef)return Sd in Dd&&(Id=Id.replace(Dd[Sd],"")),Ef[Sd].test(Id)?Sd in xf?xf[Sd](Id):!0:!1;throw new Error("Invalid locale '".concat(Sd,"'"))}Ws.exports=ws.default,Ws.exports.default=ws.default}(isTaxID,isTaxID.exports)),isTaxID.exports}var isMobilePhone={},hasRequiredIsMobilePhone;function requireIsMobilePhone(){if(hasRequiredIsMobilePhone)return isMobilePhone;hasRequiredIsMobilePhone=1,Object.defineProperty(isMobilePhone,"__esModule",{value:!0}),isMobilePhone.default=si,isMobilePhone.locales=void 0;var Ws=ws(requireAssertString());function ws(ii){return ii&&ii.__esModule?ii:{default:ii}}var oi={"am-AM":/^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/,"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-BH":/^(\+?973)?(3|6)\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-LB":/^(\+?961)?((3|81)\d{6}|7\d{7})$/,"ar-EG":/^((\+?20)|0)?1[0125]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)([569]\d{7}|41\d{6})$/,"ar-LY":/^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,"ar-MA":/^(?:(?:\+|00)212|0)[5-7]\d{8}$/,"ar-OM":/^((\+|00)968)?(9[1-9])\d{6}$/,"ar-PS":/^(\+?970|0)5[6|9](\d{7})$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SD":/^((\+?249)|0)?(9[012369]|1[012])\d{7}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"az-AZ":/^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/,"bs-BA":/^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/^(\+?880|0)1[13456789][0-9]{8}$/,"ca-AD":/^(\+376)?[346]\d{5}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,"de-AT":/^(\+43|0)\d{1,4}\d{3,12}$/,"de-CH":/^(\+41|0)([1-9])\d{1,9}$/,"de-LU":/^(\+352)?((6\d1)\d{6})$/,"dv-MV":/^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,"el-GR":/^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,"el-CY":/^(\+?357?)?(9(9|6)\d{6})$/,"en-AI":/^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-AG":/^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,"en-BM":/^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,"en-BS":/^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-GG":/^(\+?44|0)1481\d{6}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,"en-GY":/^(\+592|0)6\d{6}$/,"en-HK":/^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,"en-MO":/^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-JM":/^(\+?876)?\d{7}$/,"en-KE":/^(\+?254|0)(7|1)\d{8}$/,"fr-CF":/^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/,"en-SS":/^(\+?211|0)(9[1257])\d{7}$/,"en-KI":/^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,"en-KN":/^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,"en-LS":/^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,"en-MT":/^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-MW":/^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/,"en-NA":/^(\+?264|0)(6|8)\d{7}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PG":/^(\+?675|0)?(7\d|8[18])\d{6}$/,"en-PK":/^((00|\+)?92|0)3[0-6]\d{8}$/,"en-PH":/^(09|\+639)\d{9}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[3689]\d{7}$/,"en-SL":/^(\+?232|0)\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"en-ZW":/^(\+263)[0-9]{9}$/,"en-BW":/^(\+?267)?(7[1-8]{1})\d{6}$/,"es-AR":/^\+?549(11|[2368]\d)\d{8}$/,"es-BO":/^(\+?591)?(6|7)\d{7}$/,"es-CO":/^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,"es-CL":/^(\+?56|0)[2-9]\d{1}\d{7}$/,"es-CR":/^(\+506)?[2-8]\d{7}$/,"es-CU":/^(\+53|0053)?5\d{7}$/,"es-DO":/^(\+?1)?8[024]9\d{7}$/,"es-HN":/^(\+?504)?[9|8|3|2]\d{7}$/,"es-EC":/^(\+?593|0)([2-7]|9[2-9])\d{7}$/,"es-ES":/^(\+?34)?[6|7]\d{8}$/,"es-PE":/^(\+?51)?9\d{8}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-NI":/^(\+?505)\d{7,8}$/,"es-PA":/^(\+?507)\d{7,8}$/,"es-PY":/^(\+?595|0)9[9876]\d{7}$/,"es-SV":/^(\+?503)?[67]\d{7}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"es-VE":/^(\+?58)?(2|4)\d{9}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,"fj-FJ":/^(\+?679)?\s?\d{3}\s?\d{4}$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-BF":/^(\+226|0)[67]\d{7}$/,"fr-BJ":/^(\+229)\d{8}$/,"fr-CD":/^(\+?243|0)?(8|9)\d{8}$/,"fr-CM":/^(\+?237)6[0-9]{8}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"fr-GF":/^(\+?594|0|00594)[67]\d{8}$/,"fr-GP":/^(\+?590|0|00590)[67]\d{8}$/,"fr-MQ":/^(\+?596|0|00596)[67]\d{8}$/,"fr-PF":/^(\+?689)?8[789]\d{6}$/,"fr-RE":/^(\+?262|0|00262)[67]\d{8}$/,"fr-WF":/^(\+681)?\d{6}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36|06)(20|30|31|50|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"ir-IR":/^(\+98|0)?9\d{9}$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"it-SM":/^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,"ja-JP":/^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,"ka-GE":/^(\+?995)?(79\d{7}|5\d{8})$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"ky-KG":/^(\+?7\s?\+?7|0)\s?\d{2}\s?\d{3}\s?\d{4}$/,"lt-LT":/^(\+370|8)\d{8}$/,"lv-LV":/^(\+?371)2\d{7}$/,"mg-MG":/^((\+?261|0)(2|3)\d)?\d{7}$/,"mn-MN":/^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/,"my-MM":/^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,"ms-MY":/^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/,"mz-MZ":/^(\+?258)?8[234567]\d{7}$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"ne-NP":/^(\+?977)?9[78]\d{8}$/,"nl-BE":/^(\+?32|0)4\d{8}$/,"nl-NL":/^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,"nl-AW":/^(\+)?297(56|59|64|73|74|99)\d{5}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"pt-AO":/^(\+244)\d{9}$/,"ro-MD":/^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,"ro-RO":/^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"si-LK":/^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"so-SO":/^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/,"sq-AL":/^(\+355|0)6[789]\d{6}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"tg-TJ":/^(\+?992)?[5][5]\d{7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"tk-TM":/^(\+993|993|8)\d{8}$/,"uk-UA":/^(\+?38|8)?0\d{9}$/,"uz-UZ":/^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,"vi-VN":/^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/,"dz-BT":/^(\+?975|0)?(17|16|77|02)\d{6}$/,"ar-YE":/^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/,"ar-EH":/^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,"fa-AF":/^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/};oi["en-CA"]=oi["en-US"],oi["fr-CA"]=oi["en-CA"],oi["fr-BE"]=oi["nl-BE"],oi["zh-HK"]=oi["en-HK"],oi["zh-MO"]=oi["en-MO"],oi["ga-IE"]=oi["en-IE"],oi["fr-CH"]=oi["de-CH"],oi["it-CH"]=oi["fr-CH"];function si(ii,ai,li){if((0,Ws.default)(ii),li&&li.strictMode&&!ii.startsWith("+"))return!1;if(Array.isArray(ai))return ai.some(function(di){if(oi.hasOwnProperty(di)){var hi=oi[di];if(hi.test(ii))return!0}return!1});if(ai in oi)return oi[ai].test(ii);if(!ai||ai==="any"){for(var ci in oi)if(oi.hasOwnProperty(ci)){var ui=oi[ci];if(ui.test(ii))return!0}return!1}throw new Error("Invalid locale '".concat(ai,"'"))}return isMobilePhone.locales=Object.keys(oi),isMobilePhone}var isEthereumAddress={exports:{}},hasRequiredIsEthereumAddress;function requireIsEthereumAddress(){return hasRequiredIsEthereumAddress||(hasRequiredIsEthereumAddress=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^(0x)[0-9a-f]{40}$/i;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isEthereumAddress,isEthereumAddress.exports)),isEthereumAddress.exports}var isCurrency={exports:{}},hasRequiredIsCurrency;function requireIsCurrency(){return hasRequiredIsCurrency||(hasRequiredIsCurrency=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=ii(requireMerge()),si=ii(requireAssertString());function ii(ui){return ui&&ui.__esModule?ui:{default:ui}}function ai(ui){var di="\\d{".concat(ui.digits_after_decimal[0],"}");ui.digits_after_decimal.forEach(function(Ca,el){el!==0&&(di="".concat(di,"|\\d{").concat(Ca,"}"))});var hi="(".concat(ui.symbol.replace(/\W/,function(Ca){return"\\".concat(Ca)}),")").concat(ui.require_symbol?"":"?"),pi="-?",ha="[1-9]\\d*",ga="[1-9]\\d{0,2}(\\".concat(ui.thousands_separator,"\\d{3})*"),va=["0",ha,ga],ba="(".concat(va.join("|"),")?"),wa="(\\".concat(ui.decimal_separator,"(").concat(di,"))").concat(ui.require_decimal?"":"?"),xa=ba+(ui.allow_decimal||ui.require_decimal?wa:"");return ui.allow_negatives&&!ui.parens_for_negatives&&(ui.negative_sign_after_digits?xa+=pi:ui.negative_sign_before_digits&&(xa=pi+xa)),ui.allow_negative_sign_placeholder?xa="( (?!\\-))?".concat(xa):ui.allow_space_after_symbol?xa=" ?".concat(xa):ui.allow_space_after_digits&&(xa+="( (?!$))?"),ui.symbol_after_digits?xa+=hi:xa=hi+xa,ui.allow_negatives&&(ui.parens_for_negatives?xa="(\\(".concat(xa,"\\)|").concat(xa,")"):ui.negative_sign_before_digits||ui.negative_sign_after_digits||(xa=pi+xa)),new RegExp("^(?!-? )(?=.*\\d)".concat(xa,"$"))}var li={symbol:"$",require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:",",decimal_separator:".",allow_decimal:!0,require_decimal:!1,digits_after_decimal:[2],allow_space_after_digits:!1};function ci(ui,di){return(0,si.default)(ui),di=(0,oi.default)(di,li),ai(di).test(ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isCurrency,isCurrency.exports)),isCurrency.exports}var isBtcAddress={exports:{}},hasRequiredIsBtcAddress;function requireIsBtcAddress(){return hasRequiredIsBtcAddress||(hasRequiredIsBtcAddress=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=li;var oi=si(requireAssertString());function si(ci){return ci&&ci.__esModule?ci:{default:ci}}var ii=/^(bc1)[a-z0-9]{25,39}$/,ai=/^(1|3)[A-HJ-NP-Za-km-z1-9]{25,39}$/;function li(ci){return(0,oi.default)(ci),ii.test(ci)||ai.test(ci)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isBtcAddress,isBtcAddress.exports)),isBtcAddress.exports}var isISO6346={},hasRequiredIsISO6346;function requireIsISO6346(){if(hasRequiredIsISO6346)return isISO6346;hasRequiredIsISO6346=1,Object.defineProperty(isISO6346,"__esModule",{value:!0}),isISO6346.isFreightContainerID=void 0,isISO6346.isISO6346=ii;var Ws=ws(requireAssertString());function ws(ai){return ai&&ai.__esModule?ai:{default:ai}}var oi=/^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/,si=/^[0-9]$/;function ii(ai){if((0,Ws.default)(ai),ai=ai.toUpperCase(),!oi.test(ai))return!1;if(ai.length===11){for(var li=0,ci=0;ci<ai.length-1;ci++)if(si.test(ai[ci]))li+=ai[ci]*Math.pow(2,ci);else{var ui=void 0,di=ai.charCodeAt(ci)-55;di<11?ui=di:di>=11&&di<=20?ui=12+di%11:di>=21&&di<=30?ui=23+di%21:ui=34+di%31,li+=ui*Math.pow(2,ci)}var hi=li%11;return Number(ai[ai.length-1])===hi}return!0}return isISO6346.isFreightContainerID=ii,isISO6346}var isISO6391={exports:{}},hasRequiredIsISO6391;function requireIsISO6391(){return hasRequiredIsISO6391||(hasRequiredIsISO6391=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=new Set(["aa","ab","ae","af","ak","am","an","ar","as","av","ay","az","az","ba","be","bg","bh","bi","bm","bn","bo","br","bs","ca","ce","ch","co","cr","cs","cu","cv","cy","da","de","dv","dz","ee","el","en","eo","es","et","eu","fa","ff","fi","fj","fo","fr","fy","ga","gd","gl","gn","gu","gv","ha","he","hi","ho","hr","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","io","is","it","iu","ja","jv","ka","kg","ki","kj","kk","kl","km","kn","ko","kr","ks","ku","kv","kw","ky","la","lb","lg","li","ln","lo","lt","lu","lv","mg","mh","mi","mk","ml","mn","mr","ms","mt","my","na","nb","nd","ne","ng","nl","nn","no","nr","nv","ny","oc","oj","om","or","os","pa","pi","pl","ps","pt","qu","rm","rn","ro","ru","rw","sa","sc","sd","se","sg","si","sk","sl","sm","sn","so","sq","sr","ss","st","su","sv","sw","ta","te","tg","th","ti","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","wo","xh","yi","yo","za","zh","zu"]);function ai(li){return(0,oi.default)(li),ii.has(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isISO6391,isISO6391.exports)),isISO6391.exports}var isISO8601={exports:{}},hasRequiredIsISO8601;function requireIsISO8601(){return hasRequiredIsISO8601||(hasRequiredIsISO8601=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=si(requireAssertString());function si(ui){return ui&&ui.__esModule?ui:{default:ui}}var ii=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,ai=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,li=function(ui){var di=ui.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/);if(di){var hi=Number(di[1]),pi=Number(di[2]);return hi%4===0&&hi%100!==0||hi%400===0?pi<=366:pi<=365}var ha=ui.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number),ga=ha[1],va=ha[2],ba=ha[3],wa=va&&"0".concat(va).slice(-2),xa=ba&&"0".concat(ba).slice(-2),Ca=new Date("".concat(ga,"-").concat(wa||"01","-").concat(xa||"01"));return va&&ba?Ca.getUTCFullYear()===ga&&Ca.getUTCMonth()+1===va&&Ca.getUTCDate()===ba:!0};function ci(ui){var di=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,oi.default)(ui);var hi=di.strictSeparator?ai.test(ui):ii.test(ui);return hi&&di.strict?li(ui):hi}Ws.exports=ws.default,Ws.exports.default=ws.default}(isISO8601,isISO8601.exports)),isISO8601.exports}var isRFC3339={exports:{}},hasRequiredIsRFC3339;function requireIsRFC3339(){return hasRequiredIsRFC3339||(hasRequiredIsRFC3339=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=xa;var oi=si(requireAssertString());function si(Ca){return Ca&&Ca.__esModule?Ca:{default:Ca}}var ii=/[0-9]{4}/,ai=/(0[1-9]|1[0-2])/,li=/([12]\d|0[1-9]|3[01])/,ci=/([01][0-9]|2[0-3])/,ui=/[0-5][0-9]/,di=/([0-5][0-9]|60)/,hi=/(\.[0-9]+)?/,pi=new RegExp("[-+]".concat(ci.source,":").concat(ui.source)),ha=new RegExp("([zZ]|".concat(pi.source,")")),ga=new RegExp("".concat(ci.source,":").concat(ui.source,":").concat(di.source).concat(hi.source)),va=new RegExp("".concat(ii.source,"-").concat(ai.source,"-").concat(li.source)),ba=new RegExp("".concat(ga.source).concat(ha.source)),wa=new RegExp("^".concat(va.source,"[ tT]").concat(ba.source,"$"));function xa(Ca){return(0,oi.default)(Ca),wa.test(Ca)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isRFC3339,isRFC3339.exports)),isRFC3339.exports}var isISO31661Alpha3={exports:{}},hasRequiredIsISO31661Alpha3;function requireIsISO31661Alpha3(){return hasRequiredIsISO31661Alpha3||(hasRequiredIsISO31661Alpha3=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=new Set(["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","VAT","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWZ","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","URY","UZB","VUT","VEN","VNM","VGB","VIR","WLF","ESH","YEM","ZMB","ZWE"]);function ai(li){return(0,oi.default)(li),ii.has(li.toUpperCase())}Ws.exports=ws.default,Ws.exports.default=ws.default}(isISO31661Alpha3,isISO31661Alpha3.exports)),isISO31661Alpha3.exports}var isISO4217={},hasRequiredIsISO4217;function requireIsISO4217(){if(hasRequiredIsISO4217)return isISO4217;hasRequiredIsISO4217=1,Object.defineProperty(isISO4217,"__esModule",{value:!0}),isISO4217.CurrencyCodes=void 0,isISO4217.default=si;var Ws=ws(requireAssertString());function ws(ii){return ii&&ii.__esModule?ii:{default:ii}}var oi=new Set(["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SLL","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VES","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"]);function si(ii){return(0,Ws.default)(ii),oi.has(ii.toUpperCase())}return isISO4217.CurrencyCodes=oi,isISO4217}var isBase32={exports:{}},hasRequiredIsBase32;function requireIsBase32(){return hasRequiredIsBase32||(hasRequiredIsBase32=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ui;var oi=ii(requireAssertString()),si=ii(requireMerge());function ii(di){return di&&di.__esModule?di:{default:di}}var ai=/^[A-Z2-7]+=*$/,li=/^[A-HJKMNP-TV-Z0-9]+$/,ci={crockford:!1};function ui(di,hi){if((0,oi.default)(di),hi=(0,si.default)(hi,ci),hi.crockford)return li.test(di);var pi=di.length;return!!(pi%8===0&&ai.test(di))}Ws.exports=ws.default,Ws.exports.default=ws.default}(isBase32,isBase32.exports)),isBase32.exports}var isBase58={exports:{}},hasRequiredIsBase58;function requireIsBase58(){return hasRequiredIsBase58||(hasRequiredIsBase58=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^[A-HJ-NP-Za-km-z1-9]*$/;function ai(li){return(0,oi.default)(li),!!ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isBase58,isBase58.exports)),isBase58.exports}var isDataURI={exports:{}},hasRequiredIsDataURI;function requireIsDataURI(){return hasRequiredIsDataURI||(hasRequiredIsDataURI=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=si(requireAssertString());function si(ui){return ui&&ui.__esModule?ui:{default:ui}}var ii=/^[a-z]+\/[a-z0-9\-\+\._]+$/i,ai=/^[a-z\-]+=[a-z0-9\-]+$/i,li=/^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i;function ci(ui){(0,oi.default)(ui);var di=ui.split(",");if(di.length<2)return!1;var hi=di.shift().trim().split(";"),pi=hi.shift();if(pi.slice(0,5)!=="data:")return!1;var ha=pi.slice(5);if(ha!==""&&!ii.test(ha))return!1;for(var ga=0;ga<hi.length;ga++)if(!(ga===hi.length-1&&hi[ga].toLowerCase()==="base64")&&!ai.test(hi[ga]))return!1;for(var va=0;va<di.length;va++)if(!li.test(di[va]))return!1;return!0}Ws.exports=ws.default,Ws.exports.default=ws.default}(isDataURI,isDataURI.exports)),isDataURI.exports}var isMagnetURI={exports:{}},hasRequiredIsMagnetURI;function requireIsMagnetURI(){return hasRequiredIsMagnetURI||(hasRequiredIsMagnetURI=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;function ai(li){return(0,oi.default)(li),li.indexOf("magnet:?")!==0?!1:ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isMagnetURI,isMagnetURI.exports)),isMagnetURI.exports}var isMailtoURI={exports:{}},trim={exports:{}},rtrim={exports:{}},hasRequiredRtrim;function requireRtrim(){return hasRequiredRtrim||(hasRequiredRtrim=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){if((0,oi.default)(ai),li){var ci=new RegExp("[".concat(li.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+$"),"g");return ai.replace(ci,"")}for(var ui=ai.length-1;/\s/.test(ai.charAt(ui));)ui-=1;return ai.slice(0,ui+1)}Ws.exports=ws.default,Ws.exports.default=ws.default}(rtrim,rtrim.exports)),rtrim.exports}var ltrim={exports:{}},hasRequiredLtrim;function requireLtrim(){return hasRequiredLtrim||(hasRequiredLtrim=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){(0,oi.default)(ai);var ci=li?new RegExp("^[".concat(li.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+"),"g"):/^\s+/g;return ai.replace(ci,"")}Ws.exports=ws.default,Ws.exports.default=ws.default}(ltrim,ltrim.exports)),ltrim.exports}var hasRequiredTrim;function requireTrim(){return hasRequiredTrim||(hasRequiredTrim=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=ii(requireRtrim()),si=ii(requireLtrim());function ii(li){return li&&li.__esModule?li:{default:li}}function ai(li,ci){return(0,oi.default)((0,si.default)(li,ci),ci)}Ws.exports=ws.default,Ws.exports.default=ws.default}(trim,trim.exports)),trim.exports}var hasRequiredIsMailtoURI;function requireIsMailtoURI(){return hasRequiredIsMailtoURI||(hasRequiredIsMailtoURI=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=va;var oi=ai(requireTrim()),si=ai(requireIsEmail()),ii=ai(requireAssertString());function ai(ba){return ba&&ba.__esModule?ba:{default:ba}}function li(ba,wa){return di(ba)||ui(ba,wa)||pi(ba,wa)||ci()}function ci(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
311
311
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ui(ba,wa){var xa=ba==null?null:typeof Symbol<"u"&&ba[Symbol.iterator]||ba["@@iterator"];if(xa!=null){var Ca,el,ku,gd,Ed=[],Od=!0,Nd=!1;try{if(ku=(xa=xa.call(ba)).next,wa!==0)for(;!(Od=(Ca=ku.call(xa)).done)&&(Ed.push(Ca.value),Ed.length!==wa);Od=!0);}catch(Pd){Nd=!0,el=Pd}finally{try{if(!Od&&xa.return!=null&&(gd=xa.return(),Object(gd)!==gd))return}finally{if(Nd)throw el}}return Ed}}function di(ba){if(Array.isArray(ba))return ba}function hi(ba,wa){var xa=typeof Symbol<"u"&&ba[Symbol.iterator]||ba["@@iterator"];if(!xa){if(Array.isArray(ba)||(xa=pi(ba))||wa){xa&&(ba=xa);var Ca=0,el=function(){};return{s:el,n:function(){return Ca>=ba.length?{done:!0}:{done:!1,value:ba[Ca++]}},e:function(Od){throw Od},f:el}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
312
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ku=!0,gd=!1,Ed;return{s:function(){xa=xa.call(ba)},n:function(){var Od=xa.next();return ku=Od.done,Od},e:function(Od){gd=!0,Ed=Od},f:function(){try{!ku&&xa.return!=null&&xa.return()}finally{if(gd)throw Ed}}}}function pi(ba,wa){if(ba){if(typeof ba=="string")return ha(ba,wa);var xa=Object.prototype.toString.call(ba).slice(8,-1);if(xa==="Object"&&ba.constructor&&(xa=ba.constructor.name),xa==="Map"||xa==="Set")return Array.from(ba);if(xa==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(xa))return ha(ba,wa)}}function ha(ba,wa){(wa==null||wa>ba.length)&&(wa=ba.length);for(var xa=0,Ca=new Array(wa);xa<wa;xa++)Ca[xa]=ba[xa];return Ca}function ga(ba){var wa=new Set(["subject","body","cc","bcc"]),xa={cc:"",bcc:""},Ca=!1,el=ba.split("&");if(el.length>4)return!1;var ku=hi(el),gd;try{for(ku.s();!(gd=ku.n()).done;){var Ed=gd.value,Od=Ed.split("="),Nd=li(Od,2),Pd=Nd[0],Ld=Nd[1];if(Pd&&!wa.has(Pd)){Ca=!0;break}Ld&&(Pd==="cc"||Pd==="bcc")&&(xa[Pd]=Ld),Pd&&wa.delete(Pd)}}catch(rf){ku.e(rf)}finally{ku.f()}return Ca?!1:xa}function va(ba,wa){if((0,ii.default)(ba),ba.indexOf("mailto:")!==0)return!1;var xa=ba.replace("mailto:","").split("?"),Ca=li(xa,2),el=Ca[0],ku=Ca[1],gd=ku===void 0?"":ku;if(!el&&!gd)return!0;var Ed=ga(gd);return Ed?"".concat(el,",").concat(Ed.cc,",").concat(Ed.bcc).split(",").every(function(Od){return Od=(0,oi.default)(Od," "),Od?(0,si.default)(Od,wa):!0}):!1}Ws.exports=ws.default,Ws.exports.default=ws.default}(isMailtoURI,isMailtoURI.exports)),isMailtoURI.exports}var isMimeType={exports:{}},hasRequiredIsMimeType;function requireIsMimeType(){return hasRequiredIsMimeType||(hasRequiredIsMimeType=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=si(requireAssertString());function si(ui){return ui&&ui.__esModule?ui:{default:ui}}var ii=/^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+_]{1,100}$/i,ai=/^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i,li=/^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i;function ci(ui){return(0,oi.default)(ui),ii.test(ui)||ai.test(ui)||li.test(ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isMimeType,isMimeType.exports)),isMimeType.exports}var isLatLong={exports:{}},hasRequiredIsLatLong;function requireIsLatLong(){return hasRequiredIsLatLong||(hasRequiredIsLatLong=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=hi;var oi=ii(requireAssertString()),si=ii(requireMerge());function ii(pi){return pi&&pi.__esModule?pi:{default:pi}}var ai=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,li=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,ci=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,ui=/^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i,di={checkDMS:!1};function hi(pi,ha){if((0,oi.default)(pi),ha=(0,si.default)(ha,di),!pi.includes(","))return!1;var ga=pi.split(",");return ga[0].startsWith("(")&&!ga[1].endsWith(")")||ga[1].endsWith(")")&&!ga[0].startsWith("(")?!1:ha.checkDMS?ci.test(ga[0])&&ui.test(ga[1]):ai.test(ga[0])&&li.test(ga[1])}Ws.exports=ws.default,Ws.exports.default=ws.default}(isLatLong,isLatLong.exports)),isLatLong.exports}var isPostalCode={},hasRequiredIsPostalCode;function requireIsPostalCode(){if(hasRequiredIsPostalCode)return isPostalCode;hasRequiredIsPostalCode=1,Object.defineProperty(isPostalCode,"__esModule",{value:!0}),isPostalCode.default=ci,isPostalCode.locales=void 0;var Ws=ws(requireAssertString());function ws(ui){return ui&&ui.__esModule?ui:{default:ui}}var oi=/^\d{3}$/,si=/^\d{4}$/,ii=/^\d{5}$/,ai=/^\d{6}$/,li={AD:/^AD\d{3}$/,AT:si,AU:si,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BE:si,BG:si,BR:/^\d{5}-\d{3}$/,BY:/^2[1-4]\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:si,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CZ:/^\d{3}\s?\d{2}$/,DE:ii,DK:si,DO:ii,DZ:ii,EE:ii,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:ii,FR:/^\d{2}\s?\d{3}$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:si,ID:ii,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:oi,IT:ii,JP:/^\d{3}\-\d{4}$/,KE:ii,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:si,LV:/^LV\-\d{4}$/,LK:ii,MG:oi,MX:ii,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:ii,NL:/^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:si,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:si,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:ai,RU:ai,SA:ii,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:ai,SI:si,SK:/^\d{3}\s?\d{2}$/,TH:ii,TN:si,TW:/^\d{3}(\d{2})?$/,UA:ii,US:/^\d{5}(-\d{4})?$/,ZA:si,ZM:ii};isPostalCode.locales=Object.keys(li);function ci(ui,di){if((0,Ws.default)(ui),di in li)return li[di].test(ui);if(di==="any"){for(var hi in li)if(li.hasOwnProperty(hi)){var pi=li[hi];if(pi.test(ui))return!0}return!1}throw new Error("Invalid locale '".concat(di,"'"))}return isPostalCode}var _escape={exports:{}},hasRequired_escape;function require_escape(){return hasRequired_escape||(hasRequired_escape=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){return(0,oi.default)(ai),ai.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\//g,"/").replace(/\\/g,"\").replace(/`/g,"`")}Ws.exports=ws.default,Ws.exports.default=ws.default}(_escape,_escape.exports)),_escape.exports}var _unescape={exports:{}},hasRequired_unescape;function require_unescape(){return hasRequired_unescape||(hasRequired_unescape=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){return(0,oi.default)(ai),ai.replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(///g,"/").replace(/\/g,"\\").replace(/`/g,"`").replace(/&/g,"&")}Ws.exports=ws.default,Ws.exports.default=ws.default}(_unescape,_unescape.exports)),_unescape.exports}var stripLow={exports:{}},blacklist={exports:{}},hasRequiredBlacklist;function requireBlacklist(){return hasRequiredBlacklist||(hasRequiredBlacklist=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){return(0,oi.default)(ai),ai.replace(new RegExp("[".concat(li,"]+"),"g"),"")}Ws.exports=ws.default,Ws.exports.default=ws.default}(blacklist,blacklist.exports)),blacklist.exports}var hasRequiredStripLow;function requireStripLow(){return hasRequiredStripLow||(hasRequiredStripLow=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=ii(requireAssertString()),si=ii(requireBlacklist());function ii(li){return li&&li.__esModule?li:{default:li}}function ai(li,ci){(0,oi.default)(li);var ui=ci?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F";return(0,si.default)(li,ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(stripLow,stripLow.exports)),stripLow.exports}var whitelist={exports:{}},hasRequiredWhitelist;function requireWhitelist(){return hasRequiredWhitelist||(hasRequiredWhitelist=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){return(0,oi.default)(ai),ai.replace(new RegExp("[^".concat(li,"]+"),"g"),"")}Ws.exports=ws.default,Ws.exports.default=ws.default}(whitelist,whitelist.exports)),whitelist.exports}var isWhitelisted={exports:{}},hasRequiredIsWhitelisted;function requireIsWhitelisted(){return hasRequiredIsWhitelisted||(hasRequiredIsWhitelisted=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){(0,oi.default)(ai);for(var ci=ai.length-1;ci>=0;ci--)if(li.indexOf(ai[ci])===-1)return!1;return!0}Ws.exports=ws.default,Ws.exports.default=ws.default}(isWhitelisted,isWhitelisted.exports)),isWhitelisted.exports}var normalizeEmail={exports:{}},hasRequiredNormalizeEmail;function requireNormalizeEmail(){return hasRequiredNormalizeEmail||(hasRequiredNormalizeEmail=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=hi;var oi=si(requireMerge());function si(pi){return pi&&pi.__esModule?pi:{default:pi}}var ii={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},ai=["icloud.com","me.com"],li=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],ci=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],ui=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];function di(pi){return pi.length>1?pi:""}function hi(pi,ha){ha=(0,oi.default)(ha,ii);var ga=pi.split("@"),va=ga.pop(),ba=ga.join("@"),wa=[ba,va];if(wa[1]=wa[1].toLowerCase(),wa[1]==="gmail.com"||wa[1]==="googlemail.com"){if(ha.gmail_remove_subaddress&&(wa[0]=wa[0].split("+")[0]),ha.gmail_remove_dots&&(wa[0]=wa[0].replace(/\.+/g,di)),!wa[0].length)return!1;(ha.all_lowercase||ha.gmail_lowercase)&&(wa[0]=wa[0].toLowerCase()),wa[1]=ha.gmail_convert_googlemaildotcom?"gmail.com":wa[1]}else if(ai.indexOf(wa[1])>=0){if(ha.icloud_remove_subaddress&&(wa[0]=wa[0].split("+")[0]),!wa[0].length)return!1;(ha.all_lowercase||ha.icloud_lowercase)&&(wa[0]=wa[0].toLowerCase())}else if(li.indexOf(wa[1])>=0){if(ha.outlookdotcom_remove_subaddress&&(wa[0]=wa[0].split("+")[0]),!wa[0].length)return!1;(ha.all_lowercase||ha.outlookdotcom_lowercase)&&(wa[0]=wa[0].toLowerCase())}else if(ci.indexOf(wa[1])>=0){if(ha.yahoo_remove_subaddress){var xa=wa[0].split("-");wa[0]=xa.length>1?xa.slice(0,-1).join("-"):xa[0]}if(!wa[0].length)return!1;(ha.all_lowercase||ha.yahoo_lowercase)&&(wa[0]=wa[0].toLowerCase())}else ui.indexOf(wa[1])>=0?((ha.all_lowercase||ha.yandex_lowercase)&&(wa[0]=wa[0].toLowerCase()),wa[1]="yandex.ru"):ha.all_lowercase&&(wa[0]=wa[0].toLowerCase());return wa.join("@")}Ws.exports=ws.default,Ws.exports.default=ws.default}(normalizeEmail,normalizeEmail.exports)),normalizeEmail.exports}var isSlug={exports:{}},hasRequiredIsSlug;function requireIsSlug(){return hasRequiredIsSlug||(hasRequiredIsSlug=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isSlug,isSlug.exports)),isSlug.exports}var isLicensePlate={exports:{}},hasRequiredIsLicensePlate;function requireIsLicensePlate(){return hasRequiredIsLicensePlate||(hasRequiredIsLicensePlate=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii={"cs-CZ":function(li){return/^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(li)},"de-DE":function(li){return/^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÜ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÖ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|PI|PL|PM|PN|PR|PS|PW|PZ|R|RA|RC|RD|RE|RG|RH|RI|RL|RM|RN|RO|RP|RS|RT|RU|RV|RW|RZ|S|SB|SC|SE|SG|SI|SK|SL|SM|SN|SO|SP|SR|ST|SU|SW|SY|SZ|TE|TF|TG|TO|TP|TR|TS|TT|TÜ|ÜB|UE|UH|UL|UM|UN|V|VB|VG|VK|VR|VS|W|WA|WB|WE|WF|WI|WK|WL|WM|WN|WO|WR|WS|WT|WÜ|WW|WZ|Z|ZE|ZI|ZP|ZR|ZW|ZZ)[- ]?[A-Z]{1,2}[- ]?\d{1,4}|(ABG|ABI|AIB|AIC|ALF|ALZ|ANA|ANG|ANK|APD|ARN|ART|ASL|ASZ|AUR|AZE|BAD|BAR|BBG|BCH|BED|BER|BGD|BGL|BID|BIN|BIR|BIT|BIW|BKS|BLB|BLK|BNA|BOG|BOH|BOR|BOT|BRA|BRB|BRG|BRK|BRL|BRV|BSB|BSK|BTF|BÜD|BUL|BÜR|BÜS|BÜZ|CAS|CHA|CLP|CLZ|COC|COE|CUX|DAH|DAN|DAU|DBR|DEG|DEL|DGF|DIL|DIN|DIZ|DKB|DLG|DON|DUD|DÜW|EBE|EBN|EBS|ECK|EIC|EIL|EIN|EIS|EMD|EMS|ERB|ERH|ERK|ERZ|ESB|ESW|FDB|FDS|FEU|FFB|FKB|FLÖ|FOR|FRG|FRI|FRW|FTL|FÜS|GAN|GAP|GDB|GEL|GEO|GER|GHA|GHC|GLA|GMN|GNT|GOA|GOH|GRA|GRH|GRI|GRM|GRZ|GTH|GUB|GUN|GVM|HAB|HAL|HAM|HAS|HBN|HBS|HCH|HDH|HDL|HEB|HEF|HEI|HER|HET|HGN|HGW|HHM|HIG|HIP|HMÜ|HOG|HOH|HOL|HOM|HOR|HÖS|HOT|HRO|HSK|HST|HVL|HWI|IGB|ILL|JÜL|KEH|KEL|KEM|KIB|KLE|KLZ|KÖN|KÖT|KÖZ|KRU|KÜN|KUS|KYF|LAN|LAU|LBS|LBZ|LDK|LDS|LEO|LER|LEV|LIB|LIF|LIP|LÖB|LOS|LRO|LSZ|LÜN|LUP|LWL|MAB|MAI|MAK|MAL|MED|MEG|MEI|MEK|MEL|MER|MET|MGH|MGN|MHL|MIL|MKK|MOD|MOL|MON|MOS|MSE|MSH|MSP|MST|MTK|MTL|MÜB|MÜR|MYK|MZG|NAB|NAI|NAU|NDH|NEA|NEB|NEC|NEN|NES|NEW|NMB|NMS|NOH|NOL|NOM|NOR|NVP|NWM|OAL|OBB|OBG|OCH|OHA|ÖHR|OHV|OHZ|OPR|OSL|OVI|OVL|OVP|PAF|PAN|PAR|PCH|PEG|PIR|PLÖ|PRÜ|QFT|QLB|RDG|REG|REH|REI|RID|RIE|ROD|ROF|ROK|ROL|ROS|ROT|ROW|RSL|RÜD|RÜG|SAB|SAD|SAN|SAW|SBG|SBK|SCZ|SDH|SDL|SDT|SEB|SEE|SEF|SEL|SFB|SFT|SGH|SHA|SHG|SHK|SHL|SIG|SIM|SLE|SLF|SLK|SLN|SLS|SLÜ|SLZ|SMÜ|SOB|SOG|SOK|SÖM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÜW|SWA|SZB|TBB|TDO|TET|TIR|TÖL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÜM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(li)},"de-LI":function(li){return/^FL[- ]?\d{1,5}[UZ]?$/.test(li)},"en-IN":function(li){return/^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(li)},"es-AR":function(li){return/^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(li)},"fi-FI":function(li){return/^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(li)},"hu-HU":function(li){return/^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\d{3})|(M\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \d{2}-\d{2})|(CD \d{3}-\d{3})|(C-(C|X) \d{4})|(X-(A|B|C) \d{4})|(([EPVZ]-\d{5}))|(S A[A-Z]{2} \d{2})|(SP \d{2}-\d{2}))$/.test(li)},"pt-BR":function(li){return/^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(li)},"pt-PT":function(li){return/^([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})$/.test(li)},"sq-AL":function(li){return/^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(li)},"sv-SE":function(li){return/^[A-HJ-PR-UW-Z]{3} ?[\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(li.trim())},"en-PK":function(li){return/(^[A-Z]{2}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{3}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{4}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]((\s|-){0,1})[0-9]{4}((\s|-)[0-9]{2}){0,1}$)/.test(li.trim())}};function ai(li,ci){if((0,oi.default)(li),ci in ii)return ii[ci](li);if(ci==="any"){for(var ui in ii){var di=ii[ui];if(di(li))return!0}return!1}throw new Error("Invalid locale '".concat(ci,"'"))}Ws.exports=ws.default,Ws.exports.default=ws.default}(isLicensePlate,isLicensePlate.exports)),isLicensePlate.exports}var isStrongPassword={exports:{}},hasRequiredIsStrongPassword;function requireIsStrongPassword(){return hasRequiredIsStrongPassword||(hasRequiredIsStrongPassword=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ga;var oi=ii(requireMerge()),si=ii(requireAssertString());function ii(va){return va&&va.__esModule?va:{default:va}}var ai=/^[A-Z]$/,li=/^[a-z]$/,ci=/^[0-9]$/,ui=/^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/\\ ]$/,di={minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1,returnScore:!1,pointsPerUnique:1,pointsPerRepeat:.5,pointsForContainingLower:10,pointsForContainingUpper:10,pointsForContainingNumber:10,pointsForContainingSymbol:10};function hi(va){var ba={};return Array.from(va).forEach(function(wa){var xa=ba[wa];xa?ba[wa]+=1:ba[wa]=1}),ba}function pi(va){var ba=hi(va),wa={length:va.length,uniqueChars:Object.keys(ba).length,uppercaseCount:0,lowercaseCount:0,numberCount:0,symbolCount:0};return Object.keys(ba).forEach(function(xa){ai.test(xa)?wa.uppercaseCount+=ba[xa]:li.test(xa)?wa.lowercaseCount+=ba[xa]:ci.test(xa)?wa.numberCount+=ba[xa]:ui.test(xa)&&(wa.symbolCount+=ba[xa])}),wa}function ha(va,ba){var wa=0;return wa+=va.uniqueChars*ba.pointsPerUnique,wa+=(va.length-va.uniqueChars)*ba.pointsPerRepeat,va.lowercaseCount>0&&(wa+=ba.pointsForContainingLower),va.uppercaseCount>0&&(wa+=ba.pointsForContainingUpper),va.numberCount>0&&(wa+=ba.pointsForContainingNumber),va.symbolCount>0&&(wa+=ba.pointsForContainingSymbol),wa}function ga(va){var ba=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;(0,si.default)(va);var wa=pi(va);return ba=(0,oi.default)(ba||{},di),ba.returnScore?ha(wa,ba):wa.length>=ba.minLength&&wa.lowercaseCount>=ba.minLowercase&&wa.uppercaseCount>=ba.minUppercase&&wa.numberCount>=ba.minNumbers&&wa.symbolCount>=ba.minSymbols}Ws.exports=ws.default,Ws.exports.default=ws.default}(isStrongPassword,isStrongPassword.exports)),isStrongPassword.exports}var isVAT={},hasRequiredIsVAT;function requireIsVAT(){if(hasRequiredIsVAT)return isVAT;hasRequiredIsVAT=1;function Ws(pi){"@babel/helpers - typeof";return Ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ha){return typeof ha}:function(ha){return ha&&typeof Symbol=="function"&&ha.constructor===Symbol&&ha!==Symbol.prototype?"symbol":typeof ha},Ws(pi)}Object.defineProperty(isVAT,"__esModule",{value:!0}),isVAT.default=hi,isVAT.vatMatchers=void 0;var ws=ai(requireAssertString()),oi=ii(requireAlgorithms());function si(pi){if(typeof WeakMap!="function")return null;var ha=new WeakMap,ga=new WeakMap;return(si=function(va){return va?ga:ha})(pi)}function ii(pi,ha){if(pi&&pi.__esModule)return pi;if(pi===null||Ws(pi)!="object"&&typeof pi!="function")return{default:pi};var ga=si(ha);if(ga&&ga.has(pi))return ga.get(pi);var va={__proto__:null},ba=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var wa in pi)if(wa!=="default"&&{}.hasOwnProperty.call(pi,wa)){var xa=ba?Object.getOwnPropertyDescriptor(pi,wa):null;xa&&(xa.get||xa.set)?Object.defineProperty(va,wa,xa):va[wa]=pi[wa]}return va.default=pi,ga&&ga.set(pi,va),va}function ai(pi){return pi&&pi.__esModule?pi:{default:pi}}var li=function(pi){var ha=pi.match(/^(AU)?(\d{11})$/);if(!ha)return!1;var ga=[10,1,3,5,7,9,11,13,15,17,19];pi=pi.replace(/^AU/,"");for(var va=(parseInt(pi.slice(0,1),10)-1).toString()+pi.slice(1),ba=0,wa=0;wa<11;wa++)ba+=ga[wa]*va.charAt(wa);return ba!==0&&ba%89===0},ci=function(pi){var ha=function(ga){var va=ga.pop(),ba=[5,4,3,2,7,6,5,4],wa=(11-ga.reduce(function(xa,Ca,el){return xa+Ca*ba[el]},0)%11)%11;return va===wa};return/^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(pi)&&ha(pi.match(/\d/g).map(function(ga){return+ga}))},ui=function(pi){var ha=pi.match(/^(PT)?(\d{9})$/);if(!ha)return!1;var ga=ha[2],va=11-oi.reverseMultiplyAndSum(ga.split("").slice(0,8).map(function(ba){return parseInt(ba,10)}),9)%11;return va>9?parseInt(ga[8],10)===0:va===parseInt(ga[8],10)},di=isVAT.vatMatchers={AT:function(pi){return/^(AT)?U\d{8}$/.test(pi)},BE:function(pi){return/^(BE)?\d{10}$/.test(pi)},BG:function(pi){return/^(BG)?\d{9,10}$/.test(pi)},HR:function(pi){return/^(HR)?\d{11}$/.test(pi)},CY:function(pi){return/^(CY)?\w{9}$/.test(pi)},CZ:function(pi){return/^(CZ)?\d{8,10}$/.test(pi)},DK:function(pi){return/^(DK)?\d{8}$/.test(pi)},EE:function(pi){return/^(EE)?\d{9}$/.test(pi)},FI:function(pi){return/^(FI)?\d{8}$/.test(pi)},FR:function(pi){return/^(FR)?\w{2}\d{9}$/.test(pi)},DE:function(pi){return/^(DE)?\d{9}$/.test(pi)},EL:function(pi){return/^(EL)?\d{9}$/.test(pi)},HU:function(pi){return/^(HU)?\d{8}$/.test(pi)},IE:function(pi){return/^(IE)?\d{7}\w{1}(W)?$/.test(pi)},IT:function(pi){return/^(IT)?\d{11}$/.test(pi)},LV:function(pi){return/^(LV)?\d{11}$/.test(pi)},LT:function(pi){return/^(LT)?\d{9,12}$/.test(pi)},LU:function(pi){return/^(LU)?\d{8}$/.test(pi)},MT:function(pi){return/^(MT)?\d{8}$/.test(pi)},NL:function(pi){return/^(NL)?\d{9}B\d{2}$/.test(pi)},PL:function(pi){return/^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(pi)},PT:ui,RO:function(pi){return/^(RO)?\d{2,10}$/.test(pi)},SK:function(pi){return/^(SK)?\d{10}$/.test(pi)},SI:function(pi){return/^(SI)?\d{8}$/.test(pi)},ES:function(pi){return/^(ES)?\w\d{7}[A-Z]$/.test(pi)},SE:function(pi){return/^(SE)?\d{12}$/.test(pi)},AL:function(pi){return/^(AL)?\w{9}[A-Z]$/.test(pi)},MK:function(pi){return/^(MK)?\d{13}$/.test(pi)},AU:li,BY:function(pi){return/^(УНП )?\d{9}$/.test(pi)},CA:function(pi){return/^(CA)?\d{9}$/.test(pi)},IS:function(pi){return/^(IS)?\d{5,6}$/.test(pi)},IN:function(pi){return/^(IN)?\d{15}$/.test(pi)},ID:function(pi){return/^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(pi)},IL:function(pi){return/^(IL)?\d{9}$/.test(pi)},KZ:function(pi){return/^(KZ)?\d{12}$/.test(pi)},NZ:function(pi){return/^(NZ)?\d{9}$/.test(pi)},NG:function(pi){return/^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(pi)},NO:function(pi){return/^(NO)?\d{9}MVA$/.test(pi)},PH:function(pi){return/^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(pi)},RU:function(pi){return/^(RU)?(\d{10}|\d{12})$/.test(pi)},SM:function(pi){return/^(SM)?\d{5}$/.test(pi)},SA:function(pi){return/^(SA)?\d{15}$/.test(pi)},RS:function(pi){return/^(RS)?\d{9}$/.test(pi)},CH:ci,TR:function(pi){return/^(TR)?\d{10}$/.test(pi)},UA:function(pi){return/^(UA)?\d{12}$/.test(pi)},GB:function(pi){return/^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(pi)},UZ:function(pi){return/^(UZ)?\d{9}$/.test(pi)},AR:function(pi){return/^(AR)?\d{11}$/.test(pi)},BO:function(pi){return/^(BO)?\d{7}$/.test(pi)},BR:function(pi){return/^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(pi)},CL:function(pi){return/^(CL)?\d{8}-\d{1}$/.test(pi)},CO:function(pi){return/^(CO)?\d{10}$/.test(pi)},CR:function(pi){return/^(CR)?\d{9,12}$/.test(pi)},EC:function(pi){return/^(EC)?\d{13}$/.test(pi)},SV:function(pi){return/^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(pi)},GT:function(pi){return/^(GT)?\d{7}-\d{1}$/.test(pi)},HN:function(pi){return/^(HN)?$/.test(pi)},MX:function(pi){return/^(MX)?\w{3,4}\d{6}\w{3}$/.test(pi)},NI:function(pi){return/^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(pi)},PA:function(pi){return/^(PA)?$/.test(pi)},PY:function(pi){return/^(PY)?\d{6,8}-\d{1}$/.test(pi)},PE:function(pi){return/^(PE)?\d{11}$/.test(pi)},DO:function(pi){return/^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(pi)},UY:function(pi){return/^(UY)?\d{12}$/.test(pi)},VE:function(pi){return/^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(pi)}};function hi(pi,ha){if((0,ws.default)(pi),(0,ws.default)(ha),ha in di)return di[ha](pi);throw new Error("Invalid country code: '".concat(ha,"'"))}return isVAT}var hasRequiredValidator;function requireValidator(){return hasRequiredValidator||(hasRequiredValidator=1,function(Ws,ws){function oi(Tf){"@babel/helpers - typeof";return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(kf){return typeof kf}:function(kf){return kf&&typeof Symbol=="function"&&kf.constructor===Symbol&&kf!==Symbol.prototype?"symbol":typeof kf},oi(Tf)}Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=void 0;var si=cf(requireToDate()),ii=cf(requireToFloat()),ai=cf(requireToInt()),li=cf(requireToBoolean()),ci=cf(requireEquals()),ui=cf(requireContains()),di=cf(requireMatches()),hi=cf(requireIsEmail()),pi=cf(requireIsURL()),ha=cf(requireIsMACAddress()),ga=cf(requireIsIP()),va=cf(requireIsIPRange()),ba=cf(requireIsFQDN()),wa=cf(requireIsDate()),xa=cf(requireIsTime()),Ca=cf(requireIsBoolean()),el=cf(requireIsLocale()),ku=cf(requireIsAbaRouting()),gd=Lf(requireIsAlpha()),Ed=Lf(requireIsAlphanumeric()),Od=cf(requireIsNumeric()),Nd=cf(requireIsPassportNumber()),Pd=cf(requireIsPort()),Ld=cf(requireIsLowercase()),rf=cf(requireIsUppercase()),_d=cf(requireIsIMEI()),Md=cf(requireIsAscii()),Td=cf(requireIsFullWidth()),wd=cf(requireIsHalfWidth()),Cd=cf(requireIsVariableWidth()),sf=cf(requireIsMultibyte()),of=cf(requireIsSemVer()),Wd=cf(requireIsSurrogatePair()),df=cf(requireIsInt()),hf=Lf(requireIsFloat()),xd=cf(requireIsDecimal()),Fd=cf(requireIsHexadecimal()),Vd=cf(requireIsOctal()),af=cf(requireIsDivisibleBy()),ff=cf(requireIsHexColor()),uf=cf(requireIsRgbColor()),mf=cf(requireIsHSL()),yf=cf(requireIsISRC()),Sf=Lf(requireIsIBAN()),Of=cf(requireIsBIC()),wf=cf(requireIsMD5()),Ef=cf(requireIsHash()),xf=cf(requireIsJWT()),kd=cf(requireIsJSON()),Dd=cf(requireIsEmpty()),tf=cf(requireIsLength()),vd=cf(requireIsByteLength()),Sd=cf(requireIsUUID()),Id=cf(requireIsMongoId()),Bd=cf(requireIsAfter()),nf=cf(requireIsBefore()),lf=cf(requireIsIn()),pf=cf(requireIsLuhnNumber()),gf=cf(requireIsCreditCard()),vf=cf(requireIsIdentityCard()),bf=cf(requireIsEAN()),If=cf(requireIsISIN()),Af=cf(requireIsISBN()),$f=cf(requireIsISSN()),Cf=cf(requireIsTaxID()),_f=Lf(requireIsMobilePhone()),Rf=cf(requireIsEthereumAddress()),Pf=cf(requireIsCurrency()),Ff=cf(requireIsBtcAddress()),jf=requireIsISO6346(),Hf=cf(requireIsISO6391()),Wf=cf(requireIsISO8601()),zf=cf(requireIsRFC3339()),Yf=cf(requireIsISO31661Alpha2()),Xf=cf(requireIsISO31661Alpha3()),Jf=cf(requireIsISO4217()),eh=cf(requireIsBase32()),th=cf(requireIsBase58()),nh=cf(requireIsBase64()),rh=cf(requireIsDataURI()),oh=cf(requireIsMagnetURI()),sh=cf(requireIsMailtoURI()),ih=cf(requireIsMimeType()),ah=cf(requireIsLatLong()),Uf=Lf(requireIsPostalCode()),lh=cf(requireLtrim()),ch=cf(requireRtrim()),uh=cf(requireTrim()),dh=cf(require_escape()),fh=cf(require_unescape()),hh=cf(requireStripLow()),ph=cf(requireWhitelist()),mh=cf(requireBlacklist()),gh=cf(requireIsWhitelisted()),yh=cf(requireNormalizeEmail()),vh=cf(requireIsSlug()),bh=cf(requireIsLicensePlate()),Sh=cf(requireIsStrongPassword()),Th=cf(requireIsVAT());function Qf(Tf){if(typeof WeakMap!="function")return null;var kf=new WeakMap,Nf=new WeakMap;return(Qf=function(Df){return Df?Nf:kf})(Tf)}function Lf(Tf,kf){if(Tf&&Tf.__esModule)return Tf;if(Tf===null||oi(Tf)!="object"&&typeof Tf!="function")return{default:Tf};var Nf=Qf(kf);if(Nf&&Nf.has(Tf))return Nf.get(Tf);var Df={__proto__:null},xh=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Mf in Tf)if(Mf!=="default"&&{}.hasOwnProperty.call(Tf,Mf)){var Vf=xh?Object.getOwnPropertyDescriptor(Tf,Mf):null;Vf&&(Vf.get||Vf.set)?Object.defineProperty(Df,Mf,Vf):Df[Mf]=Tf[Mf]}return Df.default=Tf,Nf&&Nf.set(Tf,Df),Df}function cf(Tf){return Tf&&Tf.__esModule?Tf:{default:Tf}}var Eh="13.12.0",wh={version:Eh,toDate:si.default,toFloat:ii.default,toInt:ai.default,toBoolean:li.default,equals:ci.default,contains:ui.default,matches:di.default,isEmail:hi.default,isURL:pi.default,isMACAddress:ha.default,isIP:ga.default,isIPRange:va.default,isFQDN:ba.default,isBoolean:Ca.default,isIBAN:Sf.default,isBIC:Of.default,isAbaRouting:ku.default,isAlpha:gd.default,isAlphaLocales:gd.locales,isAlphanumeric:Ed.default,isAlphanumericLocales:Ed.locales,isNumeric:Od.default,isPassportNumber:Nd.default,isPort:Pd.default,isLowercase:Ld.default,isUppercase:rf.default,isAscii:Md.default,isFullWidth:Td.default,isHalfWidth:wd.default,isVariableWidth:Cd.default,isMultibyte:sf.default,isSemVer:of.default,isSurrogatePair:Wd.default,isInt:df.default,isIMEI:_d.default,isFloat:hf.default,isFloatLocales:hf.locales,isDecimal:xd.default,isHexadecimal:Fd.default,isOctal:Vd.default,isDivisibleBy:af.default,isHexColor:ff.default,isRgbColor:uf.default,isHSL:mf.default,isISRC:yf.default,isMD5:wf.default,isHash:Ef.default,isJWT:xf.default,isJSON:kd.default,isEmpty:Dd.default,isLength:tf.default,isLocale:el.default,isByteLength:vd.default,isUUID:Sd.default,isMongoId:Id.default,isAfter:Bd.default,isBefore:nf.default,isIn:lf.default,isLuhnNumber:pf.default,isCreditCard:gf.default,isIdentityCard:vf.default,isEAN:bf.default,isISIN:If.default,isISBN:Af.default,isISSN:$f.default,isMobilePhone:_f.default,isMobilePhoneLocales:_f.locales,isPostalCode:Uf.default,isPostalCodeLocales:Uf.locales,isEthereumAddress:Rf.default,isCurrency:Pf.default,isBtcAddress:Ff.default,isISO6346:jf.isISO6346,isFreightContainerID:jf.isFreightContainerID,isISO6391:Hf.default,isISO8601:Wf.default,isRFC3339:zf.default,isISO31661Alpha2:Yf.default,isISO31661Alpha3:Xf.default,isISO4217:Jf.default,isBase32:eh.default,isBase58:th.default,isBase64:nh.default,isDataURI:rh.default,isMagnetURI:oh.default,isMailtoURI:sh.default,isMimeType:ih.default,isLatLong:ah.default,ltrim:lh.default,rtrim:ch.default,trim:uh.default,escape:dh.default,unescape:fh.default,stripLow:hh.default,whitelist:ph.default,blacklist:mh.default,isWhitelisted:gh.default,normalizeEmail:yh.default,toString,isSlug:vh.default,isStrongPassword:Sh.default,isTaxID:Cf.default,isDate:wa.default,isTime:xa.default,isLicensePlate:bh.default,isVAT:Th.default,ibanLocales:Sf.locales};ws.default=wh,Ws.exports=ws.default,Ws.exports.default=ws.default}(validator$1,validator$1.exports)),validator$1.exports}var validatorExports=requireValidator();const validator=Ud(validatorExports);function createNameSchema(Ws={}){const{required:ws=!1,allowEmpty:oi=!1,unique:si=[]}=Ws,ii=oi?h$3.string():h$3.string().min(1),ai=ii.refine(li=>!li&&oi?!0:!si.map(ci=>ci.toLowerCase()).includes(li.replace(/^\s+|\s+$/g,"_").toLowerCase()),{message:"Item with this name already exists"});return ws?si.length>0?ai:ii:si.length>0?h$3.string().optional().refine(li=>li===void 0||!li&&oi?!0:!si.map(ci=>ci.toLowerCase()).includes(li.replace(/^\s+|\s+$/g,"_").toLowerCase()),{message:"Item with this name already exists"}):h$3.string().optional()}function createConstantCaseSchema(Ws={}){return createNameSchema(Ws).transform(ws=>ws&&ws.toUpperCase()).refine(ws=>!ws||validator.isUppercase(ws),{message:"Must be uppercase"})}function createLowercaseSnakeCaseSchema(Ws={}){return createNameSchema(Ws).transform(ws=>ws&&ws.toLowerCase()).refine(ws=>!ws||validator.isLowercase(ws),{message:"Must be lowercase"})}function toLowercaseSnakeCase(Ws,ws={}){return createLowercaseSnakeCaseSchema(ws).parse(snakeCase(Ws))}function toConstantCase(Ws,ws={}){return createConstantCaseSchema(ws).parse(constantCase(Ws))}h$3.object({name:createNameSchema({allowEmpty:!0}),website:h$3.union([h$3.string().url(),h$3.literal("")]).optional().default("")}).default({name:"",website:""});h$3.string().default("");const s=(Ws,ws,oi)=>{if(Ws&&"reportValidity"in Ws){const si=k$6(oi,ws);Ws.setCustomValidity(si&&si.message||""),Ws.reportValidity()}},o=(Ws,ws)=>{for(const oi in ws.fields){const si=ws.fields[oi];si&&si.ref&&"reportValidity"in si.ref?s(si.ref,oi,Ws):si.refs&&si.refs.forEach(ii=>s(ii,oi,Ws))}},r=(Ws,ws)=>{ws.shouldUseNativeValidation&&o(Ws,ws);const oi={};for(const si in Ws){const ii=k$6(ws.fields,si),ai=Object.assign(Ws[si]||{},{ref:ii&&ii.ref});if(i$1(ws.names||Object.keys(Ws),si)){const li=Object.assign({},k$6(oi,si));J$5(li,"root",ai),J$5(oi,si,li)}else J$5(oi,si,ai)}return oi},i$1=(Ws,ws)=>Ws.some(oi=>oi.startsWith(ws+"."));var n=function(Ws,ws){for(var oi={};Ws.length;){var si=Ws[0],ii=si.code,ai=si.message,li=si.path.join(".");if(!oi[li])if("unionErrors"in si){var ci=si.unionErrors[0].errors[0];oi[li]={message:ci.message,type:ci.code}}else oi[li]={message:ai,type:ii};if("unionErrors"in si&&si.unionErrors.forEach(function(hi){return hi.errors.forEach(function(pi){return Ws.push(pi)})}),ws){var ui=oi[li].types,di=ui&&ui[si.code];oi[li]=xi(li,ws,oi,ii,di?[].concat(di,si.message):si.message)}Ws.shift()}return oi},t$2=function(Ws,ws,oi){return oi===void 0&&(oi={}),function(si,ii,ai){try{return Promise.resolve(function(li,ci){try{var ui=Promise.resolve(Ws[oi.mode==="sync"?"parse":"parseAsync"](si,ws)).then(function(di){return ai.shouldUseNativeValidation&&o({},ai),{errors:{},values:oi.raw?si:di}})}catch(di){return ci(di)}return ui&&ui.then?ui.then(void 0,ci):ui}(0,function(li){if(function(ci){return Array.isArray(ci==null?void 0:ci.errors)}(li))return{values:{},errors:r(n(li.errors,!ai.shouldUseNativeValidation&&ai.criteriaMode==="all"),ai)};throw li}))}catch(li){return Promise.reject(li)}}};const Textarea=forwardRef(({className:Ws,...ws},oi)=>{const si=useRef(null),ii=useCallback(li=>{li.style.height="auto";const ci=Math.max(li.scrollHeight,li.offsetHeight);li.style.height=`${ci}px`},[]),ai=useCallback(li=>{ii(li.currentTarget)},[ii]);return React.useEffect(()=>{si.current&&ii(si.current)},[ii]),useImperativeHandle(oi,()=>({focus:()=>{var li;return(li=si.current)==null?void 0:li.focus()},element:si.current})),jsx("textarea",{...ws,className:cn("min-h-10 w-full resize-none rounded-md border border-gray-200 bg-gray-50 px-3 py-2 text-sm text-gray-800 placeholder:text-gray-600 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",Ws),ref:si,onInput:ai})});Textarea.displayName="Textarea";const TextField=forwardRef(({name:Ws,value:ws,onSubmit:oi,label:si,placeholder:ii,unique:ai,className:li="",rows:ci=1,focusOnMount:ui=!1,required:di=!1,allowEmpty:hi=!1,shouldReset:pi=!1,onChange:ha},ga)=>{const va=useRef(null);useEffect(()=>{ui&&va.current&&va.current.focus()},[ui]);const ba=h$3.object({[Ws]:createNameSchema({required:di,allowEmpty:hi,unique:ai})}),wa=Gd({resolver:t$2(ba),defaultValues:{[Ws]:ws??""}}),xa=useCallback(gd=>{const Ed=gd[Ws];Ed===void 0||ws===Ed||(oi(Ed),pi&&wa.reset({[Ws]:""}))},[Ws,ws,oi,wa,pi]),Ca=useCallback(async()=>{const gd=wa.getValues()[Ws]??"";if(!(ws==null&&(!gd||gd.trim()===""))&&!compareStringsWithoutWhitespace(gd,ws??""))try{await wa.trigger(),wa.formState.isValid&&await wa.handleSubmit(xa)()}catch{}},[wa,xa,Ws,ws]),el=useCallback(gd=>{gd.key==="Enter"&&(gd.preventDefault(),gd.target.blur())},[]),ku=useCallback(gd=>{const Ed=gd.target.value;ha==null||ha(Ed)},[ha]);return useImperativeHandle(ga,()=>({focus:()=>{var gd;return(gd=va.current)==null?void 0:gd.focus()}})),useEffect(()=>{wa.reset({[Ws]:ws??""})},[wa,Ws,ws]),jsx(Form,{...wa,children:jsx(FormField,{control:wa.control,name:Ws,render:({field:gd})=>jsxs(FormItem,{className:"grid h-full grid-rows-[auto,1fr] gap-2 overflow-visible",children:[!!si&&jsx(FormLabel,{htmlFor:Ws,className:"text-sm font-medium text-gray-700",children:si}),jsx(FormControl,{children:jsx(Textarea,{...gd,id:Ws,ref:Ed=>{Ed&&(gd.ref(Ed.element),va.current=Ed)},placeholder:ii,onBlur:Ca,onChange:Ed=>{gd.onChange(Ed),ku(Ed)},onKeyDown:el,rows:ci,className:li})}),jsx(FormMessage,{})]})})})});TextField.displayName="TextField";function ModuleForm({module:Ws,onAddModule:ws,updateModuleName:oi,modules:si=[]}){const ii=!!Ws,ai=si.map(ci=>ci.name),li=async ci=>{const ui=toLowercaseSnakeCase(ci);ui.length&&(ii?ui!==Ws.name&&oi(Ws.id,ui):await ws(ui))};return jsx(TextField,{name:"name",label:ii?"Module name":"Add module",value:Ws==null?void 0:Ws.name,onSubmit:li,placeholder:"Add module",unique:ai,shouldReset:!ii,required:!0},(Ws==null?void 0:Ws.id)??"new")}const Input=React.forwardRef(({className:Ws,type:ws,...oi},si)=>jsx("input",{type:ws,className:cn("flex h-9 w-full rounded-md border border-gray-400 bg-transparent px-3 py-1 text-sm transition-colors hover:bg-gray-100 focus-visible:bg-gray-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",Ws),ref:si,...oi}));Input.displayName="Input";let rangeFrom=[],rangeTo=[];(()=>{let Ws="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(ws=>ws?parseInt(ws,36):1);for(let ws=0,oi=0;ws<Ws.length;ws++)(ws%2?rangeTo:rangeFrom).push(oi=oi+Ws[ws])})();function isExtendingChar(Ws){if(Ws<768)return!1;for(let ws=0,oi=rangeFrom.length;;){let si=ws+oi>>1;if(Ws<rangeFrom[si])oi=si;else if(Ws>=rangeTo[si])ws=si+1;else return!0;if(ws==oi)return!1}}function isRegionalIndicator(Ws){return Ws>=127462&&Ws<=127487}const ZWJ=8205;function findClusterBreak$1(Ws,ws,oi=!0,si=!0){return(oi?nextClusterBreak:prevClusterBreak)(Ws,ws,si)}function nextClusterBreak(Ws,ws,oi){if(ws==Ws.length)return ws;ws&&surrogateLow$1(Ws.charCodeAt(ws))&&surrogateHigh$1(Ws.charCodeAt(ws-1))&&ws--;let si=codePointAt$1(Ws,ws);for(ws+=codePointSize$1(si);ws<Ws.length;){let ii=codePointAt$1(Ws,ws);if(si==ZWJ||ii==ZWJ||oi&&isExtendingChar(ii))ws+=codePointSize$1(ii),si=ii;else if(isRegionalIndicator(ii)){let ai=0,li=ws-2;for(;li>=0&&isRegionalIndicator(codePointAt$1(Ws,li));)ai++,li-=2;if(ai%2==0)break;ws+=2}else break}return ws}function prevClusterBreak(Ws,ws,oi){for(;ws>0;){let si=nextClusterBreak(Ws,ws-2,oi);if(si<ws)return si;ws--}return 0}function codePointAt$1(Ws,ws){let oi=Ws.charCodeAt(ws);if(!surrogateHigh$1(oi)||ws+1==Ws.length)return oi;let si=Ws.charCodeAt(ws+1);return surrogateLow$1(si)?(oi-55296<<10)+(si-56320)+65536:oi}function surrogateLow$1(Ws){return Ws>=56320&&Ws<57344}function surrogateHigh$1(Ws){return Ws>=55296&&Ws<56320}function codePointSize$1(Ws){return Ws<65536?1:2}class Text{lineAt(ws){if(ws<0||ws>this.length)throw new RangeError(`Invalid position ${ws} in document of length ${this.length}`);return this.lineInner(ws,!1,1,0)}line(ws){if(ws<1||ws>this.lines)throw new RangeError(`Invalid line number ${ws} in ${this.lines}-line document`);return this.lineInner(ws,!0,1,0)}replace(ws,oi,si){[ws,oi]=clip(this,ws,oi);let ii=[];return this.decompose(0,ws,ii,2),si.length&&si.decompose(0,si.length,ii,3),this.decompose(oi,this.length,ii,1),TextNode.from(ii,this.length-(oi-ws)+si.length)}append(ws){return this.replace(this.length,this.length,ws)}slice(ws,oi=this.length){[ws,oi]=clip(this,ws,oi);let si=[];return this.decompose(ws,oi,si,0),TextNode.from(si,oi-ws)}eq(ws){if(ws==this)return!0;if(ws.length!=this.length||ws.lines!=this.lines)return!1;let oi=this.scanIdentical(ws,1),si=this.length-this.scanIdentical(ws,-1),ii=new RawTextCursor(this),ai=new RawTextCursor(ws);for(let li=oi,ci=oi;;){if(ii.next(li),ai.next(li),li=0,ii.lineBreak!=ai.lineBreak||ii.done!=ai.done||ii.value!=ai.value)return!1;if(ci+=ii.value.length,ii.done||ci>=si)return!0}}iter(ws=1){return new RawTextCursor(this,ws)}iterRange(ws,oi=this.length){return new PartialTextCursor(this,ws,oi)}iterLines(ws,oi){let si;if(ws==null)si=this.iter();else{oi==null&&(oi=this.lines+1);let ii=this.line(ws).from;si=this.iterRange(ii,Math.max(ii,oi==this.lines+1?this.length:oi<=1?0:this.line(oi-1).to))}return new LineCursor(si)}toString(){return this.sliceString(0)}toJSON(){let ws=[];return this.flatten(ws),ws}constructor(){}static of(ws){if(ws.length==0)throw new RangeError("A document must have at least one line");return ws.length==1&&!ws[0]?Text.empty:ws.length<=32?new TextLeaf(ws):TextNode.from(TextLeaf.split(ws,[]))}}class TextLeaf extends Text{constructor(ws,oi=textLength(ws)){super(),this.text=ws,this.length=oi}get lines(){return this.text.length}get children(){return null}lineInner(ws,oi,si,ii){for(let ai=0;;ai++){let li=this.text[ai],ci=ii+li.length;if((oi?si:ci)>=ws)return new Line(ii,ci,si,li);ii=ci+1,si++}}decompose(ws,oi,si,ii){let ai=ws<=0&&oi>=this.length?this:new TextLeaf(sliceText(this.text,ws,oi),Math.min(oi,this.length)-Math.max(0,ws));if(ii&1){let li=si.pop(),ci=appendText(ai.text,li.text.slice(),0,ai.length);if(ci.length<=32)si.push(new TextLeaf(ci,li.length+ai.length));else{let ui=ci.length>>1;si.push(new TextLeaf(ci.slice(0,ui)),new TextLeaf(ci.slice(ui)))}}else si.push(ai)}replace(ws,oi,si){if(!(si instanceof TextLeaf))return super.replace(ws,oi,si);[ws,oi]=clip(this,ws,oi);let ii=appendText(this.text,appendText(si.text,sliceText(this.text,0,ws)),oi),ai=this.length+si.length-(oi-ws);return ii.length<=32?new TextLeaf(ii,ai):TextNode.from(TextLeaf.split(ii,[]),ai)}sliceString(ws,oi=this.length,si=`
|
|
312
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ku=!0,gd=!1,Ed;return{s:function(){xa=xa.call(ba)},n:function(){var Od=xa.next();return ku=Od.done,Od},e:function(Od){gd=!0,Ed=Od},f:function(){try{!ku&&xa.return!=null&&xa.return()}finally{if(gd)throw Ed}}}}function pi(ba,wa){if(ba){if(typeof ba=="string")return ha(ba,wa);var xa=Object.prototype.toString.call(ba).slice(8,-1);if(xa==="Object"&&ba.constructor&&(xa=ba.constructor.name),xa==="Map"||xa==="Set")return Array.from(ba);if(xa==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(xa))return ha(ba,wa)}}function ha(ba,wa){(wa==null||wa>ba.length)&&(wa=ba.length);for(var xa=0,Ca=new Array(wa);xa<wa;xa++)Ca[xa]=ba[xa];return Ca}function ga(ba){var wa=new Set(["subject","body","cc","bcc"]),xa={cc:"",bcc:""},Ca=!1,el=ba.split("&");if(el.length>4)return!1;var ku=hi(el),gd;try{for(ku.s();!(gd=ku.n()).done;){var Ed=gd.value,Od=Ed.split("="),Nd=li(Od,2),Pd=Nd[0],Ld=Nd[1];if(Pd&&!wa.has(Pd)){Ca=!0;break}Ld&&(Pd==="cc"||Pd==="bcc")&&(xa[Pd]=Ld),Pd&&wa.delete(Pd)}}catch(rf){ku.e(rf)}finally{ku.f()}return Ca?!1:xa}function va(ba,wa){if((0,ii.default)(ba),ba.indexOf("mailto:")!==0)return!1;var xa=ba.replace("mailto:","").split("?"),Ca=li(xa,2),el=Ca[0],ku=Ca[1],gd=ku===void 0?"":ku;if(!el&&!gd)return!0;var Ed=ga(gd);return Ed?"".concat(el,",").concat(Ed.cc,",").concat(Ed.bcc).split(",").every(function(Od){return Od=(0,oi.default)(Od," "),Od?(0,si.default)(Od,wa):!0}):!1}Ws.exports=ws.default,Ws.exports.default=ws.default}(isMailtoURI,isMailtoURI.exports)),isMailtoURI.exports}var isMimeType={exports:{}},hasRequiredIsMimeType;function requireIsMimeType(){return hasRequiredIsMimeType||(hasRequiredIsMimeType=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ci;var oi=si(requireAssertString());function si(ui){return ui&&ui.__esModule?ui:{default:ui}}var ii=/^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+_]{1,100}$/i,ai=/^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i,li=/^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i;function ci(ui){return(0,oi.default)(ui),ii.test(ui)||ai.test(ui)||li.test(ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isMimeType,isMimeType.exports)),isMimeType.exports}var isLatLong={exports:{}},hasRequiredIsLatLong;function requireIsLatLong(){return hasRequiredIsLatLong||(hasRequiredIsLatLong=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=hi;var oi=ii(requireAssertString()),si=ii(requireMerge());function ii(pi){return pi&&pi.__esModule?pi:{default:pi}}var ai=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,li=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,ci=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,ui=/^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i,di={checkDMS:!1};function hi(pi,ha){if((0,oi.default)(pi),ha=(0,si.default)(ha,di),!pi.includes(","))return!1;var ga=pi.split(",");return ga[0].startsWith("(")&&!ga[1].endsWith(")")||ga[1].endsWith(")")&&!ga[0].startsWith("(")?!1:ha.checkDMS?ci.test(ga[0])&&ui.test(ga[1]):ai.test(ga[0])&&li.test(ga[1])}Ws.exports=ws.default,Ws.exports.default=ws.default}(isLatLong,isLatLong.exports)),isLatLong.exports}var isPostalCode={},hasRequiredIsPostalCode;function requireIsPostalCode(){if(hasRequiredIsPostalCode)return isPostalCode;hasRequiredIsPostalCode=1,Object.defineProperty(isPostalCode,"__esModule",{value:!0}),isPostalCode.default=ci,isPostalCode.locales=void 0;var Ws=ws(requireAssertString());function ws(ui){return ui&&ui.__esModule?ui:{default:ui}}var oi=/^\d{3}$/,si=/^\d{4}$/,ii=/^\d{5}$/,ai=/^\d{6}$/,li={AD:/^AD\d{3}$/,AT:si,AU:si,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BE:si,BG:si,BR:/^\d{5}-\d{3}$/,BY:/^2[1-4]\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:si,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CZ:/^\d{3}\s?\d{2}$/,DE:ii,DK:si,DO:ii,DZ:ii,EE:ii,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:ii,FR:/^\d{2}\s?\d{3}$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:si,ID:ii,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:oi,IT:ii,JP:/^\d{3}\-\d{4}$/,KE:ii,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:si,LV:/^LV\-\d{4}$/,LK:ii,MG:oi,MX:ii,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:ii,NL:/^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:si,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:si,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:ai,RU:ai,SA:ii,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:ai,SI:si,SK:/^\d{3}\s?\d{2}$/,TH:ii,TN:si,TW:/^\d{3}(\d{2})?$/,UA:ii,US:/^\d{5}(-\d{4})?$/,ZA:si,ZM:ii};isPostalCode.locales=Object.keys(li);function ci(ui,di){if((0,Ws.default)(ui),di in li)return li[di].test(ui);if(di==="any"){for(var hi in li)if(li.hasOwnProperty(hi)){var pi=li[hi];if(pi.test(ui))return!0}return!1}throw new Error("Invalid locale '".concat(di,"'"))}return isPostalCode}var _escape={exports:{}},hasRequired_escape;function require_escape(){return hasRequired_escape||(hasRequired_escape=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){return(0,oi.default)(ai),ai.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\//g,"/").replace(/\\/g,"\").replace(/`/g,"`")}Ws.exports=ws.default,Ws.exports.default=ws.default}(_escape,_escape.exports)),_escape.exports}var _unescape={exports:{}},hasRequired_unescape;function require_unescape(){return hasRequired_unescape||(hasRequired_unescape=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai){return(0,oi.default)(ai),ai.replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(///g,"/").replace(/\/g,"\\").replace(/`/g,"`").replace(/&/g,"&")}Ws.exports=ws.default,Ws.exports.default=ws.default}(_unescape,_unescape.exports)),_unescape.exports}var stripLow={exports:{}},blacklist={exports:{}},hasRequiredBlacklist;function requireBlacklist(){return hasRequiredBlacklist||(hasRequiredBlacklist=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){return(0,oi.default)(ai),ai.replace(new RegExp("[".concat(li,"]+"),"g"),"")}Ws.exports=ws.default,Ws.exports.default=ws.default}(blacklist,blacklist.exports)),blacklist.exports}var hasRequiredStripLow;function requireStripLow(){return hasRequiredStripLow||(hasRequiredStripLow=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=ii(requireAssertString()),si=ii(requireBlacklist());function ii(li){return li&&li.__esModule?li:{default:li}}function ai(li,ci){(0,oi.default)(li);var ui=ci?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F";return(0,si.default)(li,ui)}Ws.exports=ws.default,Ws.exports.default=ws.default}(stripLow,stripLow.exports)),stripLow.exports}var whitelist={exports:{}},hasRequiredWhitelist;function requireWhitelist(){return hasRequiredWhitelist||(hasRequiredWhitelist=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){return(0,oi.default)(ai),ai.replace(new RegExp("[^".concat(li,"]+"),"g"),"")}Ws.exports=ws.default,Ws.exports.default=ws.default}(whitelist,whitelist.exports)),whitelist.exports}var isWhitelisted={exports:{}},hasRequiredIsWhitelisted;function requireIsWhitelisted(){return hasRequiredIsWhitelisted||(hasRequiredIsWhitelisted=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ii;var oi=si(requireAssertString());function si(ai){return ai&&ai.__esModule?ai:{default:ai}}function ii(ai,li){(0,oi.default)(ai);for(var ci=ai.length-1;ci>=0;ci--)if(li.indexOf(ai[ci])===-1)return!1;return!0}Ws.exports=ws.default,Ws.exports.default=ws.default}(isWhitelisted,isWhitelisted.exports)),isWhitelisted.exports}var normalizeEmail={exports:{}},hasRequiredNormalizeEmail;function requireNormalizeEmail(){return hasRequiredNormalizeEmail||(hasRequiredNormalizeEmail=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=hi;var oi=si(requireMerge());function si(pi){return pi&&pi.__esModule?pi:{default:pi}}var ii={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},ai=["icloud.com","me.com"],li=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],ci=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],ui=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];function di(pi){return pi.length>1?pi:""}function hi(pi,ha){ha=(0,oi.default)(ha,ii);var ga=pi.split("@"),va=ga.pop(),ba=ga.join("@"),wa=[ba,va];if(wa[1]=wa[1].toLowerCase(),wa[1]==="gmail.com"||wa[1]==="googlemail.com"){if(ha.gmail_remove_subaddress&&(wa[0]=wa[0].split("+")[0]),ha.gmail_remove_dots&&(wa[0]=wa[0].replace(/\.+/g,di)),!wa[0].length)return!1;(ha.all_lowercase||ha.gmail_lowercase)&&(wa[0]=wa[0].toLowerCase()),wa[1]=ha.gmail_convert_googlemaildotcom?"gmail.com":wa[1]}else if(ai.indexOf(wa[1])>=0){if(ha.icloud_remove_subaddress&&(wa[0]=wa[0].split("+")[0]),!wa[0].length)return!1;(ha.all_lowercase||ha.icloud_lowercase)&&(wa[0]=wa[0].toLowerCase())}else if(li.indexOf(wa[1])>=0){if(ha.outlookdotcom_remove_subaddress&&(wa[0]=wa[0].split("+")[0]),!wa[0].length)return!1;(ha.all_lowercase||ha.outlookdotcom_lowercase)&&(wa[0]=wa[0].toLowerCase())}else if(ci.indexOf(wa[1])>=0){if(ha.yahoo_remove_subaddress){var xa=wa[0].split("-");wa[0]=xa.length>1?xa.slice(0,-1).join("-"):xa[0]}if(!wa[0].length)return!1;(ha.all_lowercase||ha.yahoo_lowercase)&&(wa[0]=wa[0].toLowerCase())}else ui.indexOf(wa[1])>=0?((ha.all_lowercase||ha.yandex_lowercase)&&(wa[0]=wa[0].toLowerCase()),wa[1]="yandex.ru"):ha.all_lowercase&&(wa[0]=wa[0].toLowerCase());return wa.join("@")}Ws.exports=ws.default,Ws.exports.default=ws.default}(normalizeEmail,normalizeEmail.exports)),normalizeEmail.exports}var isSlug={exports:{}},hasRequiredIsSlug;function requireIsSlug(){return hasRequiredIsSlug||(hasRequiredIsSlug=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;function ai(li){return(0,oi.default)(li),ii.test(li)}Ws.exports=ws.default,Ws.exports.default=ws.default}(isSlug,isSlug.exports)),isSlug.exports}var isLicensePlate={exports:{}},hasRequiredIsLicensePlate;function requireIsLicensePlate(){return hasRequiredIsLicensePlate||(hasRequiredIsLicensePlate=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ai;var oi=si(requireAssertString());function si(li){return li&&li.__esModule?li:{default:li}}var ii={"cs-CZ":function(li){return/^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(li)},"de-DE":function(li){return/^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÜ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÖ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|PI|PL|PM|PN|PR|PS|PW|PZ|R|RA|RC|RD|RE|RG|RH|RI|RL|RM|RN|RO|RP|RS|RT|RU|RV|RW|RZ|S|SB|SC|SE|SG|SI|SK|SL|SM|SN|SO|SP|SR|ST|SU|SW|SY|SZ|TE|TF|TG|TO|TP|TR|TS|TT|TÜ|ÜB|UE|UH|UL|UM|UN|V|VB|VG|VK|VR|VS|W|WA|WB|WE|WF|WI|WK|WL|WM|WN|WO|WR|WS|WT|WÜ|WW|WZ|Z|ZE|ZI|ZP|ZR|ZW|ZZ)[- ]?[A-Z]{1,2}[- ]?\d{1,4}|(ABG|ABI|AIB|AIC|ALF|ALZ|ANA|ANG|ANK|APD|ARN|ART|ASL|ASZ|AUR|AZE|BAD|BAR|BBG|BCH|BED|BER|BGD|BGL|BID|BIN|BIR|BIT|BIW|BKS|BLB|BLK|BNA|BOG|BOH|BOR|BOT|BRA|BRB|BRG|BRK|BRL|BRV|BSB|BSK|BTF|BÜD|BUL|BÜR|BÜS|BÜZ|CAS|CHA|CLP|CLZ|COC|COE|CUX|DAH|DAN|DAU|DBR|DEG|DEL|DGF|DIL|DIN|DIZ|DKB|DLG|DON|DUD|DÜW|EBE|EBN|EBS|ECK|EIC|EIL|EIN|EIS|EMD|EMS|ERB|ERH|ERK|ERZ|ESB|ESW|FDB|FDS|FEU|FFB|FKB|FLÖ|FOR|FRG|FRI|FRW|FTL|FÜS|GAN|GAP|GDB|GEL|GEO|GER|GHA|GHC|GLA|GMN|GNT|GOA|GOH|GRA|GRH|GRI|GRM|GRZ|GTH|GUB|GUN|GVM|HAB|HAL|HAM|HAS|HBN|HBS|HCH|HDH|HDL|HEB|HEF|HEI|HER|HET|HGN|HGW|HHM|HIG|HIP|HMÜ|HOG|HOH|HOL|HOM|HOR|HÖS|HOT|HRO|HSK|HST|HVL|HWI|IGB|ILL|JÜL|KEH|KEL|KEM|KIB|KLE|KLZ|KÖN|KÖT|KÖZ|KRU|KÜN|KUS|KYF|LAN|LAU|LBS|LBZ|LDK|LDS|LEO|LER|LEV|LIB|LIF|LIP|LÖB|LOS|LRO|LSZ|LÜN|LUP|LWL|MAB|MAI|MAK|MAL|MED|MEG|MEI|MEK|MEL|MER|MET|MGH|MGN|MHL|MIL|MKK|MOD|MOL|MON|MOS|MSE|MSH|MSP|MST|MTK|MTL|MÜB|MÜR|MYK|MZG|NAB|NAI|NAU|NDH|NEA|NEB|NEC|NEN|NES|NEW|NMB|NMS|NOH|NOL|NOM|NOR|NVP|NWM|OAL|OBB|OBG|OCH|OHA|ÖHR|OHV|OHZ|OPR|OSL|OVI|OVL|OVP|PAF|PAN|PAR|PCH|PEG|PIR|PLÖ|PRÜ|QFT|QLB|RDG|REG|REH|REI|RID|RIE|ROD|ROF|ROK|ROL|ROS|ROT|ROW|RSL|RÜD|RÜG|SAB|SAD|SAN|SAW|SBG|SBK|SCZ|SDH|SDL|SDT|SEB|SEE|SEF|SEL|SFB|SFT|SGH|SHA|SHG|SHK|SHL|SIG|SIM|SLE|SLF|SLK|SLN|SLS|SLÜ|SLZ|SMÜ|SOB|SOG|SOK|SÖM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÜW|SWA|SZB|TBB|TDO|TET|TIR|TÖL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÜM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(li)},"de-LI":function(li){return/^FL[- ]?\d{1,5}[UZ]?$/.test(li)},"en-IN":function(li){return/^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(li)},"es-AR":function(li){return/^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(li)},"fi-FI":function(li){return/^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(li)},"hu-HU":function(li){return/^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\d{3})|(M\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \d{2}-\d{2})|(CD \d{3}-\d{3})|(C-(C|X) \d{4})|(X-(A|B|C) \d{4})|(([EPVZ]-\d{5}))|(S A[A-Z]{2} \d{2})|(SP \d{2}-\d{2}))$/.test(li)},"pt-BR":function(li){return/^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(li)},"pt-PT":function(li){return/^([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})$/.test(li)},"sq-AL":function(li){return/^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(li)},"sv-SE":function(li){return/^[A-HJ-PR-UW-Z]{3} ?[\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(li.trim())},"en-PK":function(li){return/(^[A-Z]{2}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{3}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{4}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]((\s|-){0,1})[0-9]{4}((\s|-)[0-9]{2}){0,1}$)/.test(li.trim())}};function ai(li,ci){if((0,oi.default)(li),ci in ii)return ii[ci](li);if(ci==="any"){for(var ui in ii){var di=ii[ui];if(di(li))return!0}return!1}throw new Error("Invalid locale '".concat(ci,"'"))}Ws.exports=ws.default,Ws.exports.default=ws.default}(isLicensePlate,isLicensePlate.exports)),isLicensePlate.exports}var isStrongPassword={exports:{}},hasRequiredIsStrongPassword;function requireIsStrongPassword(){return hasRequiredIsStrongPassword||(hasRequiredIsStrongPassword=1,function(Ws,ws){Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=ga;var oi=ii(requireMerge()),si=ii(requireAssertString());function ii(va){return va&&va.__esModule?va:{default:va}}var ai=/^[A-Z]$/,li=/^[a-z]$/,ci=/^[0-9]$/,ui=/^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/\\ ]$/,di={minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1,returnScore:!1,pointsPerUnique:1,pointsPerRepeat:.5,pointsForContainingLower:10,pointsForContainingUpper:10,pointsForContainingNumber:10,pointsForContainingSymbol:10};function hi(va){var ba={};return Array.from(va).forEach(function(wa){var xa=ba[wa];xa?ba[wa]+=1:ba[wa]=1}),ba}function pi(va){var ba=hi(va),wa={length:va.length,uniqueChars:Object.keys(ba).length,uppercaseCount:0,lowercaseCount:0,numberCount:0,symbolCount:0};return Object.keys(ba).forEach(function(xa){ai.test(xa)?wa.uppercaseCount+=ba[xa]:li.test(xa)?wa.lowercaseCount+=ba[xa]:ci.test(xa)?wa.numberCount+=ba[xa]:ui.test(xa)&&(wa.symbolCount+=ba[xa])}),wa}function ha(va,ba){var wa=0;return wa+=va.uniqueChars*ba.pointsPerUnique,wa+=(va.length-va.uniqueChars)*ba.pointsPerRepeat,va.lowercaseCount>0&&(wa+=ba.pointsForContainingLower),va.uppercaseCount>0&&(wa+=ba.pointsForContainingUpper),va.numberCount>0&&(wa+=ba.pointsForContainingNumber),va.symbolCount>0&&(wa+=ba.pointsForContainingSymbol),wa}function ga(va){var ba=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;(0,si.default)(va);var wa=pi(va);return ba=(0,oi.default)(ba||{},di),ba.returnScore?ha(wa,ba):wa.length>=ba.minLength&&wa.lowercaseCount>=ba.minLowercase&&wa.uppercaseCount>=ba.minUppercase&&wa.numberCount>=ba.minNumbers&&wa.symbolCount>=ba.minSymbols}Ws.exports=ws.default,Ws.exports.default=ws.default}(isStrongPassword,isStrongPassword.exports)),isStrongPassword.exports}var isVAT={},hasRequiredIsVAT;function requireIsVAT(){if(hasRequiredIsVAT)return isVAT;hasRequiredIsVAT=1;function Ws(pi){"@babel/helpers - typeof";return Ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ha){return typeof ha}:function(ha){return ha&&typeof Symbol=="function"&&ha.constructor===Symbol&&ha!==Symbol.prototype?"symbol":typeof ha},Ws(pi)}Object.defineProperty(isVAT,"__esModule",{value:!0}),isVAT.default=hi,isVAT.vatMatchers=void 0;var ws=ai(requireAssertString()),oi=ii(requireAlgorithms());function si(pi){if(typeof WeakMap!="function")return null;var ha=new WeakMap,ga=new WeakMap;return(si=function(va){return va?ga:ha})(pi)}function ii(pi,ha){if(pi&&pi.__esModule)return pi;if(pi===null||Ws(pi)!="object"&&typeof pi!="function")return{default:pi};var ga=si(ha);if(ga&&ga.has(pi))return ga.get(pi);var va={__proto__:null},ba=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var wa in pi)if(wa!=="default"&&{}.hasOwnProperty.call(pi,wa)){var xa=ba?Object.getOwnPropertyDescriptor(pi,wa):null;xa&&(xa.get||xa.set)?Object.defineProperty(va,wa,xa):va[wa]=pi[wa]}return va.default=pi,ga&&ga.set(pi,va),va}function ai(pi){return pi&&pi.__esModule?pi:{default:pi}}var li=function(pi){var ha=pi.match(/^(AU)?(\d{11})$/);if(!ha)return!1;var ga=[10,1,3,5,7,9,11,13,15,17,19];pi=pi.replace(/^AU/,"");for(var va=(parseInt(pi.slice(0,1),10)-1).toString()+pi.slice(1),ba=0,wa=0;wa<11;wa++)ba+=ga[wa]*va.charAt(wa);return ba!==0&&ba%89===0},ci=function(pi){var ha=function(ga){var va=ga.pop(),ba=[5,4,3,2,7,6,5,4],wa=(11-ga.reduce(function(xa,Ca,el){return xa+Ca*ba[el]},0)%11)%11;return va===wa};return/^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(pi)&&ha(pi.match(/\d/g).map(function(ga){return+ga}))},ui=function(pi){var ha=pi.match(/^(PT)?(\d{9})$/);if(!ha)return!1;var ga=ha[2],va=11-oi.reverseMultiplyAndSum(ga.split("").slice(0,8).map(function(ba){return parseInt(ba,10)}),9)%11;return va>9?parseInt(ga[8],10)===0:va===parseInt(ga[8],10)},di=isVAT.vatMatchers={AT:function(pi){return/^(AT)?U\d{8}$/.test(pi)},BE:function(pi){return/^(BE)?\d{10}$/.test(pi)},BG:function(pi){return/^(BG)?\d{9,10}$/.test(pi)},HR:function(pi){return/^(HR)?\d{11}$/.test(pi)},CY:function(pi){return/^(CY)?\w{9}$/.test(pi)},CZ:function(pi){return/^(CZ)?\d{8,10}$/.test(pi)},DK:function(pi){return/^(DK)?\d{8}$/.test(pi)},EE:function(pi){return/^(EE)?\d{9}$/.test(pi)},FI:function(pi){return/^(FI)?\d{8}$/.test(pi)},FR:function(pi){return/^(FR)?\w{2}\d{9}$/.test(pi)},DE:function(pi){return/^(DE)?\d{9}$/.test(pi)},EL:function(pi){return/^(EL)?\d{9}$/.test(pi)},HU:function(pi){return/^(HU)?\d{8}$/.test(pi)},IE:function(pi){return/^(IE)?\d{7}\w{1}(W)?$/.test(pi)},IT:function(pi){return/^(IT)?\d{11}$/.test(pi)},LV:function(pi){return/^(LV)?\d{11}$/.test(pi)},LT:function(pi){return/^(LT)?\d{9,12}$/.test(pi)},LU:function(pi){return/^(LU)?\d{8}$/.test(pi)},MT:function(pi){return/^(MT)?\d{8}$/.test(pi)},NL:function(pi){return/^(NL)?\d{9}B\d{2}$/.test(pi)},PL:function(pi){return/^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(pi)},PT:ui,RO:function(pi){return/^(RO)?\d{2,10}$/.test(pi)},SK:function(pi){return/^(SK)?\d{10}$/.test(pi)},SI:function(pi){return/^(SI)?\d{8}$/.test(pi)},ES:function(pi){return/^(ES)?\w\d{7}[A-Z]$/.test(pi)},SE:function(pi){return/^(SE)?\d{12}$/.test(pi)},AL:function(pi){return/^(AL)?\w{9}[A-Z]$/.test(pi)},MK:function(pi){return/^(MK)?\d{13}$/.test(pi)},AU:li,BY:function(pi){return/^(УНП )?\d{9}$/.test(pi)},CA:function(pi){return/^(CA)?\d{9}$/.test(pi)},IS:function(pi){return/^(IS)?\d{5,6}$/.test(pi)},IN:function(pi){return/^(IN)?\d{15}$/.test(pi)},ID:function(pi){return/^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(pi)},IL:function(pi){return/^(IL)?\d{9}$/.test(pi)},KZ:function(pi){return/^(KZ)?\d{12}$/.test(pi)},NZ:function(pi){return/^(NZ)?\d{9}$/.test(pi)},NG:function(pi){return/^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(pi)},NO:function(pi){return/^(NO)?\d{9}MVA$/.test(pi)},PH:function(pi){return/^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(pi)},RU:function(pi){return/^(RU)?(\d{10}|\d{12})$/.test(pi)},SM:function(pi){return/^(SM)?\d{5}$/.test(pi)},SA:function(pi){return/^(SA)?\d{15}$/.test(pi)},RS:function(pi){return/^(RS)?\d{9}$/.test(pi)},CH:ci,TR:function(pi){return/^(TR)?\d{10}$/.test(pi)},UA:function(pi){return/^(UA)?\d{12}$/.test(pi)},GB:function(pi){return/^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(pi)},UZ:function(pi){return/^(UZ)?\d{9}$/.test(pi)},AR:function(pi){return/^(AR)?\d{11}$/.test(pi)},BO:function(pi){return/^(BO)?\d{7}$/.test(pi)},BR:function(pi){return/^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(pi)},CL:function(pi){return/^(CL)?\d{8}-\d{1}$/.test(pi)},CO:function(pi){return/^(CO)?\d{10}$/.test(pi)},CR:function(pi){return/^(CR)?\d{9,12}$/.test(pi)},EC:function(pi){return/^(EC)?\d{13}$/.test(pi)},SV:function(pi){return/^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(pi)},GT:function(pi){return/^(GT)?\d{7}-\d{1}$/.test(pi)},HN:function(pi){return/^(HN)?$/.test(pi)},MX:function(pi){return/^(MX)?\w{3,4}\d{6}\w{3}$/.test(pi)},NI:function(pi){return/^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(pi)},PA:function(pi){return/^(PA)?$/.test(pi)},PY:function(pi){return/^(PY)?\d{6,8}-\d{1}$/.test(pi)},PE:function(pi){return/^(PE)?\d{11}$/.test(pi)},DO:function(pi){return/^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(pi)},UY:function(pi){return/^(UY)?\d{12}$/.test(pi)},VE:function(pi){return/^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(pi)}};function hi(pi,ha){if((0,ws.default)(pi),(0,ws.default)(ha),ha in di)return di[ha](pi);throw new Error("Invalid country code: '".concat(ha,"'"))}return isVAT}var hasRequiredValidator;function requireValidator(){return hasRequiredValidator||(hasRequiredValidator=1,function(Ws,ws){function oi(Tf){"@babel/helpers - typeof";return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_f){return typeof _f}:function(_f){return _f&&typeof Symbol=="function"&&_f.constructor===Symbol&&_f!==Symbol.prototype?"symbol":typeof _f},oi(Tf)}Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=void 0;var si=cf(requireToDate()),ii=cf(requireToFloat()),ai=cf(requireToInt()),li=cf(requireToBoolean()),ci=cf(requireEquals()),ui=cf(requireContains()),di=cf(requireMatches()),hi=cf(requireIsEmail()),pi=cf(requireIsURL()),ha=cf(requireIsMACAddress()),ga=cf(requireIsIP()),va=cf(requireIsIPRange()),ba=cf(requireIsFQDN()),wa=cf(requireIsDate()),xa=cf(requireIsTime()),Ca=cf(requireIsBoolean()),el=cf(requireIsLocale()),ku=cf(requireIsAbaRouting()),gd=Lf(requireIsAlpha()),Ed=Lf(requireIsAlphanumeric()),Od=cf(requireIsNumeric()),Nd=cf(requireIsPassportNumber()),Pd=cf(requireIsPort()),Ld=cf(requireIsLowercase()),rf=cf(requireIsUppercase()),kd=cf(requireIsIMEI()),Md=cf(requireIsAscii()),Td=cf(requireIsFullWidth()),wd=cf(requireIsHalfWidth()),Cd=cf(requireIsVariableWidth()),sf=cf(requireIsMultibyte()),of=cf(requireIsSemVer()),Wd=cf(requireIsSurrogatePair()),df=cf(requireIsInt()),hf=Lf(requireIsFloat()),xd=cf(requireIsDecimal()),Fd=cf(requireIsHexadecimal()),Vd=cf(requireIsOctal()),af=cf(requireIsDivisibleBy()),ff=cf(requireIsHexColor()),uf=cf(requireIsRgbColor()),mf=cf(requireIsHSL()),yf=cf(requireIsISRC()),Sf=Lf(requireIsIBAN()),Of=cf(requireIsBIC()),wf=cf(requireIsMD5()),Ef=cf(requireIsHash()),xf=cf(requireIsJWT()),_d=cf(requireIsJSON()),Dd=cf(requireIsEmpty()),tf=cf(requireIsLength()),vd=cf(requireIsByteLength()),Sd=cf(requireIsUUID()),Id=cf(requireIsMongoId()),Bd=cf(requireIsAfter()),nf=cf(requireIsBefore()),lf=cf(requireIsIn()),pf=cf(requireIsLuhnNumber()),gf=cf(requireIsCreditCard()),vf=cf(requireIsIdentityCard()),bf=cf(requireIsEAN()),If=cf(requireIsISIN()),Af=cf(requireIsISBN()),$f=cf(requireIsISSN()),Cf=cf(requireIsTaxID()),kf=Lf(requireIsMobilePhone()),Rf=cf(requireIsEthereumAddress()),Pf=cf(requireIsCurrency()),Ff=cf(requireIsBtcAddress()),jf=requireIsISO6346(),Hf=cf(requireIsISO6391()),Wf=cf(requireIsISO8601()),zf=cf(requireIsRFC3339()),Yf=cf(requireIsISO31661Alpha2()),Xf=cf(requireIsISO31661Alpha3()),Jf=cf(requireIsISO4217()),eh=cf(requireIsBase32()),th=cf(requireIsBase58()),nh=cf(requireIsBase64()),rh=cf(requireIsDataURI()),oh=cf(requireIsMagnetURI()),sh=cf(requireIsMailtoURI()),ih=cf(requireIsMimeType()),ah=cf(requireIsLatLong()),Uf=Lf(requireIsPostalCode()),lh=cf(requireLtrim()),ch=cf(requireRtrim()),uh=cf(requireTrim()),dh=cf(require_escape()),fh=cf(require_unescape()),hh=cf(requireStripLow()),ph=cf(requireWhitelist()),mh=cf(requireBlacklist()),gh=cf(requireIsWhitelisted()),yh=cf(requireNormalizeEmail()),vh=cf(requireIsSlug()),bh=cf(requireIsLicensePlate()),Sh=cf(requireIsStrongPassword()),Th=cf(requireIsVAT());function Qf(Tf){if(typeof WeakMap!="function")return null;var _f=new WeakMap,Nf=new WeakMap;return(Qf=function(Df){return Df?Nf:_f})(Tf)}function Lf(Tf,_f){if(Tf&&Tf.__esModule)return Tf;if(Tf===null||oi(Tf)!="object"&&typeof Tf!="function")return{default:Tf};var Nf=Qf(_f);if(Nf&&Nf.has(Tf))return Nf.get(Tf);var Df={__proto__:null},xh=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Mf in Tf)if(Mf!=="default"&&{}.hasOwnProperty.call(Tf,Mf)){var Vf=xh?Object.getOwnPropertyDescriptor(Tf,Mf):null;Vf&&(Vf.get||Vf.set)?Object.defineProperty(Df,Mf,Vf):Df[Mf]=Tf[Mf]}return Df.default=Tf,Nf&&Nf.set(Tf,Df),Df}function cf(Tf){return Tf&&Tf.__esModule?Tf:{default:Tf}}var Eh="13.12.0",wh={version:Eh,toDate:si.default,toFloat:ii.default,toInt:ai.default,toBoolean:li.default,equals:ci.default,contains:ui.default,matches:di.default,isEmail:hi.default,isURL:pi.default,isMACAddress:ha.default,isIP:ga.default,isIPRange:va.default,isFQDN:ba.default,isBoolean:Ca.default,isIBAN:Sf.default,isBIC:Of.default,isAbaRouting:ku.default,isAlpha:gd.default,isAlphaLocales:gd.locales,isAlphanumeric:Ed.default,isAlphanumericLocales:Ed.locales,isNumeric:Od.default,isPassportNumber:Nd.default,isPort:Pd.default,isLowercase:Ld.default,isUppercase:rf.default,isAscii:Md.default,isFullWidth:Td.default,isHalfWidth:wd.default,isVariableWidth:Cd.default,isMultibyte:sf.default,isSemVer:of.default,isSurrogatePair:Wd.default,isInt:df.default,isIMEI:kd.default,isFloat:hf.default,isFloatLocales:hf.locales,isDecimal:xd.default,isHexadecimal:Fd.default,isOctal:Vd.default,isDivisibleBy:af.default,isHexColor:ff.default,isRgbColor:uf.default,isHSL:mf.default,isISRC:yf.default,isMD5:wf.default,isHash:Ef.default,isJWT:xf.default,isJSON:_d.default,isEmpty:Dd.default,isLength:tf.default,isLocale:el.default,isByteLength:vd.default,isUUID:Sd.default,isMongoId:Id.default,isAfter:Bd.default,isBefore:nf.default,isIn:lf.default,isLuhnNumber:pf.default,isCreditCard:gf.default,isIdentityCard:vf.default,isEAN:bf.default,isISIN:If.default,isISBN:Af.default,isISSN:$f.default,isMobilePhone:kf.default,isMobilePhoneLocales:kf.locales,isPostalCode:Uf.default,isPostalCodeLocales:Uf.locales,isEthereumAddress:Rf.default,isCurrency:Pf.default,isBtcAddress:Ff.default,isISO6346:jf.isISO6346,isFreightContainerID:jf.isFreightContainerID,isISO6391:Hf.default,isISO8601:Wf.default,isRFC3339:zf.default,isISO31661Alpha2:Yf.default,isISO31661Alpha3:Xf.default,isISO4217:Jf.default,isBase32:eh.default,isBase58:th.default,isBase64:nh.default,isDataURI:rh.default,isMagnetURI:oh.default,isMailtoURI:sh.default,isMimeType:ih.default,isLatLong:ah.default,ltrim:lh.default,rtrim:ch.default,trim:uh.default,escape:dh.default,unescape:fh.default,stripLow:hh.default,whitelist:ph.default,blacklist:mh.default,isWhitelisted:gh.default,normalizeEmail:yh.default,toString,isSlug:vh.default,isStrongPassword:Sh.default,isTaxID:Cf.default,isDate:wa.default,isTime:xa.default,isLicensePlate:bh.default,isVAT:Th.default,ibanLocales:Sf.locales};ws.default=wh,Ws.exports=ws.default,Ws.exports.default=ws.default}(validator$1,validator$1.exports)),validator$1.exports}var validatorExports=requireValidator();const validator=Ud(validatorExports);function createNameSchema(Ws={}){const{required:ws=!1,allowEmpty:oi=!1,unique:si=[]}=Ws,ii=oi?h$3.string():h$3.string().min(1),ai=ii.refine(li=>!li&&oi?!0:!si.map(ci=>ci.toLowerCase()).includes(li.replace(/^\s+|\s+$/g,"_").toLowerCase()),{message:"Item with this name already exists"});return ws?si.length>0?ai:ii:si.length>0?h$3.string().optional().refine(li=>li===void 0||!li&&oi?!0:!si.map(ci=>ci.toLowerCase()).includes(li.replace(/^\s+|\s+$/g,"_").toLowerCase()),{message:"Item with this name already exists"}):h$3.string().optional()}function createConstantCaseSchema(Ws={}){return createNameSchema(Ws).transform(ws=>ws&&ws.toUpperCase()).refine(ws=>!ws||validator.isUppercase(ws),{message:"Must be uppercase"})}function createLowercaseSnakeCaseSchema(Ws={}){return createNameSchema(Ws).transform(ws=>ws&&ws.toLowerCase()).refine(ws=>!ws||validator.isLowercase(ws),{message:"Must be lowercase"})}function toLowercaseSnakeCase(Ws,ws={}){return createLowercaseSnakeCaseSchema(ws).parse(snakeCase(Ws))}function toConstantCase(Ws,ws={}){return createConstantCaseSchema(ws).parse(constantCase(Ws))}h$3.object({name:createNameSchema({allowEmpty:!0}),website:h$3.union([h$3.string().url(),h$3.literal("")]).optional().default("")}).default({name:"",website:""});h$3.string().default("");const s=(Ws,ws,oi)=>{if(Ws&&"reportValidity"in Ws){const si=k$6(oi,ws);Ws.setCustomValidity(si&&si.message||""),Ws.reportValidity()}},o=(Ws,ws)=>{for(const oi in ws.fields){const si=ws.fields[oi];si&&si.ref&&"reportValidity"in si.ref?s(si.ref,oi,Ws):si.refs&&si.refs.forEach(ii=>s(ii,oi,Ws))}},r=(Ws,ws)=>{ws.shouldUseNativeValidation&&o(Ws,ws);const oi={};for(const si in Ws){const ii=k$6(ws.fields,si),ai=Object.assign(Ws[si]||{},{ref:ii&&ii.ref});if(i$1(ws.names||Object.keys(Ws),si)){const li=Object.assign({},k$6(oi,si));J$5(li,"root",ai),J$5(oi,si,li)}else J$5(oi,si,ai)}return oi},i$1=(Ws,ws)=>Ws.some(oi=>oi.startsWith(ws+"."));var n=function(Ws,ws){for(var oi={};Ws.length;){var si=Ws[0],ii=si.code,ai=si.message,li=si.path.join(".");if(!oi[li])if("unionErrors"in si){var ci=si.unionErrors[0].errors[0];oi[li]={message:ci.message,type:ci.code}}else oi[li]={message:ai,type:ii};if("unionErrors"in si&&si.unionErrors.forEach(function(hi){return hi.errors.forEach(function(pi){return Ws.push(pi)})}),ws){var ui=oi[li].types,di=ui&&ui[si.code];oi[li]=xi(li,ws,oi,ii,di?[].concat(di,si.message):si.message)}Ws.shift()}return oi},t$2=function(Ws,ws,oi){return oi===void 0&&(oi={}),function(si,ii,ai){try{return Promise.resolve(function(li,ci){try{var ui=Promise.resolve(Ws[oi.mode==="sync"?"parse":"parseAsync"](si,ws)).then(function(di){return ai.shouldUseNativeValidation&&o({},ai),{errors:{},values:oi.raw?si:di}})}catch(di){return ci(di)}return ui&&ui.then?ui.then(void 0,ci):ui}(0,function(li){if(function(ci){return Array.isArray(ci==null?void 0:ci.errors)}(li))return{values:{},errors:r(n(li.errors,!ai.shouldUseNativeValidation&&ai.criteriaMode==="all"),ai)};throw li}))}catch(li){return Promise.reject(li)}}};const Textarea=forwardRef(({className:Ws,...ws},oi)=>{const si=useRef(null),ii=useCallback(li=>{li.style.height="auto";const ci=Math.max(li.scrollHeight,li.offsetHeight);li.style.height=`${ci}px`},[]),ai=useCallback(li=>{ii(li.currentTarget)},[ii]);return React.useEffect(()=>{si.current&&ii(si.current)},[ii]),useImperativeHandle(oi,()=>({focus:()=>{var li;return(li=si.current)==null?void 0:li.focus()},element:si.current})),jsx("textarea",{...ws,className:cn("min-h-10 w-full resize-none rounded-md border border-gray-200 bg-gray-50 px-3 py-2 text-sm text-gray-800 placeholder:text-gray-600 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",Ws),ref:si,onInput:ai})});Textarea.displayName="Textarea";const TextField=forwardRef(({name:Ws,value:ws,onSubmit:oi,label:si,placeholder:ii,unique:ai,className:li="",rows:ci=1,focusOnMount:ui=!1,required:di=!1,allowEmpty:hi=!1,shouldReset:pi=!1,onChange:ha},ga)=>{const va=useRef(null);useEffect(()=>{ui&&va.current&&va.current.focus()},[ui]);const ba=h$3.object({[Ws]:createNameSchema({required:di,allowEmpty:hi,unique:ai})}),wa=Gd({resolver:t$2(ba),defaultValues:{[Ws]:ws??""}}),xa=useCallback(gd=>{const Ed=gd[Ws];Ed===void 0||ws===Ed||(oi(Ed),pi&&wa.reset({[Ws]:""}))},[Ws,ws,oi,wa,pi]),Ca=useCallback(async()=>{const gd=wa.getValues()[Ws]??"";if(!(ws==null&&(!gd||gd.trim()===""))&&!compareStringsWithoutWhitespace(gd,ws??""))try{await wa.trigger(),wa.formState.isValid&&await wa.handleSubmit(xa)()}catch{}},[wa,xa,Ws,ws]),el=useCallback(gd=>{gd.key==="Enter"&&(gd.preventDefault(),gd.target.blur())},[]),ku=useCallback(gd=>{const Ed=gd.target.value;ha==null||ha(Ed)},[ha]);return useImperativeHandle(ga,()=>({focus:()=>{var gd;return(gd=va.current)==null?void 0:gd.focus()}})),useEffect(()=>{wa.reset({[Ws]:ws??""})},[wa,Ws,ws]),jsx(Form,{...wa,children:jsx(FormField,{control:wa.control,name:Ws,render:({field:gd})=>jsxs(FormItem,{className:"grid h-full grid-rows-[auto,1fr] gap-2 overflow-visible",children:[!!si&&jsx(FormLabel,{htmlFor:Ws,className:"text-sm font-medium text-gray-700",children:si}),jsx(FormControl,{children:jsx(Textarea,{...gd,id:Ws,ref:Ed=>{Ed&&(gd.ref(Ed.element),va.current=Ed)},placeholder:ii,onBlur:Ca,onChange:Ed=>{gd.onChange(Ed),ku(Ed)},onKeyDown:el,rows:ci,className:li})}),jsx(FormMessage,{})]})})})});TextField.displayName="TextField";function ModuleForm({module:Ws,onAddModule:ws,updateModuleName:oi,modules:si=[]}){const ii=!!Ws,ai=si.map(ci=>ci.name),li=async ci=>{const ui=toLowercaseSnakeCase(ci);ui.length&&(ii?ui!==Ws.name&&oi(Ws.id,ui):await ws(ui))};return jsx(TextField,{name:"name",label:ii?"Module name":"Add module",value:Ws==null?void 0:Ws.name,onSubmit:li,placeholder:"Add module",unique:ai,shouldReset:!ii,required:!0},(Ws==null?void 0:Ws.id)??"new")}const Input=React.forwardRef(({className:Ws,type:ws,...oi},si)=>jsx("input",{type:ws,className:cn("flex h-9 w-full rounded-md border border-gray-400 bg-transparent px-3 py-1 text-sm transition-colors hover:bg-gray-100 focus-visible:bg-gray-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",Ws),ref:si,...oi}));Input.displayName="Input";let rangeFrom=[],rangeTo=[];(()=>{let Ws="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(ws=>ws?parseInt(ws,36):1);for(let ws=0,oi=0;ws<Ws.length;ws++)(ws%2?rangeTo:rangeFrom).push(oi=oi+Ws[ws])})();function isExtendingChar(Ws){if(Ws<768)return!1;for(let ws=0,oi=rangeFrom.length;;){let si=ws+oi>>1;if(Ws<rangeFrom[si])oi=si;else if(Ws>=rangeTo[si])ws=si+1;else return!0;if(ws==oi)return!1}}function isRegionalIndicator(Ws){return Ws>=127462&&Ws<=127487}const ZWJ=8205;function findClusterBreak$1(Ws,ws,oi=!0,si=!0){return(oi?nextClusterBreak:prevClusterBreak)(Ws,ws,si)}function nextClusterBreak(Ws,ws,oi){if(ws==Ws.length)return ws;ws&&surrogateLow$1(Ws.charCodeAt(ws))&&surrogateHigh$1(Ws.charCodeAt(ws-1))&&ws--;let si=codePointAt$1(Ws,ws);for(ws+=codePointSize$1(si);ws<Ws.length;){let ii=codePointAt$1(Ws,ws);if(si==ZWJ||ii==ZWJ||oi&&isExtendingChar(ii))ws+=codePointSize$1(ii),si=ii;else if(isRegionalIndicator(ii)){let ai=0,li=ws-2;for(;li>=0&&isRegionalIndicator(codePointAt$1(Ws,li));)ai++,li-=2;if(ai%2==0)break;ws+=2}else break}return ws}function prevClusterBreak(Ws,ws,oi){for(;ws>0;){let si=nextClusterBreak(Ws,ws-2,oi);if(si<ws)return si;ws--}return 0}function codePointAt$1(Ws,ws){let oi=Ws.charCodeAt(ws);if(!surrogateHigh$1(oi)||ws+1==Ws.length)return oi;let si=Ws.charCodeAt(ws+1);return surrogateLow$1(si)?(oi-55296<<10)+(si-56320)+65536:oi}function surrogateLow$1(Ws){return Ws>=56320&&Ws<57344}function surrogateHigh$1(Ws){return Ws>=55296&&Ws<56320}function codePointSize$1(Ws){return Ws<65536?1:2}class Text{lineAt(ws){if(ws<0||ws>this.length)throw new RangeError(`Invalid position ${ws} in document of length ${this.length}`);return this.lineInner(ws,!1,1,0)}line(ws){if(ws<1||ws>this.lines)throw new RangeError(`Invalid line number ${ws} in ${this.lines}-line document`);return this.lineInner(ws,!0,1,0)}replace(ws,oi,si){[ws,oi]=clip(this,ws,oi);let ii=[];return this.decompose(0,ws,ii,2),si.length&&si.decompose(0,si.length,ii,3),this.decompose(oi,this.length,ii,1),TextNode.from(ii,this.length-(oi-ws)+si.length)}append(ws){return this.replace(this.length,this.length,ws)}slice(ws,oi=this.length){[ws,oi]=clip(this,ws,oi);let si=[];return this.decompose(ws,oi,si,0),TextNode.from(si,oi-ws)}eq(ws){if(ws==this)return!0;if(ws.length!=this.length||ws.lines!=this.lines)return!1;let oi=this.scanIdentical(ws,1),si=this.length-this.scanIdentical(ws,-1),ii=new RawTextCursor(this),ai=new RawTextCursor(ws);for(let li=oi,ci=oi;;){if(ii.next(li),ai.next(li),li=0,ii.lineBreak!=ai.lineBreak||ii.done!=ai.done||ii.value!=ai.value)return!1;if(ci+=ii.value.length,ii.done||ci>=si)return!0}}iter(ws=1){return new RawTextCursor(this,ws)}iterRange(ws,oi=this.length){return new PartialTextCursor(this,ws,oi)}iterLines(ws,oi){let si;if(ws==null)si=this.iter();else{oi==null&&(oi=this.lines+1);let ii=this.line(ws).from;si=this.iterRange(ii,Math.max(ii,oi==this.lines+1?this.length:oi<=1?0:this.line(oi-1).to))}return new LineCursor(si)}toString(){return this.sliceString(0)}toJSON(){let ws=[];return this.flatten(ws),ws}constructor(){}static of(ws){if(ws.length==0)throw new RangeError("A document must have at least one line");return ws.length==1&&!ws[0]?Text.empty:ws.length<=32?new TextLeaf(ws):TextNode.from(TextLeaf.split(ws,[]))}}class TextLeaf extends Text{constructor(ws,oi=textLength(ws)){super(),this.text=ws,this.length=oi}get lines(){return this.text.length}get children(){return null}lineInner(ws,oi,si,ii){for(let ai=0;;ai++){let li=this.text[ai],ci=ii+li.length;if((oi?si:ci)>=ws)return new Line(ii,ci,si,li);ii=ci+1,si++}}decompose(ws,oi,si,ii){let ai=ws<=0&&oi>=this.length?this:new TextLeaf(sliceText(this.text,ws,oi),Math.min(oi,this.length)-Math.max(0,ws));if(ii&1){let li=si.pop(),ci=appendText(ai.text,li.text.slice(),0,ai.length);if(ci.length<=32)si.push(new TextLeaf(ci,li.length+ai.length));else{let ui=ci.length>>1;si.push(new TextLeaf(ci.slice(0,ui)),new TextLeaf(ci.slice(ui)))}}else si.push(ai)}replace(ws,oi,si){if(!(si instanceof TextLeaf))return super.replace(ws,oi,si);[ws,oi]=clip(this,ws,oi);let ii=appendText(this.text,appendText(si.text,sliceText(this.text,0,ws)),oi),ai=this.length+si.length-(oi-ws);return ii.length<=32?new TextLeaf(ii,ai):TextNode.from(TextLeaf.split(ii,[]),ai)}sliceString(ws,oi=this.length,si=`
|
|
313
313
|
`){[ws,oi]=clip(this,ws,oi);let ii="";for(let ai=0,li=0;ai<=oi&&li<this.text.length;li++){let ci=this.text[li],ui=ai+ci.length;ai>ws&&li&&(ii+=si),ws<ui&&oi>ai&&(ii+=ci.slice(Math.max(0,ws-ai),oi-ai)),ai=ui+1}return ii}flatten(ws){for(let oi of this.text)ws.push(oi)}scanIdentical(){return 0}static split(ws,oi){let si=[],ii=-1;for(let ai of ws)si.push(ai),ii+=ai.length+1,si.length==32&&(oi.push(new TextLeaf(si,ii)),si=[],ii=-1);return ii>-1&&oi.push(new TextLeaf(si,ii)),oi}}class TextNode extends Text{constructor(ws,oi){super(),this.children=ws,this.length=oi,this.lines=0;for(let si of ws)this.lines+=si.lines}lineInner(ws,oi,si,ii){for(let ai=0;;ai++){let li=this.children[ai],ci=ii+li.length,ui=si+li.lines-1;if((oi?ui:ci)>=ws)return li.lineInner(ws,oi,si,ii);ii=ci+1,si=ui+1}}decompose(ws,oi,si,ii){for(let ai=0,li=0;li<=oi&&ai<this.children.length;ai++){let ci=this.children[ai],ui=li+ci.length;if(ws<=ui&&oi>=li){let di=ii&((li<=ws?1:0)|(ui>=oi?2:0));li>=ws&&ui<=oi&&!di?si.push(ci):ci.decompose(ws-li,oi-li,si,di)}li=ui+1}}replace(ws,oi,si){if([ws,oi]=clip(this,ws,oi),si.lines<this.lines)for(let ii=0,ai=0;ii<this.children.length;ii++){let li=this.children[ii],ci=ai+li.length;if(ws>=ai&&oi<=ci){let ui=li.replace(ws-ai,oi-ai,si),di=this.lines-li.lines+ui.lines;if(ui.lines<di>>4&&ui.lines>di>>6){let hi=this.children.slice();return hi[ii]=ui,new TextNode(hi,this.length-(oi-ws)+si.length)}return super.replace(ai,ci,ui)}ai=ci+1}return super.replace(ws,oi,si)}sliceString(ws,oi=this.length,si=`
|
|
314
314
|
`){[ws,oi]=clip(this,ws,oi);let ii="";for(let ai=0,li=0;ai<this.children.length&&li<=oi;ai++){let ci=this.children[ai],ui=li+ci.length;li>ws&&ai&&(ii+=si),ws<ui&&oi>li&&(ii+=ci.sliceString(ws-li,oi-li,si)),li=ui+1}return ii}flatten(ws){for(let oi of this.children)oi.flatten(ws)}scanIdentical(ws,oi){if(!(ws instanceof TextNode))return 0;let si=0,[ii,ai,li,ci]=oi>0?[0,0,this.children.length,ws.children.length]:[this.children.length-1,ws.children.length-1,-1,-1];for(;;ii+=oi,ai+=oi){if(ii==li||ai==ci)return si;let ui=this.children[ii],di=ws.children[ai];if(ui!=di)return si+ui.scanIdentical(di,oi);si+=ui.length+1}}static from(ws,oi=ws.reduce((si,ii)=>si+ii.length+1,-1)){let si=0;for(let ga of ws)si+=ga.lines;if(si<32){let ga=[];for(let va of ws)va.flatten(ga);return new TextLeaf(ga,oi)}let ii=Math.max(32,si>>5),ai=ii<<1,li=ii>>1,ci=[],ui=0,di=-1,hi=[];function pi(ga){let va;if(ga.lines>ai&&ga instanceof TextNode)for(let ba of ga.children)pi(ba);else ga.lines>li&&(ui>li||!ui)?(ha(),ci.push(ga)):ga instanceof TextLeaf&&ui&&(va=hi[hi.length-1])instanceof TextLeaf&&ga.lines+va.lines<=32?(ui+=ga.lines,di+=ga.length+1,hi[hi.length-1]=new TextLeaf(va.text.concat(ga.text),va.length+1+ga.length)):(ui+ga.lines>ii&&ha(),ui+=ga.lines,di+=ga.length+1,hi.push(ga))}function ha(){ui!=0&&(ci.push(hi.length==1?hi[0]:TextNode.from(hi,di)),di=-1,ui=hi.length=0)}for(let ga of ws)pi(ga);return ha(),ci.length==1?ci[0]:new TextNode(ci,oi)}}Text.empty=new TextLeaf([""],0);function textLength(Ws){let ws=-1;for(let oi of Ws)ws+=oi.length+1;return ws}function appendText(Ws,ws,oi=0,si=1e9){for(let ii=0,ai=0,li=!0;ai<Ws.length&&ii<=si;ai++){let ci=Ws[ai],ui=ii+ci.length;ui>=oi&&(ui>si&&(ci=ci.slice(0,si-ii)),ii<oi&&(ci=ci.slice(oi-ii)),li?(ws[ws.length-1]+=ci,li=!1):ws.push(ci)),ii=ui+1}return ws}function sliceText(Ws,ws,oi){return appendText(Ws,[""],ws,oi)}class RawTextCursor{constructor(ws,oi=1){this.dir=oi,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[ws],this.offsets=[oi>0?1:(ws instanceof TextLeaf?ws.text.length:ws.children.length)<<1]}nextInner(ws,oi){for(this.done=this.lineBreak=!1;;){let si=this.nodes.length-1,ii=this.nodes[si],ai=this.offsets[si],li=ai>>1,ci=ii instanceof TextLeaf?ii.text.length:ii.children.length;if(li==(oi>0?ci:0)){if(si==0)return this.done=!0,this.value="",this;oi>0&&this.offsets[si-1]++,this.nodes.pop(),this.offsets.pop()}else if((ai&1)==(oi>0?0:1)){if(this.offsets[si]+=oi,ws==0)return this.lineBreak=!0,this.value=`
|
|
315
315
|
`,this;ws--}else if(ii instanceof TextLeaf){let ui=ii.text[li+(oi<0?-1:0)];if(this.offsets[si]+=oi,ui.length>Math.max(0,ws))return this.value=ws==0?ui:oi>0?ui.slice(ws):ui.slice(0,ui.length-ws),this;ws-=ui.length}else{let ui=ii.children[li+(oi<0?-1:0)];ws>ui.length?(ws-=ui.length,this.offsets[si]+=oi):(oi<0&&this.offsets[si]--,this.nodes.push(ui),this.offsets.push(oi>0?1:(ui instanceof TextLeaf?ui.text.length:ui.children.length)<<1))}}}next(ws=0){return ws<0&&(this.nextInner(-ws,-this.dir),ws=this.value.length),this.nextInner(ws,this.dir)}}class PartialTextCursor{constructor(ws,oi,si){this.value="",this.done=!1,this.cursor=new RawTextCursor(ws,oi>si?-1:1),this.pos=oi>si?ws.length:0,this.from=Math.min(oi,si),this.to=Math.max(oi,si)}nextInner(ws,oi){if(oi<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;ws+=Math.max(0,oi<0?this.pos-this.to:this.from-this.pos);let si=oi<0?this.pos-this.from:this.to-this.pos;ws>si&&(ws=si),si-=ws;let{value:ii}=this.cursor.next(ws);return this.pos+=(ii.length+ws)*oi,this.value=ii.length<=si?ii:oi<0?ii.slice(ii.length-si):ii.slice(0,si),this.done=!this.value,this}next(ws=0){return ws<0?ws=Math.max(ws,this.from-this.pos):ws>0&&(ws=Math.min(ws,this.to-this.pos)),this.nextInner(ws,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class LineCursor{constructor(ws){this.inner=ws,this.afterBreak=!0,this.value="",this.done=!1}next(ws=0){let{done:oi,lineBreak:si,value:ii}=this.inner.next(ws);return oi&&this.afterBreak?(this.value="",this.afterBreak=!1):oi?(this.done=!0,this.value=""):si?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=ii,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Text.prototype[Symbol.iterator]=function(){return this.iter()},RawTextCursor.prototype[Symbol.iterator]=PartialTextCursor.prototype[Symbol.iterator]=LineCursor.prototype[Symbol.iterator]=function(){return this});class Line{constructor(ws,oi,si,ii){this.from=ws,this.to=oi,this.number=si,this.text=ii}get length(){return this.to-this.from}}function clip(Ws,ws,oi){return ws=Math.max(0,Math.min(Ws.length,ws)),[ws,Math.max(ws,Math.min(Ws.length,oi))]}function findClusterBreak(Ws,ws,oi=!0,si=!0){return findClusterBreak$1(Ws,ws,oi,si)}function surrogateLow(Ws){return Ws>=56320&&Ws<57344}function surrogateHigh(Ws){return Ws>=55296&&Ws<56320}function codePointAt(Ws,ws){let oi=Ws.charCodeAt(ws);if(!surrogateHigh(oi)||ws+1==Ws.length)return oi;let si=Ws.charCodeAt(ws+1);return surrogateLow(si)?(oi-55296<<10)+(si-56320)+65536:oi}function fromCodePoint(Ws){return Ws<=65535?String.fromCharCode(Ws):(Ws-=65536,String.fromCharCode((Ws>>10)+55296,(Ws&1023)+56320))}function codePointSize(Ws){return Ws<65536?1:2}const DefaultSplit=/\r\n?|\n/;var MapMode=function(Ws){return Ws[Ws.Simple=0]="Simple",Ws[Ws.TrackDel=1]="TrackDel",Ws[Ws.TrackBefore=2]="TrackBefore",Ws[Ws.TrackAfter=3]="TrackAfter",Ws}(MapMode||(MapMode={}));class ChangeDesc{constructor(ws){this.sections=ws}get length(){let ws=0;for(let oi=0;oi<this.sections.length;oi+=2)ws+=this.sections[oi];return ws}get newLength(){let ws=0;for(let oi=0;oi<this.sections.length;oi+=2){let si=this.sections[oi+1];ws+=si<0?this.sections[oi]:si}return ws}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(ws){for(let oi=0,si=0,ii=0;oi<this.sections.length;){let ai=this.sections[oi++],li=this.sections[oi++];li<0?(ws(si,ii,ai),ii+=ai):ii+=li,si+=ai}}iterChangedRanges(ws,oi=!1){iterChanges(this,ws,oi)}get invertedDesc(){let ws=[];for(let oi=0;oi<this.sections.length;){let si=this.sections[oi++],ii=this.sections[oi++];ii<0?ws.push(si,ii):ws.push(ii,si)}return new ChangeDesc(ws)}composeDesc(ws){return this.empty?ws:ws.empty?this:composeSets(this,ws)}mapDesc(ws,oi=!1){return ws.empty?this:mapSet(this,ws,oi)}mapPos(ws,oi=-1,si=MapMode.Simple){let ii=0,ai=0;for(let li=0;li<this.sections.length;){let ci=this.sections[li++],ui=this.sections[li++],di=ii+ci;if(ui<0){if(di>ws)return ai+(ws-ii);ai+=ci}else{if(si!=MapMode.Simple&&di>=ws&&(si==MapMode.TrackDel&&ii<ws&&di>ws||si==MapMode.TrackBefore&&ii<ws||si==MapMode.TrackAfter&&di>ws))return null;if(di>ws||di==ws&&oi<0&&!ci)return ws==ii||oi<0?ai:ai+ui;ai+=ui}ii=di}if(ws>ii)throw new RangeError(`Position ${ws} is out of range for changeset of length ${ii}`);return ai}touchesRange(ws,oi=ws){for(let si=0,ii=0;si<this.sections.length&&ii<=oi;){let ai=this.sections[si++],li=this.sections[si++],ci=ii+ai;if(li>=0&&ii<=oi&&ci>=ws)return ii<ws&&ci>oi?"cover":!0;ii=ci}return!1}toString(){let ws="";for(let oi=0;oi<this.sections.length;){let si=this.sections[oi++],ii=this.sections[oi++];ws+=(ws?" ":"")+si+(ii>=0?":"+ii:"")}return ws}toJSON(){return this.sections}static fromJSON(ws){if(!Array.isArray(ws)||ws.length%2||ws.some(oi=>typeof oi!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ChangeDesc(ws)}static create(ws){return new ChangeDesc(ws)}}class ChangeSet extends ChangeDesc{constructor(ws,oi){super(ws),this.inserted=oi}apply(ws){if(this.length!=ws.length)throw new RangeError("Applying change set to a document with the wrong length");return iterChanges(this,(oi,si,ii,ai,li)=>ws=ws.replace(ii,ii+(si-oi),li),!1),ws}mapDesc(ws,oi=!1){return mapSet(this,ws,oi,!0)}invert(ws){let oi=this.sections.slice(),si=[];for(let ii=0,ai=0;ii<oi.length;ii+=2){let li=oi[ii],ci=oi[ii+1];if(ci>=0){oi[ii]=ci,oi[ii+1]=li;let ui=ii>>1;for(;si.length<ui;)si.push(Text.empty);si.push(li?ws.slice(ai,ai+li):Text.empty)}ai+=li}return new ChangeSet(oi,si)}compose(ws){return this.empty?ws:ws.empty?this:composeSets(this,ws,!0)}map(ws,oi=!1){return ws.empty?this:mapSet(this,ws,oi,!0)}iterChanges(ws,oi=!1){iterChanges(this,ws,oi)}get desc(){return ChangeDesc.create(this.sections)}filter(ws){let oi=[],si=[],ii=[],ai=new SectionIter(this);e:for(let li=0,ci=0;;){let ui=li==ws.length?1e9:ws[li++];for(;ci<ui||ci==ui&&ai.len==0;){if(ai.done)break e;let hi=Math.min(ai.len,ui-ci);addSection(ii,hi,-1);let pi=ai.ins==-1?-1:ai.off==0?ai.ins:0;addSection(oi,hi,pi),pi>0&&addInsert(si,oi,ai.text),ai.forward(hi),ci+=hi}let di=ws[li++];for(;ci<di;){if(ai.done)break e;let hi=Math.min(ai.len,di-ci);addSection(oi,hi,-1),addSection(ii,hi,ai.ins==-1?-1:ai.off==0?ai.ins:0),ai.forward(hi),ci+=hi}}return{changes:new ChangeSet(oi,si),filtered:ChangeDesc.create(ii)}}toJSON(){let ws=[];for(let oi=0;oi<this.sections.length;oi+=2){let si=this.sections[oi],ii=this.sections[oi+1];ii<0?ws.push(si):ii==0?ws.push([si]):ws.push([si].concat(this.inserted[oi>>1].toJSON()))}return ws}static of(ws,oi,si){let ii=[],ai=[],li=0,ci=null;function ui(hi=!1){if(!hi&&!ii.length)return;li<oi&&addSection(ii,oi-li,-1);let pi=new ChangeSet(ii,ai);ci=ci?ci.compose(pi.map(ci)):pi,ii=[],ai=[],li=0}function di(hi){if(Array.isArray(hi))for(let pi of hi)di(pi);else if(hi instanceof ChangeSet){if(hi.length!=oi)throw new RangeError(`Mismatched change set length (got ${hi.length}, expected ${oi})`);ui(),ci=ci?ci.compose(hi.map(ci)):hi}else{let{from:pi,to:ha=pi,insert:ga}=hi;if(pi>ha||pi<0||ha>oi)throw new RangeError(`Invalid change range ${pi} to ${ha} (in doc of length ${oi})`);let va=ga?typeof ga=="string"?Text.of(ga.split(si||DefaultSplit)):ga:Text.empty,ba=va.length;if(pi==ha&&ba==0)return;pi<li&&ui(),pi>li&&addSection(ii,pi-li,-1),addSection(ii,ha-pi,ba),addInsert(ai,ii,va),li=ha}}return di(ws),ui(!ci),ci}static empty(ws){return new ChangeSet(ws?[ws,-1]:[],[])}static fromJSON(ws){if(!Array.isArray(ws))throw new RangeError("Invalid JSON representation of ChangeSet");let oi=[],si=[];for(let ii=0;ii<ws.length;ii++){let ai=ws[ii];if(typeof ai=="number")oi.push(ai,-1);else{if(!Array.isArray(ai)||typeof ai[0]!="number"||ai.some((li,ci)=>ci&&typeof li!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(ai.length==1)oi.push(ai[0],0);else{for(;si.length<ii;)si.push(Text.empty);si[ii]=Text.of(ai.slice(1)),oi.push(ai[0],si[ii].length)}}}return new ChangeSet(oi,si)}static createSet(ws,oi){return new ChangeSet(ws,oi)}}function addSection(Ws,ws,oi,si=!1){if(ws==0&&oi<=0)return;let ii=Ws.length-2;ii>=0&&oi<=0&&oi==Ws[ii+1]?Ws[ii]+=ws:ii>=0&&ws==0&&Ws[ii]==0?Ws[ii+1]+=oi:si?(Ws[ii]+=ws,Ws[ii+1]+=oi):Ws.push(ws,oi)}function addInsert(Ws,ws,oi){if(oi.length==0)return;let si=ws.length-2>>1;if(si<Ws.length)Ws[Ws.length-1]=Ws[Ws.length-1].append(oi);else{for(;Ws.length<si;)Ws.push(Text.empty);Ws.push(oi)}}function iterChanges(Ws,ws,oi){let si=Ws.inserted;for(let ii=0,ai=0,li=0;li<Ws.sections.length;){let ci=Ws.sections[li++],ui=Ws.sections[li++];if(ui<0)ii+=ci,ai+=ci;else{let di=ii,hi=ai,pi=Text.empty;for(;di+=ci,hi+=ui,ui&&si&&(pi=pi.append(si[li-2>>1])),!(oi||li==Ws.sections.length||Ws.sections[li+1]<0);)ci=Ws.sections[li++],ui=Ws.sections[li++];ws(ii,di,ai,hi,pi),ii=di,ai=hi}}}function mapSet(Ws,ws,oi,si=!1){let ii=[],ai=si?[]:null,li=new SectionIter(Ws),ci=new SectionIter(ws);for(let ui=-1;;){if(li.done&&ci.len||ci.done&&li.len)throw new Error("Mismatched change set lengths");if(li.ins==-1&&ci.ins==-1){let di=Math.min(li.len,ci.len);addSection(ii,di,-1),li.forward(di),ci.forward(di)}else if(ci.ins>=0&&(li.ins<0||ui==li.i||li.off==0&&(ci.len<li.len||ci.len==li.len&&!oi))){let di=ci.len;for(addSection(ii,ci.ins,-1);di;){let hi=Math.min(li.len,di);li.ins>=0&&ui<li.i&&li.len<=hi&&(addSection(ii,0,li.ins),ai&&addInsert(ai,ii,li.text),ui=li.i),li.forward(hi),di-=hi}ci.next()}else if(li.ins>=0){let di=0,hi=li.len;for(;hi;)if(ci.ins==-1){let pi=Math.min(hi,ci.len);di+=pi,hi-=pi,ci.forward(pi)}else if(ci.ins==0&&ci.len<hi)hi-=ci.len,ci.next();else break;addSection(ii,di,ui<li.i?li.ins:0),ai&&ui<li.i&&addInsert(ai,ii,li.text),ui=li.i,li.forward(li.len-hi)}else{if(li.done&&ci.done)return ai?ChangeSet.createSet(ii,ai):ChangeDesc.create(ii);throw new Error("Mismatched change set lengths")}}}function composeSets(Ws,ws,oi=!1){let si=[],ii=oi?[]:null,ai=new SectionIter(Ws),li=new SectionIter(ws);for(let ci=!1;;){if(ai.done&&li.done)return ii?ChangeSet.createSet(si,ii):ChangeDesc.create(si);if(ai.ins==0)addSection(si,ai.len,0,ci),ai.next();else if(li.len==0&&!li.done)addSection(si,0,li.ins,ci),ii&&addInsert(ii,si,li.text),li.next();else{if(ai.done||li.done)throw new Error("Mismatched change set lengths");{let ui=Math.min(ai.len2,li.len),di=si.length;if(ai.ins==-1){let hi=li.ins==-1?-1:li.off?0:li.ins;addSection(si,ui,hi,ci),ii&&hi&&addInsert(ii,si,li.text)}else li.ins==-1?(addSection(si,ai.off?0:ai.len,ui,ci),ii&&addInsert(ii,si,ai.textBit(ui))):(addSection(si,ai.off?0:ai.len,li.off?0:li.ins,ci),ii&&!li.off&&addInsert(ii,si,li.text));ci=(ai.ins>ui||li.ins>=0&&li.len>ui)&&(ci||si.length>di),ai.forward2(ui),li.forward(ui)}}}}class SectionIter{constructor(ws){this.set=ws,this.i=0,this.next()}next(){let{sections:ws}=this.set;this.i<ws.length?(this.len=ws[this.i++],this.ins=ws[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:ws}=this.set,oi=this.i-2>>1;return oi>=ws.length?Text.empty:ws[oi]}textBit(ws){let{inserted:oi}=this.set,si=this.i-2>>1;return si>=oi.length&&!ws?Text.empty:oi[si].slice(this.off,ws==null?void 0:this.off+ws)}forward(ws){ws==this.len?this.next():(this.len-=ws,this.off+=ws)}forward2(ws){this.ins==-1?this.forward(ws):ws==this.ins?this.next():(this.ins-=ws,this.off+=ws)}}let SelectionRange$1=class Bf{constructor(ws,oi,si){this.from=ws,this.to=oi,this.flags=si}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let ws=this.flags&7;return ws==7?null:ws}get goalColumn(){let ws=this.flags>>6;return ws==16777215?void 0:ws}map(ws,oi=-1){let si,ii;return this.empty?si=ii=ws.mapPos(this.from,oi):(si=ws.mapPos(this.from,1),ii=ws.mapPos(this.to,-1)),si==this.from&&ii==this.to?this:new Bf(si,ii,this.flags)}extend(ws,oi=ws){if(ws<=this.anchor&&oi>=this.anchor)return EditorSelection.range(ws,oi);let si=Math.abs(ws-this.anchor)>Math.abs(oi-this.anchor)?ws:oi;return EditorSelection.range(this.anchor,si)}eq(ws,oi=!1){return this.anchor==ws.anchor&&this.head==ws.head&&(!oi||!this.empty||this.assoc==ws.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(ws){if(!ws||typeof ws.anchor!="number"||typeof ws.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return EditorSelection.range(ws.anchor,ws.head)}static create(ws,oi,si){return new Bf(ws,oi,si)}};class EditorSelection{constructor(ws,oi){this.ranges=ws,this.mainIndex=oi}map(ws,oi=-1){return ws.empty?this:EditorSelection.create(this.ranges.map(si=>si.map(ws,oi)),this.mainIndex)}eq(ws,oi=!1){if(this.ranges.length!=ws.ranges.length||this.mainIndex!=ws.mainIndex)return!1;for(let si=0;si<this.ranges.length;si++)if(!this.ranges[si].eq(ws.ranges[si],oi))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new EditorSelection([this.main],0)}addRange(ws,oi=!0){return EditorSelection.create([ws].concat(this.ranges),oi?0:this.mainIndex+1)}replaceRange(ws,oi=this.mainIndex){let si=this.ranges.slice();return si[oi]=ws,EditorSelection.create(si,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(ws=>ws.toJSON()),main:this.mainIndex}}static fromJSON(ws){if(!ws||!Array.isArray(ws.ranges)||typeof ws.main!="number"||ws.main>=ws.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new EditorSelection(ws.ranges.map(oi=>SelectionRange$1.fromJSON(oi)),ws.main)}static single(ws,oi=ws){return new EditorSelection([EditorSelection.range(ws,oi)],0)}static create(ws,oi=0){if(ws.length==0)throw new RangeError("A selection needs at least one range");for(let si=0,ii=0;ii<ws.length;ii++){let ai=ws[ii];if(ai.empty?ai.from<=si:ai.from<si)return EditorSelection.normalized(ws.slice(),oi);si=ai.to}return new EditorSelection(ws,oi)}static cursor(ws,oi=0,si,ii){return SelectionRange$1.create(ws,ws,(oi==0?0:oi<0?8:16)|(si==null?7:Math.min(6,si))|(ii??16777215)<<6)}static range(ws,oi,si,ii){let ai=(si??16777215)<<6|(ii==null?7:Math.min(6,ii));return oi<ws?SelectionRange$1.create(oi,ws,48|ai):SelectionRange$1.create(ws,oi,(oi>ws?8:0)|ai)}static normalized(ws,oi=0){let si=ws[oi];ws.sort((ii,ai)=>ii.from-ai.from),oi=ws.indexOf(si);for(let ii=1;ii<ws.length;ii++){let ai=ws[ii],li=ws[ii-1];if(ai.empty?ai.from<=li.to:ai.from<li.to){let ci=li.from,ui=Math.max(ai.to,li.to);ii<=oi&&oi--,ws.splice(--ii,2,ai.anchor>ai.head?EditorSelection.range(ui,ci):EditorSelection.range(ci,ui))}}return new EditorSelection(ws,oi)}}function checkSelection(Ws,ws){for(let oi of Ws.ranges)if(oi.to>ws)throw new RangeError("Selection points outside of document")}let nextID=0;class Facet{constructor(ws,oi,si,ii,ai){this.combine=ws,this.compareInput=oi,this.compare=si,this.isStatic=ii,this.id=nextID++,this.default=ws([]),this.extensions=typeof ai=="function"?ai(this):ai}get reader(){return this}static define(ws={}){return new Facet(ws.combine||(oi=>oi),ws.compareInput||((oi,si)=>oi===si),ws.compare||(ws.combine?(oi,si)=>oi===si:sameArray$1),!!ws.static,ws.enables)}of(ws){return new FacetProvider([],this,0,ws)}compute(ws,oi){if(this.isStatic)throw new Error("Can't compute a static facet");return new FacetProvider(ws,this,1,oi)}computeN(ws,oi){if(this.isStatic)throw new Error("Can't compute a static facet");return new FacetProvider(ws,this,2,oi)}from(ws,oi){return oi||(oi=si=>si),this.compute([ws],si=>oi(si.field(ws)))}}function sameArray$1(Ws,ws){return Ws==ws||Ws.length==ws.length&&Ws.every((oi,si)=>oi===ws[si])}class FacetProvider{constructor(ws,oi,si,ii){this.dependencies=ws,this.facet=oi,this.type=si,this.value=ii,this.id=nextID++}dynamicSlot(ws){var oi;let si=this.value,ii=this.facet.compareInput,ai=this.id,li=ws[ai]>>1,ci=this.type==2,ui=!1,di=!1,hi=[];for(let pi of this.dependencies)pi=="doc"?ui=!0:pi=="selection"?di=!0:((oi=ws[pi.id])!==null&&oi!==void 0?oi:1)&1||hi.push(ws[pi.id]);return{create(pi){return pi.values[li]=si(pi),1},update(pi,ha){if(ui&&ha.docChanged||di&&(ha.docChanged||ha.selection)||ensureAll(pi,hi)){let ga=si(pi);if(ci?!compareArray(ga,pi.values[li],ii):!ii(ga,pi.values[li]))return pi.values[li]=ga,1}return 0},reconfigure:(pi,ha)=>{let ga,va=ha.config.address[ai];if(va!=null){let ba=getAddr(ha,va);if(this.dependencies.every(wa=>wa instanceof Facet?ha.facet(wa)===pi.facet(wa):wa instanceof StateField?ha.field(wa,!1)==pi.field(wa,!1):!0)||(ci?compareArray(ga=si(pi),ba,ii):ii(ga=si(pi),ba)))return pi.values[li]=ba,0}else ga=si(pi);return pi.values[li]=ga,1}}}}function compareArray(Ws,ws,oi){if(Ws.length!=ws.length)return!1;for(let si=0;si<Ws.length;si++)if(!oi(Ws[si],ws[si]))return!1;return!0}function ensureAll(Ws,ws){let oi=!1;for(let si of ws)ensureAddr(Ws,si)&1&&(oi=!0);return oi}function dynamicFacetSlot(Ws,ws,oi){let si=oi.map(ui=>Ws[ui.id]),ii=oi.map(ui=>ui.type),ai=si.filter(ui=>!(ui&1)),li=Ws[ws.id]>>1;function ci(ui){let di=[];for(let hi=0;hi<si.length;hi++){let pi=getAddr(ui,si[hi]);if(ii[hi]==2)for(let ha of pi)di.push(ha);else di.push(pi)}return ws.combine(di)}return{create(ui){for(let di of si)ensureAddr(ui,di);return ui.values[li]=ci(ui),1},update(ui,di){if(!ensureAll(ui,ai))return 0;let hi=ci(ui);return ws.compare(hi,ui.values[li])?0:(ui.values[li]=hi,1)},reconfigure(ui,di){let hi=ensureAll(ui,si),pi=di.config.facets[ws.id],ha=di.facet(ws);if(pi&&!hi&&sameArray$1(oi,pi))return ui.values[li]=ha,0;let ga=ci(ui);return ws.compare(ga,ha)?(ui.values[li]=ha,0):(ui.values[li]=ga,1)}}}const initField=Facet.define({static:!0});class StateField{constructor(ws,oi,si,ii,ai){this.id=ws,this.createF=oi,this.updateF=si,this.compareF=ii,this.spec=ai,this.provides=void 0}static define(ws){let oi=new StateField(nextID++,ws.create,ws.update,ws.compare||((si,ii)=>si===ii),ws);return ws.provide&&(oi.provides=ws.provide(oi)),oi}create(ws){let oi=ws.facet(initField).find(si=>si.field==this);return((oi==null?void 0:oi.create)||this.createF)(ws)}slot(ws){let oi=ws[this.id]>>1;return{create:si=>(si.values[oi]=this.create(si),1),update:(si,ii)=>{let ai=si.values[oi],li=this.updateF(ai,ii);return this.compareF(ai,li)?0:(si.values[oi]=li,1)},reconfigure:(si,ii)=>ii.config.address[this.id]!=null?(si.values[oi]=ii.field(this),0):(si.values[oi]=this.create(si),1)}}init(ws){return[this,initField.of({field:this,create:ws})]}get extension(){return this}}const Prec_={lowest:4,low:3,default:2,high:1,highest:0};function prec(Ws){return ws=>new PrecExtension(ws,Ws)}const Prec={highest:prec(Prec_.highest),high:prec(Prec_.high),default:prec(Prec_.default),low:prec(Prec_.low),lowest:prec(Prec_.lowest)};class PrecExtension{constructor(ws,oi){this.inner=ws,this.prec=oi}}class Compartment{of(ws){return new CompartmentInstance(this,ws)}reconfigure(ws){return Compartment.reconfigure.of({compartment:this,extension:ws})}get(ws){return ws.config.compartments.get(this)}}class CompartmentInstance{constructor(ws,oi){this.compartment=ws,this.inner=oi}}class Configuration{constructor(ws,oi,si,ii,ai,li){for(this.base=ws,this.compartments=oi,this.dynamicSlots=si,this.address=ii,this.staticValues=ai,this.facets=li,this.statusTemplate=[];this.statusTemplate.length<si.length;)this.statusTemplate.push(0)}staticFacet(ws){let oi=this.address[ws.id];return oi==null?ws.default:this.staticValues[oi>>1]}static resolve(ws,oi,si){let ii=[],ai=Object.create(null),li=new Map;for(let ha of flatten(ws,oi,li))ha instanceof StateField?ii.push(ha):(ai[ha.facet.id]||(ai[ha.facet.id]=[])).push(ha);let ci=Object.create(null),ui=[],di=[];for(let ha of ii)ci[ha.id]=di.length<<1,di.push(ga=>ha.slot(ga));let hi=si==null?void 0:si.config.facets;for(let ha in ai){let ga=ai[ha],va=ga[0].facet,ba=hi&&hi[ha]||[];if(ga.every(wa=>wa.type==0))if(ci[va.id]=ui.length<<1|1,sameArray$1(ba,ga))ui.push(si.facet(va));else{let wa=va.combine(ga.map(xa=>xa.value));ui.push(si&&va.compare(wa,si.facet(va))?si.facet(va):wa)}else{for(let wa of ga)wa.type==0?(ci[wa.id]=ui.length<<1|1,ui.push(wa.value)):(ci[wa.id]=di.length<<1,di.push(xa=>wa.dynamicSlot(xa)));ci[va.id]=di.length<<1,di.push(wa=>dynamicFacetSlot(wa,va,ga))}}let pi=di.map(ha=>ha(ci));return new Configuration(ws,li,pi,ci,ui,ai)}}function flatten(Ws,ws,oi){let si=[[],[],[],[],[]],ii=new Map;function ai(li,ci){let ui=ii.get(li);if(ui!=null){if(ui<=ci)return;let di=si[ui].indexOf(li);di>-1&&si[ui].splice(di,1),li instanceof CompartmentInstance&&oi.delete(li.compartment)}if(ii.set(li,ci),Array.isArray(li))for(let di of li)ai(di,ci);else if(li instanceof CompartmentInstance){if(oi.has(li.compartment))throw new RangeError("Duplicate use of compartment in extensions");let di=ws.get(li.compartment)||li.inner;oi.set(li.compartment,di),ai(di,ci)}else if(li instanceof PrecExtension)ai(li.inner,li.prec);else if(li instanceof StateField)si[ci].push(li),li.provides&&ai(li.provides,ci);else if(li instanceof FacetProvider)si[ci].push(li),li.facet.extensions&&ai(li.facet.extensions,Prec_.default);else{let di=li.extension;if(!di)throw new Error(`Unrecognized extension value in extension set (${li}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);ai(di,ci)}}return ai(Ws,Prec_.default),si.reduce((li,ci)=>li.concat(ci))}function ensureAddr(Ws,ws){if(ws&1)return 2;let oi=ws>>1,si=Ws.status[oi];if(si==4)throw new Error("Cyclic dependency between fields and/or facets");if(si&2)return si;Ws.status[oi]=4;let ii=Ws.computeSlot(Ws,Ws.config.dynamicSlots[oi]);return Ws.status[oi]=2|ii}function getAddr(Ws,ws){return ws&1?Ws.config.staticValues[ws>>1]:Ws.values[ws>>1]}const languageData=Facet.define(),allowMultipleSelections=Facet.define({combine:Ws=>Ws.some(ws=>ws),static:!0}),lineSeparator=Facet.define({combine:Ws=>Ws.length?Ws[0]:void 0,static:!0}),changeFilter=Facet.define(),transactionFilter=Facet.define(),transactionExtender=Facet.define(),readOnly=Facet.define({combine:Ws=>Ws.length?Ws[0]:!1});class Annotation{constructor(ws,oi){this.type=ws,this.value=oi}static define(){return new AnnotationType}}class AnnotationType{of(ws){return new Annotation(this,ws)}}class StateEffectType{constructor(ws){this.map=ws}of(ws){return new StateEffect(this,ws)}}class StateEffect{constructor(ws,oi){this.type=ws,this.value=oi}map(ws){let oi=this.type.map(this.value,ws);return oi===void 0?void 0:oi==this.value?this:new StateEffect(this.type,oi)}is(ws){return this.type==ws}static define(ws={}){return new StateEffectType(ws.map||(oi=>oi))}static mapEffects(ws,oi){if(!ws.length)return ws;let si=[];for(let ii of ws){let ai=ii.map(oi);ai&&si.push(ai)}return si}}StateEffect.reconfigure=StateEffect.define();StateEffect.appendConfig=StateEffect.define();class Transaction{constructor(ws,oi,si,ii,ai,li){this.startState=ws,this.changes=oi,this.selection=si,this.effects=ii,this.annotations=ai,this.scrollIntoView=li,this._doc=null,this._state=null,si&&checkSelection(si,oi.newLength),ai.some(ci=>ci.type==Transaction.time)||(this.annotations=ai.concat(Transaction.time.of(Date.now())))}static create(ws,oi,si,ii,ai,li){return new Transaction(ws,oi,si,ii,ai,li)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(ws){for(let oi of this.annotations)if(oi.type==ws)return oi.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(ws){let oi=this.annotation(Transaction.userEvent);return!!(oi&&(oi==ws||oi.length>ws.length&&oi.slice(0,ws.length)==ws&&oi[ws.length]=="."))}}Transaction.time=Annotation.define();Transaction.userEvent=Annotation.define();Transaction.addToHistory=Annotation.define();Transaction.remote=Annotation.define();function joinRanges(Ws,ws){let oi=[];for(let si=0,ii=0;;){let ai,li;if(si<Ws.length&&(ii==ws.length||ws[ii]>=Ws[si]))ai=Ws[si++],li=Ws[si++];else if(ii<ws.length)ai=ws[ii++],li=ws[ii++];else return oi;!oi.length||oi[oi.length-1]<ai?oi.push(ai,li):oi[oi.length-1]<li&&(oi[oi.length-1]=li)}}function mergeTransaction(Ws,ws,oi){var si;let ii,ai,li;return oi?(ii=ws.changes,ai=ChangeSet.empty(ws.changes.length),li=Ws.changes.compose(ws.changes)):(ii=ws.changes.map(Ws.changes),ai=Ws.changes.mapDesc(ws.changes,!0),li=Ws.changes.compose(ii)),{changes:li,selection:ws.selection?ws.selection.map(ai):(si=Ws.selection)===null||si===void 0?void 0:si.map(ii),effects:StateEffect.mapEffects(Ws.effects,ii).concat(StateEffect.mapEffects(ws.effects,ai)),annotations:Ws.annotations.length?Ws.annotations.concat(ws.annotations):ws.annotations,scrollIntoView:Ws.scrollIntoView||ws.scrollIntoView}}function resolveTransactionInner(Ws,ws,oi){let si=ws.selection,ii=asArray$2(ws.annotations);return ws.userEvent&&(ii=ii.concat(Transaction.userEvent.of(ws.userEvent))),{changes:ws.changes instanceof ChangeSet?ws.changes:ChangeSet.of(ws.changes||[],oi,Ws.facet(lineSeparator)),selection:si&&(si instanceof EditorSelection?si:EditorSelection.single(si.anchor,si.head)),effects:asArray$2(ws.effects),annotations:ii,scrollIntoView:!!ws.scrollIntoView}}function resolveTransaction(Ws,ws,oi){let si=resolveTransactionInner(Ws,ws.length?ws[0]:{},Ws.doc.length);ws.length&&ws[0].filter===!1&&(oi=!1);for(let ai=1;ai<ws.length;ai++){ws[ai].filter===!1&&(oi=!1);let li=!!ws[ai].sequential;si=mergeTransaction(si,resolveTransactionInner(Ws,ws[ai],li?si.changes.newLength:Ws.doc.length),li)}let ii=Transaction.create(Ws,si.changes,si.selection,si.effects,si.annotations,si.scrollIntoView);return extendTransaction(oi?filterTransaction(ii):ii)}function filterTransaction(Ws){let ws=Ws.startState,oi=!0;for(let ii of ws.facet(changeFilter)){let ai=ii(Ws);if(ai===!1){oi=!1;break}Array.isArray(ai)&&(oi=oi===!0?ai:joinRanges(oi,ai))}if(oi!==!0){let ii,ai;if(oi===!1)ai=Ws.changes.invertedDesc,ii=ChangeSet.empty(ws.doc.length);else{let li=Ws.changes.filter(oi);ii=li.changes,ai=li.filtered.mapDesc(li.changes).invertedDesc}Ws=Transaction.create(ws,ii,Ws.selection&&Ws.selection.map(ai),StateEffect.mapEffects(Ws.effects,ai),Ws.annotations,Ws.scrollIntoView)}let si=ws.facet(transactionFilter);for(let ii=si.length-1;ii>=0;ii--){let ai=si[ii](Ws);ai instanceof Transaction?Ws=ai:Array.isArray(ai)&&ai.length==1&&ai[0]instanceof Transaction?Ws=ai[0]:Ws=resolveTransaction(ws,asArray$2(ai),!1)}return Ws}function extendTransaction(Ws){let ws=Ws.startState,oi=ws.facet(transactionExtender),si=Ws;for(let ii=oi.length-1;ii>=0;ii--){let ai=oi[ii](Ws);ai&&Object.keys(ai).length&&(si=mergeTransaction(si,resolveTransactionInner(ws,ai,Ws.changes.newLength),!0))}return si==Ws?Ws:Transaction.create(ws,Ws.changes,Ws.selection,si.effects,si.annotations,si.scrollIntoView)}const none$2=[];function asArray$2(Ws){return Ws==null?none$2:Array.isArray(Ws)?Ws:[Ws]}var CharCategory=function(Ws){return Ws[Ws.Word=0]="Word",Ws[Ws.Space=1]="Space",Ws[Ws.Other=2]="Other",Ws}(CharCategory||(CharCategory={}));const nonASCIISingleCaseWordChar=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let wordChar;try{wordChar=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(Ws){}function hasWordChar(Ws){if(wordChar)return wordChar.test(Ws);for(let ws=0;ws<Ws.length;ws++){let oi=Ws[ws];if(/\w/.test(oi)||oi>""&&(oi.toUpperCase()!=oi.toLowerCase()||nonASCIISingleCaseWordChar.test(oi)))return!0}return!1}function makeCategorizer(Ws){return ws=>{if(!/\S/.test(ws))return CharCategory.Space;if(hasWordChar(ws))return CharCategory.Word;for(let oi=0;oi<Ws.length;oi++)if(ws.indexOf(Ws[oi])>-1)return CharCategory.Word;return CharCategory.Other}}class EditorState{constructor(ws,oi,si,ii,ai,li){this.config=ws,this.doc=oi,this.selection=si,this.values=ii,this.status=ws.statusTemplate.slice(),this.computeSlot=ai,li&&(li._state=this);for(let ci=0;ci<this.config.dynamicSlots.length;ci++)ensureAddr(this,ci<<1);this.computeSlot=null}field(ws,oi=!0){let si=this.config.address[ws.id];if(si==null){if(oi)throw new RangeError("Field is not present in this state");return}return ensureAddr(this,si),getAddr(this,si)}update(...ws){return resolveTransaction(this,ws,!0)}applyTransaction(ws){let oi=this.config,{base:si,compartments:ii}=oi;for(let ci of ws.effects)ci.is(Compartment.reconfigure)?(oi&&(ii=new Map,oi.compartments.forEach((ui,di)=>ii.set(di,ui)),oi=null),ii.set(ci.value.compartment,ci.value.extension)):ci.is(StateEffect.reconfigure)?(oi=null,si=ci.value):ci.is(StateEffect.appendConfig)&&(oi=null,si=asArray$2(si).concat(ci.value));let ai;oi?ai=ws.startState.values.slice():(oi=Configuration.resolve(si,ii,this),ai=new EditorState(oi,this.doc,this.selection,oi.dynamicSlots.map(()=>null),(ci,ui)=>ui.reconfigure(ci,this),null).values);let li=ws.startState.facet(allowMultipleSelections)?ws.newSelection:ws.newSelection.asSingle();new EditorState(oi,ws.newDoc,li,ai,(ci,ui)=>ui.update(ci,ws),ws)}replaceSelection(ws){return typeof ws=="string"&&(ws=this.toText(ws)),this.changeByRange(oi=>({changes:{from:oi.from,to:oi.to,insert:ws},range:EditorSelection.cursor(oi.from+ws.length)}))}changeByRange(ws){let oi=this.selection,si=ws(oi.ranges[0]),ii=this.changes(si.changes),ai=[si.range],li=asArray$2(si.effects);for(let ci=1;ci<oi.ranges.length;ci++){let ui=ws(oi.ranges[ci]),di=this.changes(ui.changes),hi=di.map(ii);for(let ha=0;ha<ci;ha++)ai[ha]=ai[ha].map(hi);let pi=ii.mapDesc(di,!0);ai.push(ui.range.map(pi)),ii=ii.compose(hi),li=StateEffect.mapEffects(li,hi).concat(StateEffect.mapEffects(asArray$2(ui.effects),pi))}return{changes:ii,selection:EditorSelection.create(ai,oi.mainIndex),effects:li}}changes(ws=[]){return ws instanceof ChangeSet?ws:ChangeSet.of(ws,this.doc.length,this.facet(EditorState.lineSeparator))}toText(ws){return Text.of(ws.split(this.facet(EditorState.lineSeparator)||DefaultSplit))}sliceDoc(ws=0,oi=this.doc.length){return this.doc.sliceString(ws,oi,this.lineBreak)}facet(ws){let oi=this.config.address[ws.id];return oi==null?ws.default:(ensureAddr(this,oi),getAddr(this,oi))}toJSON(ws){let oi={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(ws)for(let si in ws){let ii=ws[si];ii instanceof StateField&&this.config.address[ii.id]!=null&&(oi[si]=ii.spec.toJSON(this.field(ws[si]),this))}return oi}static fromJSON(ws,oi={},si){if(!ws||typeof ws.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let ii=[];if(si){for(let ai in si)if(Object.prototype.hasOwnProperty.call(ws,ai)){let li=si[ai],ci=ws[ai];ii.push(li.init(ui=>li.spec.fromJSON(ci,ui)))}}return EditorState.create({doc:ws.doc,selection:EditorSelection.fromJSON(ws.selection),extensions:oi.extensions?ii.concat([oi.extensions]):ii})}static create(ws={}){let oi=Configuration.resolve(ws.extensions||[],new Map),si=ws.doc instanceof Text?ws.doc:Text.of((ws.doc||"").split(oi.staticFacet(EditorState.lineSeparator)||DefaultSplit)),ii=ws.selection?ws.selection instanceof EditorSelection?ws.selection:EditorSelection.single(ws.selection.anchor,ws.selection.head):EditorSelection.single(0);return checkSelection(ii,si.length),oi.staticFacet(allowMultipleSelections)||(ii=ii.asSingle()),new EditorState(oi,si,ii,oi.dynamicSlots.map(()=>null),(ai,li)=>li.create(ai),null)}get tabSize(){return this.facet(EditorState.tabSize)}get lineBreak(){return this.facet(EditorState.lineSeparator)||`
|
|
@@ -318,8 +318,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
318
318
|
`;this.styleTag.textContent=li;let ci=oi.head||oi;this.styleTag.parentNode!=ci&&ci.insertBefore(this.styleTag,ci.firstChild)}}setNonce(ws){this.styleTag&&this.styleTag.getAttribute("nonce")!=ws&&this.styleTag.setAttribute("nonce",ws)}}var base={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shift={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},mac=typeof navigator<"u"&&/Mac/.test(navigator.platform),ie$1=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var i=0;i<10;i++)base[48+i]=base[96+i]=String(i);for(var i=1;i<=24;i++)base[i+111]="F"+i;for(var i=65;i<=90;i++)base[i]=String.fromCharCode(i+32),shift[i]=String.fromCharCode(i);for(var code in base)shift.hasOwnProperty(code)||(shift[code]=base[code]);function keyName(Ws){var ws=mac&&Ws.metaKey&&Ws.shiftKey&&!Ws.ctrlKey&&!Ws.altKey||ie$1&&Ws.shiftKey&&Ws.key&&Ws.key.length==1||Ws.key=="Unidentified",oi=!ws&&Ws.key||(Ws.shiftKey?shift:base)[Ws.keyCode]||Ws.key||"Unidentified";return oi=="Esc"&&(oi="Escape"),oi=="Del"&&(oi="Delete"),oi=="Left"&&(oi="ArrowLeft"),oi=="Up"&&(oi="ArrowUp"),oi=="Right"&&(oi="ArrowRight"),oi=="Down"&&(oi="ArrowDown"),oi}function getSelection(Ws){let ws;return Ws.nodeType==11?ws=Ws.getSelection?Ws:Ws.ownerDocument:ws=Ws,ws.getSelection()}function contains(Ws,ws){return ws?Ws==ws||Ws.contains(ws.nodeType!=1?ws.parentNode:ws):!1}function hasSelection(Ws,ws){if(!ws.anchorNode)return!1;try{return contains(Ws,ws.anchorNode)}catch{return!1}}function clientRectsFor(Ws){return Ws.nodeType==3?textRange(Ws,0,Ws.nodeValue.length).getClientRects():Ws.nodeType==1?Ws.getClientRects():[]}function isEquivalentPosition(Ws,ws,oi,si){return oi?scanFor(Ws,ws,oi,si,-1)||scanFor(Ws,ws,oi,si,1):!1}function domIndex(Ws){for(var ws=0;;ws++)if(Ws=Ws.previousSibling,!Ws)return ws}function isBlockElement(Ws){return Ws.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(Ws.nodeName)}function scanFor(Ws,ws,oi,si,ii){for(;;){if(Ws==oi&&ws==si)return!0;if(ws==(ii<0?0:maxOffset(Ws))){if(Ws.nodeName=="DIV")return!1;let ai=Ws.parentNode;if(!ai||ai.nodeType!=1)return!1;ws=domIndex(Ws)+(ii<0?0:1),Ws=ai}else if(Ws.nodeType==1){if(Ws=Ws.childNodes[ws+(ii<0?-1:0)],Ws.nodeType==1&&Ws.contentEditable=="false")return!1;ws=ii<0?maxOffset(Ws):0}else return!1}}function maxOffset(Ws){return Ws.nodeType==3?Ws.nodeValue.length:Ws.childNodes.length}function flattenRect(Ws,ws){let oi=ws?Ws.left:Ws.right;return{left:oi,right:oi,top:Ws.top,bottom:Ws.bottom}}function windowRect(Ws){let ws=Ws.visualViewport;return ws?{left:0,right:ws.width,top:0,bottom:ws.height}:{left:0,right:Ws.innerWidth,top:0,bottom:Ws.innerHeight}}function getScale(Ws,ws){let oi=ws.width/Ws.offsetWidth,si=ws.height/Ws.offsetHeight;return(oi>.995&&oi<1.005||!isFinite(oi)||Math.abs(ws.width-Ws.offsetWidth)<1)&&(oi=1),(si>.995&&si<1.005||!isFinite(si)||Math.abs(ws.height-Ws.offsetHeight)<1)&&(si=1),{scaleX:oi,scaleY:si}}function scrollRectIntoView(Ws,ws,oi,si,ii,ai,li,ci){let ui=Ws.ownerDocument,di=ui.defaultView||window;for(let hi=Ws,pi=!1;hi&&!pi;)if(hi.nodeType==1){let ha,ga=hi==ui.body,va=1,ba=1;if(ga)ha=windowRect(di);else{if(/^(fixed|sticky)$/.test(getComputedStyle(hi).position)&&(pi=!0),hi.scrollHeight<=hi.clientHeight&&hi.scrollWidth<=hi.clientWidth){hi=hi.assignedSlot||hi.parentNode;continue}let Ca=hi.getBoundingClientRect();({scaleX:va,scaleY:ba}=getScale(hi,Ca)),ha={left:Ca.left,right:Ca.left+hi.clientWidth*va,top:Ca.top,bottom:Ca.top+hi.clientHeight*ba}}let wa=0,xa=0;if(ii=="nearest")ws.top<ha.top?(xa=-(ha.top-ws.top+li),oi>0&&ws.bottom>ha.bottom+xa&&(xa=ws.bottom-ha.bottom+xa+li)):ws.bottom>ha.bottom&&(xa=ws.bottom-ha.bottom+li,oi<0&&ws.top-xa<ha.top&&(xa=-(ha.top+xa-ws.top+li)));else{let Ca=ws.bottom-ws.top,el=ha.bottom-ha.top;xa=(ii=="center"&&Ca<=el?ws.top+Ca/2-el/2:ii=="start"||ii=="center"&&oi<0?ws.top-li:ws.bottom-el+li)-ha.top}if(si=="nearest"?ws.left<ha.left?(wa=-(ha.left-ws.left+ai),oi>0&&ws.right>ha.right+wa&&(wa=ws.right-ha.right+wa+ai)):ws.right>ha.right&&(wa=ws.right-ha.right+ai,oi<0&&ws.left<ha.left+wa&&(wa=-(ha.left+wa-ws.left+ai))):wa=(si=="center"?ws.left+(ws.right-ws.left)/2-(ha.right-ha.left)/2:si=="start"==ci?ws.left-ai:ws.right-(ha.right-ha.left)+ai)-ha.left,wa||xa)if(ga)di.scrollBy(wa,xa);else{let Ca=0,el=0;if(xa){let ku=hi.scrollTop;hi.scrollTop+=xa/ba,el=(hi.scrollTop-ku)*ba}if(wa){let ku=hi.scrollLeft;hi.scrollLeft+=wa/va,Ca=(hi.scrollLeft-ku)*va}ws={left:ws.left-Ca,top:ws.top-el,right:ws.right-Ca,bottom:ws.bottom-el},Ca&&Math.abs(Ca-wa)<1&&(si="nearest"),el&&Math.abs(el-xa)<1&&(ii="nearest")}if(ga)break;hi=hi.assignedSlot||hi.parentNode}else if(hi.nodeType==11)hi=hi.host;else break}function scrollableParents(Ws){let ws=Ws.ownerDocument,oi,si;for(let ii=Ws.parentNode;ii&&!(ii==ws.body||oi&&si);)if(ii.nodeType==1)!si&&ii.scrollHeight>ii.clientHeight&&(si=ii),!oi&&ii.scrollWidth>ii.clientWidth&&(oi=ii),ii=ii.assignedSlot||ii.parentNode;else if(ii.nodeType==11)ii=ii.host;else break;return{x:oi,y:si}}class DOMSelectionState{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(ws){return this.anchorNode==ws.anchorNode&&this.anchorOffset==ws.anchorOffset&&this.focusNode==ws.focusNode&&this.focusOffset==ws.focusOffset}setRange(ws){let{anchorNode:oi,focusNode:si}=ws;this.set(oi,Math.min(ws.anchorOffset,oi?maxOffset(oi):0),si,Math.min(ws.focusOffset,si?maxOffset(si):0))}set(ws,oi,si,ii){this.anchorNode=ws,this.anchorOffset=oi,this.focusNode=si,this.focusOffset=ii}}let preventScrollSupported=null;function focusPreventScroll(Ws){if(Ws.setActive)return Ws.setActive();if(preventScrollSupported)return Ws.focus(preventScrollSupported);let ws=[];for(let oi=Ws;oi&&(ws.push(oi,oi.scrollTop,oi.scrollLeft),oi!=oi.ownerDocument);oi=oi.parentNode);if(Ws.focus(preventScrollSupported==null?{get preventScroll(){return preventScrollSupported={preventScroll:!0},!0}}:void 0),!preventScrollSupported){preventScrollSupported=!1;for(let oi=0;oi<ws.length;){let si=ws[oi++],ii=ws[oi++],ai=ws[oi++];si.scrollTop!=ii&&(si.scrollTop=ii),si.scrollLeft!=ai&&(si.scrollLeft=ai)}}}let scratchRange;function textRange(Ws,ws,oi=ws){let si=scratchRange||(scratchRange=document.createRange());return si.setEnd(Ws,oi),si.setStart(Ws,ws),si}function dispatchKey(Ws,ws,oi,si){let ii={key:ws,code:ws,keyCode:oi,which:oi,cancelable:!0};si&&({altKey:ii.altKey,ctrlKey:ii.ctrlKey,shiftKey:ii.shiftKey,metaKey:ii.metaKey}=si);let ai=new KeyboardEvent("keydown",ii);ai.synthetic=!0,Ws.dispatchEvent(ai);let li=new KeyboardEvent("keyup",ii);return li.synthetic=!0,Ws.dispatchEvent(li),ai.defaultPrevented||li.defaultPrevented}function getRoot(Ws){for(;Ws;){if(Ws&&(Ws.nodeType==9||Ws.nodeType==11&&Ws.host))return Ws;Ws=Ws.assignedSlot||Ws.parentNode}return null}function clearAttributes(Ws){for(;Ws.attributes.length;)Ws.removeAttributeNode(Ws.attributes[0])}function atElementStart(Ws,ws){let oi=ws.focusNode,si=ws.focusOffset;if(!oi||ws.anchorNode!=oi||ws.anchorOffset!=si)return!1;for(si=Math.min(si,maxOffset(oi));;)if(si){if(oi.nodeType!=1)return!1;let ii=oi.childNodes[si-1];ii.contentEditable=="false"?si--:(oi=ii,si=maxOffset(oi))}else{if(oi==Ws)return!0;si=domIndex(oi),oi=oi.parentNode}}function isScrolledToBottom(Ws){return Ws.scrollTop>Math.max(1,Ws.scrollHeight-Ws.clientHeight-4)}function textNodeBefore(Ws,ws){for(let oi=Ws,si=ws;;){if(oi.nodeType==3&&si>0)return{node:oi,offset:si};if(oi.nodeType==1&&si>0){if(oi.contentEditable=="false")return null;oi=oi.childNodes[si-1],si=maxOffset(oi)}else if(oi.parentNode&&!isBlockElement(oi))si=domIndex(oi),oi=oi.parentNode;else return null}}function textNodeAfter(Ws,ws){for(let oi=Ws,si=ws;;){if(oi.nodeType==3&&si<oi.nodeValue.length)return{node:oi,offset:si};if(oi.nodeType==1&&si<oi.childNodes.length){if(oi.contentEditable=="false")return null;oi=oi.childNodes[si],si=0}else if(oi.parentNode&&!isBlockElement(oi))si=domIndex(oi)+1,oi=oi.parentNode;else return null}}class DOMPos{constructor(ws,oi,si=!0){this.node=ws,this.offset=oi,this.precise=si}static before(ws,oi){return new DOMPos(ws.parentNode,domIndex(ws),oi)}static after(ws,oi){return new DOMPos(ws.parentNode,domIndex(ws)+1,oi)}}const noChildren=[];class ContentView{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(ws){let oi=this.posAtStart;for(let si of this.children){if(si==ws)return oi;oi+=si.length+si.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(ws){return this.posBefore(ws)+ws.length}sync(ws,oi){if(this.flags&2){let si=this.dom,ii=null,ai;for(let li of this.children){if(li.flags&7){if(!li.dom&&(ai=ii?ii.nextSibling:si.firstChild)){let ci=ContentView.get(ai);(!ci||!ci.parent&&ci.canReuseDOM(li))&&li.reuseDOM(ai)}li.sync(ws,oi),li.flags&=-8}if(ai=ii?ii.nextSibling:si.firstChild,oi&&!oi.written&&oi.node==si&&ai!=li.dom&&(oi.written=!0),li.dom.parentNode==si)for(;ai&&ai!=li.dom;)ai=rm$1(ai);else si.insertBefore(li.dom,ai);ii=li.dom}for(ai=ii?ii.nextSibling:si.firstChild,ai&&oi&&oi.node==si&&(oi.written=!0);ai;)ai=rm$1(ai)}else if(this.flags&1)for(let si of this.children)si.flags&7&&(si.sync(ws,oi),si.flags&=-8)}reuseDOM(ws){}localPosFromDOM(ws,oi){let si;if(ws==this.dom)si=this.dom.childNodes[oi];else{let ii=maxOffset(ws)==0?0:oi==0?-1:1;for(;;){let ai=ws.parentNode;if(ai==this.dom)break;ii==0&&ai.firstChild!=ai.lastChild&&(ws==ai.firstChild?ii=-1:ii=1),ws=ai}ii<0?si=ws:si=ws.nextSibling}if(si==this.dom.firstChild)return 0;for(;si&&!ContentView.get(si);)si=si.nextSibling;if(!si)return this.length;for(let ii=0,ai=0;;ii++){let li=this.children[ii];if(li.dom==si)return ai;ai+=li.length+li.breakAfter}}domBoundsAround(ws,oi,si=0){let ii=-1,ai=-1,li=-1,ci=-1;for(let ui=0,di=si,hi=si;ui<this.children.length;ui++){let pi=this.children[ui],ha=di+pi.length;if(di<ws&&ha>oi)return pi.domBoundsAround(ws,oi,di);if(ha>=ws&&ii==-1&&(ii=ui,ai=di),di>oi&&pi.dom.parentNode==this.dom){li=ui,ci=hi;break}hi=ha,di=ha+pi.breakAfter}return{from:ai,to:ci<0?si+this.length:ci,startDOM:(ii?this.children[ii-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:li<this.children.length&&li>=0?this.children[li].dom:null}}markDirty(ws=!1){this.flags|=2,this.markParentsDirty(ws)}markParentsDirty(ws){for(let oi=this.parent;oi;oi=oi.parent){if(ws&&(oi.flags|=2),oi.flags&1)return;oi.flags|=1,ws=!1}}setParent(ws){this.parent!=ws&&(this.parent=ws,this.flags&7&&this.markParentsDirty(!0))}setDOM(ws){this.dom!=ws&&(this.dom&&(this.dom.cmView=null),this.dom=ws,ws.cmView=this)}get rootView(){for(let ws=this;;){let oi=ws.parent;if(!oi)return ws;ws=oi}}replaceChildren(ws,oi,si=noChildren){this.markDirty();for(let ii=ws;ii<oi;ii++){let ai=this.children[ii];ai.parent==this&&si.indexOf(ai)<0&&ai.destroy()}si.length<250?this.children.splice(ws,oi-ws,...si):this.children=[].concat(this.children.slice(0,ws),si,this.children.slice(oi));for(let ii=0;ii<si.length;ii++)si[ii].setParent(this)}ignoreMutation(ws){return!1}ignoreEvent(ws){return!1}childCursor(ws=this.length){return new ChildCursor(this.children,ws,this.children.length)}childPos(ws,oi=1){return this.childCursor().findPos(ws,oi)}toString(){let ws=this.constructor.name.replace("View","");return ws+(this.children.length?"("+this.children.join()+")":this.length?"["+(ws=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(ws){return ws.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(ws,oi,si,ii,ai,li){return!1}become(ws){return!1}canReuseDOM(ws){return ws.constructor==this.constructor&&!((this.flags|ws.flags)&8)}getSide(){return 0}destroy(){for(let ws of this.children)ws.parent==this&&ws.destroy();this.parent=null}}ContentView.prototype.breakAfter=0;function rm$1(Ws){let ws=Ws.nextSibling;return Ws.parentNode.removeChild(Ws),ws}class ChildCursor{constructor(ws,oi,si){this.children=ws,this.pos=oi,this.i=si,this.off=0}findPos(ws,oi=1){for(;;){if(ws>this.pos||ws==this.pos&&(oi>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=ws-this.pos,this;let si=this.children[--this.i];this.pos-=si.length+si.breakAfter}}}function replaceRange(Ws,ws,oi,si,ii,ai,li,ci,ui){let{children:di}=Ws,hi=di.length?di[ws]:null,pi=ai.length?ai[ai.length-1]:null,ha=pi?pi.breakAfter:li;if(!(ws==si&&hi&&!li&&!ha&&ai.length<2&&hi.merge(oi,ii,ai.length?pi:null,oi==0,ci,ui))){if(si<di.length){let ga=di[si];ga&&(ii<ga.length||ga.breakAfter&&pi!=null&&pi.breakAfter)?(ws==si&&(ga=ga.split(ii),ii=0),!ha&&pi&&ga.merge(0,ii,pi,!0,0,ui)?ai[ai.length-1]=ga:((ii||ga.children.length&&!ga.children[0].length)&&ga.merge(0,ii,null,!1,0,ui),ai.push(ga))):ga!=null&&ga.breakAfter&&(pi?pi.breakAfter=1:li=1),si++}for(hi&&(hi.breakAfter=li,oi>0&&(!li&&ai.length&&hi.merge(oi,hi.length,ai[0],!1,ci,0)?hi.breakAfter=ai.shift().breakAfter:(oi<hi.length||hi.children.length&&hi.children[hi.children.length-1].length==0)&&hi.merge(oi,hi.length,null,!1,ci,0),ws++));ws<si&&ai.length;)if(di[si-1].become(ai[ai.length-1]))si--,ai.pop(),ui=ai.length?0:ci;else if(di[ws].become(ai[0]))ws++,ai.shift(),ci=ai.length?0:ui;else break;!ai.length&&ws&&si<di.length&&!di[ws-1].breakAfter&&di[si].merge(0,0,di[ws-1],!1,ci,ui)&&ws--,(ws<si||ai.length)&&Ws.replaceChildren(ws,si,ai)}}function mergeChildrenInto(Ws,ws,oi,si,ii,ai){let li=Ws.childCursor(),{i:ci,off:ui}=li.findPos(oi,1),{i:di,off:hi}=li.findPos(ws,-1),pi=ws-oi;for(let ha of si)pi+=ha.length;Ws.length+=pi,replaceRange(Ws,di,hi,ci,ui,si,0,ii,ai)}let nav=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},doc=typeof document<"u"?document:{documentElement:{style:{}}};const ie_edge=/Edge\/(\d+)/.exec(nav.userAgent),ie_upto10=/MSIE \d/.test(nav.userAgent),ie_11up=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(nav.userAgent),ie=!!(ie_upto10||ie_11up||ie_edge),gecko=!ie&&/gecko\/(\d+)/i.test(nav.userAgent),chrome=!ie&&/Chrome\/(\d+)/.exec(nav.userAgent),webkit="webkitFontSmoothing"in doc.documentElement.style,safari=!ie&&/Apple Computer/.test(nav.vendor),ios=safari&&(/Mobile\/\w+/.test(nav.userAgent)||nav.maxTouchPoints>2);var browser={mac:ios||/Mac/.test(nav.platform),windows:/Win/.test(nav.platform),linux:/Linux|X11/.test(nav.platform),ie,ie_version:ie_upto10?doc.documentMode||6:ie_11up?+ie_11up[1]:ie_edge?+ie_edge[1]:0,gecko,gecko_version:gecko?+(/Firefox\/(\d+)/.exec(nav.userAgent)||[0,0])[1]:0,chrome:!!chrome,chrome_version:chrome?+chrome[1]:0,ios,android:/Android\b/.test(nav.userAgent),webkit,safari,webkit_version:webkit?+(/\bAppleWebKit\/(\d+)/.exec(nav.userAgent)||[0,0])[1]:0,tabSize:doc.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const MaxJoinLen=256;class TextView extends ContentView{constructor(ws){super(),this.text=ws}get length(){return this.text.length}createDOM(ws){this.setDOM(ws||document.createTextNode(this.text))}sync(ws,oi){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(oi&&oi.node==this.dom&&(oi.written=!0),this.dom.nodeValue=this.text)}reuseDOM(ws){ws.nodeType==3&&this.createDOM(ws)}merge(ws,oi,si){return this.flags&8||si&&(!(si instanceof TextView)||this.length-(oi-ws)+si.length>MaxJoinLen||si.flags&8)?!1:(this.text=this.text.slice(0,ws)+(si?si.text:"")+this.text.slice(oi),this.markDirty(),!0)}split(ws){let oi=new TextView(this.text.slice(ws));return this.text=this.text.slice(0,ws),this.markDirty(),oi.flags|=this.flags&8,oi}localPosFromDOM(ws,oi){return ws==this.dom?oi:oi?this.text.length:0}domAtPos(ws){return new DOMPos(this.dom,ws)}domBoundsAround(ws,oi,si){return{from:si,to:si+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(ws,oi){return textCoords(this.dom,ws,oi)}}class MarkView extends ContentView{constructor(ws,oi=[],si=0){super(),this.mark=ws,this.children=oi,this.length=si;for(let ii of oi)ii.setParent(this)}setAttrs(ws){if(clearAttributes(ws),this.mark.class&&(ws.className=this.mark.class),this.mark.attrs)for(let oi in this.mark.attrs)ws.setAttribute(oi,this.mark.attrs[oi]);return ws}canReuseDOM(ws){return super.canReuseDOM(ws)&&!((this.flags|ws.flags)&8)}reuseDOM(ws){ws.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(ws),this.flags|=6)}sync(ws,oi){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(ws,oi)}merge(ws,oi,si,ii,ai,li){return si&&(!(si instanceof MarkView&&si.mark.eq(this.mark))||ws&&ai<=0||oi<this.length&&li<=0)?!1:(mergeChildrenInto(this,ws,oi,si?si.children.slice():[],ai-1,li-1),this.markDirty(),!0)}split(ws){let oi=[],si=0,ii=-1,ai=0;for(let ci of this.children){let ui=si+ci.length;ui>ws&&oi.push(si<ws?ci.split(ws-si):ci),ii<0&&si>=ws&&(ii=ai),si=ui,ai++}let li=this.length-ws;return this.length=ws,ii>-1&&(this.children.length=ii,this.markDirty()),new MarkView(this.mark,oi,li)}domAtPos(ws){return inlineDOMAtPos(this,ws)}coordsAt(ws,oi){return coordsInChildren(this,ws,oi)}}function textCoords(Ws,ws,oi){let si=Ws.nodeValue.length;ws>si&&(ws=si);let ii=ws,ai=ws,li=0;ws==0&&oi<0||ws==si&&oi>=0?browser.chrome||browser.gecko||(ws?(ii--,li=1):ai<si&&(ai++,li=-1)):oi<0?ii--:ai<si&&ai++;let ci=textRange(Ws,ii,ai).getClientRects();if(!ci.length)return null;let ui=ci[(li?li<0:oi>=0)?0:ci.length-1];return browser.safari&&!li&&ui.width==0&&(ui=Array.prototype.find.call(ci,di=>di.width)||ui),li?flattenRect(ui,li<0):ui||null}class WidgetView extends ContentView{static create(ws,oi,si){return new WidgetView(ws,oi,si)}constructor(ws,oi,si){super(),this.widget=ws,this.length=oi,this.side=si,this.prevWidget=null}split(ws){let oi=WidgetView.create(this.widget,this.length-ws,this.side);return this.length-=ws,oi}sync(ws){(!this.dom||!this.widget.updateDOM(this.dom,ws))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(ws)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(ws,oi,si,ii,ai,li){return si&&(!(si instanceof WidgetView)||!this.widget.compare(si.widget)||ws>0&&ai<=0||oi<this.length&&li<=0)?!1:(this.length=ws+(si?si.length:0)+(this.length-oi),!0)}become(ws){return ws instanceof WidgetView&&ws.side==this.side&&this.widget.constructor==ws.widget.constructor?(this.widget.compare(ws.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=ws.widget,this.length=ws.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(ws){return this.widget.ignoreEvent(ws)}get overrideDOMText(){if(this.length==0)return Text.empty;let ws=this;for(;ws.parent;)ws=ws.parent;let{view:oi}=ws,si=oi&&oi.state.doc,ii=this.posAtStart;return si?si.slice(ii,ii+this.length):Text.empty}domAtPos(ws){return(this.length?ws==0:this.side>0)?DOMPos.before(this.dom):DOMPos.after(this.dom,ws==this.length)}domBoundsAround(){return null}coordsAt(ws,oi){let si=this.widget.coordsAt(this.dom,ws,oi);if(si)return si;let ii=this.dom.getClientRects(),ai=null;if(!ii.length)return null;let li=this.side?this.side<0:ws>0;for(let ci=li?ii.length-1:0;ai=ii[ci],!(ws>0?ci==0:ci==ii.length-1||ai.top<ai.bottom);ci+=li?-1:1);return flattenRect(ai,!li)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class WidgetBufferView extends ContentView{constructor(ws){super(),this.side=ws}get length(){return 0}merge(){return!1}become(ws){return ws instanceof WidgetBufferView&&ws.side==this.side}split(){return new WidgetBufferView(this.side)}sync(){if(!this.dom){let ws=document.createElement("img");ws.className="cm-widgetBuffer",ws.setAttribute("aria-hidden","true"),this.setDOM(ws)}}getSide(){return this.side}domAtPos(ws){return this.side>0?DOMPos.before(this.dom):DOMPos.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(ws){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Text.empty}get isHidden(){return!0}}TextView.prototype.children=WidgetView.prototype.children=WidgetBufferView.prototype.children=noChildren;function inlineDOMAtPos(Ws,ws){let oi=Ws.dom,{children:si}=Ws,ii=0;for(let ai=0;ii<si.length;ii++){let li=si[ii],ci=ai+li.length;if(!(ci==ai&&li.getSide()<=0)){if(ws>ai&&ws<ci&&li.dom.parentNode==oi)return li.domAtPos(ws-ai);if(ws<=ai)break;ai=ci}}for(let ai=ii;ai>0;ai--){let li=si[ai-1];if(li.dom.parentNode==oi)return li.domAtPos(li.length)}for(let ai=ii;ai<si.length;ai++){let li=si[ai];if(li.dom.parentNode==oi)return li.domAtPos(0)}return new DOMPos(oi,0)}function joinInlineInto(Ws,ws,oi){let si,{children:ii}=Ws;oi>0&&ws instanceof MarkView&&ii.length&&(si=ii[ii.length-1])instanceof MarkView&&si.mark.eq(ws.mark)?joinInlineInto(si,ws.children[0],oi-1):(ii.push(ws),ws.setParent(Ws)),Ws.length+=ws.length}function coordsInChildren(Ws,ws,oi){let si=null,ii=-1,ai=null,li=-1;function ci(di,hi){for(let pi=0,ha=0;pi<di.children.length&&ha<=hi;pi++){let ga=di.children[pi],va=ha+ga.length;va>=hi&&(ga.children.length?ci(ga,hi-ha):(!ai||ai.isHidden&&oi>0)&&(va>hi||ha==va&&ga.getSide()>0)?(ai=ga,li=hi-ha):(ha<hi||ha==va&&ga.getSide()<0&&!ga.isHidden)&&(si=ga,ii=hi-ha)),ha=va}}ci(Ws,ws);let ui=(oi<0?si:ai)||si||ai;return ui?ui.coordsAt(Math.max(0,ui==si?ii:li),oi):fallbackRect(Ws)}function fallbackRect(Ws){let ws=Ws.dom.lastChild;if(!ws)return Ws.dom.getBoundingClientRect();let oi=clientRectsFor(ws);return oi[oi.length-1]||null}function combineAttrs(Ws,ws){for(let oi in Ws)oi=="class"&&ws.class?ws.class+=" "+Ws.class:oi=="style"&&ws.style?ws.style+=";"+Ws.style:ws[oi]=Ws[oi];return ws}const noAttrs$1=Object.create(null);function attrsEq(Ws,ws,oi){if(Ws==ws)return!0;Ws||(Ws=noAttrs$1),ws||(ws=noAttrs$1);let si=Object.keys(Ws),ii=Object.keys(ws);if(si.length-(oi&&si.indexOf(oi)>-1?1:0)!=ii.length-(oi&&ii.indexOf(oi)>-1?1:0))return!1;for(let ai of si)if(ai!=oi&&(ii.indexOf(ai)==-1||Ws[ai]!==ws[ai]))return!1;return!0}function updateAttrs(Ws,ws,oi){let si=!1;if(ws)for(let ii in ws)oi&&ii in oi||(si=!0,ii=="style"?Ws.style.cssText="":Ws.removeAttribute(ii));if(oi)for(let ii in oi)ws&&ws[ii]==oi[ii]||(si=!0,ii=="style"?Ws.style.cssText=oi[ii]:Ws.setAttribute(ii,oi[ii]));return si}function getAttrs(Ws){let ws=Object.create(null);for(let oi=0;oi<Ws.attributes.length;oi++){let si=Ws.attributes[oi];ws[si.name]=si.value}return ws}class WidgetType{eq(ws){return!1}updateDOM(ws,oi){return!1}compare(ws){return this==ws||this.constructor==ws.constructor&&this.eq(ws)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(ws){return!0}coordsAt(ws,oi,si){return null}get isHidden(){return!1}get editable(){return!1}destroy(ws){}}var BlockType=function(Ws){return Ws[Ws.Text=0]="Text",Ws[Ws.WidgetBefore=1]="WidgetBefore",Ws[Ws.WidgetAfter=2]="WidgetAfter",Ws[Ws.WidgetRange=3]="WidgetRange",Ws}(BlockType||(BlockType={}));class Decoration extends RangeValue{constructor(ws,oi,si,ii){super(),this.startSide=ws,this.endSide=oi,this.widget=si,this.spec=ii}get heightRelevant(){return!1}static mark(ws){return new MarkDecoration(ws)}static widget(ws){let oi=Math.max(-1e4,Math.min(1e4,ws.side||0)),si=!!ws.block;return oi+=si&&!ws.inlineOrder?oi>0?3e8:-4e8:oi>0?1e8:-1e8,new PointDecoration(ws,oi,oi,si,ws.widget||null,!1)}static replace(ws){let oi=!!ws.block,si,ii;if(ws.isBlockGap)si=-5e8,ii=4e8;else{let{start:ai,end:li}=getInclusive(ws,oi);si=(ai?oi?-3e8:-1:5e8)-1,ii=(li?oi?2e8:1:-6e8)+1}return new PointDecoration(ws,si,ii,oi,ws.widget||null,!0)}static line(ws){return new LineDecoration(ws)}static set(ws,oi=!1){return RangeSet.of(ws,oi)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Decoration.none=RangeSet.empty;class MarkDecoration extends Decoration{constructor(ws){let{start:oi,end:si}=getInclusive(ws);super(oi?-1:5e8,si?1:-6e8,null,ws),this.tagName=ws.tagName||"span",this.class=ws.class||"",this.attrs=ws.attributes||null}eq(ws){var oi,si;return this==ws||ws instanceof MarkDecoration&&this.tagName==ws.tagName&&(this.class||((oi=this.attrs)===null||oi===void 0?void 0:oi.class))==(ws.class||((si=ws.attrs)===null||si===void 0?void 0:si.class))&&attrsEq(this.attrs,ws.attrs,"class")}range(ws,oi=ws){if(ws>=oi)throw new RangeError("Mark decorations may not be empty");return super.range(ws,oi)}}MarkDecoration.prototype.point=!1;class LineDecoration extends Decoration{constructor(ws){super(-2e8,-2e8,null,ws)}eq(ws){return ws instanceof LineDecoration&&this.spec.class==ws.spec.class&&attrsEq(this.spec.attributes,ws.spec.attributes)}range(ws,oi=ws){if(oi!=ws)throw new RangeError("Line decoration ranges must be zero-length");return super.range(ws,oi)}}LineDecoration.prototype.mapMode=MapMode.TrackBefore;LineDecoration.prototype.point=!0;class PointDecoration extends Decoration{constructor(ws,oi,si,ii,ai,li){super(oi,si,ai,ws),this.block=ii,this.isReplace=li,this.mapMode=ii?oi<=0?MapMode.TrackBefore:MapMode.TrackAfter:MapMode.TrackDel}get type(){return this.startSide!=this.endSide?BlockType.WidgetRange:this.startSide<=0?BlockType.WidgetBefore:BlockType.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(ws){return ws instanceof PointDecoration&&widgetsEq(this.widget,ws.widget)&&this.block==ws.block&&this.startSide==ws.startSide&&this.endSide==ws.endSide}range(ws,oi=ws){if(this.isReplace&&(ws>oi||ws==oi&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&oi!=ws)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(ws,oi)}}PointDecoration.prototype.point=!0;function getInclusive(Ws,ws=!1){let{inclusiveStart:oi,inclusiveEnd:si}=Ws;return oi==null&&(oi=Ws.inclusive),si==null&&(si=Ws.inclusive),{start:oi??ws,end:si??ws}}function widgetsEq(Ws,ws){return Ws==ws||!!(Ws&&ws&&Ws.compare(ws))}function addRange(Ws,ws,oi,si=0){let ii=oi.length-1;ii>=0&&oi[ii]+si>=Ws?oi[ii]=Math.max(oi[ii],ws):oi.push(Ws,ws)}class LineView extends ContentView{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(ws,oi,si,ii,ai,li){if(si){if(!(si instanceof LineView))return!1;this.dom||si.transferDOM(this)}return ii&&this.setDeco(si?si.attrs:null),mergeChildrenInto(this,ws,oi,si?si.children.slice():[],ai,li),!0}split(ws){let oi=new LineView;if(oi.breakAfter=this.breakAfter,this.length==0)return oi;let{i:si,off:ii}=this.childPos(ws);ii&&(oi.append(this.children[si].split(ii),0),this.children[si].merge(ii,this.children[si].length,null,!1,0,0),si++);for(let ai=si;ai<this.children.length;ai++)oi.append(this.children[ai],0);for(;si>0&&this.children[si-1].length==0;)this.children[--si].destroy();return this.children.length=si,this.markDirty(),this.length=ws,oi}transferDOM(ws){this.dom&&(this.markDirty(),ws.setDOM(this.dom),ws.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(ws){attrsEq(this.attrs,ws)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=ws)}append(ws,oi){joinInlineInto(this,ws,oi)}addLineDeco(ws){let oi=ws.spec.attributes,si=ws.spec.class;oi&&(this.attrs=combineAttrs(oi,this.attrs||{})),si&&(this.attrs=combineAttrs({class:si},this.attrs||{}))}domAtPos(ws){return inlineDOMAtPos(this,ws)}reuseDOM(ws){ws.nodeName=="DIV"&&(this.setDOM(ws),this.flags|=6)}sync(ws,oi){var si;this.dom?this.flags&4&&(clearAttributes(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(updateAttrs(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(ws,oi);let ii=this.dom.lastChild;for(;ii&&ContentView.get(ii)instanceof MarkView;)ii=ii.lastChild;if(!ii||!this.length||ii.nodeName!="BR"&&((si=ContentView.get(ii))===null||si===void 0?void 0:si.isEditable)==!1&&(!browser.ios||!this.children.some(ai=>ai instanceof TextView))){let ai=document.createElement("BR");ai.cmIgnore=!0,this.dom.appendChild(ai)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let ws=0,oi;for(let si of this.children){if(!(si instanceof TextView)||/[^ -~]/.test(si.text))return null;let ii=clientRectsFor(si.dom);if(ii.length!=1)return null;ws+=ii[0].width,oi=ii[0].height}return ws?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:ws/this.length,textHeight:oi}:null}coordsAt(ws,oi){let si=coordsInChildren(this,ws,oi);if(!this.children.length&&si&&this.parent){let{heightOracle:ii}=this.parent.view.viewState,ai=si.bottom-si.top;if(Math.abs(ai-ii.lineHeight)<2&&ii.textHeight<ai){let li=(ai-ii.textHeight)/2;return{top:si.top+li,bottom:si.bottom-li,left:si.left,right:si.left}}}return si}become(ws){return ws instanceof LineView&&this.children.length==0&&ws.children.length==0&&attrsEq(this.attrs,ws.attrs)&&this.breakAfter==ws.breakAfter}covers(){return!0}static find(ws,oi){for(let si=0,ii=0;si<ws.children.length;si++){let ai=ws.children[si],li=ii+ai.length;if(li>=oi){if(ai instanceof LineView)return ai;if(li>oi)break}ii=li+ai.breakAfter}return null}}class BlockWidgetView extends ContentView{constructor(ws,oi,si){super(),this.widget=ws,this.length=oi,this.deco=si,this.breakAfter=0,this.prevWidget=null}merge(ws,oi,si,ii,ai,li){return si&&(!(si instanceof BlockWidgetView)||!this.widget.compare(si.widget)||ws>0&&ai<=0||oi<this.length&&li<=0)?!1:(this.length=ws+(si?si.length:0)+(this.length-oi),!0)}domAtPos(ws){return ws==0?DOMPos.before(this.dom):DOMPos.after(this.dom,ws==this.length)}split(ws){let oi=this.length-ws;this.length=ws;let si=new BlockWidgetView(this.widget,oi,this.deco);return si.breakAfter=this.breakAfter,si}get children(){return noChildren}sync(ws){(!this.dom||!this.widget.updateDOM(this.dom,ws))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(ws)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Text.empty}domBoundsAround(){return null}become(ws){return ws instanceof BlockWidgetView&&ws.widget.constructor==this.widget.constructor?(ws.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=ws.widget,this.length=ws.length,this.deco=ws.deco,this.breakAfter=ws.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(ws){return this.widget.ignoreEvent(ws)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(ws,oi){return this.widget.coordsAt(this.dom,ws,oi)||(this.widget instanceof BlockGapWidget?null:flattenRect(this.dom.getBoundingClientRect(),this.length?ws==0:oi<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(ws){let{startSide:oi,endSide:si}=this.deco;return oi==si?!1:ws<0?oi<0:si>0}}class BlockGapWidget extends WidgetType{constructor(ws){super(),this.height=ws}toDOM(){let ws=document.createElement("div");return ws.className="cm-gap",this.updateDOM(ws),ws}eq(ws){return ws.height==this.height}updateDOM(ws){return ws.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class ContentBuilder{constructor(ws,oi,si,ii){this.doc=ws,this.pos=oi,this.end=si,this.disallowBlockEffectsFor=ii,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=ws.iter(),this.skip=oi}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let ws=this.content[this.content.length-1];return!(ws.breakAfter||ws instanceof BlockWidgetView&&ws.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new LineView),this.atCursorPos=!0),this.curLine}flushBuffer(ws=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(wrapMarks(new WidgetBufferView(-1),ws),ws.length),this.pendingBuffer=0)}addBlockWidget(ws){this.flushBuffer(),this.curLine=null,this.content.push(ws)}finish(ws){this.pendingBuffer&&ws<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(ws&&this.content.length&&this.content[this.content.length-1]instanceof BlockWidgetView)&&this.getLine()}buildText(ws,oi,si){for(;ws>0;){if(this.textOff==this.text.length){let{value:ai,lineBreak:li,done:ci}=this.cursor.next(this.skip);if(this.skip=0,ci)throw new Error("Ran out of text content when drawing inline views");if(li){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,ws--;continue}else this.text=ai,this.textOff=0}let ii=Math.min(this.text.length-this.textOff,ws,512);this.flushBuffer(oi.slice(oi.length-si)),this.getLine().append(wrapMarks(new TextView(this.text.slice(this.textOff,this.textOff+ii)),oi),si),this.atCursorPos=!0,this.textOff+=ii,ws-=ii,si=0}}span(ws,oi,si,ii){this.buildText(oi-ws,si,ii),this.pos=oi,this.openStart<0&&(this.openStart=ii)}point(ws,oi,si,ii,ai,li){if(this.disallowBlockEffectsFor[li]&&si instanceof PointDecoration){if(si.block)throw new RangeError("Block decorations may not be specified via plugins");if(oi>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let ci=oi-ws;if(si instanceof PointDecoration)if(si.block)si.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new BlockWidgetView(si.widget||NullWidget.block,ci,si));else{let ui=WidgetView.create(si.widget||NullWidget.inline,ci,ci?0:si.startSide),di=this.atCursorPos&&!ui.isEditable&&ai<=ii.length&&(ws<oi||si.startSide>0),hi=!ui.isEditable&&(ws<oi||ai>ii.length||si.startSide<=0),pi=this.getLine();this.pendingBuffer==2&&!di&&!ui.isEditable&&(this.pendingBuffer=0),this.flushBuffer(ii),di&&(pi.append(wrapMarks(new WidgetBufferView(1),ii),ai),ai=ii.length+Math.max(0,ai-ii.length)),pi.append(wrapMarks(ui,ii),ai),this.atCursorPos=hi,this.pendingBuffer=hi?ws<oi||ai>ii.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=ii.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(si);ci&&(this.textOff+ci<=this.text.length?this.textOff+=ci:(this.skip+=ci-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=oi),this.openStart<0&&(this.openStart=ai)}static build(ws,oi,si,ii,ai){let li=new ContentBuilder(ws,oi,si,ai);return li.openEnd=RangeSet.spans(ii,oi,si,li),li.openStart<0&&(li.openStart=li.openEnd),li.finish(li.openEnd),li}}function wrapMarks(Ws,ws){for(let oi of ws)Ws=new MarkView(oi,[Ws],Ws.length);return Ws}class NullWidget extends WidgetType{constructor(ws){super(),this.tag=ws}eq(ws){return ws.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(ws){return ws.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}NullWidget.inline=new NullWidget("span");NullWidget.block=new NullWidget("div");var Direction=function(Ws){return Ws[Ws.LTR=0]="LTR",Ws[Ws.RTL=1]="RTL",Ws}(Direction||(Direction={}));const LTR=Direction.LTR,RTL=Direction.RTL;function dec(Ws){let ws=[];for(let oi=0;oi<Ws.length;oi++)ws.push(1<<+Ws[oi]);return ws}const LowTypes=dec("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),ArabicTypes=dec("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Brackets=Object.create(null),BracketStack=[];for(let Ws of["()","[]","{}"]){let ws=Ws.charCodeAt(0),oi=Ws.charCodeAt(1);Brackets[ws]=oi,Brackets[oi]=-ws}function charType(Ws){return Ws<=247?LowTypes[Ws]:1424<=Ws&&Ws<=1524?2:1536<=Ws&&Ws<=1785?ArabicTypes[Ws-1536]:1774<=Ws&&Ws<=2220?4:8192<=Ws&&Ws<=8204?256:64336<=Ws&&Ws<=65023?4:1}const BidiRE=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class BidiSpan{get dir(){return this.level%2?RTL:LTR}constructor(ws,oi,si){this.from=ws,this.to=oi,this.level=si}side(ws,oi){return this.dir==oi==ws?this.to:this.from}forward(ws,oi){return ws==(this.dir==oi)}static find(ws,oi,si,ii){let ai=-1;for(let li=0;li<ws.length;li++){let ci=ws[li];if(ci.from<=oi&&ci.to>=oi){if(ci.level==si)return li;(ai<0||(ii!=0?ii<0?ci.from<oi:ci.to>oi:ws[ai].level>ci.level))&&(ai=li)}}if(ai<0)throw new RangeError("Index out of range");return ai}}function isolatesEq(Ws,ws){if(Ws.length!=ws.length)return!1;for(let oi=0;oi<Ws.length;oi++){let si=Ws[oi],ii=ws[oi];if(si.from!=ii.from||si.to!=ii.to||si.direction!=ii.direction||!isolatesEq(si.inner,ii.inner))return!1}return!0}const types=[];function computeCharTypes(Ws,ws,oi,si,ii){for(let ai=0;ai<=si.length;ai++){let li=ai?si[ai-1].to:ws,ci=ai<si.length?si[ai].from:oi,ui=ai?256:ii;for(let di=li,hi=ui,pi=ui;di<ci;di++){let ha=charType(Ws.charCodeAt(di));ha==512?ha=hi:ha==8&&pi==4&&(ha=16),types[di]=ha==4?2:ha,ha&7&&(pi=ha),hi=ha}for(let di=li,hi=ui,pi=ui;di<ci;di++){let ha=types[di];if(ha==128)di<ci-1&&hi==types[di+1]&&hi&24?ha=types[di]=hi:types[di]=256;else if(ha==64){let ga=di+1;for(;ga<ci&&types[ga]==64;)ga++;let va=di&&hi==8||ga<oi&&types[ga]==8?pi==1?1:8:256;for(let ba=di;ba<ga;ba++)types[ba]=va;di=ga-1}else ha==8&&pi==1&&(types[di]=1);hi=ha,ha&7&&(pi=ha)}}}function processBracketPairs(Ws,ws,oi,si,ii){let ai=ii==1?2:1;for(let li=0,ci=0,ui=0;li<=si.length;li++){let di=li?si[li-1].to:ws,hi=li<si.length?si[li].from:oi;for(let pi=di,ha,ga,va;pi<hi;pi++)if(ga=Brackets[ha=Ws.charCodeAt(pi)])if(ga<0){for(let ba=ci-3;ba>=0;ba-=3)if(BracketStack[ba+1]==-ga){let wa=BracketStack[ba+2],xa=wa&2?ii:wa&4?wa&1?ai:ii:0;xa&&(types[pi]=types[BracketStack[ba]]=xa),ci=ba;break}}else{if(BracketStack.length==189)break;BracketStack[ci++]=pi,BracketStack[ci++]=ha,BracketStack[ci++]=ui}else if((va=types[pi])==2||va==1){let ba=va==ii;ui=ba?0:1;for(let wa=ci-3;wa>=0;wa-=3){let xa=BracketStack[wa+2];if(xa&2)break;if(ba)BracketStack[wa+2]|=2;else{if(xa&4)break;BracketStack[wa+2]|=4}}}}}function processNeutrals(Ws,ws,oi,si){for(let ii=0,ai=si;ii<=oi.length;ii++){let li=ii?oi[ii-1].to:Ws,ci=ii<oi.length?oi[ii].from:ws;for(let ui=li;ui<ci;){let di=types[ui];if(di==256){let hi=ui+1;for(;;)if(hi==ci){if(ii==oi.length)break;hi=oi[ii++].to,ci=ii<oi.length?oi[ii].from:ws}else if(types[hi]==256)hi++;else break;let pi=ai==1,ha=(hi<ws?types[hi]:si)==1,ga=pi==ha?pi?1:2:si;for(let va=hi,ba=ii,wa=ba?oi[ba-1].to:Ws;va>ui;)va==wa&&(va=oi[--ba].from,wa=ba?oi[ba-1].to:Ws),types[--va]=ga;ui=hi}else ai=di,ui++}}}function emitSpans(Ws,ws,oi,si,ii,ai,li){let ci=si%2?2:1;if(si%2==ii%2)for(let ui=ws,di=0;ui<oi;){let hi=!0,pi=!1;if(di==ai.length||ui<ai[di].from){let ba=types[ui];ba!=ci&&(hi=!1,pi=ba==16)}let ha=!hi&&ci==1?[]:null,ga=hi?si:si+1,va=ui;e:for(;;)if(di<ai.length&&va==ai[di].from){if(pi)break e;let ba=ai[di];if(!hi)for(let wa=ba.to,xa=di+1;;){if(wa==oi)break e;if(xa<ai.length&&ai[xa].from==wa)wa=ai[xa++].to;else{if(types[wa]==ci)break e;break}}if(di++,ha)ha.push(ba);else{ba.from>ui&&li.push(new BidiSpan(ui,ba.from,ga));let wa=ba.direction==LTR!=!(ga%2);computeSectionOrder(Ws,wa?si+1:si,ii,ba.inner,ba.from,ba.to,li),ui=ba.to}va=ba.to}else{if(va==oi||(hi?types[va]!=ci:types[va]==ci))break;va++}ha?emitSpans(Ws,ui,va,si+1,ii,ha,li):ui<va&&li.push(new BidiSpan(ui,va,ga)),ui=va}else for(let ui=oi,di=ai.length;ui>ws;){let hi=!0,pi=!1;if(!di||ui>ai[di-1].to){let ba=types[ui-1];ba!=ci&&(hi=!1,pi=ba==16)}let ha=!hi&&ci==1?[]:null,ga=hi?si:si+1,va=ui;e:for(;;)if(di&&va==ai[di-1].to){if(pi)break e;let ba=ai[--di];if(!hi)for(let wa=ba.from,xa=di;;){if(wa==ws)break e;if(xa&&ai[xa-1].to==wa)wa=ai[--xa].from;else{if(types[wa-1]==ci)break e;break}}if(ha)ha.push(ba);else{ba.to<ui&&li.push(new BidiSpan(ba.to,ui,ga));let wa=ba.direction==LTR!=!(ga%2);computeSectionOrder(Ws,wa?si+1:si,ii,ba.inner,ba.from,ba.to,li),ui=ba.from}va=ba.from}else{if(va==ws||(hi?types[va-1]!=ci:types[va-1]==ci))break;va--}ha?emitSpans(Ws,va,ui,si+1,ii,ha,li):va<ui&&li.push(new BidiSpan(va,ui,ga)),ui=va}}function computeSectionOrder(Ws,ws,oi,si,ii,ai,li){let ci=ws%2?2:1;computeCharTypes(Ws,ii,ai,si,ci),processBracketPairs(Ws,ii,ai,si,ci),processNeutrals(ii,ai,si,ci),emitSpans(Ws,ii,ai,ws,oi,si,li)}function computeOrder(Ws,ws,oi){if(!Ws)return[new BidiSpan(0,0,ws==RTL?1:0)];if(ws==LTR&&!oi.length&&!BidiRE.test(Ws))return trivialOrder(Ws.length);if(oi.length)for(;Ws.length>types.length;)types[types.length]=256;let si=[],ii=ws==LTR?0:1;return computeSectionOrder(Ws,ii,ii,oi,0,Ws.length,si),si}function trivialOrder(Ws){return[new BidiSpan(0,Ws,0)]}let movedOver="";function moveVisually(Ws,ws,oi,si,ii){var ai;let li=si.head-Ws.from,ci=BidiSpan.find(ws,li,(ai=si.bidiLevel)!==null&&ai!==void 0?ai:-1,si.assoc),ui=ws[ci],di=ui.side(ii,oi);if(li==di){let ha=ci+=ii?1:-1;if(ha<0||ha>=ws.length)return null;ui=ws[ci=ha],li=ui.side(!ii,oi),di=ui.side(ii,oi)}let hi=findClusterBreak(Ws.text,li,ui.forward(ii,oi));(hi<ui.from||hi>ui.to)&&(hi=di),movedOver=Ws.text.slice(Math.min(li,hi),Math.max(li,hi));let pi=ci==(ii?ws.length-1:0)?null:ws[ci+(ii?1:-1)];return pi&&hi==di&&pi.level+(ii?0:1)<ui.level?EditorSelection.cursor(pi.side(!ii,oi)+Ws.from,pi.forward(ii,oi)?1:-1,pi.level):EditorSelection.cursor(hi+Ws.from,ui.forward(ii,oi)?-1:1,ui.level)}function autoDirection(Ws,ws,oi){for(let si=ws;si<oi;si++){let ii=charType(Ws.charCodeAt(si));if(ii==1)return LTR;if(ii==2||ii==4)return RTL}return LTR}const clickAddsSelectionRange=Facet.define(),dragMovesSelection$1=Facet.define(),mouseSelectionStyle=Facet.define(),exceptionSink=Facet.define(),updateListener=Facet.define(),inputHandler$1=Facet.define(),focusChangeEffect=Facet.define(),clipboardInputFilter=Facet.define(),clipboardOutputFilter=Facet.define(),perLineTextDirection=Facet.define({combine:Ws=>Ws.some(ws=>ws)}),nativeSelectionHidden=Facet.define({combine:Ws=>Ws.some(ws=>ws)}),scrollHandler=Facet.define();class ScrollTarget{constructor(ws,oi="nearest",si="nearest",ii=5,ai=5,li=!1){this.range=ws,this.y=oi,this.x=si,this.yMargin=ii,this.xMargin=ai,this.isSnapshot=li}map(ws){return ws.empty?this:new ScrollTarget(this.range.map(ws),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(ws){return this.range.to<=ws.doc.length?this:new ScrollTarget(EditorSelection.cursor(ws.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const scrollIntoView$1=StateEffect.define({map:(Ws,ws)=>Ws.map(ws)}),setEditContextFormatting=StateEffect.define();function logException(Ws,ws,oi){let si=Ws.facet(exceptionSink);si.length?si[0](ws):window.onerror?window.onerror(String(ws),oi,void 0,void 0,ws):oi?console.error(oi+":",ws):console.error(ws)}const editable=Facet.define({combine:Ws=>Ws.length?Ws[0]:!0});let nextPluginID=0;const viewPlugin=Facet.define();class ViewPlugin{constructor(ws,oi,si,ii,ai){this.id=ws,this.create=oi,this.domEventHandlers=si,this.domEventObservers=ii,this.extension=ai(this)}static define(ws,oi){const{eventHandlers:si,eventObservers:ii,provide:ai,decorations:li}=oi||{};return new ViewPlugin(nextPluginID++,ws,si,ii,ci=>{let ui=[viewPlugin.of(ci)];return li&&ui.push(decorations.of(di=>{let hi=di.plugin(ci);return hi?li(hi):Decoration.none})),ai&&ui.push(ai(ci)),ui})}static fromClass(ws,oi){return ViewPlugin.define(si=>new ws(si),oi)}}class PluginInstance{constructor(ws){this.spec=ws,this.mustUpdate=null,this.value=null}update(ws){if(this.value){if(this.mustUpdate){let oi=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(oi)}catch(si){if(logException(oi.state,si,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(ws)}catch(oi){logException(ws.state,oi,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(ws){var oi;if(!((oi=this.value)===null||oi===void 0)&&oi.destroy)try{this.value.destroy()}catch(si){logException(ws.state,si,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const editorAttributes=Facet.define(),contentAttributes=Facet.define(),decorations=Facet.define(),outerDecorations=Facet.define(),atomicRanges=Facet.define(),bidiIsolatedRanges=Facet.define();function getIsolatedRanges(Ws,ws){let oi=Ws.state.facet(bidiIsolatedRanges);if(!oi.length)return oi;let si=oi.map(ai=>ai instanceof Function?ai(Ws):ai),ii=[];return RangeSet.spans(si,ws.from,ws.to,{point(){},span(ai,li,ci,ui){let di=ai-ws.from,hi=li-ws.from,pi=ii;for(let ha=ci.length-1;ha>=0;ha--,ui--){let ga=ci[ha].spec.bidiIsolate,va;if(ga==null&&(ga=autoDirection(ws.text,di,hi)),ui>0&&pi.length&&(va=pi[pi.length-1]).to==di&&va.direction==ga)va.to=hi,pi=va.inner;else{let ba={from:di,to:hi,direction:ga,inner:[]};pi.push(ba),pi=ba.inner}}}}),ii}const scrollMargins=Facet.define();function getScrollMargins(Ws){let ws=0,oi=0,si=0,ii=0;for(let ai of Ws.state.facet(scrollMargins)){let li=ai(Ws);li&&(li.left!=null&&(ws=Math.max(ws,li.left)),li.right!=null&&(oi=Math.max(oi,li.right)),li.top!=null&&(si=Math.max(si,li.top)),li.bottom!=null&&(ii=Math.max(ii,li.bottom)))}return{left:ws,right:oi,top:si,bottom:ii}}const styleModule=Facet.define();class ChangedRange{constructor(ws,oi,si,ii){this.fromA=ws,this.toA=oi,this.fromB=si,this.toB=ii}join(ws){return new ChangedRange(Math.min(this.fromA,ws.fromA),Math.max(this.toA,ws.toA),Math.min(this.fromB,ws.fromB),Math.max(this.toB,ws.toB))}addToSet(ws){let oi=ws.length,si=this;for(;oi>0;oi--){let ii=ws[oi-1];if(!(ii.fromA>si.toA)){if(ii.toA<si.fromA)break;si=si.join(ii),ws.splice(oi-1,1)}}return ws.splice(oi,0,si),ws}static extendWithRanges(ws,oi){if(oi.length==0)return ws;let si=[];for(let ii=0,ai=0,li=0,ci=0;;ii++){let ui=ii==ws.length?null:ws[ii],di=li-ci,hi=ui?ui.fromB:1e9;for(;ai<oi.length&&oi[ai]<hi;){let pi=oi[ai],ha=oi[ai+1],ga=Math.max(ci,pi),va=Math.min(hi,ha);if(ga<=va&&new ChangedRange(ga+di,va+di,ga,va).addToSet(si),ha>hi)break;ai+=2}if(!ui)return si;new ChangedRange(ui.fromA,ui.toA,ui.fromB,ui.toB).addToSet(si),li=ui.toA,ci=ui.toB}}}class ViewUpdate{constructor(ws,oi,si){this.view=ws,this.state=oi,this.transactions=si,this.flags=0,this.startState=ws.state,this.changes=ChangeSet.empty(this.startState.doc.length);for(let ai of si)this.changes=this.changes.compose(ai.changes);let ii=[];this.changes.iterChangedRanges((ai,li,ci,ui)=>ii.push(new ChangedRange(ai,li,ci,ui))),this.changedRanges=ii}static create(ws,oi,si){return new ViewUpdate(ws,oi,si)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(ws=>ws.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class DocView extends ContentView{get length(){return this.view.state.doc.length}constructor(ws){super(),this.view=ws,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Decoration.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(ws.contentDOM),this.children=[new LineView],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ChangedRange(0,0,0,ws.state.doc.length)],0,null)}update(ws){var oi;let si=ws.changedRanges;this.minWidth>0&&si.length&&(si.every(({fromA:di,toA:hi})=>hi<this.minWidthFrom||di>this.minWidthTo)?(this.minWidthFrom=ws.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=ws.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(ws);let ii=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((oi=this.domChanged)===null||oi===void 0)&&oi.newSel?ii=this.domChanged.newSel.head:!touchesComposition(ws.changes,this.hasComposition)&&!ws.selectionSet&&(ii=ws.state.selection.main.head));let ai=ii>-1?findCompositionRange(this.view,ws.changes,ii):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:di,to:hi}=this.hasComposition;si=new ChangedRange(di,hi,ws.changes.mapPos(di,-1),ws.changes.mapPos(hi,1)).addToSet(si.slice())}this.hasComposition=ai?{from:ai.range.fromB,to:ai.range.toB}:null,(browser.ie||browser.chrome)&&!ai&&ws&&ws.state.doc.lines!=ws.startState.doc.lines&&(this.forceSelection=!0);let li=this.decorations,ci=this.updateDeco(),ui=findChangedDeco(li,ci,ws.changes);return si=ChangedRange.extendWithRanges(si,ui),!(this.flags&7)&&si.length==0?!1:(this.updateInner(si,ws.startState.doc.length,ai),ws.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(ws,oi,si){this.view.viewState.mustMeasureContent=!0,this.updateChildren(ws,oi,si);let{observer:ii}=this.view;ii.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let li=browser.chrome||browser.ios?{node:ii.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,li),this.flags&=-8,li&&(li.written||ii.selectionRange.focusNode!=li.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(li=>li.flags&=-9);let ai=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let li of this.children)li instanceof BlockWidgetView&&li.widget instanceof BlockGapWidget&&ai.push(li.dom);ii.updateGaps(ai)}updateChildren(ws,oi,si){let ii=si?si.range.addToSet(ws.slice()):ws,ai=this.childCursor(oi);for(let li=ii.length-1;;li--){let ci=li>=0?ii[li]:null;if(!ci)break;let{fromA:ui,toA:di,fromB:hi,toB:pi}=ci,ha,ga,va,ba;if(si&&si.range.fromB<pi&&si.range.toB>hi){let ku=ContentBuilder.build(this.view.state.doc,hi,si.range.fromB,this.decorations,this.dynamicDecorationMap),gd=ContentBuilder.build(this.view.state.doc,si.range.toB,pi,this.decorations,this.dynamicDecorationMap);ga=ku.breakAtStart,va=ku.openStart,ba=gd.openEnd;let Ed=this.compositionView(si);gd.breakAtStart?Ed.breakAfter=1:gd.content.length&&Ed.merge(Ed.length,Ed.length,gd.content[0],!1,gd.openStart,0)&&(Ed.breakAfter=gd.content[0].breakAfter,gd.content.shift()),ku.content.length&&Ed.merge(0,0,ku.content[ku.content.length-1],!0,0,ku.openEnd)&&ku.content.pop(),ha=ku.content.concat(Ed).concat(gd.content)}else({content:ha,breakAtStart:ga,openStart:va,openEnd:ba}=ContentBuilder.build(this.view.state.doc,hi,pi,this.decorations,this.dynamicDecorationMap));let{i:wa,off:xa}=ai.findPos(di,1),{i:Ca,off:el}=ai.findPos(ui,-1);replaceRange(this,Ca,el,wa,xa,ha,ga,va,ba)}si&&this.fixCompositionDOM(si)}updateEditContextFormatting(ws){this.editContextFormatting=this.editContextFormatting.map(ws.changes);for(let oi of ws.transactions)for(let si of oi.effects)si.is(setEditContextFormatting)&&(this.editContextFormatting=si.value)}compositionView(ws){let oi=new TextView(ws.text.nodeValue);oi.flags|=8;for(let{deco:ii}of ws.marks)oi=new MarkView(ii,[oi],oi.length);let si=new LineView;return si.append(oi,0),si}fixCompositionDOM(ws){let oi=(ai,li)=>{li.flags|=8|(li.children.some(ui=>ui.flags&7)?1:0),this.markedForComposition.add(li);let ci=ContentView.get(ai);ci&&ci!=li&&(ci.dom=null),li.setDOM(ai)},si=this.childPos(ws.range.fromB,1),ii=this.children[si.i];oi(ws.line,ii);for(let ai=ws.marks.length-1;ai>=-1;ai--)si=ii.childPos(si.off,1),ii=ii.children[si.i],oi(ai>=0?ws.marks[ai].node:ws.text,ii)}updateSelection(ws=!1,oi=!1){(ws||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let si=this.view.root.activeElement,ii=si==this.dom,ai=!ii&&!(this.view.state.facet(editable)||this.dom.tabIndex>-1)&&hasSelection(this.dom,this.view.observer.selectionRange)&&!(si&&this.dom.contains(si));if(!(ii||oi||ai))return;let li=this.forceSelection;this.forceSelection=!1;let ci=this.view.state.selection.main,ui=this.moveToLine(this.domAtPos(ci.anchor)),di=ci.empty?ui:this.moveToLine(this.domAtPos(ci.head));if(browser.gecko&&ci.empty&&!this.hasComposition&&betweenUneditable(ui)){let pi=document.createTextNode("");this.view.observer.ignore(()=>ui.node.insertBefore(pi,ui.node.childNodes[ui.offset]||null)),ui=di=new DOMPos(pi,0),li=!0}let hi=this.view.observer.selectionRange;(li||!hi.focusNode||(!isEquivalentPosition(ui.node,ui.offset,hi.anchorNode,hi.anchorOffset)||!isEquivalentPosition(di.node,di.offset,hi.focusNode,hi.focusOffset))&&!this.suppressWidgetCursorChange(hi,ci))&&(this.view.observer.ignore(()=>{browser.android&&browser.chrome&&this.dom.contains(hi.focusNode)&&inUneditable(hi.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let pi=getSelection(this.view.root);if(pi)if(ci.empty){if(browser.gecko){let ha=nextToUneditable(ui.node,ui.offset);if(ha&&ha!=3){let ga=(ha==1?textNodeBefore:textNodeAfter)(ui.node,ui.offset);ga&&(ui=new DOMPos(ga.node,ga.offset))}}pi.collapse(ui.node,ui.offset),ci.bidiLevel!=null&&pi.caretBidiLevel!==void 0&&(pi.caretBidiLevel=ci.bidiLevel)}else if(pi.extend){pi.collapse(ui.node,ui.offset);try{pi.extend(di.node,di.offset)}catch{}}else{let ha=document.createRange();ci.anchor>ci.head&&([ui,di]=[di,ui]),ha.setEnd(di.node,di.offset),ha.setStart(ui.node,ui.offset),pi.removeAllRanges(),pi.addRange(ha)}ai&&this.view.root.activeElement==this.dom&&(this.dom.blur(),si&&si.focus())}),this.view.observer.setSelectionRange(ui,di)),this.impreciseAnchor=ui.precise?null:new DOMPos(hi.anchorNode,hi.anchorOffset),this.impreciseHead=di.precise?null:new DOMPos(hi.focusNode,hi.focusOffset)}suppressWidgetCursorChange(ws,oi){return this.hasComposition&&oi.empty&&isEquivalentPosition(ws.focusNode,ws.focusOffset,ws.anchorNode,ws.anchorOffset)&&this.posFromDOM(ws.focusNode,ws.focusOffset)==oi.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:ws}=this,oi=ws.state.selection.main,si=getSelection(ws.root),{anchorNode:ii,anchorOffset:ai}=ws.observer.selectionRange;if(!si||!oi.empty||!oi.assoc||!si.modify)return;let li=LineView.find(this,oi.head);if(!li)return;let ci=li.posAtStart;if(oi.head==ci||oi.head==ci+li.length)return;let ui=this.coordsAt(oi.head,-1),di=this.coordsAt(oi.head,1);if(!ui||!di||ui.bottom>di.top)return;let hi=this.domAtPos(oi.head+oi.assoc);si.collapse(hi.node,hi.offset),si.modify("move",oi.assoc<0?"forward":"backward","lineboundary"),ws.observer.readSelectionRange();let pi=ws.observer.selectionRange;ws.docView.posFromDOM(pi.anchorNode,pi.anchorOffset)!=oi.from&&si.collapse(ii,ai)}moveToLine(ws){let oi=this.dom,si;if(ws.node!=oi)return ws;for(let ii=ws.offset;!si&&ii<oi.childNodes.length;ii++){let ai=ContentView.get(oi.childNodes[ii]);ai instanceof LineView&&(si=ai.domAtPos(0))}for(let ii=ws.offset-1;!si&&ii>=0;ii--){let ai=ContentView.get(oi.childNodes[ii]);ai instanceof LineView&&(si=ai.domAtPos(ai.length))}return si?new DOMPos(si.node,si.offset,!0):ws}nearest(ws){for(let oi=ws;oi;){let si=ContentView.get(oi);if(si&&si.rootView==this)return si;oi=oi.parentNode}return null}posFromDOM(ws,oi){let si=this.nearest(ws);if(!si)throw new RangeError("Trying to find position for a DOM position outside of the document");return si.localPosFromDOM(ws,oi)+si.posAtStart}domAtPos(ws){let{i:oi,off:si}=this.childCursor().findPos(ws,-1);for(;oi<this.children.length-1;){let ii=this.children[oi];if(si<ii.length||ii instanceof LineView)break;oi++,si=0}return this.children[oi].domAtPos(si)}coordsAt(ws,oi){let si=null,ii=0;for(let ai=this.length,li=this.children.length-1;li>=0;li--){let ci=this.children[li],ui=ai-ci.breakAfter,di=ui-ci.length;if(ui<ws)break;if(di<=ws&&(di<ws||ci.covers(-1))&&(ui>ws||ci.covers(1))&&(!si||ci instanceof LineView&&!(si instanceof LineView&&oi>=0)))si=ci,ii=di;else if(si&&di==ws&&ui==ws&&ci instanceof BlockWidgetView&&Math.abs(oi)<2){if(ci.deco.startSide<0)break;li&&(si=null)}ai=di}return si?si.coordsAt(ws-ii,oi):null}coordsForChar(ws){let{i:oi,off:si}=this.childPos(ws,1),ii=this.children[oi];if(!(ii instanceof LineView))return null;for(;ii.children.length;){let{i:ci,off:ui}=ii.childPos(si,1);for(;;ci++){if(ci==ii.children.length)return null;if((ii=ii.children[ci]).length)break}si=ui}if(!(ii instanceof TextView))return null;let ai=findClusterBreak(ii.text,si);if(ai==si)return null;let li=textRange(ii.dom,si,ai).getClientRects();for(let ci=0;ci<li.length;ci++){let ui=li[ci];if(ci==li.length-1||ui.top<ui.bottom&&ui.left<ui.right)return ui}return null}measureVisibleLineHeights(ws){let oi=[],{from:si,to:ii}=ws,ai=this.view.contentDOM.clientWidth,li=ai>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,ci=-1,ui=this.view.textDirection==Direction.LTR;for(let di=0,hi=0;hi<this.children.length;hi++){let pi=this.children[hi],ha=di+pi.length;if(ha>ii)break;if(di>=si){let ga=pi.dom.getBoundingClientRect();if(oi.push(ga.height),li){let va=pi.dom.lastChild,ba=va?clientRectsFor(va):[];if(ba.length){let wa=ba[ba.length-1],xa=ui?wa.right-ga.left:ga.right-wa.left;xa>ci&&(ci=xa,this.minWidth=ai,this.minWidthFrom=di,this.minWidthTo=ha)}}}di=ha+pi.breakAfter}return oi}textDirectionAt(ws){let{i:oi}=this.childPos(ws,1);return getComputedStyle(this.children[oi].dom).direction=="rtl"?Direction.RTL:Direction.LTR}measureTextSize(){for(let ai of this.children)if(ai instanceof LineView){let li=ai.measureTextSize();if(li)return li}let ws=document.createElement("div"),oi,si,ii;return ws.className="cm-line",ws.style.width="99999px",ws.style.position="absolute",ws.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(ws);let ai=clientRectsFor(ws.firstChild)[0];oi=ws.getBoundingClientRect().height,si=ai?ai.width/27:7,ii=ai?ai.height:oi,ws.remove()}),{lineHeight:oi,charWidth:si,textHeight:ii}}childCursor(ws=this.length){let oi=this.children.length;return oi&&(ws-=this.children[--oi].length),new ChildCursor(this.children,ws,oi)}computeBlockGapDeco(){let ws=[],oi=this.view.viewState;for(let si=0,ii=0;;ii++){let ai=ii==oi.viewports.length?null:oi.viewports[ii],li=ai?ai.from-1:this.length;if(li>si){let ci=(oi.lineBlockAt(li).bottom-oi.lineBlockAt(si).top)/this.view.scaleY;ws.push(Decoration.replace({widget:new BlockGapWidget(ci),block:!0,inclusive:!0,isBlockGap:!0}).range(si,li))}if(!ai)break;si=ai.to+1}return Decoration.set(ws)}updateDeco(){let ws=1,oi=this.view.state.facet(decorations).map(ai=>(this.dynamicDecorationMap[ws++]=typeof ai=="function")?ai(this.view):ai),si=!1,ii=this.view.state.facet(outerDecorations).map((ai,li)=>{let ci=typeof ai=="function";return ci&&(si=!0),ci?ai(this.view):ai});for(ii.length&&(this.dynamicDecorationMap[ws++]=si,oi.push(RangeSet.join(ii))),this.decorations=[this.editContextFormatting,...oi,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];ws<this.decorations.length;)this.dynamicDecorationMap[ws++]=!1;return this.decorations}scrollIntoView(ws){if(ws.isSnapshot){let di=this.view.viewState.lineBlockAt(ws.range.head);this.view.scrollDOM.scrollTop=di.top-ws.yMargin,this.view.scrollDOM.scrollLeft=ws.xMargin;return}for(let di of this.view.state.facet(scrollHandler))try{if(di(this.view,ws.range,ws))return!0}catch(hi){logException(this.view.state,hi,"scroll handler")}let{range:oi}=ws,si=this.coordsAt(oi.head,oi.empty?oi.assoc:oi.head>oi.anchor?-1:1),ii;if(!si)return;!oi.empty&&(ii=this.coordsAt(oi.anchor,oi.anchor>oi.head?-1:1))&&(si={left:Math.min(si.left,ii.left),top:Math.min(si.top,ii.top),right:Math.max(si.right,ii.right),bottom:Math.max(si.bottom,ii.bottom)});let ai=getScrollMargins(this.view),li={left:si.left-ai.left,top:si.top-ai.top,right:si.right+ai.right,bottom:si.bottom+ai.bottom},{offsetWidth:ci,offsetHeight:ui}=this.view.scrollDOM;scrollRectIntoView(this.view.scrollDOM,li,oi.head<oi.anchor?-1:1,ws.x,ws.y,Math.max(Math.min(ws.xMargin,ci),-ci),Math.max(Math.min(ws.yMargin,ui),-ui),this.view.textDirection==Direction.LTR)}}function betweenUneditable(Ws){return Ws.node.nodeType==1&&Ws.node.firstChild&&(Ws.offset==0||Ws.node.childNodes[Ws.offset-1].contentEditable=="false")&&(Ws.offset==Ws.node.childNodes.length||Ws.node.childNodes[Ws.offset].contentEditable=="false")}function findCompositionNode(Ws,ws){let oi=Ws.observer.selectionRange;if(!oi.focusNode)return null;let si=textNodeBefore(oi.focusNode,oi.focusOffset),ii=textNodeAfter(oi.focusNode,oi.focusOffset),ai=si||ii;if(ii&&si&&ii.node!=si.node){let ci=ContentView.get(ii.node);if(!ci||ci instanceof TextView&&ci.text!=ii.node.nodeValue)ai=ii;else if(Ws.docView.lastCompositionAfterCursor){let ui=ContentView.get(si.node);!ui||ui instanceof TextView&&ui.text!=si.node.nodeValue||(ai=ii)}}if(Ws.docView.lastCompositionAfterCursor=ai!=si,!ai)return null;let li=ws-ai.offset;return{from:li,to:li+ai.node.nodeValue.length,node:ai.node}}function findCompositionRange(Ws,ws,oi){let si=findCompositionNode(Ws,oi);if(!si)return null;let{node:ii,from:ai,to:li}=si,ci=ii.nodeValue;if(/[\n\r]/.test(ci)||Ws.state.doc.sliceString(si.from,si.to)!=ci)return null;let ui=ws.invertedDesc,di=new ChangedRange(ui.mapPos(ai),ui.mapPos(li),ai,li),hi=[];for(let pi=ii.parentNode;;pi=pi.parentNode){let ha=ContentView.get(pi);if(ha instanceof MarkView)hi.push({node:pi,deco:ha.mark});else{if(ha instanceof LineView||pi.nodeName=="DIV"&&pi.parentNode==Ws.contentDOM)return{range:di,text:ii,marks:hi,line:pi};if(pi!=Ws.contentDOM)hi.push({node:pi,deco:new MarkDecoration({inclusive:!0,attributes:getAttrs(pi),tagName:pi.tagName.toLowerCase()})});else return null}}}function nextToUneditable(Ws,ws){return Ws.nodeType!=1?0:(ws&&Ws.childNodes[ws-1].contentEditable=="false"?1:0)|(ws<Ws.childNodes.length&&Ws.childNodes[ws].contentEditable=="false"?2:0)}let DecorationComparator$1=class{constructor(){this.changes=[]}compareRange(Ws,ws){addRange(Ws,ws,this.changes)}comparePoint(Ws,ws){addRange(Ws,ws,this.changes)}boundChange(Ws){addRange(Ws,Ws,this.changes)}};function findChangedDeco(Ws,ws,oi){let si=new DecorationComparator$1;return RangeSet.compare(Ws,ws,oi,si),si.changes}function inUneditable(Ws,ws){for(let oi=Ws;oi&&oi!=ws;oi=oi.assignedSlot||oi.parentNode)if(oi.nodeType==1&&oi.contentEditable=="false")return!0;return!1}function touchesComposition(Ws,ws){let oi=!1;return ws&&Ws.iterChangedRanges((si,ii)=>{si<ws.to&&ii>ws.from&&(oi=!0)}),oi}function groupAt(Ws,ws,oi=1){let si=Ws.charCategorizer(ws),ii=Ws.doc.lineAt(ws),ai=ws-ii.from;if(ii.length==0)return EditorSelection.cursor(ws);ai==0?oi=1:ai==ii.length&&(oi=-1);let li=ai,ci=ai;oi<0?li=findClusterBreak(ii.text,ai,!1):ci=findClusterBreak(ii.text,ai);let ui=si(ii.text.slice(li,ci));for(;li>0;){let di=findClusterBreak(ii.text,li,!1);if(si(ii.text.slice(di,li))!=ui)break;li=di}for(;ci<ii.length;){let di=findClusterBreak(ii.text,ci);if(si(ii.text.slice(ci,di))!=ui)break;ci=di}return EditorSelection.range(li+ii.from,ci+ii.from)}function getdx(Ws,ws){return ws.left>Ws?ws.left-Ws:Math.max(0,Ws-ws.right)}function getdy(Ws,ws){return ws.top>Ws?ws.top-Ws:Math.max(0,Ws-ws.bottom)}function yOverlap(Ws,ws){return Ws.top<ws.bottom-1&&Ws.bottom>ws.top+1}function upTop(Ws,ws){return ws<Ws.top?{top:ws,left:Ws.left,right:Ws.right,bottom:Ws.bottom}:Ws}function upBot(Ws,ws){return ws>Ws.bottom?{top:Ws.top,left:Ws.left,right:Ws.right,bottom:ws}:Ws}function domPosAtCoords(Ws,ws,oi){let si,ii,ai,li,ci=!1,ui,di,hi,pi;for(let va=Ws.firstChild;va;va=va.nextSibling){let ba=clientRectsFor(va);for(let wa=0;wa<ba.length;wa++){let xa=ba[wa];ii&&yOverlap(ii,xa)&&(xa=upTop(upBot(xa,ii.bottom),ii.top));let Ca=getdx(ws,xa),el=getdy(oi,xa);if(Ca==0&&el==0)return va.nodeType==3?domPosInText(va,ws,oi):domPosAtCoords(va,ws,oi);if(!si||li>el||li==el&&ai>Ca){si=va,ii=xa,ai=Ca,li=el;let ku=el?oi<xa.top?-1:1:Ca?ws<xa.left?-1:1:0;ci=!ku||(ku>0?wa<ba.length-1:wa>0)}Ca==0?oi>xa.bottom&&(!hi||hi.bottom<xa.bottom)?(ui=va,hi=xa):oi<xa.top&&(!pi||pi.top>xa.top)&&(di=va,pi=xa):hi&&yOverlap(hi,xa)?hi=upBot(hi,xa.bottom):pi&&yOverlap(pi,xa)&&(pi=upTop(pi,xa.top))}}if(hi&&hi.bottom>=oi?(si=ui,ii=hi):pi&&pi.top<=oi&&(si=di,ii=pi),!si)return{node:Ws,offset:0};let ha=Math.max(ii.left,Math.min(ii.right,ws));if(si.nodeType==3)return domPosInText(si,ha,oi);if(ci&&si.contentEditable!="false")return domPosAtCoords(si,ha,oi);let ga=Array.prototype.indexOf.call(Ws.childNodes,si)+(ws>=(ii.left+ii.right)/2?1:0);return{node:Ws,offset:ga}}function domPosInText(Ws,ws,oi){let si=Ws.nodeValue.length,ii=-1,ai=1e9,li=0;for(let ci=0;ci<si;ci++){let ui=textRange(Ws,ci,ci+1).getClientRects();for(let di=0;di<ui.length;di++){let hi=ui[di];if(hi.top==hi.bottom)continue;li||(li=ws-hi.left);let pi=(hi.top>oi?hi.top-oi:oi-hi.bottom)-1;if(hi.left-1<=ws&&hi.right+1>=ws&&pi<ai){let ha=ws>=(hi.left+hi.right)/2,ga=ha;if((browser.chrome||browser.gecko)&&textRange(Ws,ci).getBoundingClientRect().left==hi.right&&(ga=!ha),pi<=0)return{node:Ws,offset:ci+(ga?1:0)};ii=ci+(ga?1:0),ai=pi}}}return{node:Ws,offset:ii>-1?ii:li>0?Ws.nodeValue.length:0}}function posAtCoords(Ws,ws,oi,si=-1){var ii,ai;let li=Ws.contentDOM.getBoundingClientRect(),ci=li.top+Ws.viewState.paddingTop,ui,{docHeight:di}=Ws.viewState,{x:hi,y:pi}=ws,ha=pi-ci;if(ha<0)return 0;if(ha>di)return Ws.state.doc.length;for(let ku=Ws.viewState.heightOracle.textHeight/2,gd=!1;ui=Ws.elementAtHeight(ha),ui.type!=BlockType.Text;)for(;ha=si>0?ui.bottom+ku:ui.top-ku,!(ha>=0&&ha<=di);){if(gd)return oi?null:0;gd=!0,si=-si}pi=ci+ha;let ga=ui.from;if(ga<Ws.viewport.from)return Ws.viewport.from==0?0:oi?null:posAtCoordsImprecise(Ws,li,ui,hi,pi);if(ga>Ws.viewport.to)return Ws.viewport.to==Ws.state.doc.length?Ws.state.doc.length:oi?null:posAtCoordsImprecise(Ws,li,ui,hi,pi);let va=Ws.dom.ownerDocument,ba=Ws.root.elementFromPoint?Ws.root:va,wa=ba.elementFromPoint(hi,pi);wa&&!Ws.contentDOM.contains(wa)&&(wa=null),wa||(hi=Math.max(li.left+1,Math.min(li.right-1,hi)),wa=ba.elementFromPoint(hi,pi),wa&&!Ws.contentDOM.contains(wa)&&(wa=null));let xa,Ca=-1;if(wa&&((ii=Ws.docView.nearest(wa))===null||ii===void 0?void 0:ii.isEditable)!=!1){if(va.caretPositionFromPoint){let ku=va.caretPositionFromPoint(hi,pi);ku&&({offsetNode:xa,offset:Ca}=ku)}else if(va.caretRangeFromPoint){let ku=va.caretRangeFromPoint(hi,pi);ku&&({startContainer:xa,startOffset:Ca}=ku,(!Ws.contentDOM.contains(xa)||browser.safari&&isSuspiciousSafariCaretResult(xa,Ca,hi)||browser.chrome&&isSuspiciousChromeCaretResult(xa,Ca,hi))&&(xa=void 0))}xa&&(Ca=Math.min(maxOffset(xa),Ca))}if(!xa||!Ws.docView.dom.contains(xa)){let ku=LineView.find(Ws.docView,ga);if(!ku)return ha>ui.top+ui.height/2?ui.to:ui.from;({node:xa,offset:Ca}=domPosAtCoords(ku.dom,hi,pi))}let el=Ws.docView.nearest(xa);if(!el)return null;if(el.isWidget&&((ai=el.dom)===null||ai===void 0?void 0:ai.nodeType)==1){let ku=el.dom.getBoundingClientRect();return ws.y<ku.top||ws.y<=ku.bottom&&ws.x<=(ku.left+ku.right)/2?el.posAtStart:el.posAtEnd}else return el.localPosFromDOM(xa,Ca)+el.posAtStart}function posAtCoordsImprecise(Ws,ws,oi,si,ii){let ai=Math.round((si-ws.left)*Ws.defaultCharacterWidth);if(Ws.lineWrapping&&oi.height>Ws.defaultLineHeight*1.5){let ci=Ws.viewState.heightOracle.textHeight,ui=Math.floor((ii-oi.top-(Ws.defaultLineHeight-ci)*.5)/ci);ai+=ui*Ws.viewState.heightOracle.lineLength}let li=Ws.state.sliceDoc(oi.from,oi.to);return oi.from+findColumn(li,ai,Ws.state.tabSize)}function isSuspiciousSafariCaretResult(Ws,ws,oi){let si;if(Ws.nodeType!=3||ws!=(si=Ws.nodeValue.length))return!1;for(let ii=Ws.nextSibling;ii;ii=ii.nextSibling)if(ii.nodeType!=1||ii.nodeName!="BR")return!1;return textRange(Ws,si-1,si).getBoundingClientRect().left>oi}function isSuspiciousChromeCaretResult(Ws,ws,oi){if(ws!=0)return!1;for(let ii=Ws;;){let ai=ii.parentNode;if(!ai||ai.nodeType!=1||ai.firstChild!=ii)return!1;if(ai.classList.contains("cm-line"))break;ii=ai}let si=Ws.nodeType==1?Ws.getBoundingClientRect():textRange(Ws,0,Math.max(Ws.nodeValue.length,1)).getBoundingClientRect();return oi-si.left>5}function blockAt(Ws,ws){let oi=Ws.lineBlockAt(ws);if(Array.isArray(oi.type)){for(let si of oi.type)if(si.to>ws||si.to==ws&&(si.to==oi.to||si.type==BlockType.Text))return si}return oi}function moveToLineBoundary(Ws,ws,oi,si){let ii=blockAt(Ws,ws.head),ai=!si||ii.type!=BlockType.Text||!(Ws.lineWrapping||ii.widgetLineBreaks)?null:Ws.coordsAtPos(ws.assoc<0&&ws.head>ii.from?ws.head-1:ws.head);if(ai){let li=Ws.dom.getBoundingClientRect(),ci=Ws.textDirectionAt(ii.from),ui=Ws.posAtCoords({x:oi==(ci==Direction.LTR)?li.right-1:li.left+1,y:(ai.top+ai.bottom)/2});if(ui!=null)return EditorSelection.cursor(ui,oi?-1:1)}return EditorSelection.cursor(oi?ii.to:ii.from,oi?-1:1)}function moveByChar(Ws,ws,oi,si){let ii=Ws.state.doc.lineAt(ws.head),ai=Ws.bidiSpans(ii),li=Ws.textDirectionAt(ii.from);for(let ci=ws,ui=null;;){let di=moveVisually(ii,ai,li,ci,oi),hi=movedOver;if(!di){if(ii.number==(oi?Ws.state.doc.lines:1))return ci;hi=`
|
|
319
319
|
`,ii=Ws.state.doc.line(ii.number+(oi?1:-1)),ai=Ws.bidiSpans(ii),di=Ws.visualLineSide(ii,!oi)}if(ui){if(!ui(hi))return ci}else{if(!si)return di;ui=si(hi)}ci=di}}function byGroup(Ws,ws,oi){let si=Ws.state.charCategorizer(ws),ii=si(oi);return ai=>{let li=si(ai);return ii==CharCategory.Space&&(ii=li),ii==li}}function moveVertically(Ws,ws,oi,si){let ii=ws.head,ai=oi?1:-1;if(ii==(oi?Ws.state.doc.length:0))return EditorSelection.cursor(ii,ws.assoc);let li=ws.goalColumn,ci,ui=Ws.contentDOM.getBoundingClientRect(),di=Ws.coordsAtPos(ii,ws.assoc||-1),hi=Ws.documentTop;if(di)li==null&&(li=di.left-ui.left),ci=ai<0?di.top:di.bottom;else{let ga=Ws.viewState.lineBlockAt(ii);li==null&&(li=Math.min(ui.right-ui.left,Ws.defaultCharacterWidth*(ii-ga.from))),ci=(ai<0?ga.top:ga.bottom)+hi}let pi=ui.left+li,ha=si??Ws.viewState.heightOracle.textHeight>>1;for(let ga=0;;ga+=10){let va=ci+(ha+ga)*ai,ba=posAtCoords(Ws,{x:pi,y:va},!1,ai);if(va<ui.top||va>ui.bottom||(ai<0?ba<ii:ba>ii)){let wa=Ws.docView.coordsForChar(ba),xa=!wa||va<wa.top?-1:1;return EditorSelection.cursor(ba,xa,void 0,li)}}}function skipAtomicRanges(Ws,ws,oi){for(;;){let si=0;for(let ii of Ws)ii.between(ws-1,ws+1,(ai,li,ci)=>{if(ws>ai&&ws<li){let ui=si||oi||(ws-ai<li-ws?-1:1);ws=ui<0?ai:li,si=ui}});if(!si)return ws}}function skipAtoms(Ws,ws,oi){let si=skipAtomicRanges(Ws.state.facet(atomicRanges).map(ii=>ii(Ws)),oi.from,ws.head>oi.from?-1:1);return si==oi.from?oi:EditorSelection.cursor(si,si<oi.from?1:-1)}const LineBreakPlaceholder="";class DOMReader{constructor(ws,oi){this.points=ws,this.text="",this.lineSeparator=oi.facet(EditorState.lineSeparator)}append(ws){this.text+=ws}lineBreak(){this.text+=LineBreakPlaceholder}readRange(ws,oi){if(!ws)return this;let si=ws.parentNode;for(let ii=ws;;){this.findPointBefore(si,ii);let ai=this.text.length;this.readNode(ii);let li=ii.nextSibling;if(li==oi)break;let ci=ContentView.get(ii),ui=ContentView.get(li);(ci&&ui?ci.breakAfter:(ci?ci.breakAfter:isBlockElement(ii))||isBlockElement(li)&&(ii.nodeName!="BR"||ii.cmIgnore)&&this.text.length>ai)&&this.lineBreak(),ii=li}return this.findPointBefore(si,oi),this}readTextNode(ws){let oi=ws.nodeValue;for(let si of this.points)si.node==ws&&(si.pos=this.text.length+Math.min(si.offset,oi.length));for(let si=0,ii=this.lineSeparator?null:/\r\n?|\n/g;;){let ai=-1,li=1,ci;if(this.lineSeparator?(ai=oi.indexOf(this.lineSeparator,si),li=this.lineSeparator.length):(ci=ii.exec(oi))&&(ai=ci.index,li=ci[0].length),this.append(oi.slice(si,ai<0?oi.length:ai)),ai<0)break;if(this.lineBreak(),li>1)for(let ui of this.points)ui.node==ws&&ui.pos>this.text.length&&(ui.pos-=li-1);si=ai+li}}readNode(ws){if(ws.cmIgnore)return;let oi=ContentView.get(ws),si=oi&&oi.overrideDOMText;if(si!=null){this.findPointInside(ws,si.length);for(let ii=si.iter();!ii.next().done;)ii.lineBreak?this.lineBreak():this.append(ii.value)}else ws.nodeType==3?this.readTextNode(ws):ws.nodeName=="BR"?ws.nextSibling&&this.lineBreak():ws.nodeType==1&&this.readRange(ws.firstChild,null)}findPointBefore(ws,oi){for(let si of this.points)si.node==ws&&ws.childNodes[si.offset]==oi&&(si.pos=this.text.length)}findPointInside(ws,oi){for(let si of this.points)(ws.nodeType==3?si.node==ws:ws.contains(si.node))&&(si.pos=this.text.length+(isAtEnd(ws,si.node,si.offset)?oi:0))}}function isAtEnd(Ws,ws,oi){for(;;){if(!ws||oi<maxOffset(ws))return!1;if(ws==Ws)return!0;oi=domIndex(ws)+1,ws=ws.parentNode}}class DOMPoint{constructor(ws,oi){this.node=ws,this.offset=oi,this.pos=-1}}class DOMChange{constructor(ws,oi,si,ii){this.typeOver=ii,this.bounds=null,this.text="",this.domChanged=oi>-1;let{impreciseHead:ai,impreciseAnchor:li}=ws.docView;if(ws.state.readOnly&&oi>-1)this.newSel=null;else if(oi>-1&&(this.bounds=ws.docView.domBoundsAround(oi,si,0))){let ci=ai||li?[]:selectionPoints(ws),ui=new DOMReader(ci,ws.state);ui.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=ui.text,this.newSel=selectionFromPoints(ci,this.bounds.from)}else{let ci=ws.observer.selectionRange,ui=ai&&ai.node==ci.focusNode&&ai.offset==ci.focusOffset||!contains(ws.contentDOM,ci.focusNode)?ws.state.selection.main.head:ws.docView.posFromDOM(ci.focusNode,ci.focusOffset),di=li&&li.node==ci.anchorNode&&li.offset==ci.anchorOffset||!contains(ws.contentDOM,ci.anchorNode)?ws.state.selection.main.anchor:ws.docView.posFromDOM(ci.anchorNode,ci.anchorOffset),hi=ws.viewport;if((browser.ios||browser.chrome)&&ws.state.selection.main.empty&&ui!=di&&(hi.from>0||hi.to<ws.state.doc.length)){let pi=Math.min(ui,di),ha=Math.max(ui,di),ga=hi.from-pi,va=hi.to-ha;(ga==0||ga==1||pi==0)&&(va==0||va==-1||ha==ws.state.doc.length)&&(ui=0,di=ws.state.doc.length)}this.newSel=EditorSelection.single(di,ui)}}}function applyDOMChange(Ws,ws){let oi,{newSel:si}=ws,ii=Ws.state.selection.main,ai=Ws.inputState.lastKeyTime>Date.now()-100?Ws.inputState.lastKeyCode:-1;if(ws.bounds){let{from:li,to:ci}=ws.bounds,ui=ii.from,di=null;(ai===8||browser.android&&ws.text.length<ci-li)&&(ui=ii.to,di="end");let hi=findDiff(Ws.state.doc.sliceString(li,ci,LineBreakPlaceholder),ws.text,ui-li,di);hi&&(browser.chrome&&ai==13&&hi.toB==hi.from+2&&ws.text.slice(hi.from,hi.toB)==LineBreakPlaceholder+LineBreakPlaceholder&&hi.toB--,oi={from:li+hi.from,to:li+hi.toA,insert:Text.of(ws.text.slice(hi.from,hi.toB).split(LineBreakPlaceholder))})}else si&&(!Ws.hasFocus&&Ws.state.facet(editable)||si.main.eq(ii))&&(si=null);if(!oi&&!si)return!1;if(!oi&&ws.typeOver&&!ii.empty&&si&&si.main.empty?oi={from:ii.from,to:ii.to,insert:Ws.state.doc.slice(ii.from,ii.to)}:(browser.mac||browser.android)&&oi&&oi.from==oi.to&&oi.from==ii.head-1&&/^\. ?$/.test(oi.insert.toString())&&Ws.contentDOM.getAttribute("autocorrect")=="off"?(si&&oi.insert.length==2&&(si=EditorSelection.single(si.main.anchor-1,si.main.head-1)),oi={from:oi.from,to:oi.to,insert:Text.of([oi.insert.toString().replace("."," ")])}):oi&&oi.from>=ii.from&&oi.to<=ii.to&&(oi.from!=ii.from||oi.to!=ii.to)&&ii.to-ii.from-(oi.to-oi.from)<=4?oi={from:ii.from,to:ii.to,insert:Ws.state.doc.slice(ii.from,oi.from).append(oi.insert).append(Ws.state.doc.slice(oi.to,ii.to))}:browser.chrome&&oi&&oi.from==oi.to&&oi.from==ii.head&&oi.insert.toString()==`
|
|
320
320
|
`&&Ws.lineWrapping&&(si&&(si=EditorSelection.single(si.main.anchor-1,si.main.head-1)),oi={from:ii.from,to:ii.to,insert:Text.of([" "])}),oi)return applyDOMChangeInner(Ws,oi,si,ai);if(si&&!si.main.eq(ii)){let li=!1,ci="select";return Ws.inputState.lastSelectionTime>Date.now()-50&&(Ws.inputState.lastSelectionOrigin=="select"&&(li=!0),ci=Ws.inputState.lastSelectionOrigin),Ws.dispatch({selection:si,scrollIntoView:li,userEvent:ci}),!0}else return!1}function applyDOMChangeInner(Ws,ws,oi,si=-1){if(browser.ios&&Ws.inputState.flushIOSKey(ws))return!0;let ii=Ws.state.selection.main;if(browser.android&&(ws.to==ii.to&&(ws.from==ii.from||ws.from==ii.from-1&&Ws.state.sliceDoc(ws.from,ii.from)==" ")&&ws.insert.length==1&&ws.insert.lines==2&&dispatchKey(Ws.contentDOM,"Enter",13)||(ws.from==ii.from-1&&ws.to==ii.to&&ws.insert.length==0||si==8&&ws.insert.length<ws.to-ws.from&&ws.to>ii.head)&&dispatchKey(Ws.contentDOM,"Backspace",8)||ws.from==ii.from&&ws.to==ii.to+1&&ws.insert.length==0&&dispatchKey(Ws.contentDOM,"Delete",46)))return!0;let ai=ws.insert.toString();Ws.inputState.composing>=0&&Ws.inputState.composing++;let li,ci=()=>li||(li=applyDefaultInsert(Ws,ws,oi));return Ws.state.facet(inputHandler$1).some(ui=>ui(Ws,ws.from,ws.to,ai,ci))||Ws.dispatch(ci()),!0}function applyDefaultInsert(Ws,ws,oi){let si,ii=Ws.state,ai=ii.selection.main;if(ws.from>=ai.from&&ws.to<=ai.to&&ws.to-ws.from>=(ai.to-ai.from)/3&&(!oi||oi.main.empty&&oi.main.from==ws.from+ws.insert.length)&&Ws.inputState.composing<0){let ci=ai.from<ws.from?ii.sliceDoc(ai.from,ws.from):"",ui=ai.to>ws.to?ii.sliceDoc(ws.to,ai.to):"";si=ii.replaceSelection(Ws.state.toText(ci+ws.insert.sliceString(0,void 0,Ws.state.lineBreak)+ui))}else{let ci=ii.changes(ws),ui=oi&&oi.main.to<=ci.newLength?oi.main:void 0;if(ii.selection.ranges.length>1&&Ws.inputState.composing>=0&&ws.to<=ai.to&&ws.to>=ai.to-10){let di=Ws.state.sliceDoc(ws.from,ws.to),hi,pi=oi&&findCompositionNode(Ws,oi.main.head);if(pi){let va=ws.insert.length-(ws.to-ws.from);hi={from:pi.from,to:pi.to-va}}else hi=Ws.state.doc.lineAt(ai.head);let ha=ai.to-ws.to,ga=ai.to-ai.from;si=ii.changeByRange(va=>{if(va.from==ai.from&&va.to==ai.to)return{changes:ci,range:ui||va.map(ci)};let ba=va.to-ha,wa=ba-di.length;if(va.to-va.from!=ga||Ws.state.sliceDoc(wa,ba)!=di||va.to>=hi.from&&va.from<=hi.to)return{range:va};let xa=ii.changes({from:wa,to:ba,insert:ws.insert}),Ca=va.to-ai.to;return{changes:xa,range:ui?EditorSelection.range(Math.max(0,ui.anchor+Ca),Math.max(0,ui.head+Ca)):va.map(xa)}})}else si={changes:ci,selection:ui&&ii.selection.replaceRange(ui)}}let li="input.type";return(Ws.composing||Ws.inputState.compositionPendingChange&&Ws.inputState.compositionEndedAt>Date.now()-50)&&(Ws.inputState.compositionPendingChange=!1,li+=".compose",Ws.inputState.compositionFirstChange&&(li+=".start",Ws.inputState.compositionFirstChange=!1)),ii.update(si,{userEvent:li,scrollIntoView:!0})}function findDiff(Ws,ws,oi,si){let ii=Math.min(Ws.length,ws.length),ai=0;for(;ai<ii&&Ws.charCodeAt(ai)==ws.charCodeAt(ai);)ai++;if(ai==ii&&Ws.length==ws.length)return null;let li=Ws.length,ci=ws.length;for(;li>0&&ci>0&&Ws.charCodeAt(li-1)==ws.charCodeAt(ci-1);)li--,ci--;if(si=="end"){let ui=Math.max(0,ai-Math.min(li,ci));oi-=li+ui-ai}if(li<ai&&Ws.length<ws.length){let ui=oi<=ai&&oi>=li?ai-oi:0;ai-=ui,ci=ai+(ci-li),li=ai}else if(ci<ai){let ui=oi<=ai&&oi>=ci?ai-oi:0;ai-=ui,li=ai+(li-ci),ci=ai}return{from:ai,toA:li,toB:ci}}function selectionPoints(Ws){let ws=[];if(Ws.root.activeElement!=Ws.contentDOM)return ws;let{anchorNode:oi,anchorOffset:si,focusNode:ii,focusOffset:ai}=Ws.observer.selectionRange;return oi&&(ws.push(new DOMPoint(oi,si)),(ii!=oi||ai!=si)&&ws.push(new DOMPoint(ii,ai))),ws}function selectionFromPoints(Ws,ws){if(Ws.length==0)return null;let oi=Ws[0].pos,si=Ws.length==2?Ws[1].pos:oi;return oi>-1&&si>-1?EditorSelection.single(oi+ws,si+ws):null}class InputState{setSelectionOrigin(ws){this.lastSelectionOrigin=ws,this.lastSelectionTime=Date.now()}constructor(ws){this.view=ws,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=ws.hasFocus,browser.safari&&ws.contentDOM.addEventListener("input",()=>null),browser.gecko&&firefoxCopyCutHack(ws.contentDOM.ownerDocument)}handleEvent(ws){!eventBelongsToEditor(this.view,ws)||this.ignoreDuringComposition(ws)||ws.type=="keydown"&&this.keydown(ws)||this.runHandlers(ws.type,ws)}runHandlers(ws,oi){let si=this.handlers[ws];if(si){for(let ii of si.observers)ii(this.view,oi);for(let ii of si.handlers){if(oi.defaultPrevented)break;if(ii(this.view,oi)){oi.preventDefault();break}}}}ensureHandlers(ws){let oi=computeHandlers(ws),si=this.handlers,ii=this.view.contentDOM;for(let ai in oi)if(ai!="scroll"){let li=!oi[ai].handlers.length,ci=si[ai];ci&&li!=!ci.handlers.length&&(ii.removeEventListener(ai,this.handleEvent),ci=null),ci||ii.addEventListener(ai,this.handleEvent,{passive:li})}for(let ai in si)ai!="scroll"&&!oi[ai]&&ii.removeEventListener(ai,this.handleEvent);this.handlers=oi}keydown(ws){if(this.lastKeyCode=ws.keyCode,this.lastKeyTime=Date.now(),ws.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&ws.keyCode!=27&&modifierCodes.indexOf(ws.keyCode)<0&&(this.tabFocusMode=-1),browser.android&&browser.chrome&&!ws.synthetic&&(ws.keyCode==13||ws.keyCode==8))return this.view.observer.delayAndroidKey(ws.key,ws.keyCode),!0;let oi;return browser.ios&&!ws.synthetic&&!ws.altKey&&!ws.metaKey&&((oi=PendingKeys.find(si=>si.keyCode==ws.keyCode))&&!ws.ctrlKey||EmacsyPendingKeys.indexOf(ws.key)>-1&&ws.ctrlKey&&!ws.shiftKey)?(this.pendingIOSKey=oi||ws,setTimeout(()=>this.flushIOSKey(),250),!0):(ws.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(ws){let oi=this.pendingIOSKey;return!oi||oi.key=="Enter"&&ws&&ws.from<ws.to&&/^\S+$/.test(ws.insert.toString())?!1:(this.pendingIOSKey=void 0,dispatchKey(this.view.contentDOM,oi.key,oi.keyCode,oi instanceof KeyboardEvent?oi:void 0))}ignoreDuringComposition(ws){return/^key/.test(ws.type)?this.composing>0?!0:browser.safari&&!browser.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(ws){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=ws}update(ws){this.view.observer.update(ws),this.mouseSelection&&this.mouseSelection.update(ws),this.draggedContent&&ws.docChanged&&(this.draggedContent=this.draggedContent.map(ws.changes)),ws.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function bindHandler(Ws,ws){return(oi,si)=>{try{return ws.call(Ws,si,oi)}catch(ii){logException(oi.state,ii)}}}function computeHandlers(Ws){let ws=Object.create(null);function oi(si){return ws[si]||(ws[si]={observers:[],handlers:[]})}for(let si of Ws){let ii=si.spec;if(ii&&ii.domEventHandlers)for(let ai in ii.domEventHandlers){let li=ii.domEventHandlers[ai];li&&oi(ai).handlers.push(bindHandler(si.value,li))}if(ii&&ii.domEventObservers)for(let ai in ii.domEventObservers){let li=ii.domEventObservers[ai];li&&oi(ai).observers.push(bindHandler(si.value,li))}}for(let si in handlers)oi(si).handlers.push(handlers[si]);for(let si in observers)oi(si).observers.push(observers[si]);return ws}const PendingKeys=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],EmacsyPendingKeys="dthko",modifierCodes=[16,17,18,20,91,92,224,225],dragScrollMargin=6;function dragScrollSpeed(Ws){return Math.max(0,Ws)*.7+8}function dist(Ws,ws){return Math.max(Math.abs(Ws.clientX-ws.clientX),Math.abs(Ws.clientY-ws.clientY))}class MouseSelection{constructor(ws,oi,si,ii){this.view=ws,this.startEvent=oi,this.style=si,this.mustSelect=ii,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=oi,this.scrollParents=scrollableParents(ws.contentDOM),this.atoms=ws.state.facet(atomicRanges).map(li=>li(ws));let ai=ws.contentDOM.ownerDocument;ai.addEventListener("mousemove",this.move=this.move.bind(this)),ai.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=oi.shiftKey,this.multiple=ws.state.facet(EditorState.allowMultipleSelections)&&addsSelectionRange(ws,oi),this.dragging=isInPrimarySelection(ws,oi)&&getClickType(oi)==1?null:!1}start(ws){this.dragging===!1&&this.select(ws)}move(ws){if(ws.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&dist(this.startEvent,ws)<10)return;this.select(this.lastEvent=ws);let oi=0,si=0,ii=0,ai=0,li=this.view.win.innerWidth,ci=this.view.win.innerHeight;this.scrollParents.x&&({left:ii,right:li}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:ai,bottom:ci}=this.scrollParents.y.getBoundingClientRect());let ui=getScrollMargins(this.view);ws.clientX-ui.left<=ii+dragScrollMargin?oi=-dragScrollSpeed(ii-ws.clientX):ws.clientX+ui.right>=li-dragScrollMargin&&(oi=dragScrollSpeed(ws.clientX-li)),ws.clientY-ui.top<=ai+dragScrollMargin?si=-dragScrollSpeed(ai-ws.clientY):ws.clientY+ui.bottom>=ci-dragScrollMargin&&(si=dragScrollSpeed(ws.clientY-ci)),this.setScrollSpeed(oi,si)}up(ws){this.dragging==null&&this.select(this.lastEvent),this.dragging||ws.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let ws=this.view.contentDOM.ownerDocument;ws.removeEventListener("mousemove",this.move),ws.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(ws,oi){this.scrollSpeed={x:ws,y:oi},ws||oi?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:ws,y:oi}=this.scrollSpeed;ws&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=ws,ws=0),oi&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=oi,oi=0),(ws||oi)&&this.view.win.scrollBy(ws,oi),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(ws){let oi=null;for(let si=0;si<ws.ranges.length;si++){let ii=ws.ranges[si],ai=null;if(ii.empty){let li=skipAtomicRanges(this.atoms,ii.from,0);li!=ii.from&&(ai=EditorSelection.cursor(li,-1))}else{let li=skipAtomicRanges(this.atoms,ii.from,-1),ci=skipAtomicRanges(this.atoms,ii.to,1);(li!=ii.from||ci!=ii.to)&&(ai=EditorSelection.range(ii.from==ii.anchor?li:ci,ii.from==ii.head?li:ci))}ai&&(oi||(oi=ws.ranges.slice()),oi[si]=ai)}return oi?EditorSelection.create(oi,ws.mainIndex):ws}select(ws){let{view:oi}=this,si=this.skipAtoms(this.style.get(ws,this.extend,this.multiple));(this.mustSelect||!si.eq(oi.state.selection,this.dragging===!1))&&this.view.dispatch({selection:si,userEvent:"select.pointer"}),this.mustSelect=!1}update(ws){ws.transactions.some(oi=>oi.isUserEvent("input.type"))?this.destroy():this.style.update(ws)&&setTimeout(()=>this.select(this.lastEvent),20)}}function addsSelectionRange(Ws,ws){let oi=Ws.state.facet(clickAddsSelectionRange);return oi.length?oi[0](ws):browser.mac?ws.metaKey:ws.ctrlKey}function dragMovesSelection(Ws,ws){let oi=Ws.state.facet(dragMovesSelection$1);return oi.length?oi[0](ws):browser.mac?!ws.altKey:!ws.ctrlKey}function isInPrimarySelection(Ws,ws){let{main:oi}=Ws.state.selection;if(oi.empty)return!1;let si=getSelection(Ws.root);if(!si||si.rangeCount==0)return!0;let ii=si.getRangeAt(0).getClientRects();for(let ai=0;ai<ii.length;ai++){let li=ii[ai];if(li.left<=ws.clientX&&li.right>=ws.clientX&&li.top<=ws.clientY&&li.bottom>=ws.clientY)return!0}return!1}function eventBelongsToEditor(Ws,ws){if(!ws.bubbles)return!0;if(ws.defaultPrevented)return!1;for(let oi=ws.target,si;oi!=Ws.contentDOM;oi=oi.parentNode)if(!oi||oi.nodeType==11||(si=ContentView.get(oi))&&si.ignoreEvent(ws))return!1;return!0}const handlers=Object.create(null),observers=Object.create(null),brokenClipboardAPI=browser.ie&&browser.ie_version<15||browser.ios&&browser.webkit_version<604;function capturePaste(Ws){let ws=Ws.dom.parentNode;if(!ws)return;let oi=ws.appendChild(document.createElement("textarea"));oi.style.cssText="position: fixed; left: -10000px; top: 10px",oi.focus(),setTimeout(()=>{Ws.focus(),oi.remove(),doPaste(Ws,oi.value)},50)}function textFilter(Ws,ws,oi){for(let si of Ws.facet(ws))oi=si(oi,Ws);return oi}function doPaste(Ws,ws){ws=textFilter(Ws.state,clipboardInputFilter,ws);let{state:oi}=Ws,si,ii=1,ai=oi.toText(ws),li=ai.lines==oi.selection.ranges.length;if(lastLinewiseCopy!=null&&oi.selection.ranges.every(ci=>ci.empty)&&lastLinewiseCopy==ai.toString()){let ci=-1;si=oi.changeByRange(ui=>{let di=oi.doc.lineAt(ui.from);if(di.from==ci)return{range:ui};ci=di.from;let hi=oi.toText((li?ai.line(ii++).text:ws)+oi.lineBreak);return{changes:{from:di.from,insert:hi},range:EditorSelection.cursor(ui.from+hi.length)}})}else li?si=oi.changeByRange(ci=>{let ui=ai.line(ii++);return{changes:{from:ci.from,to:ci.to,insert:ui.text},range:EditorSelection.cursor(ci.from+ui.length)}}):si=oi.replaceSelection(ai);Ws.dispatch(si,{userEvent:"input.paste",scrollIntoView:!0})}observers.scroll=Ws=>{Ws.inputState.lastScrollTop=Ws.scrollDOM.scrollTop,Ws.inputState.lastScrollLeft=Ws.scrollDOM.scrollLeft};handlers.keydown=(Ws,ws)=>(Ws.inputState.setSelectionOrigin("select"),ws.keyCode==27&&Ws.inputState.tabFocusMode!=0&&(Ws.inputState.tabFocusMode=Date.now()+2e3),!1);observers.touchstart=(Ws,ws)=>{Ws.inputState.lastTouchTime=Date.now(),Ws.inputState.setSelectionOrigin("select.pointer")};observers.touchmove=Ws=>{Ws.inputState.setSelectionOrigin("select.pointer")};handlers.mousedown=(Ws,ws)=>{if(Ws.observer.flush(),Ws.inputState.lastTouchTime>Date.now()-2e3)return!1;let oi=null;for(let si of Ws.state.facet(mouseSelectionStyle))if(oi=si(Ws,ws),oi)break;if(!oi&&ws.button==0&&(oi=basicMouseSelection(Ws,ws)),oi){let si=!Ws.hasFocus;Ws.inputState.startMouseSelection(new MouseSelection(Ws,ws,oi,si)),si&&Ws.observer.ignore(()=>{focusPreventScroll(Ws.contentDOM);let ai=Ws.root.activeElement;ai&&!ai.contains(Ws.contentDOM)&&ai.blur()});let ii=Ws.inputState.mouseSelection;if(ii)return ii.start(ws),ii.dragging===!1}return!1};function rangeForClick(Ws,ws,oi,si){if(si==1)return EditorSelection.cursor(ws,oi);if(si==2)return groupAt(Ws.state,ws,oi);{let ii=LineView.find(Ws.docView,ws),ai=Ws.state.doc.lineAt(ii?ii.posAtEnd:ws),li=ii?ii.posAtStart:ai.from,ci=ii?ii.posAtEnd:ai.to;return ci<Ws.state.doc.length&&ci==ai.to&&ci++,EditorSelection.range(li,ci)}}let inside=(Ws,ws,oi)=>ws>=oi.top&&ws<=oi.bottom&&Ws>=oi.left&&Ws<=oi.right;function findPositionSide(Ws,ws,oi,si){let ii=LineView.find(Ws.docView,ws);if(!ii)return 1;let ai=ws-ii.posAtStart;if(ai==0)return 1;if(ai==ii.length)return-1;let li=ii.coordsAt(ai,-1);if(li&&inside(oi,si,li))return-1;let ci=ii.coordsAt(ai,1);return ci&&inside(oi,si,ci)?1:li&&li.bottom>=si?-1:1}function queryPos(Ws,ws){let oi=Ws.posAtCoords({x:ws.clientX,y:ws.clientY},!1);return{pos:oi,bias:findPositionSide(Ws,oi,ws.clientX,ws.clientY)}}const BadMouseDetail=browser.ie&&browser.ie_version<=11;let lastMouseDown=null,lastMouseDownCount=0,lastMouseDownTime=0;function getClickType(Ws){if(!BadMouseDetail)return Ws.detail;let ws=lastMouseDown,oi=lastMouseDownTime;return lastMouseDown=Ws,lastMouseDownTime=Date.now(),lastMouseDownCount=!ws||oi>Date.now()-400&&Math.abs(ws.clientX-Ws.clientX)<2&&Math.abs(ws.clientY-Ws.clientY)<2?(lastMouseDownCount+1)%3:1}function basicMouseSelection(Ws,ws){let oi=queryPos(Ws,ws),si=getClickType(ws),ii=Ws.state.selection;return{update(ai){ai.docChanged&&(oi.pos=ai.changes.mapPos(oi.pos),ii=ii.map(ai.changes))},get(ai,li,ci){let ui=queryPos(Ws,ai),di,hi=rangeForClick(Ws,ui.pos,ui.bias,si);if(oi.pos!=ui.pos&&!li){let pi=rangeForClick(Ws,oi.pos,oi.bias,si),ha=Math.min(pi.from,hi.from),ga=Math.max(pi.to,hi.to);hi=ha<hi.from?EditorSelection.range(ha,ga):EditorSelection.range(ga,ha)}return li?ii.replaceRange(ii.main.extend(hi.from,hi.to)):ci&&si==1&&ii.ranges.length>1&&(di=removeRangeAround(ii,ui.pos))?di:ci?ii.addRange(hi):EditorSelection.create([hi])}}}function removeRangeAround(Ws,ws){for(let oi=0;oi<Ws.ranges.length;oi++){let{from:si,to:ii}=Ws.ranges[oi];if(si<=ws&&ii>=ws)return EditorSelection.create(Ws.ranges.slice(0,oi).concat(Ws.ranges.slice(oi+1)),Ws.mainIndex==oi?0:Ws.mainIndex-(Ws.mainIndex>oi?1:0))}return null}handlers.dragstart=(Ws,ws)=>{let{selection:{main:oi}}=Ws.state;if(ws.target.draggable){let ii=Ws.docView.nearest(ws.target);if(ii&&ii.isWidget){let ai=ii.posAtStart,li=ai+ii.length;(ai>=oi.to||li<=oi.from)&&(oi=EditorSelection.range(ai,li))}}let{inputState:si}=Ws;return si.mouseSelection&&(si.mouseSelection.dragging=!0),si.draggedContent=oi,ws.dataTransfer&&(ws.dataTransfer.setData("Text",textFilter(Ws.state,clipboardOutputFilter,Ws.state.sliceDoc(oi.from,oi.to))),ws.dataTransfer.effectAllowed="copyMove"),!1};handlers.dragend=Ws=>(Ws.inputState.draggedContent=null,!1);function dropText(Ws,ws,oi,si){if(oi=textFilter(Ws.state,clipboardInputFilter,oi),!oi)return;let ii=Ws.posAtCoords({x:ws.clientX,y:ws.clientY},!1),{draggedContent:ai}=Ws.inputState,li=si&&ai&&dragMovesSelection(Ws,ws)?{from:ai.from,to:ai.to}:null,ci={from:ii,insert:oi},ui=Ws.state.changes(li?[li,ci]:ci);Ws.focus(),Ws.dispatch({changes:ui,selection:{anchor:ui.mapPos(ii,-1),head:ui.mapPos(ii,1)},userEvent:li?"move.drop":"input.drop"}),Ws.inputState.draggedContent=null}handlers.drop=(Ws,ws)=>{if(!ws.dataTransfer)return!1;if(Ws.state.readOnly)return!0;let oi=ws.dataTransfer.files;if(oi&&oi.length){let si=Array(oi.length),ii=0,ai=()=>{++ii==oi.length&&dropText(Ws,ws,si.filter(li=>li!=null).join(Ws.state.lineBreak),!1)};for(let li=0;li<oi.length;li++){let ci=new FileReader;ci.onerror=ai,ci.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(ci.result)||(si[li]=ci.result),ai()},ci.readAsText(oi[li])}return!0}else{let si=ws.dataTransfer.getData("Text");if(si)return dropText(Ws,ws,si,!0),!0}return!1};handlers.paste=(Ws,ws)=>{if(Ws.state.readOnly)return!0;Ws.observer.flush();let oi=brokenClipboardAPI?null:ws.clipboardData;return oi?(doPaste(Ws,oi.getData("text/plain")||oi.getData("text/uri-list")),!0):(capturePaste(Ws),!1)};function captureCopy(Ws,ws){let oi=Ws.dom.parentNode;if(!oi)return;let si=oi.appendChild(document.createElement("textarea"));si.style.cssText="position: fixed; left: -10000px; top: 10px",si.value=ws,si.focus(),si.selectionEnd=ws.length,si.selectionStart=0,setTimeout(()=>{si.remove(),Ws.focus()},50)}function copiedRange(Ws){let ws=[],oi=[],si=!1;for(let ii of Ws.selection.ranges)ii.empty||(ws.push(Ws.sliceDoc(ii.from,ii.to)),oi.push(ii));if(!ws.length){let ii=-1;for(let{from:ai}of Ws.selection.ranges){let li=Ws.doc.lineAt(ai);li.number>ii&&(ws.push(li.text),oi.push({from:li.from,to:Math.min(Ws.doc.length,li.to+1)})),ii=li.number}si=!0}return{text:textFilter(Ws,clipboardOutputFilter,ws.join(Ws.lineBreak)),ranges:oi,linewise:si}}let lastLinewiseCopy=null;handlers.copy=handlers.cut=(Ws,ws)=>{let{text:oi,ranges:si,linewise:ii}=copiedRange(Ws.state);if(!oi&&!ii)return!1;lastLinewiseCopy=ii?oi:null,ws.type=="cut"&&!Ws.state.readOnly&&Ws.dispatch({changes:si,scrollIntoView:!0,userEvent:"delete.cut"});let ai=brokenClipboardAPI?null:ws.clipboardData;return ai?(ai.clearData(),ai.setData("text/plain",oi),!0):(captureCopy(Ws,oi),!1)};const isFocusChange=Annotation.define();function focusChangeTransaction(Ws,ws){let oi=[];for(let si of Ws.facet(focusChangeEffect)){let ii=si(Ws,ws);ii&&oi.push(ii)}return oi?Ws.update({effects:oi,annotations:isFocusChange.of(!0)}):null}function updateForFocusChange(Ws){setTimeout(()=>{let ws=Ws.hasFocus;if(ws!=Ws.inputState.notifiedFocused){let oi=focusChangeTransaction(Ws.state,ws);oi?Ws.dispatch(oi):Ws.update([])}},10)}observers.focus=Ws=>{Ws.inputState.lastFocusTime=Date.now(),!Ws.scrollDOM.scrollTop&&(Ws.inputState.lastScrollTop||Ws.inputState.lastScrollLeft)&&(Ws.scrollDOM.scrollTop=Ws.inputState.lastScrollTop,Ws.scrollDOM.scrollLeft=Ws.inputState.lastScrollLeft),updateForFocusChange(Ws)};observers.blur=Ws=>{Ws.observer.clearSelectionRange(),updateForFocusChange(Ws)};observers.compositionstart=observers.compositionupdate=Ws=>{Ws.observer.editContext||(Ws.inputState.compositionFirstChange==null&&(Ws.inputState.compositionFirstChange=!0),Ws.inputState.composing<0&&(Ws.inputState.composing=0))};observers.compositionend=Ws=>{Ws.observer.editContext||(Ws.inputState.composing=-1,Ws.inputState.compositionEndedAt=Date.now(),Ws.inputState.compositionPendingKey=!0,Ws.inputState.compositionPendingChange=Ws.observer.pendingRecords().length>0,Ws.inputState.compositionFirstChange=null,browser.chrome&&browser.android?Ws.observer.flushSoon():Ws.inputState.compositionPendingChange?Promise.resolve().then(()=>Ws.observer.flush()):setTimeout(()=>{Ws.inputState.composing<0&&Ws.docView.hasComposition&&Ws.update([])},50))};observers.contextmenu=Ws=>{Ws.inputState.lastContextMenu=Date.now()};handlers.beforeinput=(Ws,ws)=>{var oi,si;if(ws.inputType=="insertReplacementText"&&Ws.observer.editContext){let ai=(oi=ws.dataTransfer)===null||oi===void 0?void 0:oi.getData("text/plain"),li=ws.getTargetRanges();if(ai&&li.length){let ci=li[0],ui=Ws.posAtDOM(ci.startContainer,ci.startOffset),di=Ws.posAtDOM(ci.endContainer,ci.endOffset);return applyDOMChangeInner(Ws,{from:ui,to:di,insert:Ws.state.toText(ai)},null),!0}}let ii;if(browser.chrome&&browser.android&&(ii=PendingKeys.find(ai=>ai.inputType==ws.inputType))&&(Ws.observer.delayAndroidKey(ii.key,ii.keyCode),ii.key=="Backspace"||ii.key=="Delete")){let ai=((si=window.visualViewport)===null||si===void 0?void 0:si.height)||0;setTimeout(()=>{var li;(((li=window.visualViewport)===null||li===void 0?void 0:li.height)||0)>ai+10&&Ws.hasFocus&&(Ws.contentDOM.blur(),Ws.focus())},100)}return browser.ios&&ws.inputType=="deleteContentForward"&&Ws.observer.flushSoon(),browser.safari&&ws.inputType=="insertText"&&Ws.inputState.composing>=0&&setTimeout(()=>observers.compositionend(Ws,ws),20),!1};const appliedFirefoxHack=new Set;function firefoxCopyCutHack(Ws){appliedFirefoxHack.has(Ws)||(appliedFirefoxHack.add(Ws),Ws.addEventListener("copy",()=>{}),Ws.addEventListener("cut",()=>{}))}const wrappingWhiteSpace=["pre-wrap","normal","pre-line","break-spaces"];let heightChangeFlag=!1;function clearHeightChangeFlag(){heightChangeFlag=!1}class HeightOracle{constructor(ws){this.lineWrapping=ws,this.doc=Text.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(ws,oi){let si=this.doc.lineAt(oi).number-this.doc.lineAt(ws).number+1;return this.lineWrapping&&(si+=Math.max(0,Math.ceil((oi-ws-si*this.lineLength*.5)/this.lineLength))),this.lineHeight*si}heightForLine(ws){return this.lineWrapping?(1+Math.max(0,Math.ceil((ws-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(ws){return this.doc=ws,this}mustRefreshForWrapping(ws){return wrappingWhiteSpace.indexOf(ws)>-1!=this.lineWrapping}mustRefreshForHeights(ws){let oi=!1;for(let si=0;si<ws.length;si++){let ii=ws[si];ii<0?si++:this.heightSamples[Math.floor(ii*10)]||(oi=!0,this.heightSamples[Math.floor(ii*10)]=!0)}return oi}refresh(ws,oi,si,ii,ai,li){let ci=wrappingWhiteSpace.indexOf(ws)>-1,ui=Math.round(oi)!=Math.round(this.lineHeight)||this.lineWrapping!=ci;if(this.lineWrapping=ci,this.lineHeight=oi,this.charWidth=si,this.textHeight=ii,this.lineLength=ai,ui){this.heightSamples={};for(let di=0;di<li.length;di++){let hi=li[di];hi<0?di++:this.heightSamples[Math.floor(hi*10)]=!0}}return ui}}class MeasuredHeights{constructor(ws,oi){this.from=ws,this.heights=oi,this.index=0}get more(){return this.index<this.heights.length}}class BlockInfo{constructor(ws,oi,si,ii,ai){this.from=ws,this.length=oi,this.top=si,this.height=ii,this._content=ai}get type(){return typeof this._content=="number"?BlockType.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof PointDecoration?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(ws){let oi=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(ws._content)?ws._content:[ws]);return new BlockInfo(this.from,this.length+ws.length,this.top,this.height+ws.height,oi)}}var QueryType$1=function(Ws){return Ws[Ws.ByPos=0]="ByPos",Ws[Ws.ByHeight=1]="ByHeight",Ws[Ws.ByPosNoHeight=2]="ByPosNoHeight",Ws}(QueryType$1||(QueryType$1={}));const Epsilon=.001;class HeightMap{constructor(ws,oi,si=2){this.length=ws,this.height=oi,this.flags=si}get outdated(){return(this.flags&2)>0}set outdated(ws){this.flags=(ws?2:0)|this.flags&-3}setHeight(ws){this.height!=ws&&(Math.abs(this.height-ws)>Epsilon&&(heightChangeFlag=!0),this.height=ws)}replace(ws,oi,si){return HeightMap.of(si)}decomposeLeft(ws,oi){oi.push(this)}decomposeRight(ws,oi){oi.push(this)}applyChanges(ws,oi,si,ii){let ai=this,li=si.doc;for(let ci=ii.length-1;ci>=0;ci--){let{fromA:ui,toA:di,fromB:hi,toB:pi}=ii[ci],ha=ai.lineAt(ui,QueryType$1.ByPosNoHeight,si.setDoc(oi),0,0),ga=ha.to>=di?ha:ai.lineAt(di,QueryType$1.ByPosNoHeight,si,0,0);for(pi+=ga.to-di,di=ga.to;ci>0&&ha.from<=ii[ci-1].toA;)ui=ii[ci-1].fromA,hi=ii[ci-1].fromB,ci--,ui<ha.from&&(ha=ai.lineAt(ui,QueryType$1.ByPosNoHeight,si,0,0));hi+=ha.from-ui,ui=ha.from;let va=NodeBuilder.build(si.setDoc(li),ws,hi,pi);ai=replace(ai,ai.replace(ui,di,va))}return ai.updateHeight(si,0)}static empty(){return new HeightMapText(0,0)}static of(ws){if(ws.length==1)return ws[0];let oi=0,si=ws.length,ii=0,ai=0;for(;;)if(oi==si)if(ii>ai*2){let ci=ws[oi-1];ci.break?ws.splice(--oi,1,ci.left,null,ci.right):ws.splice(--oi,1,ci.left,ci.right),si+=1+ci.break,ii-=ci.size}else if(ai>ii*2){let ci=ws[si];ci.break?ws.splice(si,1,ci.left,null,ci.right):ws.splice(si,1,ci.left,ci.right),si+=2+ci.break,ai-=ci.size}else break;else if(ii<ai){let ci=ws[oi++];ci&&(ii+=ci.size)}else{let ci=ws[--si];ci&&(ai+=ci.size)}let li=0;return ws[oi-1]==null?(li=1,oi--):ws[oi]==null&&(li=1,si++),new HeightMapBranch(HeightMap.of(ws.slice(0,oi)),li,HeightMap.of(ws.slice(si)))}}function replace(Ws,ws){return Ws==ws?Ws:(Ws.constructor!=ws.constructor&&(heightChangeFlag=!0),ws)}HeightMap.prototype.size=1;class HeightMapBlock extends HeightMap{constructor(ws,oi,si){super(ws,oi),this.deco=si}blockAt(ws,oi,si,ii){return new BlockInfo(ii,this.length,si,this.height,this.deco||0)}lineAt(ws,oi,si,ii,ai){return this.blockAt(0,si,ii,ai)}forEachLine(ws,oi,si,ii,ai,li){ws<=ai+this.length&&oi>=ai&&li(this.blockAt(0,si,ii,ai))}updateHeight(ws,oi=0,si=!1,ii){return ii&&ii.from<=oi&&ii.more&&this.setHeight(ii.heights[ii.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class HeightMapText extends HeightMapBlock{constructor(ws,oi){super(ws,oi,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(ws,oi,si,ii){return new BlockInfo(ii,this.length,si,this.height,this.breaks)}replace(ws,oi,si){let ii=si[0];return si.length==1&&(ii instanceof HeightMapText||ii instanceof HeightMapGap&&ii.flags&4)&&Math.abs(this.length-ii.length)<10?(ii instanceof HeightMapGap?ii=new HeightMapText(ii.length,this.height):ii.height=this.height,this.outdated||(ii.outdated=!1),ii):HeightMap.of(si)}updateHeight(ws,oi=0,si=!1,ii){return ii&&ii.from<=oi&&ii.more?this.setHeight(ii.heights[ii.index++]):(si||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,ws.heightForLine(this.length-this.collapsed))+this.breaks*ws.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class HeightMapGap extends HeightMap{constructor(ws){super(ws,0)}heightMetrics(ws,oi){let si=ws.doc.lineAt(oi).number,ii=ws.doc.lineAt(oi+this.length).number,ai=ii-si+1,li,ci=0;if(ws.lineWrapping){let ui=Math.min(this.height,ws.lineHeight*ai);li=ui/ai,this.length>ai+1&&(ci=(this.height-ui)/(this.length-ai-1))}else li=this.height/ai;return{firstLine:si,lastLine:ii,perLine:li,perChar:ci}}blockAt(ws,oi,si,ii){let{firstLine:ai,lastLine:li,perLine:ci,perChar:ui}=this.heightMetrics(oi,ii);if(oi.lineWrapping){let di=ii+(ws<oi.lineHeight?0:Math.round(Math.max(0,Math.min(1,(ws-si)/this.height))*this.length)),hi=oi.doc.lineAt(di),pi=ci+hi.length*ui,ha=Math.max(si,ws-pi/2);return new BlockInfo(hi.from,hi.length,ha,pi,0)}else{let di=Math.max(0,Math.min(li-ai,Math.floor((ws-si)/ci))),{from:hi,length:pi}=oi.doc.line(ai+di);return new BlockInfo(hi,pi,si+ci*di,ci,0)}}lineAt(ws,oi,si,ii,ai){if(oi==QueryType$1.ByHeight)return this.blockAt(ws,si,ii,ai);if(oi==QueryType$1.ByPosNoHeight){let{from:ga,to:va}=si.doc.lineAt(ws);return new BlockInfo(ga,va-ga,0,0,0)}let{firstLine:li,perLine:ci,perChar:ui}=this.heightMetrics(si,ai),di=si.doc.lineAt(ws),hi=ci+di.length*ui,pi=di.number-li,ha=ii+ci*pi+ui*(di.from-ai-pi);return new BlockInfo(di.from,di.length,Math.max(ii,Math.min(ha,ii+this.height-hi)),hi,0)}forEachLine(ws,oi,si,ii,ai,li){ws=Math.max(ws,ai),oi=Math.min(oi,ai+this.length);let{firstLine:ci,perLine:ui,perChar:di}=this.heightMetrics(si,ai);for(let hi=ws,pi=ii;hi<=oi;){let ha=si.doc.lineAt(hi);if(hi==ws){let va=ha.number-ci;pi+=ui*va+di*(ws-ai-va)}let ga=ui+di*ha.length;li(new BlockInfo(ha.from,ha.length,pi,ga,0)),pi+=ga,hi=ha.to+1}}replace(ws,oi,si){let ii=this.length-oi;if(ii>0){let ai=si[si.length-1];ai instanceof HeightMapGap?si[si.length-1]=new HeightMapGap(ai.length+ii):si.push(null,new HeightMapGap(ii-1))}if(ws>0){let ai=si[0];ai instanceof HeightMapGap?si[0]=new HeightMapGap(ws+ai.length):si.unshift(new HeightMapGap(ws-1),null)}return HeightMap.of(si)}decomposeLeft(ws,oi){oi.push(new HeightMapGap(ws-1),null)}decomposeRight(ws,oi){oi.push(null,new HeightMapGap(this.length-ws-1))}updateHeight(ws,oi=0,si=!1,ii){let ai=oi+this.length;if(ii&&ii.from<=oi+this.length&&ii.more){let li=[],ci=Math.max(oi,ii.from),ui=-1;for(ii.from>oi&&li.push(new HeightMapGap(ii.from-oi-1).updateHeight(ws,oi));ci<=ai&&ii.more;){let hi=ws.doc.lineAt(ci).length;li.length&&li.push(null);let pi=ii.heights[ii.index++];ui==-1?ui=pi:Math.abs(pi-ui)>=Epsilon&&(ui=-2);let ha=new HeightMapText(hi,pi);ha.outdated=!1,li.push(ha),ci+=hi+1}ci<=ai&&li.push(null,new HeightMapGap(ai-ci).updateHeight(ws,ci));let di=HeightMap.of(li);return(ui<0||Math.abs(di.height-this.height)>=Epsilon||Math.abs(ui-this.heightMetrics(ws,oi).perLine)>=Epsilon)&&(heightChangeFlag=!0),replace(this,di)}else(si||this.outdated)&&(this.setHeight(ws.heightForGap(oi,oi+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class HeightMapBranch extends HeightMap{constructor(ws,oi,si){super(ws.length+oi+si.length,ws.height+si.height,oi|(ws.outdated||si.outdated?2:0)),this.left=ws,this.right=si,this.size=ws.size+si.size}get break(){return this.flags&1}blockAt(ws,oi,si,ii){let ai=si+this.left.height;return ws<ai?this.left.blockAt(ws,oi,si,ii):this.right.blockAt(ws,oi,ai,ii+this.left.length+this.break)}lineAt(ws,oi,si,ii,ai){let li=ii+this.left.height,ci=ai+this.left.length+this.break,ui=oi==QueryType$1.ByHeight?ws<li:ws<ci,di=ui?this.left.lineAt(ws,oi,si,ii,ai):this.right.lineAt(ws,oi,si,li,ci);if(this.break||(ui?di.to<ci:di.from>ci))return di;let hi=oi==QueryType$1.ByPosNoHeight?QueryType$1.ByPosNoHeight:QueryType$1.ByPos;return ui?di.join(this.right.lineAt(ci,hi,si,li,ci)):this.left.lineAt(ci,hi,si,ii,ai).join(di)}forEachLine(ws,oi,si,ii,ai,li){let ci=ii+this.left.height,ui=ai+this.left.length+this.break;if(this.break)ws<ui&&this.left.forEachLine(ws,oi,si,ii,ai,li),oi>=ui&&this.right.forEachLine(ws,oi,si,ci,ui,li);else{let di=this.lineAt(ui,QueryType$1.ByPos,si,ii,ai);ws<di.from&&this.left.forEachLine(ws,di.from-1,si,ii,ai,li),di.to>=ws&&di.from<=oi&&li(di),oi>di.to&&this.right.forEachLine(di.to+1,oi,si,ci,ui,li)}}replace(ws,oi,si){let ii=this.left.length+this.break;if(oi<ii)return this.balanced(this.left.replace(ws,oi,si),this.right);if(ws>this.left.length)return this.balanced(this.left,this.right.replace(ws-ii,oi-ii,si));let ai=[];ws>0&&this.decomposeLeft(ws,ai);let li=ai.length;for(let ci of si)ai.push(ci);if(ws>0&&mergeGaps(ai,li-1),oi<this.length){let ci=ai.length;this.decomposeRight(oi,ai),mergeGaps(ai,ci)}return HeightMap.of(ai)}decomposeLeft(ws,oi){let si=this.left.length;if(ws<=si)return this.left.decomposeLeft(ws,oi);oi.push(this.left),this.break&&(si++,ws>=si&&oi.push(null)),ws>si&&this.right.decomposeLeft(ws-si,oi)}decomposeRight(ws,oi){let si=this.left.length,ii=si+this.break;if(ws>=ii)return this.right.decomposeRight(ws-ii,oi);ws<si&&this.left.decomposeRight(ws,oi),this.break&&ws<ii&&oi.push(null),oi.push(this.right)}balanced(ws,oi){return ws.size>2*oi.size||oi.size>2*ws.size?HeightMap.of(this.break?[ws,null,oi]:[ws,oi]):(this.left=replace(this.left,ws),this.right=replace(this.right,oi),this.setHeight(ws.height+oi.height),this.outdated=ws.outdated||oi.outdated,this.size=ws.size+oi.size,this.length=ws.length+this.break+oi.length,this)}updateHeight(ws,oi=0,si=!1,ii){let{left:ai,right:li}=this,ci=oi+ai.length+this.break,ui=null;return ii&&ii.from<=oi+ai.length&&ii.more?ui=ai=ai.updateHeight(ws,oi,si,ii):ai.updateHeight(ws,oi,si),ii&&ii.from<=ci+li.length&&ii.more?ui=li=li.updateHeight(ws,ci,si,ii):li.updateHeight(ws,ci,si),ui?this.balanced(ai,li):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function mergeGaps(Ws,ws){let oi,si;Ws[ws]==null&&(oi=Ws[ws-1])instanceof HeightMapGap&&(si=Ws[ws+1])instanceof HeightMapGap&&Ws.splice(ws-1,3,new HeightMapGap(oi.length+1+si.length))}const relevantWidgetHeight=5;class NodeBuilder{constructor(ws,oi){this.pos=ws,this.oracle=oi,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=ws}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(ws,oi){if(this.lineStart>-1){let si=Math.min(oi,this.lineEnd),ii=this.nodes[this.nodes.length-1];ii instanceof HeightMapText?ii.length+=si-this.pos:(si>this.pos||!this.isCovered)&&this.nodes.push(new HeightMapText(si-this.pos,-1)),this.writtenTo=si,oi>si&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=oi}point(ws,oi,si){if(ws<oi||si.heightRelevant){let ii=si.widget?si.widget.estimatedHeight:0,ai=si.widget?si.widget.lineBreaks:0;ii<0&&(ii=this.oracle.lineHeight);let li=oi-ws;si.block?this.addBlock(new HeightMapBlock(li,ii,si)):(li||ai||ii>=relevantWidgetHeight)&&this.addLineDeco(ii,ai,li)}else oi>ws&&this.span(ws,oi);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:ws,to:oi}=this.oracle.doc.lineAt(this.pos);this.lineStart=ws,this.lineEnd=oi,this.writtenTo<ws&&((this.writtenTo<ws-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,ws-1)),this.nodes.push(null)),this.pos>ws&&this.nodes.push(new HeightMapText(this.pos-ws,-1)),this.writtenTo=this.pos}blankContent(ws,oi){let si=new HeightMapGap(oi-ws);return this.oracle.doc.lineAt(ws).to==oi&&(si.flags|=4),si}ensureLine(){this.enterLine();let ws=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(ws instanceof HeightMapText)return ws;let oi=new HeightMapText(0,-1);return this.nodes.push(oi),oi}addBlock(ws){this.enterLine();let oi=ws.deco;oi&&oi.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(ws),this.writtenTo=this.pos=this.pos+ws.length,oi&&oi.endSide>0&&(this.covering=ws)}addLineDeco(ws,oi,si){let ii=this.ensureLine();ii.length+=si,ii.collapsed+=si,ii.widgetHeight=Math.max(ii.widgetHeight,ws),ii.breaks+=oi,this.writtenTo=this.pos=this.pos+si}finish(ws){let oi=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(oi instanceof HeightMapText)&&!this.isCovered?this.nodes.push(new HeightMapText(0,-1)):(this.writtenTo<this.pos||oi==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let si=ws;for(let ii of this.nodes)ii instanceof HeightMapText&&ii.updateHeight(this.oracle,si),si+=ii?ii.length:1;return this.nodes}static build(ws,oi,si,ii){let ai=new NodeBuilder(si,ws);return RangeSet.spans(oi,si,ii,ai,0),ai.finish(si)}}function heightRelevantDecoChanges(Ws,ws,oi){let si=new DecorationComparator;return RangeSet.compare(Ws,ws,oi,si,0),si.changes}class DecorationComparator{constructor(){this.changes=[]}compareRange(){}comparePoint(ws,oi,si,ii){(ws<oi||si&&si.heightRelevant||ii&&ii.heightRelevant)&&addRange(ws,oi,this.changes,5)}}function visiblePixelRange(Ws,ws){let oi=Ws.getBoundingClientRect(),si=Ws.ownerDocument,ii=si.defaultView||window,ai=Math.max(0,oi.left),li=Math.min(ii.innerWidth,oi.right),ci=Math.max(0,oi.top),ui=Math.min(ii.innerHeight,oi.bottom);for(let di=Ws.parentNode;di&&di!=si.body;)if(di.nodeType==1){let hi=di,pi=window.getComputedStyle(hi);if((hi.scrollHeight>hi.clientHeight||hi.scrollWidth>hi.clientWidth)&&pi.overflow!="visible"){let ha=hi.getBoundingClientRect();ai=Math.max(ai,ha.left),li=Math.min(li,ha.right),ci=Math.max(ci,ha.top),ui=Math.min(di==Ws.parentNode?ii.innerHeight:ui,ha.bottom)}di=pi.position=="absolute"||pi.position=="fixed"?hi.offsetParent:hi.parentNode}else if(di.nodeType==11)di=di.host;else break;return{left:ai-oi.left,right:Math.max(ai,li)-oi.left,top:ci-(oi.top+ws),bottom:Math.max(ci,ui)-(oi.top+ws)}}function inWindow(Ws){let ws=Ws.getBoundingClientRect(),oi=Ws.ownerDocument.defaultView||window;return ws.left<oi.innerWidth&&ws.right>0&&ws.top<oi.innerHeight&&ws.bottom>0}function fullPixelRange(Ws,ws){let oi=Ws.getBoundingClientRect();return{left:0,right:oi.right-oi.left,top:ws,bottom:oi.bottom-(oi.top+ws)}}class LineGap{constructor(ws,oi,si,ii){this.from=ws,this.to=oi,this.size=si,this.displaySize=ii}static same(ws,oi){if(ws.length!=oi.length)return!1;for(let si=0;si<ws.length;si++){let ii=ws[si],ai=oi[si];if(ii.from!=ai.from||ii.to!=ai.to||ii.size!=ai.size)return!1}return!0}draw(ws,oi){return Decoration.replace({widget:new LineGapWidget(this.displaySize*(oi?ws.scaleY:ws.scaleX),oi)}).range(this.from,this.to)}}class LineGapWidget extends WidgetType{constructor(ws,oi){super(),this.size=ws,this.vertical=oi}eq(ws){return ws.size==this.size&&ws.vertical==this.vertical}toDOM(){let ws=document.createElement("div");return this.vertical?ws.style.height=this.size+"px":(ws.style.width=this.size+"px",ws.style.height="2px",ws.style.display="inline-block"),ws}get estimatedHeight(){return this.vertical?this.size:-1}}class ViewState{constructor(ws){this.state=ws,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=IdScaler,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Direction.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let oi=ws.facet(contentAttributes).some(si=>typeof si!="function"&&si.class=="cm-lineWrapping");this.heightOracle=new HeightOracle(oi),this.stateDeco=ws.facet(decorations).filter(si=>typeof si!="function"),this.heightMap=HeightMap.empty().applyChanges(this.stateDeco,Text.empty,this.heightOracle.setDoc(ws.doc),[new ChangedRange(0,0,0,ws.doc.length)]);for(let si=0;si<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());si++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Decoration.set(this.lineGaps.map(si=>si.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let ws=[this.viewport],{main:oi}=this.state.selection;for(let si=0;si<=1;si++){let ii=si?oi.head:oi.anchor;if(!ws.some(({from:ai,to:li})=>ii>=ai&&ii<=li)){let{from:ai,to:li}=this.lineBlockAt(ii);ws.push(new Viewport(ai,li))}}return this.viewports=ws.sort((si,ii)=>si.from-ii.from),this.updateScaler()}updateScaler(){let ws=this.scaler;return this.scaler=this.heightMap.height<=7e6?IdScaler:new BigScaler(this.heightOracle,this.heightMap,this.viewports),ws.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,ws=>{this.viewportLines.push(scaleBlock(ws,this.scaler))})}update(ws,oi=null){this.state=ws.state;let si=this.stateDeco;this.stateDeco=this.state.facet(decorations).filter(hi=>typeof hi!="function");let ii=ws.changedRanges,ai=ChangedRange.extendWithRanges(ii,heightRelevantDecoChanges(si,this.stateDeco,ws?ws.changes:ChangeSet.empty(this.state.doc.length))),li=this.heightMap.height,ci=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);clearHeightChangeFlag(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,ws.startState.doc,this.heightOracle.setDoc(this.state.doc),ai),(this.heightMap.height!=li||heightChangeFlag)&&(ws.flags|=2),ci?(this.scrollAnchorPos=ws.changes.mapPos(ci.from,-1),this.scrollAnchorHeight=ci.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let ui=ai.length?this.mapViewport(this.viewport,ws.changes):this.viewport;(oi&&(oi.range.head<ui.from||oi.range.head>ui.to)||!this.viewportIsAppropriate(ui))&&(ui=this.getViewport(0,oi));let di=ui.from!=this.viewport.from||ui.to!=this.viewport.to;this.viewport=ui,ws.flags|=this.updateForViewport(),(di||!ws.changes.empty||ws.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,ws.changes))),ws.flags|=this.computeVisibleRanges(ws.changes),oi&&(this.scrollTarget=oi),!this.mustEnforceCursorAssoc&&ws.selectionSet&&ws.view.lineWrapping&&ws.state.selection.main.empty&&ws.state.selection.main.assoc&&!ws.state.facet(nativeSelectionHidden)&&(this.mustEnforceCursorAssoc=!0)}measure(ws){let oi=ws.contentDOM,si=window.getComputedStyle(oi),ii=this.heightOracle,ai=si.whiteSpace;this.defaultTextDirection=si.direction=="rtl"?Direction.RTL:Direction.LTR;let li=this.heightOracle.mustRefreshForWrapping(ai),ci=oi.getBoundingClientRect(),ui=li||this.mustMeasureContent||this.contentDOMHeight!=ci.height;this.contentDOMHeight=ci.height,this.mustMeasureContent=!1;let di=0,hi=0;if(ci.width&&ci.height){let{scaleX:ku,scaleY:gd}=getScale(oi,ci);(ku>.005&&Math.abs(this.scaleX-ku)>.005||gd>.005&&Math.abs(this.scaleY-gd)>.005)&&(this.scaleX=ku,this.scaleY=gd,di|=16,li=ui=!0)}let pi=(parseInt(si.paddingTop)||0)*this.scaleY,ha=(parseInt(si.paddingBottom)||0)*this.scaleY;(this.paddingTop!=pi||this.paddingBottom!=ha)&&(this.paddingTop=pi,this.paddingBottom=ha,di|=18),this.editorWidth!=ws.scrollDOM.clientWidth&&(ii.lineWrapping&&(ui=!0),this.editorWidth=ws.scrollDOM.clientWidth,di|=16);let ga=ws.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=ga&&(this.scrollAnchorHeight=-1,this.scrollTop=ga),this.scrolledToBottom=isScrolledToBottom(ws.scrollDOM);let va=(this.printing?fullPixelRange:visiblePixelRange)(oi,this.paddingTop),ba=va.top-this.pixelViewport.top,wa=va.bottom-this.pixelViewport.bottom;this.pixelViewport=va;let xa=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(xa!=this.inView&&(this.inView=xa,xa&&(ui=!0)),!this.inView&&!this.scrollTarget&&!inWindow(ws.dom))return 0;let Ca=ci.width;if((this.contentDOMWidth!=Ca||this.editorHeight!=ws.scrollDOM.clientHeight)&&(this.contentDOMWidth=ci.width,this.editorHeight=ws.scrollDOM.clientHeight,di|=16),ui){let ku=ws.docView.measureVisibleLineHeights(this.viewport);if(ii.mustRefreshForHeights(ku)&&(li=!0),li||ii.lineWrapping&&Math.abs(Ca-this.contentDOMWidth)>ii.charWidth){let{lineHeight:gd,charWidth:Ed,textHeight:Od}=ws.docView.measureTextSize();li=gd>0&&ii.refresh(ai,gd,Ed,Od,Ca/Ed,ku),li&&(ws.docView.minWidth=0,di|=16)}ba>0&&wa>0?hi=Math.max(ba,wa):ba<0&&wa<0&&(hi=Math.min(ba,wa)),clearHeightChangeFlag();for(let gd of this.viewports){let Ed=gd.from==this.viewport.from?ku:ws.docView.measureVisibleLineHeights(gd);this.heightMap=(li?HeightMap.empty().applyChanges(this.stateDeco,Text.empty,this.heightOracle,[new ChangedRange(0,0,0,ws.state.doc.length)]):this.heightMap).updateHeight(ii,0,li,new MeasuredHeights(gd.from,Ed))}heightChangeFlag&&(di|=2)}let el=!this.viewportIsAppropriate(this.viewport,hi)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return el&&(di&2&&(di|=this.updateScaler()),this.viewport=this.getViewport(hi,this.scrollTarget),di|=this.updateForViewport()),(di&2||el)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(li?[]:this.lineGaps,ws)),di|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,ws.docView.enforceCursorAssoc()),di}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(ws,oi){let si=.5-Math.max(-.5,Math.min(.5,ws/1e3/2)),ii=this.heightMap,ai=this.heightOracle,{visibleTop:li,visibleBottom:ci}=this,ui=new Viewport(ii.lineAt(li-si*1e3,QueryType$1.ByHeight,ai,0,0).from,ii.lineAt(ci+(1-si)*1e3,QueryType$1.ByHeight,ai,0,0).to);if(oi){let{head:di}=oi.range;if(di<ui.from||di>ui.to){let hi=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),pi=ii.lineAt(di,QueryType$1.ByPos,ai,0,0),ha;oi.y=="center"?ha=(pi.top+pi.bottom)/2-hi/2:oi.y=="start"||oi.y=="nearest"&&di<ui.from?ha=pi.top:ha=pi.bottom-hi,ui=new Viewport(ii.lineAt(ha-1e3/2,QueryType$1.ByHeight,ai,0,0).from,ii.lineAt(ha+hi+1e3/2,QueryType$1.ByHeight,ai,0,0).to)}}return ui}mapViewport(ws,oi){let si=oi.mapPos(ws.from,-1),ii=oi.mapPos(ws.to,1);return new Viewport(this.heightMap.lineAt(si,QueryType$1.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(ii,QueryType$1.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:ws,to:oi},si=0){if(!this.inView)return!0;let{top:ii}=this.heightMap.lineAt(ws,QueryType$1.ByPos,this.heightOracle,0,0),{bottom:ai}=this.heightMap.lineAt(oi,QueryType$1.ByPos,this.heightOracle,0,0),{visibleTop:li,visibleBottom:ci}=this;return(ws==0||ii<=li-Math.max(10,Math.min(-si,250)))&&(oi==this.state.doc.length||ai>=ci+Math.max(10,Math.min(si,250)))&&ii>li-2*1e3&&ai<ci+2*1e3}mapLineGaps(ws,oi){if(!ws.length||oi.empty)return ws;let si=[];for(let ii of ws)oi.touchesRange(ii.from,ii.to)||si.push(new LineGap(oi.mapPos(ii.from),oi.mapPos(ii.to),ii.size,ii.displaySize));return si}ensureLineGaps(ws,oi){let si=this.heightOracle.lineWrapping,ii=si?1e4:2e3,ai=ii>>1,li=ii<<1;if(this.defaultTextDirection!=Direction.LTR&&!si)return[];let ci=[],ui=(hi,pi,ha,ga)=>{if(pi-hi<ai)return;let va=this.state.selection.main,ba=[va.from];va.empty||ba.push(va.to);for(let xa of ba)if(xa>hi&&xa<pi){ui(hi,xa-10,ha,ga),ui(xa+10,pi,ha,ga);return}let wa=find(ws,xa=>xa.from>=ha.from&&xa.to<=ha.to&&Math.abs(xa.from-hi)<ai&&Math.abs(xa.to-pi)<ai&&!ba.some(Ca=>xa.from<Ca&&xa.to>Ca));if(!wa){if(pi<ha.to&&oi&&si&&oi.visibleRanges.some(el=>el.from<=pi&&el.to>=pi)){let el=oi.moveToLineBoundary(EditorSelection.cursor(pi),!1,!0).head;el>hi&&(pi=el)}let xa=this.gapSize(ha,hi,pi,ga),Ca=si||xa<2e6?xa:2e6;wa=new LineGap(hi,pi,xa,Ca)}ci.push(wa)},di=hi=>{if(hi.length<li||hi.type!=BlockType.Text)return;let pi=lineStructure(hi.from,hi.to,this.stateDeco);if(pi.total<li)return;let ha=this.scrollTarget?this.scrollTarget.range.head:null,ga,va;if(si){let ba=ii/this.heightOracle.lineLength*this.heightOracle.lineHeight,wa,xa;if(ha!=null){let Ca=findFraction(pi,ha),el=((this.visibleBottom-this.visibleTop)/2+ba)/hi.height;wa=Ca-el,xa=Ca+el}else wa=(this.visibleTop-hi.top-ba)/hi.height,xa=(this.visibleBottom-hi.top+ba)/hi.height;ga=findPosition(pi,wa),va=findPosition(pi,xa)}else{let ba=pi.total*this.heightOracle.charWidth,wa=ii*this.heightOracle.charWidth,xa=0;if(ba>2e6)for(let Ed of ws)Ed.from>=hi.from&&Ed.from<hi.to&&Ed.size!=Ed.displaySize&&Ed.from*this.heightOracle.charWidth+xa<this.pixelViewport.left&&(xa=Ed.size-Ed.displaySize);let Ca=this.pixelViewport.left+xa,el=this.pixelViewport.right+xa,ku,gd;if(ha!=null){let Ed=findFraction(pi,ha),Od=((el-Ca)/2+wa)/ba;ku=Ed-Od,gd=Ed+Od}else ku=(Ca-wa)/ba,gd=(el+wa)/ba;ga=findPosition(pi,ku),va=findPosition(pi,gd)}ga>hi.from&&ui(hi.from,ga,hi,pi),va<hi.to&&ui(va,hi.to,hi,pi)};for(let hi of this.viewportLines)Array.isArray(hi.type)?hi.type.forEach(di):di(hi);return ci}gapSize(ws,oi,si,ii){let ai=findFraction(ii,si)-findFraction(ii,oi);return this.heightOracle.lineWrapping?ws.height*ai:ii.total*this.heightOracle.charWidth*ai}updateLineGaps(ws){LineGap.same(ws,this.lineGaps)||(this.lineGaps=ws,this.lineGapDeco=Decoration.set(ws.map(oi=>oi.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(ws){let oi=this.stateDeco;this.lineGaps.length&&(oi=oi.concat(this.lineGapDeco));let si=[];RangeSet.spans(oi,this.viewport.from,this.viewport.to,{span(ai,li){si.push({from:ai,to:li})},point(){}},20);let ii=0;if(si.length!=this.visibleRanges.length)ii=12;else for(let ai=0;ai<si.length&&!(ii&8);ai++){let li=this.visibleRanges[ai],ci=si[ai];(li.from!=ci.from||li.to!=ci.to)&&(ii|=4,ws&&ws.mapPos(li.from,-1)==ci.from&&ws.mapPos(li.to,1)==ci.to||(ii|=8))}return this.visibleRanges=si,ii}lineBlockAt(ws){return ws>=this.viewport.from&&ws<=this.viewport.to&&this.viewportLines.find(oi=>oi.from<=ws&&oi.to>=ws)||scaleBlock(this.heightMap.lineAt(ws,QueryType$1.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(ws){return ws>=this.viewportLines[0].top&&ws<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(oi=>oi.top<=ws&&oi.bottom>=ws)||scaleBlock(this.heightMap.lineAt(this.scaler.fromDOM(ws),QueryType$1.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(ws){let oi=this.lineBlockAtHeight(ws+8);return oi.from>=this.viewport.from||this.viewportLines[0].top-ws>200?oi:this.viewportLines[0]}elementAtHeight(ws){return scaleBlock(this.heightMap.blockAt(this.scaler.fromDOM(ws),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Viewport{constructor(ws,oi){this.from=ws,this.to=oi}}function lineStructure(Ws,ws,oi){let si=[],ii=Ws,ai=0;return RangeSet.spans(oi,Ws,ws,{span(){},point(li,ci){li>ii&&(si.push({from:ii,to:li}),ai+=li-ii),ii=ci}},20),ii<ws&&(si.push({from:ii,to:ws}),ai+=ws-ii),{total:ai,ranges:si}}function findPosition({total:Ws,ranges:ws},oi){if(oi<=0)return ws[0].from;if(oi>=1)return ws[ws.length-1].to;let si=Math.floor(Ws*oi);for(let ii=0;;ii++){let{from:ai,to:li}=ws[ii],ci=li-ai;if(si<=ci)return ai+si;si-=ci}}function findFraction(Ws,ws){let oi=0;for(let{from:si,to:ii}of Ws.ranges){if(ws<=ii){oi+=ws-si;break}oi+=ii-si}return oi/Ws.total}function find(Ws,ws){for(let oi of Ws)if(ws(oi))return oi}const IdScaler={toDOM(Ws){return Ws},fromDOM(Ws){return Ws},scale:1,eq(Ws){return Ws==this}};class BigScaler{constructor(ws,oi,si){let ii=0,ai=0,li=0;this.viewports=si.map(({from:ci,to:ui})=>{let di=oi.lineAt(ci,QueryType$1.ByPos,ws,0,0).top,hi=oi.lineAt(ui,QueryType$1.ByPos,ws,0,0).bottom;return ii+=hi-di,{from:ci,to:ui,top:di,bottom:hi,domTop:0,domBottom:0}}),this.scale=(7e6-ii)/(oi.height-ii);for(let ci of this.viewports)ci.domTop=li+(ci.top-ai)*this.scale,li=ci.domBottom=ci.domTop+(ci.bottom-ci.top),ai=ci.bottom}toDOM(ws){for(let oi=0,si=0,ii=0;;oi++){let ai=oi<this.viewports.length?this.viewports[oi]:null;if(!ai||ws<ai.top)return ii+(ws-si)*this.scale;if(ws<=ai.bottom)return ai.domTop+(ws-ai.top);si=ai.bottom,ii=ai.domBottom}}fromDOM(ws){for(let oi=0,si=0,ii=0;;oi++){let ai=oi<this.viewports.length?this.viewports[oi]:null;if(!ai||ws<ai.domTop)return si+(ws-ii)/this.scale;if(ws<=ai.domBottom)return ai.top+(ws-ai.domTop);si=ai.bottom,ii=ai.domBottom}}eq(ws){return ws instanceof BigScaler?this.scale==ws.scale&&this.viewports.length==ws.viewports.length&&this.viewports.every((oi,si)=>oi.from==ws.viewports[si].from&&oi.to==ws.viewports[si].to):!1}}function scaleBlock(Ws,ws){if(ws.scale==1)return Ws;let oi=ws.toDOM(Ws.top),si=ws.toDOM(Ws.bottom);return new BlockInfo(Ws.from,Ws.length,oi,si-oi,Array.isArray(Ws._content)?Ws._content.map(ii=>scaleBlock(ii,ws)):Ws._content)}const theme=Facet.define({combine:Ws=>Ws.join(" ")}),darkTheme=Facet.define({combine:Ws=>Ws.indexOf(!0)>-1}),baseThemeID=StyleModule.newName(),baseLightID=StyleModule.newName(),baseDarkID=StyleModule.newName(),lightDarkIDs={"&light":"."+baseLightID,"&dark":"."+baseDarkID};function buildTheme(Ws,ws,oi){return new StyleModule(ws,{finish(si){return/&/.test(si)?si.replace(/&\w*/,ii=>{if(ii=="&")return Ws;if(!oi||!oi[ii])throw new RangeError(`Unsupported selector: ${ii}`);return oi[ii]}):Ws+" "+si}})}const baseTheme$1$2=buildTheme("."+baseThemeID,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},lightDarkIDs),observeOptions={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},useCharData=browser.ie&&browser.ie_version<=11;class DOMObserver{constructor(ws){this.view=ws,this.active=!1,this.editContext=null,this.selectionRange=new DOMSelectionState,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=ws.contentDOM,this.observer=new MutationObserver(oi=>{for(let si of oi)this.queue.push(si);(browser.ie&&browser.ie_version<=11||browser.ios&&ws.composing)&&oi.some(si=>si.type=="childList"&&si.removedNodes.length||si.type=="characterData"&&si.oldValue.length>si.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&ws.constructor.EDIT_CONTEXT!==!1&&!(browser.chrome&&browser.chrome_version<126)&&(this.editContext=new EditContextManager(ws),ws.state.facet(editable)&&(ws.contentDOM.editContext=this.editContext.editContext)),useCharData&&(this.onCharData=oi=>{this.queue.push({target:oi.target,type:"characterData",oldValue:oi.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var oi;((oi=this.view.docView)===null||oi===void 0?void 0:oi.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(ws.scrollDOM)),this.addWindowListeners(this.win=ws.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(oi=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),oi.length>0&&oi[oi.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(oi=>{oi.length>0&&oi[oi.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(ws){this.view.inputState.runHandlers("scroll",ws),this.intersecting&&this.view.measure()}onScroll(ws){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(ws)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(ws){(ws.type=="change"||!ws.type)&&!ws.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(ws){if(this.gapIntersection&&(ws.length!=this.gaps.length||this.gaps.some((oi,si)=>oi!=ws[si]))){this.gapIntersection.disconnect();for(let oi of ws)this.gapIntersection.observe(oi);this.gaps=ws}}onSelectionChange(ws){let oi=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:si}=this,ii=this.selectionRange;if(si.state.facet(editable)?si.root.activeElement!=this.dom:!hasSelection(this.dom,ii))return;let ai=ii.anchorNode&&si.docView.nearest(ii.anchorNode);if(ai&&ai.ignoreEvent(ws)){oi||(this.selectionChanged=!1);return}(browser.ie&&browser.ie_version<=11||browser.android&&browser.chrome)&&!si.state.selection.main.empty&&ii.focusNode&&isEquivalentPosition(ii.focusNode,ii.focusOffset,ii.anchorNode,ii.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:ws}=this,oi=getSelection(ws.root);if(!oi)return!1;let si=browser.safari&&ws.root.nodeType==11&&ws.root.activeElement==this.dom&&safariSelectionRangeHack(this.view,oi)||oi;if(!si||this.selectionRange.eq(si))return!1;let ii=hasSelection(this.dom,si);return ii&&!this.selectionChanged&&ws.inputState.lastFocusTime>Date.now()-200&&ws.inputState.lastTouchTime<Date.now()-300&&atElementStart(this.dom,si)?(this.view.inputState.lastFocusTime=0,ws.docView.updateSelection(),!1):(this.selectionRange.setRange(si),ii&&(this.selectionChanged=!0),!0)}setSelectionRange(ws,oi){this.selectionRange.set(ws.node,ws.offset,oi.node,oi.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let ws=0,oi=null;for(let si=this.dom;si;)if(si.nodeType==1)!oi&&ws<this.scrollTargets.length&&this.scrollTargets[ws]==si?ws++:oi||(oi=this.scrollTargets.slice(0,ws)),oi&&oi.push(si),si=si.assignedSlot||si.parentNode;else if(si.nodeType==11)si=si.host;else break;if(ws<this.scrollTargets.length&&!oi&&(oi=this.scrollTargets.slice(0,ws)),oi){for(let si of this.scrollTargets)si.removeEventListener("scroll",this.onScroll);for(let si of this.scrollTargets=oi)si.addEventListener("scroll",this.onScroll)}}ignore(ws){if(!this.active)return ws();try{return this.stop(),ws()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,observeOptions),useCharData&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),useCharData&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(ws,oi){var si;if(!this.delayedAndroidKey){let ii=()=>{let ai=this.delayedAndroidKey;ai&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=ai.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&ai.force&&dispatchKey(this.dom,ai.key,ai.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(ii)}(!this.delayedAndroidKey||ws=="Enter")&&(this.delayedAndroidKey={key:ws,keyCode:oi,force:this.lastChange<Date.now()-50||!!(!((si=this.delayedAndroidKey)===null||si===void 0)&&si.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let ws of this.observer.takeRecords())this.queue.push(ws);return this.queue}processRecords(){let ws=this.pendingRecords();ws.length&&(this.queue=[]);let oi=-1,si=-1,ii=!1;for(let ai of ws){let li=this.readMutation(ai);li&&(li.typeOver&&(ii=!0),oi==-1?{from:oi,to:si}=li:(oi=Math.min(li.from,oi),si=Math.max(li.to,si)))}return{from:oi,to:si,typeOver:ii}}readChange(){let{from:ws,to:oi,typeOver:si}=this.processRecords(),ii=this.selectionChanged&&hasSelection(this.dom,this.selectionRange);if(ws<0&&!ii)return null;ws>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let ai=new DOMChange(this.view,ws,oi,si);return this.view.docView.domChanged={newSel:ai.newSel?ai.newSel.main:null},ai}flush(ws=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;ws&&this.readSelectionRange();let oi=this.readChange();if(!oi)return this.view.requestMeasure(),!1;let si=this.view.state,ii=applyDOMChange(this.view,oi);return this.view.state==si&&(oi.domChanged||oi.newSel&&!oi.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),ii}readMutation(ws){let oi=this.view.docView.nearest(ws.target);if(!oi||oi.ignoreMutation(ws))return null;if(oi.markDirty(ws.type=="attributes"),ws.type=="attributes"&&(oi.flags|=4),ws.type=="childList"){let si=findChild(oi,ws.previousSibling||ws.target.previousSibling,-1),ii=findChild(oi,ws.nextSibling||ws.target.nextSibling,1);return{from:si?oi.posAfter(si):oi.posAtStart,to:ii?oi.posBefore(ii):oi.posAtEnd,typeOver:!1}}else return ws.type=="characterData"?{from:oi.posAtStart,to:oi.posAtEnd,typeOver:ws.target.nodeValue==ws.oldValue}:null}setWindow(ws){ws!=this.win&&(this.removeWindowListeners(this.win),this.win=ws,this.addWindowListeners(this.win))}addWindowListeners(ws){ws.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):ws.addEventListener("beforeprint",this.onPrint),ws.addEventListener("scroll",this.onScroll),ws.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(ws){ws.removeEventListener("scroll",this.onScroll),ws.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):ws.removeEventListener("beforeprint",this.onPrint),ws.document.removeEventListener("selectionchange",this.onSelectionChange)}update(ws){this.editContext&&(this.editContext.update(ws),ws.startState.facet(editable)!=ws.state.facet(editable)&&(ws.view.contentDOM.editContext=ws.state.facet(editable)?this.editContext.editContext:null))}destroy(){var ws,oi,si;this.stop(),(ws=this.intersection)===null||ws===void 0||ws.disconnect(),(oi=this.gapIntersection)===null||oi===void 0||oi.disconnect(),(si=this.resizeScroll)===null||si===void 0||si.disconnect();for(let ii of this.scrollTargets)ii.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function findChild(Ws,ws,oi){for(;ws;){let si=ContentView.get(ws);if(si&&si.parent==Ws)return si;let ii=ws.parentNode;ws=ii!=Ws.dom?ii:oi>0?ws.nextSibling:ws.previousSibling}return null}function buildSelectionRangeFromRange(Ws,ws){let oi=ws.startContainer,si=ws.startOffset,ii=ws.endContainer,ai=ws.endOffset,li=Ws.docView.domAtPos(Ws.state.selection.main.anchor);return isEquivalentPosition(li.node,li.offset,ii,ai)&&([oi,si,ii,ai]=[ii,ai,oi,si]),{anchorNode:oi,anchorOffset:si,focusNode:ii,focusOffset:ai}}function safariSelectionRangeHack(Ws,ws){if(ws.getComposedRanges){let ii=ws.getComposedRanges(Ws.root)[0];if(ii)return buildSelectionRangeFromRange(Ws,ii)}let oi=null;function si(ii){ii.preventDefault(),ii.stopImmediatePropagation(),oi=ii.getTargetRanges()[0]}return Ws.contentDOM.addEventListener("beforeinput",si,!0),Ws.dom.ownerDocument.execCommand("indent"),Ws.contentDOM.removeEventListener("beforeinput",si,!0),oi?buildSelectionRangeFromRange(Ws,oi):null}class EditContextManager{constructor(ws){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(ws.state);let oi=this.editContext=new window.EditContext({text:ws.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,ws.state.selection.main.anchor))),selectionEnd:this.toContextPos(ws.state.selection.main.head)});this.handlers.textupdate=si=>{let ii=ws.state.selection.main,{anchor:ai,head:li}=ii,ci=this.toEditorPos(si.updateRangeStart),ui=this.toEditorPos(si.updateRangeEnd);ws.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:si.updateRangeStart,editorBase:ci,drifted:!1});let di={from:ci,to:ui,insert:Text.of(si.text.split(`
|
|
321
|
-
`))};if(di.from==this.from&&ai<this.from?di.from=ai:di.to==this.to&&ai>this.to&&(di.to=ai),di.from==di.to&&!di.insert.length){let hi=EditorSelection.single(this.toEditorPos(si.selectionStart),this.toEditorPos(si.selectionEnd));hi.main.eq(ii)||ws.dispatch({selection:hi,userEvent:"select"});return}if((browser.mac||browser.android)&&di.from==li-1&&/^\. ?$/.test(si.text)&&ws.contentDOM.getAttribute("autocorrect")=="off"&&(di={from:ci,to:ui,insert:Text.of([si.text.replace("."," ")])}),this.pendingContextChange=di,!ws.state.readOnly){let hi=this.to-this.from+(di.to-di.from+di.insert.length);applyDOMChangeInner(ws,di,EditorSelection.single(this.toEditorPos(si.selectionStart,hi),this.toEditorPos(si.selectionEnd,hi)))}this.pendingContextChange&&(this.revertPending(ws.state),this.setSelection(ws.state))},this.handlers.characterboundsupdate=si=>{let ii=[],ai=null;for(let li=this.toEditorPos(si.rangeStart),ci=this.toEditorPos(si.rangeEnd);li<ci;li++){let ui=ws.coordsForChar(li);ai=ui&&new DOMRect(ui.left,ui.top,ui.right-ui.left,ui.bottom-ui.top)||ai||new DOMRect,ii.push(ai)}oi.updateCharacterBounds(si.rangeStart,ii)},this.handlers.textformatupdate=si=>{let ii=[];for(let ai of si.getTextFormats()){let li=ai.underlineStyle,ci=ai.underlineThickness;if(li!="None"&&ci!="None"){let ui=this.toEditorPos(ai.rangeStart),di=this.toEditorPos(ai.rangeEnd);if(ui<di){let hi=`text-decoration: underline ${li=="Dashed"?"dashed ":li=="Squiggle"?"wavy ":""}${ci=="Thin"?1:2}px`;ii.push(Decoration.mark({attributes:{style:hi}}).range(ui,di))}}}ws.dispatch({effects:setEditContextFormatting.of(Decoration.set(ii))})},this.handlers.compositionstart=()=>{ws.inputState.composing<0&&(ws.inputState.composing=0,ws.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(ws.inputState.composing=-1,ws.inputState.compositionFirstChange=null,this.composing){let{drifted:si}=this.composing;this.composing=null,si&&this.reset(ws.state)}};for(let si in this.handlers)oi.addEventListener(si,this.handlers[si]);this.measureReq={read:si=>{this.editContext.updateControlBounds(si.contentDOM.getBoundingClientRect());let ii=getSelection(si.root);ii&&ii.rangeCount&&this.editContext.updateSelectionBounds(ii.getRangeAt(0).getBoundingClientRect())}}}applyEdits(ws){let oi=0,si=!1,ii=this.pendingContextChange;return ws.changes.iterChanges((ai,li,ci,ui,di)=>{if(si)return;let hi=di.length-(li-ai);if(ii&&li>=ii.to)if(ii.from==ai&&ii.to==li&&ii.insert.eq(di)){ii=this.pendingContextChange=null,oi+=hi,this.to+=hi;return}else ii=null,this.revertPending(ws.state);if(ai+=oi,li+=oi,li<=this.from)this.from+=hi,this.to+=hi;else if(ai<this.to){if(ai<this.from||li>this.to||this.to-this.from+di.length>3e4){si=!0;return}this.editContext.updateText(this.toContextPos(ai),this.toContextPos(li),di.toString()),this.to+=hi}oi+=hi}),ii&&!si&&this.revertPending(ws.state),!si}update(ws){let oi=this.pendingContextChange;this.composing&&(this.composing.drifted||ws.transactions.some(si=>!si.isUserEvent("input.type")&&si.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=ws.changes.mapPos(this.composing.editorBase)):!this.applyEdits(ws)||!this.rangeIsValid(ws.state)?(this.pendingContextChange=null,this.reset(ws.state)):(ws.docChanged||ws.selectionSet||oi)&&this.setSelection(ws.state),(ws.geometryChanged||ws.docChanged||ws.selectionSet)&&ws.view.requestMeasure(this.measureReq)}resetRange(ws){let{head:oi}=ws.selection.main;this.from=Math.max(0,oi-1e4),this.to=Math.min(ws.doc.length,oi+1e4)}reset(ws){this.resetRange(ws),this.editContext.updateText(0,this.editContext.text.length,ws.doc.sliceString(this.from,this.to)),this.setSelection(ws)}revertPending(ws){let oi=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(oi.from),this.toContextPos(oi.from+oi.insert.length),ws.doc.sliceString(oi.from,oi.to))}setSelection(ws){let{main:oi}=ws.selection,si=this.toContextPos(Math.max(this.from,Math.min(this.to,oi.anchor))),ii=this.toContextPos(oi.head);(this.editContext.selectionStart!=si||this.editContext.selectionEnd!=ii)&&this.editContext.updateSelection(si,ii)}rangeIsValid(ws){let{head:oi}=ws.selection.main;return!(this.from>0&&oi-this.from<500||this.to<ws.doc.length&&this.to-oi<500||this.to-this.from>1e4*3)}toEditorPos(ws,oi=this.to-this.from){ws=Math.min(ws,oi);let si=this.composing;return si&&si.drifted?si.editorBase+(ws-si.contextBase):ws+this.from}toContextPos(ws){let oi=this.composing;return oi&&oi.drifted?oi.contextBase+(ws-oi.editorBase):ws-this.from}destroy(){for(let ws in this.handlers)this.editContext.removeEventListener(ws,this.handlers[ws])}}class EditorView{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(ws={}){var oi;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),ws.parent&&ws.parent.appendChild(this.dom);let{dispatch:si}=ws;this.dispatchTransactions=ws.dispatchTransactions||si&&(ii=>ii.forEach(ai=>si(ai,this)))||(ii=>this.update(ii)),this.dispatch=this.dispatch.bind(this),this._root=ws.root||getRoot(ws.parent)||document,this.viewState=new ViewState(ws.state||EditorState.create(ws)),ws.scrollTo&&ws.scrollTo.is(scrollIntoView$1)&&(this.viewState.scrollTarget=ws.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(viewPlugin).map(ii=>new PluginInstance(ii));for(let ii of this.plugins)ii.update(this);this.observer=new DOMObserver(this),this.inputState=new InputState(this),this.inputState.ensureHandlers(this.plugins),this.docView=new DocView(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((oi=document.fonts)===null||oi===void 0)&&oi.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...ws){let oi=ws.length==1&&ws[0]instanceof Transaction?ws:ws.length==1&&Array.isArray(ws[0])?ws[0]:[this.state.update(...ws)];this.dispatchTransactions(oi,this)}update(ws){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let oi=!1,si=!1,ii,ai=this.state;for(let ha of ws){if(ha.startState!=ai)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");ai=ha.state}if(this.destroyed){this.viewState.state=ai;return}let li=this.hasFocus,ci=0,ui=null;ws.some(ha=>ha.annotation(isFocusChange))?(this.inputState.notifiedFocused=li,ci=1):li!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=li,ui=focusChangeTransaction(ai,li),ui||(ci=1));let di=this.observer.delayedAndroidKey,hi=null;if(di?(this.observer.clearDelayedAndroidKey(),hi=this.observer.readChange(),(hi&&!this.state.doc.eq(ai.doc)||!this.state.selection.eq(ai.selection))&&(hi=null)):this.observer.clear(),ai.facet(EditorState.phrases)!=this.state.facet(EditorState.phrases))return this.setState(ai);ii=ViewUpdate.create(this,ai,ws),ii.flags|=ci;let pi=this.viewState.scrollTarget;try{this.updateState=2;for(let ha of ws){if(pi&&(pi=pi.map(ha.changes)),ha.scrollIntoView){let{main:ga}=ha.state.selection;pi=new ScrollTarget(ga.empty?ga:EditorSelection.cursor(ga.head,ga.head>ga.anchor?-1:1))}for(let ga of ha.effects)ga.is(scrollIntoView$1)&&(pi=ga.value.clip(this.state))}this.viewState.update(ii,pi),this.bidiCache=CachedOrder.update(this.bidiCache,ii.changes),ii.empty||(this.updatePlugins(ii),this.inputState.update(ii)),oi=this.docView.update(ii),this.state.facet(styleModule)!=this.styleModules&&this.mountStyles(),si=this.updateAttrs(),this.showAnnouncements(ws),this.docView.updateSelection(oi,ws.some(ha=>ha.isUserEvent("select.pointer")))}finally{this.updateState=0}if(ii.startState.facet(theme)!=ii.state.facet(theme)&&(this.viewState.mustMeasureContent=!0),(oi||si||pi||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),oi&&this.docViewUpdate(),!ii.empty)for(let ha of this.state.facet(updateListener))try{ha(ii)}catch(ga){logException(this.state,ga,"update listener")}(ui||hi)&&Promise.resolve().then(()=>{ui&&this.state==ui.startState&&this.dispatch(ui),hi&&!applyDOMChange(this,hi)&&di.force&&dispatchKey(this.contentDOM,di.key,di.keyCode)})}setState(ws){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=ws;return}this.updateState=2;let oi=this.hasFocus;try{for(let si of this.plugins)si.destroy(this);this.viewState=new ViewState(ws),this.plugins=ws.facet(viewPlugin).map(si=>new PluginInstance(si)),this.pluginMap.clear();for(let si of this.plugins)si.update(this);this.docView.destroy(),this.docView=new DocView(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}oi&&this.focus(),this.requestMeasure()}updatePlugins(ws){let oi=ws.startState.facet(viewPlugin),si=ws.state.facet(viewPlugin);if(oi!=si){let ii=[];for(let ai of si){let li=oi.indexOf(ai);if(li<0)ii.push(new PluginInstance(ai));else{let ci=this.plugins[li];ci.mustUpdate=ws,ii.push(ci)}}for(let ai of this.plugins)ai.mustUpdate!=ws&&ai.destroy(this);this.plugins=ii,this.pluginMap.clear()}else for(let ii of this.plugins)ii.mustUpdate=ws;for(let ii=0;ii<this.plugins.length;ii++)this.plugins[ii].update(this);oi!=si&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let ws of this.plugins){let oi=ws.value;if(oi&&oi.docViewUpdate)try{oi.docViewUpdate(this)}catch(si){logException(this.state,si,"doc view update listener")}}}measure(ws=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,ws&&this.observer.forceFlush();let oi=null,si=this.scrollDOM,ii=si.scrollTop*this.scaleY,{scrollAnchorPos:ai,scrollAnchorHeight:li}=this.viewState;Math.abs(ii-this.viewState.scrollTop)>1&&(li=-1),this.viewState.scrollAnchorHeight=-1;try{for(let ci=0;;ci++){if(li<0)if(isScrolledToBottom(si))ai=-1,li=this.viewState.heightMap.height;else{let ga=this.viewState.scrollAnchorAt(ii);ai=ga.from,li=ga.top}this.updateState=1;let ui=this.viewState.measure(this);if(!ui&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(ci>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let di=[];ui&4||([this.measureRequests,di]=[di,this.measureRequests]);let hi=di.map(ga=>{try{return ga.read(this)}catch(va){return logException(this.state,va),BadMeasure}}),pi=ViewUpdate.create(this,this.state,[]),ha=!1;pi.flags|=ui,oi?oi.flags|=ui:oi=pi,this.updateState=2,pi.empty||(this.updatePlugins(pi),this.inputState.update(pi),this.updateAttrs(),ha=this.docView.update(pi),ha&&this.docViewUpdate());for(let ga=0;ga<di.length;ga++)if(hi[ga]!=BadMeasure)try{let va=di[ga];va.write&&va.write(hi[ga],this)}catch(va){logException(this.state,va)}if(ha&&this.docView.updateSelection(!0),!pi.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,li=-1;continue}else{let ga=(ai<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(ai).top)-li;if(ga>1||ga<-1){ii=ii+ga,si.scrollTop=ii/this.scaleY,li=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(oi&&!oi.empty)for(let ci of this.state.facet(updateListener))ci(oi)}get themeClasses(){return baseThemeID+" "+(this.state.facet(darkTheme)?baseDarkID:baseLightID)+" "+this.state.facet(theme)}updateAttrs(){let ws=attrsFromFacet(this,editorAttributes,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),oi={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(editable)?"true":"false",class:"cm-content",style:`${browser.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(oi["aria-readonly"]="true"),attrsFromFacet(this,contentAttributes,oi);let si=this.observer.ignore(()=>{let ii=updateAttrs(this.contentDOM,this.contentAttrs,oi),ai=updateAttrs(this.dom,this.editorAttrs,ws);return ii||ai});return this.editorAttrs=ws,this.contentAttrs=oi,si}showAnnouncements(ws){let oi=!0;for(let si of ws)for(let ii of si.effects)if(ii.is(EditorView.announce)){oi&&(this.announceDOM.textContent=""),oi=!1;let ai=this.announceDOM.appendChild(document.createElement("div"));ai.textContent=ii.value}}mountStyles(){this.styleModules=this.state.facet(styleModule);let ws=this.state.facet(EditorView.cspNonce);StyleModule.mount(this.root,this.styleModules.concat(baseTheme$1$2).reverse(),ws?{nonce:ws}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(ws){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),ws){if(this.measureRequests.indexOf(ws)>-1)return;if(ws.key!=null){for(let oi=0;oi<this.measureRequests.length;oi++)if(this.measureRequests[oi].key===ws.key){this.measureRequests[oi]=ws;return}}this.measureRequests.push(ws)}}plugin(ws){let oi=this.pluginMap.get(ws);return(oi===void 0||oi&&oi.spec!=ws)&&this.pluginMap.set(ws,oi=this.plugins.find(si=>si.spec==ws)||null),oi&&oi.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(ws){return this.readMeasured(),this.viewState.elementAtHeight(ws)}lineBlockAtHeight(ws){return this.readMeasured(),this.viewState.lineBlockAtHeight(ws)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(ws){return this.viewState.lineBlockAt(ws)}get contentHeight(){return this.viewState.contentHeight}moveByChar(ws,oi,si){return skipAtoms(this,ws,moveByChar(this,ws,oi,si))}moveByGroup(ws,oi){return skipAtoms(this,ws,moveByChar(this,ws,oi,si=>byGroup(this,ws.head,si)))}visualLineSide(ws,oi){let si=this.bidiSpans(ws),ii=this.textDirectionAt(ws.from),ai=si[oi?si.length-1:0];return EditorSelection.cursor(ai.side(oi,ii)+ws.from,ai.forward(!oi,ii)?1:-1)}moveToLineBoundary(ws,oi,si=!0){return moveToLineBoundary(this,ws,oi,si)}moveVertically(ws,oi,si){return skipAtoms(this,ws,moveVertically(this,ws,oi,si))}domAtPos(ws){return this.docView.domAtPos(ws)}posAtDOM(ws,oi=0){return this.docView.posFromDOM(ws,oi)}posAtCoords(ws,oi=!0){return this.readMeasured(),posAtCoords(this,ws,oi)}coordsAtPos(ws,oi=1){this.readMeasured();let si=this.docView.coordsAt(ws,oi);if(!si||si.left==si.right)return si;let ii=this.state.doc.lineAt(ws),ai=this.bidiSpans(ii),li=ai[BidiSpan.find(ai,ws-ii.from,-1,oi)];return flattenRect(si,li.dir==Direction.LTR==oi>0)}coordsForChar(ws){return this.readMeasured(),this.docView.coordsForChar(ws)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(ws){return!this.state.facet(perLineTextDirection)||ws<this.viewport.from||ws>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(ws))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(ws){if(ws.length>MaxBidiLine)return trivialOrder(ws.length);let oi=this.textDirectionAt(ws.from),si;for(let ai of this.bidiCache)if(ai.from==ws.from&&ai.dir==oi&&(ai.fresh||isolatesEq(ai.isolates,si=getIsolatedRanges(this,ws))))return ai.order;si||(si=getIsolatedRanges(this,ws));let ii=computeOrder(ws.text,oi,si);return this.bidiCache.push(new CachedOrder(ws.from,ws.to,oi,si,!0,ii)),ii}get hasFocus(){var ws;return(this.dom.ownerDocument.hasFocus()||browser.safari&&((ws=this.inputState)===null||ws===void 0?void 0:ws.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{focusPreventScroll(this.contentDOM),this.docView.updateSelection()})}setRoot(ws){this._root!=ws&&(this._root=ws,this.observer.setWindow((ws.nodeType==9?ws:ws.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let ws of this.plugins)ws.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(ws,oi={}){return scrollIntoView$1.of(new ScrollTarget(typeof ws=="number"?EditorSelection.cursor(ws):ws,oi.y,oi.x,oi.yMargin,oi.xMargin))}scrollSnapshot(){let{scrollTop:ws,scrollLeft:oi}=this.scrollDOM,si=this.viewState.scrollAnchorAt(ws);return scrollIntoView$1.of(new ScrollTarget(EditorSelection.cursor(si.from),"start","start",si.top-ws,oi,!0))}setTabFocusMode(ws){ws==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof ws=="boolean"?this.inputState.tabFocusMode=ws?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+ws)}static domEventHandlers(ws){return ViewPlugin.define(()=>({}),{eventHandlers:ws})}static domEventObservers(ws){return ViewPlugin.define(()=>({}),{eventObservers:ws})}static theme(ws,oi){let si=StyleModule.newName(),ii=[theme.of(si),styleModule.of(buildTheme(`.${si}`,ws))];return oi&&oi.dark&&ii.push(darkTheme.of(!0)),ii}static baseTheme(ws){return Prec.lowest(styleModule.of(buildTheme("."+baseThemeID,ws,lightDarkIDs)))}static findFromDOM(ws){var oi;let si=ws.querySelector(".cm-content"),ii=si&&ContentView.get(si)||ContentView.get(ws);return((oi=ii==null?void 0:ii.rootView)===null||oi===void 0?void 0:oi.view)||null}}EditorView.styleModule=styleModule;EditorView.inputHandler=inputHandler$1;EditorView.clipboardInputFilter=clipboardInputFilter;EditorView.clipboardOutputFilter=clipboardOutputFilter;EditorView.scrollHandler=scrollHandler;EditorView.focusChangeEffect=focusChangeEffect;EditorView.perLineTextDirection=perLineTextDirection;EditorView.exceptionSink=exceptionSink;EditorView.updateListener=updateListener;EditorView.editable=editable;EditorView.mouseSelectionStyle=mouseSelectionStyle;EditorView.dragMovesSelection=dragMovesSelection$1;EditorView.clickAddsSelectionRange=clickAddsSelectionRange;EditorView.decorations=decorations;EditorView.outerDecorations=outerDecorations;EditorView.atomicRanges=atomicRanges;EditorView.bidiIsolatedRanges=bidiIsolatedRanges;EditorView.scrollMargins=scrollMargins;EditorView.darkTheme=darkTheme;EditorView.cspNonce=Facet.define({combine:Ws=>Ws.length?Ws[0]:""});EditorView.contentAttributes=contentAttributes;EditorView.editorAttributes=editorAttributes;EditorView.lineWrapping=EditorView.contentAttributes.of({class:"cm-lineWrapping"});EditorView.announce=StateEffect.define();const MaxBidiLine=4096,BadMeasure={};class CachedOrder{constructor(ws,oi,si,ii,ai,li){this.from=ws,this.to=oi,this.dir=si,this.isolates=ii,this.fresh=ai,this.order=li}static update(ws,oi){if(oi.empty&&!ws.some(ai=>ai.fresh))return ws;let si=[],ii=ws.length?ws[ws.length-1].dir:Direction.LTR;for(let ai=Math.max(0,ws.length-10);ai<ws.length;ai++){let li=ws[ai];li.dir==ii&&!oi.touchesRange(li.from,li.to)&&si.push(new CachedOrder(oi.mapPos(li.from,1),oi.mapPos(li.to,-1),li.dir,li.isolates,!1,li.order))}return si}}function attrsFromFacet(Ws,ws,oi){for(let si=Ws.state.facet(ws),ii=si.length-1;ii>=0;ii--){let ai=si[ii],li=typeof ai=="function"?ai(Ws):ai;li&&combineAttrs(li,oi)}return oi}const currentPlatform=browser.mac?"mac":browser.windows?"win":browser.linux?"linux":"key";function normalizeKeyName(Ws,ws){const oi=Ws.split(/-(?!$)/);let si=oi[oi.length-1];si=="Space"&&(si=" ");let ii,ai,li,ci;for(let ui=0;ui<oi.length-1;++ui){const di=oi[ui];if(/^(cmd|meta|m)$/i.test(di))ci=!0;else if(/^a(lt)?$/i.test(di))ii=!0;else if(/^(c|ctrl|control)$/i.test(di))ai=!0;else if(/^s(hift)?$/i.test(di))li=!0;else if(/^mod$/i.test(di))ws=="mac"?ci=!0:ai=!0;else throw new Error("Unrecognized modifier name: "+di)}return ii&&(si="Alt-"+si),ai&&(si="Ctrl-"+si),ci&&(si="Meta-"+si),li&&(si="Shift-"+si),si}function modifiers(Ws,ws,oi){return ws.altKey&&(Ws="Alt-"+Ws),ws.ctrlKey&&(Ws="Ctrl-"+Ws),ws.metaKey&&(Ws="Meta-"+Ws),oi!==!1&&ws.shiftKey&&(Ws="Shift-"+Ws),Ws}const handleKeyEvents=Prec.default(EditorView.domEventHandlers({keydown(Ws,ws){return runHandlers(getKeymap(ws.state),Ws,ws,"editor")}})),keymap=Facet.define({enables:handleKeyEvents}),Keymaps=new WeakMap;function getKeymap(Ws){let ws=Ws.facet(keymap),oi=Keymaps.get(ws);return oi||Keymaps.set(ws,oi=buildKeymap(ws.reduce((si,ii)=>si.concat(ii),[]))),oi}function runScopeHandlers(Ws,ws,oi){return runHandlers(getKeymap(Ws.state),ws,Ws,oi)}let storedPrefix=null;const PrefixTimeout=4e3;function buildKeymap(Ws,ws=currentPlatform){let oi=Object.create(null),si=Object.create(null),ii=(li,ci)=>{let ui=si[li];if(ui==null)si[li]=ci;else if(ui!=ci)throw new Error("Key binding "+li+" is used both as a regular binding and as a multi-stroke prefix")},ai=(li,ci,ui,di,hi)=>{var pi,ha;let ga=oi[li]||(oi[li]=Object.create(null)),va=ci.split(/ (?!$)/).map(xa=>normalizeKeyName(xa,ws));for(let xa=1;xa<va.length;xa++){let Ca=va.slice(0,xa).join(" ");ii(Ca,!0),ga[Ca]||(ga[Ca]={preventDefault:!0,stopPropagation:!1,run:[el=>{let ku=storedPrefix={view:el,prefix:Ca,scope:li};return setTimeout(()=>{storedPrefix==ku&&(storedPrefix=null)},PrefixTimeout),!0}]})}let ba=va.join(" ");ii(ba,!1);let wa=ga[ba]||(ga[ba]={preventDefault:!1,stopPropagation:!1,run:((ha=(pi=ga._any)===null||pi===void 0?void 0:pi.run)===null||ha===void 0?void 0:ha.slice())||[]});ui&&wa.run.push(ui),di&&(wa.preventDefault=!0),hi&&(wa.stopPropagation=!0)};for(let li of Ws){let ci=li.scope?li.scope.split(" "):["editor"];if(li.any)for(let di of ci){let hi=oi[di]||(oi[di]=Object.create(null));hi._any||(hi._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:pi}=li;for(let ha in hi)hi[ha].run.push(ga=>pi(ga,currentKeyEvent))}let ui=li[ws]||li.key;if(ui)for(let di of ci)ai(di,ui,li.run,li.preventDefault,li.stopPropagation),li.shift&&ai(di,"Shift-"+ui,li.shift,li.preventDefault,li.stopPropagation)}return oi}let currentKeyEvent=null;function runHandlers(Ws,ws,oi,si){currentKeyEvent=ws;let ii=keyName(ws),ai=codePointAt(ii,0),li=codePointSize(ai)==ii.length&&ii!=" ",ci="",ui=!1,di=!1,hi=!1;storedPrefix&&storedPrefix.view==oi&&storedPrefix.scope==si&&(ci=storedPrefix.prefix+" ",modifierCodes.indexOf(ws.keyCode)<0&&(di=!0,storedPrefix=null));let pi=new Set,ha=wa=>{if(wa){for(let xa of wa.run)if(!pi.has(xa)&&(pi.add(xa),xa(oi)))return wa.stopPropagation&&(hi=!0),!0;wa.preventDefault&&(wa.stopPropagation&&(hi=!0),di=!0)}return!1},ga=Ws[si],va,ba;return ga&&(ha(ga[ci+modifiers(ii,ws,!li)])?ui=!0:li&&(ws.altKey||ws.metaKey||ws.ctrlKey)&&!(browser.windows&&ws.ctrlKey&&ws.altKey)&&(va=base[ws.keyCode])&&va!=ii?(ha(ga[ci+modifiers(va,ws,!0)])||ws.shiftKey&&(ba=shift[ws.keyCode])!=ii&&ba!=va&&ha(ga[ci+modifiers(ba,ws,!1)]))&&(ui=!0):li&&ws.shiftKey&&ha(ga[ci+modifiers(ii,ws,!0)])&&(ui=!0),!ui&&ha(ga._any)&&(ui=!0)),di&&(ui=!0),ui&&hi&&ws.stopPropagation(),currentKeyEvent=null,ui}class RectangleMarker{constructor(ws,oi,si,ii,ai){this.className=ws,this.left=oi,this.top=si,this.width=ii,this.height=ai}draw(){let ws=document.createElement("div");return ws.className=this.className,this.adjust(ws),ws}update(ws,oi){return oi.className!=this.className?!1:(this.adjust(ws),!0)}adjust(ws){ws.style.left=this.left+"px",ws.style.top=this.top+"px",this.width!=null&&(ws.style.width=this.width+"px"),ws.style.height=this.height+"px"}eq(ws){return this.left==ws.left&&this.top==ws.top&&this.width==ws.width&&this.height==ws.height&&this.className==ws.className}static forRange(ws,oi,si){if(si.empty){let ii=ws.coordsAtPos(si.head,si.assoc||1);if(!ii)return[];let ai=getBase(ws);return[new RectangleMarker(oi,ii.left-ai.left,ii.top-ai.top,null,ii.bottom-ii.top)]}else return rectanglesForRange(ws,oi,si)}}function getBase(Ws){let ws=Ws.scrollDOM.getBoundingClientRect();return{left:(Ws.textDirection==Direction.LTR?ws.left:ws.right-Ws.scrollDOM.clientWidth*Ws.scaleX)-Ws.scrollDOM.scrollLeft*Ws.scaleX,top:ws.top-Ws.scrollDOM.scrollTop*Ws.scaleY}}function wrappedLine(Ws,ws,oi,si){let ii=Ws.coordsAtPos(ws,oi*2);if(!ii)return si;let ai=Ws.dom.getBoundingClientRect(),li=(ii.top+ii.bottom)/2,ci=Ws.posAtCoords({x:ai.left+1,y:li}),ui=Ws.posAtCoords({x:ai.right-1,y:li});return ci==null||ui==null?si:{from:Math.max(si.from,Math.min(ci,ui)),to:Math.min(si.to,Math.max(ci,ui))}}function rectanglesForRange(Ws,ws,oi){if(oi.to<=Ws.viewport.from||oi.from>=Ws.viewport.to)return[];let si=Math.max(oi.from,Ws.viewport.from),ii=Math.min(oi.to,Ws.viewport.to),ai=Ws.textDirection==Direction.LTR,li=Ws.contentDOM,ci=li.getBoundingClientRect(),ui=getBase(Ws),di=li.querySelector(".cm-line"),hi=di&&window.getComputedStyle(di),pi=ci.left+(hi?parseInt(hi.paddingLeft)+Math.min(0,parseInt(hi.textIndent)):0),ha=ci.right-(hi?parseInt(hi.paddingRight):0),ga=blockAt(Ws,si),va=blockAt(Ws,ii),ba=ga.type==BlockType.Text?ga:null,wa=va.type==BlockType.Text?va:null;if(ba&&(Ws.lineWrapping||ga.widgetLineBreaks)&&(ba=wrappedLine(Ws,si,1,ba)),wa&&(Ws.lineWrapping||va.widgetLineBreaks)&&(wa=wrappedLine(Ws,ii,-1,wa)),ba&&wa&&ba.from==wa.from&&ba.to==wa.to)return Ca(el(oi.from,oi.to,ba));{let gd=ba?el(oi.from,null,ba):ku(ga,!1),Ed=wa?el(null,oi.to,wa):ku(va,!0),Od=[];return(ba||ga).to<(wa||va).from-(ba&&wa?1:0)||ga.widgetLineBreaks>1&&gd.bottom+Ws.defaultLineHeight/2<Ed.top?Od.push(xa(pi,gd.bottom,ha,Ed.top)):gd.bottom<Ed.top&&Ws.elementAtHeight((gd.bottom+Ed.top)/2).type==BlockType.Text&&(gd.bottom=Ed.top=(gd.bottom+Ed.top)/2),Ca(gd).concat(Od).concat(Ca(Ed))}function xa(gd,Ed,Od,Nd){return new RectangleMarker(ws,gd-ui.left,Ed-ui.top,Od-gd,Nd-Ed)}function Ca({top:gd,bottom:Ed,horizontal:Od}){let Nd=[];for(let Pd=0;Pd<Od.length;Pd+=2)Nd.push(xa(Od[Pd],gd,Od[Pd+1],Ed));return Nd}function el(gd,Ed,Od){let Nd=1e9,Pd=-1e9,Ld=[];function rf(Td,wd,Cd,sf,of){let Wd=Ws.coordsAtPos(Td,Td==Od.to?-2:2),df=Ws.coordsAtPos(Cd,Cd==Od.from?2:-2);!Wd||!df||(Nd=Math.min(Wd.top,df.top,Nd),Pd=Math.max(Wd.bottom,df.bottom,Pd),of==Direction.LTR?Ld.push(ai&&wd?pi:Wd.left,ai&&sf?ha:df.right):Ld.push(!ai&&sf?pi:df.left,!ai&&wd?ha:Wd.right))}let _d=gd??Od.from,Md=Ed??Od.to;for(let Td of Ws.visibleRanges)if(Td.to>_d&&Td.from<Md)for(let wd=Math.max(Td.from,_d),Cd=Math.min(Td.to,Md);;){let sf=Ws.state.doc.lineAt(wd);for(let of of Ws.bidiSpans(sf)){let Wd=of.from+sf.from,df=of.to+sf.from;if(Wd>=Cd)break;df>wd&&rf(Math.max(Wd,wd),gd==null&&Wd<=_d,Math.min(df,Cd),Ed==null&&df>=Md,of.dir)}if(wd=sf.to+1,wd>=Cd)break}return Ld.length==0&&rf(_d,gd==null,Md,Ed==null,Ws.textDirection),{top:Nd,bottom:Pd,horizontal:Ld}}function ku(gd,Ed){let Od=ci.top+(Ed?gd.top:gd.bottom);return{top:Od,bottom:Od,horizontal:[]}}}function sameMarker(Ws,ws){return Ws.constructor==ws.constructor&&Ws.eq(ws)}class LayerView{constructor(ws,oi){this.view=ws,this.layer=oi,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=ws.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),oi.above&&this.dom.classList.add("cm-layer-above"),oi.class&&this.dom.classList.add(oi.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(ws.state),ws.requestMeasure(this.measureReq),oi.mount&&oi.mount(this.dom,ws)}update(ws){ws.startState.facet(layerOrder)!=ws.state.facet(layerOrder)&&this.setOrder(ws.state),(this.layer.update(ws,this.dom)||ws.geometryChanged)&&(this.scale(),ws.view.requestMeasure(this.measureReq))}docViewUpdate(ws){this.layer.updateOnDocViewUpdate!==!1&&ws.requestMeasure(this.measureReq)}setOrder(ws){let oi=0,si=ws.facet(layerOrder);for(;oi<si.length&&si[oi]!=this.layer;)oi++;this.dom.style.zIndex=String((this.layer.above?150:-1)-oi)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:ws,scaleY:oi}=this.view;(ws!=this.scaleX||oi!=this.scaleY)&&(this.scaleX=ws,this.scaleY=oi,this.dom.style.transform=`scale(${1/ws}, ${1/oi})`)}draw(ws){if(ws.length!=this.drawn.length||ws.some((oi,si)=>!sameMarker(oi,this.drawn[si]))){let oi=this.dom.firstChild,si=0;for(let ii of ws)ii.update&&oi&&ii.constructor&&this.drawn[si].constructor&&ii.update(oi,this.drawn[si])?(oi=oi.nextSibling,si++):this.dom.insertBefore(ii.draw(),oi);for(;oi;){let ii=oi.nextSibling;oi.remove(),oi=ii}this.drawn=ws}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const layerOrder=Facet.define();function layer(Ws){return[ViewPlugin.define(ws=>new LayerView(ws,Ws)),layerOrder.of(Ws)]}const CanHidePrimary=!(browser.ios&&browser.webkit&&browser.webkit_version<534),selectionConfig=Facet.define({combine(Ws){return combineConfig(Ws,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(ws,oi)=>Math.min(ws,oi),drawRangeCursor:(ws,oi)=>ws||oi})}});function drawSelection(Ws={}){return[selectionConfig.of(Ws),cursorLayer,selectionLayer,hideNativeSelection,nativeSelectionHidden.of(!0)]}function configChanged(Ws){return Ws.startState.facet(selectionConfig)!=Ws.state.facet(selectionConfig)}const cursorLayer=layer({above:!0,markers(Ws){let{state:ws}=Ws,oi=ws.facet(selectionConfig),si=[];for(let ii of ws.selection.ranges){let ai=ii==ws.selection.main;if(ii.empty?!ai||CanHidePrimary:oi.drawRangeCursor){let li=ai?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",ci=ii.empty?ii:EditorSelection.cursor(ii.head,ii.head>ii.anchor?-1:1);for(let ui of RectangleMarker.forRange(Ws,li,ci))si.push(ui)}}return si},update(Ws,ws){Ws.transactions.some(si=>si.selection)&&(ws.style.animationName=ws.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let oi=configChanged(Ws);return oi&&setBlinkRate(Ws.state,ws),Ws.docChanged||Ws.selectionSet||oi},mount(Ws,ws){setBlinkRate(ws.state,Ws)},class:"cm-cursorLayer"});function setBlinkRate(Ws,ws){ws.style.animationDuration=Ws.facet(selectionConfig).cursorBlinkRate+"ms"}const selectionLayer=layer({above:!1,markers(Ws){return Ws.state.selection.ranges.map(ws=>ws.empty?[]:RectangleMarker.forRange(Ws,"cm-selectionBackground",ws)).reduce((ws,oi)=>ws.concat(oi))},update(Ws,ws){return Ws.docChanged||Ws.selectionSet||Ws.viewportChanged||configChanged(Ws)},class:"cm-selectionLayer"}),themeSpec={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};CanHidePrimary&&(themeSpec[".cm-line"].caretColor=themeSpec[".cm-content"].caretColor="transparent !important");const hideNativeSelection=Prec.highest(EditorView.theme(themeSpec)),setDropCursorPos=StateEffect.define({map(Ws,ws){return Ws==null?null:ws.mapPos(Ws)}}),dropCursorPos=StateField.define({create(){return null},update(Ws,ws){return Ws!=null&&(Ws=ws.changes.mapPos(Ws)),ws.effects.reduce((oi,si)=>si.is(setDropCursorPos)?si.value:oi,Ws)}}),drawDropCursor=ViewPlugin.fromClass(class{constructor(Ws){this.view=Ws,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(Ws){var ws;let oi=Ws.state.field(dropCursorPos);oi==null?this.cursor!=null&&((ws=this.cursor)===null||ws===void 0||ws.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(Ws.startState.field(dropCursorPos)!=oi||Ws.docChanged||Ws.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:Ws}=this,ws=Ws.state.field(dropCursorPos),oi=ws!=null&&Ws.coordsAtPos(ws);if(!oi)return null;let si=Ws.scrollDOM.getBoundingClientRect();return{left:oi.left-si.left+Ws.scrollDOM.scrollLeft*Ws.scaleX,top:oi.top-si.top+Ws.scrollDOM.scrollTop*Ws.scaleY,height:oi.bottom-oi.top}}drawCursor(Ws){if(this.cursor){let{scaleX:ws,scaleY:oi}=this.view;Ws?(this.cursor.style.left=Ws.left/ws+"px",this.cursor.style.top=Ws.top/oi+"px",this.cursor.style.height=Ws.height/oi+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(Ws){this.view.state.field(dropCursorPos)!=Ws&&this.view.dispatch({effects:setDropCursorPos.of(Ws)})}},{eventObservers:{dragover(Ws){this.setDropPos(this.view.posAtCoords({x:Ws.clientX,y:Ws.clientY}))},dragleave(Ws){(Ws.target==this.view.contentDOM||!this.view.contentDOM.contains(Ws.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function dropCursor(){return[dropCursorPos,drawDropCursor]}function iterMatches(Ws,ws,oi,si,ii){ws.lastIndex=0;for(let ai=Ws.iterRange(oi,si),li=oi,ci;!ai.next().done;li+=ai.value.length)if(!ai.lineBreak)for(;ci=ws.exec(ai.value);)ii(li+ci.index,ci)}function matchRanges(Ws,ws){let oi=Ws.visibleRanges;if(oi.length==1&&oi[0].from==Ws.viewport.from&&oi[0].to==Ws.viewport.to)return oi;let si=[];for(let{from:ii,to:ai}of oi)ii=Math.max(Ws.state.doc.lineAt(ii).from,ii-ws),ai=Math.min(Ws.state.doc.lineAt(ai).to,ai+ws),si.length&&si[si.length-1].to>=ii?si[si.length-1].to=ai:si.push({from:ii,to:ai});return si}class MatchDecorator{constructor(ws){const{regexp:oi,decoration:si,decorate:ii,boundary:ai,maxLength:li=1e3}=ws;if(!oi.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=oi,ii)this.addMatch=(ci,ui,di,hi)=>ii(hi,di,di+ci[0].length,ci,ui);else if(typeof si=="function")this.addMatch=(ci,ui,di,hi)=>{let pi=si(ci,ui,di);pi&&hi(di,di+ci[0].length,pi)};else if(si)this.addMatch=(ci,ui,di,hi)=>hi(di,di+ci[0].length,si);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=ai,this.maxLength=li}createDeco(ws){let oi=new RangeSetBuilder,si=oi.add.bind(oi);for(let{from:ii,to:ai}of matchRanges(ws,this.maxLength))iterMatches(ws.state.doc,this.regexp,ii,ai,(li,ci)=>this.addMatch(ci,ws,li,si));return oi.finish()}updateDeco(ws,oi){let si=1e9,ii=-1;return ws.docChanged&&ws.changes.iterChanges((ai,li,ci,ui)=>{ui>=ws.view.viewport.from&&ci<=ws.view.viewport.to&&(si=Math.min(ci,si),ii=Math.max(ui,ii))}),ws.viewportMoved||ii-si>1e3?this.createDeco(ws.view):ii>-1?this.updateRange(ws.view,oi.map(ws.changes),si,ii):oi}updateRange(ws,oi,si,ii){for(let ai of ws.visibleRanges){let li=Math.max(ai.from,si),ci=Math.min(ai.to,ii);if(ci>li){let ui=ws.state.doc.lineAt(li),di=ui.to<ci?ws.state.doc.lineAt(ci):ui,hi=Math.max(ai.from,ui.from),pi=Math.min(ai.to,di.to);if(this.boundary){for(;li>ui.from;li--)if(this.boundary.test(ui.text[li-1-ui.from])){hi=li;break}for(;ci<di.to;ci++)if(this.boundary.test(di.text[ci-di.from])){pi=ci;break}}let ha=[],ga,va=(ba,wa,xa)=>ha.push(xa.range(ba,wa));if(ui==di)for(this.regexp.lastIndex=hi-ui.from;(ga=this.regexp.exec(ui.text))&&ga.index<pi-ui.from;)this.addMatch(ga,ws,ga.index+ui.from,va);else iterMatches(ws.state.doc,this.regexp,hi,pi,(ba,wa)=>this.addMatch(wa,ws,ba,va));oi=oi.update({filterFrom:hi,filterTo:pi,filter:(ba,wa)=>ba<hi||wa>pi,add:ha})}}return oi}}const UnicodeRegexpSupport=/x/.unicode!=null?"gu":"g",Specials=new RegExp(`[\0-\b
|
|
322
|
-
--\u2028\u2029\uFEFF-]`,UnicodeRegexpSupport),Names={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let _supportsTabSize=null;function supportsTabSize(){var Ws;if(_supportsTabSize==null&&typeof document<"u"&&document.body){let ws=document.body.style;_supportsTabSize=((Ws=ws.tabSize)!==null&&Ws!==void 0?Ws:ws.MozTabSize)!=null}return _supportsTabSize||!1}const specialCharConfig=Facet.define({combine(Ws){let ws=combineConfig(Ws,{render:null,specialChars:Specials,addSpecialChars:null});return(ws.replaceTabs=!supportsTabSize())&&(ws.specialChars=new RegExp(" |"+ws.specialChars.source,UnicodeRegexpSupport)),ws.addSpecialChars&&(ws.specialChars=new RegExp(ws.specialChars.source+"|"+ws.addSpecialChars.source,UnicodeRegexpSupport)),ws}});function highlightSpecialChars(Ws={}){return[specialCharConfig.of(Ws),specialCharPlugin()]}let _plugin=null;function specialCharPlugin(){return _plugin||(_plugin=ViewPlugin.fromClass(class{constructor(Ws){this.view=Ws,this.decorations=Decoration.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(Ws.state.facet(specialCharConfig)),this.decorations=this.decorator.createDeco(Ws)}makeDecorator(Ws){return new MatchDecorator({regexp:Ws.specialChars,decoration:(ws,oi,si)=>{let{doc:ii}=oi.state,ai=codePointAt(ws[0],0);if(ai==9){let li=ii.lineAt(si),ci=oi.state.tabSize,ui=countColumn(li.text,ci,si-li.from);return Decoration.replace({widget:new TabWidget((ci-ui%ci)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[ai]||(this.decorationCache[ai]=Decoration.replace({widget:new SpecialCharWidget(Ws,ai)}))},boundary:Ws.replaceTabs?void 0:/[^]/})}update(Ws){let ws=Ws.state.facet(specialCharConfig);Ws.startState.facet(specialCharConfig)!=ws?(this.decorator=this.makeDecorator(ws),this.decorations=this.decorator.createDeco(Ws.view)):this.decorations=this.decorator.updateDeco(Ws,this.decorations)}},{decorations:Ws=>Ws.decorations}))}const DefaultPlaceholder="•";function placeholder$1(Ws){return Ws>=32?DefaultPlaceholder:Ws==10?"":String.fromCharCode(9216+Ws)}class SpecialCharWidget extends WidgetType{constructor(ws,oi){super(),this.options=ws,this.code=oi}eq(ws){return ws.code==this.code}toDOM(ws){let oi=placeholder$1(this.code),si=ws.state.phrase("Control character")+" "+(Names[this.code]||"0x"+this.code.toString(16)),ii=this.options.render&&this.options.render(this.code,si,oi);if(ii)return ii;let ai=document.createElement("span");return ai.textContent=oi,ai.title=si,ai.setAttribute("aria-label",si),ai.className="cm-specialChar",ai}ignoreEvent(){return!1}}class TabWidget extends WidgetType{constructor(ws){super(),this.width=ws}eq(ws){return ws.width==this.width}toDOM(){let ws=document.createElement("span");return ws.textContent=" ",ws.className="cm-tab",ws.style.width=this.width+"px",ws}ignoreEvent(){return!1}}function highlightActiveLine(){return activeLineHighlighter}const lineDeco=Decoration.line({class:"cm-activeLine"}),activeLineHighlighter=ViewPlugin.fromClass(class{constructor(Ws){this.decorations=this.getDeco(Ws)}update(Ws){(Ws.docChanged||Ws.selectionSet)&&(this.decorations=this.getDeco(Ws.view))}getDeco(Ws){let ws=-1,oi=[];for(let si of Ws.state.selection.ranges){let ii=Ws.lineBlockAt(si.head);ii.from>ws&&(oi.push(lineDeco.range(ii.from)),ws=ii.from)}return Decoration.set(oi)}},{decorations:Ws=>Ws.decorations}),MaxOff=2e3;function rectangleFor(Ws,ws,oi){let si=Math.min(ws.line,oi.line),ii=Math.max(ws.line,oi.line),ai=[];if(ws.off>MaxOff||oi.off>MaxOff||ws.col<0||oi.col<0){let li=Math.min(ws.off,oi.off),ci=Math.max(ws.off,oi.off);for(let ui=si;ui<=ii;ui++){let di=Ws.doc.line(ui);di.length<=ci&&ai.push(EditorSelection.range(di.from+li,di.to+ci))}}else{let li=Math.min(ws.col,oi.col),ci=Math.max(ws.col,oi.col);for(let ui=si;ui<=ii;ui++){let di=Ws.doc.line(ui),hi=findColumn(di.text,li,Ws.tabSize,!0);if(hi<0)ai.push(EditorSelection.cursor(di.to));else{let pi=findColumn(di.text,ci,Ws.tabSize);ai.push(EditorSelection.range(di.from+hi,di.from+pi))}}}return ai}function absoluteColumn(Ws,ws){let oi=Ws.coordsAtPos(Ws.viewport.from);return oi?Math.round(Math.abs((oi.left-ws)/Ws.defaultCharacterWidth)):-1}function getPos(Ws,ws){let oi=Ws.posAtCoords({x:ws.clientX,y:ws.clientY},!1),si=Ws.state.doc.lineAt(oi),ii=oi-si.from,ai=ii>MaxOff?-1:ii==si.length?absoluteColumn(Ws,ws.clientX):countColumn(si.text,Ws.state.tabSize,oi-si.from);return{line:si.number,col:ai,off:ii}}function rectangleSelectionStyle(Ws,ws){let oi=getPos(Ws,ws),si=Ws.state.selection;return oi?{update(ii){if(ii.docChanged){let ai=ii.changes.mapPos(ii.startState.doc.line(oi.line).from),li=ii.state.doc.lineAt(ai);oi={line:li.number,col:oi.col,off:Math.min(oi.off,li.length)},si=si.map(ii.changes)}},get(ii,ai,li){let ci=getPos(Ws,ii);if(!ci)return si;let ui=rectangleFor(Ws.state,oi,ci);return ui.length?li?EditorSelection.create(ui.concat(si.ranges)):EditorSelection.create(ui):si}}:null}function rectangularSelection(Ws){let ws=oi=>oi.altKey&&oi.button==0;return EditorView.mouseSelectionStyle.of((oi,si)=>ws(si)?rectangleSelectionStyle(oi,si):null)}const keys={Alt:[18,Ws=>!!Ws.altKey],Control:[17,Ws=>!!Ws.ctrlKey],Shift:[16,Ws=>!!Ws.shiftKey],Meta:[91,Ws=>!!Ws.metaKey]},showCrosshair={style:"cursor: crosshair"};function crosshairCursor(Ws={}){let[ws,oi]=keys[Ws.key||"Alt"],si=ViewPlugin.fromClass(class{constructor(ii){this.view=ii,this.isDown=!1}set(ii){this.isDown!=ii&&(this.isDown=ii,this.view.update([]))}},{eventObservers:{keydown(ii){this.set(ii.keyCode==ws||oi(ii))},keyup(ii){(ii.keyCode==ws||!oi(ii))&&this.set(!1)},mousemove(ii){this.set(oi(ii))}}});return[si,EditorView.contentAttributes.of(ii=>{var ai;return!((ai=ii.plugin(si))===null||ai===void 0)&&ai.isDown?showCrosshair:null})]}const Outside="-10000px";class TooltipViewManager{constructor(ws,oi,si,ii){this.facet=oi,this.createTooltipView=si,this.removeTooltipView=ii,this.input=ws.state.facet(oi),this.tooltips=this.input.filter(li=>li);let ai=null;this.tooltipViews=this.tooltips.map(li=>ai=si(li,ai))}update(ws,oi){var si;let ii=ws.state.facet(this.facet),ai=ii.filter(ui=>ui);if(ii===this.input){for(let ui of this.tooltipViews)ui.update&&ui.update(ws);return!1}let li=[],ci=oi?[]:null;for(let ui=0;ui<ai.length;ui++){let di=ai[ui],hi=-1;if(di){for(let pi=0;pi<this.tooltips.length;pi++){let ha=this.tooltips[pi];ha&&ha.create==di.create&&(hi=pi)}if(hi<0)li[ui]=this.createTooltipView(di,ui?li[ui-1]:null),ci&&(ci[ui]=!!di.above);else{let pi=li[ui]=this.tooltipViews[hi];ci&&(ci[ui]=oi[hi]),pi.update&&pi.update(ws)}}}for(let ui of this.tooltipViews)li.indexOf(ui)<0&&(this.removeTooltipView(ui),(si=ui.destroy)===null||si===void 0||si.call(ui));return oi&&(ci.forEach((ui,di)=>oi[di]=ui),oi.length=ci.length),this.input=ii,this.tooltips=ai,this.tooltipViews=li,!0}}function windowSpace(Ws){let{win:ws}=Ws;return{top:0,left:0,bottom:ws.innerHeight,right:ws.innerWidth}}const tooltipConfig=Facet.define({combine:Ws=>{var ws,oi,si;return{position:browser.ios?"absolute":((ws=Ws.find(ii=>ii.position))===null||ws===void 0?void 0:ws.position)||"fixed",parent:((oi=Ws.find(ii=>ii.parent))===null||oi===void 0?void 0:oi.parent)||null,tooltipSpace:((si=Ws.find(ii=>ii.tooltipSpace))===null||si===void 0?void 0:si.tooltipSpace)||windowSpace}}}),knownHeight=new WeakMap,tooltipPlugin=ViewPlugin.fromClass(class{constructor(Ws){this.view=Ws,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let ws=Ws.state.facet(tooltipConfig);this.position=ws.position,this.parent=ws.parent,this.classes=Ws.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new TooltipViewManager(Ws,showTooltip,(oi,si)=>this.createTooltip(oi,si),oi=>{this.resizeObserver&&this.resizeObserver.unobserve(oi.dom),oi.dom.remove()}),this.above=this.manager.tooltips.map(oi=>!!oi.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(oi=>{Date.now()>this.lastTransaction-50&&oi.length>0&&oi[oi.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),Ws.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let Ws of this.manager.tooltipViews)this.intersectionObserver.observe(Ws.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(Ws){Ws.transactions.length&&(this.lastTransaction=Date.now());let ws=this.manager.update(Ws,this.above);ws&&this.observeIntersection();let oi=ws||Ws.geometryChanged,si=Ws.state.facet(tooltipConfig);if(si.position!=this.position&&!this.madeAbsolute){this.position=si.position;for(let ii of this.manager.tooltipViews)ii.dom.style.position=this.position;oi=!0}if(si.parent!=this.parent){this.parent&&this.container.remove(),this.parent=si.parent,this.createContainer();for(let ii of this.manager.tooltipViews)this.container.appendChild(ii.dom);oi=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);oi&&this.maybeMeasure()}createTooltip(Ws,ws){let oi=Ws.create(this.view),si=ws?ws.dom:null;if(oi.dom.classList.add("cm-tooltip"),Ws.arrow&&!oi.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let ii=document.createElement("div");ii.className="cm-tooltip-arrow",oi.dom.appendChild(ii)}return oi.dom.style.position=this.position,oi.dom.style.top=Outside,oi.dom.style.left="0px",this.container.insertBefore(oi.dom,si),oi.mount&&oi.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(oi.dom),oi}destroy(){var Ws,ws,oi;this.view.win.removeEventListener("resize",this.measureSoon);for(let si of this.manager.tooltipViews)si.dom.remove(),(Ws=si.destroy)===null||Ws===void 0||Ws.call(si);this.parent&&this.container.remove(),(ws=this.resizeObserver)===null||ws===void 0||ws.disconnect(),(oi=this.intersectionObserver)===null||oi===void 0||oi.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let Ws=1,ws=1,oi=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:ai}=this.manager.tooltipViews[0];if(browser.gecko)oi=ai.offsetParent!=this.container.ownerDocument.body;else if(ai.style.top==Outside&&ai.style.left=="0px"){let li=ai.getBoundingClientRect();oi=Math.abs(li.top+1e4)>1||Math.abs(li.left)>1}}if(oi||this.position=="absolute")if(this.parent){let ai=this.parent.getBoundingClientRect();ai.width&&ai.height&&(Ws=ai.width/this.parent.offsetWidth,ws=ai.height/this.parent.offsetHeight)}else({scaleX:Ws,scaleY:ws}=this.view.viewState);let si=this.view.scrollDOM.getBoundingClientRect(),ii=getScrollMargins(this.view);return{visible:{left:si.left+ii.left,top:si.top+ii.top,right:si.right-ii.right,bottom:si.bottom-ii.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((ai,li)=>{let ci=this.manager.tooltipViews[li];return ci.getCoords?ci.getCoords(ai.pos):this.view.coordsAtPos(ai.pos)}),size:this.manager.tooltipViews.map(({dom:ai})=>ai.getBoundingClientRect()),space:this.view.state.facet(tooltipConfig).tooltipSpace(this.view),scaleX:Ws,scaleY:ws,makeAbsolute:oi}}writeMeasure(Ws){var ws;if(Ws.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let ci of this.manager.tooltipViews)ci.dom.style.position="absolute"}let{visible:oi,space:si,scaleX:ii,scaleY:ai}=Ws,li=[];for(let ci=0;ci<this.manager.tooltips.length;ci++){let ui=this.manager.tooltips[ci],di=this.manager.tooltipViews[ci],{dom:hi}=di,pi=Ws.pos[ci],ha=Ws.size[ci];if(!pi||ui.clip!==!1&&(pi.bottom<=Math.max(oi.top,si.top)||pi.top>=Math.min(oi.bottom,si.bottom)||pi.right<Math.max(oi.left,si.left)-.1||pi.left>Math.min(oi.right,si.right)+.1)){hi.style.top=Outside;continue}let ga=ui.arrow?di.dom.querySelector(".cm-tooltip-arrow"):null,va=ga?7:0,ba=ha.right-ha.left,wa=(ws=knownHeight.get(di))!==null&&ws!==void 0?ws:ha.bottom-ha.top,xa=di.offset||noOffset,Ca=this.view.textDirection==Direction.LTR,el=ha.width>si.right-si.left?Ca?si.left:si.right-ha.width:Ca?Math.max(si.left,Math.min(pi.left-(ga?14:0)+xa.x,si.right-ba)):Math.min(Math.max(si.left,pi.left-ba+(ga?14:0)-xa.x),si.right-ba),ku=this.above[ci];!ui.strictSide&&(ku?pi.top-wa-va-xa.y<si.top:pi.bottom+wa+va+xa.y>si.bottom)&&ku==si.bottom-pi.bottom>pi.top-si.top&&(ku=this.above[ci]=!ku);let gd=(ku?pi.top-si.top:si.bottom-pi.bottom)-va;if(gd<wa&&di.resize!==!1){if(gd<this.view.defaultLineHeight){hi.style.top=Outside;continue}knownHeight.set(di,wa),hi.style.height=(wa=gd)/ai+"px"}else hi.style.height&&(hi.style.height="");let Ed=ku?pi.top-wa-va-xa.y:pi.bottom+va+xa.y,Od=el+ba;if(di.overlap!==!0)for(let Nd of li)Nd.left<Od&&Nd.right>el&&Nd.top<Ed+wa&&Nd.bottom>Ed&&(Ed=ku?Nd.top-wa-2-va:Nd.bottom+va+2);if(this.position=="absolute"?(hi.style.top=(Ed-Ws.parent.top)/ai+"px",setLeftStyle(hi,(el-Ws.parent.left)/ii)):(hi.style.top=Ed/ai+"px",setLeftStyle(hi,el/ii)),ga){let Nd=pi.left+(Ca?xa.x:-xa.x)-(el+14-7);ga.style.left=Nd/ii+"px"}di.overlap!==!0&&li.push({left:el,top:Ed,right:Od,bottom:Ed+wa}),hi.classList.toggle("cm-tooltip-above",ku),hi.classList.toggle("cm-tooltip-below",!ku),di.positioned&&di.positioned(Ws.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let Ws of this.manager.tooltipViews)Ws.dom.style.top=Outside}},{eventObservers:{scroll(){this.maybeMeasure()}}});function setLeftStyle(Ws,ws){let oi=parseInt(Ws.style.left,10);(isNaN(oi)||Math.abs(ws-oi)>1)&&(Ws.style.left=ws+"px")}const baseTheme$5=EditorView.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),noOffset={x:0,y:0},showTooltip=Facet.define({enables:[tooltipPlugin,baseTheme$5]}),showHoverTooltip=Facet.define({combine:Ws=>Ws.reduce((ws,oi)=>ws.concat(oi),[])});class HoverTooltipHost{static create(ws){return new HoverTooltipHost(ws)}constructor(ws){this.view=ws,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new TooltipViewManager(ws,showHoverTooltip,(oi,si)=>this.createHostedView(oi,si),oi=>oi.dom.remove())}createHostedView(ws,oi){let si=ws.create(this.view);return si.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(si.dom,oi?oi.dom.nextSibling:this.dom.firstChild),this.mounted&&si.mount&&si.mount(this.view),si}mount(ws){for(let oi of this.manager.tooltipViews)oi.mount&&oi.mount(ws);this.mounted=!0}positioned(ws){for(let oi of this.manager.tooltipViews)oi.positioned&&oi.positioned(ws)}update(ws){this.manager.update(ws)}destroy(){var ws;for(let oi of this.manager.tooltipViews)(ws=oi.destroy)===null||ws===void 0||ws.call(oi)}passProp(ws){let oi;for(let si of this.manager.tooltipViews){let ii=si[ws];if(ii!==void 0){if(oi===void 0)oi=ii;else if(oi!==ii)return}}return oi}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const showHoverTooltipHost=showTooltip.compute([showHoverTooltip],Ws=>{let ws=Ws.facet(showHoverTooltip);return ws.length===0?null:{pos:Math.min(...ws.map(oi=>oi.pos)),end:Math.max(...ws.map(oi=>{var si;return(si=oi.end)!==null&&si!==void 0?si:oi.pos})),create:HoverTooltipHost.create,above:ws[0].above,arrow:ws.some(oi=>oi.arrow)}});class HoverPlugin{constructor(ws,oi,si,ii,ai){this.view=ws,this.source=oi,this.field=si,this.setHover=ii,this.hoverTime=ai,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:ws.dom,time:0},this.checkHover=this.checkHover.bind(this),ws.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),ws.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let ws=Date.now()-this.lastMove.time;ws<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-ws):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:ws,lastMove:oi}=this,si=ws.docView.nearest(oi.target);if(!si)return;let ii,ai=1;if(si instanceof WidgetView)ii=si.posAtStart;else{if(ii=ws.posAtCoords(oi),ii==null)return;let ci=ws.coordsAtPos(ii);if(!ci||oi.y<ci.top||oi.y>ci.bottom||oi.x<ci.left-ws.defaultCharacterWidth||oi.x>ci.right+ws.defaultCharacterWidth)return;let ui=ws.bidiSpans(ws.state.doc.lineAt(ii)).find(hi=>hi.from<=ii&&hi.to>=ii),di=ui&&ui.dir==Direction.RTL?-1:1;ai=oi.x<ci.left?-di:di}let li=this.source(ws,ii,ai);if(li!=null&&li.then){let ci=this.pending={pos:ii};li.then(ui=>{this.pending==ci&&(this.pending=null,ui&&!(Array.isArray(ui)&&!ui.length)&&ws.dispatch({effects:this.setHover.of(Array.isArray(ui)?ui:[ui])}))},ui=>logException(ws.state,ui,"hover tooltip"))}else li&&!(Array.isArray(li)&&!li.length)&&ws.dispatch({effects:this.setHover.of(Array.isArray(li)?li:[li])})}get tooltip(){let ws=this.view.plugin(tooltipPlugin),oi=ws?ws.manager.tooltips.findIndex(si=>si.create==HoverTooltipHost.create):-1;return oi>-1?ws.manager.tooltipViews[oi]:null}mousemove(ws){var oi,si;this.lastMove={x:ws.clientX,y:ws.clientY,target:ws.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:ii,tooltip:ai}=this;if(ii.length&&ai&&!isInTooltip(ai.dom,ws)||this.pending){let{pos:li}=ii[0]||this.pending,ci=(si=(oi=ii[0])===null||oi===void 0?void 0:oi.end)!==null&&si!==void 0?si:li;(li==ci?this.view.posAtCoords(this.lastMove)!=li:!isOverRange(this.view,li,ci,ws.clientX,ws.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(ws){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:oi}=this;if(oi.length){let{tooltip:si}=this;si&&si.dom.contains(ws.relatedTarget)?this.watchTooltipLeave(si.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(ws){let oi=si=>{ws.removeEventListener("mouseleave",oi),this.active.length&&!this.view.dom.contains(si.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};ws.addEventListener("mouseleave",oi)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const tooltipMargin=4;function isInTooltip(Ws,ws){let{left:oi,right:si,top:ii,bottom:ai}=Ws.getBoundingClientRect(),li;if(li=Ws.querySelector(".cm-tooltip-arrow")){let ci=li.getBoundingClientRect();ii=Math.min(ci.top,ii),ai=Math.max(ci.bottom,ai)}return ws.clientX>=oi-tooltipMargin&&ws.clientX<=si+tooltipMargin&&ws.clientY>=ii-tooltipMargin&&ws.clientY<=ai+tooltipMargin}function isOverRange(Ws,ws,oi,si,ii,ai){let li=Ws.scrollDOM.getBoundingClientRect(),ci=Ws.documentTop+Ws.documentPadding.top+Ws.contentHeight;if(li.left>si||li.right<si||li.top>ii||Math.min(li.bottom,ci)<ii)return!1;let ui=Ws.posAtCoords({x:si,y:ii},!1);return ui>=ws&&ui<=oi}function hoverTooltip(Ws,ws={}){let oi=StateEffect.define(),si=StateField.define({create(){return[]},update(ii,ai){if(ii.length&&(ws.hideOnChange&&(ai.docChanged||ai.selection)?ii=[]:ws.hideOn&&(ii=ii.filter(li=>!ws.hideOn(ai,li))),ai.docChanged)){let li=[];for(let ci of ii){let ui=ai.changes.mapPos(ci.pos,-1,MapMode.TrackDel);if(ui!=null){let di=Object.assign(Object.create(null),ci);di.pos=ui,di.end!=null&&(di.end=ai.changes.mapPos(di.end)),li.push(di)}}ii=li}for(let li of ai.effects)li.is(oi)&&(ii=li.value),li.is(closeHoverTooltipEffect)&&(ii=[]);return ii},provide:ii=>showHoverTooltip.from(ii)});return{active:si,extension:[si,ViewPlugin.define(ii=>new HoverPlugin(ii,Ws,si,oi,ws.hoverTime||300)),showHoverTooltipHost]}}function getTooltip(Ws,ws){let oi=Ws.plugin(tooltipPlugin);if(!oi)return null;let si=oi.manager.tooltips.indexOf(ws);return si<0?null:oi.manager.tooltipViews[si]}const closeHoverTooltipEffect=StateEffect.define(),panelConfig=Facet.define({combine(Ws){let ws,oi;for(let si of Ws)ws=ws||si.topContainer,oi=oi||si.bottomContainer;return{topContainer:ws,bottomContainer:oi}}});function getPanel(Ws,ws){let oi=Ws.plugin(panelPlugin),si=oi?oi.specs.indexOf(ws):-1;return si>-1?oi.panels[si]:null}const panelPlugin=ViewPlugin.fromClass(class{constructor(Ws){this.input=Ws.state.facet(showPanel),this.specs=this.input.filter(oi=>oi),this.panels=this.specs.map(oi=>oi(Ws));let ws=Ws.state.facet(panelConfig);this.top=new PanelGroup(Ws,!0,ws.topContainer),this.bottom=new PanelGroup(Ws,!1,ws.bottomContainer),this.top.sync(this.panels.filter(oi=>oi.top)),this.bottom.sync(this.panels.filter(oi=>!oi.top));for(let oi of this.panels)oi.dom.classList.add("cm-panel"),oi.mount&&oi.mount()}update(Ws){let ws=Ws.state.facet(panelConfig);this.top.container!=ws.topContainer&&(this.top.sync([]),this.top=new PanelGroup(Ws.view,!0,ws.topContainer)),this.bottom.container!=ws.bottomContainer&&(this.bottom.sync([]),this.bottom=new PanelGroup(Ws.view,!1,ws.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let oi=Ws.state.facet(showPanel);if(oi!=this.input){let si=oi.filter(ui=>ui),ii=[],ai=[],li=[],ci=[];for(let ui of si){let di=this.specs.indexOf(ui),hi;di<0?(hi=ui(Ws.view),ci.push(hi)):(hi=this.panels[di],hi.update&&hi.update(Ws)),ii.push(hi),(hi.top?ai:li).push(hi)}this.specs=si,this.panels=ii,this.top.sync(ai),this.bottom.sync(li);for(let ui of ci)ui.dom.classList.add("cm-panel"),ui.mount&&ui.mount()}else for(let si of this.panels)si.update&&si.update(Ws)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:Ws=>EditorView.scrollMargins.of(ws=>{let oi=ws.plugin(Ws);return oi&&{top:oi.top.scrollMargin(),bottom:oi.bottom.scrollMargin()}})});class PanelGroup{constructor(ws,oi,si){this.view=ws,this.top=oi,this.container=si,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(ws){for(let oi of this.panels)oi.destroy&&ws.indexOf(oi)<0&&oi.destroy();this.panels=ws,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let oi=this.container||this.view.dom;oi.insertBefore(this.dom,this.top?oi.firstChild:null)}let ws=this.dom.firstChild;for(let oi of this.panels)if(oi.dom.parentNode==this.dom){for(;ws!=oi.dom;)ws=rm(ws);ws=ws.nextSibling}else this.dom.insertBefore(oi.dom,ws);for(;ws;)ws=rm(ws)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let ws of this.classes.split(" "))ws&&this.container.classList.remove(ws);for(let ws of(this.classes=this.view.themeClasses).split(" "))ws&&this.container.classList.add(ws)}}}function rm(Ws){let ws=Ws.nextSibling;return Ws.remove(),ws}const showPanel=Facet.define({enables:panelPlugin});class GutterMarker extends RangeValue{compare(ws){return this==ws||this.constructor==ws.constructor&&this.eq(ws)}eq(ws){return!1}destroy(ws){}}GutterMarker.prototype.elementClass="";GutterMarker.prototype.toDOM=void 0;GutterMarker.prototype.mapMode=MapMode.TrackBefore;GutterMarker.prototype.startSide=GutterMarker.prototype.endSide=-1;GutterMarker.prototype.point=!0;const gutterLineClass=Facet.define(),gutterWidgetClass=Facet.define(),defaults$1={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>RangeSet.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},activeGutters=Facet.define();function gutter(Ws){return[gutters(),activeGutters.of(Object.assign(Object.assign({},defaults$1),Ws))]}const unfixGutters=Facet.define({combine:Ws=>Ws.some(ws=>ws)});function gutters(Ws){return[gutterView]}const gutterView=ViewPlugin.fromClass(class{constructor(Ws){this.view=Ws,this.prevViewport=Ws.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=Ws.state.facet(activeGutters).map(ws=>new SingleGutterView(Ws,ws));for(let ws of this.gutters)this.dom.appendChild(ws.dom);this.fixed=!Ws.state.facet(unfixGutters),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),Ws.scrollDOM.insertBefore(this.dom,Ws.contentDOM)}update(Ws){if(this.updateGutters(Ws)){let ws=this.prevViewport,oi=Ws.view.viewport,si=Math.min(ws.to,oi.to)-Math.max(ws.from,oi.from);this.syncGutters(si<(oi.to-oi.from)*.8)}Ws.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(unfixGutters)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=Ws.view.viewport}syncGutters(Ws){let ws=this.dom.nextSibling;Ws&&this.dom.remove();let oi=RangeSet.iter(this.view.state.facet(gutterLineClass),this.view.viewport.from),si=[],ii=this.gutters.map(ai=>new UpdateContext(ai,this.view.viewport,-this.view.documentPadding.top));for(let ai of this.view.viewportLineBlocks)if(si.length&&(si=[]),Array.isArray(ai.type)){let li=!0;for(let ci of ai.type)if(ci.type==BlockType.Text&&li){advanceCursor(oi,si,ci.from);for(let ui of ii)ui.line(this.view,ci,si);li=!1}else if(ci.widget)for(let ui of ii)ui.widget(this.view,ci)}else if(ai.type==BlockType.Text){advanceCursor(oi,si,ai.from);for(let li of ii)li.line(this.view,ai,si)}else if(ai.widget)for(let li of ii)li.widget(this.view,ai);for(let ai of ii)ai.finish();Ws&&this.view.scrollDOM.insertBefore(this.dom,ws)}updateGutters(Ws){let ws=Ws.startState.facet(activeGutters),oi=Ws.state.facet(activeGutters),si=Ws.docChanged||Ws.heightChanged||Ws.viewportChanged||!RangeSet.eq(Ws.startState.facet(gutterLineClass),Ws.state.facet(gutterLineClass),Ws.view.viewport.from,Ws.view.viewport.to);if(ws==oi)for(let ii of this.gutters)ii.update(Ws)&&(si=!0);else{si=!0;let ii=[];for(let ai of oi){let li=ws.indexOf(ai);li<0?ii.push(new SingleGutterView(this.view,ai)):(this.gutters[li].update(Ws),ii.push(this.gutters[li]))}for(let ai of this.gutters)ai.dom.remove(),ii.indexOf(ai)<0&&ai.destroy();for(let ai of ii)this.dom.appendChild(ai.dom);this.gutters=ii}return si}destroy(){for(let Ws of this.gutters)Ws.destroy();this.dom.remove()}},{provide:Ws=>EditorView.scrollMargins.of(ws=>{let oi=ws.plugin(Ws);return!oi||oi.gutters.length==0||!oi.fixed?null:ws.textDirection==Direction.LTR?{left:oi.dom.offsetWidth*ws.scaleX}:{right:oi.dom.offsetWidth*ws.scaleX}})});function asArray$1(Ws){return Array.isArray(Ws)?Ws:[Ws]}function advanceCursor(Ws,ws,oi){for(;Ws.value&&Ws.from<=oi;)Ws.from==oi&&ws.push(Ws.value),Ws.next()}class UpdateContext{constructor(ws,oi,si){this.gutter=ws,this.height=si,this.i=0,this.cursor=RangeSet.iter(ws.markers,oi.from)}addElement(ws,oi,si){let{gutter:ii}=this,ai=(oi.top-this.height)/ws.scaleY,li=oi.height/ws.scaleY;if(this.i==ii.elements.length){let ci=new GutterElement(ws,li,ai,si);ii.elements.push(ci),ii.dom.appendChild(ci.dom)}else ii.elements[this.i].update(ws,li,ai,si);this.height=oi.bottom,this.i++}line(ws,oi,si){let ii=[];advanceCursor(this.cursor,ii,oi.from),si.length&&(ii=ii.concat(si));let ai=this.gutter.config.lineMarker(ws,oi,ii);ai&&ii.unshift(ai);let li=this.gutter;ii.length==0&&!li.config.renderEmptyElements||this.addElement(ws,oi,ii)}widget(ws,oi){let si=this.gutter.config.widgetMarker(ws,oi.widget,oi),ii=si?[si]:null;for(let ai of ws.state.facet(gutterWidgetClass)){let li=ai(ws,oi.widget,oi);li&&(ii||(ii=[])).push(li)}ii&&this.addElement(ws,oi,ii)}finish(){let ws=this.gutter;for(;ws.elements.length>this.i;){let oi=ws.elements.pop();ws.dom.removeChild(oi.dom),oi.destroy()}}}class SingleGutterView{constructor(ws,oi){this.view=ws,this.config=oi,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let si in oi.domEventHandlers)this.dom.addEventListener(si,ii=>{let ai=ii.target,li;if(ai!=this.dom&&this.dom.contains(ai)){for(;ai.parentNode!=this.dom;)ai=ai.parentNode;let ui=ai.getBoundingClientRect();li=(ui.top+ui.bottom)/2}else li=ii.clientY;let ci=ws.lineBlockAtHeight(li-ws.documentTop);oi.domEventHandlers[si](ws,ci,ii)&&ii.preventDefault()});this.markers=asArray$1(oi.markers(ws)),oi.initialSpacer&&(this.spacer=new GutterElement(ws,0,0,[oi.initialSpacer(ws)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(ws){let oi=this.markers;if(this.markers=asArray$1(this.config.markers(ws.view)),this.spacer&&this.config.updateSpacer){let ii=this.config.updateSpacer(this.spacer.markers[0],ws);ii!=this.spacer.markers[0]&&this.spacer.update(ws.view,0,0,[ii])}let si=ws.view.viewport;return!RangeSet.eq(this.markers,oi,si.from,si.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(ws):!1)}destroy(){for(let ws of this.elements)ws.destroy()}}class GutterElement{constructor(ws,oi,si,ii){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(ws,oi,si,ii)}update(ws,oi,si,ii){this.height!=oi&&(this.height=oi,this.dom.style.height=oi+"px"),this.above!=si&&(this.dom.style.marginTop=(this.above=si)?si+"px":""),sameMarkers(this.markers,ii)||this.setMarkers(ws,ii)}setMarkers(ws,oi){let si="cm-gutterElement",ii=this.dom.firstChild;for(let ai=0,li=0;;){let ci=li,ui=ai<oi.length?oi[ai++]:null,di=!1;if(ui){let hi=ui.elementClass;hi&&(si+=" "+hi);for(let pi=li;pi<this.markers.length;pi++)if(this.markers[pi].compare(ui)){ci=pi,di=!0;break}}else ci=this.markers.length;for(;li<ci;){let hi=this.markers[li++];if(hi.toDOM){hi.destroy(ii);let pi=ii.nextSibling;ii.remove(),ii=pi}}if(!ui)break;ui.toDOM&&(di?ii=ii.nextSibling:this.dom.insertBefore(ui.toDOM(ws),ii)),di&&li++}this.dom.className=si,this.markers=oi}destroy(){this.setMarkers(null,[])}}function sameMarkers(Ws,ws){if(Ws.length!=ws.length)return!1;for(let oi=0;oi<Ws.length;oi++)if(!Ws[oi].compare(ws[oi]))return!1;return!0}const lineNumberMarkers=Facet.define(),lineNumberWidgetMarker=Facet.define(),lineNumberConfig=Facet.define({combine(Ws){return combineConfig(Ws,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(ws,oi){let si=Object.assign({},ws);for(let ii in oi){let ai=si[ii],li=oi[ii];si[ii]=ai?(ci,ui,di)=>ai(ci,ui,di)||li(ci,ui,di):li}return si}})}});class NumberMarker extends GutterMarker{constructor(ws){super(),this.number=ws}eq(ws){return this.number==ws.number}toDOM(){return document.createTextNode(this.number)}}function formatNumber(Ws,ws){return Ws.state.facet(lineNumberConfig).formatNumber(ws,Ws.state)}const lineNumberGutter=activeGutters.compute([lineNumberConfig],Ws=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(ws){return ws.state.facet(lineNumberMarkers)},lineMarker(ws,oi,si){return si.some(ii=>ii.toDOM)?null:new NumberMarker(formatNumber(ws,ws.state.doc.lineAt(oi.from).number))},widgetMarker:(ws,oi,si)=>{for(let ii of ws.state.facet(lineNumberWidgetMarker)){let ai=ii(ws,oi,si);if(ai)return ai}return null},lineMarkerChange:ws=>ws.startState.facet(lineNumberConfig)!=ws.state.facet(lineNumberConfig),initialSpacer(ws){return new NumberMarker(formatNumber(ws,maxLineNumber(ws.state.doc.lines)))},updateSpacer(ws,oi){let si=formatNumber(oi.view,maxLineNumber(oi.view.state.doc.lines));return si==ws.number?ws:new NumberMarker(si)},domEventHandlers:Ws.facet(lineNumberConfig).domEventHandlers}));function lineNumbers(Ws={}){return[lineNumberConfig.of(Ws),gutters(),lineNumberGutter]}function maxLineNumber(Ws){let ws=9;for(;ws<Ws;)ws=ws*10+9;return ws}const activeLineGutterMarker=new class extends GutterMarker{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},activeLineGutterHighlighter=gutterLineClass.compute(["selection"],Ws=>{let ws=[],oi=-1;for(let si of Ws.selection.ranges){let ii=Ws.doc.lineAt(si.head).from;ii>oi&&(oi=ii,ws.push(activeLineGutterMarker.range(ii)))}return RangeSet.of(ws)});function highlightActiveLineGutter(){return activeLineGutterHighlighter}const DefaultBufferLength=1024;let nextPropID=0,Range$2=class{constructor(Ws,ws){this.from=Ws,this.to=ws}};class NodeProp{constructor(ws={}){this.id=nextPropID++,this.perNode=!!ws.perNode,this.deserialize=ws.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(ws){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof ws!="function"&&(ws=NodeType.match(ws)),oi=>{let si=ws(oi);return si===void 0?null:[this,si]}}}NodeProp.closedBy=new NodeProp({deserialize:Ws=>Ws.split(" ")});NodeProp.openedBy=new NodeProp({deserialize:Ws=>Ws.split(" ")});NodeProp.group=new NodeProp({deserialize:Ws=>Ws.split(" ")});NodeProp.isolate=new NodeProp({deserialize:Ws=>{if(Ws&&Ws!="rtl"&&Ws!="ltr"&&Ws!="auto")throw new RangeError("Invalid value for isolate: "+Ws);return Ws||"auto"}});NodeProp.contextHash=new NodeProp({perNode:!0});NodeProp.lookAhead=new NodeProp({perNode:!0});NodeProp.mounted=new NodeProp({perNode:!0});class MountedTree{constructor(ws,oi,si){this.tree=ws,this.overlay=oi,this.parser=si}static get(ws){return ws&&ws.props&&ws.props[NodeProp.mounted.id]}}const noProps=Object.create(null);class NodeType{constructor(ws,oi,si,ii=0){this.name=ws,this.props=oi,this.id=si,this.flags=ii}static define(ws){let oi=ws.props&&ws.props.length?Object.create(null):noProps,si=(ws.top?1:0)|(ws.skipped?2:0)|(ws.error?4:0)|(ws.name==null?8:0),ii=new NodeType(ws.name||"",oi,ws.id,si);if(ws.props){for(let ai of ws.props)if(Array.isArray(ai)||(ai=ai(ii)),ai){if(ai[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");oi[ai[0].id]=ai[1]}}return ii}prop(ws){return this.props[ws.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(ws){if(typeof ws=="string"){if(this.name==ws)return!0;let oi=this.prop(NodeProp.group);return oi?oi.indexOf(ws)>-1:!1}return this.id==ws}static match(ws){let oi=Object.create(null);for(let si in ws)for(let ii of si.split(" "))oi[ii]=ws[si];return si=>{for(let ii=si.prop(NodeProp.group),ai=-1;ai<(ii?ii.length:0);ai++){let li=oi[ai<0?si.name:ii[ai]];if(li)return li}}}}NodeType.none=new NodeType("",Object.create(null),0,8);class NodeSet{constructor(ws){this.types=ws;for(let oi=0;oi<ws.length;oi++)if(ws[oi].id!=oi)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...ws){let oi=[];for(let si of this.types){let ii=null;for(let ai of ws){let li=ai(si);li&&(ii||(ii=Object.assign({},si.props)),ii[li[0].id]=li[1])}oi.push(ii?new NodeType(si.name,ii,si.id,si.flags):si)}return new NodeSet(oi)}}const CachedNode=new WeakMap,CachedInnerNode=new WeakMap;var IterMode;(function(Ws){Ws[Ws.ExcludeBuffers=1]="ExcludeBuffers",Ws[Ws.IncludeAnonymous=2]="IncludeAnonymous",Ws[Ws.IgnoreMounts=4]="IgnoreMounts",Ws[Ws.IgnoreOverlays=8]="IgnoreOverlays"})(IterMode||(IterMode={}));class Tree{constructor(ws,oi,si,ii,ai){if(this.type=ws,this.children=oi,this.positions=si,this.length=ii,this.props=null,ai&&ai.length){this.props=Object.create(null);for(let[li,ci]of ai)this.props[typeof li=="number"?li:li.id]=ci}}toString(){let ws=MountedTree.get(this);if(ws&&!ws.overlay)return ws.tree.toString();let oi="";for(let si of this.children){let ii=si.toString();ii&&(oi&&(oi+=","),oi+=ii)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(oi.length?"("+oi+")":""):oi}cursor(ws=0){return new TreeCursor(this.topNode,ws)}cursorAt(ws,oi=0,si=0){let ii=CachedNode.get(this)||this.topNode,ai=new TreeCursor(ii);return ai.moveTo(ws,oi),CachedNode.set(this,ai._tree),ai}get topNode(){return new TreeNode(this,0,0,null)}resolve(ws,oi=0){let si=resolveNode(CachedNode.get(this)||this.topNode,ws,oi,!1);return CachedNode.set(this,si),si}resolveInner(ws,oi=0){let si=resolveNode(CachedInnerNode.get(this)||this.topNode,ws,oi,!0);return CachedInnerNode.set(this,si),si}resolveStack(ws,oi=0){return stackIterator(this,ws,oi)}iterate(ws){let{enter:oi,leave:si,from:ii=0,to:ai=this.length}=ws,li=ws.mode||0,ci=(li&IterMode.IncludeAnonymous)>0;for(let ui=this.cursor(li|IterMode.IncludeAnonymous);;){let di=!1;if(ui.from<=ai&&ui.to>=ii&&(!ci&&ui.type.isAnonymous||oi(ui)!==!1)){if(ui.firstChild())continue;di=!0}for(;di&&si&&(ci||!ui.type.isAnonymous)&&si(ui),!ui.nextSibling();){if(!ui.parent())return;di=!0}}}prop(ws){return ws.perNode?this.props?this.props[ws.id]:void 0:this.type.prop(ws)}get propValues(){let ws=[];if(this.props)for(let oi in this.props)ws.push([+oi,this.props[oi]]);return ws}balance(ws={}){return this.children.length<=8?this:balanceRange(NodeType.none,this.children,this.positions,0,this.children.length,0,this.length,(oi,si,ii)=>new Tree(this.type,oi,si,ii,this.propValues),ws.makeTree||((oi,si,ii)=>new Tree(NodeType.none,oi,si,ii)))}static build(ws){return buildTree(ws)}}Tree.empty=new Tree(NodeType.none,[],[],0);class FlatBufferCursor{constructor(ws,oi){this.buffer=ws,this.index=oi}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new FlatBufferCursor(this.buffer,this.index)}}class TreeBuffer{constructor(ws,oi,si){this.buffer=ws,this.length=oi,this.set=si}get type(){return NodeType.none}toString(){let ws=[];for(let oi=0;oi<this.buffer.length;)ws.push(this.childString(oi)),oi=this.buffer[oi+3];return ws.join(",")}childString(ws){let oi=this.buffer[ws],si=this.buffer[ws+3],ii=this.set.types[oi],ai=ii.name;if(/\W/.test(ai)&&!ii.isError&&(ai=JSON.stringify(ai)),ws+=4,si==ws)return ai;let li=[];for(;ws<si;)li.push(this.childString(ws)),ws=this.buffer[ws+3];return ai+"("+li.join(",")+")"}findChild(ws,oi,si,ii,ai){let{buffer:li}=this,ci=-1;for(let ui=ws;ui!=oi&&!(checkSide(ai,ii,li[ui+1],li[ui+2])&&(ci=ui,si>0));ui=li[ui+3]);return ci}slice(ws,oi,si){let ii=this.buffer,ai=new Uint16Array(oi-ws),li=0;for(let ci=ws,ui=0;ci<oi;){ai[ui++]=ii[ci++],ai[ui++]=ii[ci++]-si;let di=ai[ui++]=ii[ci++]-si;ai[ui++]=ii[ci++]-ws,li=Math.max(li,di)}return new TreeBuffer(ai,li,this.set)}}function checkSide(Ws,ws,oi,si){switch(Ws){case-2:return oi<ws;case-1:return si>=ws&&oi<ws;case 0:return oi<ws&&si>ws;case 1:return oi<=ws&&si>ws;case 2:return si>ws;case 4:return!0}}function resolveNode(Ws,ws,oi,si){for(var ii;Ws.from==Ws.to||(oi<1?Ws.from>=ws:Ws.from>ws)||(oi>-1?Ws.to<=ws:Ws.to<ws);){let li=!si&&Ws instanceof TreeNode&&Ws.index<0?null:Ws.parent;if(!li)return Ws;Ws=li}let ai=si?0:IterMode.IgnoreOverlays;if(si)for(let li=Ws,ci=li.parent;ci;li=ci,ci=li.parent)li instanceof TreeNode&&li.index<0&&((ii=ci.enter(ws,oi,ai))===null||ii===void 0?void 0:ii.from)!=li.from&&(Ws=ci);for(;;){let li=Ws.enter(ws,oi,ai);if(!li)return Ws;Ws=li}}class BaseNode{cursor(ws=0){return new TreeCursor(this,ws)}getChild(ws,oi=null,si=null){let ii=getChildren(this,ws,oi,si);return ii.length?ii[0]:null}getChildren(ws,oi=null,si=null){return getChildren(this,ws,oi,si)}resolve(ws,oi=0){return resolveNode(this,ws,oi,!1)}resolveInner(ws,oi=0){return resolveNode(this,ws,oi,!0)}matchContext(ws){return matchNodeContext(this.parent,ws)}enterUnfinishedNodesBefore(ws){let oi=this.childBefore(ws),si=this;for(;oi;){let ii=oi.lastChild;if(!ii||ii.to!=oi.to)break;ii.type.isError&&ii.from==ii.to?(si=oi,oi=ii.prevSibling):oi=ii}return si}get node(){return this}get next(){return this.parent}}class TreeNode extends BaseNode{constructor(ws,oi,si,ii){super(),this._tree=ws,this.from=oi,this.index=si,this._parent=ii}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(ws,oi,si,ii,ai=0){for(let li=this;;){for(let{children:ci,positions:ui}=li._tree,di=oi>0?ci.length:-1;ws!=di;ws+=oi){let hi=ci[ws],pi=ui[ws]+li.from;if(checkSide(ii,si,pi,pi+hi.length)){if(hi instanceof TreeBuffer){if(ai&IterMode.ExcludeBuffers)continue;let ha=hi.findChild(0,hi.buffer.length,oi,si-pi,ii);if(ha>-1)return new BufferNode(new BufferContext(li,hi,ws,pi),null,ha)}else if(ai&IterMode.IncludeAnonymous||!hi.type.isAnonymous||hasChild(hi)){let ha;if(!(ai&IterMode.IgnoreMounts)&&(ha=MountedTree.get(hi))&&!ha.overlay)return new TreeNode(ha.tree,pi,ws,li);let ga=new TreeNode(hi,pi,ws,li);return ai&IterMode.IncludeAnonymous||!ga.type.isAnonymous?ga:ga.nextChild(oi<0?hi.children.length-1:0,oi,si,ii)}}}if(ai&IterMode.IncludeAnonymous||!li.type.isAnonymous||(li.index>=0?ws=li.index+oi:ws=oi<0?-1:li._parent._tree.children.length,li=li._parent,!li))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(ws){return this.nextChild(0,1,ws,2)}childBefore(ws){return this.nextChild(this._tree.children.length-1,-1,ws,-2)}enter(ws,oi,si=0){let ii;if(!(si&IterMode.IgnoreOverlays)&&(ii=MountedTree.get(this._tree))&&ii.overlay){let ai=ws-this.from;for(let{from:li,to:ci}of ii.overlay)if((oi>0?li<=ai:li<ai)&&(oi<0?ci>=ai:ci>ai))return new TreeNode(ii.tree,ii.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,ws,oi,si)}nextSignificantParent(){let ws=this;for(;ws.type.isAnonymous&&ws._parent;)ws=ws._parent;return ws}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function getChildren(Ws,ws,oi,si){let ii=Ws.cursor(),ai=[];if(!ii.firstChild())return ai;if(oi!=null){for(let li=!1;!li;)if(li=ii.type.is(oi),!ii.nextSibling())return ai}for(;;){if(si!=null&&ii.type.is(si))return ai;if(ii.type.is(ws)&&ai.push(ii.node),!ii.nextSibling())return si==null?ai:[]}}function matchNodeContext(Ws,ws,oi=ws.length-1){for(let si=Ws;oi>=0;si=si.parent){if(!si)return!1;if(!si.type.isAnonymous){if(ws[oi]&&ws[oi]!=si.name)return!1;oi--}}return!0}class BufferContext{constructor(ws,oi,si,ii){this.parent=ws,this.buffer=oi,this.index=si,this.start=ii}}class BufferNode extends BaseNode{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(ws,oi,si){super(),this.context=ws,this._parent=oi,this.index=si,this.type=ws.buffer.set.types[ws.buffer.buffer[si]]}child(ws,oi,si){let{buffer:ii}=this.context,ai=ii.findChild(this.index+4,ii.buffer[this.index+3],ws,oi-this.context.start,si);return ai<0?null:new BufferNode(this.context,this,ai)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(ws){return this.child(1,ws,2)}childBefore(ws){return this.child(-1,ws,-2)}enter(ws,oi,si=0){if(si&IterMode.ExcludeBuffers)return null;let{buffer:ii}=this.context,ai=ii.findChild(this.index+4,ii.buffer[this.index+3],oi>0?1:-1,ws-this.context.start,oi);return ai<0?null:new BufferNode(this.context,this,ai)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(ws){return this._parent?null:this.context.parent.nextChild(this.context.index+ws,ws,0,4)}get nextSibling(){let{buffer:ws}=this.context,oi=ws.buffer[this.index+3];return oi<(this._parent?ws.buffer[this._parent.index+3]:ws.buffer.length)?new BufferNode(this.context,this._parent,oi):this.externalSibling(1)}get prevSibling(){let{buffer:ws}=this.context,oi=this._parent?this._parent.index+4:0;return this.index==oi?this.externalSibling(-1):new BufferNode(this.context,this._parent,ws.findChild(oi,this.index,-1,0,4))}get tree(){return null}toTree(){let ws=[],oi=[],{buffer:si}=this.context,ii=this.index+4,ai=si.buffer[this.index+3];if(ai>ii){let li=si.buffer[this.index+1];ws.push(si.slice(ii,ai,li)),oi.push(0)}return new Tree(this.type,ws,oi,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function iterStack(Ws){if(!Ws.length)return null;let ws=0,oi=Ws[0];for(let ai=1;ai<Ws.length;ai++){let li=Ws[ai];(li.from>oi.from||li.to<oi.to)&&(oi=li,ws=ai)}let si=oi instanceof TreeNode&&oi.index<0?null:oi.parent,ii=Ws.slice();return si?ii[ws]=si:ii.splice(ws,1),new StackIterator(ii,oi)}class StackIterator{constructor(ws,oi){this.heads=ws,this.node=oi}get next(){return iterStack(this.heads)}}function stackIterator(Ws,ws,oi){let si=Ws.resolveInner(ws,oi),ii=null;for(let ai=si instanceof TreeNode?si:si.context.parent;ai;ai=ai.parent)if(ai.index<0){let li=ai.parent;(ii||(ii=[si])).push(li.resolve(ws,oi)),ai=li}else{let li=MountedTree.get(ai.tree);if(li&&li.overlay&&li.overlay[0].from<=ws&&li.overlay[li.overlay.length-1].to>=ws){let ci=new TreeNode(li.tree,li.overlay[0].from+ai.from,-1,ai);(ii||(ii=[si])).push(resolveNode(ci,ws,oi,!1))}}return ii?iterStack(ii):si}class TreeCursor{get name(){return this.type.name}constructor(ws,oi=0){if(this.mode=oi,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,ws instanceof TreeNode)this.yieldNode(ws);else{this._tree=ws.context.parent,this.buffer=ws.context;for(let si=ws._parent;si;si=si._parent)this.stack.unshift(si.index);this.bufferNode=ws,this.yieldBuf(ws.index)}}yieldNode(ws){return ws?(this._tree=ws,this.type=ws.type,this.from=ws.from,this.to=ws.to,!0):!1}yieldBuf(ws,oi){this.index=ws;let{start:si,buffer:ii}=this.buffer;return this.type=oi||ii.set.types[ii.buffer[ws]],this.from=si+ii.buffer[ws+1],this.to=si+ii.buffer[ws+2],!0}yield(ws){return ws?ws instanceof TreeNode?(this.buffer=null,this.yieldNode(ws)):(this.buffer=ws.context,this.yieldBuf(ws.index,ws.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(ws,oi,si){if(!this.buffer)return this.yield(this._tree.nextChild(ws<0?this._tree._tree.children.length-1:0,ws,oi,si,this.mode));let{buffer:ii}=this.buffer,ai=ii.findChild(this.index+4,ii.buffer[this.index+3],ws,oi-this.buffer.start,si);return ai<0?!1:(this.stack.push(this.index),this.yieldBuf(ai))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(ws){return this.enterChild(1,ws,2)}childBefore(ws){return this.enterChild(-1,ws,-2)}enter(ws,oi,si=this.mode){return this.buffer?si&IterMode.ExcludeBuffers?!1:this.enterChild(1,ws,oi):this.yield(this._tree.enter(ws,oi,si))}parent(){if(!this.buffer)return this.yieldNode(this.mode&IterMode.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let ws=this.mode&IterMode.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(ws)}sibling(ws){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+ws,ws,0,4,this.mode)):!1;let{buffer:oi}=this.buffer,si=this.stack.length-1;if(ws<0){let ii=si<0?0:this.stack[si]+4;if(this.index!=ii)return this.yieldBuf(oi.findChild(ii,this.index,-1,0,4))}else{let ii=oi.buffer[this.index+3];if(ii<(si<0?oi.buffer.length:oi.buffer[this.stack[si]+3]))return this.yieldBuf(ii)}return si<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+ws,ws,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(ws){let oi,si,{buffer:ii}=this;if(ii){if(ws>0){if(this.index<ii.buffer.buffer.length)return!1}else for(let ai=0;ai<this.index;ai++)if(ii.buffer.buffer[ai+3]<this.index)return!1;({index:oi,parent:si}=ii)}else({index:oi,_parent:si}=this._tree);for(;si;{index:oi,_parent:si}=si)if(oi>-1)for(let ai=oi+ws,li=ws<0?-1:si._tree.children.length;ai!=li;ai+=ws){let ci=si._tree.children[ai];if(this.mode&IterMode.IncludeAnonymous||ci instanceof TreeBuffer||!ci.type.isAnonymous||hasChild(ci))return!1}return!0}move(ws,oi){if(oi&&this.enterChild(ws,0,4))return!0;for(;;){if(this.sibling(ws))return!0;if(this.atLastNode(ws)||!this.parent())return!1}}next(ws=!0){return this.move(1,ws)}prev(ws=!0){return this.move(-1,ws)}moveTo(ws,oi=0){for(;(this.from==this.to||(oi<1?this.from>=ws:this.from>ws)||(oi>-1?this.to<=ws:this.to<ws))&&this.parent(););for(;this.enterChild(1,ws,oi););return this}get node(){if(!this.buffer)return this._tree;let ws=this.bufferNode,oi=null,si=0;if(ws&&ws.context==this.buffer)e:for(let ii=this.index,ai=this.stack.length;ai>=0;){for(let li=ws;li;li=li._parent)if(li.index==ii){if(ii==this.index)return li;oi=li,si=ai+1;break e}ii=this.stack[--ai]}for(let ii=si;ii<this.stack.length;ii++)oi=new BufferNode(this.buffer,oi,this.stack[ii]);return this.bufferNode=new BufferNode(this.buffer,oi,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(ws,oi){for(let si=0;;){let ii=!1;if(this.type.isAnonymous||ws(this)!==!1){if(this.firstChild()){si++;continue}this.type.isAnonymous||(ii=!0)}for(;;){if(ii&&oi&&oi(this),ii=this.type.isAnonymous,!si)return;if(this.nextSibling())break;this.parent(),si--,ii=!0}}}matchContext(ws){if(!this.buffer)return matchNodeContext(this.node.parent,ws);let{buffer:oi}=this.buffer,{types:si}=oi.set;for(let ii=ws.length-1,ai=this.stack.length-1;ii>=0;ai--){if(ai<0)return matchNodeContext(this._tree,ws,ii);let li=si[oi.buffer[this.stack[ai]]];if(!li.isAnonymous){if(ws[ii]&&ws[ii]!=li.name)return!1;ii--}}return!0}}function hasChild(Ws){return Ws.children.some(ws=>ws instanceof TreeBuffer||!ws.type.isAnonymous||hasChild(ws))}function buildTree(Ws){var ws;let{buffer:oi,nodeSet:si,maxBufferLength:ii=DefaultBufferLength,reused:ai=[],minRepeatType:li=si.types.length}=Ws,ci=Array.isArray(oi)?new FlatBufferCursor(oi,oi.length):oi,ui=si.types,di=0,hi=0;function pi(gd,Ed,Od,Nd,Pd,Ld){let{id:rf,start:_d,end:Md,size:Td}=ci,wd=hi,Cd=di;for(;Td<0;)if(ci.next(),Td==-1){let hf=ai[rf];Od.push(hf),Nd.push(_d-gd);return}else if(Td==-3){di=rf;return}else if(Td==-4){hi=rf;return}else throw new RangeError(`Unrecognized record size: ${Td}`);let sf=ui[rf],of,Wd,df=_d-gd;if(Md-_d<=ii&&(Wd=wa(ci.pos-Ed,Pd))){let hf=new Uint16Array(Wd.size-Wd.skip),xd=ci.pos-Wd.size,Fd=hf.length;for(;ci.pos>xd;)Fd=xa(Wd.start,hf,Fd);of=new TreeBuffer(hf,Md-Wd.start,si),df=Wd.start-gd}else{let hf=ci.pos-Td;ci.next();let xd=[],Fd=[],Vd=rf>=li?rf:-1,af=0,ff=Md;for(;ci.pos>hf;)Vd>=0&&ci.id==Vd&&ci.size>=0?(ci.end<=ff-ii&&(va(xd,Fd,_d,af,ci.end,ff,Vd,wd,Cd),af=xd.length,ff=ci.end),ci.next()):Ld>2500?ha(_d,hf,xd,Fd):pi(_d,hf,xd,Fd,Vd,Ld+1);if(Vd>=0&&af>0&&af<xd.length&&va(xd,Fd,_d,af,_d,ff,Vd,wd,Cd),xd.reverse(),Fd.reverse(),Vd>-1&&af>0){let uf=ga(sf,Cd);of=balanceRange(sf,xd,Fd,0,xd.length,0,Md-_d,uf,uf)}else of=ba(sf,xd,Fd,Md-_d,wd-Md,Cd)}Od.push(of),Nd.push(df)}function ha(gd,Ed,Od,Nd){let Pd=[],Ld=0,rf=-1;for(;ci.pos>Ed;){let{id:_d,start:Md,end:Td,size:wd}=ci;if(wd>4)ci.next();else{if(rf>-1&&Md<rf)break;rf<0&&(rf=Td-ii),Pd.push(_d,Md,Td),Ld++,ci.next()}}if(Ld){let _d=new Uint16Array(Ld*4),Md=Pd[Pd.length-2];for(let Td=Pd.length-3,wd=0;Td>=0;Td-=3)_d[wd++]=Pd[Td],_d[wd++]=Pd[Td+1]-Md,_d[wd++]=Pd[Td+2]-Md,_d[wd++]=wd;Od.push(new TreeBuffer(_d,Pd[2]-Md,si)),Nd.push(Md-gd)}}function ga(gd,Ed){return(Od,Nd,Pd)=>{let Ld=0,rf=Od.length-1,_d,Md;if(rf>=0&&(_d=Od[rf])instanceof Tree){if(!rf&&_d.type==gd&&_d.length==Pd)return _d;(Md=_d.prop(NodeProp.lookAhead))&&(Ld=Nd[rf]+_d.length+Md)}return ba(gd,Od,Nd,Pd,Ld,Ed)}}function va(gd,Ed,Od,Nd,Pd,Ld,rf,_d,Md){let Td=[],wd=[];for(;gd.length>Nd;)Td.push(gd.pop()),wd.push(Ed.pop()+Od-Pd);gd.push(ba(si.types[rf],Td,wd,Ld-Pd,_d-Ld,Md)),Ed.push(Pd-Od)}function ba(gd,Ed,Od,Nd,Pd,Ld,rf){if(Ld){let _d=[NodeProp.contextHash,Ld];rf=rf?[_d].concat(rf):[_d]}if(Pd>25){let _d=[NodeProp.lookAhead,Pd];rf=rf?[_d].concat(rf):[_d]}return new Tree(gd,Ed,Od,Nd,rf)}function wa(gd,Ed){let Od=ci.fork(),Nd=0,Pd=0,Ld=0,rf=Od.end-ii,_d={size:0,start:0,skip:0};e:for(let Md=Od.pos-gd;Od.pos>Md;){let Td=Od.size;if(Od.id==Ed&&Td>=0){_d.size=Nd,_d.start=Pd,_d.skip=Ld,Ld+=4,Nd+=4,Od.next();continue}let wd=Od.pos-Td;if(Td<0||wd<Md||Od.start<rf)break;let Cd=Od.id>=li?4:0,sf=Od.start;for(Od.next();Od.pos>wd;){if(Od.size<0)if(Od.size==-3)Cd+=4;else break e;else Od.id>=li&&(Cd+=4);Od.next()}Pd=sf,Nd+=Td,Ld+=Cd}return(Ed<0||Nd==gd)&&(_d.size=Nd,_d.start=Pd,_d.skip=Ld),_d.size>4?_d:void 0}function xa(gd,Ed,Od){let{id:Nd,start:Pd,end:Ld,size:rf}=ci;if(ci.next(),rf>=0&&Nd<li){let _d=Od;if(rf>4){let Md=ci.pos-(rf-4);for(;ci.pos>Md;)Od=xa(gd,Ed,Od)}Ed[--Od]=_d,Ed[--Od]=Ld-gd,Ed[--Od]=Pd-gd,Ed[--Od]=Nd}else rf==-3?di=Nd:rf==-4&&(hi=Nd);return Od}let Ca=[],el=[];for(;ci.pos>0;)pi(Ws.start||0,Ws.bufferStart||0,Ca,el,-1,0);let ku=(ws=Ws.length)!==null&&ws!==void 0?ws:Ca.length?el[0]+Ca[0].length:0;return new Tree(ui[Ws.topID],Ca.reverse(),el.reverse(),ku)}const nodeSizeCache=new WeakMap;function nodeSize(Ws,ws){if(!Ws.isAnonymous||ws instanceof TreeBuffer||ws.type!=Ws)return 1;let oi=nodeSizeCache.get(ws);if(oi==null){oi=1;for(let si of ws.children){if(si.type!=Ws||!(si instanceof Tree)){oi=1;break}oi+=nodeSize(Ws,si)}nodeSizeCache.set(ws,oi)}return oi}function balanceRange(Ws,ws,oi,si,ii,ai,li,ci,ui){let di=0;for(let va=si;va<ii;va++)di+=nodeSize(Ws,ws[va]);let hi=Math.ceil(di*1.5/8),pi=[],ha=[];function ga(va,ba,wa,xa,Ca){for(let el=wa;el<xa;){let ku=el,gd=ba[el],Ed=nodeSize(Ws,va[el]);for(el++;el<xa;el++){let Od=nodeSize(Ws,va[el]);if(Ed+Od>=hi)break;Ed+=Od}if(el==ku+1){if(Ed>hi){let Od=va[ku];ga(Od.children,Od.positions,0,Od.children.length,ba[ku]+Ca);continue}pi.push(va[ku])}else{let Od=ba[el-1]+va[el-1].length-gd;pi.push(balanceRange(Ws,va,ba,ku,el,gd,Od,null,ui))}ha.push(gd+Ca-ai)}}return ga(ws,oi,si,ii,0),(ci||ui)(pi,ha,li)}class TreeFragment{constructor(ws,oi,si,ii,ai=!1,li=!1){this.from=ws,this.to=oi,this.tree=si,this.offset=ii,this.open=(ai?1:0)|(li?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(ws,oi=[],si=!1){let ii=[new TreeFragment(0,ws.length,ws,0,!1,si)];for(let ai of oi)ai.to>ws.length&&ii.push(ai);return ii}static applyChanges(ws,oi,si=128){if(!oi.length)return ws;let ii=[],ai=1,li=ws.length?ws[0]:null;for(let ci=0,ui=0,di=0;;ci++){let hi=ci<oi.length?oi[ci]:null,pi=hi?hi.fromA:1e9;if(pi-ui>=si)for(;li&&li.from<pi;){let ha=li;if(ui>=ha.from||pi<=ha.to||di){let ga=Math.max(ha.from,ui)-di,va=Math.min(ha.to,pi)-di;ha=ga>=va?null:new TreeFragment(ga,va,ha.tree,ha.offset+di,ci>0,!!hi)}if(ha&&ii.push(ha),li.to>pi)break;li=ai<ws.length?ws[ai++]:null}if(!hi)break;ui=hi.toA,di=hi.toA-hi.toB}return ii}}class Parser{startParse(ws,oi,si){return typeof ws=="string"&&(ws=new StringInput(ws)),si=si?si.length?si.map(ii=>new Range$2(ii.from,ii.to)):[new Range$2(0,0)]:[new Range$2(0,ws.length)],this.createParse(ws,oi||[],si)}parse(ws,oi,si){let ii=this.startParse(ws,oi,si);for(;;){let ai=ii.advance();if(ai)return ai}}}class StringInput{constructor(ws){this.string=ws}get length(){return this.string.length}chunk(ws){return this.string.slice(ws)}get lineChunks(){return!1}read(ws,oi){return this.string.slice(ws,oi)}}new NodeProp({perNode:!0});let nextTagID=0;class Tag{constructor(ws,oi,si,ii){this.name=ws,this.set=oi,this.base=si,this.modified=ii,this.id=nextTagID++}toString(){let{name:ws}=this;for(let oi of this.modified)oi.name&&(ws=`${oi.name}(${ws})`);return ws}static define(ws,oi){let si=typeof ws=="string"?ws:"?";if(ws instanceof Tag&&(oi=ws),oi!=null&&oi.base)throw new Error("Can not derive from a modified tag");let ii=new Tag(si,[],null,[]);if(ii.set.push(ii),oi)for(let ai of oi.set)ii.set.push(ai);return ii}static defineModifier(ws){let oi=new Modifier(ws);return si=>si.modified.indexOf(oi)>-1?si:Modifier.get(si.base||si,si.modified.concat(oi).sort((ii,ai)=>ii.id-ai.id))}}let nextModifierID=0;class Modifier{constructor(ws){this.name=ws,this.instances=[],this.id=nextModifierID++}static get(ws,oi){if(!oi.length)return ws;let si=oi[0].instances.find(ci=>ci.base==ws&&sameArray(oi,ci.modified));if(si)return si;let ii=[],ai=new Tag(ws.name,ii,ws,oi);for(let ci of oi)ci.instances.push(ai);let li=powerSet(oi);for(let ci of ws.set)if(!ci.modified.length)for(let ui of li)ii.push(Modifier.get(ci,ui));return ai}}function sameArray(Ws,ws){return Ws.length==ws.length&&Ws.every((oi,si)=>oi==ws[si])}function powerSet(Ws){let ws=[[]];for(let oi=0;oi<Ws.length;oi++)for(let si=0,ii=ws.length;si<ii;si++)ws.push(ws[si].concat(Ws[oi]));return ws.sort((oi,si)=>si.length-oi.length)}function styleTags(Ws){let ws=Object.create(null);for(let oi in Ws){let si=Ws[oi];Array.isArray(si)||(si=[si]);for(let ii of oi.split(" "))if(ii){let ai=[],li=2,ci=ii;for(let pi=0;;){if(ci=="..."&&pi>0&&pi+3==ii.length){li=1;break}let ha=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(ci);if(!ha)throw new RangeError("Invalid path: "+ii);if(ai.push(ha[0]=="*"?"":ha[0][0]=='"'?JSON.parse(ha[0]):ha[0]),pi+=ha[0].length,pi==ii.length)break;let ga=ii[pi++];if(pi==ii.length&&ga=="!"){li=0;break}if(ga!="/")throw new RangeError("Invalid path: "+ii);ci=ii.slice(pi)}let ui=ai.length-1,di=ai[ui];if(!di)throw new RangeError("Invalid path: "+ii);let hi=new Rule(si,li,ui>0?ai.slice(0,ui):null);ws[di]=hi.sort(ws[di])}}return ruleNodeProp.add(ws)}const ruleNodeProp=new NodeProp;class Rule{constructor(ws,oi,si,ii){this.tags=ws,this.mode=oi,this.context=si,this.next=ii}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(ws){return!ws||ws.depth<this.depth?(this.next=ws,this):(ws.next=this.sort(ws.next),ws)}get depth(){return this.context?this.context.length:0}}Rule.empty=new Rule([],2,null);function tagHighlighter(Ws,ws){let oi=Object.create(null);for(let ai of Ws)if(!Array.isArray(ai.tag))oi[ai.tag.id]=ai.class;else for(let li of ai.tag)oi[li.id]=ai.class;let{scope:si,all:ii=null}=ws||{};return{style:ai=>{let li=ii;for(let ci of ai)for(let ui of ci.set){let di=oi[ui.id];if(di){li=li?li+" "+di:di;break}}return li},scope:si}}function highlightTags(Ws,ws){let oi=null;for(let si of Ws){let ii=si.style(ws);ii&&(oi=oi?oi+" "+ii:ii)}return oi}function highlightTree(Ws,ws,oi,si=0,ii=Ws.length){let ai=new HighlightBuilder(si,Array.isArray(ws)?ws:[ws],oi);ai.highlightRange(Ws.cursor(),si,ii,"",ai.highlighters),ai.flush(ii)}class HighlightBuilder{constructor(ws,oi,si){this.at=ws,this.highlighters=oi,this.span=si,this.class=""}startSpan(ws,oi){oi!=this.class&&(this.flush(ws),ws>this.at&&(this.at=ws),this.class=oi)}flush(ws){ws>this.at&&this.class&&this.span(this.at,ws,this.class)}highlightRange(ws,oi,si,ii,ai){let{type:li,from:ci,to:ui}=ws;if(ci>=si||ui<=oi)return;li.isTop&&(ai=this.highlighters.filter(ga=>!ga.scope||ga.scope(li)));let di=ii,hi=getStyleTags(ws)||Rule.empty,pi=highlightTags(ai,hi.tags);if(pi&&(di&&(di+=" "),di+=pi,hi.mode==1&&(ii+=(ii?" ":"")+pi)),this.startSpan(Math.max(oi,ci),di),hi.opaque)return;let ha=ws.tree&&ws.tree.prop(NodeProp.mounted);if(ha&&ha.overlay){let ga=ws.node.enter(ha.overlay[0].from+ci,1),va=this.highlighters.filter(wa=>!wa.scope||wa.scope(ha.tree.type)),ba=ws.firstChild();for(let wa=0,xa=ci;;wa++){let Ca=wa<ha.overlay.length?ha.overlay[wa]:null,el=Ca?Ca.from+ci:ui,ku=Math.max(oi,xa),gd=Math.min(si,el);if(ku<gd&&ba)for(;ws.from<gd&&(this.highlightRange(ws,ku,gd,ii,ai),this.startSpan(Math.min(gd,ws.to),di),!(ws.to>=el||!ws.nextSibling())););if(!Ca||el>si)break;xa=Ca.to+ci,xa>oi&&(this.highlightRange(ga.cursor(),Math.max(oi,Ca.from+ci),Math.min(si,xa),"",va),this.startSpan(Math.min(si,xa),di))}ba&&ws.parent()}else if(ws.firstChild()){ha&&(ii="");do if(!(ws.to<=oi)){if(ws.from>=si)break;this.highlightRange(ws,oi,si,ii,ai),this.startSpan(Math.min(si,ws.to),di)}while(ws.nextSibling());ws.parent()}}}function getStyleTags(Ws){let ws=Ws.type.prop(ruleNodeProp);for(;ws&&ws.context&&!Ws.matchContext(ws.context);)ws=ws.next;return ws||null}const t$1=Tag.define,comment=t$1(),name$1=t$1(),typeName=t$1(name$1),propertyName=t$1(name$1),literal=t$1(),string=t$1(literal),number=t$1(literal),content=t$1(),heading=t$1(content),keyword=t$1(),operator=t$1(),punctuation=t$1(),bracket=t$1(punctuation),meta=t$1(),tags={comment,lineComment:t$1(comment),blockComment:t$1(comment),docComment:t$1(comment),name:name$1,variableName:t$1(name$1),typeName,tagName:t$1(typeName),propertyName,attributeName:t$1(propertyName),className:t$1(name$1),labelName:t$1(name$1),namespace:t$1(name$1),macroName:t$1(name$1),literal,string,docString:t$1(string),character:t$1(string),attributeValue:t$1(string),number,integer:t$1(number),float:t$1(number),bool:t$1(literal),regexp:t$1(literal),escape:t$1(literal),color:t$1(literal),url:t$1(literal),keyword,self:t$1(keyword),null:t$1(keyword),atom:t$1(keyword),unit:t$1(keyword),modifier:t$1(keyword),operatorKeyword:t$1(keyword),controlKeyword:t$1(keyword),definitionKeyword:t$1(keyword),moduleKeyword:t$1(keyword),operator,derefOperator:t$1(operator),arithmeticOperator:t$1(operator),logicOperator:t$1(operator),bitwiseOperator:t$1(operator),compareOperator:t$1(operator),updateOperator:t$1(operator),definitionOperator:t$1(operator),typeOperator:t$1(operator),controlOperator:t$1(operator),punctuation,separator:t$1(punctuation),bracket,angleBracket:t$1(bracket),squareBracket:t$1(bracket),paren:t$1(bracket),brace:t$1(bracket),content,heading,heading1:t$1(heading),heading2:t$1(heading),heading3:t$1(heading),heading4:t$1(heading),heading5:t$1(heading),heading6:t$1(heading),contentSeparator:t$1(content),list:t$1(content),quote:t$1(content),emphasis:t$1(content),strong:t$1(content),link:t$1(content),monospace:t$1(content),strikethrough:t$1(content),inserted:t$1(),deleted:t$1(),changed:t$1(),invalid:t$1(),meta,documentMeta:t$1(meta),annotation:t$1(meta),processingInstruction:t$1(meta),definition:Tag.defineModifier("definition"),constant:Tag.defineModifier("constant"),function:Tag.defineModifier("function"),standard:Tag.defineModifier("standard"),local:Tag.defineModifier("local"),special:Tag.defineModifier("special")};for(let Ws in tags){let ws=tags[Ws];ws instanceof Tag&&(ws.name=Ws)}tagHighlighter([{tag:tags.link,class:"tok-link"},{tag:tags.heading,class:"tok-heading"},{tag:tags.emphasis,class:"tok-emphasis"},{tag:tags.strong,class:"tok-strong"},{tag:tags.keyword,class:"tok-keyword"},{tag:tags.atom,class:"tok-atom"},{tag:tags.bool,class:"tok-bool"},{tag:tags.url,class:"tok-url"},{tag:tags.labelName,class:"tok-labelName"},{tag:tags.inserted,class:"tok-inserted"},{tag:tags.deleted,class:"tok-deleted"},{tag:tags.literal,class:"tok-literal"},{tag:tags.string,class:"tok-string"},{tag:tags.number,class:"tok-number"},{tag:[tags.regexp,tags.escape,tags.special(tags.string)],class:"tok-string2"},{tag:tags.variableName,class:"tok-variableName"},{tag:tags.local(tags.variableName),class:"tok-variableName tok-local"},{tag:tags.definition(tags.variableName),class:"tok-variableName tok-definition"},{tag:tags.special(tags.variableName),class:"tok-variableName2"},{tag:tags.definition(tags.propertyName),class:"tok-propertyName tok-definition"},{tag:tags.typeName,class:"tok-typeName"},{tag:tags.namespace,class:"tok-namespace"},{tag:tags.className,class:"tok-className"},{tag:tags.macroName,class:"tok-macroName"},{tag:tags.propertyName,class:"tok-propertyName"},{tag:tags.operator,class:"tok-operator"},{tag:tags.comment,class:"tok-comment"},{tag:tags.meta,class:"tok-meta"},{tag:tags.invalid,class:"tok-invalid"},{tag:tags.punctuation,class:"tok-punctuation"}]);var _a;const languageDataProp=new NodeProp;function defineLanguageFacet(Ws){return Facet.define({combine:Ws?ws=>ws.concat(Ws):void 0})}const sublanguageProp=new NodeProp;class Language{constructor(ws,oi,si=[],ii=""){this.data=ws,this.name=ii,EditorState.prototype.hasOwnProperty("tree")||Object.defineProperty(EditorState.prototype,"tree",{get(){return syntaxTree(this)}}),this.parser=oi,this.extension=[language.of(this),EditorState.languageData.of((ai,li,ci)=>{let ui=topNodeAt(ai,li,ci),di=ui.type.prop(languageDataProp);if(!di)return[];let hi=ai.facet(di),pi=ui.type.prop(sublanguageProp);if(pi){let ha=ui.resolve(li-ui.from,ci);for(let ga of pi)if(ga.test(ha,ai)){let va=ai.facet(ga.facet);return ga.type=="replace"?va:va.concat(hi)}}return hi})].concat(si)}isActiveAt(ws,oi,si=-1){return topNodeAt(ws,oi,si).type.prop(languageDataProp)==this.data}findRegions(ws){let oi=ws.facet(language);if((oi==null?void 0:oi.data)==this.data)return[{from:0,to:ws.doc.length}];if(!oi||!oi.allowsNesting)return[];let si=[],ii=(ai,li)=>{if(ai.prop(languageDataProp)==this.data){si.push({from:li,to:li+ai.length});return}let ci=ai.prop(NodeProp.mounted);if(ci){if(ci.tree.prop(languageDataProp)==this.data){if(ci.overlay)for(let ui of ci.overlay)si.push({from:ui.from+li,to:ui.to+li});else si.push({from:li,to:li+ai.length});return}else if(ci.overlay){let ui=si.length;if(ii(ci.tree,ci.overlay[0].from+li),si.length>ui)return}}for(let ui=0;ui<ai.children.length;ui++){let di=ai.children[ui];di instanceof Tree&&ii(di,ai.positions[ui]+li)}};return ii(syntaxTree(ws),0),si}get allowsNesting(){return!0}}Language.setState=StateEffect.define();function topNodeAt(Ws,ws,oi){let si=Ws.facet(language),ii=syntaxTree(Ws).topNode;if(!si||si.allowsNesting)for(let ai=ii;ai;ai=ai.enter(ws,oi,IterMode.ExcludeBuffers))ai.type.isTop&&(ii=ai);return ii}class LRLanguage extends Language{constructor(ws,oi,si){super(ws,oi,[],si),this.parser=oi}static define(ws){let oi=defineLanguageFacet(ws.languageData);return new LRLanguage(oi,ws.parser.configure({props:[languageDataProp.add(si=>si.isTop?oi:void 0)]}),ws.name)}configure(ws,oi){return new LRLanguage(this.data,this.parser.configure(ws),oi||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function syntaxTree(Ws){let ws=Ws.field(Language.state,!1);return ws?ws.tree:Tree.empty}class DocInput{constructor(ws){this.doc=ws,this.cursorPos=0,this.string="",this.cursor=ws.iter()}get length(){return this.doc.length}syncTo(ws){return this.string=this.cursor.next(ws-this.cursorPos).value,this.cursorPos=ws+this.string.length,this.cursorPos-this.string.length}chunk(ws){return this.syncTo(ws),this.string}get lineChunks(){return!0}read(ws,oi){let si=this.cursorPos-this.string.length;return ws<si||oi>=this.cursorPos?this.doc.sliceString(ws,oi):this.string.slice(ws-si,oi-si)}}let currentContext=null;class ParseContext{constructor(ws,oi,si=[],ii,ai,li,ci,ui){this.parser=ws,this.state=oi,this.fragments=si,this.tree=ii,this.treeLen=ai,this.viewport=li,this.skipped=ci,this.scheduleOn=ui,this.parse=null,this.tempSkipped=[]}static create(ws,oi,si){return new ParseContext(ws,oi,[],Tree.empty,0,si,[],null)}startParse(){return this.parser.startParse(new DocInput(this.state.doc),this.fragments)}work(ws,oi){return oi!=null&&oi>=this.state.doc.length&&(oi=void 0),this.tree!=Tree.empty&&this.isDone(oi??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var si;if(typeof ws=="number"){let ii=Date.now()+ws;ws=()=>Date.now()>ii}for(this.parse||(this.parse=this.startParse()),oi!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>oi)&&oi<this.state.doc.length&&this.parse.stopAt(oi);;){let ii=this.parse.advance();if(ii)if(this.fragments=this.withoutTempSkipped(TreeFragment.addTree(ii,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(si=this.parse.stoppedAt)!==null&&si!==void 0?si:this.state.doc.length,this.tree=ii,this.parse=null,this.treeLen<(oi??this.state.doc.length))this.parse=this.startParse();else return!0;if(ws())return!1}})}takeTree(){let ws,oi;this.parse&&(ws=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>ws)&&this.parse.stopAt(ws),this.withContext(()=>{for(;!(oi=this.parse.advance()););}),this.treeLen=ws,this.tree=oi,this.fragments=this.withoutTempSkipped(TreeFragment.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(ws){let oi=currentContext;currentContext=this;try{return ws()}finally{currentContext=oi}}withoutTempSkipped(ws){for(let oi;oi=this.tempSkipped.pop();)ws=cutFragments(ws,oi.from,oi.to);return ws}changes(ws,oi){let{fragments:si,tree:ii,treeLen:ai,viewport:li,skipped:ci}=this;if(this.takeTree(),!ws.empty){let ui=[];if(ws.iterChangedRanges((di,hi,pi,ha)=>ui.push({fromA:di,toA:hi,fromB:pi,toB:ha})),si=TreeFragment.applyChanges(si,ui),ii=Tree.empty,ai=0,li={from:ws.mapPos(li.from,-1),to:ws.mapPos(li.to,1)},this.skipped.length){ci=[];for(let di of this.skipped){let hi=ws.mapPos(di.from,1),pi=ws.mapPos(di.to,-1);hi<pi&&ci.push({from:hi,to:pi})}}}return new ParseContext(this.parser,oi,si,ii,ai,li,ci,this.scheduleOn)}updateViewport(ws){if(this.viewport.from==ws.from&&this.viewport.to==ws.to)return!1;this.viewport=ws;let oi=this.skipped.length;for(let si=0;si<this.skipped.length;si++){let{from:ii,to:ai}=this.skipped[si];ii<ws.to&&ai>ws.from&&(this.fragments=cutFragments(this.fragments,ii,ai),this.skipped.splice(si--,1))}return this.skipped.length>=oi?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(ws,oi){this.skipped.push({from:ws,to:oi})}static getSkippingParser(ws){return new class extends Parser{createParse(oi,si,ii){let ai=ii[0].from,li=ii[ii.length-1].to;return{parsedPos:ai,advance(){let ci=currentContext;if(ci){for(let ui of ii)ci.tempSkipped.push(ui);ws&&(ci.scheduleOn=ci.scheduleOn?Promise.all([ci.scheduleOn,ws]):ws)}return this.parsedPos=li,new Tree(NodeType.none,[],[],li-ai)},stoppedAt:null,stopAt(){}}}}}isDone(ws){ws=Math.min(ws,this.state.doc.length);let oi=this.fragments;return this.treeLen>=ws&&oi.length&&oi[0].from==0&&oi[0].to>=ws}static get(){return currentContext}}function cutFragments(Ws,ws,oi){return TreeFragment.applyChanges(Ws,[{fromA:ws,toA:oi,fromB:ws,toB:oi}])}class LanguageState{constructor(ws){this.context=ws,this.tree=ws.tree}apply(ws){if(!ws.docChanged&&this.tree==this.context.tree)return this;let oi=this.context.changes(ws.changes,ws.state),si=this.context.treeLen==ws.startState.doc.length?void 0:Math.max(ws.changes.mapPos(this.context.treeLen),oi.viewport.to);return oi.work(20,si)||oi.takeTree(),new LanguageState(oi)}static init(ws){let oi=Math.min(3e3,ws.doc.length),si=ParseContext.create(ws.facet(language).parser,ws,{from:0,to:oi});return si.work(20,oi)||si.takeTree(),new LanguageState(si)}}Language.state=StateField.define({create:LanguageState.init,update(Ws,ws){for(let oi of ws.effects)if(oi.is(Language.setState))return oi.value;return ws.startState.facet(language)!=ws.state.facet(language)?LanguageState.init(ws.state):Ws.apply(ws)}});let requestIdle=Ws=>{let ws=setTimeout(()=>Ws(),500);return()=>clearTimeout(ws)};typeof requestIdleCallback<"u"&&(requestIdle=Ws=>{let ws=-1,oi=setTimeout(()=>{ws=requestIdleCallback(Ws,{timeout:400})},100);return()=>ws<0?clearTimeout(oi):cancelIdleCallback(ws)});const isInputPending=typeof navigator<"u"&&!((_a=navigator.scheduling)===null||_a===void 0)&&_a.isInputPending?()=>navigator.scheduling.isInputPending():null,parseWorker=ViewPlugin.fromClass(class{constructor(Ws){this.view=Ws,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(Ws){let ws=this.view.state.field(Language.state).context;(ws.updateViewport(Ws.view.viewport)||this.view.viewport.to>ws.treeLen)&&this.scheduleWork(),(Ws.docChanged||Ws.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(ws)}scheduleWork(){if(this.working)return;let{state:Ws}=this.view,ws=Ws.field(Language.state);(ws.tree!=ws.context.tree||!ws.context.isDone(Ws.doc.length))&&(this.working=requestIdle(this.work))}work(Ws){this.working=null;let ws=Date.now();if(this.chunkEnd<ws&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=ws+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:oi,viewport:{to:si}}=this.view,ii=oi.field(Language.state);if(ii.tree==ii.context.tree&&ii.context.isDone(si+1e5))return;let ai=Date.now()+Math.min(this.chunkBudget,100,Ws&&!isInputPending?Math.max(25,Ws.timeRemaining()-5):1e9),li=ii.context.treeLen<si&&oi.doc.length>si+1e3,ci=ii.context.work(()=>isInputPending&&isInputPending()||Date.now()>ai,si+(li?0:1e5));this.chunkBudget-=Date.now()-ws,(ci||this.chunkBudget<=0)&&(ii.context.takeTree(),this.view.dispatch({effects:Language.setState.of(new LanguageState(ii.context))})),this.chunkBudget>0&&!(ci&&!li)&&this.scheduleWork(),this.checkAsyncSchedule(ii.context)}checkAsyncSchedule(Ws){Ws.scheduleOn&&(this.workScheduled++,Ws.scheduleOn.then(()=>this.scheduleWork()).catch(ws=>logException(this.view.state,ws)).then(()=>this.workScheduled--),Ws.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),language=Facet.define({combine(Ws){return Ws.length?Ws[0]:null},enables:Ws=>[Language.state,parseWorker,EditorView.contentAttributes.compute([Ws],ws=>{let oi=ws.facet(Ws);return oi&&oi.name?{"data-language":oi.name}:{}})]});class LanguageSupport{constructor(ws,oi=[]){this.language=ws,this.support=oi,this.extension=[ws,oi]}}const indentService=Facet.define(),indentUnit=Facet.define({combine:Ws=>{if(!Ws.length)return" ";let ws=Ws[0];if(!ws||/\S/.test(ws)||Array.from(ws).some(oi=>oi!=ws[0]))throw new Error("Invalid indent unit: "+JSON.stringify(Ws[0]));return ws}});function getIndentUnit(Ws){let ws=Ws.facet(indentUnit);return ws.charCodeAt(0)==9?Ws.tabSize*ws.length:ws.length}function indentString(Ws,ws){let oi="",si=Ws.tabSize,ii=Ws.facet(indentUnit)[0];if(ii==" "){for(;ws>=si;)oi+=" ",ws-=si;ii=" "}for(let ai=0;ai<ws;ai++)oi+=ii;return oi}function getIndentation(Ws,ws){Ws instanceof EditorState&&(Ws=new IndentContext(Ws));for(let si of Ws.state.facet(indentService)){let ii=si(Ws,ws);if(ii!==void 0)return ii}let oi=syntaxTree(Ws.state);return oi.length>=ws?syntaxIndentation(Ws,oi,ws):null}class IndentContext{constructor(ws,oi={}){this.state=ws,this.options=oi,this.unit=getIndentUnit(ws)}lineAt(ws,oi=1){let si=this.state.doc.lineAt(ws),{simulateBreak:ii,simulateDoubleBreak:ai}=this.options;return ii!=null&&ii>=si.from&&ii<=si.to?ai&&ii==ws?{text:"",from:ws}:(oi<0?ii<ws:ii<=ws)?{text:si.text.slice(ii-si.from),from:ii}:{text:si.text.slice(0,ii-si.from),from:si.from}:si}textAfterPos(ws,oi=1){if(this.options.simulateDoubleBreak&&ws==this.options.simulateBreak)return"";let{text:si,from:ii}=this.lineAt(ws,oi);return si.slice(ws-ii,Math.min(si.length,ws+100-ii))}column(ws,oi=1){let{text:si,from:ii}=this.lineAt(ws,oi),ai=this.countColumn(si,ws-ii),li=this.options.overrideIndentation?this.options.overrideIndentation(ii):-1;return li>-1&&(ai+=li-this.countColumn(si,si.search(/\S|$/))),ai}countColumn(ws,oi=ws.length){return countColumn(ws,this.state.tabSize,oi)}lineIndent(ws,oi=1){let{text:si,from:ii}=this.lineAt(ws,oi),ai=this.options.overrideIndentation;if(ai){let li=ai(ii);if(li>-1)return li}return this.countColumn(si,si.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const indentNodeProp=new NodeProp;function syntaxIndentation(Ws,ws,oi){let si=ws.resolveStack(oi),ii=ws.resolveInner(oi,-1).resolve(oi,0).enterUnfinishedNodesBefore(oi);if(ii!=si.node){let ai=[];for(let li=ii;li&&!(li.from==si.node.from&&li.type==si.node.type);li=li.parent)ai.push(li);for(let li=ai.length-1;li>=0;li--)si={node:ai[li],next:si}}return indentFor(si,Ws,oi)}function indentFor(Ws,ws,oi){for(let si=Ws;si;si=si.next){let ii=indentStrategy(si.node);if(ii)return ii(TreeIndentContext.create(ws,oi,si))}return 0}function ignoreClosed(Ws){return Ws.pos==Ws.options.simulateBreak&&Ws.options.simulateDoubleBreak}function indentStrategy(Ws){let ws=Ws.type.prop(indentNodeProp);if(ws)return ws;let oi=Ws.firstChild,si;if(oi&&(si=oi.type.prop(NodeProp.closedBy))){let ii=Ws.lastChild,ai=ii&&si.indexOf(ii.name)>-1;return li=>delimitedStrategy(li,!0,1,void 0,ai&&!ignoreClosed(li)?ii.from:void 0)}return Ws.parent==null?topIndent:null}function topIndent(){return 0}class TreeIndentContext extends IndentContext{constructor(ws,oi,si){super(ws.state,ws.options),this.base=ws,this.pos=oi,this.context=si}get node(){return this.context.node}static create(ws,oi,si){return new TreeIndentContext(ws,oi,si)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(ws){let oi=this.state.doc.lineAt(ws.from);for(;;){let si=ws.resolve(oi.from);for(;si.parent&&si.parent.from==si.from;)si=si.parent;if(isParent(si,ws))break;oi=this.state.doc.lineAt(si.from)}return this.lineIndent(oi.from)}continue(){return indentFor(this.context.next,this.base,this.pos)}}function isParent(Ws,ws){for(let oi=ws;oi;oi=oi.parent)if(Ws==oi)return!0;return!1}function bracketedAligned(Ws){let ws=Ws.node,oi=ws.childAfter(ws.from),si=ws.lastChild;if(!oi)return null;let ii=Ws.options.simulateBreak,ai=Ws.state.doc.lineAt(oi.from),li=ii==null||ii<=ai.from?ai.to:Math.min(ai.to,ii);for(let ci=oi.to;;){let ui=ws.childAfter(ci);if(!ui||ui==si)return null;if(!ui.type.isSkipped){if(ui.from>=li)return null;let di=/^ */.exec(ai.text.slice(oi.to-ai.from))[0].length;return{from:oi.from,to:oi.to+di}}ci=ui.to}}function delimitedIndent({closing:Ws,align:ws=!0,units:oi=1}){return si=>delimitedStrategy(si,ws,oi,Ws)}function delimitedStrategy(Ws,ws,oi,si,ii){let ai=Ws.textAfter,li=ai.match(/^\s*/)[0].length,ci=si&&ai.slice(li,li+si.length)==si||ii==Ws.pos+li,ui=ws?bracketedAligned(Ws):null;return ui?ci?Ws.column(ui.from):Ws.column(ui.to):Ws.baseIndent+(ci?0:Ws.unit*oi)}function continuedIndent({except:Ws,units:ws=1}={}){return oi=>{let si=Ws&&Ws.test(oi.textAfter);return oi.baseIndent+(si?0:ws*oi.unit)}}const DontIndentBeyond=200;function indentOnInput(){return EditorState.transactionFilter.of(Ws=>{if(!Ws.docChanged||!Ws.isUserEvent("input.type")&&!Ws.isUserEvent("input.complete"))return Ws;let ws=Ws.startState.languageDataAt("indentOnInput",Ws.startState.selection.main.head);if(!ws.length)return Ws;let oi=Ws.newDoc,{head:si}=Ws.newSelection.main,ii=oi.lineAt(si);if(si>ii.from+DontIndentBeyond)return Ws;let ai=oi.sliceString(ii.from,si);if(!ws.some(di=>di.test(ai)))return Ws;let{state:li}=Ws,ci=-1,ui=[];for(let{head:di}of li.selection.ranges){let hi=li.doc.lineAt(di);if(hi.from==ci)continue;ci=hi.from;let pi=getIndentation(li,hi.from);if(pi==null)continue;let ha=/^\s*/.exec(hi.text)[0],ga=indentString(li,pi);ha!=ga&&ui.push({from:hi.from,to:hi.from+ha.length,insert:ga})}return ui.length?[Ws,{changes:ui,sequential:!0}]:Ws})}const foldService=Facet.define(),foldNodeProp=new NodeProp;function foldInside(Ws){let ws=Ws.firstChild,oi=Ws.lastChild;return ws&&ws.to<oi.from?{from:ws.to,to:oi.type.isError?Ws.to:oi.from}:null}function syntaxFolding(Ws,ws,oi){let si=syntaxTree(Ws);if(si.length<oi)return null;let ii=si.resolveStack(oi,1),ai=null;for(let li=ii;li;li=li.next){let ci=li.node;if(ci.to<=oi||ci.from>oi)continue;if(ai&&ci.from<ws)break;let ui=ci.type.prop(foldNodeProp);if(ui&&(ci.to<si.length-50||si.length==Ws.doc.length||!isUnfinished(ci))){let di=ui(ci,Ws);di&&di.from<=oi&&di.from>=ws&&di.to>oi&&(ai=di)}}return ai}function isUnfinished(Ws){let ws=Ws.lastChild;return ws&&ws.to==Ws.to&&ws.type.isError}function foldable(Ws,ws,oi){for(let si of Ws.facet(foldService)){let ii=si(Ws,ws,oi);if(ii)return ii}return syntaxFolding(Ws,ws,oi)}function mapRange(Ws,ws){let oi=ws.mapPos(Ws.from,1),si=ws.mapPos(Ws.to,-1);return oi>=si?void 0:{from:oi,to:si}}const foldEffect=StateEffect.define({map:mapRange}),unfoldEffect=StateEffect.define({map:mapRange});function selectedLines(Ws){let ws=[];for(let{head:oi}of Ws.state.selection.ranges)ws.some(si=>si.from<=oi&&si.to>=oi)||ws.push(Ws.lineBlockAt(oi));return ws}const foldState=StateField.define({create(){return Decoration.none},update(Ws,ws){Ws=Ws.map(ws.changes);for(let oi of ws.effects)if(oi.is(foldEffect)&&!foldExists(Ws,oi.value.from,oi.value.to)){let{preparePlaceholder:si}=ws.state.facet(foldConfig),ii=si?Decoration.replace({widget:new PreparedFoldWidget(si(ws.state,oi.value))}):foldWidget;Ws=Ws.update({add:[ii.range(oi.value.from,oi.value.to)]})}else oi.is(unfoldEffect)&&(Ws=Ws.update({filter:(si,ii)=>oi.value.from!=si||oi.value.to!=ii,filterFrom:oi.value.from,filterTo:oi.value.to}));if(ws.selection){let oi=!1,{head:si}=ws.selection.main;Ws.between(si,si,(ii,ai)=>{ii<si&&ai>si&&(oi=!0)}),oi&&(Ws=Ws.update({filterFrom:si,filterTo:si,filter:(ii,ai)=>ai<=si||ii>=si}))}return Ws},provide:Ws=>EditorView.decorations.from(Ws),toJSON(Ws,ws){let oi=[];return Ws.between(0,ws.doc.length,(si,ii)=>{oi.push(si,ii)}),oi},fromJSON(Ws){if(!Array.isArray(Ws)||Ws.length%2)throw new RangeError("Invalid JSON for fold state");let ws=[];for(let oi=0;oi<Ws.length;){let si=Ws[oi++],ii=Ws[oi++];if(typeof si!="number"||typeof ii!="number")throw new RangeError("Invalid JSON for fold state");ws.push(foldWidget.range(si,ii))}return Decoration.set(ws,!0)}});function findFold(Ws,ws,oi){var si;let ii=null;return(si=Ws.field(foldState,!1))===null||si===void 0||si.between(ws,oi,(ai,li)=>{(!ii||ii.from>ai)&&(ii={from:ai,to:li})}),ii}function foldExists(Ws,ws,oi){let si=!1;return Ws.between(ws,ws,(ii,ai)=>{ii==ws&&ai==oi&&(si=!0)}),si}function maybeEnable(Ws,ws){return Ws.field(foldState,!1)?ws:ws.concat(StateEffect.appendConfig.of(codeFolding()))}const foldCode=Ws=>{for(let ws of selectedLines(Ws)){let oi=foldable(Ws.state,ws.from,ws.to);if(oi)return Ws.dispatch({effects:maybeEnable(Ws.state,[foldEffect.of(oi),announceFold(Ws,oi)])}),!0}return!1},unfoldCode=Ws=>{if(!Ws.state.field(foldState,!1))return!1;let ws=[];for(let oi of selectedLines(Ws)){let si=findFold(Ws.state,oi.from,oi.to);si&&ws.push(unfoldEffect.of(si),announceFold(Ws,si,!1))}return ws.length&&Ws.dispatch({effects:ws}),ws.length>0};function announceFold(Ws,ws,oi=!0){let si=Ws.state.doc.lineAt(ws.from).number,ii=Ws.state.doc.lineAt(ws.to).number;return EditorView.announce.of(`${Ws.state.phrase(oi?"Folded lines":"Unfolded lines")} ${si} ${Ws.state.phrase("to")} ${ii}.`)}const foldAll=Ws=>{let{state:ws}=Ws,oi=[];for(let si=0;si<ws.doc.length;){let ii=Ws.lineBlockAt(si),ai=foldable(ws,ii.from,ii.to);ai&&oi.push(foldEffect.of(ai)),si=(ai?Ws.lineBlockAt(ai.to):ii).to+1}return oi.length&&Ws.dispatch({effects:maybeEnable(Ws.state,oi)}),!!oi.length},unfoldAll=Ws=>{let ws=Ws.state.field(foldState,!1);if(!ws||!ws.size)return!1;let oi=[];return ws.between(0,Ws.state.doc.length,(si,ii)=>{oi.push(unfoldEffect.of({from:si,to:ii}))}),Ws.dispatch({effects:oi}),!0},foldKeymap=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:foldCode},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:unfoldCode},{key:"Ctrl-Alt-[",run:foldAll},{key:"Ctrl-Alt-]",run:unfoldAll}],defaultConfig={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},foldConfig=Facet.define({combine(Ws){return combineConfig(Ws,defaultConfig)}});function codeFolding(Ws){return[foldState,baseTheme$1$1]}function widgetToDOM(Ws,ws){let{state:oi}=Ws,si=oi.facet(foldConfig),ii=li=>{let ci=Ws.lineBlockAt(Ws.posAtDOM(li.target)),ui=findFold(Ws.state,ci.from,ci.to);ui&&Ws.dispatch({effects:unfoldEffect.of(ui)}),li.preventDefault()};if(si.placeholderDOM)return si.placeholderDOM(Ws,ii,ws);let ai=document.createElement("span");return ai.textContent=si.placeholderText,ai.setAttribute("aria-label",oi.phrase("folded code")),ai.title=oi.phrase("unfold"),ai.className="cm-foldPlaceholder",ai.onclick=ii,ai}const foldWidget=Decoration.replace({widget:new class extends WidgetType{toDOM(Ws){return widgetToDOM(Ws,null)}}});class PreparedFoldWidget extends WidgetType{constructor(ws){super(),this.value=ws}eq(ws){return this.value==ws.value}toDOM(ws){return widgetToDOM(ws,this.value)}}const foldGutterDefaults={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class FoldMarker extends GutterMarker{constructor(ws,oi){super(),this.config=ws,this.open=oi}eq(ws){return this.config==ws.config&&this.open==ws.open}toDOM(ws){if(this.config.markerDOM)return this.config.markerDOM(this.open);let oi=document.createElement("span");return oi.textContent=this.open?this.config.openText:this.config.closedText,oi.title=ws.state.phrase(this.open?"Fold line":"Unfold line"),oi}}function foldGutter(Ws={}){let ws=Object.assign(Object.assign({},foldGutterDefaults),Ws),oi=new FoldMarker(ws,!0),si=new FoldMarker(ws,!1),ii=ViewPlugin.fromClass(class{constructor(li){this.from=li.viewport.from,this.markers=this.buildMarkers(li)}update(li){(li.docChanged||li.viewportChanged||li.startState.facet(language)!=li.state.facet(language)||li.startState.field(foldState,!1)!=li.state.field(foldState,!1)||syntaxTree(li.startState)!=syntaxTree(li.state)||ws.foldingChanged(li))&&(this.markers=this.buildMarkers(li.view))}buildMarkers(li){let ci=new RangeSetBuilder;for(let ui of li.viewportLineBlocks){let di=findFold(li.state,ui.from,ui.to)?si:foldable(li.state,ui.from,ui.to)?oi:null;di&&ci.add(ui.from,ui.from,di)}return ci.finish()}}),{domEventHandlers:ai}=ws;return[ii,gutter({class:"cm-foldGutter",markers(li){var ci;return((ci=li.plugin(ii))===null||ci===void 0?void 0:ci.markers)||RangeSet.empty},initialSpacer(){return new FoldMarker(ws,!1)},domEventHandlers:Object.assign(Object.assign({},ai),{click:(li,ci,ui)=>{if(ai.click&&ai.click(li,ci,ui))return!0;let di=findFold(li.state,ci.from,ci.to);if(di)return li.dispatch({effects:unfoldEffect.of(di)}),!0;let hi=foldable(li.state,ci.from,ci.to);return hi?(li.dispatch({effects:foldEffect.of(hi)}),!0):!1}})}),codeFolding()]}const baseTheme$1$1=EditorView.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class HighlightStyle{constructor(ws,oi){this.specs=ws;let si;function ii(ci){let ui=StyleModule.newName();return(si||(si=Object.create(null)))["."+ui]=ci,ui}const ai=typeof oi.all=="string"?oi.all:oi.all?ii(oi.all):void 0,li=oi.scope;this.scope=li instanceof Language?ci=>ci.prop(languageDataProp)==li.data:li?ci=>ci==li:void 0,this.style=tagHighlighter(ws.map(ci=>({tag:ci.tag,class:ci.class||ii(Object.assign({},ci,{tag:null}))})),{all:ai}).style,this.module=si?new StyleModule(si):null,this.themeType=oi.themeType}static define(ws,oi){return new HighlightStyle(ws,oi||{})}}const highlighterFacet=Facet.define(),fallbackHighlighter=Facet.define({combine(Ws){return Ws.length?[Ws[0]]:null}});function getHighlighters(Ws){let ws=Ws.facet(highlighterFacet);return ws.length?ws:Ws.facet(fallbackHighlighter)}function syntaxHighlighting(Ws,ws){let oi=[treeHighlighter],si;return Ws instanceof HighlightStyle&&(Ws.module&&oi.push(EditorView.styleModule.of(Ws.module)),si=Ws.themeType),ws!=null&&ws.fallback?oi.push(fallbackHighlighter.of(Ws)):si?oi.push(highlighterFacet.computeN([EditorView.darkTheme],ii=>ii.facet(EditorView.darkTheme)==(si=="dark")?[Ws]:[])):oi.push(highlighterFacet.of(Ws)),oi}class TreeHighlighter{constructor(ws){this.markCache=Object.create(null),this.tree=syntaxTree(ws.state),this.decorations=this.buildDeco(ws,getHighlighters(ws.state)),this.decoratedTo=ws.viewport.to}update(ws){let oi=syntaxTree(ws.state),si=getHighlighters(ws.state),ii=si!=getHighlighters(ws.startState),{viewport:ai}=ws.view,li=ws.changes.mapPos(this.decoratedTo,1);oi.length<ai.to&&!ii&&oi.type==this.tree.type&&li>=ai.to?(this.decorations=this.decorations.map(ws.changes),this.decoratedTo=li):(oi!=this.tree||ws.viewportChanged||ii)&&(this.tree=oi,this.decorations=this.buildDeco(ws.view,si),this.decoratedTo=ai.to)}buildDeco(ws,oi){if(!oi||!this.tree.length)return Decoration.none;let si=new RangeSetBuilder;for(let{from:ii,to:ai}of ws.visibleRanges)highlightTree(this.tree,oi,(li,ci,ui)=>{si.add(li,ci,this.markCache[ui]||(this.markCache[ui]=Decoration.mark({class:ui})))},ii,ai);return si.finish()}}const treeHighlighter=Prec.high(ViewPlugin.fromClass(TreeHighlighter,{decorations:Ws=>Ws.decorations})),defaultHighlightStyle=HighlightStyle.define([{tag:tags.meta,color:"#404740"},{tag:tags.link,textDecoration:"underline"},{tag:tags.heading,textDecoration:"underline",fontWeight:"bold"},{tag:tags.emphasis,fontStyle:"italic"},{tag:tags.strong,fontWeight:"bold"},{tag:tags.strikethrough,textDecoration:"line-through"},{tag:tags.keyword,color:"#708"},{tag:[tags.atom,tags.bool,tags.url,tags.contentSeparator,tags.labelName],color:"#219"},{tag:[tags.literal,tags.inserted],color:"#164"},{tag:[tags.string,tags.deleted],color:"#a11"},{tag:[tags.regexp,tags.escape,tags.special(tags.string)],color:"#e40"},{tag:tags.definition(tags.variableName),color:"#00f"},{tag:tags.local(tags.variableName),color:"#30a"},{tag:[tags.typeName,tags.namespace],color:"#085"},{tag:tags.className,color:"#167"},{tag:[tags.special(tags.variableName),tags.macroName],color:"#256"},{tag:tags.definition(tags.propertyName),color:"#00c"},{tag:tags.comment,color:"#940"},{tag:tags.invalid,color:"#f00"}]),baseTheme$4=EditorView.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),DefaultScanDist=1e4,DefaultBrackets="()[]{}",bracketMatchingConfig=Facet.define({combine(Ws){return combineConfig(Ws,{afterCursor:!0,brackets:DefaultBrackets,maxScanDistance:DefaultScanDist,renderMatch:defaultRenderMatch})}}),matchingMark=Decoration.mark({class:"cm-matchingBracket"}),nonmatchingMark=Decoration.mark({class:"cm-nonmatchingBracket"});function defaultRenderMatch(Ws){let ws=[],oi=Ws.matched?matchingMark:nonmatchingMark;return ws.push(oi.range(Ws.start.from,Ws.start.to)),Ws.end&&ws.push(oi.range(Ws.end.from,Ws.end.to)),ws}const bracketMatchingState=StateField.define({create(){return Decoration.none},update(Ws,ws){if(!ws.docChanged&&!ws.selection)return Ws;let oi=[],si=ws.state.facet(bracketMatchingConfig);for(let ii of ws.state.selection.ranges){if(!ii.empty)continue;let ai=matchBrackets(ws.state,ii.head,-1,si)||ii.head>0&&matchBrackets(ws.state,ii.head-1,1,si)||si.afterCursor&&(matchBrackets(ws.state,ii.head,1,si)||ii.head<ws.state.doc.length&&matchBrackets(ws.state,ii.head+1,-1,si));ai&&(oi=oi.concat(si.renderMatch(ai,ws.state)))}return Decoration.set(oi,!0)},provide:Ws=>EditorView.decorations.from(Ws)}),bracketMatchingUnique=[bracketMatchingState,baseTheme$4];function bracketMatching(Ws={}){return[bracketMatchingConfig.of(Ws),bracketMatchingUnique]}const bracketMatchingHandle=new NodeProp;function matchingNodes(Ws,ws,oi){let si=Ws.prop(ws<0?NodeProp.openedBy:NodeProp.closedBy);if(si)return si;if(Ws.name.length==1){let ii=oi.indexOf(Ws.name);if(ii>-1&&ii%2==(ws<0?1:0))return[oi[ii+ws]]}return null}function findHandle(Ws){let ws=Ws.type.prop(bracketMatchingHandle);return ws?ws(Ws.node):Ws}function matchBrackets(Ws,ws,oi,si={}){let ii=si.maxScanDistance||DefaultScanDist,ai=si.brackets||DefaultBrackets,li=syntaxTree(Ws),ci=li.resolveInner(ws,oi);for(let ui=ci;ui;ui=ui.parent){let di=matchingNodes(ui.type,oi,ai);if(di&&ui.from<ui.to){let hi=findHandle(ui);if(hi&&(oi>0?ws>=hi.from&&ws<hi.to:ws>hi.from&&ws<=hi.to))return matchMarkedBrackets(Ws,ws,oi,ui,hi,di,ai)}}return matchPlainBrackets(Ws,ws,oi,li,ci.type,ii,ai)}function matchMarkedBrackets(Ws,ws,oi,si,ii,ai,li){let ci=si.parent,ui={from:ii.from,to:ii.to},di=0,hi=ci==null?void 0:ci.cursor();if(hi&&(oi<0?hi.childBefore(si.from):hi.childAfter(si.to)))do if(oi<0?hi.to<=si.from:hi.from>=si.to){if(di==0&&ai.indexOf(hi.type.name)>-1&&hi.from<hi.to){let pi=findHandle(hi);return{start:ui,end:pi?{from:pi.from,to:pi.to}:void 0,matched:!0}}else if(matchingNodes(hi.type,oi,li))di++;else if(matchingNodes(hi.type,-oi,li)){if(di==0){let pi=findHandle(hi);return{start:ui,end:pi&&pi.from<pi.to?{from:pi.from,to:pi.to}:void 0,matched:!1}}di--}}while(oi<0?hi.prevSibling():hi.nextSibling());return{start:ui,matched:!1}}function matchPlainBrackets(Ws,ws,oi,si,ii,ai,li){let ci=oi<0?Ws.sliceDoc(ws-1,ws):Ws.sliceDoc(ws,ws+1),ui=li.indexOf(ci);if(ui<0||ui%2==0!=oi>0)return null;let di={from:oi<0?ws-1:ws,to:oi>0?ws+1:ws},hi=Ws.doc.iterRange(ws,oi>0?Ws.doc.length:0),pi=0;for(let ha=0;!hi.next().done&&ha<=ai;){let ga=hi.value;oi<0&&(ha+=ga.length);let va=ws+ha*oi;for(let ba=oi>0?0:ga.length-1,wa=oi>0?ga.length:-1;ba!=wa;ba+=oi){let xa=li.indexOf(ga[ba]);if(!(xa<0||si.resolveInner(va+ba,1).type!=ii))if(xa%2==0==oi>0)pi++;else{if(pi==1)return{start:di,end:{from:va+ba,to:va+ba+1},matched:xa>>1==ui>>1};pi--}}oi>0&&(ha+=ga.length)}return hi.done?{start:di,matched:!1}:null}const noTokens=Object.create(null),typeArray=[NodeType.none],warned=[],byTag=Object.create(null),defaultTable=Object.create(null);for(let[Ws,ws]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])defaultTable[Ws]=createTokenType(noTokens,ws);function warnForPart(Ws,ws){warned.indexOf(Ws)>-1||(warned.push(Ws),console.warn(ws))}function createTokenType(Ws,ws){let oi=[];for(let ci of ws.split(" ")){let ui=[];for(let di of ci.split(".")){let hi=Ws[di]||tags[di];hi?typeof hi=="function"?ui.length?ui=ui.map(hi):warnForPart(di,`Modifier ${di} used at start of tag`):ui.length?warnForPart(di,`Tag ${di} used as modifier`):ui=Array.isArray(hi)?hi:[hi]:warnForPart(di,`Unknown highlighting tag ${di}`)}for(let di of ui)oi.push(di)}if(!oi.length)return 0;let si=ws.replace(/ /g,"_"),ii=si+" "+oi.map(ci=>ci.id),ai=byTag[ii];if(ai)return ai.id;let li=byTag[ii]=NodeType.define({id:typeArray.length,name:si,props:[styleTags({[si]:oi})]});return typeArray.push(li),li.id}Direction.RTL,Direction.LTR;const createTheme=({variant:Ws,settings:ws,styles:oi})=>{const si=EditorView.theme({"&":{backgroundColor:ws.background,color:ws.foreground},".cm-content":{caretColor:ws.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:ws.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ws.selection},".cm-activeLine":{backgroundColor:ws.lineHighlight},".cm-gutters":{backgroundColor:ws.gutterBackground,color:ws.gutterForeground},".cm-activeLineGutter":{backgroundColor:ws.lineHighlight}},{dark:Ws==="dark"}),ii=HighlightStyle.define(oi);return[si,syntaxHighlighting(ii)]};createTheme({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:tags.comment,color:"#404080"},{tag:[tags.string,tags.regexp],color:"#999999"},{tag:tags.number,color:"#7090B0"},{tag:[tags.bool,tags.null],color:"#8080A0"},{tag:[tags.punctuation,tags.derefOperator],color:"#805080"},{tag:tags.keyword,color:"#60B0FF"},{tag:tags.definitionKeyword,color:"#B0FFF0"},{tag:tags.moduleKeyword,color:"#60B0FF"},{tag:tags.operator,color:"#A0A0FF"},{tag:[tags.variableName,tags.self],color:"#008080"},{tag:tags.operatorKeyword,color:"#A0A0FF"},{tag:tags.controlKeyword,color:"#80A0FF"},{tag:tags.className,color:"#70E080"},{tag:[tags.function(tags.propertyName),tags.propertyName],color:"#50A0A0"},{tag:tags.tagName,color:"#009090"},{tag:tags.modifier,color:"#B0FFF0"},{tag:[tags.squareBracket,tags.attributeName],color:"#D0D0FF"}]});const ayuLight=createTheme({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:tags.comment,color:"#787b8099"},{tag:tags.string,color:"#86b300"},{tag:tags.regexp,color:"#4cbf99"},{tag:[tags.number,tags.bool,tags.null],color:"#ffaa33"},{tag:tags.variableName,color:"#5c6166"},{tag:[tags.definitionKeyword,tags.modifier],color:"#fa8d3e"},{tag:[tags.keyword,tags.special(tags.brace)],color:"#fa8d3e"},{tag:tags.operator,color:"#ed9366"},{tag:tags.separator,color:"#5c6166b3"},{tag:tags.punctuation,color:"#5c6166"},{tag:[tags.definition(tags.propertyName),tags.function(tags.variableName)],color:"#f2ae49"},{tag:[tags.className,tags.definition(tags.typeName)],color:"#22a4e6"},{tag:[tags.tagName,tags.typeName,tags.self,tags.labelName],color:"#55b4d4"},{tag:tags.angleBracket,color:"#55b4d480"},{tag:tags.attributeName,color:"#f2ae49"}]});createTheme({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:tags.comment,color:"#6E6E6E"},{tag:[tags.string,tags.regexp,tags.special(tags.brace)],color:"#5C81B3"},{tag:tags.number,color:"#C1E1B8"},{tag:tags.bool,color:"#53667D"},{tag:[tags.definitionKeyword,tags.modifier,tags.function(tags.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[tags.keyword,tags.moduleKeyword,tags.operatorKeyword,tags.operator],color:"#697A8E",fontWeight:"bold"},{tag:[tags.variableName,tags.attributeName],color:"#708E67"},{tag:[tags.function(tags.variableName),tags.definition(tags.propertyName),tags.derefOperator],color:"#fff"},{tag:tags.tagName,color:"#A3D295"}]});createTheme({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:tags.comment,color:"#666666"},{tag:[tags.string,tags.special(tags.brace)],color:"#54BE0D"},{tag:tags.regexp,color:"#E9C062"},{tag:tags.number,color:"#CF6A4C"},{tag:[tags.keyword,tags.operator],color:"#5EA6EA"},{tag:tags.variableName,color:"#7587A6"},{tag:[tags.definitionKeyword,tags.modifier],color:"#F9EE98"},{tag:[tags.propertyName,tags.function(tags.variableName)],color:"#937121"},{tag:[tags.typeName,tags.angleBracket,tags.tagName],color:"#9B859D"}]});createTheme({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:tags.comment,color:"#6B4E32"},{tag:[tags.keyword,tags.operator,tags.derefOperator],color:"#EF5D32"},{tag:tags.className,color:"#EFAC32",fontWeight:"bold"},{tag:[tags.typeName,tags.propertyName,tags.function(tags.variableName),tags.definition(tags.variableName)],color:"#EFAC32"},{tag:tags.definition(tags.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:tags.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[tags.number,tags.bool],color:"#6C99BB"},{tag:[tags.variableName,tags.self],color:"#7DAF9C"},{tag:[tags.string,tags.special(tags.brace),tags.regexp],color:"#D9D762"},{tag:[tags.angleBracket,tags.tagName,tags.attributeName],color:"#EFCB43"}]});createTheme({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:tags.comment,color:"#404040"},{tag:[tags.string,tags.special(tags.brace),tags.regexp],color:"#00D8FF"},{tag:tags.number,color:"#E62286"},{tag:[tags.variableName,tags.attributeName,tags.self],color:"#E62286",fontWeight:"bold"},{tag:tags.function(tags.variableName),color:"#fff",fontWeight:"bold"}]});createTheme({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:tags.comment,color:"#BCC8BA"},{tag:[tags.string,tags.special(tags.brace),tags.regexp],color:"#5D90CD"},{tag:[tags.number,tags.bool,tags.null],color:"#46A609"},{tag:tags.keyword,color:"#AF956F"},{tag:[tags.definitionKeyword,tags.modifier],color:"#C52727"},{tag:[tags.angleBracket,tags.tagName,tags.attributeName],color:"#606060"},{tag:tags.self,color:"#000"}]});createTheme({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:tags.comment,color:"#0088FF"},{tag:tags.string,color:"#3AD900"},{tag:tags.regexp,color:"#80FFC2"},{tag:[tags.number,tags.bool,tags.null],color:"#FF628C"},{tag:[tags.definitionKeyword,tags.modifier],color:"#FFEE80"},{tag:tags.variableName,color:"#CCCCCC"},{tag:tags.self,color:"#FF80E1"},{tag:[tags.className,tags.definition(tags.propertyName),tags.function(tags.variableName),tags.definition(tags.typeName),tags.labelName],color:"#FFDD00"},{tag:[tags.keyword,tags.operator],color:"#FF9D00"},{tag:[tags.propertyName,tags.typeName],color:"#80FFBB"},{tag:tags.special(tags.brace),color:"#EDEF7D"},{tag:tags.attributeName,color:"#9EFFFF"},{tag:tags.derefOperator,color:"#fff"}]});createTheme({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:tags.comment,color:"#AEAEAE"},{tag:[tags.string,tags.special(tags.brace),tags.regexp],color:"#8DFF8E"},{tag:[tags.className,tags.definition(tags.propertyName),tags.function(tags.variableName),tags.function(tags.definition(tags.variableName)),tags.definition(tags.typeName)],color:"#A3EBFF"},{tag:[tags.number,tags.bool,tags.null],color:"#62E9BD"},{tag:[tags.keyword,tags.operator],color:"#2BF1DC"},{tag:[tags.definitionKeyword,tags.modifier],color:"#F8FBB1"},{tag:[tags.variableName,tags.self],color:"#B683CA"},{tag:[tags.angleBracket,tags.tagName,tags.typeName,tags.propertyName],color:"#60A4F1"},{tag:tags.derefOperator,color:"#E0E0E0"},{tag:tags.attributeName,color:"#7BACCA"}]});createTheme({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:tags.comment,color:"#6272a4"},{tag:[tags.string,tags.special(tags.brace)],color:"#f1fa8c"},{tag:[tags.number,tags.self,tags.bool,tags.null],color:"#bd93f9"},{tag:[tags.keyword,tags.operator],color:"#ff79c6"},{tag:[tags.definitionKeyword,tags.typeName],color:"#8be9fd"},{tag:tags.definition(tags.typeName),color:"#f8f8f2"},{tag:[tags.className,tags.definition(tags.propertyName),tags.function(tags.variableName),tags.attributeName],color:"#50fa7b"}]});createTheme({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:tags.comment,color:"#AAAAAA"},{tag:[tags.keyword,tags.operator,tags.typeName,tags.tagName,tags.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[tags.attributeName,tags.definition(tags.propertyName)],color:"#4F9FD0"},{tag:[tags.className,tags.string,tags.special(tags.brace)],color:"#CF4F5F"},{tag:tags.number,color:"#CF4F5F",fontWeight:"bold"},{tag:tags.variableName,fontWeight:"bold"}]});createTheme({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:tags.comment,color:"#9995b7"},{tag:tags.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[tags.definitionKeyword,tags.modifier],color:"#ff5792"},{tag:[tags.className,tags.tagName,tags.definition(tags.typeName)],color:"#0094f0"},{tag:[tags.number,tags.bool,tags.null,tags.special(tags.brace)],color:"#5842ff"},{tag:[tags.definition(tags.propertyName),tags.function(tags.variableName)],color:"#0095a8"},{tag:tags.typeName,color:"#b3694d"},{tag:[tags.propertyName,tags.variableName],color:"#fa8900"},{tag:tags.operator,color:"#ff5792"},{tag:tags.self,color:"#e64100"},{tag:[tags.string,tags.regexp],color:"#00b368"},{tag:[tags.paren,tags.bracket],color:"#0431fa"},{tag:tags.labelName,color:"#00bdd6"},{tag:tags.attributeName,color:"#e64100"},{tag:tags.angleBracket,color:"#9995b7"}]});createTheme({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:tags.comment,color:"#9893a5"},{tag:[tags.bool,tags.null],color:"#286983"},{tag:tags.number,color:"#d7827e"},{tag:tags.className,color:"#d7827e"},{tag:[tags.angleBracket,tags.tagName,tags.typeName],color:"#56949f"},{tag:tags.attributeName,color:"#907aa9"},{tag:tags.punctuation,color:"#797593"},{tag:[tags.keyword,tags.modifier],color:"#286983"},{tag:[tags.string,tags.regexp],color:"#ea9d34"},{tag:tags.variableName,color:"#d7827e"}]});createTheme({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:tags.comment,color:"#CFCFCF"},{tag:[tags.number,tags.bool,tags.null],color:"#E66C29"},{tag:[tags.className,tags.definition(tags.propertyName),tags.function(tags.variableName),tags.labelName,tags.definition(tags.typeName)],color:"#2EB43B"},{tag:tags.keyword,color:"#D8B229"},{tag:tags.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[tags.definitionKeyword,tags.modifier],color:"#925A47"},{tag:tags.string,color:"#704D3D"},{tag:tags.typeName,color:"#2F8996"},{tag:[tags.variableName,tags.propertyName],color:"#77ACB0"},{tag:tags.self,color:"#77ACB0",fontWeight:"bold"},{tag:tags.regexp,color:"#E3965E"},{tag:[tags.tagName,tags.angleBracket],color:"#BAA827"},{tag:tags.attributeName,color:"#B06520"},{tag:tags.derefOperator,color:"#000"}]});createTheme({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:tags.comment,color:"#93A1A1"},{tag:tags.string,color:"#2AA198"},{tag:tags.regexp,color:"#D30102"},{tag:tags.number,color:"#D33682"},{tag:tags.variableName,color:"#268BD2"},{tag:[tags.keyword,tags.operator,tags.punctuation],color:"#859900"},{tag:[tags.definitionKeyword,tags.modifier],color:"#073642",fontWeight:"bold"},{tag:[tags.className,tags.self,tags.definition(tags.propertyName)],color:"#268BD2"},{tag:tags.function(tags.variableName),color:"#268BD2"},{tag:[tags.bool,tags.null],color:"#B58900"},{tag:tags.tagName,color:"#268BD2",fontWeight:"bold"},{tag:tags.angleBracket,color:"#93A1A1"},{tag:tags.attributeName,color:"#93A1A1"},{tag:tags.typeName,color:"#859900"}]});createTheme({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:tags.comment,color:"#8E908C"},{tag:[tags.variableName,tags.self,tags.propertyName,tags.attributeName,tags.regexp],color:"#C82829"},{tag:[tags.number,tags.bool,tags.null],color:"#F5871F"},{tag:[tags.className,tags.typeName,tags.definition(tags.typeName)],color:"#C99E00"},{tag:[tags.string,tags.special(tags.brace)],color:"#718C00"},{tag:tags.operator,color:"#3E999F"},{tag:[tags.definition(tags.propertyName),tags.function(tags.variableName)],color:"#4271AE"},{tag:tags.keyword,color:"#8959A8"},{tag:tags.derefOperator,color:"#4D4D4C"}]});function objectValues(Ws){const ws=Object.keys(Ws),oi=ws.length,si=new Array(oi);for(let ii=0;ii<oi;++ii)si[ii]=Ws[ws[ii]];return si}function hintList(Ws,ws){return filterAndSortList(ws,normalizeText(Ws.string))}function filterAndSortList(Ws,ws){if(!ws||ws.trim()===""||ws.trim()===":"||ws.trim()==="{")return filterNonEmpty(Ws,si=>!si.isDeprecated);const oi=Ws.map(si=>({proximity:getProximity(normalizeText(si.label),ws),entry:si}));return filterNonEmpty(filterNonEmpty(oi,si=>si.proximity<=2),si=>!si.entry.isDeprecated).sort((si,ii)=>(si.entry.isDeprecated?1:0)-(ii.entry.isDeprecated?1:0)||si.proximity-ii.proximity||si.entry.label.length-ii.entry.label.length).map(si=>si.entry)}function filterNonEmpty(Ws,ws){const oi=Ws.filter(ws);return oi.length===0?Ws:oi}function normalizeText(Ws){return Ws.toLowerCase().replaceAll(/\W/g,"")}function getProximity(Ws,ws){let oi=lexicalDistance(ws,Ws);return Ws.length>ws.length&&(oi-=Ws.length-ws.length-1,oi+=Ws.indexOf(ws)===0?0:.5),oi}function lexicalDistance(Ws,ws){let oi,si;const ii=[],ai=Ws.length,li=ws.length;for(oi=0;oi<=ai;oi++)ii[oi]=[oi];for(si=1;si<=li;si++)ii[0][si]=si;for(oi=1;oi<=ai;oi++)for(si=1;si<=li;si++){const ci=Ws[oi-1]===ws[si-1]?0:1;ii[oi][si]=Math.min(ii[oi-1][si]+1,ii[oi][si-1]+1,ii[oi-1][si-1]+ci),oi>1&&si>1&&Ws[oi-1]===ws[si-2]&&Ws[oi-2]===ws[si-1]&&(ii[oi][si]=Math.min(ii[oi][si],ii[oi-2][si-2]+ci))}return ii[ai][li]}const insertSuffix=Ws=>` {
|
|
321
|
+
`))};if(di.from==this.from&&ai<this.from?di.from=ai:di.to==this.to&&ai>this.to&&(di.to=ai),di.from==di.to&&!di.insert.length){let hi=EditorSelection.single(this.toEditorPos(si.selectionStart),this.toEditorPos(si.selectionEnd));hi.main.eq(ii)||ws.dispatch({selection:hi,userEvent:"select"});return}if((browser.mac||browser.android)&&di.from==li-1&&/^\. ?$/.test(si.text)&&ws.contentDOM.getAttribute("autocorrect")=="off"&&(di={from:ci,to:ui,insert:Text.of([si.text.replace("."," ")])}),this.pendingContextChange=di,!ws.state.readOnly){let hi=this.to-this.from+(di.to-di.from+di.insert.length);applyDOMChangeInner(ws,di,EditorSelection.single(this.toEditorPos(si.selectionStart,hi),this.toEditorPos(si.selectionEnd,hi)))}this.pendingContextChange&&(this.revertPending(ws.state),this.setSelection(ws.state))},this.handlers.characterboundsupdate=si=>{let ii=[],ai=null;for(let li=this.toEditorPos(si.rangeStart),ci=this.toEditorPos(si.rangeEnd);li<ci;li++){let ui=ws.coordsForChar(li);ai=ui&&new DOMRect(ui.left,ui.top,ui.right-ui.left,ui.bottom-ui.top)||ai||new DOMRect,ii.push(ai)}oi.updateCharacterBounds(si.rangeStart,ii)},this.handlers.textformatupdate=si=>{let ii=[];for(let ai of si.getTextFormats()){let li=ai.underlineStyle,ci=ai.underlineThickness;if(li!="None"&&ci!="None"){let ui=this.toEditorPos(ai.rangeStart),di=this.toEditorPos(ai.rangeEnd);if(ui<di){let hi=`text-decoration: underline ${li=="Dashed"?"dashed ":li=="Squiggle"?"wavy ":""}${ci=="Thin"?1:2}px`;ii.push(Decoration.mark({attributes:{style:hi}}).range(ui,di))}}}ws.dispatch({effects:setEditContextFormatting.of(Decoration.set(ii))})},this.handlers.compositionstart=()=>{ws.inputState.composing<0&&(ws.inputState.composing=0,ws.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(ws.inputState.composing=-1,ws.inputState.compositionFirstChange=null,this.composing){let{drifted:si}=this.composing;this.composing=null,si&&this.reset(ws.state)}};for(let si in this.handlers)oi.addEventListener(si,this.handlers[si]);this.measureReq={read:si=>{this.editContext.updateControlBounds(si.contentDOM.getBoundingClientRect());let ii=getSelection(si.root);ii&&ii.rangeCount&&this.editContext.updateSelectionBounds(ii.getRangeAt(0).getBoundingClientRect())}}}applyEdits(ws){let oi=0,si=!1,ii=this.pendingContextChange;return ws.changes.iterChanges((ai,li,ci,ui,di)=>{if(si)return;let hi=di.length-(li-ai);if(ii&&li>=ii.to)if(ii.from==ai&&ii.to==li&&ii.insert.eq(di)){ii=this.pendingContextChange=null,oi+=hi,this.to+=hi;return}else ii=null,this.revertPending(ws.state);if(ai+=oi,li+=oi,li<=this.from)this.from+=hi,this.to+=hi;else if(ai<this.to){if(ai<this.from||li>this.to||this.to-this.from+di.length>3e4){si=!0;return}this.editContext.updateText(this.toContextPos(ai),this.toContextPos(li),di.toString()),this.to+=hi}oi+=hi}),ii&&!si&&this.revertPending(ws.state),!si}update(ws){let oi=this.pendingContextChange;this.composing&&(this.composing.drifted||ws.transactions.some(si=>!si.isUserEvent("input.type")&&si.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=ws.changes.mapPos(this.composing.editorBase)):!this.applyEdits(ws)||!this.rangeIsValid(ws.state)?(this.pendingContextChange=null,this.reset(ws.state)):(ws.docChanged||ws.selectionSet||oi)&&this.setSelection(ws.state),(ws.geometryChanged||ws.docChanged||ws.selectionSet)&&ws.view.requestMeasure(this.measureReq)}resetRange(ws){let{head:oi}=ws.selection.main;this.from=Math.max(0,oi-1e4),this.to=Math.min(ws.doc.length,oi+1e4)}reset(ws){this.resetRange(ws),this.editContext.updateText(0,this.editContext.text.length,ws.doc.sliceString(this.from,this.to)),this.setSelection(ws)}revertPending(ws){let oi=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(oi.from),this.toContextPos(oi.from+oi.insert.length),ws.doc.sliceString(oi.from,oi.to))}setSelection(ws){let{main:oi}=ws.selection,si=this.toContextPos(Math.max(this.from,Math.min(this.to,oi.anchor))),ii=this.toContextPos(oi.head);(this.editContext.selectionStart!=si||this.editContext.selectionEnd!=ii)&&this.editContext.updateSelection(si,ii)}rangeIsValid(ws){let{head:oi}=ws.selection.main;return!(this.from>0&&oi-this.from<500||this.to<ws.doc.length&&this.to-oi<500||this.to-this.from>1e4*3)}toEditorPos(ws,oi=this.to-this.from){ws=Math.min(ws,oi);let si=this.composing;return si&&si.drifted?si.editorBase+(ws-si.contextBase):ws+this.from}toContextPos(ws){let oi=this.composing;return oi&&oi.drifted?oi.contextBase+(ws-oi.editorBase):ws-this.from}destroy(){for(let ws in this.handlers)this.editContext.removeEventListener(ws,this.handlers[ws])}}class EditorView{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(ws={}){var oi;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),ws.parent&&ws.parent.appendChild(this.dom);let{dispatch:si}=ws;this.dispatchTransactions=ws.dispatchTransactions||si&&(ii=>ii.forEach(ai=>si(ai,this)))||(ii=>this.update(ii)),this.dispatch=this.dispatch.bind(this),this._root=ws.root||getRoot(ws.parent)||document,this.viewState=new ViewState(ws.state||EditorState.create(ws)),ws.scrollTo&&ws.scrollTo.is(scrollIntoView$1)&&(this.viewState.scrollTarget=ws.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(viewPlugin).map(ii=>new PluginInstance(ii));for(let ii of this.plugins)ii.update(this);this.observer=new DOMObserver(this),this.inputState=new InputState(this),this.inputState.ensureHandlers(this.plugins),this.docView=new DocView(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((oi=document.fonts)===null||oi===void 0)&&oi.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...ws){let oi=ws.length==1&&ws[0]instanceof Transaction?ws:ws.length==1&&Array.isArray(ws[0])?ws[0]:[this.state.update(...ws)];this.dispatchTransactions(oi,this)}update(ws){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let oi=!1,si=!1,ii,ai=this.state;for(let ha of ws){if(ha.startState!=ai)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");ai=ha.state}if(this.destroyed){this.viewState.state=ai;return}let li=this.hasFocus,ci=0,ui=null;ws.some(ha=>ha.annotation(isFocusChange))?(this.inputState.notifiedFocused=li,ci=1):li!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=li,ui=focusChangeTransaction(ai,li),ui||(ci=1));let di=this.observer.delayedAndroidKey,hi=null;if(di?(this.observer.clearDelayedAndroidKey(),hi=this.observer.readChange(),(hi&&!this.state.doc.eq(ai.doc)||!this.state.selection.eq(ai.selection))&&(hi=null)):this.observer.clear(),ai.facet(EditorState.phrases)!=this.state.facet(EditorState.phrases))return this.setState(ai);ii=ViewUpdate.create(this,ai,ws),ii.flags|=ci;let pi=this.viewState.scrollTarget;try{this.updateState=2;for(let ha of ws){if(pi&&(pi=pi.map(ha.changes)),ha.scrollIntoView){let{main:ga}=ha.state.selection;pi=new ScrollTarget(ga.empty?ga:EditorSelection.cursor(ga.head,ga.head>ga.anchor?-1:1))}for(let ga of ha.effects)ga.is(scrollIntoView$1)&&(pi=ga.value.clip(this.state))}this.viewState.update(ii,pi),this.bidiCache=CachedOrder.update(this.bidiCache,ii.changes),ii.empty||(this.updatePlugins(ii),this.inputState.update(ii)),oi=this.docView.update(ii),this.state.facet(styleModule)!=this.styleModules&&this.mountStyles(),si=this.updateAttrs(),this.showAnnouncements(ws),this.docView.updateSelection(oi,ws.some(ha=>ha.isUserEvent("select.pointer")))}finally{this.updateState=0}if(ii.startState.facet(theme)!=ii.state.facet(theme)&&(this.viewState.mustMeasureContent=!0),(oi||si||pi||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),oi&&this.docViewUpdate(),!ii.empty)for(let ha of this.state.facet(updateListener))try{ha(ii)}catch(ga){logException(this.state,ga,"update listener")}(ui||hi)&&Promise.resolve().then(()=>{ui&&this.state==ui.startState&&this.dispatch(ui),hi&&!applyDOMChange(this,hi)&&di.force&&dispatchKey(this.contentDOM,di.key,di.keyCode)})}setState(ws){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=ws;return}this.updateState=2;let oi=this.hasFocus;try{for(let si of this.plugins)si.destroy(this);this.viewState=new ViewState(ws),this.plugins=ws.facet(viewPlugin).map(si=>new PluginInstance(si)),this.pluginMap.clear();for(let si of this.plugins)si.update(this);this.docView.destroy(),this.docView=new DocView(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}oi&&this.focus(),this.requestMeasure()}updatePlugins(ws){let oi=ws.startState.facet(viewPlugin),si=ws.state.facet(viewPlugin);if(oi!=si){let ii=[];for(let ai of si){let li=oi.indexOf(ai);if(li<0)ii.push(new PluginInstance(ai));else{let ci=this.plugins[li];ci.mustUpdate=ws,ii.push(ci)}}for(let ai of this.plugins)ai.mustUpdate!=ws&&ai.destroy(this);this.plugins=ii,this.pluginMap.clear()}else for(let ii of this.plugins)ii.mustUpdate=ws;for(let ii=0;ii<this.plugins.length;ii++)this.plugins[ii].update(this);oi!=si&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let ws of this.plugins){let oi=ws.value;if(oi&&oi.docViewUpdate)try{oi.docViewUpdate(this)}catch(si){logException(this.state,si,"doc view update listener")}}}measure(ws=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,ws&&this.observer.forceFlush();let oi=null,si=this.scrollDOM,ii=si.scrollTop*this.scaleY,{scrollAnchorPos:ai,scrollAnchorHeight:li}=this.viewState;Math.abs(ii-this.viewState.scrollTop)>1&&(li=-1),this.viewState.scrollAnchorHeight=-1;try{for(let ci=0;;ci++){if(li<0)if(isScrolledToBottom(si))ai=-1,li=this.viewState.heightMap.height;else{let ga=this.viewState.scrollAnchorAt(ii);ai=ga.from,li=ga.top}this.updateState=1;let ui=this.viewState.measure(this);if(!ui&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(ci>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let di=[];ui&4||([this.measureRequests,di]=[di,this.measureRequests]);let hi=di.map(ga=>{try{return ga.read(this)}catch(va){return logException(this.state,va),BadMeasure}}),pi=ViewUpdate.create(this,this.state,[]),ha=!1;pi.flags|=ui,oi?oi.flags|=ui:oi=pi,this.updateState=2,pi.empty||(this.updatePlugins(pi),this.inputState.update(pi),this.updateAttrs(),ha=this.docView.update(pi),ha&&this.docViewUpdate());for(let ga=0;ga<di.length;ga++)if(hi[ga]!=BadMeasure)try{let va=di[ga];va.write&&va.write(hi[ga],this)}catch(va){logException(this.state,va)}if(ha&&this.docView.updateSelection(!0),!pi.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,li=-1;continue}else{let ga=(ai<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(ai).top)-li;if(ga>1||ga<-1){ii=ii+ga,si.scrollTop=ii/this.scaleY,li=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(oi&&!oi.empty)for(let ci of this.state.facet(updateListener))ci(oi)}get themeClasses(){return baseThemeID+" "+(this.state.facet(darkTheme)?baseDarkID:baseLightID)+" "+this.state.facet(theme)}updateAttrs(){let ws=attrsFromFacet(this,editorAttributes,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),oi={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(editable)?"true":"false",class:"cm-content",style:`${browser.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(oi["aria-readonly"]="true"),attrsFromFacet(this,contentAttributes,oi);let si=this.observer.ignore(()=>{let ii=updateAttrs(this.contentDOM,this.contentAttrs,oi),ai=updateAttrs(this.dom,this.editorAttrs,ws);return ii||ai});return this.editorAttrs=ws,this.contentAttrs=oi,si}showAnnouncements(ws){let oi=!0;for(let si of ws)for(let ii of si.effects)if(ii.is(EditorView.announce)){oi&&(this.announceDOM.textContent=""),oi=!1;let ai=this.announceDOM.appendChild(document.createElement("div"));ai.textContent=ii.value}}mountStyles(){this.styleModules=this.state.facet(styleModule);let ws=this.state.facet(EditorView.cspNonce);StyleModule.mount(this.root,this.styleModules.concat(baseTheme$1$2).reverse(),ws?{nonce:ws}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(ws){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),ws){if(this.measureRequests.indexOf(ws)>-1)return;if(ws.key!=null){for(let oi=0;oi<this.measureRequests.length;oi++)if(this.measureRequests[oi].key===ws.key){this.measureRequests[oi]=ws;return}}this.measureRequests.push(ws)}}plugin(ws){let oi=this.pluginMap.get(ws);return(oi===void 0||oi&&oi.spec!=ws)&&this.pluginMap.set(ws,oi=this.plugins.find(si=>si.spec==ws)||null),oi&&oi.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(ws){return this.readMeasured(),this.viewState.elementAtHeight(ws)}lineBlockAtHeight(ws){return this.readMeasured(),this.viewState.lineBlockAtHeight(ws)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(ws){return this.viewState.lineBlockAt(ws)}get contentHeight(){return this.viewState.contentHeight}moveByChar(ws,oi,si){return skipAtoms(this,ws,moveByChar(this,ws,oi,si))}moveByGroup(ws,oi){return skipAtoms(this,ws,moveByChar(this,ws,oi,si=>byGroup(this,ws.head,si)))}visualLineSide(ws,oi){let si=this.bidiSpans(ws),ii=this.textDirectionAt(ws.from),ai=si[oi?si.length-1:0];return EditorSelection.cursor(ai.side(oi,ii)+ws.from,ai.forward(!oi,ii)?1:-1)}moveToLineBoundary(ws,oi,si=!0){return moveToLineBoundary(this,ws,oi,si)}moveVertically(ws,oi,si){return skipAtoms(this,ws,moveVertically(this,ws,oi,si))}domAtPos(ws){return this.docView.domAtPos(ws)}posAtDOM(ws,oi=0){return this.docView.posFromDOM(ws,oi)}posAtCoords(ws,oi=!0){return this.readMeasured(),posAtCoords(this,ws,oi)}coordsAtPos(ws,oi=1){this.readMeasured();let si=this.docView.coordsAt(ws,oi);if(!si||si.left==si.right)return si;let ii=this.state.doc.lineAt(ws),ai=this.bidiSpans(ii),li=ai[BidiSpan.find(ai,ws-ii.from,-1,oi)];return flattenRect(si,li.dir==Direction.LTR==oi>0)}coordsForChar(ws){return this.readMeasured(),this.docView.coordsForChar(ws)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(ws){return!this.state.facet(perLineTextDirection)||ws<this.viewport.from||ws>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(ws))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(ws){if(ws.length>MaxBidiLine)return trivialOrder(ws.length);let oi=this.textDirectionAt(ws.from),si;for(let ai of this.bidiCache)if(ai.from==ws.from&&ai.dir==oi&&(ai.fresh||isolatesEq(ai.isolates,si=getIsolatedRanges(this,ws))))return ai.order;si||(si=getIsolatedRanges(this,ws));let ii=computeOrder(ws.text,oi,si);return this.bidiCache.push(new CachedOrder(ws.from,ws.to,oi,si,!0,ii)),ii}get hasFocus(){var ws;return(this.dom.ownerDocument.hasFocus()||browser.safari&&((ws=this.inputState)===null||ws===void 0?void 0:ws.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{focusPreventScroll(this.contentDOM),this.docView.updateSelection()})}setRoot(ws){this._root!=ws&&(this._root=ws,this.observer.setWindow((ws.nodeType==9?ws:ws.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let ws of this.plugins)ws.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(ws,oi={}){return scrollIntoView$1.of(new ScrollTarget(typeof ws=="number"?EditorSelection.cursor(ws):ws,oi.y,oi.x,oi.yMargin,oi.xMargin))}scrollSnapshot(){let{scrollTop:ws,scrollLeft:oi}=this.scrollDOM,si=this.viewState.scrollAnchorAt(ws);return scrollIntoView$1.of(new ScrollTarget(EditorSelection.cursor(si.from),"start","start",si.top-ws,oi,!0))}setTabFocusMode(ws){ws==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof ws=="boolean"?this.inputState.tabFocusMode=ws?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+ws)}static domEventHandlers(ws){return ViewPlugin.define(()=>({}),{eventHandlers:ws})}static domEventObservers(ws){return ViewPlugin.define(()=>({}),{eventObservers:ws})}static theme(ws,oi){let si=StyleModule.newName(),ii=[theme.of(si),styleModule.of(buildTheme(`.${si}`,ws))];return oi&&oi.dark&&ii.push(darkTheme.of(!0)),ii}static baseTheme(ws){return Prec.lowest(styleModule.of(buildTheme("."+baseThemeID,ws,lightDarkIDs)))}static findFromDOM(ws){var oi;let si=ws.querySelector(".cm-content"),ii=si&&ContentView.get(si)||ContentView.get(ws);return((oi=ii==null?void 0:ii.rootView)===null||oi===void 0?void 0:oi.view)||null}}EditorView.styleModule=styleModule;EditorView.inputHandler=inputHandler$1;EditorView.clipboardInputFilter=clipboardInputFilter;EditorView.clipboardOutputFilter=clipboardOutputFilter;EditorView.scrollHandler=scrollHandler;EditorView.focusChangeEffect=focusChangeEffect;EditorView.perLineTextDirection=perLineTextDirection;EditorView.exceptionSink=exceptionSink;EditorView.updateListener=updateListener;EditorView.editable=editable;EditorView.mouseSelectionStyle=mouseSelectionStyle;EditorView.dragMovesSelection=dragMovesSelection$1;EditorView.clickAddsSelectionRange=clickAddsSelectionRange;EditorView.decorations=decorations;EditorView.outerDecorations=outerDecorations;EditorView.atomicRanges=atomicRanges;EditorView.bidiIsolatedRanges=bidiIsolatedRanges;EditorView.scrollMargins=scrollMargins;EditorView.darkTheme=darkTheme;EditorView.cspNonce=Facet.define({combine:Ws=>Ws.length?Ws[0]:""});EditorView.contentAttributes=contentAttributes;EditorView.editorAttributes=editorAttributes;EditorView.lineWrapping=EditorView.contentAttributes.of({class:"cm-lineWrapping"});EditorView.announce=StateEffect.define();const MaxBidiLine=4096,BadMeasure={};class CachedOrder{constructor(ws,oi,si,ii,ai,li){this.from=ws,this.to=oi,this.dir=si,this.isolates=ii,this.fresh=ai,this.order=li}static update(ws,oi){if(oi.empty&&!ws.some(ai=>ai.fresh))return ws;let si=[],ii=ws.length?ws[ws.length-1].dir:Direction.LTR;for(let ai=Math.max(0,ws.length-10);ai<ws.length;ai++){let li=ws[ai];li.dir==ii&&!oi.touchesRange(li.from,li.to)&&si.push(new CachedOrder(oi.mapPos(li.from,1),oi.mapPos(li.to,-1),li.dir,li.isolates,!1,li.order))}return si}}function attrsFromFacet(Ws,ws,oi){for(let si=Ws.state.facet(ws),ii=si.length-1;ii>=0;ii--){let ai=si[ii],li=typeof ai=="function"?ai(Ws):ai;li&&combineAttrs(li,oi)}return oi}const currentPlatform=browser.mac?"mac":browser.windows?"win":browser.linux?"linux":"key";function normalizeKeyName(Ws,ws){const oi=Ws.split(/-(?!$)/);let si=oi[oi.length-1];si=="Space"&&(si=" ");let ii,ai,li,ci;for(let ui=0;ui<oi.length-1;++ui){const di=oi[ui];if(/^(cmd|meta|m)$/i.test(di))ci=!0;else if(/^a(lt)?$/i.test(di))ii=!0;else if(/^(c|ctrl|control)$/i.test(di))ai=!0;else if(/^s(hift)?$/i.test(di))li=!0;else if(/^mod$/i.test(di))ws=="mac"?ci=!0:ai=!0;else throw new Error("Unrecognized modifier name: "+di)}return ii&&(si="Alt-"+si),ai&&(si="Ctrl-"+si),ci&&(si="Meta-"+si),li&&(si="Shift-"+si),si}function modifiers(Ws,ws,oi){return ws.altKey&&(Ws="Alt-"+Ws),ws.ctrlKey&&(Ws="Ctrl-"+Ws),ws.metaKey&&(Ws="Meta-"+Ws),oi!==!1&&ws.shiftKey&&(Ws="Shift-"+Ws),Ws}const handleKeyEvents=Prec.default(EditorView.domEventHandlers({keydown(Ws,ws){return runHandlers(getKeymap(ws.state),Ws,ws,"editor")}})),keymap=Facet.define({enables:handleKeyEvents}),Keymaps=new WeakMap;function getKeymap(Ws){let ws=Ws.facet(keymap),oi=Keymaps.get(ws);return oi||Keymaps.set(ws,oi=buildKeymap(ws.reduce((si,ii)=>si.concat(ii),[]))),oi}function runScopeHandlers(Ws,ws,oi){return runHandlers(getKeymap(Ws.state),ws,Ws,oi)}let storedPrefix=null;const PrefixTimeout=4e3;function buildKeymap(Ws,ws=currentPlatform){let oi=Object.create(null),si=Object.create(null),ii=(li,ci)=>{let ui=si[li];if(ui==null)si[li]=ci;else if(ui!=ci)throw new Error("Key binding "+li+" is used both as a regular binding and as a multi-stroke prefix")},ai=(li,ci,ui,di,hi)=>{var pi,ha;let ga=oi[li]||(oi[li]=Object.create(null)),va=ci.split(/ (?!$)/).map(xa=>normalizeKeyName(xa,ws));for(let xa=1;xa<va.length;xa++){let Ca=va.slice(0,xa).join(" ");ii(Ca,!0),ga[Ca]||(ga[Ca]={preventDefault:!0,stopPropagation:!1,run:[el=>{let ku=storedPrefix={view:el,prefix:Ca,scope:li};return setTimeout(()=>{storedPrefix==ku&&(storedPrefix=null)},PrefixTimeout),!0}]})}let ba=va.join(" ");ii(ba,!1);let wa=ga[ba]||(ga[ba]={preventDefault:!1,stopPropagation:!1,run:((ha=(pi=ga._any)===null||pi===void 0?void 0:pi.run)===null||ha===void 0?void 0:ha.slice())||[]});ui&&wa.run.push(ui),di&&(wa.preventDefault=!0),hi&&(wa.stopPropagation=!0)};for(let li of Ws){let ci=li.scope?li.scope.split(" "):["editor"];if(li.any)for(let di of ci){let hi=oi[di]||(oi[di]=Object.create(null));hi._any||(hi._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:pi}=li;for(let ha in hi)hi[ha].run.push(ga=>pi(ga,currentKeyEvent))}let ui=li[ws]||li.key;if(ui)for(let di of ci)ai(di,ui,li.run,li.preventDefault,li.stopPropagation),li.shift&&ai(di,"Shift-"+ui,li.shift,li.preventDefault,li.stopPropagation)}return oi}let currentKeyEvent=null;function runHandlers(Ws,ws,oi,si){currentKeyEvent=ws;let ii=keyName(ws),ai=codePointAt(ii,0),li=codePointSize(ai)==ii.length&&ii!=" ",ci="",ui=!1,di=!1,hi=!1;storedPrefix&&storedPrefix.view==oi&&storedPrefix.scope==si&&(ci=storedPrefix.prefix+" ",modifierCodes.indexOf(ws.keyCode)<0&&(di=!0,storedPrefix=null));let pi=new Set,ha=wa=>{if(wa){for(let xa of wa.run)if(!pi.has(xa)&&(pi.add(xa),xa(oi)))return wa.stopPropagation&&(hi=!0),!0;wa.preventDefault&&(wa.stopPropagation&&(hi=!0),di=!0)}return!1},ga=Ws[si],va,ba;return ga&&(ha(ga[ci+modifiers(ii,ws,!li)])?ui=!0:li&&(ws.altKey||ws.metaKey||ws.ctrlKey)&&!(browser.windows&&ws.ctrlKey&&ws.altKey)&&(va=base[ws.keyCode])&&va!=ii?(ha(ga[ci+modifiers(va,ws,!0)])||ws.shiftKey&&(ba=shift[ws.keyCode])!=ii&&ba!=va&&ha(ga[ci+modifiers(ba,ws,!1)]))&&(ui=!0):li&&ws.shiftKey&&ha(ga[ci+modifiers(ii,ws,!0)])&&(ui=!0),!ui&&ha(ga._any)&&(ui=!0)),di&&(ui=!0),ui&&hi&&ws.stopPropagation(),currentKeyEvent=null,ui}class RectangleMarker{constructor(ws,oi,si,ii,ai){this.className=ws,this.left=oi,this.top=si,this.width=ii,this.height=ai}draw(){let ws=document.createElement("div");return ws.className=this.className,this.adjust(ws),ws}update(ws,oi){return oi.className!=this.className?!1:(this.adjust(ws),!0)}adjust(ws){ws.style.left=this.left+"px",ws.style.top=this.top+"px",this.width!=null&&(ws.style.width=this.width+"px"),ws.style.height=this.height+"px"}eq(ws){return this.left==ws.left&&this.top==ws.top&&this.width==ws.width&&this.height==ws.height&&this.className==ws.className}static forRange(ws,oi,si){if(si.empty){let ii=ws.coordsAtPos(si.head,si.assoc||1);if(!ii)return[];let ai=getBase(ws);return[new RectangleMarker(oi,ii.left-ai.left,ii.top-ai.top,null,ii.bottom-ii.top)]}else return rectanglesForRange(ws,oi,si)}}function getBase(Ws){let ws=Ws.scrollDOM.getBoundingClientRect();return{left:(Ws.textDirection==Direction.LTR?ws.left:ws.right-Ws.scrollDOM.clientWidth*Ws.scaleX)-Ws.scrollDOM.scrollLeft*Ws.scaleX,top:ws.top-Ws.scrollDOM.scrollTop*Ws.scaleY}}function wrappedLine(Ws,ws,oi,si){let ii=Ws.coordsAtPos(ws,oi*2);if(!ii)return si;let ai=Ws.dom.getBoundingClientRect(),li=(ii.top+ii.bottom)/2,ci=Ws.posAtCoords({x:ai.left+1,y:li}),ui=Ws.posAtCoords({x:ai.right-1,y:li});return ci==null||ui==null?si:{from:Math.max(si.from,Math.min(ci,ui)),to:Math.min(si.to,Math.max(ci,ui))}}function rectanglesForRange(Ws,ws,oi){if(oi.to<=Ws.viewport.from||oi.from>=Ws.viewport.to)return[];let si=Math.max(oi.from,Ws.viewport.from),ii=Math.min(oi.to,Ws.viewport.to),ai=Ws.textDirection==Direction.LTR,li=Ws.contentDOM,ci=li.getBoundingClientRect(),ui=getBase(Ws),di=li.querySelector(".cm-line"),hi=di&&window.getComputedStyle(di),pi=ci.left+(hi?parseInt(hi.paddingLeft)+Math.min(0,parseInt(hi.textIndent)):0),ha=ci.right-(hi?parseInt(hi.paddingRight):0),ga=blockAt(Ws,si),va=blockAt(Ws,ii),ba=ga.type==BlockType.Text?ga:null,wa=va.type==BlockType.Text?va:null;if(ba&&(Ws.lineWrapping||ga.widgetLineBreaks)&&(ba=wrappedLine(Ws,si,1,ba)),wa&&(Ws.lineWrapping||va.widgetLineBreaks)&&(wa=wrappedLine(Ws,ii,-1,wa)),ba&&wa&&ba.from==wa.from&&ba.to==wa.to)return Ca(el(oi.from,oi.to,ba));{let gd=ba?el(oi.from,null,ba):ku(ga,!1),Ed=wa?el(null,oi.to,wa):ku(va,!0),Od=[];return(ba||ga).to<(wa||va).from-(ba&&wa?1:0)||ga.widgetLineBreaks>1&&gd.bottom+Ws.defaultLineHeight/2<Ed.top?Od.push(xa(pi,gd.bottom,ha,Ed.top)):gd.bottom<Ed.top&&Ws.elementAtHeight((gd.bottom+Ed.top)/2).type==BlockType.Text&&(gd.bottom=Ed.top=(gd.bottom+Ed.top)/2),Ca(gd).concat(Od).concat(Ca(Ed))}function xa(gd,Ed,Od,Nd){return new RectangleMarker(ws,gd-ui.left,Ed-ui.top,Od-gd,Nd-Ed)}function Ca({top:gd,bottom:Ed,horizontal:Od}){let Nd=[];for(let Pd=0;Pd<Od.length;Pd+=2)Nd.push(xa(Od[Pd],gd,Od[Pd+1],Ed));return Nd}function el(gd,Ed,Od){let Nd=1e9,Pd=-1e9,Ld=[];function rf(Td,wd,Cd,sf,of){let Wd=Ws.coordsAtPos(Td,Td==Od.to?-2:2),df=Ws.coordsAtPos(Cd,Cd==Od.from?2:-2);!Wd||!df||(Nd=Math.min(Wd.top,df.top,Nd),Pd=Math.max(Wd.bottom,df.bottom,Pd),of==Direction.LTR?Ld.push(ai&&wd?pi:Wd.left,ai&&sf?ha:df.right):Ld.push(!ai&&sf?pi:df.left,!ai&&wd?ha:Wd.right))}let kd=gd??Od.from,Md=Ed??Od.to;for(let Td of Ws.visibleRanges)if(Td.to>kd&&Td.from<Md)for(let wd=Math.max(Td.from,kd),Cd=Math.min(Td.to,Md);;){let sf=Ws.state.doc.lineAt(wd);for(let of of Ws.bidiSpans(sf)){let Wd=of.from+sf.from,df=of.to+sf.from;if(Wd>=Cd)break;df>wd&&rf(Math.max(Wd,wd),gd==null&&Wd<=kd,Math.min(df,Cd),Ed==null&&df>=Md,of.dir)}if(wd=sf.to+1,wd>=Cd)break}return Ld.length==0&&rf(kd,gd==null,Md,Ed==null,Ws.textDirection),{top:Nd,bottom:Pd,horizontal:Ld}}function ku(gd,Ed){let Od=ci.top+(Ed?gd.top:gd.bottom);return{top:Od,bottom:Od,horizontal:[]}}}function sameMarker(Ws,ws){return Ws.constructor==ws.constructor&&Ws.eq(ws)}class LayerView{constructor(ws,oi){this.view=ws,this.layer=oi,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=ws.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),oi.above&&this.dom.classList.add("cm-layer-above"),oi.class&&this.dom.classList.add(oi.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(ws.state),ws.requestMeasure(this.measureReq),oi.mount&&oi.mount(this.dom,ws)}update(ws){ws.startState.facet(layerOrder)!=ws.state.facet(layerOrder)&&this.setOrder(ws.state),(this.layer.update(ws,this.dom)||ws.geometryChanged)&&(this.scale(),ws.view.requestMeasure(this.measureReq))}docViewUpdate(ws){this.layer.updateOnDocViewUpdate!==!1&&ws.requestMeasure(this.measureReq)}setOrder(ws){let oi=0,si=ws.facet(layerOrder);for(;oi<si.length&&si[oi]!=this.layer;)oi++;this.dom.style.zIndex=String((this.layer.above?150:-1)-oi)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:ws,scaleY:oi}=this.view;(ws!=this.scaleX||oi!=this.scaleY)&&(this.scaleX=ws,this.scaleY=oi,this.dom.style.transform=`scale(${1/ws}, ${1/oi})`)}draw(ws){if(ws.length!=this.drawn.length||ws.some((oi,si)=>!sameMarker(oi,this.drawn[si]))){let oi=this.dom.firstChild,si=0;for(let ii of ws)ii.update&&oi&&ii.constructor&&this.drawn[si].constructor&&ii.update(oi,this.drawn[si])?(oi=oi.nextSibling,si++):this.dom.insertBefore(ii.draw(),oi);for(;oi;){let ii=oi.nextSibling;oi.remove(),oi=ii}this.drawn=ws}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const layerOrder=Facet.define();function layer(Ws){return[ViewPlugin.define(ws=>new LayerView(ws,Ws)),layerOrder.of(Ws)]}const CanHidePrimary=!(browser.ios&&browser.webkit&&browser.webkit_version<534),selectionConfig=Facet.define({combine(Ws){return combineConfig(Ws,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(ws,oi)=>Math.min(ws,oi),drawRangeCursor:(ws,oi)=>ws||oi})}});function drawSelection(Ws={}){return[selectionConfig.of(Ws),cursorLayer,selectionLayer,hideNativeSelection,nativeSelectionHidden.of(!0)]}function configChanged(Ws){return Ws.startState.facet(selectionConfig)!=Ws.state.facet(selectionConfig)}const cursorLayer=layer({above:!0,markers(Ws){let{state:ws}=Ws,oi=ws.facet(selectionConfig),si=[];for(let ii of ws.selection.ranges){let ai=ii==ws.selection.main;if(ii.empty?!ai||CanHidePrimary:oi.drawRangeCursor){let li=ai?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",ci=ii.empty?ii:EditorSelection.cursor(ii.head,ii.head>ii.anchor?-1:1);for(let ui of RectangleMarker.forRange(Ws,li,ci))si.push(ui)}}return si},update(Ws,ws){Ws.transactions.some(si=>si.selection)&&(ws.style.animationName=ws.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let oi=configChanged(Ws);return oi&&setBlinkRate(Ws.state,ws),Ws.docChanged||Ws.selectionSet||oi},mount(Ws,ws){setBlinkRate(ws.state,Ws)},class:"cm-cursorLayer"});function setBlinkRate(Ws,ws){ws.style.animationDuration=Ws.facet(selectionConfig).cursorBlinkRate+"ms"}const selectionLayer=layer({above:!1,markers(Ws){return Ws.state.selection.ranges.map(ws=>ws.empty?[]:RectangleMarker.forRange(Ws,"cm-selectionBackground",ws)).reduce((ws,oi)=>ws.concat(oi))},update(Ws,ws){return Ws.docChanged||Ws.selectionSet||Ws.viewportChanged||configChanged(Ws)},class:"cm-selectionLayer"}),themeSpec={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};CanHidePrimary&&(themeSpec[".cm-line"].caretColor=themeSpec[".cm-content"].caretColor="transparent !important");const hideNativeSelection=Prec.highest(EditorView.theme(themeSpec)),setDropCursorPos=StateEffect.define({map(Ws,ws){return Ws==null?null:ws.mapPos(Ws)}}),dropCursorPos=StateField.define({create(){return null},update(Ws,ws){return Ws!=null&&(Ws=ws.changes.mapPos(Ws)),ws.effects.reduce((oi,si)=>si.is(setDropCursorPos)?si.value:oi,Ws)}}),drawDropCursor=ViewPlugin.fromClass(class{constructor(Ws){this.view=Ws,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(Ws){var ws;let oi=Ws.state.field(dropCursorPos);oi==null?this.cursor!=null&&((ws=this.cursor)===null||ws===void 0||ws.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(Ws.startState.field(dropCursorPos)!=oi||Ws.docChanged||Ws.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:Ws}=this,ws=Ws.state.field(dropCursorPos),oi=ws!=null&&Ws.coordsAtPos(ws);if(!oi)return null;let si=Ws.scrollDOM.getBoundingClientRect();return{left:oi.left-si.left+Ws.scrollDOM.scrollLeft*Ws.scaleX,top:oi.top-si.top+Ws.scrollDOM.scrollTop*Ws.scaleY,height:oi.bottom-oi.top}}drawCursor(Ws){if(this.cursor){let{scaleX:ws,scaleY:oi}=this.view;Ws?(this.cursor.style.left=Ws.left/ws+"px",this.cursor.style.top=Ws.top/oi+"px",this.cursor.style.height=Ws.height/oi+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(Ws){this.view.state.field(dropCursorPos)!=Ws&&this.view.dispatch({effects:setDropCursorPos.of(Ws)})}},{eventObservers:{dragover(Ws){this.setDropPos(this.view.posAtCoords({x:Ws.clientX,y:Ws.clientY}))},dragleave(Ws){(Ws.target==this.view.contentDOM||!this.view.contentDOM.contains(Ws.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function dropCursor(){return[dropCursorPos,drawDropCursor]}function iterMatches(Ws,ws,oi,si,ii){ws.lastIndex=0;for(let ai=Ws.iterRange(oi,si),li=oi,ci;!ai.next().done;li+=ai.value.length)if(!ai.lineBreak)for(;ci=ws.exec(ai.value);)ii(li+ci.index,ci)}function matchRanges(Ws,ws){let oi=Ws.visibleRanges;if(oi.length==1&&oi[0].from==Ws.viewport.from&&oi[0].to==Ws.viewport.to)return oi;let si=[];for(let{from:ii,to:ai}of oi)ii=Math.max(Ws.state.doc.lineAt(ii).from,ii-ws),ai=Math.min(Ws.state.doc.lineAt(ai).to,ai+ws),si.length&&si[si.length-1].to>=ii?si[si.length-1].to=ai:si.push({from:ii,to:ai});return si}class MatchDecorator{constructor(ws){const{regexp:oi,decoration:si,decorate:ii,boundary:ai,maxLength:li=1e3}=ws;if(!oi.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=oi,ii)this.addMatch=(ci,ui,di,hi)=>ii(hi,di,di+ci[0].length,ci,ui);else if(typeof si=="function")this.addMatch=(ci,ui,di,hi)=>{let pi=si(ci,ui,di);pi&&hi(di,di+ci[0].length,pi)};else if(si)this.addMatch=(ci,ui,di,hi)=>hi(di,di+ci[0].length,si);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=ai,this.maxLength=li}createDeco(ws){let oi=new RangeSetBuilder,si=oi.add.bind(oi);for(let{from:ii,to:ai}of matchRanges(ws,this.maxLength))iterMatches(ws.state.doc,this.regexp,ii,ai,(li,ci)=>this.addMatch(ci,ws,li,si));return oi.finish()}updateDeco(ws,oi){let si=1e9,ii=-1;return ws.docChanged&&ws.changes.iterChanges((ai,li,ci,ui)=>{ui>=ws.view.viewport.from&&ci<=ws.view.viewport.to&&(si=Math.min(ci,si),ii=Math.max(ui,ii))}),ws.viewportMoved||ii-si>1e3?this.createDeco(ws.view):ii>-1?this.updateRange(ws.view,oi.map(ws.changes),si,ii):oi}updateRange(ws,oi,si,ii){for(let ai of ws.visibleRanges){let li=Math.max(ai.from,si),ci=Math.min(ai.to,ii);if(ci>li){let ui=ws.state.doc.lineAt(li),di=ui.to<ci?ws.state.doc.lineAt(ci):ui,hi=Math.max(ai.from,ui.from),pi=Math.min(ai.to,di.to);if(this.boundary){for(;li>ui.from;li--)if(this.boundary.test(ui.text[li-1-ui.from])){hi=li;break}for(;ci<di.to;ci++)if(this.boundary.test(di.text[ci-di.from])){pi=ci;break}}let ha=[],ga,va=(ba,wa,xa)=>ha.push(xa.range(ba,wa));if(ui==di)for(this.regexp.lastIndex=hi-ui.from;(ga=this.regexp.exec(ui.text))&&ga.index<pi-ui.from;)this.addMatch(ga,ws,ga.index+ui.from,va);else iterMatches(ws.state.doc,this.regexp,hi,pi,(ba,wa)=>this.addMatch(wa,ws,ba,va));oi=oi.update({filterFrom:hi,filterTo:pi,filter:(ba,wa)=>ba<hi||wa>pi,add:ha})}}return oi}}const UnicodeRegexpSupport=/x/.unicode!=null?"gu":"g",Specials=new RegExp(`[\0-\b
|
|
322
|
+
--\u2028\u2029\uFEFF-]`,UnicodeRegexpSupport),Names={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let _supportsTabSize=null;function supportsTabSize(){var Ws;if(_supportsTabSize==null&&typeof document<"u"&&document.body){let ws=document.body.style;_supportsTabSize=((Ws=ws.tabSize)!==null&&Ws!==void 0?Ws:ws.MozTabSize)!=null}return _supportsTabSize||!1}const specialCharConfig=Facet.define({combine(Ws){let ws=combineConfig(Ws,{render:null,specialChars:Specials,addSpecialChars:null});return(ws.replaceTabs=!supportsTabSize())&&(ws.specialChars=new RegExp(" |"+ws.specialChars.source,UnicodeRegexpSupport)),ws.addSpecialChars&&(ws.specialChars=new RegExp(ws.specialChars.source+"|"+ws.addSpecialChars.source,UnicodeRegexpSupport)),ws}});function highlightSpecialChars(Ws={}){return[specialCharConfig.of(Ws),specialCharPlugin()]}let _plugin=null;function specialCharPlugin(){return _plugin||(_plugin=ViewPlugin.fromClass(class{constructor(Ws){this.view=Ws,this.decorations=Decoration.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(Ws.state.facet(specialCharConfig)),this.decorations=this.decorator.createDeco(Ws)}makeDecorator(Ws){return new MatchDecorator({regexp:Ws.specialChars,decoration:(ws,oi,si)=>{let{doc:ii}=oi.state,ai=codePointAt(ws[0],0);if(ai==9){let li=ii.lineAt(si),ci=oi.state.tabSize,ui=countColumn(li.text,ci,si-li.from);return Decoration.replace({widget:new TabWidget((ci-ui%ci)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[ai]||(this.decorationCache[ai]=Decoration.replace({widget:new SpecialCharWidget(Ws,ai)}))},boundary:Ws.replaceTabs?void 0:/[^]/})}update(Ws){let ws=Ws.state.facet(specialCharConfig);Ws.startState.facet(specialCharConfig)!=ws?(this.decorator=this.makeDecorator(ws),this.decorations=this.decorator.createDeco(Ws.view)):this.decorations=this.decorator.updateDeco(Ws,this.decorations)}},{decorations:Ws=>Ws.decorations}))}const DefaultPlaceholder="•";function placeholder$1(Ws){return Ws>=32?DefaultPlaceholder:Ws==10?"":String.fromCharCode(9216+Ws)}class SpecialCharWidget extends WidgetType{constructor(ws,oi){super(),this.options=ws,this.code=oi}eq(ws){return ws.code==this.code}toDOM(ws){let oi=placeholder$1(this.code),si=ws.state.phrase("Control character")+" "+(Names[this.code]||"0x"+this.code.toString(16)),ii=this.options.render&&this.options.render(this.code,si,oi);if(ii)return ii;let ai=document.createElement("span");return ai.textContent=oi,ai.title=si,ai.setAttribute("aria-label",si),ai.className="cm-specialChar",ai}ignoreEvent(){return!1}}class TabWidget extends WidgetType{constructor(ws){super(),this.width=ws}eq(ws){return ws.width==this.width}toDOM(){let ws=document.createElement("span");return ws.textContent=" ",ws.className="cm-tab",ws.style.width=this.width+"px",ws}ignoreEvent(){return!1}}function highlightActiveLine(){return activeLineHighlighter}const lineDeco=Decoration.line({class:"cm-activeLine"}),activeLineHighlighter=ViewPlugin.fromClass(class{constructor(Ws){this.decorations=this.getDeco(Ws)}update(Ws){(Ws.docChanged||Ws.selectionSet)&&(this.decorations=this.getDeco(Ws.view))}getDeco(Ws){let ws=-1,oi=[];for(let si of Ws.state.selection.ranges){let ii=Ws.lineBlockAt(si.head);ii.from>ws&&(oi.push(lineDeco.range(ii.from)),ws=ii.from)}return Decoration.set(oi)}},{decorations:Ws=>Ws.decorations}),MaxOff=2e3;function rectangleFor(Ws,ws,oi){let si=Math.min(ws.line,oi.line),ii=Math.max(ws.line,oi.line),ai=[];if(ws.off>MaxOff||oi.off>MaxOff||ws.col<0||oi.col<0){let li=Math.min(ws.off,oi.off),ci=Math.max(ws.off,oi.off);for(let ui=si;ui<=ii;ui++){let di=Ws.doc.line(ui);di.length<=ci&&ai.push(EditorSelection.range(di.from+li,di.to+ci))}}else{let li=Math.min(ws.col,oi.col),ci=Math.max(ws.col,oi.col);for(let ui=si;ui<=ii;ui++){let di=Ws.doc.line(ui),hi=findColumn(di.text,li,Ws.tabSize,!0);if(hi<0)ai.push(EditorSelection.cursor(di.to));else{let pi=findColumn(di.text,ci,Ws.tabSize);ai.push(EditorSelection.range(di.from+hi,di.from+pi))}}}return ai}function absoluteColumn(Ws,ws){let oi=Ws.coordsAtPos(Ws.viewport.from);return oi?Math.round(Math.abs((oi.left-ws)/Ws.defaultCharacterWidth)):-1}function getPos(Ws,ws){let oi=Ws.posAtCoords({x:ws.clientX,y:ws.clientY},!1),si=Ws.state.doc.lineAt(oi),ii=oi-si.from,ai=ii>MaxOff?-1:ii==si.length?absoluteColumn(Ws,ws.clientX):countColumn(si.text,Ws.state.tabSize,oi-si.from);return{line:si.number,col:ai,off:ii}}function rectangleSelectionStyle(Ws,ws){let oi=getPos(Ws,ws),si=Ws.state.selection;return oi?{update(ii){if(ii.docChanged){let ai=ii.changes.mapPos(ii.startState.doc.line(oi.line).from),li=ii.state.doc.lineAt(ai);oi={line:li.number,col:oi.col,off:Math.min(oi.off,li.length)},si=si.map(ii.changes)}},get(ii,ai,li){let ci=getPos(Ws,ii);if(!ci)return si;let ui=rectangleFor(Ws.state,oi,ci);return ui.length?li?EditorSelection.create(ui.concat(si.ranges)):EditorSelection.create(ui):si}}:null}function rectangularSelection(Ws){let ws=oi=>oi.altKey&&oi.button==0;return EditorView.mouseSelectionStyle.of((oi,si)=>ws(si)?rectangleSelectionStyle(oi,si):null)}const keys={Alt:[18,Ws=>!!Ws.altKey],Control:[17,Ws=>!!Ws.ctrlKey],Shift:[16,Ws=>!!Ws.shiftKey],Meta:[91,Ws=>!!Ws.metaKey]},showCrosshair={style:"cursor: crosshair"};function crosshairCursor(Ws={}){let[ws,oi]=keys[Ws.key||"Alt"],si=ViewPlugin.fromClass(class{constructor(ii){this.view=ii,this.isDown=!1}set(ii){this.isDown!=ii&&(this.isDown=ii,this.view.update([]))}},{eventObservers:{keydown(ii){this.set(ii.keyCode==ws||oi(ii))},keyup(ii){(ii.keyCode==ws||!oi(ii))&&this.set(!1)},mousemove(ii){this.set(oi(ii))}}});return[si,EditorView.contentAttributes.of(ii=>{var ai;return!((ai=ii.plugin(si))===null||ai===void 0)&&ai.isDown?showCrosshair:null})]}const Outside="-10000px";class TooltipViewManager{constructor(ws,oi,si,ii){this.facet=oi,this.createTooltipView=si,this.removeTooltipView=ii,this.input=ws.state.facet(oi),this.tooltips=this.input.filter(li=>li);let ai=null;this.tooltipViews=this.tooltips.map(li=>ai=si(li,ai))}update(ws,oi){var si;let ii=ws.state.facet(this.facet),ai=ii.filter(ui=>ui);if(ii===this.input){for(let ui of this.tooltipViews)ui.update&&ui.update(ws);return!1}let li=[],ci=oi?[]:null;for(let ui=0;ui<ai.length;ui++){let di=ai[ui],hi=-1;if(di){for(let pi=0;pi<this.tooltips.length;pi++){let ha=this.tooltips[pi];ha&&ha.create==di.create&&(hi=pi)}if(hi<0)li[ui]=this.createTooltipView(di,ui?li[ui-1]:null),ci&&(ci[ui]=!!di.above);else{let pi=li[ui]=this.tooltipViews[hi];ci&&(ci[ui]=oi[hi]),pi.update&&pi.update(ws)}}}for(let ui of this.tooltipViews)li.indexOf(ui)<0&&(this.removeTooltipView(ui),(si=ui.destroy)===null||si===void 0||si.call(ui));return oi&&(ci.forEach((ui,di)=>oi[di]=ui),oi.length=ci.length),this.input=ii,this.tooltips=ai,this.tooltipViews=li,!0}}function windowSpace(Ws){let{win:ws}=Ws;return{top:0,left:0,bottom:ws.innerHeight,right:ws.innerWidth}}const tooltipConfig=Facet.define({combine:Ws=>{var ws,oi,si;return{position:browser.ios?"absolute":((ws=Ws.find(ii=>ii.position))===null||ws===void 0?void 0:ws.position)||"fixed",parent:((oi=Ws.find(ii=>ii.parent))===null||oi===void 0?void 0:oi.parent)||null,tooltipSpace:((si=Ws.find(ii=>ii.tooltipSpace))===null||si===void 0?void 0:si.tooltipSpace)||windowSpace}}}),knownHeight=new WeakMap,tooltipPlugin=ViewPlugin.fromClass(class{constructor(Ws){this.view=Ws,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let ws=Ws.state.facet(tooltipConfig);this.position=ws.position,this.parent=ws.parent,this.classes=Ws.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new TooltipViewManager(Ws,showTooltip,(oi,si)=>this.createTooltip(oi,si),oi=>{this.resizeObserver&&this.resizeObserver.unobserve(oi.dom),oi.dom.remove()}),this.above=this.manager.tooltips.map(oi=>!!oi.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(oi=>{Date.now()>this.lastTransaction-50&&oi.length>0&&oi[oi.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),Ws.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let Ws of this.manager.tooltipViews)this.intersectionObserver.observe(Ws.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(Ws){Ws.transactions.length&&(this.lastTransaction=Date.now());let ws=this.manager.update(Ws,this.above);ws&&this.observeIntersection();let oi=ws||Ws.geometryChanged,si=Ws.state.facet(tooltipConfig);if(si.position!=this.position&&!this.madeAbsolute){this.position=si.position;for(let ii of this.manager.tooltipViews)ii.dom.style.position=this.position;oi=!0}if(si.parent!=this.parent){this.parent&&this.container.remove(),this.parent=si.parent,this.createContainer();for(let ii of this.manager.tooltipViews)this.container.appendChild(ii.dom);oi=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);oi&&this.maybeMeasure()}createTooltip(Ws,ws){let oi=Ws.create(this.view),si=ws?ws.dom:null;if(oi.dom.classList.add("cm-tooltip"),Ws.arrow&&!oi.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let ii=document.createElement("div");ii.className="cm-tooltip-arrow",oi.dom.appendChild(ii)}return oi.dom.style.position=this.position,oi.dom.style.top=Outside,oi.dom.style.left="0px",this.container.insertBefore(oi.dom,si),oi.mount&&oi.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(oi.dom),oi}destroy(){var Ws,ws,oi;this.view.win.removeEventListener("resize",this.measureSoon);for(let si of this.manager.tooltipViews)si.dom.remove(),(Ws=si.destroy)===null||Ws===void 0||Ws.call(si);this.parent&&this.container.remove(),(ws=this.resizeObserver)===null||ws===void 0||ws.disconnect(),(oi=this.intersectionObserver)===null||oi===void 0||oi.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let Ws=1,ws=1,oi=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:ai}=this.manager.tooltipViews[0];if(browser.gecko)oi=ai.offsetParent!=this.container.ownerDocument.body;else if(ai.style.top==Outside&&ai.style.left=="0px"){let li=ai.getBoundingClientRect();oi=Math.abs(li.top+1e4)>1||Math.abs(li.left)>1}}if(oi||this.position=="absolute")if(this.parent){let ai=this.parent.getBoundingClientRect();ai.width&&ai.height&&(Ws=ai.width/this.parent.offsetWidth,ws=ai.height/this.parent.offsetHeight)}else({scaleX:Ws,scaleY:ws}=this.view.viewState);let si=this.view.scrollDOM.getBoundingClientRect(),ii=getScrollMargins(this.view);return{visible:{left:si.left+ii.left,top:si.top+ii.top,right:si.right-ii.right,bottom:si.bottom-ii.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((ai,li)=>{let ci=this.manager.tooltipViews[li];return ci.getCoords?ci.getCoords(ai.pos):this.view.coordsAtPos(ai.pos)}),size:this.manager.tooltipViews.map(({dom:ai})=>ai.getBoundingClientRect()),space:this.view.state.facet(tooltipConfig).tooltipSpace(this.view),scaleX:Ws,scaleY:ws,makeAbsolute:oi}}writeMeasure(Ws){var ws;if(Ws.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let ci of this.manager.tooltipViews)ci.dom.style.position="absolute"}let{visible:oi,space:si,scaleX:ii,scaleY:ai}=Ws,li=[];for(let ci=0;ci<this.manager.tooltips.length;ci++){let ui=this.manager.tooltips[ci],di=this.manager.tooltipViews[ci],{dom:hi}=di,pi=Ws.pos[ci],ha=Ws.size[ci];if(!pi||ui.clip!==!1&&(pi.bottom<=Math.max(oi.top,si.top)||pi.top>=Math.min(oi.bottom,si.bottom)||pi.right<Math.max(oi.left,si.left)-.1||pi.left>Math.min(oi.right,si.right)+.1)){hi.style.top=Outside;continue}let ga=ui.arrow?di.dom.querySelector(".cm-tooltip-arrow"):null,va=ga?7:0,ba=ha.right-ha.left,wa=(ws=knownHeight.get(di))!==null&&ws!==void 0?ws:ha.bottom-ha.top,xa=di.offset||noOffset,Ca=this.view.textDirection==Direction.LTR,el=ha.width>si.right-si.left?Ca?si.left:si.right-ha.width:Ca?Math.max(si.left,Math.min(pi.left-(ga?14:0)+xa.x,si.right-ba)):Math.min(Math.max(si.left,pi.left-ba+(ga?14:0)-xa.x),si.right-ba),ku=this.above[ci];!ui.strictSide&&(ku?pi.top-wa-va-xa.y<si.top:pi.bottom+wa+va+xa.y>si.bottom)&&ku==si.bottom-pi.bottom>pi.top-si.top&&(ku=this.above[ci]=!ku);let gd=(ku?pi.top-si.top:si.bottom-pi.bottom)-va;if(gd<wa&&di.resize!==!1){if(gd<this.view.defaultLineHeight){hi.style.top=Outside;continue}knownHeight.set(di,wa),hi.style.height=(wa=gd)/ai+"px"}else hi.style.height&&(hi.style.height="");let Ed=ku?pi.top-wa-va-xa.y:pi.bottom+va+xa.y,Od=el+ba;if(di.overlap!==!0)for(let Nd of li)Nd.left<Od&&Nd.right>el&&Nd.top<Ed+wa&&Nd.bottom>Ed&&(Ed=ku?Nd.top-wa-2-va:Nd.bottom+va+2);if(this.position=="absolute"?(hi.style.top=(Ed-Ws.parent.top)/ai+"px",setLeftStyle(hi,(el-Ws.parent.left)/ii)):(hi.style.top=Ed/ai+"px",setLeftStyle(hi,el/ii)),ga){let Nd=pi.left+(Ca?xa.x:-xa.x)-(el+14-7);ga.style.left=Nd/ii+"px"}di.overlap!==!0&&li.push({left:el,top:Ed,right:Od,bottom:Ed+wa}),hi.classList.toggle("cm-tooltip-above",ku),hi.classList.toggle("cm-tooltip-below",!ku),di.positioned&&di.positioned(Ws.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let Ws of this.manager.tooltipViews)Ws.dom.style.top=Outside}},{eventObservers:{scroll(){this.maybeMeasure()}}});function setLeftStyle(Ws,ws){let oi=parseInt(Ws.style.left,10);(isNaN(oi)||Math.abs(ws-oi)>1)&&(Ws.style.left=ws+"px")}const baseTheme$5=EditorView.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),noOffset={x:0,y:0},showTooltip=Facet.define({enables:[tooltipPlugin,baseTheme$5]}),showHoverTooltip=Facet.define({combine:Ws=>Ws.reduce((ws,oi)=>ws.concat(oi),[])});class HoverTooltipHost{static create(ws){return new HoverTooltipHost(ws)}constructor(ws){this.view=ws,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new TooltipViewManager(ws,showHoverTooltip,(oi,si)=>this.createHostedView(oi,si),oi=>oi.dom.remove())}createHostedView(ws,oi){let si=ws.create(this.view);return si.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(si.dom,oi?oi.dom.nextSibling:this.dom.firstChild),this.mounted&&si.mount&&si.mount(this.view),si}mount(ws){for(let oi of this.manager.tooltipViews)oi.mount&&oi.mount(ws);this.mounted=!0}positioned(ws){for(let oi of this.manager.tooltipViews)oi.positioned&&oi.positioned(ws)}update(ws){this.manager.update(ws)}destroy(){var ws;for(let oi of this.manager.tooltipViews)(ws=oi.destroy)===null||ws===void 0||ws.call(oi)}passProp(ws){let oi;for(let si of this.manager.tooltipViews){let ii=si[ws];if(ii!==void 0){if(oi===void 0)oi=ii;else if(oi!==ii)return}}return oi}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const showHoverTooltipHost=showTooltip.compute([showHoverTooltip],Ws=>{let ws=Ws.facet(showHoverTooltip);return ws.length===0?null:{pos:Math.min(...ws.map(oi=>oi.pos)),end:Math.max(...ws.map(oi=>{var si;return(si=oi.end)!==null&&si!==void 0?si:oi.pos})),create:HoverTooltipHost.create,above:ws[0].above,arrow:ws.some(oi=>oi.arrow)}});class HoverPlugin{constructor(ws,oi,si,ii,ai){this.view=ws,this.source=oi,this.field=si,this.setHover=ii,this.hoverTime=ai,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:ws.dom,time:0},this.checkHover=this.checkHover.bind(this),ws.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),ws.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let ws=Date.now()-this.lastMove.time;ws<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-ws):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:ws,lastMove:oi}=this,si=ws.docView.nearest(oi.target);if(!si)return;let ii,ai=1;if(si instanceof WidgetView)ii=si.posAtStart;else{if(ii=ws.posAtCoords(oi),ii==null)return;let ci=ws.coordsAtPos(ii);if(!ci||oi.y<ci.top||oi.y>ci.bottom||oi.x<ci.left-ws.defaultCharacterWidth||oi.x>ci.right+ws.defaultCharacterWidth)return;let ui=ws.bidiSpans(ws.state.doc.lineAt(ii)).find(hi=>hi.from<=ii&&hi.to>=ii),di=ui&&ui.dir==Direction.RTL?-1:1;ai=oi.x<ci.left?-di:di}let li=this.source(ws,ii,ai);if(li!=null&&li.then){let ci=this.pending={pos:ii};li.then(ui=>{this.pending==ci&&(this.pending=null,ui&&!(Array.isArray(ui)&&!ui.length)&&ws.dispatch({effects:this.setHover.of(Array.isArray(ui)?ui:[ui])}))},ui=>logException(ws.state,ui,"hover tooltip"))}else li&&!(Array.isArray(li)&&!li.length)&&ws.dispatch({effects:this.setHover.of(Array.isArray(li)?li:[li])})}get tooltip(){let ws=this.view.plugin(tooltipPlugin),oi=ws?ws.manager.tooltips.findIndex(si=>si.create==HoverTooltipHost.create):-1;return oi>-1?ws.manager.tooltipViews[oi]:null}mousemove(ws){var oi,si;this.lastMove={x:ws.clientX,y:ws.clientY,target:ws.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:ii,tooltip:ai}=this;if(ii.length&&ai&&!isInTooltip(ai.dom,ws)||this.pending){let{pos:li}=ii[0]||this.pending,ci=(si=(oi=ii[0])===null||oi===void 0?void 0:oi.end)!==null&&si!==void 0?si:li;(li==ci?this.view.posAtCoords(this.lastMove)!=li:!isOverRange(this.view,li,ci,ws.clientX,ws.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(ws){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:oi}=this;if(oi.length){let{tooltip:si}=this;si&&si.dom.contains(ws.relatedTarget)?this.watchTooltipLeave(si.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(ws){let oi=si=>{ws.removeEventListener("mouseleave",oi),this.active.length&&!this.view.dom.contains(si.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};ws.addEventListener("mouseleave",oi)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const tooltipMargin=4;function isInTooltip(Ws,ws){let{left:oi,right:si,top:ii,bottom:ai}=Ws.getBoundingClientRect(),li;if(li=Ws.querySelector(".cm-tooltip-arrow")){let ci=li.getBoundingClientRect();ii=Math.min(ci.top,ii),ai=Math.max(ci.bottom,ai)}return ws.clientX>=oi-tooltipMargin&&ws.clientX<=si+tooltipMargin&&ws.clientY>=ii-tooltipMargin&&ws.clientY<=ai+tooltipMargin}function isOverRange(Ws,ws,oi,si,ii,ai){let li=Ws.scrollDOM.getBoundingClientRect(),ci=Ws.documentTop+Ws.documentPadding.top+Ws.contentHeight;if(li.left>si||li.right<si||li.top>ii||Math.min(li.bottom,ci)<ii)return!1;let ui=Ws.posAtCoords({x:si,y:ii},!1);return ui>=ws&&ui<=oi}function hoverTooltip(Ws,ws={}){let oi=StateEffect.define(),si=StateField.define({create(){return[]},update(ii,ai){if(ii.length&&(ws.hideOnChange&&(ai.docChanged||ai.selection)?ii=[]:ws.hideOn&&(ii=ii.filter(li=>!ws.hideOn(ai,li))),ai.docChanged)){let li=[];for(let ci of ii){let ui=ai.changes.mapPos(ci.pos,-1,MapMode.TrackDel);if(ui!=null){let di=Object.assign(Object.create(null),ci);di.pos=ui,di.end!=null&&(di.end=ai.changes.mapPos(di.end)),li.push(di)}}ii=li}for(let li of ai.effects)li.is(oi)&&(ii=li.value),li.is(closeHoverTooltipEffect)&&(ii=[]);return ii},provide:ii=>showHoverTooltip.from(ii)});return{active:si,extension:[si,ViewPlugin.define(ii=>new HoverPlugin(ii,Ws,si,oi,ws.hoverTime||300)),showHoverTooltipHost]}}function getTooltip(Ws,ws){let oi=Ws.plugin(tooltipPlugin);if(!oi)return null;let si=oi.manager.tooltips.indexOf(ws);return si<0?null:oi.manager.tooltipViews[si]}const closeHoverTooltipEffect=StateEffect.define(),panelConfig=Facet.define({combine(Ws){let ws,oi;for(let si of Ws)ws=ws||si.topContainer,oi=oi||si.bottomContainer;return{topContainer:ws,bottomContainer:oi}}});function getPanel(Ws,ws){let oi=Ws.plugin(panelPlugin),si=oi?oi.specs.indexOf(ws):-1;return si>-1?oi.panels[si]:null}const panelPlugin=ViewPlugin.fromClass(class{constructor(Ws){this.input=Ws.state.facet(showPanel),this.specs=this.input.filter(oi=>oi),this.panels=this.specs.map(oi=>oi(Ws));let ws=Ws.state.facet(panelConfig);this.top=new PanelGroup(Ws,!0,ws.topContainer),this.bottom=new PanelGroup(Ws,!1,ws.bottomContainer),this.top.sync(this.panels.filter(oi=>oi.top)),this.bottom.sync(this.panels.filter(oi=>!oi.top));for(let oi of this.panels)oi.dom.classList.add("cm-panel"),oi.mount&&oi.mount()}update(Ws){let ws=Ws.state.facet(panelConfig);this.top.container!=ws.topContainer&&(this.top.sync([]),this.top=new PanelGroup(Ws.view,!0,ws.topContainer)),this.bottom.container!=ws.bottomContainer&&(this.bottom.sync([]),this.bottom=new PanelGroup(Ws.view,!1,ws.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let oi=Ws.state.facet(showPanel);if(oi!=this.input){let si=oi.filter(ui=>ui),ii=[],ai=[],li=[],ci=[];for(let ui of si){let di=this.specs.indexOf(ui),hi;di<0?(hi=ui(Ws.view),ci.push(hi)):(hi=this.panels[di],hi.update&&hi.update(Ws)),ii.push(hi),(hi.top?ai:li).push(hi)}this.specs=si,this.panels=ii,this.top.sync(ai),this.bottom.sync(li);for(let ui of ci)ui.dom.classList.add("cm-panel"),ui.mount&&ui.mount()}else for(let si of this.panels)si.update&&si.update(Ws)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:Ws=>EditorView.scrollMargins.of(ws=>{let oi=ws.plugin(Ws);return oi&&{top:oi.top.scrollMargin(),bottom:oi.bottom.scrollMargin()}})});class PanelGroup{constructor(ws,oi,si){this.view=ws,this.top=oi,this.container=si,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(ws){for(let oi of this.panels)oi.destroy&&ws.indexOf(oi)<0&&oi.destroy();this.panels=ws,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let oi=this.container||this.view.dom;oi.insertBefore(this.dom,this.top?oi.firstChild:null)}let ws=this.dom.firstChild;for(let oi of this.panels)if(oi.dom.parentNode==this.dom){for(;ws!=oi.dom;)ws=rm(ws);ws=ws.nextSibling}else this.dom.insertBefore(oi.dom,ws);for(;ws;)ws=rm(ws)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let ws of this.classes.split(" "))ws&&this.container.classList.remove(ws);for(let ws of(this.classes=this.view.themeClasses).split(" "))ws&&this.container.classList.add(ws)}}}function rm(Ws){let ws=Ws.nextSibling;return Ws.remove(),ws}const showPanel=Facet.define({enables:panelPlugin});class GutterMarker extends RangeValue{compare(ws){return this==ws||this.constructor==ws.constructor&&this.eq(ws)}eq(ws){return!1}destroy(ws){}}GutterMarker.prototype.elementClass="";GutterMarker.prototype.toDOM=void 0;GutterMarker.prototype.mapMode=MapMode.TrackBefore;GutterMarker.prototype.startSide=GutterMarker.prototype.endSide=-1;GutterMarker.prototype.point=!0;const gutterLineClass=Facet.define(),gutterWidgetClass=Facet.define(),defaults$1={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>RangeSet.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},activeGutters=Facet.define();function gutter(Ws){return[gutters(),activeGutters.of(Object.assign(Object.assign({},defaults$1),Ws))]}const unfixGutters=Facet.define({combine:Ws=>Ws.some(ws=>ws)});function gutters(Ws){return[gutterView]}const gutterView=ViewPlugin.fromClass(class{constructor(Ws){this.view=Ws,this.prevViewport=Ws.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=Ws.state.facet(activeGutters).map(ws=>new SingleGutterView(Ws,ws));for(let ws of this.gutters)this.dom.appendChild(ws.dom);this.fixed=!Ws.state.facet(unfixGutters),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),Ws.scrollDOM.insertBefore(this.dom,Ws.contentDOM)}update(Ws){if(this.updateGutters(Ws)){let ws=this.prevViewport,oi=Ws.view.viewport,si=Math.min(ws.to,oi.to)-Math.max(ws.from,oi.from);this.syncGutters(si<(oi.to-oi.from)*.8)}Ws.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(unfixGutters)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=Ws.view.viewport}syncGutters(Ws){let ws=this.dom.nextSibling;Ws&&this.dom.remove();let oi=RangeSet.iter(this.view.state.facet(gutterLineClass),this.view.viewport.from),si=[],ii=this.gutters.map(ai=>new UpdateContext(ai,this.view.viewport,-this.view.documentPadding.top));for(let ai of this.view.viewportLineBlocks)if(si.length&&(si=[]),Array.isArray(ai.type)){let li=!0;for(let ci of ai.type)if(ci.type==BlockType.Text&&li){advanceCursor(oi,si,ci.from);for(let ui of ii)ui.line(this.view,ci,si);li=!1}else if(ci.widget)for(let ui of ii)ui.widget(this.view,ci)}else if(ai.type==BlockType.Text){advanceCursor(oi,si,ai.from);for(let li of ii)li.line(this.view,ai,si)}else if(ai.widget)for(let li of ii)li.widget(this.view,ai);for(let ai of ii)ai.finish();Ws&&this.view.scrollDOM.insertBefore(this.dom,ws)}updateGutters(Ws){let ws=Ws.startState.facet(activeGutters),oi=Ws.state.facet(activeGutters),si=Ws.docChanged||Ws.heightChanged||Ws.viewportChanged||!RangeSet.eq(Ws.startState.facet(gutterLineClass),Ws.state.facet(gutterLineClass),Ws.view.viewport.from,Ws.view.viewport.to);if(ws==oi)for(let ii of this.gutters)ii.update(Ws)&&(si=!0);else{si=!0;let ii=[];for(let ai of oi){let li=ws.indexOf(ai);li<0?ii.push(new SingleGutterView(this.view,ai)):(this.gutters[li].update(Ws),ii.push(this.gutters[li]))}for(let ai of this.gutters)ai.dom.remove(),ii.indexOf(ai)<0&&ai.destroy();for(let ai of ii)this.dom.appendChild(ai.dom);this.gutters=ii}return si}destroy(){for(let Ws of this.gutters)Ws.destroy();this.dom.remove()}},{provide:Ws=>EditorView.scrollMargins.of(ws=>{let oi=ws.plugin(Ws);return!oi||oi.gutters.length==0||!oi.fixed?null:ws.textDirection==Direction.LTR?{left:oi.dom.offsetWidth*ws.scaleX}:{right:oi.dom.offsetWidth*ws.scaleX}})});function asArray$1(Ws){return Array.isArray(Ws)?Ws:[Ws]}function advanceCursor(Ws,ws,oi){for(;Ws.value&&Ws.from<=oi;)Ws.from==oi&&ws.push(Ws.value),Ws.next()}class UpdateContext{constructor(ws,oi,si){this.gutter=ws,this.height=si,this.i=0,this.cursor=RangeSet.iter(ws.markers,oi.from)}addElement(ws,oi,si){let{gutter:ii}=this,ai=(oi.top-this.height)/ws.scaleY,li=oi.height/ws.scaleY;if(this.i==ii.elements.length){let ci=new GutterElement(ws,li,ai,si);ii.elements.push(ci),ii.dom.appendChild(ci.dom)}else ii.elements[this.i].update(ws,li,ai,si);this.height=oi.bottom,this.i++}line(ws,oi,si){let ii=[];advanceCursor(this.cursor,ii,oi.from),si.length&&(ii=ii.concat(si));let ai=this.gutter.config.lineMarker(ws,oi,ii);ai&&ii.unshift(ai);let li=this.gutter;ii.length==0&&!li.config.renderEmptyElements||this.addElement(ws,oi,ii)}widget(ws,oi){let si=this.gutter.config.widgetMarker(ws,oi.widget,oi),ii=si?[si]:null;for(let ai of ws.state.facet(gutterWidgetClass)){let li=ai(ws,oi.widget,oi);li&&(ii||(ii=[])).push(li)}ii&&this.addElement(ws,oi,ii)}finish(){let ws=this.gutter;for(;ws.elements.length>this.i;){let oi=ws.elements.pop();ws.dom.removeChild(oi.dom),oi.destroy()}}}class SingleGutterView{constructor(ws,oi){this.view=ws,this.config=oi,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let si in oi.domEventHandlers)this.dom.addEventListener(si,ii=>{let ai=ii.target,li;if(ai!=this.dom&&this.dom.contains(ai)){for(;ai.parentNode!=this.dom;)ai=ai.parentNode;let ui=ai.getBoundingClientRect();li=(ui.top+ui.bottom)/2}else li=ii.clientY;let ci=ws.lineBlockAtHeight(li-ws.documentTop);oi.domEventHandlers[si](ws,ci,ii)&&ii.preventDefault()});this.markers=asArray$1(oi.markers(ws)),oi.initialSpacer&&(this.spacer=new GutterElement(ws,0,0,[oi.initialSpacer(ws)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(ws){let oi=this.markers;if(this.markers=asArray$1(this.config.markers(ws.view)),this.spacer&&this.config.updateSpacer){let ii=this.config.updateSpacer(this.spacer.markers[0],ws);ii!=this.spacer.markers[0]&&this.spacer.update(ws.view,0,0,[ii])}let si=ws.view.viewport;return!RangeSet.eq(this.markers,oi,si.from,si.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(ws):!1)}destroy(){for(let ws of this.elements)ws.destroy()}}class GutterElement{constructor(ws,oi,si,ii){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(ws,oi,si,ii)}update(ws,oi,si,ii){this.height!=oi&&(this.height=oi,this.dom.style.height=oi+"px"),this.above!=si&&(this.dom.style.marginTop=(this.above=si)?si+"px":""),sameMarkers(this.markers,ii)||this.setMarkers(ws,ii)}setMarkers(ws,oi){let si="cm-gutterElement",ii=this.dom.firstChild;for(let ai=0,li=0;;){let ci=li,ui=ai<oi.length?oi[ai++]:null,di=!1;if(ui){let hi=ui.elementClass;hi&&(si+=" "+hi);for(let pi=li;pi<this.markers.length;pi++)if(this.markers[pi].compare(ui)){ci=pi,di=!0;break}}else ci=this.markers.length;for(;li<ci;){let hi=this.markers[li++];if(hi.toDOM){hi.destroy(ii);let pi=ii.nextSibling;ii.remove(),ii=pi}}if(!ui)break;ui.toDOM&&(di?ii=ii.nextSibling:this.dom.insertBefore(ui.toDOM(ws),ii)),di&&li++}this.dom.className=si,this.markers=oi}destroy(){this.setMarkers(null,[])}}function sameMarkers(Ws,ws){if(Ws.length!=ws.length)return!1;for(let oi=0;oi<Ws.length;oi++)if(!Ws[oi].compare(ws[oi]))return!1;return!0}const lineNumberMarkers=Facet.define(),lineNumberWidgetMarker=Facet.define(),lineNumberConfig=Facet.define({combine(Ws){return combineConfig(Ws,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(ws,oi){let si=Object.assign({},ws);for(let ii in oi){let ai=si[ii],li=oi[ii];si[ii]=ai?(ci,ui,di)=>ai(ci,ui,di)||li(ci,ui,di):li}return si}})}});class NumberMarker extends GutterMarker{constructor(ws){super(),this.number=ws}eq(ws){return this.number==ws.number}toDOM(){return document.createTextNode(this.number)}}function formatNumber(Ws,ws){return Ws.state.facet(lineNumberConfig).formatNumber(ws,Ws.state)}const lineNumberGutter=activeGutters.compute([lineNumberConfig],Ws=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(ws){return ws.state.facet(lineNumberMarkers)},lineMarker(ws,oi,si){return si.some(ii=>ii.toDOM)?null:new NumberMarker(formatNumber(ws,ws.state.doc.lineAt(oi.from).number))},widgetMarker:(ws,oi,si)=>{for(let ii of ws.state.facet(lineNumberWidgetMarker)){let ai=ii(ws,oi,si);if(ai)return ai}return null},lineMarkerChange:ws=>ws.startState.facet(lineNumberConfig)!=ws.state.facet(lineNumberConfig),initialSpacer(ws){return new NumberMarker(formatNumber(ws,maxLineNumber(ws.state.doc.lines)))},updateSpacer(ws,oi){let si=formatNumber(oi.view,maxLineNumber(oi.view.state.doc.lines));return si==ws.number?ws:new NumberMarker(si)},domEventHandlers:Ws.facet(lineNumberConfig).domEventHandlers}));function lineNumbers(Ws={}){return[lineNumberConfig.of(Ws),gutters(),lineNumberGutter]}function maxLineNumber(Ws){let ws=9;for(;ws<Ws;)ws=ws*10+9;return ws}const activeLineGutterMarker=new class extends GutterMarker{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},activeLineGutterHighlighter=gutterLineClass.compute(["selection"],Ws=>{let ws=[],oi=-1;for(let si of Ws.selection.ranges){let ii=Ws.doc.lineAt(si.head).from;ii>oi&&(oi=ii,ws.push(activeLineGutterMarker.range(ii)))}return RangeSet.of(ws)});function highlightActiveLineGutter(){return activeLineGutterHighlighter}const DefaultBufferLength=1024;let nextPropID=0,Range$2=class{constructor(Ws,ws){this.from=Ws,this.to=ws}};class NodeProp{constructor(ws={}){this.id=nextPropID++,this.perNode=!!ws.perNode,this.deserialize=ws.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(ws){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof ws!="function"&&(ws=NodeType.match(ws)),oi=>{let si=ws(oi);return si===void 0?null:[this,si]}}}NodeProp.closedBy=new NodeProp({deserialize:Ws=>Ws.split(" ")});NodeProp.openedBy=new NodeProp({deserialize:Ws=>Ws.split(" ")});NodeProp.group=new NodeProp({deserialize:Ws=>Ws.split(" ")});NodeProp.isolate=new NodeProp({deserialize:Ws=>{if(Ws&&Ws!="rtl"&&Ws!="ltr"&&Ws!="auto")throw new RangeError("Invalid value for isolate: "+Ws);return Ws||"auto"}});NodeProp.contextHash=new NodeProp({perNode:!0});NodeProp.lookAhead=new NodeProp({perNode:!0});NodeProp.mounted=new NodeProp({perNode:!0});class MountedTree{constructor(ws,oi,si){this.tree=ws,this.overlay=oi,this.parser=si}static get(ws){return ws&&ws.props&&ws.props[NodeProp.mounted.id]}}const noProps=Object.create(null);class NodeType{constructor(ws,oi,si,ii=0){this.name=ws,this.props=oi,this.id=si,this.flags=ii}static define(ws){let oi=ws.props&&ws.props.length?Object.create(null):noProps,si=(ws.top?1:0)|(ws.skipped?2:0)|(ws.error?4:0)|(ws.name==null?8:0),ii=new NodeType(ws.name||"",oi,ws.id,si);if(ws.props){for(let ai of ws.props)if(Array.isArray(ai)||(ai=ai(ii)),ai){if(ai[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");oi[ai[0].id]=ai[1]}}return ii}prop(ws){return this.props[ws.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(ws){if(typeof ws=="string"){if(this.name==ws)return!0;let oi=this.prop(NodeProp.group);return oi?oi.indexOf(ws)>-1:!1}return this.id==ws}static match(ws){let oi=Object.create(null);for(let si in ws)for(let ii of si.split(" "))oi[ii]=ws[si];return si=>{for(let ii=si.prop(NodeProp.group),ai=-1;ai<(ii?ii.length:0);ai++){let li=oi[ai<0?si.name:ii[ai]];if(li)return li}}}}NodeType.none=new NodeType("",Object.create(null),0,8);class NodeSet{constructor(ws){this.types=ws;for(let oi=0;oi<ws.length;oi++)if(ws[oi].id!=oi)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...ws){let oi=[];for(let si of this.types){let ii=null;for(let ai of ws){let li=ai(si);li&&(ii||(ii=Object.assign({},si.props)),ii[li[0].id]=li[1])}oi.push(ii?new NodeType(si.name,ii,si.id,si.flags):si)}return new NodeSet(oi)}}const CachedNode=new WeakMap,CachedInnerNode=new WeakMap;var IterMode;(function(Ws){Ws[Ws.ExcludeBuffers=1]="ExcludeBuffers",Ws[Ws.IncludeAnonymous=2]="IncludeAnonymous",Ws[Ws.IgnoreMounts=4]="IgnoreMounts",Ws[Ws.IgnoreOverlays=8]="IgnoreOverlays"})(IterMode||(IterMode={}));class Tree{constructor(ws,oi,si,ii,ai){if(this.type=ws,this.children=oi,this.positions=si,this.length=ii,this.props=null,ai&&ai.length){this.props=Object.create(null);for(let[li,ci]of ai)this.props[typeof li=="number"?li:li.id]=ci}}toString(){let ws=MountedTree.get(this);if(ws&&!ws.overlay)return ws.tree.toString();let oi="";for(let si of this.children){let ii=si.toString();ii&&(oi&&(oi+=","),oi+=ii)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(oi.length?"("+oi+")":""):oi}cursor(ws=0){return new TreeCursor(this.topNode,ws)}cursorAt(ws,oi=0,si=0){let ii=CachedNode.get(this)||this.topNode,ai=new TreeCursor(ii);return ai.moveTo(ws,oi),CachedNode.set(this,ai._tree),ai}get topNode(){return new TreeNode(this,0,0,null)}resolve(ws,oi=0){let si=resolveNode(CachedNode.get(this)||this.topNode,ws,oi,!1);return CachedNode.set(this,si),si}resolveInner(ws,oi=0){let si=resolveNode(CachedInnerNode.get(this)||this.topNode,ws,oi,!0);return CachedInnerNode.set(this,si),si}resolveStack(ws,oi=0){return stackIterator(this,ws,oi)}iterate(ws){let{enter:oi,leave:si,from:ii=0,to:ai=this.length}=ws,li=ws.mode||0,ci=(li&IterMode.IncludeAnonymous)>0;for(let ui=this.cursor(li|IterMode.IncludeAnonymous);;){let di=!1;if(ui.from<=ai&&ui.to>=ii&&(!ci&&ui.type.isAnonymous||oi(ui)!==!1)){if(ui.firstChild())continue;di=!0}for(;di&&si&&(ci||!ui.type.isAnonymous)&&si(ui),!ui.nextSibling();){if(!ui.parent())return;di=!0}}}prop(ws){return ws.perNode?this.props?this.props[ws.id]:void 0:this.type.prop(ws)}get propValues(){let ws=[];if(this.props)for(let oi in this.props)ws.push([+oi,this.props[oi]]);return ws}balance(ws={}){return this.children.length<=8?this:balanceRange(NodeType.none,this.children,this.positions,0,this.children.length,0,this.length,(oi,si,ii)=>new Tree(this.type,oi,si,ii,this.propValues),ws.makeTree||((oi,si,ii)=>new Tree(NodeType.none,oi,si,ii)))}static build(ws){return buildTree(ws)}}Tree.empty=new Tree(NodeType.none,[],[],0);class FlatBufferCursor{constructor(ws,oi){this.buffer=ws,this.index=oi}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new FlatBufferCursor(this.buffer,this.index)}}class TreeBuffer{constructor(ws,oi,si){this.buffer=ws,this.length=oi,this.set=si}get type(){return NodeType.none}toString(){let ws=[];for(let oi=0;oi<this.buffer.length;)ws.push(this.childString(oi)),oi=this.buffer[oi+3];return ws.join(",")}childString(ws){let oi=this.buffer[ws],si=this.buffer[ws+3],ii=this.set.types[oi],ai=ii.name;if(/\W/.test(ai)&&!ii.isError&&(ai=JSON.stringify(ai)),ws+=4,si==ws)return ai;let li=[];for(;ws<si;)li.push(this.childString(ws)),ws=this.buffer[ws+3];return ai+"("+li.join(",")+")"}findChild(ws,oi,si,ii,ai){let{buffer:li}=this,ci=-1;for(let ui=ws;ui!=oi&&!(checkSide(ai,ii,li[ui+1],li[ui+2])&&(ci=ui,si>0));ui=li[ui+3]);return ci}slice(ws,oi,si){let ii=this.buffer,ai=new Uint16Array(oi-ws),li=0;for(let ci=ws,ui=0;ci<oi;){ai[ui++]=ii[ci++],ai[ui++]=ii[ci++]-si;let di=ai[ui++]=ii[ci++]-si;ai[ui++]=ii[ci++]-ws,li=Math.max(li,di)}return new TreeBuffer(ai,li,this.set)}}function checkSide(Ws,ws,oi,si){switch(Ws){case-2:return oi<ws;case-1:return si>=ws&&oi<ws;case 0:return oi<ws&&si>ws;case 1:return oi<=ws&&si>ws;case 2:return si>ws;case 4:return!0}}function resolveNode(Ws,ws,oi,si){for(var ii;Ws.from==Ws.to||(oi<1?Ws.from>=ws:Ws.from>ws)||(oi>-1?Ws.to<=ws:Ws.to<ws);){let li=!si&&Ws instanceof TreeNode&&Ws.index<0?null:Ws.parent;if(!li)return Ws;Ws=li}let ai=si?0:IterMode.IgnoreOverlays;if(si)for(let li=Ws,ci=li.parent;ci;li=ci,ci=li.parent)li instanceof TreeNode&&li.index<0&&((ii=ci.enter(ws,oi,ai))===null||ii===void 0?void 0:ii.from)!=li.from&&(Ws=ci);for(;;){let li=Ws.enter(ws,oi,ai);if(!li)return Ws;Ws=li}}class BaseNode{cursor(ws=0){return new TreeCursor(this,ws)}getChild(ws,oi=null,si=null){let ii=getChildren(this,ws,oi,si);return ii.length?ii[0]:null}getChildren(ws,oi=null,si=null){return getChildren(this,ws,oi,si)}resolve(ws,oi=0){return resolveNode(this,ws,oi,!1)}resolveInner(ws,oi=0){return resolveNode(this,ws,oi,!0)}matchContext(ws){return matchNodeContext(this.parent,ws)}enterUnfinishedNodesBefore(ws){let oi=this.childBefore(ws),si=this;for(;oi;){let ii=oi.lastChild;if(!ii||ii.to!=oi.to)break;ii.type.isError&&ii.from==ii.to?(si=oi,oi=ii.prevSibling):oi=ii}return si}get node(){return this}get next(){return this.parent}}class TreeNode extends BaseNode{constructor(ws,oi,si,ii){super(),this._tree=ws,this.from=oi,this.index=si,this._parent=ii}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(ws,oi,si,ii,ai=0){for(let li=this;;){for(let{children:ci,positions:ui}=li._tree,di=oi>0?ci.length:-1;ws!=di;ws+=oi){let hi=ci[ws],pi=ui[ws]+li.from;if(checkSide(ii,si,pi,pi+hi.length)){if(hi instanceof TreeBuffer){if(ai&IterMode.ExcludeBuffers)continue;let ha=hi.findChild(0,hi.buffer.length,oi,si-pi,ii);if(ha>-1)return new BufferNode(new BufferContext(li,hi,ws,pi),null,ha)}else if(ai&IterMode.IncludeAnonymous||!hi.type.isAnonymous||hasChild(hi)){let ha;if(!(ai&IterMode.IgnoreMounts)&&(ha=MountedTree.get(hi))&&!ha.overlay)return new TreeNode(ha.tree,pi,ws,li);let ga=new TreeNode(hi,pi,ws,li);return ai&IterMode.IncludeAnonymous||!ga.type.isAnonymous?ga:ga.nextChild(oi<0?hi.children.length-1:0,oi,si,ii)}}}if(ai&IterMode.IncludeAnonymous||!li.type.isAnonymous||(li.index>=0?ws=li.index+oi:ws=oi<0?-1:li._parent._tree.children.length,li=li._parent,!li))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(ws){return this.nextChild(0,1,ws,2)}childBefore(ws){return this.nextChild(this._tree.children.length-1,-1,ws,-2)}enter(ws,oi,si=0){let ii;if(!(si&IterMode.IgnoreOverlays)&&(ii=MountedTree.get(this._tree))&&ii.overlay){let ai=ws-this.from;for(let{from:li,to:ci}of ii.overlay)if((oi>0?li<=ai:li<ai)&&(oi<0?ci>=ai:ci>ai))return new TreeNode(ii.tree,ii.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,ws,oi,si)}nextSignificantParent(){let ws=this;for(;ws.type.isAnonymous&&ws._parent;)ws=ws._parent;return ws}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function getChildren(Ws,ws,oi,si){let ii=Ws.cursor(),ai=[];if(!ii.firstChild())return ai;if(oi!=null){for(let li=!1;!li;)if(li=ii.type.is(oi),!ii.nextSibling())return ai}for(;;){if(si!=null&&ii.type.is(si))return ai;if(ii.type.is(ws)&&ai.push(ii.node),!ii.nextSibling())return si==null?ai:[]}}function matchNodeContext(Ws,ws,oi=ws.length-1){for(let si=Ws;oi>=0;si=si.parent){if(!si)return!1;if(!si.type.isAnonymous){if(ws[oi]&&ws[oi]!=si.name)return!1;oi--}}return!0}class BufferContext{constructor(ws,oi,si,ii){this.parent=ws,this.buffer=oi,this.index=si,this.start=ii}}class BufferNode extends BaseNode{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(ws,oi,si){super(),this.context=ws,this._parent=oi,this.index=si,this.type=ws.buffer.set.types[ws.buffer.buffer[si]]}child(ws,oi,si){let{buffer:ii}=this.context,ai=ii.findChild(this.index+4,ii.buffer[this.index+3],ws,oi-this.context.start,si);return ai<0?null:new BufferNode(this.context,this,ai)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(ws){return this.child(1,ws,2)}childBefore(ws){return this.child(-1,ws,-2)}enter(ws,oi,si=0){if(si&IterMode.ExcludeBuffers)return null;let{buffer:ii}=this.context,ai=ii.findChild(this.index+4,ii.buffer[this.index+3],oi>0?1:-1,ws-this.context.start,oi);return ai<0?null:new BufferNode(this.context,this,ai)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(ws){return this._parent?null:this.context.parent.nextChild(this.context.index+ws,ws,0,4)}get nextSibling(){let{buffer:ws}=this.context,oi=ws.buffer[this.index+3];return oi<(this._parent?ws.buffer[this._parent.index+3]:ws.buffer.length)?new BufferNode(this.context,this._parent,oi):this.externalSibling(1)}get prevSibling(){let{buffer:ws}=this.context,oi=this._parent?this._parent.index+4:0;return this.index==oi?this.externalSibling(-1):new BufferNode(this.context,this._parent,ws.findChild(oi,this.index,-1,0,4))}get tree(){return null}toTree(){let ws=[],oi=[],{buffer:si}=this.context,ii=this.index+4,ai=si.buffer[this.index+3];if(ai>ii){let li=si.buffer[this.index+1];ws.push(si.slice(ii,ai,li)),oi.push(0)}return new Tree(this.type,ws,oi,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function iterStack(Ws){if(!Ws.length)return null;let ws=0,oi=Ws[0];for(let ai=1;ai<Ws.length;ai++){let li=Ws[ai];(li.from>oi.from||li.to<oi.to)&&(oi=li,ws=ai)}let si=oi instanceof TreeNode&&oi.index<0?null:oi.parent,ii=Ws.slice();return si?ii[ws]=si:ii.splice(ws,1),new StackIterator(ii,oi)}class StackIterator{constructor(ws,oi){this.heads=ws,this.node=oi}get next(){return iterStack(this.heads)}}function stackIterator(Ws,ws,oi){let si=Ws.resolveInner(ws,oi),ii=null;for(let ai=si instanceof TreeNode?si:si.context.parent;ai;ai=ai.parent)if(ai.index<0){let li=ai.parent;(ii||(ii=[si])).push(li.resolve(ws,oi)),ai=li}else{let li=MountedTree.get(ai.tree);if(li&&li.overlay&&li.overlay[0].from<=ws&&li.overlay[li.overlay.length-1].to>=ws){let ci=new TreeNode(li.tree,li.overlay[0].from+ai.from,-1,ai);(ii||(ii=[si])).push(resolveNode(ci,ws,oi,!1))}}return ii?iterStack(ii):si}class TreeCursor{get name(){return this.type.name}constructor(ws,oi=0){if(this.mode=oi,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,ws instanceof TreeNode)this.yieldNode(ws);else{this._tree=ws.context.parent,this.buffer=ws.context;for(let si=ws._parent;si;si=si._parent)this.stack.unshift(si.index);this.bufferNode=ws,this.yieldBuf(ws.index)}}yieldNode(ws){return ws?(this._tree=ws,this.type=ws.type,this.from=ws.from,this.to=ws.to,!0):!1}yieldBuf(ws,oi){this.index=ws;let{start:si,buffer:ii}=this.buffer;return this.type=oi||ii.set.types[ii.buffer[ws]],this.from=si+ii.buffer[ws+1],this.to=si+ii.buffer[ws+2],!0}yield(ws){return ws?ws instanceof TreeNode?(this.buffer=null,this.yieldNode(ws)):(this.buffer=ws.context,this.yieldBuf(ws.index,ws.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(ws,oi,si){if(!this.buffer)return this.yield(this._tree.nextChild(ws<0?this._tree._tree.children.length-1:0,ws,oi,si,this.mode));let{buffer:ii}=this.buffer,ai=ii.findChild(this.index+4,ii.buffer[this.index+3],ws,oi-this.buffer.start,si);return ai<0?!1:(this.stack.push(this.index),this.yieldBuf(ai))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(ws){return this.enterChild(1,ws,2)}childBefore(ws){return this.enterChild(-1,ws,-2)}enter(ws,oi,si=this.mode){return this.buffer?si&IterMode.ExcludeBuffers?!1:this.enterChild(1,ws,oi):this.yield(this._tree.enter(ws,oi,si))}parent(){if(!this.buffer)return this.yieldNode(this.mode&IterMode.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let ws=this.mode&IterMode.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(ws)}sibling(ws){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+ws,ws,0,4,this.mode)):!1;let{buffer:oi}=this.buffer,si=this.stack.length-1;if(ws<0){let ii=si<0?0:this.stack[si]+4;if(this.index!=ii)return this.yieldBuf(oi.findChild(ii,this.index,-1,0,4))}else{let ii=oi.buffer[this.index+3];if(ii<(si<0?oi.buffer.length:oi.buffer[this.stack[si]+3]))return this.yieldBuf(ii)}return si<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+ws,ws,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(ws){let oi,si,{buffer:ii}=this;if(ii){if(ws>0){if(this.index<ii.buffer.buffer.length)return!1}else for(let ai=0;ai<this.index;ai++)if(ii.buffer.buffer[ai+3]<this.index)return!1;({index:oi,parent:si}=ii)}else({index:oi,_parent:si}=this._tree);for(;si;{index:oi,_parent:si}=si)if(oi>-1)for(let ai=oi+ws,li=ws<0?-1:si._tree.children.length;ai!=li;ai+=ws){let ci=si._tree.children[ai];if(this.mode&IterMode.IncludeAnonymous||ci instanceof TreeBuffer||!ci.type.isAnonymous||hasChild(ci))return!1}return!0}move(ws,oi){if(oi&&this.enterChild(ws,0,4))return!0;for(;;){if(this.sibling(ws))return!0;if(this.atLastNode(ws)||!this.parent())return!1}}next(ws=!0){return this.move(1,ws)}prev(ws=!0){return this.move(-1,ws)}moveTo(ws,oi=0){for(;(this.from==this.to||(oi<1?this.from>=ws:this.from>ws)||(oi>-1?this.to<=ws:this.to<ws))&&this.parent(););for(;this.enterChild(1,ws,oi););return this}get node(){if(!this.buffer)return this._tree;let ws=this.bufferNode,oi=null,si=0;if(ws&&ws.context==this.buffer)e:for(let ii=this.index,ai=this.stack.length;ai>=0;){for(let li=ws;li;li=li._parent)if(li.index==ii){if(ii==this.index)return li;oi=li,si=ai+1;break e}ii=this.stack[--ai]}for(let ii=si;ii<this.stack.length;ii++)oi=new BufferNode(this.buffer,oi,this.stack[ii]);return this.bufferNode=new BufferNode(this.buffer,oi,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(ws,oi){for(let si=0;;){let ii=!1;if(this.type.isAnonymous||ws(this)!==!1){if(this.firstChild()){si++;continue}this.type.isAnonymous||(ii=!0)}for(;;){if(ii&&oi&&oi(this),ii=this.type.isAnonymous,!si)return;if(this.nextSibling())break;this.parent(),si--,ii=!0}}}matchContext(ws){if(!this.buffer)return matchNodeContext(this.node.parent,ws);let{buffer:oi}=this.buffer,{types:si}=oi.set;for(let ii=ws.length-1,ai=this.stack.length-1;ii>=0;ai--){if(ai<0)return matchNodeContext(this._tree,ws,ii);let li=si[oi.buffer[this.stack[ai]]];if(!li.isAnonymous){if(ws[ii]&&ws[ii]!=li.name)return!1;ii--}}return!0}}function hasChild(Ws){return Ws.children.some(ws=>ws instanceof TreeBuffer||!ws.type.isAnonymous||hasChild(ws))}function buildTree(Ws){var ws;let{buffer:oi,nodeSet:si,maxBufferLength:ii=DefaultBufferLength,reused:ai=[],minRepeatType:li=si.types.length}=Ws,ci=Array.isArray(oi)?new FlatBufferCursor(oi,oi.length):oi,ui=si.types,di=0,hi=0;function pi(gd,Ed,Od,Nd,Pd,Ld){let{id:rf,start:kd,end:Md,size:Td}=ci,wd=hi,Cd=di;for(;Td<0;)if(ci.next(),Td==-1){let hf=ai[rf];Od.push(hf),Nd.push(kd-gd);return}else if(Td==-3){di=rf;return}else if(Td==-4){hi=rf;return}else throw new RangeError(`Unrecognized record size: ${Td}`);let sf=ui[rf],of,Wd,df=kd-gd;if(Md-kd<=ii&&(Wd=wa(ci.pos-Ed,Pd))){let hf=new Uint16Array(Wd.size-Wd.skip),xd=ci.pos-Wd.size,Fd=hf.length;for(;ci.pos>xd;)Fd=xa(Wd.start,hf,Fd);of=new TreeBuffer(hf,Md-Wd.start,si),df=Wd.start-gd}else{let hf=ci.pos-Td;ci.next();let xd=[],Fd=[],Vd=rf>=li?rf:-1,af=0,ff=Md;for(;ci.pos>hf;)Vd>=0&&ci.id==Vd&&ci.size>=0?(ci.end<=ff-ii&&(va(xd,Fd,kd,af,ci.end,ff,Vd,wd,Cd),af=xd.length,ff=ci.end),ci.next()):Ld>2500?ha(kd,hf,xd,Fd):pi(kd,hf,xd,Fd,Vd,Ld+1);if(Vd>=0&&af>0&&af<xd.length&&va(xd,Fd,kd,af,kd,ff,Vd,wd,Cd),xd.reverse(),Fd.reverse(),Vd>-1&&af>0){let uf=ga(sf,Cd);of=balanceRange(sf,xd,Fd,0,xd.length,0,Md-kd,uf,uf)}else of=ba(sf,xd,Fd,Md-kd,wd-Md,Cd)}Od.push(of),Nd.push(df)}function ha(gd,Ed,Od,Nd){let Pd=[],Ld=0,rf=-1;for(;ci.pos>Ed;){let{id:kd,start:Md,end:Td,size:wd}=ci;if(wd>4)ci.next();else{if(rf>-1&&Md<rf)break;rf<0&&(rf=Td-ii),Pd.push(kd,Md,Td),Ld++,ci.next()}}if(Ld){let kd=new Uint16Array(Ld*4),Md=Pd[Pd.length-2];for(let Td=Pd.length-3,wd=0;Td>=0;Td-=3)kd[wd++]=Pd[Td],kd[wd++]=Pd[Td+1]-Md,kd[wd++]=Pd[Td+2]-Md,kd[wd++]=wd;Od.push(new TreeBuffer(kd,Pd[2]-Md,si)),Nd.push(Md-gd)}}function ga(gd,Ed){return(Od,Nd,Pd)=>{let Ld=0,rf=Od.length-1,kd,Md;if(rf>=0&&(kd=Od[rf])instanceof Tree){if(!rf&&kd.type==gd&&kd.length==Pd)return kd;(Md=kd.prop(NodeProp.lookAhead))&&(Ld=Nd[rf]+kd.length+Md)}return ba(gd,Od,Nd,Pd,Ld,Ed)}}function va(gd,Ed,Od,Nd,Pd,Ld,rf,kd,Md){let Td=[],wd=[];for(;gd.length>Nd;)Td.push(gd.pop()),wd.push(Ed.pop()+Od-Pd);gd.push(ba(si.types[rf],Td,wd,Ld-Pd,kd-Ld,Md)),Ed.push(Pd-Od)}function ba(gd,Ed,Od,Nd,Pd,Ld,rf){if(Ld){let kd=[NodeProp.contextHash,Ld];rf=rf?[kd].concat(rf):[kd]}if(Pd>25){let kd=[NodeProp.lookAhead,Pd];rf=rf?[kd].concat(rf):[kd]}return new Tree(gd,Ed,Od,Nd,rf)}function wa(gd,Ed){let Od=ci.fork(),Nd=0,Pd=0,Ld=0,rf=Od.end-ii,kd={size:0,start:0,skip:0};e:for(let Md=Od.pos-gd;Od.pos>Md;){let Td=Od.size;if(Od.id==Ed&&Td>=0){kd.size=Nd,kd.start=Pd,kd.skip=Ld,Ld+=4,Nd+=4,Od.next();continue}let wd=Od.pos-Td;if(Td<0||wd<Md||Od.start<rf)break;let Cd=Od.id>=li?4:0,sf=Od.start;for(Od.next();Od.pos>wd;){if(Od.size<0)if(Od.size==-3)Cd+=4;else break e;else Od.id>=li&&(Cd+=4);Od.next()}Pd=sf,Nd+=Td,Ld+=Cd}return(Ed<0||Nd==gd)&&(kd.size=Nd,kd.start=Pd,kd.skip=Ld),kd.size>4?kd:void 0}function xa(gd,Ed,Od){let{id:Nd,start:Pd,end:Ld,size:rf}=ci;if(ci.next(),rf>=0&&Nd<li){let kd=Od;if(rf>4){let Md=ci.pos-(rf-4);for(;ci.pos>Md;)Od=xa(gd,Ed,Od)}Ed[--Od]=kd,Ed[--Od]=Ld-gd,Ed[--Od]=Pd-gd,Ed[--Od]=Nd}else rf==-3?di=Nd:rf==-4&&(hi=Nd);return Od}let Ca=[],el=[];for(;ci.pos>0;)pi(Ws.start||0,Ws.bufferStart||0,Ca,el,-1,0);let ku=(ws=Ws.length)!==null&&ws!==void 0?ws:Ca.length?el[0]+Ca[0].length:0;return new Tree(ui[Ws.topID],Ca.reverse(),el.reverse(),ku)}const nodeSizeCache=new WeakMap;function nodeSize(Ws,ws){if(!Ws.isAnonymous||ws instanceof TreeBuffer||ws.type!=Ws)return 1;let oi=nodeSizeCache.get(ws);if(oi==null){oi=1;for(let si of ws.children){if(si.type!=Ws||!(si instanceof Tree)){oi=1;break}oi+=nodeSize(Ws,si)}nodeSizeCache.set(ws,oi)}return oi}function balanceRange(Ws,ws,oi,si,ii,ai,li,ci,ui){let di=0;for(let va=si;va<ii;va++)di+=nodeSize(Ws,ws[va]);let hi=Math.ceil(di*1.5/8),pi=[],ha=[];function ga(va,ba,wa,xa,Ca){for(let el=wa;el<xa;){let ku=el,gd=ba[el],Ed=nodeSize(Ws,va[el]);for(el++;el<xa;el++){let Od=nodeSize(Ws,va[el]);if(Ed+Od>=hi)break;Ed+=Od}if(el==ku+1){if(Ed>hi){let Od=va[ku];ga(Od.children,Od.positions,0,Od.children.length,ba[ku]+Ca);continue}pi.push(va[ku])}else{let Od=ba[el-1]+va[el-1].length-gd;pi.push(balanceRange(Ws,va,ba,ku,el,gd,Od,null,ui))}ha.push(gd+Ca-ai)}}return ga(ws,oi,si,ii,0),(ci||ui)(pi,ha,li)}class TreeFragment{constructor(ws,oi,si,ii,ai=!1,li=!1){this.from=ws,this.to=oi,this.tree=si,this.offset=ii,this.open=(ai?1:0)|(li?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(ws,oi=[],si=!1){let ii=[new TreeFragment(0,ws.length,ws,0,!1,si)];for(let ai of oi)ai.to>ws.length&&ii.push(ai);return ii}static applyChanges(ws,oi,si=128){if(!oi.length)return ws;let ii=[],ai=1,li=ws.length?ws[0]:null;for(let ci=0,ui=0,di=0;;ci++){let hi=ci<oi.length?oi[ci]:null,pi=hi?hi.fromA:1e9;if(pi-ui>=si)for(;li&&li.from<pi;){let ha=li;if(ui>=ha.from||pi<=ha.to||di){let ga=Math.max(ha.from,ui)-di,va=Math.min(ha.to,pi)-di;ha=ga>=va?null:new TreeFragment(ga,va,ha.tree,ha.offset+di,ci>0,!!hi)}if(ha&&ii.push(ha),li.to>pi)break;li=ai<ws.length?ws[ai++]:null}if(!hi)break;ui=hi.toA,di=hi.toA-hi.toB}return ii}}class Parser{startParse(ws,oi,si){return typeof ws=="string"&&(ws=new StringInput(ws)),si=si?si.length?si.map(ii=>new Range$2(ii.from,ii.to)):[new Range$2(0,0)]:[new Range$2(0,ws.length)],this.createParse(ws,oi||[],si)}parse(ws,oi,si){let ii=this.startParse(ws,oi,si);for(;;){let ai=ii.advance();if(ai)return ai}}}class StringInput{constructor(ws){this.string=ws}get length(){return this.string.length}chunk(ws){return this.string.slice(ws)}get lineChunks(){return!1}read(ws,oi){return this.string.slice(ws,oi)}}new NodeProp({perNode:!0});let nextTagID=0;class Tag{constructor(ws,oi,si,ii){this.name=ws,this.set=oi,this.base=si,this.modified=ii,this.id=nextTagID++}toString(){let{name:ws}=this;for(let oi of this.modified)oi.name&&(ws=`${oi.name}(${ws})`);return ws}static define(ws,oi){let si=typeof ws=="string"?ws:"?";if(ws instanceof Tag&&(oi=ws),oi!=null&&oi.base)throw new Error("Can not derive from a modified tag");let ii=new Tag(si,[],null,[]);if(ii.set.push(ii),oi)for(let ai of oi.set)ii.set.push(ai);return ii}static defineModifier(ws){let oi=new Modifier(ws);return si=>si.modified.indexOf(oi)>-1?si:Modifier.get(si.base||si,si.modified.concat(oi).sort((ii,ai)=>ii.id-ai.id))}}let nextModifierID=0;class Modifier{constructor(ws){this.name=ws,this.instances=[],this.id=nextModifierID++}static get(ws,oi){if(!oi.length)return ws;let si=oi[0].instances.find(ci=>ci.base==ws&&sameArray(oi,ci.modified));if(si)return si;let ii=[],ai=new Tag(ws.name,ii,ws,oi);for(let ci of oi)ci.instances.push(ai);let li=powerSet(oi);for(let ci of ws.set)if(!ci.modified.length)for(let ui of li)ii.push(Modifier.get(ci,ui));return ai}}function sameArray(Ws,ws){return Ws.length==ws.length&&Ws.every((oi,si)=>oi==ws[si])}function powerSet(Ws){let ws=[[]];for(let oi=0;oi<Ws.length;oi++)for(let si=0,ii=ws.length;si<ii;si++)ws.push(ws[si].concat(Ws[oi]));return ws.sort((oi,si)=>si.length-oi.length)}function styleTags(Ws){let ws=Object.create(null);for(let oi in Ws){let si=Ws[oi];Array.isArray(si)||(si=[si]);for(let ii of oi.split(" "))if(ii){let ai=[],li=2,ci=ii;for(let pi=0;;){if(ci=="..."&&pi>0&&pi+3==ii.length){li=1;break}let ha=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(ci);if(!ha)throw new RangeError("Invalid path: "+ii);if(ai.push(ha[0]=="*"?"":ha[0][0]=='"'?JSON.parse(ha[0]):ha[0]),pi+=ha[0].length,pi==ii.length)break;let ga=ii[pi++];if(pi==ii.length&&ga=="!"){li=0;break}if(ga!="/")throw new RangeError("Invalid path: "+ii);ci=ii.slice(pi)}let ui=ai.length-1,di=ai[ui];if(!di)throw new RangeError("Invalid path: "+ii);let hi=new Rule(si,li,ui>0?ai.slice(0,ui):null);ws[di]=hi.sort(ws[di])}}return ruleNodeProp.add(ws)}const ruleNodeProp=new NodeProp;class Rule{constructor(ws,oi,si,ii){this.tags=ws,this.mode=oi,this.context=si,this.next=ii}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(ws){return!ws||ws.depth<this.depth?(this.next=ws,this):(ws.next=this.sort(ws.next),ws)}get depth(){return this.context?this.context.length:0}}Rule.empty=new Rule([],2,null);function tagHighlighter(Ws,ws){let oi=Object.create(null);for(let ai of Ws)if(!Array.isArray(ai.tag))oi[ai.tag.id]=ai.class;else for(let li of ai.tag)oi[li.id]=ai.class;let{scope:si,all:ii=null}=ws||{};return{style:ai=>{let li=ii;for(let ci of ai)for(let ui of ci.set){let di=oi[ui.id];if(di){li=li?li+" "+di:di;break}}return li},scope:si}}function highlightTags(Ws,ws){let oi=null;for(let si of Ws){let ii=si.style(ws);ii&&(oi=oi?oi+" "+ii:ii)}return oi}function highlightTree(Ws,ws,oi,si=0,ii=Ws.length){let ai=new HighlightBuilder(si,Array.isArray(ws)?ws:[ws],oi);ai.highlightRange(Ws.cursor(),si,ii,"",ai.highlighters),ai.flush(ii)}class HighlightBuilder{constructor(ws,oi,si){this.at=ws,this.highlighters=oi,this.span=si,this.class=""}startSpan(ws,oi){oi!=this.class&&(this.flush(ws),ws>this.at&&(this.at=ws),this.class=oi)}flush(ws){ws>this.at&&this.class&&this.span(this.at,ws,this.class)}highlightRange(ws,oi,si,ii,ai){let{type:li,from:ci,to:ui}=ws;if(ci>=si||ui<=oi)return;li.isTop&&(ai=this.highlighters.filter(ga=>!ga.scope||ga.scope(li)));let di=ii,hi=getStyleTags(ws)||Rule.empty,pi=highlightTags(ai,hi.tags);if(pi&&(di&&(di+=" "),di+=pi,hi.mode==1&&(ii+=(ii?" ":"")+pi)),this.startSpan(Math.max(oi,ci),di),hi.opaque)return;let ha=ws.tree&&ws.tree.prop(NodeProp.mounted);if(ha&&ha.overlay){let ga=ws.node.enter(ha.overlay[0].from+ci,1),va=this.highlighters.filter(wa=>!wa.scope||wa.scope(ha.tree.type)),ba=ws.firstChild();for(let wa=0,xa=ci;;wa++){let Ca=wa<ha.overlay.length?ha.overlay[wa]:null,el=Ca?Ca.from+ci:ui,ku=Math.max(oi,xa),gd=Math.min(si,el);if(ku<gd&&ba)for(;ws.from<gd&&(this.highlightRange(ws,ku,gd,ii,ai),this.startSpan(Math.min(gd,ws.to),di),!(ws.to>=el||!ws.nextSibling())););if(!Ca||el>si)break;xa=Ca.to+ci,xa>oi&&(this.highlightRange(ga.cursor(),Math.max(oi,Ca.from+ci),Math.min(si,xa),"",va),this.startSpan(Math.min(si,xa),di))}ba&&ws.parent()}else if(ws.firstChild()){ha&&(ii="");do if(!(ws.to<=oi)){if(ws.from>=si)break;this.highlightRange(ws,oi,si,ii,ai),this.startSpan(Math.min(si,ws.to),di)}while(ws.nextSibling());ws.parent()}}}function getStyleTags(Ws){let ws=Ws.type.prop(ruleNodeProp);for(;ws&&ws.context&&!Ws.matchContext(ws.context);)ws=ws.next;return ws||null}const t$1=Tag.define,comment=t$1(),name$1=t$1(),typeName=t$1(name$1),propertyName=t$1(name$1),literal=t$1(),string=t$1(literal),number=t$1(literal),content=t$1(),heading=t$1(content),keyword=t$1(),operator=t$1(),punctuation=t$1(),bracket=t$1(punctuation),meta=t$1(),tags={comment,lineComment:t$1(comment),blockComment:t$1(comment),docComment:t$1(comment),name:name$1,variableName:t$1(name$1),typeName,tagName:t$1(typeName),propertyName,attributeName:t$1(propertyName),className:t$1(name$1),labelName:t$1(name$1),namespace:t$1(name$1),macroName:t$1(name$1),literal,string,docString:t$1(string),character:t$1(string),attributeValue:t$1(string),number,integer:t$1(number),float:t$1(number),bool:t$1(literal),regexp:t$1(literal),escape:t$1(literal),color:t$1(literal),url:t$1(literal),keyword,self:t$1(keyword),null:t$1(keyword),atom:t$1(keyword),unit:t$1(keyword),modifier:t$1(keyword),operatorKeyword:t$1(keyword),controlKeyword:t$1(keyword),definitionKeyword:t$1(keyword),moduleKeyword:t$1(keyword),operator,derefOperator:t$1(operator),arithmeticOperator:t$1(operator),logicOperator:t$1(operator),bitwiseOperator:t$1(operator),compareOperator:t$1(operator),updateOperator:t$1(operator),definitionOperator:t$1(operator),typeOperator:t$1(operator),controlOperator:t$1(operator),punctuation,separator:t$1(punctuation),bracket,angleBracket:t$1(bracket),squareBracket:t$1(bracket),paren:t$1(bracket),brace:t$1(bracket),content,heading,heading1:t$1(heading),heading2:t$1(heading),heading3:t$1(heading),heading4:t$1(heading),heading5:t$1(heading),heading6:t$1(heading),contentSeparator:t$1(content),list:t$1(content),quote:t$1(content),emphasis:t$1(content),strong:t$1(content),link:t$1(content),monospace:t$1(content),strikethrough:t$1(content),inserted:t$1(),deleted:t$1(),changed:t$1(),invalid:t$1(),meta,documentMeta:t$1(meta),annotation:t$1(meta),processingInstruction:t$1(meta),definition:Tag.defineModifier("definition"),constant:Tag.defineModifier("constant"),function:Tag.defineModifier("function"),standard:Tag.defineModifier("standard"),local:Tag.defineModifier("local"),special:Tag.defineModifier("special")};for(let Ws in tags){let ws=tags[Ws];ws instanceof Tag&&(ws.name=Ws)}tagHighlighter([{tag:tags.link,class:"tok-link"},{tag:tags.heading,class:"tok-heading"},{tag:tags.emphasis,class:"tok-emphasis"},{tag:tags.strong,class:"tok-strong"},{tag:tags.keyword,class:"tok-keyword"},{tag:tags.atom,class:"tok-atom"},{tag:tags.bool,class:"tok-bool"},{tag:tags.url,class:"tok-url"},{tag:tags.labelName,class:"tok-labelName"},{tag:tags.inserted,class:"tok-inserted"},{tag:tags.deleted,class:"tok-deleted"},{tag:tags.literal,class:"tok-literal"},{tag:tags.string,class:"tok-string"},{tag:tags.number,class:"tok-number"},{tag:[tags.regexp,tags.escape,tags.special(tags.string)],class:"tok-string2"},{tag:tags.variableName,class:"tok-variableName"},{tag:tags.local(tags.variableName),class:"tok-variableName tok-local"},{tag:tags.definition(tags.variableName),class:"tok-variableName tok-definition"},{tag:tags.special(tags.variableName),class:"tok-variableName2"},{tag:tags.definition(tags.propertyName),class:"tok-propertyName tok-definition"},{tag:tags.typeName,class:"tok-typeName"},{tag:tags.namespace,class:"tok-namespace"},{tag:tags.className,class:"tok-className"},{tag:tags.macroName,class:"tok-macroName"},{tag:tags.propertyName,class:"tok-propertyName"},{tag:tags.operator,class:"tok-operator"},{tag:tags.comment,class:"tok-comment"},{tag:tags.meta,class:"tok-meta"},{tag:tags.invalid,class:"tok-invalid"},{tag:tags.punctuation,class:"tok-punctuation"}]);var _a;const languageDataProp=new NodeProp;function defineLanguageFacet(Ws){return Facet.define({combine:Ws?ws=>ws.concat(Ws):void 0})}const sublanguageProp=new NodeProp;class Language{constructor(ws,oi,si=[],ii=""){this.data=ws,this.name=ii,EditorState.prototype.hasOwnProperty("tree")||Object.defineProperty(EditorState.prototype,"tree",{get(){return syntaxTree(this)}}),this.parser=oi,this.extension=[language.of(this),EditorState.languageData.of((ai,li,ci)=>{let ui=topNodeAt(ai,li,ci),di=ui.type.prop(languageDataProp);if(!di)return[];let hi=ai.facet(di),pi=ui.type.prop(sublanguageProp);if(pi){let ha=ui.resolve(li-ui.from,ci);for(let ga of pi)if(ga.test(ha,ai)){let va=ai.facet(ga.facet);return ga.type=="replace"?va:va.concat(hi)}}return hi})].concat(si)}isActiveAt(ws,oi,si=-1){return topNodeAt(ws,oi,si).type.prop(languageDataProp)==this.data}findRegions(ws){let oi=ws.facet(language);if((oi==null?void 0:oi.data)==this.data)return[{from:0,to:ws.doc.length}];if(!oi||!oi.allowsNesting)return[];let si=[],ii=(ai,li)=>{if(ai.prop(languageDataProp)==this.data){si.push({from:li,to:li+ai.length});return}let ci=ai.prop(NodeProp.mounted);if(ci){if(ci.tree.prop(languageDataProp)==this.data){if(ci.overlay)for(let ui of ci.overlay)si.push({from:ui.from+li,to:ui.to+li});else si.push({from:li,to:li+ai.length});return}else if(ci.overlay){let ui=si.length;if(ii(ci.tree,ci.overlay[0].from+li),si.length>ui)return}}for(let ui=0;ui<ai.children.length;ui++){let di=ai.children[ui];di instanceof Tree&&ii(di,ai.positions[ui]+li)}};return ii(syntaxTree(ws),0),si}get allowsNesting(){return!0}}Language.setState=StateEffect.define();function topNodeAt(Ws,ws,oi){let si=Ws.facet(language),ii=syntaxTree(Ws).topNode;if(!si||si.allowsNesting)for(let ai=ii;ai;ai=ai.enter(ws,oi,IterMode.ExcludeBuffers))ai.type.isTop&&(ii=ai);return ii}class LRLanguage extends Language{constructor(ws,oi,si){super(ws,oi,[],si),this.parser=oi}static define(ws){let oi=defineLanguageFacet(ws.languageData);return new LRLanguage(oi,ws.parser.configure({props:[languageDataProp.add(si=>si.isTop?oi:void 0)]}),ws.name)}configure(ws,oi){return new LRLanguage(this.data,this.parser.configure(ws),oi||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function syntaxTree(Ws){let ws=Ws.field(Language.state,!1);return ws?ws.tree:Tree.empty}class DocInput{constructor(ws){this.doc=ws,this.cursorPos=0,this.string="",this.cursor=ws.iter()}get length(){return this.doc.length}syncTo(ws){return this.string=this.cursor.next(ws-this.cursorPos).value,this.cursorPos=ws+this.string.length,this.cursorPos-this.string.length}chunk(ws){return this.syncTo(ws),this.string}get lineChunks(){return!0}read(ws,oi){let si=this.cursorPos-this.string.length;return ws<si||oi>=this.cursorPos?this.doc.sliceString(ws,oi):this.string.slice(ws-si,oi-si)}}let currentContext=null;class ParseContext{constructor(ws,oi,si=[],ii,ai,li,ci,ui){this.parser=ws,this.state=oi,this.fragments=si,this.tree=ii,this.treeLen=ai,this.viewport=li,this.skipped=ci,this.scheduleOn=ui,this.parse=null,this.tempSkipped=[]}static create(ws,oi,si){return new ParseContext(ws,oi,[],Tree.empty,0,si,[],null)}startParse(){return this.parser.startParse(new DocInput(this.state.doc),this.fragments)}work(ws,oi){return oi!=null&&oi>=this.state.doc.length&&(oi=void 0),this.tree!=Tree.empty&&this.isDone(oi??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var si;if(typeof ws=="number"){let ii=Date.now()+ws;ws=()=>Date.now()>ii}for(this.parse||(this.parse=this.startParse()),oi!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>oi)&&oi<this.state.doc.length&&this.parse.stopAt(oi);;){let ii=this.parse.advance();if(ii)if(this.fragments=this.withoutTempSkipped(TreeFragment.addTree(ii,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(si=this.parse.stoppedAt)!==null&&si!==void 0?si:this.state.doc.length,this.tree=ii,this.parse=null,this.treeLen<(oi??this.state.doc.length))this.parse=this.startParse();else return!0;if(ws())return!1}})}takeTree(){let ws,oi;this.parse&&(ws=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>ws)&&this.parse.stopAt(ws),this.withContext(()=>{for(;!(oi=this.parse.advance()););}),this.treeLen=ws,this.tree=oi,this.fragments=this.withoutTempSkipped(TreeFragment.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(ws){let oi=currentContext;currentContext=this;try{return ws()}finally{currentContext=oi}}withoutTempSkipped(ws){for(let oi;oi=this.tempSkipped.pop();)ws=cutFragments(ws,oi.from,oi.to);return ws}changes(ws,oi){let{fragments:si,tree:ii,treeLen:ai,viewport:li,skipped:ci}=this;if(this.takeTree(),!ws.empty){let ui=[];if(ws.iterChangedRanges((di,hi,pi,ha)=>ui.push({fromA:di,toA:hi,fromB:pi,toB:ha})),si=TreeFragment.applyChanges(si,ui),ii=Tree.empty,ai=0,li={from:ws.mapPos(li.from,-1),to:ws.mapPos(li.to,1)},this.skipped.length){ci=[];for(let di of this.skipped){let hi=ws.mapPos(di.from,1),pi=ws.mapPos(di.to,-1);hi<pi&&ci.push({from:hi,to:pi})}}}return new ParseContext(this.parser,oi,si,ii,ai,li,ci,this.scheduleOn)}updateViewport(ws){if(this.viewport.from==ws.from&&this.viewport.to==ws.to)return!1;this.viewport=ws;let oi=this.skipped.length;for(let si=0;si<this.skipped.length;si++){let{from:ii,to:ai}=this.skipped[si];ii<ws.to&&ai>ws.from&&(this.fragments=cutFragments(this.fragments,ii,ai),this.skipped.splice(si--,1))}return this.skipped.length>=oi?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(ws,oi){this.skipped.push({from:ws,to:oi})}static getSkippingParser(ws){return new class extends Parser{createParse(oi,si,ii){let ai=ii[0].from,li=ii[ii.length-1].to;return{parsedPos:ai,advance(){let ci=currentContext;if(ci){for(let ui of ii)ci.tempSkipped.push(ui);ws&&(ci.scheduleOn=ci.scheduleOn?Promise.all([ci.scheduleOn,ws]):ws)}return this.parsedPos=li,new Tree(NodeType.none,[],[],li-ai)},stoppedAt:null,stopAt(){}}}}}isDone(ws){ws=Math.min(ws,this.state.doc.length);let oi=this.fragments;return this.treeLen>=ws&&oi.length&&oi[0].from==0&&oi[0].to>=ws}static get(){return currentContext}}function cutFragments(Ws,ws,oi){return TreeFragment.applyChanges(Ws,[{fromA:ws,toA:oi,fromB:ws,toB:oi}])}class LanguageState{constructor(ws){this.context=ws,this.tree=ws.tree}apply(ws){if(!ws.docChanged&&this.tree==this.context.tree)return this;let oi=this.context.changes(ws.changes,ws.state),si=this.context.treeLen==ws.startState.doc.length?void 0:Math.max(ws.changes.mapPos(this.context.treeLen),oi.viewport.to);return oi.work(20,si)||oi.takeTree(),new LanguageState(oi)}static init(ws){let oi=Math.min(3e3,ws.doc.length),si=ParseContext.create(ws.facet(language).parser,ws,{from:0,to:oi});return si.work(20,oi)||si.takeTree(),new LanguageState(si)}}Language.state=StateField.define({create:LanguageState.init,update(Ws,ws){for(let oi of ws.effects)if(oi.is(Language.setState))return oi.value;return ws.startState.facet(language)!=ws.state.facet(language)?LanguageState.init(ws.state):Ws.apply(ws)}});let requestIdle=Ws=>{let ws=setTimeout(()=>Ws(),500);return()=>clearTimeout(ws)};typeof requestIdleCallback<"u"&&(requestIdle=Ws=>{let ws=-1,oi=setTimeout(()=>{ws=requestIdleCallback(Ws,{timeout:400})},100);return()=>ws<0?clearTimeout(oi):cancelIdleCallback(ws)});const isInputPending=typeof navigator<"u"&&!((_a=navigator.scheduling)===null||_a===void 0)&&_a.isInputPending?()=>navigator.scheduling.isInputPending():null,parseWorker=ViewPlugin.fromClass(class{constructor(Ws){this.view=Ws,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(Ws){let ws=this.view.state.field(Language.state).context;(ws.updateViewport(Ws.view.viewport)||this.view.viewport.to>ws.treeLen)&&this.scheduleWork(),(Ws.docChanged||Ws.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(ws)}scheduleWork(){if(this.working)return;let{state:Ws}=this.view,ws=Ws.field(Language.state);(ws.tree!=ws.context.tree||!ws.context.isDone(Ws.doc.length))&&(this.working=requestIdle(this.work))}work(Ws){this.working=null;let ws=Date.now();if(this.chunkEnd<ws&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=ws+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:oi,viewport:{to:si}}=this.view,ii=oi.field(Language.state);if(ii.tree==ii.context.tree&&ii.context.isDone(si+1e5))return;let ai=Date.now()+Math.min(this.chunkBudget,100,Ws&&!isInputPending?Math.max(25,Ws.timeRemaining()-5):1e9),li=ii.context.treeLen<si&&oi.doc.length>si+1e3,ci=ii.context.work(()=>isInputPending&&isInputPending()||Date.now()>ai,si+(li?0:1e5));this.chunkBudget-=Date.now()-ws,(ci||this.chunkBudget<=0)&&(ii.context.takeTree(),this.view.dispatch({effects:Language.setState.of(new LanguageState(ii.context))})),this.chunkBudget>0&&!(ci&&!li)&&this.scheduleWork(),this.checkAsyncSchedule(ii.context)}checkAsyncSchedule(Ws){Ws.scheduleOn&&(this.workScheduled++,Ws.scheduleOn.then(()=>this.scheduleWork()).catch(ws=>logException(this.view.state,ws)).then(()=>this.workScheduled--),Ws.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),language=Facet.define({combine(Ws){return Ws.length?Ws[0]:null},enables:Ws=>[Language.state,parseWorker,EditorView.contentAttributes.compute([Ws],ws=>{let oi=ws.facet(Ws);return oi&&oi.name?{"data-language":oi.name}:{}})]});class LanguageSupport{constructor(ws,oi=[]){this.language=ws,this.support=oi,this.extension=[ws,oi]}}const indentService=Facet.define(),indentUnit=Facet.define({combine:Ws=>{if(!Ws.length)return" ";let ws=Ws[0];if(!ws||/\S/.test(ws)||Array.from(ws).some(oi=>oi!=ws[0]))throw new Error("Invalid indent unit: "+JSON.stringify(Ws[0]));return ws}});function getIndentUnit(Ws){let ws=Ws.facet(indentUnit);return ws.charCodeAt(0)==9?Ws.tabSize*ws.length:ws.length}function indentString(Ws,ws){let oi="",si=Ws.tabSize,ii=Ws.facet(indentUnit)[0];if(ii==" "){for(;ws>=si;)oi+=" ",ws-=si;ii=" "}for(let ai=0;ai<ws;ai++)oi+=ii;return oi}function getIndentation(Ws,ws){Ws instanceof EditorState&&(Ws=new IndentContext(Ws));for(let si of Ws.state.facet(indentService)){let ii=si(Ws,ws);if(ii!==void 0)return ii}let oi=syntaxTree(Ws.state);return oi.length>=ws?syntaxIndentation(Ws,oi,ws):null}class IndentContext{constructor(ws,oi={}){this.state=ws,this.options=oi,this.unit=getIndentUnit(ws)}lineAt(ws,oi=1){let si=this.state.doc.lineAt(ws),{simulateBreak:ii,simulateDoubleBreak:ai}=this.options;return ii!=null&&ii>=si.from&&ii<=si.to?ai&&ii==ws?{text:"",from:ws}:(oi<0?ii<ws:ii<=ws)?{text:si.text.slice(ii-si.from),from:ii}:{text:si.text.slice(0,ii-si.from),from:si.from}:si}textAfterPos(ws,oi=1){if(this.options.simulateDoubleBreak&&ws==this.options.simulateBreak)return"";let{text:si,from:ii}=this.lineAt(ws,oi);return si.slice(ws-ii,Math.min(si.length,ws+100-ii))}column(ws,oi=1){let{text:si,from:ii}=this.lineAt(ws,oi),ai=this.countColumn(si,ws-ii),li=this.options.overrideIndentation?this.options.overrideIndentation(ii):-1;return li>-1&&(ai+=li-this.countColumn(si,si.search(/\S|$/))),ai}countColumn(ws,oi=ws.length){return countColumn(ws,this.state.tabSize,oi)}lineIndent(ws,oi=1){let{text:si,from:ii}=this.lineAt(ws,oi),ai=this.options.overrideIndentation;if(ai){let li=ai(ii);if(li>-1)return li}return this.countColumn(si,si.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const indentNodeProp=new NodeProp;function syntaxIndentation(Ws,ws,oi){let si=ws.resolveStack(oi),ii=ws.resolveInner(oi,-1).resolve(oi,0).enterUnfinishedNodesBefore(oi);if(ii!=si.node){let ai=[];for(let li=ii;li&&!(li.from==si.node.from&&li.type==si.node.type);li=li.parent)ai.push(li);for(let li=ai.length-1;li>=0;li--)si={node:ai[li],next:si}}return indentFor(si,Ws,oi)}function indentFor(Ws,ws,oi){for(let si=Ws;si;si=si.next){let ii=indentStrategy(si.node);if(ii)return ii(TreeIndentContext.create(ws,oi,si))}return 0}function ignoreClosed(Ws){return Ws.pos==Ws.options.simulateBreak&&Ws.options.simulateDoubleBreak}function indentStrategy(Ws){let ws=Ws.type.prop(indentNodeProp);if(ws)return ws;let oi=Ws.firstChild,si;if(oi&&(si=oi.type.prop(NodeProp.closedBy))){let ii=Ws.lastChild,ai=ii&&si.indexOf(ii.name)>-1;return li=>delimitedStrategy(li,!0,1,void 0,ai&&!ignoreClosed(li)?ii.from:void 0)}return Ws.parent==null?topIndent:null}function topIndent(){return 0}class TreeIndentContext extends IndentContext{constructor(ws,oi,si){super(ws.state,ws.options),this.base=ws,this.pos=oi,this.context=si}get node(){return this.context.node}static create(ws,oi,si){return new TreeIndentContext(ws,oi,si)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(ws){let oi=this.state.doc.lineAt(ws.from);for(;;){let si=ws.resolve(oi.from);for(;si.parent&&si.parent.from==si.from;)si=si.parent;if(isParent(si,ws))break;oi=this.state.doc.lineAt(si.from)}return this.lineIndent(oi.from)}continue(){return indentFor(this.context.next,this.base,this.pos)}}function isParent(Ws,ws){for(let oi=ws;oi;oi=oi.parent)if(Ws==oi)return!0;return!1}function bracketedAligned(Ws){let ws=Ws.node,oi=ws.childAfter(ws.from),si=ws.lastChild;if(!oi)return null;let ii=Ws.options.simulateBreak,ai=Ws.state.doc.lineAt(oi.from),li=ii==null||ii<=ai.from?ai.to:Math.min(ai.to,ii);for(let ci=oi.to;;){let ui=ws.childAfter(ci);if(!ui||ui==si)return null;if(!ui.type.isSkipped){if(ui.from>=li)return null;let di=/^ */.exec(ai.text.slice(oi.to-ai.from))[0].length;return{from:oi.from,to:oi.to+di}}ci=ui.to}}function delimitedIndent({closing:Ws,align:ws=!0,units:oi=1}){return si=>delimitedStrategy(si,ws,oi,Ws)}function delimitedStrategy(Ws,ws,oi,si,ii){let ai=Ws.textAfter,li=ai.match(/^\s*/)[0].length,ci=si&&ai.slice(li,li+si.length)==si||ii==Ws.pos+li,ui=ws?bracketedAligned(Ws):null;return ui?ci?Ws.column(ui.from):Ws.column(ui.to):Ws.baseIndent+(ci?0:Ws.unit*oi)}function continuedIndent({except:Ws,units:ws=1}={}){return oi=>{let si=Ws&&Ws.test(oi.textAfter);return oi.baseIndent+(si?0:ws*oi.unit)}}const DontIndentBeyond=200;function indentOnInput(){return EditorState.transactionFilter.of(Ws=>{if(!Ws.docChanged||!Ws.isUserEvent("input.type")&&!Ws.isUserEvent("input.complete"))return Ws;let ws=Ws.startState.languageDataAt("indentOnInput",Ws.startState.selection.main.head);if(!ws.length)return Ws;let oi=Ws.newDoc,{head:si}=Ws.newSelection.main,ii=oi.lineAt(si);if(si>ii.from+DontIndentBeyond)return Ws;let ai=oi.sliceString(ii.from,si);if(!ws.some(di=>di.test(ai)))return Ws;let{state:li}=Ws,ci=-1,ui=[];for(let{head:di}of li.selection.ranges){let hi=li.doc.lineAt(di);if(hi.from==ci)continue;ci=hi.from;let pi=getIndentation(li,hi.from);if(pi==null)continue;let ha=/^\s*/.exec(hi.text)[0],ga=indentString(li,pi);ha!=ga&&ui.push({from:hi.from,to:hi.from+ha.length,insert:ga})}return ui.length?[Ws,{changes:ui,sequential:!0}]:Ws})}const foldService=Facet.define(),foldNodeProp=new NodeProp;function foldInside(Ws){let ws=Ws.firstChild,oi=Ws.lastChild;return ws&&ws.to<oi.from?{from:ws.to,to:oi.type.isError?Ws.to:oi.from}:null}function syntaxFolding(Ws,ws,oi){let si=syntaxTree(Ws);if(si.length<oi)return null;let ii=si.resolveStack(oi,1),ai=null;for(let li=ii;li;li=li.next){let ci=li.node;if(ci.to<=oi||ci.from>oi)continue;if(ai&&ci.from<ws)break;let ui=ci.type.prop(foldNodeProp);if(ui&&(ci.to<si.length-50||si.length==Ws.doc.length||!isUnfinished(ci))){let di=ui(ci,Ws);di&&di.from<=oi&&di.from>=ws&&di.to>oi&&(ai=di)}}return ai}function isUnfinished(Ws){let ws=Ws.lastChild;return ws&&ws.to==Ws.to&&ws.type.isError}function foldable(Ws,ws,oi){for(let si of Ws.facet(foldService)){let ii=si(Ws,ws,oi);if(ii)return ii}return syntaxFolding(Ws,ws,oi)}function mapRange(Ws,ws){let oi=ws.mapPos(Ws.from,1),si=ws.mapPos(Ws.to,-1);return oi>=si?void 0:{from:oi,to:si}}const foldEffect=StateEffect.define({map:mapRange}),unfoldEffect=StateEffect.define({map:mapRange});function selectedLines(Ws){let ws=[];for(let{head:oi}of Ws.state.selection.ranges)ws.some(si=>si.from<=oi&&si.to>=oi)||ws.push(Ws.lineBlockAt(oi));return ws}const foldState=StateField.define({create(){return Decoration.none},update(Ws,ws){Ws=Ws.map(ws.changes);for(let oi of ws.effects)if(oi.is(foldEffect)&&!foldExists(Ws,oi.value.from,oi.value.to)){let{preparePlaceholder:si}=ws.state.facet(foldConfig),ii=si?Decoration.replace({widget:new PreparedFoldWidget(si(ws.state,oi.value))}):foldWidget;Ws=Ws.update({add:[ii.range(oi.value.from,oi.value.to)]})}else oi.is(unfoldEffect)&&(Ws=Ws.update({filter:(si,ii)=>oi.value.from!=si||oi.value.to!=ii,filterFrom:oi.value.from,filterTo:oi.value.to}));if(ws.selection){let oi=!1,{head:si}=ws.selection.main;Ws.between(si,si,(ii,ai)=>{ii<si&&ai>si&&(oi=!0)}),oi&&(Ws=Ws.update({filterFrom:si,filterTo:si,filter:(ii,ai)=>ai<=si||ii>=si}))}return Ws},provide:Ws=>EditorView.decorations.from(Ws),toJSON(Ws,ws){let oi=[];return Ws.between(0,ws.doc.length,(si,ii)=>{oi.push(si,ii)}),oi},fromJSON(Ws){if(!Array.isArray(Ws)||Ws.length%2)throw new RangeError("Invalid JSON for fold state");let ws=[];for(let oi=0;oi<Ws.length;){let si=Ws[oi++],ii=Ws[oi++];if(typeof si!="number"||typeof ii!="number")throw new RangeError("Invalid JSON for fold state");ws.push(foldWidget.range(si,ii))}return Decoration.set(ws,!0)}});function findFold(Ws,ws,oi){var si;let ii=null;return(si=Ws.field(foldState,!1))===null||si===void 0||si.between(ws,oi,(ai,li)=>{(!ii||ii.from>ai)&&(ii={from:ai,to:li})}),ii}function foldExists(Ws,ws,oi){let si=!1;return Ws.between(ws,ws,(ii,ai)=>{ii==ws&&ai==oi&&(si=!0)}),si}function maybeEnable(Ws,ws){return Ws.field(foldState,!1)?ws:ws.concat(StateEffect.appendConfig.of(codeFolding()))}const foldCode=Ws=>{for(let ws of selectedLines(Ws)){let oi=foldable(Ws.state,ws.from,ws.to);if(oi)return Ws.dispatch({effects:maybeEnable(Ws.state,[foldEffect.of(oi),announceFold(Ws,oi)])}),!0}return!1},unfoldCode=Ws=>{if(!Ws.state.field(foldState,!1))return!1;let ws=[];for(let oi of selectedLines(Ws)){let si=findFold(Ws.state,oi.from,oi.to);si&&ws.push(unfoldEffect.of(si),announceFold(Ws,si,!1))}return ws.length&&Ws.dispatch({effects:ws}),ws.length>0};function announceFold(Ws,ws,oi=!0){let si=Ws.state.doc.lineAt(ws.from).number,ii=Ws.state.doc.lineAt(ws.to).number;return EditorView.announce.of(`${Ws.state.phrase(oi?"Folded lines":"Unfolded lines")} ${si} ${Ws.state.phrase("to")} ${ii}.`)}const foldAll=Ws=>{let{state:ws}=Ws,oi=[];for(let si=0;si<ws.doc.length;){let ii=Ws.lineBlockAt(si),ai=foldable(ws,ii.from,ii.to);ai&&oi.push(foldEffect.of(ai)),si=(ai?Ws.lineBlockAt(ai.to):ii).to+1}return oi.length&&Ws.dispatch({effects:maybeEnable(Ws.state,oi)}),!!oi.length},unfoldAll=Ws=>{let ws=Ws.state.field(foldState,!1);if(!ws||!ws.size)return!1;let oi=[];return ws.between(0,Ws.state.doc.length,(si,ii)=>{oi.push(unfoldEffect.of({from:si,to:ii}))}),Ws.dispatch({effects:oi}),!0},foldKeymap=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:foldCode},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:unfoldCode},{key:"Ctrl-Alt-[",run:foldAll},{key:"Ctrl-Alt-]",run:unfoldAll}],defaultConfig={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},foldConfig=Facet.define({combine(Ws){return combineConfig(Ws,defaultConfig)}});function codeFolding(Ws){return[foldState,baseTheme$1$1]}function widgetToDOM(Ws,ws){let{state:oi}=Ws,si=oi.facet(foldConfig),ii=li=>{let ci=Ws.lineBlockAt(Ws.posAtDOM(li.target)),ui=findFold(Ws.state,ci.from,ci.to);ui&&Ws.dispatch({effects:unfoldEffect.of(ui)}),li.preventDefault()};if(si.placeholderDOM)return si.placeholderDOM(Ws,ii,ws);let ai=document.createElement("span");return ai.textContent=si.placeholderText,ai.setAttribute("aria-label",oi.phrase("folded code")),ai.title=oi.phrase("unfold"),ai.className="cm-foldPlaceholder",ai.onclick=ii,ai}const foldWidget=Decoration.replace({widget:new class extends WidgetType{toDOM(Ws){return widgetToDOM(Ws,null)}}});class PreparedFoldWidget extends WidgetType{constructor(ws){super(),this.value=ws}eq(ws){return this.value==ws.value}toDOM(ws){return widgetToDOM(ws,this.value)}}const foldGutterDefaults={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class FoldMarker extends GutterMarker{constructor(ws,oi){super(),this.config=ws,this.open=oi}eq(ws){return this.config==ws.config&&this.open==ws.open}toDOM(ws){if(this.config.markerDOM)return this.config.markerDOM(this.open);let oi=document.createElement("span");return oi.textContent=this.open?this.config.openText:this.config.closedText,oi.title=ws.state.phrase(this.open?"Fold line":"Unfold line"),oi}}function foldGutter(Ws={}){let ws=Object.assign(Object.assign({},foldGutterDefaults),Ws),oi=new FoldMarker(ws,!0),si=new FoldMarker(ws,!1),ii=ViewPlugin.fromClass(class{constructor(li){this.from=li.viewport.from,this.markers=this.buildMarkers(li)}update(li){(li.docChanged||li.viewportChanged||li.startState.facet(language)!=li.state.facet(language)||li.startState.field(foldState,!1)!=li.state.field(foldState,!1)||syntaxTree(li.startState)!=syntaxTree(li.state)||ws.foldingChanged(li))&&(this.markers=this.buildMarkers(li.view))}buildMarkers(li){let ci=new RangeSetBuilder;for(let ui of li.viewportLineBlocks){let di=findFold(li.state,ui.from,ui.to)?si:foldable(li.state,ui.from,ui.to)?oi:null;di&&ci.add(ui.from,ui.from,di)}return ci.finish()}}),{domEventHandlers:ai}=ws;return[ii,gutter({class:"cm-foldGutter",markers(li){var ci;return((ci=li.plugin(ii))===null||ci===void 0?void 0:ci.markers)||RangeSet.empty},initialSpacer(){return new FoldMarker(ws,!1)},domEventHandlers:Object.assign(Object.assign({},ai),{click:(li,ci,ui)=>{if(ai.click&&ai.click(li,ci,ui))return!0;let di=findFold(li.state,ci.from,ci.to);if(di)return li.dispatch({effects:unfoldEffect.of(di)}),!0;let hi=foldable(li.state,ci.from,ci.to);return hi?(li.dispatch({effects:foldEffect.of(hi)}),!0):!1}})}),codeFolding()]}const baseTheme$1$1=EditorView.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class HighlightStyle{constructor(ws,oi){this.specs=ws;let si;function ii(ci){let ui=StyleModule.newName();return(si||(si=Object.create(null)))["."+ui]=ci,ui}const ai=typeof oi.all=="string"?oi.all:oi.all?ii(oi.all):void 0,li=oi.scope;this.scope=li instanceof Language?ci=>ci.prop(languageDataProp)==li.data:li?ci=>ci==li:void 0,this.style=tagHighlighter(ws.map(ci=>({tag:ci.tag,class:ci.class||ii(Object.assign({},ci,{tag:null}))})),{all:ai}).style,this.module=si?new StyleModule(si):null,this.themeType=oi.themeType}static define(ws,oi){return new HighlightStyle(ws,oi||{})}}const highlighterFacet=Facet.define(),fallbackHighlighter=Facet.define({combine(Ws){return Ws.length?[Ws[0]]:null}});function getHighlighters(Ws){let ws=Ws.facet(highlighterFacet);return ws.length?ws:Ws.facet(fallbackHighlighter)}function syntaxHighlighting(Ws,ws){let oi=[treeHighlighter],si;return Ws instanceof HighlightStyle&&(Ws.module&&oi.push(EditorView.styleModule.of(Ws.module)),si=Ws.themeType),ws!=null&&ws.fallback?oi.push(fallbackHighlighter.of(Ws)):si?oi.push(highlighterFacet.computeN([EditorView.darkTheme],ii=>ii.facet(EditorView.darkTheme)==(si=="dark")?[Ws]:[])):oi.push(highlighterFacet.of(Ws)),oi}class TreeHighlighter{constructor(ws){this.markCache=Object.create(null),this.tree=syntaxTree(ws.state),this.decorations=this.buildDeco(ws,getHighlighters(ws.state)),this.decoratedTo=ws.viewport.to}update(ws){let oi=syntaxTree(ws.state),si=getHighlighters(ws.state),ii=si!=getHighlighters(ws.startState),{viewport:ai}=ws.view,li=ws.changes.mapPos(this.decoratedTo,1);oi.length<ai.to&&!ii&&oi.type==this.tree.type&&li>=ai.to?(this.decorations=this.decorations.map(ws.changes),this.decoratedTo=li):(oi!=this.tree||ws.viewportChanged||ii)&&(this.tree=oi,this.decorations=this.buildDeco(ws.view,si),this.decoratedTo=ai.to)}buildDeco(ws,oi){if(!oi||!this.tree.length)return Decoration.none;let si=new RangeSetBuilder;for(let{from:ii,to:ai}of ws.visibleRanges)highlightTree(this.tree,oi,(li,ci,ui)=>{si.add(li,ci,this.markCache[ui]||(this.markCache[ui]=Decoration.mark({class:ui})))},ii,ai);return si.finish()}}const treeHighlighter=Prec.high(ViewPlugin.fromClass(TreeHighlighter,{decorations:Ws=>Ws.decorations})),defaultHighlightStyle=HighlightStyle.define([{tag:tags.meta,color:"#404740"},{tag:tags.link,textDecoration:"underline"},{tag:tags.heading,textDecoration:"underline",fontWeight:"bold"},{tag:tags.emphasis,fontStyle:"italic"},{tag:tags.strong,fontWeight:"bold"},{tag:tags.strikethrough,textDecoration:"line-through"},{tag:tags.keyword,color:"#708"},{tag:[tags.atom,tags.bool,tags.url,tags.contentSeparator,tags.labelName],color:"#219"},{tag:[tags.literal,tags.inserted],color:"#164"},{tag:[tags.string,tags.deleted],color:"#a11"},{tag:[tags.regexp,tags.escape,tags.special(tags.string)],color:"#e40"},{tag:tags.definition(tags.variableName),color:"#00f"},{tag:tags.local(tags.variableName),color:"#30a"},{tag:[tags.typeName,tags.namespace],color:"#085"},{tag:tags.className,color:"#167"},{tag:[tags.special(tags.variableName),tags.macroName],color:"#256"},{tag:tags.definition(tags.propertyName),color:"#00c"},{tag:tags.comment,color:"#940"},{tag:tags.invalid,color:"#f00"}]),baseTheme$4=EditorView.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),DefaultScanDist=1e4,DefaultBrackets="()[]{}",bracketMatchingConfig=Facet.define({combine(Ws){return combineConfig(Ws,{afterCursor:!0,brackets:DefaultBrackets,maxScanDistance:DefaultScanDist,renderMatch:defaultRenderMatch})}}),matchingMark=Decoration.mark({class:"cm-matchingBracket"}),nonmatchingMark=Decoration.mark({class:"cm-nonmatchingBracket"});function defaultRenderMatch(Ws){let ws=[],oi=Ws.matched?matchingMark:nonmatchingMark;return ws.push(oi.range(Ws.start.from,Ws.start.to)),Ws.end&&ws.push(oi.range(Ws.end.from,Ws.end.to)),ws}const bracketMatchingState=StateField.define({create(){return Decoration.none},update(Ws,ws){if(!ws.docChanged&&!ws.selection)return Ws;let oi=[],si=ws.state.facet(bracketMatchingConfig);for(let ii of ws.state.selection.ranges){if(!ii.empty)continue;let ai=matchBrackets(ws.state,ii.head,-1,si)||ii.head>0&&matchBrackets(ws.state,ii.head-1,1,si)||si.afterCursor&&(matchBrackets(ws.state,ii.head,1,si)||ii.head<ws.state.doc.length&&matchBrackets(ws.state,ii.head+1,-1,si));ai&&(oi=oi.concat(si.renderMatch(ai,ws.state)))}return Decoration.set(oi,!0)},provide:Ws=>EditorView.decorations.from(Ws)}),bracketMatchingUnique=[bracketMatchingState,baseTheme$4];function bracketMatching(Ws={}){return[bracketMatchingConfig.of(Ws),bracketMatchingUnique]}const bracketMatchingHandle=new NodeProp;function matchingNodes(Ws,ws,oi){let si=Ws.prop(ws<0?NodeProp.openedBy:NodeProp.closedBy);if(si)return si;if(Ws.name.length==1){let ii=oi.indexOf(Ws.name);if(ii>-1&&ii%2==(ws<0?1:0))return[oi[ii+ws]]}return null}function findHandle(Ws){let ws=Ws.type.prop(bracketMatchingHandle);return ws?ws(Ws.node):Ws}function matchBrackets(Ws,ws,oi,si={}){let ii=si.maxScanDistance||DefaultScanDist,ai=si.brackets||DefaultBrackets,li=syntaxTree(Ws),ci=li.resolveInner(ws,oi);for(let ui=ci;ui;ui=ui.parent){let di=matchingNodes(ui.type,oi,ai);if(di&&ui.from<ui.to){let hi=findHandle(ui);if(hi&&(oi>0?ws>=hi.from&&ws<hi.to:ws>hi.from&&ws<=hi.to))return matchMarkedBrackets(Ws,ws,oi,ui,hi,di,ai)}}return matchPlainBrackets(Ws,ws,oi,li,ci.type,ii,ai)}function matchMarkedBrackets(Ws,ws,oi,si,ii,ai,li){let ci=si.parent,ui={from:ii.from,to:ii.to},di=0,hi=ci==null?void 0:ci.cursor();if(hi&&(oi<0?hi.childBefore(si.from):hi.childAfter(si.to)))do if(oi<0?hi.to<=si.from:hi.from>=si.to){if(di==0&&ai.indexOf(hi.type.name)>-1&&hi.from<hi.to){let pi=findHandle(hi);return{start:ui,end:pi?{from:pi.from,to:pi.to}:void 0,matched:!0}}else if(matchingNodes(hi.type,oi,li))di++;else if(matchingNodes(hi.type,-oi,li)){if(di==0){let pi=findHandle(hi);return{start:ui,end:pi&&pi.from<pi.to?{from:pi.from,to:pi.to}:void 0,matched:!1}}di--}}while(oi<0?hi.prevSibling():hi.nextSibling());return{start:ui,matched:!1}}function matchPlainBrackets(Ws,ws,oi,si,ii,ai,li){let ci=oi<0?Ws.sliceDoc(ws-1,ws):Ws.sliceDoc(ws,ws+1),ui=li.indexOf(ci);if(ui<0||ui%2==0!=oi>0)return null;let di={from:oi<0?ws-1:ws,to:oi>0?ws+1:ws},hi=Ws.doc.iterRange(ws,oi>0?Ws.doc.length:0),pi=0;for(let ha=0;!hi.next().done&&ha<=ai;){let ga=hi.value;oi<0&&(ha+=ga.length);let va=ws+ha*oi;for(let ba=oi>0?0:ga.length-1,wa=oi>0?ga.length:-1;ba!=wa;ba+=oi){let xa=li.indexOf(ga[ba]);if(!(xa<0||si.resolveInner(va+ba,1).type!=ii))if(xa%2==0==oi>0)pi++;else{if(pi==1)return{start:di,end:{from:va+ba,to:va+ba+1},matched:xa>>1==ui>>1};pi--}}oi>0&&(ha+=ga.length)}return hi.done?{start:di,matched:!1}:null}const noTokens=Object.create(null),typeArray=[NodeType.none],warned=[],byTag=Object.create(null),defaultTable=Object.create(null);for(let[Ws,ws]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])defaultTable[Ws]=createTokenType(noTokens,ws);function warnForPart(Ws,ws){warned.indexOf(Ws)>-1||(warned.push(Ws),console.warn(ws))}function createTokenType(Ws,ws){let oi=[];for(let ci of ws.split(" ")){let ui=[];for(let di of ci.split(".")){let hi=Ws[di]||tags[di];hi?typeof hi=="function"?ui.length?ui=ui.map(hi):warnForPart(di,`Modifier ${di} used at start of tag`):ui.length?warnForPart(di,`Tag ${di} used as modifier`):ui=Array.isArray(hi)?hi:[hi]:warnForPart(di,`Unknown highlighting tag ${di}`)}for(let di of ui)oi.push(di)}if(!oi.length)return 0;let si=ws.replace(/ /g,"_"),ii=si+" "+oi.map(ci=>ci.id),ai=byTag[ii];if(ai)return ai.id;let li=byTag[ii]=NodeType.define({id:typeArray.length,name:si,props:[styleTags({[si]:oi})]});return typeArray.push(li),li.id}Direction.RTL,Direction.LTR;const createTheme=({variant:Ws,settings:ws,styles:oi})=>{const si=EditorView.theme({"&":{backgroundColor:ws.background,color:ws.foreground},".cm-content":{caretColor:ws.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:ws.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ws.selection},".cm-activeLine":{backgroundColor:ws.lineHighlight},".cm-gutters":{backgroundColor:ws.gutterBackground,color:ws.gutterForeground},".cm-activeLineGutter":{backgroundColor:ws.lineHighlight}},{dark:Ws==="dark"}),ii=HighlightStyle.define(oi);return[si,syntaxHighlighting(ii)]};createTheme({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:tags.comment,color:"#404080"},{tag:[tags.string,tags.regexp],color:"#999999"},{tag:tags.number,color:"#7090B0"},{tag:[tags.bool,tags.null],color:"#8080A0"},{tag:[tags.punctuation,tags.derefOperator],color:"#805080"},{tag:tags.keyword,color:"#60B0FF"},{tag:tags.definitionKeyword,color:"#B0FFF0"},{tag:tags.moduleKeyword,color:"#60B0FF"},{tag:tags.operator,color:"#A0A0FF"},{tag:[tags.variableName,tags.self],color:"#008080"},{tag:tags.operatorKeyword,color:"#A0A0FF"},{tag:tags.controlKeyword,color:"#80A0FF"},{tag:tags.className,color:"#70E080"},{tag:[tags.function(tags.propertyName),tags.propertyName],color:"#50A0A0"},{tag:tags.tagName,color:"#009090"},{tag:tags.modifier,color:"#B0FFF0"},{tag:[tags.squareBracket,tags.attributeName],color:"#D0D0FF"}]});const ayuLight=createTheme({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:tags.comment,color:"#787b8099"},{tag:tags.string,color:"#86b300"},{tag:tags.regexp,color:"#4cbf99"},{tag:[tags.number,tags.bool,tags.null],color:"#ffaa33"},{tag:tags.variableName,color:"#5c6166"},{tag:[tags.definitionKeyword,tags.modifier],color:"#fa8d3e"},{tag:[tags.keyword,tags.special(tags.brace)],color:"#fa8d3e"},{tag:tags.operator,color:"#ed9366"},{tag:tags.separator,color:"#5c6166b3"},{tag:tags.punctuation,color:"#5c6166"},{tag:[tags.definition(tags.propertyName),tags.function(tags.variableName)],color:"#f2ae49"},{tag:[tags.className,tags.definition(tags.typeName)],color:"#22a4e6"},{tag:[tags.tagName,tags.typeName,tags.self,tags.labelName],color:"#55b4d4"},{tag:tags.angleBracket,color:"#55b4d480"},{tag:tags.attributeName,color:"#f2ae49"}]});createTheme({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:tags.comment,color:"#6E6E6E"},{tag:[tags.string,tags.regexp,tags.special(tags.brace)],color:"#5C81B3"},{tag:tags.number,color:"#C1E1B8"},{tag:tags.bool,color:"#53667D"},{tag:[tags.definitionKeyword,tags.modifier,tags.function(tags.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[tags.keyword,tags.moduleKeyword,tags.operatorKeyword,tags.operator],color:"#697A8E",fontWeight:"bold"},{tag:[tags.variableName,tags.attributeName],color:"#708E67"},{tag:[tags.function(tags.variableName),tags.definition(tags.propertyName),tags.derefOperator],color:"#fff"},{tag:tags.tagName,color:"#A3D295"}]});createTheme({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:tags.comment,color:"#666666"},{tag:[tags.string,tags.special(tags.brace)],color:"#54BE0D"},{tag:tags.regexp,color:"#E9C062"},{tag:tags.number,color:"#CF6A4C"},{tag:[tags.keyword,tags.operator],color:"#5EA6EA"},{tag:tags.variableName,color:"#7587A6"},{tag:[tags.definitionKeyword,tags.modifier],color:"#F9EE98"},{tag:[tags.propertyName,tags.function(tags.variableName)],color:"#937121"},{tag:[tags.typeName,tags.angleBracket,tags.tagName],color:"#9B859D"}]});createTheme({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:tags.comment,color:"#6B4E32"},{tag:[tags.keyword,tags.operator,tags.derefOperator],color:"#EF5D32"},{tag:tags.className,color:"#EFAC32",fontWeight:"bold"},{tag:[tags.typeName,tags.propertyName,tags.function(tags.variableName),tags.definition(tags.variableName)],color:"#EFAC32"},{tag:tags.definition(tags.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:tags.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[tags.number,tags.bool],color:"#6C99BB"},{tag:[tags.variableName,tags.self],color:"#7DAF9C"},{tag:[tags.string,tags.special(tags.brace),tags.regexp],color:"#D9D762"},{tag:[tags.angleBracket,tags.tagName,tags.attributeName],color:"#EFCB43"}]});createTheme({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:tags.comment,color:"#404040"},{tag:[tags.string,tags.special(tags.brace),tags.regexp],color:"#00D8FF"},{tag:tags.number,color:"#E62286"},{tag:[tags.variableName,tags.attributeName,tags.self],color:"#E62286",fontWeight:"bold"},{tag:tags.function(tags.variableName),color:"#fff",fontWeight:"bold"}]});createTheme({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:tags.comment,color:"#BCC8BA"},{tag:[tags.string,tags.special(tags.brace),tags.regexp],color:"#5D90CD"},{tag:[tags.number,tags.bool,tags.null],color:"#46A609"},{tag:tags.keyword,color:"#AF956F"},{tag:[tags.definitionKeyword,tags.modifier],color:"#C52727"},{tag:[tags.angleBracket,tags.tagName,tags.attributeName],color:"#606060"},{tag:tags.self,color:"#000"}]});createTheme({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:tags.comment,color:"#0088FF"},{tag:tags.string,color:"#3AD900"},{tag:tags.regexp,color:"#80FFC2"},{tag:[tags.number,tags.bool,tags.null],color:"#FF628C"},{tag:[tags.definitionKeyword,tags.modifier],color:"#FFEE80"},{tag:tags.variableName,color:"#CCCCCC"},{tag:tags.self,color:"#FF80E1"},{tag:[tags.className,tags.definition(tags.propertyName),tags.function(tags.variableName),tags.definition(tags.typeName),tags.labelName],color:"#FFDD00"},{tag:[tags.keyword,tags.operator],color:"#FF9D00"},{tag:[tags.propertyName,tags.typeName],color:"#80FFBB"},{tag:tags.special(tags.brace),color:"#EDEF7D"},{tag:tags.attributeName,color:"#9EFFFF"},{tag:tags.derefOperator,color:"#fff"}]});createTheme({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:tags.comment,color:"#AEAEAE"},{tag:[tags.string,tags.special(tags.brace),tags.regexp],color:"#8DFF8E"},{tag:[tags.className,tags.definition(tags.propertyName),tags.function(tags.variableName),tags.function(tags.definition(tags.variableName)),tags.definition(tags.typeName)],color:"#A3EBFF"},{tag:[tags.number,tags.bool,tags.null],color:"#62E9BD"},{tag:[tags.keyword,tags.operator],color:"#2BF1DC"},{tag:[tags.definitionKeyword,tags.modifier],color:"#F8FBB1"},{tag:[tags.variableName,tags.self],color:"#B683CA"},{tag:[tags.angleBracket,tags.tagName,tags.typeName,tags.propertyName],color:"#60A4F1"},{tag:tags.derefOperator,color:"#E0E0E0"},{tag:tags.attributeName,color:"#7BACCA"}]});createTheme({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:tags.comment,color:"#6272a4"},{tag:[tags.string,tags.special(tags.brace)],color:"#f1fa8c"},{tag:[tags.number,tags.self,tags.bool,tags.null],color:"#bd93f9"},{tag:[tags.keyword,tags.operator],color:"#ff79c6"},{tag:[tags.definitionKeyword,tags.typeName],color:"#8be9fd"},{tag:tags.definition(tags.typeName),color:"#f8f8f2"},{tag:[tags.className,tags.definition(tags.propertyName),tags.function(tags.variableName),tags.attributeName],color:"#50fa7b"}]});createTheme({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:tags.comment,color:"#AAAAAA"},{tag:[tags.keyword,tags.operator,tags.typeName,tags.tagName,tags.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[tags.attributeName,tags.definition(tags.propertyName)],color:"#4F9FD0"},{tag:[tags.className,tags.string,tags.special(tags.brace)],color:"#CF4F5F"},{tag:tags.number,color:"#CF4F5F",fontWeight:"bold"},{tag:tags.variableName,fontWeight:"bold"}]});createTheme({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:tags.comment,color:"#9995b7"},{tag:tags.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[tags.definitionKeyword,tags.modifier],color:"#ff5792"},{tag:[tags.className,tags.tagName,tags.definition(tags.typeName)],color:"#0094f0"},{tag:[tags.number,tags.bool,tags.null,tags.special(tags.brace)],color:"#5842ff"},{tag:[tags.definition(tags.propertyName),tags.function(tags.variableName)],color:"#0095a8"},{tag:tags.typeName,color:"#b3694d"},{tag:[tags.propertyName,tags.variableName],color:"#fa8900"},{tag:tags.operator,color:"#ff5792"},{tag:tags.self,color:"#e64100"},{tag:[tags.string,tags.regexp],color:"#00b368"},{tag:[tags.paren,tags.bracket],color:"#0431fa"},{tag:tags.labelName,color:"#00bdd6"},{tag:tags.attributeName,color:"#e64100"},{tag:tags.angleBracket,color:"#9995b7"}]});createTheme({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:tags.comment,color:"#9893a5"},{tag:[tags.bool,tags.null],color:"#286983"},{tag:tags.number,color:"#d7827e"},{tag:tags.className,color:"#d7827e"},{tag:[tags.angleBracket,tags.tagName,tags.typeName],color:"#56949f"},{tag:tags.attributeName,color:"#907aa9"},{tag:tags.punctuation,color:"#797593"},{tag:[tags.keyword,tags.modifier],color:"#286983"},{tag:[tags.string,tags.regexp],color:"#ea9d34"},{tag:tags.variableName,color:"#d7827e"}]});createTheme({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:tags.comment,color:"#CFCFCF"},{tag:[tags.number,tags.bool,tags.null],color:"#E66C29"},{tag:[tags.className,tags.definition(tags.propertyName),tags.function(tags.variableName),tags.labelName,tags.definition(tags.typeName)],color:"#2EB43B"},{tag:tags.keyword,color:"#D8B229"},{tag:tags.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[tags.definitionKeyword,tags.modifier],color:"#925A47"},{tag:tags.string,color:"#704D3D"},{tag:tags.typeName,color:"#2F8996"},{tag:[tags.variableName,tags.propertyName],color:"#77ACB0"},{tag:tags.self,color:"#77ACB0",fontWeight:"bold"},{tag:tags.regexp,color:"#E3965E"},{tag:[tags.tagName,tags.angleBracket],color:"#BAA827"},{tag:tags.attributeName,color:"#B06520"},{tag:tags.derefOperator,color:"#000"}]});createTheme({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:tags.comment,color:"#93A1A1"},{tag:tags.string,color:"#2AA198"},{tag:tags.regexp,color:"#D30102"},{tag:tags.number,color:"#D33682"},{tag:tags.variableName,color:"#268BD2"},{tag:[tags.keyword,tags.operator,tags.punctuation],color:"#859900"},{tag:[tags.definitionKeyword,tags.modifier],color:"#073642",fontWeight:"bold"},{tag:[tags.className,tags.self,tags.definition(tags.propertyName)],color:"#268BD2"},{tag:tags.function(tags.variableName),color:"#268BD2"},{tag:[tags.bool,tags.null],color:"#B58900"},{tag:tags.tagName,color:"#268BD2",fontWeight:"bold"},{tag:tags.angleBracket,color:"#93A1A1"},{tag:tags.attributeName,color:"#93A1A1"},{tag:tags.typeName,color:"#859900"}]});createTheme({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:tags.comment,color:"#8E908C"},{tag:[tags.variableName,tags.self,tags.propertyName,tags.attributeName,tags.regexp],color:"#C82829"},{tag:[tags.number,tags.bool,tags.null],color:"#F5871F"},{tag:[tags.className,tags.typeName,tags.definition(tags.typeName)],color:"#C99E00"},{tag:[tags.string,tags.special(tags.brace)],color:"#718C00"},{tag:tags.operator,color:"#3E999F"},{tag:[tags.definition(tags.propertyName),tags.function(tags.variableName)],color:"#4271AE"},{tag:tags.keyword,color:"#8959A8"},{tag:tags.derefOperator,color:"#4D4D4C"}]});function objectValues(Ws){const ws=Object.keys(Ws),oi=ws.length,si=new Array(oi);for(let ii=0;ii<oi;++ii)si[ii]=Ws[ws[ii]];return si}function hintList(Ws,ws){return filterAndSortList(ws,normalizeText(Ws.string))}function filterAndSortList(Ws,ws){if(!ws||ws.trim()===""||ws.trim()===":"||ws.trim()==="{")return filterNonEmpty(Ws,si=>!si.isDeprecated);const oi=Ws.map(si=>({proximity:getProximity(normalizeText(si.label),ws),entry:si}));return filterNonEmpty(filterNonEmpty(oi,si=>si.proximity<=2),si=>!si.entry.isDeprecated).sort((si,ii)=>(si.entry.isDeprecated?1:0)-(ii.entry.isDeprecated?1:0)||si.proximity-ii.proximity||si.entry.label.length-ii.entry.label.length).map(si=>si.entry)}function filterNonEmpty(Ws,ws){const oi=Ws.filter(ws);return oi.length===0?Ws:oi}function normalizeText(Ws){return Ws.toLowerCase().replaceAll(/\W/g,"")}function getProximity(Ws,ws){let oi=lexicalDistance(ws,Ws);return Ws.length>ws.length&&(oi-=Ws.length-ws.length-1,oi+=Ws.indexOf(ws)===0?0:.5),oi}function lexicalDistance(Ws,ws){let oi,si;const ii=[],ai=Ws.length,li=ws.length;for(oi=0;oi<=ai;oi++)ii[oi]=[oi];for(si=1;si<=li;si++)ii[0][si]=si;for(oi=1;oi<=ai;oi++)for(si=1;si<=li;si++){const ci=Ws[oi-1]===ws[si-1]?0:1;ii[oi][si]=Math.min(ii[oi-1][si]+1,ii[oi][si-1]+1,ii[oi-1][si-1]+ci),oi>1&&si>1&&Ws[oi-1]===ws[si-2]&&Ws[oi-2]===ws[si-1]&&(ii[oi][si]=Math.min(ii[oi][si],ii[oi-2][si-2]+ci))}return ii[ai][li]}const insertSuffix=Ws=>` {
|
|
323
323
|
$1
|
|
324
324
|
}`,getInsertText=(Ws,ws,oi)=>{if(!ws)return oi??Ws;const si=getNamedType(ws);return isObjectType(si)||isInputObjectType(si)||isListType(si)||isAbstractType(si)?Ws+insertSuffix():oi??Ws},getInputInsertText=(Ws,ws,oi)=>{if(isListType(ws)){const si=getNamedType(ws.ofType);return Ws+`[${getInsertText("",si,"$1")}]`}return getInsertText(Ws,ws,oi)},getFieldInsertText=Ws=>{const ws=Ws.args.filter(oi=>oi.type.toString().endsWith("!"));if(ws.length)return Ws.name+`(${ws.map((oi,si)=>`${oi.name}: $${si+1}`)}) ${getInsertText("",Ws.type,`
|
|
325
325
|
`)}`};var DocumentUri;(function(Ws){function ws(oi){return typeof oi=="string"}Ws.is=ws})(DocumentUri||(DocumentUri={}));var URI;(function(Ws){function ws(oi){return typeof oi=="string"}Ws.is=ws})(URI||(URI={}));var integer;(function(Ws){Ws.MIN_VALUE=-2147483648,Ws.MAX_VALUE=2147483647;function ws(oi){return typeof oi=="number"&&Ws.MIN_VALUE<=oi&&oi<=Ws.MAX_VALUE}Ws.is=ws})(integer||(integer={}));var uinteger;(function(Ws){Ws.MIN_VALUE=0,Ws.MAX_VALUE=2147483647;function ws(oi){return typeof oi=="number"&&Ws.MIN_VALUE<=oi&&oi<=Ws.MAX_VALUE}Ws.is=ws})(uinteger||(uinteger={}));var Position$2;(function(Ws){function ws(si,ii){return si===Number.MAX_VALUE&&(si=uinteger.MAX_VALUE),ii===Number.MAX_VALUE&&(ii=uinteger.MAX_VALUE),{line:si,character:ii}}Ws.create=ws;function oi(si){let ii=si;return Is.objectLiteral(ii)&&Is.uinteger(ii.line)&&Is.uinteger(ii.character)}Ws.is=oi})(Position$2||(Position$2={}));var Range$1;(function(Ws){function ws(si,ii,ai,li){if(Is.uinteger(si)&&Is.uinteger(ii)&&Is.uinteger(ai)&&Is.uinteger(li))return{start:Position$2.create(si,ii),end:Position$2.create(ai,li)};if(Position$2.is(si)&&Position$2.is(ii))return{start:si,end:ii};throw new Error(`Range#create called with invalid arguments[${si}, ${ii}, ${ai}, ${li}]`)}Ws.create=ws;function oi(si){let ii=si;return Is.objectLiteral(ii)&&Position$2.is(ii.start)&&Position$2.is(ii.end)}Ws.is=oi})(Range$1||(Range$1={}));var Location;(function(Ws){function ws(si,ii){return{uri:si,range:ii}}Ws.create=ws;function oi(si){let ii=si;return Is.objectLiteral(ii)&&Range$1.is(ii.range)&&(Is.string(ii.uri)||Is.undefined(ii.uri))}Ws.is=oi})(Location||(Location={}));var LocationLink;(function(Ws){function ws(si,ii,ai,li){return{targetUri:si,targetRange:ii,targetSelectionRange:ai,originSelectionRange:li}}Ws.create=ws;function oi(si){let ii=si;return Is.objectLiteral(ii)&&Range$1.is(ii.targetRange)&&Is.string(ii.targetUri)&&Range$1.is(ii.targetSelectionRange)&&(Range$1.is(ii.originSelectionRange)||Is.undefined(ii.originSelectionRange))}Ws.is=oi})(LocationLink||(LocationLink={}));var Color;(function(Ws){function ws(si,ii,ai,li){return{red:si,green:ii,blue:ai,alpha:li}}Ws.create=ws;function oi(si){const ii=si;return Is.objectLiteral(ii)&&Is.numberRange(ii.red,0,1)&&Is.numberRange(ii.green,0,1)&&Is.numberRange(ii.blue,0,1)&&Is.numberRange(ii.alpha,0,1)}Ws.is=oi})(Color||(Color={}));var ColorInformation;(function(Ws){function ws(si,ii){return{range:si,color:ii}}Ws.create=ws;function oi(si){const ii=si;return Is.objectLiteral(ii)&&Range$1.is(ii.range)&&Color.is(ii.color)}Ws.is=oi})(ColorInformation||(ColorInformation={}));var ColorPresentation;(function(Ws){function ws(si,ii,ai){return{label:si,textEdit:ii,additionalTextEdits:ai}}Ws.create=ws;function oi(si){const ii=si;return Is.objectLiteral(ii)&&Is.string(ii.label)&&(Is.undefined(ii.textEdit)||TextEdit.is(ii))&&(Is.undefined(ii.additionalTextEdits)||Is.typedArray(ii.additionalTextEdits,TextEdit.is))}Ws.is=oi})(ColorPresentation||(ColorPresentation={}));var FoldingRangeKind;(function(Ws){Ws.Comment="comment",Ws.Imports="imports",Ws.Region="region"})(FoldingRangeKind||(FoldingRangeKind={}));var FoldingRange;(function(Ws){function ws(si,ii,ai,li,ci,ui){const di={startLine:si,endLine:ii};return Is.defined(ai)&&(di.startCharacter=ai),Is.defined(li)&&(di.endCharacter=li),Is.defined(ci)&&(di.kind=ci),Is.defined(ui)&&(di.collapsedText=ui),di}Ws.create=ws;function oi(si){const ii=si;return Is.objectLiteral(ii)&&Is.uinteger(ii.startLine)&&Is.uinteger(ii.startLine)&&(Is.undefined(ii.startCharacter)||Is.uinteger(ii.startCharacter))&&(Is.undefined(ii.endCharacter)||Is.uinteger(ii.endCharacter))&&(Is.undefined(ii.kind)||Is.string(ii.kind))}Ws.is=oi})(FoldingRange||(FoldingRange={}));var DiagnosticRelatedInformation;(function(Ws){function ws(si,ii){return{location:si,message:ii}}Ws.create=ws;function oi(si){let ii=si;return Is.defined(ii)&&Location.is(ii.location)&&Is.string(ii.message)}Ws.is=oi})(DiagnosticRelatedInformation||(DiagnosticRelatedInformation={}));var DiagnosticSeverity;(function(Ws){Ws.Error=1,Ws.Warning=2,Ws.Information=3,Ws.Hint=4})(DiagnosticSeverity||(DiagnosticSeverity={}));var DiagnosticTag;(function(Ws){Ws.Unnecessary=1,Ws.Deprecated=2})(DiagnosticTag||(DiagnosticTag={}));var CodeDescription;(function(Ws){function ws(oi){const si=oi;return Is.objectLiteral(si)&&Is.string(si.href)}Ws.is=ws})(CodeDescription||(CodeDescription={}));var Diagnostic;(function(Ws){function ws(si,ii,ai,li,ci,ui){let di={range:si,message:ii};return Is.defined(ai)&&(di.severity=ai),Is.defined(li)&&(di.code=li),Is.defined(ci)&&(di.source=ci),Is.defined(ui)&&(di.relatedInformation=ui),di}Ws.create=ws;function oi(si){var ii;let ai=si;return Is.defined(ai)&&Range$1.is(ai.range)&&Is.string(ai.message)&&(Is.number(ai.severity)||Is.undefined(ai.severity))&&(Is.integer(ai.code)||Is.string(ai.code)||Is.undefined(ai.code))&&(Is.undefined(ai.codeDescription)||Is.string((ii=ai.codeDescription)===null||ii===void 0?void 0:ii.href))&&(Is.string(ai.source)||Is.undefined(ai.source))&&(Is.undefined(ai.relatedInformation)||Is.typedArray(ai.relatedInformation,DiagnosticRelatedInformation.is))}Ws.is=oi})(Diagnostic||(Diagnostic={}));var Command;(function(Ws){function ws(si,ii,...ai){let li={title:si,command:ii};return Is.defined(ai)&&ai.length>0&&(li.arguments=ai),li}Ws.create=ws;function oi(si){let ii=si;return Is.defined(ii)&&Is.string(ii.title)&&Is.string(ii.command)}Ws.is=oi})(Command||(Command={}));var TextEdit;(function(Ws){function ws(ai,li){return{range:ai,newText:li}}Ws.replace=ws;function oi(ai,li){return{range:{start:ai,end:ai},newText:li}}Ws.insert=oi;function si(ai){return{range:ai,newText:""}}Ws.del=si;function ii(ai){const li=ai;return Is.objectLiteral(li)&&Is.string(li.newText)&&Range$1.is(li.range)}Ws.is=ii})(TextEdit||(TextEdit={}));var ChangeAnnotation;(function(Ws){function ws(si,ii,ai){const li={label:si};return ii!==void 0&&(li.needsConfirmation=ii),ai!==void 0&&(li.description=ai),li}Ws.create=ws;function oi(si){const ii=si;return Is.objectLiteral(ii)&&Is.string(ii.label)&&(Is.boolean(ii.needsConfirmation)||ii.needsConfirmation===void 0)&&(Is.string(ii.description)||ii.description===void 0)}Ws.is=oi})(ChangeAnnotation||(ChangeAnnotation={}));var ChangeAnnotationIdentifier;(function(Ws){function ws(oi){const si=oi;return Is.string(si)}Ws.is=ws})(ChangeAnnotationIdentifier||(ChangeAnnotationIdentifier={}));var AnnotatedTextEdit;(function(Ws){function ws(ai,li,ci){return{range:ai,newText:li,annotationId:ci}}Ws.replace=ws;function oi(ai,li,ci){return{range:{start:ai,end:ai},newText:li,annotationId:ci}}Ws.insert=oi;function si(ai,li){return{range:ai,newText:"",annotationId:li}}Ws.del=si;function ii(ai){const li=ai;return TextEdit.is(li)&&(ChangeAnnotation.is(li.annotationId)||ChangeAnnotationIdentifier.is(li.annotationId))}Ws.is=ii})(AnnotatedTextEdit||(AnnotatedTextEdit={}));var TextDocumentEdit;(function(Ws){function ws(si,ii){return{textDocument:si,edits:ii}}Ws.create=ws;function oi(si){let ii=si;return Is.defined(ii)&&OptionalVersionedTextDocumentIdentifier.is(ii.textDocument)&&Array.isArray(ii.edits)}Ws.is=oi})(TextDocumentEdit||(TextDocumentEdit={}));var CreateFile;(function(Ws){function ws(si,ii,ai){let li={kind:"create",uri:si};return ii!==void 0&&(ii.overwrite!==void 0||ii.ignoreIfExists!==void 0)&&(li.options=ii),ai!==void 0&&(li.annotationId=ai),li}Ws.create=ws;function oi(si){let ii=si;return ii&&ii.kind==="create"&&Is.string(ii.uri)&&(ii.options===void 0||(ii.options.overwrite===void 0||Is.boolean(ii.options.overwrite))&&(ii.options.ignoreIfExists===void 0||Is.boolean(ii.options.ignoreIfExists)))&&(ii.annotationId===void 0||ChangeAnnotationIdentifier.is(ii.annotationId))}Ws.is=oi})(CreateFile||(CreateFile={}));var RenameFile;(function(Ws){function ws(si,ii,ai,li){let ci={kind:"rename",oldUri:si,newUri:ii};return ai!==void 0&&(ai.overwrite!==void 0||ai.ignoreIfExists!==void 0)&&(ci.options=ai),li!==void 0&&(ci.annotationId=li),ci}Ws.create=ws;function oi(si){let ii=si;return ii&&ii.kind==="rename"&&Is.string(ii.oldUri)&&Is.string(ii.newUri)&&(ii.options===void 0||(ii.options.overwrite===void 0||Is.boolean(ii.options.overwrite))&&(ii.options.ignoreIfExists===void 0||Is.boolean(ii.options.ignoreIfExists)))&&(ii.annotationId===void 0||ChangeAnnotationIdentifier.is(ii.annotationId))}Ws.is=oi})(RenameFile||(RenameFile={}));var DeleteFile;(function(Ws){function ws(si,ii,ai){let li={kind:"delete",uri:si};return ii!==void 0&&(ii.recursive!==void 0||ii.ignoreIfNotExists!==void 0)&&(li.options=ii),ai!==void 0&&(li.annotationId=ai),li}Ws.create=ws;function oi(si){let ii=si;return ii&&ii.kind==="delete"&&Is.string(ii.uri)&&(ii.options===void 0||(ii.options.recursive===void 0||Is.boolean(ii.options.recursive))&&(ii.options.ignoreIfNotExists===void 0||Is.boolean(ii.options.ignoreIfNotExists)))&&(ii.annotationId===void 0||ChangeAnnotationIdentifier.is(ii.annotationId))}Ws.is=oi})(DeleteFile||(DeleteFile={}));var WorkspaceEdit;(function(Ws){function ws(oi){let si=oi;return si&&(si.changes!==void 0||si.documentChanges!==void 0)&&(si.documentChanges===void 0||si.documentChanges.every(ii=>Is.string(ii.kind)?CreateFile.is(ii)||RenameFile.is(ii)||DeleteFile.is(ii):TextDocumentEdit.is(ii)))}Ws.is=ws})(WorkspaceEdit||(WorkspaceEdit={}));var TextDocumentIdentifier;(function(Ws){function ws(si){return{uri:si}}Ws.create=ws;function oi(si){let ii=si;return Is.defined(ii)&&Is.string(ii.uri)}Ws.is=oi})(TextDocumentIdentifier||(TextDocumentIdentifier={}));var VersionedTextDocumentIdentifier;(function(Ws){function ws(si,ii){return{uri:si,version:ii}}Ws.create=ws;function oi(si){let ii=si;return Is.defined(ii)&&Is.string(ii.uri)&&Is.integer(ii.version)}Ws.is=oi})(VersionedTextDocumentIdentifier||(VersionedTextDocumentIdentifier={}));var OptionalVersionedTextDocumentIdentifier;(function(Ws){function ws(si,ii){return{uri:si,version:ii}}Ws.create=ws;function oi(si){let ii=si;return Is.defined(ii)&&Is.string(ii.uri)&&(ii.version===null||Is.integer(ii.version))}Ws.is=oi})(OptionalVersionedTextDocumentIdentifier||(OptionalVersionedTextDocumentIdentifier={}));var TextDocumentItem;(function(Ws){function ws(si,ii,ai,li){return{uri:si,languageId:ii,version:ai,text:li}}Ws.create=ws;function oi(si){let ii=si;return Is.defined(ii)&&Is.string(ii.uri)&&Is.string(ii.languageId)&&Is.integer(ii.version)&&Is.string(ii.text)}Ws.is=oi})(TextDocumentItem||(TextDocumentItem={}));var MarkupKind;(function(Ws){Ws.PlainText="plaintext",Ws.Markdown="markdown";function ws(oi){const si=oi;return si===Ws.PlainText||si===Ws.Markdown}Ws.is=ws})(MarkupKind||(MarkupKind={}));var MarkupContent;(function(Ws){function ws(oi){const si=oi;return Is.objectLiteral(oi)&&MarkupKind.is(si.kind)&&Is.string(si.value)}Ws.is=ws})(MarkupContent||(MarkupContent={}));var CompletionItemKind$1;(function(Ws){Ws.Text=1,Ws.Method=2,Ws.Function=3,Ws.Constructor=4,Ws.Field=5,Ws.Variable=6,Ws.Class=7,Ws.Interface=8,Ws.Module=9,Ws.Property=10,Ws.Unit=11,Ws.Value=12,Ws.Enum=13,Ws.Keyword=14,Ws.Snippet=15,Ws.Color=16,Ws.File=17,Ws.Reference=18,Ws.Folder=19,Ws.EnumMember=20,Ws.Constant=21,Ws.Struct=22,Ws.Event=23,Ws.Operator=24,Ws.TypeParameter=25})(CompletionItemKind$1||(CompletionItemKind$1={}));var InsertTextFormat;(function(Ws){Ws.PlainText=1,Ws.Snippet=2})(InsertTextFormat||(InsertTextFormat={}));var CompletionItemTag;(function(Ws){Ws.Deprecated=1})(CompletionItemTag||(CompletionItemTag={}));var InsertReplaceEdit;(function(Ws){function ws(si,ii,ai){return{newText:si,insert:ii,replace:ai}}Ws.create=ws;function oi(si){const ii=si;return ii&&Is.string(ii.newText)&&Range$1.is(ii.insert)&&Range$1.is(ii.replace)}Ws.is=oi})(InsertReplaceEdit||(InsertReplaceEdit={}));var InsertTextMode;(function(Ws){Ws.asIs=1,Ws.adjustIndentation=2})(InsertTextMode||(InsertTextMode={}));var CompletionItemLabelDetails;(function(Ws){function ws(oi){const si=oi;return si&&(Is.string(si.detail)||si.detail===void 0)&&(Is.string(si.description)||si.description===void 0)}Ws.is=ws})(CompletionItemLabelDetails||(CompletionItemLabelDetails={}));var CompletionItem;(function(Ws){function ws(oi){return{label:oi}}Ws.create=ws})(CompletionItem||(CompletionItem={}));var CompletionList;(function(Ws){function ws(oi,si){return{items:oi||[],isIncomplete:!!si}}Ws.create=ws})(CompletionList||(CompletionList={}));var MarkedString;(function(Ws){function ws(si){return si.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}Ws.fromPlainText=ws;function oi(si){const ii=si;return Is.string(ii)||Is.objectLiteral(ii)&&Is.string(ii.language)&&Is.string(ii.value)}Ws.is=oi})(MarkedString||(MarkedString={}));var Hover;(function(Ws){function ws(oi){let si=oi;return!!si&&Is.objectLiteral(si)&&(MarkupContent.is(si.contents)||MarkedString.is(si.contents)||Is.typedArray(si.contents,MarkedString.is))&&(oi.range===void 0||Range$1.is(oi.range))}Ws.is=ws})(Hover||(Hover={}));var ParameterInformation;(function(Ws){function ws(oi,si){return si?{label:oi,documentation:si}:{label:oi}}Ws.create=ws})(ParameterInformation||(ParameterInformation={}));var SignatureInformation;(function(Ws){function ws(oi,si,...ii){let ai={label:oi};return Is.defined(si)&&(ai.documentation=si),Is.defined(ii)?ai.parameters=ii:ai.parameters=[],ai}Ws.create=ws})(SignatureInformation||(SignatureInformation={}));var DocumentHighlightKind;(function(Ws){Ws.Text=1,Ws.Read=2,Ws.Write=3})(DocumentHighlightKind||(DocumentHighlightKind={}));var DocumentHighlight;(function(Ws){function ws(oi,si){let ii={range:oi};return Is.number(si)&&(ii.kind=si),ii}Ws.create=ws})(DocumentHighlight||(DocumentHighlight={}));var SymbolKind;(function(Ws){Ws.File=1,Ws.Module=2,Ws.Namespace=3,Ws.Package=4,Ws.Class=5,Ws.Method=6,Ws.Property=7,Ws.Field=8,Ws.Constructor=9,Ws.Enum=10,Ws.Interface=11,Ws.Function=12,Ws.Variable=13,Ws.Constant=14,Ws.String=15,Ws.Number=16,Ws.Boolean=17,Ws.Array=18,Ws.Object=19,Ws.Key=20,Ws.Null=21,Ws.EnumMember=22,Ws.Struct=23,Ws.Event=24,Ws.Operator=25,Ws.TypeParameter=26})(SymbolKind||(SymbolKind={}));var SymbolTag;(function(Ws){Ws.Deprecated=1})(SymbolTag||(SymbolTag={}));var SymbolInformation;(function(Ws){function ws(oi,si,ii,ai,li){let ci={name:oi,kind:si,location:{uri:ai,range:ii}};return li&&(ci.containerName=li),ci}Ws.create=ws})(SymbolInformation||(SymbolInformation={}));var WorkspaceSymbol;(function(Ws){function ws(oi,si,ii,ai){return ai!==void 0?{name:oi,kind:si,location:{uri:ii,range:ai}}:{name:oi,kind:si,location:{uri:ii}}}Ws.create=ws})(WorkspaceSymbol||(WorkspaceSymbol={}));var DocumentSymbol;(function(Ws){function ws(si,ii,ai,li,ci,ui){let di={name:si,detail:ii,kind:ai,range:li,selectionRange:ci};return ui!==void 0&&(di.children=ui),di}Ws.create=ws;function oi(si){let ii=si;return ii&&Is.string(ii.name)&&Is.number(ii.kind)&&Range$1.is(ii.range)&&Range$1.is(ii.selectionRange)&&(ii.detail===void 0||Is.string(ii.detail))&&(ii.deprecated===void 0||Is.boolean(ii.deprecated))&&(ii.children===void 0||Array.isArray(ii.children))&&(ii.tags===void 0||Array.isArray(ii.tags))}Ws.is=oi})(DocumentSymbol||(DocumentSymbol={}));var CodeActionKind;(function(Ws){Ws.Empty="",Ws.QuickFix="quickfix",Ws.Refactor="refactor",Ws.RefactorExtract="refactor.extract",Ws.RefactorInline="refactor.inline",Ws.RefactorRewrite="refactor.rewrite",Ws.Source="source",Ws.SourceOrganizeImports="source.organizeImports",Ws.SourceFixAll="source.fixAll"})(CodeActionKind||(CodeActionKind={}));var CodeActionTriggerKind;(function(Ws){Ws.Invoked=1,Ws.Automatic=2})(CodeActionTriggerKind||(CodeActionTriggerKind={}));var CodeActionContext;(function(Ws){function ws(si,ii,ai){let li={diagnostics:si};return ii!=null&&(li.only=ii),ai!=null&&(li.triggerKind=ai),li}Ws.create=ws;function oi(si){let ii=si;return Is.defined(ii)&&Is.typedArray(ii.diagnostics,Diagnostic.is)&&(ii.only===void 0||Is.typedArray(ii.only,Is.string))&&(ii.triggerKind===void 0||ii.triggerKind===CodeActionTriggerKind.Invoked||ii.triggerKind===CodeActionTriggerKind.Automatic)}Ws.is=oi})(CodeActionContext||(CodeActionContext={}));var CodeAction;(function(Ws){function ws(si,ii,ai){let li={title:si},ci=!0;return typeof ii=="string"?(ci=!1,li.kind=ii):Command.is(ii)?li.command=ii:li.edit=ii,ci&&ai!==void 0&&(li.kind=ai),li}Ws.create=ws;function oi(si){let ii=si;return ii&&Is.string(ii.title)&&(ii.diagnostics===void 0||Is.typedArray(ii.diagnostics,Diagnostic.is))&&(ii.kind===void 0||Is.string(ii.kind))&&(ii.edit!==void 0||ii.command!==void 0)&&(ii.command===void 0||Command.is(ii.command))&&(ii.isPreferred===void 0||Is.boolean(ii.isPreferred))&&(ii.edit===void 0||WorkspaceEdit.is(ii.edit))}Ws.is=oi})(CodeAction||(CodeAction={}));var CodeLens;(function(Ws){function ws(si,ii){let ai={range:si};return Is.defined(ii)&&(ai.data=ii),ai}Ws.create=ws;function oi(si){let ii=si;return Is.defined(ii)&&Range$1.is(ii.range)&&(Is.undefined(ii.command)||Command.is(ii.command))}Ws.is=oi})(CodeLens||(CodeLens={}));var FormattingOptions;(function(Ws){function ws(si,ii){return{tabSize:si,insertSpaces:ii}}Ws.create=ws;function oi(si){let ii=si;return Is.defined(ii)&&Is.uinteger(ii.tabSize)&&Is.boolean(ii.insertSpaces)}Ws.is=oi})(FormattingOptions||(FormattingOptions={}));var DocumentLink;(function(Ws){function ws(si,ii,ai){return{range:si,target:ii,data:ai}}Ws.create=ws;function oi(si){let ii=si;return Is.defined(ii)&&Range$1.is(ii.range)&&(Is.undefined(ii.target)||Is.string(ii.target))}Ws.is=oi})(DocumentLink||(DocumentLink={}));var SelectionRange;(function(Ws){function ws(si,ii){return{range:si,parent:ii}}Ws.create=ws;function oi(si){let ii=si;return Is.objectLiteral(ii)&&Range$1.is(ii.range)&&(ii.parent===void 0||Ws.is(ii.parent))}Ws.is=oi})(SelectionRange||(SelectionRange={}));var SemanticTokenTypes;(function(Ws){Ws.namespace="namespace",Ws.type="type",Ws.class="class",Ws.enum="enum",Ws.interface="interface",Ws.struct="struct",Ws.typeParameter="typeParameter",Ws.parameter="parameter",Ws.variable="variable",Ws.property="property",Ws.enumMember="enumMember",Ws.event="event",Ws.function="function",Ws.method="method",Ws.macro="macro",Ws.keyword="keyword",Ws.modifier="modifier",Ws.comment="comment",Ws.string="string",Ws.number="number",Ws.regexp="regexp",Ws.operator="operator",Ws.decorator="decorator"})(SemanticTokenTypes||(SemanticTokenTypes={}));var SemanticTokenModifiers;(function(Ws){Ws.declaration="declaration",Ws.definition="definition",Ws.readonly="readonly",Ws.static="static",Ws.deprecated="deprecated",Ws.abstract="abstract",Ws.async="async",Ws.modification="modification",Ws.documentation="documentation",Ws.defaultLibrary="defaultLibrary"})(SemanticTokenModifiers||(SemanticTokenModifiers={}));var SemanticTokens;(function(Ws){function ws(oi){const si=oi;return Is.objectLiteral(si)&&(si.resultId===void 0||typeof si.resultId=="string")&&Array.isArray(si.data)&&(si.data.length===0||typeof si.data[0]=="number")}Ws.is=ws})(SemanticTokens||(SemanticTokens={}));var InlineValueText;(function(Ws){function ws(si,ii){return{range:si,text:ii}}Ws.create=ws;function oi(si){const ii=si;return ii!=null&&Range$1.is(ii.range)&&Is.string(ii.text)}Ws.is=oi})(InlineValueText||(InlineValueText={}));var InlineValueVariableLookup;(function(Ws){function ws(si,ii,ai){return{range:si,variableName:ii,caseSensitiveLookup:ai}}Ws.create=ws;function oi(si){const ii=si;return ii!=null&&Range$1.is(ii.range)&&Is.boolean(ii.caseSensitiveLookup)&&(Is.string(ii.variableName)||ii.variableName===void 0)}Ws.is=oi})(InlineValueVariableLookup||(InlineValueVariableLookup={}));var InlineValueEvaluatableExpression;(function(Ws){function ws(si,ii){return{range:si,expression:ii}}Ws.create=ws;function oi(si){const ii=si;return ii!=null&&Range$1.is(ii.range)&&(Is.string(ii.expression)||ii.expression===void 0)}Ws.is=oi})(InlineValueEvaluatableExpression||(InlineValueEvaluatableExpression={}));var InlineValueContext;(function(Ws){function ws(si,ii){return{frameId:si,stoppedLocation:ii}}Ws.create=ws;function oi(si){const ii=si;return Is.defined(ii)&&Range$1.is(si.stoppedLocation)}Ws.is=oi})(InlineValueContext||(InlineValueContext={}));var InlayHintKind;(function(Ws){Ws.Type=1,Ws.Parameter=2;function ws(oi){return oi===1||oi===2}Ws.is=ws})(InlayHintKind||(InlayHintKind={}));var InlayHintLabelPart;(function(Ws){function ws(si){return{value:si}}Ws.create=ws;function oi(si){const ii=si;return Is.objectLiteral(ii)&&(ii.tooltip===void 0||Is.string(ii.tooltip)||MarkupContent.is(ii.tooltip))&&(ii.location===void 0||Location.is(ii.location))&&(ii.command===void 0||Command.is(ii.command))}Ws.is=oi})(InlayHintLabelPart||(InlayHintLabelPart={}));var InlayHint;(function(Ws){function ws(si,ii,ai){const li={position:si,label:ii};return ai!==void 0&&(li.kind=ai),li}Ws.create=ws;function oi(si){const ii=si;return Is.objectLiteral(ii)&&Position$2.is(ii.position)&&(Is.string(ii.label)||Is.typedArray(ii.label,InlayHintLabelPart.is))&&(ii.kind===void 0||InlayHintKind.is(ii.kind))&&ii.textEdits===void 0||Is.typedArray(ii.textEdits,TextEdit.is)&&(ii.tooltip===void 0||Is.string(ii.tooltip)||MarkupContent.is(ii.tooltip))&&(ii.paddingLeft===void 0||Is.boolean(ii.paddingLeft))&&(ii.paddingRight===void 0||Is.boolean(ii.paddingRight))}Ws.is=oi})(InlayHint||(InlayHint={}));var StringValue;(function(Ws){function ws(oi){return{kind:"snippet",value:oi}}Ws.createSnippet=ws})(StringValue||(StringValue={}));var InlineCompletionItem;(function(Ws){function ws(oi,si,ii,ai){return{insertText:oi,filterText:si,range:ii,command:ai}}Ws.create=ws})(InlineCompletionItem||(InlineCompletionItem={}));var InlineCompletionList;(function(Ws){function ws(oi){return{items:oi}}Ws.create=ws})(InlineCompletionList||(InlineCompletionList={}));var InlineCompletionTriggerKind;(function(Ws){Ws.Invoked=0,Ws.Automatic=1})(InlineCompletionTriggerKind||(InlineCompletionTriggerKind={}));var SelectedCompletionInfo;(function(Ws){function ws(oi,si){return{range:oi,text:si}}Ws.create=ws})(SelectedCompletionInfo||(SelectedCompletionInfo={}));var InlineCompletionContext;(function(Ws){function ws(oi,si){return{triggerKind:oi,selectedCompletionInfo:si}}Ws.create=ws})(InlineCompletionContext||(InlineCompletionContext={}));var WorkspaceFolder;(function(Ws){function ws(oi){const si=oi;return Is.objectLiteral(si)&&URI.is(si.uri)&&Is.string(si.name)}Ws.is=ws})(WorkspaceFolder||(WorkspaceFolder={}));var TextDocument;(function(Ws){function ws(ai,li,ci,ui){return new FullTextDocument(ai,li,ci,ui)}Ws.create=ws;function oi(ai){let li=ai;return!!(Is.defined(li)&&Is.string(li.uri)&&(Is.undefined(li.languageId)||Is.string(li.languageId))&&Is.uinteger(li.lineCount)&&Is.func(li.getText)&&Is.func(li.positionAt)&&Is.func(li.offsetAt))}Ws.is=oi;function si(ai,li){let ci=ai.getText(),ui=ii(li,(hi,pi)=>{let ha=hi.range.start.line-pi.range.start.line;return ha===0?hi.range.start.character-pi.range.start.character:ha}),di=ci.length;for(let hi=ui.length-1;hi>=0;hi--){let pi=ui[hi],ha=ai.offsetAt(pi.range.start),ga=ai.offsetAt(pi.range.end);if(ga<=di)ci=ci.substring(0,ha)+pi.newText+ci.substring(ga,ci.length);else throw new Error("Overlapping edit");di=ha}return ci}Ws.applyEdits=si;function ii(ai,li){if(ai.length<=1)return ai;const ci=ai.length/2|0,ui=ai.slice(0,ci),di=ai.slice(ci);ii(ui,li),ii(di,li);let hi=0,pi=0,ha=0;for(;hi<ui.length&&pi<di.length;)li(ui[hi],di[pi])<=0?ai[ha++]=ui[hi++]:ai[ha++]=di[pi++];for(;hi<ui.length;)ai[ha++]=ui[hi++];for(;pi<di.length;)ai[ha++]=di[pi++];return ai}})(TextDocument||(TextDocument={}));class FullTextDocument{constructor(ws,oi,si,ii){this._uri=ws,this._languageId=oi,this._version=si,this._content=ii,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(ws){if(ws){let oi=this.offsetAt(ws.start),si=this.offsetAt(ws.end);return this._content.substring(oi,si)}return this._content}update(ws,oi){this._content=ws.text,this._version=oi,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let ws=[],oi=this._content,si=!0;for(let ii=0;ii<oi.length;ii++){si&&(ws.push(ii),si=!1);let ai=oi.charAt(ii);si=ai==="\r"||ai===`
|
|
@@ -342,5 +342,5 @@ ${Ws}`)}return!1}function createDefaultRules(){let Ws=["NoUnusedFragmentsRule","
|
|
|
342
342
|
"left editor"
|
|
343
343
|
"errors editor"
|
|
344
344
|
`,gridTemplateRows:"auto 1fr"},children:[jsxs("div",{className:"flex flex-col gap-2",style:{gridArea:"left"},children:[jsx(OperationForm,{operation:ws,onAddOperationAndInitialSchema:ai,updateOperationName:li,deleteOperation:ci,module:oi,allOperationNames:si}),jsx(OperationDescriptionForm,{operation:ws,focusOnMount:ws.id===ii,setOperationDescription:di})]}),jsx("div",{className:"relative top-8",style:{gridArea:"editor"},children:jsx(GraphqlEditor,{doc:ws.schema??"",updateDocumentInModel:ga,customLinter:va})}),jsxs("div",{style:{gridArea:"errors"},children:[jsx("h3",{className:"my-2 text-sm font-medium text-gray-700",children:"Reducer Exceptions"}),jsx(OperationErrors,{operation:ws,addOperationError:hi,deleteOperationError:pi,setOperationErrorName:ha})]})]})}function Operations({module:Ws,allOperations:ws,shouldFocusNewOperation:oi,updateOperationName:si,deleteOperation:ii,addOperationAndInitialSchema:ai,addOperationError:li,deleteOperationError:ci,setOperationErrorName:ui,updateOperationSchema:di,setOperationDescription:hi}){const[pi,ha]=useState(null),ga=useId(),va=ws.map(wa=>wa.name).filter(Boolean),ba=useCallback(async(wa,xa)=>{const Ca=await ai(wa,xa);return Ca&&ha(Ca),Ca},[ai,ha]);return jsxs("div",{children:[Ws.operations.map(wa=>jsx("div",{children:jsx(Operation,{operation:wa,module:Ws,lastCreatedOperationId:pi,allOperationNames:va,addOperationError:li,deleteOperationError:ci,setOperationErrorName:ui,onAddOperationAndInitialSchema:ba,updateOperationName:si,deleteOperation:ii,updateOperationSchema:di,setOperationDescription:hi})},wa.id)),jsx("div",{className:"mt-6 w-1/2 pr-6",children:jsx(OperationForm,{onAddOperationAndInitialSchema:ba,updateOperationName:si,deleteOperation:ii,module:Ws,allOperationNames:va,focusOnMount:oi},ga)})]})}function Module(Ws){const{module:ws,modules:oi,allOperations:si,lastCreatedModuleId:ii,onAddModule:ai,updateModuleName:li,deleteModule:ci,updateOperationName:ui,deleteOperation:di,addOperationAndInitialSchema:hi,updateOperationSchema:pi,setOperationDescription:ha,addOperationError:ga,deleteOperationError:va,setOperationErrorName:ba}=Ws;return jsxs("div",{className:"relative rounded-3xl bg-gray-100 p-6",children:[jsxs("div",{className:"mb-2 w-1/2 pr-6",children:[jsx(ModuleForm,{modules:oi,module:ws,onAddModule:ai,updateModuleName:li}),!!ws&&jsx("button",{"aria-label":"Delete module",tabIndex:-1,className:"absolute right-1 top-1 p-2 text-gray-800 transition-colors hover:text-gray-500",onClick:()=>{ci(ws.id)},children:jsx(Kd,{name:"Xmark",size:32})})]}),!!ws&&jsx(Operations,{module:ws,allOperations:si,shouldFocusNewOperation:ws.id===ii,updateOperationName:ui,deleteOperation:di,addOperationAndInitialSchema:hi,updateOperationSchema:pi,setOperationDescription:ha,addOperationError:ga,deleteOperationError:va,setOperationErrorName:ba})]})}function Modules({modules:Ws,allOperations:ws,addModule:oi,updateModuleName:si,deleteModule:ii,updateOperationName:ai,deleteOperation:li,addOperationAndInitialSchema:ci,updateOperationSchema:ui,setOperationDescription:di,addOperationError:hi,deleteOperationError:pi,setOperationErrorName:ha}){const[ga,va]=useState(null),ba=useRef(null),wa=useCallback(async xa=>{var Ca;const el=await oi(xa);return el&&(va(el),(Ca=ba.current)==null||Ca.focus()),el},[oi,va]);return jsxs("div",{className:"flex flex-col gap-2",children:[Ws.map(xa=>jsx(Module,{module:xa,modules:Ws,allOperations:ws,lastCreatedModuleId:ga,onAddModule:wa,updateModuleName:si,deleteModule:ii,updateOperationName:ai,deleteOperation:li,addOperationAndInitialSchema:ci,updateOperationSchema:ui,setOperationDescription:di,addOperationError:hi,deleteOperationError:pi,setOperationErrorName:ha},xa.id)),jsx(Module,{modules:Ws,allOperations:ws,lastCreatedModuleId:ga,onAddModule:wa,updateModuleName:si,deleteModule:ii,updateOperationName:ai,deleteOperation:li,addOperationAndInitialSchema:ci,updateOperationSchema:ui,setOperationDescription:di,addOperationError:hi,deleteOperationError:pi,setOperationErrorName:ha},"add-module"),jsx("div",{ref:ba,tabIndex:0,className:"size-0 overflow-hidden","aria-hidden":"true"})]})}const Tabs=Zd,TabsList=React.forwardRef(({className:Ws,...ws},oi)=>jsx(Qd,{ref:oi,className:cn("flex items-center justify-center rounded-xl bg-slate-50 p-1 shadow-[inset_0px_0px_2px_rgba(255,255,255,0.50)]",Ws),...ws}));TabsList.displayName=Qd.displayName;const TabsTrigger=React.forwardRef(({className:Ws,...ws},oi)=>jsx(Jd,{ref:oi,className:cn("flex w-full items-center justify-center whitespace-nowrap rounded-lg p-1 text-sm text-gray-500 transition-all disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-gray-50 data-[state=active]:text-gray-800 data-[state=active]:shadow-[0px_16px_16px_-4px_rgba(0,0,0,0.10)]",Ws),...ws}));TabsTrigger.displayName=Jd.displayName;const TabsContent=React.forwardRef(({className:Ws,...ws},oi)=>jsx(ef,{ref:oi,className:cn("",Ws),...ws}));TabsContent.displayName=ef.displayName;const Button=forwardRef((Ws,ws)=>{const{className:oi,...si}=Ws;return jsx("button",{ref:ws,...si,className:cn("h-10 whitespace-nowrap rounded-md border border-gray-200 bg-gray-50 px-4 py-2 text-sm font-medium text-gray-800 transition-colors hover:bg-gray-100 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",oi)})});function StateEditor({modelName:Ws,stateSchema:ws,initialValue:oi,setStateSchema:si,setInitialState:ii,scope:ai}){const li=useSchemaContext(),[ci,ui]=useState(!1),di=useCallback(va=>ensureValidStateSchemaName(va,Ws,ai),[Ws,ai]),hi=useCallback(()=>{ui(va=>!va)},[]),pi=useCallback(va=>si(va,ai),[si,ai]),ha=useCallback(va=>ii(va,ai),[ii,ai]),ga=useCallback(()=>{const va=makeMinimalObjectFromSDL(li,ws,oi?JSON.parse(oi):{});ii(va,ai)},[li,ws,oi,ii,ai]);return jsxs("div",{className:"grid grid-cols-2 gap-4",children:[jsxs("div",{children:[jsxs("h3",{className:"mb-2 text-lg capitalize",children:[ai," state schema"]}),jsxs(Button,{onClick:hi,className:"mb-2 flex w-fit items-center gap-2",children:[ci?"Hide":"Show"," standard library",jsx("svg",{className:cn("inline-block transition-transform",ci?"rotate-180":"rotate-0"),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M11.9883 6.01172C11.4363 6.01172 10.9883 6.45972 10.9883 7.01172V13.0117H6.98828L11.9883 18.0117L16.9883 13.0117H12.9883V7.01172C12.9883 6.45972 12.5403 6.01172 11.9883 6.01172Z",fill:"black"})})]}),ci&&jsx(GraphqlEditor,{doc:typeDefsDoc,readonly:!0}),jsx(GraphqlEditor,{doc:ws,updateDocumentInModel:pi,customLinter:di})]}),jsxs("div",{children:[jsxs("div",{className:"flex flex-col items-end",children:[jsxs("h3",{className:"mb-2 text-right text-lg capitalize",children:[ai," state initial value"]}),jsxs(Button,{onClick:ga,className:"mb-2 flex w-fit items-center gap-2",children:["Sync with schema"," ",jsx("svg",{className:"inline-block",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsx("path",{d:"M8.00521 1.99219C6.63588 1.99219 5.32788 2.45152 4.27588 3.28419C3.98721 3.51219 3.94321 3.93285 4.17188 4.22151C4.40054 4.51018 4.82055 4.55418 5.10921 4.32552C5.92721 3.67819 6.93921 3.32552 8.00521 3.32552C10.5825 3.32552 12.6719 5.41485 12.6719 7.99218H11.3385L13.3385 10.6588L15.3385 7.99218H14.0052C14.0052 4.67818 11.3192 1.99219 8.00521 1.99219ZM2.67188 5.32552L0.671875 7.99218H2.00521C2.00521 11.3062 4.69121 13.9922 8.00521 13.9922C9.37521 13.9922 10.6825 13.5335 11.7345 12.7002C12.0232 12.4722 12.0672 12.0515 11.8385 11.7628C11.6099 11.4742 11.1899 11.4302 10.9012 11.6588C10.0825 12.3068 9.07188 12.6588 8.00521 12.6588C5.42788 12.6588 3.33854 10.5695 3.33854 7.99218H4.67188L2.67188 5.32552Z",fill:"#343839"})})]})]}),jsx(JSONEditor,{doc:oi,updateDocumentInModel:ha})]})]})}function StateSchemas({modelName:Ws,globalStateSchema:ws,localStateSchema:oi,globalStateInitialValue:si,localStateInitialValue:ii,setStateSchema:ai,setInitialState:li}){const ci=useCallback(()=>{const ui=makeInitialSchemaDoc(Ws,"local");ai(ui,"local"),li("","local")},[Ws,ai,li]);return jsxs(Tabs,{className:"pb-8",activationMode:"manual",defaultValue:"global",children:[jsx("div",{className:"my-6",children:jsxs(TabsList,{className:"mx-auto flex max-w-sm",children:[jsx(TabsTrigger,{value:"global",children:"Global"}),jsx(TabsTrigger,{value:"local",children:"Local"})]})}),jsx(TabsContent,{value:"global",tabIndex:-1,children:jsx(StateEditor,{modelName:Ws,stateSchema:ws,initialValue:si,setStateSchema:ai,setInitialState:li,scope:"global"})}),jsx(TabsContent,{value:"local",tabIndex:-1,children:oi?jsx(StateEditor,{modelName:Ws,stateSchema:oi,initialValue:ii,setStateSchema:ai,setInitialState:li,scope:"local"}):jsxs("div",{className:"",children:[jsx("h3",{className:"mb-2 text-lg capitalize",children:"local state schema"}),jsx(Button,{onClick:ci,children:"Add local state"})]})})]})}function Editor(Ws){const{document:ws,documentNodeName:oi,dispatch:si}=Ws,{name:ii,id:ai,extension:li,description:ci,author:{name:ui,website:di}}=useMemo(()=>ws.state.global,[ws.state.global]),{state:{global:{schema:hi,initialValue:pi},local:{schema:ha,initialValue:ga}},modules:va}=useMemo(()=>ws.state.global.specifications[0],[ws.state.global.specifications[0]]),ba=useMemo(()=>va.flatMap(xd=>xd.operations),[va]),wa=useRef(!ii&&!!oi&&ba.length===0);useEffect(()=>{!wa.current||!oi||(si(actions.setModelName({name:oi})),initializeModelSchema({modelName:oi,setStateSchema:(xd,Fd)=>{si(actions.setStateSchema({schema:xd,scope:Fd}))}}),wa.current=!1)},[oi]);const xa=useMemo(()=>ba.flatMap(xd=>xd.schema??[]).join(`
|
|
345
|
-
`),[ba]),Ca=useCallback(xd=>{compareStringsWithoutWhitespace(xd,ai)||si(actions.setModelId({id:xd}))},[ai]),el=useCallback(xd=>{compareStringsWithoutWhitespace(xd,ci)||si(actions.setModelDescription({description:xd}))},[ci]),ku=useCallback(xd=>{compareStringsWithoutWhitespace(xd,li)||si(actions.setModelExtension({extension:xd}))},[li]),gd=useCallback(xd=>{compareStringsWithoutWhitespace(xd,ii)||si(actions.setModelName({name:xd}))},[ii]),Ed=useCallback(xd=>{compareStringsWithoutWhitespace(xd,ui)||si(actions.setAuthorName({authorName:xd}))},[ui]),Od=useCallback(xd=>{compareStringsWithoutWhitespace(xd,di??"")||si(actions.setAuthorWebsite({authorWebsite:xd}))},[di]),Nd=useCallback((xd,Fd)=>{compareStringsWithoutWhitespace(xd,Fd==="global"?hi:ha)||si(actions.setStateSchema({schema:xd,scope:Fd}))},[hi,ha]),Pd=useCallback((xd,Fd)=>{compareStringsWithoutWhitespace(xd,Fd==="global"?pi:ga)||si(actions.setInitialState({initialValue:xd,scope:Fd}))},[pi,ga]),Ld=useCallback(xd=>new Promise(Fd=>{try{if(va.some(af=>compareStringsWithoutWhitespace(af.name,xd))){Fd(void 0);return}const Vd=index.hashKey();si(actions.addModule({id:Vd,name:xd})),Fd(Vd)}catch(Vd){console.error("Failed to add module:",Vd),Fd(void 0)}}),[va]),rf=useCallback((xd,Fd)=>{va.some(Vd=>compareStringsWithoutWhitespace(Vd.name,Fd))||si(actions.setModuleName({id:xd,name:Fd}))},[va]),
|
|
346
|
-
//# sourceMappingURL=editor-
|
|
345
|
+
`),[ba]),Ca=useCallback(xd=>{compareStringsWithoutWhitespace(xd,ai)||si(actions.setModelId({id:xd}))},[ai]),el=useCallback(xd=>{compareStringsWithoutWhitespace(xd,ci)||si(actions.setModelDescription({description:xd}))},[ci]),ku=useCallback(xd=>{compareStringsWithoutWhitespace(xd,li)||si(actions.setModelExtension({extension:xd}))},[li]),gd=useCallback(xd=>{compareStringsWithoutWhitespace(xd,ii)||si(actions.setModelName({name:xd}))},[ii]),Ed=useCallback(xd=>{compareStringsWithoutWhitespace(xd,ui)||si(actions.setAuthorName({authorName:xd}))},[ui]),Od=useCallback(xd=>{compareStringsWithoutWhitespace(xd,di??"")||si(actions.setAuthorWebsite({authorWebsite:xd}))},[di]),Nd=useCallback((xd,Fd)=>{compareStringsWithoutWhitespace(xd,Fd==="global"?hi:ha)||si(actions.setStateSchema({schema:xd,scope:Fd}))},[hi,ha]),Pd=useCallback((xd,Fd)=>{compareStringsWithoutWhitespace(xd,Fd==="global"?pi:ga)||si(actions.setInitialState({initialValue:xd,scope:Fd}))},[pi,ga]),Ld=useCallback(xd=>new Promise(Fd=>{try{if(va.some(af=>compareStringsWithoutWhitespace(af.name,xd))){Fd(void 0);return}const Vd=index.hashKey();si(actions.addModule({id:Vd,name:xd})),Fd(Vd)}catch(Vd){console.error("Failed to add module:",Vd),Fd(void 0)}}),[va]),rf=useCallback((xd,Fd)=>{va.some(Vd=>compareStringsWithoutWhitespace(Vd.name,Fd))||si(actions.setModuleName({id:xd,name:Fd}))},[va]),kd=useCallback(xd=>si(actions.deleteModule({id:xd})),[]),Md=useCallback((xd,Fd)=>new Promise(Vd=>{var af;try{if((((af=va.find(uf=>uf.id===xd))==null?void 0:af.operations.map(uf=>uf.name).filter(Boolean))??[]).some(uf=>compareStringsWithoutWhitespace(uf,Fd))){Vd(void 0);return}const ff=index.hashKey();si(actions.addOperation({id:ff,moduleId:xd,name:Fd})),Vd(ff)}catch(ff){console.error("Failed to add operation:",ff),Vd(void 0)}}),[va]),Td=useCallback((xd,Fd)=>{const Vd=va.find(af=>af.operations.some(ff=>ff.id===xd));((Vd==null?void 0:Vd.operations.map(af=>af.name).filter(Boolean))??[]).some(af=>compareStringsWithoutWhitespace(af,Fd))||si(actions.setOperationName({id:xd,name:Fd}))},[va]),wd=useCallback((xd,Fd)=>{const Vd=ba.find(af=>af.id===xd);Vd!=null&&Vd.schema&&compareStringsWithoutWhitespace(Fd,Vd.schema)||si(actions.setOperationSchema({id:xd,schema:Fd}))},[ba]),Cd=useCallback((xd,Fd)=>{var Vd;const af=((Vd=ba.find(ff=>ff.id===xd))==null?void 0:Vd.description)??"";compareStringsWithoutWhitespace(af,Fd)||si(actions.setOperationDescription({id:xd,description:Fd}))},[ba]),sf=useCallback(xd=>si(actions.deleteOperation({id:xd})),[]),of=useCallback((xd,Fd)=>new Promise(Vd=>{try{const af=ba.find(uf=>uf.id===xd);if(((af==null?void 0:af.errors.map(uf=>uf.name).filter(Boolean))??[]).some(uf=>compareStringsWithoutWhitespace(uf,Fd))){Vd(void 0);return}const ff=index.hashKey();si(actions.addOperationError({id:ff,operationId:xd,errorName:Fd})),Vd(ff)}catch(af){console.error("Failed to add operation error:",af),Vd(void 0)}}),[ba]),Wd=useCallback(xd=>si(actions.deleteOperationError({id:xd})),[]),df=useCallback((xd,Fd,Vd)=>{const af=ba.find(ff=>ff.id===xd);((af==null?void 0:af.errors.map(ff=>ff.name).filter(Boolean))??[]).some(ff=>compareStringsWithoutWhitespace(ff,Vd))||si(actions.setOperationErrorName({id:Fd,errorName:Vd}))},[ba]),hf=useCallback(async(xd,Fd)=>{try{const Vd=await Md(xd,Fd);if(!Vd)return;try{return wd(Vd,makeOperationInitialDoc(Fd)),Vd}catch(af){console.error("Failed to update operation schema:",af);return}}catch(Vd){console.error("Failed to add operation and schema:",Vd);return}},[Md,wd]);return jsx("main",{className:"min-h-dvh bg-gray-50",children:jsx(SchemaContextProvider,{globalStateSchemaSdl:hi,localStateSchemaSdl:ha,operationSchemasSdl:xa,children:jsxs("div",{className:"mx-auto max-w-6xl px-4 pt-8",children:[jsx(ModelMetadata,{name:ii,documentType:ai,extension:li,description:ci,authorName:ui,authorWebsite:di??"",globalStateSchema:hi,localStateSchema:ha,setModelId:Ca,setModelDescription:el,setModelExtension:ku,setModelName:gd,setAuthorName:Ed,setAuthorWebsite:Od,setStateSchema:Nd}),jsx(Divider,{}),jsxs("div",{children:[jsx(StateSchemas,{modelName:ii,globalStateSchema:hi,globalStateInitialValue:pi,localStateSchema:ha,localStateInitialValue:ga,setStateSchema:Nd,setInitialState:Pd}),jsx(Divider,{}),jsx("h3",{className:"mb-6 text-lg",children:"Global Operations"}),jsx(Modules,{modules:va,allOperations:ba,addModule:Ld,updateModuleName:rf,deleteModule:kd,updateOperationName:Td,updateOperationSchema:wd,setOperationDescription:Cd,deleteOperation:sf,addOperationError:of,deleteOperationError:Wd,setOperationErrorName:df,addOperationAndInitialSchema:hf})]})]})})})}const editor=Object.freeze(Object.defineProperty({__proto__:null,default:Editor},Symbol.toStringTag,{value:"Module"})),y=P$5.lazyWithPreload(()=>__vitePreload(()=>import("./index-CLu1C_is-jUM7ckQa.js"),[]));function C(Ws,ws){return JSON.stringify(Ws).replace(/\s/g,"")===ws.replace(/\s/g,"")}function J({value:Ws,onChange:ws,theme:oi,onBlur:si,...ii}){const[ai,li]=useState(JSON.stringify(Ws,null,4));function ci(ui){if(ui)try{const di=JSON.parse(ui);ws(di)}catch{}}return useEffect(()=>{ci(ai)},[ai]),useEffect(()=>{C(Ws,ai)||li(JSON.stringify(Ws,null,4))},[Ws]),jsx(y,{height:"100%",language:"json",onChange:ui=>li(ui??""),theme:`vs-${oi}`,value:ai,...ii,onMount:ui=>{ui.onDidBlurEditorText(()=>{si==null||si(JSON.parse(ui.getValue()))})},options:{lineNumbers:"off",minimap:{enabled:!1},...ii.options}})}function k({dispatch:Ws,document:ws,context:oi}){const[si,ii]=useState(ws.state.global);useEffect(()=>{ii(ws.state.global)},[ws.state]);function ai(ci){Ws(BaseActions.loadState({state:{global:ci,local:ws.state.local},name:ws.name},0))}const li=ci=>{Ws(BaseActions.setName(ci))};return jsxs(DocumentEditor,{mode:oi.theme,children:[jsx(EditorToolbar,{center:[jsx(ToolbarButton,{onClick:()=>ai(si),children:"Save"},"save")],left:[jsx(ToolbarButton,{onClick:()=>Ws(BaseActions.undo(1)),children:"↺ undo"},"undo"),jsx(ToolbarButton,{onClick:()=>Ws(BaseActions.redo(1)),children:"↻ redo"},"redo")],right:[jsx(ToolbarButton,{children:"revision history"},"rev")]},"toolbar"),jsxs(EditorWorksheet,{children:[jsx("div",{style:{marginBottom:"1em"},children:jsx(TextInput,{onSubmit:li,placeholder:"Document name",size:"medium",theme:oi.theme,value:ws.name},"doc-title")}),jsx(J,{onBlur:ci=>ai(ci),onChange:ci=>ii(ci||{}),theme:oi.theme,value:si})]},"sheet")]})}export{k as default};
|
|
346
|
+
//# sourceMappingURL=editor-Ba951Cwc.js.map
|