hyper-scope-rails 1.0.0.alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +22 -0
- data/README.md +104 -0
- data/app/assets/javascripts/hyper-scope/extensions/turbo-drive.esm.js +4 -0
- data/app/assets/javascripts/hyper-scope/extensions/turbo-drive.esm.js.map +1 -0
- data/app/assets/javascripts/hyper-scope/extensions/turbo-drive.iife.js +4 -0
- data/app/assets/javascripts/hyper-scope/extensions/turbo-drive.iife.js.map +1 -0
- data/app/assets/javascripts/hyper-scope/extensions/turbo-frame.esm.js +4 -0
- data/app/assets/javascripts/hyper-scope/extensions/turbo-frame.esm.js.map +1 -0
- data/app/assets/javascripts/hyper-scope/extensions/turbo-frame.iife.js +4 -0
- data/app/assets/javascripts/hyper-scope/extensions/turbo-frame.iife.js.map +1 -0
- data/app/assets/javascripts/hyper-scope/extensions/validate.esm.js +4 -0
- data/app/assets/javascripts/hyper-scope/extensions/validate.esm.js.map +1 -0
- data/app/assets/javascripts/hyper-scope/extensions/validate.iife.js +4 -0
- data/app/assets/javascripts/hyper-scope/extensions/validate.iife.js.map +1 -0
- data/app/assets/javascripts/hyper-scope/global.esm.js +4 -0
- data/app/assets/javascripts/hyper-scope/global.esm.js.map +1 -0
- data/app/assets/javascripts/hyper-scope.esm.js +7 -0
- data/app/assets/javascripts/hyper-scope.esm.js.map +1 -0
- data/app/assets/javascripts/hyper-scope.iife.js +7 -0
- data/app/assets/javascripts/hyper-scope.iife.js.map +1 -0
- data/config/importmap.rb +16 -0
- data/jsbundle/extensions/turbo-drive.esm.js +25 -0
- data/jsbundle/extensions/turbo-frame.esm.js +43 -0
- data/jsbundle/extensions/validate.esm.js +182 -0
- data/jsbundle/hyper-scope.esm.js +4354 -0
- data/lib/hyper-scope-rails.rb +4 -0
- data/lib/hyper_scope/rails/engine.rb +59 -0
- data/lib/hyper_scope/rails/helper.rb +76 -0
- data/lib/hyper_scope/rails/version.rb +9 -0
- data/lib/hyper_scope/rails.rb +22 -0
- metadata +88 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/env.ts","../node_modules/@vue/shared/dist/shared.esm-bundler.js","../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js","../src/scheduler.ts","../src/context.ts","../src/directives/bind.ts","../src/utils.ts","../src/directives/on.ts","../src/directives/show.ts","../src/directives/text.ts","../src/directives/html.ts","../src/directives/model.ts","../src/eval.ts","../src/directives/effect.ts","../src/directives/index.ts","../src/directives/if.ts","../src/directives/for.ts","../src/directives/ref.ts","../src/async.ts","../src/scope.ts","../src/component.ts","../src/directives/await.ts","../src/walk.ts","../src/block.ts","../src/app.ts","../src/keep.ts","../src/snapshot.ts","../src/runtime.ts"],"sourcesContent":["// \nexport const DEV = process.env.NODE_ENV !== 'production'\n","/* \n \n \n \n */\n// @__NO_SIDE_EFFECTS__\nfunction makeMap(str) {\n const map = /* @__PURE__ */ Object.create(null);\n for (const key of str.split(\",\")) map[key] = 1;\n return (val) => val in map;\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // \n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // \n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return ((str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n });\n};\nconst camelizeRE = /-\\w/g;\nconst camelize = /* @__PURE__ */ cacheStringFunction((str) => {\n return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());\n});\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = /* @__PURE__ */ cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = /* @__PURE__ */ cacheStringFunction((str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = /* @__PURE__ */ cacheStringFunction((str) => {\n const s = str ? `on${capitalize(str)}` : ``;\n return s;\n});\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, ...arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](...arg);\n }\n};\nconst def = (obj, key, value, writable = false) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n writable,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\nfunction genCacheKey(source, options) {\n return source + JSON.stringify(\n options,\n (_, val) => typeof val === \"function\" ? val.toString() : val\n );\n}\n\nconst PatchFlags = {\n \"TEXT\": 1,\n \"1\": \"TEXT\",\n \"CLASS\": 2,\n \"2\": \"CLASS\",\n \"STYLE\": 4,\n \"4\": \"STYLE\",\n \"PROPS\": 8,\n \"8\": \"PROPS\",\n \"FULL_PROPS\": 16,\n \"16\": \"FULL_PROPS\",\n \"NEED_HYDRATION\": 32,\n \"32\": \"NEED_HYDRATION\",\n \"STABLE_FRAGMENT\": 64,\n \"64\": \"STABLE_FRAGMENT\",\n \"KEYED_FRAGMENT\": 128,\n \"128\": \"KEYED_FRAGMENT\",\n \"UNKEYED_FRAGMENT\": 256,\n \"256\": \"UNKEYED_FRAGMENT\",\n \"NEED_PATCH\": 512,\n \"512\": \"NEED_PATCH\",\n \"DYNAMIC_SLOTS\": 1024,\n \"1024\": \"DYNAMIC_SLOTS\",\n \"DEV_ROOT_FRAGMENT\": 2048,\n \"2048\": \"DEV_ROOT_FRAGMENT\",\n \"CACHED\": -1,\n \"-1\": \"CACHED\",\n \"BAIL\": -2,\n \"-2\": \"BAIL\"\n};\nconst PatchFlagNames = {\n [1]: `TEXT`,\n [2]: `CLASS`,\n [4]: `STYLE`,\n [8]: `PROPS`,\n [16]: `FULL_PROPS`,\n [32]: `NEED_HYDRATION`,\n [64]: `STABLE_FRAGMENT`,\n [128]: `KEYED_FRAGMENT`,\n [256]: `UNKEYED_FRAGMENT`,\n [512]: `NEED_PATCH`,\n [1024]: `DYNAMIC_SLOTS`,\n [2048]: `DEV_ROOT_FRAGMENT`,\n [-1]: `CACHED`,\n [-2]: `BAIL`\n};\n\nconst ShapeFlags = {\n \"ELEMENT\": 1,\n \"1\": \"ELEMENT\",\n \"FUNCTIONAL_COMPONENT\": 2,\n \"2\": \"FUNCTIONAL_COMPONENT\",\n \"STATEFUL_COMPONENT\": 4,\n \"4\": \"STATEFUL_COMPONENT\",\n \"TEXT_CHILDREN\": 8,\n \"8\": \"TEXT_CHILDREN\",\n \"ARRAY_CHILDREN\": 16,\n \"16\": \"ARRAY_CHILDREN\",\n \"SLOTS_CHILDREN\": 32,\n \"32\": \"SLOTS_CHILDREN\",\n \"TELEPORT\": 64,\n \"64\": \"TELEPORT\",\n \"SUSPENSE\": 128,\n \"128\": \"SUSPENSE\",\n \"COMPONENT_SHOULD_KEEP_ALIVE\": 256,\n \"256\": \"COMPONENT_SHOULD_KEEP_ALIVE\",\n \"COMPONENT_KEPT_ALIVE\": 512,\n \"512\": \"COMPONENT_KEPT_ALIVE\",\n \"COMPONENT\": 6,\n \"6\": \"COMPONENT\"\n};\n\nconst SlotFlags = {\n \"STABLE\": 1,\n \"1\": \"STABLE\",\n \"DYNAMIC\": 2,\n \"2\": \"DYNAMIC\",\n \"FORWARDED\": 3,\n \"3\": \"FORWARDED\"\n};\nconst slotFlagsText = {\n [1]: \"STABLE\",\n [2]: \"DYNAMIC\",\n [3]: \"FORWARDED\"\n};\n\nconst GLOBALS_ALLOWED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol\";\nconst isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);\nconst isGloballyWhitelisted = isGloballyAllowed;\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n start = Math.max(0, Math.min(start, source.length));\n end = Math.max(0, Math.min(end, source.length));\n if (start > end) return \"\";\n let lines = source.split(/(\\r?\\n)/);\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n lines = lines.filter((_, idx) => idx % 2 === 0);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\n if (count >= start) {\n for (let j = i - range; j <= i + range || end > count; j++) {\n if (j < 0 || j >= lines.length) continue;\n const line = j + 1;\n res.push(\n `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`\n );\n const lineLength = lines[j].length;\n const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\n if (j === i) {\n const pad = start - (count - (lineLength + newLineSeqLength));\n const length = Math.max(\n 1,\n end > count ? lineLength - pad : end - start\n );\n res.push(` | ` + \" \".repeat(pad) + \"^\".repeat(length));\n } else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + \"^\".repeat(length));\n }\n count += lineLength + newLineSeqLength;\n }\n }\n break;\n }\n }\n return res.join(\"\\n\");\n}\n\nfunction normalizeStyle(value) {\n if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n } else if (isString(value) || isObject(value)) {\n return value;\n }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\"(?:[^\"\\\\]|\\\\[^])*\"|'(?:[^'\\\\]|\\\\[^])*'|\\\\[^]|\\/\\*[^]*?\\*\\//g;\nfunction parseStringStyle(cssText) {\n const ret = {};\n cssText.replace(styleCommentRE, (match) => match.startsWith(\"/*\") ? \"\" : match).split(listDelimiterRE).forEach((item) => {\n if (item) {\n const tmp = item.split(propertyDelimiterRE);\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return ret;\n}\nfunction stringifyStyle(styles) {\n if (!styles) return \"\";\n if (isString(styles)) return styles;\n let ret = \"\";\n for (const key in styles) {\n const value = styles[key];\n if (isString(value) || typeof value === \"number\") {\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n ret += `${normalizedKey}:${value};`;\n }\n }\n return ret;\n}\nfunction normalizeClass(value) {\n let res = \"\";\n if (isString(value)) {\n res = value;\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + \" \";\n }\n }\n } else if (isObject(value)) {\n for (const name in value) {\n if (value[name]) {\n res += name + \" \";\n }\n }\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props) return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\nconst MATH_TAGS = \"annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics\";\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\nconst isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n\nconst specialBooleanAttrs = `itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\n specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\nfunction includeBooleanAttr(value) {\n return !!value || value === \"\";\n}\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u000d\\u0020]/;\nconst attrValidationCache = {};\nfunction isSSRSafeAttrName(name) {\n if (attrValidationCache.hasOwnProperty(name)) {\n return attrValidationCache[name];\n }\n const isUnsafe = unsafeAttrCharRE.test(name);\n if (isUnsafe) {\n console.error(`unsafe attribute name: ${name}`);\n }\n return attrValidationCache[name] = !isUnsafe;\n}\nconst propsToAttrMap = {\n acceptCharset: \"accept-charset\",\n className: \"class\",\n htmlFor: \"for\",\n httpEquiv: \"http-equiv\"\n};\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\n `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\n);\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\n `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\n);\nconst isKnownMathMLAttr = /* @__PURE__ */ makeMap(\n `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns`\n);\nfunction isRenderableAttrValue(value) {\n if (value == null) {\n return false;\n }\n const type = typeof value;\n return type === \"string\" || type === \"number\" || type === \"boolean\";\n}\n\nconst escapeRE = /[\"'&<>]/;\nfunction escapeHtml(string) {\n const str = \"\" + string;\n const match = escapeRE.exec(str);\n if (!match) {\n return str;\n }\n let html = \"\";\n let escaped;\n let index;\n let lastIndex = 0;\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escaped = \""\";\n break;\n case 38:\n escaped = \"&\";\n break;\n case 39:\n escaped = \"'\";\n break;\n case 60:\n escaped = \"<\";\n break;\n case 62:\n escaped = \">\";\n break;\n default:\n continue;\n }\n if (lastIndex !== index) {\n html += str.slice(lastIndex, index);\n }\n lastIndex = index + 1;\n html += escaped;\n }\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n}\nconst commentStripRE = /^(?:-?>)+|<!--|-->|--!>|<!-$/g;\nfunction escapeHtmlComment(src) {\n let prev;\n do {\n prev = src;\n src = src.replace(commentStripRE, \"\");\n } while (src !== prev);\n return src;\n}\nconst cssVarNameEscapeSymbolsRE = /[ !\"#$%&'()*+,./:;<=>?@[\\\\\\]^`{|}~]/g;\nfunction getEscapedCssVarName(key, doubleEscape) {\n return key.replace(\n cssVarNameEscapeSymbolsRE,\n (s) => doubleEscape ? s === '\"' ? '\\\\\\\\\\\\\"' : `\\\\\\\\${s}` : `\\\\${s}`\n );\n}\n\nfunction looseCompareArrays(a, b, seen) {\n if (a.length !== b.length) return false;\n let equal = true;\n for (let i = 0; equal && i < a.length; i++) {\n equal = looseEqual(a[i], b[i], seen);\n }\n return equal;\n}\nfunction looseCompareCollections(a, b, seen) {\n if (a.size !== b.size) return false;\n const candidates = Array.from(b);\n const matched = new Uint8Array(candidates.length);\n for (const item of a) {\n let index = -1;\n for (let i = 0; i < candidates.length; i++) {\n if (!matched[i] && looseEqual(item, candidates[i], seen)) {\n index = i;\n break;\n }\n }\n if (index < 0) return false;\n matched[index] = 1;\n }\n return true;\n}\nfunction looseCompareObjects(a, b, seen) {\n let aValidType = isMap(a);\n let bValidType = isMap(b);\n if (aValidType || bValidType) {\n return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;\n }\n aValidType = isSet(a);\n bValidType = isSet(b);\n if (aValidType || bValidType) {\n return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;\n }\n const aKeysCount = Object.keys(a).length;\n const bKeysCount = Object.keys(b).length;\n if (aKeysCount !== bKeysCount) {\n return false;\n }\n for (const key in a) {\n const aHasKey = a.hasOwnProperty(key);\n const bHasKey = b.hasOwnProperty(key);\n if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) {\n return false;\n }\n }\n return String(a) === String(b);\n}\nfunction looseCompareNested(a, b, seen, compare) {\n if (!seen) {\n seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];\n }\n const [seenA, seenB] = seen;\n if (seenA.has(a) || seenB.has(b)) {\n return seenA.get(a) === b && seenB.get(b) === a;\n }\n seenA.set(a, b);\n seenB.set(b, a);\n const equal = compare(a, b, seen);\n seenA.delete(a);\n seenB.delete(b);\n return equal;\n}\nfunction looseEqual(a, b, seen) {\n if (a === b) return true;\n let aValidType = isDate(a);\n let bValidType = isDate(b);\n if (aValidType || bValidType) {\n return aValidType && bValidType ? a.getTime() === b.getTime() : false;\n }\n aValidType = isSymbol(a);\n bValidType = isSymbol(b);\n if (aValidType || bValidType) {\n return a === b;\n }\n aValidType = isArray(a);\n bValidType = isArray(b);\n if (aValidType || bValidType) {\n return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;\n }\n aValidType = isObject(a);\n bValidType = isObject(b);\n if (aValidType || bValidType) {\n if (!aValidType || !bValidType) {\n return false;\n }\n return looseCompareNested(a, b, seen, looseCompareObjects);\n }\n return String(a) === String(b);\n}\nfunction looseIndexOf(arr, val) {\n return arr.findIndex((item) => looseEqual(item, val));\n}\n\nconst isRef = (val) => {\n return !!(val && val[\"__v_isRef\"] === true);\n};\nconst toDisplayString = (val) => {\n return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);\n};\nconst replacer = (_key, val) => {\n if (isRef(val)) {\n return replacer(_key, val.value);\n } else if (isMap(val)) {\n return {\n [`Map(${val.size})`]: [...val.entries()].reduce(\n (entries, [key, val2], i) => {\n entries[stringifySymbol(key, i) + \" =>\"] = val2;\n return entries;\n },\n {}\n )\n };\n } else if (isSet(val)) {\n return {\n [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))\n };\n } else if (isSymbol(val)) {\n return stringifySymbol(val);\n } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n return String(val);\n }\n return val;\n};\nconst stringifySymbol = (v, i = \"\") => {\n var _a;\n return (\n // \n // \n isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v\n );\n};\n\nfunction normalizeCssVarValue(value) {\n if (value == null) {\n return \"initial\";\n }\n if (typeof value === \"string\") {\n return value === \"\" ? \" \" : value;\n }\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n console.warn(\n \"[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:\",\n value\n );\n }\n }\n return String(value);\n}\n\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeCssVarValue, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\n","/* \n \n \n \n */\nimport { extend, hasChanged, isArray, isIntegerKey, isSymbol, isMap, hasOwn, isObject, makeMap, capitalize, toRawType, def, isFunction, EMPTY_OBJ, isSet, isPlainObject, remove, NOOP } from '@vue/shared';\n\nfunction warn(msg, ...args) {\n console.warn(`[Vue warn] ${msg}`, ...args);\n}\n\nlet activeEffectScope;\nclass EffectScope {\n // \n constructor(detached = false) {\n this.detached = detached;\n /* \n \n */\n this._active = true;\n /* \n \n */\n this._on = 0;\n /* \n \n */\n this.effects = [];\n /* \n \n */\n this.cleanups = [];\n this._isPaused = false;\n this._warnOnRun = true;\n this.__v_skip = true;\n if (!detached && activeEffectScope) {\n if (activeEffectScope.active) {\n this.parent = activeEffectScope;\n this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(\n this\n ) - 1;\n } else {\n this._active = false;\n this._warnOnRun = false;\n }\n }\n }\n get active() {\n return this._active;\n }\n pause() {\n if (this._active) {\n this._isPaused = true;\n let i, l;\n if (this.scopes) {\n const scopes = this.scopes.slice();\n for (i = 0, l = scopes.length; i < l; i++) {\n scopes[i].pause();\n }\n }\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].pause();\n }\n }\n }\n /* \n \n */\n resume() {\n if (this._active) {\n if (this._isPaused) {\n this._isPaused = false;\n let i, l;\n if (this.scopes) {\n const scopes = this.scopes.slice();\n for (i = 0, l = scopes.length; i < l; i++) {\n scopes[i].resume();\n }\n }\n const effects = this.effects.slice();\n for (i = 0, l = effects.length; i < l; i++) {\n effects[i].resume();\n }\n }\n }\n }\n run(fn) {\n if (this._active) {\n const currentEffectScope = activeEffectScope;\n try {\n activeEffectScope = this;\n return fn();\n } finally {\n activeEffectScope = currentEffectScope;\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && this._warnOnRun) {\n warn(`cannot run an inactive effect scope.`);\n }\n }\n /* \n \n \n */\n on() {\n if (++this._on === 1) {\n this.prevScope = activeEffectScope;\n activeEffectScope = this;\n }\n }\n /* \n \n \n */\n off() {\n if (this._on > 0 && --this._on === 0) {\n if (activeEffectScope === this) {\n activeEffectScope = this.prevScope;\n } else {\n let current = activeEffectScope;\n while (current) {\n if (current.prevScope === this) {\n current.prevScope = this.prevScope;\n break;\n }\n current = current.prevScope;\n }\n }\n this.prevScope = void 0;\n }\n }\n stop(fromParent) {\n if (this._active) {\n this._active = false;\n let i, l;\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].stop();\n }\n this.effects.length = 0;\n for (i = 0, l = this.cleanups.length; i < l; i++) {\n this.cleanups[i]();\n }\n this.cleanups.length = 0;\n if (this.scopes) {\n const scopes = this.scopes.slice();\n for (i = 0, l = scopes.length; i < l; i++) {\n scopes[i].stop(true);\n }\n this.scopes.length = 0;\n }\n if (!this.detached && this.parent && !fromParent) {\n const last = this.parent.scopes.pop();\n if (last && last !== this) {\n this.parent.scopes[this.index] = last;\n last.index = this.index;\n }\n }\n this.parent = void 0;\n }\n }\n}\nfunction effectScope(detached) {\n return new EffectScope(detached);\n}\nfunction getCurrentScope() {\n return activeEffectScope;\n}\nfunction onScopeDispose(fn, failSilently = false) {\n if (activeEffectScope) {\n if (activeEffectScope.active) {\n activeEffectScope.cleanups.push(fn);\n } else {\n fn();\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && !failSilently) {\n warn(\n `onScopeDispose() is called when there is no active effect scope to be associated with.`\n );\n }\n}\n\nlet activeSub;\nconst EffectFlags = {\n \"ACTIVE\": 1,\n \"1\": \"ACTIVE\",\n \"RUNNING\": 2,\n \"2\": \"RUNNING\",\n \"TRACKING\": 4,\n \"4\": \"TRACKING\",\n \"NOTIFIED\": 8,\n \"8\": \"NOTIFIED\",\n \"DIRTY\": 16,\n \"16\": \"DIRTY\",\n \"ALLOW_RECURSE\": 32,\n \"32\": \"ALLOW_RECURSE\",\n \"PAUSED\": 64,\n \"64\": \"PAUSED\",\n \"EVALUATED\": 128,\n \"128\": \"EVALUATED\"\n};\nconst pausedQueueEffects = /* @__PURE__ */ new WeakSet();\nclass ReactiveEffect {\n constructor(fn) {\n this.fn = fn;\n /* \n \n */\n this.deps = void 0;\n /* \n \n */\n this.depsTail = void 0;\n /* \n \n */\n this.flags = 1 | 4;\n /* \n \n */\n this.next = void 0;\n /* \n \n */\n this.cleanup = void 0;\n this.scheduler = void 0;\n if (activeEffectScope) {\n if (activeEffectScope.active) {\n activeEffectScope.effects.push(this);\n } else {\n this.flags &= -2;\n }\n }\n }\n pause() {\n this.flags |= 64;\n }\n resume() {\n if (this.flags & 64) {\n this.flags &= -65;\n if (pausedQueueEffects.has(this)) {\n pausedQueueEffects.delete(this);\n this.trigger();\n }\n }\n }\n /* \n \n */\n notify() {\n if (this.flags & 2 && !(this.flags & 32)) {\n return;\n }\n if (!(this.flags & 8)) {\n batch(this);\n }\n }\n run() {\n if (!(this.flags & 1)) {\n return this.fn();\n }\n this.flags |= 2;\n cleanupEffect(this);\n prepareDeps(this);\n const prevEffect = activeSub;\n const prevShouldTrack = shouldTrack;\n activeSub = this;\n shouldTrack = true;\n try {\n return this.fn();\n } finally {\n if (!!(process.env.NODE_ENV !== \"production\") && activeSub !== this) {\n warn(\n \"Active effect was not restored correctly - this is likely a Vue internal bug.\"\n );\n }\n cleanupDeps(this);\n activeSub = prevEffect;\n shouldTrack = prevShouldTrack;\n this.flags &= -3;\n }\n }\n stop() {\n if (this.flags & 1) {\n for (let link = this.deps; link; link = link.nextDep) {\n removeSub(link);\n }\n this.deps = this.depsTail = void 0;\n cleanupEffect(this);\n this.onStop && this.onStop();\n this.flags &= -2;\n }\n }\n trigger() {\n if (this.flags & 64) {\n pausedQueueEffects.add(this);\n } else if (this.scheduler) {\n this.scheduler();\n } else {\n this.runIfDirty();\n }\n }\n /* \n \n */\n runIfDirty() {\n if (isDirty(this)) {\n this.run();\n }\n }\n get dirty() {\n return isDirty(this);\n }\n}\nlet batchDepth = 0;\nlet batchedSub;\nlet batchedComputed;\nfunction batch(sub, isComputed = false) {\n sub.flags |= 8;\n if (isComputed) {\n sub.next = batchedComputed;\n batchedComputed = sub;\n return;\n }\n sub.next = batchedSub;\n batchedSub = sub;\n}\nfunction startBatch() {\n batchDepth++;\n}\nfunction endBatch() {\n if (--batchDepth > 0) {\n return;\n }\n if (batchedComputed) {\n let e = batchedComputed;\n batchedComputed = void 0;\n while (e) {\n const next = e.next;\n e.next = void 0;\n e.flags &= -9;\n e = next;\n }\n }\n let error;\n while (batchedSub) {\n let e = batchedSub;\n batchedSub = void 0;\n while (e) {\n const next = e.next;\n e.next = void 0;\n e.flags &= -9;\n if (e.flags & 1) {\n try {\n ;\n e.trigger();\n } catch (err) {\n if (!error) error = err;\n }\n }\n e = next;\n }\n }\n if (error) throw error;\n}\nfunction prepareDeps(sub) {\n for (let link = sub.deps; link; link = link.nextDep) {\n link.version = -1;\n link.prevActiveLink = link.dep.activeLink;\n link.dep.activeLink = link;\n }\n}\nfunction cleanupDeps(sub) {\n let head;\n let tail = sub.depsTail;\n let link = tail;\n while (link) {\n const prev = link.prevDep;\n if (link.version === -1) {\n if (link === tail) tail = prev;\n removeSub(link);\n removeDep(link);\n } else {\n head = link;\n }\n link.dep.activeLink = link.prevActiveLink;\n link.prevActiveLink = void 0;\n link = prev;\n }\n sub.deps = head;\n sub.depsTail = tail;\n}\nfunction isDirty(sub) {\n for (let link = sub.deps; link; link = link.nextDep) {\n if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {\n return true;\n }\n }\n if (sub._dirty) {\n return true;\n }\n return false;\n}\nfunction refreshComputed(computed) {\n if (computed.flags & 4 && !(computed.flags & 16)) {\n return;\n }\n computed.flags &= -17;\n if (computed.globalVersion === globalVersion) {\n return;\n }\n computed.globalVersion = globalVersion;\n if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {\n return;\n }\n computed.flags |= 2;\n const dep = computed.dep;\n const prevSub = activeSub;\n const prevShouldTrack = shouldTrack;\n activeSub = computed;\n shouldTrack = true;\n try {\n prepareDeps(computed);\n const value = computed.fn(computed._value);\n if (dep.version === 0 || hasChanged(value, computed._value)) {\n computed.flags |= 128;\n computed._value = value;\n dep.version++;\n }\n } catch (err) {\n dep.version++;\n throw err;\n } finally {\n activeSub = prevSub;\n shouldTrack = prevShouldTrack;\n cleanupDeps(computed);\n computed.flags &= -3;\n }\n}\nfunction removeSub(link, soft = false) {\n const { dep, prevSub, nextSub } = link;\n if (prevSub) {\n prevSub.nextSub = nextSub;\n link.prevSub = void 0;\n }\n if (nextSub) {\n nextSub.prevSub = prevSub;\n link.nextSub = void 0;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && dep.subsHead === link) {\n dep.subsHead = nextSub;\n }\n if (dep.subs === link) {\n dep.subs = prevSub;\n if (!prevSub && dep.computed) {\n dep.computed.flags &= -5;\n for (let l = dep.computed.deps; l; l = l.nextDep) {\n removeSub(l, true);\n }\n }\n }\n if (!soft && !--dep.sc && dep.map) {\n dep.map.delete(dep.key);\n }\n}\nfunction removeDep(link) {\n const { prevDep, nextDep } = link;\n if (prevDep) {\n prevDep.nextDep = nextDep;\n link.prevDep = void 0;\n }\n if (nextDep) {\n nextDep.prevDep = prevDep;\n link.nextDep = void 0;\n }\n}\nfunction effect(fn, options) {\n if (fn.effect instanceof ReactiveEffect) {\n fn = fn.effect.fn;\n }\n const e = new ReactiveEffect(fn);\n if (options) {\n extend(e, options);\n }\n try {\n e.run();\n } catch (err) {\n e.stop();\n throw err;\n }\n const runner = e.run.bind(e);\n runner.effect = e;\n return runner;\n}\nfunction stop(runner) {\n runner.effect.stop();\n}\nlet shouldTrack = true;\nconst trackStack = [];\nfunction pauseTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = false;\n}\nfunction enableTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = true;\n}\nfunction resetTracking() {\n const last = trackStack.pop();\n shouldTrack = last === void 0 ? true : last;\n}\nfunction onEffectCleanup(fn, failSilently = false) {\n if (activeSub instanceof ReactiveEffect) {\n activeSub.cleanup = fn;\n } else if (!!(process.env.NODE_ENV !== \"production\") && !failSilently) {\n warn(\n `onEffectCleanup() was called when there was no active effect to associate with.`\n );\n }\n}\nfunction cleanupEffect(e) {\n const { cleanup } = e;\n e.cleanup = void 0;\n if (cleanup) {\n const prevSub = activeSub;\n activeSub = void 0;\n try {\n cleanup();\n } finally {\n activeSub = prevSub;\n }\n }\n}\n\nlet globalVersion = 0;\nclass Link {\n constructor(sub, dep) {\n this.sub = sub;\n this.dep = dep;\n this.version = dep.version;\n this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;\n }\n}\nclass Dep {\n // \n constructor(computed) {\n this.computed = computed;\n this.version = 0;\n /* \n \n */\n this.activeLink = void 0;\n /* \n \n */\n this.subs = void 0;\n /* \n \n */\n this.map = void 0;\n this.key = void 0;\n /* \n \n */\n this.sc = 0;\n /* \n \n */\n this.__v_skip = true;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n this.subsHead = void 0;\n }\n }\n track(debugInfo) {\n if (!activeSub || !shouldTrack || activeSub === this.computed) {\n return;\n }\n let link = this.activeLink;\n if (link === void 0 || link.sub !== activeSub) {\n link = this.activeLink = new Link(activeSub, this);\n if (!activeSub.deps) {\n activeSub.deps = activeSub.depsTail = link;\n } else {\n link.prevDep = activeSub.depsTail;\n activeSub.depsTail.nextDep = link;\n activeSub.depsTail = link;\n }\n addSub(link);\n } else if (link.version === -1) {\n link.version = this.version;\n if (link.nextDep) {\n const next = link.nextDep;\n next.prevDep = link.prevDep;\n if (link.prevDep) {\n link.prevDep.nextDep = next;\n }\n link.prevDep = activeSub.depsTail;\n link.nextDep = void 0;\n activeSub.depsTail.nextDep = link;\n activeSub.depsTail = link;\n if (activeSub.deps === link) {\n activeSub.deps = next;\n }\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") && activeSub.onTrack) {\n activeSub.onTrack(\n extend(\n {\n effect: activeSub\n },\n debugInfo\n )\n );\n }\n return link;\n }\n trigger(debugInfo) {\n this.version++;\n globalVersion++;\n this.notify(debugInfo);\n }\n notify(debugInfo) {\n startBatch();\n try {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n for (let head = this.subsHead; head; head = head.nextSub) {\n if (head.sub.onTrigger && !(head.sub.flags & 8)) {\n head.sub.onTrigger(\n extend(\n {\n effect: head.sub\n },\n debugInfo\n )\n );\n }\n }\n }\n for (let link = this.subs; link; link = link.prevSub) {\n if (link.sub.notify()) {\n ;\n link.sub.dep.notify();\n }\n }\n } finally {\n endBatch();\n }\n }\n}\nfunction addSub(link) {\n link.dep.sc++;\n if (link.sub.flags & 4) {\n const computed = link.dep.computed;\n if (computed && !link.dep.subs) {\n computed.flags |= 4 | 16;\n for (let l = computed.deps; l; l = l.nextDep) {\n addSub(l);\n }\n }\n const currentTail = link.dep.subs;\n if (currentTail !== link) {\n link.prevSub = currentTail;\n if (currentTail) currentTail.nextSub = link;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && link.dep.subsHead === void 0) {\n link.dep.subsHead = link;\n }\n link.dep.subs = link;\n }\n}\nconst targetMap = /* @__PURE__ */ new WeakMap();\nconst ITERATE_KEY = /* @__PURE__ */ Symbol(\n !!(process.env.NODE_ENV !== \"production\") ? \"Object iterate\" : \"\"\n);\nconst MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(\n !!(process.env.NODE_ENV !== \"production\") ? \"Map keys iterate\" : \"\"\n);\nconst ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(\n !!(process.env.NODE_ENV !== \"production\") ? \"Array iterate\" : \"\"\n);\nfunction track(target, type, key) {\n if (shouldTrack && activeSub) {\n let depsMap = targetMap.get(target);\n if (!depsMap) {\n targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n }\n let dep = depsMap.get(key);\n if (!dep) {\n depsMap.set(key, dep = new Dep());\n dep.map = depsMap;\n dep.key = key;\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n dep.track({\n target,\n type,\n key\n });\n } else {\n dep.track();\n }\n }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n const depsMap = targetMap.get(target);\n if (!depsMap) {\n globalVersion++;\n return;\n }\n const run = (dep) => {\n if (dep) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n dep.trigger({\n target,\n type,\n key,\n newValue,\n oldValue,\n oldTarget\n });\n } else {\n dep.trigger();\n }\n }\n };\n startBatch();\n if (type === \"clear\") {\n depsMap.forEach(run);\n } else {\n const targetIsArray = isArray(target);\n const isArrayIndex = targetIsArray && isIntegerKey(key);\n if (targetIsArray && key === \"length\") {\n const newLength = Number(newValue);\n depsMap.forEach((dep, key2) => {\n if (key2 === \"length\" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {\n run(dep);\n }\n });\n } else {\n if (key !== void 0 || depsMap.has(void 0)) {\n run(depsMap.get(key));\n }\n if (isArrayIndex) {\n run(depsMap.get(ARRAY_ITERATE_KEY));\n }\n switch (type) {\n case \"add\":\n if (!targetIsArray) {\n run(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n run(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n } else if (isArrayIndex) {\n run(depsMap.get(\"length\"));\n }\n break;\n case \"delete\":\n if (!targetIsArray) {\n run(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n run(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n }\n break;\n case \"set\":\n if (isMap(target)) {\n run(depsMap.get(ITERATE_KEY));\n }\n break;\n }\n }\n }\n endBatch();\n}\nfunction getDepFromReactive(object, key) {\n const depMap = targetMap.get(object);\n return depMap && depMap.get(key);\n}\n\nfunction reactiveReadArray(array) {\n const raw = toRaw(array);\n if (raw === array) return raw;\n track(raw, \"iterate\", ARRAY_ITERATE_KEY);\n if (isShallow(array)) return raw;\n if (!isReadonly(array)) return raw.map(toReactive);\n return isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);\n}\nfunction shallowReadArray(arr) {\n track(arr = toRaw(arr), \"iterate\", ARRAY_ITERATE_KEY);\n return arr;\n}\nfunction toWrapped(target, item) {\n if (isReadonly(target)) {\n return isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);\n }\n return toReactive(item);\n}\nconst arrayInstrumentations = {\n __proto__: null,\n [Symbol.iterator]() {\n return iterator(this, Symbol.iterator, (item) => toWrapped(this, item));\n },\n concat(...args) {\n return reactiveReadArray(this).concat(\n ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)\n );\n },\n entries() {\n return iterator(this, \"entries\", (value) => {\n value[1] = toWrapped(this, value[1]);\n return value;\n });\n },\n every(fn, thisArg) {\n return apply(this, \"every\", fn, thisArg, void 0, arguments);\n },\n filter(fn, thisArg) {\n return apply(\n this,\n \"filter\",\n fn,\n thisArg,\n (v) => v.map((item) => toWrapped(this, item)),\n arguments\n );\n },\n find(fn, thisArg) {\n return apply(\n this,\n \"find\",\n fn,\n thisArg,\n (item) => toWrapped(this, item),\n arguments\n );\n },\n findIndex(fn, thisArg) {\n return apply(this, \"findIndex\", fn, thisArg, void 0, arguments);\n },\n findLast(fn, thisArg) {\n return apply(\n this,\n \"findLast\",\n fn,\n thisArg,\n (item) => toWrapped(this, item),\n arguments\n );\n },\n findLastIndex(fn, thisArg) {\n return apply(this, \"findLastIndex\", fn, thisArg, void 0, arguments);\n },\n // \n forEach(fn, thisArg) {\n return apply(this, \"forEach\", fn, thisArg, void 0, arguments);\n },\n includes(...args) {\n return searchProxy(this, \"includes\", args);\n },\n indexOf(...args) {\n return searchProxy(this, \"indexOf\", args);\n },\n join(separator) {\n return reactiveReadArray(this).join(separator);\n },\n // \n lastIndexOf(...args) {\n return searchProxy(this, \"lastIndexOf\", args);\n },\n map(fn, thisArg) {\n return apply(this, \"map\", fn, thisArg, void 0, arguments);\n },\n pop() {\n return noTracking(this, \"pop\");\n },\n push(...args) {\n return noTracking(this, \"push\", args);\n },\n reduce(fn, ...args) {\n return reduce(this, \"reduce\", fn, args);\n },\n reduceRight(fn, ...args) {\n return reduce(this, \"reduceRight\", fn, args);\n },\n shift() {\n return noTracking(this, \"shift\");\n },\n // \n some(fn, thisArg) {\n return apply(this, \"some\", fn, thisArg, void 0, arguments);\n },\n splice(...args) {\n return noTracking(this, \"splice\", args);\n },\n toReversed() {\n return reactiveReadArray(this).toReversed();\n },\n toSorted(comparer) {\n return reactiveReadArray(this).toSorted(comparer);\n },\n toSpliced(...args) {\n return reactiveReadArray(this).toSpliced(...args);\n },\n unshift(...args) {\n return noTracking(this, \"unshift\", args);\n },\n values() {\n return iterator(this, \"values\", (item) => toWrapped(this, item));\n }\n};\nfunction iterator(self, method, wrapValue) {\n const arr = shallowReadArray(self);\n const methodFn = arr[method];\n const iter = methodFn.call(arr);\n if (arr !== self && !isShallow(self)) {\n if (iter[Symbol.toStringTag] === \"Array Iterator\") {\n const wrapped = Object.create(Object.getPrototypeOf(iter));\n wrapped.next = () => wrapResult(iter.next(), wrapValue);\n if (methodFn !== arrayProto[method]) {\n Object.defineProperties(wrapped, {\n return: {\n get() {\n const fn = iter.return;\n return typeof fn === \"function\" ? fn.bind(iter) : fn;\n }\n },\n throw: {\n get() {\n const fn = iter.throw;\n return typeof fn === \"function\" ? fn.bind(iter) : fn;\n }\n }\n });\n }\n return wrapped;\n }\n iter._next = iter.next;\n iter.next = () => wrapResult(iter._next(), wrapValue);\n }\n return iter;\n}\nfunction wrapResult(result, wrapValue) {\n if (!result.done) {\n result.value = wrapValue(result.value);\n }\n return result;\n}\nconst arrayProto = Array.prototype;\nfunction apply(self, method, fn, thisArg, wrappedRetFn, args) {\n const arr = shallowReadArray(self);\n const needsWrap = arr !== self && !isShallow(self);\n const methodFn = arr[method];\n if (methodFn !== arrayProto[method]) {\n const result2 = methodFn.apply(self, args);\n return needsWrap ? toReactive(result2) : result2;\n }\n let wrappedFn = fn;\n if (arr !== self) {\n if (needsWrap) {\n wrappedFn = function(item, index) {\n return fn.call(this, toWrapped(self, item), index, self);\n };\n } else if (fn.length > 2) {\n wrappedFn = function(item, index) {\n return fn.call(this, item, index, self);\n };\n }\n }\n const result = methodFn.call(arr, wrappedFn, thisArg);\n return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;\n}\nfunction reduce(self, method, fn, args) {\n const arr = shallowReadArray(self);\n const needsWrap = arr !== self && !isShallow(self);\n let wrappedFn = fn;\n let wrapInitialAccumulator = false;\n if (arr !== self) {\n if (needsWrap) {\n wrapInitialAccumulator = args.length === 0;\n wrappedFn = function(acc, item, index) {\n if (wrapInitialAccumulator) {\n wrapInitialAccumulator = false;\n acc = toWrapped(self, acc);\n }\n return fn.call(this, acc, toWrapped(self, item), index, self);\n };\n } else if (fn.length > 3) {\n wrappedFn = function(acc, item, index) {\n return fn.call(this, acc, item, index, self);\n };\n }\n }\n const result = arr[method](wrappedFn, ...args);\n return wrapInitialAccumulator ? toWrapped(self, result) : result;\n}\nfunction searchProxy(self, method, args) {\n const arr = toRaw(self);\n track(arr, \"iterate\", ARRAY_ITERATE_KEY);\n const res = arr[method](...args);\n if ((res === -1 || res === false) && isProxy(args[0])) {\n args[0] = toRaw(args[0]);\n return arr[method](...args);\n }\n return res;\n}\nfunction noTracking(self, method, args = []) {\n pauseTracking();\n startBatch();\n const res = toRaw(self)[method].apply(self, args);\n endBatch();\n resetTracking();\n return res;\n}\n\nconst isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nconst builtInSymbols = /* @__PURE__ */ new Set(\n /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol)\n);\nfunction hasOwnProperty(key) {\n if (!isSymbol(key)) key = String(key);\n const obj = toRaw(this);\n track(obj, \"has\", key);\n return obj.hasOwnProperty(key);\n}\nclass BaseReactiveHandler {\n constructor(_isReadonly = false, _isShallow = false) {\n this._isReadonly = _isReadonly;\n this._isShallow = _isShallow;\n }\n get(target, key, receiver) {\n if (key === \"__v_skip\") return target[\"__v_skip\"];\n const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;\n if (key === \"__v_isReactive\") {\n return !isReadonly2;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly2;\n } else if (key === \"__v_isShallow\") {\n return isShallow2;\n } else if (key === \"__v_raw\") {\n if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // \n // \n Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {\n return target;\n }\n return;\n }\n const targetIsArray = isArray(target);\n if (!isReadonly2) {\n let fn;\n if (targetIsArray && (fn = arrayInstrumentations[key])) {\n return fn;\n }\n if (key === \"hasOwnProperty\") {\n return hasOwnProperty;\n }\n }\n const res = Reflect.get(\n target,\n key,\n // \n // \n // \n isRef(target) ? target : receiver\n );\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n return res;\n }\n if (!isReadonly2) {\n track(target, \"get\", key);\n }\n if (isShallow2) {\n return res;\n }\n if (isRef(res)) {\n const value = targetIsArray && isIntegerKey(key) ? res : res.value;\n return isReadonly2 && isObject(value) ? readonly(value) : value;\n }\n if (isObject(res)) {\n return isReadonly2 ? readonly(res) : reactive(res);\n }\n return res;\n }\n}\nclass MutableReactiveHandler extends BaseReactiveHandler {\n constructor(isShallow2 = false) {\n super(false, isShallow2);\n }\n set(target, key, value, receiver) {\n let oldValue = target[key];\n const isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);\n if (!this._isShallow) {\n const isOldValueReadonly = isReadonly(oldValue);\n if (!isShallow(value) && !isReadonly(value)) {\n oldValue = toRaw(oldValue);\n value = toRaw(value);\n }\n if (!isArrayWithIntegerKey && isRef(oldValue) && !isRef(value)) {\n if (isOldValueReadonly) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n target[key]\n );\n }\n return true;\n } else {\n oldValue.value = value;\n return true;\n }\n }\n }\n const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);\n const result = Reflect.set(\n target,\n key,\n value,\n isRef(target) ? target : receiver\n );\n if (target === toRaw(receiver) && result) {\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n }\n return result;\n }\n deleteProperty(target, key) {\n const hadKey = hasOwn(target, key);\n const oldValue = target[key];\n const result = Reflect.deleteProperty(target, key);\n if (result && hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n }\n has(target, key) {\n const result = Reflect.has(target, key);\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\n track(target, \"has\", key);\n }\n return result;\n }\n ownKeys(target) {\n track(\n target,\n \"iterate\",\n isArray(target) ? \"length\" : ITERATE_KEY\n );\n return Reflect.ownKeys(target);\n }\n}\nclass ReadonlyReactiveHandler extends BaseReactiveHandler {\n constructor(isShallow2 = false) {\n super(true, isShallow2);\n }\n set(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n deleteProperty(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Delete operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n}\nconst mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\nconst readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\nconst shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);\nconst shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);\n\nconst toShallow = (value) => value;\nconst getProto = (v) => Reflect.getPrototypeOf(v);\nfunction createIterableMethod(method, isReadonly2, isShallow2) {\n return function(...args) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const targetIsMap = isMap(rawTarget);\n const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n const isKeyOnly = method === \"keys\" && targetIsMap;\n const innerIterator = target[method](...args);\n const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;\n !isReadonly2 && track(\n rawTarget,\n \"iterate\",\n isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\n );\n return extend(\n // \n Object.create(innerIterator),\n {\n // \n next() {\n const { value, done } = innerIterator.next();\n return done ? { value, done } : {\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n done\n };\n }\n }\n );\n };\n}\nfunction createReadonlyMethod(type) {\n return function(...args) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n warn(\n `${capitalize(type)} operation ${key}failed: target is readonly.`,\n toRaw(this)\n );\n }\n return type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\n };\n}\nfunction createInstrumentations(readonly, shallow) {\n const instrumentations = {\n get(key) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!readonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"get\", key);\n }\n track(rawTarget, \"get\", rawKey);\n }\n const { has } = getProto(rawTarget);\n const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n if (has.call(rawTarget, key)) {\n return wrap(target.get(key));\n } else if (has.call(rawTarget, rawKey)) {\n return wrap(target.get(rawKey));\n } else if (target !== rawTarget) {\n target.get(key);\n }\n },\n get size() {\n const target = this[\"__v_raw\"];\n !readonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n return target.size;\n },\n has(key) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!readonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"has\", key);\n }\n track(rawTarget, \"has\", rawKey);\n }\n return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n },\n forEach(callback, thisArg) {\n const observed = this;\n const target = observed[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n !readonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n return target.forEach((value, key) => {\n return callback.call(thisArg, wrap(value), wrap(key), observed);\n });\n }\n };\n extend(\n instrumentations,\n readonly ? {\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\")\n } : {\n add(value) {\n const target = toRaw(this);\n const proto = getProto(target);\n const rawValue = toRaw(value);\n const valueToAdd = !shallow && !isShallow(value) && !isReadonly(value) ? rawValue : value;\n const hadKey = proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue);\n if (!hadKey) {\n target.add(valueToAdd);\n trigger(target, \"add\", valueToAdd, valueToAdd);\n }\n return this;\n },\n set(key, value) {\n if (!shallow && !isShallow(value) && !isReadonly(value)) {\n value = toRaw(value);\n }\n const target = toRaw(this);\n const { has, get } = getProto(target);\n let hadKey = has.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has, key);\n }\n const oldValue = get.call(target, key);\n target.set(key, value);\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n return this;\n },\n delete(key) {\n const target = toRaw(this);\n const { has, get } = getProto(target);\n let hadKey = has.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has, key);\n }\n const oldValue = get ? get.call(target, key) : void 0;\n const result = target.delete(key);\n if (hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n },\n clear() {\n const target = toRaw(this);\n const hadItems = target.size !== 0;\n const oldTarget = !!(process.env.NODE_ENV !== \"production\") ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n const result = target.clear();\n if (hadItems) {\n trigger(\n target,\n \"clear\",\n void 0,\n void 0,\n oldTarget\n );\n }\n return result;\n }\n }\n );\n const iteratorMethods = [\n \"keys\",\n \"values\",\n \"entries\",\n Symbol.iterator\n ];\n iteratorMethods.forEach((method) => {\n instrumentations[method] = createIterableMethod(method, readonly, shallow);\n });\n return instrumentations;\n}\nfunction createInstrumentationGetter(isReadonly2, shallow) {\n const instrumentations = createInstrumentations(isReadonly2, shallow);\n return (target, key, receiver) => {\n if (key === \"__v_isReactive\") {\n return !isReadonly2;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly2;\n } else if (key === \"__v_isShallow\") {\n return shallow;\n } else if (key === \"__v_raw\") {\n return target;\n }\n return Reflect.get(\n hasOwn(instrumentations, key) && key in target ? instrumentations : target,\n key,\n receiver\n );\n };\n}\nconst mutableCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nconst shallowCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, true)\n};\nconst readonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nconst shallowReadonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, true)\n};\nfunction checkIdentityKeys(target, has, key) {\n const rawKey = toRaw(key);\n if (rawKey !== key && has.call(target, rawKey)) {\n const type = toRawType(target);\n warn(\n `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\n );\n }\n}\n\nconst reactiveMap = /* @__PURE__ */ new WeakMap();\nconst shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nconst readonlyMap = /* @__PURE__ */ new WeakMap();\nconst shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n switch (rawType) {\n case \"Object\":\n case \"Array\":\n return 1 /* */;\n case \"Map\":\n case \"Set\":\n case \"WeakMap\":\n case \"WeakSet\":\n return 2 /* */;\n default:\n return 0 /* */;\n }\n}\n// @__NO_SIDE_EFFECTS__\nfunction reactive(target) {\n if (/* @__PURE__ */ isReadonly(target)) {\n return target;\n }\n return createReactiveObject(\n target,\n false,\n mutableHandlers,\n mutableCollectionHandlers,\n reactiveMap\n );\n}\n// @__NO_SIDE_EFFECTS__\nfunction shallowReactive(target) {\n return createReactiveObject(\n target,\n false,\n shallowReactiveHandlers,\n shallowCollectionHandlers,\n shallowReactiveMap\n );\n}\n// @__NO_SIDE_EFFECTS__\nfunction readonly(target) {\n return createReactiveObject(\n target,\n true,\n readonlyHandlers,\n readonlyCollectionHandlers,\n readonlyMap\n );\n}\n// @__NO_SIDE_EFFECTS__\nfunction shallowReadonly(target) {\n return createReactiveObject(\n target,\n true,\n shallowReadonlyHandlers,\n shallowReadonlyCollectionHandlers,\n shallowReadonlyMap\n );\n}\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n if (!isObject(target)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `value cannot be made ${isReadonly2 ? \"readonly\" : \"reactive\"}: ${String(\n target\n )}`\n );\n }\n return target;\n }\n if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n return target;\n }\n if (target[\"__v_skip\"] || !Object.isExtensible(target)) {\n return target;\n }\n const existingProxy = proxyMap.get(target);\n if (existingProxy) {\n return existingProxy;\n }\n const targetType = targetTypeMap(toRawType(target));\n if (targetType === 0 /* */) {\n return target;\n }\n const proxy = new Proxy(\n target,\n targetType === 2 /* */ ? collectionHandlers : baseHandlers\n );\n proxyMap.set(target, proxy);\n return proxy;\n}\n// @__NO_SIDE_EFFECTS__\nfunction isReactive(value) {\n if (/* @__PURE__ */ isReadonly(value)) {\n return /* @__PURE__ */ isReactive(value[\"__v_raw\"]);\n }\n return !!(value && value[\"__v_isReactive\"]);\n}\n// @__NO_SIDE_EFFECTS__\nfunction isReadonly(value) {\n return !!(value && value[\"__v_isReadonly\"]);\n}\n// @__NO_SIDE_EFFECTS__\nfunction isShallow(value) {\n return !!(value && value[\"__v_isShallow\"]);\n}\n// @__NO_SIDE_EFFECTS__\nfunction isProxy(value) {\n return value ? !!value[\"__v_raw\"] : false;\n}\n// @__NO_SIDE_EFFECTS__\nfunction toRaw(observed) {\n const raw = observed && observed[\"__v_raw\"];\n return raw ? /* @__PURE__ */ toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n if (!hasOwn(value, \"__v_skip\") && Object.isExtensible(value)) {\n def(value, \"__v_skip\", true);\n }\n return value;\n}\nconst toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;\nconst toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;\n\n// @__NO_SIDE_EFFECTS__\nfunction isRef(r) {\n return r ? r[\"__v_isRef\"] === true : false;\n}\n// @__NO_SIDE_EFFECTS__\nfunction ref(value) {\n return createRef(value, false);\n}\n// @__NO_SIDE_EFFECTS__\nfunction shallowRef(value) {\n return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n if (/* @__PURE__ */ isRef(rawValue)) {\n return rawValue;\n }\n return new RefImpl(rawValue, shallow);\n}\nclass RefImpl {\n constructor(value, isShallow2) {\n this.dep = new Dep();\n this[\"__v_isRef\"] = true;\n this[\"__v_isShallow\"] = false;\n this._rawValue = isShallow2 ? value : toRaw(value);\n this._value = isShallow2 ? value : toReactive(value);\n this[\"__v_isShallow\"] = isShallow2;\n }\n get value() {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n this.dep.track({\n target: this,\n type: \"get\",\n key: \"value\"\n });\n } else {\n this.dep.track();\n }\n return this._value;\n }\n set value(newValue) {\n const oldValue = this._rawValue;\n const useDirectValue = this[\"__v_isShallow\"] || isShallow(newValue) || isReadonly(newValue);\n newValue = useDirectValue ? newValue : toRaw(newValue);\n if (hasChanged(newValue, oldValue)) {\n this._rawValue = newValue;\n this._value = useDirectValue ? newValue : toReactive(newValue);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n this.dep.trigger({\n target: this,\n type: \"set\",\n key: \"value\",\n newValue,\n oldValue\n });\n } else {\n this.dep.trigger();\n }\n }\n }\n}\nfunction triggerRef(ref2) {\n if (ref2.dep) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n ref2.dep.trigger({\n target: ref2,\n type: \"set\",\n key: \"value\",\n newValue: ref2._value\n });\n } else {\n ref2.dep.trigger();\n }\n }\n}\nfunction unref(ref2) {\n return /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2;\n}\nfunction toValue(source) {\n return isFunction(source) ? source() : unref(source);\n}\nconst shallowUnwrapHandlers = {\n get: (target, key, receiver) => key === \"__v_raw\" ? target : unref(Reflect.get(target, key, receiver)),\n set: (target, key, value, receiver) => {\n const oldValue = target[key];\n if (/* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {\n oldValue.value = value;\n return true;\n } else {\n return Reflect.set(target, key, value, receiver);\n }\n }\n};\nfunction proxyRefs(objectWithRefs) {\n return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n}\nclass CustomRefImpl {\n constructor(factory) {\n this[\"__v_isRef\"] = true;\n this._value = void 0;\n const dep = this.dep = new Dep();\n const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));\n this._get = get;\n this._set = set;\n }\n get value() {\n return this._value = this._get();\n }\n set value(newVal) {\n this._set(newVal);\n }\n}\nfunction customRef(factory) {\n return new CustomRefImpl(factory);\n}\n// @__NO_SIDE_EFFECTS__\nfunction toRefs(object) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isProxy(object)) {\n warn(`toRefs() expects a reactive object but received a plain one.`);\n }\n const ret = isArray(object) ? new Array(object.length) : {};\n for (const key in object) {\n ret[key] = propertyToRef(object, key);\n }\n return ret;\n}\nclass ObjectRefImpl {\n constructor(_object, key, _defaultValue) {\n this._object = _object;\n this._defaultValue = _defaultValue;\n this[\"__v_isRef\"] = true;\n this._value = void 0;\n this._key = isSymbol(key) ? key : String(key);\n this._raw = toRaw(_object);\n let shallow = true;\n let obj = _object;\n if (!isArray(_object) || isSymbol(this._key) || !isIntegerKey(this._key)) {\n do {\n shallow = !isProxy(obj) || isShallow(obj);\n } while (shallow && (obj = obj[\"__v_raw\"]));\n }\n this._shallow = shallow;\n }\n get value() {\n let val = this._object[this._key];\n if (this._shallow) {\n val = unref(val);\n }\n return this._value = val === void 0 ? this._defaultValue : val;\n }\n set value(newVal) {\n if (this._shallow && /* @__PURE__ */ isRef(this._raw[this._key])) {\n const nestedRef = this._object[this._key];\n if (/* @__PURE__ */ isRef(nestedRef)) {\n nestedRef.value = newVal;\n return;\n }\n }\n this._object[this._key] = newVal;\n }\n get dep() {\n return getDepFromReactive(this._raw, this._key);\n }\n}\nclass GetterRefImpl {\n constructor(_getter) {\n this._getter = _getter;\n this[\"__v_isRef\"] = true;\n this[\"__v_isReadonly\"] = true;\n this._value = void 0;\n }\n get value() {\n return this._value = this._getter();\n }\n}\n// @__NO_SIDE_EFFECTS__\nfunction toRef(source, key, defaultValue) {\n if (/* @__PURE__ */ isRef(source)) {\n return source;\n } else if (isFunction(source)) {\n return new GetterRefImpl(source);\n } else if (isObject(source) && arguments.length > 1) {\n return propertyToRef(source, key, defaultValue);\n } else {\n return /* @__PURE__ */ ref(source);\n }\n}\nfunction propertyToRef(source, key, defaultValue) {\n return new ObjectRefImpl(source, key, defaultValue);\n}\n\nclass ComputedRefImpl {\n constructor(fn, setter, isSSR) {\n this.fn = fn;\n this.setter = setter;\n /* \n \n */\n this._value = void 0;\n /* \n \n */\n this.dep = new Dep(this);\n /* \n \n */\n this.__v_isRef = true;\n // \n // \n /* \n \n */\n this.deps = void 0;\n /* \n \n */\n this.depsTail = void 0;\n /* \n \n */\n this.flags = 16;\n /* \n \n */\n this.globalVersion = globalVersion - 1;\n /* \n \n */\n this.next = void 0;\n // \n this.effect = this;\n this[\"__v_isReadonly\"] = !setter;\n this.isSSR = isSSR;\n }\n /* \n \n */\n notify() {\n this.flags |= 16;\n if (!(this.flags & 8) && // \n activeSub !== this) {\n batch(this, true);\n return true;\n } else if (!!(process.env.NODE_ENV !== \"production\")) ;\n }\n get value() {\n const link = !!(process.env.NODE_ENV !== \"production\") ? this.dep.track({\n target: this,\n type: \"get\",\n key: \"value\"\n }) : this.dep.track();\n refreshComputed(this);\n if (link) {\n link.version = this.dep.version;\n }\n return this._value;\n }\n set value(newValue) {\n if (this.setter) {\n this.setter(newValue);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\"Write operation failed: computed value is readonly\");\n }\n }\n}\n// @__NO_SIDE_EFFECTS__\nfunction computed(getterOrOptions, debugOptions, isSSR = false) {\n let getter;\n let setter;\n if (isFunction(getterOrOptions)) {\n getter = getterOrOptions;\n } else {\n getter = getterOrOptions.get;\n setter = getterOrOptions.set;\n }\n const cRef = new ComputedRefImpl(getter, setter, isSSR);\n if (!!(process.env.NODE_ENV !== \"production\") && debugOptions && !isSSR) {\n cRef.onTrack = debugOptions.onTrack;\n cRef.onTrigger = debugOptions.onTrigger;\n }\n return cRef;\n}\n\nconst TrackOpTypes = {\n \"GET\": \"get\",\n \"HAS\": \"has\",\n \"ITERATE\": \"iterate\"\n};\nconst TriggerOpTypes = {\n \"SET\": \"set\",\n \"ADD\": \"add\",\n \"DELETE\": \"delete\",\n \"CLEAR\": \"clear\"\n};\nconst ReactiveFlags = {\n \"SKIP\": \"__v_skip\",\n \"IS_REACTIVE\": \"__v_isReactive\",\n \"IS_READONLY\": \"__v_isReadonly\",\n \"IS_SHALLOW\": \"__v_isShallow\",\n \"RAW\": \"__v_raw\",\n \"IS_REF\": \"__v_isRef\"\n};\n\nconst WatchErrorCodes = {\n \"WATCH_GETTER\": 2,\n \"2\": \"WATCH_GETTER\",\n \"WATCH_CALLBACK\": 3,\n \"3\": \"WATCH_CALLBACK\",\n \"WATCH_CLEANUP\": 4,\n \"4\": \"WATCH_CLEANUP\"\n};\nconst INITIAL_WATCHER_VALUE = {};\nconst cleanupMap = /* @__PURE__ */ new WeakMap();\nlet activeWatcher = void 0;\nfunction getCurrentWatcher() {\n return activeWatcher;\n}\nfunction onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {\n if (owner) {\n let cleanups = cleanupMap.get(owner);\n if (!cleanups) cleanupMap.set(owner, cleanups = []);\n cleanups.push(cleanupFn);\n } else if (!!(process.env.NODE_ENV !== \"production\") && !failSilently) {\n warn(\n `onWatcherCleanup() was called when there was no active watcher to associate with.`\n );\n }\n}\nfunction watch(source, cb, options = EMPTY_OBJ) {\n const { immediate, deep, once, scheduler, augmentJob, call } = options;\n const warnInvalidSource = (s) => {\n (options.onWarn || warn)(\n `Invalid watch source: `,\n s,\n `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`\n );\n };\n const reactiveGetter = (source2) => {\n if (deep) return source2;\n if (isShallow(source2) || deep === false || deep === 0)\n return traverse(source2, 1);\n return traverse(source2);\n };\n let effect;\n let getter;\n let cleanup;\n let boundCleanup;\n let forceTrigger = false;\n let isMultiSource = false;\n if (isRef(source)) {\n getter = () => source.value;\n forceTrigger = isShallow(source);\n } else if (isReactive(source)) {\n getter = () => reactiveGetter(source);\n forceTrigger = true;\n } else if (isArray(source)) {\n isMultiSource = true;\n forceTrigger = source.some((s) => isReactive(s) || isShallow(s));\n getter = () => source.map((s) => {\n if (isRef(s)) {\n return s.value;\n } else if (isReactive(s)) {\n return reactiveGetter(s);\n } else if (isFunction(s)) {\n return call ? call(s, 2) : s();\n } else {\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(s);\n }\n });\n } else if (isFunction(source)) {\n if (cb) {\n getter = call ? () => call(source, 2) : source;\n } else {\n getter = () => {\n if (cleanup) {\n pauseTracking();\n try {\n cleanup();\n } finally {\n resetTracking();\n }\n }\n const currentEffect = activeWatcher;\n activeWatcher = effect;\n try {\n return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);\n } finally {\n activeWatcher = currentEffect;\n }\n };\n }\n } else {\n getter = NOOP;\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(source);\n }\n if (cb && deep) {\n const baseGetter = getter;\n const depth = deep === true ? Infinity : deep;\n getter = () => traverse(baseGetter(), depth);\n }\n const scope = getCurrentScope();\n const watchHandle = () => {\n effect.stop();\n if (scope && scope.active) {\n remove(scope.effects, effect);\n }\n };\n if (once && cb) {\n const _cb = cb;\n cb = (...args) => {\n try {\n return _cb(...args);\n } finally {\n watchHandle();\n }\n };\n }\n let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n const job = (immediateFirstRun) => {\n if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) {\n return;\n }\n if (cb) {\n const newValue = effect.run();\n if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {\n const currentWatcher = activeWatcher;\n pauseTracking();\n try {\n if (cleanup) {\n cleanup();\n }\n activeWatcher = effect;\n const args = [\n newValue,\n // \n oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n boundCleanup\n ];\n oldValue = newValue;\n call ? call(cb, 3, args) : (\n // \n cb(...args)\n );\n } finally {\n activeWatcher = currentWatcher;\n resetTracking();\n }\n }\n } else {\n effect.run();\n }\n };\n if (augmentJob) {\n augmentJob(job);\n }\n effect = new ReactiveEffect(getter);\n effect.scheduler = scheduler ? () => scheduler(job, false) : job;\n boundCleanup = (fn) => onWatcherCleanup(fn, false, effect);\n cleanup = effect.onStop = () => {\n const cleanups = cleanupMap.get(effect);\n if (cleanups) {\n if (call) {\n call(cleanups, 4);\n } else {\n for (const cleanup2 of cleanups) cleanup2();\n }\n cleanupMap.delete(effect);\n }\n };\n if (!!(process.env.NODE_ENV !== \"production\")) {\n effect.onTrack = options.onTrack;\n effect.onTrigger = options.onTrigger;\n }\n if (cb) {\n if (immediate) {\n job(true);\n } else {\n oldValue = effect.run();\n }\n } else if (scheduler) {\n scheduler(job.bind(null, true), true);\n } else {\n effect.run();\n }\n watchHandle.pause = effect.pause.bind(effect);\n watchHandle.resume = effect.resume.bind(effect);\n watchHandle.stop = watchHandle;\n return watchHandle;\n}\nfunction traverse(value, depth = Infinity, seen) {\n if (depth <= 0 || !isObject(value) || value[\"__v_skip\"]) {\n return value;\n }\n seen = seen || /* @__PURE__ */ new Map();\n if ((seen.get(value) || 0) >= depth) {\n return value;\n }\n seen.set(value, depth);\n depth--;\n if (isRef(value)) {\n traverse(value.value, depth, seen);\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n traverse(value[i], depth, seen);\n }\n } else if (isSet(value) || isMap(value)) {\n value.forEach((v) => {\n traverse(v, depth, seen);\n });\n } else if (isPlainObject(value)) {\n for (const key in value) {\n traverse(value[key], depth, seen);\n }\n for (const key of Object.getOwnPropertySymbols(value)) {\n if (Object.prototype.propertyIsEnumerable.call(value, key)) {\n traverse(value[key], depth, seen);\n }\n }\n }\n return value;\n}\n\nexport { ARRAY_ITERATE_KEY, EffectFlags, EffectScope, ITERATE_KEY, MAP_KEY_ITERATE_KEY, ReactiveEffect, ReactiveFlags, TrackOpTypes, TriggerOpTypes, WatchErrorCodes, computed, customRef, effect, effectScope, enableTracking, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onEffectCleanup, onScopeDispose, onWatcherCleanup, pauseTracking, proxyRefs, reactive, reactiveReadArray, readonly, ref, resetTracking, shallowReactive, shallowReadArray, shallowReadonly, shallowRef, stop, toRaw, toReactive, toReadonly, toRef, toRefs, toValue, track, traverse, trigger, triggerRef, unref, watch };\n","// \n// \n// \nexport interface Job {\n (): void\n /* */\n id?: number\n}\n\nlet queued = false\nlet flushIndex = -1\nconst queue: Job[] = []\nconst p = Promise.resolve()\n\nlet jobId = 0\nexport const nextJobId = () => ++jobId\n\nexport const nextTick = (fn: () => void) => p.then(fn)\n\nconst idOf = (job: Job) => job.id ?? Infinity\n\nexport const queueJob = (job: Job) => {\n if (!queue.includes(job)) {\n // \n const id = idOf(job)\n let i = queue.length\n while (i > flushIndex + 1 && idOf(queue[i - 1]) > id) i--\n queue.splice(i, 0, job)\n }\n if (!queued) {\n queued = true\n nextTick(flushJobs)\n }\n}\n\n/* */\nexport const flushJobs = () => {\n try {\n for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n queue[flushIndex]()\n }\n } finally {\n // \n flushIndex = -1\n queue.length = 0\n queued = false\n }\n}\n","import {\n effect as rawEffect,\n reactive,\n ReactiveEffectRunner\n} from '@vue/reactivity'\nimport { Directive } from './directives'\nimport { flushJobs, Job, nextJobId, queueJob } from './scheduler'\nimport { hasOwn } from '@vue/shared'\nimport type { AsyncRegistry, AsyncState } from './async'\n/* */\nexport interface Teardownable {\n teardown(): void\n /* */\n ctx?: Context\n}\n\nexport interface Context {\n key?: any\n scope: Record<string, any>\n dirs: Record<string, Directive>\n blocks: Teardownable[]\n effect: typeof rawEffect\n effects: ReactiveEffectRunner[]\n cleanups: (() => void)[]\n /* */\n sealers: (() => void)[]\n delimiters: [string, string]\n delimitersRE: RegExp\n /* */\n provides: Record<PropertyKey, any>\n /* \n \n \n */\n mustache?: boolean\n /* */\n asyncs?: AsyncRegistry\n /* */\n scopeState?: AsyncState\n /* */\n scoped?: Record<string, (host: any) => any>\n /* */\n hooks?: WalkHooks\n}\n\nexport interface WalkHooks {\n /* */\n detached(el: Element, ctx: Context): boolean\n /* */\n scope(el: Element, ctx: Context): void\n /* */\n sealed(el: Element): void\n}\n\n// \nlet sealing = 0\nexport const isSealing = () => sealing > 0\n\n/* \n \n \n */\nexport const sealContext = (ctx: Context, teardown: () => void) => {\n const collect = (c: Context): (() => void)[] => [\n ...c.sealers,\n ...c.blocks.flatMap((b) => (b.ctx && b.ctx !== c ? collect(b.ctx) : []))\n ]\n sealing++\n try {\n // \n for (const fn of collect(ctx)) {\n try {\n fn()\n } catch (e) {\n console.error(e)\n }\n }\n // \n flushJobs()\n teardown()\n } finally {\n sealing--\n }\n}\n\nexport const createContext = (parent?: Context): Context => {\n const ctx: Context = {\n delimiters: ['{{', '}}'],\n delimitersRE: /\\{\\{([^]+?)\\}\\}/g,\n provides: Object.create(null),\n ...parent,\n scope: parent ? parent.scope : reactive({}),\n dirs: parent ? parent.dirs : {},\n effects: [],\n blocks: [],\n cleanups: [],\n sealers: [],\n effect: (fn) => {\n // \n let stopped = false\n const job: Job = () => {\n if (!stopped) e()\n }\n job.id = nextJobId()\n const e: ReactiveEffectRunner = rawEffect(fn, {\n scheduler: () => queueJob(job),\n onStop: () => (stopped = true)\n })\n ctx.effects.push(e)\n return e\n }\n }\n return ctx\n}\n\n// \n// \n// \n// \n\n/* */\nconst paramNames = new Set(['$data', '$el'])\n\n/* \n \n \n \n */\nconst claimedGlobals = new Set([\n 'name', 'open', 'close', 'closed', 'status', 'length', 'top', 'parent',\n 'opener', 'origin', 'event', 'frames', 'screen', 'content'\n])\n\nconst identRE = /^[A-Za-z_$][\\w$]*$/\nconst lexicalProbes: Record<string, Function> = Object.create(null)\n\n/* */\nconst isGlobalName = (key: string) => {\n if (claimedGlobals.has(key)) return false\n // \n if (hasOwn(globalThis, key)) return true\n if (!identRE.test(key)) return false\n // \n if (isElementName(key)) return false\n try {\n ;(lexicalProbes[key] ||= new Function(key))()\n return true\n } catch {\n return false\n }\n}\n\n// \n// \n// \n// \n// \nconst valueProbes: Record<string, Function> = Object.create(null)\n\nconst isElementName = (key: string) => {\n if (typeof Element === 'undefined' || hasOwn(globalThis, key) || !(key in globalThis)) return false\n let value: any\n try {\n value = (globalThis as any)[key]\n if (!(value instanceof Element || (typeof HTMLCollection !== 'undefined' && value instanceof HTMLCollection))) {\n return false\n }\n // \n return (valueProbes[key] ||= new Function(`return ${key}`))() === value\n } catch {\n return false\n }\n}\n\n// \nlet strictHas = false\nconst isDeclared = (scope: Record<string, any>, key: PropertyKey) => {\n const prev = strictHas\n strictHas = true\n try {\n return key in scope\n } finally {\n strictHas = prev\n }\n}\n\n// \nconst rawScopes = new WeakMap<object, Record<string, any>>()\n\n/* \n \n \n */\nexport const claimElementName = (scope: Record<string, any>, key: string) => {\n if (identRE.test(key) && !paramNames.has(key) && !isDeclared(scope, key) && isElementName(key)) {\n scope[key] = undefined\n }\n}\n\n/* \n \n \n */\nexport const createScopedContext = (\n ctx: Context,\n data = {},\n isScope = false\n): Context => {\n const parentScope = ctx.scope\n const mergedScope = Object.create(parentScope)\n Object.defineProperties(mergedScope, Object.getOwnPropertyDescriptors(data))\n mergedScope.$refs = Object.create(parentScope.$refs)\n const reactiveProxy = reactive(\n new Proxy(mergedScope, {\n set(target, key, val, receiver) {\n // \n // \n if (receiver === reactiveProxy && !hasOwn(target, key)) {\n // \n if (!isScope || isDeclared(parentScope, key)) {\n return Reflect.set(parentScope, key, val)\n }\n // \n Object.defineProperty(target, key, {\n value: val,\n writable: true,\n enumerable: true,\n configurable: true\n })\n return true\n }\n return Reflect.set(target, key, val, receiver)\n },\n get(target, key, receiver) {\n const value = Reflect.get(target, key, receiver)\n // \n if (\n value === undefined &&\n typeof key === 'string' &&\n !Reflect.has(target, key) &&\n identRE.test(key) &&\n isElementName(key)\n ) {\n return (globalThis as any)[key]\n }\n return value\n },\n has(target, key) {\n if (Reflect.has(target, key)) return true\n if (strictHas || typeof key !== 'string' || paramNames.has(key)) {\n return false\n }\n return !isGlobalName(key)\n }\n })\n )\n rawScopes.set(reactiveProxy, mergedScope)\n\n bindContextMethods(reactiveProxy)\n return {\n ...ctx,\n scope: reactiveProxy,\n provides: isScope ? Object.create(ctx.provides) : ctx.provides\n }\n}\n\n/* \n \n \n */\nexport const declareInScope = (scope: Record<string, any>, data: object) => {\n const raw = rawScopes.get(scope)\n if (!raw) return\n const descriptors = Object.getOwnPropertyDescriptors(data)\n for (const key of Object.keys(descriptors)) {\n const d = descriptors[key]\n if (typeof d.value === 'function') d.value = d.value.bind(scope)\n d.configurable = true\n }\n Object.defineProperties(raw, descriptors)\n}\n\n/* */\nexport const defineScopeHelpers = (\n scope: Record<string, any>,\n helpers: PropertyDescriptorMap\n) => {\n const raw = rawScopes.get(scope)\n if (!raw) return\n for (const key of Object.keys(helpers)) {\n helpers[key] = { enumerable: false, configurable: true, ...helpers[key] }\n }\n Object.defineProperties(raw, helpers)\n}\n\nexport const bindContextMethods = (scope: Record<string, any>) => {\n for (const key of Object.keys(scope)) {\n if (typeof scope[key] === 'function') {\n scope[key] = scope[key].bind(scope)\n }\n }\n}\n\n// \n// \nconst ctxOf = new WeakMap<Node, Context>()\n\nexport const recordContext = (node: Node, ctx: Context) => {\n ctxOf.set(node, ctx)\n}\n\n/* */\nexport const contextAt = (node: Node): Context | undefined => ctxOf.get(node)\n\n/* */\nexport const findContext = (node: Node): Context | undefined => {\n let cur = node.parentNode\n while (cur) {\n const ctx = ctxOf.get(cur)\n if (ctx) return ctx\n cur = cur.parentNode\n }\n}\n\n/* */\nexport const rootScopeOf = (scope: Record<string, any>) => {\n let cur = scope\n let raw\n while ((raw = rawScopes.get(cur))) cur = Object.getPrototypeOf(raw)\n return cur\n}\n\n// \nconst slotCtxOf = new WeakMap<Node, Context>()\nlet slotMarks = 0\n\nexport const recordSlotContext = (node: Node, ctx: Context) => {\n slotMarks++\n slotCtxOf.set(node, ctx)\n}\n\nexport const slotContextOf = (node: Node) => slotCtxOf.get(node)\n\n\n/* \n \n \n \n */\nexport const copySlotContexts = (from: Node, to: Node, self = false) => {\n if (!slotMarks) return\n const ctx = self && slotCtxOf.get(from)\n if (ctx) {\n slotCtxOf.set(to, ctx)\n const recorded = ctxOf.get(from)\n if (recorded) ctxOf.set(to, recorded)\n }\n let a = from.firstChild\n let b = to.firstChild\n while (a && b) {\n copySlotContexts(a, b, true)\n a = a.nextSibling\n b = b.nextSibling\n }\n}\n","import { Directive } from '.'\nimport {\n normalizeClass,\n normalizeStyle,\n isString,\n isArray,\n hyphenate,\n camelize,\n isSpecialBooleanAttr,\n includeBooleanAttr\n} from '@vue/shared'\n\nconst forceAttrRE = /^(spellcheck|draggable|form|list|type)$/\n\nexport const bind: Directive<Element & { _class?: string }> = ({\n el,\n get,\n effect,\n arg,\n modifiers\n}) => {\n let prevValue: any\n\n // \n if (arg === 'class') {\n el._class = el.className\n }\n\n effect(() => {\n let value = get()\n if (arg) {\n if (modifiers?.camel) {\n arg = camelize(arg)\n }\n setProp(el, arg, value, prevValue)\n } else {\n for (const key in value) {\n setProp(el, key, value[key], prevValue && prevValue[key])\n }\n for (const key in prevValue) {\n if (!value || !(key in value)) {\n setProp(el, key, null)\n }\n }\n }\n prevValue = value\n })\n}\n\nconst setProp = (\n el: Element & { _class?: string },\n key: string,\n value: any,\n prevValue?: any\n) => {\n if (key === 'class') {\n el.setAttribute(\n 'class',\n normalizeClass(el._class ? [el._class, value] : value) || ''\n )\n } else if (key === 'style') {\n value = normalizeStyle(value)\n const { style } = el as HTMLElement\n if (!value) {\n el.removeAttribute('style')\n } else if (isString(value)) {\n if (value !== prevValue) style.cssText = value\n } else {\n for (const key in value) {\n setStyle(style, key, value[key])\n }\n if (prevValue && !isString(prevValue)) {\n for (const key in prevValue) {\n if (value[key] == null) {\n setStyle(style, key, '')\n }\n }\n }\n }\n } else if (\n !(el instanceof SVGElement) &&\n key in el &&\n !forceAttrRE.test(key)\n ) {\n // \n el[key] = value\n if (key === 'value') {\n // \n el._value = value\n }\n } else {\n // \n // \n // \n // \n if (key === 'true-value') {\n ;(el as any)._trueValue = value\n } else if (key === 'false-value') {\n ;(el as any)._falseValue = value\n } else if (isSpecialBooleanAttr(key)) {\n // \n // \n if (includeBooleanAttr(value)) el.setAttribute(key, '')\n else el.removeAttribute(key)\n } else if (value != null) {\n el.setAttribute(key, value)\n } else {\n el.removeAttribute(key)\n }\n }\n}\n\nconst importantRE = /\\s*!important$/\n\nconst setStyle = (\n style: CSSStyleDeclaration,\n name: string,\n val: string | string[]\n) => {\n if (isArray(val)) {\n val.forEach((v) => setStyle(style, name, v))\n } else {\n if (name.startsWith('--')) {\n // \n style.setProperty(name, val)\n } else {\n if (importantRE.test(val)) {\n // \n style.setProperty(\n hyphenate(name),\n val.replace(importantRE, ''),\n 'important'\n )\n } else {\n style[name as any] = val\n }\n }\n }\n}\n","export const checkAttr = (el: Element, name: string): string | null => {\n const val = el.getAttribute(name)\n if (val != null) el.removeAttribute(name)\n return val\n}\n\nexport const listen = (\n el: Element,\n event: string,\n handler: any,\n options?: any\n) => {\n el.addEventListener(event, handler, options)\n // \n sink && sink.push(() => el.removeEventListener(event, handler, options))\n}\n\nlet sink: (() => void)[] | null = null\n\n/* */\nexport const collectListeners = <T>(to: (() => void)[], fn: () => T): T => {\n const outer = sink\n sink = to\n try {\n return fn()\n } finally {\n sink = outer\n }\n}\n","import { DEV } from '../env'\nimport { Directive } from '.'\nimport { hyphenate } from '@vue/shared'\nimport { listen } from '../utils'\nimport { nextTick } from '../scheduler'\nimport { isSealing } from '../context'\n\n// \nconst fnExpRE = /^\\s*(?:async\\s+)?(?:\\([^)]*?\\)|[\\w$]+)\\s*=>|^\\s*(?:async\\s+)?function(?:\\s+[\\w$]+)?\\s*\\(/\n\nconst simplePathRE =\n /^[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*|\\['[^']*?']|\\[\"[^\"]*?\"]|\\[\\d+]|\\[[A-Za-z_$][\\w$]*])*$/\n\nconst systemModifiers = ['ctrl', 'shift', 'alt', 'meta']\n\ntype KeyedEvent = KeyboardEvent | MouseEvent | TouchEvent\n\nconst modifierGuards: Record<\n string,\n (e: Event, modifiers: Record<string, true>) => void | boolean\n> = {\n stop: (e) => e.stopPropagation(),\n prevent: (e) => e.preventDefault(),\n self: (e) => e.target !== e.currentTarget,\n ctrl: (e) => !(e as KeyedEvent).ctrlKey,\n shift: (e) => !(e as KeyedEvent).shiftKey,\n alt: (e) => !(e as KeyedEvent).altKey,\n meta: (e) => !(e as KeyedEvent).metaKey,\n left: (e) => 'button' in e && (e as MouseEvent).button !== 0,\n middle: (e) => 'button' in e && (e as MouseEvent).button !== 1,\n right: (e) => 'button' in e && (e as MouseEvent).button !== 2,\n exact: (e, modifiers) =>\n systemModifiers.some((m) => (e as any)[`${m}Key`] && !modifiers[m])\n}\n\nexport const on: Directive = ({ el, get, exp, arg, modifiers, ctx }) => {\n if (!arg) {\n if (DEV) {\n console.error(`h-on=\"obj\" syntax is not supported.`)\n }\n return\n }\n\n // \n let handler = simplePathRE.test(exp)\n ? get(`(e => ${exp}(e))`)\n : fnExpRE.test(exp)\n ? get(`(e => (${exp})(e))`)\n : get(`($event => { ${exp} })`)\n\n // \n if (arg === 'scope:mounted') {\n nextTick(handler)\n return\n } else if (arg === 'scope:unmounted') {\n // \n return () => {\n isSealing() || handler()\n }\n } else if (arg === 'scope:sealed') {\n // \n ctx.sealers.push(() => handler())\n return\n }\n\n if (modifiers) {\n // \n if (arg === 'click') {\n if (modifiers.right) arg = 'contextmenu'\n if (modifiers.middle) arg = 'mouseup'\n }\n\n const raw = handler\n handler = (e: Event) => {\n if ('key' in e && !(hyphenate((e as KeyboardEvent).key) in modifiers)) {\n return\n }\n for (const key in modifiers) {\n const guard = modifierGuards[key]\n if (guard && guard(e, modifiers)) {\n return\n }\n }\n return raw(e)\n }\n }\n\n listen(el, arg, handler, modifiers)\n}\n","import { Directive } from '.'\n\nexport const show: Directive<HTMLElement> = ({ el, get, effect }) => {\n const initialDisplay = el.style.display\n effect(() => {\n el.style.display = get() ? initialDisplay : 'none'\n })\n}\n","import { isObject } from '@vue/shared'\nimport { Directive } from '.'\n\nexport const text: Directive<Text | Element> = ({ el, get, effect }) => {\n effect(() => {\n el.textContent = toDisplayString(get())\n })\n}\n\nexport const toDisplayString = (value: any) =>\n value == null\n ? ''\n : isObject(value)\n ? JSON.stringify(value, null, 2)\n : String(value)\n","import { Directive } from '.'\n\n// \n// \n// \nexport const html: Directive = ({ el, get, effect }) => {\n ;(el as Element).setAttribute('h-pre', '')\n effect(() => {\n el.innerHTML = get()\n })\n}\n","import { isArray, looseEqual, looseIndexOf, toNumber } from '@vue/shared'\nimport { pauseTracking, resetTracking } from '@vue/reactivity'\nimport { Directive } from '.'\nimport { listen } from '../utils'\nimport { claimElementName } from '../context'\n\n// \nconst dotPathRE = /^[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*)+$/\n\n/* */\nexport interface ModelHandle<T = any> {\n /* */\n el: Element\n /* */\n get(): T\n /* */\n set(value: T): void\n}\n\n/* \n \n \n */\nexport const modelOf = <T = any>(target: Element | string | null | undefined): ModelHandle<T> | null => {\n const el = typeof target === 'string' ? document.querySelector(target) : target\n return (el && (el as any)._h_model) || null\n}\n\n/* \n \n \n \n */\nexport const attachModel = (el: Element, get: () => any, assign: (v: any) => void, render: () => void) => {\n const handle: ModelHandle = {\n el,\n get,\n set(value) {\n pauseTracking()\n try {\n assign(value)\n render()\n } finally {\n resetTracking()\n }\n }\n }\n // \n ;(el as any)._h_model = handle\n}\n\nexport const model: Directive<\n HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement\n> = ({ el, exp, get, effect, modifiers, ctx }) => {\n const type = el.type\n const { trim, number = type === 'number' } = modifiers || {}\n\n // \n // \n const rootName = exp.match(/^\\s*([A-Za-z_$][\\w$]*)/)\n if (rootName) claimElementName(ctx.scope, rootName[1])\n\n // \n let readExp = exp\n let ensure = ''\n if (dotPathRE.test(exp)) {\n const parts = exp.split('.')\n readExp = parts.join('?.')\n for (let i = 1; i < parts.length; i++) {\n const p = parts.slice(0, i).join('.')\n ensure += `if (${p} == null) ${p} = {};`\n }\n }\n const assign = get(`(val) => { ${ensure} ${exp} = val }`)\n const read = () => get(readExp)\n\n // \n // \n const seed = (val: () => any) => {\n pauseTracking()\n try {\n if (ensure) get(`(() => { ${ensure} })`)()\n if (read() === undefined) {\n const v = val()\n if (v !== undefined) assign(v)\n }\n } finally {\n resetTracking()\n }\n }\n\n // \n // \n // \n // \n // \n let render: () => void\n\n if (el.tagName === 'SELECT') {\n const sel = el as HTMLSelectElement\n // \n const picked = () =>\n Array.prototype.filter\n .call(sel.options, (o: HTMLOptionElement) => o.selected)\n .map((o: HTMLOptionElement) => getValue(o))\n const toModel = (vals: any[]) => {\n const out = number ? vals.map((v) => toNumber(v)) : vals\n return sel.multiple ? out : out[0]\n }\n seed(() => toModel(picked()))\n let synced = picked()\n listen(el, 'change', () => {\n const now = picked()\n if (looseEqual(now, synced)) return\n synced = now\n assign(toModel(now))\n })\n const paint = (value: any) => {\n const isMultiple = sel.multiple\n for (let i = 0, l = sel.options.length; i < l; i++) {\n const option = sel.options[i]\n const optionValue = getValue(option)\n if (isMultiple) {\n if (isArray(value)) {\n option.selected = looseIndexOf(value, optionValue) > -1\n } else {\n option.selected = !!value?.has?.(optionValue)\n }\n } else {\n if (looseEqual(getValue(option), value)) {\n if (sel.selectedIndex !== i) sel.selectedIndex = i\n return\n }\n }\n }\n if (!isMultiple && sel.selectedIndex !== -1) {\n sel.selectedIndex = -1\n }\n }\n render = () => {\n paint(read())\n synced = picked()\n }\n } else if (type === 'checkbox') {\n const box = el as HTMLInputElement\n seed(() => getCheckboxValue(box, box.checked))\n let synced = box.checked\n listen(el, 'change', () => {\n const checked = box.checked\n if (checked === synced) return\n synced = checked\n const modelValue = read()\n if (isArray(modelValue)) {\n const elementValue = getValue(el)\n const index = looseIndexOf(modelValue, elementValue)\n const found = index !== -1\n if (checked && !found) {\n assign(modelValue.concat(elementValue))\n } else if (!checked && found) {\n const filtered = [...modelValue]\n filtered.splice(index, 1)\n assign(filtered)\n }\n } else {\n assign(getCheckboxValue(box, checked))\n }\n })\n\n let oldValue: any\n render = () => {\n const value = read()\n if (isArray(value)) {\n box.checked = looseIndexOf(value, getValue(el)) > -1\n } else if (value !== oldValue) {\n box.checked = looseEqual(value, getCheckboxValue(box, true))\n }\n oldValue = value\n synced = box.checked\n }\n } else if (type === 'radio') {\n const radio = el as HTMLInputElement\n seed(() => (radio.checked ? getValue(el) : undefined))\n let synced = radio.checked\n listen(el, 'change', () => {\n const checked = radio.checked\n if (checked === synced) return\n synced = checked\n // \n if (checked) assign(getValue(el))\n })\n render = () => {\n radio.checked = looseEqual(read(), getValue(el))\n synced = radio.checked\n }\n } else {\n // \n const resolveValue = (val: string) => {\n if (trim) return val.trim()\n if (number) return toNumber(val)\n return val\n }\n\n seed(() => resolveValue(el.value))\n let synced = el.value\n // \n let held = false\n listen(el, 'compositionstart', onCompositionStart)\n listen(el, 'compositionend', onCompositionEnd)\n listen(el, modifiers?.lazy ? 'change' : 'input', () => {\n if ((el as any).composing) return\n if (el.value === synced) {\n if (held) render()\n return\n }\n held = false\n synced = el.value\n assign(resolveValue(el.value))\n })\n if (trim) {\n listen(el, 'change', () => {\n // \n const dirty = el.value !== synced\n el.value = el.value.trim()\n if (!dirty) synced = el.value\n })\n }\n\n render = () => {\n // \n // \n const newVal = read() ?? ''\n if ((el as any).composing) {\n held = true\n return\n }\n held = false\n const curVal = el.value\n if (\n !(document.activeElement === el && resolveValue(curVal) === newVal) &&\n curVal !== newVal\n ) {\n el.value = newVal\n }\n synced = el.value\n }\n }\n\n attachModel(el, read, assign, () => render())\n effect(() => render())\n}\n\nconst getValue = (el: any) => ('_value' in el ? el._value : el.value)\n\n// \nconst getCheckboxValue = (\n el: HTMLInputElement & { _trueValue?: any; _falseValue?: any },\n checked: boolean\n) => {\n const key = checked ? '_trueValue' : '_falseValue'\n return key in el ? el[key] : checked\n}\n\nconst onCompositionStart = (e: Event) => {\n ;(e.target as any).composing = true\n}\n\nconst onCompositionEnd = (e: Event) => {\n const target = e.target as any\n if (target.composing) {\n target.composing = false\n trigger(target, 'input')\n }\n}\n\nconst trigger = (el: HTMLElement, type: string) => {\n const e = document.createEvent('HTMLEvents')\n e.initEvent(type, true, true)\n el.dispatchEvent(e)\n}\n","import { DEV } from './env'\nconst evalCache: Record<string, Function> = Object.create(null)\n\nexport const evaluate = (scope: any, exp: string, el?: Node) =>\n execute(scope, `return(${exp})`, el)\n\nexport const execute = (scope: any, exp: string, el?: Node) => {\n const fn = evalCache[exp] || (evalCache[exp] = toFunction(exp))\n try {\n return fn(scope, el)\n } catch (e) {\n if (DEV) {\n console.warn(`Error when evaluating expression \"${exp}\":`)\n }\n console.error(e)\n }\n}\n\nconst toFunction = (exp: string): Function => {\n try {\n return new Function(`$data`, `$el`, `with($data){${exp}}`)\n } catch (e) {\n console.error(`${(e as Error).message} in expression: ${exp}`)\n return () => {}\n }\n}\n","import { Directive } from '.'\nimport { execute } from '../eval'\nimport { nextTick } from '../scheduler'\nimport { isSealing } from '../context'\n\nexport const effect: Directive = ({ el, ctx, exp, effect, modifiers }) => {\n const run = () => execute(ctx.scope, exp, el)\n // \n if (modifiers && (modifiers.mounted || modifiers.unmounted || modifiers.sealed)) {\n let gone = false\n // \n if (modifiers.mounted) nextTick(() => gone || run())\n // \n if (modifiers.sealed) ctx.sealers.push(run)\n // \n return () => {\n gone = true\n if (modifiers.unmounted && !isSealing()) run()\n }\n }\n nextTick(() => effect(run))\n}\n","import { Context } from '../context'\nimport { effect as rawEffect } from '@vue/reactivity'\nimport { bind } from './bind'\nimport { on } from './on'\nimport { show } from './show'\nimport { text } from './text'\nimport { html } from './html'\nimport { model } from './model'\nimport { effect } from './effect'\n\nexport interface Directive<T = Element> {\n (ctx: DirectiveContext<T>): (() => void) | void\n}\n\nexport interface DirectiveContext<T = Element> {\n el: T\n get: (exp?: string) => any\n effect: typeof rawEffect\n exp: string\n arg?: string\n modifiers?: Record<string, true>\n ctx: Context\n}\n\nexport const builtInDirectives: Record<string, Directive<any>> = {\n bind,\n on,\n show,\n text,\n html,\n model,\n effect\n}\n","import { DEV } from '../env'\nimport { Block } from '../block'\nimport { evaluate } from '../eval'\nimport { checkAttr } from '../utils'\nimport { Context } from '../context'\n\ninterface Branch {\n exp?: string | null\n el: Element\n}\n\nexport const _if = (el: Element, exp: string, ctx: Context) => {\n if (DEV && !exp.trim()) {\n console.warn(`h-if expression cannot be empty.`)\n }\n\n // \n // \n const parent = el.parentNode!\n const anchor = new Comment('h-if')\n parent.insertBefore(anchor, el)\n\n const branches: Branch[] = [\n {\n exp,\n el\n }\n ]\n\n // \n let elseEl: Element | null\n let elseExp: string | null\n while ((elseEl = el.nextElementSibling)) {\n elseExp = null\n if (\n checkAttr(elseEl, 'h-else') === '' ||\n (elseExp = checkAttr(elseEl, 'h-else-if'))\n ) {\n parent.removeChild(elseEl)\n branches.push({ exp: elseExp, el: elseEl })\n } else {\n break\n }\n }\n\n const nextNode = el.nextSibling\n parent.removeChild(el)\n\n let block: Block | undefined\n let activeBranchIndex: number = -1\n\n const removeActiveBlock = () => {\n if (block) {\n block.el.parentNode!.insertBefore(anchor, block.el)\n block.remove()\n block = undefined\n }\n }\n\n ctx.effect(() => {\n for (let i = 0; i < branches.length; i++) {\n const { exp, el } = branches[i]\n if (!exp || evaluate(ctx.scope, exp)) {\n if (i !== activeBranchIndex) {\n removeActiveBlock()\n block = new Block(el, ctx)\n const host = anchor.parentNode!\n block.insert(host, anchor)\n host.removeChild(anchor)\n activeBranchIndex = i\n }\n return\n }\n }\n // \n activeBranchIndex = -1\n removeActiveBlock()\n })\n\n return nextNode\n}\n","import { DEV } from '../env'\nimport { isArray, isObject } from '@vue/shared'\nimport { Block } from '../block'\nimport { evaluate } from '../eval'\nimport { Context, createScopedContext } from '../context'\n\nconst forAliasRE = /([\\s\\S]*?)\\s+(?:in|of)\\s+([\\s\\S]*)/\nconst forIteratorRE = /,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/\nconst stripParensRE = /^\\(|\\)$/g\nconst destructureRE = /^[{[]\\s*((?:[\\w_$]+\\s*,?\\s*)+)[\\]}]$/\n\ntype KeyToIndexMap = Map<any, number>\n\nexport const _for = (el: Element, exp: string, ctx: Context) => {\n const inMatch = exp.match(forAliasRE)\n if (!inMatch) {\n DEV && console.warn(`invalid h-for expression: ${exp}`)\n return\n }\n\n const nextNode = el.nextSibling\n\n // \n const parent = el.parentNode!\n const anchor = new Text('')\n parent.insertBefore(anchor, el)\n parent.removeChild(el)\n\n const sourceExp = inMatch[2].trim()\n let valueExp = inMatch[1].trim().replace(stripParensRE, '').trim()\n let destructureBindings: string[] | undefined\n let isArrayDestructure = false\n let indexExp: string | undefined\n let objIndexExp: string | undefined\n\n let keyAttr = 'key'\n let keyExp =\n el.getAttribute(keyAttr) ||\n el.getAttribute((keyAttr = ':key')) ||\n el.getAttribute((keyAttr = 'h-bind:key'))\n if (keyExp) {\n el.removeAttribute(keyAttr)\n if (keyAttr === 'key') keyExp = JSON.stringify(keyExp)\n }\n\n let match\n if ((match = valueExp.match(forIteratorRE))) {\n valueExp = valueExp.replace(forIteratorRE, '').trim()\n indexExp = match[1].trim()\n if (match[2]) {\n objIndexExp = match[2].trim()\n }\n }\n\n if ((match = valueExp.match(destructureRE))) {\n destructureBindings = match[1].split(',').map((s) => s.trim())\n isArrayDestructure = valueExp[0] === '['\n }\n\n let mounted = false\n let blocks: Block[]\n let childCtxs: Context[]\n let keyToIndexMap: Map<any, number>\n\n const createChildContexts = (source: unknown): [Context[], KeyToIndexMap] => {\n const map: KeyToIndexMap = new Map()\n const ctxs: Context[] = []\n\n if (isArray(source)) {\n for (let i = 0; i < source.length; i++) {\n ctxs.push(createChildContext(map, source[i], i))\n }\n } else if (typeof source === 'number') {\n for (let i = 0; i < source; i++) {\n ctxs.push(createChildContext(map, i + 1, i))\n }\n } else if (isObject(source)) {\n let i = 0\n for (const key in source) {\n ctxs.push(createChildContext(map, source[key], i++, key))\n }\n }\n\n return [ctxs, map]\n }\n\n const createChildContext = (\n map: KeyToIndexMap,\n value: any,\n index: number,\n objKey?: string\n ): Context => {\n const data: any = {}\n if (destructureBindings) {\n destructureBindings.forEach(\n (b, i) => (data[b] = value[isArrayDestructure ? i : b])\n )\n } else {\n data[valueExp] = value\n }\n if (objKey) {\n indexExp && (data[indexExp] = objKey)\n objIndexExp && (data[objIndexExp] = index)\n } else {\n indexExp && (data[indexExp] = index)\n }\n const childCtx = createScopedContext(ctx, data)\n const key = keyExp ? evaluate(childCtx.scope, keyExp) : index\n map.set(key, index)\n childCtx.key = key\n return childCtx\n }\n\n const mountBlock = (ctx: Context, ref: Node) => {\n const block = new Block(el, ctx)\n block.key = ctx.key\n block.insert(anchor.parentNode!, ref)\n return block\n }\n\n ctx.effect(() => {\n const source = evaluate(ctx.scope, sourceExp)\n const prevKeyToIndexMap = keyToIndexMap\n ;[childCtxs, keyToIndexMap] = createChildContexts(source)\n if (!mounted) {\n blocks = childCtxs.map((s) => mountBlock(s, anchor))\n mounted = true\n } else {\n for (let i = 0; i < blocks.length; i++) {\n if (!keyToIndexMap.has(blocks[i].key)) {\n blocks[i].remove()\n }\n }\n \n const nextBlocks: Block[] = []\n let i = childCtxs.length\n let nextBlock: Block | undefined\n let prevMovedBlock: Block | undefined\n while (i--) {\n const childCtx = childCtxs[i]\n const oldIndex = prevKeyToIndexMap.get(childCtx.key)\n let block\n if (oldIndex == null) {\n // \n block = mountBlock(\n childCtx,\n nextBlock ? nextBlock.el : anchor\n )\n } else {\n // \n block = blocks[oldIndex]\n Object.assign(block.ctx.scope, childCtx.scope)\n if (oldIndex !== i) {\n // \n if (\n blocks[oldIndex + 1] !== nextBlock || \n // \n prevMovedBlock === nextBlock\n ) {\n prevMovedBlock = block\n block.insert(anchor.parentNode!, nextBlock ? nextBlock.el : anchor)\n }\n }\n }\n nextBlocks.unshift(nextBlock = block)\n }\n blocks = nextBlocks\n }\n })\n\n return nextNode\n}\n","import { Directive } from '.'\n\nexport const ref: Directive = ({\n el,\n ctx: {\n scope: { $refs }\n },\n get,\n effect\n}) => {\n let prevRef: any\n effect(() => {\n const ref = get()\n $refs[ref] = el\n if (prevRef && ref !== prevRef) {\n delete $refs[prevRef]\n }\n prevRef = ref\n })\n return () => {\n prevRef && delete $refs[prevRef]\n }\n}\n","// \n// \nimport { pauseTracking, reactive, resetTracking, toRaw } from '@vue/reactivity'\n\nexport type AsyncStatus = 'idle' | 'pending' | 'fulfilled' | 'rejected'\n\nexport const asyncStatuses: readonly string[] = ['idle', 'pending', 'fulfilled', 'rejected']\n\nexport interface AsyncState {\n status: AsyncStatus\n /* */\n value: any\n /* */\n promise: Promise<AsyncState> | undefined\n}\n\nexport interface AsyncOptions {\n /* */\n force?: boolean\n}\n\nexport interface AsyncRun {\n /* */\n signal: AbortSignal\n}\n\nexport interface AsyncRegistry {\n /* */\n map: Record<string, AsyncState>\n parent?: AsyncRegistry\n}\n\nexport const createAsyncState = (status: AsyncStatus = 'idle'): AsyncState =>\n reactive({ status, value: undefined, promise: undefined })\n\nexport const createAsyncRegistry = (parent?: AsyncRegistry): AsyncRegistry => ({\n map: reactive(Object.create(null)),\n parent\n})\n\n// \nconst controllers = new WeakMap<object, AbortController>()\n\nconst find = (reg: AsyncRegistry | undefined, name: string) => {\n // \n for (let cur = reg; cur; cur = cur.parent) {\n if (name in cur.map) return cur.map[name]\n }\n}\n\nconst validName = (name: any): name is string => {\n if (typeof name === 'string' && name && name[0] !== '$' && !/[\\s:]/.test(name)) return true\n console.error(\n `hyper-scope: $async 의 이름으로 쓸 수 없습니다: ${String(name)} ` +\n `($ 로 시작하지 않고, 빈칸 · 콜론이 없는 글자여야 합니다)`\n )\n return false\n}\n\n/* */\nexport const readAsync = (reg: AsyncRegistry | undefined, name: string): AsyncState =>\n find(reg, name) || createAsyncState()\n\nconst settle = (state: AsyncState, mine: AbortController, status: AsyncStatus, value: any) => {\n if (controllers.get(toRaw(state)) !== mine) return\n controllers.delete(toRaw(state))\n state.status = status\n state.value = value\n}\n\n/* */\nexport const runAsync = (\n reg: AsyncRegistry,\n self: any,\n name: string,\n fn: ((run: AsyncRun) => any) | null,\n options?: AsyncOptions\n): AsyncState => {\n // \n pauseTracking()\n try {\n const state = find(reg, name) || (reg.map[name] = createAsyncState())\n if (state.status === 'pending' && !(options && options.force)) {\n console.error(\n `hyper-scope: $async(\"${name}\") 이 아직 끝나지 않았습니다. ` +\n `겹쳐 돌지 않습니다 — 앞의 것을 취소하려면 { force: true } 를 줍니다.`\n )\n return state\n }\n const raw = toRaw(state)\n controllers.get(raw)?.abort()\n controllers.delete(raw)\n\n if (fn == null) {\n state.status = 'idle'\n state.value = undefined\n return state\n }\n if (typeof fn !== 'function') {\n console.error(`hyper-scope: $async(\"${name}\", …) 의 둘째 인자는 함수이거나 null 입니다.`)\n return state\n }\n\n const controller = new AbortController()\n controllers.set(raw, controller)\n state.status = 'pending'\n state.value = undefined\n state.promise = new Promise((resolve) => resolve(fn.call(self, { signal: controller.signal }))).then(\n (value) => {\n settle(state, controller, 'fulfilled', value)\n return state\n },\n (error) => {\n if (controllers.get(raw) === controller) {\n console.error(`hyper-scope: $async(\"${name}\") 실행 중 오류`)\n console.error(error)\n }\n settle(state, controller, 'rejected', error)\n return state\n }\n )\n return state\n } finally {\n resetTracking()\n }\n}\n\n/* */\nexport const abortAsyncs = (reg: AsyncRegistry) => {\n const map = toRaw(reg.map)\n for (const name of Object.keys(map)) {\n const raw = toRaw(map[name])\n controllers.get(raw)?.abort()\n controllers.delete(raw)\n }\n}\n\n/* */\nexport const asyncHelpers = (reg: AsyncRegistry, self: () => any) => ({\n $async: (name: string, ...rest: [fn?: ((run: AsyncRun) => any) | null, options?: AsyncOptions]) => {\n if (!validName(name)) return createAsyncState()\n return rest.length ? runAsync(reg, self(), name, rest[0] as any, rest[1]) : readAsync(reg, name)\n },\n $await: (name: string, cb: (state: AsyncState) => any) => {\n if (typeof cb !== 'function') {\n console.error(\n `hyper-scope: $await(\"${String(name)}\", 콜백) — 콜백이 필요합니다. 상태 객체는 $async(\"${String(name)}\") 로 읽습니다.`\n )\n return\n }\n if (!validName(name)) return\n return cb(readAsync(reg, name))\n }\n})\n","// \n// \nimport { computed, effectScope, markRaw, reactive, ref, stop } from '@vue/reactivity'\nimport { camelize } from '@vue/shared'\nimport { DEV } from './env'\nimport {\n Context,\n createContext,\n createScopedContext,\n declareInScope,\n sealContext,\n Teardownable,\n defineScopeHelpers,\n rootScopeOf\n} from './context'\nimport { evaluate } from './eval'\nimport { nextTick } from './scheduler'\nimport { abortAsyncs, asyncHelpers, createAsyncRegistry, createAsyncState } from './async'\n\n/* */\nconst readProps = (el: Element): Record<string, any> => {\n const raw = el.getAttribute('h-props')\n if (raw == null) return {}\n el.removeAttribute('h-props')\n try {\n return raw.trim() ? JSON.parse(raw) : {}\n } catch (e) {\n console.error(`hyper-scope: h-props 가 JSON 이 아닙니다: ${raw}`)\n console.error(e)\n return {}\n }\n}\n\n/* */\nexport interface HostHandle {\n /* */\n el: Element\n /* */\n readonly scope: Record<string, any>\n /* \n \n \n \n */\n readonly parent: HostHandle | null\n /* \n \n \n \n \n */\n seal(): void\n /* */\n readonly sealed: boolean\n}\n\nconst names = (tokens: string) => tokens.trim().split(/\\s+/).filter(Boolean)\n\nconst readonly = (what: string, key: string) => () =>\n console.error(`hyper-scope: ${what} \"${key}\" 에는 값을 넣을 수 없습니다(읽기 전용).`)\n\nconst views = new WeakMap<object, any>()\n/* \n \n \n */\nexport const readonlyView = <T extends object>(target: T, what: string, deep = true): T => {\n let view = deep ? views.get(target) : undefined\n if (view) return view\n const refuse = (key: PropertyKey) => {\n console.error(`hyper-scope: ${what} \"${String(key)}\" 에는 값을 넣을 수 없습니다(읽기 전용).`)\n return true\n }\n view = new Proxy(target, {\n get(t, key) {\n // \n if (key === '__v_skip') return true\n const value = Reflect.get(t, key, t)\n return deep && value !== null && typeof value === 'object' && typeof key !== 'symbol' ? readonlyView(value, what) : value\n },\n set: (_t, key) => refuse(key),\n deleteProperty: (_t, key) => refuse(key),\n defineProperty: (_t, key) => refuse(key)\n })\n if (deep) views.set(target, view)\n return view\n}\n\n/* */\nexport const injectInto = (scope: Record<string, any>, tokens: string, provides: Record<PropertyKey, any>) => {\n const linked: PropertyDescriptorMap = {}\n for (const key of names(tokens)) {\n linked[key] = { get: () => provides[key], set: readonly('h-inject 로 받은', key) }\n }\n defineScopeHelpers(scope, linked)\n}\n\nconst provideRE = /^h-provide:(.+)$/\nconst computedRE = /^h-computed:(.+)$/\n\n/* \n \n \n \n */\nexport const applyProvides = (el: Element, ctx: Context, keep = false): Context => {\n let out: Context | undefined\n for (const { name, value } of [...el.attributes]) {\n if (name === 'h-provide') {\n console.error(`hyper-scope: h-provide 는 이름이 필요합니다 — h-provide:이름=\"식\"`)\n keep || el.removeAttribute(name)\n continue\n }\n const m = name.match(provideRE)\n if (!m) continue\n keep || el.removeAttribute(name)\n out ||= { ...ctx, provides: Object.create(ctx.provides) }\n const scope = ctx.scope\n const value$ = computed(() => evaluate(scope, value, el))\n Object.defineProperty(out.provides, camelize(m[1]), {\n get: () => value$.value,\n enumerable: true,\n configurable: true\n })\n }\n return out || ctx\n}\n\n/* */\nexport const defineComputeds = (el: Element, scope: Record<string, any>): boolean => {\n const defs: PropertyDescriptorMap = {}\n for (const { name, value } of [...el.attributes]) {\n if (name === 'h-computed') {\n console.error(\n `hyper-scope: h-computed 는 이름이 필요합니다 — h-computed:이름=\"식\". 값 없이 일을 하려면 h-effect 를 씁니다.`\n )\n el.removeAttribute(name)\n continue\n }\n const m = name.match(computedRE)\n if (!m) continue\n el.removeAttribute(name)\n const key = camelize(m[1])\n const value$ = computed(() => evaluate(scope, value, el))\n defs[key] = { get: () => value$.value, set: readonly('h-computed 의', key) }\n }\n const any = Object.keys(defs).length > 0\n if (any) defineScopeHelpers(scope, defs)\n return any\n}\n\nexport const hasComputeds = (el: Element) => {\n for (const { name } of el.attributes) if (name.startsWith('h-computed')) return true\n return false\n}\n\n/* \n \n \n \n \n */\nexport const openScope = (\n el: Element,\n parent: Context,\n inherit?: string | null,\n inject?: string | null\n): Context => {\n const parentScope = parent.scope\n // \n const own = createContext(parent)\n const ctx = createScopedContext({ ...own, scope: rootScopeOf(parentScope) }, {}, true)\n let dead = false\n let sealed = false\n const life: Teardownable = {\n ctx,\n teardown() {\n if (dead) return\n dead = true\n const siblings = parent.blocks\n const i = siblings.indexOf(life)\n if (i > -1) siblings.splice(i, 1)\n ;[...ctx.blocks].forEach((child) => child.teardown())\n ctx.effects.forEach(stop)\n ctx.cleanups.forEach((fn) => fn())\n }\n }\n parent.blocks.push(life)\n const scope = ctx.scope\n const injectFrom = parent.provides\n const provides = ctx.provides\n // \n const asyncs = (ctx.asyncs = createAsyncRegistry())\n ctx.scopeState = createAsyncState('fulfilled')\n ctx.cleanups.push(() => abortAsyncs(asyncs))\n const helpers = asyncHelpers(asyncs, () => scope)\n\n // \n if (inherit) {\n const linked: PropertyDescriptorMap = {}\n for (const key of names(inherit)) {\n linked[key] = {\n get: () => parentScope[key],\n set: (v) => (parentScope[key] = v),\n enumerable: true\n }\n }\n defineScopeHelpers(scope, linked)\n }\n if (inject) injectInto(scope, inject, injectFrom)\n\n // \n const parentHost: HostHandle | undefined = parentScope.$host\n const placed: HostHandle | null = parentHost\n ? markRaw({\n el: parentHost.el,\n get scope() {\n return parentScope\n },\n get parent() {\n return parentHost.parent\n },\n get sealed() {\n return parentHost.sealed\n },\n seal: () => parentHost.seal()\n })\n : null\n const host: HostHandle = markRaw({\n el,\n get scope() {\n return scope\n },\n get parent() {\n return placed\n },\n get sealed() {\n return sealed\n },\n seal() {\n if (sealed || dead) return\n sealed = true\n sealContext(ctx, () => life.teardown())\n ctx.hooks?.sealed(el)\n }\n })\n\n defineScopeHelpers(scope, {\n // \n $scope: { value: scope },\n $host: { value: host },\n // \n $root: {\n get: () => {\n console.error(`hyper-scope: $root 는 없어졌습니다 — 스코프 요소는 $host.el 입니다.`)\n return el\n }\n },\n // \n $props: { value: readonlyView(readProps(el), '$props 의') },\n $emit: {\n value: (name: string, detail?: any, bubbles = true) =>\n el.dispatchEvent(new CustomEvent(name, { detail, bubbles, cancelable: true }))\n },\n // \n // \n $dispatch: {\n value: (target: Element | string, name: string, detail: any = null, bubbles = true) =>\n dispatchTo(target, name, detail, bubbles)\n },\n $handle: {\n value: (target: Element | string, name: string, detail: any = null) =>\n dispatchTo(target, name, detail, false)\n },\n $provide: {\n value: (key: PropertyKey, value: any) => {\n provides[key] = value\n return value\n }\n },\n $inject: {\n value: (key: PropertyKey, fallback?: any) =>\n key in injectFrom ? injectFrom[key] : fallback\n },\n $async: { value: helpers.$async },\n $await: { value: helpers.$await }\n })\n // \n const scoped = parent.scoped\n if (scoped) {\n const defs: PropertyDescriptorMap = {}\n for (const name of Object.keys(scoped)) defs[name] = { get: () => scoped[name](host) }\n defineScopeHelpers(scope, defs)\n }\n return ctx\n}\n\n/* */\nexport interface ScopeTools {\n ref: typeof ref\n computed: typeof computed\n reactive: typeof reactive\n /* */\n effect: Context['effect']\n nextTick: typeof nextTick\n props: Record<string, any>\n emit: (name: string, detail?: any, bubbles?: boolean) => boolean\n provide: (key: PropertyKey, value: any) => any\n inject: (key: PropertyKey, fallback?: any) => any\n /* */\n host: HostHandle\n scope: Record<string, any>\n $async: ReturnType<typeof asyncHelpers>['$async']\n $await: ReturnType<typeof asyncHelpers>['$await']\n}\n\n/* \n \n \n */\nexport const scopeValue = (el: Element, exp: string, ctx: Context): any => {\n const scope = ctx.scope\n const value = exp ? evaluate(scope, exp, el) : undefined\n if (typeof value !== 'function') return value\n // \n const es = effectScope()\n ctx.cleanups.push(() => es.stop())\n const tools: ScopeTools = {\n ref,\n computed,\n reactive,\n effect: ctx.effect,\n nextTick,\n props: scope.$props,\n emit: scope.$emit,\n provide: scope.$provide,\n inject: scope.$inject,\n host: scope.$host,\n scope,\n $async: scope.$async,\n $await: scope.$await\n }\n return es.run(() => value.call(scope, tools))\n}\n\nexport const isThenable = (v: any): v is PromiseLike<any> =>\n !!v && (typeof v === 'object' || typeof v === 'function') && typeof v.then === 'function'\n\n// \nconst held = new WeakSet<Element>()\nexport const holdScope = (el: Element) => held.add(el)\nexport const releaseScope = (el: Element) => held.delete(el)\nexport const isHeldScope = (el: Element) => held.has(el)\n\n/* */\nconst dispatchTo = (target: Element | string, name: string, detail: any, bubbles: boolean) => {\n const to = typeof target === 'string' ? document.querySelector(target) : target\n if (!to) {\n DEV && console.warn(`hyper-scope: 이벤트 ${name} 을 받을 요소가 없습니다: ${String(target)}`)\n return\n }\n to.dispatchEvent(new CustomEvent(name, { detail, bubbles, cancelable: true }))\n return to\n}\n\nconst scriptCache: Record<string, Function> = Object.create(null)\n\nconst compileScript = (src: string): Function => {\n try {\n // \n return new Function('$data', '$el', `with($data){${src}\\n}`)\n } catch (e) {\n console.error(`hyper-scope: <script type=\"scope\"> 를 읽지 못했습니다.`)\n console.error(e)\n return () => {}\n }\n}\n\nexport const isScopeScript = (el: Element) =>\n el.tagName === 'SCRIPT' && el.getAttribute('type') === 'scope'\n\n/* \n \n \n */\nexport const runScopeScripts = (el: Element, ctx: Context) => {\n // \n let es: ReturnType<typeof effectScope> | undefined\n for (const child of [...el.children]) {\n if (!isScopeScript(child)) continue\n const src = child.textContent || ''\n const fn = scriptCache[src] || (scriptCache[src] = compileScript(src))\n let result: any\n try {\n if (!es) {\n const made = (es = effectScope())\n ctx.cleanups.push(() => made.stop())\n }\n result = es.run(() => fn.call(ctx.scope, ctx.scope, el))\n } catch (e) {\n console.error(`hyper-scope: <script type=\"scope\"> 실행 중 오류`)\n console.error(e)\n continue\n }\n if (result && typeof result === 'object') declareInScope(ctx.scope, result)\n }\n}\n\n/* \n \n \n */\nexport const openState = (el: Element, exp: string, parent: Context): Context => {\n const ctx = createScopedContext(parent, {}, true)\n const scope = ctx.scope\n const asyncs = (ctx.asyncs = createAsyncRegistry(parent.asyncs))\n ctx.cleanups.push(() => abortAsyncs(asyncs))\n const helpers = asyncHelpers(asyncs, () => scope)\n defineScopeHelpers(scope, {\n $async: { value: helpers.$async },\n $await: { value: helpers.$await }\n })\n const data = exp ? evaluate(scope, exp, el) : undefined\n if (data && typeof data === 'object') declareInScope(scope, data)\n else if (exp.trim() && data !== undefined) {\n console.error(`hyper-scope: h-state 는 객체를 받습니다: ${exp}`)\n }\n return ctx\n}\n","// \n//\n// \n// \n//\n// \n// \n// \n// \nimport { effectScope, reactive } from '@vue/reactivity'\nimport { attachModel } from './directives/model'\nimport { camelize, hasOwn, hyphenate } from '@vue/shared'\nimport { DEV } from './env'\nimport {\n Context,\n defineScopeHelpers,\n declareInScope,\n isSealing,\n recordContext,\n recordSlotContext,\n rootScopeOf\n} from './context'\nimport { evaluate } from './eval'\nimport { nextTick } from './scheduler'\nimport { HostHandle, isHeldScope, openScope, readonlyView, runScopeScripts } from './scope'\nimport { processDirective, takeMustache, walkChildren } from './walk'\n\ntype PropType =\n | StringConstructor\n | NumberConstructor\n | BooleanConstructor\n | ObjectConstructor\n | ArrayConstructor\n\nexport interface PropOptions {\n type?: PropType\n default?: any\n}\n\nexport interface SetupContext {\n /* */\n host: HostHandle\n /* */\n emit: (name: string, detail?: any) => boolean\n provide: (key: PropertyKey, value: any) => any\n inject: (key: PropertyKey, fallback?: any) => any\n /* */\n onMounted: (fn: () => void) => void\n /* */\n onUnmounted: (fn: () => void) => void\n /* */\n onSealed: (fn: () => void) => void\n /* */\n scope: Record<string, any>\n}\n\nexport interface ComponentDefinition {\n /* \n \n \n */\n props?: Record<string, any> | string[]\n /* */\n template: string | HTMLTemplateElement\n /* \n \n \n */\n style?: string | { css: string; scoped?: boolean }\n /* */\n setup?: (props: Record<string, any>, ctx: SetupContext) => Record<string, any> | void\n /* */\n model?: { prop?: string; event?: string }\n}\n\ninterface NormalizedProp {\n type?: PropType\n default?: any\n}\n\ninterface Registered {\n def: ComponentDefinition\n props: Record<string, NormalizedProp>\n template?: HTMLTemplateElement\n /* */\n styles?: HTMLStyleElement[]\n /* */\n inlineStyles?: boolean\n}\n\nconst registry = new Map<string, Registered>()\nconst mounted = new WeakSet<Element>()\n\nconst typeOfValue = (v: any): PropType | undefined =>\n typeof v === 'number'\n ? Number\n : typeof v === 'boolean'\n ? Boolean\n : typeof v === 'string'\n ? String\n : Array.isArray(v)\n ? Array\n : v && typeof v === 'object'\n ? Object\n : undefined\n\nconst normalizeProps = (props: ComponentDefinition['props']) => {\n const out: Record<string, NormalizedProp> = {}\n if (Array.isArray(props)) {\n for (const name of props) out[camelize(name)] = { type: String }\n return out\n }\n for (const [name, decl] of Object.entries(props || {})) {\n const full =\n decl && typeof decl === 'object' && !Array.isArray(decl) && ('type' in decl || 'default' in decl)\n out[camelize(name)] = full\n ? { type: decl.type || typeOfValue(decl.default), default: decl.default }\n : { type: typeOfValue(decl), default: decl }\n }\n return out\n}\n\nconst defaultOf = (p: NormalizedProp) => {\n const d = p.default\n // \n if (typeof d === 'function' && p.type !== (Function as any)) return d()\n if (d && typeof d === 'object') return JSON.parse(JSON.stringify(d))\n return d\n}\n\n/* */\nconst convert = (raw: string, type?: PropType) => {\n if (type === Number) {\n const n = Number(raw)\n return raw.trim() === '' || Number.isNaN(n) ? raw : n\n }\n if (type === Boolean) return raw !== 'false'\n if (type === Array || type === Object) {\n try {\n return JSON.parse(raw)\n } catch {\n return raw\n }\n }\n return raw\n}\n\nconst toTemplate = (src: ComponentDefinition['template']): HTMLTemplateElement | undefined => {\n if (typeof src !== 'string') return src\n if (src[0] === '#') {\n const found = document.querySelector(src)\n if (!(found instanceof HTMLTemplateElement)) {\n DEV && console.error(`hyper-scope: 컴포넌트 템플릿 ${src} 에 맞는 <template> 이 없습니다.`)\n return\n }\n return found\n }\n const t = document.createElement('template')\n t.innerHTML = src\n return t\n}\n\n/* */\nexport const defineComponent = (name: string, def: ComponentDefinition) => {\n const tag = name.toLowerCase()\n if (!tag.includes('-')) {\n DEV && console.error(`hyper-scope: 컴포넌트 이름에는 하이픈이 있어야 합니다: ${name}`)\n return\n }\n // \n dropStyles(registry.get(tag))\n registry.set(tag, { def, props: normalizeProps(def.props) })\n}\n\nconst dropStyles = (reg?: Registered) => {\n for (const el of reg?.styles || []) el.parentNode?.removeChild(el)\n}\n\nexport const clearComponents = () => {\n for (const reg of registry.values()) dropStyles(reg)\n registry.clear()\n}\n\n/* \n \n \n */\nconst installStyles = (tag: string, reg: Registered) => {\n if (!reg.styles) {\n const styles: HTMLStyleElement[] = (reg.styles = [])\n const canScope = typeof (globalThis as any).CSSScopeRule !== 'undefined'\n const add = (css: string, scoped: boolean) => {\n if (!css.trim()) return\n const el = document.createElement('style')\n el.setAttribute('data-h-component', tag)\n el.textContent = scoped && canScope ? `@scope (${tag}) {\\n${css}\\n}` : css\n styles.push(el)\n }\n for (const style of reg.template?.content.querySelectorAll('style') || []) {\n reg.inlineStyles = true\n add(style.textContent || '', style.hasAttribute('scoped'))\n }\n const own = reg.def.style\n if (typeof own === 'string') add(own, false)\n else if (own) add(own.css, !!own.scoped)\n }\n for (const el of reg.styles) el.isConnected || document.head.appendChild(el)\n}\n\n/* */\nexport const registerTemplates = (root: Element | Document) => {\n const found: HTMLTemplateElement[] = []\n if (root instanceof HTMLTemplateElement && root.hasAttribute('h-component')) found.push(root)\n root.querySelectorAll?.('template[h-component]').forEach((t) => found.push(t as HTMLTemplateElement))\n for (const t of found) {\n const name = t.getAttribute('h-component')!\n let props: Record<string, any> = {}\n const raw = t.getAttribute('h-props')\n if (raw && raw.trim()) {\n try {\n props = JSON.parse(raw)\n } catch (e) {\n console.error(`hyper-scope: <template h-component=\"${name}\"> 의 h-props 가 JSON 이 아닙니다.`)\n }\n }\n defineComponent(name, { props, template: t })\n }\n}\n\nexport const isComponentHost = (el: Element) => registry.has(el.localName)\n\n/* */\nexport const isPendingUnit = (el: Element) =>\n el.hasAttribute('h-scope') ||\n (isComponentHost(el) && !mounted.has(el)) ||\n isHeldScope(el)\n\n/* */\nexport const unitSelector = () => ['[h-scope]', ...registry.keys()].join(',')\n\n// \n\nconst takeSlots = (host: Element) => {\n const slots: Record<string, Node[]> = Object.create(null)\n const put = (name: string, nodes: Node[]) => (slots[name] ||= []).push(...nodes)\n for (const node of [...host.childNodes]) {\n host.removeChild(node)\n if (node.nodeType === 1) {\n const el = node as Element\n const name = el.getAttribute('slot')\n if (name) {\n el.removeAttribute('slot')\n // \n if (el instanceof HTMLTemplateElement) put(name, [...el.content.childNodes])\n else put(name, [el])\n continue\n }\n }\n put('default', [node])\n }\n // \n if (slots.default && slots.default.every((n) => n.nodeType === 3 && !n.textContent!.trim())) {\n delete slots.default\n }\n return slots\n}\n\n/* */\nconst findSlots = (root: DocumentFragment | Element, out: Element[] = []) => {\n for (const el of root.querySelectorAll('slot, template')) {\n if (el instanceof HTMLTemplateElement) findSlots(el.content, out)\n else out.push(el)\n }\n return out\n}\n\nconst fillSlots = (\n frag: DocumentFragment,\n slots: Record<string, Node[]>,\n parentCtx: Context,\n readText: boolean\n) => {\n // \n const slotCtx: Context = readText ? { ...parentCtx, mustache: true } : parentCtx\n for (const slot of findSlots(frag)) {\n const name = slot.getAttribute('name') || 'default'\n const given = slots[name]\n const parent = slot.parentNode!\n if (given) {\n for (const node of given) {\n // \n recordSlotContext(node, slotCtx)\n if (node.nodeType === 1) recordContext(node, parentCtx)\n parent.insertBefore(node, slot)\n }\n delete slots[name]\n } else {\n // \n while (slot.firstChild) parent.insertBefore(slot.firstChild, slot)\n }\n parent.removeChild(slot)\n }\n}\n\n// \n\nconst attrFor = (key: string, host: Element) => {\n const kebab = hyphenate(key)\n if (host.hasAttribute(kebab)) return host.getAttribute(kebab)\n const lower = key.toLowerCase()\n if (host.hasAttribute(lower)) return host.getAttribute(lower)\n return null\n}\n\nconst dirRE = /^(?:h-|:|@)/\nconst bindRE = /^(?::|h-bind:)([^.]+)/\n\n/* \n \n \n */\nexport const mountComponent = (host: Element, parentCtx: Context): void => {\n const reg = registry.get(host.localName)\n if (!reg || mounted.has(host)) return\n mounted.add(host)\n const { def } = reg\n if (!reg.template) reg.template = toTemplate(def.template)\n installStyles(host.localName, reg)\n\n if (host.hasAttribute('h-scope')) {\n DEV && console.warn(`hyper-scope: 컴포넌트 태그 <${host.localName}> 에는 h-scope 를 쓰지 않습니다.`)\n host.removeAttribute('h-scope')\n }\n\n // \n const declared = reg.props\n const initial: Record<string, any> = {}\n for (const [key, p] of Object.entries(declared)) initial[key] = defaultOf(p)\n const json = host.getAttribute('h-props')\n if (json != null) {\n host.removeAttribute('h-props')\n try {\n if (json.trim()) Object.assign(initial, JSON.parse(json))\n } catch (e) {\n console.error(`hyper-scope: <${host.localName}> 의 h-props 가 JSON 이 아닙니다: ${json}`)\n }\n }\n for (const [key, p] of Object.entries(declared)) {\n const raw = attrFor(key, host)\n if (raw != null) initial[key] = convert(raw, p.type)\n }\n const props = reactive(initial)\n const isProp = (key: string) => hasOwn(declared, key) || hasOwn(initial, key)\n\n // \n const watched = new Map<string, string>()\n for (const key of Object.keys(declared)) {\n watched.set(hyphenate(key), key)\n watched.set(key.toLowerCase(), key)\n }\n const attrObserver = new MutationObserver((records) => {\n for (const r of records) {\n const key = watched.get(r.attributeName!)\n if (!key) continue\n const raw = host.getAttribute(r.attributeName!)\n props[key] = raw == null ? defaultOf(declared[key]) : convert(raw, declared[key].type)\n }\n })\n attrObserver.observe(host, { attributes: true, attributeFilter: [...watched.keys()] })\n parentCtx.cleanups.push(() => attrObserver.disconnect())\n\n // \n // \n // \n const bridged: string[] = []\n for (const key of Object.keys(declared)) {\n if (key in host) continue\n Object.defineProperty(host, key, {\n configurable: true,\n enumerable: true,\n get: () => props[key],\n set: (value) => {\n props[key] = value\n }\n })\n bridged.push(key)\n }\n parentCtx.cleanups.push(() => {\n for (const key of bridged) delete (host as any)[key]\n })\n\n // \n const deferred: [string, string][] = []\n for (const { name, value } of [...host.attributes]) {\n if (!dirRE.test(name) || name === 'h-cloak' || name === 'h-text-inline') continue\n const bound = name.match(bindRE)\n if (bound && isProp(camelize(bound[1]))) {\n const key = camelize(bound[1])\n host.removeAttribute(name)\n parentCtx.effect(() => {\n props[key] = evaluate(parentCtx.scope, value, host)\n })\n continue\n }\n if (name === 'h-model' || name.startsWith('h-model.')) {\n host.removeAttribute(name)\n const prop = def.model?.prop || 'value'\n const event = def.model?.event || 'input'\n const assign = evaluate(parentCtx.scope, `(val) => { ${value} = val }`, host)\n const readModel = () => evaluate(parentCtx.scope, value, host)\n const pass = () => {\n props[prop] = readModel()\n }\n parentCtx.effect(pass)\n // \n attachModel(host, readModel, assign, pass)\n // \n const onEmit = (e: Event) => {\n if (e instanceof CustomEvent && e.target === host) assign(e.detail)\n }\n host.addEventListener(event, onEmit)\n parentCtx.cleanups.push(() => host.removeEventListener(event, onEmit))\n continue\n }\n // \n if (name === 'ref' || name === 'h-keep' || name === 'h-inject') continue\n if (name[0] === '@' || name.startsWith('h-on')) deferred.push([name, value])\n else processDirective(host, name, value, parentCtx)\n }\n for (const [name, value] of deferred) processDirective(host, name, value, parentCtx)\n const refName = host.getAttribute('ref')\n if (refName) {\n host.removeAttribute('ref')\n processDirective(host, ':ref', JSON.stringify(refName), parentCtx)\n }\n\n // \n const inject = host.getAttribute('h-inject')\n host.removeAttribute('h-inject')\n const ctx = openScope(\n host,\n {\n ...parentCtx,\n scope: rootScopeOf(parentCtx.scope),\n // \n asyncs: undefined\n },\n null,\n inject\n )\n const scope = ctx.scope\n // \n // \n const view = readonlyView(props, 'props 로 받은', false)\n const propGetters: PropertyDescriptorMap = {}\n for (const key of Object.keys(initial)) {\n propGetters[key] = {\n get: () => view[key],\n set: () => console.error(`hyper-scope: props 로 받은 \"${key}\" 에는 값을 넣을 수 없습니다(읽기 전용) — $emit 으로 알립니다.`),\n enumerable: true\n }\n }\n defineScopeHelpers(scope, { $props: { value: view }, ...propGetters })\n recordContext(host, ctx)\n\n // \n // \n const readsHostText = takeMustache(host)\n const slots = takeSlots(host)\n if (reg.template) {\n const frag = reg.template.content.cloneNode(true) as DocumentFragment\n if (reg.inlineStyles) {\n for (const s of [...frag.querySelectorAll('style')]) s.parentNode!.removeChild(s)\n }\n fillSlots(frag, slots, parentCtx, readsHostText)\n host.appendChild(frag)\n }\n\n // \n const mountedHooks: (() => void)[] = []\n const es = effectScope()\n parentCtx.cleanups.push(() => es.stop())\n if (def.setup) {\n const setupCtx: SetupContext = {\n host: scope.$host,\n emit: scope.$emit,\n provide: scope.$provide,\n inject: scope.$inject,\n onMounted: (fn) => mountedHooks.push(fn),\n // \n onUnmounted: (fn) => parentCtx.cleanups.push(() => isSealing() || fn()),\n onSealed: (fn) => ctx.sealers.push(fn),\n scope\n }\n let result: any\n try {\n result = es.run(() => def.setup!.call(scope, view, setupCtx))\n } catch (e) {\n console.error(`hyper-scope: <${host.localName}> setup 중 오류`)\n console.error(e)\n }\n if (result && typeof result === 'object') declareInScope(scope, result)\n }\n es.run(() => runScopeScripts(host, ctx))\n // \n // \n ctx.hooks?.scope(host, ctx)\n\n walkChildren(host, ctx)\n if (mountedHooks.length) nextTick(() => mountedHooks.forEach((fn) => fn()))\n}\n\n/* */\nexport const hasPendingAncestor = (el: Element) => {\n for (let cur = el.parentElement; cur; cur = cur.parentElement) {\n if (isPendingUnit(cur)) return true\n }\n return false\n}\n","// \n// \n// \n// \n// \nimport { Block } from '../block'\nimport { AsyncState, asyncStatuses, readAsync } from '../async'\nimport { Context, createScopedContext } from '../context'\n\ninterface Token {\n name: string\n status: string\n}\n\nconst SCOPE = '$scope'\n\nexport const parseAwait = (exp: string): Token[] => {\n const tokens: Token[] = []\n for (const part of exp.trim().split(/\\s+/)) {\n if (!part) continue\n const i = part.indexOf(':')\n const name = i < 0 ? part : part.slice(0, i)\n const status = i < 0 ? 'pending' : part.slice(i + 1)\n if (!name || !asyncStatuses.includes(status)) {\n console.error(\n `hyper-scope: h-await 의 토큰을 읽지 못했습니다: ${part} ` +\n `(이름 또는 이름:상태 — 상태는 ${asyncStatuses.join(' · ')})`\n )\n continue\n }\n tokens.push({ name, status })\n }\n return tokens.length || exp.trim() ? tokens : [{ name: SCOPE, status: 'pending' }]\n}\n\n/* */\nexport const awaitsScope = (exp: string | null) =>\n exp != null && (!exp.trim() || exp.trim().split(/\\s+/).some((t) => t === SCOPE || t.startsWith(SCOPE + ':')))\n\n// \nconst mounted = new WeakSet<Node>()\nexport const isAwaitMounted = (node: Node) => mounted.has(node)\n\n/* \n \n \n */\nexport const _await = (el: Element, exp: string, ctx: Context, scopeState?: AsyncState) => {\n const tokens = parseAwait(exp)\n const own = scopeState || ctx.scopeState\n const usesScope = tokens.some((t) => t.name === SCOPE)\n // \n const blockCtx =\n usesScope && own\n ? createScopedContext(ctx, {\n get $error() {\n return own.status === 'rejected' ? own.value : undefined\n }\n })\n : ctx\n\n const parent = el.parentNode!\n const anchor = new Comment('h-await')\n parent.insertBefore(anchor, el)\n const nextNode = el.nextSibling\n parent.removeChild(el)\n\n let block: Block | undefined\n\n ctx.effect(() => {\n const show = tokens.some(({ name, status }) =>\n name === SCOPE ? !!own && own.status === status : readAsync(ctx.asyncs, name).status === status\n )\n if (show && !block) {\n block = new Block(el, blockCtx)\n const nodes = block.isFragment ? [...block.template.childNodes] : [block.template]\n nodes.forEach((n) => mounted.add(n))\n const host = anchor.parentNode!\n block.insert(host, anchor)\n if (block.start) mounted.add(block.start), mounted.add(block.end!)\n host.removeChild(anchor)\n } else if (!show && block) {\n block.el.parentNode!.insertBefore(anchor, block.el)\n block.remove()\n block = undefined\n }\n })\n\n return nextNode\n}\n","import { DEV } from './env'\nimport { builtInDirectives, Directive } from './directives'\nimport { _if } from './directives/if'\nimport { _for } from './directives/for'\nimport { bind } from './directives/bind'\nimport { on } from './directives/on'\nimport { text } from './directives/text'\nimport { evaluate } from './eval'\nimport { checkAttr, collectListeners } from './utils'\nimport { ref } from './directives/ref'\nimport { Context, createScopedContext, recordContext, slotContextOf } from './context'\nimport { isComponentHost, mountComponent } from './component'\nimport {\n applyProvides,\n defineComputeds,\n hasComputeds,\n injectInto,\n isScopeScript,\n isThenable,\n openScope,\n openState,\n runScopeScripts,\n scopeValue,\n holdScope,\n releaseScope\n} from './scope'\nimport { _await, awaitsScope, isAwaitMounted } from './directives/await'\nimport { Context as Ctx, declareInScope } from './context'\nimport { nextTick } from './scheduler'\n\nconst dirRE = /^(?:h-|:|@)/\nconst modifierRE = /\\.([\\w-]+)/g\n\n\n// \n// \n// \n// \n// \n\n/* */\nconst splitSelectors = (list: string): string[] => {\n const out: string[] = []\n let depth = 0\n let quote = ''\n let cur = ''\n for (const ch of list) {\n if (quote) {\n if (ch === quote) quote = ''\n } else if (ch === '\"' || ch === \"'\") quote = ch\n else if (ch === '(' || ch === '[') depth++\n else if (ch === ')' || ch === ']') depth--\n else if (ch === ',' && depth === 0) {\n out.push(cur)\n cur = ''\n continue\n }\n cur += ch\n }\n out.push(cur)\n return out.map((s) => s.trim()).filter(Boolean)\n}\n\ninterface MustacheStep {\n /* */\n child: boolean\n selector: string\n}\n\ninterface MustachePart {\n /* */\n selector?: string\n /* */\n steps?: MustacheStep[]\n}\n\n/* */\nconst splitSteps = (raw: string): MustacheStep[] | undefined => {\n const steps: MustacheStep[] = []\n let depth = 0\n let quote = ''\n let cur = ''\n let child = false\n // \n let gap: '' | ' ' | '>' = ''\n const flush = () => {\n if (!cur) return true\n steps.push({ child, selector: cur })\n cur = ''\n return true\n }\n for (let i = 0; i < raw.length; i++) {\n const ch = raw[i]\n if (quote) {\n if (ch === quote) quote = ''\n cur += ch\n continue\n }\n if (ch === '\"' || ch === \"'\") quote = ch\n else if (ch === '(' || ch === '[') depth++\n else if (ch === ')' || ch === ']') depth--\n if (depth === 0 && !quote && (ch === '>' || /\\s/.test(ch))) {\n if (ch === '>') {\n if (gap === '>') return // \n gap = '>'\n } else if (!gap) gap = ' '\n continue\n }\n if (gap) {\n const sibling = ch === '+' || ch === '~'\n const afterSibling = /[+~]$/.test(cur)\n if (gap === ' ' && (sibling || afterSibling)) {\n // \n } else {\n if (gap === '>' && (sibling || afterSibling)) return\n flush()\n child = gap === '>'\n }\n gap = ''\n }\n cur += ch\n }\n if (gap === '>') return // \n flush()\n return steps.length ? steps : undefined\n}\n\nconst canMatch = (selector: string) => {\n try {\n document.createElement('div').matches(selector)\n return true\n } catch {\n return false\n }\n}\n\nconst parseMustache = (value: string): MustachePart[] | undefined => {\n const parts: MustachePart[] = []\n for (const raw of splitSelectors(value)) {\n // \n let part: MustachePart | undefined\n if (raw[0] === '>') {\n const steps = splitSteps(raw)\n if (steps && steps.every((s) => canMatch(s.selector))) part = { steps }\n } else if (canMatch(raw)) part = { selector: raw }\n if (!part) {\n console.error(`hyper-scope: h-text-inline 의 선택자를 읽지 못했습니다: ${raw}`)\n return\n }\n parts.push(part)\n }\n return parts\n}\n\n/* */\nconst fillsText = (el: Element) => el.hasAttribute('h-text') || el.hasAttribute('h-html')\n\n/* */\nconst isMustacheBoundary = (el: Element) =>\n fillsText(el) ||\n el.hasAttribute('h-scope') ||\n el.hasAttribute('h-pre') ||\n isComponentHost(el) ||\n isScopeScript(el) ||\n (el.localName === 'template' && el.hasAttribute('h-component'))\n\n/* \n \n \n */\nconst markMustache = (root: ParentNode, parts: MustachePart[], active: number[][]) => {\n for (const el of [...root.children]) {\n if (isMustacheBoundary(el)) continue\n if (el instanceof HTMLTemplateElement) {\n // \n markMustache(el.content, parts, active)\n continue\n }\n let hit = false\n // \n const next = parts.map((p, pi) => {\n if (!p.steps) {\n if (el.matches(p.selector!)) hit = true\n return []\n }\n const out: number[] = []\n for (const i of active[pi]) {\n const step = p.steps[i]\n // \n if (!step.child && !out.includes(i)) out.push(i)\n if (el.matches(step.selector)) {\n if (i === p.steps.length - 1) hit = true\n else if (!out.includes(i + 1)) out.push(i + 1)\n }\n }\n return out\n })\n if (hit && !el.hasAttribute('h-text-inline')) el.setAttribute('h-text-inline', '')\n markMustache(el, parts, next)\n }\n}\n\n/* \n \n \n */\nexport const takeMustache = (el: Element): boolean => {\n const value = el.getAttribute('h-text-inline')\n if (value == null) return false\n el.removeAttribute('h-text-inline')\n // \n if (fillsText(el)) return false\n const v = value.trim()\n if (v === 'false' || v === '0') return false\n if (v && v !== 'true') {\n const parts = parseMustache(v)\n if (parts) markMustache(el, parts, parts.map((p) => (p.steps ? [0] : [])))\n }\n return true\n}\n\n/* \n \n */\nexport const walk = (node: Node, ctx: Context, readText = false): ChildNode | null | void => {\n // \n const slotCtx = slotContextOf(node)\n if (slotCtx) {\n ctx = slotCtx\n readText = !!slotCtx.mustache\n }\n // \n if (isAwaitMounted(node)) return\n const type = node.nodeType\n if (type === 1) {\n // \n const el = node as Element\n if (el.hasAttribute('h-pre')) {\n return\n }\n // \n if (isScopeScript(el)) {\n return\n }\n // \n if (el.localName === 'template' && el.hasAttribute('h-component')) {\n return\n }\n\n // \n if (ctx.hooks && ctx.hooks.detached(el, ctx)) {\n return\n }\n\n // \n\n // \n if (el.localName === 'template' && el.hasAttribute('h-cloak')) {\n const next = el.nextSibling\n const frag = (el as HTMLTemplateElement).content\n const first = frag.firstChild\n el.parentNode!.replaceChild(frag, el)\n return first || next\n }\n\n // \n const isScope = el.hasAttribute('h-scope')\n if (!isScope) checkAttr(el, 'h-cloak')\n\n let exp: string | null\n\n // \n if ((exp = checkAttr(el, 'h-if'))) {\n return _if(el, exp, ctx)\n }\n\n // \n if ((exp = checkAttr(el, 'h-for'))) {\n return _for(el, exp, ctx)\n }\n\n // \n if ((exp = checkAttr(el, 'h-await')) != null) {\n return _await(el, exp, ctx)\n }\n\n // \n const beforeProvide = ctx\n ctx = applyProvides(el, ctx)\n const provided = ctx !== beforeProvide\n\n // \n if (isComponentHost(el)) {\n isScope && checkAttr(el, 'h-cloak')\n return mountComponent(el, ctx)\n }\n\n // \n if (isScope) {\n exp = checkAttr(el, 'h-scope')!\n const outer = ctx\n // \n const scopeCtx = (ctx = openScope(el, ctx, checkAttr(el, 'h-inherit'), checkAttr(el, 'h-inject')))\n const state = scopeCtx.scopeState!\n\n const ready = (data: any) => {\n data = data && typeof data === 'object' ? data : {}\n declareInScope(scopeCtx.scope, data)\n recordContext(el, scopeCtx)\n if (data.$template) {\n resolveTemplate(el, data.$template)\n }\n runScopeScripts(el, scopeCtx)\n // \n scopeCtx.hooks?.scope(el, scopeCtx)\n finishElement(el, scopeCtx, true)\n }\n const fail = (e: any) => {\n console.error(`hyper-scope: h-scope 의 함수가 실패했습니다 — 이 스코프는 살아나지 않습니다.`)\n console.error(e)\n state.value = e\n state.status = 'rejected'\n holdScope(el)\n el.removeAttribute('h-cloak')\n }\n\n let value: any\n let threw = false\n try {\n value = scopeValue(el, exp, scopeCtx)\n } catch (e) {\n threw = true\n fail(e)\n }\n const pending = !threw && isThenable(value)\n if (pending) state.status = 'pending'\n // \n mountScopeAwaits(el, outer, state)\n if (threw) return\n if (!pending) return ready(value)\n\n holdScope(el)\n let disposed = false\n scopeCtx.cleanups.push(() => (disposed = true))\n ;(value as PromiseLike<any>).then(\n (data) => {\n if (disposed) return\n state.status = 'fulfilled'\n // \n nextTick(() => {\n if (disposed) return\n releaseScope(el)\n ready(data)\n })\n },\n (e) => disposed || fail(e)\n )\n return\n }\n\n finishElement(el, ctx, false, provided)\n } else if (type === 3) {\n // \n const data = (node as Text).data\n if (readText && data.includes(ctx.delimiters[0])) {\n let segments: string[] = []\n let lastIndex = 0\n let match\n while ((match = ctx.delimitersRE.exec(data))) {\n const leading = data.slice(lastIndex, match.index)\n if (leading) segments.push(JSON.stringify(leading))\n segments.push(`$s(${match[1]})`)\n lastIndex = match.index + match[0].length\n }\n if (lastIndex < data.length) {\n segments.push(JSON.stringify(data.slice(lastIndex)))\n }\n applyDirective(node, text, segments.join('+'), ctx)\n }\n } else if (type === 11) {\n walkChildren(node as DocumentFragment, ctx)\n }\n}\n\n/* \n \n \n */\nconst finishElement = (el: Element, ctx: Ctx, own = false, changed = false) => {\n el.removeAttribute('h-cloak')\n let exp: string | null\n\n // \n if ((exp = checkAttr(el, 'h-state')) != null) {\n ctx = openState(el, exp, ctx)\n own = changed = true\n }\n\n // \n const inject = checkAttr(el, 'h-inject')\n if (inject || hasComputeds(el)) {\n if (!own) ctx = createScopedContext(ctx)\n if (inject) injectInto(ctx.scope, inject, ctx.provides)\n defineComputeds(el, ctx.scope)\n changed = true\n }\n // \n if (changed) recordContext(el, ctx)\n\n // \n const mustache = takeMustache(el)\n\n // \n if ((exp = checkAttr(el, 'h-ref') || checkAttr(el, 'ref'))) {\n applyDirective(el, ref, `\"${exp}\"`, ctx)\n }\n\n // \n walkChildren(el, ctx, mustache)\n\n // \n const deferred: [string, string][] = []\n for (const { name, value } of [...el.attributes]) {\n if (dirRE.test(name) && name !== 'h-cloak' && name !== 'h-text-inline') {\n // \n if (name === 'h-model' || name.startsWith('h-model.')) {\n // \n // \n deferred.unshift([name, value])\n } else if (name[0] === '@' || /^h-on\\b/.test(name)) {\n deferred.push([name, value])\n } else {\n processDirective(el, name, value, ctx)\n }\n }\n }\n for (const [name, value] of deferred) {\n processDirective(el, name, value, ctx)\n }\n}\n\n/* */\nconst mountScopeAwaits = (el: Element, ctx: Ctx, state: NonNullable<Ctx['scopeState']>) => {\n for (const t of [...el.querySelectorAll('[h-await]')]) {\n const exp = t.getAttribute('h-await')\n if (!awaitsScope(exp)) continue\n const inner = t.parentElement!.closest('[h-scope],[h-pre]')\n if (inner && inner !== el && el.contains(inner)) continue\n t.removeAttribute('h-await')\n _await(t, exp!, ctx, state)\n }\n}\n\nexport const walkChildren = (node: Element | DocumentFragment, ctx: Context, readText = false) => {\n let child = node.firstChild\n while (child) {\n child = walk(child, ctx, readText) || child.nextSibling\n }\n}\n\nexport const processDirective = (\n el: Element,\n raw: string,\n exp: string,\n ctx: Context\n) => {\n let dir: Directive\n let arg: string | undefined\n let modifiers: Record<string, true> | undefined\n\n const attrName = raw\n // \n raw = raw.replace(modifierRE, (_, m) => {\n ;(modifiers || (modifiers = {}))[m] = true\n return ''\n })\n\n if (raw[0] === ':') {\n dir = bind\n arg = raw.slice(1)\n } else if (raw[0] === '@') {\n dir = on\n arg = raw.slice(1)\n } else {\n const argIndex = raw.indexOf(':')\n const dirName = argIndex > 0 ? raw.slice(2, argIndex) : raw.slice(2)\n dir = builtInDirectives[dirName] || ctx.dirs[dirName]\n arg = argIndex > 0 ? raw.slice(argIndex + 1) : undefined\n }\n if (dir) {\n if (dir === bind && arg === 'ref') dir = ref\n applyDirective(el, dir, exp, ctx, arg, modifiers)\n // \n el.removeAttribute(attrName)\n } else if (DEV) {\n console.error(`unknown custom directive ${raw}.`)\n }\n}\n\nconst applyDirective = (\n el: Node,\n dir: Directive<any>,\n exp: string,\n ctx: Context,\n arg?: string,\n modifiers?: Record<string, true>\n) => {\n const get = (e = exp) => evaluate(ctx.scope, e, el)\n // \n const cleanup = collectListeners(ctx.cleanups, () =>\n dir({\n el,\n get,\n effect: ctx.effect,\n ctx,\n exp,\n arg,\n modifiers\n })\n )\n if (cleanup) {\n ctx.cleanups.push(cleanup)\n }\n}\n\nconst resolveTemplate = (el: Element, template: string) => {\n if (template[0] === '#') {\n const templateEl = document.querySelector(template)\n if (DEV && !templateEl) {\n console.error(\n `template selector ${template} has no matching <template> element.`\n )\n }\n el.appendChild((templateEl as HTMLTemplateElement).content.cloneNode(true))\n return\n }\n el.innerHTML = template\n}\n","import {\n Context,\n copySlotContexts,\n createContext,\n recordContext\n} from './context'\nimport { walk } from './walk'\nimport { stop } from '@vue/reactivity'\n\nexport class Block {\n template: Element | DocumentFragment\n ctx: Context\n key?: any\n parentCtx?: Context\n\n isFragment: boolean\n start?: Text\n end?: Text\n\n get el() {\n return this.start || (this.template as Element)\n }\n\n constructor(template: Element, parentCtx: Context, isRoot = false) {\n this.isFragment = template instanceof HTMLTemplateElement\n\n if (isRoot) {\n this.template = template\n } else if (this.isFragment) {\n const content = (template as HTMLTemplateElement).content\n this.template = content.cloneNode(true) as DocumentFragment\n copySlotContexts(content, this.template)\n } else {\n this.template = template.cloneNode(true) as Element\n copySlotContexts(template, this.template)\n }\n\n if (isRoot) {\n this.ctx = parentCtx\n } else {\n // \n this.parentCtx = parentCtx\n parentCtx.blocks.push(this)\n this.ctx = createContext(parentCtx)\n }\n\n // \n // \n if (this.isFragment) {\n for (const child of (this.template as DocumentFragment).children) {\n recordContext(child, this.ctx)\n }\n } else {\n recordContext(this.template, this.ctx)\n }\n\n walk(this.template, this.ctx)\n }\n\n insert(parent: Node, anchor: Node | null = null) {\n if (this.isFragment) {\n if (this.start) {\n // \n let node: Node | null = this.start\n let next: Node | null\n while (node) {\n next = node.nextSibling\n parent.insertBefore(node, anchor)\n if (node === this.end) break\n node = next\n }\n } else {\n this.start = new Text('')\n this.end = new Text('')\n parent.insertBefore(this.end, anchor)\n parent.insertBefore(this.start, this.end)\n parent.insertBefore(this.template, this.end)\n }\n } else {\n parent.insertBefore(this.template, anchor)\n }\n }\n\n remove() {\n if (this.parentCtx) {\n const siblings = this.parentCtx.blocks\n const i = siblings.indexOf(this)\n if (i > -1) siblings.splice(i, 1)\n }\n if (this.start) {\n const parent = this.start.parentNode!\n let node: Node | null = this.start\n let next: Node | null\n while (node) {\n next = node.nextSibling\n parent.removeChild(node)\n if (node === this.end) break\n node = next\n }\n } else {\n this.template.parentNode!.removeChild(this.template)\n }\n this.teardown()\n }\n\n teardown() {\n // \n ;[...this.ctx.blocks].forEach((child) => {\n child.teardown()\n })\n this.ctx.effects.forEach(stop)\n this.ctx.cleanups.forEach((fn) => fn())\n }\n}\n","import { DEV } from './env'\nimport { reactive } from '@vue/reactivity'\nimport { Block } from './block'\nimport { Directive } from './directives'\nimport { bindContextMethods, Context, createContext } from './context'\nimport { toDisplayString } from './directives/text'\nimport { nextTick } from './scheduler'\nimport { modelOf } from './directives/model'\nimport { asyncHelpers, createAsyncRegistry } from './async'\n\nconst escapeRegex = (str: string) =>\n str.replace(/[-.*+?^${}()|[\\]\\/\\\\]/g, '\\\\$&')\n\n/* */\nexport const createRootContext = (initialData?: any): Context => {\n const ctx = createContext()\n if (initialData) {\n ctx.scope = reactive(initialData)\n bindContextMethods(ctx.scope)\n\n // \n if (initialData.$delimiters) {\n setDelimiters(ctx, initialData.$delimiters)\n }\n }\n\n // \n ctx.scope.$s = toDisplayString\n ctx.scope.$nextTick = nextTick\n // \n ctx.scope.$model = modelOf\n ctx.scope.$refs = Object.create(null)\n // \n ctx.asyncs = createAsyncRegistry()\n Object.assign(ctx.scope, asyncHelpers(ctx.asyncs, () => ctx.scope))\n return ctx\n}\n\nexport const setDelimiters = (ctx: Context, [open, close]: [string, string]) => {\n ctx.delimiters = [open, close]\n ctx.delimitersRE = new RegExp(\n escapeRegex(open) + '([^]+?)' + escapeRegex(close),\n 'g'\n )\n}\n\nexport const createApp = (initialData?: any) => {\n const ctx = createRootContext(initialData)\n\n let rootBlocks: Block[]\n\n return {\n directive(name: string, def?: Directive) {\n if (def) {\n ctx.dirs[name] = def\n return this\n } else {\n return ctx.dirs[name]\n }\n },\n\n mount(el?: string | Element | null) {\n if (typeof el === 'string') {\n el = document.querySelector(el)\n if (!el) {\n DEV &&\n console.error(`selector ${el} has no matching element.`)\n return\n }\n }\n\n el = el || document.documentElement\n let roots: Element[]\n if (el.hasAttribute('h-scope')) {\n roots = [el]\n } else {\n roots = [...el.querySelectorAll(`[h-scope]`)].filter(\n (root) => !root.matches(`[h-scope] [h-scope]`)\n )\n }\n if (!roots.length) {\n roots = [el]\n }\n\n if (\n DEV &&\n roots.length === 1 &&\n roots[0] === document.documentElement\n ) {\n console.warn(\n `Mounting on documentElement - this is non-optimal as hyper-scope ` +\n `will be forced to crawl the entire page's DOM. ` +\n `Consider explicitly marking elements controlled by hyper-scope ` +\n `with \\`h-scope\\`.`\n )\n }\n\n rootBlocks = roots.map((el) => new Block(el, ctx, true))\n return this\n },\n\n unmount() {\n rootBlocks.forEach((block) => block.teardown())\n }\n }\n}\n","// \n//\n// \n// \n//\n// \n// \n//\n// \n// \nimport { isReactive, isReadonly, isRef, toRaw } from '@vue/reactivity'\nimport { DEV } from './env'\nimport { Context } from './context'\nimport { checkAttr } from './utils'\n\ninterface Entry {\n /* */\n owner: object | null\n scope?: Record<string, any>\n saved?: Record<string, any>\n}\n\nconst entries = new Map<string, Entry>()\n\n/* */\nexport const ownState = (scope: Record<string, any>) => {\n const out: Record<string, any> = {}\n const descriptors = Object.getOwnPropertyDescriptors(toRaw(scope))\n for (const [key, d] of Object.entries(descriptors)) {\n if (key[0] === '$' || !('value' in d) || typeof d.value === 'function') continue\n out[key] = d.value\n }\n return out\n}\n\n/* \n \n \n \n */\nconst moveInto = (current: any, value: any) => {\n if (isRef(current)) {\n // \n if (isReadonly(current)) return true\n current.value = isRef(value) ? value.value : value\n return true\n }\n if (isReactive(current) && value && typeof value === 'object' && !isRef(value)) {\n const from = toRaw(value)\n if (Array.isArray(current) && Array.isArray(from)) current.splice(0, current.length, ...from)\n else if (!Array.isArray(current) && !Array.isArray(from)) Object.assign(current, from)\n else return false\n return true\n }\n return false\n}\n\nconst restore = (scope: Record<string, any>, state: Record<string, any>) => {\n const raw = toRaw(scope)\n for (const [key, value] of Object.entries(state)) {\n const d = Object.getOwnPropertyDescriptor(raw, key)\n if (d && (!('value' in d) || typeof d.value === 'function')) continue\n if (d && moveInto(d.value, value)) continue\n // \n if (isRef(value) && isReadonly(value)) continue\n // \n // \n Object.defineProperty(raw, key, { value, writable: true, enumerable: true, configurable: true })\n }\n}\n\n/* */\nexport const keepScope = (el: Element, ctx: Context) => {\n const key = checkAttr(el, 'h-keep')\n if (key == null) return\n if (!key.trim()) {\n DEV && console.warn(`hyper-scope: h-keep 에는 키가 필요합니다.`)\n return\n }\n const scope = ctx.scope\n const prev = entries.get(key)\n const state = prev && (prev.scope ? ownState(prev.scope) : prev.saved)\n if (state) restore(scope, state)\n\n const token = {}\n entries.set(key, { owner: token, scope })\n // \n ctx.cleanups.push(() => {\n if (entries.get(key)?.owner === token) {\n entries.set(key, { owner: null, saved: ownState(scope) })\n }\n })\n}\n\n/* */\nexport const keepWithoutScope = () => {\n DEV && console.warn(`hyper-scope: h-keep 은 h-scope 와 같은 요소에 붙입니다.`)\n}\n\nexport const clearKeeps = () => entries.clear()\n","// \n//\n// \n// \n//\n// \n// \n// \n// \nexport const MARK = 'h-snapshot'\n\n/* */\nexport type ReviveHook = (dead: Element, fresh: Element) => void\n\n/* \n \n \n \n */\nexport const revive = (\n node: Element,\n isLive: (el: Element) => boolean,\n hooks: ReviveHook[] = []\n): Element => {\n const found = [...node.querySelectorAll(`[${MARK}]`)]\n if (node.hasAttribute(MARK)) found.unshift(node)\n let result = node\n for (const dead of found) {\n // \n if (!dead.isConnected || !dead.hasAttribute(MARK)) continue\n const html = dead.getAttribute(MARK)!\n dead.removeAttribute(MARK)\n if (isLive(dead)) continue\n const t = document.createElement('template')\n t.innerHTML = html\n const fresh = t.content.firstElementChild\n if (!fresh) continue\n for (const hook of hooks) hook(dead, fresh)\n dead.replaceWith(fresh)\n if (dead === node) result = fresh\n }\n return result\n}\n","// \n//\n// \n// \n//\n// \n// \nimport { computed, isReactive, markRaw, reactive, stop as stopEffect } from '@vue/reactivity'\nimport { isObject } from '@vue/shared'\nimport { DEV } from './env'\nimport { createRootContext, setDelimiters } from './app'\nimport {\n Context,\n contextAt,\n createContext,\n findContext,\n recordContext,\n Teardownable,\n WalkHooks\n} from './context'\nimport { Directive } from './directives'\nimport { walk } from './walk'\nimport { applyProvides, HostHandle } from './scope'\nimport { clearKeeps, keepScope, keepWithoutScope } from './keep'\nimport { MARK, revive, ReviveHook } from './snapshot'\nimport {\n clearComponents,\n ComponentDefinition,\n defineComponent,\n hasPendingAncestor,\n isPendingUnit,\n registerTemplates,\n unitSelector\n} from './component'\n\n/* */\nexport interface PluginApi {\n /* */\n define: (name: string, value: any) => void\n /* \n \n \n */\n defineScoped: (name: string, factory: (host: HostHandle) => any) => void\n /* \n \n \n */\n detach: (selector: string) => void\n /* \n \n \n */\n snapshot: () => () => void\n /* */\n onRevive: (hook: ReviveHook) => void\n /* */\n onStop: (fn: () => void) => void\n /* */\n directive: (name: string, def: Directive<any>) => void\n /* */\n component: (name: string, def: ComponentDefinition) => void\n /* \n \n \n */\n provide: <T = any>(key: PropertyKey, value: T) => T\n /* \n \n \n */\n reactive: typeof reactive\n computed: typeof computed\n}\n\nexport type Plugin = (api: PluginApi) => void\n\nexport interface StartOptions {\n /* */\n delimiters?: [string, string]\n /* */\n plugins?: Plugin[]\n}\n\n// \nlet detachedSelector = ''\nconst isDetached = (el: Element) => !!detachedSelector && el.matches(detachedSelector)\n\n/* */\nclass Unit implements Teardownable {\n ctx: Context\n /* */\n probe: Node\n dead = false\n /* */\n pristine: string\n /* \n \n \n */\n grace: boolean\n\n /* */\n constructor(\n public el: Element,\n public parentCtx: Context,\n detached = false\n ) {\n this.pristine = el.outerHTML\n this.grace = !!detachedSelector && !!el.closest(detachedSelector)\n // \n this.ctx = createContext(parentCtx)\n if (!detached) parentCtx.blocks.push(this)\n recordContext(el, this.ctx)\n units.add(this)\n live.set(el, this)\n\n const parent = el.parentNode!\n const outer = mounting\n mounting = el\n try {\n walk(el, this.ctx)\n } finally {\n mounting = outer\n }\n // \n this.probe = el.isConnected ? el : parent\n }\n\n teardown() {\n if (this.dead) return\n this.dead = true\n units.delete(this)\n const siblings = this.parentCtx.blocks\n const i = siblings.indexOf(this)\n if (i > -1) siblings.splice(i, 1)\n // \n ;[...this.ctx.blocks].forEach((child) => child.teardown())\n this.ctx.effects.forEach(stopEffect)\n this.ctx.cleanups.forEach((fn) => fn())\n }\n}\n\n// \nconst providedAbove = new WeakMap<Element, Context>()\n\n/* */\nconst withProvidesAbove = (el: Element, parentCtx: Context): Context => {\n const chain: Element[] = []\n for (let cur = el.parentElement; cur && !contextAt(cur); cur = cur.parentElement) chain.unshift(cur)\n let ctx = parentCtx\n for (const a of chain) {\n const cached = providedAbove.get(a)\n if (cached) {\n ctx = cached\n continue\n }\n const next = applyProvides(a, ctx, true)\n if (next !== ctx) providedAbove.set(a, (ctx = next))\n }\n return ctx\n}\n\nconst units = new Set<Unit>()\n/* */\nconst live = new WeakMap<Element, Unit>()\n/* */\nlet mounting: Element | undefined\nlet root: Context | undefined\n/* */\nlet started = false\nlet observer: MutationObserver | undefined\nlet waiting: (() => void) | undefined\nlet graceTimer: ReturnType<typeof setTimeout> | undefined\n\n/* \n \n \n */\nconst snapshot = () => {\n for (const unit of units) {\n if (!unit.dead && unit.el.isConnected) unit.el.setAttribute(MARK, unit.pristine)\n }\n return () => {\n for (const unit of units) {\n if (unit.el.isConnected) unit.el.removeAttribute(MARK)\n }\n }\n}\n\nconst reviveHooks: ReviveHook[] = []\nconst stopHooks: (() => void)[] = []\n\n// \nconst pendingPlugins: Plugin[] = []\n\n// \nconst OWNER = Symbol.for('hyper-scope.runtime')\n\n// \nconst reserved = new Set([\n '$scope', '$host', '$root', '$props', '$emit', '$dispatch', '$handle', '$provide', '$inject',\n '$async', '$await', '$refs', '$nextTick', '$model', '$s', '$el', '$data', '$error'\n])\n\nconst api: PluginApi = {\n define(name, value) {\n if (typeof name !== 'string' || !name || reserved.has(name)) {\n console.error(`hyper-scope: define 으로 올릴 수 없는 이름입니다: ${String(name)}`)\n return\n }\n // \n root!.scope[name] =\n isObject(value) && Object.isExtensible(value) && !isReactive(value) ? markRaw(value) : value\n },\n defineScoped(name, factory) {\n if (typeof name !== 'string' || !name || reserved.has(name) || typeof factory !== 'function') {\n console.error(`hyper-scope: defineScoped 로 올릴 수 없습니다: ${String(name)}`)\n return\n }\n ;(root!.scoped ||= {})[name] = factory\n },\n detach(selector) {\n detachedSelector = detachedSelector ? `${detachedSelector},${selector}` : selector\n },\n snapshot,\n onRevive(hook) {\n reviveHooks.push(hook)\n },\n onStop(fn) {\n stopHooks.push(fn)\n },\n directive(name, def) {\n root!.dirs[name] = def\n },\n component(name, def) {\n defineComponent(name, def)\n if (started) mountWithin(document.documentElement)\n },\n provide(key, value) {\n const provides = root!.provides\n if (!(key in provides)) provides[key] = value\n return provides[key]\n },\n reactive,\n computed\n}\n\nconst runPlugin = (fn: Plugin) => {\n try {\n fn(api)\n } catch (e) {\n console.error(`hyper-scope: 플러그인 실행 중 오류`)\n console.error(e)\n }\n}\n\n/* \n \n \n */\nexport const plugin = (fn: Plugin) => {\n if (typeof fn !== 'function') {\n console.error(`hyper-scope: plugin 은 함수를 받습니다 — plugin(({ define }) => { … })`)\n return\n }\n if (root) runPlugin(fn)\n else pendingPlugins.push(fn)\n}\n\n/* */\nconst hooks: WalkHooks = {\n // \n detached: (el, ctx) => {\n if (el === mounting || !isDetached(el)) return false\n new Unit(el, ctx, true)\n return true\n },\n scope: keepScope,\n // \n sealed: (el) => live.get(el)?.teardown()\n}\n\n/* \n \n \n */\nconst detachedFromParent = (target: Element) => {\n for (let cur: Node | null = target; cur; cur = cur.parentNode) {\n if (cur !== target && contextAt(cur)) return false\n if (cur.nodeType === 1 && isDetached(cur as Element)) return true\n }\n return false\n}\n\nconst isLive = (el: Element) => {\n const unit = live.get(el)\n return !!unit && !unit.dead\n}\n\n/* */\nconst mountWithin = (node: Node) => {\n if (node.nodeType !== 1 || !node.isConnected) return\n // \n const el = revive(node as Element, isLive, reviveHooks)\n // \n registerTemplates(el)\n const selector = unitSelector()\n const found = el.matches(selector) ? [el] : [...el.querySelectorAll(selector)]\n for (const target of found) {\n // \n if (!isPendingUnit(target) || !target.isConnected) continue\n // \n if (hasPendingAncestor(target)) continue\n if (target.closest('[h-pre]')) continue\n new Unit(target, withProvidesAbove(target, findContext(target) || root!), detachedFromParent(target))\n }\n}\n\nconst sweep = () => {\n let waitMore = false\n for (const unit of [...units]) {\n if (unit.dead || unit.probe.isConnected) continue\n if (unit.grace) waitMore = true\n else unit.teardown()\n }\n if (waitMore && !graceTimer) {\n graceTimer = setTimeout(() => {\n graceTimer = undefined\n for (const unit of [...units]) {\n if (unit.grace && !unit.dead && !unit.probe.isConnected) unit.teardown()\n }\n })\n }\n}\n\nconst onMutations = (records: MutationRecord[]) => {\n let removed = false\n for (const record of records) {\n if (record.removedNodes.length) removed = true\n record.addedNodes.forEach(mountWithin)\n }\n // \n if (removed) sweep()\n}\n\nconst begin = (options: StartOptions) => {\n waiting = undefined\n root = createRootContext()\n if (options.delimiters) setDelimiters(root, options.delimiters)\n root.hooks = hooks\n root.dirs.keep = keepWithoutScope\n\n // \n document.dispatchEvent(new CustomEvent('hyper-scope:init', { detail: api }))\n for (const fn of [...pendingPlugins.splice(0), ...(options.plugins || [])]) runPlugin(fn)\n\n mountWithin(document.documentElement)\n started = true\n\n observer = new MutationObserver(onMutations)\n observer.observe(document.documentElement, { childList: true, subtree: true })\n}\n\n/* \n \n \n */\nexport const start = (options: StartOptions = {}) => {\n if (root || waiting) {\n DEV && console.warn(`hyper-scope: start() 는 이미 불렸습니다. 두 번째 호출은 무시합니다.`)\n return\n }\n // \n // \n const doc = document as any\n if (doc[OWNER] && doc[OWNER] !== api) {\n console.error(\n `hyper-scope: another hyper-scope runtime is already running in this document — this start() is refused. ` +\n `Load one runtime per document; code bundled separately can reach the running one through \"hyper-scope/global\".`\n )\n return\n }\n doc[OWNER] = api\n if (document.readyState === 'loading') {\n waiting = () => begin(options)\n document.addEventListener('DOMContentLoaded', waiting, { once: true })\n } else {\n begin(options)\n }\n}\n\n/* */\nexport const stop = () => {\n if ((document as any)[OWNER] === api) delete (document as any)[OWNER]\n if (waiting) {\n document.removeEventListener('DOMContentLoaded', waiting)\n waiting = undefined\n }\n observer?.disconnect()\n observer = undefined\n for (const fn of stopHooks.splice(0)) fn()\n reviveHooks.length = 0\n detachedSelector = ''\n clearTimeout(graceTimer)\n graceTimer = undefined\n for (const unit of [...units]) unit.teardown()\n root = undefined\n started = false\n clearKeeps()\n pendingPlugins.length = 0\n clearComponents()\n}\n"],"mappings":"AACO,IAAM,EAAM,GCKnB,SAAS,EAAO,CAAC,EAAK,CACpB,IAAM,EAAsB,OAAO,OAAO,IAAI,EAC9C,QAAW,KAAO,EAAI,MAAM,GAAG,EAAG,EAAI,GAAO,EAC7C,MAAO,CAAC,KAAQ,KAAO,GAWzB,IAAM,GAAS,OAAO,OAOtB,IAAM,GAAiB,OAAO,UAAU,eAClC,EAAS,CAAC,EAAK,IAAQ,GAAe,KAAK,EAAK,CAAG,EACnD,EAAU,MAAM,QAChB,GAAQ,CAAC,IAAQ,GAAa,CAAG,IAAM,eACvC,GAAQ,CAAC,IAAQ,GAAa,CAAG,IAAM,eACvC,GAAS,CAAC,IAAQ,GAAa,CAAG,IAAM,gBAE9C,IAAM,GAAa,CAAC,IAAQ,OAAO,IAAQ,WACrC,GAAW,CAAC,IAAQ,OAAO,IAAQ,SACnC,GAAW,CAAC,IAAQ,OAAO,IAAQ,SACnC,EAAW,CAAC,IAAQ,IAAQ,MAAQ,OAAO,IAAQ,SAIzD,IAAM,GAAiB,OAAO,UAAU,SAClC,GAAe,CAAC,IAAU,GAAe,KAAK,CAAK,EACnD,GAAY,CAAC,IAAU,CAC3B,OAAO,GAAa,CAAK,EAAE,MAAM,EAAG,EAAE,GAGxC,IAAM,GAAe,CAAC,IAAQ,GAAS,CAAG,GAAK,IAAQ,OAAS,EAAI,KAAO,KAAO,GAAK,SAAS,EAAK,EAAE,IAAM,EA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