pome-ui 2.0.0-preview15 → 2.0.0-preview17
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/package.json +1 -1
- package/pome-ui.dev.js +35 -4
- package/pome-ui.dev.min.js +1 -1
- package/pome-ui.js +35 -4
- package/pome-ui.min.js +1 -1
package/package.json
CHANGED
package/pome-ui.dev.js
CHANGED
|
@@ -17943,8 +17943,24 @@ function build(options, exports) {
|
|
|
17943
17943
|
opt.watch = {};
|
|
17944
17944
|
}
|
|
17945
17945
|
|
|
17946
|
-
opt.watch.title
|
|
17947
|
-
|
|
17946
|
+
if (!opt.watch.title) {
|
|
17947
|
+
opt.watch.title = function () { };
|
|
17948
|
+
}
|
|
17949
|
+
|
|
17950
|
+
|
|
17951
|
+
var func9 = opt.watch.title;
|
|
17952
|
+
opt.watch.title = async function () {
|
|
17953
|
+
var p1 = func9.call(this);
|
|
17954
|
+
if (!p1 || !p1 instanceof Promise) {
|
|
17955
|
+
p1 = Promise.resolve();
|
|
17956
|
+
}
|
|
17957
|
+
|
|
17958
|
+
var self = this;
|
|
17959
|
+
return p1.then(function () {
|
|
17960
|
+
var p2 = Promise.resolve();
|
|
17961
|
+
self.pomeUiPassTitle();
|
|
17962
|
+
return p2;
|
|
17963
|
+
});
|
|
17948
17964
|
};
|
|
17949
17965
|
|
|
17950
17966
|
for (let i = 0; i < exports._addins.length; ++i) {
|
|
@@ -18165,13 +18181,28 @@ function build(options, exports) {
|
|
|
18165
18181
|
}
|
|
18166
18182
|
}
|
|
18167
18183
|
|
|
18168
|
-
var func7 = opt.
|
|
18169
|
-
opt.
|
|
18184
|
+
var func7 = opt.created;
|
|
18185
|
+
opt.created = async function () {
|
|
18170
18186
|
var p1 = func7.call(this);
|
|
18171
18187
|
if (!p1 || !p1 instanceof Promise) {
|
|
18172
18188
|
p1 = Promise.resolve();
|
|
18173
18189
|
}
|
|
18174
18190
|
|
|
18191
|
+
var self = this;
|
|
18192
|
+
return p1.then(function () {
|
|
18193
|
+
var p2 = Promise.resolve();
|
|
18194
|
+
self.pomeUiPassTitle();
|
|
18195
|
+
return p2;
|
|
18196
|
+
});
|
|
18197
|
+
};
|
|
18198
|
+
|
|
18199
|
+
var func8 = opt.unmounted;
|
|
18200
|
+
opt.unmounted = async function () {
|
|
18201
|
+
var p1 = func8.call(this);
|
|
18202
|
+
if (!p1 || !p1 instanceof Promise) {
|
|
18203
|
+
p1 = Promise.resolve();
|
|
18204
|
+
}
|
|
18205
|
+
|
|
18175
18206
|
var self = this;
|
|
18176
18207
|
return p1.then(function () {
|
|
18177
18208
|
var p2 = Promise.resolve();
|
package/pome-ui.dev.min.js
CHANGED
|
@@ -26,4 +26,4 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
26
26
|
`,0);c()}if(!u){s(`return `)}if(t.codegenNode){nh(t.codegenNode,n)}else{s(`null`)}if(d){l();s(`}`)}l();s(`}`);return{ast:t,code:n.code,preamble:h?m.code:``,map:n.map?n.map.toJSON():void 0}}function Xd(e,t){const{ssr:n,prefixIdentifiers:o,push:s,newline:i,runtimeModuleName:r,runtimeGlobalName:l,ssrRuntimeModuleName:c}=t;const a=l;const u=Array.from(e.helpers);if(u.length>0){{s(`const _Vue = ${a}
|
|
27
27
|
`,-1);if(e.hoists.length){const f=[Tf,Af,$f,Ef,Nf].filter(e=>u.includes(e)).map(Kd).join(", ");s(`const { ${f} } = _Vue
|
|
28
28
|
`,-1)}}}Qd(e.hoists,t);i();s(`return `)}function Yd(n,o,{helper:e,push:s,newline:i,isTS:r}){const l=e(o==="component"?Of:If);for(let t=0;t<n.length;t++){let e=n[t];const c=e.endsWith("__self");if(c){e=e.slice(0,-6)}s(`const ${Xp(e,o)} = ${l}(${JSON.stringify(e)}${c?`, true`:``})${r?`!`:``}`);if(t<n.length-1){i()}}}function Qd(t,n){if(!t.length){return}n.pure=true;const{push:o,newline:s,helper:e,scopeId:i,mode:r}=n;s();for(let e=0;e<t.length;e++){const l=t[e];if(l){o(`const _hoisted_${e+1} = ${``}`);nh(l,n);s()}}n.pure=false}function Zd(e){return k(e)||e.type===4||e.type===2||e.type===5||e.type===8}function eh(e,t){const n=e.length>3||e.some(e=>D(e)||!Zd(e));t.push(`[`);n&&t.indent();th(e,t,n);n&&t.deindent();t.push(`]`)}function th(t,n,o=false,s=true){const{push:i,newline:r}=n;for(let e=0;e<t.length;e++){const l=t[e];if(k(l)){i(l,-3)}else if(D(l)){eh(l,n)}else{nh(l,n)}if(e<t.length-1){if(o){s&&i(",");r()}else{s&&i(", ")}}}}function nh(e,t){if(k(e)){t.push(e,-3);return}if(J(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:Lp(e.codegenNode!=null,`Codegen node is missing for element/if/for node. Apply appropriate transforms first.`);nh(e.codegenNode,t);break;case 2:oh(e,t);break;case 4:sh(e,t);break;case 5:ih(e,t);break;case 12:nh(e.codegenNode,t);break;case 8:rh(e,t);break;case 3:ch(e,t);break;case 13:ah(e,t);break;case 14:fh(e,t);break;case 15:ph(e,t);break;case 17:dh(e,t);break;case 18:hh(e,t);break;case 19:mh(e,t);break;case 20:gh(e,t);break;case 21:th(e.body,t,true,false);break;case 22:break;case 23:break;case 24:break;case 25:break;case 26:break;case 10:break;default:{Lp(false,`unhandled codegen node type: ${e.type}`);const n=e;return n}}}function oh(e,t){t.push(JSON.stringify(e.content),-3,e)}function sh(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,-3,e)}function ih(e,t){const{push:n,helper:o,pure:s}=t;if(s)n(Wd);n(`${o(Uf)}(`);nh(e.content,t);n(`)`)}function rh(t,n){for(let e=0;e<t.children.length;e++){const o=t.children[e];if(k(o)){n.push(o,-3)}else{nh(o,n)}}}function lh(e,t){const{push:n}=t;if(e.type===8){n(`[`);rh(e,t);n(`]`)}else if(e.isStatic){const o=Op(e.content)?e.content:JSON.stringify(e.content);n(o,-2,e)}else{n(`[${e.content}]`,-3,e)}}function ch(e,t){const{push:n,helper:o,pure:s}=t;if(s){n(Wd)}n(`${o($f)}(${JSON.stringify(e.content)})`,-3,e)}function ah(e,t){const{push:n,helper:o,pure:s}=t;const{tag:i,props:r,children:l,patchFlag:c,dynamicProps:a,directives:u,isBlock:f,disableTracking:p,isComponent:d}=e;if(u){n(o(Mf)+`(`)}if(f){n(`(${o(Sf)}(${p?`true`:``}), `)}if(s){n(Wd)}const h=f?gp(t.inSSR,d):mp(t.inSSR,d);n(o(h)+`(`,-2,e);th(uh([i,r,l,c,a]),t);n(`)`);if(f){n(`)`)}if(u){n(`, `);nh(u,t);n(`)`)}}function uh(e){let t=e.length;while(t--){if(e[t]!=null)break}return e.slice(0,t+1).map(e=>e||`null`)}function fh(e,t){const{push:n,helper:o,pure:s}=t;const i=k(e.callee)?e.callee:o(e.callee);if(s){n(Wd)}n(i+`(`,-2,e);th(e.arguments,t);n(`)`)}function ph(e,t){const{push:n,indent:o,deindent:s,newline:i}=t;const{properties:r}=e;if(!r.length){n(`{}`,-2,e);return}const l=r.length>1||r.some(e=>e.value.type!==4);n(l?`{`:`{ `);l&&o();for(let e=0;e<r.length;e++){const{key:c,value:a}=r[e];lh(c,t);n(`: `);nh(a,t);if(e<r.length-1){n(`,`);i()}}l&&s();n(l?`}`:` }`)}function dh(e,t){eh(e.elements,t)}function hh(e,t){const{push:n,indent:o,deindent:s}=t;const{params:i,returns:r,body:l,newline:c,isSlot:a}=e;if(a){n(`_${op[Qf]}(`)}n(`(`,-2,e);if(D(i)){th(i,t)}else if(i){nh(i,t)}n(`) => `);if(c||l){n(`{`);o()}if(r){if(c){n(`return `)}if(D(r)){eh(r,t)}else{nh(r,t)}}else if(l){nh(l,t)}if(c||l){s();n(`}`)}if(a){n(`)`)}}function mh(e,t){const{test:n,consequent:o,alternate:s,newline:i}=e;const{push:r,indent:l,deindent:c,newline:a}=t;if(n.type===4){const f=!Op(n.content);f&&r(`(`);sh(n,t);f&&r(`)`)}else{r(`(`);nh(n,t);r(`)`)}i&&l();t.indentLevel++;i||r(` `);r(`? `);nh(o,t);t.indentLevel--;i&&a();i||r(` `);r(`: `);const u=s.type===19;if(!u){t.indentLevel++}nh(s,t);if(!u){t.indentLevel--}i&&c(true)}function gh(e,t){const{push:n,helper:o,indent:s,deindent:i,newline:r}=t;n(`_cache[${e.index}] || (`);if(e.isVNode){s();n(`${o(Jf)}(-1),`);r()}n(`_cache[${e.index}] = `);nh(e.value,t);if(e.isVNode){n(`,`);r();n(`${o(Jf)}(1),`);r();n(`_cache[${e.index}]`);i()}n(`)`)}const vh=new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const yh=/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;function bh(n,o,e=false,t=false){const s=n.content;if(!s.trim()){return}try{new Function(t?` ${s} `:`return ${e?`(${s}) => {}`:`(${s})`}`)}catch(e){let t=e.message;const i=s.replace(yh,"").match(vh);if(i){t=`avoid using JavaScript keyword as property name: "${i[0]}"`}o.onError(K(45,n.loc,void 0,t))}}const _h=(t,n)=>{if(t.type===5){t.content=xh(t.content,n)}else if(t.type===1){for(let e=0;e<t.props.length;e++){const o=t.props[e];if(o.type===7&&o.name!=="for"){const s=o.exp;const i=o.arg;if(s&&s.type===4&&!(o.name==="on"&&i)){o.exp=xh(s,n,o.name==="slot")}if(i&&i.type===4&&!i.isStatic){o.arg=xh(i,n)}}}}};function xh(e,t,n=false,o=false,s=Object.create(t.identifiers)){{{bh(e,t,n,o)}return e}}const wh=zd(/^(if|else|else-if)$/,(e,t,l)=>{return Sh(e,t,l,(t,n,o)=>{const e=l.parent.children;let s=e.indexOf(t);let i=0;while(s-- >=0){const r=e[s];if(r&&r.type===9){i+=r.branches.length}}return()=>{if(o){t.codegenNode=kh(n,i,l)}else{const e=$h(t.codegenNode);e.alternate=kh(n,i+t.branches.length-1,l)}}})});function Sh(t,n,o,s){if(n.name!=="else"&&(!n.exp||!n.exp.content.trim())){const e=n.exp?n.exp.loc:t.loc;o.onError(K(28,n.loc));n.exp=z(`true`,false,e)}if(n.exp){bh(n.exp,o)}if(n.name==="if"){const i=Ch(t,n);const r={type:9,loc:t.loc,branches:[i]};o.replaceNode(r);if(s){return s(r,i,true)}}else{const l=o.parent.children;const c=[];let e=l.indexOf(t);while(e-- >=-1){const a=l[e];if(a&&a.type===3){o.removeNode(a);c.unshift(a);continue}if(a&&a.type===2&&!a.content.trim().length){o.removeNode(a);continue}if(a&&a.type===9){if(n.name==="else-if"&&a.branches[a.branches.length-1].condition===void 0){o.onError(K(30,t.loc))}o.removeNode();const i=Ch(t,n);if(c.length&&!(o.parent&&o.parent.type===1&&(o.parent.tag==="transition"||o.parent.tag==="Transition"))){i.children=[...c,...i.children]}{const f=i.userKey;if(f){a.branches.forEach(({userKey:e})=>{if(Ah(e,f)){o.onError(K(29,i.userKey.loc))}})}}a.branches.push(i);const u=s&&s(a,i,false);qd(i,o);if(u)u();o.currentNode=null}else{o.onError(K(30,t.loc))}break}}}function Ch(e,t){const n=e.tagType===3;return{type:10,loc:e.loc,condition:t.name==="else"?void 0:t.exp,children:n&&!jp(e,"for")?e.children:[e],userKey:Up(e,`key`),isTemplateIf:n}}function kh(e,t,n){if(e.condition){return pp(e.condition,Th(e,t,n),W(n.helper($f),['"v-if"',"true"]))}else{return Th(e,t,n)}}function Th(n,e,o){const{helper:s}=o;const i=q(`key`,z(`${e}`,false,ip,2));const{children:r}=n;const t=r[0];const l=r.length!==1||t.type!==1;if(l){if(r.length===1&&t.type===11){const c=t.codegenNode;Gp(c,i,o);return c}else{let e=64;let t=de[64];if(!n.isTemplateIf&&r.filter(e=>e.type!==3).length===1){e|=2048;t+=`, ${de[2048]}`}return lp(o,s(yf),ap([i]),r,e+` /* ${t} */`,void 0,void 0,true,false,false,n.loc)}}else{const a=t.codegenNode;const c=Yp(a);if(c.type===13){vp(c,o)}Gp(c,i,o);return a}}function Ah(e,t){if(!e||e.type!==t.type){return false}if(e.type===6){if(e.value.content!==t.value.content){return false}}else{const n=e.exp;const o=t.exp;if(n.type!==o.type){return false}if(n.type!==4||n.isStatic!==o.isStatic||n.content!==o.content){return false}}return true}function $h(e){while(true){if(e.type===19){if(e.alternate.type===19){e=e.alternate}else{return e}}else if(e.type===20){e=e.value}}}const Eh=zd("for",(p,e,d)=>{const{helper:h,removeHelper:m}=d;return Nh(p,e,d,i=>{const r=W(h(Ff),[i.source]);const l=qp(p);const c=jp(p,"memo");const e=Up(p,`key`);const a=e&&(e.type===6?z(e.value.content,true):e.exp);const u=e?q(`key`,a):null;const f=i.source.type===4&&i.source.constType>0;const t=f?64:e?128:256;i.codegenNode=lp(d,h(yf),void 0,r,t+` /* ${de[t]} */`,void 0,void 0,true,!f,false,p.loc);return()=>{let e;const{children:t}=i;if(l){p.children.some(e=>{if(e.type===1){const t=Up(e,"key");if(t){d.onError(K(33,t.loc));return true}}})}const n=t.length!==1||t[0].type!==1;const o=zp(p)?p:l&&p.children.length===1&&zp(p.children[0])?p.children[0]:null;if(o){e=o.codegenNode;if(l&&u){Gp(e,u,d)}}else if(n){e=lp(d,h(yf),u?ap([u]):void 0,p.children,64+` /* ${de[64]} */`,void 0,void 0,true,void 0,false)}else{e=t[0].codegenNode;if(l&&u){Gp(e,u,d)}if(e.isBlock!==!f){if(e.isBlock){m(Sf);m(gp(d.inSSR,e.isComponent))}else{m(mp(d.inSSR,e.isComponent))}}e.isBlock=!f;if(e.isBlock){h(Sf);h(gp(d.inSSR,e.isComponent))}else{h(mp(d.inSSR,e.isComponent))}}if(c){const s=fp(Ph(i.parseResult,[z(`_cached`)]));s.body=hp([up([`const _memo = (`,c.exp,`)`]),up([`if (_cached`,...a?[` && _cached.key === `,a]:[],` && ${d.helperString(np)}(_cached, _memo)) return _cached`]),up([`const _item = `,e]),z(`_item.memo = _memo`),z(`return _item`)]);r.arguments.push(s,z(`_cache`),z(String(d.cached++)))}else{r.arguments.push(fp(Ph(i.parseResult),e,true))}}})});function Nh(e,t,n,o){if(!t.exp){n.onError(K(31,t.loc));return}const s=t.forParseResult;if(!s){n.onError(K(32,t.loc));return}Oh(s,n);const{addIdentifiers:i,removeIdentifiers:r,scopes:l}=n;const{source:c,value:a,key:u,index:f}=s;const p={type:11,loc:t.loc,source:c,valueAlias:a,keyAlias:u,objectIndexAlias:f,parseResult:s,children:qp(e)?e.children:[e]};n.replaceNode(p);l.vFor++;const d=o&&o(p);return()=>{l.vFor--;if(d)d()}}function Oh(e,t){if(e.finalized)return;{bh(e.source,t);if(e.key){bh(e.key,t,true)}if(e.index){bh(e.index,t,true)}if(e.value){bh(e.value,t,true)}}e.finalized=true}function Ph({value:e,key:t,index:n},o=[]){return Ih([e,t,n,...o])}function Ih(e){let t=e.length;while(t--){if(e[t])break}return e.slice(0,t+1).map((e,t)=>e||z(`_`.repeat(t+1),false))}const Rh=z(`undefined`,false);const Mh=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const n=jp(e,"slot");if(n){n.exp;t.scopes.vSlot++;return()=>{t.scopes.vSlot--}}}};const Fh=(e,t,n,o)=>fp(e,n,false,true,n.length?n[0].loc:o);function Lh(e,i,r=Fh){i.helper(Qf);const{children:l,loc:o}=e;const c=[];const a=[];let u=i.scopes.vSlot>0||i.scopes.vFor>0;const f=jp(e,"slot",true);if(f){const{arg:s,exp:v}=f;if(s&&!$p(s)){u=true}c.push(q(s||z("default",true),r(v,void 0,l,o)))}let p=false;let d=false;const h=[];const m=new Set;let g=0;for(let s=0;s<l.length;s++){const y=l[s];let e;if(!qp(y)||!(e=jp(y,"slot",true))){if(y.type!==3){h.push(y)}continue}if(f){i.onError(K(37,e.loc));break}p=true;const{children:b,loc:_}=y;const{arg:x=z(`default`,true),exp:w,loc:S}=e;let t;if($p(x)){t=x?x.content:`default`}else{u=true}const C=jp(y,"for");const k=r(w,C,b,_);let n;let o;if(n=jp(y,"if")){u=true;a.push(pp(n.exp,jh(x,k,g++),Rh))}else if(o=jp(y,/^else(-if)?$/,true)){let e=s;let t;while(e--){t=l[e];if(t.type!==3){break}}if(t&&qp(t)&&jp(t,"if")){l.splice(s,1);s--;let e=a[a.length-1];while(e.alternate.type===19){e=e.alternate}e.alternate=o.exp?pp(o.exp,jh(x,k,g++),Rh):jh(x,k,g++)}else{i.onError(K(30,o.loc))}}else if(C){u=true;const T=C.forParseResult;if(T){Oh(T,i);a.push(W(i.helper(Ff),[T.source,fp(Ph(T),jh(x,k),true)]))}else{i.onError(K(32,C.loc))}}else{if(t){if(m.has(t)){i.onError(K(38,S));continue}m.add(t);if(t==="default"){d=true}}c.push(q(x,k))}}if(!f){const A=(e,t)=>{const n=r(e,void 0,t,o);return q(`default`,n)};if(!p){c.push(A(void 0,l))}else if(h.length&&h.some(e=>Vh(e))){if(d){i.onError(K(39,h[0].loc))}else{c.push(A(void 0,h))}}}const t=u?2:Uh(e.children)?3:1;let n=ap(c.concat(q(`_`,z(t+` /* ${he[t]} */`,false))),o);if(a.length){n=W(i.helper(jf),[n,cp(a)])}return{slots:n,hasDynamicSlots:u}}function jh(e,t,n){const o=[q(`name`,e),q(`fn`,t)];if(n!=null){o.push(q(`key`,z(String(n),true)))}return ap(o)}function Uh(t){for(let e=0;e<t.length;e++){const n=t[e];switch(n.type){case 1:if(n.tagType===2||Uh(n.children)){return true}break;case 9:if(Uh(n.branches))return true;break;case 10:case 11:if(Uh(n.children))return true;break}}return false}function Vh(e){if(e.type!==2&&e.type!==12)return true;return e.type===2?!!e.content.trim():Vh(e.content)}const Dh=new WeakMap;const Bh=(S,C)=>{return function e(){S=C.currentNode;if(!(S.type===1&&(S.tagType===0||S.tagType===1))){return}const{tag:t,props:n}=S;const o=S.tagType===1;let s=o?Hh(S,C):`"${t}"`;const i=H(s)&&s.callee===Pf;let r;let l;let c;let a=0;let u;let f;let p;let d=i||s===bf||s===_f||!o&&(t==="svg"||t==="foreignObject");if(n.length>0){const h=qh(S,C,void 0,o,i);r=h.props;a=h.patchFlag;f=h.dynamicPropNames;const m=h.directives;p=m&&m.length?cp(m.map(e=>Kh(e,C))):void 0;if(h.shouldUseBlock){d=true}}if(S.children.length>0){if(s===xf){d=true;a|=1024;if(S.children.length>1){C.onError(K(46,{start:S.children[0].loc.start,end:S.children[S.children.length-1].loc.end,source:""}))}}const g=o&&s!==bf&&s!==xf;if(g){const{slots:v,hasDynamicSlots:y}=Lh(S,C);l=v;if(y){a|=1024}}else if(S.children.length===1&&s!==bf){const b=S.children[0];const _=b.type;const x=_===5||_===8;if(x&&Rd(b,C)===0){a|=1}if(x||_===2){l=b}else{l=S.children}}else{l=S.children}}if(a!==0){{if(a<0){c=a+` /* ${de[a]} */`}else{const w=Object.keys(de).map(Number).filter(e=>e>0&&a&e).map(e=>de[e]).join(`, `);c=a+` /* ${w} */`}}if(f&&f.length){u=Gh(f)}}S.codegenNode=lp(C,s,r,l,c,u,p,!!d,false,o,S.loc)}};function Hh(e,t,n=false){let{tag:o}=e;const s=Jh(o);const i=Up(e,"is");if(i){if(s||false){const l=i.type===6?i.value&&z(i.value.content,true):i.exp;if(l){return W(t.helper(Pf),[l])}}else if(i.type===6&&i.value.content.startsWith("vue:")){o=i.value.content.slice(4)}}const r=Ep(o)||t.isBuiltInComponent(o);if(r){if(!n)t.helper(r);return r}t.helper(Of);t.components.add(o);return Xp(o,`component`)}function qh(t,s,n=t.props,i,F,o=false){const{tag:r,loc:l,children:L}=t;let c=[];const a=[];const u=[];const f=L.length>0;let p=false;let d=0;let h=false;let m=false;let g=false;let v=false;let y=false;let b=false;const _=[];const x=e=>{if(c.length){a.push(ap(zh(c),l));c=[]}if(e)a.push(e)};const j=({key:e,value:t})=>{if($p(e)){const n=e.content;const o=G(n);if(o&&(!i||F)&&n.toLowerCase()!=="onclick"&&n!=="onUpdate:modelValue"&&!ie(n)){v=true}if(o&&ie(n)){b=true}if(o&&t.type===14){t=t.arguments[0]}if(t.type===20||(t.type===4||t.type===8)&&Rd(t,s)>0){return}if(n==="ref"){h=true}else if(n==="class"){m=true}else if(n==="style"){g=true}else if(n!=="key"&&!_.includes(n)){_.push(n)}if(i&&(n==="class"||n==="style")&&!_.includes(n)){_.push(n)}}else{y=true}};for(let e=0;e<n.length;e++){const S=n[e];if(S.type===6){const{loc:C,name:k,nameLoc:U,value:T}=S;let e=true;if(k==="ref"){h=true;if(s.scopes.vFor>0){c.push(q(z("ref_for",true),z("true")))}}if(k==="is"&&(Jh(r)||T&&T.content.startsWith("vue:")||false)){continue}c.push(q(z(k,true,U),z(T?T.content:"",e,T?T.loc:C)))}else{const{name:k,arg:A,exp:$,loc:C,modifiers:V}=S;const E=k==="bind";const N=k==="on";if(k==="slot"){if(!i){s.onError(K(40,C))}continue}if(k==="once"||k==="memo"){continue}if(k==="is"||E&&Vp(A,"is")&&(Jh(r)||false)){continue}if(N&&o){continue}if(E&&Vp(A,"key")||N&&f&&Vp(A,"vue:before-update")){p=true}if(E&&Vp(A,"ref")&&s.scopes.vFor>0){c.push(q(z("ref_for",true),z("true")))}if(!A&&(E||N)){y=true;if($){if(E){x();a.push($)}else{x({type:14,loc:C,callee:s.helper(zf),arguments:i?[$]:[$,`true`]})}}else{s.onError(K(E?34:35,C))}continue}if(E&&V.includes("prop")){d|=32}const O=s.directiveTransforms[k];if(O){const{props:P,needRuntime:I}=O(S,t,s);!o&&P.forEach(j);if(N&&A&&!$p(A)){x(ap(P,l))}else{c.push(...P)}if(I){u.push(S);if(J(I)){Dh.set(S,I)}}}else if(!re(k)){u.push(S);if(f){p=true}}}}let w=void 0;if(a.length){x();if(a.length>1){w=W(s.helper(Vf),a,l)}else{w=a[0]}}else if(c.length){w=ap(zh(c),l)}if(y){d|=16}else{if(m&&!i){d|=2}if(g&&!i){d|=4}if(_.length){d|=8}if(v){d|=32}}if(!p&&(d===0||d===32)&&(h||b||u.length>0)){d|=512}if(!s.inSSR&&w){switch(w.type){case 15:let t=-1;let n=-1;let o=false;for(let e=0;e<w.properties.length;e++){const M=w.properties[e].key;if($p(M)){if(M.content==="class"){t=e}else if(M.content==="style"){n=e}}else if(!M.isHandlerKey){o=true}}const e=w.properties[t];const R=w.properties[n];if(!o){if(e&&!$p(e.value)){e.value=W(s.helper(Df),[e.value])}if(R&&(g||R.value.type===4&&R.value.content.trim()[0]===`[`||R.value.type===17)){R.value=W(s.helper(Bf),[R.value])}}else{w=W(s.helper(Hf),[w])}break;case 14:break;default:w=W(s.helper(Hf),[W(s.helper(qf),[w])]);break}}return{props:w,directives:u,patchFlag:d,dynamicPropNames:_,shouldUseBlock:p}}function zh(t){const n=new Map;const o=[];for(let e=0;e<t.length;e++){const s=t[e];if(s.key.type===8||!s.key.isStatic){o.push(s);continue}const i=s.key.content;const r=n.get(i);if(r){if(i==="style"||i==="class"||G(i)){Wh(r,s)}}else{n.set(i,s);o.push(s)}}return o}function Wh(e,t){if(e.value.type===17){e.value.elements.push(t.value)}else{e.value=cp([e.value,t.value],e.loc)}}function Kh(e,t){const n=[];const o=Dh.get(e);if(o){n.push(t.helperString(o))}else{{t.helper(If);t.directives.add(e.name);n.push(Xp(e.name,`directive`))}}const{loc:s}=e;if(e.exp)n.push(e.exp);if(e.arg){if(!e.exp){n.push(`void 0`)}n.push(e.arg)}if(Object.keys(e.modifiers).length){if(!e.arg){if(!e.exp){n.push(`void 0`)}n.push(`void 0`)}const i=z(`true`,false,s);n.push(ap(e.modifiers.map(e=>q(e,i)),s))}return cp(n,e.loc)}function Gh(n){let o=`[`;for(let e=0,t=n.length;e<t;e++){o+=JSON.stringify(n[e]);if(e<t-1)o+=", "}return o+`]`}function Jh(e){return e==="component"||e==="Component"}const Xh=(t,n)=>{if(zp(t)){const{children:o,loc:s}=t;const{slotName:i,slotProps:r}=Yh(t,n);const l=[n.prefixIdentifiers?`_ctx.$slots`:`$slots`,i,"{}","undefined","true"];let e=2;if(r){l[2]=r;e=3}if(o.length){l[3]=fp([],o,false,false,s);e=4}if(n.scopeId&&!n.slotted){e=5}l.splice(e);t.codegenNode=W(n.helper(Lf),l,s)}};function Yh(n,e){let o=`"default"`;let t=void 0;const s=[];for(let t=0;t<n.props.length;t++){const e=n.props[t];if(e.type===6){if(e.value){if(e.name==="name"){o=JSON.stringify(e.value.content)}else{e.name=T(e.name);s.push(e)}}}else{if(e.name==="bind"&&Vp(e.arg,"name")){if(e.exp)o=e.exp}else{if(e.name==="bind"&&e.arg&&$p(e.arg)){e.arg.content=T(e.arg.content)}s.push(e)}}}if(s.length>0){const{props:i,directives:r}=qh(n,e,s,false,false);t=i;if(r.length){e.onError(K(36,r[0].loc))}}return{slotName:o,slotProps:t}}const Qh=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;const Zh=(e,t,n,o)=>{const{loc:s,modifiers:i,arg:r}=e;if(!e.exp&&!i.length){n.onError(K(35,s))}let l;if(r.type===4){if(r.isStatic){let e=r.content;if(e.startsWith("vnode")){n.onError(K(51,r.loc))}if(e.startsWith("vue:")){e=`vnode-${e.slice(4)}`}const f=t.tagType!==0||e.startsWith("vnode")||!/[A-Z]/.test(e)?U(T(e)):`on:${e}`;l=z(f,true,r.loc)}else{l=up([`${n.helperString(Gf)}(`,r,`)`])}}else{l=r;l.children.unshift(`${n.helperString(Gf)}(`);l.children.push(`)`)}let c=e.exp;if(c&&!c.content.trim()){c=void 0}let a=n.cacheHandlers&&!c&&!n.inVOnce;if(c){const p=Fp(c.content);const d=!(p||Qh.test(c.content));const h=c.content.includes(`;`);{bh(c,n,false,h)}if(d||a&&p){c=up([`${d?`$event`:`${``}(...args)`} => ${h?`{`:`(`}`,c,h?`}`:`)`])}}let u={props:[q(l,c||z(`() => {}`,false,s))]};if(o){u=o(u)}if(a){u.props[0].value=n.cache(u.props[0].value)}u.props.forEach(e=>e.key.isHandlerKey=true);return u};const em=(e,t,n)=>{const{modifiers:o,loc:s}=e;const i=e.arg;let{exp:r}=e;if(!r&&i.type===4){const l=T(i.content);r=e.exp=z(l,false,i.loc)}if(i.type!==4){i.children.unshift(`(`);i.children.push(`) || ""`)}else if(!i.isStatic){i.content=`${i.content} || ""`}if(o.includes("camel")){if(i.type===4){if(i.isStatic){i.content=T(i.content)}else{i.content=`${n.helperString(Wf)}(${i.content})`}}else{i.children.unshift(`${n.helperString(Wf)}(`);i.children.push(`)`)}}if(!n.inSSR){if(o.includes("prop")){tm(i,".")}if(o.includes("attr")){tm(i,"^")}}if(!r||r.type===4&&!r.content.trim()){n.onError(K(34,s));return{props:[q(i,z("",true,s))]}}return{props:[q(i,r)]}};const tm=(e,t)=>{if(e.type===4){if(e.isStatic){e.content=t+e.content}else{e.content=`\`${t}\${${e.content}}\``}}else{e.children.unshift(`'${t}' + (`);e.children.push(`)`)}};const nm=(r,l)=>{if(r.type===0||r.type===1||r.type===11||r.type===10){return()=>{const n=r.children;let o=void 0;let e=false;for(let t=0;t<n.length;t++){const s=n[t];if(Bp(s)){e=true;for(let e=t+1;e<n.length;e++){const i=n[e];if(Bp(i)){if(!o){o=n[t]=up([s],s.loc)}o.children.push(` + `,i);n.splice(e,1);e--}else{o=void 0;break}}}}if(!e||n.length===1&&(r.type===0||r.type===1&&r.tagType===0&&!r.props.find(e=>e.type===7&&!l.directiveTransforms[e.name])&&true)){return}for(let e=0;e<n.length;e++){const s=n[e];if(Bp(s)||s.type===8){const t=[];if(s.type!==2||s.content!==" "){t.push(s)}if(!l.ssr&&Rd(s,l)===0){t.push(1+` /* ${de[1]} */`)}n[e]={type:12,content:s,loc:s.loc,codegenNode:W(l.helper(Ef),t)}}}}}};const om=new WeakSet;const sm=(e,t)=>{if(e.type===1&&jp(e,"once",true)){if(om.has(e)||t.inVOnce||t.inSSR){return}om.add(e);t.inVOnce=true;t.helper(Jf);return()=>{t.inVOnce=false;const e=t.currentNode;if(e.codegenNode){e.codegenNode=t.cache(e.codegenNode,true)}}}};const im=(e,t,n)=>{const{exp:o,arg:s}=e;if(!o){n.onError(K(41,e.loc));return rm()}const i=o.loc.source;const r=o.type===4?o.content:i;const l=n.bindingMetadata[i];if(l==="props"||l==="props-aliased"){n.onError(K(44,o.loc));return rm()}const c=false;if(!r.trim()||!Fp(r)&&!c){n.onError(K(42,o.loc));return rm()}const a=s?s:z("modelValue",true);const u=s?$p(s)?`onUpdate:${T(s.content)}`:up(['"onUpdate:" + ',s]):`onUpdate:modelValue`;let f;const p=n.isTS?`($event: any)`:`$event`;{f=up([`${p} => ((`,o,`) = $event)`])}const d=[q(a,e.exp),q(u,f)];if(e.modifiers.length&&t.tagType===1){const h=e.modifiers.map(e=>(Op(e)?e:JSON.stringify(e))+`: true`).join(`, `);const m=s?$p(s)?`${s.content}Modifiers`:up([s,' + "Modifiers"']):`modelModifiers`;d.push(q(m,z(`{ ${h} }`,false,e.loc,2)))}return rm(d)};function rm(e=[]){return{props:e}}const lm=new WeakSet;const cm=(t,n)=>{if(t.type===1){const o=jp(t,"memo");if(!o||lm.has(t)){return}lm.add(t);return()=>{const e=t.codegenNode||n.currentNode.codegenNode;if(e&&e.type===13){if(t.tagType!==1){vp(e,n)}t.codegenNode=W(n.helper(tp),[o.exp,fp(void 0,e),`_cache`,String(n.cached++)])}}}};function am(e){return[[sm,wh,cm,Eh,...[],...[_h],Xh,Bh,Mh,nm],{on:Zh,bind:em,model:im}]}function um(e,t={}){const n=t.onError||kp;const o=t.mode==="module";{if(t.prefixIdentifiers===true){n(K(47))}else if(o){n(K(48))}}const s=false;if(t.cacheHandlers){n(K(49))}if(t.scopeId&&!o){n(K(50))}const i=E({},t,{prefixIdentifiers:s});const r=k(e)?Nd(e,i):e;const[l,c]=am();Dd(r,E({},i,{nodeTransforms:[...l,...t.nodeTransforms||[]],directiveTransforms:E({},c,t.directiveTransforms||{})}));return Jd(r,i)}const fm=()=>({props:[]});const pm=Symbol(`vModelRadio`);const dm=Symbol(`vModelCheckbox`);const hm=Symbol(`vModelText`);const mm=Symbol(`vModelSelect`);const gm=Symbol(`vModelDynamic`);const vm=Symbol(`vOnModifiersGuard`);const ym=Symbol(`vOnKeysGuard`);const bm=Symbol(`vShow`);const _m=Symbol(`Transition`);const xm=Symbol(`TransitionGroup`);sp({[pm]:`vModelRadio`,[dm]:`vModelCheckbox`,[hm]:`vModelText`,[mm]:`vModelSelect`,[gm]:`vModelDynamic`,[vm]:`withModifiers`,[ym]:`withKeys`,[bm]:`vShow`,[_m]:`Transition`,[xm]:`TransitionGroup`});let wm;function Sm(e,t=false){if(!wm){wm=document.createElement("div")}if(t){wm.innerHTML=`<div foo="${e.replace(/"/g,""")}">`;return wm.children[0].getAttribute("foo")}else{wm.innerHTML=e;return wm.textContent}}const Cm={parseMode:"html",isVoidTag:Re,isNativeTag:e=>Oe(e)||Pe(e)||Ie(e),isPreTag:e=>e==="pre",decodeEntities:Sm,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition"){return _m}else if(e==="TransitionGroup"||e==="transition-group"){return xm}},getNamespace(e,t,n){let o=t?t.ns:n;if(t&&o===2){if(t.tag==="annotation-xml"){if(e==="svg"){return 1}if(t.props.some(e=>e.type===6&&e.name==="encoding"&&e.value!=null&&(e.value.content==="text/html"||e.value.content==="application/xhtml+xml"))){o=0}}else if(/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"){o=0}}else if(t&&o===1){if(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title"){o=0}}if(o===0){if(e==="svg"){return 1}if(e==="math"){return 2}}return o}};const km=n=>{if(n.type===1){n.props.forEach((e,t)=>{if(e.type===6&&e.name==="style"&&e.value){n.props[t]={type:7,name:`bind`,arg:z(`style`,true,e.loc),exp:Tm(e.value.content,e.loc),modifiers:[],loc:e.loc}}})}};const Tm=(e,t)=>{const n=Se(e);return z(JSON.stringify(n),false,t,3)};function Am(e,t){return K(e,t,$m)}const $m={[53]:`v-html is missing expression.`,[54]:`v-html will override element children.`,[55]:`v-text is missing expression.`,[56]:`v-text will override element children.`,[57]:`v-model can only be used on <input>, <textarea> and <select> elements.`,[58]:`v-model argument is not supported on plain elements.`,[59]:`v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,[60]:`Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,[61]:`v-show is missing expression.`,[62]:`<Transition> expects exactly one child element or component.`,[63]:`Tags with side effect (<script> and <style>) are ignored in client component templates.`};const Em=(e,t,n)=>{const{exp:o,loc:s}=e;if(!o){n.onError(Am(53,s))}if(t.children.length){n.onError(Am(54,s));t.children.length=0}return{props:[q(z(`innerHTML`,true,s),o||z("",true))]}};const Nm=(e,t,n)=>{const{exp:o,loc:s}=e;if(!o){n.onError(Am(55,s))}if(t.children.length){n.onError(Am(56,s));t.children.length=0}return{props:[q(z(`textContent`,true),o?Rd(o,n)>0?o:W(n.helperString(Uf),[o],s):z("",true))]}};const Om=(n,o,s)=>{const i=im(n,o,s);if(!i.props.length||o.tagType===1){return i}if(n.arg){s.onError(Am(58,n.arg.loc))}function r(){const e=jp(o,"bind");if(e&&Vp(e.arg,"value")){s.onError(Am(60,e.loc))}}const{tag:l}=o;const c=s.isCustomElement(l);if(l==="input"||l==="textarea"||l==="select"||c){let e=hm;let t=false;if(l==="input"||c){const a=Up(o,`type`);if(a){if(a.type===7){e=gm}else if(a.value){switch(a.value.content){case"radio":e=pm;break;case"checkbox":e=dm;break;case"file":t=true;s.onError(Am(59,n.loc));break;default:r();break}}}else if(Dp(o)){e=gm}else{r()}}else if(l==="select"){e=mm}else{r()}if(!t){i.needRuntime=s.helper(e)}}else{s.onError(Am(57,n.loc))}i.props=i.props.filter(e=>!(e.key.type===4&&e.key.content==="modelValue"));return i};const Pm=t(`passive,once,capture`);const Im=t(`stop,prevent,self,ctrl,shift,alt,meta,exact,middle`);const Rm=t("left,right");const Mm=t(`onkeyup,onkeydown,onkeypress`,true);const Fm=(t,n,e,o)=>{const s=[];const i=[];const r=[];for(let e=0;e<n.length;e++){const l=n[e];if(Pm(l)){r.push(l)}else{if(Rm(l)){if($p(t)){if(Mm(t.content)){s.push(l)}else{i.push(l)}}else{s.push(l);i.push(l)}}else{if(Im(l)){i.push(l)}else{s.push(l)}}}}return{keyModifiers:s,nonKeyModifiers:i,eventOptionModifiers:r}};const Lm=(e,t)=>{const n=$p(e)&&e.content.toLowerCase()==="onclick";return n?z(t,true):e.type!==4?up([`(`,e,`) === "onClick" ? "${t}" : (`,e,`)`]):e};const jm=(c,e,a)=>{return Zh(c,e,a,e=>{const{modifiers:t}=c;if(!t.length)return e;let{key:n,value:o}=e.props[0];const{keyModifiers:s,nonKeyModifiers:i,eventOptionModifiers:r}=Fm(n,t,a,c.loc);if(i.includes("right")){n=Lm(n,`onContextmenu`)}if(i.includes("middle")){n=Lm(n,`onMouseup`)}if(i.length){o=W(a.helper(vm),[o,JSON.stringify(i)])}if(s.length&&(!$p(n)||Mm(n.content))){o=W(a.helper(ym),[o,JSON.stringify(s)])}if(r.length){const l=r.map(j).join("");n=$p(n)?z(`${n.content}${l}`,true):up([`(`,n,`) + "${l}"`])}return{props:[q(n,o)]}})};const Um=(e,t,n)=>{const{exp:o,loc:s}=e;if(!o){n.onError(Am(61,s))}return{props:[],needRuntime:n.helper(bm)}};const Vm=(n,e)=>{if(n.type===1&&n.tagType===1){const t=e.isBuiltInComponent(n.tag);if(t===_m){return()=>{if(!n.children.length){return}if(Dm(n)){e.onError(Am(62,{start:n.children[0].loc.start,end:n.children[n.children.length-1].loc.end,source:""}))}const t=n.children[0];if(t.type===1){for(const e of t.props){if(e.type===7&&e.name==="show"){n.props.push({type:6,name:"persisted",nameLoc:n.loc,value:void 0,loc:n.loc})}}}}}}};function Dm(e){const t=e.children=e.children.filter(e=>e.type!==3&&!(e.type===2&&!e.content.trim()));const n=t[0];return t.length!==1||n.type===11||n.type===9&&n.branches.some(Dm)}const Bm=(e,t)=>{if(e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")){t.onError(Am(63,e.loc));t.removeNode()}};const Hm=[km,...[Vm]];const qm={cloak:fm,html:Em,text:Nm,model:Om,on:jm,show:Um};function zm(e,t={}){return um(e,E({},Cm,t,{nodeTransforms:[Bm,...Hm,...t.nodeTransforms||[]],directiveTransforms:E({},qm,t.directiveTransforms||{}),transformHoist:null}))}{vf()}const Wm=new WeakMap;function Km(e){let t=Wm.get(e!=null?e:X);if(!t){t=Object.create(null);Wm.set(e!=null?e:X,t)}return t}function Gm(s,e){if(!k(s)){if(s.nodeType){s=s.innerHTML}else{p(`invalid template option: `,s);return Y}}const t=s;const n=Km(e);const o=n[t];if(o){return o}if(s[0]==="#"){const a=document.querySelector(s);if(!a){p(`Template element not found or is empty: ${s}`)}s=a?a.innerHTML:``}const i=E({hoistStatic:true,onError:l,onWarn:e=>l(e,true)},e);if(!i.isCustomElement&&typeof customElements!=="undefined"){i.isCustomElement=e=>!!customElements.get(e)}const{code:r}=zm(s,i);function l(e,t=false){const n=t?e.message:`Template compilation error: ${e.message}`;const o=e.loc&&ye(s,e.loc.start.offset,e.loc.end.offset);p(o?`${n}
|
|
29
|
-
${o}`:n)}const c=new Function(r)();c._rc=true;return n[t]=c}zc(Gm);e.BaseTransition=fi;e.BaseTransitionPropsValidators=ai;e.Comment=te;e.DeprecationTypes=ga;e.EffectScope=Je;e.ErrorCodes=to;e.ErrorTypeStrings=ua;e.Fragment=ee;e.KeepAlive=Ci;e.ReactiveEffect=tt;e.Static=Yl;e.Suspense=Is;e.Teleport=Gl;e.Text=Xl;e.TrackOpTypes=qn;e.Transition=ka;e.TransitionGroup=Ou;e.TriggerOpTypes=zn;e.VueElement=Su;e.assertNumber=eo;e.callWithAsyncErrorHandling=so;e.callWithErrorHandling=oo;e.camelize=T;e.capitalize=j;e.cloneVNode=yc;e.compatUtils=ma;e.compile=Gm;e.computed=oa;e.createApp=uf;e.createBlock=rc;e.createCommentVNode=wc;e.createElementBlock=ic;e.createElementVNode=mc;e.createHydrationRenderer=Pl;e.createPropsRestProxy=yr;e.createRenderer=Ol;e.createSSRApp=ff;e.createSlots=zi;e.createStaticVNode=xc;e.createTextVNode=_c;e.createVNode=ne;e.customRef=jn;e.defineAsyncComponent=_i;e.defineComponent=yi;e.defineCustomElement=_u;e.defineEmits=rr;e.defineExpose=lr;e.defineModel=ur;e.defineOptions=cr;e.defineProps=ir;e.defineSSRCustomElement=xu;e.defineSlots=ar;e.devtools=fa;e.effect=rt;e.effectScope=Xe;e.getCurrentInstance=Oc;e.getCurrentScope=Qe;e.getTransitionRawChildren=vi;e.guardReactiveProps=vc;e.h=ia;e.handleError=io;e.hasInjectionContext=Br;e.hydrate=af;e.initCustomFormatter=ra;e.initDirectivesForSSR=gf;e.inject=Dr;e.isMemoSame=ca;e.isProxy=_n;e.isReactive=vn;e.isReadonly=yn;e.isRef=C;e.isRuntimeOnly=Wc;e.isShallow=bn;e.isVNode=lc;e.markRaw=xn;e.mergeDefaults=gr;e.mergeModels=vr;e.mergeProps=Tc;e.nextTick=vo;e.normalizeClass=ke;e.normalizeProps=Te;e.normalizeStyle=be;e.onActivated=Ti;e.onBeforeMount=Ri;e.onBeforeUnmount=ji;e.onBeforeUpdate=Fi;e.onDeactivated=Ai;e.onErrorCaptured=Hi;e.onMounted=Mi;e.onRenderTracked=Bi;e.onRenderTriggered=Di;e.onScopeDispose=Ze;e.onServerPrefetch=Vi;e.onUnmounted=Ui;e.onUpdated=Li;e.openBlock=ec;e.popScopeId=cs;e.provide=Vr;e.proxyRefs=Fn;e.pushScopeId=ls;e.queuePostFlushCb=wo;e.reactive=pn;e.readonly=hn;e.ref=$n;e.registerRuntimeCompiler=zc;e.render=cf;e.renderList=qi;e.renderSlot=Wi;e.resolveComponent=Cs;e.resolveDirective=As;e.resolveDynamicComponent=Ts;e.resolveFilter=ha;e.resolveTransitionHooks=di;e.setBlockTracking=oc;e.setDevtoolsHook=pa;e.setTransitionHooks=gi;e.shallowReactive=dn;e.shallowReadonly=mn;e.shallowRef=En;e.ssrContextKey=zs;e.ssrUtils=da;e.stop=lt;e.toDisplayString=qe;e.toHandlerKey=U;e.toHandlers=Gi;e.toRaw=b;e.toRef=Bn;e.toRefs=Un;e.toValue=Rn;e.transformVNodeArgs=uc;e.triggerRef=Pn;e.unref=In;e.useAttrs=dr;e.useCssModule=Cu;e.useCssVars=Ka;e.useModel=sa;e.useSSRContext=Ws;e.useSlots=pr;e.useTransitionState=li;e.vModelCheckbox=Du;e.vModelDynamic=Gu;e.vModelRadio=Hu;e.vModelSelect=qu;e.vModelText=Vu;e.vShow=qa;e.version=aa;e.warn=p;e.watch=Ys;e.watchEffect=Ks;e.watchPostEffect=Gs;e.watchSyncEffect=Js;e.withAsyncContext=br;e.withCtx=us;e.withDefaults=fr;e.withDirectives=oi;e.withKeys=tf;e.withMemo=la;e.withModifiers=Zu;e.withScopeId=as;return e}({});window.Vue=Vue;function build(options,exports){if(typeof exports=="undefined"){exports={}}var _options={resolveModulesParallelly:true,removeStyleWhenUnmount:false,mobile:function(){return false},httpGet:function(e){return fetch(e)},httpGetSync:function(e){if(useRelativePath){if(e.length&&e[0]=="/"){e=e.substr(1)}}var t=new XMLHttpRequest;t.open("get",e,false);t.send();return t.responseText},onNotFound:function(e,t){if(e.indexOf("/404")==0){throw"No not-found template found"}if(t){return Redirect("/404?"+_serializeOptionsToUrl(t))}else{return Redirect("/404")}},reuseContainerActiveView(e){return true},callCreatedWhenReuseContainerActiveView(e){return true},callMountedWhenReuseContainerActiveView(e){return true},callUnmountedWhenReuseContainerActiveView(e){return true},resetDataWhenReuseContainerActiveView(e){return true},generateTitle(e){return e.join(" - ")}};_combineObject(options,_options);var _cache={};var _css={};function _httpCached(e){return!!_cache[e]}function _httpGet(n){if(_cache[n]){return Promise.resolve(_cache[n])}var e=n;if(_options.version){if(n.indexOf("?")>0){e+="&"}else{e+="?"}e+="v="+_options.version}return _options.httpGet(e).then(function(e){if(e.status>300||e.status<200){return Promise.reject(e)}var t=e.text();_cache[n]=t;return Promise.resolve(t)}).catch(function(e){Promise.reject(e)})}function _httpExist(e){return _httpGet(e).then(function(){return Promise.resolve(true)}).catch(function(){return Promise.resolve(false)})}function _serializeOptionsToUrl(e){var t=Object.getOwnPropertyNames(e);var n="";for(var o=0;o<t.length;++o){n+=encodeURIComponent(t[o])+"="+encodeURIComponent(e[t[o]])+"&"}if(n[n.length-1]==="&"){n=n.substr(0,n.length-1)}return n}var _root=null;function root(){return _root}exports._rules=[];function useRoutes(e){var t=_options.httpGetSync(e);t=JSON.parse(t);if(!exports._rules){exports._rules={}}_combineObject(t,exports._rules)}function _combineObject(e,t){if(!e){return}var n=Object.getOwnPropertyNames(e);for(var o=0;o<n.length;++o){t[n[o]]=e[n[o]]}}function _getQueryString(){var e=window.location.search;if(window.location.hash.indexOf("?")>0){var t=window.location.hash.substr(window.location.hash.indexOf("?"));if(e){e+="&"+t.substr(1)}else{e=t}}return e}function _parseQueryString(e){var t=_getQueryString();if(!t){return}var n=t;if(n[0]=="?"){n=n.substr(1)}var o=n.split("&");for(var s=0;s<o.length;++s){var i=o[s].split("=");var r=decodeURIComponent(i[0]);var l=decodeURIComponent(i[1]);_fillObjectField(r,l,e)}}function _resolveModules(e,n){if(!e){return Promise.resolve()}if(_options.resolveModulesParallelly){var t=[];for(var o=0;o<e.length;++o){t.push(LoadScript(parseMacroPath(n,e[o])))}return Promise.all(t)}else{var s=Promise.resolve(null);var i=function(t){return function(e){return LoadScript(parseMacroPath(n,t))}};for(var o=0;o<e.length;++o){var r=e[o];s=s.then(i(r))}return s}}function _buildApp(url,params,mobile,parent){var componentObject={};return _httpGet(url+".js").then(function(js){var Page=function(e){componentObject=e};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(url);return PomeloModule.require(e,t,n)}}eval(js+"\r\n//# sourceURL="+url+".js");hookMountedAndUnmounted(componentObject,url+(mobile?".m":""));return _resolveModules(componentObject.modules||[],url).then(function(){return Promise.resolve(componentObject)})}).then(function(t){var e=null;if(mobile){e=_httpExist(url+".m.html").then(function(e){return _httpGet(url+(e?".m.html":".html"))})}else{e=_httpGet(url+".html")}return e.then(function(e){if(!t.template){t.template=e}_patchComponent(url,t);return Promise.resolve(t)})}).then(function(i){var o=i.setup;i.setup=function(e,t){if(typeof o=="function"){o(e,t)}var n=Vue.getCurrentInstance();n.$parent=parent||exports.root();n.$root=exports.root()||parent;n.$view=url;n.$app=exports;n.$data=i.data||function(){return{}};n.$created=i.created||function(){};n.$mounted=i.mounted||function(){};n.$unmounted=i.unmounted||function(){};_attachContainer(n)};var t=i.data||function(){return{}};i.data=function(){var e=t.call(this,exports);_combineObject(params,e);_parseQueryString(e);return e};return _resolveModules(i.modules,url).then(function(){var e=i.components||[];return _loadComponents(e,url).then(function(e){var t=Vue.createApp(i);for(var n=0;n<e.length;++n){var o=e[n];t.component(o.name,o.options)}var s=t.mount||function(){};t.mount=function(e){t.proxy=s(e);return t.proxy};return Promise.resolve(t)})})})}function _replace(e,t,n){var o=e.indexOf(t);if(o<0){return e}var s=e.substr(0,o)+n+e.substr(o+t.length);return s}function sleep(t){return new Promise(function(e){setTimeout(function(){e()},t)})}function yield(){return sleep(0)}function _attachContainer(a){if(!a){console.warn("Invalid view model")}if(!a.$containers){a.$containers=[]}if(!a.$containers){a.$containers=[]}var n=a.$containers;a.$container=function(t){var e=n.filter(e=>e.selector==t)[0];if(!e){e={element:document.querySelector(t),selector:t,open:function(e,o){var t=_options.mobile();var n=null;if(a.proxy){n=a.proxy}if(a.$&&a.$.proxy){n=a.$.proxy}if(!this.active||this.active.$view!=e||!_options.reuseContainerActiveView()){this.close()}var s=this;o=generateParametersFromRoute(o);_parseQueryString(o);if(_options.reuseContainerActiveView()&&this.active?.$view==e){var i=function(t){var e=Promise.resolve();if(!t||!t.active){return e}if(_options.callUnmountedWhenReuseContainerActiveView(t.active.$view)){e=e.then(function(){var e=t.active.$unmounted();if(e instanceof Promise){return e}else{return Promise.resolve()}})}e=e.then(function(){var e=t.active.$data();if(_options.resetDataWhenReuseContainerActiveView()){_combineObject(e,t.active)}_combineObject(o,t.active);return Promise.resolve()});if(_options.callCreatedWhenReuseContainerActiveView(t.active.$view)){e=e.then(function(){var e=t.active.$created();if(e instanceof Promise){return e}else{return Promise.resolve()}})}if(_options.callMountedWhenReuseContainerActiveView(t.active.$view)){e=e.then(function(){var e=t.active.$mounted();if(e instanceof Promise){return e}else{return Promise.resolve()}})}if(t.active.$containers&&t.active.$containers.length){for(var n=0;n<t.active.$containers.length;++n){i(t.active.$containers[n])}}return e.then(function(){t.active.$forceUpdate();return Promise.resolve(t.active)})};return Promise.resolve(i(this))}var r;var l=20;var c=function(){return new Promise(function(e,t){var n=r.mount(s.selector);if(n){s.active=n;return Promise.resolve(n)}if(--l>0){return sleep(50).then(function(){return c()})}else{return Promise.reject("Mount component to "+s.selector+" failed")}})};return _buildApp(e,o,t,n).then(function(e){r=e;return c()})},close:function(n=true){function o(e){if(e.active&&e.active.$){if(n){for(var t=0;t<e.active.$containers.length;++t){o(e.active.$containers[t])}}e.active.$.appContext.app.unmount();e.active=null}}o(this)},active:null};n.push(e)}return e}}function Root(s,i,t){s=s||{};if(typeof s.setup!="function"){s.setup=function(){}}var n=s.setup;s.setup=function(){n();var e=Vue.getCurrentInstance();e.$parent=parent||exports.root();e.$root=exports.root()||parent;e.$onUpdating=s.onUpdating;e.$app=exports;if(t){e.$layout=t;e.$view=t}_attachContainer(e)};return _resolveModules(s.modules,t).then(function(){return _loadComponents(s.components||[],t).then(function(e){var t=Vue.createApp(s||{});for(var n=0;n<e.length;++n){var o=e[n];t.component(o.name,o.options)}_root=t.mount(i);_root.$.proxy=_root})})}function mount(){function o(e){if(!e){return null}if(!e.getAttribute){return null}var t=e.getAttribute("target")||"_self";var n=e.getAttribute("static-link")||e.getAttribute("v-static")||e.getAttribute("pomelo-static");if(n==null&&t.toLowerCase()=="_self"&&e.tagName.toLowerCase()=="a"){return e.getAttribute("href")}return o(e.parentNode)}window.addEventListener("click",function(e){if(!e)return;var t=o(e.target);if(t){exports.redirect(t);e.preventDefault();return}});window.onpopstate=function(){UpdateLayout()};return UpdateLayout()}function UseConfig(e){_combineObject(e,_options)}function MapRoute(e,t){if(!exports._rules){exports._rules={}}exports._rules[e]=t}function ForceUpdate(e=exports.root()){if(!e)return;e.$forceUpdate();if(e.$containers){for(var t=0;t<e.$containers.length;++t){if(e.$containers[t].active){ForceUpdate(e.$containers[t].active)}}}}function MatchRoute(){function e(e,t,n){return e.replace(new RegExp(t,"g"),n)}function t(e){var t=[];if(!e){return t}var n=-1;var o=0;for(var s=0;s<e.length;++s){if(e[s]=="{"&&!o){n=s;o=0}else if(e[s]=="("){++o}else if(e[s]==")"){--o}else if(e[s]=="}"&&!o){t.push(e.substring(n,s+1))}}return t}function n(e){if(e[0]==="{"){return e.substr(1,e.length-2)}else{return e}}function o(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")}function s(e){var t=0;if(e){for(var n=0;n<e.length;++n){if(e[n]=="("){++t}if(e[n]=="?"&&n>0&&e[n-1]=="("){--t}}}return t}var i=Object.getOwnPropertyNames(exports._rules);for(var r=0;r<i.length;++r){var l=i[r];var c=l[0]=="#";var a=exports._rules[i[r]];var u=t(l);var f=[];var p=[];for(var d=0;d<u.length;++d){var h=u[d];var m=n(h);regex="([^/]+)";if(m[0]=="*"){regex="(.*)";m=m.substr(1)}if(m.indexOf("=")>0){var g=m.substr(m.indexOf("=")+1);regex=`(${o(g)})`;f.push(m.substr(0,m.indexOf("=")))}else if(h.indexOf(":")>0){regex=h.substr(h.indexOf(":")+1);regex=regex.substr(0,regex.length-1);f.push(m.substr(0,m.indexOf(":")))}else{f.push(m)}p.push(s(regex));l=_replace(l,h,regex)}var v=new RegExp("^"+l+"$");var u=v.exec(c?window.location.hash||"#":window.location.pathname);if(u){var y={view:a,params:[]};var b=u;u=[];var _=0;for(var d=1;d<b.length;++d){u.push(b[d]);for(var m=0;m<p[_]-1;++m){++d}++_}var x=u.map(function(e){return decodeURIComponent(e)});for(var d=0;d<f.length;++d){y.params.push({key:f[d],value:x[d]})}return y}}return null}function _fillObjectField(e,t,n){if(!n){return}var o=e.split(".");for(var s=0;s<o.length-1;++s){if(!n[o[s]]){n[o[s]]={}}n=n[o[s]]}n[o[o.length-1]]=t}function _applyLayoutHtml(e){return _httpGet(e+(_options.mobile()?".m.html":".html")).then(function(e){var t=e.indexOf("<html");var n=e.indexOf(">",t);e=e.substr(n+1);var o=e.lastIndexOf("</html>");e=e.substr(0,o);document.querySelector("html").innerHTML=e;var s=(new Date).getTime();var i="pomelo-"+s;document.querySelector("body").innerHTML='<div id="'+i+'">'+document.querySelector("body").innerHTML+"</div>";return Promise.resolve(i)})}function generateParametersFromRoute(e={}){var t=null;t=MatchRoute();if(t==null){try{_options.onNotFound(window.location.pathname+window.location.search);return}catch(e){throw"No available route found."}}for(var n=0;n<t.params.length;++n){var o=t.params[n];_fillObjectField(o.key,o.value,e)}return e}function parseMacroPath(e,t){if(!t){t=""}if(t.indexOf("@")<0){return t}var n="/";var o=e.lastIndexOf("/");if(o>=0){n=e.substr(0,o)}t=t.replaceAll("@(view)",e).replaceAll("@(js)",e+".js").replaceAll("@(html)",e+".html").replaceAll("@(mobileHtml)",e+".m.html").replaceAll("@(css)",e+".css").replaceAll("@(mobileCss)",e+".m.css").replaceAll("@(less)",e+".less").replaceAll("@(mobileLess)",e+".m.less").replaceAll("@(mobileSass)",e+".m.sass").replaceAll("@(mobileScss)",e+".m.scss").replaceAll("@(containingFolder)",n);if(t.length&&t[0]!="/"&&t.indexOf("http")==-1){t=getContainingFolder(e)+t}return t}function appendCssReference(e,t){if(typeof t=="boolean"){var n=e+".css";if(_options.version){n+="?v="+_options.version}internalAppendCssReference(e,n)}else if(typeof t=="string"){var n=parseMacroPath(e,t);n=resolveRelativePath(n,getContainingFolder(e));if(_options.version){if(n.indexOf(">")<0){n+="?v="+_options.version}else{n+="&v="+_options.version}}internalAppendCssReference(e,n)}else if(t instanceof Array){for(var o=0;o<t.length;++o){if(typeof t[o]!="string"){continue}var n=parseMacroPath(e,t[o]);n=resolveRelativePath(n,getContainingFolder(e));if(_options.version){if(n.indexOf(">")<0){n+="?v="+_options.version}else{n+="&v="+_options.version}}internalAppendCssReference(e,n)}}else{throw"style type not supported"}}function getContainingFolder(e){if(!e){console.warn("getContainingFolder: absolutePath is invalid")}var t=e.lastIndexOf("/");if(t<0){return"/"}return e.substr(0,t)+"/"}function internalAppendCssReference(e,t){if(document.querySelectorAll('link[data-style="'+e+'"][href="'+t+'"]').length){return}var n=document.createElement("link");n.rel="stylesheet";n.type="text/"+getStyleSheetType(t);n.setAttribute("data-style",e);n.href=t;try{document.querySelector("head").appendChild(n)}catch(e){}}function getStyleSheetType(e){var t=e.lastIndexOf("?");if(t>=0){e=e.substr(0,t)}var n=e.lastIndexOf(".");if(n<0){return null}return e.substr(n+1).toLowerCase()}function removeCssReference(e){if(!_options.removeStyleWhenUnmount){return}var t=document.querySelectorAll('link[data-style="'+e+'"]');if(t&&t.length){for(var n=0;n<t.length;++n){t[n].remove()}}}function hookMountedAndUnmounted(e,t){if(!e){return}if(!e.mounted){e.mounted=function(){}}if(!e.unmounted){e.unmounted=function(){}}if(!e.created){e.created=function(){}}if(e.style){var n=e.created;e.created=function(){if(!_css[t]){_css[t]=0}if(_css[t]==0){appendCssReference(t,e.style)}++_css[t];return n.call(this)};var o=e.mounted;e.mounted=function(){return o.call(this)};var s=e.unmounted;e.unmounted=function(){if(!_css[t]){return}--_css[t];if(_css[t]<=0){removeCssReference(t);delete _css[t]}return s.call(this)}}}function pomeUiPassTitle(e){if(e){this.pomeUiSubTitles=e}var t=JSON.parse(JSON.stringify(this.pomeUiSubTitles));if(this.title){t.push(this.title)}if(this.$parent&&this.$parent!=window&&this.$parent.pomeUiPassTitle){this.$parent.pomeUiPassTitle(t)}else{document.querySelector("title").innerHTML=_options.generateTitle(t)}}function UpdateLayout(){var mobile=_options.mobile();var params={};var route=null;var layout=_options.layout;route=MatchRoute();params=generateParametersFromRoute();var _def;var viewName=route.view+(_options.mobile()?".m":"");return _httpGet(route.view+".js").then(function(def){_def=def;var modules=null;var _opt;var Page=function(e){_opt=e;layout=e.layout||layout;modules=e.modules};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(route.view);return PomeloModule.require(e,t,n)}}def=eval(def+"\r\n//# sourceURL="+route.view+".js");hookMountedAndUnmounted(_opt,viewName);return _resolveModules(modules,viewName)}).then(function(){if(exports.root()&&exports.root().$layout){if(exports.root().$layout===layout){_parseQueryString(params);var fields=Object.getOwnPropertyNames(params);for(var i=0;i<fields.length;++i){var val=params[fields[i]];exports.root()[fields[i]]=val}exports.root().$containers[0].open(route.view,params);var promise=Promise.resolve();if(typeof exports.root().$.$onUpdating=="function"){var result=exports.root().$.$onUpdating.call(exports.root());if(result instanceof Promise){promise=result}}return promise}exports.root().$.appContext.app.unmount()}if(layout){var layoutName=layout+(mobile?".m":"");var _layoutHtml;return _httpGet(layoutName+".html").then(function(e){_layoutHtml=e;return _httpGet(layout+".js")}).then(function(js){var _opt=null;var Layout=function(e){_opt=e};var LayoutNext=function(e){if(!e.data){e.data=function(){return{}}}var o=e.setup||function(e,t){};e.setup=function(e,t){o(e,t);var n=Vue.getCurrentInstance();n.$app=exports};_opt.template=_layoutHtml;_patchComponent(layout,_opt);_layoutHtml=_opt.template;var t=_layoutHtml.indexOf("<html");var n=_layoutHtml.indexOf(">",t);_layoutHtml=_layoutHtml.substr(n+1);var s=_layoutHtml.lastIndexOf("</html>");_layoutHtml=_layoutHtml.substr(0,s);document.querySelector("html").innerHTML=_layoutHtml;var i=e.data;e.data=function(){var e=i.call(this,exports);_combineObject(params,e);_parseQueryString(e);return e};var r=(new Date).getTime();var l="pomelo-"+r;var c="container-"+r;var a=document.querySelector("body").innerHTML.replace("<render-body></render-body>",'<div id="'+c+'"></div>');document.querySelector("body").innerHTML='<div id="'+l+'">'+a+"</div>";e.template=null;if(!e.mounted){e.mounted=function(){}}mountedFunc=e.mounted;e.mounted=function(){var e=this.$container("#"+c);e.open(route.view,params);return mountedFunc.call(this)};Root(e,"#"+l,layout)};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(layout);return PomeloModule.require(e,t,n)}}eval(js+"\r\n//# sourceURL="+layout+".js");hookMountedAndUnmounted(_opt,layoutName);return _resolveModules(_opt.modules,layout).then(function(){LayoutNext(_opt);return Promise.resolve()})})}else{var viewName=route.view+(_options.mobile()?".m":"");return _applyLayoutHtml(route.view).then(function(appId){var _opt=null;var components=null;var Page=function(e){_opt=e};var PageNext=function(e){modules=e.modules;components=e.components||[];Root(e,"#"+appId,route.view)};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(route.view);return PomeloModule.require(e,t,n)}}eval(_def+"\r\n//# sourceURL="+route.view+".js");if(!_opt){_opt={}}if(!_opt.data){_opt.data=function(){return{}}}var dataFunc=_opt.data;_opt.data=function(){var e=dataFunc.call(this,exports);_combineObject(params,e);_parseQueryString(e);return e};hookMountedAndUnmounted(_opt,viewName);_patchComponent(viewName,_opt);return _resolveModules(_opt.modules,viewName).then(function(){PageNext(_opt);return Promise.resolve();P})})}}).then(function(){ForceUpdate()}).catch(function(e){console.error(e)})}function Redirect(e){var t=null;var n=document.querySelector("title");if(n){t=n.innerText}window.history.pushState(null,t,e);UpdateLayout()}function LoadScript(url){if(_httpCached(url)){with(window){if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(url);return PomeloModule.require(e,t,n)}}eval(_cache[url]+"\r\n//# sourceURL="+url)}return Promise.resolve()}return _httpGet(url).then(function(js){with(window){if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(url);return PomeloModule.require(e,t,n)}}eval(js+"\r\n//# sourceURL="+url)}_cache[url]=js;return Promise.resolve()}).catch(e=>{console.error("Load module "+url+" failed.");console.error(e)})}function resolveRelativePathPlain(e){if(e.indexOf("./")==-1&&e.indexOf("../")==-1){return e}var t=e.lastIndexOf("../");if(t==0){return e}e=e.replaceAll("/./","/");if(e.indexOf("./")==0){e=e.substr(2)}if(t){var n=e.substr(0,t);var o=e.substr(t);return resolveRelativePath(o,n)}}function resolveRelativePath(e,t){if(e.length&&e[0]=="/"||e.indexOf("http")==0){return resolveRelativePathPlain(e)}if(e.length&&e[0]!="."){return resolveRelativePathPlain(t+e)}if(e.indexOf("./")==0){return resolveRelativePath(e.substr(2),t)}if(e.indexOf("../")==0){e=e.substr(3);t=getContainingFolder(t.substr(0,t.length-1));return resolveRelativePath(e,t)}}function _loadComponents(components,viewName){var ret=[];if(!components.length){return Promise.resolve(ret)}var workingDirectory=getContainingFolder(viewName||"/");var viewName;var subComponentRefs=[];return Promise.all(components.map(function(c){c=resolveRelativePath(parseMacroPath(viewName,c),workingDirectory);viewName=c;var _html;var _name;var _opt;return _httpGet(c+".html").then(function(e){_html=e;return _httpGet(c+".js")}).then(function(comJs){var Component=function(e,t){_opt=t;_name=e};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(c);return PomeloModule.require(e,t,n)}}eval(comJs+"\r\n//# sourceURL="+c+".js");subComponentRefs=_opt.components;hookMountedAndUnmounted(_opt,c);if(!_opt.template){_opt.template=_html}if(!_opt.setup){_opt.setup=function(){}}var originSetup=_opt.setup;_opt.setup=function(e,t){originSetup(e,t);var n=Vue.getCurrentInstance();n.$app=exports};_patchComponent(c,_opt);var originData=_opt.data||function(){return{}};_opt.data=function(){return originData.call(this,exports)};return _resolveModules(_opt.modules,c)}).then(function(){ret.push({name:_name,options:_opt});return Promise.resolve()})})).then(function(){return _loadComponents(subComponentRefs||[],viewName)}).then(function(e){for(var t=0;t<e.length;++t){var n=e[t];if(ret.filter(e=>e.name==n.name).length){continue}ret.push(n)}return Promise.resolve(ret)})}exports._addins=[];function _patchComponent(n,i){prepared=true;if(!i.data){i.data=function(){return{}}}if(!i.style){i.style=[]}if(!i.style instanceof Array){if(i.style instanceof String){i.style=[i.style]}else{i.style=["@(css)"]}}if(!i.components){i.components=[]}if(!i.created){i.created=function(){}}if(!i.mounted){i.mounted=function(){}}if(!i.unmounted){i.unmounted=function(){}}if(!i.destroyed){i.destroyed=function(){}}if(!i.watch){i.watch={}}if(!i.computed){i.computed={}}var o=i.data;i.data=function(e){var t=o.call(this,e);var n={pomeUiSubTitles:[]};_combineObject(n,t);return t};if(!i.methods){i.methods={}}i.methods.pomeUiPassTitle=pomeUiPassTitle;if(!i.watch){i.watch={}}i.watch.title=function(){this.pomeUiPassTitle()};for(let t=0;t<exports._addins.length;++t){let e=exports._addins[t].view;let s=exports._addins[t].opt;if(e!="*"&&n!=e){continue}if(s.data){var r=i.data;i.data=function(e){var t=r.call(this,e);var n={};try{n=s.data.call(this,e)}catch(e){console.error(e)}_combineObject(n,t);return t}}if(s.style){if(s.style instanceof Boolean){s.style=["@(css)"]}if(s.style instanceof String){s.style=[s.style]}s.style.forEach(function(t){if(!i.style.some(e=>e==t)){i.push(t)}})}if(s.components){s.components.forEach(function(t){if(!i.components.some(e=>e==t)){i.components.push(t)}})}if(s.layout){i.layout=s.layout}if(s.props){if(!i.props){i.props=[]}s.props.forEach(function(t){if(!i.props.some(e=>e==t)){i.props.push(t)}})}if(s.watch){var l=Object.getOwnPropertyNames(s.watch);l.forEach(function(n){var o=i.watch[n];i.watch[n]=function(e,t){o.invoke(this,e,t);try{s.watch[n].invoke(this,e,t)}catch(e){console.error(e)}}})}if(s.computed){var l=Object.getOwnPropertyNames(s.computed);l.forEach(function(e){i.computed[e]=s.computed[e]})}if(s.methods){var c=i.setup||function(e,t){};i.setup=function(e,t){c(e,t);var n={};var o=Object.getOwnPropertyNames(i.methods);o.forEach(function(e){n[e]=i.methods[e]});var s=Vue.getCurrentInstance();s.$baseMethods=n};var a=Object.getOwnPropertyNames(s.methods);a.forEach(function(e){i.methods[e]=s.methods[e]})}if(s.created){var u=i.created;i.created=async function(){var e=u.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e;try{e=s.created.call(t)}catch(e){console.error(e)}if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.mounted){var f=i.mounted;i.mounted=async function(){var e=f.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e;try{e=s.mounted.call(t)}catch(e){console.error(e)}if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.unmounted){var p=i.unmounted;i.unmounted=async function(){var e=p.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e;try{e=s.unmounted.call(t)}catch(e){console.error(e)}if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.destroyed){var d=i.destroyed;i.destroyed=async function(){var e=d.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e=s.destroyed.call(t);if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.template){if(s.template instanceof Function){if(i.template){if(i.template.indexOf("<html")>=0){var h=(new DOMParser).parseFromString(i.template,"text/html");s.template(h);i.template=(new XMLSerializer).serializeToString(h)}else{i.template=`<pome-ui-template>${i.template}</pome-ui-template>`;var h=(new DOMParser).parseFromString(i.template,"text/html");s.template(h);i.template=(new XMLSerializer).serializeToString(h);i.template=i.template.substr(i.template.indexOf("<pome-ui-template>")+"<pome-ui-template>".length);i.template=i.template.substr(0,i.template.indexOf("</pome-ui-template>"))}}}else{i.template=s.template}}}var s=i.unmounted;i.unmounted=async function(){var e=s.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e=Promise.resolve();t.pomeUiPassTitle([]);return e})}}function UseAddin(addinUrl){var Addin=function(e,t){exports._addins.push({view:e,opt:t})};var js=_options.httpGetSync(addinUrl);eval(js)}function UseInlineAddin(script){var Addin=function(e,t){exports._addins.push({view:e,opt:t})};eval(script)}exports.root=root;exports.useConfig=UseConfig;exports.mapRoute=MapRoute;exports.matchRoute=MatchRoute;exports.updateLayout=UpdateLayout;exports.redirect=Redirect;exports.loadScript=LoadScript;exports.forceUpdate=ForceUpdate;exports.mount=mount;exports.useRoutes=useRoutes;exports.useAddin=UseAddin;exports.useInlineAddin=UseInlineAddin;return exports}exports.build=build;
|
|
29
|
+
${o}`:n)}const c=new Function(r)();c._rc=true;return n[t]=c}zc(Gm);e.BaseTransition=fi;e.BaseTransitionPropsValidators=ai;e.Comment=te;e.DeprecationTypes=ga;e.EffectScope=Je;e.ErrorCodes=to;e.ErrorTypeStrings=ua;e.Fragment=ee;e.KeepAlive=Ci;e.ReactiveEffect=tt;e.Static=Yl;e.Suspense=Is;e.Teleport=Gl;e.Text=Xl;e.TrackOpTypes=qn;e.Transition=ka;e.TransitionGroup=Ou;e.TriggerOpTypes=zn;e.VueElement=Su;e.assertNumber=eo;e.callWithAsyncErrorHandling=so;e.callWithErrorHandling=oo;e.camelize=T;e.capitalize=j;e.cloneVNode=yc;e.compatUtils=ma;e.compile=Gm;e.computed=oa;e.createApp=uf;e.createBlock=rc;e.createCommentVNode=wc;e.createElementBlock=ic;e.createElementVNode=mc;e.createHydrationRenderer=Pl;e.createPropsRestProxy=yr;e.createRenderer=Ol;e.createSSRApp=ff;e.createSlots=zi;e.createStaticVNode=xc;e.createTextVNode=_c;e.createVNode=ne;e.customRef=jn;e.defineAsyncComponent=_i;e.defineComponent=yi;e.defineCustomElement=_u;e.defineEmits=rr;e.defineExpose=lr;e.defineModel=ur;e.defineOptions=cr;e.defineProps=ir;e.defineSSRCustomElement=xu;e.defineSlots=ar;e.devtools=fa;e.effect=rt;e.effectScope=Xe;e.getCurrentInstance=Oc;e.getCurrentScope=Qe;e.getTransitionRawChildren=vi;e.guardReactiveProps=vc;e.h=ia;e.handleError=io;e.hasInjectionContext=Br;e.hydrate=af;e.initCustomFormatter=ra;e.initDirectivesForSSR=gf;e.inject=Dr;e.isMemoSame=ca;e.isProxy=_n;e.isReactive=vn;e.isReadonly=yn;e.isRef=C;e.isRuntimeOnly=Wc;e.isShallow=bn;e.isVNode=lc;e.markRaw=xn;e.mergeDefaults=gr;e.mergeModels=vr;e.mergeProps=Tc;e.nextTick=vo;e.normalizeClass=ke;e.normalizeProps=Te;e.normalizeStyle=be;e.onActivated=Ti;e.onBeforeMount=Ri;e.onBeforeUnmount=ji;e.onBeforeUpdate=Fi;e.onDeactivated=Ai;e.onErrorCaptured=Hi;e.onMounted=Mi;e.onRenderTracked=Bi;e.onRenderTriggered=Di;e.onScopeDispose=Ze;e.onServerPrefetch=Vi;e.onUnmounted=Ui;e.onUpdated=Li;e.openBlock=ec;e.popScopeId=cs;e.provide=Vr;e.proxyRefs=Fn;e.pushScopeId=ls;e.queuePostFlushCb=wo;e.reactive=pn;e.readonly=hn;e.ref=$n;e.registerRuntimeCompiler=zc;e.render=cf;e.renderList=qi;e.renderSlot=Wi;e.resolveComponent=Cs;e.resolveDirective=As;e.resolveDynamicComponent=Ts;e.resolveFilter=ha;e.resolveTransitionHooks=di;e.setBlockTracking=oc;e.setDevtoolsHook=pa;e.setTransitionHooks=gi;e.shallowReactive=dn;e.shallowReadonly=mn;e.shallowRef=En;e.ssrContextKey=zs;e.ssrUtils=da;e.stop=lt;e.toDisplayString=qe;e.toHandlerKey=U;e.toHandlers=Gi;e.toRaw=b;e.toRef=Bn;e.toRefs=Un;e.toValue=Rn;e.transformVNodeArgs=uc;e.triggerRef=Pn;e.unref=In;e.useAttrs=dr;e.useCssModule=Cu;e.useCssVars=Ka;e.useModel=sa;e.useSSRContext=Ws;e.useSlots=pr;e.useTransitionState=li;e.vModelCheckbox=Du;e.vModelDynamic=Gu;e.vModelRadio=Hu;e.vModelSelect=qu;e.vModelText=Vu;e.vShow=qa;e.version=aa;e.warn=p;e.watch=Ys;e.watchEffect=Ks;e.watchPostEffect=Gs;e.watchSyncEffect=Js;e.withAsyncContext=br;e.withCtx=us;e.withDefaults=fr;e.withDirectives=oi;e.withKeys=tf;e.withMemo=la;e.withModifiers=Zu;e.withScopeId=as;return e}({});window.Vue=Vue;function build(options,exports){if(typeof exports=="undefined"){exports={}}var _options={resolveModulesParallelly:true,removeStyleWhenUnmount:false,mobile:function(){return false},httpGet:function(e){return fetch(e)},httpGetSync:function(e){if(useRelativePath){if(e.length&&e[0]=="/"){e=e.substr(1)}}var t=new XMLHttpRequest;t.open("get",e,false);t.send();return t.responseText},onNotFound:function(e,t){if(e.indexOf("/404")==0){throw"No not-found template found"}if(t){return Redirect("/404?"+_serializeOptionsToUrl(t))}else{return Redirect("/404")}},reuseContainerActiveView(e){return true},callCreatedWhenReuseContainerActiveView(e){return true},callMountedWhenReuseContainerActiveView(e){return true},callUnmountedWhenReuseContainerActiveView(e){return true},resetDataWhenReuseContainerActiveView(e){return true},generateTitle(e){return e.join(" - ")}};_combineObject(options,_options);var _cache={};var _css={};function _httpCached(e){return!!_cache[e]}function _httpGet(n){if(_cache[n]){return Promise.resolve(_cache[n])}var e=n;if(_options.version){if(n.indexOf("?")>0){e+="&"}else{e+="?"}e+="v="+_options.version}return _options.httpGet(e).then(function(e){if(e.status>300||e.status<200){return Promise.reject(e)}var t=e.text();_cache[n]=t;return Promise.resolve(t)}).catch(function(e){Promise.reject(e)})}function _httpExist(e){return _httpGet(e).then(function(){return Promise.resolve(true)}).catch(function(){return Promise.resolve(false)})}function _serializeOptionsToUrl(e){var t=Object.getOwnPropertyNames(e);var n="";for(var o=0;o<t.length;++o){n+=encodeURIComponent(t[o])+"="+encodeURIComponent(e[t[o]])+"&"}if(n[n.length-1]==="&"){n=n.substr(0,n.length-1)}return n}var _root=null;function root(){return _root}exports._rules=[];function useRoutes(e){var t=_options.httpGetSync(e);t=JSON.parse(t);if(!exports._rules){exports._rules={}}_combineObject(t,exports._rules)}function _combineObject(e,t){if(!e){return}var n=Object.getOwnPropertyNames(e);for(var o=0;o<n.length;++o){t[n[o]]=e[n[o]]}}function _getQueryString(){var e=window.location.search;if(window.location.hash.indexOf("?")>0){var t=window.location.hash.substr(window.location.hash.indexOf("?"));if(e){e+="&"+t.substr(1)}else{e=t}}return e}function _parseQueryString(e){var t=_getQueryString();if(!t){return}var n=t;if(n[0]=="?"){n=n.substr(1)}var o=n.split("&");for(var s=0;s<o.length;++s){var i=o[s].split("=");var r=decodeURIComponent(i[0]);var l=decodeURIComponent(i[1]);_fillObjectField(r,l,e)}}function _resolveModules(e,n){if(!e){return Promise.resolve()}if(_options.resolveModulesParallelly){var t=[];for(var o=0;o<e.length;++o){t.push(LoadScript(parseMacroPath(n,e[o])))}return Promise.all(t)}else{var s=Promise.resolve(null);var i=function(t){return function(e){return LoadScript(parseMacroPath(n,t))}};for(var o=0;o<e.length;++o){var r=e[o];s=s.then(i(r))}return s}}function _buildApp(url,params,mobile,parent){var componentObject={};return _httpGet(url+".js").then(function(js){var Page=function(e){componentObject=e};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(url);return PomeloModule.require(e,t,n)}}eval(js+"\r\n//# sourceURL="+url+".js");hookMountedAndUnmounted(componentObject,url+(mobile?".m":""));return _resolveModules(componentObject.modules||[],url).then(function(){return Promise.resolve(componentObject)})}).then(function(t){var e=null;if(mobile){e=_httpExist(url+".m.html").then(function(e){return _httpGet(url+(e?".m.html":".html"))})}else{e=_httpGet(url+".html")}return e.then(function(e){if(!t.template){t.template=e}_patchComponent(url,t);return Promise.resolve(t)})}).then(function(i){var o=i.setup;i.setup=function(e,t){if(typeof o=="function"){o(e,t)}var n=Vue.getCurrentInstance();n.$parent=parent||exports.root();n.$root=exports.root()||parent;n.$view=url;n.$app=exports;n.$data=i.data||function(){return{}};n.$created=i.created||function(){};n.$mounted=i.mounted||function(){};n.$unmounted=i.unmounted||function(){};_attachContainer(n)};var t=i.data||function(){return{}};i.data=function(){var e=t.call(this,exports);_combineObject(params,e);_parseQueryString(e);return e};return _resolveModules(i.modules,url).then(function(){var e=i.components||[];return _loadComponents(e,url).then(function(e){var t=Vue.createApp(i);for(var n=0;n<e.length;++n){var o=e[n];t.component(o.name,o.options)}var s=t.mount||function(){};t.mount=function(e){t.proxy=s(e);return t.proxy};return Promise.resolve(t)})})})}function _replace(e,t,n){var o=e.indexOf(t);if(o<0){return e}var s=e.substr(0,o)+n+e.substr(o+t.length);return s}function sleep(t){return new Promise(function(e){setTimeout(function(){e()},t)})}function yield(){return sleep(0)}function _attachContainer(a){if(!a){console.warn("Invalid view model")}if(!a.$containers){a.$containers=[]}if(!a.$containers){a.$containers=[]}var n=a.$containers;a.$container=function(t){var e=n.filter(e=>e.selector==t)[0];if(!e){e={element:document.querySelector(t),selector:t,open:function(e,o){var t=_options.mobile();var n=null;if(a.proxy){n=a.proxy}if(a.$&&a.$.proxy){n=a.$.proxy}if(!this.active||this.active.$view!=e||!_options.reuseContainerActiveView()){this.close()}var s=this;o=generateParametersFromRoute(o);_parseQueryString(o);if(_options.reuseContainerActiveView()&&this.active?.$view==e){var i=function(t){var e=Promise.resolve();if(!t||!t.active){return e}if(_options.callUnmountedWhenReuseContainerActiveView(t.active.$view)){e=e.then(function(){var e=t.active.$unmounted();if(e instanceof Promise){return e}else{return Promise.resolve()}})}e=e.then(function(){var e=t.active.$data();if(_options.resetDataWhenReuseContainerActiveView()){_combineObject(e,t.active)}_combineObject(o,t.active);return Promise.resolve()});if(_options.callCreatedWhenReuseContainerActiveView(t.active.$view)){e=e.then(function(){var e=t.active.$created();if(e instanceof Promise){return e}else{return Promise.resolve()}})}if(_options.callMountedWhenReuseContainerActiveView(t.active.$view)){e=e.then(function(){var e=t.active.$mounted();if(e instanceof Promise){return e}else{return Promise.resolve()}})}if(t.active.$containers&&t.active.$containers.length){for(var n=0;n<t.active.$containers.length;++n){i(t.active.$containers[n])}}return e.then(function(){t.active.$forceUpdate();return Promise.resolve(t.active)})};return Promise.resolve(i(this))}var r;var l=20;var c=function(){return new Promise(function(e,t){var n=r.mount(s.selector);if(n){s.active=n;return Promise.resolve(n)}if(--l>0){return sleep(50).then(function(){return c()})}else{return Promise.reject("Mount component to "+s.selector+" failed")}})};return _buildApp(e,o,t,n).then(function(e){r=e;return c()})},close:function(n=true){function o(e){if(e.active&&e.active.$){if(n){for(var t=0;t<e.active.$containers.length;++t){o(e.active.$containers[t])}}e.active.$.appContext.app.unmount();e.active=null}}o(this)},active:null};n.push(e)}return e}}function Root(s,i,t){s=s||{};if(typeof s.setup!="function"){s.setup=function(){}}var n=s.setup;s.setup=function(){n();var e=Vue.getCurrentInstance();e.$parent=parent||exports.root();e.$root=exports.root()||parent;e.$onUpdating=s.onUpdating;e.$app=exports;if(t){e.$layout=t;e.$view=t}_attachContainer(e)};return _resolveModules(s.modules,t).then(function(){return _loadComponents(s.components||[],t).then(function(e){var t=Vue.createApp(s||{});for(var n=0;n<e.length;++n){var o=e[n];t.component(o.name,o.options)}_root=t.mount(i);_root.$.proxy=_root})})}function mount(){function o(e){if(!e){return null}if(!e.getAttribute){return null}var t=e.getAttribute("target")||"_self";var n=e.getAttribute("static-link")||e.getAttribute("v-static")||e.getAttribute("pomelo-static");if(n==null&&t.toLowerCase()=="_self"&&e.tagName.toLowerCase()=="a"){return e.getAttribute("href")}return o(e.parentNode)}window.addEventListener("click",function(e){if(!e)return;var t=o(e.target);if(t){exports.redirect(t);e.preventDefault();return}});window.onpopstate=function(){UpdateLayout()};return UpdateLayout()}function UseConfig(e){_combineObject(e,_options)}function MapRoute(e,t){if(!exports._rules){exports._rules={}}exports._rules[e]=t}function ForceUpdate(e=exports.root()){if(!e)return;e.$forceUpdate();if(e.$containers){for(var t=0;t<e.$containers.length;++t){if(e.$containers[t].active){ForceUpdate(e.$containers[t].active)}}}}function MatchRoute(){function e(e,t,n){return e.replace(new RegExp(t,"g"),n)}function t(e){var t=[];if(!e){return t}var n=-1;var o=0;for(var s=0;s<e.length;++s){if(e[s]=="{"&&!o){n=s;o=0}else if(e[s]=="("){++o}else if(e[s]==")"){--o}else if(e[s]=="}"&&!o){t.push(e.substring(n,s+1))}}return t}function n(e){if(e[0]==="{"){return e.substr(1,e.length-2)}else{return e}}function o(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")}function s(e){var t=0;if(e){for(var n=0;n<e.length;++n){if(e[n]=="("){++t}if(e[n]=="?"&&n>0&&e[n-1]=="("){--t}}}return t}var i=Object.getOwnPropertyNames(exports._rules);for(var r=0;r<i.length;++r){var l=i[r];var c=l[0]=="#";var a=exports._rules[i[r]];var u=t(l);var f=[];var p=[];for(var d=0;d<u.length;++d){var h=u[d];var m=n(h);regex="([^/]+)";if(m[0]=="*"){regex="(.*)";m=m.substr(1)}if(m.indexOf("=")>0){var g=m.substr(m.indexOf("=")+1);regex=`(${o(g)})`;f.push(m.substr(0,m.indexOf("=")))}else if(h.indexOf(":")>0){regex=h.substr(h.indexOf(":")+1);regex=regex.substr(0,regex.length-1);f.push(m.substr(0,m.indexOf(":")))}else{f.push(m)}p.push(s(regex));l=_replace(l,h,regex)}var v=new RegExp("^"+l+"$");var u=v.exec(c?window.location.hash||"#":window.location.pathname);if(u){var y={view:a,params:[]};var b=u;u=[];var _=0;for(var d=1;d<b.length;++d){u.push(b[d]);for(var m=0;m<p[_]-1;++m){++d}++_}var x=u.map(function(e){return decodeURIComponent(e)});for(var d=0;d<f.length;++d){y.params.push({key:f[d],value:x[d]})}return y}}return null}function _fillObjectField(e,t,n){if(!n){return}var o=e.split(".");for(var s=0;s<o.length-1;++s){if(!n[o[s]]){n[o[s]]={}}n=n[o[s]]}n[o[o.length-1]]=t}function _applyLayoutHtml(e){return _httpGet(e+(_options.mobile()?".m.html":".html")).then(function(e){var t=e.indexOf("<html");var n=e.indexOf(">",t);e=e.substr(n+1);var o=e.lastIndexOf("</html>");e=e.substr(0,o);document.querySelector("html").innerHTML=e;var s=(new Date).getTime();var i="pomelo-"+s;document.querySelector("body").innerHTML='<div id="'+i+'">'+document.querySelector("body").innerHTML+"</div>";return Promise.resolve(i)})}function generateParametersFromRoute(e={}){var t=null;t=MatchRoute();if(t==null){try{_options.onNotFound(window.location.pathname+window.location.search);return}catch(e){throw"No available route found."}}for(var n=0;n<t.params.length;++n){var o=t.params[n];_fillObjectField(o.key,o.value,e)}return e}function parseMacroPath(e,t){if(!t){t=""}if(t.indexOf("@")<0){return t}var n="/";var o=e.lastIndexOf("/");if(o>=0){n=e.substr(0,o)}t=t.replaceAll("@(view)",e).replaceAll("@(js)",e+".js").replaceAll("@(html)",e+".html").replaceAll("@(mobileHtml)",e+".m.html").replaceAll("@(css)",e+".css").replaceAll("@(mobileCss)",e+".m.css").replaceAll("@(less)",e+".less").replaceAll("@(mobileLess)",e+".m.less").replaceAll("@(mobileSass)",e+".m.sass").replaceAll("@(mobileScss)",e+".m.scss").replaceAll("@(containingFolder)",n);if(t.length&&t[0]!="/"&&t.indexOf("http")==-1){t=getContainingFolder(e)+t}return t}function appendCssReference(e,t){if(typeof t=="boolean"){var n=e+".css";if(_options.version){n+="?v="+_options.version}internalAppendCssReference(e,n)}else if(typeof t=="string"){var n=parseMacroPath(e,t);n=resolveRelativePath(n,getContainingFolder(e));if(_options.version){if(n.indexOf(">")<0){n+="?v="+_options.version}else{n+="&v="+_options.version}}internalAppendCssReference(e,n)}else if(t instanceof Array){for(var o=0;o<t.length;++o){if(typeof t[o]!="string"){continue}var n=parseMacroPath(e,t[o]);n=resolveRelativePath(n,getContainingFolder(e));if(_options.version){if(n.indexOf(">")<0){n+="?v="+_options.version}else{n+="&v="+_options.version}}internalAppendCssReference(e,n)}}else{throw"style type not supported"}}function getContainingFolder(e){if(!e){console.warn("getContainingFolder: absolutePath is invalid")}var t=e.lastIndexOf("/");if(t<0){return"/"}return e.substr(0,t)+"/"}function internalAppendCssReference(e,t){if(document.querySelectorAll('link[data-style="'+e+'"][href="'+t+'"]').length){return}var n=document.createElement("link");n.rel="stylesheet";n.type="text/"+getStyleSheetType(t);n.setAttribute("data-style",e);n.href=t;try{document.querySelector("head").appendChild(n)}catch(e){}}function getStyleSheetType(e){var t=e.lastIndexOf("?");if(t>=0){e=e.substr(0,t)}var n=e.lastIndexOf(".");if(n<0){return null}return e.substr(n+1).toLowerCase()}function removeCssReference(e){if(!_options.removeStyleWhenUnmount){return}var t=document.querySelectorAll('link[data-style="'+e+'"]');if(t&&t.length){for(var n=0;n<t.length;++n){t[n].remove()}}}function hookMountedAndUnmounted(e,t){if(!e){return}if(!e.mounted){e.mounted=function(){}}if(!e.unmounted){e.unmounted=function(){}}if(!e.created){e.created=function(){}}if(e.style){var n=e.created;e.created=function(){if(!_css[t]){_css[t]=0}if(_css[t]==0){appendCssReference(t,e.style)}++_css[t];return n.call(this)};var o=e.mounted;e.mounted=function(){return o.call(this)};var s=e.unmounted;e.unmounted=function(){if(!_css[t]){return}--_css[t];if(_css[t]<=0){removeCssReference(t);delete _css[t]}return s.call(this)}}}function pomeUiPassTitle(e){if(e){this.pomeUiSubTitles=e}var t=JSON.parse(JSON.stringify(this.pomeUiSubTitles));if(this.title){t.push(this.title)}if(this.$parent&&this.$parent!=window&&this.$parent.pomeUiPassTitle){this.$parent.pomeUiPassTitle(t)}else{document.querySelector("title").innerHTML=_options.generateTitle(t)}}function UpdateLayout(){var mobile=_options.mobile();var params={};var route=null;var layout=_options.layout;route=MatchRoute();params=generateParametersFromRoute();var _def;var viewName=route.view+(_options.mobile()?".m":"");return _httpGet(route.view+".js").then(function(def){_def=def;var modules=null;var _opt;var Page=function(e){_opt=e;layout=e.layout||layout;modules=e.modules};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(route.view);return PomeloModule.require(e,t,n)}}def=eval(def+"\r\n//# sourceURL="+route.view+".js");hookMountedAndUnmounted(_opt,viewName);return _resolveModules(modules,viewName)}).then(function(){if(exports.root()&&exports.root().$layout){if(exports.root().$layout===layout){_parseQueryString(params);var fields=Object.getOwnPropertyNames(params);for(var i=0;i<fields.length;++i){var val=params[fields[i]];exports.root()[fields[i]]=val}exports.root().$containers[0].open(route.view,params);var promise=Promise.resolve();if(typeof exports.root().$.$onUpdating=="function"){var result=exports.root().$.$onUpdating.call(exports.root());if(result instanceof Promise){promise=result}}return promise}exports.root().$.appContext.app.unmount()}if(layout){var layoutName=layout+(mobile?".m":"");var _layoutHtml;return _httpGet(layoutName+".html").then(function(e){_layoutHtml=e;return _httpGet(layout+".js")}).then(function(js){var _opt=null;var Layout=function(e){_opt=e};var LayoutNext=function(e){if(!e.data){e.data=function(){return{}}}var o=e.setup||function(e,t){};e.setup=function(e,t){o(e,t);var n=Vue.getCurrentInstance();n.$app=exports};_opt.template=_layoutHtml;_patchComponent(layout,_opt);_layoutHtml=_opt.template;var t=_layoutHtml.indexOf("<html");var n=_layoutHtml.indexOf(">",t);_layoutHtml=_layoutHtml.substr(n+1);var s=_layoutHtml.lastIndexOf("</html>");_layoutHtml=_layoutHtml.substr(0,s);document.querySelector("html").innerHTML=_layoutHtml;var i=e.data;e.data=function(){var e=i.call(this,exports);_combineObject(params,e);_parseQueryString(e);return e};var r=(new Date).getTime();var l="pomelo-"+r;var c="container-"+r;var a=document.querySelector("body").innerHTML.replace("<render-body></render-body>",'<div id="'+c+'"></div>');document.querySelector("body").innerHTML='<div id="'+l+'">'+a+"</div>";e.template=null;if(!e.mounted){e.mounted=function(){}}mountedFunc=e.mounted;e.mounted=function(){var e=this.$container("#"+c);e.open(route.view,params);return mountedFunc.call(this)};Root(e,"#"+l,layout)};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(layout);return PomeloModule.require(e,t,n)}}eval(js+"\r\n//# sourceURL="+layout+".js");hookMountedAndUnmounted(_opt,layoutName);return _resolveModules(_opt.modules,layout).then(function(){LayoutNext(_opt);return Promise.resolve()})})}else{var viewName=route.view+(_options.mobile()?".m":"");return _applyLayoutHtml(route.view).then(function(appId){var _opt=null;var components=null;var Page=function(e){_opt=e};var PageNext=function(e){modules=e.modules;components=e.components||[];Root(e,"#"+appId,route.view)};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(route.view);return PomeloModule.require(e,t,n)}}eval(_def+"\r\n//# sourceURL="+route.view+".js");if(!_opt){_opt={}}if(!_opt.data){_opt.data=function(){return{}}}var dataFunc=_opt.data;_opt.data=function(){var e=dataFunc.call(this,exports);_combineObject(params,e);_parseQueryString(e);return e};hookMountedAndUnmounted(_opt,viewName);_patchComponent(viewName,_opt);return _resolveModules(_opt.modules,viewName).then(function(){PageNext(_opt);return Promise.resolve();P})})}}).then(function(){ForceUpdate()}).catch(function(e){console.error(e)})}function Redirect(e){var t=null;var n=document.querySelector("title");if(n){t=n.innerText}window.history.pushState(null,t,e);UpdateLayout()}function LoadScript(url){if(_httpCached(url)){with(window){if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(url);return PomeloModule.require(e,t,n)}}eval(_cache[url]+"\r\n//# sourceURL="+url)}return Promise.resolve()}return _httpGet(url).then(function(js){with(window){if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(url);return PomeloModule.require(e,t,n)}}eval(js+"\r\n//# sourceURL="+url)}_cache[url]=js;return Promise.resolve()}).catch(e=>{console.error("Load module "+url+" failed.");console.error(e)})}function resolveRelativePathPlain(e){if(e.indexOf("./")==-1&&e.indexOf("../")==-1){return e}var t=e.lastIndexOf("../");if(t==0){return e}e=e.replaceAll("/./","/");if(e.indexOf("./")==0){e=e.substr(2)}if(t){var n=e.substr(0,t);var o=e.substr(t);return resolveRelativePath(o,n)}}function resolveRelativePath(e,t){if(e.length&&e[0]=="/"||e.indexOf("http")==0){return resolveRelativePathPlain(e)}if(e.length&&e[0]!="."){return resolveRelativePathPlain(t+e)}if(e.indexOf("./")==0){return resolveRelativePath(e.substr(2),t)}if(e.indexOf("../")==0){e=e.substr(3);t=getContainingFolder(t.substr(0,t.length-1));return resolveRelativePath(e,t)}}function _loadComponents(components,viewName){var ret=[];if(!components.length){return Promise.resolve(ret)}var workingDirectory=getContainingFolder(viewName||"/");var viewName;var subComponentRefs=[];return Promise.all(components.map(function(c){c=resolveRelativePath(parseMacroPath(viewName,c),workingDirectory);viewName=c;var _html;var _name;var _opt;return _httpGet(c+".html").then(function(e){_html=e;return _httpGet(c+".js")}).then(function(comJs){var Component=function(e,t){_opt=t;_name=e};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(c);return PomeloModule.require(e,t,n)}}eval(comJs+"\r\n//# sourceURL="+c+".js");subComponentRefs=_opt.components;hookMountedAndUnmounted(_opt,c);if(!_opt.template){_opt.template=_html}if(!_opt.setup){_opt.setup=function(){}}var originSetup=_opt.setup;_opt.setup=function(e,t){originSetup(e,t);var n=Vue.getCurrentInstance();n.$app=exports};_patchComponent(c,_opt);var originData=_opt.data||function(){return{}};_opt.data=function(){return originData.call(this,exports)};return _resolveModules(_opt.modules,c)}).then(function(){ret.push({name:_name,options:_opt});return Promise.resolve()})})).then(function(){return _loadComponents(subComponentRefs||[],viewName)}).then(function(e){for(var t=0;t<e.length;++t){var n=e[t];if(ret.filter(e=>e.name==n.name).length){continue}ret.push(n)}return Promise.resolve(ret)})}exports._addins=[];function _patchComponent(n,i){prepared=true;if(!i.data){i.data=function(){return{}}}if(!i.style){i.style=[]}if(!i.style instanceof Array){if(i.style instanceof String){i.style=[i.style]}else{i.style=["@(css)"]}}if(!i.components){i.components=[]}if(!i.created){i.created=function(){}}if(!i.mounted){i.mounted=function(){}}if(!i.unmounted){i.unmounted=function(){}}if(!i.destroyed){i.destroyed=function(){}}if(!i.watch){i.watch={}}if(!i.computed){i.computed={}}var o=i.data;i.data=function(e){var t=o.call(this,e);var n={pomeUiSubTitles:[]};_combineObject(n,t);return t};if(!i.methods){i.methods={}}i.methods.pomeUiPassTitle=pomeUiPassTitle;if(!i.watch){i.watch={}}if(!i.watch.title){i.watch.title=function(){}}var s=i.watch.title;i.watch.title=async function(){var e=s.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e=Promise.resolve();t.pomeUiPassTitle();return e})};for(let t=0;t<exports._addins.length;++t){let e=exports._addins[t].view;let s=exports._addins[t].opt;if(e!="*"&&n!=e){continue}if(s.data){var r=i.data;i.data=function(e){var t=r.call(this,e);var n={};try{n=s.data.call(this,e)}catch(e){console.error(e)}_combineObject(n,t);return t}}if(s.style){if(s.style instanceof Boolean){s.style=["@(css)"]}if(s.style instanceof String){s.style=[s.style]}s.style.forEach(function(t){if(!i.style.some(e=>e==t)){i.push(t)}})}if(s.components){s.components.forEach(function(t){if(!i.components.some(e=>e==t)){i.components.push(t)}})}if(s.layout){i.layout=s.layout}if(s.props){if(!i.props){i.props=[]}s.props.forEach(function(t){if(!i.props.some(e=>e==t)){i.props.push(t)}})}if(s.watch){var l=Object.getOwnPropertyNames(s.watch);l.forEach(function(n){var o=i.watch[n];i.watch[n]=function(e,t){o.invoke(this,e,t);try{s.watch[n].invoke(this,e,t)}catch(e){console.error(e)}}})}if(s.computed){var l=Object.getOwnPropertyNames(s.computed);l.forEach(function(e){i.computed[e]=s.computed[e]})}if(s.methods){var c=i.setup||function(e,t){};i.setup=function(e,t){c(e,t);var n={};var o=Object.getOwnPropertyNames(i.methods);o.forEach(function(e){n[e]=i.methods[e]});var s=Vue.getCurrentInstance();s.$baseMethods=n};var a=Object.getOwnPropertyNames(s.methods);a.forEach(function(e){i.methods[e]=s.methods[e]})}if(s.created){var u=i.created;i.created=async function(){var e=u.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e;try{e=s.created.call(t)}catch(e){console.error(e)}if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.mounted){var f=i.mounted;i.mounted=async function(){var e=f.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e;try{e=s.mounted.call(t)}catch(e){console.error(e)}if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.unmounted){var p=i.unmounted;i.unmounted=async function(){var e=p.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e;try{e=s.unmounted.call(t)}catch(e){console.error(e)}if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.destroyed){var d=i.destroyed;i.destroyed=async function(){var e=d.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e=s.destroyed.call(t);if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.template){if(s.template instanceof Function){if(i.template){if(i.template.indexOf("<html")>=0){var h=(new DOMParser).parseFromString(i.template,"text/html");s.template(h);i.template=(new XMLSerializer).serializeToString(h)}else{i.template=`<pome-ui-template>${i.template}</pome-ui-template>`;var h=(new DOMParser).parseFromString(i.template,"text/html");s.template(h);i.template=(new XMLSerializer).serializeToString(h);i.template=i.template.substr(i.template.indexOf("<pome-ui-template>")+"<pome-ui-template>".length);i.template=i.template.substr(0,i.template.indexOf("</pome-ui-template>"))}}}else{i.template=s.template}}}var m=i.created;i.created=async function(){var e=m.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e=Promise.resolve();t.pomeUiPassTitle();return e})};var g=i.unmounted;i.unmounted=async function(){var e=g.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e=Promise.resolve();t.pomeUiPassTitle([]);return e})}}function UseAddin(addinUrl){var Addin=function(e,t){exports._addins.push({view:e,opt:t})};var js=_options.httpGetSync(addinUrl);eval(js)}function UseInlineAddin(script){var Addin=function(e,t){exports._addins.push({view:e,opt:t})};eval(script)}exports.root=root;exports.useConfig=UseConfig;exports.mapRoute=MapRoute;exports.matchRoute=MatchRoute;exports.updateLayout=UpdateLayout;exports.redirect=Redirect;exports.loadScript=LoadScript;exports.forceUpdate=ForceUpdate;exports.mount=mount;exports.useRoutes=useRoutes;exports.useAddin=UseAddin;exports.useInlineAddin=UseInlineAddin;return exports}exports.build=build;
|
package/pome-ui.js
CHANGED
|
@@ -1357,8 +1357,24 @@ function build(options, exports) {
|
|
|
1357
1357
|
opt.watch = {};
|
|
1358
1358
|
}
|
|
1359
1359
|
|
|
1360
|
-
opt.watch.title
|
|
1361
|
-
|
|
1360
|
+
if (!opt.watch.title) {
|
|
1361
|
+
opt.watch.title = function () { };
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
|
|
1365
|
+
var func9 = opt.watch.title;
|
|
1366
|
+
opt.watch.title = async function () {
|
|
1367
|
+
var p1 = func9.call(this);
|
|
1368
|
+
if (!p1 || !p1 instanceof Promise) {
|
|
1369
|
+
p1 = Promise.resolve();
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
var self = this;
|
|
1373
|
+
return p1.then(function () {
|
|
1374
|
+
var p2 = Promise.resolve();
|
|
1375
|
+
self.pomeUiPassTitle();
|
|
1376
|
+
return p2;
|
|
1377
|
+
});
|
|
1362
1378
|
};
|
|
1363
1379
|
|
|
1364
1380
|
for (let i = 0; i < exports._addins.length; ++i) {
|
|
@@ -1579,13 +1595,28 @@ function build(options, exports) {
|
|
|
1579
1595
|
}
|
|
1580
1596
|
}
|
|
1581
1597
|
|
|
1582
|
-
var func7 = opt.
|
|
1583
|
-
opt.
|
|
1598
|
+
var func7 = opt.created;
|
|
1599
|
+
opt.created = async function () {
|
|
1584
1600
|
var p1 = func7.call(this);
|
|
1585
1601
|
if (!p1 || !p1 instanceof Promise) {
|
|
1586
1602
|
p1 = Promise.resolve();
|
|
1587
1603
|
}
|
|
1588
1604
|
|
|
1605
|
+
var self = this;
|
|
1606
|
+
return p1.then(function () {
|
|
1607
|
+
var p2 = Promise.resolve();
|
|
1608
|
+
self.pomeUiPassTitle();
|
|
1609
|
+
return p2;
|
|
1610
|
+
});
|
|
1611
|
+
};
|
|
1612
|
+
|
|
1613
|
+
var func8 = opt.unmounted;
|
|
1614
|
+
opt.unmounted = async function () {
|
|
1615
|
+
var p1 = func8.call(this);
|
|
1616
|
+
if (!p1 || !p1 instanceof Promise) {
|
|
1617
|
+
p1 = Promise.resolve();
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1589
1620
|
var self = this;
|
|
1590
1621
|
return p1.then(function () {
|
|
1591
1622
|
var p2 = Promise.resolve();
|