@kdujs/compiler-dom-canary
Version:
@kdujs/compiler-dom
7 lines • 79.7 kB
JavaScript
/**
* @kdujs/compiler-dom-canary v3.20251208.0
* (c) 2021-present NKDuy
* @license MIT
**/
var KduCompilerDOM=function(e){"use strict";
/*! #__NO_SIDE_EFFECTS__ */function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const n={},s=()=>{},i=()=>!1,o=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),r=Object.assign,a=Array.isArray,c=e=>"string"==typeof e,l=e=>"symbol"==typeof e,h=e=>null!==e&&"object"==typeof e,p=t(",key,ref,ref_for,ref_key,onKnodeBeforeMount,onKnodeMounted,onKnodeBeforeUpdate,onKnodeUpdated,onKnodeBeforeUnmount,onKnodeUnmounted"),d=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),u=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},f=/-(\w)/g,m=u((e=>e.replace(f,((e,t)=>t?t.toUpperCase():"")))),E=u((e=>e.charAt(0).toUpperCase()+e.slice(1))),_=u((e=>e?`on${E(e)}`:""));const S=/;(?![^(]*\))/g,T=/:([^]+)/,g=/\/\*[^]*?\*\//g;const N=t("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"),I=t("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"),y=t("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"),O=t("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),A=Symbol(""),C=Symbol(""),b=Symbol(""),R=Symbol(""),x=Symbol(""),L=Symbol(""),M=Symbol(""),k=Symbol(""),P=Symbol(""),D=Symbol(""),v=Symbol(""),X=Symbol(""),w=Symbol(""),K=Symbol(""),U=Symbol(""),F=Symbol(""),B=Symbol(""),$=Symbol(""),H=Symbol(""),V=Symbol(""),G=Symbol(""),q=Symbol(""),J=Symbol(""),j=Symbol(""),W=Symbol(""),Y=Symbol(""),Q=Symbol(""),z=Symbol(""),Z=Symbol(""),ee=Symbol(""),te=Symbol(""),ne=Symbol(""),se=Symbol(""),ie=Symbol(""),oe=Symbol(""),re=Symbol(""),ae=Symbol(""),ce=Symbol(""),le=Symbol(""),he={[A]:"Fragment",[C]:"Teleport",[b]:"Suspense",[R]:"KeepAlive",[x]:"BaseTransition",[L]:"openBlock",[M]:"createBlock",[k]:"createElementBlock",[P]:"createKNode",[D]:"createElementKNode",[v]:"createCommentKNode",[X]:"createTextKNode",[w]:"createStaticKNode",[K]:"resolveComponent",[U]:"resolveDynamicComponent",[F]:"resolveDirective",[B]:"resolveFilter",[$]:"withDirectives",[H]:"renderList",[V]:"renderSlot",[G]:"createSlots",[q]:"toDisplayString",[J]:"mergeProps",[j]:"normalizeClass",[W]:"normalizeStyle",[Y]:"normalizeProps",[Q]:"guardReactiveProps",[z]:"toHandlers",[Z]:"camelize",[ee]:"capitalize",[te]:"toHandlerKey",[ne]:"setBlockTracking",[se]:"pushScopeId",[ie]:"popScopeId",[oe]:"withCtx",[re]:"unref",[ae]:"isRef",[ce]:"withMemo",[le]:"isMemoSame"};function pe(e){Object.getOwnPropertySymbols(e).forEach((t=>{he[t]=e[t]}))}const de={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function ue(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:de}}function fe(e,t,n,s,i,o,r,a=!1,c=!1,l=!1,h=de){return e&&(a?(e.helper(L),e.helper(Ce(e.inSSR,l))):e.helper(Ae(e.inSSR,l)),r&&e.helper($)),{type:13,tag:t,props:n,children:s,patchFlag:i,dynamicProps:o,directives:r,isBlock:a,disableTracking:c,isComponent:l,loc:h}}function me(e,t=de){return{type:17,loc:t,elements:e}}function Ee(e,t=de){return{type:15,loc:t,properties:e}}function _e(e,t){return{type:16,loc:de,key:c(e)?Se(e,!0):e,value:t}}function Se(e,t=!1,n=de,s=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:s}}function Te(e,t=de){return{type:8,loc:t,children:e}}function ge(e,t=[],n=de){return{type:14,loc:n,callee:e,arguments:t}}function Ne(e,t=void 0,n=!1,s=!1,i=de){return{type:18,params:e,returns:t,newline:n,isSlot:s,loc:i}}function Ie(e,t,n,s=!0){return{type:19,test:e,consequent:t,alternate:n,newline:s,loc:de}}function ye(e,t,n=!1){return{type:20,index:e,value:t,isKNode:n,loc:de}}function Oe(e){return{type:21,body:e,loc:de}}function Ae(e,t){return e||t?P:D}function Ce(e,t){return e||t?M:k}function be(e,{helper:t,removeHelper:n,inSSR:s}){e.isBlock||(e.isBlock=!0,n(Ae(s,e.isComponent)),t(L),t(Ce(s,e.isComponent)))}const Re=new Uint8Array([123,123]),xe=new Uint8Array([125,125]);function Le(e){return e>=97&&e<=122||e>=65&&e<=90}function Me(e){return 32===e||10===e||9===e||12===e||13===e}function ke(e){return 47===e||62===e||Me(e)}function Pe(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}const De={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};const ve={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Kdu 3 unless the "is" value is explicitly prefixed with "kdu:".',link:"https://kdujs-v3-migration.web.app/breaking-changes/custom-elements-interop.html"},COMPILER_K_BIND_SYNC:{message:e=>`.sync modifier for k-bind has been removed. Use k-model with argument instead. \`k-bind:${e}.sync\` should be changed to \`k-model:${e}\`.`,link:"https://kdujs-v3-migration.web.app/breaking-changes/k-model.html"},COMPILER_K_BIND_OBJECT_ORDER:{message:'k-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before k-bind in the case of conflict. To retain 2.x behavior, move k-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://kdujs-v3-migration.web.app/breaking-changes/k-bind.html"},COMPILER_K_ON_NATIVE:{message:".native modifier for k-on has been removed as is no longer necessary.",link:"https://kdujs-v3-migration.web.app/breaking-changes/k-on-native-modifier-removed.html"},COMPILER_K_IF_K_FOR_PRECEDENCE:{message:"k-if / k-for precedence when used on the same element has changed in Kdu 3: k-if now takes higher precedence and will no longer have access to k-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters k-for data source.",link:"https://kdujs-v3-migration.web.app/breaking-changes/k-if-k-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Kdu 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Kdu 3.',link:"https://kdujs-v3-migration.web.app/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Kdu 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://kdujs-v3-migration.web.app/breaking-changes/filters.html"}};function Xe(e,{compatConfig:t}){const n=t&&t[e];return"MODE"===e?n||3:n}function we(e,t){const n=Xe("MODE",t),s=Xe(e,t);return 3===n?!0===s:!1!==s}function Ke(e,t,n,...s){return we(e,t)}function Ue(e){throw e}function Fe(e){}function Be(e,t,n,s){const i=new SyntaxError(String(`https://kdu-js.web.app/error-reference/#compiler-${e}`));return i.code=e,i.loc=t,i}const $e={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '<' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '\x3c!--' in comment.",17:"Attribute name cannot contain U+0022 (\"), U+0027 ('), and U+003C (<).",18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"k-if/k-else-if is missing expression.",29:"k-if/else branches must use unique keys.",30:"k-else/k-else-if has no adjacent k-if or k-else-if.",31:"k-for is missing expression.",32:"k-for has invalid expression.",33:"<template k-for> key should be placed on the <template> tag.",34:"k-bind is missing expression.",52:"k-bind with same-name shorthand only allows static argument.",35:"k-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed k-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"k-slot can only be used on components or <template> tags.",41:"k-model is missing expression.",42:"k-model value must be a valid JavaScript member expression.",43:"k-model cannot be used on k-for or k-slot scope variables because they are not writable.",44:"k-model cannot be used on a prop, because local prop bindings are not writable.\nUse a k-bind binding combined with a k-on listener that emits update:x event instead.",45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@knode-* hooks in templates are no longer supported. Use the kdu: prefix instead. For example, @knode-mounted should be changed to @kdu:mounted. @knode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',53:""};function He(e,t=[]){switch(e.type){case"Identifier":t.push(e);break;case"MemberExpression":let n=e;for(;"MemberExpression"===n.type;)n=n.object;t.push(n);break;case"ObjectPattern":for(const s of e.properties)He("RestElement"===s.type?s.argument:s.value,t);break;case"ArrayPattern":e.elements.forEach((e=>{e&&He(e,t)}));break;case"RestElement":He(e.argument,t);break;case"AssignmentPattern":He(e.left,t)}return t}const Ve=e=>e&&("ObjectProperty"===e.type||"ObjectMethod"===e.type)&&!e.computed,Ge=["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"];const qe=e=>4===e.type&&e.isStatic;function Je(e){switch(e){case"Teleport":case"teleport":return C;case"Suspense":case"suspense":return b;case"KeepAlive":case"keep-alive":return R;case"BaseTransition":case"base-transition":return x}}const je=/^\d|[^\$\w]/,We=e=>!je.test(e),Ye=/[A-Za-z_$\xA0-\uFFFF]/,Qe=/[\.\?\w$\xA0-\uFFFF]/,ze=/\s+[.[]\s*|\s*[.[]\s+/g,Ze=e=>{e=e.trim().replace(ze,(e=>e.trim()));let t=0,n=[],s=0,i=0,o=null;for(let r=0;r<e.length;r++){const a=e.charAt(r);switch(t){case 0:if("["===a)n.push(t),t=1,s++;else if("("===a)n.push(t),t=2,i++;else if(!(0===r?Ye:Qe).test(a))return!1;break;case 1:"'"===a||'"'===a||"`"===a?(n.push(t),t=3,o=a):"["===a?s++:"]"===a&&(--s||(t=n.pop()));break;case 2:if("'"===a||'"'===a||"`"===a)n.push(t),t=3,o=a;else if("("===a)i++;else if(")"===a){if(r===e.length-1)return!1;--i||(t=n.pop())}break;case 3:a===o&&(t=n.pop(),o=null)}}return!s&&!i},et=s,tt=Ze;function nt(e,t,n=t.length){let s=0,i=-1;for(let o=0;o<n;o++)10===t.charCodeAt(o)&&(s++,i=o);return e.offset+=n,e.line+=s,e.column=-1===i?e.column+n:n-i,e}function st(e,t,n=!1){for(let s=0;s<e.props.length;s++){const i=e.props[s];if(7===i.type&&(n||i.exp)&&(c(t)?i.name===t:t.test(i.name)))return i}}function it(e,t,n=!1,s=!1){for(let i=0;i<e.props.length;i++){const o=e.props[i];if(6===o.type){if(n)continue;if(o.name===t&&(o.value||s))return o}else if("bind"===o.name&&(o.exp||s)&&ot(o.arg,t))return o}}function ot(e,t){return!(!e||!qe(e)||e.content!==t)}function rt(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))}function at(e){return 5===e.type||2===e.type}function ct(e){return 7===e.type&&"slot"===e.name}function lt(e){return 1===e.type&&3===e.tagType}function ht(e){return 1===e.type&&2===e.tagType}const pt=new Set([Y,Q]);function dt(e,t=[]){if(e&&!c(e)&&14===e.type){const n=e.callee;if(!c(n)&&pt.has(n))return dt(e.arguments[0],t.concat(e))}return[e,t]}function ut(e,t,n){let s,i,o=13===e.type?e.props:e.arguments[2],r=[];if(o&&!c(o)&&14===o.type){const e=dt(o);o=e[0],r=e[1],i=r[r.length-1]}if(null==o||c(o))s=Ee([t]);else if(14===o.type){const e=o.arguments[0];c(e)||15!==e.type?o.callee===z?s=ge(n.helper(J),[Ee([t]),o]):o.arguments.unshift(Ee([t])):ft(t,e)||e.properties.unshift(t),!s&&(s=o)}else 15===o.type?(ft(t,o)||o.properties.unshift(t),s=o):(s=ge(n.helper(J),[Ee([t]),o]),i&&i.callee===Q&&(i=r[r.length-2]));13===e.type?i?i.arguments[0]=s:e.props=s:i?i.arguments[0]=s:e.arguments[2]=s}function ft(e,t){let n=!1;if(4===e.key.type){const s=e.key.content;n=t.properties.some((e=>4===e.key.type&&e.key.content===s))}return n}function mt(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}function Et(e){return 14===e.type&&e.callee===ce?e.arguments[1].returns:e}const _t=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,St={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:i,isPreTag:i,isCustomElement:i,onError:Ue,onWarn:Fe,comments:!1,prefixIdentifiers:!1};let Tt=St,gt=null,Nt="",It=null,yt=null,Ot="",At=-1,Ct=-1,bt=0,Rt=!1,xt=null;const Lt=[],Mt=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inKPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=Re,this.delimiterClose=xe,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=Re,this.delimiterClose=xe}getPos(e){let t=1,n=e+1;for(let s=this.newlines.length-1;s>=0;s--){const i=this.newlines[s];if(e>i){t=s+2,n=e-i;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inKPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.state=this.inRCDATA?32:1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?ke(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||Me(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart<t){const e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}return this.sectionStart=t+2,this.stateInClosingTagName(e),void(this.inRCDATA=!1)}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence===De.TitleEnd||this.currentSequence===De.TextareaEnd&&!this.inSFCRoot?e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=Number(60===e)}stateCDATASequence(e){e===De.Cdata[this.sequenceIndex]?++this.sequenceIndex===De.Cdata.length&&(this.state=28,this.currentSequence=De.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){const t=this.buffer.charCodeAt(this.index);if(10===t&&this.newlines.push(this.index),t===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===De.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,t){this.enterRCDATA(e,t),this.state=31}enterRCDATA(e,t){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=t}stateBeforeTagName(e){33===e?(this.state=22,this.sectionStart=this.index+1):63===e?(this.state=24,this.sectionStart=this.index+1):Le(e)?(this.sectionStart=this.index,this.state=0===this.mode?6:this.inSFCRoot?34:this.inXML?6:116===e?30:115===e?29:6):47===e?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){ke(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(ke(e)){const t=this.buffer.slice(this.sectionStart,this.index);"template"!==t&&this.enterRCDATA(Pe("</"+t),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){Me(e)||(62===e?(this.state=1,this.sectionStart=this.index+1):(this.state=Le(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(62===e||Me(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){62===e&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){62===e?(this.cbs.onopentagend(this.index),this.state=this.inRCDATA?32:1,this.sectionStart=this.index+1):47===e?this.state=7:60===e&&47===this.peek()?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):Me(e)||this.handleAttrStart(e)}handleAttrStart(e){118===e&&45===this.peek()?(this.state=13,this.sectionStart=this.index):46===e||58===e||64===e||35===e?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){62===e?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):Me(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(61===e||ke(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){61===e||ke(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):58===e?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):46===e&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){61===e||ke(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):91===e?this.state=15:46===e&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){93===e?this.state=14:(61===e||ke(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){61===e||ke(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):46===e&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){61===e?this.state=18:47===e||62===e?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):Me(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){34===e?(this.state=19,this.sectionStart=this.index+1):39===e?(this.state=20,this.sectionStart=this.index+1):Me(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,t){(e===t||this.fastForwardTo(t))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(34===t?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){Me(e)||62===e?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):39!==e&&60!==e&&61!==e&&96!==e||this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){91===e?(this.state=26,this.sequenceIndex=0):this.state=45===e?25:23}stateInDeclaration(e){(62===e||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(62===e||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){45===e?(this.state=28,this.currentSequence=De.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(62===e||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===De.ScriptEnd[3]?this.startSpecial(De.ScriptEnd,4):e===De.StyleEnd[3]?this.startSpecial(De.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===De.TitleEnd[3]?this.startSpecial(De.TitleEnd,4):e===De.TextareaEnd[3]?this.startSpecial(De.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const e=this.buffer.charCodeAt(this.index);switch(10===e&&this.newlines.push(this.index),this.state){case 1:this.stateText(e);break;case 2:this.stateInterpolationOpen(e);break;case 3:this.stateInterpolation(e);break;case 4:this.stateInterpolationClose(e);break;case 31:this.stateSpecialStartSequence(e);break;case 32:this.stateInRCDATA(e);break;case 26:this.stateCDATASequence(e);break;case 19:this.stateInAttrValueDoubleQuotes(e);break;case 12:this.stateInAttrName(e);break;case 13:this.stateInDirName(e);break;case 14:this.stateInDirArg(e);break;case 15:this.stateInDynamicDirArg(e);break;case 16:this.stateInDirModifier(e);break;case 28:this.stateInCommentLike(e);break;case 27:this.stateInSpecialComment(e);break;case 11:this.stateBeforeAttrName(e);break;case 6:this.stateInTagName(e);break;case 34:this.stateInSFCRootTagName(e);break;case 9:this.stateInClosingTagName(e);break;case 5:this.stateBeforeTagName(e);break;case 17:this.stateAfterAttrName(e);break;case 20:this.stateInAttrValueSingleQuotes(e);break;case 18:this.stateBeforeAttrValue(e);break;case 8:this.stateBeforeClosingTagName(e);break;case 10:this.stateAfterClosingTagName(e);break;case 29:this.stateBeforeSpecialS(e);break;case 30:this.stateBeforeSpecialT(e);break;case 21:this.stateInAttrValueNoQuotes(e);break;case 7:this.stateInSelfClosingTag(e);break;case 23:this.stateInDeclaration(e);break;case 22:this.stateBeforeDeclaration(e);break;case 25:this.stateBeforeComment(e);break;case 24:this.stateInProcessingInstruction(e);break;case 33:this.stateInEntity()}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(1===this.state||32===this.state&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):19!==this.state&&20!==this.state&&21!==this.state||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length;this.sectionStart>=e||(28===this.state?this.currentSequence===De.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(Lt,{onerr:Qt,ontext(e,t){Xt(Dt(e,t),e,t)},ontextentity(e,t,n){Xt(e,t,n)},oninterpolation(e,t){if(Rt)return Xt(Dt(e,t),e,t);let n=e+Mt.delimiterOpen.length,s=t-Mt.delimiterClose.length;for(;Me(Nt.charCodeAt(n));)n++;for(;Me(Nt.charCodeAt(s-1));)s--;let i=Dt(n,s);i.includes("&")&&(i=Tt.decodeEntities(i,!1)),qt({type:5,content:Yt(i,!1,Jt(n,s)),loc:Jt(e,t)})},onopentagname(e,t){const n=Dt(e,t);It={type:1,tag:n,ns:Tt.getNamespace(n,Lt[0],Tt.ns),tagType:0,props:[],children:[],loc:Jt(e-1,t),codegenNode:void 0}},onopentagend(e){vt(e)},onclosetag(e,t){const n=Dt(e,t);if(!Tt.isVoidTag(n)){let s=!1;for(let e=0;e<Lt.length;e++){if(Lt[e].tag.toLowerCase()===n.toLowerCase()){s=!0;for(let n=0;n<=e;n++){wt(Lt.shift(),t,n<e)}break}}s||Kt(e,60)}},onselfclosingtag(e){const t=It.tag;It.isSelfClosing=!0,vt(e),Lt[0]&&Lt[0].tag===t&&wt(Lt.shift(),e)},onattribname(e,t){yt={type:6,name:Dt(e,t),nameLoc:Jt(e,t),value:void 0,loc:Jt(e)}},ondirname(e,t){const n=Dt(e,t),s="."===n||":"===n?"bind":"@"===n?"on":"#"===n?"slot":n.slice(2);if(Rt||""===s)yt={type:6,name:n,nameLoc:Jt(e,t),value:void 0,loc:Jt(e)};else if(yt={type:7,name:s,rawName:n,exp:void 0,arg:void 0,modifiers:"."===n?["prop"]:[],loc:Jt(e)},"pre"===s){Rt=Mt.inKPre=!0,xt=It;const e=It.props;for(let t=0;t<e.length;t++)7===e[t].type&&(e[t]=Wt(e[t]))}},ondirarg(e,t){if(e===t)return;const n=Dt(e,t);if(Rt)yt.name+=n,jt(yt.nameLoc,t);else{const s="["!==n[0];yt.arg=Yt(s?n:n.slice(1,-1),s,Jt(e,t),s?3:0)}},ondirmodifier(e,t){const n=Dt(e,t);if(Rt)yt.name+="."+n,jt(yt.nameLoc,t);else if("slot"===yt.name){const e=yt.arg;e&&(e.content+="."+n,jt(e.loc,t))}else yt.modifiers.push(n)},onattribdata(e,t){Ot+=Dt(e,t),At<0&&(At=e),Ct=t},onattribentity(e,t,n){Ot+=e,At<0&&(At=t),Ct=n},onattribnameend(e){const t=Dt(yt.loc.start.offset,e);7===yt.type&&(yt.rawName=t),It.props.some((e=>(7===e.type?e.rawName:e.name)===t))},onattribend(e,t){if(It&&yt){if(jt(yt.loc,t),0!==e)if(Ot.includes("&")&&(Ot=Tt.decodeEntities(Ot,!0)),6===yt.type)"class"===yt.name&&(Ot=Gt(Ot).trim()),yt.value={type:2,content:Ot,loc:1===e?Jt(At,Ct):Jt(At-1,Ct+1)},Mt.inSFCRoot&&"template"===It.tag&&"lang"===yt.name&&Ot&&"html"!==Ot&&Mt.enterRCDATA(Pe("</template"),0);else{let e=0;yt.exp=Yt(Ot,!1,Jt(At,Ct),0,e),"for"===yt.name&&(yt.forParseResult=function(e){const t=e.loc,n=e.content,s=n.match(_t);if(!s)return;const[,i,o]=s,r=(e,n,s=!1)=>{const i=t.start.offset+n;return Yt(e,!1,Jt(i,i+e.length),0,s?1:0)},a={source:r(o.trim(),n.indexOf(o,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=i.trim().replace(Pt,"").trim();const l=i.indexOf(c),h=c.match(kt);if(h){c=c.replace(kt,"").trim();const e=h[1].trim();let t;if(e&&(t=n.indexOf(e,l+c.length),a.key=r(e,t,!0)),h[2]){const s=h[2].trim();s&&(a.index=r(s,n.indexOf(s,a.key?t+e.length:l+c.length),!0))}}c&&(a.value=r(c,l,!0));return a}(yt.exp));let t=-1;"bind"===yt.name&&(t=yt.modifiers.indexOf("sync"))>-1&&Ke("COMPILER_K_BIND_SYNC",Tt,0)&&(yt.name="model",yt.modifiers.splice(t,1))}7===yt.type&&"pre"===yt.name||It.props.push(yt)}Ot="",At=Ct=-1},oncomment(e,t){Tt.comments&&qt({type:3,content:Dt(e,t),loc:Jt(e-4,t+3)})},onend(){const e=Nt.length;for(let t=0;t<Lt.length;t++)wt(Lt[t],e-1)},oncdata(e,t){0!==Lt[0].ns&&Xt(Dt(e,t),e,t)},onprocessinginstruction(e){0===(Lt[0]?Lt[0].ns:Tt.ns)&&Qt(21,e-1)}}),kt=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Pt=/^\(|\)$/g;function Dt(e,t){return Nt.slice(e,t)}function vt(e){Mt.inSFCRoot&&(It.innerLoc=Jt(e+1,e+1)),qt(It);const{tag:t,ns:n}=It;0===n&&Tt.isPreTag(t)&&bt++,Tt.isVoidTag(t)?wt(It,e):(Lt.unshift(It),1!==n&&2!==n||(Mt.inXML=!0)),It=null}function Xt(e,t,n){{const t=Lt[0]&&Lt[0].tag;"script"!==t&&"style"!==t&&e.includes("&")&&(e=Tt.decodeEntities(e,!1))}const s=Lt[0]||gt,i=s.children[s.children.length-1];i&&2===i.type?(i.content+=e,jt(i.loc,n)):s.children.push({type:2,content:e,loc:Jt(t,n)})}function wt(e,t,n=!1){jt(e.loc,n?Kt(t,60):function(e,t){let n=e;for(;Nt.charCodeAt(n)!==t&&n<Nt.length-1;)n++;return n}(t,62)+1),Mt.inSFCRoot&&(e.innerLoc.end=r({},e.children.length?e.children[e.children.length-1].loc.end:e.innerLoc.start),e.innerLoc.source=Dt(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:s,ns:i}=e;Rt||("slot"===s?e.tagType=2:Ft(e)?e.tagType=3:function({tag:e,props:t}){if(Tt.isCustomElement(e))return!1;if("component"===e||(n=e.charCodeAt(0),n>64&&n<91)||Je(e)||Tt.isBuiltInComponent&&Tt.isBuiltInComponent(e)||Tt.isNativeTag&&!Tt.isNativeTag(e))return!0;var n;for(let s=0;s<t.length;s++){const e=t[s];if(6===e.type){if("is"===e.name&&e.value){if(e.value.content.startsWith("kdu:"))return!0;if(Ke("COMPILER_IS_ON_ELEMENT",Tt))return!0}}else if("bind"===e.name&&ot(e.arg,"is")&&Ke("COMPILER_IS_ON_ELEMENT",Tt))return!0}return!1}(e)&&(e.tagType=1)),Mt.inRCDATA||(e.children=$t(e.children,e.tag)),0===i&&Tt.isPreTag(s)&&bt--,xt===e&&(Rt=Mt.inKPre=!1,xt=null),Mt.inXML&&0===(Lt[0]?Lt[0].ns:Tt.ns)&&(Mt.inXML=!1);{const t=e.props;if(!Mt.inSFCRoot&&we("COMPILER_NATIVE_TEMPLATE",Tt)&&"template"===e.tag&&!Ft(e)){const t=Lt[0]||gt,n=t.children.indexOf(e);t.children.splice(n,1,...e.children)}const n=t.find((e=>6===e.type&&"inline-template"===e.name));n&&Ke("COMPILER_INLINE_TEMPLATE",Tt)&&e.children.length&&(n.value={type:2,content:Dt(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function Kt(e,t){let n=e;for(;Nt.charCodeAt(n)!==t&&n>=0;)n--;return n}const Ut=new Set(["if","else","else-if","for","slot"]);function Ft({tag:e,props:t}){if("template"===e)for(let n=0;n<t.length;n++)if(7===t[n].type&&Ut.has(t[n].name))return!0;return!1}const Bt=/\r\n/g;function $t(e,t){const n="preserve"!==Tt.whitespace;let s=!1;for(let i=0;i<e.length;i++){const t=e[i];if(2===t.type)if(bt)t.content=t.content.replace(Bt,"\n");else if(Ht(t.content)){const o=e[i-1]&&e[i-1].type,r=e[i+1]&&e[i+1].type;!o||!r||n&&(3===o&&(3===r||1===r)||1===o&&(3===r||1===r&&Vt(t.content)))?(s=!0,e[i]=null):t.content=" "}else n&&(t.content=Gt(t.content))}if(bt&&t&&Tt.isPreTag(t)){const t=e[0];t&&2===t.type&&(t.content=t.content.replace(/^\r?\n/,""))}return s?e.filter(Boolean):e}function Ht(e){for(let t=0;t<e.length;t++)if(!Me(e.charCodeAt(t)))return!1;return!0}function Vt(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(10===n||13===n)return!0}return!1}function Gt(e){let t="",n=!1;for(let s=0;s<e.length;s++)Me(e.charCodeAt(s))?n||(t+=" ",n=!0):(t+=e[s],n=!1);return t}function qt(e){(Lt[0]||gt).children.push(e)}function Jt(e,t){return{start:Mt.getPos(e),end:null==t?t:Mt.getPos(t),source:null==t?t:Dt(e,t)}}function jt(e,t){e.end=Mt.getPos(t),e.source=Dt(e.start.offset,t)}function Wt(e){const t={type:6,name:e.rawName,nameLoc:Jt(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}function Yt(e,t=!1,n,s=0,i=0){return Se(e,t,n,s)}function Qt(e,t,n){Tt.onError(Be(e,Jt(t,t)))}function zt(e,t){if(Mt.reset(),It=null,yt=null,Ot="",At=-1,Ct=-1,Lt.length=0,Nt=e,Tt=r({},St),t){let e;for(e in t)null!=t[e]&&(Tt[e]=t[e])}Mt.mode="html"===Tt.parseMode?1:"sfc"===Tt.parseMode?2:0,Mt.inXML=1===Tt.ns||2===Tt.ns;const n=t&&t.delimiters;n&&(Mt.delimiterOpen=Pe(n[0]),Mt.delimiterClose=Pe(n[1]));const s=gt=ue([],e);return Mt.parse(Nt),s.loc=Jt(0,e.length),s.children=$t(s.children),gt=null,s}function Zt(e,t){tn(e,t,en(e,e.children[0]))}function en(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!ht(t)}function tn(e,t,n=!1){const{children:s}=e,i=s.length;let o=0;for(let r=0;r<s.length;r++){const e=s[r];if(1===e.type&&0===e.tagType){const s=n?0:nn(e,t);if(s>0){if(s>=2){e.codegenNode.patchFlag="-1",e.codegenNode=t.hoist(e.codegenNode),o++;continue}}else{const n=e.codegenNode;if(13===n.type){const s=cn(n);if((!s||512===s||1===s)&&rn(e,t)>=2){const s=an(e);s&&(n.props=t.hoist(s))}n.dynamicProps&&(n.dynamicProps=t.hoist(n.dynamicProps))}}}if(1===e.type){const n=1===e.tagType;n&&t.scopes.kSlot++,tn(e,t),n&&t.scopes.kSlot--}else if(11===e.type)tn(e,t,1===e.children.length);else if(9===e.type)for(let n=0;n<e.branches.length;n++)tn(e.branches[n],t,1===e.branches[n].children.length)}if(o&&t.transformHoist&&t.transformHoist(s,t,e),o&&o===i&&1===e.type&&0===e.tagType&&e.codegenNode&&13===e.codegenNode.type&&a(e.codegenNode.children)){const n=t.hoist(me(e.codegenNode.children));t.hmr&&(n.content=`[...${n.content}]`),e.codegenNode.children=n}}function nn(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const s=n.get(e);if(void 0!==s)return s;const i=e.codegenNode;if(13!==i.type)return 0;if(i.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag)return 0;if(cn(i))return n.set(e,0),0;{let s=3;const o=rn(e,t);if(0===o)return n.set(e,0),0;o<s&&(s=o);for(let i=0;i<e.children.length;i++){const o=nn(e.children[i],t);if(0===o)return n.set(e,0),0;o<s&&(s=o)}if(s>1)for(let i=0;i<e.props.length;i++){const o=e.props[i];if(7===o.type&&"bind"===o.name&&o.exp){const i=nn(o.exp,t);if(0===i)return n.set(e,0),0;i<s&&(s=i)}}if(i.isBlock){for(let t=0;t<e.props.length;t++){if(7===e.props[t].type)return n.set(e,0),0}t.removeHelper(L),t.removeHelper(Ce(t.inSSR,i.isComponent)),i.isBlock=!1,t.helper(Ae(t.inSSR,i.isComponent))}return n.set(e,s),s}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return nn(e.content,t);case 4:return e.constType;case 8:let o=3;for(let n=0;n<e.children.length;n++){const s=e.children[n];if(c(s)||l(s))continue;const i=nn(s,t);if(0===i)return 0;i<o&&(o=i)}return o}}const sn=new Set([j,W,Y,Q]);function on(e,t){if(14===e.type&&!c(e.callee)&&sn.has(e.callee)){const n=e.arguments[0];if(4===n.type)return nn(n,t);if(14===n.type)return on(n,t)}return 0}function rn(e,t){let n=3;const s=an(e);if(s&&15===s.type){const{properties:e}=s;for(let s=0;s<e.length;s++){const{key:i,value:o}=e[s],r=nn(i,t);if(0===r)return r;let a;if(r<n&&(n=r),a=4===o.type?nn(o,t):14===o.type?on(o,t):0,0===a)return a;a<n&&(n=a)}}return n}function an(e){const t=e.codegenNode;if(13===t.type)return t.props}function cn(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function ln(e,{filename:t="",prefixIdentifiers:i=!1,hoistStatic:o=!1,hmr:r=!1,cacheHandlers:a=!1,nodeTransforms:l=[],directiveTransforms:h={},transformHoist:p=null,isBuiltInComponent:d=s,isCustomElement:u=s,expressionPlugins:f=[],scopeId:_=null,slotted:S=!0,ssr:T=!1,inSSR:g=!1,ssrCssVars:N="",bindingMetadata:I=n,inline:y=!1,isTS:O=!1,onError:A=Ue,onWarn:C=Fe,compatConfig:b}){const R=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),x={filename:t,selfName:R&&E(m(R[1])),prefixIdentifiers:i,hoistStatic:o,hmr:r,cacheHandlers:a,nodeTransforms:l,directiveTransforms:h,transformHoist:p,isBuiltInComponent:d,isCustomElement:u,expressionPlugins:f,scopeId:_,slotted:S,ssr:T,inSSR:g,ssrCssVars:N,bindingMetadata:I,inline:y,isTS:O,onError:A,onWarn:C,compatConfig:b,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new WeakMap,temps:0,cached:0,identifiers:Object.create(null),scopes:{kFor:0,kSlot:0,kPre:0,kOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inKOnce:!1,helper(e){const t=x.helpers.get(e)||0;return x.helpers.set(e,t+1),e},removeHelper(e){const t=x.helpers.get(e);if(t){const n=t-1;n?x.helpers.set(e,n):x.helpers.delete(e)}},helperString:e=>`_${he[x.helper(e)]}`,replaceNode(e){x.parent.children[x.childIndex]=x.currentNode=e},removeNode(e){const t=e?x.parent.children.indexOf(e):x.currentNode?x.childIndex:-1;e&&e!==x.currentNode?x.childIndex>t&&(x.childIndex--,x.onNodeRemoved()):(x.currentNode=null,x.onNodeRemoved()),x.parent.children.splice(t,1)},onNodeRemoved:s,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){c(e)&&(e=Se(e)),x.hoists.push(e);const t=Se(`_hoisted_${x.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache:(e,t=!1)=>ye(x.cached++,e,t)};return x.filters=new Set,x}function hn(e,t){const n=ln(e,t);pn(e,n),t.hoistStatic&&Zt(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:s}=e;if(1===s.length){const n=s[0];if(en(e,n)&&n.codegenNode){const s=n.codegenNode;13===s.type&&be(s,t),e.codegenNode=s}else e.codegenNode=n}else if(s.length>1){let s=64;e.codegenNode=fe(t,n(A),void 0,e.children,s+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function pn(e,t){t.currentNode=e;const{nodeTransforms:n}=t,s=[];for(let o=0;o<n.length;o++){const i=n[o](e,t);if(i&&(a(i)?s.push(...i):s.push(i)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(v);break;case 5:t.ssr||t.helper(q);break;case 9:for(let n=0;n<e.branches.length;n++)pn(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0;const s=()=>{n--};for(;n<e.children.length;n++){const i=e.children[n];c(i)||(t.grandParent=t.parent,t.parent=e,t.childIndex=n,t.onNodeRemoved=s,pn(i,t))}}(e,t)}t.currentNode=e;let i=s.length;for(;i--;)s[i]()}function dn(e,t){const n=c(e)?t=>t===e:t=>e.test(t);return(e,s)=>{if(1===e.type){const{props:i}=e;if(3===e.tagType&&i.some(ct))return;const o=[];for(let r=0;r<i.length;r++){const a=i[r];if(7===a.type&&n(a.name)){i.splice(r,1),r--;const n=t(e,a,s);n&&o.push(n)}}return o}}}const un="/*#__PURE__*/",fn=e=>`${he[e]}: _${he[e]}`;function mn(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:s=!1,filename:i="template.kdu.html",scopeId:o=null,optimizeImports:r=!1,runtimeGlobalName:a="Kdu",runtimeModuleName:c="kdu",ssrRuntimeModuleName:l="kdu/server-renderer",ssr:h=!1,isTS:p=!1,inSSR:d=!1}){const u={mode:t,prefixIdentifiers:n,sourceMap:s,filename:i,scopeId:o,optimizeImports:r,runtimeGlobalName:a,runtimeModuleName:c,ssrRuntimeModuleName:l,ssr:h,isTS:p,inSSR:d,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${he[e]}`,push(e,t=-2,n){u.code+=e},indent(){f(++u.indentLevel)},deindent(e=!1){e?--u.indentLevel:f(--u.indentLevel)},newline(){f(u.indentLevel)}};function f(e){u.push("\n"+" ".repeat(e),0)}return u}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:s,push:i,prefixIdentifiers:o,indent:r,deindent:a,newline:c,ssr:l}=n,h=Array.from(e.helpers),p=h.length>0,d=!o&&"module"!==s;!function(e,t){const{push:n,newline:s,runtimeGlobalName:i}=t,o=i,r=Array.from(e.helpers);if(r.length>0&&(n(`const _Kdu = ${o}\n`,-1),e.hoists.length)){n(`const { ${[P,D,v,X,w].filter((e=>r.includes(e))).map(fn).join(", ")} } = _Kdu\n`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:s}=t;s();for(let i=0;i<e.length;i++){const o=e[i];o&&(n(`const _hoisted_${i+1} = `),Tn(o,t),s())}t.pure=!1})(e.hoists,t),s(),n("return ")}(e,n);if(i(`function ${l?"ssrRender":"render"}(${(l?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ")}) {`),r(),d&&(i("with (_ctx) {"),r(),p&&(i(`const { ${h.map(fn).join(", ")} } = _Kdu\n`,-1),c())),e.components.length&&(En(e.components,"component",n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(En(e.directives,"directive",n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),En(e.filters,"filter",n),c()),e.temps>0){i("let ");for(let t=0;t<e.temps;t++)i(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i("\n",0),c()),l||i("return "),e.codegenNode?Tn(e.codegenNode,n):i("null"),d&&(a(),i("}")),a(),i("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function En(e,t,{helper:n,push:s,newline:i,isTS:o}){const r=n("filter"===t?B:"component"===t?K:F);for(let a=0;a<e.length;a++){let n=e[a];const c=n.endsWith("__self");c&&(n=n.slice(0,-6)),s(`const ${mt(n,t)} = ${r}(${JSON.stringify(n)}${c?", true":""})${o?"!":""}`),a<e.length-1&&i()}}function _n(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Sn(e,t,n),n&&t.deindent(),t.push("]")}function Sn(e,t,n=!1,s=!0){const{push:i,newline:o}=t;for(let r=0;r<e.length;r++){const l=e[r];c(l)?i(l,-3):a(l)?_n(l,t):Tn(l,t),r<e.length-1&&(n?(s&&i(","),o()):s&&i(", "))}}function Tn(e,t){if(c(e))t.push(e,-3);else if(l(e))t.push(t.helper(e));else switch(e.type){case 1:case 9:case 11:case 12:Tn(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),-3,e)}(e,t);break;case 4:gn(e,t);break;case 5:!function(e,t){const{push:n,helper:s,pure:i}=t;i&&n(un);n(`${s(q)}(`),Tn(e.content,t),n(")")}(e,t);break;case 8:Nn(e,t);break;case 3:!function(e,t){const{push:n,helper:s,pure:i}=t;i&&n(un);n(`${s(v)}(${JSON.stringify(e.content)})`,-3,e)}(e,t);break;case 13:!function(e,t){const{push:n,helper:s,pure:i}=t,{tag:o,props:r,children:a,patchFlag:c,dynamicProps:l,directives:h,isBlock:p,disableTracking:d,isComponent:u}=e;h&&n(s($)+"(");p&&n(`(${s(L)}(${d?"true":""}), `);i&&n(un);const f=p?Ce(t.inSSR,u):Ae(t.inSSR,u);n(s(f)+"(",-2,e),Sn(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map((e=>e||"null"))}([o,r,a,c,l]),t),n(")"),p&&n(")");h&&(n(", "),Tn(h,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:s,pure:i}=t,o=c(e.callee)?e.callee:s(e.callee);i&&n(un);n(o+"(",-2,e),Sn(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:s,deindent:i,newline:o}=t,{properties:r}=e;if(!r.length)return void n("{}",-2,e);const a=r.length>1||!1;n(a?"{":"{ "),a&&s();for(let c=0;c<r.length;c++){const{key:e,value:s}=r[c];In(e,t),n(": "),Tn(s,t),c<r.length-1&&(n(","),o())}a&&i(),n(a?"}":" }")}(e,t);break;case 17:!function(e,t){_n(e.elements,t)}(e,t);break;case 18:!function(e,t){const{push:n,indent:s,deindent:i}=t,{params:o,returns:r,body:c,newline:l,isSlot:h}=e;h&&n(`_${he[oe]}(`);n("(",-2,e),a(o)?Sn(o,t):o&&Tn(o,t);n(") => "),(l||c)&&(n("{"),s());r?(l&&n("return "),a(r)?_n(r,t):Tn(r,t)):c&&Tn(c,t);(l||c)&&(i(),n("}"));h&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:s,alternate:i,newline:o}=e,{push:r,indent:a,deindent:c,newline:l}=t;if(4===n.type){const e=!We(n.content);e&&r("("),gn(n,t),e&&r(")")}else r("("),Tn(n,t),r(")");o&&a(),t.indentLevel++,o||r(" "),r("? "),Tn(s,t),t.indentLevel--,o&&l(),o||r(" "),r(": ");const h=19===i.type;h||t.indentLevel++;Tn(i,t),h||t.indentLevel--;o&&c(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:s,indent:i,deindent:o,newline:r}=t;n(`_cache[${e.index}] || (`),e.isKNode&&(i(),n(`${s(ne)}(-1),`),r());n(`_cache[${e.index}] = `),Tn(e.value,t),e.isKNode&&(n(","),r(),n(`${s(ne)}(1),`),r(),n(`_cache[${e.index}]`),o());n(")")}(e,t);break;case 21:Sn(e.body,t,!0,!1)}}function gn(e,t){const{content:n,isStatic:s}=e;t.push(s?JSON.stringify(n):n,-3,e)}function Nn(e,t){for(let n=0;n<e.children.length;n++){const s=e.children[n];c(s)?t.push(s,-3):Tn(s,t)}}function In(e,t){const{push:n}=t;if(8===e.type)n("["),Nn(e,t),n("]");else if(e.isStatic){n(We(e.content)?e.content:JSON.stringify(e.content),-2,e)}else n(`[${e.content}]`,-3,e)}function yn(e,t,n=!1,s=!1,i=Object.create(t.identifiers)){return e}const On=dn(/^(if|else|else-if)$/,((e,t,n)=>An(e,t,n,((e,t,s)=>{const i=n.parent.children;let o=i.indexOf(e),r=0;for(;o-- >=0;){const e=i[o];e&&9===e.type&&(r+=e.branches.length)}return()=>{if(s)e.codegenNode=bn(t,r,n);else{const s=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);s.alternate=bn(t,r+e.branches.length-1,n)}}}))));function An(e,t,n,s){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const s=t.exp?t.exp.loc:e.loc;n.onError(Be(28,t.loc)),t.exp=Se("true",!1,s)}if("if"===t.name){const i=Cn(e,t),o={type:9,loc:e.loc,branches:[i]};if(n.replaceNode(o),s)return s(o,i,!0)}else{const i=n.parent.children;let o=i.indexOf(e);for(;o-- >=-1;){const r=i[o];if(r&&3===r.type)n.removeNode(r);else{if(!r||2!==r.type||r.content.trim().length){if(r&&9===r.type){"else-if"===t.name&&void 0===r.branches[r.branches.length-1].condition&&n.onError(Be(30,e.loc)),n.removeNode();const i=Cn(e,t);r.branches.push(i);const o=s&&s(r,i,!1);pn(i,n),o&&o(),n.currentNode=null}else n.onError(Be(30,e.loc));break}n.removeNode(r)}}}}function Cn(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!st(e,"for")?e.children:[e],userKey:it(e,"key"),isTemplateIf:n}}function bn(e,t,n){return e.condition?Ie(e.condition,Rn(e,t,n),ge(n.helper(v),['""',"true"])):Rn(e,t,n)}function Rn(e,t,n){const{helper:s}=n,i=_e("key",Se(`${t}`,!1,de,2)),{children:o}=e,r=o[0];if(1!==o.length||1!==r.type){if(1===o.length&&11===r.type){const e=r.codegenNode;return ut(e,i,n),e}{let t=64;return fe(n,s(A),Ee([i]),o,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=r.codegenNode,t=Et(e);return 13===t.type&&be(t,n),ut(t,i,n),e}}const xn=dn("for",((e,t,n)=>{const{helper:s,removeHelper:i}=n;return Ln(e,t,n,(t=>{const o=ge(s(H),[t.source]),r=lt(e),a=st(e,"memo"),c=it(e,"key"),l=c&&(6===c.type?Se(c.value.content,!0):c.exp),h=c?_e("key",l):null,p=4===t.source.type&&t.source.constType>0,d=p?64:c?128:256;return t.codegenNode=fe(n,s(A),void 0,o,d+"",void 0,void 0,!0,!p,!1,e.loc),()=>{let c;const{children:d}=t,u=1!==d.length||1!==d[0].type,f=ht(e)?e:r&&1===e.children.length&&ht(e.children[0])?e.children[0]:null;if(f?(c=f.codegenNode,r&&h&&ut(c,h,n)):u?c=fe(n,s(A),h?Ee([h]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(c=d[0].codegenNode,r&&h&&ut(c,h,n),c.isBlock!==!p&&(c.isBlock?(i(L),i(Ce(n.inSSR,c.isComponent))):i(Ae(n.inSSR,c.isComponent))),c.isBlock=!p,c.isBlock?(s(L),s(Ce(n.inSSR,c.isComponent))):s(Ae(n.inSSR,c.isComponent))),a){const e=Ne(kn(t.parseResult,[Se("_cached")]));e.body=Oe([Te(["const _memo = (",a.exp,")"]),Te(["if (_cached",...l?[" && _cached.key === ",l]:[],` && ${n.helperString(le)}(_cached, _memo)) return _cached`]),Te(["const _item = ",c]),Se("_item.memo = _memo"),Se("return _item")]),o.arguments.push(e,Se("_cache"),Se(String(n.cached++)))}else o.arguments.push(Ne(kn(t.parseResult),c,!0))}}))}));function Ln(e,t,n,s){if(!t.exp)return void n.onError(Be(31,t.loc));const i=t.forParseResult;if(!i)return void n.onError(Be(32,t.loc));Mn(i);const{scopes:o}=n,{source:r,value:a,key:c,index:l}=i,h={type:11,loc:t.loc,source:r,valueAlias:a,keyAlias:c,objectIndexAlias:l,parseResult:i,children:lt(e)?e.children:[e]};n.replaceNode(h),o.kFor++;const p=s&&s(h);return()=>{o.kFor--,p&&p()}}function Mn(e,t){e.finalized||(e.finalized=!0)}function kn({value:e,key:t,index:n},s=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Se("_".repeat(t+1),!1)))}([e,t,n,...s])}const Pn=Se("undefined",!1),Dn=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=st(e,"slot");if(n)return t.scopes.kSlot++,()=>{t.scopes.kSlot--}}},vn=(e,t,n,s)=>Ne(e,n,!1,!0,n.length?n[0].loc:s);function Xn(e,t,n=vn){t.helper(oe);const{children:s,loc:i}=e,o=[],r=[];let a=t.scopes.kSlot>0||t.scopes.kFor>0;const c=st(e,"slot",!0);if(c){const{arg:e,exp:t}=c;e&&!qe(e)&&(a=!0),o.push(_e(e||Se("default",!0),n(t,void 0,s,i)))}let l=!1,h=!1;const p=[],d=new Set;let u=0;for(let E=0;E<s.length;E++){const e=s[E];let i;if(!lt(e)||!(i=st(e,"slot",!0))){3!==e.type&&p.push(e);continue}if(c){t.onError(Be(37,i.loc));break}l=!0;const{children:f,loc:m}=e,{arg:_=Se("default",!0),exp:S,loc:T}=i;let g;qe(_)?g=_?_.content:"default":a=!0;const N=st(e,"for"),I=n(S,N,f,m);let y,O;if(y=st(e,"if"))a=!0,r.push(Ie(y.exp,wn(_,I,u++),Pn));else if(O=st(e,/^else(-if)?$/,!0)){let e,n=E;for(;n--&&(e=s[n],3===e.type););if(e