inquirer-form 0.3.6 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +9 -11
- package/dist/inquirer-form.css +1 -1
- package/dist/inquirer-form.es.js +3247 -3681
- package/dist/inquirer-form.umd.js +6 -8
- package/package.json +78 -74
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
(function(Q,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("agilebuilder-form"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","agilebuilder-form","element-plus"],n):(Q=typeof globalThis<"u"?globalThis:Q||self,n(Q.InquirerForm={},Q.Vue,Q.agilebuilderForm,Q.elementPlus))})(this,(function(Q,n,$,Z){"use strict";const Zo={class:"inquirer-designer-card"},er={class:"card-header"},tr={class:"type-badge"},nr={class:"message"},or={key:0,class:"description"},rr={key:1,class:"options-preview"},ar={key:0,class:"more"},lr=n.defineComponent({inheritAttrs:!1,__name:"BaseQuestionDesigner",props:{label:{},message:{},description:{},typeLabel:{},options:{},isActive:{type:Boolean},previewCount:{}},emits:["select"],setup(e,{emit:t}){const o=e,r=t,a=n.computed(()=>o.previewCount??3),l=n.computed(()=>o.options?.slice(0,a.value)??[]),s=n.computed(()=>(o.options?.length??0)>a.value),i=n.computed(()=>o.label||o.message||o.typeLabel),u=n.computed(()=>o.message||"未设置 message");return(d,_)=>(n.openBlock(),n.createBlock(n.unref($.FormItemWrapper),{selectable:"",label:i.value,"is-active":e.isActive,onSelect:_[0]||(_[0]=E=>r("select"))},{default:n.withCtx(()=>[n.createElementVNode("div",Zo,[n.createElementVNode("header",er,[n.createElementVNode("span",tr,n.toDisplayString(e.typeLabel),1)]),n.createElementVNode("div",nr,n.toDisplayString(u.value),1),e.description?(n.openBlock(),n.createElementBlock("p",or,n.toDisplayString(e.description),1)):n.createCommentVNode("",!0),l.value.length?(n.openBlock(),n.createElementBlock("ul",rr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.value,E=>(n.openBlock(),n.createElementBlock("li",{key:E.value},n.toDisplayString(E.label||E.value),1))),128)),s.value?(n.openBlock(),n.createElementBlock("li",ar,"…")):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)])]),_:1},8,["label","is-active"]))}}),te=(e,t)=>{const o=e.__vccOpts||e;for(const[r,a]of t)o[r]=a;return o},ge=te(lr,[["__scopeId","data-v-b29b6f1e"]]),sr=n.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const o=e,r=t,{label:a,message:l,description:s,isActive:i}=n.toRefs(o);return(u,d)=>(n.openBlock(),n.createBlock(ge,{label:n.unref(a),message:n.unref(l),description:n.unref(s),"type-label":"Inquirer Input","is-active":n.unref(i),onSelect:d[0]||(d[0]=_=>r("select"))},null,8,["label","message","description","is-active"]))}}),ir={class:"inquirer-input"},cr={key:0,class:"transformer-preview"},ur=te(n.defineComponent({__name:"runtime",props:{modelValue:{},placeholder:{},disabled:{type:Boolean},prefix:{},suffix:{},displayValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,r=t,a=n.computed(()=>o.displayValue===void 0?!1:o.displayValue!==o.modelValue);return(l,s)=>(n.openBlock(),n.createElementBlock("div",ir,[n.createVNode(n.unref(Z.ElInput),{"model-value":e.modelValue??"",placeholder:e.placeholder,disabled:e.disabled,clearable:"","onUpdate:modelValue":s[0]||(s[0]=i=>r("update:modelValue",i??""))},n.createSlots({_:2},[e.prefix?{name:"prepend",fn:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.prefix),1)]),key:"0"}:void 0,e.suffix?{name:"append",fn:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.suffix),1)]),key:"1"}:void 0]),1032,["model-value","placeholder","disabled"]),a.value?(n.openBlock(),n.createElementBlock("p",cr,n.toDisplayString(e.displayValue),1)):n.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-c4eebc18"]]),mr={class:"base-input-config"},dr=te(n.defineComponent({__name:"BaseInputConfig",props:{label:{},field:{}},emits:["update"],setup(e,{emit:t}){const o=t;function r(l){o("update",{field:l})}function a(l,s){o("update",{props:{[l]:s}})}return(l,s)=>(n.openBlock(),n.createElementBlock("div",mr,[n.createVNode(n.unref($.TextSetting),{label:l.$t("designer.node.field_label"),modelValue:e.field,"onUpdate:modelValue":r},null,8,["label","modelValue"]),n.renderSlot(l.$slots,"default",{updateProp:a},void 0,!0)]))}}),[["__scopeId","data-v-be4e1176"]]),fr={class:"textarea-setting"},pr={key:0,class:"hint"},_r=te(n.defineComponent({__name:"TextareaSetting",props:{label:{},modelValue:{},hint:{},minRows:{default:2},maxRows:{default:4}},emits:["update:modelValue"],setup(e,{emit:t}){const o=t;return(r,a)=>(n.openBlock(),n.createElementBlock("div",fr,[n.createElementVNode("label",null,n.toDisplayString(e.label),1),n.createVNode(n.unref(Z.ElInput),{type:"textarea","model-value":e.modelValue,autosize:{minRows:e.minRows,maxRows:e.maxRows},"onUpdate:modelValue":a[0]||(a[0]=l=>o("update:modelValue",l??""))},null,8,["model-value","autosize"]),e.hint?(n.openBlock(),n.createElementBlock("p",pr,n.toDisplayString(e.hint),1)):n.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-9093816f"]]);var gr=n.defineComponent({name:"CircleCheck",__name:"circle-check",setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[n.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),n.createElementVNode("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"})]))}}),Er=gr,hr=n.defineComponent({name:"Compass",__name:"compass",setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[n.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),n.createElementVNode("path",{fill:"currentColor",d:"M725.888 315.008C676.48 428.672 624 513.28 568.576 568.64c-55.424 55.424-139.968 107.904-253.568 157.312a12.8 12.8 0 0 1-16.896-16.832c49.536-113.728 102.016-198.272 157.312-253.632 55.36-55.296 139.904-107.776 253.632-157.312a12.8 12.8 0 0 1 16.832 16.832"})]))}}),br=hr,Nr=n.defineComponent({name:"DataLine",__name:"data-line",setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[n.createElementVNode("path",{fill:"currentColor",d:"M359.168 768H160a32 32 0 0 1-32-32V192H64a32 32 0 0 1 0-64h896a32 32 0 1 1 0 64h-64v544a32 32 0 0 1-32 32H665.216l110.848 192h-73.856L591.36 768H433.024L322.176 960H248.32zM832 192H192v512h640zM342.656 534.656a32 32 0 1 1-45.312-45.312L444.992 341.76l125.44 94.08L679.04 300.032a32 32 0 1 1 49.92 39.936L581.632 524.224 451.008 426.24 342.656 534.592z"})]))}}),yr=Nr,kr=n.defineComponent({name:"EditPen",__name:"edit-pen",setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[n.createElementVNode("path",{fill:"currentColor",d:"m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64z"})]))}}),Cr=kr,Ir=n.defineComponent({name:"Expand",__name:"expand",setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[n.createElementVNode("path",{fill:"currentColor",d:"M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352 192 160-192 128z"})]))}}),Tr=Ir,Sr=n.defineComponent({name:"Finished",__name:"finished",setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[n.createElementVNode("path",{fill:"currentColor",d:"M280.768 753.728 691.456 167.04a32 32 0 1 1 52.416 36.672L314.24 817.472a32 32 0 0 1-45.44 7.296l-230.4-172.8a32 32 0 0 1 38.4-51.2zM736 448a32 32 0 1 1 0-64h192a32 32 0 1 1 0 64zM608 640a32 32 0 0 1 0-64h319.936a32 32 0 1 1 0 64zM480 832a32 32 0 1 1 0-64h447.936a32 32 0 1 1 0 64z"})]))}}),Lr=Sr,xr=n.defineComponent({name:"InfoFilled",__name:"info-filled",setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[n.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),Vr=xr,Or=n.defineComponent({name:"List",__name:"list",setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[n.createElementVNode("path",{fill:"currentColor",d:"M704 192h160v736H160V192h160v64h384zM288 512h448v-64H288zm0 256h448v-64H288zm96-576V96h256v96z"})]))}}),wr=Or,Dr=n.defineComponent({name:"Lock",__name:"lock",setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[n.createElementVNode("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),n.createElementVNode("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}}),Ar=Dr,Rr=n.defineComponent({name:"Memo",__name:"memo",setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 1024 1024"},[n.createElementVNode("path",{fill:"currentColor",d:"M480 320h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"}),n.createElementVNode("path",{fill:"currentColor",d:"M887.01 72.99C881.01 67 873.34 64 864 64H160c-9.35 0-17.02 3-23.01 8.99C131 78.99 128 86.66 128 96v832c0 9.35 2.99 17.02 8.99 23.01S150.66 960 160 960h704c9.35 0 17.02-2.99 23.01-8.99S896 937.34 896 928V96c0-9.35-3-17.02-8.99-23.01M192 896V128h96v768zm640 0H352V128h480z"}),n.createElementVNode("path",{fill:"currentColor",d:"M480 512h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32m0 192h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"})]))}}),Pr=Rr,Ur=n.defineComponent({name:"Tickets",__name:"tickets",setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[n.createElementVNode("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h192v64H320zm0 384h384v64H320z"})]))}}),Mr=Ur;function Ee(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const gn={};function En(e){gn[e]||(gn[e]=!0,Ee(e))}const ue=typeof window<"u";let se,Le;if(process.env.NODE_ENV!=="production"){const e=ue&&window.performance;e&&e.mark&&e.measure&&e.clearMarks&&e.clearMeasures&&(se=t=>{e.mark(t)},Le=(t,o,r)=>{e.measure(t,o,r),e.clearMarks(o),e.clearMarks(r)})}const Fr=/\{([0-9a-zA-Z]+)\}/g;function rt(e,...t){return t.length===1&&U(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(Fr,(o,r)=>t.hasOwnProperty(r)?t[r]:"")}const pe=(e,t=!1)=>t?Symbol.for(e):Symbol(e),Br=(e,t,o)=>$r({l:e,k:t,s:o}),$r=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),K=e=>typeof e=="number"&&isFinite(e),vr=e=>bt(e)==="[object Date]",Me=e=>bt(e)==="[object RegExp]",at=e=>R(e)&&Object.keys(e).length===0,J=Object.assign,qr=Object.create,v=(e=null)=>qr(e);let hn;const xe=()=>hn||(hn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:v());function bn(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function Nn(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Wr(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(r,a,l)=>`${a}="${Nn(l)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(r,a,l)=>`${a}='${Nn(l)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(process.env.NODE_ENV!=="production"&&Ee("Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages."),e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(r=>{e=e.replace(r,"$1javascript:")}),e}const Hr=Object.prototype.hasOwnProperty;function me(e,t){return Hr.call(e,t)}const H=Array.isArray,q=e=>typeof e=="function",L=e=>typeof e=="string",M=e=>typeof e=="boolean",U=e=>e!==null&&typeof e=="object",Gr=e=>U(e)&&q(e.then)&&q(e.catch),yn=Object.prototype.toString,bt=e=>yn.call(e),R=e=>bt(e)==="[object Object]",Yr=e=>e==null?"":H(e)||R(e)&&e.toString===yn?JSON.stringify(e,null,2):String(e);function Nt(e,t=""){return e.reduce((o,r,a)=>a===0?o+r:o+t+r,"")}const kn=2;function Kr(e,t=0,o=e.length){const r=e.split(/\r?\n/);let a=0;const l=[];for(let s=0;s<r.length;s++)if(a+=r[s].length+1,a>=t){for(let i=s-kn;i<=s+kn||o>a;i++){if(i<0||i>=r.length)continue;const u=i+1;l.push(`${u}${" ".repeat(3-String(u).length)}| ${r[i]}`);const d=r[i].length;if(i===s){const _=t-(a-d)+1,E=Math.max(1,o>a?d-_:o-t);l.push(" | "+" ".repeat(_)+"^".repeat(E))}else if(i>s){if(o>a){const _=Math.max(Math.min(o-a,d),1);l.push(" | "+"^".repeat(_))}a+=d+1}}break}return l.join(`
|
|
2
|
-
`)}function
|
|
3
|
-
`,ta="\u2028",na="\u2029";function oa(e){const t=e;let o=0,r=1,a=1,l=0;const s=b=>t[b]===ea&&t[b+1]===re,i=b=>t[b]===re,u=b=>t[b]===na,d=b=>t[b]===ta,_=b=>s(b)||i(b)||u(b)||d(b),E=()=>o,p=()=>r,V=()=>a,O=()=>l,S=b=>s(b)||u(b)||d(b)?re:t[b],x=()=>S(o),f=()=>S(o+l);function g(){return l=0,_(o)&&(r++,a=0),s(o)&&o++,o++,a++,t[o]}function k(){return s(o+l)&&l++,l++,t[o+l]}function N(){o=0,r=1,a=1,l=0}function T(b=0){l=b}function C(){const b=o+l;for(;b!==o;)g();l=0}return{index:E,line:p,column:V,peekOffset:O,charAt:S,currentChar:x,currentPeek:f,next:g,peek:k,reset:N,resetPeek:T,skipToPeek:C}}const Ce=void 0,ra=".",Cn="'",aa="tokenizer";function la(e,t={}){const o=t.location!==!1,r=oa(e),a=()=>r.index(),l=()=>jr(r.line(),r.column(),r.index()),s=l(),i=a(),u={currentType:13,offset:i,startLoc:s,endLoc:s,lastType:13,lastOffset:i,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},d=()=>u,{onError:_}=t;function E(c,m,y,...w){const j=d();if(m.column+=y,m.offset+=y,_){const X=o?kt(j.startLoc,m):null,F=Fe(c,X,{domain:aa,args:w});_(F)}}function p(c,m,y){c.endLoc=l(),c.currentType=m;const w={type:m};return o&&(w.loc=kt(c.startLoc,c.endLoc)),y!=null&&(w.value=y),w}const V=c=>p(c,13);function O(c,m){return c.currentChar()===m?(c.next(),m):(E(D.EXPECTED_TOKEN,l(),0,m),"")}function S(c){let m="";for(;c.currentPeek()===he||c.currentPeek()===re;)m+=c.currentPeek(),c.peek();return m}function x(c){const m=S(c);return c.skipToPeek(),m}function f(c){if(c===Ce)return!1;const m=c.charCodeAt(0);return m>=97&&m<=122||m>=65&&m<=90||m===95}function g(c){if(c===Ce)return!1;const m=c.charCodeAt(0);return m>=48&&m<=57}function k(c,m){const{currentType:y}=m;if(y!==2)return!1;S(c);const w=f(c.currentPeek());return c.resetPeek(),w}function N(c,m){const{currentType:y}=m;if(y!==2)return!1;S(c);const w=c.currentPeek()==="-"?c.peek():c.currentPeek(),j=g(w);return c.resetPeek(),j}function T(c,m){const{currentType:y}=m;if(y!==2)return!1;S(c);const w=c.currentPeek()===Cn;return c.resetPeek(),w}function C(c,m){const{currentType:y}=m;if(y!==7)return!1;S(c);const w=c.currentPeek()===".";return c.resetPeek(),w}function b(c,m){const{currentType:y}=m;if(y!==8)return!1;S(c);const w=f(c.currentPeek());return c.resetPeek(),w}function A(c,m){const{currentType:y}=m;if(!(y===7||y===11))return!1;S(c);const w=c.currentPeek()===":";return c.resetPeek(),w}function P(c,m){const{currentType:y}=m;if(y!==9)return!1;const w=()=>{const X=c.currentPeek();return X==="{"?f(c.peek()):X==="@"||X==="|"||X===":"||X==="."||X===he||!X?!1:X===re?(c.peek(),w()):fe(c,!1)},j=w();return c.resetPeek(),j}function G(c){S(c);const m=c.currentPeek()==="|";return c.resetPeek(),m}function fe(c,m=!0){const y=(j=!1,X="")=>{const F=c.currentPeek();return F==="{"||F==="@"||!F?j:F==="|"?!(X===he||X===re):F===he?(c.peek(),y(!0,he)):F===re?(c.peek(),y(!0,re)):!0},w=y();return m&&c.resetPeek(),w}function Y(c,m){const y=c.currentChar();return y===Ce?Ce:m(y)?(c.next(),y):null}function We(c){const m=c.charCodeAt(0);return m>=97&&m<=122||m>=65&&m<=90||m>=48&&m<=57||m===95||m===36}function Zt(c){return Y(c,We)}function en(c){const m=c.charCodeAt(0);return m>=97&&m<=122||m>=65&&m<=90||m>=48&&m<=57||m===95||m===36||m===45}function tn(c){return Y(c,en)}function nn(c){const m=c.charCodeAt(0);return m>=48&&m<=57}function on(c){return Y(c,nn)}function rn(c){const m=c.charCodeAt(0);return m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102}function ke(c){return Y(c,rn)}function et(c){let m="",y="";for(;m=on(c);)y+=m;return y}function an(c){let m="";for(;;){const y=c.currentChar();if(y==="{"||y==="}"||y==="@"||y==="|"||!y)break;if(y===he||y===re)if(fe(c))m+=y,c.next();else{if(G(c))break;m+=y,c.next()}else m+=y,c.next()}return m}function ln(c){x(c);let m="",y="";for(;m=tn(c);)y+=m;return c.currentChar()===Ce&&E(D.UNTERMINATED_CLOSING_BRACE,l(),0),y}function sn(c){x(c);let m="";return c.currentChar()==="-"?(c.next(),m+=`-${et(c)}`):m+=et(c),c.currentChar()===Ce&&E(D.UNTERMINATED_CLOSING_BRACE,l(),0),m}function cn(c){return c!==Cn&&c!==re}function Jo(c){x(c),O(c,"'");let m="",y="";for(;m=Y(c,cn);)m==="\\"?y+=un(c):y+=m;const w=c.currentChar();return w===re||w===Ce?(E(D.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,l(),0),w===re&&(c.next(),O(c,"'")),y):(O(c,"'"),y)}function un(c){const m=c.currentChar();switch(m){case"\\":case"'":return c.next(),`\\${m}`;case"u":return Et(c,m,4);case"U":return Et(c,m,6);default:return E(D.UNKNOWN_ESCAPE_SEQUENCE,l(),0,m),""}}function Et(c,m,y){O(c,m);let w="";for(let j=0;j<y;j++){const X=ke(c);if(!X){E(D.INVALID_UNICODE_ESCAPE_SEQUENCE,l(),0,`\\${m}${w}${c.currentChar()}`);break}w+=X}return`\\${m}${w}`}function mn(c){return c!=="{"&&c!=="}"&&c!==he&&c!==re}function dn(c){x(c);let m="",y="";for(;m=Y(c,mn);)y+=m;return y}function fn(c){let m="",y="";for(;m=Zt(c);)y+=m;return y}function pn(c){const m=y=>{const w=c.currentChar();return w==="{"||w==="@"||w==="|"||w==="("||w===")"||!w||w===he?y:(y+=w,c.next(),m(y))};return m("")}function tt(c){x(c);const m=O(c,"|");return x(c),m}function nt(c,m){let y=null;switch(c.currentChar()){case"{":return m.braceNest>=1&&E(D.NOT_ALLOW_NEST_PLACEHOLDER,l(),0),c.next(),y=p(m,2,"{"),x(c),m.braceNest++,y;case"}":return m.braceNest>0&&m.currentType===2&&E(D.EMPTY_PLACEHOLDER,l(),0),c.next(),y=p(m,3,"}"),m.braceNest--,m.braceNest>0&&x(c),m.inLinked&&m.braceNest===0&&(m.inLinked=!1),y;case"@":return m.braceNest>0&&E(D.UNTERMINATED_CLOSING_BRACE,l(),0),y=Re(c,m)||V(m),m.braceNest=0,y;default:{let j=!0,X=!0,F=!0;if(G(c))return m.braceNest>0&&E(D.UNTERMINATED_CLOSING_BRACE,l(),0),y=p(m,1,tt(c)),m.braceNest=0,m.inLinked=!1,y;if(m.braceNest>0&&(m.currentType===4||m.currentType===5||m.currentType===6))return E(D.UNTERMINATED_CLOSING_BRACE,l(),0),m.braceNest=0,ot(c,m);if(j=k(c,m))return y=p(m,4,ln(c)),x(c),y;if(X=N(c,m))return y=p(m,5,sn(c)),x(c),y;if(F=T(c,m))return y=p(m,6,Jo(c)),x(c),y;if(!j&&!X&&!F)return y=p(m,12,dn(c)),E(D.INVALID_TOKEN_IN_PLACEHOLDER,l(),0,y.value),x(c),y;break}}return y}function Re(c,m){const{currentType:y}=m;let w=null;const j=c.currentChar();switch((y===7||y===8||y===11||y===9)&&(j===re||j===he)&&E(D.INVALID_LINKED_FORMAT,l(),0),j){case"@":return c.next(),w=p(m,7,"@"),m.inLinked=!0,w;case".":return x(c),c.next(),p(m,8,".");case":":return x(c),c.next(),p(m,9,":");default:return G(c)?(w=p(m,1,tt(c)),m.braceNest=0,m.inLinked=!1,w):C(c,m)||A(c,m)?(x(c),Re(c,m)):b(c,m)?(x(c),p(m,11,fn(c))):P(c,m)?(x(c),j==="{"?nt(c,m)||w:p(m,10,pn(c))):(y===7&&E(D.INVALID_LINKED_FORMAT,l(),0),m.braceNest=0,m.inLinked=!1,ot(c,m))}}function ot(c,m){let y={type:13};if(m.braceNest>0)return nt(c,m)||V(m);if(m.inLinked)return Re(c,m)||V(m);switch(c.currentChar()){case"{":return nt(c,m)||V(m);case"}":return E(D.UNBALANCED_CLOSING_BRACE,l(),0),c.next(),p(m,3,"}");case"@":return Re(c,m)||V(m);default:{if(G(c))return y=p(m,1,tt(c)),m.braceNest=0,m.inLinked=!1,y;if(fe(c))return p(m,0,an(c));break}}return y}function _n(){const{currentType:c,offset:m,startLoc:y,endLoc:w}=u;return u.lastType=c,u.lastOffset=m,u.lastStartLoc=y,u.lastEndLoc=w,u.offset=a(),u.startLoc=l(),r.currentChar()===Ce?p(u,13):ot(r,u)}return{nextToken:_n,currentOffset:a,currentPosition:l,context:d}}const sa="parser",ia=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function ca(e,t,o){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(t||o,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function ua(e={}){const t=e.location!==!1,{onError:o}=e;function r(f,g,k,N,...T){const C=f.currentPosition();if(C.offset+=N,C.column+=N,o){const b=t?kt(k,C):null,A=Fe(g,b,{domain:sa,args:T});o(A)}}function a(f,g,k){const N={type:f};return t&&(N.start=g,N.end=g,N.loc={start:k,end:k}),N}function l(f,g,k,N){t&&(f.end=g,f.loc&&(f.loc.end=k))}function s(f,g){const k=f.context(),N=a(3,k.offset,k.startLoc);return N.value=g,l(N,f.currentOffset(),f.currentPosition()),N}function i(f,g){const k=f.context(),{lastOffset:N,lastStartLoc:T}=k,C=a(5,N,T);return C.index=parseInt(g,10),f.nextToken(),l(C,f.currentOffset(),f.currentPosition()),C}function u(f,g){const k=f.context(),{lastOffset:N,lastStartLoc:T}=k,C=a(4,N,T);return C.key=g,f.nextToken(),l(C,f.currentOffset(),f.currentPosition()),C}function d(f,g){const k=f.context(),{lastOffset:N,lastStartLoc:T}=k,C=a(9,N,T);return C.value=g.replace(ia,ca),f.nextToken(),l(C,f.currentOffset(),f.currentPosition()),C}function _(f){const g=f.nextToken(),k=f.context(),{lastOffset:N,lastStartLoc:T}=k,C=a(8,N,T);return g.type!==11?(r(f,D.UNEXPECTED_EMPTY_LINKED_MODIFIER,k.lastStartLoc,0),C.value="",l(C,N,T),{nextConsumeToken:g,node:C}):(g.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,_e(g)),C.value=g.value||"",l(C,f.currentOffset(),f.currentPosition()),{node:C})}function E(f,g){const k=f.context(),N=a(7,k.offset,k.startLoc);return N.value=g,l(N,f.currentOffset(),f.currentPosition()),N}function p(f){const g=f.context(),k=a(6,g.offset,g.startLoc);let N=f.nextToken();if(N.type===8){const T=_(f);k.modifier=T.node,N=T.nextConsumeToken||f.nextToken()}switch(N.type!==9&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,g.lastStartLoc,0,_e(N)),N=f.nextToken(),N.type===2&&(N=f.nextToken()),N.type){case 10:N.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,g.lastStartLoc,0,_e(N)),k.key=E(f,N.value||"");break;case 4:N.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,g.lastStartLoc,0,_e(N)),k.key=u(f,N.value||"");break;case 5:N.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,g.lastStartLoc,0,_e(N)),k.key=i(f,N.value||"");break;case 6:N.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,g.lastStartLoc,0,_e(N)),k.key=d(f,N.value||"");break;default:{r(f,D.UNEXPECTED_EMPTY_LINKED_KEY,g.lastStartLoc,0);const T=f.context(),C=a(7,T.offset,T.startLoc);return C.value="",l(C,T.offset,T.startLoc),k.key=C,l(k,T.offset,T.startLoc),{nextConsumeToken:N,node:k}}}return l(k,f.currentOffset(),f.currentPosition()),{node:k}}function V(f){const g=f.context(),k=g.currentType===1?f.currentOffset():g.offset,N=g.currentType===1?g.endLoc:g.startLoc,T=a(2,k,N);T.items=[];let C=null;do{const P=C||f.nextToken();switch(C=null,P.type){case 0:P.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,g.lastStartLoc,0,_e(P)),T.items.push(s(f,P.value||""));break;case 5:P.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,g.lastStartLoc,0,_e(P)),T.items.push(i(f,P.value||""));break;case 4:P.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,g.lastStartLoc,0,_e(P)),T.items.push(u(f,P.value||""));break;case 6:P.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,g.lastStartLoc,0,_e(P)),T.items.push(d(f,P.value||""));break;case 7:{const G=p(f);T.items.push(G.node),C=G.nextConsumeToken||null;break}}}while(g.currentType!==13&&g.currentType!==1);const b=g.currentType===1?g.lastOffset:f.currentOffset(),A=g.currentType===1?g.lastEndLoc:f.currentPosition();return l(T,b,A),T}function O(f,g,k,N){const T=f.context();let C=N.items.length===0;const b=a(1,g,k);b.cases=[],b.cases.push(N);do{const A=V(f);C||(C=A.items.length===0),b.cases.push(A)}while(T.currentType!==13);return C&&r(f,D.MUST_HAVE_MESSAGES_IN_PLURAL,k,0),l(b,f.currentOffset(),f.currentPosition()),b}function S(f){const g=f.context(),{offset:k,startLoc:N}=g,T=V(f);return g.currentType===13?T:O(f,k,N,T)}function x(f){const g=la(f,J({},e)),k=g.context(),N=a(0,k.offset,k.startLoc);return t&&N.loc&&(N.loc.source=f),N.body=S(g),e.onCacheKey&&(N.cacheKey=e.onCacheKey(f)),k.currentType!==13&&r(g,D.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,f[k.offset]||""),l(N,g.currentOffset(),g.currentPosition()),N}return{parse:x}}function _e(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function ma(e,t={}){const o={ast:e,helpers:new Set};return{context:()=>o,helper:l=>(o.helpers.add(l),l)}}function In(e,t){for(let o=0;o<e.length;o++)Ct(e[o],t)}function Ct(e,t){switch(e.type){case 1:In(e.cases,t),t.helper("plural");break;case 2:In(e.items,t);break;case 6:{Ct(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function da(e,t={}){const o=ma(e);o.helper("normalize"),e.body&&Ct(e.body,o);const r=o.context();e.helpers=Array.from(r.helpers)}function fa(e){const t=e.body;return t.type===2?Tn(t):t.cases.forEach(o=>Tn(o)),e}function Tn(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let o=0;o<e.items.length;o++){const r=e.items[o];if(!(r.type===3||r.type===9)||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=Nt(t);for(let o=0;o<e.items.length;o++){const r=e.items[o];(r.type===3||r.type===9)&&delete r.value}}}}const pa="minifier";function Be(e){switch(e.t=e.type,e.type){case 0:{const t=e;Be(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,o=t.cases;for(let r=0;r<o.length;r++)Be(o[r]);t.c=o,delete t.cases;break}case 2:{const t=e,o=t.items;for(let r=0;r<o.length;r++)Be(o[r]);t.i=o,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;Be(t.key),t.k=t.key,delete t.key,t.modifier&&(Be(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}default:if(process.env.NODE_ENV!=="production")throw Fe(D.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:pa,args:[e.type]})}delete e.type}const _a="parser";function ga(e,t){const{filename:o,breakLineCode:r,needIndent:a}=t,l=t.location!==!1,s={filename:o,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:a,indentLevel:0};l&&e.loc&&(s.source=e.loc.source);const i=()=>s;function u(S,x){s.code+=S}function d(S,x=!0){const f=x?r:"";u(a?f+" ".repeat(S):f)}function _(S=!0){const x=++s.indentLevel;S&&d(x)}function E(S=!0){const x=--s.indentLevel;S&&d(x)}function p(){d(s.indentLevel)}return{context:i,push:u,indent:_,deindent:E,newline:p,helper:S=>`_${S}`,needIndent:()=>s.needIndent}}function Ea(e,t){const{helper:o}=e;e.push(`${o("linked")}(`),$e(e,t.key),t.modifier?(e.push(", "),$e(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function ha(e,t){const{helper:o,needIndent:r}=e;e.push(`${o("normalize")}([`),e.indent(r());const a=t.items.length;for(let l=0;l<a&&($e(e,t.items[l]),l!==a-1);l++)e.push(", ");e.deindent(r()),e.push("])")}function ba(e,t){const{helper:o,needIndent:r}=e;if(t.cases.length>1){e.push(`${o("plural")}([`),e.indent(r());const a=t.cases.length;for(let l=0;l<a&&($e(e,t.cases[l]),l!==a-1);l++)e.push(", ");e.deindent(r()),e.push("])")}}function Na(e,t){t.body?$e(e,t.body):e.push("null")}function $e(e,t){const{helper:o}=e;switch(t.type){case 0:Na(e,t);break;case 1:ba(e,t);break;case 2:ha(e,t);break;case 6:Ea(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${o("interpolate")}(${o("list")}(${t.index}))`,t);break;case 4:e.push(`${o("interpolate")}(${o("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:if(process.env.NODE_ENV!=="production")throw Fe(D.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:_a,args:[t.type]})}}const ya=(e,t={})=>{const o=L(t.mode)?t.mode:"normal",r=L(t.filename)?t.filename:"message.intl";t.sourceMap;const a=t.breakLineCode!=null?t.breakLineCode:o==="arrow"?";":`
|
|
4
|
-
`,l=t.needIndent?t.needIndent:o!=="arrow",s=e.helpers||[],i=ga(e,{filename:r,breakLineCode:a,needIndent:l});i.push(o==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),i.indent(l),s.length>0&&(i.push(`const { ${Nt(s.map(_=>`${_}: _${_}`),", ")} } = ctx`),i.newline()),i.push("return "),$e(i,e),i.deindent(l),i.push("}"),delete e.helpers;const{code:u,map:d}=i.context();return{ast:e,code:u,map:d?d.toJSON():void 0}};function ka(e,t={}){const o=J({},t),r=!!o.jit,a=!!o.minify,l=o.optimize==null?!0:o.optimize,i=ua(o).parse(e);return r?(l&&fa(i),a&&Be(i),{ast:i,code:""}):(da(i,o),ya(i,o))}function Ca(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(xe().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(xe().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function ie(e){return U(e)&&It(e)===0&&(me(e,"b")||me(e,"body"))}const Sn=["b","body"];function Ia(e){return Ie(e,Sn)}const Ln=["c","cases"];function Ta(e){return Ie(e,Ln,[])}const xn=["s","static"];function Sa(e){return Ie(e,xn)}const Vn=["i","items"];function La(e){return Ie(e,Vn,[])}const On=["t","type"];function It(e){return Ie(e,On)}const wn=["v","value"];function it(e,t){const o=Ie(e,wn);if(o!=null)return o;throw Ge(t)}const Dn=["m","modifier"];function xa(e){return Ie(e,Dn)}const An=["k","key"];function Va(e){const t=Ie(e,An);if(t)return t;throw Ge(6)}function Ie(e,t,o){for(let r=0;r<t.length;r++){const a=t[r];if(me(e,a)&&e[a]!=null)return e[a]}return o}const Rn=[...Sn,...Ln,...xn,...Vn,...An,...Dn,...wn,...On];function Ge(e){return new Error(`unhandled node type: ${e}`)}function Tt(e){return o=>Oa(o,e)}function Oa(e,t){const o=Ia(t);if(o==null)throw Ge(0);if(It(o)===1){const l=Ta(o);return e.plural(l.reduce((s,i)=>[...s,Pn(e,i)],[]))}else return Pn(e,o)}function Pn(e,t){const o=Sa(t);if(o!=null)return e.type==="text"?o:e.normalize([o]);{const r=La(t).reduce((a,l)=>[...a,St(e,l)],[]);return e.normalize(r)}}function St(e,t){const o=It(t);switch(o){case 3:return it(t,o);case 9:return it(t,o);case 4:{const r=t;if(me(r,"k")&&r.k)return e.interpolate(e.named(r.k));if(me(r,"key")&&r.key)return e.interpolate(e.named(r.key));throw Ge(o)}case 5:{const r=t;if(me(r,"i")&&K(r.i))return e.interpolate(e.list(r.i));if(me(r,"index")&&K(r.index))return e.interpolate(e.list(r.index));throw Ge(o)}case 6:{const r=t,a=xa(r),l=Va(r);return e.linked(St(e,l),a?St(e,a):void 0,e.type)}case 7:return it(t,o);case 8:return it(t,o);default:throw new Error(`unhandled node on format message part: ${o}`)}}const wa="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function Da(e,t){t&&Zr(e)&&Ee(rt(wa,{source:e}))}const Aa=e=>e;let ct=v();function Ra(e,t={}){let o=!1;const r=t.onError||Jr;return t.onError=a=>{o=!0,r(a)},{...ka(e,t),detectError:o}}function Pa(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&L(e)){const o=M(t.warnHtmlMessage)?t.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&Da(e,o);const a=(t.onCacheKey||Aa)(e),l=ct[a];if(l)return l;const{ast:s,detectError:i}=Ra(e,{...t,location:process.env.NODE_ENV!=="production",jit:!0}),u=Tt(s);return i?u:ct[a]=u}else{if(process.env.NODE_ENV!=="production"&&!ie(e))return Ee(`the message that is resolve with key '${t.key}' is not supported for jit compilation`),(()=>e);const o=e.cacheKey;if(o){const r=ct[o];return r||(ct[o]=Tt(e))}else return Tt(e)}}let Ye=null;function Ua(e){Ye=e}function Ma(e,t,o){Ye&&Ye.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:o})}const Fa=Ba("function:translate");function Ba(e){return t=>Ye&&Ye.emit(e,t)}const ne={INVALID_ARGUMENT:Xr,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},$a=24;function be(e){return Fe(e,null,process.env.NODE_ENV!=="production"?{messages:va}:void 0)}const va={[ne.INVALID_ARGUMENT]:"Invalid arguments",[ne.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[ne.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[ne.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[ne.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[ne.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[ne.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function Lt(e,t){return t.locale!=null?Un(t.locale):Un(e.locale)}let xt;function Un(e){if(L(e))return e;if(q(e)){if(e.resolvedOnce&&xt!=null)return xt;if(e.constructor.name==="Function"){const t=e();if(Gr(t))throw be(ne.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return xt=t}else throw be(ne.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw be(ne.NOT_SUPPORT_LOCALE_TYPE)}function qa(e,t,o){return[...new Set([o,...H(t)?t:U(t)?Object.keys(t):L(t)?[t]:[o]])]}function Mn(e,t,o){const r=L(o)?o:Ke,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let l=a.__localeChainCache.get(r);if(!l){l=[];let s=[o];for(;H(s);)s=Fn(l,s,t);const i=H(t)||!R(t)?t:t.default?t.default:null;s=L(i)?[i]:i,H(s)&&Fn(l,s,!1),a.__localeChainCache.set(r,l)}return l}function Fn(e,t,o){let r=!0;for(let a=0;a<t.length&&M(r);a++){const l=t[a];L(l)&&(r=Wa(e,t[a],o))}return r}function Wa(e,t,o){let r;const a=t.split("-");do{const l=a.join("-");r=Ha(e,l,o),a.splice(-1,1)}while(a.length&&r===!0);return r}function Ha(e,t,o){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!=="!";const a=t.replace(/!/g,"");e.push(a),(H(o)||R(o))&&o[a]&&(r=o[a])}return r}const Te=[];Te[0]={w:[0],i:[3,0],"[":[4],o:[7]},Te[1]={w:[1],".":[2],"[":[4],o:[7]},Te[2]={w:[2],i:[3,0],0:[3,0]},Te[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Te[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Te[5]={"'":[4,0],o:8,l:[5,0]},Te[6]={'"':[4,0],o:8,l:[6,0]};const Ga=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Ya(e){return Ga.test(e)}function Ka(e){const t=e.charCodeAt(0),o=e.charCodeAt(e.length-1);return t===o&&(t===34||t===39)?e.slice(1,-1):e}function ja(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function Xa(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:Ya(t)?Ka(t):"*"+t}function za(e){const t=[];let o=-1,r=0,a=0,l,s,i,u,d,_,E;const p=[];p[0]=()=>{s===void 0?s=i:s+=i},p[1]=()=>{s!==void 0&&(t.push(s),s=void 0)},p[2]=()=>{p[0](),a++},p[3]=()=>{if(a>0)a--,r=4,p[0]();else{if(a=0,s===void 0||(s=Xa(s),s===!1))return!1;p[1]()}};function V(){const O=e[o+1];if(r===5&&O==="'"||r===6&&O==='"')return o++,i="\\"+O,p[0](),!0}for(;r!==null;)if(o++,l=e[o],!(l==="\\"&&V())){if(u=ja(l),E=Te[r],d=E[u]||E.l||8,d===8||(r=d[0],d[1]!==void 0&&(_=p[d[1]],_&&(i=l,_()===!1))))return;if(r===7)return t}}const Bn=new Map;function Ja(e,t){return U(e)?e[t]:null}function Qa(e,t){if(!U(e))return null;let o=Bn.get(t);if(o||(o=za(t),o&&Bn.set(t,o)),!o)return null;const r=o.length;let a=e,l=0;for(;l<r;){const s=o[l];if(Rn.includes(s)&&ie(a))return null;const i=a[s];if(i===void 0||q(a))return null;a=i,l++}return a}const le={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},Za=8,el={[le.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[le.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[le.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[le.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[le.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[le.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[le.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function Ve(e,...t){return rt(el[e],...t)}const tl="10.0.8",ut=-1,Ke="en-US",mt="",$n=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function nl(){return{upper:(e,t)=>t==="text"&&L(e)?e.toUpperCase():t==="vnode"&&U(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&L(e)?e.toLowerCase():t==="vnode"&&U(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&L(e)?$n(e):t==="vnode"&&U(e)&&"__v_isVNode"in e?$n(e.children):e}}let vn;function ol(e){vn=e}let qn;function rl(e){qn=e}let Wn;function al(e){Wn=e}let Hn=null;const ll=e=>{Hn=e},sl=()=>Hn;let Gn=null;const Yn=e=>{Gn=e},il=()=>Gn;let Kn=0;function cl(e={}){const t=q(e.onWarn)?e.onWarn:Ee,o=L(e.version)?e.version:tl,r=L(e.locale)||q(e.locale)?e.locale:Ke,a=q(r)?Ke:r,l=H(e.fallbackLocale)||R(e.fallbackLocale)||L(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a,s=R(e.messages)?e.messages:Vt(a),i=R(e.datetimeFormats)?e.datetimeFormats:Vt(a),u=R(e.numberFormats)?e.numberFormats:Vt(a),d=J(v(),e.modifiers,nl()),_=e.pluralRules||v(),E=q(e.missing)?e.missing:null,p=M(e.missingWarn)||Me(e.missingWarn)?e.missingWarn:!0,V=M(e.fallbackWarn)||Me(e.fallbackWarn)?e.fallbackWarn:!0,O=!!e.fallbackFormat,S=!!e.unresolving,x=q(e.postTranslation)?e.postTranslation:null,f=R(e.processor)?e.processor:null,g=M(e.warnHtmlMessage)?e.warnHtmlMessage:!0,k=!!e.escapeParameter,N=q(e.messageCompiler)?e.messageCompiler:vn;process.env.NODE_ENV!=="production"&&q(e.messageCompiler)&&En(Ve(le.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const T=q(e.messageResolver)?e.messageResolver:qn||Ja,C=q(e.localeFallbacker)?e.localeFallbacker:Wn||qa,b=U(e.fallbackContext)?e.fallbackContext:void 0,A=e,P=U(A.__datetimeFormatters)?A.__datetimeFormatters:new Map,G=U(A.__numberFormatters)?A.__numberFormatters:new Map,fe=U(A.__meta)?A.__meta:{};Kn++;const Y={version:o,cid:Kn,locale:r,fallbackLocale:l,messages:s,modifiers:d,pluralRules:_,missing:E,missingWarn:p,fallbackWarn:V,fallbackFormat:O,unresolving:S,postTranslation:x,processor:f,warnHtmlMessage:g,escapeParameter:k,messageCompiler:N,messageResolver:T,localeFallbacker:C,fallbackContext:b,onWarn:t,__meta:fe};return Y.datetimeFormats=i,Y.numberFormats=u,Y.__datetimeFormatters=P,Y.__numberFormatters=G,process.env.NODE_ENV!=="production"&&(Y.__v_emitter=A.__v_emitter!=null?A.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&Ma(Y,o,fe),Y}const Vt=e=>({[e]:v()});function dt(e,t){return e instanceof RegExp?e.test(t):e}function jn(e,t){return e instanceof RegExp?e.test(t):e}function Ot(e,t,o,r,a){const{missing:l,onWarn:s}=e;if(process.env.NODE_ENV!=="production"){const i=e.__v_emitter;i&&i.emit("missing",{locale:o,key:t,type:a,groupId:`${a}:${t}`})}if(l!==null){const i=l(e,o,t,a);return L(i)?i:t}else return process.env.NODE_ENV!=="production"&&jn(r,t)&&s(Ve(le.NOT_FOUND_KEY,{key:t,locale:o})),t}function je(e,t,o){const r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,o,t)}function Xn(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function ul(e,t){const o=t.indexOf(e);if(o===-1)return!1;for(let r=o+1;r<t.length;r++)if(Xn(e,t[r]))return!0;return!1}const zn=typeof Intl<"u",Jn={dateTimeFormat:zn&&typeof Intl.DateTimeFormat<"u",numberFormat:zn&&typeof Intl.NumberFormat<"u"};function Qn(e,...t){const{datetimeFormats:o,unresolving:r,fallbackLocale:a,onWarn:l,localeFallbacker:s}=e,{__datetimeFormatters:i}=e;if(process.env.NODE_ENV!=="production"&&!Jn.dateTimeFormat)return l(Ve(le.CANNOT_FORMAT_DATE)),mt;const[u,d,_,E]=wt(...t),p=M(_.missingWarn)?_.missingWarn:e.missingWarn,V=M(_.fallbackWarn)?_.fallbackWarn:e.fallbackWarn,O=!!_.part,S=Lt(e,_),x=s(e,a,S);if(!L(u)||u==="")return new Intl.DateTimeFormat(S,E).format(d);let f={},g,k=null,N=S,T=null;const C="datetime format";for(let P=0;P<x.length;P++){if(g=T=x[P],process.env.NODE_ENV!=="production"&&S!==g&&dt(V,u)&&l(Ve(le.FALLBACK_TO_DATE_FORMAT,{key:u,target:g})),process.env.NODE_ENV!=="production"&&S!==g){const G=e.__v_emitter;G&&G.emit("fallback",{type:C,key:u,from:N,to:T,groupId:`${C}:${u}`})}if(f=o[g]||{},k=f[u],R(k))break;Ot(e,u,g,p,C),N=T}if(!R(k)||!L(g))return r?ut:u;let b=`${g}__${u}`;at(E)||(b=`${b}__${JSON.stringify(E)}`);let A=i.get(b);return A||(A=new Intl.DateTimeFormat(g,J({},k,E)),i.set(b,A)),O?A.formatToParts(d):A.format(d)}const Zn=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function wt(...e){const[t,o,r,a]=e,l=v();let s=v(),i;if(L(t)){const u=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!u)throw be(ne.INVALID_ISO_DATE_ARGUMENT);const d=u[3]?u[3].trim().startsWith("T")?`${u[1].trim()}${u[3].trim()}`:`${u[1].trim()}T${u[3].trim()}`:u[1].trim();i=new Date(d);try{i.toISOString()}catch{throw be(ne.INVALID_ISO_DATE_ARGUMENT)}}else if(vr(t)){if(isNaN(t.getTime()))throw be(ne.INVALID_DATE_ARGUMENT);i=t}else if(K(t))i=t;else throw be(ne.INVALID_ARGUMENT);return L(o)?l.key=o:R(o)&&Object.keys(o).forEach(u=>{Zn.includes(u)?s[u]=o[u]:l[u]=o[u]}),L(r)?l.locale=r:R(r)&&(s=r),R(a)&&(s=a),[l.key||"",i,l,s]}function eo(e,t,o){const r=e;for(const a in o){const l=`${t}__${a}`;r.__datetimeFormatters.has(l)&&r.__datetimeFormatters.delete(l)}}function to(e,...t){const{numberFormats:o,unresolving:r,fallbackLocale:a,onWarn:l,localeFallbacker:s}=e,{__numberFormatters:i}=e;if(process.env.NODE_ENV!=="production"&&!Jn.numberFormat)return l(Ve(le.CANNOT_FORMAT_NUMBER)),mt;const[u,d,_,E]=Dt(...t),p=M(_.missingWarn)?_.missingWarn:e.missingWarn,V=M(_.fallbackWarn)?_.fallbackWarn:e.fallbackWarn,O=!!_.part,S=Lt(e,_),x=s(e,a,S);if(!L(u)||u==="")return new Intl.NumberFormat(S,E).format(d);let f={},g,k=null,N=S,T=null;const C="number format";for(let P=0;P<x.length;P++){if(g=T=x[P],process.env.NODE_ENV!=="production"&&S!==g&&dt(V,u)&&l(Ve(le.FALLBACK_TO_NUMBER_FORMAT,{key:u,target:g})),process.env.NODE_ENV!=="production"&&S!==g){const G=e.__v_emitter;G&&G.emit("fallback",{type:C,key:u,from:N,to:T,groupId:`${C}:${u}`})}if(f=o[g]||{},k=f[u],R(k))break;Ot(e,u,g,p,C),N=T}if(!R(k)||!L(g))return r?ut:u;let b=`${g}__${u}`;at(E)||(b=`${b}__${JSON.stringify(E)}`);let A=i.get(b);return A||(A=new Intl.NumberFormat(g,J({},k,E)),i.set(b,A)),O?A.formatToParts(d):A.format(d)}const no=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Dt(...e){const[t,o,r,a]=e,l=v();let s=v();if(!K(t))throw be(ne.INVALID_ARGUMENT);const i=t;return L(o)?l.key=o:R(o)&&Object.keys(o).forEach(u=>{no.includes(u)?s[u]=o[u]:l[u]=o[u]}),L(r)?l.locale=r:R(r)&&(s=r),R(a)&&(s=a),[l.key||"",i,l,s]}function oo(e,t,o){const r=e;for(const a in o){const l=`${t}__${a}`;r.__numberFormatters.has(l)&&r.__numberFormatters.delete(l)}}const ml=e=>e,dl=e=>"",fl="text",pl=e=>e.length===0?"":Nt(e),_l=Yr;function ro(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function gl(e){const t=K(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(K(e.named.count)||K(e.named.n))?K(e.named.count)?e.named.count:K(e.named.n)?e.named.n:t:t}function El(e,t){t.count||(t.count=e),t.n||(t.n=e)}function hl(e={}){const t=e.locale,o=gl(e),r=U(e.pluralRules)&&L(t)&&q(e.pluralRules[t])?e.pluralRules[t]:ro,a=U(e.pluralRules)&&L(t)&&q(e.pluralRules[t])?ro:void 0,l=f=>f[r(o,f.length,a)],s=e.list||[],i=f=>s[f],u=e.named||v();K(e.pluralIndex)&&El(o,u);const d=f=>u[f];function _(f,g){const k=q(e.messages)?e.messages(f,!!g):U(e.messages)?e.messages[f]:!1;return k||(e.parent?e.parent.message(f):dl)}const E=f=>e.modifiers?e.modifiers[f]:ml,p=R(e.processor)&&q(e.processor.normalize)?e.processor.normalize:pl,V=R(e.processor)&&q(e.processor.interpolate)?e.processor.interpolate:_l,O=R(e.processor)&&L(e.processor.type)?e.processor.type:fl,x={list:i,named:d,plural:l,linked:(f,...g)=>{const[k,N]=g;let T="text",C="";g.length===1?U(k)?(C=k.modifier||C,T=k.type||T):L(k)&&(C=k||C):g.length===2&&(L(k)&&(C=k||C),L(N)&&(T=N||T));const b=_(f,!0)(x),A=T==="vnode"&&H(b)&&C?b[0]:b;return C?E(C)(A,T):A},message:_,type:O,interpolate:V,normalize:p,values:J(v(),s,u)};return x}const ao=()=>"",ce=e=>q(e);function lo(e,...t){const{fallbackFormat:o,postTranslation:r,unresolving:a,messageCompiler:l,fallbackLocale:s,messages:i}=e,[u,d]=At(...t),_=M(d.missingWarn)?d.missingWarn:e.missingWarn,E=M(d.fallbackWarn)?d.fallbackWarn:e.fallbackWarn,p=M(d.escapeParameter)?d.escapeParameter:e.escapeParameter,V=!!d.resolvedMessage,O=L(d.default)||M(d.default)?M(d.default)?l?u:()=>u:d.default:o?l?u:()=>u:null,S=o||O!=null&&(L(O)||q(O)),x=Lt(e,d);p&&bl(d);let[f,g,k]=V?[u,x,i[x]||v()]:so(e,u,x,s,E,_),N=f,T=u;if(!V&&!(L(N)||ie(N)||ce(N))&&S&&(N=O,T=N),!V&&(!(L(N)||ie(N)||ce(N))||!L(g)))return a?ut:u;if(process.env.NODE_ENV!=="production"&&L(N)&&e.messageCompiler==null)return Ee(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${u}'.`),u;let C=!1;const b=()=>{C=!0},A=ce(N)?N:io(e,u,g,N,T,b);if(C)return N;const P=Cl(e,g,k,d),G=hl(P),fe=Nl(e,A,G);let Y=r?r(fe,u):fe;if(p&&L(Y)&&(Y=Wr(Y)),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const We={timestamp:Date.now(),key:L(u)?u:ce(N)?N.key:"",locale:g||(ce(N)?N.locale:""),format:L(N)?N:ce(N)?N.source:"",message:Y};We.meta=J({},e.__meta,sl()||{}),Fa(We)}return Y}function bl(e){H(e.list)?e.list=e.list.map(t=>L(t)?bn(t):t):U(e.named)&&Object.keys(e.named).forEach(t=>{L(e.named[t])&&(e.named[t]=bn(e.named[t]))})}function so(e,t,o,r,a,l){const{messages:s,onWarn:i,messageResolver:u,localeFallbacker:d}=e,_=d(e,r,o);let E=v(),p,V=null,O=o,S=null;const x="translate";for(let f=0;f<_.length;f++){if(p=S=_[f],process.env.NODE_ENV!=="production"&&o!==p&&!Xn(o,p)&&dt(a,t)&&i(Ve(le.FALLBACK_TO_TRANSLATE,{key:t,target:p})),process.env.NODE_ENV!=="production"&&o!==p){const T=e.__v_emitter;T&&T.emit("fallback",{type:x,key:t,from:O,to:S,groupId:`${x}:${t}`})}E=s[p]||v();let g=null,k,N;if(process.env.NODE_ENV!=="production"&&ue&&(g=window.performance.now(),k="intlify-message-resolve-start",N="intlify-message-resolve-end",se&&se(k)),(V=u(E,t))===null&&(V=E[t]),process.env.NODE_ENV!=="production"&&ue){const T=window.performance.now(),C=e.__v_emitter;C&&g&&V&&C.emit("message-resolve",{type:"message-resolve",key:t,message:V,time:T-g,groupId:`${x}:${t}`}),k&&N&&se&&Le&&(se(N),Le("intlify message resolve",k,N))}if(L(V)||ie(V)||ce(V))break;if(!ul(p,_)){const T=Ot(e,t,p,l,x);T!==t&&(V=T)}O=S}return[V,p,E]}function io(e,t,o,r,a,l){const{messageCompiler:s,warnHtmlMessage:i}=e;if(ce(r)){const p=r;return p.locale=p.locale||o,p.key=p.key||t,p}if(s==null){const p=(()=>r);return p.locale=o,p.key=t,p}let u=null,d,_;process.env.NODE_ENV!=="production"&&ue&&(u=window.performance.now(),d="intlify-message-compilation-start",_="intlify-message-compilation-end",se&&se(d));const E=s(r,yl(e,o,a,r,i,l));if(process.env.NODE_ENV!=="production"&&ue){const p=window.performance.now(),V=e.__v_emitter;V&&u&&V.emit("message-compilation",{type:"message-compilation",message:r,time:p-u,groupId:`translate:${t}`}),d&&_&&se&&Le&&(se(_),Le("intlify message compilation",d,_))}return E.locale=o,E.key=t,E.source=r,E}function Nl(e,t,o){let r=null,a,l;process.env.NODE_ENV!=="production"&&ue&&(r=window.performance.now(),a="intlify-message-evaluation-start",l="intlify-message-evaluation-end",se&&se(a));const s=t(o);if(process.env.NODE_ENV!=="production"&&ue){const i=window.performance.now(),u=e.__v_emitter;u&&r&&u.emit("message-evaluation",{type:"message-evaluation",value:s,time:i-r,groupId:`translate:${t.key}`}),a&&l&&se&&Le&&(se(l),Le("intlify message evaluation",a,l))}return s}function At(...e){const[t,o,r]=e,a=v();if(!L(t)&&!K(t)&&!ce(t)&&!ie(t))throw be(ne.INVALID_ARGUMENT);const l=K(t)?String(t):(ce(t),t);return K(o)?a.plural=o:L(o)?a.default=o:R(o)&&!at(o)?a.named=o:H(o)&&(a.list=o),K(r)?a.plural=r:L(r)?a.default=r:R(r)&&J(a,r),[l,a]}function yl(e,t,o,r,a,l){return{locale:t,key:o,warnHtmlMessage:a,onError:s=>{if(l&&l(s),process.env.NODE_ENV!=="production"){const i=kl(r),u=`Message compilation error: ${s.message}`,d=s.location&&i&&Kr(i,s.location.start.offset,s.location.end.offset),_=e.__v_emitter;_&&i&&_.emit("compile-error",{message:i,error:s.message,start:s.location&&s.location.start.offset,end:s.location&&s.location.end.offset,groupId:`translate:${o}`}),console.error(d?`${u}
|
|
5
|
-
${d}`:u)}else throw s},onCacheKey:s=>Br(t,o,s)}}function kl(e){if(L(e))return e;if(e.loc&&e.loc.source)return e.loc.source}function Cl(e,t,o,r){const{modifiers:a,pluralRules:l,messageResolver:s,fallbackLocale:i,fallbackWarn:u,missingWarn:d,fallbackContext:_}=e,p={locale:t,modifiers:a,pluralRules:l,messages:(V,O)=>{let S=s(o,V);if(S==null&&(_||O)){const[,,x]=so(_||e,V,t,i,u,d);S=s(x,V)}if(L(S)||ie(S)){let x=!1;const g=io(e,V,t,S,V,()=>{x=!0});return x?ao:g}else return ce(S)?S:ao}};return e.processor&&(p.processor=e.processor),r.list&&(p.list=r.list),r.named&&(p.named=r.named),K(r.plural)&&(p.pluralIndex=r.plural),p}Ca();function Il(){return co().__VUE_DEVTOOLS_GLOBAL_HOOK__}function co(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Tl=typeof Proxy=="function",Sl="devtools-plugin:setup",Ll="plugin:settings:set";let ve,Rt;function xl(){var e;return ve!==void 0||(typeof window<"u"&&window.performance?(ve=!0,Rt=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(ve=!0,Rt=globalThis.perf_hooks.performance):ve=!1),ve}function Vl(){return xl()?Rt.now():Date.now()}class Ol{constructor(t,o){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=o;const r={};if(t.settings)for(const s in t.settings){const i=t.settings[s];r[s]=i.defaultValue}const a=`__vue-devtools-plugin-settings__${t.id}`;let l=Object.assign({},r);try{const s=localStorage.getItem(a),i=JSON.parse(s);Object.assign(l,i)}catch{}this.fallbacks={getSettings(){return l},setSettings(s){try{localStorage.setItem(a,JSON.stringify(s))}catch{}l=s},now(){return Vl()}},o&&o.on(Ll,(s,i)=>{s===this.plugin.id&&this.fallbacks.setSettings(i)}),this.proxiedOn=new Proxy({},{get:(s,i)=>this.target?this.target.on[i]:(...u)=>{this.onQueue.push({method:i,args:u})}}),this.proxiedTarget=new Proxy({},{get:(s,i)=>this.target?this.target[i]:i==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(i)?(...u)=>(this.targetQueue.push({method:i,args:u,resolve:()=>{}}),this.fallbacks[i](...u)):(...u)=>new Promise(d=>{this.targetQueue.push({method:i,args:u,resolve:d})})})}async setRealTarget(t){this.target=t;for(const o of this.onQueue)this.target.on[o.method](...o.args);for(const o of this.targetQueue)o.resolve(await this.target[o.method](...o.args))}}function wl(e,t){const o=e,r=co(),a=Il(),l=Tl&&o.enableEarlyProxy;if(a&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!l))a.emit(Sl,e,t);else{const s=l?new Ol(o,a):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:o,setupFn:t,proxy:s}),s&&t(s.proxiedTarget)}}const Dl="10.0.8";function Al(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(xe().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(xe().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(xe().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(xe().__INTLIFY_PROD_DEVTOOLS__=!1)}const Se={FALLBACK_TO_ROOT:Za,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_TC:11},Rl={[Se.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Se.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Se.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Se.DEPRECATE_TC]:"'tc' and '$tc' has been deprecated in v10. Use 't' or '$t' instead. 'tc' and '$tc’ are going to remove in v11."};function ft(e,...t){return rt(Rl[e],...t)}const W={UNEXPECTED_RETURN_TYPE:$a,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function ae(e,...t){return Fe(e,null,process.env.NODE_ENV!=="production"?{messages:Pl,args:t}:void 0)}const Pl={[W.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[W.INVALID_ARGUMENT]:"Invalid argument",[W.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[W.NOT_INSTALLED]:"Need to install with `app.use` function",[W.UNEXPECTED_ERROR]:"Unexpected error",[W.REQUIRED_VALUE]:"Required in value: {0}",[W.INVALID_VALUE]:"Invalid value",[W.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[W.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[W.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[W.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},Pt=pe("__translateVNode"),Ut=pe("__datetimeParts"),Mt=pe("__numberParts"),Oe=pe("__enableEmitter"),Xe=pe("__disableEmitter"),uo=pe("__setPluralRules"),mo=pe("__injectWithOption"),Ft=pe("__dispose");function ze(e){if(!U(e)||ie(e))return e;for(const t in e)if(me(e,t))if(!t.includes("."))U(e[t])&&ze(e[t]);else{const o=t.split("."),r=o.length-1;let a=e,l=!1;for(let s=0;s<r;s++){if(o[s]==="__proto__")throw new Error(`unsafe key: ${o[s]}`);if(o[s]in a||(a[o[s]]=v()),!U(a[o[s]])){process.env.NODE_ENV!=="production"&&Ee(ft(Se.IGNORE_OBJ_FLATTEN,{key:o[s]})),l=!0;break}a=a[o[s]]}if(l||(ie(a)?Rn.includes(o[r])||delete e[t]:(a[o[r]]=e[t],delete e[t])),!ie(a)){const s=a[o[r]];U(s)&&ze(s)}}return e}function Bt(e,t){const{messages:o,__i18n:r,messageResolver:a,flatJson:l}=t,s=R(o)?o:H(r)?v():{[e]:v()};if(H(r)&&r.forEach(i=>{if("locale"in i&&"resource"in i){const{locale:u,resource:d}=i;u?(s[u]=s[u]||v(),st(d,s[u])):st(d,s)}else L(i)&&st(JSON.parse(i),s)}),a==null&&l)for(const i in s)me(s,i)&&ze(s[i]);return s}function fo(e){return e.type}function po(e,t,o){let r=U(t.messages)?t.messages:v();"__i18nGlobal"in o&&(r=Bt(e.locale.value,{messages:r,__i18n:o.__i18nGlobal}));const a=Object.keys(r);a.length&&a.forEach(l=>{e.mergeLocaleMessage(l,r[l])});{if(U(t.datetimeFormats)){const l=Object.keys(t.datetimeFormats);l.length&&l.forEach(s=>{e.mergeDateTimeFormat(s,t.datetimeFormats[s])})}if(U(t.numberFormats)){const l=Object.keys(t.numberFormats);l.length&&l.forEach(s=>{e.mergeNumberFormat(s,t.numberFormats[s])})}}}function _o(e){return n.createVNode(n.Text,null,e,0)}const go="__INTLIFY_META__",Eo=()=>[],Ul=()=>!1;let ho=0;function bo(e){return((t,o,r,a)=>e(o,r,n.getCurrentInstance()||void 0,a))}const Ml=()=>{const e=n.getCurrentInstance();let t=null;return e&&(t=fo(e)[go])?{[go]:t}:null};function $t(e={}){const{__root:t,__injectWithOption:o}=e,r=t===void 0,a=e.flatJson,l=ue?n.ref:n.shallowRef;let s=M(e.inheritLocale)?e.inheritLocale:!0;const i=l(t&&s?t.locale.value:L(e.locale)?e.locale:Ke),u=l(t&&s?t.fallbackLocale.value:L(e.fallbackLocale)||H(e.fallbackLocale)||R(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i.value),d=l(Bt(i.value,e)),_=l(R(e.datetimeFormats)?e.datetimeFormats:{[i.value]:{}}),E=l(R(e.numberFormats)?e.numberFormats:{[i.value]:{}});let p=t?t.missingWarn:M(e.missingWarn)||Me(e.missingWarn)?e.missingWarn:!0,V=t?t.fallbackWarn:M(e.fallbackWarn)||Me(e.fallbackWarn)?e.fallbackWarn:!0,O=t?t.fallbackRoot:M(e.fallbackRoot)?e.fallbackRoot:!0,S=!!e.fallbackFormat,x=q(e.missing)?e.missing:null,f=q(e.missing)?bo(e.missing):null,g=q(e.postTranslation)?e.postTranslation:null,k=t?t.warnHtmlMessage:M(e.warnHtmlMessage)?e.warnHtmlMessage:!0,N=!!e.escapeParameter;const T=t?t.modifiers:R(e.modifiers)?e.modifiers:{};let C=e.pluralRules||t&&t.pluralRules,b;b=(()=>{r&&Yn(null);const h={version:Dl,locale:i.value,fallbackLocale:u.value,messages:d.value,modifiers:T,pluralRules:C,missing:f===null?void 0:f,missingWarn:p,fallbackWarn:V,fallbackFormat:S,unresolving:!0,postTranslation:g===null?void 0:g,warnHtmlMessage:k,escapeParameter:N,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};h.datetimeFormats=_.value,h.numberFormats=E.value,h.__datetimeFormatters=R(b)?b.__datetimeFormatters:void 0,h.__numberFormatters=R(b)?b.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(h.__v_emitter=R(b)?b.__v_emitter:void 0);const I=cl(h);return r&&Yn(I),I})(),je(b,i.value,u.value);function P(){return[i.value,u.value,d.value,_.value,E.value]}const G=n.computed({get:()=>i.value,set:h=>{i.value=h,b.locale=i.value}}),fe=n.computed({get:()=>u.value,set:h=>{u.value=h,b.fallbackLocale=u.value,je(b,i.value,h)}}),Y=n.computed(()=>d.value),We=n.computed(()=>_.value),Zt=n.computed(()=>E.value);function en(){return q(g)?g:null}function tn(h){g=h,b.postTranslation=h}function nn(){return x}function on(h){h!==null&&(f=bo(h)),x=h,b.missing=f}function rn(h,I){return h!=="translate"||!I.resolvedMessage}const ke=(h,I,B,z,Pe,ht)=>{P();let He;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(b.fallbackContext=t?il():void 0),He=h(b)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(b.fallbackContext=void 0)}if(B!=="translate exists"&&K(He)&&He===ut||B==="translate exists"&&!He){const[Ue,ec]=I();if(process.env.NODE_ENV!=="production"&&t&&L(Ue)&&rn(B,ec)&&(O&&(dt(V,Ue)||jn(p,Ue))&&Ee(ft(Se.FALLBACK_TO_ROOT,{key:Ue,type:B})),process.env.NODE_ENV!=="production")){const{__v_emitter:Qo}=b;Qo&&O&&Qo.emit("fallback",{type:B,key:Ue,to:"global",groupId:`${B}:${Ue}`})}return t&&O?z(t):Pe(Ue)}else{if(ht(He))return He;throw ae(W.UNEXPECTED_RETURN_TYPE)}};function et(...h){return ke(I=>Reflect.apply(lo,null,[I,...h]),()=>At(...h),"translate",I=>Reflect.apply(I.t,I,[...h]),I=>I,I=>L(I))}function an(...h){const[I,B,z]=h;if(z&&!U(z))throw ae(W.INVALID_ARGUMENT);return et(I,B,J({resolvedMessage:!0},z||{}))}function ln(...h){return ke(I=>Reflect.apply(Qn,null,[I,...h]),()=>wt(...h),"datetime format",I=>Reflect.apply(I.d,I,[...h]),()=>mt,I=>L(I))}function sn(...h){return ke(I=>Reflect.apply(to,null,[I,...h]),()=>Dt(...h),"number format",I=>Reflect.apply(I.n,I,[...h]),()=>mt,I=>L(I))}function cn(h){return h.map(I=>L(I)||K(I)||M(I)?_o(String(I)):I)}const un={normalize:cn,interpolate:h=>h,type:"vnode"};function Et(...h){return ke(I=>{let B;const z=I;try{z.processor=un,B=Reflect.apply(lo,null,[z,...h])}finally{z.processor=null}return B},()=>At(...h),"translate",I=>I[Pt](...h),I=>[_o(I)],I=>H(I))}function mn(...h){return ke(I=>Reflect.apply(to,null,[I,...h]),()=>Dt(...h),"number format",I=>I[Mt](...h),Eo,I=>L(I)||H(I))}function dn(...h){return ke(I=>Reflect.apply(Qn,null,[I,...h]),()=>wt(...h),"datetime format",I=>I[Ut](...h),Eo,I=>L(I)||H(I))}function fn(h){C=h,b.pluralRules=C}function pn(h,I){return ke(()=>{if(!h)return!1;const B=L(I)?I:i.value,z=Re(B),Pe=b.messageResolver(z,h);return ie(Pe)||ce(Pe)||L(Pe)},()=>[h],"translate exists",B=>Reflect.apply(B.te,B,[h,I]),Ul,B=>M(B))}function tt(h){let I=null;const B=Mn(b,u.value,i.value);for(let z=0;z<B.length;z++){const Pe=d.value[B[z]]||{},ht=b.messageResolver(Pe,h);if(ht!=null){I=ht;break}}return I}function nt(h){const I=tt(h);return I??(t?t.tm(h)||{}:{})}function Re(h){return d.value[h]||{}}function ot(h,I){if(a){const B={[h]:I};for(const z in B)me(B,z)&&ze(B[z]);I=B[h]}d.value[h]=I,b.messages=d.value}function _n(h,I){d.value[h]=d.value[h]||{};const B={[h]:I};if(a)for(const z in B)me(B,z)&&ze(B[z]);I=B[h],st(I,d.value[h]),b.messages=d.value}function c(h){return _.value[h]||{}}function m(h,I){_.value[h]=I,b.datetimeFormats=_.value,eo(b,h,I)}function y(h,I){_.value[h]=J(_.value[h]||{},I),b.datetimeFormats=_.value,eo(b,h,I)}function w(h){return E.value[h]||{}}function j(h,I){E.value[h]=I,b.numberFormats=E.value,oo(b,h,I)}function X(h,I){E.value[h]=J(E.value[h]||{},I),b.numberFormats=E.value,oo(b,h,I)}ho++,t&&ue&&(n.watch(t.locale,h=>{s&&(i.value=h,b.locale=h,je(b,i.value,u.value))}),n.watch(t.fallbackLocale,h=>{s&&(u.value=h,b.fallbackLocale=h,je(b,i.value,u.value))}));const F={id:ho,locale:G,fallbackLocale:fe,get inheritLocale(){return s},set inheritLocale(h){s=h,h&&t&&(i.value=t.locale.value,u.value=t.fallbackLocale.value,je(b,i.value,u.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:Y,get modifiers(){return T},get pluralRules(){return C||{}},get isGlobal(){return r},get missingWarn(){return p},set missingWarn(h){p=h,b.missingWarn=p},get fallbackWarn(){return V},set fallbackWarn(h){V=h,b.fallbackWarn=V},get fallbackRoot(){return O},set fallbackRoot(h){O=h},get fallbackFormat(){return S},set fallbackFormat(h){S=h,b.fallbackFormat=S},get warnHtmlMessage(){return k},set warnHtmlMessage(h){k=h,b.warnHtmlMessage=h},get escapeParameter(){return N},set escapeParameter(h){N=h,b.escapeParameter=h},t:et,getLocaleMessage:Re,setLocaleMessage:ot,mergeLocaleMessage:_n,getPostTranslationHandler:en,setPostTranslationHandler:tn,getMissingHandler:nn,setMissingHandler:on,[uo]:fn};return F.datetimeFormats=We,F.numberFormats=Zt,F.rt=an,F.te=pn,F.tm=nt,F.d=ln,F.n=sn,F.getDateTimeFormat=c,F.setDateTimeFormat=m,F.mergeDateTimeFormat=y,F.getNumberFormat=w,F.setNumberFormat=j,F.mergeNumberFormat=X,F[mo]=o,F[Pt]=Et,F[Ut]=dn,F[Mt]=mn,process.env.NODE_ENV!=="production"&&(F[Oe]=h=>{b.__v_emitter=h},F[Xe]=()=>{b.__v_emitter=void 0}),F}const No="vue-i18n: composer properties",vt={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},Fl={"vue-i18n-resource-inspector":"Search for scopes ..."},Bl={"vue-i18n-timeline":16764185};let qt;async function $l(e,t){return new Promise((o,r)=>{try{wl({id:"vue-devtools-plugin-vue-i18n",label:vt["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[No],app:e},a=>{qt=a,a.on.visitComponentTree(({componentInstance:s,treeNode:i})=>{vl(s,i,t)}),a.on.inspectComponent(({componentInstance:s,instanceData:i})=>{s.vnode.el&&s.vnode.el.__VUE_I18N__&&i&&(t.mode==="legacy"?s.vnode.el.__VUE_I18N__!==t.global.__composer&&ko(i,s.vnode.el.__VUE_I18N__):ko(i,s.vnode.el.__VUE_I18N__))}),a.addInspector({id:"vue-i18n-resource-inspector",label:vt["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:Fl["vue-i18n-resource-inspector"]}),a.on.getInspectorTree(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&Yl(s,t)});const l=new Map;a.on.getInspectorState(async s=>{if(s.app===e&&s.inspectorId==="vue-i18n-resource-inspector")if(a.unhighlightElement(),jl(s,t),s.nodeId==="global"){if(!l.has(s.app)){const[i]=await a.getComponentInstances(s.app);l.set(s.app,i)}a.highlightElement(l.get(s.app))}else{const i=Kl(s.nodeId,t);i&&a.highlightElement(i)}}),a.on.editInspectorState(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&zl(s,t)}),a.addTimelineLayer({id:"vue-i18n-timeline",label:vt["vue-i18n-timeline"],color:Bl["vue-i18n-timeline"]}),o(!0)})}catch(a){console.error(a),r(!1)}})}function yo(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function vl(e,t,o){const r=o.mode==="composition"?o.global:o.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==r){const a={label:`i18n (${yo(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(a)}}function ko(e,t){const o=No;e.state.push({type:o,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:o,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:o,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:o,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:o,key:"messages",editable:!1,value:Wt(t.messages.value)}),e.state.push({type:o,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:o,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function Wt(e){const t={};return Object.keys(e).forEach(o=>{const r=e[o];q(r)&&"source"in r?t[o]=Gl(r):ie(r)&&r.loc&&r.loc.source?t[o]=r.loc.source:U(r)?t[o]=Wt(r):t[o]=r}),t}const ql={"<":"<",">":">",'"':""","&":"&"};function Wl(e){return e.replace(/[<>"&]/g,Hl)}function Hl(e){return ql[e]||e}function Gl(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${Wl(e.source)}")`:"(?)"}`}}}function Yl(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const o=t.mode==="composition"?t.global:t.global.__composer;for(const[r,a]of t.__instances){const l=t.mode==="composition"?a:a.__composer;o!==l&&e.rootNodes.push({id:l.id.toString(),label:`${yo(r)} Scope`})}}function Kl(e,t){let o=null;if(e!=="global"){for(const[r,a]of t.__instances.entries())if(a.id.toString()===e){o=r;break}}return o}function Co(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const o=Array.from(t.__instances.values()).find(r=>r.id.toString()===e);return o?t.mode==="composition"?o:o.__composer:null}}function jl(e,t){const o=Co(e.nodeId,t);return o&&(e.state=Xl(o)),null}function Xl(e){const t={},o="Locale related info",r=[{type:o,key:"locale",editable:!0,value:e.locale.value},{type:o,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:o,key:"availableLocales",editable:!1,value:e.availableLocales},{type:o,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[o]=r;const a="Locale messages info",l=[{type:a,key:"messages",editable:!1,value:Wt(e.messages.value)}];t[a]=l;{const s="Datetime formats info",i=[{type:s,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[s]=i;const u="Datetime formats info",d=[{type:u,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[u]=d}return t}function Je(e,t){if(qt){let o;t&&"groupId"in t&&(o=t.groupId,delete t.groupId),qt.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:o,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function zl(e,t){const o=Co(e.nodeId,t);if(o){const[r]=e.path;r==="locale"&&L(e.state.value)?o.locale.value=e.state.value:r==="fallbackLocale"&&(L(e.state.value)||H(e.state.value)||U(e.state.value))?o.fallbackLocale.value=e.state.value:r==="inheritLocale"&&M(e.state.value)&&(o.inheritLocale=e.state.value)}}function Jl(e){const t=L(e.locale)?e.locale:Ke,o=L(e.fallbackLocale)||H(e.fallbackLocale)||R(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=q(e.missing)?e.missing:void 0,a=M(e.silentTranslationWarn)||Me(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,l=M(e.silentFallbackWarn)||Me(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,s=M(e.fallbackRoot)?e.fallbackRoot:!0,i=!!e.formatFallbackMessages,u=R(e.modifiers)?e.modifiers:{},d=e.pluralizationRules,_=q(e.postTranslation)?e.postTranslation:void 0,E=L(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,p=!!e.escapeParameterHtml,V=M(e.sync)?e.sync:!0;let O=e.messages;if(R(e.sharedMessages)){const T=e.sharedMessages;O=Object.keys(T).reduce((b,A)=>{const P=b[A]||(b[A]={});return J(P,T[A]),b},O||{})}const{__i18n:S,__root:x,__injectWithOption:f}=e,g=e.datetimeFormats,k=e.numberFormats,N=e.flatJson;return{locale:t,fallbackLocale:o,messages:O,flatJson:N,datetimeFormats:g,numberFormats:k,missing:r,missingWarn:a,fallbackWarn:l,fallbackRoot:s,fallbackFormat:i,modifiers:u,pluralRules:d,postTranslation:_,warnHtmlMessage:E,escapeParameter:p,messageResolver:e.messageResolver,inheritLocale:V,__i18n:S,__root:x,__injectWithOption:f}}function Ht(e={}){const t=$t(Jl(e)),{__extender:o}=e,r={id:t.id,get locale(){return t.locale.value},set locale(a){t.locale.value=a},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(a){t.fallbackLocale.value=a},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(a){t.setMissingHandler(a)},get silentTranslationWarn(){return M(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(a){t.missingWarn=M(a)?!a:a},get silentFallbackWarn(){return M(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(a){t.fallbackWarn=M(a)?!a:a},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(a){t.fallbackFormat=a},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(a){t.setPostTranslationHandler(a)},get sync(){return t.inheritLocale},set sync(a){t.inheritLocale=a},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(a){t.warnHtmlMessage=a!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(a){t.escapeParameter=a},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...a){return Reflect.apply(t.t,t,[...a])},rt(...a){return Reflect.apply(t.rt,t,[...a])},tc(...a){const[l,s,i]=a,u={plural:1};let d=null,_=null;if(process.env.NODE_ENV!=="production"&&En(ft(Se.DEPRECATE_TC)),!L(l))throw ae(W.INVALID_ARGUMENT);const E=l;return L(s)?u.locale=s:K(s)?u.plural=s:H(s)?d=s:R(s)&&(_=s),L(i)?u.locale=i:H(i)?d=i:R(i)&&(_=i),Reflect.apply(t.t,t,[E,d||_||{},u])},te(a,l){return t.te(a,l)},tm(a){return t.tm(a)},getLocaleMessage(a){return t.getLocaleMessage(a)},setLocaleMessage(a,l){t.setLocaleMessage(a,l)},mergeLocaleMessage(a,l){t.mergeLocaleMessage(a,l)},d(...a){return Reflect.apply(t.d,t,[...a])},getDateTimeFormat(a){return t.getDateTimeFormat(a)},setDateTimeFormat(a,l){t.setDateTimeFormat(a,l)},mergeDateTimeFormat(a,l){t.mergeDateTimeFormat(a,l)},n(...a){return Reflect.apply(t.n,t,[...a])},getNumberFormat(a){return t.getNumberFormat(a)},setNumberFormat(a,l){t.setNumberFormat(a,l)},mergeNumberFormat(a,l){t.mergeNumberFormat(a,l)}};return r.__extender=o,process.env.NODE_ENV!=="production"&&(r.__enableEmitter=a=>{const l=t;l[Oe]&&l[Oe](a)},r.__disableEmitter=()=>{const a=t;a[Xe]&&a[Xe]()}),r}function Ql(e,t,o){return{beforeCreate(){const r=n.getCurrentInstance();if(!r)throw ae(W.UNEXPECTED_ERROR);const a=this.$options;if(a.i18n){const l=a.i18n;if(a.__i18n&&(l.__i18n=a.__i18n),l.__root=t,this===this.$root)this.$i18n=Io(e,l);else{l.__injectWithOption=!0,l.__extender=o.__vueI18nExtend,this.$i18n=Ht(l);const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}}else if(a.__i18n)if(this===this.$root)this.$i18n=Io(e,a);else{this.$i18n=Ht({__i18n:a.__i18n,__injectWithOption:!0,__extender:o.__vueI18nExtend,__root:t});const l=this.$i18n;l.__extender&&(l.__disposer=l.__extender(this.$i18n))}else this.$i18n=e;a.__i18nGlobal&&po(t,a,a),this.$t=(...l)=>this.$i18n.t(...l),this.$rt=(...l)=>this.$i18n.rt(...l),this.$tc=(...l)=>this.$i18n.tc(...l),this.$te=(l,s)=>this.$i18n.te(l,s),this.$d=(...l)=>this.$i18n.d(...l),this.$n=(...l)=>this.$i18n.n(...l),this.$tm=l=>this.$i18n.tm(l),o.__setInstance(r,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const r=this.$i18n;this.$el.__VUE_I18N__=r.__composer;const a=this.__v_emitter=yt();r.__enableEmitter&&r.__enableEmitter(a),a.on("*",Je)}},unmounted(){const r=n.getCurrentInstance();if(!r)throw ae(W.UNEXPECTED_ERROR);const a=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Je),delete this.__v_emitter),this.$i18n&&(a.__disableEmitter&&a.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,a.__disposer&&(a.__disposer(),delete a.__disposer,delete a.__extender),o.__deleteInstance(r),delete this.$i18n}}}function Io(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[uo](t.pluralizationRules||e.pluralizationRules);const o=Bt(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(o).forEach(r=>e.mergeLocaleMessage(r,o[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const Gt={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Zl({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,a)=>[...r,...a.type===n.Fragment?a.children:[a]],[]):t.reduce((o,r)=>{const a=e[r];return a&&(o[r]=a()),o},v())}function To(){return n.Fragment}const So=n.defineComponent({name:"i18n-t",props:J({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>K(e)||!isNaN(e)}},Gt),setup(e,t){const{slots:o,attrs:r}=t,a=e.i18n||Yt({useScope:e.scope,__useComponent:!0});return()=>{const l=Object.keys(o).filter(E=>E!=="_"),s=v();e.locale&&(s.locale=e.locale),e.plural!==void 0&&(s.plural=L(e.plural)?+e.plural:e.plural);const i=Zl(t,l),u=a[Pt](e.keypath,i,s),d=J(v(),r),_=L(e.tag)||U(e.tag)?e.tag:To();return n.h(_,d,u)}}});function es(e){return H(e)&&!L(e[0])}function Lo(e,t,o,r){const{slots:a,attrs:l}=t;return()=>{const s={part:!0};let i=v();e.locale&&(s.locale=e.locale),L(e.format)?s.key=e.format:U(e.format)&&(L(e.format.key)&&(s.key=e.format.key),i=Object.keys(e.format).reduce((p,V)=>o.includes(V)?J(v(),p,{[V]:e.format[V]}):p,v()));const u=r(e.value,s,i);let d=[s.key];H(u)?d=u.map((p,V)=>{const O=a[p.type],S=O?O({[p.type]:p.value,index:V,parts:u}):[p.value];return es(S)&&(S[0].key=`${p.type}-${V}`),S}):L(u)&&(d=[u]);const _=J(v(),l),E=L(e.tag)||U(e.tag)?e.tag:To();return n.h(E,_,d)}}const xo=n.defineComponent({name:"i18n-n",props:J({value:{type:Number,required:!0},format:{type:[String,Object]}},Gt),setup(e,t){const o=e.i18n||Yt({useScope:e.scope,__useComponent:!0});return Lo(e,t,no,(...r)=>o[Mt](...r))}}),Vo=n.defineComponent({name:"i18n-d",props:J({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Gt),setup(e,t){const o=e.i18n||Yt({useScope:e.scope,__useComponent:!0});return Lo(e,t,Zn,(...r)=>o[Ut](...r))}});function ts(e,t){const o=e;if(e.mode==="composition")return o.__getInstance(t)||e.global;{const r=o.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function ns(e){const t=s=>{const{instance:i,value:u}=s;if(!i||!i.$)throw ae(W.UNEXPECTED_ERROR);const d=ts(e,i.$),_=Oo(u);return[Reflect.apply(d.t,d,[...wo(_)]),d]};return{created:(s,i)=>{const[u,d]=t(i);ue&&e.global===d&&(s.__i18nWatcher=n.watch(d.locale,()=>{i.instance&&i.instance.$forceUpdate()})),s.__composer=d,s.textContent=u},unmounted:s=>{ue&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:i})=>{if(s.__composer){const u=s.__composer,d=Oo(i);s.textContent=Reflect.apply(u.t,u,[...wo(d)])}},getSSRProps:s=>{const[i]=t(s);return{textContent:i}}}}function Oo(e){if(L(e))return{path:e};if(R(e)){if(!("path"in e))throw ae(W.REQUIRED_VALUE,"path");return e}else throw ae(W.INVALID_VALUE)}function wo(e){const{path:t,locale:o,args:r,choice:a,plural:l}=e,s={},i=r||{};return L(o)&&(s.locale=o),K(a)&&(s.plural=a),K(l)&&(s.plural=l),[t,i,s]}function os(e,t,...o){const r=R(o[0])?o[0]:{};(M(r.globalInstall)?r.globalInstall:!0)&&([So.name,"I18nT"].forEach(l=>e.component(l,So)),[xo.name,"I18nN"].forEach(l=>e.component(l,xo)),[Vo.name,"I18nD"].forEach(l=>e.component(l,Vo))),e.directive("t",ns(t))}const rs=pe("global-vue-i18n");function as(e={},t){const o=__VUE_I18N_LEGACY_API__&&M(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,r=M(e.globalInjection)?e.globalInjection:!0,a=new Map,[l,s]=ls(e,o),i=pe(process.env.NODE_ENV!=="production"?"vue-i18n":"");function u(p){return a.get(p)||null}function d(p,V){a.set(p,V)}function _(p){a.delete(p)}const E={get mode(){return __VUE_I18N_LEGACY_API__&&o?"legacy":"composition"},async install(p,...V){if(process.env.NODE_ENV!=="production"&&(p.__VUE_I18N__=E),p.__VUE_I18N_SYMBOL__=i,p.provide(p.__VUE_I18N_SYMBOL__,E),R(V[0])){const x=V[0];E.__composerExtend=x.__composerExtend,E.__vueI18nExtend=x.__vueI18nExtend}let O=null;!o&&r&&(O=ps(p,E.global)),__VUE_I18N_FULL_INSTALL__&&os(p,E,...V),__VUE_I18N_LEGACY_API__&&o&&p.mixin(Ql(s,s.__composer,E));const S=p.unmount;if(p.unmount=()=>{O&&O(),E.dispose(),S()},process.env.NODE_ENV!=="production"){if(!await $l(p,E))throw ae(W.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const f=yt();if(o){const g=s;g.__enableEmitter&&g.__enableEmitter(f)}else{const g=s;g[Oe]&&g[Oe](f)}f.on("*",Je)}},get global(){return s},dispose(){l.stop()},__instances:a,__getInstance:u,__setInstance:d,__deleteInstance:_};return E}function Yt(e={}){const t=n.getCurrentInstance();if(t==null)throw ae(W.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw ae(W.NOT_INSTALLED);const o=ss(t),r=cs(o),a=fo(t),l=is(e,a);if(l==="global")return po(r,e,a),r;if(l==="parent"){let u=us(o,t,e.__useComponent);return u==null&&(process.env.NODE_ENV!=="production"&&Ee(ft(Se.NOT_FOUND_PARENT_SCOPE)),u=r),u}const s=o;let i=s.__getInstance(t);if(i==null){const u=J({},e);"__i18n"in a&&(u.__i18n=a.__i18n),r&&(u.__root=r),i=$t(u),s.__composerExtend&&(i[Ft]=s.__composerExtend(i)),ds(s,t,i),s.__setInstance(t,i)}return i}function ls(e,t,o){const r=n.effectScope(),a=__VUE_I18N_LEGACY_API__&&t?r.run(()=>Ht(e)):r.run(()=>$t(e));if(a==null)throw ae(W.UNEXPECTED_ERROR);return[r,a]}function ss(e){const t=n.inject(e.isCE?rs:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw ae(e.isCE?W.NOT_INSTALLED_WITH_PROVIDE:W.UNEXPECTED_ERROR);return t}function is(e,t){return at(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function cs(e){return e.mode==="composition"?e.global:e.global.__composer}function us(e,t,o=!1){let r=null;const a=t.root;let l=ms(t,o);for(;l!=null;){const s=e;if(e.mode==="composition")r=s.__getInstance(l);else if(__VUE_I18N_LEGACY_API__){const i=s.__getInstance(l);i!=null&&(r=i.__composer,o&&r&&!r[mo]&&(r=null))}if(r!=null||a===l)break;l=l.parent}return r}function ms(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function ds(e,t,o){let r=null;n.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&t.vnode.el){t.vnode.el.__VUE_I18N__=o,r=yt();const a=o;a[Oe]&&a[Oe](r),r.on("*",Je)}},t),n.onUnmounted(()=>{const a=o;process.env.NODE_ENV!=="production"&&t.vnode.el&&t.vnode.el.__VUE_I18N__&&(r&&r.off("*",Je),a[Xe]&&a[Xe](),delete t.vnode.el.__VUE_I18N__),e.__deleteInstance(t);const l=a[Ft];l&&(l(),delete a[Ft])},t)}const fs=["locale","fallbackLocale","availableLocales"],Do=["t","rt","d","n","tm","te"];function ps(e,t){const o=Object.create(null);return fs.forEach(a=>{const l=Object.getOwnPropertyDescriptor(t,a);if(!l)throw ae(W.UNEXPECTED_ERROR);const s=n.isRef(l.value)?{get(){return l.value.value},set(i){l.value.value=i}}:{get(){return l.get&&l.get()}};Object.defineProperty(o,a,s)}),e.config.globalProperties.$i18n=o,Do.forEach(a=>{const l=Object.getOwnPropertyDescriptor(t,a);if(!l||!l.value)throw ae(W.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${a}`,l)}),()=>{delete e.config.globalProperties.$i18n,Do.forEach(a=>{delete e.config.globalProperties[`$${a}`]})}}if(Al(),ol(Pa),rl(Qa),al(Mn),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=xe();e.__INTLIFY__=!0,Ua(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const _s={"zh-CN":{sample:{fullName:{label:"姓名",message:"请输入您的姓名",placeholder:"张三",description:"该信息将用于生成问候语"},password:{label:"账户密码",message:"请输入账户密码",description:"密码不会被保存在示例应用中"},age:{label:"年龄",message:"请输入年龄",description:"用于计算问卷分层,必填"},allowContact:{label:"是否允许联系",message:"我们可以通过邮件联系您吗?",description:"若选择是,将会收到提效工具邮件"},favoriteStack:{label:"技术栈",message:"请选择主要技术栈",description:"用于统计语言偏好"},tools:{label:"常用工具",message:"请选择常用工具",description:"可多选",choices:{git:"Git",eslint:"ESLint",vite:"Vite",vitest:"Vitest"}},bio:{label:"自我介绍",message:"请输入自我介绍",description:"可用于在 inquirer 中展示更丰富的信息"}}},"en-US":{sample:{fullName:{label:"Full Name",message:"Please enter your full name",placeholder:"John Doe",description:"This information will be used to generate greetings"},password:{label:"Account Password",message:"Please enter your account password",description:"Password will not be saved in the sample application"},age:{label:"Age",message:"Please enter your age",description:"Used for survey stratification, required"},allowContact:{label:"Allow Contact",message:"May we contact you via email?",description:"If yes, you will receive productivity tool emails"},favoriteStack:{label:"Tech Stack",message:"Please select your primary tech stack",description:"Used for language preference statistics"},tools:{label:"Common Tools",message:"Please select your common tools",description:"Multiple selections allowed",choices:{git:"Git",eslint:"ESLint",vite:"Vite",vitest:"Vitest"}},bio:{label:"Bio",message:"Please enter your bio",description:"Can be used to display richer information in inquirer"}}}},gs={"zh-CN":{playground:{title:"Inquirer 表单设计器",subtitle:"Element Plus 风格的 CLI 表单工作台",actions:{generateSample:"生成示例表单",clearForm:"清空表单",copySchema:"复制 Schema JSON",copyInquirer:"复制 Inquirer JSON"},tabs:{designer:{label:"可视化设计器",desc:"拖拽控件,构建 Schema"},runtime:{label:"Web端预览",desc:"运行态在线预览"},export:{label:"Inquirer示例",desc:"生成 Inquirer prompt 以及调用示例"}},runtime:{formDataTitle:"FormData(实时)"},export:{copyButton:"复制 JSON",exampleTitle:"调用示例"},messages:{copied:"已复制到剪贴板"}}},"en-US":{playground:{title:"Inquirer Form Designer",subtitle:"Element Plus styled CLI form workbench",actions:{generateSample:"Generate Sample",clearForm:"Clear Form",copySchema:"Copy Schema JSON",copyInquirer:"Copy Inquirer JSON"},tabs:{designer:{label:"Visual Designer",desc:"Drag controls, build Schema"},runtime:{label:"Web Preview",desc:"Runtime online preview"},export:{label:"Inquirer Example",desc:"Generate Inquirer prompt and usage example"}},runtime:{formDataTitle:"FormData (Live)"},export:{copyButton:"Copy JSON",exampleTitle:"Usage Example"},messages:{copied:"Copied to clipboard"}}}},Ao={"zh-CN":{controls:{input:{label:"文本输入",message:"请输入文本",placeholder:"请输入内容"},password:{label:"密码",message:"请输入密码",placeholder:"请输入密码"},number:{label:"数字",message:"请输入数字",placeholder:"请输入数字"},confirm:{label:"确认",message:"是否确认?"},list:{label:"单选列表",message:"请选择一个选项",placeholder:"请选择",option:"选项"},rawlist:{label:"序号列表",message:"请选择一个选项",placeholder:"请选择",option:"选项"},expand:{label:"扩展列表",message:"请选择一个选项",option:"选项"},checkbox:{label:"多选框",message:"请选择选项(可多选)",option:"选项"},editor:{label:"长文本",message:"请输入长文本内容",placeholder:"请输入详细内容"}},runtime:{emptyForm:"暂无表单内容",required:"此项为必填项",invalidNumber:"请输入有效的数字",minValue:"值不能小于 {min}",maxValue:"值不能大于 {max}"}},"en-US":{controls:{input:{label:"Text Input",message:"Please enter text",placeholder:"Enter content"},password:{label:"Password",message:"Please enter password",placeholder:"Enter password"},number:{label:"Number",message:"Please enter a number",placeholder:"Enter number"},confirm:{label:"Confirm",message:"Confirm?"},list:{label:"List",message:"Please select an option",placeholder:"Select",option:"Option"},rawlist:{label:"Raw List",message:"Please select an option",placeholder:"Select",option:"Option"},expand:{label:"Expand List",message:"Please select an option",option:"Option"},checkbox:{label:"Checkbox",message:"Please select options (multiple)",option:"Option"},editor:{label:"Editor",message:"Please enter long text",placeholder:"Enter detailed content"}},runtime:{emptyForm:"No form content",required:"This field is required",invalidNumber:"Please enter a valid number",minValue:"Value cannot be less than {min}",maxValue:"Value cannot be greater than {max}"}}},Es={"zh-CN":{config:{message:"提问文案 (message)",description:"描述 / 帮助信息 (description)",placeholder:"占位提示",default_value:"默认值",prefix:"前缀",suffix:"后缀",required:"必填",expressions:{when_label:"when 表达式",when_info:"控制是否展示该问题,可使用 input、answers,返回 true/false。",validate_label:"validate 表达式",validate_info:"校验输入,返回 true 表示通过,返回字符串为错误提示。",filter_label:"filter 表达式",filter_info:"提交前对值做处理,返回值会写入 answers 并导出给 inquirer。",transformer_label:"transformer 表达式",transformer_info:"仅影响展示,返回值用于实时提示,不写入 answers。"}},editor:{placeholder:"请输入 JavaScript 函数体",show_examples:"查看示例",hide_examples:"收起示例",examples_title:"示例"}},"en-US":{config:{message:"Prompt message",description:"Description / helper text",placeholder:"Placeholder",default_value:"Default value",prefix:"Prefix",suffix:"Suffix",required:"Required",expressions:{when_label:"when expression",when_info:"Control whether this question is shown. Use input / answers and return true or false.",validate_label:"validate expression",validate_info:"Validate the input. Return true to pass or a string as the error.",filter_label:"filter expression",filter_info:"Transform the value before submit. Returned value is written to answers and exported.",transformer_label:"transformer expression",transformer_info:"Affects display only. Returned value is shown but not written to answers."}},editor:{placeholder:"Enter JavaScript function body",show_examples:"Show examples",hide_examples:"Hide examples",examples_title:"Examples"}}},Ro={},hs=["zh-CN","en-US"];for(const e of hs)Ro[e]=$.i18n.global.getLocaleMessage(e)||{};function Qe(e,t){const o={...e};for(const r in t)t[r]&&typeof t[r]=="object"&&!Array.isArray(t[r])?o[r]=Qe(e[r]||{},t[r]):o[r]=t[r];return o}const pt={},Po=["zh-CN","en-US"];for(const e of Po){let t=Ro[e]||{};t=Qe(t,_s[e]||{}),t=Qe(t,Es[e]||{}),t=Qe(t,Ao[e]||{}),t=Qe(t,gs[e]||{}),pt[e]=t}const ee=as({legacy:!1,locale:"zh-CN",fallbackLocale:"en-US",messages:pt});for(const e of Po)pt[e]&&$.i18n.global.setLocaleMessage(e,pt[e]);const Uo=ee;function Mo(){return{t:t=>{try{if(ee&&ee.global&&ee.global.t){const o=ee.global.t;return o(t)}}catch(o){console.warn("i18n not ready:",o)}return t}}}const bs={class:"expression-editor"},Ns={class:"expression-editor__label"},ys={key:0,class:"expression-editor__examples"},ks={class:"examples-title"},Cs={class:"examples-list"},Is={class:"expression-editor__footer"},_t=te(n.defineComponent({__name:"ExpressionEditor",props:{label:{},modelValue:{},hint:{},info:{},placeholder:{},minRows:{default:6},maxRows:{default:10},suggestions:{default:()=>[]}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,r=t,{t:a}=Mo(),l=["return input;",'return input?.trim() ?? "";',"return input ? input.toUpperCase() : input;","return answers.otherField;"],s=n.computed(()=>o.placeholder||a("editor.placeholder")),i=n.computed(()=>a("editor.show_examples")),u=n.computed(()=>a("editor.hide_examples")),d=n.computed(()=>a("editor.examples_title")),_=n.computed(()=>o.suggestions&&o.suggestions.length>0?o.suggestions:l),E=n.ref(!1);function p(){E.value=!E.value}return(V,O)=>(n.openBlock(),n.createElementBlock("div",bs,[n.createElementVNode("label",Ns,[n.createElementVNode("span",null,n.toDisplayString(e.label),1),e.info?(n.openBlock(),n.createBlock(n.unref(Z.ElTooltip),{key:0,placement:"top",effect:"dark",content:e.info},{default:n.withCtx(()=>[n.createVNode(n.unref(Z.ElIcon),{class:"info-icon"},{default:n.withCtx(()=>[n.createVNode(n.unref(Vr))]),_:1})]),_:1},8,["content"])):n.createCommentVNode("",!0)]),n.createVNode(n.unref(Z.ElInput),{class:"code-input",type:"textarea","model-value":e.modelValue,autosize:{minRows:e.minRows,maxRows:e.maxRows},placeholder:s.value,"onUpdate:modelValue":O[0]||(O[0]=S=>r("update:modelValue",S??""))},null,8,["model-value","autosize","placeholder"]),n.createVNode(n.Transition,{name:"fade"},{default:n.withCtx(()=>[E.value?(n.openBlock(),n.createElementBlock("div",ys,[n.createElementVNode("p",ks,n.toDisplayString(d.value),1),n.createElementVNode("ul",Cs,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value,S=>(n.openBlock(),n.createElementBlock("li",{key:S},[n.createElementVNode("code",null,n.toDisplayString(S),1)]))),128))])])):n.createCommentVNode("",!0)]),_:1}),n.createElementVNode("div",Is,[n.createElementVNode("button",{class:"example-toggle",type:"button",onClick:p},n.toDisplayString(E.value?u.value:i.value),1)])]))}}),[["__scopeId","data-v-7b2a61b5"]]),Ts={class:"inline-settings"},we=te(n.defineComponent({__name:"BaseQuestionConfig",props:{label:{},field:{},message:{},description:{},placeholder:{},defaultValue:{},prefix:{},suffix:{},required:{type:Boolean},whenExpression:{},validateExpression:{},filterExpression:{},transformerExpression:{},showPlaceholder:{type:Boolean,default:!0},showDefaultInput:{type:Boolean,default:!0}},emits:["update"],setup(e,{emit:t}){const o=["return answers.age >= 18;","return answers.role === 'admin';","return Boolean(input);"],r=[`if (!input) return '必填';
|
|
6
|
-
return true;`,`if ((input || "").length < 3) return "至少 3 个字符";
|
|
7
|
-
return true;`,'return Array.isArray(input) && input.length > 0 ? true : "请选择至少一项";'],a=['return input?.trim() ?? "";',"return Number(input) || 0;","return input?.toLowerCase();"],l=["return input ? `⭐ ${input}` : input;",'return input ? `${input} (${answers.unit || ""})` : input;',"return input ? input.toUpperCase() : input;"],{t:s}=Mo(),i=t;function u(d){i("update",{props:{message:d,label:d}})}return(d,_)=>(n.openBlock(),n.createBlock(dr,{label:e.label,field:e.field,onUpdate:_[0]||(_[0]=E=>i("update",E))},{default:n.withCtx(({updateProp:E})=>[n.createVNode(n.unref($.TextSetting),{label:n.unref(s)("config.message"),"model-value":e.message,"onUpdate:modelValue":u},null,8,["label","model-value"]),n.createVNode(_r,{label:n.unref(s)("config.description"),"model-value":e.description,"min-rows":2,"max-rows":3,"onUpdate:modelValue":p=>E("description",p)},null,8,["label","model-value","onUpdate:modelValue"]),e.showPlaceholder?(n.openBlock(),n.createBlock(n.unref($.TextSetting),{key:0,label:n.unref(s)("config.placeholder"),"model-value":e.placeholder,"onUpdate:modelValue":p=>E("placeholder",p)},null,8,["label","model-value","onUpdate:modelValue"])):n.createCommentVNode("",!0),n.renderSlot(d.$slots,"defaultValue",{updateProp:E},()=>[e.showDefaultInput?(n.openBlock(),n.createBlock(n.unref($.TextSetting),{key:0,label:n.unref(s)("config.default_value"),"model-value":e.defaultValue,"onUpdate:modelValue":p=>E("defaultValue",p)},null,8,["label","model-value","onUpdate:modelValue"])):n.createCommentVNode("",!0)],!0),n.createElementVNode("div",Ts,[n.createVNode(n.unref($.TextSetting),{label:n.unref(s)("config.prefix"),"model-value":e.prefix,"onUpdate:modelValue":p=>E("prefix",p)},null,8,["label","model-value","onUpdate:modelValue"]),n.createVNode(n.unref($.TextSetting),{label:n.unref(s)("config.suffix"),"model-value":e.suffix,"onUpdate:modelValue":p=>E("suffix",p)},null,8,["label","model-value","onUpdate:modelValue"])]),n.createVNode(n.unref($.SwitchSetting),{label:n.unref(s)("config.required"),"model-value":e.required,"onUpdate:modelValue":p=>E("required",p)},null,8,["label","model-value","onUpdate:modelValue"]),n.renderSlot(d.$slots,"extra",{updateProp:E},void 0,!0),n.createVNode(_t,{label:n.unref(s)("config.expressions.when_label"),info:n.unref(s)("config.expressions.when_info"),"model-value":e.whenExpression,"min-rows":2,"max-rows":3,placeholder:n.unref(s)("editor.placeholder"),suggestions:o,"onUpdate:modelValue":p=>E("whenExpression",p)},null,8,["label","info","model-value","placeholder","onUpdate:modelValue"]),n.createVNode(_t,{label:n.unref(s)("config.expressions.validate_label"),info:n.unref(s)("config.expressions.validate_info"),"model-value":e.validateExpression,"min-rows":3,"max-rows":5,placeholder:n.unref(s)("editor.placeholder"),suggestions:r,"onUpdate:modelValue":p=>E("validateExpression",p)},null,8,["label","info","model-value","placeholder","onUpdate:modelValue"]),n.createVNode(_t,{label:n.unref(s)("config.expressions.filter_label"),info:n.unref(s)("config.expressions.filter_info"),"model-value":e.filterExpression,"min-rows":2,"max-rows":4,placeholder:n.unref(s)("editor.placeholder"),suggestions:a,"onUpdate:modelValue":p=>E("filterExpression",p)},null,8,["label","info","model-value","placeholder","onUpdate:modelValue"]),n.createVNode(_t,{label:n.unref(s)("config.expressions.transformer_label"),info:n.unref(s)("config.expressions.transformer_info"),"model-value":e.transformerExpression,"min-rows":2,"max-rows":4,placeholder:n.unref(s)("editor.placeholder"),suggestions:l,"onUpdate:modelValue":p=>E("transformerExpression",p)},null,8,["label","info","model-value","placeholder","onUpdate:modelValue"])]),_:3},8,["label","field"]))}}),[["__scopeId","data-v-43dc3bfd"]]),Ss=n.defineComponent({__name:"config",props:{label:{},field:{},message:{},placeholder:{},defaultValue:{},prefix:{},suffix:{},required:{type:Boolean},whenExpression:{},validateExpression:{},filterExpression:{},transformerExpression:{}},emits:["update"],setup(e,{emit:t}){const o=e,r=t;return(a,l)=>(n.openBlock(),n.createBlock(we,n.mergeProps(o,{onUpdate:l[0]||(l[0]=s=>r("update",s))}),null,16))}});function Ne(e){return`${e}_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function de(e,t){return{label:e,value:t??e}}const ye={input:Cr,password:Ar,number:yr,confirm:Er,list:wr,rawList:Mr,expand:Tr,checkbox:Lr,editor:Pr};function Ls(){if(typeof window<"u"){const e=document.documentElement,t=e.getAttribute("lang")||e.lang;if(t==="en-US"||t==="en")return"en-US"}return"zh-CN"}function xs(e){const t=Ls(),o=e.split(".");let r=Ao[t];for(const a of o)if(r&&typeof r=="object")r=r[a];else return e;return typeof r=="string"?r:e}function oe(e,t){return xs(e)}const Fo={type:"inq-input",category:"inputControl",label:"输入",icon:ye.input,isContainer:!1,initialSchema:()=>{const e=oe("controls.input.message");return{id:Ne("inq_input"),type:"inq-input",field:"question_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"input",placeholder:oe("controls.input.placeholder"),defaultValue:"",prefix:"",suffix:"",required:!0,whenExpression:"",validateExpression:"",filterExpression:"",transformerExpression:""}}},designer:sr,runtime:ur,config:Ss,locales:{"zh-CN":{control:{"inq-input":{label:"输入"}}},"en-US":{control:{"inq-input":{label:"Input"}}}}},Vs=n.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const o=e,r=t,{label:a,message:l,description:s,isActive:i}=n.toRefs(o);return(u,d)=>(n.openBlock(),n.createBlock(ge,{label:n.unref(a),message:n.unref(l),description:n.unref(s),"type-label":"Inquirer Password","is-active":n.unref(i),onSelect:d[0]||(d[0]=_=>r("select"))},null,8,["label","message","description","is-active"]))}}),Os={class:"inquirer-password"},ws={key:0,class:"mask-hint"},Ds=te(n.defineComponent({__name:"runtime",props:{modelValue:{},placeholder:{},disabled:{type:Boolean},prefix:{},suffix:{},maskEnabled:{type:Boolean},maskSymbol:{}},emits:["update:modelValue"],setup(e,{emit:t}){const o=t;return(r,a)=>(n.openBlock(),n.createElementBlock("div",Os,[n.createVNode(n.unref(Z.ElInput),{"model-value":e.modelValue??"",placeholder:e.placeholder,disabled:e.disabled,type:"password","show-password":"","onUpdate:modelValue":a[0]||(a[0]=l=>o("update:modelValue",l??""))},n.createSlots({_:2},[e.prefix?{name:"prepend",fn:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.prefix),1)]),key:"0"}:void 0,e.suffix?{name:"append",fn:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.suffix),1)]),key:"1"}:void 0]),1032,["model-value","placeholder","disabled"]),e.maskEnabled?(n.openBlock(),n.createElementBlock("p",ws," 输出将使用 "+n.toDisplayString(e.maskSymbol||"掩码")+" 掩码 ",1)):n.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-027f448e"]]),As=n.defineComponent({__name:"config",props:{label:{},field:{},message:{},placeholder:{},defaultValue:{},prefix:{},suffix:{},required:{type:Boolean},whenExpression:{},validateExpression:{},filterExpression:{},transformerExpression:{},maskEnabled:{type:Boolean},maskSymbol:{}},emits:["update"],setup(e,{emit:t}){const o=e,r=t;return(a,l)=>(n.openBlock(),n.createBlock(we,n.mergeProps(o,{onUpdate:l[0]||(l[0]=s=>r("update",s))}),{extra:n.withCtx(({updateProp:s})=>[n.createVNode(n.unref($.SwitchSetting),{label:"掩码输出","model-value":e.maskEnabled,"onUpdate:modelValue":i=>s("maskEnabled",i)},null,8,["model-value","onUpdate:modelValue"]),e.maskEnabled?(n.openBlock(),n.createBlock(n.unref($.TextSetting),{key:0,label:"掩码符号","model-value":e.maskSymbol,"onUpdate:modelValue":i=>s("maskSymbol",i)},null,8,["model-value","onUpdate:modelValue"])):n.createCommentVNode("",!0)]),_:1},16))}}),Bo={type:"inq-password",category:"inputControl",label:"密码",icon:ye.password,isContainer:!1,initialSchema:()=>{const e=oe("controls.password.message");return{id:Ne("inq_password"),type:"inq-password",field:"secret_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"password",placeholder:oe("controls.password.placeholder"),defaultValue:"",prefix:"",suffix:"",maskEnabled:!0,maskSymbol:"*",required:!0,whenExpression:"",validateExpression:"",filterExpression:"",transformerExpression:""}}},designer:Vs,runtime:Ds,config:As,locales:{"zh-CN":{control:{"inq-password":{label:"密码"}}},"en-US":{control:{"inq-password":{label:"Password"}}}}},Rs=n.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const o=e,r=t,{label:a,message:l,description:s,isActive:i}=n.toRefs(o);return(u,d)=>(n.openBlock(),n.createBlock(ge,{label:n.unref(a),message:n.unref(l),description:n.unref(s),"type-label":"Inquirer Number","is-active":n.unref(i),onSelect:d[0]||(d[0]=_=>r("select"))},null,8,["label","message","description","is-active"]))}}),Ps={class:"number-runtime"},Us={key:0,class:"affix"},Ms={key:1,class:"affix"},Fs=te(n.defineComponent({__name:"runtime",props:{modelValue:{},placeholder:{},disabled:{type:Boolean},min:{},max:{},step:{},prefix:{},suffix:{}},emits:["update:modelValue"],setup(e,{emit:t}){const o=t;return(r,a)=>(n.openBlock(),n.createElementBlock("div",Ps,[e.prefix?(n.openBlock(),n.createElementBlock("span",Us,n.toDisplayString(e.prefix),1)):n.createCommentVNode("",!0),n.createVNode(n.unref(Z.ElInputNumber),{class:"number-runtime__input","model-value":e.modelValue,placeholder:e.placeholder,disabled:e.disabled,min:e.min,max:e.max,step:e.step||1,"controls-position":"right","onUpdate:modelValue":a[0]||(a[0]=l=>o("update:modelValue",l??void 0))},null,8,["model-value","placeholder","disabled","min","max","step"]),e.suffix?(n.openBlock(),n.createElementBlock("span",Ms,n.toDisplayString(e.suffix),1)):n.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-41430bc7"]]),Bs={class:"number-setting"},$s=n.defineComponent({__name:"NumberSetting",props:{label:{},modelValue:{},min:{default:Number.NEGATIVE_INFINITY},max:{default:Number.POSITIVE_INFINITY},step:{default:1}},emits:["update:modelValue"],setup(e,{emit:t}){const o=t;return(r,a)=>(n.openBlock(),n.createElementBlock("div",Bs,[n.createElementVNode("label",null,n.toDisplayString(e.label),1),n.createVNode(n.unref(Z.ElInputNumber),{"model-value":e.modelValue,min:e.min,max:e.max,step:e.step,"controls-position":"right","onUpdate:modelValue":a[0]||(a[0]=l=>o("update:modelValue",l??void 0))},null,8,["model-value","min","max","step"])]))}}),qe=te($s,[["__scopeId","data-v-9db53040"]]),vs=n.defineComponent({__name:"config",props:{label:{},field:{},message:{},defaultValue:{},prefix:{},suffix:{},required:{type:Boolean},whenExpression:{},validateExpression:{},filterExpression:{},transformerExpression:{},min:{},max:{},step:{}},emits:["update"],setup(e,{emit:t}){const o=e,r=t;return(a,l)=>(n.openBlock(),n.createBlock(we,n.mergeProps(o,{"show-placeholder":!1,onUpdate:l[0]||(l[0]=s=>r("update",s))}),{defaultValue:n.withCtx(({updateProp:s})=>[n.createVNode(qe,{label:"默认值","model-value":e.defaultValue,"onUpdate:modelValue":i=>s("defaultValue",i)},null,8,["model-value","onUpdate:modelValue"])]),extra:n.withCtx(({updateProp:s})=>[n.createVNode(qe,{label:"最小值","model-value":e.min,"onUpdate:modelValue":i=>s("min",i)},null,8,["model-value","onUpdate:modelValue"]),n.createVNode(qe,{label:"最大值","model-value":e.max,"onUpdate:modelValue":i=>s("max",i)},null,8,["model-value","onUpdate:modelValue"]),n.createVNode(qe,{label:"步长","model-value":e.step,min:0,step:.1,"onUpdate:modelValue":i=>s("step",i)},null,8,["model-value","onUpdate:modelValue"])]),_:1},16))}}),$o={type:"inq-number",category:"inputControl",label:"数字",icon:ye.number,isContainer:!1,initialSchema:()=>{const e=oe("controls.number.message");return{id:Ne("inq_number"),type:"inq-number",field:"amount_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"number",defaultValue:0,min:0,max:100,step:1,prefix:"",suffix:"",required:!1,whenExpression:"",validateExpression:"",filterExpression:"",transformerExpression:""}}},designer:Rs,runtime:Fs,config:vs,locales:{"zh-CN":{control:{"inq-number":{label:"数字"}}},"en-US":{control:{"inq-number":{label:"Number"}}}}},qs=n.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const o=e,r=t,{label:a,message:l,description:s,isActive:i}=n.toRefs(o);return(u,d)=>(n.openBlock(),n.createBlock(ge,{label:n.unref(a),message:n.unref(l),description:n.unref(s),"type-label":"Inquirer Confirm","is-active":n.unref(i),onSelect:d[0]||(d[0]=_=>r("select"))},null,8,["label","message","description","is-active"]))}}),Ws={class:"confirm-runtime"},Hs={key:0,class:"affix"},Gs={class:"state"},Ys={key:1,class:"affix"},Ks=te(n.defineComponent({__name:"runtime",props:{modelValue:{type:Boolean},disabled:{type:Boolean},prefix:{},suffix:{}},emits:["update:modelValue"],setup(e,{emit:t}){const o=t;function r(a){o("update:modelValue",!!a)}return(a,l)=>(n.openBlock(),n.createElementBlock("div",Ws,[e.prefix?(n.openBlock(),n.createElementBlock("span",Hs,n.toDisplayString(e.prefix),1)):n.createCommentVNode("",!0),n.createVNode(n.unref(Z.ElSwitch),{"model-value":e.modelValue??!1,disabled:e.disabled,"onUpdate:modelValue":r},null,8,["model-value","disabled"]),n.createElementVNode("span",Gs,n.toDisplayString(e.modelValue??!1?"Yes":"No"),1),e.suffix?(n.openBlock(),n.createElementBlock("span",Ys,n.toDisplayString(e.suffix),1)):n.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-220e5de9"]]),js=n.defineComponent({__name:"config",props:{label:{},field:{},message:{},defaultValue:{type:Boolean},prefix:{},suffix:{},required:{type:Boolean},whenExpression:{},validateExpression:{},filterExpression:{},transformerExpression:{}},emits:["update"],setup(e,{emit:t}){const o=e,r=t;return(a,l)=>(n.openBlock(),n.createBlock(we,n.mergeProps(o,{"show-placeholder":!1,onUpdate:l[0]||(l[0]=s=>r("update",s))}),{defaultValue:n.withCtx(({updateProp:s})=>[n.createVNode(n.unref($.SwitchSetting),{label:"默认值 (Yes/No)","model-value":e.defaultValue??!1,"onUpdate:modelValue":i=>s("defaultValue",i)},null,8,["model-value","onUpdate:modelValue"])]),_:1},16))}}),vo={type:"inq-confirm",category:"inputControl",label:"确认",icon:ye.confirm,isContainer:!1,initialSchema:()=>{const e=oe("controls.confirm.message");return{id:Ne("inq_confirm"),type:"inq-confirm",field:"confirm_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"confirm",defaultValue:!1,prefix:"",suffix:"",required:!1,whenExpression:"",validateExpression:"",filterExpression:"",transformerExpression:""}}},designer:qs,runtime:Ks,config:js,locales:{"zh-CN":{control:{"inq-confirm":{label:"确认"}}},"en-US":{control:{"inq-confirm":{label:"Confirm"}}}}},Xs=n.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean},choices:{}},emits:["select"],setup(e,{emit:t}){const o=e,r=t,{label:a,message:l,description:s,isActive:i,choices:u}=n.toRefs(o);return(d,_)=>(n.openBlock(),n.createBlock(ge,{label:n.unref(a),message:n.unref(l),description:n.unref(s),options:n.unref(u),"type-label":"Inquirer List","is-active":n.unref(i),onSelect:_[0]||(_[0]=E=>r("select"))},null,8,["label","message","description","options","is-active"]))}}),zs={class:"inquirer-list"},Js={key:0,class:"affix"},Qs={key:1,class:"affix"},Zs={key:2,class:"list-hint"},ei={key:0},ti={key:1},Kt=te(n.defineComponent({__name:"runtime",props:{modelValue:{},placeholder:{},disabled:{type:Boolean},choices:{},prefix:{},suffix:{},pageSize:{},loop:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,r=t,a=n.computed(()=>(o.choices??[]).map(l=>({label:l.label||l.value,value:l.value})));return(l,s)=>(n.openBlock(),n.createElementBlock("div",zs,[e.prefix?(n.openBlock(),n.createElementBlock("span",Js,n.toDisplayString(e.prefix),1)):n.createCommentVNode("",!0),n.createVNode(n.unref(Z.ElSelect),{class:"select-runtime","model-value":e.modelValue,placeholder:e.placeholder,disabled:e.disabled,filterable:"",clearable:"","onUpdate:modelValue":s[0]||(s[0]=i=>r("update:modelValue",i))},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,i=>(n.openBlock(),n.createBlock(n.unref(Z.ElOption),{key:i.value,label:i.label,value:i.value},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","disabled"]),e.suffix?(n.openBlock(),n.createElementBlock("span",Qs,n.toDisplayString(e.suffix),1)):n.createCommentVNode("",!0),e.loop||e.pageSize?(n.openBlock(),n.createElementBlock("p",Zs,[e.pageSize?(n.openBlock(),n.createElementBlock("span",ei,"每页 "+n.toDisplayString(e.pageSize)+" 项",1)):n.createCommentVNode("",!0),e.loop?(n.openBlock(),n.createElementBlock("span",ti," · 循环导航开启")):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-ed3b4861"]]),jt=n.defineComponent({__name:"config",props:{label:{},field:{},message:{},placeholder:{},defaultValue:{},prefix:{},suffix:{},required:{type:Boolean},whenExpression:{},validateExpression:{},filterExpression:{},transformerExpression:{},choices:{},defaultChoice:{},pageSize:{},loop:{type:Boolean}},emits:["update"],setup(e,{emit:t}){const o=e,r=t;return(a,l)=>(n.openBlock(),n.createBlock(we,n.mergeProps(o,{onUpdate:l[0]||(l[0]=s=>r("update",s))}),{extra:n.withCtx(({updateProp:s})=>[n.createVNode(n.unref($.OptionsEditor),{label:"选项","model-value":e.choices,"onUpdate:modelValue":i=>s("choices",i)},null,8,["model-value","onUpdate:modelValue"]),n.createVNode(n.unref($.TextSetting),{label:"默认选项值","model-value":e.defaultChoice,"onUpdate:modelValue":i=>s("defaultChoice",i)},null,8,["model-value","onUpdate:modelValue"]),n.createVNode(qe,{label:"pageSize","model-value":e.pageSize,min:1,"onUpdate:modelValue":i=>s("pageSize",i)},null,8,["model-value","onUpdate:modelValue"]),n.createVNode(n.unref($.SwitchSetting),{label:"循环 (loop)","model-value":e.loop,"onUpdate:modelValue":i=>s("loop",i)},null,8,["model-value","onUpdate:modelValue"])]),_:1},16))}}),qo={type:"inq-list",category:"inputControl",label:"列表",icon:ye.list,isContainer:!1,initialSchema:()=>{const e=oe("controls.list.message");return{id:Ne("inq_list"),type:"inq-list",field:"list_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"list",placeholder:oe("controls.list.placeholder"),defaultChoice:"opt_1",choices:[de(oe("controls.list.option")+" 1","opt_1"),de(oe("controls.list.option")+" 2","opt_2")],pageSize:7,loop:!0,prefix:"",suffix:"",required:!0,whenExpression:"",validateExpression:"",filterExpression:"",transformerExpression:""}}},designer:Xs,runtime:Kt,config:jt,locales:{"zh-CN":{control:{"inq-list":{label:"列表"}}},"en-US":{control:{"inq-list":{label:"List"}}}}},ni=n.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean},choices:{}},emits:["select"],setup(e,{emit:t}){const o=e,r=t,{label:a,message:l,description:s,isActive:i,choices:u}=n.toRefs(o);return(d,_)=>(n.openBlock(),n.createBlock(ge,{label:n.unref(a),message:n.unref(l),description:n.unref(s),options:n.unref(u),"type-label":"Inquirer Raw List","is-active":n.unref(i),onSelect:_[0]||(_[0]=E=>r("select"))},null,8,["label","message","description","options","is-active"]))}}),oi={type:"inq-rawlist",category:"inputControl",label:"序号列表",icon:ye.rawList,isContainer:!1,initialSchema:()=>({id:Ne("inq_rawlist"),type:"inq-rawlist",field:"rawlist_"+Math.random().toString(36).slice(2,6),props:{label:"数字选择题",message:"请输入序号选择",promptType:"rawlist",placeholder:"输入编号",defaultChoice:"opt_a",choices:[de("Alpha","opt_a"),de("Beta","opt_b"),de("Gamma","opt_c")],pageSize:5,loop:!1,prefix:"#",suffix:"",required:!0,whenExpression:"",validateExpression:"",filterExpression:"",transformerExpression:""}}),designer:ni,runtime:Kt,config:jt,locales:{"zh-CN":{control:{"inq-rawlist":{label:"序号列表"}}},"en-US":{control:{"inq-rawlist":{label:"Raw List"}}}}},ri=n.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean},choices:{}},emits:["select"],setup(e,{emit:t}){const o=e,r=t,{label:a,message:l,description:s,isActive:i,choices:u}=n.toRefs(o);return(d,_)=>(n.openBlock(),n.createBlock(ge,{label:n.unref(a),message:n.unref(l),description:n.unref(s),options:n.unref(u),"type-label":"Inquirer Expand","is-active":n.unref(i),onSelect:_[0]||(_[0]=E=>r("select"))},null,8,["label","message","description","options","is-active"]))}}),ai={type:"inq-expand",category:"inputControl",label:"扩展列表",icon:ye.expand,isContainer:!1,initialSchema:()=>({id:Ne("inq_expand"),type:"inq-expand",field:"expand_"+Math.random().toString(36).slice(2,6),props:{label:"扩展选择",message:"通过按键选择",promptType:"expand",placeholder:"按键选择",defaultChoice:"opt_1",choices:[de("继续","opt_1"),de("跳过","opt_2"),de("退出","opt_3")],pageSize:5,loop:!1,prefix:"",suffix:"",required:!1,whenExpression:"",validateExpression:"",filterExpression:"",transformerExpression:""}}),designer:ri,runtime:Kt,config:jt,locales:{"zh-CN":{control:{"inq-expand":{label:"扩展列表"}}},"en-US":{control:{"inq-expand":{label:"Expand"}}}}},li=n.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean},choices:{}},emits:["select"],setup(e,{emit:t}){const o=e,r=t,{label:a,message:l,description:s,isActive:i,choices:u}=n.toRefs(o);return(d,_)=>(n.openBlock(),n.createBlock(ge,{label:n.unref(a),message:n.unref(l),description:n.unref(s),options:n.unref(u),"type-label":"Inquirer Checkbox","is-active":n.unref(i),onSelect:_[0]||(_[0]=E=>r("select"))},null,8,["label","message","description","options","is-active"]))}}),si={class:"checkbox-wrapper"},ii={key:0,class:"affix"},ci={key:1,class:"affix"},ui=te(n.defineComponent({__name:"runtime",props:{modelValue:{},disabled:{type:Boolean},choices:{},prefix:{},suffix:{}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,r=t,a=n.computed(()=>(o.choices??[]).map(l=>({label:l.label||l.value,value:l.value})));return(l,s)=>(n.openBlock(),n.createElementBlock("div",si,[e.prefix?(n.openBlock(),n.createElementBlock("span",ii,n.toDisplayString(e.prefix),1)):n.createCommentVNode("",!0),n.createVNode(n.unref(Z.ElCheckboxGroup),{class:"checkbox-runtime","model-value":e.modelValue||[],disabled:e.disabled,"onUpdate:modelValue":s[0]||(s[0]=i=>r("update:modelValue",i))},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,i=>(n.openBlock(),n.createBlock(n.unref(Z.ElCheckbox),{key:i.value,label:i.value},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["model-value","disabled"]),e.suffix?(n.openBlock(),n.createElementBlock("span",ci,n.toDisplayString(e.suffix),1)):n.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5def473d"]]),mi={class:"multi-default"},di=te(n.defineComponent({__name:"config",props:{label:{},field:{},message:{},placeholder:{},defaultValue:{},prefix:{},suffix:{},required:{type:Boolean},whenExpression:{},validateExpression:{},filterExpression:{},transformerExpression:{},choices:{},defaultChoices:{}},emits:["update"],setup(e,{emit:t}){const o=e,r=t;return(a,l)=>(n.openBlock(),n.createBlock(we,n.mergeProps(o,{onUpdate:l[0]||(l[0]=s=>r("update",s))}),{defaultValue:n.withCtx(({updateProp:s})=>[n.createElementVNode("div",mi,[l[1]||(l[1]=n.createElementVNode("label",null,"默认选中值",-1)),n.createVNode(n.unref(Z.ElSelect),{multiple:"","collapse-tags":"","collapse-tags-tooltip":"","model-value":e.defaultChoices||[],"onUpdate:modelValue":i=>s("defaultChoices",i)},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.choices||[],i=>(n.openBlock(),n.createBlock(n.unref(Z.ElOption),{key:i.value,label:i.label,value:i.value},null,8,["label","value"]))),128))]),_:1},8,["model-value","onUpdate:modelValue"])])]),extra:n.withCtx(({updateProp:s})=>[n.createVNode(n.unref($.OptionsEditor),{label:"选项","model-value":e.choices,"onUpdate:modelValue":i=>s("choices",i)},null,8,["model-value","onUpdate:modelValue"])]),_:1},16))}}),[["__scopeId","data-v-fa680fd2"]]),Wo={type:"inq-checkbox",category:"inputControl",label:"多选",icon:ye.checkbox,isContainer:!1,initialSchema:()=>{const e=oe("controls.checkbox.message");return{id:Ne("inq_checkbox"),type:"inq-checkbox",field:"checkbox_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"checkbox",choices:[de(oe("controls.checkbox.option")+" 1","opt_1"),de(oe("controls.checkbox.option")+" 2","opt_2"),de(oe("controls.checkbox.option")+" 3","opt_3")],defaultChoices:["opt_1"],prefix:"",suffix:"",required:!1,whenExpression:"",validateExpression:"",filterExpression:"",transformerExpression:""}}},designer:li,runtime:ui,config:di,locales:{"zh-CN":{control:{"inq-checkbox":{label:"多选"}}},"en-US":{control:{"inq-checkbox":{label:"Checkbox"}}}}},fi=n.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const o=e,r=t,{label:a,message:l,description:s,isActive:i}=n.toRefs(o);return(u,d)=>(n.openBlock(),n.createBlock(ge,{label:n.unref(a),message:n.unref(l),description:n.unref(s),"type-label":"Inquirer Editor","is-active":n.unref(i),onSelect:d[0]||(d[0]=_=>r("select"))},null,8,["label","message","description","is-active"]))}}),pi={class:"editor-runtime"},_i={key:0,class:"affix"},gi={key:1,class:"affix"},Ei={key:2,class:"transformer-preview"},hi=te(n.defineComponent({__name:"runtime",props:{modelValue:{},placeholder:{},rows:{},disabled:{type:Boolean},prefix:{},suffix:{},displayValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,r=t,a=n.computed(()=>o.displayValue===void 0?!1:o.displayValue!==o.modelValue);return(l,s)=>(n.openBlock(),n.createElementBlock("div",pi,[e.prefix?(n.openBlock(),n.createElementBlock("span",_i,n.toDisplayString(e.prefix),1)):n.createCommentVNode("",!0),n.createVNode(n.unref(Z.ElInput),{type:"textarea",rows:e.rows||6,"model-value":e.modelValue??"",placeholder:e.placeholder,disabled:e.disabled,"onUpdate:modelValue":s[0]||(s[0]=i=>r("update:modelValue",i??""))},null,8,["rows","model-value","placeholder","disabled"]),e.suffix?(n.openBlock(),n.createElementBlock("span",gi,n.toDisplayString(e.suffix),1)):n.createCommentVNode("",!0),a.value?(n.openBlock(),n.createElementBlock("p",Ei,n.toDisplayString(e.displayValue),1)):n.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-768e57da"]]),bi=n.defineComponent({__name:"config",props:{label:{},field:{},message:{},placeholder:{},defaultValue:{},prefix:{},suffix:{},required:{type:Boolean},whenExpression:{},validateExpression:{},filterExpression:{},transformerExpression:{},rows:{}},emits:["update"],setup(e,{emit:t}){const o=e,r=t;return(a,l)=>(n.openBlock(),n.createBlock(we,n.mergeProps(o,{onUpdate:l[0]||(l[0]=s=>r("update",s))}),{extra:n.withCtx(({updateProp:s})=>[n.createVNode(qe,{label:"行数","model-value":e.rows,min:2,max:20,"onUpdate:modelValue":i=>s("rows",i)},null,8,["model-value","onUpdate:modelValue"])]),_:1},16))}}),Ho={type:"inq-editor",category:"inputControl",label:"长文本",icon:ye.editor,isContainer:!1,initialSchema:()=>{const e=oe("controls.editor.message");return{id:Ne("inq_editor"),type:"inq-editor",field:"editor_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"editor",placeholder:oe("controls.editor.placeholder"),rows:6,defaultValue:"",prefix:"",suffix:"",required:!1,whenExpression:"",validateExpression:"",filterExpression:"",transformerExpression:""}}},designer:fi,runtime:hi,config:bi,locales:{"zh-CN":{control:{"inq-editor":{label:"长文本"}}},"en-US":{control:{"inq-editor":{label:"Editor"}}}}},Go=[Fo,Bo,$o,vo,qo,oi,ai,Wo,Ho];function Xt(){$.registry.replaceAll(Go)}function De(e,t){const o=e.initialSchema();return{...o,...t,props:{...o.props,...t.props}}}function zt(e){const t=e||(o=>{try{if(ee&&ee.global&&ee.global.t){const r=ee.global.t;return r(o)}}catch(r){console.warn("i18n not ready:",r)}return o});return[De(Fo,{field:"fullName",props:{label:t("sample.fullName.message"),message:t("sample.fullName.message"),placeholder:t("sample.fullName.placeholder"),description:t("sample.fullName.description")}}),De(Bo,{field:"accountPassword",props:{label:t("sample.password.message"),message:t("sample.password.message"),description:t("sample.password.description")}}),De($o,{field:"age",props:{label:t("sample.age.message"),message:t("sample.age.message"),min:0,max:120,required:!0,description:t("sample.age.description")}}),De(vo,{field:"allowContact",props:{label:t("sample.allowContact.message"),message:t("sample.allowContact.message"),defaultValue:!0,description:t("sample.allowContact.description")}}),De(qo,{field:"favoriteStack",props:{label:t("sample.favoriteStack.message"),message:t("sample.favoriteStack.message"),defaultChoice:"ts",description:t("sample.favoriteStack.description")}}),De(Wo,{field:"tools",props:{label:t("sample.tools.message"),message:t("sample.tools.message"),defaultChoices:["git","eslint"],choices:[{label:t("sample.tools.choices.git"),value:"git"},{label:t("sample.tools.choices.eslint"),value:"eslint"},{label:t("sample.tools.choices.vite"),value:"vite"},{label:t("sample.tools.choices.vitest"),value:"vitest"}],description:t("sample.tools.description")}}),De(Ho,{field:"bio",props:{label:t("sample.bio.message"),message:t("sample.bio.message"),rows:5,description:t("sample.bio.description")}})]}const Yo=n.defineComponent({name:"InquirerFormDesigner",__name:"InquirerFormDesigner",props:{engine:{},seedSample:{type:Boolean,default:!1},autoRegisterControls:{type:Boolean,default:!0}},setup(e){const t=e,o=new $.SchemaEngine,r=n.computed(()=>t.engine??o);let a=null;const l=t.autoRegisterControls;return l&&(a=[...$.registry.getAll()],Xt()),t.seedSample&&r.value.getSchema().controls.length===0&&(r.value.getSchema().controls=zt()),n.onBeforeUnmount(()=>{l&&a&&$.registry.replaceAll(a)}),(s,i)=>(n.openBlock(),n.createBlock(n.unref($.FormDesigner),{engine:r.value},null,8,["engine"]))}}),Ni={"inq-input":"input","inq-password":"password","inq-number":"number","inq-confirm":"confirm","inq-list":"list","inq-rawlist":"rawlist","inq-expand":"expand","inq-checkbox":"checkbox","inq-editor":"editor"},yi=["list","rawlist","expand","checkbox"];function Ko(e){const t=e.props?.promptType;return t||(Ni[e.type]??null)}function ki(e){return yi.includes(e)}function Jt(e){const t=Ko(e);if(!t)return;const o=e.props||{};if(t==="confirm")return typeof o.defaultValue=="boolean"?o.defaultValue:!1;if(t==="checkbox")return Array.isArray(o.defaultChoices)?o.defaultChoices:Array.isArray(o.defaultValue)?o.defaultValue:[];if(t==="number"){const r=Number(o.defaultValue);return Number.isNaN(r)?void 0:r}if((t==="list"||t==="rawlist"||t==="expand")&&typeof o.defaultChoice=="string")return o.defaultChoice;if(o.defaultValue!==void 0&&o.defaultValue!==null)return o.defaultValue;if(t==="input"||t==="password"||t==="editor")return""}function gt(e,t){if(!(!e||typeof e!="string"))try{return new Function("input","answers",e)(t.input,t.answers)}catch(o){console.warn("[inquirer-demo] 表达式执行失败:",o);return}}function Ci(e,t){const o=e.props?.whenExpression;if(!o)return!0;const r=gt(o,{input:t[e.field||""],answers:t});return typeof r=="boolean"?r:!0}function Ii(e,t,o){const r=e.props?.filterExpression;if(!r)return t;const a=gt(r,{input:t,answers:o});return a===void 0?t:a}function Ti(e,t,o){const r=e.props?.transformerExpression;if(!r)return t;const a=gt(r,{input:t,answers:o});return a===void 0?t:a}function jo(e,t,o){const r=e.props?.validateExpression;if(!r&&!e.props?.required)return null;if(r){const a=gt(r,{input:t,answers:o});if(a===!0||a===void 0)return null;if(typeof a=="string")return a}else if(e.props?.required){if(t==null||t==="")return"Please input";if(Array.isArray(t)&&t.length===0)return"Please select"}return null}function Si(e,t){if(!t.field||e[t.field]!==void 0)return;const o=Jt(t);o!==void 0&&(e[t.field]=o)}function Li(e){if(typeof e.props?.description=="string"&&e.props.description.trim().length>0)return e.props.description.trim();if(typeof e.props?.message=="string"&&e.props.message.trim().length>0)return e.props.message.trim()}const xi={key:0,class:"inquirer-container"},Vi={key:0,class:"node-description"},Oi={key:1,class:"node-error"},wi=te(n.defineComponent({name:"InquirerRuntimeNode",__name:"InquirerRuntimeNode",props:{node:{},formData:{}},emits:["update"],setup(e,{emit:t}){const o=e,r=t,a=n.computed(()=>$.registry.get(o.node.type)),l=n.computed(()=>a.value?.runtime||null),s=n.computed(()=>o.formData||{}),i=n.computed(()=>{if(o.node.field)return s.value[o.node.field]}),u=n.computed(()=>Li(o.node)),d=n.ref(null),_=n.computed(()=>Ci(o.node,s.value));n.watch(_,x=>{!x&&o.node.field&&s.value[o.node.field]!==void 0&&(r("update",o.node.field,void 0),d.value=null)},{immediate:!0}),n.watch(()=>i.value,x=>{d.value=jo(o.node,x,s.value)},{immediate:!0});function E(x){if(!o.node.field)return;const f=Ii(o.node,x,s.value);r("update",o.node.field,f),d.value=jo(o.node,f,s.value)}const p=n.computed(()=>typeof o.node.props?.message=="string"&&o.node.props.message.trim()?o.node.props.message:typeof o.node.props?.label=="string"&&o.node.props.label.trim()?o.node.props.label:o.node.field||"未命名控件"),V=n.computed(()=>Ti(o.node,i.value,s.value)),O=n.computed(()=>a.value?.isContainer??!1);function S(x,f){r("update",x,f)}return(x,f)=>{const g=n.resolveComponent("InquirerRuntimeNode",!0);return _.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[O.value?(n.openBlock(),n.createElementBlock("div",xi,[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(l.value),n.normalizeProps(n.guardReactiveProps(e.node.props)),{default:n.withCtx(()=>[e.node.children&&e.node.children.length?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(e.node.children,k=>(n.openBlock(),n.createBlock(g,{key:k.id,node:k,formData:e.formData,onUpdate:S},null,8,["node","formData"]))),128)):n.createCommentVNode("",!0)]),_:1},16))])):(n.openBlock(),n.createBlock(n.unref($.FormItemWrapper),{key:1,label:p.value},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(l.value),n.mergeProps(e.node.props,{modelValue:i.value,displayValue:V.value,"onUpdate:modelValue":E}),{default:n.withCtx(()=>[e.node.children&&e.node.children.length?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(e.node.children,k=>(n.openBlock(),n.createBlock(g,{key:k.id,node:k,formData:e.formData,onUpdate:S},null,8,["node","formData"]))),128)):n.createCommentVNode("",!0)]),_:1},16,["modelValue","displayValue"])),u.value?(n.openBlock(),n.createElementBlock("p",Vi,n.toDisplayString(u.value),1)):n.createCommentVNode("",!0),d.value?(n.openBlock(),n.createElementBlock("p",Oi,n.toDisplayString(d.value),1)):n.createCommentVNode("",!0)]),_:1},8,["label"]))],64)):n.createCommentVNode("",!0)}}}),[["__scopeId","data-v-5d5107df"]]),Di={class:"inquirer-web-runtime"},Ai={key:0,class:"runtime-empty"},Qt=te(n.defineComponent({name:"InquirerFormRuntime",__name:"InquirerFormRuntime",props:{schema:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const o=d=>{try{if(ee&&ee.global&&ee.global.t){const _=ee.global.t;return _(d)}}catch(_){console.warn("i18n not ready:",_)}return d},r=e,a=t,l=n.ref({...r.modelValue||{}});n.watch(()=>r.modelValue,d=>{l.value={...d||{}}},{deep:!0}),n.watch(()=>r.schema.controls,()=>{s()},{deep:!0,immediate:!0});function s(){i(r.schema.controls),a("update:modelValue",{...l.value})}function i(d){d&&d.forEach(_=>{Si(l.value,_),_.children?.length&&i(_.children)})}function u(d,_){_===void 0?delete l.value[d]:l.value[d]=_,a("update:modelValue",{...l.value})}return(d,_)=>(n.openBlock(),n.createElementBlock("div",Di,[n.createVNode(n.unref(Z.ElForm),{class:"form-content","label-position":"top",model:l.value},{default:n.withCtx(()=>[!e.schema.controls||e.schema.controls.length===0?(n.openBlock(),n.createElementBlock("div",Ai,n.toDisplayString(o("runtime.emptyForm")),1)):(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:1},n.renderList(e.schema.controls,E=>(n.openBlock(),n.createBlock(wi,{key:E.id,node:E,formData:l.value,onUpdate:u},null,8,["node","formData"]))),128))]),_:1},8,["model"])]))}}),[["__scopeId","data-v-3cfbef7c"]]);function Xo(e,t={}){const o=[];function r(a){a&&a.forEach(l=>{const s=Ri(l,t);s&&o.push(s),l.children?.length&&r(l.children)})}return r(e.controls),o}function Ri(e,t){const o=Ko(e);if(!o||e.props?.disabled&&!t.includeDisabled)return null;const r=e.field?.trim()||e.props?.alias||e.id,a=e.props?.message?.trim()||e.props?.label||r,l=Jt(e),s={type:o,name:r,message:a,default:l,prefix:Ae(e.props?.prefix),suffix:Ae(e.props?.suffix),pageSize:Ze(e.props?.pageSize),loop:typeof e.props?.loop=="boolean"?e.props.loop:void 0,whenExpression:Ae(e.props?.whenExpression),validateExpression:Ui(e),filterExpression:Ae(e.props?.filterExpression),transformerExpression:Ae(e.props?.transformerExpression),mask:Pi(e.props),choices:Mi(o,e.props),metadata:{schemaNodeId:e.id,label:e.props?.label,placeholder:e.props?.placeholder,required:!!e.props?.required,inquirerType:o,group:e.props?.groupLabel,description:e.props?.description}};return o==="checkbox"&&(s.metadata={...s.metadata,defaultChoices:Array.isArray(e.props?.defaultChoices)?e.props.defaultChoices:void 0}),o==="number"&&(s.metadata={...s.metadata,min:Ze(e.props?.min),max:Ze(e.props?.max),step:Ze(e.props?.step)}),o==="editor"&&(s.metadata={...s.metadata,rows:Ze(e.props?.rows)}),s}function Pi(e={}){if(e.maskEnabled)return typeof e.maskSymbol=="string"&&e.maskSymbol.trim().length>0?e.maskSymbol:!0}function Ui(e){const t=Ae(e.props?.validateExpression);if(t)return t;if(e.props?.required)return"return input ? true : 'Please input'"}function Mi(e,t={}){if(!ki(e))return;const o=t.choices;return!Array.isArray(o)||o.length===0?[]:o.filter(r=>typeof r?.label=="string"&&typeof r?.value=="string").map(r=>({name:r.label,value:r.value,short:Ae(r.short)}))}function Ae(e){if(typeof e!="string")return;const t=e.trim();return t.length?t:void 0}function Ze(e){if(e==null)return;const t=Number(e);return Number.isNaN(t)?void 0:t}const Fi={class:"inquirer-demo"},Bi={class:"callout-panel"},$i={class:"callout-header"},vi={class:"callout-title"},qi={class:"callout-actions"},Wi={class:"demo-workspace"},Hi={class:"workspace-tabs"},Gi=["onClick"],Yi={class:"workspace-panel designer-panel"},Ki={class:"workspace-panel runtime-panel"},ji={class:"runtime-json"},Xi={class:"workspace-panel export-panel"},zi={class:"panel-header"},Ji={class:"json-viewer"},Qi={class:"code-snippet"},zo=te(n.defineComponent({__name:"InquirerFormPlayground",setup(e){const t=T=>{try{if(ee&&ee.global&&ee.global.t){const C=ee.global.t;return C(T)}}catch(C){console.warn("i18n not ready:",C)}return T},o=new $.SchemaEngine;o.updateInfo({title:"Inquirer Form Definition",description:""});const r=[...$.registry.getAll()];Xt(),n.onMounted(()=>{o.getSchema().controls.length||S()}),n.onBeforeUnmount(()=>{$.registry.replaceAll(r)});const a=n.ref({}),l=n.ref(0),s=n.ref(0),i=n.computed(()=>[{key:"designer",label:t("playground.tabs.designer.label"),desc:t("playground.tabs.designer.desc")},{key:"runtime",label:t("playground.tabs.runtime.label"),desc:t("playground.tabs.runtime.desc")},{key:"export",label:t("playground.tabs.export.label"),desc:t("playground.tabs.export.desc")}]),u=n.ref(i.value[0]?.key??"designer");n.watch(u,(T,C)=>{T==="runtime"&&C!=="runtime"&&d()});function d(){const T={},C=o.getSchema().controls;function b(A){A.forEach(P=>{if(P.field){const G=Jt(P);G!==void 0&&(T[P.field]=G)}P.children?.length&&b(P.children)})}C?.length&&b(C),a.value=T}const _=n.computed(()=>Xo(o.getSchema())),E=n.computed(()=>JSON.stringify(_.value,null,2)),p=n.computed(()=>JSON.stringify(a.value,null,2));function V(){l.value++,s.value++}function O(T){const C=o.getSchema().controls;C.splice(0,C.length,...T),o.selectNode(void 0),o.snapshot("update"),V()}function S(){O(zt(t))}function x(){O([]),a.value={}}async function f(T,C){try{await navigator.clipboard.writeText(T),alert(`${C} ${t("playground.messages.copied")}`)}catch(b){console.warn("clipboard failed",b)}}function g(){f($.serialize(o.getSchema()),"Schema JSON")}function k(){f(E.value,"Inquirer JSON")}const N=n.computed(()=>`import inquirer from 'inquirer'
|
|
1
|
+
(function(Z,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("agilebuilder-form"),require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","agilebuilder-form","vue","element-plus"],v):(Z=typeof globalThis<"u"?globalThis:Z||self,v(Z.InquirerForm={},Z.agilebuilderForm,Z.Vue,Z.elementPlus))})(this,(function(Z,v,o,ne){"use strict";const En={"zh-CN":{sample:{fullName:{label:"姓名",message:"请输入您的姓名",placeholder:"张三",description:"该信息将用于生成问候语"},password:{label:"账户密码",message:"请输入账户密码",description:"密码不会被保存在示例应用中"},age:{label:"年龄",message:"请输入年龄",description:"用于计算问卷分层,必填"},allowContact:{label:"是否允许联系",message:"我们可以通过邮件联系您吗?",description:"若选择是,将会收到提效工具邮件"},favoriteStack:{label:"技术栈",message:"请选择主要技术栈",description:"用于统计语言偏好"},tools:{label:"常用工具",message:"请选择常用工具",description:"可多选",choices:{git:"Git",eslint:"ESLint",vite:"Vite",vitest:"Vitest"}},bio:{label:"自我介绍",message:"请输入自我介绍",description:"可用于在 inquirer 中展示更丰富的信息"}}},"en-US":{sample:{fullName:{label:"Full Name",message:"Please enter your full name",placeholder:"John Doe",description:"This information will be used to generate greetings"},password:{label:"Account Password",message:"Please enter your account password",description:"Password will not be saved in the sample application"},age:{label:"Age",message:"Please enter your age",description:"Used for survey stratification, required"},allowContact:{label:"Allow Contact",message:"May we contact you via email?",description:"If yes, you will receive productivity tool emails"},favoriteStack:{label:"Tech Stack",message:"Please select your primary tech stack",description:"Used for language preference statistics"},tools:{label:"Common Tools",message:"Please select your common tools",description:"Multiple selections allowed",choices:{git:"Git",eslint:"ESLint",vite:"Vite",vitest:"Vitest"}},bio:{label:"Bio",message:"Please enter your bio",description:"Can be used to display richer information in inquirer"}}}},hn={"zh-CN":{playground:{title:"Inquirer 表单设计器",subtitle:"Element Plus 风格的 CLI 表单工作台",actions:{generateSample:"生成示例表单",clearForm:"清空表单",copySchema:"复制 Schema JSON",copyInquirer:"复制 Inquirer JSON"},tabs:{designer:{label:"可视化设计器",desc:"拖拽控件,构建 Schema"},runtime:{label:"Web端预览",desc:"运行态在线预览"},export:{label:"Inquirer示例",desc:"生成 Inquirer prompt 以及调用示例"}},runtime:{formDataTitle:"FormData(实时)"},export:{copyButton:"复制 JSON",exampleTitle:"调用示例"},messages:{copied:"已复制到剪贴板"}}},"en-US":{playground:{title:"Inquirer Form Designer",subtitle:"Element Plus styled CLI form workbench",actions:{generateSample:"Generate Sample",clearForm:"Clear Form",copySchema:"Copy Schema JSON",copyInquirer:"Copy Inquirer JSON"},tabs:{designer:{label:"Visual Designer",desc:"Drag controls, build Schema"},runtime:{label:"Web Preview",desc:"Runtime online preview"},export:{label:"Inquirer Example",desc:"Generate Inquirer prompt and usage example"}},runtime:{formDataTitle:"FormData (Live)"},export:{copyButton:"Copy JSON",exampleTitle:"Usage Example"},messages:{copied:"Copied to clipboard"}}}},bt={"zh-CN":{controls:{input:{label:"文本输入",message:"请输入文本",placeholder:"请输入内容"},password:{label:"密码",message:"请输入密码",placeholder:"请输入密码"},number:{label:"数字",message:"请输入数字",placeholder:"请输入数字"},confirm:{label:"确认",message:"是否确认?"},list:{label:"单选列表",message:"请选择一个选项",placeholder:"请选择",option:"选项"},rawlist:{label:"序号列表",message:"请选择一个选项",placeholder:"请选择",option:"选项"},expand:{label:"扩展列表",message:"请选择一个选项",option:"选项"},checkbox:{label:"多选框",message:"请选择选项(可多选)",option:"选项"},editor:{label:"长文本",message:"请输入长文本内容",placeholder:"请输入详细内容"}},runtime:{emptyForm:"暂无表单内容",required:"此项为必填项",invalidNumber:"请输入有效的数字",minValue:"值不能小于 {min}",maxValue:"值不能大于 {max}",unnamedControl:"未命名控件",pleaseInput:"请输入",pleaseSelect:"请选择"}},"en-US":{controls:{input:{label:"Text Input",message:"Please enter text",placeholder:"Enter content"},password:{label:"Password",message:"Please enter password",placeholder:"Enter password"},number:{label:"Number",message:"Please enter a number",placeholder:"Enter number"},confirm:{label:"Confirm",message:"Confirm?"},list:{label:"List",message:"Please select an option",placeholder:"Select",option:"Option"},rawlist:{label:"Raw List",message:"Please select an option",placeholder:"Select",option:"Option"},expand:{label:"Expand List",message:"Please select an option",option:"Option"},checkbox:{label:"Checkbox",message:"Please select options (multiple)",option:"Option"},editor:{label:"Editor",message:"Please enter long text",placeholder:"Enter detailed content"}},runtime:{emptyForm:"No form content",required:"This field is required",invalidNumber:"Please enter a valid number",minValue:"Value cannot be less than {min}",maxValue:"Value cannot be greater than {max}",unnamedControl:"Unnamed control",pleaseInput:"Please input",pleaseSelect:"Please select"}}},bn={"zh-CN":{config:{message:"提问文案 (message)",description:"描述 / 帮助信息 (description)",placeholder:"占位提示",default_value:"默认值",required:"必填",options:"选项",defaultSelected:"默认选中值",defaultOption:"默认选项值",defaultValueBoolean:"默认值 (Yes/No)",min:"最小值",max:"最大值",step:"步长",rows:"行数"},designer:{formConfig:"表单配置",controlConfig:"控件配置",formTitle:"表单标题",formDescription:"表单描述"}},"en-US":{config:{message:"Prompt message",description:"Description / helper text",placeholder:"Placeholder",default_value:"Default value",required:"Required",options:"Options",defaultSelected:"Default selected",defaultOption:"Default option",defaultValueBoolean:"Default (Yes/No)",min:"Min value",max:"Max value",step:"Step",rows:"Rows"},designer:{formConfig:"Form Config",controlConfig:"Control Config",formTitle:"Form Title",formDescription:"Form Description"}}};let Nn=!1;function Ge(e,t){const n={...e};for(const r in t)t[r]&&typeof t[r]=="object"&&!Array.isArray(t[r])?n[r]=Ge(e[r]||{},t[r]):n[r]=t[r];return n}function nr(){if(Nn)return;const e=["zh-CN","en-US"];for(const t of e){let r={...v.i18n.global.getLocaleMessage(t)||{}};r=Ge(r,En[t]||{}),r=Ge(r,bn[t]||{}),r=Ge(r,bt[t]||{}),r=Ge(r,hn[t]||{}),v.i18n.global.setLocaleMessage(t,r)}Nn=!0}nr();const or={class:"inquirer-designer-card"},rr={class:"card-header"},ar={class:"type-badge"},lr={key:0,class:"description"},sr={key:1,class:"options-preview"},ir={key:0,class:"more"},cr=o.defineComponent({inheritAttrs:!1,__name:"BaseQuestionDesigner",props:{label:{},message:{},description:{},typeLabel:{},options:{},isActive:{type:Boolean},previewCount:{}},emits:["select"],setup(e,{emit:t}){const n=e,r=t,a=o.computed(()=>n.previewCount??3),l=o.computed(()=>n.options?.slice(0,a.value)??[]),s=o.computed(()=>(n.options?.length??0)>a.value),i=o.computed(()=>n.label||n.message||n.typeLabel);return(c,d)=>(o.openBlock(),o.createBlock(o.unref(v.FormItemWrapper),{selectable:"",label:i.value,"is-active":e.isActive,onSelect:d[0]||(d[0]=p=>r("select"))},{default:o.withCtx(()=>[o.createElementVNode("div",or,[o.createElementVNode("header",rr,[o.createElementVNode("span",ar,o.toDisplayString(e.typeLabel),1)]),e.description?(o.openBlock(),o.createElementBlock("p",lr,o.toDisplayString(e.description),1)):o.createCommentVNode("",!0),l.value.length?(o.openBlock(),o.createElementBlock("ul",sr,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.value,p=>(o.openBlock(),o.createElementBlock("li",{key:p.value},o.toDisplayString(p.label||p.value),1))),128)),s.value?(o.openBlock(),o.createElementBlock("li",ir,"…")):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)])]),_:1},8,["label","is-active"]))}}),oe=(e,t)=>{const n=e.__vccOpts||e;for(const[r,a]of t)n[r]=a;return n},ge=oe(cr,[["__scopeId","data-v-d7906e84"]]),ur=o.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,r=t,{label:a,message:l,description:s,isActive:i}=o.toRefs(n);return(c,d)=>(o.openBlock(),o.createBlock(ge,{label:o.unref(a),message:o.unref(l),description:o.unref(s),"type-label":"Inquirer Input","is-active":o.unref(i),onSelect:d[0]||(d[0]=p=>r("select"))},null,8,["label","message","description","is-active"]))}}),mr={class:"inquirer-input"},dr=oe(o.defineComponent({__name:"runtime",props:{modelValue:{},placeholder:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(r,a)=>(o.openBlock(),o.createElementBlock("div",mr,[o.createVNode(o.unref(ne.ElInput),{"model-value":e.modelValue??"",placeholder:e.placeholder,disabled:e.disabled,clearable:"","onUpdate:modelValue":a[0]||(a[0]=l=>n("update:modelValue",l??""))},null,8,["model-value","placeholder","disabled"])]))}}),[["__scopeId","data-v-99d31b99"]]),fr={class:"base-input-config"},pr=oe(o.defineComponent({__name:"BaseInputConfig",props:{label:{},field:{}},emits:["update"],setup(e,{emit:t}){const n=t;function r(l){n("update",{field:l})}function a(l,s){n("update",{props:{[l]:s}})}return(l,s)=>(o.openBlock(),o.createElementBlock("div",fr,[o.createVNode(o.unref(v.TextSetting),{label:l.$t("designer.node.field_label"),modelValue:e.field,"onUpdate:modelValue":r},null,8,["label","modelValue"]),o.renderSlot(l.$slots,"default",{updateProp:a},void 0,!0)]))}}),[["__scopeId","data-v-be4e1176"]]),_r={class:"textarea-setting"},gr={key:0,class:"hint"},Er=oe(o.defineComponent({__name:"TextareaSetting",props:{label:{},modelValue:{},hint:{},minRows:{default:2},maxRows:{default:4}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(r,a)=>(o.openBlock(),o.createElementBlock("div",_r,[o.createElementVNode("label",null,o.toDisplayString(e.label),1),o.createVNode(o.unref(ne.ElInput),{type:"textarea","model-value":e.modelValue,autosize:{minRows:e.minRows,maxRows:e.maxRows},"onUpdate:modelValue":a[0]||(a[0]=l=>n("update:modelValue",l??""))},null,8,["model-value","autosize"]),e.hint?(o.openBlock(),o.createElementBlock("p",gr,o.toDisplayString(e.hint),1)):o.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-9093816f"]]);function Ee(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const yn={};function Cn(e){yn[e]||(yn[e]=!0,Ee(e))}const ue=typeof window<"u";let se,Se;if(process.env.NODE_ENV!=="production"){const e=ue&&window.performance;e&&e.mark&&e.measure&&e.clearMarks&&e.clearMeasures&&(se=t=>{e.mark(t)},Se=(t,n,r)=>{e.measure(t,n,r),e.clearMarks(n),e.clearMarks(r)})}const hr=/\{([0-9a-zA-Z]+)\}/g;function at(e,...t){return t.length===1&&F(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(hr,(n,r)=>t.hasOwnProperty(r)?t[r]:"")}const pe=(e,t=!1)=>t?Symbol.for(e):Symbol(e),br=(e,t,n)=>Nr({l:e,k:t,s:n}),Nr=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),K=e=>typeof e=="number"&&isFinite(e),yr=e=>Nt(e)==="[object Date]",Ue=e=>Nt(e)==="[object RegExp]",lt=e=>R(e)&&Object.keys(e).length===0,ee=Object.assign,Cr=Object.create,$=(e=null)=>Cr(e);let In;const Oe=()=>In||(In=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:$());function Tn(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function kn(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Ir(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(r,a,l)=>`${a}="${kn(l)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(r,a,l)=>`${a}='${kn(l)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(process.env.NODE_ENV!=="production"&&Ee("Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages."),e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(r=>{e=e.replace(r,"$1javascript:")}),e}const Tr=Object.prototype.hasOwnProperty;function me(e,t){return Tr.call(e,t)}const G=Array.isArray,q=e=>typeof e=="function",L=e=>typeof e=="string",U=e=>typeof e=="boolean",F=e=>e!==null&&typeof e=="object",kr=e=>F(e)&&q(e.then)&&q(e.catch),Ln=Object.prototype.toString,Nt=e=>Ln.call(e),R=e=>Nt(e)==="[object Object]",Lr=e=>e==null?"":G(e)||R(e)&&e.toString===Ln?JSON.stringify(e,null,2):String(e);function yt(e,t=""){return e.reduce((n,r,a)=>a===0?n+r:n+t+r,"")}const Sn=2;function Sr(e,t=0,n=e.length){const r=e.split(/\r?\n/);let a=0;const l=[];for(let s=0;s<r.length;s++)if(a+=r[s].length+1,a>=t){for(let i=s-Sn;i<=s+Sn||n>a;i++){if(i<0||i>=r.length)continue;const c=i+1;l.push(`${c}${" ".repeat(3-String(c).length)}| ${r[i]}`);const d=r[i].length;if(i===s){const p=t-(a-d)+1,y=Math.max(1,n>a?d-p:n-t);l.push(" | "+" ".repeat(p)+"^".repeat(y))}else if(i>s){if(n>a){const p=Math.max(Math.min(n-a,d),1);l.push(" | "+"^".repeat(p))}a+=d+1}}break}return l.join(`
|
|
2
|
+
`)}function Ct(){const e=new Map;return{events:e,on(n,r){const a=e.get(n);a&&a.push(r)||e.set(n,[r])},off(n,r){const a=e.get(n);a&&a.splice(a.indexOf(r)>>>0,1)},emit(n,r){(e.get(n)||[]).slice().map(a=>a(r)),(e.get("*")||[]).slice().map(a=>a(n,r))}}}const st=e=>!F(e)||G(e);function it(e,t){if(st(e)||st(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:r,des:a}=n.pop();Object.keys(r).forEach(l=>{l!=="__proto__"&&(F(r[l])&&!F(a[l])&&(a[l]=Array.isArray(r[l])?[]:$()),st(a[l])||st(r[l])?a[l]=r[l]:n.push({src:r[l],des:a[l]}))})}}function Or(e,t,n){return{line:e,column:t,offset:n}}function It(e,t,n){return{start:e,end:t}}const D={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},Vr=17,Ar={[D.EXPECTED_TOKEN]:"Expected token: '{0}'",[D.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[D.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[D.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[D.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[D.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[D.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[D.EMPTY_PLACEHOLDER]:"Empty placeholder",[D.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[D.INVALID_LINKED_FORMAT]:"Invalid linked format",[D.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[D.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[D.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[D.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[D.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[D.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function xe(e,t,n={}){const{domain:r,messages:a,args:l}=n,s=process.env.NODE_ENV!=="production"?at((a||Ar)[e]||"",...l||[]):e,i=new SyntaxError(String(s));return i.code=e,t&&(i.location=t),i.domain=r,i}function wr(e){throw e}const Dr=/<\/?[\w\s="/.':;#-\/]+>/,Pr=e=>Dr.test(e),he=" ",Rr="\r",re=`
|
|
3
|
+
`,Mr="\u2028",Fr="\u2029";function Ur(e){const t=e;let n=0,r=1,a=1,l=0;const s=E=>t[E]===Rr&&t[E+1]===re,i=E=>t[E]===re,c=E=>t[E]===Fr,d=E=>t[E]===Mr,p=E=>s(E)||i(E)||c(E)||d(E),y=()=>n,h=()=>r,V=()=>a,A=()=>l,O=E=>s(E)||c(E)||d(E)?re:t[E],S=()=>O(n),f=()=>O(n+l);function _(){return l=0,p(n)&&(r++,a=0),s(n)&&n++,n++,a++,t[n]}function C(){return s(n+l)&&l++,l++,t[n+l]}function b(){n=0,r=1,a=1,l=0}function k(E=0){l=E}function I(){const E=n+l;for(;E!==n;)_();l=0}return{index:y,line:h,column:V,peekOffset:A,charAt:O,currentChar:S,currentPeek:f,next:_,peek:C,reset:b,resetPeek:k,skipToPeek:I}}const Ie=void 0,xr=".",On="'",vr="tokenizer";function Br(e,t={}){const n=t.location!==!1,r=Ur(e),a=()=>r.index(),l=()=>Or(r.line(),r.column(),r.index()),s=l(),i=a(),c={currentType:13,offset:i,startLoc:s,endLoc:s,lastType:13,lastOffset:i,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},d=()=>c,{onError:p}=t;function y(u,m,N,...w){const J=d();if(m.column+=N,m.offset+=N,p){const z=n?It(J.startLoc,m):null,x=xe(u,z,{domain:vr,args:w});p(x)}}function h(u,m,N){u.endLoc=l(),u.currentType=m;const w={type:m};return n&&(w.loc=It(u.startLoc,u.endLoc)),N!=null&&(w.value=N),w}const V=u=>h(u,13);function A(u,m){return u.currentChar()===m?(u.next(),m):(y(D.EXPECTED_TOKEN,l(),0,m),"")}function O(u){let m="";for(;u.currentPeek()===he||u.currentPeek()===re;)m+=u.currentPeek(),u.peek();return m}function S(u){const m=O(u);return u.skipToPeek(),m}function f(u){if(u===Ie)return!1;const m=u.charCodeAt(0);return m>=97&&m<=122||m>=65&&m<=90||m===95}function _(u){if(u===Ie)return!1;const m=u.charCodeAt(0);return m>=48&&m<=57}function C(u,m){const{currentType:N}=m;if(N!==2)return!1;O(u);const w=f(u.currentPeek());return u.resetPeek(),w}function b(u,m){const{currentType:N}=m;if(N!==2)return!1;O(u);const w=u.currentPeek()==="-"?u.peek():u.currentPeek(),J=_(w);return u.resetPeek(),J}function k(u,m){const{currentType:N}=m;if(N!==2)return!1;O(u);const w=u.currentPeek()===On;return u.resetPeek(),w}function I(u,m){const{currentType:N}=m;if(N!==7)return!1;O(u);const w=u.currentPeek()===".";return u.resetPeek(),w}function E(u,m){const{currentType:N}=m;if(N!==8)return!1;O(u);const w=f(u.currentPeek());return u.resetPeek(),w}function P(u,m){const{currentType:N}=m;if(!(N===7||N===11))return!1;O(u);const w=u.currentPeek()===":";return u.resetPeek(),w}function M(u,m){const{currentType:N}=m;if(N!==9)return!1;const w=()=>{const z=u.currentPeek();return z==="{"?f(u.peek()):z==="@"||z==="|"||z===":"||z==="."||z===he||!z?!1:z===re?(u.peek(),w()):fe(u,!1)},J=w();return u.resetPeek(),J}function Y(u){O(u);const m=u.currentPeek()==="|";return u.resetPeek(),m}function fe(u,m=!0){const N=(J=!1,z="")=>{const x=u.currentPeek();return x==="{"||x==="@"||!x?J:x==="|"?!(z===he||z===re):x===he?(u.peek(),N(!0,he)):x===re?(u.peek(),N(!0,re)):!0},w=N();return m&&u.resetPeek(),w}function j(u,m){const N=u.currentChar();return N===Ie?Ie:m(N)?(u.next(),N):null}function We(u){const m=u.charCodeAt(0);return m>=97&&m<=122||m>=65&&m<=90||m>=48&&m<=57||m===95||m===36}function en(u){return j(u,We)}function tn(u){const m=u.charCodeAt(0);return m>=97&&m<=122||m>=65&&m<=90||m>=48&&m<=57||m===95||m===36||m===45}function nn(u){return j(u,tn)}function on(u){const m=u.charCodeAt(0);return m>=48&&m<=57}function rn(u){return j(u,on)}function an(u){const m=u.charCodeAt(0);return m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102}function Ce(u){return j(u,an)}function tt(u){let m="",N="";for(;m=rn(u);)N+=m;return N}function ln(u){let m="";for(;;){const N=u.currentChar();if(N==="{"||N==="}"||N==="@"||N==="|"||!N)break;if(N===he||N===re)if(fe(u))m+=N,u.next();else{if(Y(u))break;m+=N,u.next()}else m+=N,u.next()}return m}function sn(u){S(u);let m="",N="";for(;m=nn(u);)N+=m;return u.currentChar()===Ie&&y(D.UNTERMINATED_CLOSING_BRACE,l(),0),N}function cn(u){S(u);let m="";return u.currentChar()==="-"?(u.next(),m+=`-${tt(u)}`):m+=tt(u),u.currentChar()===Ie&&y(D.UNTERMINATED_CLOSING_BRACE,l(),0),m}function un(u){return u!==On&&u!==re}function er(u){S(u),A(u,"'");let m="",N="";for(;m=j(u,un);)m==="\\"?N+=mn(u):N+=m;const w=u.currentChar();return w===re||w===Ie?(y(D.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,l(),0),w===re&&(u.next(),A(u,"'")),N):(A(u,"'"),N)}function mn(u){const m=u.currentChar();switch(m){case"\\":case"'":return u.next(),`\\${m}`;case"u":return Et(u,m,4);case"U":return Et(u,m,6);default:return y(D.UNKNOWN_ESCAPE_SEQUENCE,l(),0,m),""}}function Et(u,m,N){A(u,m);let w="";for(let J=0;J<N;J++){const z=Ce(u);if(!z){y(D.INVALID_UNICODE_ESCAPE_SEQUENCE,l(),0,`\\${m}${w}${u.currentChar()}`);break}w+=z}return`\\${m}${w}`}function dn(u){return u!=="{"&&u!=="}"&&u!==he&&u!==re}function fn(u){S(u);let m="",N="";for(;m=j(u,dn);)N+=m;return N}function pn(u){let m="",N="";for(;m=en(u);)N+=m;return N}function _n(u){const m=N=>{const w=u.currentChar();return w==="{"||w==="@"||w==="|"||w==="("||w===")"||!w||w===he?N:(N+=w,u.next(),m(N))};return m("")}function nt(u){S(u);const m=A(u,"|");return S(u),m}function ot(u,m){let N=null;switch(u.currentChar()){case"{":return m.braceNest>=1&&y(D.NOT_ALLOW_NEST_PLACEHOLDER,l(),0),u.next(),N=h(m,2,"{"),S(u),m.braceNest++,N;case"}":return m.braceNest>0&&m.currentType===2&&y(D.EMPTY_PLACEHOLDER,l(),0),u.next(),N=h(m,3,"}"),m.braceNest--,m.braceNest>0&&S(u),m.inLinked&&m.braceNest===0&&(m.inLinked=!1),N;case"@":return m.braceNest>0&&y(D.UNTERMINATED_CLOSING_BRACE,l(),0),N=Re(u,m)||V(m),m.braceNest=0,N;default:{let J=!0,z=!0,x=!0;if(Y(u))return m.braceNest>0&&y(D.UNTERMINATED_CLOSING_BRACE,l(),0),N=h(m,1,nt(u)),m.braceNest=0,m.inLinked=!1,N;if(m.braceNest>0&&(m.currentType===4||m.currentType===5||m.currentType===6))return y(D.UNTERMINATED_CLOSING_BRACE,l(),0),m.braceNest=0,rt(u,m);if(J=C(u,m))return N=h(m,4,sn(u)),S(u),N;if(z=b(u,m))return N=h(m,5,cn(u)),S(u),N;if(x=k(u,m))return N=h(m,6,er(u)),S(u),N;if(!J&&!z&&!x)return N=h(m,12,fn(u)),y(D.INVALID_TOKEN_IN_PLACEHOLDER,l(),0,N.value),S(u),N;break}}return N}function Re(u,m){const{currentType:N}=m;let w=null;const J=u.currentChar();switch((N===7||N===8||N===11||N===9)&&(J===re||J===he)&&y(D.INVALID_LINKED_FORMAT,l(),0),J){case"@":return u.next(),w=h(m,7,"@"),m.inLinked=!0,w;case".":return S(u),u.next(),h(m,8,".");case":":return S(u),u.next(),h(m,9,":");default:return Y(u)?(w=h(m,1,nt(u)),m.braceNest=0,m.inLinked=!1,w):I(u,m)||P(u,m)?(S(u),Re(u,m)):E(u,m)?(S(u),h(m,11,pn(u))):M(u,m)?(S(u),J==="{"?ot(u,m)||w:h(m,10,_n(u))):(N===7&&y(D.INVALID_LINKED_FORMAT,l(),0),m.braceNest=0,m.inLinked=!1,rt(u,m))}}function rt(u,m){let N={type:13};if(m.braceNest>0)return ot(u,m)||V(m);if(m.inLinked)return Re(u,m)||V(m);switch(u.currentChar()){case"{":return ot(u,m)||V(m);case"}":return y(D.UNBALANCED_CLOSING_BRACE,l(),0),u.next(),h(m,3,"}");case"@":return Re(u,m)||V(m);default:{if(Y(u))return N=h(m,1,nt(u)),m.braceNest=0,m.inLinked=!1,N;if(fe(u))return h(m,0,ln(u));break}}return N}function gn(){const{currentType:u,offset:m,startLoc:N,endLoc:w}=c;return c.lastType=u,c.lastOffset=m,c.lastStartLoc=N,c.lastEndLoc=w,c.offset=a(),c.startLoc=l(),r.currentChar()===Ie?h(c,13):rt(r,c)}return{nextToken:gn,currentOffset:a,currentPosition:l,context:d}}const $r="parser",qr=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function Wr(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(t||n,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function Hr(e={}){const t=e.location!==!1,{onError:n}=e;function r(f,_,C,b,...k){const I=f.currentPosition();if(I.offset+=b,I.column+=b,n){const E=t?It(C,I):null,P=xe(_,E,{domain:$r,args:k});n(P)}}function a(f,_,C){const b={type:f};return t&&(b.start=_,b.end=_,b.loc={start:C,end:C}),b}function l(f,_,C,b){t&&(f.end=_,f.loc&&(f.loc.end=C))}function s(f,_){const C=f.context(),b=a(3,C.offset,C.startLoc);return b.value=_,l(b,f.currentOffset(),f.currentPosition()),b}function i(f,_){const C=f.context(),{lastOffset:b,lastStartLoc:k}=C,I=a(5,b,k);return I.index=parseInt(_,10),f.nextToken(),l(I,f.currentOffset(),f.currentPosition()),I}function c(f,_){const C=f.context(),{lastOffset:b,lastStartLoc:k}=C,I=a(4,b,k);return I.key=_,f.nextToken(),l(I,f.currentOffset(),f.currentPosition()),I}function d(f,_){const C=f.context(),{lastOffset:b,lastStartLoc:k}=C,I=a(9,b,k);return I.value=_.replace(qr,Wr),f.nextToken(),l(I,f.currentOffset(),f.currentPosition()),I}function p(f){const _=f.nextToken(),C=f.context(),{lastOffset:b,lastStartLoc:k}=C,I=a(8,b,k);return _.type!==11?(r(f,D.UNEXPECTED_EMPTY_LINKED_MODIFIER,C.lastStartLoc,0),I.value="",l(I,b,k),{nextConsumeToken:_,node:I}):(_.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,_e(_)),I.value=_.value||"",l(I,f.currentOffset(),f.currentPosition()),{node:I})}function y(f,_){const C=f.context(),b=a(7,C.offset,C.startLoc);return b.value=_,l(b,f.currentOffset(),f.currentPosition()),b}function h(f){const _=f.context(),C=a(6,_.offset,_.startLoc);let b=f.nextToken();if(b.type===8){const k=p(f);C.modifier=k.node,b=k.nextConsumeToken||f.nextToken()}switch(b.type!==9&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,_e(b)),b=f.nextToken(),b.type===2&&(b=f.nextToken()),b.type){case 10:b.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,_e(b)),C.key=y(f,b.value||"");break;case 4:b.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,_e(b)),C.key=c(f,b.value||"");break;case 5:b.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,_e(b)),C.key=i(f,b.value||"");break;case 6:b.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,_e(b)),C.key=d(f,b.value||"");break;default:{r(f,D.UNEXPECTED_EMPTY_LINKED_KEY,_.lastStartLoc,0);const k=f.context(),I=a(7,k.offset,k.startLoc);return I.value="",l(I,k.offset,k.startLoc),C.key=I,l(C,k.offset,k.startLoc),{nextConsumeToken:b,node:C}}}return l(C,f.currentOffset(),f.currentPosition()),{node:C}}function V(f){const _=f.context(),C=_.currentType===1?f.currentOffset():_.offset,b=_.currentType===1?_.endLoc:_.startLoc,k=a(2,C,b);k.items=[];let I=null;do{const M=I||f.nextToken();switch(I=null,M.type){case 0:M.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,_e(M)),k.items.push(s(f,M.value||""));break;case 5:M.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,_e(M)),k.items.push(i(f,M.value||""));break;case 4:M.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,_e(M)),k.items.push(c(f,M.value||""));break;case 6:M.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,_e(M)),k.items.push(d(f,M.value||""));break;case 7:{const Y=h(f);k.items.push(Y.node),I=Y.nextConsumeToken||null;break}}}while(_.currentType!==13&&_.currentType!==1);const E=_.currentType===1?_.lastOffset:f.currentOffset(),P=_.currentType===1?_.lastEndLoc:f.currentPosition();return l(k,E,P),k}function A(f,_,C,b){const k=f.context();let I=b.items.length===0;const E=a(1,_,C);E.cases=[],E.cases.push(b);do{const P=V(f);I||(I=P.items.length===0),E.cases.push(P)}while(k.currentType!==13);return I&&r(f,D.MUST_HAVE_MESSAGES_IN_PLURAL,C,0),l(E,f.currentOffset(),f.currentPosition()),E}function O(f){const _=f.context(),{offset:C,startLoc:b}=_,k=V(f);return _.currentType===13?k:A(f,C,b,k)}function S(f){const _=Br(f,ee({},e)),C=_.context(),b=a(0,C.offset,C.startLoc);return t&&b.loc&&(b.loc.source=f),b.body=O(_),e.onCacheKey&&(b.cacheKey=e.onCacheKey(f)),C.currentType!==13&&r(_,D.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,f[C.offset]||""),l(b,_.currentOffset(),_.currentPosition()),b}return{parse:S}}function _e(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function Gr(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:l=>(n.helpers.add(l),l)}}function Vn(e,t){for(let n=0;n<e.length;n++)Tt(e[n],t)}function Tt(e,t){switch(e.type){case 1:Vn(e.cases,t),t.helper("plural");break;case 2:Vn(e.items,t);break;case 6:{Tt(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function Yr(e,t={}){const n=Gr(e);n.helper("normalize"),e.body&&Tt(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function jr(e){const t=e.body;return t.type===2?An(t):t.cases.forEach(n=>An(n)),e}function An(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const r=e.items[n];if(!(r.type===3||r.type===9)||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=yt(t);for(let n=0;n<e.items.length;n++){const r=e.items[n];(r.type===3||r.type===9)&&delete r.value}}}}const Kr="minifier";function ve(e){switch(e.t=e.type,e.type){case 0:{const t=e;ve(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let r=0;r<n.length;r++)ve(n[r]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let r=0;r<n.length;r++)ve(n[r]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;ve(t.key),t.k=t.key,delete t.key,t.modifier&&(ve(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}default:if(process.env.NODE_ENV!=="production")throw xe(D.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:Kr,args:[e.type]})}delete e.type}const Xr="parser";function Jr(e,t){const{filename:n,breakLineCode:r,needIndent:a}=t,l=t.location!==!1,s={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:a,indentLevel:0};l&&e.loc&&(s.source=e.loc.source);const i=()=>s;function c(O,S){s.code+=O}function d(O,S=!0){const f=S?r:"";c(a?f+" ".repeat(O):f)}function p(O=!0){const S=++s.indentLevel;O&&d(S)}function y(O=!0){const S=--s.indentLevel;O&&d(S)}function h(){d(s.indentLevel)}return{context:i,push:c,indent:p,deindent:y,newline:h,helper:O=>`_${O}`,needIndent:()=>s.needIndent}}function zr(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Be(e,t.key),t.modifier?(e.push(", "),Be(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function Qr(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const a=t.items.length;for(let l=0;l<a&&(Be(e,t.items[l]),l!==a-1);l++)e.push(", ");e.deindent(r()),e.push("])")}function Zr(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const a=t.cases.length;for(let l=0;l<a&&(Be(e,t.cases[l]),l!==a-1);l++)e.push(", ");e.deindent(r()),e.push("])")}}function ea(e,t){t.body?Be(e,t.body):e.push("null")}function Be(e,t){const{helper:n}=e;switch(t.type){case 0:ea(e,t);break;case 1:Zr(e,t);break;case 2:Qr(e,t);break;case 6:zr(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:if(process.env.NODE_ENV!=="production")throw xe(D.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:Xr,args:[t.type]})}}const ta=(e,t={})=>{const n=L(t.mode)?t.mode:"normal",r=L(t.filename)?t.filename:"message.intl";t.sourceMap;const a=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":`
|
|
4
|
+
`,l=t.needIndent?t.needIndent:n!=="arrow",s=e.helpers||[],i=Jr(e,{filename:r,breakLineCode:a,needIndent:l});i.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),i.indent(l),s.length>0&&(i.push(`const { ${yt(s.map(p=>`${p}: _${p}`),", ")} } = ctx`),i.newline()),i.push("return "),Be(i,e),i.deindent(l),i.push("}"),delete e.helpers;const{code:c,map:d}=i.context();return{ast:e,code:c,map:d?d.toJSON():void 0}};function na(e,t={}){const n=ee({},t),r=!!n.jit,a=!!n.minify,l=n.optimize==null?!0:n.optimize,i=Hr(n).parse(e);return r?(l&&jr(i),a&&ve(i),{ast:i,code:""}):(Yr(i,n),ta(i,n))}function oa(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Oe().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Oe().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function ie(e){return F(e)&&kt(e)===0&&(me(e,"b")||me(e,"body"))}const wn=["b","body"];function ra(e){return Te(e,wn)}const Dn=["c","cases"];function aa(e){return Te(e,Dn,[])}const Pn=["s","static"];function la(e){return Te(e,Pn)}const Rn=["i","items"];function sa(e){return Te(e,Rn,[])}const Mn=["t","type"];function kt(e){return Te(e,Mn)}const Fn=["v","value"];function ct(e,t){const n=Te(e,Fn);if(n!=null)return n;throw Ye(t)}const Un=["m","modifier"];function ia(e){return Te(e,Un)}const xn=["k","key"];function ca(e){const t=Te(e,xn);if(t)return t;throw Ye(6)}function Te(e,t,n){for(let r=0;r<t.length;r++){const a=t[r];if(me(e,a)&&e[a]!=null)return e[a]}return n}const vn=[...wn,...Dn,...Pn,...Rn,...xn,...Un,...Fn,...Mn];function Ye(e){return new Error(`unhandled node type: ${e}`)}function Lt(e){return n=>ua(n,e)}function ua(e,t){const n=ra(t);if(n==null)throw Ye(0);if(kt(n)===1){const l=aa(n);return e.plural(l.reduce((s,i)=>[...s,Bn(e,i)],[]))}else return Bn(e,n)}function Bn(e,t){const n=la(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const r=sa(t).reduce((a,l)=>[...a,St(e,l)],[]);return e.normalize(r)}}function St(e,t){const n=kt(t);switch(n){case 3:return ct(t,n);case 9:return ct(t,n);case 4:{const r=t;if(me(r,"k")&&r.k)return e.interpolate(e.named(r.k));if(me(r,"key")&&r.key)return e.interpolate(e.named(r.key));throw Ye(n)}case 5:{const r=t;if(me(r,"i")&&K(r.i))return e.interpolate(e.list(r.i));if(me(r,"index")&&K(r.index))return e.interpolate(e.list(r.index));throw Ye(n)}case 6:{const r=t,a=ia(r),l=ca(r);return e.linked(St(e,l),a?St(e,a):void 0,e.type)}case 7:return ct(t,n);case 8:return ct(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const ma="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function da(e,t){t&&Pr(e)&&Ee(at(ma,{source:e}))}const fa=e=>e;let ut=$();function pa(e,t={}){let n=!1;const r=t.onError||wr;return t.onError=a=>{n=!0,r(a)},{...na(e,t),detectError:n}}function _a(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&L(e)){const n=U(t.warnHtmlMessage)?t.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&da(e,n);const a=(t.onCacheKey||fa)(e),l=ut[a];if(l)return l;const{ast:s,detectError:i}=pa(e,{...t,location:process.env.NODE_ENV!=="production",jit:!0}),c=Lt(s);return i?c:ut[a]=c}else{if(process.env.NODE_ENV!=="production"&&!ie(e))return Ee(`the message that is resolve with key '${t.key}' is not supported for jit compilation`),(()=>e);const n=e.cacheKey;if(n){const r=ut[n];return r||(ut[n]=Lt(e))}else return Lt(e)}}let je=null;function ga(e){je=e}function Ea(e,t,n){je&&je.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const ha=ba("function:translate");function ba(e){return t=>je&&je.emit(e,t)}const te={INVALID_ARGUMENT:Vr,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},Na=24;function be(e){return xe(e,null,process.env.NODE_ENV!=="production"?{messages:ya}:void 0)}const ya={[te.INVALID_ARGUMENT]:"Invalid arguments",[te.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[te.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[te.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[te.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[te.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[te.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function Ot(e,t){return t.locale!=null?$n(t.locale):$n(e.locale)}let Vt;function $n(e){if(L(e))return e;if(q(e)){if(e.resolvedOnce&&Vt!=null)return Vt;if(e.constructor.name==="Function"){const t=e();if(kr(t))throw be(te.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Vt=t}else throw be(te.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw be(te.NOT_SUPPORT_LOCALE_TYPE)}function Ca(e,t,n){return[...new Set([n,...G(t)?t:F(t)?Object.keys(t):L(t)?[t]:[n]])]}function qn(e,t,n){const r=L(n)?n:Ke,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let l=a.__localeChainCache.get(r);if(!l){l=[];let s=[n];for(;G(s);)s=Wn(l,s,t);const i=G(t)||!R(t)?t:t.default?t.default:null;s=L(i)?[i]:i,G(s)&&Wn(l,s,!1),a.__localeChainCache.set(r,l)}return l}function Wn(e,t,n){let r=!0;for(let a=0;a<t.length&&U(r);a++){const l=t[a];L(l)&&(r=Ia(e,t[a],n))}return r}function Ia(e,t,n){let r;const a=t.split("-");do{const l=a.join("-");r=Ta(e,l,n),a.splice(-1,1)}while(a.length&&r===!0);return r}function Ta(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!=="!";const a=t.replace(/!/g,"");e.push(a),(G(n)||R(n))&&n[a]&&(r=n[a])}return r}const ke=[];ke[0]={w:[0],i:[3,0],"[":[4],o:[7]},ke[1]={w:[1],".":[2],"[":[4],o:[7]},ke[2]={w:[2],i:[3,0],0:[3,0]},ke[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},ke[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},ke[5]={"'":[4,0],o:8,l:[5,0]},ke[6]={'"':[4,0],o:8,l:[6,0]};const ka=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function La(e){return ka.test(e)}function Sa(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function Oa(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function Va(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:La(t)?Sa(t):"*"+t}function Aa(e){const t=[];let n=-1,r=0,a=0,l,s,i,c,d,p,y;const h=[];h[0]=()=>{s===void 0?s=i:s+=i},h[1]=()=>{s!==void 0&&(t.push(s),s=void 0)},h[2]=()=>{h[0](),a++},h[3]=()=>{if(a>0)a--,r=4,h[0]();else{if(a=0,s===void 0||(s=Va(s),s===!1))return!1;h[1]()}};function V(){const A=e[n+1];if(r===5&&A==="'"||r===6&&A==='"')return n++,i="\\"+A,h[0](),!0}for(;r!==null;)if(n++,l=e[n],!(l==="\\"&&V())){if(c=Oa(l),y=ke[r],d=y[c]||y.l||8,d===8||(r=d[0],d[1]!==void 0&&(p=h[d[1]],p&&(i=l,p()===!1))))return;if(r===7)return t}}const Hn=new Map;function wa(e,t){return F(e)?e[t]:null}function Da(e,t){if(!F(e))return null;let n=Hn.get(t);if(n||(n=Aa(t),n&&Hn.set(t,n)),!n)return null;const r=n.length;let a=e,l=0;for(;l<r;){const s=n[l];if(vn.includes(s)&&ie(a))return null;const i=a[s];if(i===void 0||q(a))return null;a=i,l++}return a}const le={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},Pa=8,Ra={[le.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[le.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[le.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[le.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[le.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[le.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[le.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function Ve(e,...t){return at(Ra[e],...t)}const Ma="10.0.8",mt=-1,Ke="en-US",dt="",Gn=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Fa(){return{upper:(e,t)=>t==="text"&&L(e)?e.toUpperCase():t==="vnode"&&F(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&L(e)?e.toLowerCase():t==="vnode"&&F(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&L(e)?Gn(e):t==="vnode"&&F(e)&&"__v_isVNode"in e?Gn(e.children):e}}let Yn;function Ua(e){Yn=e}let jn;function xa(e){jn=e}let Kn;function va(e){Kn=e}let Xn=null;const Ba=e=>{Xn=e},$a=()=>Xn;let Jn=null;const zn=e=>{Jn=e},qa=()=>Jn;let Qn=0;function Wa(e={}){const t=q(e.onWarn)?e.onWarn:Ee,n=L(e.version)?e.version:Ma,r=L(e.locale)||q(e.locale)?e.locale:Ke,a=q(r)?Ke:r,l=G(e.fallbackLocale)||R(e.fallbackLocale)||L(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a,s=R(e.messages)?e.messages:At(a),i=R(e.datetimeFormats)?e.datetimeFormats:At(a),c=R(e.numberFormats)?e.numberFormats:At(a),d=ee($(),e.modifiers,Fa()),p=e.pluralRules||$(),y=q(e.missing)?e.missing:null,h=U(e.missingWarn)||Ue(e.missingWarn)?e.missingWarn:!0,V=U(e.fallbackWarn)||Ue(e.fallbackWarn)?e.fallbackWarn:!0,A=!!e.fallbackFormat,O=!!e.unresolving,S=q(e.postTranslation)?e.postTranslation:null,f=R(e.processor)?e.processor:null,_=U(e.warnHtmlMessage)?e.warnHtmlMessage:!0,C=!!e.escapeParameter,b=q(e.messageCompiler)?e.messageCompiler:Yn;process.env.NODE_ENV!=="production"&&q(e.messageCompiler)&&Cn(Ve(le.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const k=q(e.messageResolver)?e.messageResolver:jn||wa,I=q(e.localeFallbacker)?e.localeFallbacker:Kn||Ca,E=F(e.fallbackContext)?e.fallbackContext:void 0,P=e,M=F(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,Y=F(P.__numberFormatters)?P.__numberFormatters:new Map,fe=F(P.__meta)?P.__meta:{};Qn++;const j={version:n,cid:Qn,locale:r,fallbackLocale:l,messages:s,modifiers:d,pluralRules:p,missing:y,missingWarn:h,fallbackWarn:V,fallbackFormat:A,unresolving:O,postTranslation:S,processor:f,warnHtmlMessage:_,escapeParameter:C,messageCompiler:b,messageResolver:k,localeFallbacker:I,fallbackContext:E,onWarn:t,__meta:fe};return j.datetimeFormats=i,j.numberFormats=c,j.__datetimeFormatters=M,j.__numberFormatters=Y,process.env.NODE_ENV!=="production"&&(j.__v_emitter=P.__v_emitter!=null?P.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&Ea(j,n,fe),j}const At=e=>({[e]:$()});function ft(e,t){return e instanceof RegExp?e.test(t):e}function Zn(e,t){return e instanceof RegExp?e.test(t):e}function wt(e,t,n,r,a){const{missing:l,onWarn:s}=e;if(process.env.NODE_ENV!=="production"){const i=e.__v_emitter;i&&i.emit("missing",{locale:n,key:t,type:a,groupId:`${a}:${t}`})}if(l!==null){const i=l(e,n,t,a);return L(i)?i:t}else return process.env.NODE_ENV!=="production"&&Zn(r,t)&&s(Ve(le.NOT_FOUND_KEY,{key:t,locale:n})),t}function Xe(e,t,n){const r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function eo(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function Ha(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r<t.length;r++)if(eo(e,t[r]))return!0;return!1}const to=typeof Intl<"u",no={dateTimeFormat:to&&typeof Intl.DateTimeFormat<"u",numberFormat:to&&typeof Intl.NumberFormat<"u"};function oo(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:a,onWarn:l,localeFallbacker:s}=e,{__datetimeFormatters:i}=e;if(process.env.NODE_ENV!=="production"&&!no.dateTimeFormat)return l(Ve(le.CANNOT_FORMAT_DATE)),dt;const[c,d,p,y]=Dt(...t),h=U(p.missingWarn)?p.missingWarn:e.missingWarn,V=U(p.fallbackWarn)?p.fallbackWarn:e.fallbackWarn,A=!!p.part,O=Ot(e,p),S=s(e,a,O);if(!L(c)||c==="")return new Intl.DateTimeFormat(O,y).format(d);let f={},_,C=null,b=O,k=null;const I="datetime format";for(let M=0;M<S.length;M++){if(_=k=S[M],process.env.NODE_ENV!=="production"&&O!==_&&ft(V,c)&&l(Ve(le.FALLBACK_TO_DATE_FORMAT,{key:c,target:_})),process.env.NODE_ENV!=="production"&&O!==_){const Y=e.__v_emitter;Y&&Y.emit("fallback",{type:I,key:c,from:b,to:k,groupId:`${I}:${c}`})}if(f=n[_]||{},C=f[c],R(C))break;wt(e,c,_,h,I),b=k}if(!R(C)||!L(_))return r?mt:c;let E=`${_}__${c}`;lt(y)||(E=`${E}__${JSON.stringify(y)}`);let P=i.get(E);return P||(P=new Intl.DateTimeFormat(_,ee({},C,y)),i.set(E,P)),A?P.formatToParts(d):P.format(d)}const ro=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Dt(...e){const[t,n,r,a]=e,l=$();let s=$(),i;if(L(t)){const c=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!c)throw be(te.INVALID_ISO_DATE_ARGUMENT);const d=c[3]?c[3].trim().startsWith("T")?`${c[1].trim()}${c[3].trim()}`:`${c[1].trim()}T${c[3].trim()}`:c[1].trim();i=new Date(d);try{i.toISOString()}catch{throw be(te.INVALID_ISO_DATE_ARGUMENT)}}else if(yr(t)){if(isNaN(t.getTime()))throw be(te.INVALID_DATE_ARGUMENT);i=t}else if(K(t))i=t;else throw be(te.INVALID_ARGUMENT);return L(n)?l.key=n:R(n)&&Object.keys(n).forEach(c=>{ro.includes(c)?s[c]=n[c]:l[c]=n[c]}),L(r)?l.locale=r:R(r)&&(s=r),R(a)&&(s=a),[l.key||"",i,l,s]}function ao(e,t,n){const r=e;for(const a in n){const l=`${t}__${a}`;r.__datetimeFormatters.has(l)&&r.__datetimeFormatters.delete(l)}}function lo(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:a,onWarn:l,localeFallbacker:s}=e,{__numberFormatters:i}=e;if(process.env.NODE_ENV!=="production"&&!no.numberFormat)return l(Ve(le.CANNOT_FORMAT_NUMBER)),dt;const[c,d,p,y]=Pt(...t),h=U(p.missingWarn)?p.missingWarn:e.missingWarn,V=U(p.fallbackWarn)?p.fallbackWarn:e.fallbackWarn,A=!!p.part,O=Ot(e,p),S=s(e,a,O);if(!L(c)||c==="")return new Intl.NumberFormat(O,y).format(d);let f={},_,C=null,b=O,k=null;const I="number format";for(let M=0;M<S.length;M++){if(_=k=S[M],process.env.NODE_ENV!=="production"&&O!==_&&ft(V,c)&&l(Ve(le.FALLBACK_TO_NUMBER_FORMAT,{key:c,target:_})),process.env.NODE_ENV!=="production"&&O!==_){const Y=e.__v_emitter;Y&&Y.emit("fallback",{type:I,key:c,from:b,to:k,groupId:`${I}:${c}`})}if(f=n[_]||{},C=f[c],R(C))break;wt(e,c,_,h,I),b=k}if(!R(C)||!L(_))return r?mt:c;let E=`${_}__${c}`;lt(y)||(E=`${E}__${JSON.stringify(y)}`);let P=i.get(E);return P||(P=new Intl.NumberFormat(_,ee({},C,y)),i.set(E,P)),A?P.formatToParts(d):P.format(d)}const so=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Pt(...e){const[t,n,r,a]=e,l=$();let s=$();if(!K(t))throw be(te.INVALID_ARGUMENT);const i=t;return L(n)?l.key=n:R(n)&&Object.keys(n).forEach(c=>{so.includes(c)?s[c]=n[c]:l[c]=n[c]}),L(r)?l.locale=r:R(r)&&(s=r),R(a)&&(s=a),[l.key||"",i,l,s]}function io(e,t,n){const r=e;for(const a in n){const l=`${t}__${a}`;r.__numberFormatters.has(l)&&r.__numberFormatters.delete(l)}}const Ga=e=>e,Ya=e=>"",ja="text",Ka=e=>e.length===0?"":yt(e),Xa=Lr;function co(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function Ja(e){const t=K(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(K(e.named.count)||K(e.named.n))?K(e.named.count)?e.named.count:K(e.named.n)?e.named.n:t:t}function za(e,t){t.count||(t.count=e),t.n||(t.n=e)}function Qa(e={}){const t=e.locale,n=Ja(e),r=F(e.pluralRules)&&L(t)&&q(e.pluralRules[t])?e.pluralRules[t]:co,a=F(e.pluralRules)&&L(t)&&q(e.pluralRules[t])?co:void 0,l=f=>f[r(n,f.length,a)],s=e.list||[],i=f=>s[f],c=e.named||$();K(e.pluralIndex)&&za(n,c);const d=f=>c[f];function p(f,_){const C=q(e.messages)?e.messages(f,!!_):F(e.messages)?e.messages[f]:!1;return C||(e.parent?e.parent.message(f):Ya)}const y=f=>e.modifiers?e.modifiers[f]:Ga,h=R(e.processor)&&q(e.processor.normalize)?e.processor.normalize:Ka,V=R(e.processor)&&q(e.processor.interpolate)?e.processor.interpolate:Xa,A=R(e.processor)&&L(e.processor.type)?e.processor.type:ja,S={list:i,named:d,plural:l,linked:(f,..._)=>{const[C,b]=_;let k="text",I="";_.length===1?F(C)?(I=C.modifier||I,k=C.type||k):L(C)&&(I=C||I):_.length===2&&(L(C)&&(I=C||I),L(b)&&(k=b||k));const E=p(f,!0)(S),P=k==="vnode"&&G(E)&&I?E[0]:E;return I?y(I)(P,k):P},message:p,type:A,interpolate:V,normalize:h,values:ee($(),s,c)};return S}const uo=()=>"",ce=e=>q(e);function mo(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:a,messageCompiler:l,fallbackLocale:s,messages:i}=e,[c,d]=Rt(...t),p=U(d.missingWarn)?d.missingWarn:e.missingWarn,y=U(d.fallbackWarn)?d.fallbackWarn:e.fallbackWarn,h=U(d.escapeParameter)?d.escapeParameter:e.escapeParameter,V=!!d.resolvedMessage,A=L(d.default)||U(d.default)?U(d.default)?l?c:()=>c:d.default:n?l?c:()=>c:null,O=n||A!=null&&(L(A)||q(A)),S=Ot(e,d);h&&Za(d);let[f,_,C]=V?[c,S,i[S]||$()]:fo(e,c,S,s,y,p),b=f,k=c;if(!V&&!(L(b)||ie(b)||ce(b))&&O&&(b=A,k=b),!V&&(!(L(b)||ie(b)||ce(b))||!L(_)))return a?mt:c;if(process.env.NODE_ENV!=="production"&&L(b)&&e.messageCompiler==null)return Ee(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${c}'.`),c;let I=!1;const E=()=>{I=!0},P=ce(b)?b:po(e,c,_,b,k,E);if(I)return b;const M=ol(e,_,C,d),Y=Qa(M),fe=el(e,P,Y);let j=r?r(fe,c):fe;if(h&&L(j)&&(j=Ir(j)),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const We={timestamp:Date.now(),key:L(c)?c:ce(b)?b.key:"",locale:_||(ce(b)?b.locale:""),format:L(b)?b:ce(b)?b.source:"",message:j};We.meta=ee({},e.__meta,$a()||{}),ha(We)}return j}function Za(e){G(e.list)?e.list=e.list.map(t=>L(t)?Tn(t):t):F(e.named)&&Object.keys(e.named).forEach(t=>{L(e.named[t])&&(e.named[t]=Tn(e.named[t]))})}function fo(e,t,n,r,a,l){const{messages:s,onWarn:i,messageResolver:c,localeFallbacker:d}=e,p=d(e,r,n);let y=$(),h,V=null,A=n,O=null;const S="translate";for(let f=0;f<p.length;f++){if(h=O=p[f],process.env.NODE_ENV!=="production"&&n!==h&&!eo(n,h)&&ft(a,t)&&i(Ve(le.FALLBACK_TO_TRANSLATE,{key:t,target:h})),process.env.NODE_ENV!=="production"&&n!==h){const k=e.__v_emitter;k&&k.emit("fallback",{type:S,key:t,from:A,to:O,groupId:`${S}:${t}`})}y=s[h]||$();let _=null,C,b;if(process.env.NODE_ENV!=="production"&&ue&&(_=window.performance.now(),C="intlify-message-resolve-start",b="intlify-message-resolve-end",se&&se(C)),(V=c(y,t))===null&&(V=y[t]),process.env.NODE_ENV!=="production"&&ue){const k=window.performance.now(),I=e.__v_emitter;I&&_&&V&&I.emit("message-resolve",{type:"message-resolve",key:t,message:V,time:k-_,groupId:`${S}:${t}`}),C&&b&&se&&Se&&(se(b),Se("intlify message resolve",C,b))}if(L(V)||ie(V)||ce(V))break;if(!Ha(h,p)){const k=wt(e,t,h,l,S);k!==t&&(V=k)}A=O}return[V,h,y]}function po(e,t,n,r,a,l){const{messageCompiler:s,warnHtmlMessage:i}=e;if(ce(r)){const h=r;return h.locale=h.locale||n,h.key=h.key||t,h}if(s==null){const h=(()=>r);return h.locale=n,h.key=t,h}let c=null,d,p;process.env.NODE_ENV!=="production"&&ue&&(c=window.performance.now(),d="intlify-message-compilation-start",p="intlify-message-compilation-end",se&&se(d));const y=s(r,tl(e,n,a,r,i,l));if(process.env.NODE_ENV!=="production"&&ue){const h=window.performance.now(),V=e.__v_emitter;V&&c&&V.emit("message-compilation",{type:"message-compilation",message:r,time:h-c,groupId:`translate:${t}`}),d&&p&&se&&Se&&(se(p),Se("intlify message compilation",d,p))}return y.locale=n,y.key=t,y.source=r,y}function el(e,t,n){let r=null,a,l;process.env.NODE_ENV!=="production"&&ue&&(r=window.performance.now(),a="intlify-message-evaluation-start",l="intlify-message-evaluation-end",se&&se(a));const s=t(n);if(process.env.NODE_ENV!=="production"&&ue){const i=window.performance.now(),c=e.__v_emitter;c&&r&&c.emit("message-evaluation",{type:"message-evaluation",value:s,time:i-r,groupId:`translate:${t.key}`}),a&&l&&se&&Se&&(se(l),Se("intlify message evaluation",a,l))}return s}function Rt(...e){const[t,n,r]=e,a=$();if(!L(t)&&!K(t)&&!ce(t)&&!ie(t))throw be(te.INVALID_ARGUMENT);const l=K(t)?String(t):(ce(t),t);return K(n)?a.plural=n:L(n)?a.default=n:R(n)&&!lt(n)?a.named=n:G(n)&&(a.list=n),K(r)?a.plural=r:L(r)?a.default=r:R(r)&&ee(a,r),[l,a]}function tl(e,t,n,r,a,l){return{locale:t,key:n,warnHtmlMessage:a,onError:s=>{if(l&&l(s),process.env.NODE_ENV!=="production"){const i=nl(r),c=`Message compilation error: ${s.message}`,d=s.location&&i&&Sr(i,s.location.start.offset,s.location.end.offset),p=e.__v_emitter;p&&i&&p.emit("compile-error",{message:i,error:s.message,start:s.location&&s.location.start.offset,end:s.location&&s.location.end.offset,groupId:`translate:${n}`}),console.error(d?`${c}
|
|
5
|
+
${d}`:c)}else throw s},onCacheKey:s=>br(t,n,s)}}function nl(e){if(L(e))return e;if(e.loc&&e.loc.source)return e.loc.source}function ol(e,t,n,r){const{modifiers:a,pluralRules:l,messageResolver:s,fallbackLocale:i,fallbackWarn:c,missingWarn:d,fallbackContext:p}=e,h={locale:t,modifiers:a,pluralRules:l,messages:(V,A)=>{let O=s(n,V);if(O==null&&(p||A)){const[,,S]=fo(p||e,V,t,i,c,d);O=s(S,V)}if(L(O)||ie(O)){let S=!1;const _=po(e,V,t,O,V,()=>{S=!0});return S?uo:_}else return ce(O)?O:uo}};return e.processor&&(h.processor=e.processor),r.list&&(h.list=r.list),r.named&&(h.named=r.named),K(r.plural)&&(h.pluralIndex=r.plural),h}oa();function rl(){return _o().__VUE_DEVTOOLS_GLOBAL_HOOK__}function _o(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const al=typeof Proxy=="function",ll="devtools-plugin:setup",sl="plugin:settings:set";let $e,Mt;function il(){var e;return $e!==void 0||(typeof window<"u"&&window.performance?($e=!0,Mt=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?($e=!0,Mt=globalThis.perf_hooks.performance):$e=!1),$e}function cl(){return il()?Mt.now():Date.now()}class ul{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const s in t.settings){const i=t.settings[s];r[s]=i.defaultValue}const a=`__vue-devtools-plugin-settings__${t.id}`;let l=Object.assign({},r);try{const s=localStorage.getItem(a),i=JSON.parse(s);Object.assign(l,i)}catch{}this.fallbacks={getSettings(){return l},setSettings(s){try{localStorage.setItem(a,JSON.stringify(s))}catch{}l=s},now(){return cl()}},n&&n.on(sl,(s,i)=>{s===this.plugin.id&&this.fallbacks.setSettings(i)}),this.proxiedOn=new Proxy({},{get:(s,i)=>this.target?this.target.on[i]:(...c)=>{this.onQueue.push({method:i,args:c})}}),this.proxiedTarget=new Proxy({},{get:(s,i)=>this.target?this.target[i]:i==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(i)?(...c)=>(this.targetQueue.push({method:i,args:c,resolve:()=>{}}),this.fallbacks[i](...c)):(...c)=>new Promise(d=>{this.targetQueue.push({method:i,args:c,resolve:d})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function ml(e,t){const n=e,r=_o(),a=rl(),l=al&&n.enableEarlyProxy;if(a&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!l))a.emit(ll,e,t);else{const s=l?new ul(n,a):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:s}),s&&t(s.proxiedTarget)}}const dl="10.0.8";function fl(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Oe().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Oe().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Oe().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Oe().__INTLIFY_PROD_DEVTOOLS__=!1)}const Le={FALLBACK_TO_ROOT:Pa,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_TC:11},pl={[Le.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Le.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Le.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Le.DEPRECATE_TC]:"'tc' and '$tc' has been deprecated in v10. Use 't' or '$t' instead. 'tc' and '$tc’ are going to remove in v11."};function pt(e,...t){return at(pl[e],...t)}const W={UNEXPECTED_RETURN_TYPE:Na,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function ae(e,...t){return xe(e,null,process.env.NODE_ENV!=="production"?{messages:_l,args:t}:void 0)}const _l={[W.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[W.INVALID_ARGUMENT]:"Invalid argument",[W.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[W.NOT_INSTALLED]:"Need to install with `app.use` function",[W.UNEXPECTED_ERROR]:"Unexpected error",[W.REQUIRED_VALUE]:"Required in value: {0}",[W.INVALID_VALUE]:"Invalid value",[W.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[W.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[W.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[W.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},Ft=pe("__translateVNode"),Ut=pe("__datetimeParts"),xt=pe("__numberParts"),Ae=pe("__enableEmitter"),Je=pe("__disableEmitter"),go=pe("__setPluralRules"),Eo=pe("__injectWithOption"),vt=pe("__dispose");function ze(e){if(!F(e)||ie(e))return e;for(const t in e)if(me(e,t))if(!t.includes("."))F(e[t])&&ze(e[t]);else{const n=t.split("."),r=n.length-1;let a=e,l=!1;for(let s=0;s<r;s++){if(n[s]==="__proto__")throw new Error(`unsafe key: ${n[s]}`);if(n[s]in a||(a[n[s]]=$()),!F(a[n[s]])){process.env.NODE_ENV!=="production"&&Ee(pt(Le.IGNORE_OBJ_FLATTEN,{key:n[s]})),l=!0;break}a=a[n[s]]}if(l||(ie(a)?vn.includes(n[r])||delete e[t]:(a[n[r]]=e[t],delete e[t])),!ie(a)){const s=a[n[r]];F(s)&&ze(s)}}return e}function Bt(e,t){const{messages:n,__i18n:r,messageResolver:a,flatJson:l}=t,s=R(n)?n:G(r)?$():{[e]:$()};if(G(r)&&r.forEach(i=>{if("locale"in i&&"resource"in i){const{locale:c,resource:d}=i;c?(s[c]=s[c]||$(),it(d,s[c])):it(d,s)}else L(i)&&it(JSON.parse(i),s)}),a==null&&l)for(const i in s)me(s,i)&&ze(s[i]);return s}function ho(e){return e.type}function bo(e,t,n){let r=F(t.messages)?t.messages:$();"__i18nGlobal"in n&&(r=Bt(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const a=Object.keys(r);a.length&&a.forEach(l=>{e.mergeLocaleMessage(l,r[l])});{if(F(t.datetimeFormats)){const l=Object.keys(t.datetimeFormats);l.length&&l.forEach(s=>{e.mergeDateTimeFormat(s,t.datetimeFormats[s])})}if(F(t.numberFormats)){const l=Object.keys(t.numberFormats);l.length&&l.forEach(s=>{e.mergeNumberFormat(s,t.numberFormats[s])})}}}function No(e){return o.createVNode(o.Text,null,e,0)}const yo="__INTLIFY_META__",Co=()=>[],gl=()=>!1;let Io=0;function To(e){return((t,n,r,a)=>e(n,r,o.getCurrentInstance()||void 0,a))}const El=()=>{const e=o.getCurrentInstance();let t=null;return e&&(t=ho(e)[yo])?{[yo]:t}:null};function $t(e={}){const{__root:t,__injectWithOption:n}=e,r=t===void 0,a=e.flatJson,l=ue?o.ref:o.shallowRef;let s=U(e.inheritLocale)?e.inheritLocale:!0;const i=l(t&&s?t.locale.value:L(e.locale)?e.locale:Ke),c=l(t&&s?t.fallbackLocale.value:L(e.fallbackLocale)||G(e.fallbackLocale)||R(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i.value),d=l(Bt(i.value,e)),p=l(R(e.datetimeFormats)?e.datetimeFormats:{[i.value]:{}}),y=l(R(e.numberFormats)?e.numberFormats:{[i.value]:{}});let h=t?t.missingWarn:U(e.missingWarn)||Ue(e.missingWarn)?e.missingWarn:!0,V=t?t.fallbackWarn:U(e.fallbackWarn)||Ue(e.fallbackWarn)?e.fallbackWarn:!0,A=t?t.fallbackRoot:U(e.fallbackRoot)?e.fallbackRoot:!0,O=!!e.fallbackFormat,S=q(e.missing)?e.missing:null,f=q(e.missing)?To(e.missing):null,_=q(e.postTranslation)?e.postTranslation:null,C=t?t.warnHtmlMessage:U(e.warnHtmlMessage)?e.warnHtmlMessage:!0,b=!!e.escapeParameter;const k=t?t.modifiers:R(e.modifiers)?e.modifiers:{};let I=e.pluralRules||t&&t.pluralRules,E;E=(()=>{r&&zn(null);const g={version:dl,locale:i.value,fallbackLocale:c.value,messages:d.value,modifiers:k,pluralRules:I,missing:f===null?void 0:f,missingWarn:h,fallbackWarn:V,fallbackFormat:O,unresolving:!0,postTranslation:_===null?void 0:_,warnHtmlMessage:C,escapeParameter:b,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};g.datetimeFormats=p.value,g.numberFormats=y.value,g.__datetimeFormatters=R(E)?E.__datetimeFormatters:void 0,g.__numberFormatters=R(E)?E.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(g.__v_emitter=R(E)?E.__v_emitter:void 0);const T=Wa(g);return r&&zn(T),T})(),Xe(E,i.value,c.value);function M(){return[i.value,c.value,d.value,p.value,y.value]}const Y=o.computed({get:()=>i.value,set:g=>{i.value=g,E.locale=i.value}}),fe=o.computed({get:()=>c.value,set:g=>{c.value=g,E.fallbackLocale=c.value,Xe(E,i.value,g)}}),j=o.computed(()=>d.value),We=o.computed(()=>p.value),en=o.computed(()=>y.value);function tn(){return q(_)?_:null}function nn(g){_=g,E.postTranslation=g}function on(){return S}function rn(g){g!==null&&(f=To(g)),S=g,E.missing=f}function an(g,T){return g!=="translate"||!T.resolvedMessage}const Ce=(g,T,B,Q,Me,ht)=>{M();let He;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(E.fallbackContext=t?qa():void 0),He=g(E)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(E.fallbackContext=void 0)}if(B!=="translate exists"&&K(He)&&He===mt||B==="translate exists"&&!He){const[Fe,Li]=T();if(process.env.NODE_ENV!=="production"&&t&&L(Fe)&&an(B,Li)&&(A&&(ft(V,Fe)||Zn(h,Fe))&&Ee(pt(Le.FALLBACK_TO_ROOT,{key:Fe,type:B})),process.env.NODE_ENV!=="production")){const{__v_emitter:tr}=E;tr&&A&&tr.emit("fallback",{type:B,key:Fe,to:"global",groupId:`${B}:${Fe}`})}return t&&A?Q(t):Me(Fe)}else{if(ht(He))return He;throw ae(W.UNEXPECTED_RETURN_TYPE)}};function tt(...g){return Ce(T=>Reflect.apply(mo,null,[T,...g]),()=>Rt(...g),"translate",T=>Reflect.apply(T.t,T,[...g]),T=>T,T=>L(T))}function ln(...g){const[T,B,Q]=g;if(Q&&!F(Q))throw ae(W.INVALID_ARGUMENT);return tt(T,B,ee({resolvedMessage:!0},Q||{}))}function sn(...g){return Ce(T=>Reflect.apply(oo,null,[T,...g]),()=>Dt(...g),"datetime format",T=>Reflect.apply(T.d,T,[...g]),()=>dt,T=>L(T))}function cn(...g){return Ce(T=>Reflect.apply(lo,null,[T,...g]),()=>Pt(...g),"number format",T=>Reflect.apply(T.n,T,[...g]),()=>dt,T=>L(T))}function un(g){return g.map(T=>L(T)||K(T)||U(T)?No(String(T)):T)}const mn={normalize:un,interpolate:g=>g,type:"vnode"};function Et(...g){return Ce(T=>{let B;const Q=T;try{Q.processor=mn,B=Reflect.apply(mo,null,[Q,...g])}finally{Q.processor=null}return B},()=>Rt(...g),"translate",T=>T[Ft](...g),T=>[No(T)],T=>G(T))}function dn(...g){return Ce(T=>Reflect.apply(lo,null,[T,...g]),()=>Pt(...g),"number format",T=>T[xt](...g),Co,T=>L(T)||G(T))}function fn(...g){return Ce(T=>Reflect.apply(oo,null,[T,...g]),()=>Dt(...g),"datetime format",T=>T[Ut](...g),Co,T=>L(T)||G(T))}function pn(g){I=g,E.pluralRules=I}function _n(g,T){return Ce(()=>{if(!g)return!1;const B=L(T)?T:i.value,Q=Re(B),Me=E.messageResolver(Q,g);return ie(Me)||ce(Me)||L(Me)},()=>[g],"translate exists",B=>Reflect.apply(B.te,B,[g,T]),gl,B=>U(B))}function nt(g){let T=null;const B=qn(E,c.value,i.value);for(let Q=0;Q<B.length;Q++){const Me=d.value[B[Q]]||{},ht=E.messageResolver(Me,g);if(ht!=null){T=ht;break}}return T}function ot(g){const T=nt(g);return T??(t?t.tm(g)||{}:{})}function Re(g){return d.value[g]||{}}function rt(g,T){if(a){const B={[g]:T};for(const Q in B)me(B,Q)&&ze(B[Q]);T=B[g]}d.value[g]=T,E.messages=d.value}function gn(g,T){d.value[g]=d.value[g]||{};const B={[g]:T};if(a)for(const Q in B)me(B,Q)&&ze(B[Q]);T=B[g],it(T,d.value[g]),E.messages=d.value}function u(g){return p.value[g]||{}}function m(g,T){p.value[g]=T,E.datetimeFormats=p.value,ao(E,g,T)}function N(g,T){p.value[g]=ee(p.value[g]||{},T),E.datetimeFormats=p.value,ao(E,g,T)}function w(g){return y.value[g]||{}}function J(g,T){y.value[g]=T,E.numberFormats=y.value,io(E,g,T)}function z(g,T){y.value[g]=ee(y.value[g]||{},T),E.numberFormats=y.value,io(E,g,T)}Io++,t&&ue&&(o.watch(t.locale,g=>{s&&(i.value=g,E.locale=g,Xe(E,i.value,c.value))}),o.watch(t.fallbackLocale,g=>{s&&(c.value=g,E.fallbackLocale=g,Xe(E,i.value,c.value))}));const x={id:Io,locale:Y,fallbackLocale:fe,get inheritLocale(){return s},set inheritLocale(g){s=g,g&&t&&(i.value=t.locale.value,c.value=t.fallbackLocale.value,Xe(E,i.value,c.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:j,get modifiers(){return k},get pluralRules(){return I||{}},get isGlobal(){return r},get missingWarn(){return h},set missingWarn(g){h=g,E.missingWarn=h},get fallbackWarn(){return V},set fallbackWarn(g){V=g,E.fallbackWarn=V},get fallbackRoot(){return A},set fallbackRoot(g){A=g},get fallbackFormat(){return O},set fallbackFormat(g){O=g,E.fallbackFormat=O},get warnHtmlMessage(){return C},set warnHtmlMessage(g){C=g,E.warnHtmlMessage=g},get escapeParameter(){return b},set escapeParameter(g){b=g,E.escapeParameter=g},t:tt,getLocaleMessage:Re,setLocaleMessage:rt,mergeLocaleMessage:gn,getPostTranslationHandler:tn,setPostTranslationHandler:nn,getMissingHandler:on,setMissingHandler:rn,[go]:pn};return x.datetimeFormats=We,x.numberFormats=en,x.rt=ln,x.te=_n,x.tm=ot,x.d=sn,x.n=cn,x.getDateTimeFormat=u,x.setDateTimeFormat=m,x.mergeDateTimeFormat=N,x.getNumberFormat=w,x.setNumberFormat=J,x.mergeNumberFormat=z,x[Eo]=n,x[Ft]=Et,x[Ut]=fn,x[xt]=dn,process.env.NODE_ENV!=="production"&&(x[Ae]=g=>{E.__v_emitter=g},x[Je]=()=>{E.__v_emitter=void 0}),x}const ko="vue-i18n: composer properties",qt={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},hl={"vue-i18n-resource-inspector":"Search for scopes ..."},bl={"vue-i18n-timeline":16764185};let Wt;async function Nl(e,t){return new Promise((n,r)=>{try{ml({id:"vue-devtools-plugin-vue-i18n",label:qt["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[ko],app:e},a=>{Wt=a,a.on.visitComponentTree(({componentInstance:s,treeNode:i})=>{yl(s,i,t)}),a.on.inspectComponent(({componentInstance:s,instanceData:i})=>{s.vnode.el&&s.vnode.el.__VUE_I18N__&&i&&(t.mode==="legacy"?s.vnode.el.__VUE_I18N__!==t.global.__composer&&So(i,s.vnode.el.__VUE_I18N__):So(i,s.vnode.el.__VUE_I18N__))}),a.addInspector({id:"vue-i18n-resource-inspector",label:qt["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:hl["vue-i18n-resource-inspector"]}),a.on.getInspectorTree(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&Ll(s,t)});const l=new Map;a.on.getInspectorState(async s=>{if(s.app===e&&s.inspectorId==="vue-i18n-resource-inspector")if(a.unhighlightElement(),Ol(s,t),s.nodeId==="global"){if(!l.has(s.app)){const[i]=await a.getComponentInstances(s.app);l.set(s.app,i)}a.highlightElement(l.get(s.app))}else{const i=Sl(s.nodeId,t);i&&a.highlightElement(i)}}),a.on.editInspectorState(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&Al(s,t)}),a.addTimelineLayer({id:"vue-i18n-timeline",label:qt["vue-i18n-timeline"],color:bl["vue-i18n-timeline"]}),n(!0)})}catch(a){console.error(a),r(!1)}})}function Lo(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function yl(e,t,n){const r=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==r){const a={label:`i18n (${Lo(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(a)}}function So(e,t){const n=ko;e.state.push({type:n,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:Ht(t.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function Ht(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];q(r)&&"source"in r?t[n]=kl(r):ie(r)&&r.loc&&r.loc.source?t[n]=r.loc.source:F(r)?t[n]=Ht(r):t[n]=r}),t}const Cl={"<":"<",">":">",'"':""","&":"&"};function Il(e){return e.replace(/[<>"&]/g,Tl)}function Tl(e){return Cl[e]||e}function kl(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${Il(e.source)}")`:"(?)"}`}}}function Ll(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[r,a]of t.__instances){const l=t.mode==="composition"?a:a.__composer;n!==l&&e.rootNodes.push({id:l.id.toString(),label:`${Lo(r)} Scope`})}}function Sl(e,t){let n=null;if(e!=="global"){for(const[r,a]of t.__instances.entries())if(a.id.toString()===e){n=r;break}}return n}function Oo(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(r=>r.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function Ol(e,t){const n=Oo(e.nodeId,t);return n&&(e.state=Vl(n)),null}function Vl(e){const t={},n="Locale related info",r=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[n]=r;const a="Locale messages info",l=[{type:a,key:"messages",editable:!1,value:Ht(e.messages.value)}];t[a]=l;{const s="Datetime formats info",i=[{type:s,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[s]=i;const c="Datetime formats info",d=[{type:c,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[c]=d}return t}function Qe(e,t){if(Wt){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),Wt.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function Al(e,t){const n=Oo(e.nodeId,t);if(n){const[r]=e.path;r==="locale"&&L(e.state.value)?n.locale.value=e.state.value:r==="fallbackLocale"&&(L(e.state.value)||G(e.state.value)||F(e.state.value))?n.fallbackLocale.value=e.state.value:r==="inheritLocale"&&U(e.state.value)&&(n.inheritLocale=e.state.value)}}function wl(e){const t=L(e.locale)?e.locale:Ke,n=L(e.fallbackLocale)||G(e.fallbackLocale)||R(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=q(e.missing)?e.missing:void 0,a=U(e.silentTranslationWarn)||Ue(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,l=U(e.silentFallbackWarn)||Ue(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,s=U(e.fallbackRoot)?e.fallbackRoot:!0,i=!!e.formatFallbackMessages,c=R(e.modifiers)?e.modifiers:{},d=e.pluralizationRules,p=q(e.postTranslation)?e.postTranslation:void 0,y=L(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,V=U(e.sync)?e.sync:!0;let A=e.messages;if(R(e.sharedMessages)){const k=e.sharedMessages;A=Object.keys(k).reduce((E,P)=>{const M=E[P]||(E[P]={});return ee(M,k[P]),E},A||{})}const{__i18n:O,__root:S,__injectWithOption:f}=e,_=e.datetimeFormats,C=e.numberFormats,b=e.flatJson;return{locale:t,fallbackLocale:n,messages:A,flatJson:b,datetimeFormats:_,numberFormats:C,missing:r,missingWarn:a,fallbackWarn:l,fallbackRoot:s,fallbackFormat:i,modifiers:c,pluralRules:d,postTranslation:p,warnHtmlMessage:y,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:V,__i18n:O,__root:S,__injectWithOption:f}}function Gt(e={}){const t=$t(wl(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(a){t.locale.value=a},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(a){t.fallbackLocale.value=a},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(a){t.setMissingHandler(a)},get silentTranslationWarn(){return U(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(a){t.missingWarn=U(a)?!a:a},get silentFallbackWarn(){return U(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(a){t.fallbackWarn=U(a)?!a:a},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(a){t.fallbackFormat=a},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(a){t.setPostTranslationHandler(a)},get sync(){return t.inheritLocale},set sync(a){t.inheritLocale=a},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(a){t.warnHtmlMessage=a!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(a){t.escapeParameter=a},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...a){return Reflect.apply(t.t,t,[...a])},rt(...a){return Reflect.apply(t.rt,t,[...a])},tc(...a){const[l,s,i]=a,c={plural:1};let d=null,p=null;if(process.env.NODE_ENV!=="production"&&Cn(pt(Le.DEPRECATE_TC)),!L(l))throw ae(W.INVALID_ARGUMENT);const y=l;return L(s)?c.locale=s:K(s)?c.plural=s:G(s)?d=s:R(s)&&(p=s),L(i)?c.locale=i:G(i)?d=i:R(i)&&(p=i),Reflect.apply(t.t,t,[y,d||p||{},c])},te(a,l){return t.te(a,l)},tm(a){return t.tm(a)},getLocaleMessage(a){return t.getLocaleMessage(a)},setLocaleMessage(a,l){t.setLocaleMessage(a,l)},mergeLocaleMessage(a,l){t.mergeLocaleMessage(a,l)},d(...a){return Reflect.apply(t.d,t,[...a])},getDateTimeFormat(a){return t.getDateTimeFormat(a)},setDateTimeFormat(a,l){t.setDateTimeFormat(a,l)},mergeDateTimeFormat(a,l){t.mergeDateTimeFormat(a,l)},n(...a){return Reflect.apply(t.n,t,[...a])},getNumberFormat(a){return t.getNumberFormat(a)},setNumberFormat(a,l){t.setNumberFormat(a,l)},mergeNumberFormat(a,l){t.mergeNumberFormat(a,l)}};return r.__extender=n,process.env.NODE_ENV!=="production"&&(r.__enableEmitter=a=>{const l=t;l[Ae]&&l[Ae](a)},r.__disableEmitter=()=>{const a=t;a[Je]&&a[Je]()}),r}function Dl(e,t,n){return{beforeCreate(){const r=o.getCurrentInstance();if(!r)throw ae(W.UNEXPECTED_ERROR);const a=this.$options;if(a.i18n){const l=a.i18n;if(a.__i18n&&(l.__i18n=a.__i18n),l.__root=t,this===this.$root)this.$i18n=Vo(e,l);else{l.__injectWithOption=!0,l.__extender=n.__vueI18nExtend,this.$i18n=Gt(l);const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}}else if(a.__i18n)if(this===this.$root)this.$i18n=Vo(e,a);else{this.$i18n=Gt({__i18n:a.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const l=this.$i18n;l.__extender&&(l.__disposer=l.__extender(this.$i18n))}else this.$i18n=e;a.__i18nGlobal&&bo(t,a,a),this.$t=(...l)=>this.$i18n.t(...l),this.$rt=(...l)=>this.$i18n.rt(...l),this.$tc=(...l)=>this.$i18n.tc(...l),this.$te=(l,s)=>this.$i18n.te(l,s),this.$d=(...l)=>this.$i18n.d(...l),this.$n=(...l)=>this.$i18n.n(...l),this.$tm=l=>this.$i18n.tm(l),n.__setInstance(r,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const r=this.$i18n;this.$el.__VUE_I18N__=r.__composer;const a=this.__v_emitter=Ct();r.__enableEmitter&&r.__enableEmitter(a),a.on("*",Qe)}},unmounted(){const r=o.getCurrentInstance();if(!r)throw ae(W.UNEXPECTED_ERROR);const a=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Qe),delete this.__v_emitter),this.$i18n&&(a.__disableEmitter&&a.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,a.__disposer&&(a.__disposer(),delete a.__disposer,delete a.__extender),n.__deleteInstance(r),delete this.$i18n}}}function Vo(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[go](t.pluralizationRules||e.pluralizationRules);const n=Bt(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(r=>e.mergeLocaleMessage(r,n[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const Yt={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Pl({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,a)=>[...r,...a.type===o.Fragment?a.children:[a]],[]):t.reduce((n,r)=>{const a=e[r];return a&&(n[r]=a()),n},$())}function Ao(){return o.Fragment}const wo=o.defineComponent({name:"i18n-t",props:ee({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>K(e)||!isNaN(e)}},Yt),setup(e,t){const{slots:n,attrs:r}=t,a=e.i18n||jt({useScope:e.scope,__useComponent:!0});return()=>{const l=Object.keys(n).filter(y=>y!=="_"),s=$();e.locale&&(s.locale=e.locale),e.plural!==void 0&&(s.plural=L(e.plural)?+e.plural:e.plural);const i=Pl(t,l),c=a[Ft](e.keypath,i,s),d=ee($(),r),p=L(e.tag)||F(e.tag)?e.tag:Ao();return o.h(p,d,c)}}});function Rl(e){return G(e)&&!L(e[0])}function Do(e,t,n,r){const{slots:a,attrs:l}=t;return()=>{const s={part:!0};let i=$();e.locale&&(s.locale=e.locale),L(e.format)?s.key=e.format:F(e.format)&&(L(e.format.key)&&(s.key=e.format.key),i=Object.keys(e.format).reduce((h,V)=>n.includes(V)?ee($(),h,{[V]:e.format[V]}):h,$()));const c=r(e.value,s,i);let d=[s.key];G(c)?d=c.map((h,V)=>{const A=a[h.type],O=A?A({[h.type]:h.value,index:V,parts:c}):[h.value];return Rl(O)&&(O[0].key=`${h.type}-${V}`),O}):L(c)&&(d=[c]);const p=ee($(),l),y=L(e.tag)||F(e.tag)?e.tag:Ao();return o.h(y,p,d)}}const Po=o.defineComponent({name:"i18n-n",props:ee({value:{type:Number,required:!0},format:{type:[String,Object]}},Yt),setup(e,t){const n=e.i18n||jt({useScope:e.scope,__useComponent:!0});return Do(e,t,so,(...r)=>n[xt](...r))}}),Ro=o.defineComponent({name:"i18n-d",props:ee({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Yt),setup(e,t){const n=e.i18n||jt({useScope:e.scope,__useComponent:!0});return Do(e,t,ro,(...r)=>n[Ut](...r))}});function Ml(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const r=n.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function Fl(e){const t=s=>{const{instance:i,value:c}=s;if(!i||!i.$)throw ae(W.UNEXPECTED_ERROR);const d=Ml(e,i.$),p=Mo(c);return[Reflect.apply(d.t,d,[...Fo(p)]),d]};return{created:(s,i)=>{const[c,d]=t(i);ue&&e.global===d&&(s.__i18nWatcher=o.watch(d.locale,()=>{i.instance&&i.instance.$forceUpdate()})),s.__composer=d,s.textContent=c},unmounted:s=>{ue&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:i})=>{if(s.__composer){const c=s.__composer,d=Mo(i);s.textContent=Reflect.apply(c.t,c,[...Fo(d)])}},getSSRProps:s=>{const[i]=t(s);return{textContent:i}}}}function Mo(e){if(L(e))return{path:e};if(R(e)){if(!("path"in e))throw ae(W.REQUIRED_VALUE,"path");return e}else throw ae(W.INVALID_VALUE)}function Fo(e){const{path:t,locale:n,args:r,choice:a,plural:l}=e,s={},i=r||{};return L(n)&&(s.locale=n),K(a)&&(s.plural=a),K(l)&&(s.plural=l),[t,i,s]}function Ul(e,t,...n){const r=R(n[0])?n[0]:{};(U(r.globalInstall)?r.globalInstall:!0)&&([wo.name,"I18nT"].forEach(l=>e.component(l,wo)),[Po.name,"I18nN"].forEach(l=>e.component(l,Po)),[Ro.name,"I18nD"].forEach(l=>e.component(l,Ro))),e.directive("t",Fl(t))}const xl=pe("global-vue-i18n");function vl(e={},t){const n=__VUE_I18N_LEGACY_API__&&U(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,r=U(e.globalInjection)?e.globalInjection:!0,a=new Map,[l,s]=Bl(e,n),i=pe(process.env.NODE_ENV!=="production"?"vue-i18n":"");function c(h){return a.get(h)||null}function d(h,V){a.set(h,V)}function p(h){a.delete(h)}const y={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},async install(h,...V){if(process.env.NODE_ENV!=="production"&&(h.__VUE_I18N__=y),h.__VUE_I18N_SYMBOL__=i,h.provide(h.__VUE_I18N_SYMBOL__,y),R(V[0])){const S=V[0];y.__composerExtend=S.__composerExtend,y.__vueI18nExtend=S.__vueI18nExtend}let A=null;!n&&r&&(A=Kl(h,y.global)),__VUE_I18N_FULL_INSTALL__&&Ul(h,y,...V),__VUE_I18N_LEGACY_API__&&n&&h.mixin(Dl(s,s.__composer,y));const O=h.unmount;if(h.unmount=()=>{A&&A(),y.dispose(),O()},process.env.NODE_ENV!=="production"){if(!await Nl(h,y))throw ae(W.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const f=Ct();if(n){const _=s;_.__enableEmitter&&_.__enableEmitter(f)}else{const _=s;_[Ae]&&_[Ae](f)}f.on("*",Qe)}},get global(){return s},dispose(){l.stop()},__instances:a,__getInstance:c,__setInstance:d,__deleteInstance:p};return y}function jt(e={}){const t=o.getCurrentInstance();if(t==null)throw ae(W.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw ae(W.NOT_INSTALLED);const n=$l(t),r=Wl(n),a=ho(t),l=ql(e,a);if(l==="global")return bo(r,e,a),r;if(l==="parent"){let c=Hl(n,t,e.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&Ee(pt(Le.NOT_FOUND_PARENT_SCOPE)),c=r),c}const s=n;let i=s.__getInstance(t);if(i==null){const c=ee({},e);"__i18n"in a&&(c.__i18n=a.__i18n),r&&(c.__root=r),i=$t(c),s.__composerExtend&&(i[vt]=s.__composerExtend(i)),Yl(s,t,i),s.__setInstance(t,i)}return i}function Bl(e,t,n){const r=o.effectScope(),a=__VUE_I18N_LEGACY_API__&&t?r.run(()=>Gt(e)):r.run(()=>$t(e));if(a==null)throw ae(W.UNEXPECTED_ERROR);return[r,a]}function $l(e){const t=o.inject(e.isCE?xl:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw ae(e.isCE?W.NOT_INSTALLED_WITH_PROVIDE:W.UNEXPECTED_ERROR);return t}function ql(e,t){return lt(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Wl(e){return e.mode==="composition"?e.global:e.global.__composer}function Hl(e,t,n=!1){let r=null;const a=t.root;let l=Gl(t,n);for(;l!=null;){const s=e;if(e.mode==="composition")r=s.__getInstance(l);else if(__VUE_I18N_LEGACY_API__){const i=s.__getInstance(l);i!=null&&(r=i.__composer,n&&r&&!r[Eo]&&(r=null))}if(r!=null||a===l)break;l=l.parent}return r}function Gl(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Yl(e,t,n){let r=null;o.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&t.vnode.el){t.vnode.el.__VUE_I18N__=n,r=Ct();const a=n;a[Ae]&&a[Ae](r),r.on("*",Qe)}},t),o.onUnmounted(()=>{const a=n;process.env.NODE_ENV!=="production"&&t.vnode.el&&t.vnode.el.__VUE_I18N__&&(r&&r.off("*",Qe),a[Je]&&a[Je](),delete t.vnode.el.__VUE_I18N__),e.__deleteInstance(t);const l=a[vt];l&&(l(),delete a[vt])},t)}const jl=["locale","fallbackLocale","availableLocales"],Uo=["t","rt","d","n","tm","te"];function Kl(e,t){const n=Object.create(null);return jl.forEach(a=>{const l=Object.getOwnPropertyDescriptor(t,a);if(!l)throw ae(W.UNEXPECTED_ERROR);const s=o.isRef(l.value)?{get(){return l.value.value},set(i){l.value.value=i}}:{get(){return l.get&&l.get()}};Object.defineProperty(n,a,s)}),e.config.globalProperties.$i18n=n,Uo.forEach(a=>{const l=Object.getOwnPropertyDescriptor(t,a);if(!l||!l.value)throw ae(W.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${a}`,l)}),()=>{delete e.config.globalProperties.$i18n,Uo.forEach(a=>{delete e.config.globalProperties[`$${a}`]})}}if(fl(),Ua(_a),xa(Da),va(qn),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Oe();e.__INTLIFY__=!0,ga(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const xo={},Xl=["zh-CN","en-US"];for(const e of Xl)xo[e]=v.i18n.global.getLocaleMessage(e)||{};function Ze(e,t){const n={...e};for(const r in t)t[r]&&typeof t[r]=="object"&&!Array.isArray(t[r])?n[r]=Ze(e[r]||{},t[r]):n[r]=t[r];return n}const qe={},vo=["zh-CN","en-US"];for(const e of vo){let t=xo[e]||{};t=Ze(t,En[e]||{}),t=Ze(t,bn[e]||{}),t=Ze(t,bt[e]||{}),t=Ze(t,hn[e]||{}),qe[e]=t}const X=vl({legacy:!1,locale:"en-US",fallbackLocale:"en-US",messages:qe});function _t(){for(const n of vo)qe[n]&&(v.i18n.global.setLocaleMessage(n,qe[n]),typeof window<"u"&&window.__DEV__&&(console.log(`[inquirer-form] 已同步 ${n} 翻译到 agilebuilder-form`),console.log("[inquirer-form] 翻译键数量:",Object.keys(qe[n]).length),console.log("[inquirer-form] 包含的模块:",Object.keys(qe[n]))));const e=X.global.locale,t=typeof e=="string"?e:e.value;v.setLocale(t,!1)}_t();const Bo={install(e){e.use(X),_t()}};function we(){return{t:t=>{try{if(X&&X.global&&X.global.t){const n=X.global.t;return n(t)}}catch(n){console.warn("i18n not ready:",n)}return t}}}const De=o.defineComponent({__name:"BaseQuestionConfig",props:{label:{},field:{},message:{},description:{},placeholder:{},defaultValue:{},required:{type:Boolean},showPlaceholder:{type:Boolean,default:!0},showDefaultInput:{type:Boolean,default:!0}},emits:["update"],setup(e,{emit:t}){const{t:n}=we(),r=t;function a(l){r("update",{props:{message:l,label:l}})}return(l,s)=>(o.openBlock(),o.createBlock(pr,{label:e.label,field:e.field,onUpdate:s[0]||(s[0]=i=>r("update",i))},{default:o.withCtx(({updateProp:i})=>[o.createVNode(o.unref(v.TextSetting),{label:o.unref(n)("config.message"),"model-value":e.message,"onUpdate:modelValue":a},null,8,["label","model-value"]),o.createVNode(Er,{label:o.unref(n)("config.description"),"model-value":e.description,"min-rows":2,"max-rows":3,"onUpdate:modelValue":c=>i("description",c)},null,8,["label","model-value","onUpdate:modelValue"]),e.showPlaceholder?(o.openBlock(),o.createBlock(o.unref(v.TextSetting),{key:0,label:o.unref(n)("config.placeholder"),"model-value":e.placeholder,"onUpdate:modelValue":c=>i("placeholder",c)},null,8,["label","model-value","onUpdate:modelValue"])):o.createCommentVNode("",!0),o.renderSlot(l.$slots,"defaultValue",{updateProp:i},()=>[e.showDefaultInput?(o.openBlock(),o.createBlock(o.unref(v.TextSetting),{key:0,label:o.unref(n)("config.default_value"),"model-value":e.defaultValue,"onUpdate:modelValue":c=>i("defaultValue",c)},null,8,["label","model-value","onUpdate:modelValue"])):o.createCommentVNode("",!0)]),o.createVNode(o.unref(v.SwitchSetting),{label:o.unref(n)("config.required"),"model-value":e.required,"onUpdate:modelValue":c=>i("required",c)},null,8,["label","model-value","onUpdate:modelValue"]),o.renderSlot(l.$slots,"extra",{updateProp:i})]),_:3},8,["label","field"]))}}),Jl=o.defineComponent({__name:"config",props:{label:{},field:{},message:{},placeholder:{},defaultValue:{},required:{type:Boolean}},emits:["update"],setup(e,{emit:t}){const n=e,r=t;return(a,l)=>(o.openBlock(),o.createBlock(De,o.mergeProps(n,{onUpdate:l[0]||(l[0]=s=>r("update",s))}),null,16))}});function Ne(e){return`${e}_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function de(e,t){return{label:e,value:t??e}}var zl=o.defineComponent({name:"CircleCheck",__name:"circle-check",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),o.createElementVNode("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"})]))}}),Ql=zl,Zl=o.defineComponent({name:"Compass",__name:"compass",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),o.createElementVNode("path",{fill:"currentColor",d:"M725.888 315.008C676.48 428.672 624 513.28 568.576 568.64c-55.424 55.424-139.968 107.904-253.568 157.312a12.8 12.8 0 0 1-16.896-16.832c49.536-113.728 102.016-198.272 157.312-253.632 55.36-55.296 139.904-107.776 253.632-157.312a12.8 12.8 0 0 1 16.832 16.832"})]))}}),es=Zl,ts=o.defineComponent({name:"DataLine",__name:"data-line",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M359.168 768H160a32 32 0 0 1-32-32V192H64a32 32 0 0 1 0-64h896a32 32 0 1 1 0 64h-64v544a32 32 0 0 1-32 32H665.216l110.848 192h-73.856L591.36 768H433.024L322.176 960H248.32zM832 192H192v512h640zM342.656 534.656a32 32 0 1 1-45.312-45.312L444.992 341.76l125.44 94.08L679.04 300.032a32 32 0 1 1 49.92 39.936L581.632 524.224 451.008 426.24 342.656 534.592z"})]))}}),ns=ts,os=o.defineComponent({name:"EditPen",__name:"edit-pen",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64z"})]))}}),rs=os,as=o.defineComponent({name:"Expand",__name:"expand",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352 192 160-192 128z"})]))}}),ls=as,ss=o.defineComponent({name:"Finished",__name:"finished",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M280.768 753.728 691.456 167.04a32 32 0 1 1 52.416 36.672L314.24 817.472a32 32 0 0 1-45.44 7.296l-230.4-172.8a32 32 0 0 1 38.4-51.2zM736 448a32 32 0 1 1 0-64h192a32 32 0 1 1 0 64zM608 640a32 32 0 0 1 0-64h319.936a32 32 0 1 1 0 64zM480 832a32 32 0 1 1 0-64h447.936a32 32 0 1 1 0 64z"})]))}}),is=ss,cs=o.defineComponent({name:"List",__name:"list",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M704 192h160v736H160V192h160v64h384zM288 512h448v-64H288zm0 256h448v-64H288zm96-576V96h256v96z"})]))}}),us=cs,ms=o.defineComponent({name:"Lock",__name:"lock",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),o.createElementVNode("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}}),ds=ms,fs=o.defineComponent({name:"Memo",__name:"memo",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M480 320h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"}),o.createElementVNode("path",{fill:"currentColor",d:"M887.01 72.99C881.01 67 873.34 64 864 64H160c-9.35 0-17.02 3-23.01 8.99C131 78.99 128 86.66 128 96v832c0 9.35 2.99 17.02 8.99 23.01S150.66 960 160 960h704c9.35 0 17.02-2.99 23.01-8.99S896 937.34 896 928V96c0-9.35-3-17.02-8.99-23.01M192 896V128h96v768zm640 0H352V128h480z"}),o.createElementVNode("path",{fill:"currentColor",d:"M480 512h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32m0 192h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"})]))}}),ps=fs,_s=o.defineComponent({name:"Tickets",__name:"tickets",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h192v64H320zm0 384h384v64H320z"})]))}}),gs=_s;const ye={input:rs,password:ds,number:ns,confirm:Ql,list:us,rawList:gs,expand:ls,checkbox:is,editor:ps};function Es(){try{if(X?.global?.locale){const e=X.global.locale,t=typeof e=="string"?e:e.value;if(t==="en-US"||t==="en")return"en-US";if(t==="zh-CN"||t==="zh")return"zh-CN"}}catch{}if(typeof window<"u"){const e=document.documentElement.lang;if(e==="en-US"||e==="en")return"en-US"}return"zh-CN"}function hs(e){const t=Es(),n=e.split(".");let r=bt[t];for(const a of n)if(r&&typeof r=="object")r=r[a];else return e;return typeof r=="string"?r:e}function H(e,t){return hs(e)}const $o={type:"inq-input",category:"inputControl",label:"inq-input",icon:ye.input,isContainer:!1,initialSchema:()=>{const e=H("controls.input.message");return{id:Ne("inq_input"),type:"inq-input",field:"question_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"input",placeholder:H("controls.input.placeholder"),defaultValue:"",required:!0}}},designer:ur,runtime:dr,config:Jl,locales:{"zh-CN":{control:{"inq-input":{label:"输入"}}},"en-US":{control:{"inq-input":{label:"Input"}}}}},bs=o.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,r=t,{label:a,message:l,description:s,isActive:i}=o.toRefs(n);return(c,d)=>(o.openBlock(),o.createBlock(ge,{label:o.unref(a),message:o.unref(l),description:o.unref(s),"type-label":"Inquirer Password","is-active":o.unref(i),onSelect:d[0]||(d[0]=p=>r("select"))},null,8,["label","message","description","is-active"]))}}),Ns={class:"inquirer-password"},ys=oe(o.defineComponent({__name:"runtime",props:{modelValue:{},placeholder:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(r,a)=>(o.openBlock(),o.createElementBlock("div",Ns,[o.createVNode(o.unref(ne.ElInput),{"model-value":e.modelValue??"",placeholder:e.placeholder,disabled:e.disabled,type:"password","show-password":"","onUpdate:modelValue":a[0]||(a[0]=l=>n("update:modelValue",l??""))},null,8,["model-value","placeholder","disabled"])]))}}),[["__scopeId","data-v-2b3d544f"]]),Cs=o.defineComponent({__name:"config",props:{label:{},field:{},message:{},placeholder:{},defaultValue:{},required:{type:Boolean}},emits:["update"],setup(e,{emit:t}){const n=e,r=t;return(a,l)=>(o.openBlock(),o.createBlock(De,o.mergeProps(n,{onUpdate:l[0]||(l[0]=s=>r("update",s))}),null,16))}}),qo={type:"inq-password",category:"inputControl",label:"inq-password",icon:ye.password,isContainer:!1,initialSchema:()=>{const e=H("controls.password.message");return{id:Ne("inq_password"),type:"inq-password",field:"secret_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"password",placeholder:H("controls.password.placeholder"),defaultValue:"",required:!0}}},designer:bs,runtime:ys,config:Cs,locales:{"zh-CN":{control:{"inq-password":{label:"密码"}}},"en-US":{control:{"inq-password":{label:"Password"}}}}},Is=o.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,r=t,{label:a,message:l,description:s,isActive:i}=o.toRefs(n);return(c,d)=>(o.openBlock(),o.createBlock(ge,{label:o.unref(a),message:o.unref(l),description:o.unref(s),"type-label":"Inquirer Number","is-active":o.unref(i),onSelect:d[0]||(d[0]=p=>r("select"))},null,8,["label","message","description","is-active"]))}}),Ts={class:"number-runtime"},ks=oe(o.defineComponent({__name:"runtime",props:{modelValue:{},placeholder:{},disabled:{type:Boolean},min:{},max:{},step:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(r,a)=>(o.openBlock(),o.createElementBlock("div",Ts,[o.createVNode(o.unref(ne.ElInputNumber),{class:"number-runtime__input","model-value":e.modelValue,placeholder:e.placeholder,disabled:e.disabled,min:e.min,max:e.max,step:e.step||1,"controls-position":"right","onUpdate:modelValue":a[0]||(a[0]=l=>n("update:modelValue",l??void 0))},null,8,["model-value","placeholder","disabled","min","max","step"])]))}}),[["__scopeId","data-v-3dce2832"]]),Ls={class:"number-setting"},Ss=o.defineComponent({__name:"NumberSetting",props:{label:{},modelValue:{},min:{default:Number.NEGATIVE_INFINITY},max:{default:Number.POSITIVE_INFINITY},step:{default:1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(r,a)=>(o.openBlock(),o.createElementBlock("div",Ls,[o.createElementVNode("label",null,o.toDisplayString(e.label),1),o.createVNode(o.unref(ne.ElInputNumber),{"model-value":e.modelValue,min:e.min,max:e.max,step:e.step,"controls-position":"right","onUpdate:modelValue":a[0]||(a[0]=l=>n("update:modelValue",l??void 0))},null,8,["model-value","min","max","step"])]))}}),et=oe(Ss,[["__scopeId","data-v-9db53040"]]),Os=o.defineComponent({__name:"config",props:{label:{},field:{},message:{},defaultValue:{},required:{type:Boolean},min:{},max:{},step:{}},emits:["update"],setup(e,{emit:t}){const{t:n}=we(),r=e,a=t;return(l,s)=>(o.openBlock(),o.createBlock(De,o.mergeProps(r,{"show-placeholder":!1,onUpdate:s[0]||(s[0]=i=>a("update",i))}),{defaultValue:o.withCtx(({updateProp:i})=>[o.createVNode(et,{label:o.unref(n)("config.default_value"),"model-value":e.defaultValue,"onUpdate:modelValue":c=>i("defaultValue",c)},null,8,["label","model-value","onUpdate:modelValue"])]),extra:o.withCtx(({updateProp:i})=>[o.createVNode(et,{label:o.unref(n)("config.min"),"model-value":e.min,"onUpdate:modelValue":c=>i("min",c)},null,8,["label","model-value","onUpdate:modelValue"]),o.createVNode(et,{label:o.unref(n)("config.max"),"model-value":e.max,"onUpdate:modelValue":c=>i("max",c)},null,8,["label","model-value","onUpdate:modelValue"]),o.createVNode(et,{label:o.unref(n)("config.step"),"model-value":e.step,min:0,step:.1,"onUpdate:modelValue":c=>i("step",c)},null,8,["label","model-value","onUpdate:modelValue"])]),_:1},16))}}),Wo={type:"inq-number",category:"inputControl",label:"inq-number",icon:ye.number,isContainer:!1,initialSchema:()=>{const e=H("controls.number.message");return{id:Ne("inq_number"),type:"inq-number",field:"amount_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"number",defaultValue:0,min:0,max:100,step:1,required:!1}}},designer:Is,runtime:ks,config:Os,locales:{"zh-CN":{control:{"inq-number":{label:"数字"}}},"en-US":{control:{"inq-number":{label:"Number"}}}}},Vs=o.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,r=t,{label:a,message:l,description:s,isActive:i}=o.toRefs(n);return(c,d)=>(o.openBlock(),o.createBlock(ge,{label:o.unref(a),message:o.unref(l),description:o.unref(s),"type-label":"Inquirer Confirm","is-active":o.unref(i),onSelect:d[0]||(d[0]=p=>r("select"))},null,8,["label","message","description","is-active"]))}}),As={class:"confirm-runtime"},ws={class:"state"},Ds=oe(o.defineComponent({__name:"runtime",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;function r(a){n("update:modelValue",!!a)}return(a,l)=>(o.openBlock(),o.createElementBlock("div",As,[o.createVNode(o.unref(ne.ElSwitch),{"model-value":e.modelValue??!1,disabled:e.disabled,"onUpdate:modelValue":r},null,8,["model-value","disabled"]),o.createElementVNode("span",ws,o.toDisplayString(e.modelValue??!1?"Yes":"No"),1)]))}}),[["__scopeId","data-v-7ca30a23"]]),Ps=o.defineComponent({__name:"config",props:{label:{},field:{},message:{},defaultValue:{type:Boolean},required:{type:Boolean}},emits:["update"],setup(e,{emit:t}){const{t:n}=we(),r=e,a=t;return(l,s)=>(o.openBlock(),o.createBlock(De,o.mergeProps(r,{"show-placeholder":!1,onUpdate:s[0]||(s[0]=i=>a("update",i))}),{defaultValue:o.withCtx(({updateProp:i})=>[o.createVNode(o.unref(v.SwitchSetting),{label:o.unref(n)("config.defaultValueBoolean"),"model-value":e.defaultValue??!1,"onUpdate:modelValue":c=>i("defaultValue",c)},null,8,["label","model-value","onUpdate:modelValue"])]),_:1},16))}}),Ho={type:"inq-confirm",category:"inputControl",label:"inq-confirm",icon:ye.confirm,isContainer:!1,initialSchema:()=>{const e=H("controls.confirm.message");return{id:Ne("inq_confirm"),type:"inq-confirm",field:"confirm_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"confirm",defaultValue:!1,required:!1}}},designer:Vs,runtime:Ds,config:Ps,locales:{"zh-CN":{control:{"inq-confirm":{label:"确认"}}},"en-US":{control:{"inq-confirm":{label:"Confirm"}}}}},Rs=o.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean},choices:{}},emits:["select"],setup(e,{emit:t}){const n=e,r=t,{label:a,message:l,description:s,isActive:i,choices:c}=o.toRefs(n);return(d,p)=>(o.openBlock(),o.createBlock(ge,{label:o.unref(a),message:o.unref(l),description:o.unref(s),options:o.unref(c),"type-label":"Inquirer List","is-active":o.unref(i),onSelect:p[0]||(p[0]=y=>r("select"))},null,8,["label","message","description","options","is-active"]))}}),Ms={class:"inquirer-list"},Kt=oe(o.defineComponent({__name:"runtime",props:{modelValue:{},placeholder:{},disabled:{type:Boolean},choices:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,a=o.computed(()=>(n.choices??[]).map(l=>({label:l.label||l.value,value:l.value})));return(l,s)=>(o.openBlock(),o.createElementBlock("div",Ms,[o.createVNode(o.unref(ne.ElSelect),{class:"select-runtime","model-value":e.modelValue,placeholder:e.placeholder,disabled:e.disabled,filterable:"",clearable:"","onUpdate:modelValue":s[0]||(s[0]=i=>r("update:modelValue",i))},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,i=>(o.openBlock(),o.createBlock(o.unref(ne.ElOption),{key:i.value,label:i.label,value:i.value},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","disabled"])]))}}),[["__scopeId","data-v-e6f6ceb0"]]),Xt=o.defineComponent({__name:"config",props:{label:{},field:{},message:{},placeholder:{},required:{type:Boolean},choices:{},defaultChoice:{}},emits:["update"],setup(e,{emit:t}){const{t:n}=we(),r=e,a=t;return(l,s)=>(o.openBlock(),o.createBlock(De,o.mergeProps(r,{onUpdate:s[0]||(s[0]=i=>a("update",i))}),{extra:o.withCtx(({updateProp:i})=>[o.createVNode(o.unref(v.OptionsEditor),{label:o.unref(n)("config.options"),"model-value":e.choices,"onUpdate:modelValue":c=>i("choices",c)},null,8,["label","model-value","onUpdate:modelValue"]),o.createVNode(o.unref(v.TextSetting),{label:o.unref(n)("config.defaultOption"),"model-value":e.defaultChoice,"onUpdate:modelValue":c=>i("defaultChoice",c)},null,8,["label","model-value","onUpdate:modelValue"])]),_:1},16))}}),Go={type:"inq-list",category:"inputControl",label:"inq-list",icon:ye.list,isContainer:!1,initialSchema:()=>{const e=H("controls.list.message");return{id:Ne("inq_list"),type:"inq-list",field:"list_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"list",placeholder:H("controls.list.placeholder"),defaultChoice:"opt_1",choices:[de(H("controls.list.option")+" 1","opt_1"),de(H("controls.list.option")+" 2","opt_2")],required:!0}}},designer:Rs,runtime:Kt,config:Xt,locales:{"zh-CN":{control:{"inq-list":{label:"列表"}}},"en-US":{control:{"inq-list":{label:"List"}}}}},Fs=o.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean},choices:{}},emits:["select"],setup(e,{emit:t}){const n=e,r=t,{label:a,message:l,description:s,isActive:i,choices:c}=o.toRefs(n);return(d,p)=>(o.openBlock(),o.createBlock(ge,{label:o.unref(a),message:o.unref(l),description:o.unref(s),options:o.unref(c),"type-label":"Inquirer Raw List","is-active":o.unref(i),onSelect:p[0]||(p[0]=y=>r("select"))},null,8,["label","message","description","options","is-active"]))}}),Us={type:"inq-rawlist",category:"inputControl",label:"inq-rawlist",icon:ye.rawList,isContainer:!1,initialSchema:()=>{const e=H("controls.rawlist.message");return{id:Ne("inq_rawlist"),type:"inq-rawlist",field:"rawlist_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"rawlist",placeholder:H("controls.rawlist.placeholder"),defaultChoice:"opt_a",choices:[de(H("controls.rawlist.option")+" A","opt_a"),de(H("controls.rawlist.option")+" B","opt_b"),de(H("controls.rawlist.option")+" C","opt_c")],required:!0}}},designer:Fs,runtime:Kt,config:Xt,locales:{"zh-CN":{control:{"inq-rawlist":{label:"序号列表"}}},"en-US":{control:{"inq-rawlist":{label:"Raw List"}}}}},xs=o.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean},choices:{}},emits:["select"],setup(e,{emit:t}){const n=e,r=t,{label:a,message:l,description:s,isActive:i,choices:c}=o.toRefs(n);return(d,p)=>(o.openBlock(),o.createBlock(ge,{label:o.unref(a),message:o.unref(l),description:o.unref(s),options:o.unref(c),"type-label":"Inquirer Expand","is-active":o.unref(i),onSelect:p[0]||(p[0]=y=>r("select"))},null,8,["label","message","description","options","is-active"]))}}),vs={type:"inq-expand",category:"inputControl",label:"inq-expand",icon:ye.expand,isContainer:!1,initialSchema:()=>{const e=H("controls.expand.message");return{id:Ne("inq_expand"),type:"inq-expand",field:"expand_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"expand",defaultChoice:"opt_1",choices:[de(H("controls.expand.option")+" 1","opt_1"),de(H("controls.expand.option")+" 2","opt_2"),de(H("controls.expand.option")+" 3","opt_3")],required:!1}}},designer:xs,runtime:Kt,config:Xt,locales:{"zh-CN":{control:{"inq-expand":{label:"扩展列表"}}},"en-US":{control:{"inq-expand":{label:"Expand"}}}}},Bs=o.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean},choices:{}},emits:["select"],setup(e,{emit:t}){const n=e,r=t,{label:a,message:l,description:s,isActive:i,choices:c}=o.toRefs(n);return(d,p)=>(o.openBlock(),o.createBlock(ge,{label:o.unref(a),message:o.unref(l),description:o.unref(s),options:o.unref(c),"type-label":"Inquirer Checkbox","is-active":o.unref(i),onSelect:p[0]||(p[0]=y=>r("select"))},null,8,["label","message","description","options","is-active"]))}}),$s={class:"checkbox-wrapper"},qs=oe(o.defineComponent({__name:"runtime",props:{modelValue:{},disabled:{type:Boolean},choices:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,a=o.computed(()=>(n.choices??[]).map(l=>({label:l.label||l.value,value:l.value})));return(l,s)=>(o.openBlock(),o.createElementBlock("div",$s,[o.createVNode(o.unref(ne.ElCheckboxGroup),{class:"checkbox-runtime","model-value":e.modelValue||[],disabled:e.disabled,"onUpdate:modelValue":s[0]||(s[0]=i=>r("update:modelValue",i))},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,i=>(o.openBlock(),o.createBlock(o.unref(ne.ElCheckbox),{key:i.value,label:i.value},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(i.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["model-value","disabled"])]))}}),[["__scopeId","data-v-7f719bf9"]]),Ws={class:"multi-default"},Hs=oe(o.defineComponent({__name:"config",props:{label:{},field:{},message:{},required:{type:Boolean},choices:{},defaultChoices:{}},emits:["update"],setup(e,{emit:t}){const{t:n}=we(),r=e,a=t;return(l,s)=>(o.openBlock(),o.createBlock(De,o.mergeProps(r,{onUpdate:s[0]||(s[0]=i=>a("update",i))}),{defaultValue:o.withCtx(({updateProp:i})=>[o.createElementVNode("div",Ws,[o.createElementVNode("label",null,o.toDisplayString(o.unref(n)("config.defaultSelected")),1),o.createVNode(o.unref(ne.ElSelect),{multiple:"","collapse-tags":"","collapse-tags-tooltip":"","model-value":e.defaultChoices||[],"onUpdate:modelValue":c=>i("defaultChoices",c)},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.choices||[],c=>(o.openBlock(),o.createBlock(o.unref(ne.ElOption),{key:c.value,label:c.label,value:c.value},null,8,["label","value"]))),128))]),_:1},8,["model-value","onUpdate:modelValue"])])]),extra:o.withCtx(({updateProp:i})=>[o.createVNode(o.unref(v.OptionsEditor),{label:o.unref(n)("config.options"),"model-value":e.choices,"onUpdate:modelValue":c=>i("choices",c)},null,8,["label","model-value","onUpdate:modelValue"])]),_:1},16))}}),[["__scopeId","data-v-f2822676"]]),Yo={type:"inq-checkbox",category:"inputControl",label:"inq-checkbox",icon:ye.checkbox,isContainer:!1,initialSchema:()=>{const e=H("controls.checkbox.message");return{id:Ne("inq_checkbox"),type:"inq-checkbox",field:"checkbox_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"checkbox",choices:[de(H("controls.checkbox.option")+" 1","opt_1"),de(H("controls.checkbox.option")+" 2","opt_2"),de(H("controls.checkbox.option")+" 3","opt_3")],defaultChoices:["opt_1"],required:!1}}},designer:Bs,runtime:qs,config:Hs,locales:{"zh-CN":{control:{"inq-checkbox":{label:"多选"}}},"en-US":{control:{"inq-checkbox":{label:"Checkbox"}}}}},Gs=o.defineComponent({__name:"designer",props:{label:{},message:{},description:{},isActive:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,r=t,{label:a,message:l,description:s,isActive:i}=o.toRefs(n);return(c,d)=>(o.openBlock(),o.createBlock(ge,{label:o.unref(a),message:o.unref(l),description:o.unref(s),"type-label":"Inquirer Editor","is-active":o.unref(i),onSelect:d[0]||(d[0]=p=>r("select"))},null,8,["label","message","description","is-active"]))}}),Ys={class:"editor-runtime"},js=oe(o.defineComponent({__name:"runtime",props:{modelValue:{},placeholder:{},rows:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(r,a)=>(o.openBlock(),o.createElementBlock("div",Ys,[o.createVNode(o.unref(ne.ElInput),{type:"textarea",rows:e.rows||6,"model-value":e.modelValue??"",placeholder:e.placeholder,disabled:e.disabled,"onUpdate:modelValue":a[0]||(a[0]=l=>n("update:modelValue",l??""))},null,8,["rows","model-value","placeholder","disabled"])]))}}),[["__scopeId","data-v-177bbe2f"]]),Ks=o.defineComponent({__name:"config",props:{label:{},field:{},message:{},placeholder:{},defaultValue:{},required:{type:Boolean},rows:{}},emits:["update"],setup(e,{emit:t}){const{t:n}=we(),r=e,a=t;return(l,s)=>(o.openBlock(),o.createBlock(De,o.mergeProps(r,{onUpdate:s[0]||(s[0]=i=>a("update",i))}),{extra:o.withCtx(({updateProp:i})=>[o.createVNode(et,{label:o.unref(n)("config.rows"),"model-value":e.rows,min:2,max:20,"onUpdate:modelValue":c=>i("rows",c)},null,8,["label","model-value","onUpdate:modelValue"])]),_:1},16))}}),jo={type:"inq-editor",category:"inputControl",label:"inq-editor",icon:ye.editor,isContainer:!1,initialSchema:()=>{const e=H("controls.editor.message");return{id:Ne("inq_editor"),type:"inq-editor",field:"editor_"+Math.random().toString(36).slice(2,6),props:{label:e,message:e,promptType:"editor",placeholder:H("controls.editor.placeholder"),rows:6,defaultValue:"",required:!1}}},designer:Gs,runtime:js,config:Ks,locales:{"zh-CN":{control:{"inq-editor":{label:"长文本"}}},"en-US":{control:{"inq-editor":{label:"Editor"}}}}},Ko=[$o,qo,Wo,Ho,Go,Us,vs,Yo,jo];function Jt(){v.registry.replaceAll(Ko)}function Pe(e,t){const n=e.initialSchema();return{...n,...t,props:{...n.props,...t.props}}}function zt(e){const t=e||(n=>{try{if(X&&X.global&&X.global.t){const r=X.global.t;return r(n)}}catch(r){console.warn("i18n not ready:",r)}return n});return[Pe($o,{field:"fullName",props:{label:t("sample.fullName.message"),message:t("sample.fullName.message"),placeholder:t("sample.fullName.placeholder"),description:t("sample.fullName.description")}}),Pe(qo,{field:"accountPassword",props:{label:t("sample.password.message"),message:t("sample.password.message"),description:t("sample.password.description")}}),Pe(Wo,{field:"age",props:{label:t("sample.age.message"),message:t("sample.age.message"),min:0,max:120,required:!0,description:t("sample.age.description")}}),Pe(Ho,{field:"allowContact",props:{label:t("sample.allowContact.message"),message:t("sample.allowContact.message"),defaultValue:!0,description:t("sample.allowContact.description")}}),Pe(Go,{field:"favoriteStack",props:{label:t("sample.favoriteStack.message"),message:t("sample.favoriteStack.message"),defaultChoice:"ts",description:t("sample.favoriteStack.description")}}),Pe(Yo,{field:"tools",props:{label:t("sample.tools.message"),message:t("sample.tools.message"),defaultChoices:["git","eslint"],choices:[{label:t("sample.tools.choices.git"),value:"git"},{label:t("sample.tools.choices.eslint"),value:"eslint"},{label:t("sample.tools.choices.vite"),value:"vite"},{label:t("sample.tools.choices.vitest"),value:"vitest"}],description:t("sample.tools.description")}}),Pe(jo,{field:"bio",props:{label:t("sample.bio.message"),message:t("sample.bio.message"),rows:5,description:t("sample.bio.description")}})]}const Xo=o.defineComponent({name:"InquirerFormDesigner",__name:"InquirerFormDesigner",props:{engine:{},seedSample:{type:Boolean,default:!1},autoRegisterControls:{type:Boolean,default:!0}},setup(e){const t=e,n=new v.SchemaEngine,r=o.computed(()=>t.engine??n);let a=null;const l=t.autoRegisterControls;return l&&(a=[...v.registry.getAll()],Jt()),t.seedSample&&r.value.getSchema().controls.length===0&&(r.value.getSchema().controls=zt()),o.onBeforeUnmount(()=>{l&&a&&v.registry.replaceAll(a)}),(s,i)=>(o.openBlock(),o.createBlock(o.unref(v.FormDesigner),{engine:r.value},null,8,["engine"]))}}),Xs={"inq-input":"input","inq-password":"password","inq-number":"number","inq-confirm":"confirm","inq-list":"list","inq-rawlist":"rawlist","inq-expand":"expand","inq-checkbox":"checkbox","inq-editor":"editor"},Js=["list","rawlist","expand","checkbox"];function Jo(e){const t=e.props?.promptType;return t||(Xs[e.type]??null)}function zs(e){return Js.includes(e)}function Qt(e){const t=Jo(e);if(!t)return;const n=e.props||{};if(t==="confirm")return typeof n.defaultValue=="boolean"?n.defaultValue:!1;if(t==="checkbox")return Array.isArray(n.defaultChoices)?n.defaultChoices:Array.isArray(n.defaultValue)?n.defaultValue:[];if(t==="number"){const r=Number(n.defaultValue);return Number.isNaN(r)?void 0:r}if((t==="list"||t==="rawlist"||t==="expand")&&typeof n.defaultChoice=="string")return n.defaultChoice;if(n.defaultValue!==void 0&&n.defaultValue!==null)return n.defaultValue;if(t==="input"||t==="password"||t==="editor")return""}function Qs(e,t){return!0}function zo(e,t){return e.props?.required?t==null||t===""?H("runtime.pleaseInput"):Array.isArray(t)&&t.length===0?H("runtime.pleaseSelect"):null:null}function Zs(e,t){if(!t.field||e[t.field]!==void 0)return;const n=Qt(t);n!==void 0&&(e[t.field]=n)}function ei(e){if(typeof e.props?.description=="string"&&e.props.description.trim().length>0)return e.props.description.trim()}const ti={key:0,class:"inquirer-container"},ni={key:0,class:"node-description"},oi={key:1,class:"node-error"},ri=oe(o.defineComponent({name:"InquirerRuntimeNode",__name:"InquirerRuntimeNode",props:{node:{},formData:{}},emits:["update"],setup(e,{emit:t}){const{t:n}=we(),r=e,a=t,l=o.computed(()=>v.registry.get(r.node.type)),s=o.computed(()=>l.value?.runtime||null),i=o.computed(()=>r.formData||{}),c=o.computed(()=>{if(r.node.field)return i.value[r.node.field]}),d=o.computed(()=>ei(r.node)),p=o.ref(null),y=o.computed(()=>Qs(r.node,i.value));o.watch(y,S=>{!S&&r.node.field&&i.value[r.node.field]!==void 0&&(a("update",r.node.field,void 0),p.value=null)},{immediate:!0}),o.watch(()=>c.value,S=>{p.value=zo(r.node,S)},{immediate:!0});function h(S){r.node.field&&(a("update",r.node.field,S),p.value=zo(r.node,S))}const V=o.computed(()=>typeof r.node.props?.message=="string"&&r.node.props.message.trim()?r.node.props.message:typeof r.node.props?.label=="string"&&r.node.props.label.trim()?r.node.props.label:r.node.field||n("runtime.unnamedControl")),A=o.computed(()=>l.value?.isContainer??!1);function O(S,f){a("update",S,f)}return(S,f)=>{const _=o.resolveComponent("InquirerRuntimeNode",!0);return y.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[A.value?(o.openBlock(),o.createElementBlock("div",ti,[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(s.value),o.normalizeProps(o.guardReactiveProps(e.node.props)),{default:o.withCtx(()=>[e.node.children&&e.node.children.length?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(e.node.children,C=>(o.openBlock(),o.createBlock(_,{key:C.id,node:C,formData:e.formData,onUpdate:O},null,8,["node","formData"]))),128)):o.createCommentVNode("",!0)]),_:1},16))])):(o.openBlock(),o.createBlock(o.unref(v.FormItemWrapper),{key:1,label:V.value},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(s.value),o.mergeProps(e.node.props,{modelValue:c.value,"onUpdate:modelValue":h}),{default:o.withCtx(()=>[e.node.children&&e.node.children.length?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(e.node.children,C=>(o.openBlock(),o.createBlock(_,{key:C.id,node:C,formData:e.formData,onUpdate:O},null,8,["node","formData"]))),128)):o.createCommentVNode("",!0)]),_:1},16,["modelValue"])),d.value?(o.openBlock(),o.createElementBlock("p",ni,o.toDisplayString(d.value),1)):o.createCommentVNode("",!0),p.value?(o.openBlock(),o.createElementBlock("p",oi,o.toDisplayString(p.value),1)):o.createCommentVNode("",!0)]),_:1},8,["label"]))],64)):o.createCommentVNode("",!0)}}}),[["__scopeId","data-v-5ba69eed"]]),ai={class:"inquirer-web-runtime"},li={key:0,class:"runtime-empty"},Zt=oe(o.defineComponent({name:"InquirerFormRuntime",__name:"InquirerFormRuntime",props:{schema:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=d=>{try{if(X&&X.global&&X.global.t){const p=X.global.t;return p(d)}}catch(p){console.warn("i18n not ready:",p)}return d},r=e,a=t,l=o.ref({...r.modelValue||{}});o.watch(()=>r.modelValue,d=>{l.value={...d||{}}},{deep:!0}),o.watch(()=>r.schema.controls,()=>{s()},{deep:!0,immediate:!0});function s(){i(r.schema.controls),a("update:modelValue",{...l.value})}function i(d){d&&d.forEach(p=>{Zs(l.value,p),p.children?.length&&i(p.children)})}function c(d,p){p===void 0?delete l.value[d]:l.value[d]=p,a("update:modelValue",{...l.value})}return(d,p)=>(o.openBlock(),o.createElementBlock("div",ai,[o.createVNode(o.unref(ne.ElForm),{class:"form-content","label-position":"top",model:l.value},{default:o.withCtx(()=>[!e.schema.controls||e.schema.controls.length===0?(o.openBlock(),o.createElementBlock("div",li,o.toDisplayString(n("runtime.emptyForm")),1)):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(e.schema.controls,y=>(o.openBlock(),o.createBlock(ri,{key:y.id,node:y,formData:l.value,onUpdate:c},null,8,["node","formData"]))),128))]),_:1},8,["model"])]))}}),[["__scopeId","data-v-115a0bf6"]]);function Qo(e,t={}){const n=[];function r(a){a&&a.forEach(l=>{const s=si(l,t);s&&n.push(s),l.children?.length&&r(l.children)})}return r(e.controls),n}function si(e,t){const n=Jo(e);if(!n||e.props?.disabled&&!t.includeDisabled)return null;const r=e.field?.trim()||e.props?.alias||e.id,a=e.props?.message?.trim()||e.props?.label||r,l=Qt(e),s={type:n,name:r,message:a,default:l,choices:ii(n,e.props),metadata:{schemaNodeId:e.id,label:e.props?.label,placeholder:e.props?.placeholder,required:!!e.props?.required,inquirerType:n,description:e.props?.description}};return n==="checkbox"&&(s.metadata={...s.metadata,defaultChoices:Array.isArray(e.props?.defaultChoices)?e.props.defaultChoices:void 0}),n==="number"&&(s.metadata={...s.metadata,min:gt(e.props?.min),max:gt(e.props?.max),step:gt(e.props?.step)}),n==="editor"&&(s.metadata={...s.metadata,rows:gt(e.props?.rows)}),s}function ii(e,t={}){if(!zs(e))return;const n=t.choices;return!Array.isArray(n)||n.length===0?[]:n.filter(r=>typeof r?.label=="string"&&typeof r?.value=="string").map(r=>({name:r.label,value:r.value,short:ci(r.short)}))}function ci(e){if(typeof e!="string")return;const t=e.trim();return t.length?t:void 0}function gt(e){if(e==null)return;const t=Number(e);return Number.isNaN(t)?void 0:t}const ui={class:"inquirer-demo"},mi={class:"callout-panel"},di={class:"callout-header"},fi={class:"callout-title"},pi={class:"callout-actions"},_i={class:"demo-workspace"},gi={class:"workspace-tabs"},Ei=["onClick"],hi={class:"workspace-panel designer-panel"},bi={class:"workspace-panel runtime-panel"},Ni={class:"runtime-json"},yi={class:"workspace-panel export-panel"},Ci={class:"panel-header"},Ii={class:"json-viewer"},Ti={class:"code-snippet"},Zo=oe(o.defineComponent({__name:"InquirerFormPlayground",setup(e){const t=k=>{try{if(X&&X.global&&X.global.t){const I=X.global.t;return I(k)}}catch(I){console.warn("i18n not ready:",I)}return k},n=new v.SchemaEngine;n.updateInfo({title:"Inquirer Form Definition",description:""});const r=[...v.registry.getAll()];Jt(),o.onMounted(()=>{n.getSchema().controls.length||O()}),o.onBeforeUnmount(()=>{v.registry.replaceAll(r)});const a=o.ref({}),l=o.ref(0),s=o.ref(0),i=o.computed(()=>[{key:"designer",label:t("playground.tabs.designer.label"),desc:t("playground.tabs.designer.desc")},{key:"runtime",label:t("playground.tabs.runtime.label"),desc:t("playground.tabs.runtime.desc")},{key:"export",label:t("playground.tabs.export.label"),desc:t("playground.tabs.export.desc")}]),c=o.ref(i.value[0]?.key??"designer");o.watch(c,(k,I)=>{k==="runtime"&&I!=="runtime"&&d()});function d(){const k={},I=n.getSchema().controls;function E(P){P.forEach(M=>{if(M.field){const Y=Qt(M);Y!==void 0&&(k[M.field]=Y)}M.children?.length&&E(M.children)})}I?.length&&E(I),a.value=k}const p=o.computed(()=>Qo(n.getSchema())),y=o.computed(()=>JSON.stringify(p.value,null,2)),h=o.computed(()=>JSON.stringify(a.value,null,2));function V(){l.value++,s.value++}function A(k){const I=n.getSchema().controls;I.splice(0,I.length,...k),n.selectNode(void 0),n.snapshot("update"),V()}function O(){A(zt(t))}function S(){A([]),a.value={}}async function f(k,I){try{await navigator.clipboard.writeText(k),alert(`${I} ${t("playground.messages.copied")}`)}catch(E){console.warn("clipboard failed",E)}}function _(){f(v.serialize(n.getSchema()),"Schema JSON")}function C(){f(y.value,"Inquirer JSON")}const b=o.computed(()=>`import inquirer from 'inquirer'
|
|
8
6
|
import { schemaToInquirer } from 'inquirer-form'
|
|
9
7
|
|
|
10
8
|
const questions = schemaToInquirer(schema)
|
|
11
9
|
const answers = await inquirer.prompt(questions)
|
|
12
|
-
console.log(answers)`);return(
|
|
10
|
+
console.log(answers)`);return(k,I)=>(o.openBlock(),o.createElementBlock("div",ui,[o.createElementVNode("section",mi,[o.createElementVNode("div",di,[o.createElementVNode("div",fi,[o.createVNode(o.unref(ne.ElIcon),{class:"title-icon"},{default:o.withCtx(()=>[o.createVNode(o.unref(es))]),_:1}),o.createElementVNode("div",null,[o.createElementVNode("h1",null,o.toDisplayString(t("playground.title")),1),o.createElementVNode("p",null,o.toDisplayString(t("playground.subtitle")),1)])]),o.createElementVNode("div",pi,[o.createElementVNode("button",{type:"button",onClick:O},o.toDisplayString(t("playground.actions.generateSample")),1),o.createElementVNode("button",{type:"button",onClick:S},o.toDisplayString(t("playground.actions.clearForm")),1),o.createElementVNode("button",{type:"button",onClick:_},o.toDisplayString(t("playground.actions.copySchema")),1),o.createElementVNode("button",{type:"button",onClick:C},o.toDisplayString(t("playground.actions.copyInquirer")),1)])])]),o.createElementVNode("main",_i,[o.createElementVNode("div",gi,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,E=>(o.openBlock(),o.createElementBlock("button",{key:E.key,class:o.normalizeClass(["tab-item",{active:E.key===c.value}]),onClick:P=>c.value=E.key},[o.createElementVNode("span",null,o.toDisplayString(E.label),1),o.createElementVNode("small",null,o.toDisplayString(E.desc),1)],10,Ei))),128))]),o.withDirectives(o.createElementVNode("section",hi,[(o.openBlock(),o.createBlock(o.unref(v.FormDesigner),{showControlTabs:!1,key:l.value,engine:o.unref(n)},null,8,["engine"]))],512),[[o.vShow,c.value==="designer"]]),o.withDirectives(o.createElementVNode("section",bi,[(o.openBlock(),o.createBlock(Zt,{key:s.value,schema:o.unref(n).getSchema(),modelValue:a.value,"onUpdate:modelValue":I[0]||(I[0]=E=>a.value=E)},null,8,["schema","modelValue"])),o.createElementVNode("div",Ni,[o.createElementVNode("header",null,o.toDisplayString(t("playground.runtime.formDataTitle")),1),o.createElementVNode("pre",null,o.toDisplayString(h.value),1)])],512),[[o.vShow,c.value==="runtime"]]),o.withDirectives(o.createElementVNode("section",yi,[o.createElementVNode("div",Ci,[I[1]||(I[1]=o.createElementVNode("div",null,null,-1)),o.createElementVNode("button",{class:"btn-copy",onClick:C},o.toDisplayString(t("playground.export.copyButton")),1)]),o.createElementVNode("pre",Ii,o.toDisplayString(y.value),1),o.createElementVNode("div",Ti,[o.createElementVNode("header",null,o.toDisplayString(t("playground.export.exampleTitle")),1),o.createElementVNode("pre",null,[o.createElementVNode("code",null,o.toDisplayString(b.value),1)])])],512),[[o.vShow,c.value==="export"]])])]))}}),[["__scopeId","data-v-a655250f"]]),ki={install(e){_t(),e.config.globalProperties.$i18n||e.use(Bo),e.component("InquirerFormDesigner",Xo),e.component("InquirerFormRuntime",Zt),e.component("InquirerFormPlayground",Zo)}};Z.InquirerFormDesigner=Xo,Z.InquirerFormPlayground=Zo,Z.InquirerFormRuntime=Zt,Z.createInquirerSampleControls=zt,Z.default=ki,Z.inquirerControls=Ko,Z.inquirerFormI18n=X,Z.inquirerFormI18nPlugin=Bo,Z.registerInquirerControls=Jt,Z.schemaToInquirer=Qo,Z.syncMessagesToAgForm=_t,Object.defineProperties(Z,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|