@agentprismform/agent-plugin 1.3.0 → 1.4.0

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.
@@ -2,24 +2,24 @@
2
2
  * @vue/shared v3.5.44
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
- **/function Zl(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Re={},An=[],Ot=()=>{},ii=()=>!1,qs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ws=e=>e.startsWith("onUpdate:"),et=Object.assign,Ql=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},dc=Object.prototype.hasOwnProperty,Ae=(e,t)=>dc.call(e,t),ve=Array.isArray,gn=e=>cs(e)==="[object Map]",Gs=e=>cs(e)==="[object Set]",ri=e=>cs(e)==="[object Date]",me=e=>typeof e=="function",Ve=e=>typeof e=="string",Rt=e=>typeof e=="symbol",Ee=e=>e!==null&&typeof e=="object",oi=e=>(Ee(e)||me(e))&&me(e.then)&&me(e.catch),ci=Object.prototype.toString,cs=e=>ci.call(e),fc=e=>cs(e).slice(8,-1),ui=e=>cs(e)==="[object Object]",ea=e=>Ve(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,us=Zl(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),zs=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},vc=/-\w/g,mt=zs(e=>e.replace(vc,t=>t.slice(1).toUpperCase())),pc=/\B([A-Z])/g,Mn=zs(e=>e.replace(pc,"-$1").toLowerCase()),Ys=zs(e=>e.charAt(0).toUpperCase()+e.slice(1)),ta=zs(e=>e?`on${Ys(e)}`:""),Ht=(e,t)=>!Object.is(e,t),Js=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},di=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},na=e=>{const t=parseFloat(e);return isNaN(t)?e:t},hc=e=>{const t=Ve(e)?Number(e):NaN;return isNaN(t)?e:t};let fi;const Xs=()=>fi||(fi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function $t(e){if(ve(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],l=Ve(s)?bc(s):$t(s);if(l)for(const a in l)t[a]=l[a]}return t}else if(Ve(e)||Ee(e))return e}const mc=/;(?![^(]*\))/g,gc=/:([^]+)/,yc=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function bc(e){const t={};return e.replace(yc,n=>n.startsWith("/*")?"":n).split(mc).forEach(n=>{if(n){const s=n.split(gc);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function se(e){let t="";if(Ve(e))t=e;else if(ve(e))for(let n=0;n<e.length;n++){const s=se(e[n]);s&&(t+=s+" ")}else if(Ee(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const _c=Zl("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly");function vi(e){return!!e||e===""}function kc(e,t,n){if(e.length!==t.length)return!1;let s=!0;for(let l=0;s&&l<e.length;l++)s=Zs(e[l],t[l],n);return s}function pi(e,t,n){if(e.size!==t.size)return!1;const s=Array.from(t),l=new Uint8Array(s.length);for(const a of e){let i=-1;for(let r=0;r<s.length;r++)if(!l[r]&&Zs(a,s[r],n)){i=r;break}if(i<0)return!1;l[i]=1}return!0}function Cc(e,t,n){let s=gn(e),l=gn(t);if(s||l||(s=Gs(e),l=Gs(t),s||l))return s&&l?pi(e,t,n):!1;const a=Object.keys(e).length,i=Object.keys(t).length;if(a!==i)return!1;for(const r in e){const o=e.hasOwnProperty(r),u=t.hasOwnProperty(r);if(o&&!u||!o&&u||!Zs(e[r],t[r],n))return!1}return String(e)===String(t)}function hi(e,t,n,s){n||(n=[new Map,new Map]);const[l,a]=n;if(l.has(e)||a.has(t))return l.get(e)===t&&a.get(t)===e;l.set(e,t),a.set(t,e);const i=s(e,t,n);return l.delete(e),a.delete(t),i}function Zs(e,t,n){if(e===t)return!0;let s=ri(e),l=ri(t);return s||l?s&&l?e.getTime()===t.getTime():!1:(s=Rt(e),l=Rt(t),s||l?e===t:(s=ve(e),l=ve(t),s||l?s&&l?hi(e,t,n,kc):!1:(s=Ee(e),l=Ee(t),s||l?!s||!l?!1:hi(e,t,n,Cc):String(e)===String(t))))}const mi=e=>!!(e&&e.__v_isRef===!0),k=e=>Ve(e)?e:e==null?"":ve(e)||Ee(e)&&(e.toString===ci||!me(e.toString))?mi(e)?k(e.value):JSON.stringify(e,gi,2):String(e),gi=(e,t)=>mi(t)?gi(e,t.value):gn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,l],a)=>(n[sa(s,a)+" =>"]=l,n),{})}:Gs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>sa(n))}:Rt(t)?sa(t):Ee(t)&&!ve(t)&&!ui(t)?String(t):t,sa=(e,t="")=>{var n;return Rt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function Sc(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/**
5
+ **/function Zl(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Re={},An=[],Ot=()=>{},ii=()=>!1,qs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ws=e=>e.startsWith("onUpdate:"),et=Object.assign,Ql=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},dc=Object.prototype.hasOwnProperty,Me=(e,t)=>dc.call(e,t),pe=Array.isArray,gn=e=>cs(e)==="[object Map]",Gs=e=>cs(e)==="[object Set]",ri=e=>cs(e)==="[object Date]",me=e=>typeof e=="function",Ve=e=>typeof e=="string",Rt=e=>typeof e=="symbol",Fe=e=>e!==null&&typeof e=="object",oi=e=>(Fe(e)||me(e))&&me(e.then)&&me(e.catch),ci=Object.prototype.toString,cs=e=>ci.call(e),fc=e=>cs(e).slice(8,-1),ui=e=>cs(e)==="[object Object]",ea=e=>Ve(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,us=Zl(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),zs=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},vc=/-\w/g,mt=zs(e=>e.replace(vc,t=>t.slice(1).toUpperCase())),pc=/\B([A-Z])/g,Mn=zs(e=>e.replace(pc,"-$1").toLowerCase()),Ys=zs(e=>e.charAt(0).toUpperCase()+e.slice(1)),ta=zs(e=>e?`on${Ys(e)}`:""),qt=(e,t)=>!Object.is(e,t),Js=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},di=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},na=e=>{const t=parseFloat(e);return isNaN(t)?e:t},hc=e=>{const t=Ve(e)?Number(e):NaN;return isNaN(t)?e:t};let fi;const Xs=()=>fi||(fi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function $t(e){if(pe(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],l=Ve(s)?bc(s):$t(s);if(l)for(const a in l)t[a]=l[a]}return t}else if(Ve(e)||Fe(e))return e}const mc=/;(?![^(]*\))/g,gc=/:([^]+)/,yc=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function bc(e){const t={};return e.replace(yc,n=>n.startsWith("/*")?"":n).split(mc).forEach(n=>{if(n){const s=n.split(gc);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function se(e){let t="";if(Ve(e))t=e;else if(pe(e))for(let n=0;n<e.length;n++){const s=se(e[n]);s&&(t+=s+" ")}else if(Fe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const _c=Zl("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly");function vi(e){return!!e||e===""}function kc(e,t,n){if(e.length!==t.length)return!1;let s=!0;for(let l=0;s&&l<e.length;l++)s=Zs(e[l],t[l],n);return s}function pi(e,t,n){if(e.size!==t.size)return!1;const s=Array.from(t),l=new Uint8Array(s.length);for(const a of e){let i=-1;for(let r=0;r<s.length;r++)if(!l[r]&&Zs(a,s[r],n)){i=r;break}if(i<0)return!1;l[i]=1}return!0}function Cc(e,t,n){let s=gn(e),l=gn(t);if(s||l||(s=Gs(e),l=Gs(t),s||l))return s&&l?pi(e,t,n):!1;const a=Object.keys(e).length,i=Object.keys(t).length;if(a!==i)return!1;for(const r in e){const o=e.hasOwnProperty(r),u=t.hasOwnProperty(r);if(o&&!u||!o&&u||!Zs(e[r],t[r],n))return!1}return String(e)===String(t)}function hi(e,t,n,s){n||(n=[new Map,new Map]);const[l,a]=n;if(l.has(e)||a.has(t))return l.get(e)===t&&a.get(t)===e;l.set(e,t),a.set(t,e);const i=s(e,t,n);return l.delete(e),a.delete(t),i}function Zs(e,t,n){if(e===t)return!0;let s=ri(e),l=ri(t);return s||l?s&&l?e.getTime()===t.getTime():!1:(s=Rt(e),l=Rt(t),s||l?e===t:(s=pe(e),l=pe(t),s||l?s&&l?hi(e,t,n,kc):!1:(s=Fe(e),l=Fe(t),s||l?!s||!l?!1:hi(e,t,n,Cc):String(e)===String(t))))}const mi=e=>!!(e&&e.__v_isRef===!0),k=e=>Ve(e)?e:e==null?"":pe(e)||Fe(e)&&(e.toString===ci||!me(e.toString))?mi(e)?k(e.value):JSON.stringify(e,gi,2):String(e),gi=(e,t)=>mi(t)?gi(e,t.value):gn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,l],a)=>(n[sa(s,a)+" =>"]=l,n),{})}:Gs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>sa(n))}:Rt(t)?sa(t):Fe(t)&&!pe(t)&&!ui(t)?String(t):t,sa=(e,t="")=>{var n;return Rt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function Sc(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/**
6
6
  * @vue/reactivity v3.5.44
7
7
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
8
  * @license MIT
9
- **/let rt;class wc{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&rt&&(rt.active?(this.parent=rt,this.index=(rt.scopes||(rt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){const l=this.scopes.slice();for(t=0,n=l.length;t<n;t++)l[t].resume()}const s=this.effects.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}}run(t){if(this._active){const n=rt;try{return rt=this,t()}finally{rt=n}}}on(){++this._on===1&&(this.prevScope=rt,rt=this)}off(){if(this._on>0&&--this._on===0){if(rt===this)rt=this.prevScope;else{let t=rt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const l=this.scopes.slice();for(n=0,s=l.length;n<s;n++)l[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const l=this.parent.scopes.pop();l&&l!==this&&(this.parent.scopes[this.index]=l,l.index=this.index)}this.parent=void 0}}}function Tc(){return rt}let Be;const la=new WeakSet;class yi{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,rt&&(rt.active?rt.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,la.has(this)&&(la.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||_i(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ti(this),ki(this);const t=Be,n=Lt;Be=this,Lt=!0;try{return this.fn()}finally{Ci(this),Be=t,Lt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)oa(t);this.deps=this.depsTail=void 0,Ti(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?la.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ra(this)&&this.run()}get dirty(){return ra(this)}}let bi=0,ds,fs;function _i(e,t=!1){if(e.flags|=8,t){e.next=fs,fs=e;return}e.next=ds,ds=e}function aa(){bi++}function ia(){if(--bi>0)return;if(fs){let t=fs;for(fs=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ds;){let t=ds;for(ds=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function ki(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ci(e){let t,n=e.depsTail,s=n;for(;s;){const l=s.prevDep;s.version===-1?(s===n&&(n=l),oa(s),xc(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=l}e.deps=t,e.depsTail=n}function ra(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Si(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Si(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===vs)||(e.globalVersion=vs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ra(e))))return;e.flags|=2;const t=e.dep,n=Be,s=Lt;Be=e,Lt=!0;try{ki(e);const l=e.fn(e._value);(t.version===0||Ht(l,e._value))&&(e.flags|=128,e._value=l,t.version++)}catch(l){throw t.version++,l}finally{Be=n,Lt=s,Ci(e),e.flags&=-3}}function oa(e,t=!1){const{dep:n,prevSub:s,nextSub:l}=e;if(s&&(s.nextSub=l,e.prevSub=void 0),l&&(l.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let a=n.computed.deps;a;a=a.nextDep)oa(a,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function xc(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Lt=!0;const wi=[];function Nt(){wi.push(Lt),Lt=!1}function Vt(){const e=wi.pop();Lt=e===void 0?!0:e}function Ti(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Be;Be=void 0;try{t()}finally{Be=n}}}let vs=0;class $c{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ca{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Be||!Lt||Be===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Be)n=this.activeLink=new $c(Be,this),Be.deps?(n.prevDep=Be.depsTail,Be.depsTail.nextDep=n,Be.depsTail=n):Be.deps=Be.depsTail=n,xi(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Be.depsTail,n.nextDep=void 0,Be.depsTail.nextDep=n,Be.depsTail=n,Be.deps===n&&(Be.deps=s)}return n}trigger(t){this.version++,vs++,this.notify(t)}notify(t){aa();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ia()}}}function xi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)xi(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ua=new WeakMap,En=Symbol(""),da=Symbol(""),ps=Symbol("");function vt(e,t,n){if(Lt&&Be){let s=ua.get(e);s||ua.set(e,s=new Map);let l=s.get(n);l||(s.set(n,l=new ca),l.map=s,l.key=n),l.track()}}function ln(e,t,n,s,l,a){const i=ua.get(e);if(!i){vs++;return}const r=o=>{o&&o.trigger()};if(aa(),t==="clear")i.forEach(r);else{const o=ve(e),u=o&&ea(n);if(o&&n==="length"){const c=Number(s);i.forEach((d,v)=>{(v==="length"||v===ps||!Rt(v)&&v>=c)&&r(d)})}else switch((n!==void 0||i.has(void 0))&&r(i.get(n)),u&&r(i.get(ps)),t){case"add":o?u&&r(i.get("length")):(r(i.get(En)),gn(e)&&r(i.get(da)));break;case"delete":o||(r(i.get(En)),gn(e)&&r(i.get(da)));break;case"set":gn(e)&&r(i.get(En));break}}ia()}function qn(e){const t=Te(e);return t===e||(vt(t,"iterate",ps),At(e))?t:Wt(e)?yn(e)?t.map(n=>bn(Mt(n))):t.map(bn):t.map(Mt)}function Qs(e){return vt(e=Te(e),"iterate",ps),e}function qt(e,t){return Wt(e)?bn(yn(e)?Mt(t):t):Mt(t)}const Ac={__proto__:null,[Symbol.iterator](){return fa(this,Symbol.iterator,e=>qt(this,e))},concat(...e){return qn(this).concat(...e.map(t=>ve(t)?qn(t):t))},entries(){return fa(this,"entries",e=>(e[1]=qt(this,e[1]),e))},every(e,t){return an(this,"every",e,t,void 0,arguments)},filter(e,t){return an(this,"filter",e,t,n=>n.map(s=>qt(this,s)),arguments)},find(e,t){return an(this,"find",e,t,n=>qt(this,n),arguments)},findIndex(e,t){return an(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return an(this,"findLast",e,t,n=>qt(this,n),arguments)},findLastIndex(e,t){return an(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return an(this,"forEach",e,t,void 0,arguments)},includes(...e){return va(this,"includes",e)},indexOf(...e){return va(this,"indexOf",e)},join(e){return qn(this).join(e)},lastIndexOf(...e){return va(this,"lastIndexOf",e)},map(e,t){return an(this,"map",e,t,void 0,arguments)},pop(){return hs(this,"pop")},push(...e){return hs(this,"push",e)},reduce(e,...t){return Mi(this,"reduce",e,t)},reduceRight(e,...t){return Mi(this,"reduceRight",e,t)},shift(){return hs(this,"shift")},some(e,t){return an(this,"some",e,t,void 0,arguments)},splice(...e){return hs(this,"splice",e)},toReversed(){return qn(this).toReversed()},toSorted(e){return qn(this).toSorted(e)},toSpliced(...e){return qn(this).toSpliced(...e)},unshift(...e){return hs(this,"unshift",e)},values(){return fa(this,"values",e=>qt(this,e))}};function fa(e,t,n){const s=Qs(e),l=s[t],a=l.call(s);if(s!==e&&!At(e)){if(a[Symbol.toStringTag]==="Array Iterator"){const i=Object.create(Object.getPrototypeOf(a));return i.next=()=>$i(a.next(),n),l!==Ai[t]&&Object.defineProperties(i,{return:{get(){const r=a.return;return typeof r=="function"?r.bind(a):r}},throw:{get(){const r=a.throw;return typeof r=="function"?r.bind(a):r}}}),i}a._next=a.next,a.next=()=>$i(a._next(),n)}return a}function $i(e,t){return e.done||(e.value=t(e.value)),e}const Ai=Array.prototype;function an(e,t,n,s,l,a){const i=Qs(e),r=i!==e&&!At(e),o=i[t];if(o!==Ai[t]){const d=o.apply(e,a);return r?Mt(d):d}let u=n;i!==e&&(r?u=function(d,v){return n.call(this,qt(e,d),v,e)}:n.length>2&&(u=function(d,v){return n.call(this,d,v,e)}));const c=o.call(i,u,s);return r&&l?l(c):c}function Mi(e,t,n,s){const l=Qs(e),a=l!==e&&!At(e);let i=n,r=!1;l!==e&&(a?(r=s.length===0,i=function(u,c,d){return r&&(r=!1,u=qt(e,u)),n.call(this,u,qt(e,c),d,e)}):n.length>3&&(i=function(u,c,d){return n.call(this,u,c,d,e)}));const o=l[t](i,...s);return r?qt(e,o):o}function va(e,t,n){const s=Te(e);vt(s,"iterate",ps);const l=s[t](...n);return(l===-1||l===!1)&&ma(n[0])?(n[0]=Te(n[0]),s[t](...n)):l}function hs(e,t,n=[]){Nt(),aa();const s=Te(e)[t].apply(e,n);return ia(),Vt(),s}const Mc=Zl("__proto__,__v_isRef,__isVue"),Ei=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Rt));function Ec(e){Rt(e)||(e=String(e));const t=Te(this);return vt(t,"has",e),t.hasOwnProperty(e)}class Fi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const l=this._isReadonly,a=this._isShallow;if(n==="__v_isReactive")return!l;if(n==="__v_isReadonly")return l;if(n==="__v_isShallow")return a;if(n==="__v_raw")return s===(l?a?Li:Ri:a?Oi:Pi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=ve(t);if(!l){let o;if(i&&(o=Ac[n]))return o;if(n==="hasOwnProperty")return Ec}const r=Reflect.get(t,n,ot(t)?t:s);if((Rt(n)?Ei.has(n):Mc(n))||(l||vt(t,"get",n),a))return r;if(ot(r)){const o=i&&ea(n)?r:r.value;return l&&Ee(o)?ha(o):o}return Ee(r)?l?ha(r):sl(r):r}}class Ii extends Fi{constructor(t=!1){super(!1,t)}set(t,n,s,l){let a=t[n];const i=ve(t)&&ea(n);if(!this._isShallow){const u=Wt(a);if(!At(s)&&!Wt(s)&&(a=Te(a),s=Te(s)),!i&&ot(a)&&!ot(s))return u||(a.value=s),!0}const r=i?Number(n)<t.length:Ae(t,n),o=Reflect.set(t,n,s,ot(t)?t:l);return t===Te(l)&&o&&(r?Ht(s,a)&&ln(t,"set",n,s):ln(t,"add",n,s)),o}deleteProperty(t,n){const s=Ae(t,n);t[n];const l=Reflect.deleteProperty(t,n);return l&&s&&ln(t,"delete",n,void 0),l}has(t,n){const s=Reflect.has(t,n);return(!Rt(n)||!Ei.has(n))&&vt(t,"has",n),s}ownKeys(t){return vt(t,"iterate",ve(t)?"length":En),Reflect.ownKeys(t)}}class Di extends Fi{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Fc=new Ii,Ic=new Di,Dc=new Ii(!0),Pc=new Di(!0),pa=e=>e,el=e=>Reflect.getPrototypeOf(e);function Oc(e,t,n){return function(...s){const l=this.__v_raw,a=Te(l),i=gn(a),r=e==="entries"||e===Symbol.iterator&&i,o=e==="keys"&&i,u=l[e](...s),c=n?pa:t?bn:Mt;return!t&&vt(a,"iterate",o?da:En),et(Object.create(u),{next(){const{value:d,done:v}=u.next();return v?{value:d,done:v}:{value:r?[c(d[0]),c(d[1])]:c(d),done:v}}})}}function tl(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Rc(e,t){const n={get(l){const a=this.__v_raw,i=Te(a),r=Te(l);e||(Ht(l,r)&&vt(i,"get",l),vt(i,"get",r));const{has:o}=el(i),u=t?pa:e?bn:Mt;if(o.call(i,l))return u(a.get(l));if(o.call(i,r))return u(a.get(r));a!==i&&a.get(l)},get size(){const l=this.__v_raw;return!e&&vt(Te(l),"iterate",En),l.size},has(l){const a=this.__v_raw,i=Te(a),r=Te(l);return e||(Ht(l,r)&&vt(i,"has",l),vt(i,"has",r)),l===r?a.has(l):a.has(l)||a.has(r)},forEach(l,a){const i=this,r=i.__v_raw,o=Te(r),u=t?pa:e?bn:Mt;return!e&&vt(o,"iterate",En),r.forEach((c,d)=>l.call(a,u(c),u(d),i))}};return et(n,e?{add:tl("add"),set:tl("set"),delete:tl("delete"),clear:tl("clear")}:{add(l){const a=Te(this),i=el(a),r=Te(l),o=!t&&!At(l)&&!Wt(l)?r:l;return i.has.call(a,o)||Ht(l,o)&&i.has.call(a,l)||Ht(r,o)&&i.has.call(a,r)||(a.add(o),ln(a,"add",o,o)),this},set(l,a){!t&&!At(a)&&!Wt(a)&&(a=Te(a));const i=Te(this),{has:r,get:o}=el(i);let u=r.call(i,l);u||(l=Te(l),u=r.call(i,l));const c=o.call(i,l);return i.set(l,a),u?Ht(a,c)&&ln(i,"set",l,a):ln(i,"add",l,a),this},delete(l){const a=Te(this),{has:i,get:r}=el(a);let o=i.call(a,l);o||(l=Te(l),o=i.call(a,l)),r&&r.call(a,l);const u=a.delete(l);return o&&ln(a,"delete",l,void 0),u},clear(){const l=Te(this),a=l.size!==0,i=l.clear();return a&&ln(l,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(l=>{n[l]=Oc(l,e,t)}),n}function nl(e,t){const n=Rc(e,t);return(s,l,a)=>l==="__v_isReactive"?!e:l==="__v_isReadonly"?e:l==="__v_isShallow"?t:l==="__v_raw"?s:Reflect.get(Ae(n,l)&&l in s?n:s,l,a)}const Lc={get:nl(!1,!1)},Nc={get:nl(!1,!0)},Vc={get:nl(!0,!1)},Bc={get:nl(!0,!0)},Pi=new WeakMap,Oi=new WeakMap,Ri=new WeakMap,Li=new WeakMap;function jc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function sl(e){return Wt(e)?e:ll(e,!1,Fc,Lc,Pi)}function Kc(e){return ll(e,!1,Dc,Nc,Oi)}function ha(e){return ll(e,!0,Ic,Vc,Ri)}function I_(e){return ll(e,!0,Pc,Bc,Li)}function ll(e,t,n,s,l){if(!Ee(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const a=l.get(e);if(a)return a;const i=jc(fc(e));if(i===0)return e;const r=new Proxy(e,i===2?s:n);return l.set(e,r),r}function yn(e){return Wt(e)?yn(e.__v_raw):!!(e&&e.__v_isReactive)}function Wt(e){return!!(e&&e.__v_isReadonly)}function At(e){return!!(e&&e.__v_isShallow)}function ma(e){return e?!!e.__v_raw:!1}function Te(e){const t=e&&e.__v_raw;return t?Te(t):e}function Uc(e){return!Ae(e,"__v_skip")&&Object.isExtensible(e)&&di(e,"__v_skip",!0),e}const Mt=e=>Ee(e)?sl(e):e,bn=e=>Ee(e)?ha(e):e;function ot(e){return e?e.__v_isRef===!0:!1}function H(e){return Hc(e,!1)}function Hc(e,t){return ot(e)?e:new qc(e,t)}class qc{constructor(t,n){this.dep=new ca,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Te(t),this._value=n?t:Mt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||At(t)||Wt(t);t=s?t:Te(t),Ht(t,n)&&(this._rawValue=t,this._value=s?t:Mt(t),this.dep.trigger())}}function Me(e){return ot(e)?e.value:e}const Wc={get:(e,t,n)=>t==="__v_raw"?e:Me(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const l=e[t];return ot(l)&&!ot(n)?(l.value=n,!0):Reflect.set(e,t,n,s)}};function Ni(e){return yn(e)?e:new Proxy(e,Wc)}class Gc{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ca(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=vs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Be!==this)return _i(this,!0),!0}get value(){const t=this.dep.track();return Si(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function zc(e,t,n=!1){let s,l;return me(e)?s=e:(s=e.get,l=e.set),new Gc(s,l,n)}const al={},il=new WeakMap;let Fn;function Yc(e,t=!1,n=Fn){if(n){let s=il.get(n);s||il.set(n,s=[]),s.push(e)}}function Jc(e,t,n=Re){const{immediate:s,deep:l,once:a,scheduler:i,augmentJob:r,call:o}=n,u=C=>l?C:At(C)||l===!1||l===0?rn(C,1):rn(C);let c,d,v,$,x=!1,A=!1;if(ot(e)?(d=()=>e.value,x=At(e)):yn(e)?(d=()=>u(e),x=!0):ve(e)?(A=!0,x=e.some(C=>yn(C)||At(C)),d=()=>e.map(C=>{if(ot(C))return C.value;if(yn(C))return u(C);if(me(C))return o?o(C,2):C()})):me(e)?t?d=o?()=>o(e,2):e:d=()=>{if(v){Nt();try{v()}finally{Vt()}}const C=Fn;Fn=c;try{return o?o(e,3,[$]):e($)}finally{Fn=C}}:d=Ot,t&&l){const C=d,B=l===!0?1/0:l;d=()=>rn(C(),B)}const w=Tc(),O=()=>{c.stop(),w&&w.active&&Ql(w.effects,c)};if(a&&t){const C=t;t=(...B)=>{try{return C(...B)}finally{O()}}}let y=A?new Array(e.length).fill(al):al;const b=C=>{if(!(!(c.flags&1)||!c.dirty&&!C))if(t){const B=c.run();if(C||l||x||(A?B.some((D,U)=>Ht(D,y[U])):Ht(B,y))){const D=Fn;Nt();try{v&&v(),Fn=c;const U=[B,y===al?void 0:A&&y[0]===al?[]:y,$];y=B,o?o(t,3,U):t(...U)}finally{Fn=D,Vt()}}}else c.run()};return r&&r(b),c=new yi(d),c.scheduler=i?()=>i(b,!1):b,$=C=>Yc(C,!1,c),v=c.onStop=()=>{const C=il.get(c);if(C){if(o)o(C,4);else for(const B of C)B();il.delete(c)}},t?s?b(!0):y=c.run():i?i(b.bind(null,!0),!0):c.run(),O.pause=c.pause.bind(c),O.resume=c.resume.bind(c),O.stop=O,O}function rn(e,t=1/0,n){if(t<=0||!Ee(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ot(e))rn(e.value,t,n);else if(ve(e))for(let s=0;s<e.length;s++)rn(e[s],t,n);else if(Gs(e)||gn(e))e.forEach(s=>{rn(s,t,n)});else if(ui(e)){for(const s in e)rn(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&rn(e[s],t,n)}return e}/**
9
+ **/let rt;class wc{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&rt&&(rt.active?(this.parent=rt,this.index=(rt.scopes||(rt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){const l=this.scopes.slice();for(t=0,n=l.length;t<n;t++)l[t].resume()}const s=this.effects.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}}run(t){if(this._active){const n=rt;try{return rt=this,t()}finally{rt=n}}}on(){++this._on===1&&(this.prevScope=rt,rt=this)}off(){if(this._on>0&&--this._on===0){if(rt===this)rt=this.prevScope;else{let t=rt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const l=this.scopes.slice();for(n=0,s=l.length;n<s;n++)l[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const l=this.parent.scopes.pop();l&&l!==this&&(this.parent.scopes[this.index]=l,l.index=this.index)}this.parent=void 0}}}function Tc(){return rt}let Be;const la=new WeakSet;class yi{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,rt&&(rt.active?rt.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,la.has(this)&&(la.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||_i(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ti(this),ki(this);const t=Be,n=Lt;Be=this,Lt=!0;try{return this.fn()}finally{Ci(this),Be=t,Lt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)oa(t);this.deps=this.depsTail=void 0,Ti(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?la.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ra(this)&&this.run()}get dirty(){return ra(this)}}let bi=0,ds,fs;function _i(e,t=!1){if(e.flags|=8,t){e.next=fs,fs=e;return}e.next=ds,ds=e}function aa(){bi++}function ia(){if(--bi>0)return;if(fs){let t=fs;for(fs=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ds;){let t=ds;for(ds=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function ki(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ci(e){let t,n=e.depsTail,s=n;for(;s;){const l=s.prevDep;s.version===-1?(s===n&&(n=l),oa(s),xc(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=l}e.deps=t,e.depsTail=n}function ra(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Si(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Si(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===vs)||(e.globalVersion=vs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ra(e))))return;e.flags|=2;const t=e.dep,n=Be,s=Lt;Be=e,Lt=!0;try{ki(e);const l=e.fn(e._value);(t.version===0||qt(l,e._value))&&(e.flags|=128,e._value=l,t.version++)}catch(l){throw t.version++,l}finally{Be=n,Lt=s,Ci(e),e.flags&=-3}}function oa(e,t=!1){const{dep:n,prevSub:s,nextSub:l}=e;if(s&&(s.nextSub=l,e.prevSub=void 0),l&&(l.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let a=n.computed.deps;a;a=a.nextDep)oa(a,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function xc(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Lt=!0;const wi=[];function Nt(){wi.push(Lt),Lt=!1}function Vt(){const e=wi.pop();Lt=e===void 0?!0:e}function Ti(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Be;Be=void 0;try{t()}finally{Be=n}}}let vs=0;class $c{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ca{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Be||!Lt||Be===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Be)n=this.activeLink=new $c(Be,this),Be.deps?(n.prevDep=Be.depsTail,Be.depsTail.nextDep=n,Be.depsTail=n):Be.deps=Be.depsTail=n,xi(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Be.depsTail,n.nextDep=void 0,Be.depsTail.nextDep=n,Be.depsTail=n,Be.deps===n&&(Be.deps=s)}return n}trigger(t){this.version++,vs++,this.notify(t)}notify(t){aa();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ia()}}}function xi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)xi(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ua=new WeakMap,En=Symbol(""),da=Symbol(""),ps=Symbol("");function vt(e,t,n){if(Lt&&Be){let s=ua.get(e);s||ua.set(e,s=new Map);let l=s.get(n);l||(s.set(n,l=new ca),l.map=s,l.key=n),l.track()}}function ln(e,t,n,s,l,a){const i=ua.get(e);if(!i){vs++;return}const r=o=>{o&&o.trigger()};if(aa(),t==="clear")i.forEach(r);else{const o=pe(e),u=o&&ea(n);if(o&&n==="length"){const c=Number(s);i.forEach((d,v)=>{(v==="length"||v===ps||!Rt(v)&&v>=c)&&r(d)})}else switch((n!==void 0||i.has(void 0))&&r(i.get(n)),u&&r(i.get(ps)),t){case"add":o?u&&r(i.get("length")):(r(i.get(En)),gn(e)&&r(i.get(da)));break;case"delete":o||(r(i.get(En)),gn(e)&&r(i.get(da)));break;case"set":gn(e)&&r(i.get(En));break}}ia()}function qn(e){const t=xe(e);return t===e||(vt(t,"iterate",ps),At(e))?t:Gt(e)?yn(e)?t.map(n=>bn(Mt(n))):t.map(bn):t.map(Mt)}function Qs(e){return vt(e=xe(e),"iterate",ps),e}function Wt(e,t){return Gt(e)?bn(yn(e)?Mt(t):t):Mt(t)}const Ac={__proto__:null,[Symbol.iterator](){return fa(this,Symbol.iterator,e=>Wt(this,e))},concat(...e){return qn(this).concat(...e.map(t=>pe(t)?qn(t):t))},entries(){return fa(this,"entries",e=>(e[1]=Wt(this,e[1]),e))},every(e,t){return an(this,"every",e,t,void 0,arguments)},filter(e,t){return an(this,"filter",e,t,n=>n.map(s=>Wt(this,s)),arguments)},find(e,t){return an(this,"find",e,t,n=>Wt(this,n),arguments)},findIndex(e,t){return an(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return an(this,"findLast",e,t,n=>Wt(this,n),arguments)},findLastIndex(e,t){return an(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return an(this,"forEach",e,t,void 0,arguments)},includes(...e){return va(this,"includes",e)},indexOf(...e){return va(this,"indexOf",e)},join(e){return qn(this).join(e)},lastIndexOf(...e){return va(this,"lastIndexOf",e)},map(e,t){return an(this,"map",e,t,void 0,arguments)},pop(){return hs(this,"pop")},push(...e){return hs(this,"push",e)},reduce(e,...t){return Mi(this,"reduce",e,t)},reduceRight(e,...t){return Mi(this,"reduceRight",e,t)},shift(){return hs(this,"shift")},some(e,t){return an(this,"some",e,t,void 0,arguments)},splice(...e){return hs(this,"splice",e)},toReversed(){return qn(this).toReversed()},toSorted(e){return qn(this).toSorted(e)},toSpliced(...e){return qn(this).toSpliced(...e)},unshift(...e){return hs(this,"unshift",e)},values(){return fa(this,"values",e=>Wt(this,e))}};function fa(e,t,n){const s=Qs(e),l=s[t],a=l.call(s);if(s!==e&&!At(e)){if(a[Symbol.toStringTag]==="Array Iterator"){const i=Object.create(Object.getPrototypeOf(a));return i.next=()=>$i(a.next(),n),l!==Ai[t]&&Object.defineProperties(i,{return:{get(){const r=a.return;return typeof r=="function"?r.bind(a):r}},throw:{get(){const r=a.throw;return typeof r=="function"?r.bind(a):r}}}),i}a._next=a.next,a.next=()=>$i(a._next(),n)}return a}function $i(e,t){return e.done||(e.value=t(e.value)),e}const Ai=Array.prototype;function an(e,t,n,s,l,a){const i=Qs(e),r=i!==e&&!At(e),o=i[t];if(o!==Ai[t]){const d=o.apply(e,a);return r?Mt(d):d}let u=n;i!==e&&(r?u=function(d,v){return n.call(this,Wt(e,d),v,e)}:n.length>2&&(u=function(d,v){return n.call(this,d,v,e)}));const c=o.call(i,u,s);return r&&l?l(c):c}function Mi(e,t,n,s){const l=Qs(e),a=l!==e&&!At(e);let i=n,r=!1;l!==e&&(a?(r=s.length===0,i=function(u,c,d){return r&&(r=!1,u=Wt(e,u)),n.call(this,u,Wt(e,c),d,e)}):n.length>3&&(i=function(u,c,d){return n.call(this,u,c,d,e)}));const o=l[t](i,...s);return r?Wt(e,o):o}function va(e,t,n){const s=xe(e);vt(s,"iterate",ps);const l=s[t](...n);return(l===-1||l===!1)&&ma(n[0])?(n[0]=xe(n[0]),s[t](...n)):l}function hs(e,t,n=[]){Nt(),aa();const s=xe(e)[t].apply(e,n);return ia(),Vt(),s}const Mc=Zl("__proto__,__v_isRef,__isVue"),Ei=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Rt));function Ec(e){Rt(e)||(e=String(e));const t=xe(this);return vt(t,"has",e),t.hasOwnProperty(e)}class Fi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const l=this._isReadonly,a=this._isShallow;if(n==="__v_isReactive")return!l;if(n==="__v_isReadonly")return l;if(n==="__v_isShallow")return a;if(n==="__v_raw")return s===(l?a?Li:Ri:a?Oi:Pi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=pe(t);if(!l){let o;if(i&&(o=Ac[n]))return o;if(n==="hasOwnProperty")return Ec}const r=Reflect.get(t,n,ot(t)?t:s);if((Rt(n)?Ei.has(n):Mc(n))||(l||vt(t,"get",n),a))return r;if(ot(r)){const o=i&&ea(n)?r:r.value;return l&&Fe(o)?ha(o):o}return Fe(r)?l?ha(r):sl(r):r}}class Ii extends Fi{constructor(t=!1){super(!1,t)}set(t,n,s,l){let a=t[n];const i=pe(t)&&ea(n);if(!this._isShallow){const u=Gt(a);if(!At(s)&&!Gt(s)&&(a=xe(a),s=xe(s)),!i&&ot(a)&&!ot(s))return u||(a.value=s),!0}const r=i?Number(n)<t.length:Me(t,n),o=Reflect.set(t,n,s,ot(t)?t:l);return t===xe(l)&&o&&(r?qt(s,a)&&ln(t,"set",n,s):ln(t,"add",n,s)),o}deleteProperty(t,n){const s=Me(t,n);t[n];const l=Reflect.deleteProperty(t,n);return l&&s&&ln(t,"delete",n,void 0),l}has(t,n){const s=Reflect.has(t,n);return(!Rt(n)||!Ei.has(n))&&vt(t,"has",n),s}ownKeys(t){return vt(t,"iterate",pe(t)?"length":En),Reflect.ownKeys(t)}}class Di extends Fi{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Fc=new Ii,Ic=new Di,Dc=new Ii(!0),Pc=new Di(!0),pa=e=>e,el=e=>Reflect.getPrototypeOf(e);function Oc(e,t,n){return function(...s){const l=this.__v_raw,a=xe(l),i=gn(a),r=e==="entries"||e===Symbol.iterator&&i,o=e==="keys"&&i,u=l[e](...s),c=n?pa:t?bn:Mt;return!t&&vt(a,"iterate",o?da:En),et(Object.create(u),{next(){const{value:d,done:v}=u.next();return v?{value:d,done:v}:{value:r?[c(d[0]),c(d[1])]:c(d),done:v}}})}}function tl(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Rc(e,t){const n={get(l){const a=this.__v_raw,i=xe(a),r=xe(l);e||(qt(l,r)&&vt(i,"get",l),vt(i,"get",r));const{has:o}=el(i),u=t?pa:e?bn:Mt;if(o.call(i,l))return u(a.get(l));if(o.call(i,r))return u(a.get(r));a!==i&&a.get(l)},get size(){const l=this.__v_raw;return!e&&vt(xe(l),"iterate",En),l.size},has(l){const a=this.__v_raw,i=xe(a),r=xe(l);return e||(qt(l,r)&&vt(i,"has",l),vt(i,"has",r)),l===r?a.has(l):a.has(l)||a.has(r)},forEach(l,a){const i=this,r=i.__v_raw,o=xe(r),u=t?pa:e?bn:Mt;return!e&&vt(o,"iterate",En),r.forEach((c,d)=>l.call(a,u(c),u(d),i))}};return et(n,e?{add:tl("add"),set:tl("set"),delete:tl("delete"),clear:tl("clear")}:{add(l){const a=xe(this),i=el(a),r=xe(l),o=!t&&!At(l)&&!Gt(l)?r:l;return i.has.call(a,o)||qt(l,o)&&i.has.call(a,l)||qt(r,o)&&i.has.call(a,r)||(a.add(o),ln(a,"add",o,o)),this},set(l,a){!t&&!At(a)&&!Gt(a)&&(a=xe(a));const i=xe(this),{has:r,get:o}=el(i);let u=r.call(i,l);u||(l=xe(l),u=r.call(i,l));const c=o.call(i,l);return i.set(l,a),u?qt(a,c)&&ln(i,"set",l,a):ln(i,"add",l,a),this},delete(l){const a=xe(this),{has:i,get:r}=el(a);let o=i.call(a,l);o||(l=xe(l),o=i.call(a,l)),r&&r.call(a,l);const u=a.delete(l);return o&&ln(a,"delete",l,void 0),u},clear(){const l=xe(this),a=l.size!==0,i=l.clear();return a&&ln(l,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(l=>{n[l]=Oc(l,e,t)}),n}function nl(e,t){const n=Rc(e,t);return(s,l,a)=>l==="__v_isReactive"?!e:l==="__v_isReadonly"?e:l==="__v_isShallow"?t:l==="__v_raw"?s:Reflect.get(Me(n,l)&&l in s?n:s,l,a)}const Lc={get:nl(!1,!1)},Nc={get:nl(!1,!0)},Vc={get:nl(!0,!1)},Bc={get:nl(!0,!0)},Pi=new WeakMap,Oi=new WeakMap,Ri=new WeakMap,Li=new WeakMap;function jc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function sl(e){return Gt(e)?e:ll(e,!1,Fc,Lc,Pi)}function Kc(e){return ll(e,!1,Dc,Nc,Oi)}function ha(e){return ll(e,!0,Ic,Vc,Ri)}function I_(e){return ll(e,!0,Pc,Bc,Li)}function ll(e,t,n,s,l){if(!Fe(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const a=l.get(e);if(a)return a;const i=jc(fc(e));if(i===0)return e;const r=new Proxy(e,i===2?s:n);return l.set(e,r),r}function yn(e){return Gt(e)?yn(e.__v_raw):!!(e&&e.__v_isReactive)}function Gt(e){return!!(e&&e.__v_isReadonly)}function At(e){return!!(e&&e.__v_isShallow)}function ma(e){return e?!!e.__v_raw:!1}function xe(e){const t=e&&e.__v_raw;return t?xe(t):e}function Uc(e){return!Me(e,"__v_skip")&&Object.isExtensible(e)&&di(e,"__v_skip",!0),e}const Mt=e=>Fe(e)?sl(e):e,bn=e=>Fe(e)?ha(e):e;function ot(e){return e?e.__v_isRef===!0:!1}function H(e){return Hc(e,!1)}function Hc(e,t){return ot(e)?e:new qc(e,t)}class qc{constructor(t,n){this.dep=new ca,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:xe(t),this._value=n?t:Mt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||At(t)||Gt(t);t=s?t:xe(t),qt(t,n)&&(this._rawValue=t,this._value=s?t:Mt(t),this.dep.trigger())}}function Ee(e){return ot(e)?e.value:e}const Wc={get:(e,t,n)=>t==="__v_raw"?e:Ee(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const l=e[t];return ot(l)&&!ot(n)?(l.value=n,!0):Reflect.set(e,t,n,s)}};function Ni(e){return yn(e)?e:new Proxy(e,Wc)}class Gc{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ca(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=vs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Be!==this)return _i(this,!0),!0}get value(){const t=this.dep.track();return Si(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function zc(e,t,n=!1){let s,l;return me(e)?s=e:(s=e.get,l=e.set),new Gc(s,l,n)}const al={},il=new WeakMap;let Fn;function Yc(e,t=!1,n=Fn){if(n){let s=il.get(n);s||il.set(n,s=[]),s.push(e)}}function Jc(e,t,n=Re){const{immediate:s,deep:l,once:a,scheduler:i,augmentJob:r,call:o}=n,u=C=>l?C:At(C)||l===!1||l===0?rn(C,1):rn(C);let c,d,v,A,x=!1,M=!1;if(ot(e)?(d=()=>e.value,x=At(e)):yn(e)?(d=()=>u(e),x=!0):pe(e)?(M=!0,x=e.some(C=>yn(C)||At(C)),d=()=>e.map(C=>{if(ot(C))return C.value;if(yn(C))return u(C);if(me(C))return o?o(C,2):C()})):me(e)?t?d=o?()=>o(e,2):e:d=()=>{if(v){Nt();try{v()}finally{Vt()}}const C=Fn;Fn=c;try{return o?o(e,3,[A]):e(A)}finally{Fn=C}}:d=Ot,t&&l){const C=d,B=l===!0?1/0:l;d=()=>rn(C(),B)}const w=Tc(),O=()=>{c.stop(),w&&w.active&&Ql(w.effects,c)};if(a&&t){const C=t;t=(...B)=>{try{return C(...B)}finally{O()}}}let y=M?new Array(e.length).fill(al):al;const b=C=>{if(!(!(c.flags&1)||!c.dirty&&!C))if(t){const B=c.run();if(C||l||x||(M?B.some((D,U)=>qt(D,y[U])):qt(B,y))){const D=Fn;Nt();try{v&&v(),Fn=c;const U=[B,y===al?void 0:M&&y[0]===al?[]:y,A];y=B,o?o(t,3,U):t(...U)}finally{Fn=D,Vt()}}}else c.run()};return r&&r(b),c=new yi(d),c.scheduler=i?()=>i(b,!1):b,A=C=>Yc(C,!1,c),v=c.onStop=()=>{const C=il.get(c);if(C){if(o)o(C,4);else for(const B of C)B();il.delete(c)}},t?s?b(!0):y=c.run():i?i(b.bind(null,!0),!0):c.run(),O.pause=c.pause.bind(c),O.resume=c.resume.bind(c),O.stop=O,O}function rn(e,t=1/0,n){if(t<=0||!Fe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ot(e))rn(e.value,t,n);else if(pe(e))for(let s=0;s<e.length;s++)rn(e[s],t,n);else if(Gs(e)||gn(e))e.forEach(s=>{rn(s,t,n)});else if(ui(e)){for(const s in e)rn(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&rn(e[s],t,n)}return e}/**
10
10
  * @vue/runtime-core v3.5.44
11
11
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
12
  * @license MIT
13
13
  **/const ms=[];let ga=!1;function D_(e,...t){if(ga)return;ga=!0,Nt();const n=ms.length?ms[ms.length-1].component:null,s=n&&n.appContext.config.warnHandler,l=Xc();if(s)Wn(s,n,11,[e+t.map(a=>{var i,r;return(r=(i=a.toString)==null?void 0:i.call(a))!=null?r:JSON.stringify(a)}).join(""),n&&n.proxy,l.map(({vnode:a})=>`at <${qr(n,a.type)}>`).join(`
14
14
  `),l]);else{const a=[`[Vue warn]: ${e}`,...t];l.length&&a.push(`
15
15
  `,...Zc(l)),console.warn(...a)}Vt(),ga=!1}function Xc(){let e=ms[ms.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function Zc(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
16
- `],...Qc(n))}),t}function Qc({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,l=` at <${qr(e.component,e.type,s)}`,a=">"+n;return e.props?[l,...eu(e.props),a]:[l+a]}function eu(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...Vi(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Vi(e,t,n){return Ve(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:ot(t)?(t=Vi(e,Te(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):me(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Te(t),n?t:[`${e}=`,t])}function Wn(e,t,n,s){try{return s?e(...s):e()}catch(l){rl(l,t,n)}}function Et(e,t,n,s){if(me(e)){const l=Wn(e,t,n,s);return l&&oi(l)&&l.catch(a=>{rl(a,t,n)}),l}if(ve(e)){const l=[];for(let a=0;a<e.length;a++)l.push(Et(e[a],t,n,s));return l}}function rl(e,t,n,s=!0){const l=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Re;if(t){let r=t.parent;const o=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){const c=r.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,o,u)===!1)return}r=r.parent}if(a){Nt(),Wn(a,null,10,[e,o,u]),Vt();return}}tu(e,n,l,s,i)}function tu(e,t,n,s=!0,l=!1){if(l)throw e;console.error(e)}const gt=[];let Bt=-1;const Gt=[];let _n=null,Gn=0;const Bi=Promise.resolve();let ol=null;function zn(e){const t=ol||Bi;return e?t.then(this?e.bind(this):e):t}function nu(e){let t=Bt+1,n=gt.length;for(;t<n;){const s=t+n>>>1,l=gt[s],a=gs(l);a<e||a===e&&l.flags&2?t=s+1:n=s}return t}function ya(e){if(!(e.flags&1)){const t=gs(e),n=gt[gt.length-1];!n||!(e.flags&2)&&t>=gs(n)?gt.push(e):gt.splice(nu(t),0,e),e.flags|=1,ji()}}function ji(){ol||(ol=Bi.then(qi))}function Ki(e){if(!ve(e))_n&&e.id===-1?_n.splice(Gn+1,0,e):e.flags&1||(Gt.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Gt.push(e[t]);ji()}function Ui(e,t,n,s=Bt+1){for(;s<gt.length;s++){const l=gt[s];if(l&&l.flags&2){if(e&&l.id!==e.uid||t!==void 0&&!(l.id>=t))continue;gt.splice(s,1),s=e?s-1:Bt,l.flags&4&&(l.flags&=-2),l(),l.flags&4||(l.flags&=-2)}}}function Hi(e,t,n=0){if(Gt.length){let s=Gt,l=0;if(t){s=[];for(let i=0;i<Gt.length;i++){const r=Gt[i];(r.i!==void 0?!r.i||r.i.uid<n:t.has(r))?Gt[l++]=r:s.push(r)}}const a=[...new Set(s)].sort((i,r)=>gs(i)-gs(r));if(Gt.length=l,_n){for(let i=0;i<a.length;i++)_n.push(a[i]);return}for(_n=a,Gn=0;Gn<_n.length;Gn++){const i=_n[Gn];i.flags&4&&(i.flags&=-2),i.flags&8||i(),i.flags&=-2}_n=null,Gn=0}}let ba=!1;function su(e,t){if(ba){e();return}const n=t===void 0?void 0:new Set(Gt);e(),ba=!0;try{Ui(void 0,t),Hi(void 0,n,t)}finally{ba=!1}}const gs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function qi(e){try{for(Bt=0;Bt<gt.length;Bt++){const t=gt[Bt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Wn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Bt<gt.length;Bt++){const t=gt[Bt];t&&(t.flags&=-2)}Bt=-1,gt.length=0,Hi(),ol=null,(gt.length||Gt.length)&&qi()}}let ct=null,Wi=null;function cl(e){const t=ct;return ct=e,Wi=e&&e.type.__scopeId||null,t}function jt(e,t=ct,n){if(!t||e._n)return e;const s=(...l)=>{s._d&&wl(-1);const a=cl(t),i=cn.length;let r;try{r=e(...l)}finally{for(let o=cn.length;o>i;o--)Pa();cl(a),s._d&&wl(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function Gi(e,t){if(ct===null)return e;const n=Al(ct),s=e.dirs||(e.dirs=[]);for(let l=0;l<t.length;l++){let[a,i,r,o=Re]=t[l];a&&(me(a)&&(a={mounted:a,updated:a}),a.deep&&rn(i),s.push({dir:a,instance:n,value:i,oldValue:void 0,arg:r,modifiers:o}))}return e}function In(e,t,n,s){const l=e.dirs,a=t&&t.dirs;for(let i=0;i<l.length;i++){const r=l[i];a&&(r.oldValue=a[i].value);let o=r.dir[s];o&&(Nt(),Et(o,n,8,[e.el,r,e,t]),Vt())}}function yt(e,t){if(pt){let n=pt.provides;const s=pt.parent&&pt.parent.provides;s===n&&(n=pt.provides=Object.create(s)),n[e]=t}}function je(e,t,n=!1){const s=Oa();if(s||Zn){let l=Zn?Zn._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(l&&e in l)return l[e];if(arguments.length>1)return n&&me(t)?t.call(s&&s.proxy):t}}const lu=Symbol.for("v-scx"),au=()=>je(lu);function ut(e,t,n){return zi(e,t,n)}function zi(e,t,n=Re){const{immediate:s,deep:l,flush:a,once:i}=n,r=et({},n),o=t&&s||!t&&a!=="post";let u;if($s){if(a==="sync"){const $=au();u=$.__watcherHandles||($.__watcherHandles=[])}else if(!o){const $=()=>{};return $.stop=Ot,$.resume=Ot,$.pause=Ot,$}}const c=pt;r.call=($,x,A)=>Et($,c,x,A);let d=!1;a==="post"?r.scheduler=$=>{$.i=c,_t($,c&&c.suspense)}:a!=="sync"&&(d=!0,r.scheduler=($,x)=>{x?$():ya($)}),r.augmentJob=$=>{t&&($.flags|=4),d&&($.flags|=2,c&&($.id=c.uid,$.i=c))};const v=Jc(e,t,r);return $s&&(u?u.push(v):o&&v()),v}function iu(e,t,n){const s=this.proxy,l=Ve(e)?e.includes(".")?Yi(s,e):()=>s[e]:e.bind(s,s);let a;me(t)?a=t:(a=t.handler,n=t);const i=xs(this),r=zi(l,a.bind(s),n);return i(),r}function Yi(e,t){const n=t.split(".");return()=>{let s=e;for(let l=0;l<n.length&&s;l++)s=s[n[l]];return s}}const kn=new WeakMap,Ji=Symbol("_vte"),ul=e=>e.__isTeleport,Dn=e=>e&&(e.disabled||e.disabled===""),ru=e=>e&&(e.defer||e.defer===""),Xi=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Zi=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,_a=(e,t)=>{const n=e&&e.to;return Ve(n)?t?t(n):null:n},ou={name:"Teleport",__isTeleport:!0,process(e,t,n,s,l,a,i,r,o,u){const{mc:c,pc:d,pbc:v,o:{insert:$,querySelector:x,createText:A,createComment:w,parentNode:O}}=u,y=Dn(t.props);let{dynamicChildren:b}=t;const C=(U,q,R)=>{U.shapeFlag&16&&c(U.children,q,R,l,a,i,r,o)},B=(U=t)=>{const q=Dn(U.props),R=U.target=_a(U.props,x),j=ka(R,U,A,$);R&&(i!=="svg"&&Xi(R)?i="svg":i!=="mathml"&&Zi(R)&&(i="mathml"),l&&l.isCE&&(l.ce._teleportTargets||(l.ce._teleportTargets=new Set)).add(R),q||(C(U,R,j),ys(U,!1)))},D=U=>{const q=()=>{if(kn.get(U)===q){if(kn.delete(U),Dn(U.props)){const R=O(U.el)||n;C(U,R,U.anchor),ys(U,!0)}B(U)}};kn.set(U,q),_t(q,a)};if(e==null){const U=t.el=A(""),q=t.anchor=A("");if($(U,n,s),$(q,n,s),ru(t.props)||a&&a.pendingBranch){D(t);return}y&&(C(t,n,q),ys(t,!0)),B()}else{t.el=e.el;const U=t.anchor=e.anchor,q=kn.get(e);if(q){q.flags|=8,kn.delete(e),D(t);return}t.targetStart=e.targetStart;const R=t.target=e.target,j=t.targetAnchor=e.targetAnchor,J=Dn(e.props),S=J?n:R,G=J?U:j;if(i==="svg"||Xi(R)?i="svg":(i==="mathml"||Zi(R))&&(i="mathml"),b?(v(e.dynamicChildren,b,S,l,a,i,r),Ia(e,t,!0)):o||d(e,t,S,G,l,a,i,r,!1),y)J?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):dl(t,n,U,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const he=_a(t.props,x);he&&(t.target=he,dl(t,he,null,u,0))}else J&&dl(t,R,j,u,1);ys(t,y)}},remove(e,t,n,{um:s,o:{remove:l}},a){const{shapeFlag:i,children:r,anchor:o,targetStart:u,targetAnchor:c,target:d,props:v}=e,$=Dn(v),x=a||!$,A=kn.get(e);if(A&&(A.flags|=8,kn.delete(e)),d&&(l(u),l(c)),a&&l(o),!A&&($||d)&&i&16)for(let w=0;w<r.length;w++){const O=r[w];s(O,t,n,x,!!O.dynamicChildren)}},move:dl,hydrate:cu};function dl(e,t,n,{o:{insert:s},m:l},a=2){a===0&&(e.targetStart&&s(e.targetStart,t,n),s(e.targetAnchor,t,n),n=e.targetAnchor);const{el:i,anchor:r,shapeFlag:o,children:u,props:c}=e,d=a===2;if(d&&s(i,t,n),!kn.has(e)&&(!d||Dn(c))&&o&16)for(let v=0;v<u.length;v++)l(u[v],t,n,2);d&&s(r,t,n)}function cu(e,t,n,s,l,a,{o:{nextSibling:i,parentNode:r,querySelector:o,insert:u,createText:c}},d){function v(w,O){let y=O;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")t.targetStart=y;else if(y.data==="teleport anchor"){t.targetAnchor=y,w._lpa=t.targetAnchor&&i(t.targetAnchor);break}}y=i(y)}}function $(w,O){O.anchor=d(i(w),O,r(w),n,s,l,a)}const x=t.target=_a(t.props,o),A=Dn(t.props);if(x){const w=x._lpa||x.firstChild;t.shapeFlag&16&&(A?($(e,t),v(x,w),t.targetAnchor||ka(x,t,c,u,r(e)===x?e:null)):(t.anchor=i(e),v(x,w),t.targetAnchor||ka(x,t,c,u),d(w&&i(w),t,x,n,s,l,a))),ys(t,A)}else A&&t.shapeFlag&16&&($(e,t),t.targetStart=e,t.targetAnchor=i(e));return t.anchor&&i(t.anchor)}const fl=ou;function ys(e,t){const n=e.ctx;if(n&&n.ut){let s,l;for(t?(s=e.el,l=e.anchor):(s=e.targetStart,l=e.targetAnchor);s&&s!==l;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function ka(e,t,n,s,l=null){const a=t.targetStart=n(""),i=t.targetAnchor=n("");return a[Ji]=i,e&&(s(a,e,l),s(i,e,l)),i}const Ft=Symbol("_leaveCb"),bs=Symbol("_enterCb");function uu(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return gl(()=>{e.isMounted=!0}),yl(()=>{e.isUnmounting=!0}),e}const It=[Function,Array],Qi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:It,onEnter:It,onAfterEnter:It,onEnterCancelled:It,onBeforeLeave:It,onLeave:It,onAfterLeave:It,onLeaveCancelled:It,onBeforeAppear:It,onAppear:It,onAfterAppear:It,onAppearCancelled:It},du={name:"BaseTransition",props:Qi,setup(e,{slots:t}){const n=Oa(),s=uu();return()=>{const l=t.default&&nr(t.default(),!0),a=l&&l.length?er(l):n.subTree?V():void 0;if(!a)return;const i=Te(e),{mode:r}=i;if(s.isLeaving)return Sa(a);const o=vl(a);if(!o)return Sa(a);let u=Ca(o,i,s,n,d=>u=d);o.type!==dt&&Yn(o,u);let c=n.subTree&&vl(n.subTree);if(c&&c.type!==dt&&!On(c,o)&&_s(n.subTree)){let d=Ca(c,i,s,n);if(Yn(c,d),r==="out-in"&&o.type!==dt)return s.isLeaving=!0,d.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Sa(a);r==="in-out"&&o.type!==dt?d.delayLeave=(v,$,x)=>{const A=tr(s,c);A[String(c.key)]=c,v[Ft]=()=>{$(),v[Ft]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{x(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return a}}};function er(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==dt){t=n;break}}return t}const fu=du;function tr(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Ca(e,t,n,s,l){const{appear:a,mode:i,persisted:r=!1,onBeforeEnter:o,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:v,onLeave:$,onAfterLeave:x,onLeaveCancelled:A,onBeforeAppear:w,onAppear:O,onAfterAppear:y,onAppearCancelled:b}=t,C=String(e.key),B=tr(n,e),D=(R,j)=>{R&&Et(R,s,9,j)},U=(R,j)=>{const J=j[1];D(R,j),ve(R)?R.every(S=>S.length<=1)&&J():R.length<=1&&J()},q={mode:i,persisted:r,beforeEnter(R){let j=o;if(!n.isMounted)if(a)j=w||o;else return;R[Ft]&&R[Ft](!0);const J=B[C];if(J&&On(e,J)){let S=J.el[Ft];if(!S){const G=_s(J);S=G&&G.el[Ft]}S&&S()}D(j,[R])},enter(R){if(B[C]===e)return;let j=u,J=c,S=d;if(!n.isMounted)if(a)j=O||u,J=y||c,S=b||d;else return;let G=!1;R[bs]=Le=>{G||(G=!0,Le?D(S,[R]):D(J,[R]),q.delayedLeave&&q.delayedLeave(),R[bs]=void 0)};const he=R[bs].bind(null,!1);j?U(j,[R,he]):he()},leave(R,j){const J=String(e.key);if(R[bs]&&R[bs](!0),n.isUnmounting)return j();D(v,[R]);let S=!1;R[Ft]=he=>{S||(S=!0,j(),he?D(A,[R]):D(x,[R]),R[Ft]=void 0,B[J]===e&&delete B[J])};const G=R[Ft].bind(null,!1);B[J]=e,$?U($,[R,G]):G()},clone(R){const j=Ca(R,t,n,s,l);return l&&l(j),j}};return q}function Sa(e){if(hl(e))return e=Cn(e),e.children=null,e}function vl(e){if(!hl(e))return ul(e.type)&&e.children?er(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&me(n.default))return n.default()}}function Yn(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;Yn(ul(n.type)&&vl(n)||n,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===le&&ve(e.children)){const n=kr(e.children,!1);n&&Yn(n,t)}}function nr(e,t=!1,n){let s=[],l=0;for(let a=0;a<e.length;a++){let i=e[a];const r=n==null?i.key:String(n)+String(i.key!=null?i.key:a);i.type===le?(i.patchFlag&128&&l++,s=s.concat(nr(i.children,t,r))):(t||i.type!==dt)&&s.push(r!=null?Cn(i,{key:r}):i)}if(l>1)for(let a=0;a<s.length;a++)s[a].patchFlag=-2;return s}function _s(e){if(e.component)return _s(e.component.subTree);if(e.type===le){const t=ve(e.children)&&kr(e.children,!1);return t?_s(t):void 0}if(e.type!==dt)return e}function Pe(e,t){return me(e)?et({name:e.name},t,{setup:e}):e}function sr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function lr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const pl=new WeakMap;function ks(e,t,n,s,l=!1){if(ve(e)){e.forEach((A,w)=>ks(A,t&&(ve(t)?t[w]:t),n,s,l));return}if(Jn(s)&&!l){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ks(e,t,n,s.component.subTree);return}const a=s.shapeFlag&4?Al(s.component):s.el,i=l?null:a,{i:r,r:o}=e,u=t&&t.r,c=r.refs===Re?r.refs={}:r.refs,d=r.setupState,v=Te(d),$=d===Re?ii:A=>lr(c,A)?!1:Ae(v,A),x=(A,w)=>!(w&&lr(c,w));if(u!=null&&u!==o){if(ar(t),Ve(u))c[u]=null,$(u)&&(d[u]=null);else if(ot(u)){const A=t;x(u,A.k)&&(u.value=null),A.k&&(c[A.k]=null)}}if(me(o))Wn(o,r,12,[i,c]);else{const A=Ve(o),w=ot(o);if(A||w){const O=()=>{if(e.f){const y=A?$(o)?d[o]:c[o]:x()||!e.k?o.value:c[e.k];if(l)ve(y)&&Ql(y,a);else if(ve(y))y.includes(a)||y.push(a);else if(A)c[o]=[a],$(o)&&(d[o]=c[o]);else{const b=[a];x(o,e.k)&&(o.value=b),e.k&&(c[e.k]=b)}}else A?(c[o]=i,$(o)&&(d[o]=i)):w&&(x(o,e.k)&&(o.value=i),e.k&&(c[e.k]=i))};if(i){const y=()=>{O(),pl.delete(e)};y.id=-1,pl.set(e,y),_t(y,n)}else ar(e),O()}}}function ar(e){const t=pl.get(e);t&&(t.flags|=8,pl.delete(e))}Xs().requestIdleCallback,Xs().cancelIdleCallback;const Jn=e=>!!e.type.__asyncLoader,hl=e=>e.type.__isKeepAlive;function vu(e,t){ir(e,"a",t)}function pu(e,t){ir(e,"da",t)}function ir(e,t,n=pt){const s=e.__wdc||(e.__wdc=()=>{let l=n;for(;l;){if(l.isDeactivated)return;l=l.parent}return e()});if(ml(t,s,n),n){let l=n.parent;for(;l&&l.parent;)hl(l.parent.vnode)&&hu(s,t,n,l),l=l.parent}}function hu(e,t,n,s){const l=ml(t,e,s,!0);bl(()=>{Ql(s[t],l)},n)}function ml(e,t,n=pt,s=!1){if(n){const l=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...i)=>{Nt();const r=xs(n),o=Et(t,n,e,i);return r(),Vt(),o});return s?l.unshift(a):l.push(a),a}}const on=e=>(t,n=pt)=>{(!$s||e==="sp")&&ml(e,(...s)=>t(...s),n)},mu=on("bm"),gl=on("m"),rr=on("bu"),gu=on("u"),yl=on("bum"),bl=on("um"),yu=on("sp"),bu=on("rtg"),_u=on("rtc");function ku(e,t=pt){ml("ec",e,t)}const Cu="components",or=Symbol.for("v-ndc");function Xn(e){return Ve(e)?Su(Cu,e,!1)||e:e||or}function Su(e,t,n=!0,s=!1){const l=ct||pt;if(l){const a=l.type;{const r=Hr(a,!1);if(r&&(r===t||r===mt(t)||r===Ys(mt(t))))return a}const i=cr(l[e]||a[e],t)||cr(l.appContext[e],t);return!i&&s?a:i}}function cr(e,t){return e&&(e[t]||e[mt(t)]||e[Ys(mt(t))])}function _e(e,t,n,s){let l;const a=n,i=ve(e);if(i||Ve(e)){const r=i&&yn(e);let o=!1,u=!1;r&&(o=!At(e),u=Wt(e),e=Qs(e)),l=new Array(e.length);for(let c=0,d=e.length;c<d;c++)l[c]=t(o?u?bn(Mt(e[c])):Mt(e[c]):e[c],c,void 0,a)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)l=[];else{l=new Array(e);for(let r=0;r<e;r++)l[r]=t(r+1,r,void 0,a)}else if(Ee(e))if(e[Symbol.iterator])l=Array.from(e,(r,o)=>t(r,o,void 0,a));else{const r=Object.keys(e);l=new Array(r.length);for(let o=0,u=r.length;o<u;o++){const c=r[o];l[o]=t(e[c],c,o,a)}}else l=[];return l}function ur(e,t,n,s,l,a){if(n==null&&(n={}),ct.ce||ct.parent&&Jn(ct.parent)&&ct.parent.ce){const u=n,c=Object.keys(u).length>0;return t!=="default"&&(u.name=t),p(),st(le,null,[Ge("slot",u,s)],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const r=cn.length;p();let o;try{const u=i&&dr(i(n)),c=n.key||a||u&&u.key;o=st(le,{key:(c&&!Rt(c)?c:`_${t}`)+(!u&&s?"_fb":"")},u||(s?s():[]),u&&e._===1?64:-2)}catch(u){for(let c=cn.length;c>r;c--)Pa();throw u}finally{i&&i._c&&(i._d=!0)}return o}function dr(e){return e.some(t=>Qn(t)?!(t.type===dt||t.type===le&&!dr(t.children)):!0)?e:null}const wa=e=>e?jr(e)?Al(e):wa(e.parent):null,Cs=et(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>wa(e.parent),$root:e=>wa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>hr(e),$forceUpdate:e=>e.f||(e.f=()=>{ya(e.update)}),$nextTick:e=>e.n||(e.n=zn.bind(e.proxy)),$watch:e=>iu.bind(e)}),Ta=(e,t)=>e!==Re&&!e.__isScriptSetup&&Ae(e,t),wu={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:l,props:a,accessCache:i,type:r,appContext:o}=e;if(t[0]!=="$"){const v=i[t];if(v!==void 0)switch(v){case 1:return s[t];case 2:return l[t];case 4:return n[t];case 3:return a[t]}else{if(Ta(s,t))return i[t]=1,s[t];if(l!==Re&&Ae(l,t))return i[t]=2,l[t];if(Ae(a,t))return i[t]=3,a[t];if(n!==Re&&Ae(n,t))return i[t]=4,n[t];xa&&(i[t]=0)}}const u=Cs[t];let c,d;if(u)return t==="$attrs"&&vt(e.attrs,"get",""),u(e);if((c=r.__cssModules)&&(c=c[t]))return c;if(n!==Re&&Ae(n,t))return i[t]=4,n[t];if(d=o.config.globalProperties,Ae(d,t))return d[t]},set({_:e},t,n){const{data:s,setupState:l,ctx:a}=e;return Ta(l,t)?(l[t]=n,!0):s!==Re&&Ae(s,t)?(s[t]=n,!0):Ae(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:l,props:a,type:i}},r){let o;return!!(n[r]||e!==Re&&r[0]!=="$"&&Ae(e,r)||Ta(t,r)||Ae(a,r)||Ae(s,r)||Ae(Cs,r)||Ae(l.config.globalProperties,r)||(o=i.__cssModules)&&o[r])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ae(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function fr(e){return ve(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let xa=!0;function Tu(e){const t=hr(e),n=e.proxy,s=e.ctx;xa=!1,t.beforeCreate&&vr(t.beforeCreate,e,"bc");const{data:l,computed:a,methods:i,watch:r,provide:o,inject:u,created:c,beforeMount:d,mounted:v,beforeUpdate:$,updated:x,activated:A,deactivated:w,beforeDestroy:O,beforeUnmount:y,destroyed:b,unmounted:C,render:B,renderTracked:D,renderTriggered:U,errorCaptured:q,serverPrefetch:R,expose:j,inheritAttrs:J,components:S,directives:G,filters:he}=t;if(u&&xu(u,s,null),i)for(const $e in i){const ce=i[$e];me(ce)&&(s[$e]=ce.bind(n))}if(l){const $e=l.call(n,n);Ee($e)&&(e.data=sl($e))}if(xa=!0,a)for(const $e in a){const ce=a[$e],Ce=me(ce)?ce.bind(n,n):me(ce.get)?ce.get.bind(n,n):Ot,Xe=!me(ce)&&me(ce.set)?ce.set.bind(n):Ot,ze=E({get:Ce,set:Xe});Object.defineProperty(s,$e,{enumerable:!0,configurable:!0,get:()=>ze.value,set:qe=>ze.value=qe})}if(r)for(const $e in r)pr(r[$e],s,n,$e);if(o){const $e=me(o)?o.call(n):o;Reflect.ownKeys($e).forEach(ce=>{yt(ce,$e[ce])})}c&&vr(c,e,"c");function Ie($e,ce){ve(ce)?ce.forEach(Ce=>$e(Ce.bind(n))):ce&&$e(ce.bind(n))}if(Ie(mu,d),Ie(gl,v),Ie(rr,$),Ie(gu,x),Ie(vu,A),Ie(pu,w),Ie(ku,q),Ie(_u,D),Ie(bu,U),Ie(yl,y),Ie(bl,C),Ie(yu,R),ve(j))if(j.length){const $e=e.exposed||(e.exposed={});j.forEach(ce=>{Object.defineProperty($e,ce,{get:()=>n[ce],set:Ce=>n[ce]=Ce,enumerable:!0})})}else e.exposed||(e.exposed={});B&&e.render===Ot&&(e.render=B),J!=null&&(e.inheritAttrs=J),S&&(e.components=S),G&&(e.directives=G),R&&sr(e)}function xu(e,t,n=Ot){ve(e)&&(e=$a(e));for(const s in e){const l=e[s];let a;Ee(l)?"default"in l?a=je(l.from||s,l.default,!0):a=je(l.from||s):a=je(l),ot(a)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>a.value,set:i=>a.value=i}):t[s]=a}}function vr(e,t,n){Et(ve(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function pr(e,t,n,s){let l=s.includes(".")?Yi(n,s):()=>n[s];if(Ve(e)){const a=t[e];me(a)&&ut(l,a)}else if(me(e))ut(l,e.bind(n));else if(Ee(e))if(ve(e))e.forEach(a=>pr(a,t,n,s));else{const a=me(e.handler)?e.handler.bind(n):t[e.handler];me(a)&&ut(l,a,e)}}function hr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:l,optionsCache:a,config:{optionMergeStrategies:i}}=e.appContext,r=a.get(t);let o;return r?o=r:!l.length&&!n&&!s?o=t:(o={},l.length&&l.forEach(u=>_l(o,u,i,!0)),_l(o,t,i)),Ee(t)&&a.set(t,o),o}function _l(e,t,n,s=!1){const{mixins:l,extends:a}=t;a&&_l(e,a,n,!0),l&&l.forEach(i=>_l(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const r=$u[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}const $u={data:mr,props:gr,emits:gr,methods:Ss,computed:Ss,beforeCreate:bt,created:bt,beforeMount:bt,mounted:bt,beforeUpdate:bt,updated:bt,beforeDestroy:bt,beforeUnmount:bt,destroyed:bt,unmounted:bt,activated:bt,deactivated:bt,errorCaptured:bt,serverPrefetch:bt,components:Ss,directives:Ss,watch:Mu,provide:mr,inject:Au};function mr(e,t){return t?e?function(){return et(me(e)?e.call(this,this):e,me(t)?t.call(this,this):t)}:t:e}function Au(e,t){return Ss($a(e),$a(t))}function $a(e){if(ve(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function bt(e,t){return e?[...new Set([].concat(e,t))]:t}function Ss(e,t){return e?et(Object.create(null),e,t):t}function gr(e,t){return e?ve(e)&&ve(t)?[...new Set([...e,...t])]:et(Object.create(null),fr(e),fr(t??{})):t}function Mu(e,t){if(!e)return t;if(!t)return e;const n=et(Object.create(null),e);for(const s in t)n[s]=bt(e[s],t[s]);return n}function yr(){return{app:null,config:{isNativeTag:ii,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Eu=0;function Fu(e,t){return function(s,l=null){me(s)||(s=et({},s)),l!=null&&!Ee(l)&&(l=null);const a=yr(),i=new WeakSet,r=[];let o=!1;const u=a.app={_uid:Eu++,_component:s,_props:l,_container:null,_context:a,_instance:null,version:cd,get config(){return a.config},set config(c){},use(c,...d){return i.has(c)||(c&&me(c.install)?(i.add(c),c.install(u,...d)):me(c)&&(i.add(c),c(u,...d))),u},mixin(c){return a.mixins.includes(c)||a.mixins.push(c),u},component(c,d){return d?(a.components[c]=d,u):a.components[c]},directive(c,d){return d?(a.directives[c]=d,u):a.directives[c]},mount(c,d,v){if(!o){const $=u._ceVNode||Ge(s,l);return $.appContext=a,v===!0?v="svg":v===!1&&(v=void 0),e($,c,v),o=!0,u._container=c,c.__vue_app__=u,Al($.component)}},onUnmount(c){r.push(c)},unmount(){o&&(Et(r,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return a.provides[c]=d,u},runWithContext(c){const d=Zn;Zn=u;try{return c()}finally{Zn=d}}};return u}}let Zn=null;const Iu=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${mt(t)}Modifiers`]||e[`${Mn(t)}Modifiers`];function Du(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Re;let l=n;const a=t.startsWith("update:"),i=a&&Iu(s,t.slice(7));i&&(i.trim&&(l=n.map(c=>Ve(c)?c.trim():c)),i.number&&(l=l.map(na)));let r,o=s[r=ta(t)]||s[r=ta(mt(t))];!o&&a&&(o=s[r=ta(Mn(t))]),o&&Et(o,e,6,l);const u=s[r+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,Et(u,e,6,l)}}const Pu=new WeakMap;function br(e,t,n=!1){const s=n?Pu:t.emitsCache,l=s.get(e);if(l!==void 0)return l;const a=e.emits;let i={},r=!1;if(!me(e)){const o=u=>{const c=br(u,t,!0);c&&(r=!0,et(i,c))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return!a&&!r?(Ee(e)&&s.set(e,null),null):(ve(a)?a.forEach(o=>i[o]=null):et(i,a),Ee(e)&&s.set(e,i),i)}function kl(e,t){return!e||!qs(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Ae(e,t[0].toLowerCase()+t.slice(1))||Ae(e,Mn(t))||Ae(e,t))}function P_(){}function _r(e){const{type:t,vnode:n,proxy:s,withProxy:l,propsOptions:[a],slots:i,attrs:r,emit:o,render:u,renderCache:c,props:d,data:v,setupState:$,ctx:x,inheritAttrs:A}=e,w=cl(e);let O,y;try{if(n.shapeFlag&4){const C=l||s,B=C;O=zt(u.call(B,C,c,d,$,v,x)),y=r}else{const C=t;O=zt(C.length>1?C(d,{attrs:r,slots:i,emit:o}):C(d,null)),y=t.props?r:Ou(r)}}catch(C){cn.length=0,rl(C,e,1),O=Ge(dt)}let b=O;if(y&&A!==!1){const C=Object.keys(y),{shapeFlag:B}=b;C.length&&B&7&&(a&&C.some(Ws)&&(y=Ru(y,a)),b=Cn(b,y,!1,!0))}if(n.dirs&&(b=Cn(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition){const C=ul(b.type)&&vl(b)||b;Yn(C,n.transition)}return O=b,cl(w),O}function kr(e,t=!0){let n;for(let s=0;s<e.length;s++){const l=e[s];if(Qn(l)){if(l.type!==dt||l.children==="v-if"){if(n)return;n=l}}else return}return n}const Ou=e=>{let t;for(const n in e)(n==="class"||n==="style"||qs(n))&&((t||(t={}))[n]=e[n]);return t},Ru=(e,t)=>{const n={};for(const s in e)(!Ws(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Lu(e,t,n){const{props:s,children:l,component:a}=e,{props:i,children:r,patchFlag:o}=t,u=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&o>=0){if(o&1024)return!0;if(o&16)return s?Cr(s,i,u):!!i;if(o&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const v=c[d];if(Sr(i,s,v)&&!kl(u,v))return!0}}}else return(l||r)&&(!r||!r.$stable)?!0:s===i?!1:s?i?Cr(s,i,u):!0:!!i;return!1}function Cr(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let l=0;l<s.length;l++){const a=s[l];if(!Ae(e,a)||Sr(t,e,a)&&!kl(n,a))return!0}return!1}function Sr(e,t,n){const s=e[n],l=t[n];return n==="style"&&Ee(s)&&Ee(l)?!Zs(s,l):s!==l}function Nu({vnode:e,parent:t,suspense:n},s){for(;t;){const l=t.subTree;if(l.suspense&&l.suspense.activeBranch===e&&(l.suspense.vnode.el=l.el=s,e=l),l===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const wr={},Tr=()=>Object.create(wr),xr=e=>Object.getPrototypeOf(e)===wr;function Vu(e,t,n,s=!1){const l={},a=Tr();e.propsDefaults=Object.create(null),$r(e,t,l,a);for(const i in e.propsOptions[0])i in l||(l[i]=void 0);n?e.props=s?l:Kc(l):e.type.props?e.props=l:e.props=a,e.attrs=a}function Bu(e,t,n,s){const{props:l,attrs:a,vnode:{patchFlag:i}}=e,r=Te(l),[o]=e.propsOptions;let u=!1;if((s||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let v=c[d];if(kl(e.emitsOptions,v))continue;const $=t[v];if(o)if(Ae(a,v))$!==a[v]&&(a[v]=$,u=!0);else{const x=mt(v);l[x]=Aa(o,r,x,$,e,!1)}else $!==a[v]&&(a[v]=$,u=!0)}}}else{$r(e,t,l,a)&&(u=!0);let c;for(const d in r)(!t||!Ae(t,d)&&((c=Mn(d))===d||!Ae(t,c)))&&(o?n&&(n[d]!==void 0||n[c]!==void 0)&&(l[d]=Aa(o,r,d,void 0,e,!0)):delete l[d]);if(a!==r)for(const d in a)(!t||!Ae(t,d))&&(delete a[d],u=!0)}u&&ln(e.attrs,"set","")}function $r(e,t,n,s){const[l,a]=e.propsOptions;let i=!1,r;if(t)for(let o in t){if(us(o))continue;const u=t[o];let c;l&&Ae(l,c=mt(o))?!a||!a.includes(c)?n[c]=u:(r||(r={}))[c]=u:kl(e.emitsOptions,o)||(!(o in s)||u!==s[o])&&(s[o]=u,i=!0)}if(a){const o=Te(n),u=r||Re;for(let c=0;c<a.length;c++){const d=a[c];n[d]=Aa(l,o,d,u[d],e,!Ae(u,d))}}return i}function Aa(e,t,n,s,l,a){const i=e[n];if(i!=null){const r=Ae(i,"default");if(r&&s===void 0){const o=i.default;if(i.type!==Function&&!i.skipFactory&&me(o)){const{propsDefaults:u}=l;if(n in u)s=u[n];else{const c=xs(l);s=u[n]=o.call(null,t),c()}}else s=o;l.ce&&l.ce._setProp(n,s)}i[0]&&(a&&!r?s=!1:i[1]&&(s===""||s===Mn(n))&&(s=!0))}return s}const ju=new WeakMap;function Ar(e,t,n=!1){const s=n?ju:t.propsCache,l=s.get(e);if(l)return l;const a=e.props,i={},r=[];let o=!1;if(!me(e)){const c=d=>{o=!0;const[v,$]=Ar(d,t,!0);et(i,v),$&&r.push(...$)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!a&&!o)return Ee(e)&&s.set(e,An),An;if(ve(a))for(let c=0;c<a.length;c++){const d=mt(a[c]);Mr(d)&&(i[d]=Re)}else if(a)for(const c in a){const d=mt(c);if(Mr(d)){const v=a[c],$=i[d]=ve(v)||me(v)?{type:v}:et({},v),x=$.type;let A=!1,w=!0;if(ve(x))for(let O=0;O<x.length;++O){const y=x[O],b=me(y)&&y.name;if(b==="Boolean"){A=!0;break}else b==="String"&&(w=!1)}else A=me(x)&&x.name==="Boolean";$[0]=A,$[1]=w,(A||Ae($,"default"))&&r.push(d)}}const u=[i,r];return Ee(e)&&s.set(e,u),u}function Mr(e){return e[0]!=="$"&&!us(e)}const Ma=e=>e==="_"||e==="_ctx"||e==="$stable",Ea=e=>ve(e)?e.map(zt):[zt(e)],Ku=(e,t,n)=>{if(t._n)return t;const s=jt((...l)=>Ea(t(...l)),n);return s._c=!1,s},Er=(e,t,n)=>{const s=e._ctx;for(const l in e){if(Ma(l))continue;const a=e[l];if(me(a))t[l]=Ku(l,a,s);else if(a!=null){const i=Ea(a);t[l]=()=>i}}},Fr=(e,t)=>{const n=Ea(t);e.slots.default=()=>n},Ir=(e,t,n)=>{for(const s in t)(n||!Ma(s))&&(e[s]=t[s])},Uu=(e,t,n)=>{const s=e.slots=Tr();if(e.vnode.shapeFlag&32){const l=t._;l?(Ir(s,t,n),n&&di(s,"_",l,!0)):Er(t,s)}else t&&Fr(e,t)},Hu=(e,t,n)=>{const{vnode:s,slots:l}=e;let a=!0,i=Re;if(s.shapeFlag&32){const r=t._;r?n&&r===1?a=!1:Ir(l,t,n):(a=!t.$stable,Er(t,l)),i=t}else t&&(Fr(e,t),i={default:1});if(a)for(const r in l)!Ma(r)&&i[r]==null&&delete l[r]},_t=Yu;function qu(e){return Wu(e)}function Wu(e,t){const n=Xs();n.__VUE__=!0;const{insert:s,remove:l,patchProp:a,createElement:i,createText:r,createComment:o,setText:u,setElementText:c,parentNode:d,nextSibling:v,setScopeId:$=Ot,insertStaticContent:x}=e,A=(g,T,L,Y=null,N=null,z=null,ne=void 0,te=null,X=!!T.dynamicChildren)=>{if(g===T)return;g&&!On(g,T)&&(Y=ke(g),qe(g,N,z,!0),g=null),T.patchFlag===-2&&(X=!1,T.dynamicChildren=null),T.dynamicChildren&&g&&g.dynamicChildren&&g.dynamicChildren.hasOnce&&(T.dynamicChildren===An&&(T.dynamicChildren=[]),T.dynamicChildren.hasOnce=!0);const{type:W,ref:ue,shapeFlag:Z}=T;switch(W){case Cl:w(g,T,L,Y);break;case dt:O(g,T,L,Y);break;case Sl:g==null&&y(T,L,Y,ne);break;case le:S(g,T,L,Y,N,z,ne,te,X);break;default:Z&1?B(g,T,L,Y,N,z,ne,te,X):Z&6?G(g,T,L,Y,N,z,ne,te,X):(Z&64||Z&128)&&W.process(g,T,L,Y,N,z,ne,te,X,Ct)}ue!=null&&N?ks(ue,g&&g.ref,z,T||g,!T):ue==null&&g&&g.ref!=null&&ks(g.ref,null,z,g,!0)},w=(g,T,L,Y)=>{if(g==null)s(T.el=r(T.children),L,Y);else{const N=T.el=g.el;T.children!==g.children&&u(N,T.children)}},O=(g,T,L,Y)=>{g==null?s(T.el=o(T.children||""),L,Y):T.el=g.el},y=(g,T,L,Y)=>{[g.el,g.anchor]=x(g.children,T,L,Y,g.el,g.anchor)},b=({el:g,anchor:T},L,Y)=>{let N;for(;g&&g!==T;)N=v(g),s(g,L,Y),g=N;s(T,L,Y)},C=({el:g,anchor:T})=>{let L;for(;g&&g!==T;)L=v(g),l(g),g=L;l(T)},B=(g,T,L,Y,N,z,ne,te,X)=>{if(T.type==="svg"?ne="svg":T.type==="math"&&(ne="mathml"),g==null)D(T,L,Y,N,z,ne,te,X);else{const W=g.el&&g.el._isVueCE?g.el:null;try{W&&W._beginPatch(),R(g,T,N,z,ne,te,X)}finally{W&&W._endPatch()}}},D=(g,T,L,Y,N,z,ne,te)=>{let X,W;const{props:ue,shapeFlag:Z,transition:re,dirs:fe}=g;if(X=g.el=i(g.type,z,ue&&ue.is,ue),Z&8?c(X,g.children):Z&16&&q(g.children,X,null,Y,N,Fa(g,z),ne,te),fe&&In(g,null,Y,"created"),U(X,g,g.scopeId,ne,Y),ue){for(const Se in ue)Se!=="value"&&!us(Se)&&a(X,Se,null,ue[Se],z,Y);"value"in ue&&a(X,"value",null,ue.value,z),(W=ue.onVnodeBeforeMount)&&Yt(W,Y,g)}fe&&In(g,null,Y,"beforeMount");const ye=Gu(N,re);ye&&re.beforeEnter(X),s(X,T,L),((W=ue&&ue.onVnodeMounted)||ye||fe)&&_t(()=>{try{W&&Yt(W,Y,g),ye&&re.enter(X),fe&&In(g,null,Y,"mounted")}finally{}},N)},U=(g,T,L,Y,N)=>{if(L&&$(g,L),Y)for(let z=0;z<Y.length;z++)$(g,Y[z]);if(N){let z=N.subTree;if(T===z||Or(z.type)&&(z.ssContent===T||z.ssFallback===T)){const ne=N.vnode;U(g,ne,ne.scopeId,ne.slotScopeIds,N.parent)}}},q=(g,T,L,Y,N,z,ne,te,X=0)=>{for(let W=X;W<g.length;W++){const ue=g[W]=te?un(g[W]):zt(g[W]);A(null,ue,T,L,Y,N,z,ne,te)}},R=(g,T,L,Y,N,z,ne)=>{const te=T.el=g.el;let{patchFlag:X,dynamicChildren:W,dirs:ue}=T;X|=g.patchFlag&16;const Z=g.props||Re,re=T.props||Re;let fe;if(L&&Pn(L,!1),(fe=re.onVnodeBeforeUpdate)&&Yt(fe,L,T,g),ue&&In(T,g,L,"beforeUpdate"),L&&Pn(L,!0),W&&(!g.dynamicChildren||g.dynamicChildren.length!==W.length)&&(X=0,ne=!1,W=null),(Z.innerHTML&&re.innerHTML==null||Z.textContent&&re.textContent==null)&&c(te,""),W?j(g.dynamicChildren,W,te,L,Y,Fa(T,N),z):ne||ce(g,T,te,null,L,Y,Fa(T,N),z,!1),X>0){if(X&16)J(te,Z,re,L,N);else if(X&2&&Z.class!==re.class&&a(te,"class",null,re.class,N),X&4&&a(te,"style",Z.style,re.style,N),X&8){const ye=T.dynamicProps;for(let Se=0;Se<ye.length;Se++){const we=ye[Se],De=Z[we],Ye=re[we];(Ye!==De||we==="value")&&a(te,we,De,Ye,N,L)}}X&1&&g.children!==T.children&&c(te,T.children)}else!ne&&W==null&&J(te,Z,re,L,N);((fe=re.onVnodeUpdated)||ue)&&_t(()=>{fe&&Yt(fe,L,T,g),ue&&In(T,g,L,"updated")},Y)},j=(g,T,L,Y,N,z,ne)=>{for(let te=0;te<T.length;te++){const X=g[te],W=T[te],ue=X.el||Da(X),Z=ue&&(X.type===le||!On(X,W)||X.shapeFlag&198)?d(ue):L;A(X,W,Z,null,Y,N,z,ne,!0)}},J=(g,T,L,Y,N)=>{if(T!==L){if(T!==Re)for(const z in T)!us(z)&&!(z in L)&&a(g,z,T[z],null,N,Y);for(const z in L){if(us(z))continue;const ne=L[z],te=T[z];ne!==te&&z!=="value"&&a(g,z,te,ne,N,Y)}"value"in L&&a(g,"value",T.value,L.value,N)}},S=(g,T,L,Y,N,z,ne,te,X)=>{const W=T.el=g?g.el:r(""),ue=T.anchor=g?g.anchor:r("");let{patchFlag:Z,dynamicChildren:re,slotScopeIds:fe}=T;fe&&(te=te?te.concat(fe):fe),g==null?(s(W,L,Y),s(ue,L,Y),q(T.children||[],L,ue,N,z,ne,te,X)):Z>0&&Z&64&&re&&g.dynamicChildren&&g.dynamicChildren.length===re.length?(j(g.dynamicChildren,re,L,N,z,ne,te),(T.key!=null||N&&T===N.subTree)&&Ia(g,T,!0)):ce(g,T,L,ue,N,z,ne,te,X)},G=(g,T,L,Y,N,z,ne,te,X)=>{T.slotScopeIds=te,g==null?T.shapeFlag&512?N.ctx.activate(T,L,Y,ne,X):he(T,L,Y,N,z,ne,X):Le(g,T,X)},he=(g,T,L,Y,N,z,ne)=>{const te=g.component=ed(g,Y,N);if(hl(g)&&(te.ctx.renderer=Ct),td(te,!1,ne),te.asyncDep){if(N&&N.registerDep(te,Ie,ne,z),!g.el){const X=te.subTree=Ge(dt);O(null,X,T,L),g.placeholder=X.el}}else Ie(te,g,T,L,N,z,ne)},Le=(g,T,L)=>{const Y=T.component=g.component;if(Lu(g,T,L))if(Y.asyncDep&&!Y.asyncResolved){T.el=g.el,T.placeholder=g.placeholder,$e(Y,T,L);return}else Y.next=T,Y.update();else T.el=g.el,T.placeholder=g.placeholder,Y.vnode=T},Ie=(g,T,L,Y,N,z,ne)=>{const te=()=>{if(g.isMounted){let{next:Z,bu:re,u:fe,parent:ye,vnode:Se}=g;{const ft=Dr(g);if(ft){Z&&(Z.el=Se.el,$e(g,Z,ne)),ft.asyncDep.then(()=>{_t(()=>{g.isUnmounted||W()},N)});return}}let we=Z,De;Pn(g,!1),Z?(Z.el=Se.el,$e(g,Z,ne)):Z=Se,re&&Js(re),(De=Z.props&&Z.props.onVnodeBeforeUpdate)&&Yt(De,ye,Z,Se),Pn(g,!0);const Ye=_r(g),ht=g.subTree;g.subTree=Ye,A(ht,Ye,d(ht.el),ke(ht),g,N,z),Z.el=Ye.el,we===null&&Nu(g,Ye.el),fe&&_t(fe,N),(De=Z.props&&Z.props.onVnodeUpdated)&&_t(()=>Yt(De,ye,Z,Se),N)}else{let Z;const{el:re,props:fe}=T,{bm:ye,m:Se,parent:we,root:De,type:Ye}=g,ht=Jn(T);Pn(g,!1),ye&&Js(ye),!ht&&(Z=fe&&fe.onVnodeBeforeMount)&&Yt(Z,we,T),Pn(g,!0);{De.ce&&De.ce._hasShadowRoot()&&De.ce._injectChildStyle(Ye,g.parent?g.parent.type:void 0);const ft=g.subTree=_r(g);A(null,ft,L,Y,g,N,z),T.el=ft.el}if(Se&&_t(Se,N),!ht&&(Z=fe&&fe.onVnodeMounted)){const ft=T;_t(()=>Yt(Z,we,ft),N)}(T.shapeFlag&256||we&&Jn(we.vnode)&&we.vnode.shapeFlag&256)&&g.a&&_t(g.a,N),g.isMounted=!0,T=L=Y=null}};g.scope.on();const X=g.effect=new yi(te);g.scope.off();const W=g.update=X.run.bind(X),ue=g.job=X.runIfDirty.bind(X);ue.i=g,ue.id=g.uid,X.scheduler=()=>ya(ue),Pn(g,!0),W()},$e=(g,T,L)=>{T.component=g;const Y=g.vnode.props;g.vnode=T,g.next=null,Bu(g,T.props,Y,L),Hu(g,T.children,L),Nt(),Ui(g),Vt()},ce=(g,T,L,Y,N,z,ne,te,X=!1)=>{const W=g&&g.children,ue=g?g.shapeFlag:0,Z=T.children,{patchFlag:re,shapeFlag:fe}=T;if(re>0){if(re&128){Xe(W,Z,L,Y,N,z,ne,te,X);return}else if(re&256){Ce(W,Z,L,Y,N,z,ne,te,X);return}}fe&8?(ue&16&&kt(W,N,z),Z!==W&&c(L,Z)):ue&16?fe&16?Xe(W,Z,L,Y,N,z,ne,te,X):kt(W,N,z,!0):(ue&8&&c(L,""),fe&16&&q(Z,L,Y,N,z,ne,te,X))},Ce=(g,T,L,Y,N,z,ne,te,X)=>{g=g||An,T=T||An;const W=g.length,ue=T.length,Z=Math.min(W,ue);let re;for(re=0;re<Z;re++){const fe=T[re]=X?un(T[re]):zt(T[re]);A(g[re],fe,L,null,N,z,ne,te,X)}W>ue?kt(g,N,z,!0,!1,Z):q(T,L,Y,N,z,ne,te,X,Z)},Xe=(g,T,L,Y,N,z,ne,te,X)=>{let W=0;const ue=T.length;let Z=g.length-1,re=ue-1;for(;W<=Z&&W<=re;){const fe=g[W],ye=T[W]=X?un(T[W]):zt(T[W]);if(On(fe,ye))A(fe,ye,L,null,N,z,ne,te,X);else break;W++}for(;W<=Z&&W<=re;){const fe=g[Z],ye=T[re]=X?un(T[re]):zt(T[re]);if(On(fe,ye))A(fe,ye,L,null,N,z,ne,te,X);else break;Z--,re--}if(W>Z){if(W<=re){const fe=re+1,ye=fe<ue?T[fe].el:Y;for(;W<=re;)A(null,T[W]=X?un(T[W]):zt(T[W]),L,ye,N,z,ne,te,X),W++}}else if(W>re)for(;W<=Z;)qe(g[W],N,z,!0),W++;else{const fe=W,ye=W,Se=new Map;for(W=ye;W<=re;W++){const tt=T[W]=X?un(T[W]):zt(T[W]);tt.key!=null&&Se.set(tt.key,W)}let we,De=0;const Ye=re-ye+1;let ht=!1,ft=0;const Xt=new Array(Ye);for(W=0;W<Ye;W++)Xt[W]=0;for(W=fe;W<=Z;W++){const tt=g[W];if(De>=Ye){qe(tt,N,z,!0);continue}let nt;if(tt.key!=null)nt=Se.get(tt.key);else for(we=ye;we<=re;we++)if(Xt[we-ye]===0&&On(tt,T[we])){nt=we;break}nt===void 0?qe(tt,N,z,!0):(Xt[nt-ye]=W+1,nt>=ft?ft=nt:ht=!0,A(tt,T[nt],L,null,N,z,ne,te,X),De++)}const Zt=ht?zu(Xt):An;for(we=Zt.length-1,W=Ye-1;W>=0;W--){const tt=ye+W,nt=T[tt],Ut=T[tt+1],Qt=tt+1<ue?Ut.el||Da(Ut):Y;Xt[W]===0?A(null,nt,L,Qt,N,z,ne,te,X):ht&&(we<0||W!==Zt[we]?ze(nt,L,Qt,2):we--)}}},ze=(g,T,L,Y,N=null)=>{const{el:z,type:ne,transition:te,children:X,shapeFlag:W}=g;if(W&6){ze(g.component.subTree,T,L,Y);return}if(W&128){g.suspense.move(T,L,Y);return}if(W&64){ne.move(g,T,L,Ct);return}if(ne===le){s(z,T,L);for(let Z=0;Z<X.length;Z++)ze(X[Z],T,L,Y);s(g.anchor,T,L);return}if(ne===Sl){b(g,T,L);return}if(Y!==2&&W&1&&te)if(Y===0)te.persisted&&!z[Ft]?s(z,T,L):(te.beforeEnter(z),s(z,T,L),_t(()=>te.enter(z),N));else{const{leave:Z,delayLeave:re,afterLeave:fe}=te,ye=()=>{g.ctx.isUnmounted?l(z):s(z,T,L)},Se=()=>{const we=z._isLeaving||!!z[Ft];z._isLeaving&&z[Ft](!0),te.persisted&&!we?ye():Z(z,()=>{ye(),fe&&fe()})};re?re(z,ye,Se):Se()}else s(z,T,L)},qe=(g,T,L,Y=!1,N=!1)=>{const{type:z,props:ne,ref:te,children:X,dynamicChildren:W,shapeFlag:ue,patchFlag:Z,dirs:re,cacheIndex:fe,memo:ye}=g;if((Z===-2||W&&W.hasOnce)&&(N=!1),te!=null&&(Nt(),ks(te,null,L,g,!0),Vt()),fe!=null&&(!g.ctx||g.ctx===T)&&(T.renderCache[fe]=void 0),ue&256){T.ctx.deactivate(g);return}const Se=ue&1&&re,we=!Jn(g);let De;if(we&&(De=ne&&ne.onVnodeBeforeUnmount)&&Yt(De,T,g),ue&6)Jt(g.component,L,Y);else{if(ue&128){g.suspense.unmount(L,Y);return}Se&&In(g,null,T,"beforeUnmount"),ue&64?g.type.remove(g,T,L,Ct,Y):W&&!W.hasOnce&&(z!==le||Z>0&&Z&64)?kt(W,T,L,!1,!0):(z===le&&Z&384||!N&&ue&16)&&kt(X,T,L),Y&&Ue(g)}const Ye=ye!=null&&fe==null;(we&&(De=ne&&ne.onVnodeUnmounted)||Se||Ye)&&_t(()=>{De&&Yt(De,T,g),Se&&In(g,null,T,"unmounted"),Ye&&(g.el=null)},L)},Ue=g=>{const{type:T,el:L,anchor:Y,transition:N}=g,z=T===le;if(z&&!N){xt(L,Y);return}if(T===Sl){C(g),N&&!N.persisted&&N.afterLeave&&N.afterLeave();return}const ne=z?_s(g):g,te=()=>{z?d(L)&&xt(L,Y):l(L),N&&!N.persisted&&N.afterLeave&&N.afterLeave()};if(ne&&ne.shapeFlag&1&&N&&!N.persisted){const{leave:X,delayLeave:W}=N,ue=ne.el,Z=()=>X(ue,te);W?W(ue,te,Z):Z()}else te()},xt=(g,T)=>{let L;for(;g!==T;)L=v(g),l(g),g=L;l(T)},Jt=(g,T,L)=>{const{bum:Y,scope:N,job:z,subTree:ne,um:te,m:X,a:W}=g;Pr(X),Pr(W),Y&&Js(Y),N.stop(),z?(z.flags|=8,qe(ne,g,T,L)):g.vnode.el&&ne&&(ne.transition=g.vnode.transition,qe(ne,g,T,L)),te&&_t(te,T),_t(()=>{g.isUnmounted=!0},T)},kt=(g,T,L,Y=!1,N=!1,z=0)=>{for(let ne=z;ne<g.length;ne++)qe(g[ne],T,L,Y,N)},ke=g=>{if(g.shapeFlag&6)return ke(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const T=v(g.anchor||g.el),L=T&&T[Ji];return L?v(L):T},P=(g,T,L)=>{const Y=g&&T._vnode?void 0:g&&g.component?g.component.uid:Qu();su(()=>{g==null?T._vnode&&qe(T._vnode,null,null,!0):A(T._vnode||null,g,T,null,null,null,L),T._vnode=g},Y)},Ct={p:A,um:qe,m:ze,r:Ue,mt:he,mc:q,pc:ce,pbc:j,n:ke,o:e};return{render:P,hydrate:void 0,createApp:Fu(P)}}function Fa({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Pn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Gu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ia(e,t,n=!1){const s=e.children,l=t.children;if(ve(s)&&ve(l))for(let a=0;a<s.length;a++){const i=s[a];let r=l[a];r.shapeFlag&1&&!r.dynamicChildren&&((r.patchFlag<=0||r.patchFlag===32)&&(r=l[a]=un(l[a]),r.el=i.el),!n&&r.patchFlag!==-2&&Ia(i,r)),r.type===Cl&&(r.patchFlag===-1&&(r=l[a]=un(r)),r.el=i.el),r.type===dt&&!r.el&&(r.el=i.el)}}function zu(e){const t=e.slice(),n=[0];let s,l,a,i,r;const o=e.length;for(s=0;s<o;s++){const u=e[s];if(u!==0){if(l=n[n.length-1],e[l]<u){t[s]=l,n.push(s);continue}for(a=0,i=n.length-1;a<i;)r=a+i>>1,e[n[r]]<u?a=r+1:i=r;u<e[n[a]]&&(a>0&&(t[s]=n[a-1]),n[a]=s)}}for(a=n.length,i=n[a-1];a-- >0;)n[a]=i,i=t[i];return n}function Dr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Dr(t)}function Pr(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Da(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Da(t.subTree):null}const Or=e=>e.__isSuspense;function Yu(e,t){t&&t.pendingBranch?ve(e)?t.effects.push(...e):t.effects.push(e):Ki(e)}const le=Symbol.for("v-fgt"),Cl=Symbol.for("v-txt"),dt=Symbol.for("v-cmt"),Sl=Symbol.for("v-stc"),cn=[];let Tt=null;function p(e=!1){cn.push(Tt=e?null:[])}function Pa(){cn.pop(),Tt=cn[cn.length-1]||null}let ws=1;function wl(e,t=!1){ws+=e,e<0&&Tt&&t&&(Tt.hasOnce=!0)}function Rr(e){return e.dynamicChildren=ws>0?Tt||An:null,Pa(),ws>0&&Tt&&Tt.push(e),e}function h(e,t,n,s,l,a){return Rr(f(e,t,n,s,l,a,!0))}function st(e,t,n,s,l){return Rr(Ge(e,t,n,s,l,!0))}function Qn(e){return e?e.__v_isVNode===!0:!1}function On(e,t){return e.type===t.type&&e.key===t.key}const Lr=({key:e})=>e??null,Tl=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ve(e)||ot(e)||me(e)?{i:ct,r:e,k:t,f:!!n}:e:null);function f(e,t=null,n=null,s=0,l=null,a=e===le?0:1,i=!1,r=!1){const o={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Lr(t),ref:t&&Tl(t),scopeId:Wi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:s,dynamicProps:l,dynamicChildren:null,appContext:null,ctx:ct};return r?(xl(o,n),a&128&&e.normalize(o)):n&&(o.shapeFlag|=Ve(n)?8:16),ws>0&&!i&&Tt&&(o.patchFlag>0||a&6)&&o.patchFlag!==32&&Tt.push(o),o}const Ge=Ju;function Ju(e,t=null,n=null,s=0,l=null,a=!1){if((!e||e===or)&&(e=dt),Qn(e)){const r=Cn(e,t,!0);return n&&xl(r,n),ws>0&&!a&&Tt&&(r.shapeFlag&6?Tt[Tt.indexOf(e)]=r:Tt.push(r)),r.patchFlag=-2,r}if(rd(e)&&(e=e.__vccOpts),t){t=Xu(t);let{class:r,style:o}=t;r&&!Ve(r)&&(t.class=se(r)),Ee(o)&&(ma(o)&&!ve(o)&&(o=et({},o)),t.style=$t(o))}const i=Ve(e)?1:Or(e)?128:ul(e)?64:Ee(e)?4:me(e)?2:0;return f(e,t,n,s,l,i,a,!0)}function Xu(e){return e?ma(e)||xr(e)?et({},e):e:null}function Cn(e,t,n=!1,s=!1){const{props:l,ref:a,patchFlag:i,children:r,transition:o}=e,u=t?Nr(l||{},t):l,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Lr(u),ref:t&&t.ref?n&&a?ve(a)?a.concat(Tl(t)):[a,Tl(t)]:Tl(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==le?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:o,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Cn(e.ssContent),ssFallback:e.ssFallback&&Cn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return o&&s&&Yn(c,o.clone(c)),c}function Je(e=" ",t=0){return Ge(Cl,null,e,t)}function V(e="",t=!1){return t?(p(),st(dt,null,e)):Ge(dt,null,e)}function zt(e){return e==null||typeof e=="boolean"?Ge(dt):ve(e)?Ge(le,null,e.slice()):Qn(e)?un(e):Ge(Cl,null,String(e))}function un(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Cn(e)}function xl(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(ve(t))n=16;else if(typeof t=="object")if(s&65){const l=t.default;l&&(l._c&&(l._d=!1),xl(e,l()),l._c&&(l._d=!0));return}else{n=32;const l=t._;!l&&!xr(t)?t._ctx=ct:l===3&&ct&&(ct.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(me(t)){if(s&65){xl(e,{default:t});return}t={default:t,_ctx:ct},n=32}else t=String(t),s&64?(n=16,t=[Je(t)]):n=8;e.children=t,e.shapeFlag|=n}function Nr(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const l in s)if(l==="class")t.class!==s.class&&(t.class=se([t.class,s.class]));else if(l==="style")t.style=$t([t.style,s.style]);else if(qs(l)){const a=t[l],i=s[l];i&&a!==i&&!(ve(a)&&a.includes(i))?t[l]=a?[].concat(a,i):i:i==null&&a==null&&!Ws(l)&&(t[l]=i)}else l!==""&&(t[l]=s[l])}return t}function Yt(e,t,n,s=null){Et(e,t,7,[n,s])}const Zu=yr();let Vr=0;function Qu(){return Vr}function ed(e,t,n){const s=e.type,l=(t?t.appContext:e.appContext)||Zu,a={uid:Vr++,vnode:e,type:s,parent:t,appContext:l,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new wc(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(l.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ar(s,l),emitsOptions:br(s,l),emit:null,emitted:null,propsDefaults:Re,inheritAttrs:s.inheritAttrs,ctx:Re,data:Re,props:Re,attrs:Re,slots:Re,refs:Re,setupState:Re,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=Du.bind(null,a),e.ce&&e.ce(a),a}let pt=null;const Oa=()=>pt||ct;let $l,Ts;{const e=Xs(),t=(n,s)=>{let l;return(l=e[n])||(l=e[n]=[]),l.push(s),a=>{l.length>1?l.forEach(i=>i(a)):l[0](a)}};$l=t("__VUE_INSTANCE_SETTERS__",n=>pt=n),Ts=t("__VUE_SSR_SETTERS__",n=>$s=n)}const xs=e=>{const t=pt;return $l(e),e.scope.on(),()=>{e.scope.off(),$l(t)}},Br=()=>{pt&&pt.scope.off(),$l(null)};function jr(e){return e.vnode.shapeFlag&4}let $s=!1;function td(e,t=!1,n=!1){t&&Ts(t);const{props:s,children:l}=e.vnode,a=jr(e);Vu(e,s,a,t),Uu(e,l,n||t);const i=a?nd(e,t):void 0;return t&&Ts(!1),i}function nd(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,wu);const{setup:s}=n;if(s){Nt();const l=e.setupContext=s.length>1?ld(e):null,a=xs(e),i=Wn(s,e,0,[e.props,l]),r=oi(i);if(Vt(),a(),(r||e.sp)&&!Jn(e)&&sr(e),r){if(i.then(Br,Br),t)return i.then(o=>{Ts(!0);try{Kr(e,o,t)}finally{Ts(!1)}}).catch(o=>{rl(o,e,0)});e.asyncDep=i}else Kr(e,i)}else Ur(e)}function Kr(e,t,n){me(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ee(t)&&(e.setupState=Ni(t)),Ur(e)}function Ur(e,t,n){const s=e.type;e.render||(e.render=s.render||Ot);{const l=xs(e);Nt();try{Tu(e)}finally{Vt(),l()}}}const sd={get(e,t){return vt(e,"get",""),e[t]}};function ld(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,sd),slots:e.slots,emit:e.emit,expose:t}}function Al(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ni(Uc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Cs)return Cs[n](e)},has(t,n){return n in t||n in Cs}})):e.proxy}const ad=/(?:^|[-_])\w/g,id=e=>e.replace(ad,t=>t.toUpperCase()).replace(/[-_]/g,"");function Hr(e,t=!0){return me(e)?e.displayName||e.name:e.name||t&&e.__name}function qr(e,t,n=!1){let s=Hr(t);if(!s&&t.__file){const l=t.__file.match(/([^/\\]+)\.\w+$/);l&&(s=l[1])}if(!s&&e){const l=a=>{for(const i in a)if(a[i]===t)return i};s=l(e.components)||e.parent&&l(e.parent.type.components)||l(e.appContext.components)}return s?id(s):n?"App":"Anonymous"}function rd(e){return me(e)&&"__vccOpts"in e}const E=(e,t)=>zc(e,t,$s);function od(e,t,n){try{wl(-1);const s=arguments.length;return s===2?Ee(t)&&!ve(t)?Qn(t)?Ge(e,null,[t]):Ge(e,t):Ge(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Qn(n)&&(n=[n]),Ge(e,t,n))}finally{wl(1)}}const cd="3.5.44";/**
16
+ `],...Qc(n))}),t}function Qc({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,l=` at <${qr(e.component,e.type,s)}`,a=">"+n;return e.props?[l,...eu(e.props),a]:[l+a]}function eu(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...Vi(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Vi(e,t,n){return Ve(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:ot(t)?(t=Vi(e,xe(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):me(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=xe(t),n?t:[`${e}=`,t])}function Wn(e,t,n,s){try{return s?e(...s):e()}catch(l){rl(l,t,n)}}function Et(e,t,n,s){if(me(e)){const l=Wn(e,t,n,s);return l&&oi(l)&&l.catch(a=>{rl(a,t,n)}),l}if(pe(e)){const l=[];for(let a=0;a<e.length;a++)l.push(Et(e[a],t,n,s));return l}}function rl(e,t,n,s=!0){const l=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Re;if(t){let r=t.parent;const o=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){const c=r.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,o,u)===!1)return}r=r.parent}if(a){Nt(),Wn(a,null,10,[e,o,u]),Vt();return}}tu(e,n,l,s,i)}function tu(e,t,n,s=!0,l=!1){if(l)throw e;console.error(e)}const gt=[];let Bt=-1;const zt=[];let _n=null,Gn=0;const Bi=Promise.resolve();let ol=null;function zn(e){const t=ol||Bi;return e?t.then(this?e.bind(this):e):t}function nu(e){let t=Bt+1,n=gt.length;for(;t<n;){const s=t+n>>>1,l=gt[s],a=gs(l);a<e||a===e&&l.flags&2?t=s+1:n=s}return t}function ya(e){if(!(e.flags&1)){const t=gs(e),n=gt[gt.length-1];!n||!(e.flags&2)&&t>=gs(n)?gt.push(e):gt.splice(nu(t),0,e),e.flags|=1,ji()}}function ji(){ol||(ol=Bi.then(qi))}function Ki(e){if(!pe(e))_n&&e.id===-1?_n.splice(Gn+1,0,e):e.flags&1||(zt.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)zt.push(e[t]);ji()}function Ui(e,t,n,s=Bt+1){for(;s<gt.length;s++){const l=gt[s];if(l&&l.flags&2){if(e&&l.id!==e.uid||t!==void 0&&!(l.id>=t))continue;gt.splice(s,1),s=e?s-1:Bt,l.flags&4&&(l.flags&=-2),l(),l.flags&4||(l.flags&=-2)}}}function Hi(e,t,n=0){if(zt.length){let s=zt,l=0;if(t){s=[];for(let i=0;i<zt.length;i++){const r=zt[i];(r.i!==void 0?!r.i||r.i.uid<n:t.has(r))?zt[l++]=r:s.push(r)}}const a=[...new Set(s)].sort((i,r)=>gs(i)-gs(r));if(zt.length=l,_n){for(let i=0;i<a.length;i++)_n.push(a[i]);return}for(_n=a,Gn=0;Gn<_n.length;Gn++){const i=_n[Gn];i.flags&4&&(i.flags&=-2),i.flags&8||i(),i.flags&=-2}_n=null,Gn=0}}let ba=!1;function su(e,t){if(ba){e();return}const n=t===void 0?void 0:new Set(zt);e(),ba=!0;try{Ui(void 0,t),Hi(void 0,n,t)}finally{ba=!1}}const gs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function qi(e){try{for(Bt=0;Bt<gt.length;Bt++){const t=gt[Bt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Wn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Bt<gt.length;Bt++){const t=gt[Bt];t&&(t.flags&=-2)}Bt=-1,gt.length=0,Hi(),ol=null,(gt.length||zt.length)&&qi()}}let ct=null,Wi=null;function cl(e){const t=ct;return ct=e,Wi=e&&e.type.__scopeId||null,t}function jt(e,t=ct,n){if(!t||e._n)return e;const s=(...l)=>{s._d&&wl(-1);const a=cl(t),i=cn.length;let r;try{r=e(...l)}finally{for(let o=cn.length;o>i;o--)Pa();cl(a),s._d&&wl(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function Gi(e,t){if(ct===null)return e;const n=Al(ct),s=e.dirs||(e.dirs=[]);for(let l=0;l<t.length;l++){let[a,i,r,o=Re]=t[l];a&&(me(a)&&(a={mounted:a,updated:a}),a.deep&&rn(i),s.push({dir:a,instance:n,value:i,oldValue:void 0,arg:r,modifiers:o}))}return e}function In(e,t,n,s){const l=e.dirs,a=t&&t.dirs;for(let i=0;i<l.length;i++){const r=l[i];a&&(r.oldValue=a[i].value);let o=r.dir[s];o&&(Nt(),Et(o,n,8,[e.el,r,e,t]),Vt())}}function yt(e,t){if(pt){let n=pt.provides;const s=pt.parent&&pt.parent.provides;s===n&&(n=pt.provides=Object.create(s)),n[e]=t}}function je(e,t,n=!1){const s=Oa();if(s||Zn){let l=Zn?Zn._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(l&&e in l)return l[e];if(arguments.length>1)return n&&me(t)?t.call(s&&s.proxy):t}}const lu=Symbol.for("v-scx"),au=()=>je(lu);function ut(e,t,n){return zi(e,t,n)}function zi(e,t,n=Re){const{immediate:s,deep:l,flush:a,once:i}=n,r=et({},n),o=t&&s||!t&&a!=="post";let u;if($s){if(a==="sync"){const A=au();u=A.__watcherHandles||(A.__watcherHandles=[])}else if(!o){const A=()=>{};return A.stop=Ot,A.resume=Ot,A.pause=Ot,A}}const c=pt;r.call=(A,x,M)=>Et(A,c,x,M);let d=!1;a==="post"?r.scheduler=A=>{A.i=c,_t(A,c&&c.suspense)}:a!=="sync"&&(d=!0,r.scheduler=(A,x)=>{x?A():ya(A)}),r.augmentJob=A=>{t&&(A.flags|=4),d&&(A.flags|=2,c&&(A.id=c.uid,A.i=c))};const v=Jc(e,t,r);return $s&&(u?u.push(v):o&&v()),v}function iu(e,t,n){const s=this.proxy,l=Ve(e)?e.includes(".")?Yi(s,e):()=>s[e]:e.bind(s,s);let a;me(t)?a=t:(a=t.handler,n=t);const i=xs(this),r=zi(l,a.bind(s),n);return i(),r}function Yi(e,t){const n=t.split(".");return()=>{let s=e;for(let l=0;l<n.length&&s;l++)s=s[n[l]];return s}}const kn=new WeakMap,Ji=Symbol("_vte"),ul=e=>e.__isTeleport,Dn=e=>e&&(e.disabled||e.disabled===""),ru=e=>e&&(e.defer||e.defer===""),Xi=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Zi=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,_a=(e,t)=>{const n=e&&e.to;return Ve(n)?t?t(n):null:n},ou={name:"Teleport",__isTeleport:!0,process(e,t,n,s,l,a,i,r,o,u){const{mc:c,pc:d,pbc:v,o:{insert:A,querySelector:x,createText:M,createComment:w,parentNode:O}}=u,y=Dn(t.props);let{dynamicChildren:b}=t;const C=(U,q,R)=>{U.shapeFlag&16&&c(U.children,q,R,l,a,i,r,o)},B=(U=t)=>{const q=Dn(U.props),R=U.target=_a(U.props,x),j=ka(R,U,M,A);R&&(i!=="svg"&&Xi(R)?i="svg":i!=="mathml"&&Zi(R)&&(i="mathml"),l&&l.isCE&&(l.ce._teleportTargets||(l.ce._teleportTargets=new Set)).add(R),q||(C(U,R,j),ys(U,!1)))},D=U=>{const q=()=>{if(kn.get(U)===q){if(kn.delete(U),Dn(U.props)){const R=O(U.el)||n;C(U,R,U.anchor),ys(U,!0)}B(U)}};kn.set(U,q),_t(q,a)};if(e==null){const U=t.el=M(""),q=t.anchor=M("");if(A(U,n,s),A(q,n,s),ru(t.props)||a&&a.pendingBranch){D(t);return}y&&(C(t,n,q),ys(t,!0)),B()}else{t.el=e.el;const U=t.anchor=e.anchor,q=kn.get(e);if(q){q.flags|=8,kn.delete(e),D(t);return}t.targetStart=e.targetStart;const R=t.target=e.target,j=t.targetAnchor=e.targetAnchor,J=Dn(e.props),S=J?n:R,G=J?U:j;if(i==="svg"||Xi(R)?i="svg":(i==="mathml"||Zi(R))&&(i="mathml"),b?(v(e.dynamicChildren,b,S,l,a,i,r),Ia(e,t,!0)):o||d(e,t,S,G,l,a,i,r,!1),y)J?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):dl(t,n,U,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const he=_a(t.props,x);he&&(t.target=he,dl(t,he,null,u,0))}else J&&dl(t,R,j,u,1);ys(t,y)}},remove(e,t,n,{um:s,o:{remove:l}},a){const{shapeFlag:i,children:r,anchor:o,targetStart:u,targetAnchor:c,target:d,props:v}=e,A=Dn(v),x=a||!A,M=kn.get(e);if(M&&(M.flags|=8,kn.delete(e)),d&&(l(u),l(c)),a&&l(o),!M&&(A||d)&&i&16)for(let w=0;w<r.length;w++){const O=r[w];s(O,t,n,x,!!O.dynamicChildren)}},move:dl,hydrate:cu};function dl(e,t,n,{o:{insert:s},m:l},a=2){a===0&&(e.targetStart&&s(e.targetStart,t,n),s(e.targetAnchor,t,n),n=e.targetAnchor);const{el:i,anchor:r,shapeFlag:o,children:u,props:c}=e,d=a===2;if(d&&s(i,t,n),!kn.has(e)&&(!d||Dn(c))&&o&16)for(let v=0;v<u.length;v++)l(u[v],t,n,2);d&&s(r,t,n)}function cu(e,t,n,s,l,a,{o:{nextSibling:i,parentNode:r,querySelector:o,insert:u,createText:c}},d){function v(w,O){let y=O;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")t.targetStart=y;else if(y.data==="teleport anchor"){t.targetAnchor=y,w._lpa=t.targetAnchor&&i(t.targetAnchor);break}}y=i(y)}}function A(w,O){O.anchor=d(i(w),O,r(w),n,s,l,a)}const x=t.target=_a(t.props,o),M=Dn(t.props);if(x){const w=x._lpa||x.firstChild;t.shapeFlag&16&&(M?(A(e,t),v(x,w),t.targetAnchor||ka(x,t,c,u,r(e)===x?e:null)):(t.anchor=i(e),v(x,w),t.targetAnchor||ka(x,t,c,u),d(w&&i(w),t,x,n,s,l,a))),ys(t,M)}else M&&t.shapeFlag&16&&(A(e,t),t.targetStart=e,t.targetAnchor=i(e));return t.anchor&&i(t.anchor)}const fl=ou;function ys(e,t){const n=e.ctx;if(n&&n.ut){let s,l;for(t?(s=e.el,l=e.anchor):(s=e.targetStart,l=e.targetAnchor);s&&s!==l;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function ka(e,t,n,s,l=null){const a=t.targetStart=n(""),i=t.targetAnchor=n("");return a[Ji]=i,e&&(s(a,e,l),s(i,e,l)),i}const Ft=Symbol("_leaveCb"),bs=Symbol("_enterCb");function uu(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return gl(()=>{e.isMounted=!0}),yl(()=>{e.isUnmounting=!0}),e}const It=[Function,Array],Qi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:It,onEnter:It,onAfterEnter:It,onEnterCancelled:It,onBeforeLeave:It,onLeave:It,onAfterLeave:It,onLeaveCancelled:It,onBeforeAppear:It,onAppear:It,onAfterAppear:It,onAppearCancelled:It},du={name:"BaseTransition",props:Qi,setup(e,{slots:t}){const n=Oa(),s=uu();return()=>{const l=t.default&&nr(t.default(),!0),a=l&&l.length?er(l):n.subTree?V():void 0;if(!a)return;const i=xe(e),{mode:r}=i;if(s.isLeaving)return Sa(a);const o=vl(a);if(!o)return Sa(a);let u=Ca(o,i,s,n,d=>u=d);o.type!==dt&&Yn(o,u);let c=n.subTree&&vl(n.subTree);if(c&&c.type!==dt&&!On(c,o)&&_s(n.subTree)){let d=Ca(c,i,s,n);if(Yn(c,d),r==="out-in"&&o.type!==dt)return s.isLeaving=!0,d.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Sa(a);r==="in-out"&&o.type!==dt?d.delayLeave=(v,A,x)=>{const M=tr(s,c);M[String(c.key)]=c,v[Ft]=()=>{A(),v[Ft]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{x(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return a}}};function er(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==dt){t=n;break}}return t}const fu=du;function tr(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Ca(e,t,n,s,l){const{appear:a,mode:i,persisted:r=!1,onBeforeEnter:o,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:v,onLeave:A,onAfterLeave:x,onLeaveCancelled:M,onBeforeAppear:w,onAppear:O,onAfterAppear:y,onAppearCancelled:b}=t,C=String(e.key),B=tr(n,e),D=(R,j)=>{R&&Et(R,s,9,j)},U=(R,j)=>{const J=j[1];D(R,j),pe(R)?R.every(S=>S.length<=1)&&J():R.length<=1&&J()},q={mode:i,persisted:r,beforeEnter(R){let j=o;if(!n.isMounted)if(a)j=w||o;else return;R[Ft]&&R[Ft](!0);const J=B[C];if(J&&On(e,J)){let S=J.el[Ft];if(!S){const G=_s(J);S=G&&G.el[Ft]}S&&S()}D(j,[R])},enter(R){if(B[C]===e)return;let j=u,J=c,S=d;if(!n.isMounted)if(a)j=O||u,J=y||c,S=b||d;else return;let G=!1;R[bs]=Le=>{G||(G=!0,Le?D(S,[R]):D(J,[R]),q.delayedLeave&&q.delayedLeave(),R[bs]=void 0)};const he=R[bs].bind(null,!1);j?U(j,[R,he]):he()},leave(R,j){const J=String(e.key);if(R[bs]&&R[bs](!0),n.isUnmounting)return j();D(v,[R]);let S=!1;R[Ft]=he=>{S||(S=!0,j(),he?D(M,[R]):D(x,[R]),R[Ft]=void 0,B[J]===e&&delete B[J])};const G=R[Ft].bind(null,!1);B[J]=e,A?U(A,[R,G]):G()},clone(R){const j=Ca(R,t,n,s,l);return l&&l(j),j}};return q}function Sa(e){if(hl(e))return e=Cn(e),e.children=null,e}function vl(e){if(!hl(e))return ul(e.type)&&e.children?er(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&me(n.default))return n.default()}}function Yn(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;Yn(ul(n.type)&&vl(n)||n,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===le&&pe(e.children)){const n=kr(e.children,!1);n&&Yn(n,t)}}function nr(e,t=!1,n){let s=[],l=0;for(let a=0;a<e.length;a++){let i=e[a];const r=n==null?i.key:String(n)+String(i.key!=null?i.key:a);i.type===le?(i.patchFlag&128&&l++,s=s.concat(nr(i.children,t,r))):(t||i.type!==dt)&&s.push(r!=null?Cn(i,{key:r}):i)}if(l>1)for(let a=0;a<s.length;a++)s[a].patchFlag=-2;return s}function _s(e){if(e.component)return _s(e.component.subTree);if(e.type===le){const t=pe(e.children)&&kr(e.children,!1);return t?_s(t):void 0}if(e.type!==dt)return e}function Pe(e,t){return me(e)?et({name:e.name},t,{setup:e}):e}function sr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function lr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const pl=new WeakMap;function ks(e,t,n,s,l=!1){if(pe(e)){e.forEach((M,w)=>ks(M,t&&(pe(t)?t[w]:t),n,s,l));return}if(Jn(s)&&!l){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ks(e,t,n,s.component.subTree);return}const a=s.shapeFlag&4?Al(s.component):s.el,i=l?null:a,{i:r,r:o}=e,u=t&&t.r,c=r.refs===Re?r.refs={}:r.refs,d=r.setupState,v=xe(d),A=d===Re?ii:M=>lr(c,M)?!1:Me(v,M),x=(M,w)=>!(w&&lr(c,w));if(u!=null&&u!==o){if(ar(t),Ve(u))c[u]=null,A(u)&&(d[u]=null);else if(ot(u)){const M=t;x(u,M.k)&&(u.value=null),M.k&&(c[M.k]=null)}}if(me(o))Wn(o,r,12,[i,c]);else{const M=Ve(o),w=ot(o);if(M||w){const O=()=>{if(e.f){const y=M?A(o)?d[o]:c[o]:x()||!e.k?o.value:c[e.k];if(l)pe(y)&&Ql(y,a);else if(pe(y))y.includes(a)||y.push(a);else if(M)c[o]=[a],A(o)&&(d[o]=c[o]);else{const b=[a];x(o,e.k)&&(o.value=b),e.k&&(c[e.k]=b)}}else M?(c[o]=i,A(o)&&(d[o]=i)):w&&(x(o,e.k)&&(o.value=i),e.k&&(c[e.k]=i))};if(i){const y=()=>{O(),pl.delete(e)};y.id=-1,pl.set(e,y),_t(y,n)}else ar(e),O()}}}function ar(e){const t=pl.get(e);t&&(t.flags|=8,pl.delete(e))}Xs().requestIdleCallback,Xs().cancelIdleCallback;const Jn=e=>!!e.type.__asyncLoader,hl=e=>e.type.__isKeepAlive;function vu(e,t){ir(e,"a",t)}function pu(e,t){ir(e,"da",t)}function ir(e,t,n=pt){const s=e.__wdc||(e.__wdc=()=>{let l=n;for(;l;){if(l.isDeactivated)return;l=l.parent}return e()});if(ml(t,s,n),n){let l=n.parent;for(;l&&l.parent;)hl(l.parent.vnode)&&hu(s,t,n,l),l=l.parent}}function hu(e,t,n,s){const l=ml(t,e,s,!0);bl(()=>{Ql(s[t],l)},n)}function ml(e,t,n=pt,s=!1){if(n){const l=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...i)=>{Nt();const r=xs(n),o=Et(t,n,e,i);return r(),Vt(),o});return s?l.unshift(a):l.push(a),a}}const on=e=>(t,n=pt)=>{(!$s||e==="sp")&&ml(e,(...s)=>t(...s),n)},mu=on("bm"),gl=on("m"),rr=on("bu"),gu=on("u"),yl=on("bum"),bl=on("um"),yu=on("sp"),bu=on("rtg"),_u=on("rtc");function ku(e,t=pt){ml("ec",e,t)}const Cu="components",or=Symbol.for("v-ndc");function Xn(e){return Ve(e)?Su(Cu,e,!1)||e:e||or}function Su(e,t,n=!0,s=!1){const l=ct||pt;if(l){const a=l.type;{const r=Hr(a,!1);if(r&&(r===t||r===mt(t)||r===Ys(mt(t))))return a}const i=cr(l[e]||a[e],t)||cr(l.appContext[e],t);return!i&&s?a:i}}function cr(e,t){return e&&(e[t]||e[mt(t)]||e[Ys(mt(t))])}function ke(e,t,n,s){let l;const a=n,i=pe(e);if(i||Ve(e)){const r=i&&yn(e);let o=!1,u=!1;r&&(o=!At(e),u=Gt(e),e=Qs(e)),l=new Array(e.length);for(let c=0,d=e.length;c<d;c++)l[c]=t(o?u?bn(Mt(e[c])):Mt(e[c]):e[c],c,void 0,a)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)l=[];else{l=new Array(e);for(let r=0;r<e;r++)l[r]=t(r+1,r,void 0,a)}else if(Fe(e))if(e[Symbol.iterator])l=Array.from(e,(r,o)=>t(r,o,void 0,a));else{const r=Object.keys(e);l=new Array(r.length);for(let o=0,u=r.length;o<u;o++){const c=r[o];l[o]=t(e[c],c,o,a)}}else l=[];return l}function ur(e,t,n,s,l,a){if(n==null&&(n={}),ct.ce||ct.parent&&Jn(ct.parent)&&ct.parent.ce){const u=n,c=Object.keys(u).length>0;return t!=="default"&&(u.name=t),p(),st(le,null,[Ge("slot",u,s)],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const r=cn.length;p();let o;try{const u=i&&dr(i(n)),c=n.key||a||u&&u.key;o=st(le,{key:(c&&!Rt(c)?c:`_${t}`)+(!u&&s?"_fb":"")},u||(s?s():[]),u&&e._===1?64:-2)}catch(u){for(let c=cn.length;c>r;c--)Pa();throw u}finally{i&&i._c&&(i._d=!0)}return o}function dr(e){return e.some(t=>Qn(t)?!(t.type===dt||t.type===le&&!dr(t.children)):!0)?e:null}const wa=e=>e?jr(e)?Al(e):wa(e.parent):null,Cs=et(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>wa(e.parent),$root:e=>wa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>hr(e),$forceUpdate:e=>e.f||(e.f=()=>{ya(e.update)}),$nextTick:e=>e.n||(e.n=zn.bind(e.proxy)),$watch:e=>iu.bind(e)}),Ta=(e,t)=>e!==Re&&!e.__isScriptSetup&&Me(e,t),wu={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:l,props:a,accessCache:i,type:r,appContext:o}=e;if(t[0]!=="$"){const v=i[t];if(v!==void 0)switch(v){case 1:return s[t];case 2:return l[t];case 4:return n[t];case 3:return a[t]}else{if(Ta(s,t))return i[t]=1,s[t];if(l!==Re&&Me(l,t))return i[t]=2,l[t];if(Me(a,t))return i[t]=3,a[t];if(n!==Re&&Me(n,t))return i[t]=4,n[t];xa&&(i[t]=0)}}const u=Cs[t];let c,d;if(u)return t==="$attrs"&&vt(e.attrs,"get",""),u(e);if((c=r.__cssModules)&&(c=c[t]))return c;if(n!==Re&&Me(n,t))return i[t]=4,n[t];if(d=o.config.globalProperties,Me(d,t))return d[t]},set({_:e},t,n){const{data:s,setupState:l,ctx:a}=e;return Ta(l,t)?(l[t]=n,!0):s!==Re&&Me(s,t)?(s[t]=n,!0):Me(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:l,props:a,type:i}},r){let o;return!!(n[r]||e!==Re&&r[0]!=="$"&&Me(e,r)||Ta(t,r)||Me(a,r)||Me(s,r)||Me(Cs,r)||Me(l.config.globalProperties,r)||(o=i.__cssModules)&&o[r])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Me(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function fr(e){return pe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let xa=!0;function Tu(e){const t=hr(e),n=e.proxy,s=e.ctx;xa=!1,t.beforeCreate&&vr(t.beforeCreate,e,"bc");const{data:l,computed:a,methods:i,watch:r,provide:o,inject:u,created:c,beforeMount:d,mounted:v,beforeUpdate:A,updated:x,activated:M,deactivated:w,beforeDestroy:O,beforeUnmount:y,destroyed:b,unmounted:C,render:B,renderTracked:D,renderTriggered:U,errorCaptured:q,serverPrefetch:R,expose:j,inheritAttrs:J,components:S,directives:G,filters:he}=t;if(u&&xu(u,s,null),i)for(const $e in i){const ce=i[$e];me(ce)&&(s[$e]=ce.bind(n))}if(l){const $e=l.call(n,n);Fe($e)&&(e.data=sl($e))}if(xa=!0,a)for(const $e in a){const ce=a[$e],Se=me(ce)?ce.bind(n,n):me(ce.get)?ce.get.bind(n,n):Ot,Xe=!me(ce)&&me(ce.set)?ce.set.bind(n):Ot,ze=E({get:Se,set:Xe});Object.defineProperty(s,$e,{enumerable:!0,configurable:!0,get:()=>ze.value,set:qe=>ze.value=qe})}if(r)for(const $e in r)pr(r[$e],s,n,$e);if(o){const $e=me(o)?o.call(n):o;Reflect.ownKeys($e).forEach(ce=>{yt(ce,$e[ce])})}c&&vr(c,e,"c");function Ie($e,ce){pe(ce)?ce.forEach(Se=>$e(Se.bind(n))):ce&&$e(ce.bind(n))}if(Ie(mu,d),Ie(gl,v),Ie(rr,A),Ie(gu,x),Ie(vu,M),Ie(pu,w),Ie(ku,q),Ie(_u,D),Ie(bu,U),Ie(yl,y),Ie(bl,C),Ie(yu,R),pe(j))if(j.length){const $e=e.exposed||(e.exposed={});j.forEach(ce=>{Object.defineProperty($e,ce,{get:()=>n[ce],set:Se=>n[ce]=Se,enumerable:!0})})}else e.exposed||(e.exposed={});B&&e.render===Ot&&(e.render=B),J!=null&&(e.inheritAttrs=J),S&&(e.components=S),G&&(e.directives=G),R&&sr(e)}function xu(e,t,n=Ot){pe(e)&&(e=$a(e));for(const s in e){const l=e[s];let a;Fe(l)?"default"in l?a=je(l.from||s,l.default,!0):a=je(l.from||s):a=je(l),ot(a)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>a.value,set:i=>a.value=i}):t[s]=a}}function vr(e,t,n){Et(pe(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function pr(e,t,n,s){let l=s.includes(".")?Yi(n,s):()=>n[s];if(Ve(e)){const a=t[e];me(a)&&ut(l,a)}else if(me(e))ut(l,e.bind(n));else if(Fe(e))if(pe(e))e.forEach(a=>pr(a,t,n,s));else{const a=me(e.handler)?e.handler.bind(n):t[e.handler];me(a)&&ut(l,a,e)}}function hr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:l,optionsCache:a,config:{optionMergeStrategies:i}}=e.appContext,r=a.get(t);let o;return r?o=r:!l.length&&!n&&!s?o=t:(o={},l.length&&l.forEach(u=>_l(o,u,i,!0)),_l(o,t,i)),Fe(t)&&a.set(t,o),o}function _l(e,t,n,s=!1){const{mixins:l,extends:a}=t;a&&_l(e,a,n,!0),l&&l.forEach(i=>_l(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const r=$u[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}const $u={data:mr,props:gr,emits:gr,methods:Ss,computed:Ss,beforeCreate:bt,created:bt,beforeMount:bt,mounted:bt,beforeUpdate:bt,updated:bt,beforeDestroy:bt,beforeUnmount:bt,destroyed:bt,unmounted:bt,activated:bt,deactivated:bt,errorCaptured:bt,serverPrefetch:bt,components:Ss,directives:Ss,watch:Mu,provide:mr,inject:Au};function mr(e,t){return t?e?function(){return et(me(e)?e.call(this,this):e,me(t)?t.call(this,this):t)}:t:e}function Au(e,t){return Ss($a(e),$a(t))}function $a(e){if(pe(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function bt(e,t){return e?[...new Set([].concat(e,t))]:t}function Ss(e,t){return e?et(Object.create(null),e,t):t}function gr(e,t){return e?pe(e)&&pe(t)?[...new Set([...e,...t])]:et(Object.create(null),fr(e),fr(t??{})):t}function Mu(e,t){if(!e)return t;if(!t)return e;const n=et(Object.create(null),e);for(const s in t)n[s]=bt(e[s],t[s]);return n}function yr(){return{app:null,config:{isNativeTag:ii,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Eu=0;function Fu(e,t){return function(s,l=null){me(s)||(s=et({},s)),l!=null&&!Fe(l)&&(l=null);const a=yr(),i=new WeakSet,r=[];let o=!1;const u=a.app={_uid:Eu++,_component:s,_props:l,_container:null,_context:a,_instance:null,version:cd,get config(){return a.config},set config(c){},use(c,...d){return i.has(c)||(c&&me(c.install)?(i.add(c),c.install(u,...d)):me(c)&&(i.add(c),c(u,...d))),u},mixin(c){return a.mixins.includes(c)||a.mixins.push(c),u},component(c,d){return d?(a.components[c]=d,u):a.components[c]},directive(c,d){return d?(a.directives[c]=d,u):a.directives[c]},mount(c,d,v){if(!o){const A=u._ceVNode||Ge(s,l);return A.appContext=a,v===!0?v="svg":v===!1&&(v=void 0),e(A,c,v),o=!0,u._container=c,c.__vue_app__=u,Al(A.component)}},onUnmount(c){r.push(c)},unmount(){o&&(Et(r,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return a.provides[c]=d,u},runWithContext(c){const d=Zn;Zn=u;try{return c()}finally{Zn=d}}};return u}}let Zn=null;const Iu=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${mt(t)}Modifiers`]||e[`${Mn(t)}Modifiers`];function Du(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Re;let l=n;const a=t.startsWith("update:"),i=a&&Iu(s,t.slice(7));i&&(i.trim&&(l=n.map(c=>Ve(c)?c.trim():c)),i.number&&(l=l.map(na)));let r,o=s[r=ta(t)]||s[r=ta(mt(t))];!o&&a&&(o=s[r=ta(Mn(t))]),o&&Et(o,e,6,l);const u=s[r+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,Et(u,e,6,l)}}const Pu=new WeakMap;function br(e,t,n=!1){const s=n?Pu:t.emitsCache,l=s.get(e);if(l!==void 0)return l;const a=e.emits;let i={},r=!1;if(!me(e)){const o=u=>{const c=br(u,t,!0);c&&(r=!0,et(i,c))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return!a&&!r?(Fe(e)&&s.set(e,null),null):(pe(a)?a.forEach(o=>i[o]=null):et(i,a),Fe(e)&&s.set(e,i),i)}function kl(e,t){return!e||!qs(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Me(e,t[0].toLowerCase()+t.slice(1))||Me(e,Mn(t))||Me(e,t))}function P_(){}function _r(e){const{type:t,vnode:n,proxy:s,withProxy:l,propsOptions:[a],slots:i,attrs:r,emit:o,render:u,renderCache:c,props:d,data:v,setupState:A,ctx:x,inheritAttrs:M}=e,w=cl(e);let O,y;try{if(n.shapeFlag&4){const C=l||s,B=C;O=Yt(u.call(B,C,c,d,A,v,x)),y=r}else{const C=t;O=Yt(C.length>1?C(d,{attrs:r,slots:i,emit:o}):C(d,null)),y=t.props?r:Ou(r)}}catch(C){cn.length=0,rl(C,e,1),O=Ge(dt)}let b=O;if(y&&M!==!1){const C=Object.keys(y),{shapeFlag:B}=b;C.length&&B&7&&(a&&C.some(Ws)&&(y=Ru(y,a)),b=Cn(b,y,!1,!0))}if(n.dirs&&(b=Cn(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition){const C=ul(b.type)&&vl(b)||b;Yn(C,n.transition)}return O=b,cl(w),O}function kr(e,t=!0){let n;for(let s=0;s<e.length;s++){const l=e[s];if(Qn(l)){if(l.type!==dt||l.children==="v-if"){if(n)return;n=l}}else return}return n}const Ou=e=>{let t;for(const n in e)(n==="class"||n==="style"||qs(n))&&((t||(t={}))[n]=e[n]);return t},Ru=(e,t)=>{const n={};for(const s in e)(!Ws(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Lu(e,t,n){const{props:s,children:l,component:a}=e,{props:i,children:r,patchFlag:o}=t,u=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&o>=0){if(o&1024)return!0;if(o&16)return s?Cr(s,i,u):!!i;if(o&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const v=c[d];if(Sr(i,s,v)&&!kl(u,v))return!0}}}else return(l||r)&&(!r||!r.$stable)?!0:s===i?!1:s?i?Cr(s,i,u):!0:!!i;return!1}function Cr(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let l=0;l<s.length;l++){const a=s[l];if(!Me(e,a)||Sr(t,e,a)&&!kl(n,a))return!0}return!1}function Sr(e,t,n){const s=e[n],l=t[n];return n==="style"&&Fe(s)&&Fe(l)?!Zs(s,l):s!==l}function Nu({vnode:e,parent:t,suspense:n},s){for(;t;){const l=t.subTree;if(l.suspense&&l.suspense.activeBranch===e&&(l.suspense.vnode.el=l.el=s,e=l),l===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const wr={},Tr=()=>Object.create(wr),xr=e=>Object.getPrototypeOf(e)===wr;function Vu(e,t,n,s=!1){const l={},a=Tr();e.propsDefaults=Object.create(null),$r(e,t,l,a);for(const i in e.propsOptions[0])i in l||(l[i]=void 0);n?e.props=s?l:Kc(l):e.type.props?e.props=l:e.props=a,e.attrs=a}function Bu(e,t,n,s){const{props:l,attrs:a,vnode:{patchFlag:i}}=e,r=xe(l),[o]=e.propsOptions;let u=!1;if((s||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let v=c[d];if(kl(e.emitsOptions,v))continue;const A=t[v];if(o)if(Me(a,v))A!==a[v]&&(a[v]=A,u=!0);else{const x=mt(v);l[x]=Aa(o,r,x,A,e,!1)}else A!==a[v]&&(a[v]=A,u=!0)}}}else{$r(e,t,l,a)&&(u=!0);let c;for(const d in r)(!t||!Me(t,d)&&((c=Mn(d))===d||!Me(t,c)))&&(o?n&&(n[d]!==void 0||n[c]!==void 0)&&(l[d]=Aa(o,r,d,void 0,e,!0)):delete l[d]);if(a!==r)for(const d in a)(!t||!Me(t,d))&&(delete a[d],u=!0)}u&&ln(e.attrs,"set","")}function $r(e,t,n,s){const[l,a]=e.propsOptions;let i=!1,r;if(t)for(let o in t){if(us(o))continue;const u=t[o];let c;l&&Me(l,c=mt(o))?!a||!a.includes(c)?n[c]=u:(r||(r={}))[c]=u:kl(e.emitsOptions,o)||(!(o in s)||u!==s[o])&&(s[o]=u,i=!0)}if(a){const o=xe(n),u=r||Re;for(let c=0;c<a.length;c++){const d=a[c];n[d]=Aa(l,o,d,u[d],e,!Me(u,d))}}return i}function Aa(e,t,n,s,l,a){const i=e[n];if(i!=null){const r=Me(i,"default");if(r&&s===void 0){const o=i.default;if(i.type!==Function&&!i.skipFactory&&me(o)){const{propsDefaults:u}=l;if(n in u)s=u[n];else{const c=xs(l);s=u[n]=o.call(null,t),c()}}else s=o;l.ce&&l.ce._setProp(n,s)}i[0]&&(a&&!r?s=!1:i[1]&&(s===""||s===Mn(n))&&(s=!0))}return s}const ju=new WeakMap;function Ar(e,t,n=!1){const s=n?ju:t.propsCache,l=s.get(e);if(l)return l;const a=e.props,i={},r=[];let o=!1;if(!me(e)){const c=d=>{o=!0;const[v,A]=Ar(d,t,!0);et(i,v),A&&r.push(...A)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!a&&!o)return Fe(e)&&s.set(e,An),An;if(pe(a))for(let c=0;c<a.length;c++){const d=mt(a[c]);Mr(d)&&(i[d]=Re)}else if(a)for(const c in a){const d=mt(c);if(Mr(d)){const v=a[c],A=i[d]=pe(v)||me(v)?{type:v}:et({},v),x=A.type;let M=!1,w=!0;if(pe(x))for(let O=0;O<x.length;++O){const y=x[O],b=me(y)&&y.name;if(b==="Boolean"){M=!0;break}else b==="String"&&(w=!1)}else M=me(x)&&x.name==="Boolean";A[0]=M,A[1]=w,(M||Me(A,"default"))&&r.push(d)}}const u=[i,r];return Fe(e)&&s.set(e,u),u}function Mr(e){return e[0]!=="$"&&!us(e)}const Ma=e=>e==="_"||e==="_ctx"||e==="$stable",Ea=e=>pe(e)?e.map(Yt):[Yt(e)],Ku=(e,t,n)=>{if(t._n)return t;const s=jt((...l)=>Ea(t(...l)),n);return s._c=!1,s},Er=(e,t,n)=>{const s=e._ctx;for(const l in e){if(Ma(l))continue;const a=e[l];if(me(a))t[l]=Ku(l,a,s);else if(a!=null){const i=Ea(a);t[l]=()=>i}}},Fr=(e,t)=>{const n=Ea(t);e.slots.default=()=>n},Ir=(e,t,n)=>{for(const s in t)(n||!Ma(s))&&(e[s]=t[s])},Uu=(e,t,n)=>{const s=e.slots=Tr();if(e.vnode.shapeFlag&32){const l=t._;l?(Ir(s,t,n),n&&di(s,"_",l,!0)):Er(t,s)}else t&&Fr(e,t)},Hu=(e,t,n)=>{const{vnode:s,slots:l}=e;let a=!0,i=Re;if(s.shapeFlag&32){const r=t._;r?n&&r===1?a=!1:Ir(l,t,n):(a=!t.$stable,Er(t,l)),i=t}else t&&(Fr(e,t),i={default:1});if(a)for(const r in l)!Ma(r)&&i[r]==null&&delete l[r]},_t=Yu;function qu(e){return Wu(e)}function Wu(e,t){const n=Xs();n.__VUE__=!0;const{insert:s,remove:l,patchProp:a,createElement:i,createText:r,createComment:o,setText:u,setElementText:c,parentNode:d,nextSibling:v,setScopeId:A=Ot,insertStaticContent:x}=e,M=(g,T,L,Y=null,N=null,z=null,te=void 0,ee=null,X=!!T.dynamicChildren)=>{if(g===T)return;g&&!On(g,T)&&(Y=Ce(g),qe(g,N,z,!0),g=null),T.patchFlag===-2&&(X=!1,T.dynamicChildren=null),T.dynamicChildren&&g&&g.dynamicChildren&&g.dynamicChildren.hasOnce&&(T.dynamicChildren===An&&(T.dynamicChildren=[]),T.dynamicChildren.hasOnce=!0);const{type:W,ref:ue,shapeFlag:Z}=T;switch(W){case Cl:w(g,T,L,Y);break;case dt:O(g,T,L,Y);break;case Sl:g==null&&y(T,L,Y,te);break;case le:S(g,T,L,Y,N,z,te,ee,X);break;default:Z&1?B(g,T,L,Y,N,z,te,ee,X):Z&6?G(g,T,L,Y,N,z,te,ee,X):(Z&64||Z&128)&&W.process(g,T,L,Y,N,z,te,ee,X,Ct)}ue!=null&&N?ks(ue,g&&g.ref,z,T||g,!T):ue==null&&g&&g.ref!=null&&ks(g.ref,null,z,g,!0)},w=(g,T,L,Y)=>{if(g==null)s(T.el=r(T.children),L,Y);else{const N=T.el=g.el;T.children!==g.children&&u(N,T.children)}},O=(g,T,L,Y)=>{g==null?s(T.el=o(T.children||""),L,Y):T.el=g.el},y=(g,T,L,Y)=>{[g.el,g.anchor]=x(g.children,T,L,Y,g.el,g.anchor)},b=({el:g,anchor:T},L,Y)=>{let N;for(;g&&g!==T;)N=v(g),s(g,L,Y),g=N;s(T,L,Y)},C=({el:g,anchor:T})=>{let L;for(;g&&g!==T;)L=v(g),l(g),g=L;l(T)},B=(g,T,L,Y,N,z,te,ee,X)=>{if(T.type==="svg"?te="svg":T.type==="math"&&(te="mathml"),g==null)D(T,L,Y,N,z,te,ee,X);else{const W=g.el&&g.el._isVueCE?g.el:null;try{W&&W._beginPatch(),R(g,T,N,z,te,ee,X)}finally{W&&W._endPatch()}}},D=(g,T,L,Y,N,z,te,ee)=>{let X,W;const{props:ue,shapeFlag:Z,transition:re,dirs:fe}=g;if(X=g.el=i(g.type,z,ue&&ue.is,ue),Z&8?c(X,g.children):Z&16&&q(g.children,X,null,Y,N,Fa(g,z),te,ee),fe&&In(g,null,Y,"created"),U(X,g,g.scopeId,te,Y),ue){for(const we in ue)we!=="value"&&!us(we)&&a(X,we,null,ue[we],z,Y);"value"in ue&&a(X,"value",null,ue.value,z),(W=ue.onVnodeBeforeMount)&&Jt(W,Y,g)}fe&&In(g,null,Y,"beforeMount");const be=Gu(N,re);be&&re.beforeEnter(X),s(X,T,L),((W=ue&&ue.onVnodeMounted)||be||fe)&&_t(()=>{try{W&&Jt(W,Y,g),be&&re.enter(X),fe&&In(g,null,Y,"mounted")}finally{}},N)},U=(g,T,L,Y,N)=>{if(L&&A(g,L),Y)for(let z=0;z<Y.length;z++)A(g,Y[z]);if(N){let z=N.subTree;if(T===z||Or(z.type)&&(z.ssContent===T||z.ssFallback===T)){const te=N.vnode;U(g,te,te.scopeId,te.slotScopeIds,N.parent)}}},q=(g,T,L,Y,N,z,te,ee,X=0)=>{for(let W=X;W<g.length;W++){const ue=g[W]=ee?un(g[W]):Yt(g[W]);M(null,ue,T,L,Y,N,z,te,ee)}},R=(g,T,L,Y,N,z,te)=>{const ee=T.el=g.el;let{patchFlag:X,dynamicChildren:W,dirs:ue}=T;X|=g.patchFlag&16;const Z=g.props||Re,re=T.props||Re;let fe;if(L&&Pn(L,!1),(fe=re.onVnodeBeforeUpdate)&&Jt(fe,L,T,g),ue&&In(T,g,L,"beforeUpdate"),L&&Pn(L,!0),W&&(!g.dynamicChildren||g.dynamicChildren.length!==W.length)&&(X=0,te=!1,W=null),(Z.innerHTML&&re.innerHTML==null||Z.textContent&&re.textContent==null)&&c(ee,""),W?j(g.dynamicChildren,W,ee,L,Y,Fa(T,N),z):te||ce(g,T,ee,null,L,Y,Fa(T,N),z,!1),X>0){if(X&16)J(ee,Z,re,L,N);else if(X&2&&Z.class!==re.class&&a(ee,"class",null,re.class,N),X&4&&a(ee,"style",Z.style,re.style,N),X&8){const be=T.dynamicProps;for(let we=0;we<be.length;we++){const Te=be[we],De=Z[Te],Ye=re[Te];(Ye!==De||Te==="value")&&a(ee,Te,De,Ye,N,L)}}X&1&&g.children!==T.children&&c(ee,T.children)}else!te&&W==null&&J(ee,Z,re,L,N);((fe=re.onVnodeUpdated)||ue)&&_t(()=>{fe&&Jt(fe,L,T,g),ue&&In(T,g,L,"updated")},Y)},j=(g,T,L,Y,N,z,te)=>{for(let ee=0;ee<T.length;ee++){const X=g[ee],W=T[ee],ue=X.el||Da(X),Z=ue&&(X.type===le||!On(X,W)||X.shapeFlag&198)?d(ue):L;M(X,W,Z,null,Y,N,z,te,!0)}},J=(g,T,L,Y,N)=>{if(T!==L){if(T!==Re)for(const z in T)!us(z)&&!(z in L)&&a(g,z,T[z],null,N,Y);for(const z in L){if(us(z))continue;const te=L[z],ee=T[z];te!==ee&&z!=="value"&&a(g,z,ee,te,N,Y)}"value"in L&&a(g,"value",T.value,L.value,N)}},S=(g,T,L,Y,N,z,te,ee,X)=>{const W=T.el=g?g.el:r(""),ue=T.anchor=g?g.anchor:r("");let{patchFlag:Z,dynamicChildren:re,slotScopeIds:fe}=T;fe&&(ee=ee?ee.concat(fe):fe),g==null?(s(W,L,Y),s(ue,L,Y),q(T.children||[],L,ue,N,z,te,ee,X)):Z>0&&Z&64&&re&&g.dynamicChildren&&g.dynamicChildren.length===re.length?(j(g.dynamicChildren,re,L,N,z,te,ee),(T.key!=null||N&&T===N.subTree)&&Ia(g,T,!0)):ce(g,T,L,ue,N,z,te,ee,X)},G=(g,T,L,Y,N,z,te,ee,X)=>{T.slotScopeIds=ee,g==null?T.shapeFlag&512?N.ctx.activate(T,L,Y,te,X):he(T,L,Y,N,z,te,X):Le(g,T,X)},he=(g,T,L,Y,N,z,te)=>{const ee=g.component=ed(g,Y,N);if(hl(g)&&(ee.ctx.renderer=Ct),td(ee,!1,te),ee.asyncDep){if(N&&N.registerDep(ee,Ie,te,z),!g.el){const X=ee.subTree=Ge(dt);O(null,X,T,L),g.placeholder=X.el}}else Ie(ee,g,T,L,N,z,te)},Le=(g,T,L)=>{const Y=T.component=g.component;if(Lu(g,T,L))if(Y.asyncDep&&!Y.asyncResolved){T.el=g.el,T.placeholder=g.placeholder,$e(Y,T,L);return}else Y.next=T,Y.update();else T.el=g.el,T.placeholder=g.placeholder,Y.vnode=T},Ie=(g,T,L,Y,N,z,te)=>{const ee=()=>{if(g.isMounted){let{next:Z,bu:re,u:fe,parent:be,vnode:we}=g;{const ft=Dr(g);if(ft){Z&&(Z.el=we.el,$e(g,Z,te)),ft.asyncDep.then(()=>{_t(()=>{g.isUnmounted||W()},N)});return}}let Te=Z,De;Pn(g,!1),Z?(Z.el=we.el,$e(g,Z,te)):Z=we,re&&Js(re),(De=Z.props&&Z.props.onVnodeBeforeUpdate)&&Jt(De,be,Z,we),Pn(g,!0);const Ye=_r(g),ht=g.subTree;g.subTree=Ye,M(ht,Ye,d(ht.el),Ce(ht),g,N,z),Z.el=Ye.el,Te===null&&Nu(g,Ye.el),fe&&_t(fe,N),(De=Z.props&&Z.props.onVnodeUpdated)&&_t(()=>Jt(De,be,Z,we),N)}else{let Z;const{el:re,props:fe}=T,{bm:be,m:we,parent:Te,root:De,type:Ye}=g,ht=Jn(T);Pn(g,!1),be&&Js(be),!ht&&(Z=fe&&fe.onVnodeBeforeMount)&&Jt(Z,Te,T),Pn(g,!0);{De.ce&&De.ce._hasShadowRoot()&&De.ce._injectChildStyle(Ye,g.parent?g.parent.type:void 0);const ft=g.subTree=_r(g);M(null,ft,L,Y,g,N,z),T.el=ft.el}if(we&&_t(we,N),!ht&&(Z=fe&&fe.onVnodeMounted)){const ft=T;_t(()=>Jt(Z,Te,ft),N)}(T.shapeFlag&256||Te&&Jn(Te.vnode)&&Te.vnode.shapeFlag&256)&&g.a&&_t(g.a,N),g.isMounted=!0,T=L=Y=null}};g.scope.on();const X=g.effect=new yi(ee);g.scope.off();const W=g.update=X.run.bind(X),ue=g.job=X.runIfDirty.bind(X);ue.i=g,ue.id=g.uid,X.scheduler=()=>ya(ue),Pn(g,!0),W()},$e=(g,T,L)=>{T.component=g;const Y=g.vnode.props;g.vnode=T,g.next=null,Bu(g,T.props,Y,L),Hu(g,T.children,L),Nt(),Ui(g),Vt()},ce=(g,T,L,Y,N,z,te,ee,X=!1)=>{const W=g&&g.children,ue=g?g.shapeFlag:0,Z=T.children,{patchFlag:re,shapeFlag:fe}=T;if(re>0){if(re&128){Xe(W,Z,L,Y,N,z,te,ee,X);return}else if(re&256){Se(W,Z,L,Y,N,z,te,ee,X);return}}fe&8?(ue&16&&kt(W,N,z),Z!==W&&c(L,Z)):ue&16?fe&16?Xe(W,Z,L,Y,N,z,te,ee,X):kt(W,N,z,!0):(ue&8&&c(L,""),fe&16&&q(Z,L,Y,N,z,te,ee,X))},Se=(g,T,L,Y,N,z,te,ee,X)=>{g=g||An,T=T||An;const W=g.length,ue=T.length,Z=Math.min(W,ue);let re;for(re=0;re<Z;re++){const fe=T[re]=X?un(T[re]):Yt(T[re]);M(g[re],fe,L,null,N,z,te,ee,X)}W>ue?kt(g,N,z,!0,!1,Z):q(T,L,Y,N,z,te,ee,X,Z)},Xe=(g,T,L,Y,N,z,te,ee,X)=>{let W=0;const ue=T.length;let Z=g.length-1,re=ue-1;for(;W<=Z&&W<=re;){const fe=g[W],be=T[W]=X?un(T[W]):Yt(T[W]);if(On(fe,be))M(fe,be,L,null,N,z,te,ee,X);else break;W++}for(;W<=Z&&W<=re;){const fe=g[Z],be=T[re]=X?un(T[re]):Yt(T[re]);if(On(fe,be))M(fe,be,L,null,N,z,te,ee,X);else break;Z--,re--}if(W>Z){if(W<=re){const fe=re+1,be=fe<ue?T[fe].el:Y;for(;W<=re;)M(null,T[W]=X?un(T[W]):Yt(T[W]),L,be,N,z,te,ee,X),W++}}else if(W>re)for(;W<=Z;)qe(g[W],N,z,!0),W++;else{const fe=W,be=W,we=new Map;for(W=be;W<=re;W++){const tt=T[W]=X?un(T[W]):Yt(T[W]);tt.key!=null&&we.set(tt.key,W)}let Te,De=0;const Ye=re-be+1;let ht=!1,ft=0;const Zt=new Array(Ye);for(W=0;W<Ye;W++)Zt[W]=0;for(W=fe;W<=Z;W++){const tt=g[W];if(De>=Ye){qe(tt,N,z,!0);continue}let nt;if(tt.key!=null)nt=we.get(tt.key);else for(Te=be;Te<=re;Te++)if(Zt[Te-be]===0&&On(tt,T[Te])){nt=Te;break}nt===void 0?qe(tt,N,z,!0):(Zt[nt-be]=W+1,nt>=ft?ft=nt:ht=!0,M(tt,T[nt],L,null,N,z,te,ee,X),De++)}const Qt=ht?zu(Zt):An;for(Te=Qt.length-1,W=Ye-1;W>=0;W--){const tt=be+W,nt=T[tt],Ut=T[tt+1],en=tt+1<ue?Ut.el||Da(Ut):Y;Zt[W]===0?M(null,nt,L,en,N,z,te,ee,X):ht&&(Te<0||W!==Qt[Te]?ze(nt,L,en,2):Te--)}}},ze=(g,T,L,Y,N=null)=>{const{el:z,type:te,transition:ee,children:X,shapeFlag:W}=g;if(W&6){ze(g.component.subTree,T,L,Y);return}if(W&128){g.suspense.move(T,L,Y);return}if(W&64){te.move(g,T,L,Ct);return}if(te===le){s(z,T,L);for(let Z=0;Z<X.length;Z++)ze(X[Z],T,L,Y);s(g.anchor,T,L);return}if(te===Sl){b(g,T,L);return}if(Y!==2&&W&1&&ee)if(Y===0)ee.persisted&&!z[Ft]?s(z,T,L):(ee.beforeEnter(z),s(z,T,L),_t(()=>ee.enter(z),N));else{const{leave:Z,delayLeave:re,afterLeave:fe}=ee,be=()=>{g.ctx.isUnmounted?l(z):s(z,T,L)},we=()=>{const Te=z._isLeaving||!!z[Ft];z._isLeaving&&z[Ft](!0),ee.persisted&&!Te?be():Z(z,()=>{be(),fe&&fe()})};re?re(z,be,we):we()}else s(z,T,L)},qe=(g,T,L,Y=!1,N=!1)=>{const{type:z,props:te,ref:ee,children:X,dynamicChildren:W,shapeFlag:ue,patchFlag:Z,dirs:re,cacheIndex:fe,memo:be}=g;if((Z===-2||W&&W.hasOnce)&&(N=!1),ee!=null&&(Nt(),ks(ee,null,L,g,!0),Vt()),fe!=null&&(!g.ctx||g.ctx===T)&&(T.renderCache[fe]=void 0),ue&256){T.ctx.deactivate(g);return}const we=ue&1&&re,Te=!Jn(g);let De;if(Te&&(De=te&&te.onVnodeBeforeUnmount)&&Jt(De,T,g),ue&6)Xt(g.component,L,Y);else{if(ue&128){g.suspense.unmount(L,Y);return}we&&In(g,null,T,"beforeUnmount"),ue&64?g.type.remove(g,T,L,Ct,Y):W&&!W.hasOnce&&(z!==le||Z>0&&Z&64)?kt(W,T,L,!1,!0):(z===le&&Z&384||!N&&ue&16)&&kt(X,T,L),Y&&Ue(g)}const Ye=be!=null&&fe==null;(Te&&(De=te&&te.onVnodeUnmounted)||we||Ye)&&_t(()=>{De&&Jt(De,T,g),we&&In(g,null,T,"unmounted"),Ye&&(g.el=null)},L)},Ue=g=>{const{type:T,el:L,anchor:Y,transition:N}=g,z=T===le;if(z&&!N){xt(L,Y);return}if(T===Sl){C(g),N&&!N.persisted&&N.afterLeave&&N.afterLeave();return}const te=z?_s(g):g,ee=()=>{z?d(L)&&xt(L,Y):l(L),N&&!N.persisted&&N.afterLeave&&N.afterLeave()};if(te&&te.shapeFlag&1&&N&&!N.persisted){const{leave:X,delayLeave:W}=N,ue=te.el,Z=()=>X(ue,ee);W?W(ue,ee,Z):Z()}else ee()},xt=(g,T)=>{let L;for(;g!==T;)L=v(g),l(g),g=L;l(T)},Xt=(g,T,L)=>{const{bum:Y,scope:N,job:z,subTree:te,um:ee,m:X,a:W}=g;Pr(X),Pr(W),Y&&Js(Y),N.stop(),z?(z.flags|=8,qe(te,g,T,L)):g.vnode.el&&te&&(te.transition=g.vnode.transition,qe(te,g,T,L)),ee&&_t(ee,T),_t(()=>{g.isUnmounted=!0},T)},kt=(g,T,L,Y=!1,N=!1,z=0)=>{for(let te=z;te<g.length;te++)qe(g[te],T,L,Y,N)},Ce=g=>{if(g.shapeFlag&6)return Ce(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const T=v(g.anchor||g.el),L=T&&T[Ji];return L?v(L):T},P=(g,T,L)=>{const Y=g&&T._vnode?void 0:g&&g.component?g.component.uid:Qu();su(()=>{g==null?T._vnode&&qe(T._vnode,null,null,!0):M(T._vnode||null,g,T,null,null,null,L),T._vnode=g},Y)},Ct={p:M,um:qe,m:ze,r:Ue,mt:he,mc:q,pc:ce,pbc:j,n:Ce,o:e};return{render:P,hydrate:void 0,createApp:Fu(P)}}function Fa({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Pn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Gu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ia(e,t,n=!1){const s=e.children,l=t.children;if(pe(s)&&pe(l))for(let a=0;a<s.length;a++){const i=s[a];let r=l[a];r.shapeFlag&1&&!r.dynamicChildren&&((r.patchFlag<=0||r.patchFlag===32)&&(r=l[a]=un(l[a]),r.el=i.el),!n&&r.patchFlag!==-2&&Ia(i,r)),r.type===Cl&&(r.patchFlag===-1&&(r=l[a]=un(r)),r.el=i.el),r.type===dt&&!r.el&&(r.el=i.el)}}function zu(e){const t=e.slice(),n=[0];let s,l,a,i,r;const o=e.length;for(s=0;s<o;s++){const u=e[s];if(u!==0){if(l=n[n.length-1],e[l]<u){t[s]=l,n.push(s);continue}for(a=0,i=n.length-1;a<i;)r=a+i>>1,e[n[r]]<u?a=r+1:i=r;u<e[n[a]]&&(a>0&&(t[s]=n[a-1]),n[a]=s)}}for(a=n.length,i=n[a-1];a-- >0;)n[a]=i,i=t[i];return n}function Dr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Dr(t)}function Pr(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Da(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Da(t.subTree):null}const Or=e=>e.__isSuspense;function Yu(e,t){t&&t.pendingBranch?pe(e)?t.effects.push(...e):t.effects.push(e):Ki(e)}const le=Symbol.for("v-fgt"),Cl=Symbol.for("v-txt"),dt=Symbol.for("v-cmt"),Sl=Symbol.for("v-stc"),cn=[];let Tt=null;function p(e=!1){cn.push(Tt=e?null:[])}function Pa(){cn.pop(),Tt=cn[cn.length-1]||null}let ws=1;function wl(e,t=!1){ws+=e,e<0&&Tt&&t&&(Tt.hasOnce=!0)}function Rr(e){return e.dynamicChildren=ws>0?Tt||An:null,Pa(),ws>0&&Tt&&Tt.push(e),e}function h(e,t,n,s,l,a){return Rr(f(e,t,n,s,l,a,!0))}function st(e,t,n,s,l){return Rr(Ge(e,t,n,s,l,!0))}function Qn(e){return e?e.__v_isVNode===!0:!1}function On(e,t){return e.type===t.type&&e.key===t.key}const Lr=({key:e})=>e??null,Tl=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ve(e)||ot(e)||me(e)?{i:ct,r:e,k:t,f:!!n}:e:null);function f(e,t=null,n=null,s=0,l=null,a=e===le?0:1,i=!1,r=!1){const o={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Lr(t),ref:t&&Tl(t),scopeId:Wi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:s,dynamicProps:l,dynamicChildren:null,appContext:null,ctx:ct};return r?(xl(o,n),a&128&&e.normalize(o)):n&&(o.shapeFlag|=Ve(n)?8:16),ws>0&&!i&&Tt&&(o.patchFlag>0||a&6)&&o.patchFlag!==32&&Tt.push(o),o}const Ge=Ju;function Ju(e,t=null,n=null,s=0,l=null,a=!1){if((!e||e===or)&&(e=dt),Qn(e)){const r=Cn(e,t,!0);return n&&xl(r,n),ws>0&&!a&&Tt&&(r.shapeFlag&6?Tt[Tt.indexOf(e)]=r:Tt.push(r)),r.patchFlag=-2,r}if(rd(e)&&(e=e.__vccOpts),t){t=Xu(t);let{class:r,style:o}=t;r&&!Ve(r)&&(t.class=se(r)),Fe(o)&&(ma(o)&&!pe(o)&&(o=et({},o)),t.style=$t(o))}const i=Ve(e)?1:Or(e)?128:ul(e)?64:Fe(e)?4:me(e)?2:0;return f(e,t,n,s,l,i,a,!0)}function Xu(e){return e?ma(e)||xr(e)?et({},e):e:null}function Cn(e,t,n=!1,s=!1){const{props:l,ref:a,patchFlag:i,children:r,transition:o}=e,u=t?Nr(l||{},t):l,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Lr(u),ref:t&&t.ref?n&&a?pe(a)?a.concat(Tl(t)):[a,Tl(t)]:Tl(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==le?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:o,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Cn(e.ssContent),ssFallback:e.ssFallback&&Cn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return o&&s&&Yn(c,o.clone(c)),c}function Je(e=" ",t=0){return Ge(Cl,null,e,t)}function V(e="",t=!1){return t?(p(),st(dt,null,e)):Ge(dt,null,e)}function Yt(e){return e==null||typeof e=="boolean"?Ge(dt):pe(e)?Ge(le,null,e.slice()):Qn(e)?un(e):Ge(Cl,null,String(e))}function un(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Cn(e)}function xl(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(pe(t))n=16;else if(typeof t=="object")if(s&65){const l=t.default;l&&(l._c&&(l._d=!1),xl(e,l()),l._c&&(l._d=!0));return}else{n=32;const l=t._;!l&&!xr(t)?t._ctx=ct:l===3&&ct&&(ct.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(me(t)){if(s&65){xl(e,{default:t});return}t={default:t,_ctx:ct},n=32}else t=String(t),s&64?(n=16,t=[Je(t)]):n=8;e.children=t,e.shapeFlag|=n}function Nr(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const l in s)if(l==="class")t.class!==s.class&&(t.class=se([t.class,s.class]));else if(l==="style")t.style=$t([t.style,s.style]);else if(qs(l)){const a=t[l],i=s[l];i&&a!==i&&!(pe(a)&&a.includes(i))?t[l]=a?[].concat(a,i):i:i==null&&a==null&&!Ws(l)&&(t[l]=i)}else l!==""&&(t[l]=s[l])}return t}function Jt(e,t,n,s=null){Et(e,t,7,[n,s])}const Zu=yr();let Vr=0;function Qu(){return Vr}function ed(e,t,n){const s=e.type,l=(t?t.appContext:e.appContext)||Zu,a={uid:Vr++,vnode:e,type:s,parent:t,appContext:l,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new wc(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(l.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ar(s,l),emitsOptions:br(s,l),emit:null,emitted:null,propsDefaults:Re,inheritAttrs:s.inheritAttrs,ctx:Re,data:Re,props:Re,attrs:Re,slots:Re,refs:Re,setupState:Re,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=Du.bind(null,a),e.ce&&e.ce(a),a}let pt=null;const Oa=()=>pt||ct;let $l,Ts;{const e=Xs(),t=(n,s)=>{let l;return(l=e[n])||(l=e[n]=[]),l.push(s),a=>{l.length>1?l.forEach(i=>i(a)):l[0](a)}};$l=t("__VUE_INSTANCE_SETTERS__",n=>pt=n),Ts=t("__VUE_SSR_SETTERS__",n=>$s=n)}const xs=e=>{const t=pt;return $l(e),e.scope.on(),()=>{e.scope.off(),$l(t)}},Br=()=>{pt&&pt.scope.off(),$l(null)};function jr(e){return e.vnode.shapeFlag&4}let $s=!1;function td(e,t=!1,n=!1){t&&Ts(t);const{props:s,children:l}=e.vnode,a=jr(e);Vu(e,s,a,t),Uu(e,l,n||t);const i=a?nd(e,t):void 0;return t&&Ts(!1),i}function nd(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,wu);const{setup:s}=n;if(s){Nt();const l=e.setupContext=s.length>1?ld(e):null,a=xs(e),i=Wn(s,e,0,[e.props,l]),r=oi(i);if(Vt(),a(),(r||e.sp)&&!Jn(e)&&sr(e),r){if(i.then(Br,Br),t)return i.then(o=>{Ts(!0);try{Kr(e,o,t)}finally{Ts(!1)}}).catch(o=>{rl(o,e,0)});e.asyncDep=i}else Kr(e,i)}else Ur(e)}function Kr(e,t,n){me(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Fe(t)&&(e.setupState=Ni(t)),Ur(e)}function Ur(e,t,n){const s=e.type;e.render||(e.render=s.render||Ot);{const l=xs(e);Nt();try{Tu(e)}finally{Vt(),l()}}}const sd={get(e,t){return vt(e,"get",""),e[t]}};function ld(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,sd),slots:e.slots,emit:e.emit,expose:t}}function Al(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ni(Uc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Cs)return Cs[n](e)},has(t,n){return n in t||n in Cs}})):e.proxy}const ad=/(?:^|[-_])\w/g,id=e=>e.replace(ad,t=>t.toUpperCase()).replace(/[-_]/g,"");function Hr(e,t=!0){return me(e)?e.displayName||e.name:e.name||t&&e.__name}function qr(e,t,n=!1){let s=Hr(t);if(!s&&t.__file){const l=t.__file.match(/([^/\\]+)\.\w+$/);l&&(s=l[1])}if(!s&&e){const l=a=>{for(const i in a)if(a[i]===t)return i};s=l(e.components)||e.parent&&l(e.parent.type.components)||l(e.appContext.components)}return s?id(s):n?"App":"Anonymous"}function rd(e){return me(e)&&"__vccOpts"in e}const E=(e,t)=>zc(e,t,$s);function od(e,t,n){try{wl(-1);const s=arguments.length;return s===2?Fe(t)&&!pe(t)?Qn(t)?Ge(e,null,[t]):Ge(e,t):Ge(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Qn(n)&&(n=[n]),Ge(e,t,n))}finally{wl(1)}}const cd="3.5.44";/**
17
17
  * @vue/runtime-dom v3.5.44
18
18
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
19
19
  * @license MIT
20
- **/let Ra;const Wr=typeof window<"u"&&window.trustedTypes;if(Wr)try{Ra=Wr.createPolicy("vue",{createHTML:e=>e})}catch{}const Gr=Ra?e=>Ra.createHTML(e):e=>e,ud="http://www.w3.org/2000/svg",dd="http://www.w3.org/1998/Math/MathML",dn=typeof document<"u"?document:null,zr=dn&&dn.createElement("template"),fd={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const l=t==="svg"?dn.createElementNS(ud,e):t==="mathml"?dn.createElementNS(dd,e):n?dn.createElement(e,{is:n}):dn.createElement(e);return e==="select"&&s&&s.multiple!=null&&l.setAttribute("multiple",s.multiple),l},createText:e=>dn.createTextNode(e),createComment:e=>dn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>dn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,l,a){const i=n?n.previousSibling:t.lastChild;if(l&&(l===a||l.nextSibling))for(;t.insertBefore(l.cloneNode(!0),n),!(l===a||!(l=l.nextSibling)););else{zr.innerHTML=Gr(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const r=zr.content;if(s==="svg"||s==="mathml"){const o=r.firstChild;for(;o.firstChild;)r.appendChild(o.firstChild);r.removeChild(o)}t.insertBefore(r,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Sn="transition",As="animation",Ms=Symbol("_vtc"),Yr={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},vd=et({},Qi,Yr),Es=(e=>(e.displayName="Transition",e.props=vd,e))((e,{slots:t})=>od(fu,pd(e),t)),Rn=(e,t=[])=>{ve(e)?e.forEach(n=>n(...t)):e&&e(...t)},Jr=e=>e?ve(e)?e.some(t=>t.length>1):e.length>1:!1;function pd(e){const t={};for(const S in e)S in Yr||(t[S]=e[S]);if(e.css===!1)return t;const{name:n="v",type:s,duration:l,enterFromClass:a=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:r=`${n}-enter-to`,appearFromClass:o=a,appearActiveClass:u=i,appearToClass:c=r,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:v=`${n}-leave-active`,leaveToClass:$=`${n}-leave-to`}=e,x=hd(l),A=x&&x[0],w=x&&x[1],{onBeforeEnter:O,onEnter:y,onEnterCancelled:b,onLeave:C,onLeaveCancelled:B,onBeforeAppear:D=O,onAppear:U=y,onAppearCancelled:q=b}=t,R=(S,G,he,Le)=>{S._enterCancelled=Le,Ln(S,G?c:r),Ln(S,G?u:i),he&&he()},j=(S,G)=>{S._isLeaving=!1,Ln(S,d),Ln(S,$),Ln(S,v),G&&G()},J=S=>(G,he)=>{const Le=S?U:y,Ie=()=>R(G,S,he);Rn(Le,[G,Ie]),Xr(()=>{Ln(G,S?o:a),fn(G,S?c:r),Jr(Le)||Zr(G,s,A,Ie)})};return et(t,{onBeforeEnter(S){Rn(O,[S]),fn(S,a),fn(S,i)},onBeforeAppear(S){Rn(D,[S]),fn(S,o),fn(S,u)},onEnter:J(!1),onAppear:J(!0),onLeave(S,G){S._isLeaving=!0;const he=()=>j(S,G);fn(S,d),S._enterCancelled?(fn(S,v),to(S)):(to(S),fn(S,v)),Xr(()=>{S._isLeaving&&(Ln(S,d),fn(S,$),Jr(C)||Zr(S,s,w,he))}),Rn(C,[S,he])},onEnterCancelled(S){R(S,!1,void 0,!0),Rn(b,[S])},onAppearCancelled(S){R(S,!0,void 0,!0),Rn(q,[S])},onLeaveCancelled(S){j(S),Rn(B,[S])}})}function hd(e){if(e==null)return null;if(Ee(e))return[La(e.enter),La(e.leave)];{const t=La(e);return[t,t]}}function La(e){return hc(e)}function fn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ms]||(e[Ms]=new Set)).add(t)}function Ln(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Ms];n&&(n.delete(t),n.size||(e[Ms]=void 0))}function Xr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let md=0;function Zr(e,t,n,s){const l=e._endId=++md,a=()=>{l===e._endId&&s()};if(n!=null)return setTimeout(a,n);const{type:i,timeout:r,propCount:o}=gd(e,t);if(!i)return s();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,v),a()},v=$=>{$.target===e&&++c>=o&&d()};setTimeout(()=>{c<o&&d()},r+1),e.addEventListener(u,v)}function gd(e,t){const n=window.getComputedStyle(e),s=x=>(n[x]||"").split(", "),l=s(`${Sn}Delay`),a=s(`${Sn}Duration`),i=Qr(l,a),r=s(`${As}Delay`),o=s(`${As}Duration`),u=Qr(r,o);let c=null,d=0,v=0;t===Sn?i>0&&(c=Sn,d=i,v=a.length):t===As?u>0&&(c=As,d=u,v=o.length):(d=Math.max(i,u),c=d>0?i>u?Sn:As:null,v=c?c===Sn?a.length:o.length:0);const $=c===Sn&&/\b(?:transform|all)(?:,|$)/.test(s(`${Sn}Property`).toString());return{type:c,timeout:d,propCount:v,hasTransform:$}}function Qr(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>eo(n)+eo(e[s])))}function eo(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function to(e){return(e?e.ownerDocument:document).body.offsetHeight}function yd(e,t,n){const s=e[Ms];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ml=Symbol("_vod"),no=Symbol("_vsh"),bd={name:"show",beforeMount(e,{value:t},{transition:n}){e[Ml]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Fs(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Fs(e,!0),s.enter(e)):s.leave(e,()=>{Fs(e,!1)}):Fs(e,t))},beforeUnmount(e,{value:t}){Fs(e,t)}};function Fs(e,t){e.style.display=t?e[Ml]:"none",e[no]=!t}const so=Symbol("");function _d(e){const t=Oa();if(!t)return;const n=t.ut=(l=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(a=>El(a,l))},s=()=>{const l=e(t.proxy);t.ce?El(t.ce,l):Na(t.subTree,l),n(l)};rr(()=>{Ki(s)}),gl(()=>{ut(s,Ot,{flush:"post"});const l=new MutationObserver(s);l.observe(t.subTree.el.parentNode,{childList:!0}),bl(()=>l.disconnect())})}function Na(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Na(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)El(e.el,t);else if(e.type===le)e.children.forEach(n=>Na(n,t));else if(e.type===Sl){let{el:n,anchor:s}=e;for(;n&&(El(n,t),n!==s);)n=n.nextSibling}}function El(e,t){if(e.nodeType===1){const n=e.style;let s="";for(const l in t){const a=Sc(t[l]);n.setProperty(`--${l}`,a),s+=`--${l}: ${a};`}n[so]=s}}const kd=/(?:^|;)\s*display\s*:/;function Cd(e,t,n){const s=e.style,l=Ve(n);let a=!1;if(n&&!l){if(t)if(Ve(t))for(const i of t.split(";")){const r=i.slice(0,i.indexOf(":")).trim();n[r]==null&&Is(s,r,"")}else for(const i in t)n[i]==null&&Is(s,i,"");for(const i in n){i==="display"&&(a=!0);const r=n[i];r!=null?wd(e,i,!Ve(t)&&t?t[i]:void 0,r)||Is(s,i,r):Is(s,i,"")}}else if(l){if(t!==n){const i=s[so];i&&(n+=";"+i),s.cssText=n,a=kd.test(n)}}else t&&e.removeAttribute("style");Ml in e&&((!l||t!==n)&&(e[Ml]=a?s.display:""),e[no]&&(s.display="none"))}const Fl=/\s*!important$/;function Is(e,t,n){if(ve(n))n.forEach(s=>Is(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))Fl.test(n)?e.setProperty(t,n.replace(Fl,""),"important"):e.setProperty(t,n);else{const s=Sd(e,t);Fl.test(n)?e.setProperty(Mn(s),n.replace(Fl,""),"important"):e[s]=n}}const lo=["Webkit","Moz","ms"],Va={};function Sd(e,t){const n=Va[t];if(n)return n;let s=mt(t);if(s!=="filter"&&s in e)return Va[t]=s;s=Ys(s);for(let l=0;l<lo.length;l++){const a=lo[l]+s;if(a in e)return Va[t]=a}return t}function wd(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Ve(s)&&n===s}const ao="http://www.w3.org/1999/xlink";function io(e,t,n,s,l,a=_c(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ao,t.slice(6,t.length)):e.setAttributeNS(ao,t,n):n==null||a&&!vi(n)?e.removeAttribute(t):e.setAttribute(t,a?"":Rt(n)?String(n):n)}function ro(e,t,n,s,l){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Gr(n):n);return}const a=e.tagName;if(t==="value"&&a!=="PROGRESS"&&!a.includes("-")){const r=a==="OPTION"?e.getAttribute("value")||"":e.value,o=n==null?e.type==="checkbox"?"on":"":String(n);(r!==o||!("_value"in e))&&(e.value=o),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const r=typeof e[t];r==="boolean"?n=vi(n):n==null&&r==="string"?(n="",i=!0):r==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(l||t)}function es(e,t,n,s){e.addEventListener(t,n,s)}function Td(e,t,n,s){e.removeEventListener(t,n,s)}const oo=Symbol("_vei");function xd(e,t,n,s,l=null){const a=e[oo]||(e[oo]={}),i=a[t];if(s&&i)i.value=s;else{const[r,o]=Md(t);if(s){const u=a[t]=Id(s,l);es(e,r,u,o)}else i&&(Td(e,r,i,o),a[t]=void 0)}}const $d=/(Once|Passive|Capture)$/,Ad=/^on:?(?:Once|Passive|Capture)$/;function Md(e){let t,n;for(;(n=e.match($d))&&!Ad.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Mn(e.slice(2)),t]}let Ba=0;const Ed=Promise.resolve(),Fd=()=>Ba||(Ed.then(()=>Ba=0),Ba=Date.now());function Id(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const l=n.value;if(ve(l)){const a=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{a.call(s),s._stopped=!0};const i=l.slice(),r=[s];for(let o=0;o<i.length&&!s._stopped;o++){const u=i[o];u&&Et(u,t,5,r)}}else Et(l,t,5,[s])};return n.value=e,n.attached=Fd(),n}const co=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Dd=(e,t,n,s,l,a)=>{const i=l==="svg";t==="class"?yd(e,s,i):t==="style"?Cd(e,n,s):qs(t)?Ws(t)||xd(e,t,n,s,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Pd(e,t,s,i))?(ro(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&io(e,t,s,i,a,t!=="value")):e._isVueCE&&(Od(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ve(s)))?ro(e,mt(t),s,a,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),io(e,t,s,i))};function Pd(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&co(t)&&me(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const l=e.tagName;if(l==="IMG"||l==="VIDEO"||l==="CANVAS"||l==="SOURCE")return!1}return co(t)&&Ve(n)?!1:t in e}function Od(e,t){const n=e._def.props;if(!n)return!1;const s=mt(t);return Array.isArray(n)?n.some(l=>mt(l)===s):Object.keys(n).some(l=>mt(l)===s)}const uo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ve(t)?n=>Js(t,n):t};function Rd(e){e.target.composing=!0}function fo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Il=Symbol("_assign"),Dl=Symbol("_initialValue");function ja(e,t,n){return t&&(e=e.trim()),n&&(e=na(e)),e}const Ld={created(e,{modifiers:{lazy:t,trim:n,number:s}},l){e.parentNode&&(e.type==="text"?e[Dl]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Dl]=e.defaultValue.replace(/\r\n?/g,`
21
- `))),e[Il]=uo(l);const a=s||l.props&&l.props.type==="number";es(e,t?"change":"input",i=>{i.target.composing||e[Il](ja(e.value,n,a))}),(n||a)&&es(e,"change",()=>{e.value=ja(e.value,n,a)}),t||(es(e,"compositionstart",Rd),es(e,"compositionend",fo),es(e,"change",fo))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const l=t??"",a=e[Dl];delete e[Dl],a!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==a?e[Il](ja(e.value,n,s)):e.value=l},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:l,number:a}},i){if(e[Il]=uo(i),e.composing)return;const r=(a||e.type==="number")&&!/^0\d/.test(e.value)?na(e.value):e.value,o=t??"";if(r===o)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(s&&t===n||l&&e.value.trim()===o)||(e.value=o)}},Nd=["ctrl","shift","alt","meta"],Vd={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Nd.some(n=>e[`${n}Key`]&&!t.includes(n))},lt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(l,...a)=>{for(let i=0;i<t.length;i++){const r=Vd[t[i]];if(r&&r(l,t))return}return e(l,...a)})},Bd=et({patchProp:Dd},fd);let vo;function jd(){return vo||(vo=qu(Bd))}const Kd=(...e)=>{const t=jd().createApp(...e),{mount:n}=t;return t.mount=s=>{const l=Hd(s);if(!l)return;const a=t._component;!me(a)&&!a.render&&!a.template&&(a.template=l.innerHTML),l.nodeType===1&&(l.textContent="");const i=n(l,!1,Ud(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),i},t};function Ud(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Hd(e){return Ve(e)?document.querySelector(e):e}class Qe extends Error{constructor(t,n){super(n),this.name="ExpressionError",this.code=t}}const qd=512,po=32,ho=new Set(["globalThis","window","process","Function","eval","this","constructor","__proto__","prototype","require","module","exports","document","self","Deno","Buffer","setTimeout","setInterval","fetch","XMLHttpRequest"]),Wd=new Set(["isEmpty","len","includes","min","max","abs","str","num","bool"]);function Gd(e){return/[A-Za-z_$]/.test(e)}function zd(e){return/[A-Za-z0-9_$]/.test(e)}function Yd(e){const t=[];let n=0;for(;n<e.length;){const s=e[n];if(/\s/.test(s)){n+=1;continue}if(s==="("){t.push({type:"lparen",value:s}),n+=1;continue}if(s===")"){t.push({type:"rparen",value:s}),n+=1;continue}if(s===","){t.push({type:"comma",value:s}),n+=1;continue}if(s==="'"||s==='"'){const i=s;n+=1;let r="";for(;n<e.length&&e[n]!==i;){if(e[n]==="\\"&&n+1<e.length){r+=e[n+1],n+=2;continue}r+=e[n],n+=1}if(n>=e.length)throw new Qe("EXPR_UNTERMINATED_STRING","字符串未正确结束");n+=1,t.push({type:"string",value:r});continue}if(/[0-9]/.test(s)||s==="."&&/[0-9]/.test(e[n+1]||"")){let i="";for(;n<e.length&&/[0-9.]/.test(e[n]);)i+=e[n],n+=1;if(!/^\d+(\.\d+)?$/.test(i))throw new Qe("EXPR_INVALID_NUMBER",`非法数字: ${i}`);t.push({type:"number",value:i});continue}const l=e.slice(n,n+2),a=e.slice(n,n+3);if(["===","!=="].includes(a)){t.push({type:"op",value:a}),n+=3;continue}if(["==","!=","<=",">=","&&","||"].includes(l)){t.push({type:"op",value:l}),n+=2;continue}if(["+","-","*","/","%","<",">","!"].includes(s)){t.push({type:"op",value:s}),n+=1;continue}if(s==="."||s==="["||s==="]"||s==="{"||s==="}"||s===";")throw new Qe("EXPR_FORBIDDEN_TOKEN",`禁止的符号: ${s}`);if(Gd(s)){let i="";for(;n<e.length&&zd(e[n]);)i+=e[n],n+=1;t.push({type:"ident",value:i});continue}throw new Qe("EXPR_UNEXPECTED_CHAR",`意外字符: ${s}`)}return t.push({type:"eof",value:""}),t}class Jd{constructor(t,n){this.tokens=t,this.maxDepth=n,this.pos=0}parse(){const t=this.parseOr(0);if(this.current().type!=="eof")throw new Qe("EXPR_TRAILING",`多余内容: ${this.current().value}`);return t}current(){return this.tokens[this.pos]||{type:"eof",value:""}}eat(){const t=this.current();return this.pos+=1,t}parseOr(t){this.assertDepth(t);let n=this.parseAnd(t+1);for(;this.current().type==="op"&&this.current().value==="||";){const s=this.eat().value,l=this.parseAnd(t+1);n={kind:"binary",op:s,left:n,right:l}}return n}parseAnd(t){this.assertDepth(t);let n=this.parseEquality(t+1);for(;this.current().type==="op"&&this.current().value==="&&";){const s=this.eat().value,l=this.parseEquality(t+1);n={kind:"binary",op:s,left:n,right:l}}return n}parseEquality(t){this.assertDepth(t);let n=this.parseCompare(t+1);for(;this.current().type==="op"&&["==","!=","===","!=="].includes(this.current().value);){const s=this.eat().value,l=this.parseCompare(t+1);n={kind:"binary",op:s,left:n,right:l}}return n}parseCompare(t){this.assertDepth(t);let n=this.parseAdd(t+1);for(;this.current().type==="op"&&["<",">","<=",">="].includes(this.current().value);){const s=this.eat().value,l=this.parseAdd(t+1);n={kind:"binary",op:s,left:n,right:l}}return n}parseAdd(t){this.assertDepth(t);let n=this.parseMul(t+1);for(;this.current().type==="op"&&["+","-"].includes(this.current().value);){const s=this.eat().value,l=this.parseMul(t+1);n={kind:"binary",op:s,left:n,right:l}}return n}parseMul(t){this.assertDepth(t);let n=this.parseUnary(t+1);for(;this.current().type==="op"&&["*","/","%"].includes(this.current().value);){const s=this.eat().value,l=this.parseUnary(t+1);n={kind:"binary",op:s,left:n,right:l}}return n}parseUnary(t){return this.assertDepth(t),this.current().type==="op"&&["!","-","+"].includes(this.current().value)?{kind:"unary",op:this.eat().value,arg:this.parseUnary(t+1)}:this.parsePrimary(t+1)}parsePrimary(t){this.assertDepth(t);const n=this.current();if(n.type==="number")return this.eat(),{kind:"literal",value:Number(n.value)};if(n.type==="string")return this.eat(),{kind:"literal",value:n.value};if(n.type==="ident"){if(this.eat(),n.value==="true")return{kind:"literal",value:!0};if(n.value==="false")return{kind:"literal",value:!1};if(n.value==="null")return{kind:"literal",value:null};if(n.value==="undefined")return{kind:"literal",value:void 0};if(ho.has(n.value))throw new Qe("EXPR_FORBIDDEN_IDENT",`禁止标识符: ${n.value}`);if(this.current().type==="lparen"){if(!Wd.has(n.value))throw new Qe("EXPR_FORBIDDEN_CALL",`非白名单函数: ${n.value}`);this.eat();const s=[];if(this.current().type!=="rparen")for(s.push(this.parseOr(t+1));this.current().type==="comma";)this.eat(),s.push(this.parseOr(t+1));if(this.current().type!=="rparen")throw new Qe("EXPR_MISSING_RPAREN","缺少 )");return this.eat(),{kind:"call",name:n.value,args:s}}return{kind:"ident",name:n.value}}if(n.type==="lparen"){this.eat();const s=this.parseOr(t+1);if(this.current().type!=="rparen")throw new Qe("EXPR_MISSING_RPAREN","缺少 )");return this.eat(),s}throw new Qe("EXPR_UNEXPECTED_TOKEN",`意外 token: ${n.value||n.type}`)}assertDepth(t){if(t>this.maxDepth)throw new Qe("EXPR_TOO_DEEP",`表达式嵌套超过 ${this.maxDepth}`)}}function Xd(e,t){switch(e){case"isEmpty":{const n=t[0];return n==null||n===""||Array.isArray(n)&&n.length===0}case"len":{const n=t[0];return typeof n=="string"||Array.isArray(n)?n.length:0}case"includes":{const n=t[0],s=t[1];return typeof n=="string"?n.includes(String(s)):Array.isArray(n)?n.includes(s):!1}case"min":return Math.min(...t.map(Number));case"max":return Math.max(...t.map(Number));case"abs":return Math.abs(Number(t[0]));case"str":return String(t[0]??"");case"num":return Number(t[0]);case"bool":return t[0]==="0"?!1:!!t[0];default:throw new Qe("EXPR_FORBIDDEN_CALL",`非白名单函数: ${e}`)}}function vn(e,t){switch(e.kind){case"literal":return e.value;case"ident":{if(ho.has(e.name))throw new Qe("EXPR_FORBIDDEN_IDENT",`禁止标识符: ${e.name}`);if(!(e.name in t))return;const n=t[e.name];if(typeof n=="function")throw new Qe("EXPR_FORBIDDEN_VALUE",`字段 ${e.name} 不可为函数`);return n}case"unary":{const n=vn(e.arg,t);if(e.op==="!")return!n;if(e.op==="-")return-Number(n);if(e.op==="+")return+Number(n);throw new Qe("EXPR_UNKNOWN_OP",`未知一元运算: ${e.op}`)}case"binary":{if(e.op==="&&"){const l=vn(e.left,t);return l&&vn(e.right,t)}if(e.op==="||"){const l=vn(e.left,t);return l||vn(e.right,t)}const n=vn(e.left,t),s=vn(e.right,t);switch(e.op){case"==":case"===":return n===s;case"!=":case"!==":return n!==s;case"<":return n<s;case">":return n>s;case"<=":return n<=s;case">=":return n>=s;case"+":return n+s;case"-":return Number(n)-Number(s);case"*":return Number(n)*Number(s);case"/":return Number(n)/Number(s);case"%":return Number(n)%Number(s);default:throw new Qe("EXPR_UNKNOWN_OP",`未知运算: ${e.op}`)}}case"call":return Xd(e.name,e.args.map(n=>vn(n,t)))}}function Zd(e,t=po){const n=Yd(e);return new Jd(n,t).parse()}function Qd(e,t,n){const s=(n==null?void 0:n.maxLength)??qd,l=(n==null?void 0:n.maxDepth)??po;if(typeof e!="string")throw new Qe("EXPR_NOT_STRING","表达式必须是字符串");if(e.length>s)throw new Qe("EXPR_TOO_LONG",`表达式长度超过 ${s}`);const a=Zd(e,l);return vn(a,t||{})}function ef(e,t){const n=String(e).trim(),s=n.startsWith("return")?n:`return ${n}`,l=Object.keys(t),a=Object.values(t);return new Function(...l,s)(...a)}function tf(e,t={},n={}){const s=n.trust??"untrusted",l=n.dialect??(s==="untrusted"?"safe-v1":"legacy");if(s==="untrusted"&&l==="legacy")throw new Qe("UNTRUSTED_LEGACY","不可信路径禁止执行 legacy 表达式;请转换为 safe-v1 或标记为可信环境");if(l==="safe-v1"||s==="untrusted")return Qd(e,t,{maxLength:n.maxLength,maxDepth:n.maxDepth});try{return ef(e,t)}catch(a){throw a instanceof Qe?a:new Qe("LEGACY_EVAL_FAILED",(a==null?void 0:a.message)||"legacy 表达式执行失败")}}function Ds(e,t,n){try{return tf(t,e||{},{trust:(n==null?void 0:n.trust)??"trusted",dialect:(n==null?void 0:n.dialect)??"legacy",maxLength:n==null?void 0:n.maxLength,maxDepth:n==null?void 0:n.maxDepth})}catch{return}}function nf(e){return e==null?0:(typeof e!="string"&&(e=String(e)),e.replace(/[^\x00-\xff]/g,"01").length)}function Nn(e){try{return JSON.parse(JSON.stringify(e))}catch{return e}}function mo(e){return!(e==null||Array.isArray(e)&&e.length===0)}function go(e,t){switch(t){case"number":return Number(e)||0;case"string":return String(e??"");case"boolean":return e==="0"?!1:!!e;case"object":return e&&typeof e=="object"?e:{};case"array":return Array.isArray(e)?e:[];case"no":default:return e}}function wn(e){return e==null||typeof e=="string"&&e===""||Array.isArray(e)&&e.length===0}function sf(e){return e.type==="collection"&&e.collectionType==="unique-within-items"}function lf(e){var t,n;return e.type==="logic"&&(((t=e.repeatableRelation)==null?void 0:t.type)==="not-equal"||((n=e.repeatableRelation)==null?void 0:n.type)==="unique-within-items")}function Pl(e){if(typeof e=="number"&&Number.isNaN(e))return"number:NaN";try{return`${typeof e}:${JSON.stringify(e)}`}catch{return`${typeof e}:${String(e)}`}}function af(e,t,n,s="submit",l={}){var r;if(e.type!=="list"||!Array.isArray(n))return[];const a=(e.rules??[]).filter(o=>sf(o)&&(s==="submit"||o.trigger!=="submit")),i=[];for(const o of a){const u=(r=e.subItems)==null?void 0:r.find(d=>d.key===o.fieldKey);if(!u)continue;const c=new Map;n.forEach((d,v)=>{if(!d||typeof d!="object"||Array.isArray(d))return;const $=d[o.fieldKey];if(wn($)||u.required===!1&&o.includeOptionalFields===!1||u.visible===!1&&o.includeHiddenFields!==!0)return;const x=Pl($),A=c.get(x)??[];A.push(v),c.set(x,A)});for(const d of c.values())if(!(d.length<2))for(const v of d)i.push({path:`${t}[${v}].${o.fieldKey}`,listKey:t,itemIndex:v,fieldKey:o.fieldKey,message:o.message})}for(const o of e.subItems??[]){const u=(o.rules??[]).filter(c=>lf(c)&&(s==="submit"||c.trigger!=="submit"));for(const c of u){const d=c.repeatableRelation;if(d.type==="unique-within-items"){const v=new Map;n.forEach(($,x)=>{if(!$||typeof $!="object"||Array.isArray($))return;const A=$[d.fieldKey];if(wn(A)||o.required===!1&&d.includeOptionalFields===!1||o.visible===!1&&d.includeHiddenFields!==!0)return;const w=Pl(A);v.set(w,[...v.get(w)??[],x])});for(const $ of v.values())if(!($.length<2))for(const x of $)i.push({path:`${t}[${x}].${d.fieldKey}`,listKey:t,itemIndex:x,fieldKey:d.fieldKey,message:c.message});continue}n.forEach((v,$)=>{if(!v||typeof v!="object"||Array.isArray(v))return;const x=v[d.fieldKey];if(wn(x))return;const A=d.right,w=A.scope==="form"?l[A.runtimeKey??A.businessFieldId]:v[A.fieldKey];wn(w)||Pl(x)===Pl(w)&&i.push({path:`${t}[${$}].${d.fieldKey}`,listKey:t,itemIndex:$,fieldKey:d.fieldKey,message:c.message})})}}return[...new Map(i.map(o=>[`${o.path}:${o.message}`,o])).values()]}function Ol(e){var o,u;const{item:t,value:n,formValues:s={},expressionOptions:l}=e;let a="",i="";const r=wn(n);if(t.required&&r&&(a=((u=(o=t.rules)==null?void 0:o.find(c=>c.type==="required"))==null?void 0:u.message)||"字段不能为空"),t.required===!1&&r)return{errMsg:a,popMsg:i,value:n};if(!a&&t.rules)for(const c of t.rules){if(c.type==="required")continue;const d=yo(c,n,s,l);if(d){a=d;break}}if(t.warningRules)for(const c of t.warningRules){const d=yo(c,n,s,l);if(d){i=d;break}}return{errMsg:a,popMsg:i,value:n}}function yo(e,t,n,s){switch(e.type){case"regex":{if(!e.regex)return null;const l=t!=null?String(t):"";return new RegExp(e.regex).test(l)?null:e.message||"格式不正确"}case"logic":{if(!e.logic)return null;try{const l={...n,value:t};return Ds(l,e.logic,s)?null:e.message||"校验不通过"}catch{return e.message||"校验异常"}}case"byteLength":return e.byteLength&&nf(t)>e.byteLength?e.message||`不得超过${e.byteLength}字节`:null;default:return null}}function rf(e){const{sourceKey:t,value:n,formSnapshot:s,relations:l,expressionOptions:a}=e,i=[];for(const r of l){if(r.type==="remote")continue;const o=r.target;if(!o||o===t)continue;const u=s[o]||{value:void 0},c={...of(s),value:n,[t]:n,target:u.value};if(r.effect==="value"&&r.logic)try{const d=Ds(c,r.logic,a);d!==void 0&&i.push({target:o,effect:"value",newValue:d})}catch{}if(r.effect==="visible"&&r.logic)try{const d=Ds(c,r.logic,a);typeof d=="boolean"&&i.push({target:o,effect:"visible",newValue:d})}catch{}if(r.effect==="disabled"&&r.logic)try{const d=Ds(c,r.logic,a);typeof d=="boolean"&&i.push({target:o,effect:"disabled",newValue:d})}catch{}}return i}function of(e){const t={};for(const n of Object.keys(e)){const s=e[n];t[n]=s.value}return t}const cf={get:()=>({}),set:()=>{},remove:()=>{}};class uf{constructor(t,n,s){this._fields={},this._itemMap={},this._relationsMap={},this._listeners=new Map,this._isInit=!1,this._dirtyTracking=!1,this._queue=[],this._pendingAsyncTasks=[],this._isProcessing=!1,this._lastRelationTrace=null,this._lastValidateFails=[],this.schema=t,this._storage=n||cf,this._expressionOptions=s??{trust:"trusted",dialect:"legacy"};for(const l of t.groups)for(const a of l.items)this._itemMap[a.key]=a,a.relations&&a.relations.length>0&&(this._relationsMap[a.key]=a.relations)}get fields(){return this._fields}get isInit(){return this._isInit}getItem(t){return this._itemMap[t]}getLastRelationTrace(){return this._lastRelationTrace?Nn(this._lastRelationTrace):null}getLastValidateFails(){return Nn(this._lastValidateFails)}clearDebugTraces(){this._lastRelationTrace=null,this._lastValidateFails=[]}explainField(t){const n=this._itemMap[t],s=this._fields[t];if(!n)return{key:t,exists:!1,asSource:[],asTarget:[]};const l=this._relationsMap[t]?Nn(this._relationsMap[t]):[],a=[];for(const[i,r]of Object.entries(this._relationsMap))for(const o of r)o.target===t&&a.push({sourceKey:i,relation:Nn(o)});return{key:t,exists:!0,type:n.type,label:n.label,value:s==null?void 0:s.value,visible:s==null?void 0:s.visible,disabled:s==null?void 0:s.disabled,errMsg:(s==null?void 0:s.errMsg)||"",warningMsg:(s==null?void 0:s.warningMsg)||"",required:n.required===!0,dataKey:t,rules:(n.rules||[]).map(i=>({type:i.type,message:i.message,trigger:i.trigger})),asSource:l,asTarget:a}}_evalLogic(t,n){return Ds(t,n,this._expressionOptions)}_recordValidateFail(t){const n={...t,at:Date.now()};this._lastValidateFails=this._lastValidateFails.filter(s=>s.key!==t.key),this._lastValidateFails.push(n)}async init(t){var d,v,$,x;const n=this.schema.storageKey;this._global={SL:{},selectors:{},admittanceData:[]};const s=["enumeration","payback","admittance"],l=(this.schema.apis||[]).filter(A=>s.includes(A.scene));let a={},i={},r=[];for(const A of l)try{const w=await this._fetchAPI(A);A.scene==="enumeration"&&w?a={...a,...w}:A.scene==="payback"&&w?i={...i,...w}:A.scene==="admittance"&&w&&(r=Array.isArray(w)?w:[w])}catch{}this._admittanceData=r,this._enumData=a;const o=(this.schema.apis||[]).filter(A=>A.scene==="localData"),u={};for(const A of o)try{const w=A.params||[];for(const O of w)(O.source==="inject"||O.key)&&(u[O.name]=this._storage.get(O.key||O.name))}catch{}this._global={SL:u,selectors:a,admittanceData:r};let c={};n&&(c=this._storage.get(n)||{});for(const A of this.schema.groups)for(const w of A.items){const O=w.key;let y;if((t==null?void 0:t[O])!==void 0?y=t[O]:c[O]!==void 0?y=c[O]:i[O]!==void 0&&(y=i[O]),y===void 0&&w.defaultValue!==void 0&&(y=w.defaultValue,typeof y=="string"&&w.defaultValueMode!=="literal"))try{const C=y.startsWith("return ")?y:"return "+y,B=this._evalLogic({...this._global||{}},C);y=B!==void 0?B:y}catch{}if(y===void 0&&(y=this._resolveSelectDefault(w)),w.backfillable===!1&&c[O]!==void 0&&(y=w.defaultValue),w.initOptions&&w.initOptions.length>0&&y!=null&&y!==""&&typeof y=="object"&&!w.isJustValidate){const C=w.initOptions,B=((d=w.props)==null?void 0:d.isSingle)!==!1,D=(v=w.extra)==null?void 0:v.defaultMultiStepCodes,U=($=w.extra)==null?void 0:$.defaultSelectCode;if(D||U)if(Array.isArray(y)&&D){let q=C,R=!0;for(const j of y){const J=q.findIndex(S=>S.code===j.code&&S.name===j.name);if(J===-1){R=!1;break}q=((x=q[J])==null?void 0:x.child)||[]}y=R?y:""}else Array.isArray(y)&&U&&!B?y=y.every(R=>C.some(j=>j.code===R.code&&j.name===R.name))?y:"":y=C.some(q=>q.code===y.code&&q.name===y.name)?y:""}let b="";if(y!=null&&y!==""&&w.showValueTemplate)try{const C={...this._buildFormValues(),value:y,global:this._global};b=String(this._evalLogic(C,w.showValueTemplate)||"")}catch{}if(!b&&y!=null&&y!==""&&(Array.isArray(y)?b=y.map(C=>C.name||C).join(""):b=String(y)),this._fields[O]={value:y!==void 0?y:"",showValue:b,visible:w.visible!==!1,disabled:w.disabled===!0,focused:!1,errMsg:"",warningMsg:"",valueType:w.valueType,defaultValue:w.defaultValue},w.extra){for(const C of Object.keys(w.extra))if(C.startsWith("init")&&typeof w.extra[C]=="string")try{const B=this._evalLogic({...this._buildFormValues(),global:this._global,value:y},w.extra[C]);B!==void 0&&(this._fields[O][C.replace(/^init/,"")]=B)}catch{}}}for(const A of this.schema.groups)for(const w of A.items){const O=this._fields[w.key];if(!O)continue;if(w.initRelationsAtStart&&this._relationsMap[w.key]&&(O.visible||w.relationsWhenHidden)&&!O.errMsg){const b=O.value;mo(b)?this._trackAsync(this._applyRelations(w.key,b)):this._trackAsync(this._applyRelations(w.key,b,!0))}}for(;this._pendingAsyncTasks.length>0;){const A=this._pendingAsyncTasks.splice(0);await Promise.all(A)}this._isInit=!0,this._dirtyTracking=!0,await this._emit("afterInit",Nn(this._fields))}setControlData(t,n,s){var i;if(!this._fields[t]&&!this._itemMap[t])return;const l=["inputChange","inputFocus","pickShow"];if(s!=null&&s.eventType&&l.includes(s.eventType)&&!(((i=this._itemMap[t])==null?void 0:i.type)==="list"&&s.eventType==="inputChange")){this._emit("controlAction",{key:t,eventType:s.eventType,value:n});return}(s==null?void 0:s.eventType)==="searchChange"&&(s={...s,skipRelation:!0});const a=()=>{var u,c;const r=this._itemMap[t];if((s==null?void 0:s.changeType)==="clear"){const d=(r==null?void 0:r.extra)||{},v=d.clearBoth,$=d.clearValue;if(n=$!==void 0?$:(r==null?void 0:r.defaultValue)??"",Array.isArray(v))for(const x of v)this._fields[x]&&(this._dirtyTracking&&this._fields[x].value!==""&&(this._fields[x]._dirty=!0),this._fields[x].value="",this._fields[x].showValue="",this._fields[x].errMsg="")}if(this._dirtyTracking&&this._fields[t]&&this._fields[t].value!==n&&(this._fields[t]._dirty=!0),s!=null&&s.extraFields&&Object.assign(this._fields[t],s.extraFields),this._fields[t].value=n,this._computeShowValue(t,n,r),!(s!=null&&s.skipVerify)&&(r==null?void 0:r.type)==="list"&&((s==null?void 0:s.eventType)===void 0||s.eventType==="inputChange"||s.eventType==="inputBlur"||s.eventType==="confirm")&&this._validateListCollections(t,n,"blur",!0),!(s!=null&&s.skipVerify)){const d=(r==null?void 0:r.rules)&&r.rules.length>0,v=(r==null?void 0:r.warningRules)&&r.warningRules.length>0,$=r==null?void 0:r.required;if(d||v||$){const x=Ol({expressionOptions:this._expressionOptions,item:r,value:n,formValues:this._buildFormValues()}),A=(r==null?void 0:r.rules)&&r.rules.length>0&&r.rules.every(w=>w.trigger==="submit");A?this._fields[t]._pendingErrMsg=x.errMsg:(this._fields[t].errMsg=x.errMsg,this._fields[t].warningMsg=x.popMsg),x.errMsg||x.popMsg?(this._recordValidateFail({key:t,errMsg:x.errMsg,popMsg:x.popMsg,value:n,rules:((r==null?void 0:r.rules)||[]).filter(w=>!A||w.trigger==="submit").map(w=>({type:w.type,message:w.message,trigger:w.trigger}))}),this._emit("checkFail",{key:t,errMsg:x.errMsg,popMsg:x.popMsg,value:n,rules:((r==null?void 0:r.rules)||[]).map(w=>({type:w.type,message:w.message,trigger:w.trigger}))})):this._lastValidateFails=this._lastValidateFails.filter(w=>w.key!==t)}}this._persistField(t),!(s!=null&&s.skipRelation)&&(this._fields[t].visible||(r==null?void 0:r.relationsWhenHidden))&&this._trackAsync(this._applyRelations(t,n)),this._emit("afterChange",{key:t,value:n}),(r==null?void 0:r.type)==="task"&&!(s!=null&&s.skipJump)&&this._emit("controlJump",{key:t,value:n,taskType:(u=r.props)==null?void 0:u.taskType,taskCategory:(c=r.props)==null?void 0:c.taskCategory,props:r.props})};this._queue.push(a),this._isProcessing||this._drainQueue()}validateAll(){let t=!1;for(const n of Object.keys(this._fields)){const s=this._fields[n],l=this._itemMap[n];if(!l||!s.visible||l.type==="agreement"||!l.label)continue;s._pendingErrMsg&&(s.errMsg=s._pendingErrMsg,delete s._pendingErrMsg);const a=Ol({expressionOptions:this._expressionOptions,item:l,value:s.value,formValues:this._buildFormValues()});a.errMsg?(s.errMsg=a.errMsg,t=!0):s.errMsg="",s.warningMsg=a.popMsg,(a.errMsg||a.popMsg)&&this._emit("checkFail",{key:n,errMsg:a.errMsg,popMsg:a.popMsg,value:s.value}),l.type==="list"&&this._validateListCollections(n,s.value,"submit",!0)&&(t=!0)}return this._emit("afterChange",{validateAll:!0,hasError:t}),!t}getControlData(t){return this._fields[t]?Nn(this._fields[t]):void 0}collectFormData(t){const n={},s=[];for(const l of Object.keys(this._fields)){const a=this._fields[l],i=this._itemMap[l];if(i){if(!a.visible){const r=i.collectWhenHidden?a.value:i.defaultValue;if(mo(r)&&(n[l]=r),!n[l]||Array.isArray(n[l])&&!n[l].length){delete n[l];continue}}a.visible&&s.push(l)}}for(const l of s)(()=>{const i=this._fields[l],r=this._itemMap[l];if(r){if(!(t!=null&&t.skipVerify)&&r.rules&&r.rules.length>0){const o=Ol({expressionOptions:this._expressionOptions,item:r,value:i.value,formValues:this._buildFormValues()});i.errMsg=o.errMsg,i.warningMsg=o.popMsg}!(t!=null&&t.skipVerify)&&r.type==="list"&&this._validateListCollections(l,i.value,"submit",!0)}})();for(const l of s){const a=this._fields[l],i=this._itemMap[l];if(i&&i.submittable!==!1){if(!(t!=null&&t.skipVerify)){if(a._pendingErrMsg&&(a.errMsg=a._pendingErrMsg,delete a._pendingErrMsg),a.errMsg)throw new Error(`字段校验失败: ${l}, 错误信息: ${a.errMsg}`);const r=a.collectionErrors,o=r&&Object.entries(r)[0];if(o)throw new Error(`字段校验失败: ${o[0]}, 错误信息: ${o[1]}`)}n[l]=i.emptyValuePolicy==="preserve"&&wn(a.value)?a.value:go(a.value,i.valueType)}}return this._emit("fetchFormFields",n),n}async collectFormDataAsync(t){var s;const n={};for(const l of Object.keys(this._fields)){const a=this._fields[l],i=this._itemMap[l];if(i&&!(!a.visible&&!i.collectWhenHidden)&&i.submittable!==!1){if(!(t!=null&&t.skipVerify)){if(a._pendingErrMsg)throw a.errMsg=a._pendingErrMsg,delete a._pendingErrMsg,new Error(`字段校验失败: ${l}, ${a.errMsg}`);const r=Ol({expressionOptions:this._expressionOptions,item:i,value:a.value,formValues:this._buildFormValues()});if(r.errMsg)throw a.errMsg=r.errMsg,new Error(`字段校验失败: ${l}, ${r.errMsg}`);if(i.type==="list"&&this._validateListCollections(l,a.value,"submit",!0)){const o=a.collectionErrors,u=Object.entries(o)[0];throw new Error(`字段校验失败: ${u[0]}, ${u[1]}`)}if(i.serverValidate&&(i.required!==!1||!wn(a.value)))try{const o=(this.schema.apis||[]).find(u=>u.id===i.serverValidate);if(o){const u=await this._fetchAPI(o,{key:l,value:a.value});if(u&&u.code!==0)throw a.errMsg=u.msg||"服务端校验不通过",new Error(`字段校验失败: ${l}, ${a.errMsg}`)}}catch(o){if((s=o.message)!=null&&s.includes("字段校验失败"))throw o}}n[l]=i.emptyValuePolicy==="preserve"&&wn(a.value)?a.value:go(a.value,i.valueType)}}return this._emit("fetchFormFields",n),n}async submitForm(t){let n=await this.collectFormDataAsync(t);const s=await this._emitAsync("beforeSubmit",n);s!==void 0&&(n=s);let l,a;try{const i=(this.schema.apis||[]).find(r=>r.id===this.schema.submitApi);i&&(l=await this._fetchAPI(i,{submitData:n}))}catch(i){a=i}if(await this._emitAsync("afterSubmit",{response:l,err:a}),t!=null&&t.isClearStore&&this.clearStore(),a)throw a;return l}clearStore(){this.schema.storageKey&&this._storage.remove(this.schema.storageKey)}on(t,n){const s=this._listeners.get(t)||[];s.push(n),this._listeners.set(t,s)}off(t,n){const s=this._listeners.get(t)||[];this._listeners.set(t,s.filter(l=>l!==n))}destroy(){this._listeners.clear(),this._fields={},this._itemMap={},this._relationsMap={}}async fetchApi(t,n){let s;return typeof t=="string"?s=(this.schema.apis||[]).find(l=>l.id===t):s=t,s?this._fetchAPI(s,n):this._emitAsync("fetchAPI",{id:typeof t=="string"?t:t.id,scene:"other",extraParams:n||{},injects:{...this._buildFormValues(),global:this._global,...n}})}flush(){for(;this._queue.length>0;){const t=this._queue.shift();if(t)try{t()}catch{}}this._isProcessing=!1}async flushAsync(){for(this.flush();this._pendingAsyncTasks.length>0;){const t=this._pendingAsyncTasks.splice(0);await Promise.all(t)}}collectDirtyData(t){const n=[];for(const s of t){const l=s.item_key,a=this._fields[l];if(!a||!a._dirty||!a.visible)continue;const i=this._formatInterruptAnswer(l,a.value);if(i.answer===s.answer)continue;const r={...s,answer:i.answer,answered:!0};(s.answer_items!==void 0||i.answerItems!==void 0)&&(r.answer_items=i.answerItems||s.answer_items),(s.answer_extra_json!==void 0||i.extraJson!==void 0)&&(r.answer_extra_json=i.extraJson||s.answer_extra_json),n.push(r)}return n}resetDirty(t){if(t)this._fields[t]&&delete this._fields[t]._dirty;else for(const n of Object.keys(this._fields))delete this._fields[n]._dirty}_trackAsync(t){this._pendingAsyncTasks.push(t),t.finally(()=>{const n=this._pendingAsyncTasks.indexOf(t);n>=0&&this._pendingAsyncTasks.splice(n,1)})}_drainQueue(){if(!this._isProcessing){for(this._isProcessing=!0;this._queue.length>0;){const t=this._queue.shift();if(t)try{t()}catch{}}this._isProcessing=!1}}_computeShowValue(t,n,s){var a,i,r;const l=s||this._itemMap[t];if(l!=null&&l.showValueTemplate&&n!=null&&n!=="")try{const o={...this._buildFormValues(),value:n,global:this._global};this._fields[t].showValue=String(this._evalLogic(o,l.showValueTemplate)||"")}catch{}else Array.isArray(n)&&n.length>0?(this._fields[t].showValue=n.map(o=>o.name||o).join(""),(a=n[0])!=null&&a.adcode&&(this._fields[t].province=n[0].name,this._fields[t].province_code=n[0].adcode),(i=n[1])!=null&&i.adcode&&(this._fields[t].city=n[1].name,this._fields[t].city_code=n[1].adcode),(r=n[2])!=null&&r.adcode&&(this._fields[t].country=n[2].name,this._fields[t].country_code=n[2].adcode),this._computeExtraJson(t)):n!=null&&n!==""?typeof n=="object"&&n.name?this._fields[t].showValue=n.name:this._fields[t].showValue=String(n):this._fields[t].showValue=""}_computeExtraJson(t){const n=this._fields[t];n&&(n.extraJson=JSON.stringify({province_code:n.province_code||"",province_name:n.province||"",city_code:n.city_code||"",city_name:n.city||"",district_code:n.country_code||"",district_name:n.country||"",rd_code:"",rd_name:"",location:"",town_code:"",town_name:""}))}async _applyRelations(t,n,s=!1){var x,A,w,O;const l=(x=this._relationsMap[t])==null?void 0:x.filter(y=>!s||y.type==="local"&&(y.effect==="visible"||y.effect==="disabled"));if(!l||l.length===0)return;const a=new Map,i=l.filter(y=>{let b=!0;if(!y.when)b=!0;else if(typeof y.when=="boolean")b=y.when;else if(typeof y.when=="object"&&"logic"in y.when)try{b=!!this._evalLogic({...this._buildFormValues(),value:n},y.when.logic)}catch{b=!1}return a.set(y,b),b}),r=i.filter(y=>y.type==="local"),o=i.filter(y=>y.type==="remote");let u={};for(const y of o)if(y.api)try{const b=(this.schema.apis||[]).find(C=>C.id===y.api);if(b){const C=await this._fetchAPI(b,{sourceKey:t,value:n});C&&(u={...u,...C})}}catch{}const c=this._buildSnapshot();for(const y of Object.keys(u))c[y]&&(c[y].value=u[y]);const d=rf({sourceKey:t,value:n,formSnapshot:c,relations:r}),v=[];for(const y of o){const b=y.target;if(!b||!this._fields[b])continue;const C=this._fields[b];switch(y.effect){case"value":{const B=C.value,D=(A=c[b])==null?void 0:A.value;D!==void 0&&D!==B&&(this._dirtyTracking&&(C._dirty=!0),C.value=D,this._computeShowValue(b,D),this._persistField(b),this._emit("afterChange",{key:b,value:D}),v.push({target:b,effect:"value",type:"remote",oldValue:B,newValue:D,logic:y.logic}));break}case"visible":if(typeof((w=c[b])==null?void 0:w.visible)=="boolean"){const B=C.visible,D=c[b].visible;C.visible=D,B!==D&&v.push({target:b,effect:"visible",type:"remote",oldValue:B,newValue:D,logic:y.logic})}break;case"disabled":if(typeof((O=c[b])==null?void 0:O.disabled)=="boolean"){const B=C.disabled,D=c[b].disabled;C.disabled=D,B!==D&&v.push({target:b,effect:"disabled",type:"remote",oldValue:B,newValue:D,logic:y.logic})}break}}for(const y of d){const b=this._fields[y.target];if(!b)continue;const C=y.effect==="value"?b.value:y.effect==="visible"?b.visible:b.disabled;switch(y.effect){case"value":this._dirtyTracking&&(b._dirty=!0),b.value=y.newValue,this._computeShowValue(y.target,y.newValue),this._persistField(y.target),this._emit("afterChange",{key:y.target,value:y.newValue});break;case"visible":b.visible=y.newValue;break;case"disabled":b.disabled=y.newValue;break}if(C!==y.newValue){const B=r.find(D=>D.target===y.target&&D.effect===y.effect);v.push({target:y.target,effect:y.effect,type:"local",oldValue:C,newValue:y.newValue,logic:B==null?void 0:B.logic})}}const $={sourceKey:t,sourceValue:n,at:Date.now(),evaluated:l.map(y=>({target:y.target,effect:y.effect,type:y.type,whenActive:a.get(y)!==!1,logic:y.logic})),applied:v};this._lastRelationTrace=$,this._emit("relationTrace",Nn($))}_persistField(t){var l;const n=this._itemMap[t];if(!n||n.persistable===!1||!this.schema.storageKey)return;const s=this._storage.get(this.schema.storageKey)||{};s[t]=(l=this._fields[t])==null?void 0:l.value,this._storage.set(this.schema.storageKey,s)}_buildSnapshot(){const t={};for(const n of Object.keys(this._fields)){const s=this._fields[n];t[n]={value:s.value,visible:s.visible,disabled:s.disabled}}return t}_buildFormValues(){const t={};for(const n of Object.keys(this._fields))t[n]=this._fields[n].value;return t}_buildFormValuesWithBusinessFields(){var n,s;const t=this._buildFormValues();for(const l of Object.keys(this._fields)){const a=(s=(n=this._itemMap[l])==null?void 0:n.extra)==null?void 0:s.businessField;typeof a=="string"&&!(a in t)&&(t[a]=this._fields[l].value)}return t}_validateListCollections(t,n,s,l){const a=this._itemMap[t],i=this._fields[t];if(!a||!i||a.type!=="list")return!1;const r=af(a,t,n,s,this._buildFormValuesWithBusinessFields()),o={};for(const u of r)o[u.path]=u.message,l&&this._emit("checkFail",{key:u.path,errMsg:u.message,popMsg:"",value:n});return Object.keys(o).length>0?i.collectionErrors=o:delete i.collectionErrors,r.length>0}_formatInterruptAnswer(t,n){var i,r,o,u,c,d,v;const s=this._itemMap[t],l=(s==null?void 0:s.type)||"input",a={answer:""};if(/^address/.test(l)&&Array.isArray(n)&&n.length>0){const $=n.map(A=>A.name||"").filter(Boolean);a.answer=$.join("");const x={province_code:((i=n[0])==null?void 0:i.adcode)||"",province_name:((r=n[0])==null?void 0:r.name)||"",city_code:((o=n[1])==null?void 0:o.adcode)||"",city_name:((u=n[1])==null?void 0:u.name)||"",district_code:((c=n[2])==null?void 0:c.adcode)||"",district_name:((d=n[2])==null?void 0:d.name)||"",rd_code:"",rd_name:"",location:"",town_code:"",town_name:""};return a.extraJson=JSON.stringify(x),a}return(l==="select"||l==="cascader"||l==="search")&&n!=null&&typeof n=="object"&&!Array.isArray(n)&&n.code!==void 0?(a.answer=`${n.code}: ${n.name||""}`,a.answerItems=[{code:String(n.code),name:n.name||""}],a):(l==="select"||l==="cascader")&&Array.isArray(n)&&n.length>0&&((v=n[0])==null?void 0:v.code)!==void 0?(a.answer=n.map($=>`${$.code}: ${$.name||""}`).join(", "),a.answerItems=n.map($=>({code:String($.code),name:$.name||""})),a):(n!=null&&n!==""&&(typeof n=="object"&&n.name?a.answer=String(n.name):a.answer=String(n)),a)}_resolveSelectDefault(t){var s,l;const n=t.extra||{};return n.defaultSelectCode!==void 0||((s=t.props)==null?void 0:s.defaultSelectCode)!==void 0?this._normalSelectDefault(t):n.defaultMultiStepCodes!==void 0||((l=t.props)==null?void 0:l.defaultMultiStepCodes)!==void 0?this._multiStepSelectDefault(t):t.initOptions&&t.initOptions.length>0?[]:t.defaultValue}_normalSelectDefault(t){var i,r,o;const n=String(((i=t.extra)==null?void 0:i.defaultSelectCode)??((r=t.props)==null?void 0:r.defaultSelectCode)??""),s=n.trim().split(","),l=t.initOptions||[];return((o=t.props)==null?void 0:o.isSingle)!==!1?l.find(u=>u.code===n)||null:l.filter(u=>s.includes(String(u.code)))}_multiStepSelectDefault(t){var r,o;const s=String(((r=t.extra)==null?void 0:r.defaultMultiStepCodes)??((o=t.props)==null?void 0:o.defaultMultiStepCodes)??"").trim().split(",");if(s.length<2)return[];const a=(t.initOptions||[]).find(u=>u.code===s[0]);if(!a||!Array.isArray(a.child))return[];const i=a.child.find(u=>u.code===s[1]);return i?[{code:a.code,name:a.name},{code:i.code,name:i.name}]:[]}async _fetchAPI(t,n){const s={...this._buildFormValues(),global:this._global,...n};let l={};if(t.additionParams)try{const o=this._evalLogic(s,t.additionParams);o&&typeof o=="object"&&(l=o)}catch{}if(t.params&&t.params.length>0)for(const o of t.params){if(l[o.name]!==void 0)continue;const u=await this._emitAsync("addApiParam",{api:t,paramName:o.name,defaultValue:o.default,injects:s});u!==void 0?l[o.name]=u:o.default!==void 0&&(l[o.name]=o.default)}let a,i;try{a=await this._emitAsync("fetchAPI",{id:t.id,scene:t.scene,api:t,extraParams:l,injects:s})}catch(o){i=o}if(i||a===void 0){if(t.failback)try{return this._evalLogic(s,t.failback)}catch{}if(i)throw i;return}let r=a;if(t.interptor)try{const o=this._evalLogic({...s,res:a},t.interptor);o!==void 0&&(r=o)}catch{}if(t.extraLogic)try{this._evalLogic({...s,response:r},t.extraLogic)}catch{}return r}_emit(t,...n){const s=this._listeners.get(t)||[];for(const l of s)try{l(...n)}catch{}}async _emitAsync(t,...n){const s=this._listeners.get(t)||[];let l;for(const a of s)try{const i=await a(...n);i!==void 0&&(l=i)}catch{}return l}}function df(e){switch(e){case"select":case"cascader":return"arrow";case"address":case"address5":case"addressPinyin":return"location";case"search":return"search";default:return null}}function ff(e){return e.type==="task"||e.type==="agreement"||!e.label}const Ps="/pages/dynamic-form/sub-form",Ka="/packageSub/pages/web/web",bo={...{signature:{jumpMode:"navigate",page:"/packageSub/pages/auth/signature",callbackKey:"signatureData",category:"TASKS",uiCategory:"native"},map:{jumpMode:"navigate",page:"/packageSub/pages/auth/map",callbackKey:"selectMapItem",category:"TASKS",uiCategory:"native"},checkCard:{jumpMode:"navigate",page:"/packageSub/pages/bank-card/bind?fromTaxLink=true",callbackKey:"checkCardData",category:"TASKS",uiCategory:"native"},wxBill:{jumpMode:"navigate",page:"/packageCoBorrow/pages/increase-quota/wechat-credit",callbackKey:"wxbillRecordId",category:"TASKS",uiCategory:"native"},signDoc:{jumpMode:"navigate",page:"/packageThird/pages/todo/signAndDoc?needCallBack=1",callbackKey:"hasSignDoc",category:"TASKS",uiCategory:"native"},auth_contract:{jumpMode:"navigate",page:"/packageThird/pages/todo-sign/sign",callbackKey:"auth_contract",category:"TASKS",uiCategory:"native"},xinge_authorize:{jumpMode:"navigate",callbackKey:"xinge_auth_data",category:"TASKS",uiCategory:"native"}},...{contact_info:{jumpMode:"subForm",page:Ps,callbackKey:"contact_info",category:"TASKS",uiCategory:"subForm"},business_info:{jumpMode:"subForm",page:Ps,callbackKey:"business_info",category:"TASKS",uiCategory:"subForm"},card_info_auth:{jumpMode:"subForm",page:Ps,callbackKey:"card_info_auth",category:"TASKS",uiCategory:"subForm"},outside_authorize:{jumpMode:"subForm",page:Ps,callbackKey:"outside_authorize",category:"TASKS",uiCategory:"subForm"},subForm:{jumpMode:"subForm",page:Ps,category:"TASKS",uiCategory:"subForm"}},...{taxLink:{jumpMode:"webview",page:Ka,callbackKey:"taxHandleData",category:"TASKS",uiCategory:"h5"},standard_tianxun_paas_auth:{jumpMode:"webview",page:Ka,category:"TASKS",uiCategory:"h5"},tianxun_paas_auth:{jumpMode:"webview",callbackKey:"tianxun_paas_auth",category:"TASKS",uiCategory:"h5"},h5_jump:{jumpMode:"webview",page:Ka,category:"TASKS",uiCategory:"h5"}},...{business_agency:{jumpMode:"inline",callbackKey:"userAllotInfo",category:"inline",uiCategory:"api"},bank_bill_files:{jumpMode:"inline",page:"/packageThird/pages/collect-bill/index",callbackKey:"collect_bill_data",category:"TASKS",uiCategory:"native"},inqure_tax_administartion:{jumpMode:"inline",category:"inline",uiCategory:"api"},re_credit_living:{jumpMode:"inline",callbackKey:"reCreditLiving",category:"CUSTOMER_TASK",uiCategory:"customer"},face_verify_sign:{jumpMode:"inline",callbackKey:"creditApplyFaceSignResult",category:"CUSTOMER_TASK",uiCategory:"customer"},navigate_h5_tax_copy:{jumpMode:"inline",category:"inline",uiCategory:"inline"}},...{company_seal:{jumpMode:"actionSheet",callbackKey:"company_seal_info",actions:[{label:"拍摄",type:"navigate",page:"/packageSub/pages/auth/companySeal/card-photo?cardType=font"},{label:"从手机相册中选择",type:"chooseImage"}],category:"TASKS",uiCategory:"api"}}};let vf={};function pf(){return{...vf}}function hf(e){const t=(e==null?void 0:e.taskType)||"",n=(e==null?void 0:e.taskCategory)||"",s=bo[t];return s?s.uiCategory:n==="CUSTOMER_TASK"?"customer":n==="inline"?"inline":n==="TASKS"?"native":"subForm"}let Rl=null;function mf(){if(!Rl){Rl={};for(const[e,t]of Object.entries(bo))Rl[e]=t.uiCategory}return Rl}function _o(e){return mf()[e]||null}function pn(e,t,n){e.setControlData(t,n,{skipJump:!0})}function gf(e,t){return{key:e.key,type:e.type,label:e.label||e.key,required:e.required===!0,placeholder:e.placeholder||"",disabled:(t==null?void 0:t.disabled)===!0,visible:(t==null?void 0:t.visible)!==!1,rightIcon:df(e.type),hideLabel:ff(e),raw:e}}function ko(e,t,n){return e.groups.map(s=>({key:s.key,title:s.title,items:s.items.filter(l=>!0).map(l=>gf(l,t==null?void 0:t[l.key]))}))}function yf(e,t,n){const s={groups:ko(e,t)};let l=t;return{...s,update(a){if(a&&l){const i=Object.keys(l),r=Object.keys(a);if(i.length===r.length){let o=!1;for(const u of r){const c=l[u],d=a[u];if((c==null?void 0:c.visible)!==(d==null?void 0:d.visible)||(c==null?void 0:c.disabled)!==(d==null?void 0:d.disabled)){o=!0;break}}if(!o)return}}l=a,s.groups=ko(e,a)}}}const Ll={label:{position:"left",width:96,fontSize:16,color:"rgba(0, 0, 0, 0.9)",requiredColor:"#D54941"},colors:{primary:"#0052D9",error:"#D54941",errorBg:"transparent",success:"#2BA471",containerBg:"#F3F3F3",cardBg:"#FFFFFF",divider:"#E7E7E7",icon:"rgba(0, 0, 0, 0.4)"}};({...Ll.colors},{...Ll.label}),{...Ll.colors},{...Ll.label};function bf(e,t){return e==="top"||e==="left"?e:t==="top"||t==="left"?t:"left"}const Os="formUiHostHandlers",_f={71e4:1,81e4:2,82e4:2};function kf(e,t=3){return _f[e]??t}function Co(e,t){if(!(e!=null&&e.length))return[];const n=(t==null?void 0:t.lazy)!==!1,s=(t==null?void 0:t.level)??1,l=(t==null?void 0:t.maxLevel)??3;return e.map(a=>{const i=String(a.adcode),r=kf(i,l),o=s<r&&s<l,u={label:a.name,value:i};return o&&n&&(u.children=!0),u})}function Cf(e){return{province_code:e[0]?String(e[0].value):"",city_code:e[1]?String(e[1].value):"",district_code:e[2]?String(e[2].value):"",town_code:e[3]?String(e[3].value):""}}function So(e,t){if(e)return{mode:"host",fetchRoot:async(s,l)=>(await e(null,{url:s,level:1,path:[]})).map(i=>({...i,children:i.children===!0||Array.isArray(i.children)&&i.children.length?i.children:!0})),loadChild:async(s,l)=>{const a=[...l.path,{value:s.value,label:String(s.label||"")}];return e({value:s.value,label:s.label},{url:l.url,level:a.length+1,path:a})}};const n=t==null?void 0:t._linkageFetcher;return n?{mode:"fetcher",fetchRoot:async(s,l)=>{const a=await n({province_code:"",city_code:"",district_code:""},s);return Co(a.data,{lazy:!0,level:1,maxLevel:l})},loadChild:async(s,l)=>{const a=[...l.path,{value:s.value,label:String(s.label||"")}],i=Cf(a),r=await n(i,l.url);return r.data===null?[]:Co(r.data,{lazy:!0,level:a.length+1,maxLevel:l.maxLevel})}}:{mode:"sample",fetchRoot:async()=>[],loadChild:async()=>[]}}const Sf=["input","textarea","number","idcard","phone","bankCard","select","cascader","search","address","address5","addressPinyin","agreement","date","dateRange","slider","verifyCode","imageUpload","fileUpload","switch","radioGroup","checkboxGroup","stepper","rate"],wf=["custom","signature","task","list"],Tf=new Set(Sf),xf=new Set(wf);function $f(e){return Tf.has(e)}function Af(e){return xf.has(e)}const Mf=new Set(["input","textarea","number","idcard","phone","bankCard"]),Ef=new Set(["address","address5","addressPinyin"]);function Ff(e){if(!$f(e))return Af(e)?{controlId:"_unsupported",type:e,supported:!1,reason:"explicitly_unsupported"}:{controlId:"_unsupported",type:e,supported:!1,reason:"unknown_type"};let t="input-control";return e==="select"?t="select-control":e==="cascader"?t="cascader-control":e==="search"?t="search-control":Ef.has(e)?t="address-control":e==="agreement"?t="agreement-control":e==="date"?t="date-control":e==="dateRange"?t="date-range-control":e==="slider"?t="slider-control":e==="verifyCode"?t="verify-code-control":e==="imageUpload"?t="image-upload-control":e==="fileUpload"?t="file-upload-control":e==="switch"?t="switch-control":e==="radioGroup"?t="radio-group-control":e==="checkboxGroup"?t="checkbox-group-control":e==="stepper"?t="stepper-control":e==="rate"?t="rate-control":Mf.has(e)||(t="input-control"),{controlId:t,type:e,supported:!0,supportedType:e}}const If={allowFreeText:!0};function Df(e){if(Array.isArray(e))return e;if(e&&typeof e=="object"){const t=e;if(Array.isArray(t.data))return t.data;if(Array.isArray(t.list))return t.list;if(t.data&&typeof t.data=="object"&&Array.isArray(t.data.list))return t.data.list}return[]}function Pf(e,t){const n=(t==null?void 0:t.valueCustomKey)||"name";return Df(e).map(s=>{if(s==null)return null;if(typeof s=="string")return{code:s,name:s,raw:{name:s,code:s}};if(typeof s!="object")return null;const l=s,a=String(l[n]??l.name??l.label??""),i=String(l.code??l.value??l.id??a);return!a&&!i?null:{code:i||a,name:a||i,raw:l}}).filter(Boolean)}function Of(e,t){const n={code:e.code,name:e.name},s=e.raw||{};for(const l of t||[])l==="code"||l==="name"||l in s&&(n[l]=s[l]);return n}function Rf(e){const t=(e||"").trim();return t?{name:t,code:t}:""}function Lf(e){return e&&typeof e.allowFreeText=="boolean"?e.allowFreeText:If.allowFreeText}const Nf={maxCount:3};function Vf(e){const t=e==null?void 0:e.maxCount;return typeof t=="number"&&t>0?t:Nf.maxCount}const Ua={countTime:60,maxlength:6,verifyText:"获取验证码"};function Bf(e){const t=e==null?void 0:e.countTime;return typeof t=="number"&&t>0?t:Ua.countTime}function jf(e){const t=e==null?void 0:e.maxlength;return typeof t=="number"&&t>0?t:Ua.maxlength}function Kf(e){const t=e==null?void 0:e.verifyText;return typeof t=="string"&&t.trim()?t.trim():Ua.verifyText}const wo="formUiLayout",Nl={labelAlign:"left",labelWidth:"81px",contentAlign:"left"};function Uf(e,t){if(e==="top")return"top";if(e==="left")return(t==null?void 0:t.labelAlign)==="right"?"right":"left";const n=t==null?void 0:t.labelAlign;return n==="left"||n==="right"||n==="top"?n:Nl.labelAlign}function Hf(e,t){const n=e??(t==null?void 0:t.labelWidth)??Nl.labelWidth;return typeof n=="number"?`${n}px`:String(n)}function Kt(e){const t=String(e||"").trim().toLowerCase();return t==="en"||t.startsWith("en-")||t.startsWith("en_")?"en-US":"zh-CN"}const qf={cancel:"取消",confirm:"确认",close:"关闭",clear:"清空",delete:"删除",done:"完成",searchPlaceholder:"输入关键词快速筛选…",inputPlaceholder:"请输入",selectPlaceholder:"请选择",selectAddressPlaceholder:"请选择省市区",selectRegionTitle:"请选择地区",searchInputPlaceholder:"请输入关键词搜索",verifyCodePlaceholder:"请输入验证码",verifyCodeLabel:"短信验证码",verifyCodeButton:"获取验证码",loadingOptions:"加载选项中…",noOptions:"暂无可选项",loadingRegion:"加载下级地区中…",regionLoadFailed:"加载下级地区失败,可点击重试",searching:"联想检索中…",defaultGroupTitle:"表单分组",trustBarText:"信息采用银行级加密传输,仅用于本次业务审核",groupErrorBadge:e=>`${e} 项待完善`,systemKeyboard:"系统键盘",switchToSoftKeyboard:"切软键盘",switchToSoftKeyboardTitle:"切换回内置安全软键盘",keyboardTapHint:"点击下方按键输入",keyboardTitleIdcard:"身份证安全数字键盘",keyboardBadgeIdcard:"身份证键盘 · X",keyboardTitleDigit:"金额 / 小数数字键盘",keyboardBadgeDigit:"小数键盘 · .",keyboardTitleNumber:"纯数字安全键盘",keyboardBadgeNumber:"纯数字键盘",keyboardTitleDefault:"标准键盘",keyboardHintWithSystem:e=>`${e}(点击可切系统键盘)`,signatureTitle:"电子手写签名",signatureConfirm:"确认签署",signatureHint:"请在下方签名区内使用手指或鼠标正楷签署本人姓名",signatureWatermark:"签名区",signatureClear:"重写签名",signatureReadyTip:"已书写,点击右上角「确认签署」回写表单",signatureEmptyTip:"请先书写签名",signatureDoneName:"已手写电子签名",signatureAltPreview:"电子签名预览",signatureAltSigned:"已签署签名",taskGoDefault:"去办理",taskGoSignature:"去签名",taskGoMap:"去选点",taskCompleted:"已完成",agreementDetailTitle:"协议详情",agreementDefaultText:"请阅读并同意相关协议",agreementChecked:"已阅读并同意",agreementUnchecked:"未勾选",dateStart:"开始日期",dateEnd:"结束日期",dateTo:"至",dateLongTerm:"长期",dateLongTermValue:"长期",dateRangeBounds:(e,t)=>`可选范围:${e} ~ ${t}`,dateUnlimited:"不限",dateYearHead:"年",dateMonthHead:"月",dateDayHead:"日",dateYearOption:e=>`${e}年`,dateMonthOption:e=>`${e}月`,dateDayOption:e=>`${e}日`,datePlaceholderDay:"请选择日期",datePlaceholderMonth:"请选择年月",datePlaceholderYear:"请选择年份",uploadImageAlt:"已上传",uploadAddText:"上传资料",uploadLightboxAlt:"图片预览",uploadFileAdd:e=>`+ 选择附件(单文件 ≤ ${e}MB)`,uploadGuardFallback:"文件不符合上传要求",switchOn:"已开启",switchOff:"未开启",mapPicker:"地图选点",minSelectError:e=>`至少需选择 ${e} 项`,maxSelectError:e=>`最多只能选择 ${e} 项`,listEmpty:"暂无条目,点击下方按钮添加",listItemTitle:e=>`第 ${e} 项`,listAddDefault:"+ 添加一条",listMinError:(e,t)=>`请至少填写 ${e} 条${t||"记录"}`,listSubRequired:e=>`请完善${e}`,listSubRegex:e=>`${e}格式有误`,listSubDuplicate:(e,t)=>`${e}不能与第 ${t} 项重复`,reviewEmpty:"未填写",reviewNotUploaded:"未上传",reviewNoItems:"暂无条目",reviewReveal:"查看原文",reviewHide:"隐藏脱敏",fallbackControl:e=>`扩展控件 (${e})`,valIdcardFormat:"请输入18位有效身份证号",valIdcardBirthInvalid:"身份证出生日期不合法",valIdcardBirthNonexistent:"身份证出生日期不存在",valIdcardChecksum:"身份证校验位不正确,请核对末位数字或X",valBankCardLength:"请输入15至19位有效银行卡号",valBankCardLuhn:"银行卡号校验未通过,请核对卡号是否输错",valMobileInvalid:"请输入11位有效中国大陆手机号",valMobileRequiredBeforeCode:"请先填写有效的手机号再获取验证码",valNumberInvalid:"请输入有效数值",valNumberNegative:"数值不能为负数",valNumberMin:e=>`数值不能小于 ${e}`,valNumberMax:e=>`数值不能大于 ${e}`,valDateBeforeMin:e=>`开始日期不能早于 ${e}`,valDateNoLongTerm:"该日期区间不支持长期有效",valDateAfterMax:e=>`结束日期不能晚于 ${e}`,valDateEndBeforeStart:"结束日期不能早于开始日期",valFileSizeExceeded:e=>`单个文件不能超过 ${e}MB`,valFileTypeNotAllowed:e=>`仅支持以下格式:${e}`},Wf={cancel:"Cancel",confirm:"Confirm",close:"Close",clear:"Clear",delete:"Remove",done:"Done",searchPlaceholder:"Filter options…",inputPlaceholder:"Enter value",selectPlaceholder:"Select",selectAddressPlaceholder:"Select region",selectRegionTitle:"Select Region",searchInputPlaceholder:"Type keyword to search",verifyCodePlaceholder:"Enter code",verifyCodeLabel:"Verification Code",verifyCodeButton:"Send Code",loadingOptions:"Loading options…",noOptions:"No options available",loadingRegion:"Loading sub-regions…",regionLoadFailed:"Failed to load regions. Tap to retry.",searching:"Searching…",defaultGroupTitle:"Section",trustBarText:"Encrypted end-to-end for verification only",groupErrorBadge:e=>`${e} issue${e>1?"s":""}`,systemKeyboard:"System KB",switchToSoftKeyboard:"Keypad",switchToSoftKeyboardTitle:"Switch to built-in secure keypad",keyboardTapHint:"Tap keys below to enter",keyboardTitleIdcard:"Secure ID Keypad",keyboardBadgeIdcard:"ID Keypad · X",keyboardTitleDigit:"Decimal Keypad",keyboardBadgeDigit:"Decimal · .",keyboardTitleNumber:"Secure Numeric Keypad",keyboardBadgeNumber:"Numeric Keypad",keyboardTitleDefault:"Standard Keyboard",keyboardHintWithSystem:e=>`${e} (tap for system keyboard)`,signatureTitle:"Electronic Signature",signatureConfirm:"Sign & Save",signatureHint:"Sign your full name in the box below using finger or mouse",signatureWatermark:"Sign Here",signatureClear:"Clear",signatureReadyTip:'Signed — tap "Sign & Save" to apply',signatureEmptyTip:"Please draw your signature first",signatureDoneName:"Signed Electronically",signatureAltPreview:"Signature preview",signatureAltSigned:"Signed signature",taskGoDefault:"Start",taskGoSignature:"Sign",taskGoMap:"Pick Location",taskCompleted:"Completed",agreementDetailTitle:"Agreement Details",agreementDefaultText:"Please read and accept the agreement",agreementChecked:"Accepted",agreementUnchecked:"Not accepted",dateStart:"Start Date",dateEnd:"End Date",dateTo:"to",dateLongTerm:"Long-term",dateLongTermValue:"long_term",dateRangeBounds:(e,t)=>`Range: ${e} – ${t}`,dateUnlimited:"Any",dateYearHead:"Year",dateMonthHead:"Month",dateDayHead:"Day",dateYearOption:e=>`${e}`,dateMonthOption:e=>String(e).padStart(2,"0"),dateDayOption:e=>String(e).padStart(2,"0"),datePlaceholderDay:"Select date",datePlaceholderMonth:"Select month",datePlaceholderYear:"Select year",uploadImageAlt:"Uploaded",uploadAddText:"Upload",uploadLightboxAlt:"Image preview",uploadFileAdd:e=>`+ Attach File (≤ ${e}MB each)`,uploadGuardFallback:"File does not meet upload requirements",switchOn:"On",switchOff:"Off",mapPicker:"Map Pin",minSelectError:e=>`Select at least ${e} option${e>1?"s":""}`,maxSelectError:e=>`Select at most ${e} option${e>1?"s":""}`,listEmpty:"No items yet. Tap the button below to add one.",listItemTitle:e=>`Item #${e}`,listAddDefault:"+ Add Item",listMinError:(e,t)=>`Please add at least ${e} ${t||"entry"}`,listSubRequired:e=>`Please complete ${e}`,listSubRegex:e=>`Invalid format for ${e}`,listSubDuplicate:(e,t)=>`${e} duplicates item #${t}`,reviewEmpty:"Not provided",reviewNotUploaded:"Not uploaded",reviewNoItems:"No items",reviewReveal:"Show",reviewHide:"Mask",fallbackControl:e=>`Custom Control (${e})`,valIdcardFormat:"Please enter a valid 18-digit ID number",valIdcardBirthInvalid:"Invalid birth date in ID number",valIdcardBirthNonexistent:"Non-existent calendar date in ID number",valIdcardChecksum:"ID checksum mismatch — please check the last character",valBankCardLength:"Please enter a valid 15–19 digit card number",valBankCardLuhn:"Card number failed Luhn check — please verify digits",valMobileInvalid:"Please enter a valid phone number",valMobileRequiredBeforeCode:"Please enter a valid phone number before requesting a code",valNumberInvalid:"Please enter a valid number",valNumberNegative:"Value cannot be negative",valNumberMin:e=>`Value must be at least ${e}`,valNumberMax:e=>`Value must be at most ${e}`,valDateBeforeMin:e=>`Start date cannot be earlier than ${e}`,valDateNoLongTerm:"Long-term option is not allowed for this field",valDateAfterMax:e=>`End date cannot be later than ${e}`,valDateEndBeforeStart:"End date cannot be earlier than start date",valFileSizeExceeded:e=>`Each file must be under ${e}MB`,valFileTypeNotAllowed:e=>`Allowed formats: ${e}`};function wt(e){return Kt(e)==="en-US"?Wf:qf}const Gf=new Set(["address","address5","addressPinyin"]),Vl={signature:"手写签名",business_agency:"业务办理机构",taxLink:"税务授权",taxLInk:"税务授权",tianxun_paas_auth:"天讯授权",standard_tianxun_paas_auth:"天讯授权",re_credit_living:"活体检测",face_verify_sign:"人脸核身签署",company_seal:"公司印章",houseDataSource:"房产数据源授权",owner_list:"关联方信息",navigate_h5_tax_copy:"复制税务链接",inqure_tax_administartion:"税务查询",h5_jump:"H5 跳转",xinge_authorize:"信鸽授权",business_info:"经营信息",contact_info:"联系人信息",card_info_auth:"身份证认证",outside_authorize:"外部授权",subForm:"子表单",checkCard:"绑卡验卡",wxBill:"微信账单",signDoc:"签章签署",auth_contract:"授权签署",bank_bill_files:"流水采集",map:"地图选点"},zf=new Set(Object.keys(Vl).filter(e=>e!=="map"));function Ha(e){return e==="re_credit_living"||e==="face_verify_sign"?"CUSTOMER_TASK":e==="navigate_h5_tax_copy"?"inline":"TASKS"}function Yf(e){if(!e)return null;const t=String(e.type||"");if(Gf.has(t))return null;const n=e.props||{},s=typeof n.taskType=="string"?n.taskType.trim():"",l=typeof n.taskCategory=="string"?n.taskCategory.trim():"",a=String(e.key||"");if(t==="task"||t==="signature"){const i=s||(t==="signature"?"signature":a||"subForm");return{isTask:!0,taskType:i,taskCategory:l||Ha(i),label:Vl[i]||"外跳任务"}}if(s||l){const i=s||a||"subForm";return{isTask:!0,taskType:i,taskCategory:l||Ha(i),label:Vl[i]||"外跳任务"}}return a&&zf.has(a)?{isTask:!0,taskType:a,taskCategory:Ha(a),label:Vl[a]||"外跳任务"}:null}function To(e){if(!e)return!1;const t=e.value;return t===!0?!0:typeof t=="string"?t.trim().length>0:typeof t=="number"?Number.isFinite(t):Array.isArray(t)?t.length>0:t&&typeof t=="object"?Object.values(t).some(n=>n!=null&&String(n).trim().length>0):!!(e.showValue&&String(e.showValue).trim())}function Jf(e,t,n){const s=wt(n);return t!=null&&t.showValue&&String(t.showValue).trim()?String(t.showValue).trim():t!=null&&t.value&&typeof t.value=="object"&&t.value.name&&String(t.value.name).trim()?String(t.value.name).trim():To(t)?s.taskCompleted:e.taskType==="signature"?s.taskGoSignature:e.taskType==="map"?s.taskGoMap:s.taskGoDefault}function Xf(e){var n,s,l;const t=String(((n=e==null?void 0:e.props)==null?void 0:n.fields)||((l=(s=e==null?void 0:e.extra)==null?void 0:s.nodeProps)==null?void 0:l.fields)||"").trim().toLowerCase();return t==="year"?{granularity:"year",tdMode:"year",format:"YYYY",nativeFields:"year",placeholder:(e==null?void 0:e.placeholder)||"请选择年份"}:t==="month"?{granularity:"month",tdMode:"month",format:"YYYY-MM",nativeFields:"month",placeholder:(e==null?void 0:e.placeholder)||"请选择年月"}:{granularity:"day",tdMode:"date",format:"YYYY-MM-DD",nativeFields:"day",placeholder:(e==null?void 0:e.placeholder)||"请选择日期"}}function Zf(e){var l,a,i,r,o,u;const t=[],n=(l=e==null?void 0:e.props)==null?void 0:l.agreements;if(Array.isArray(n)){for(const c of n)if(typeof c=="string"&&c.trim())t.push({title:c.trim()});else if(c&&typeof c=="object"){const d=String(c.title||c.name||c.label||"").trim();d&&t.push({title:d,url:c.url||c.link?String(c.url||c.link):void 0,content:c.content?String(c.content):void 0})}}const s=(i=(a=e==null?void 0:e.extra)==null?void 0:a.nodeProps)==null?void 0:i.agreementlist;if(Array.isArray(s)){for(const c of s)if(typeof c=="string"&&c.trim())t.push({title:c.trim()});else if(c&&typeof c=="object"){const d=String(c.title||c.name||c.label||"").trim();d&&t.push({title:d,url:c.url||c.link?String(c.url||c.link):void 0,content:c.content?String(c.content):void 0})}}else typeof s=="string"&&s.trim()&&t.length===0&&((r=e==null?void 0:e.props)!=null&&r.agreementLink&&typeof e.props.agreementLink=="string"?t.push({title:"相关服务协议",url:e.props.agreementLink}):t.push({title:"相关服务协议",content:(e==null?void 0:e.label)||((o=e==null?void 0:e.props)==null?void 0:o.guideText)||"请阅读并同意相关服务协议。"}));return(u=e==null?void 0:e.props)!=null&&u.agreementLink&&typeof e.props.agreementLink=="string"&&t.length===0&&t.push({title:"查看协议",url:e.props.agreementLink}),t}function xo(e,t){var d,v;const n=((d=e==null?void 0:e.extra)==null?void 0:d.nodeProps)||{},s=Object.prototype.hasOwnProperty.call(n,"true_value")&&n.true_value!==void 0,l=Object.prototype.hasOwnProperty.call(n,"false_value")&&n.false_value!==void 0,a=s||l,i=s?n.true_value:!0,r=t&&"defaultFalseValue"in t?t.defaultFalseValue:!1,o=l?n.false_value:r,u=Zf(e),c=(e==null?void 0:e.label)&&String(e.label).trim()||((v=e==null?void 0:e.props)==null?void 0:v.guideText)&&String(e.props.guideText).trim()||"请阅读并同意相关协议";return{hasCustomValues:a,trueValue:i,falseValue:o,displayLabel:c,agreements:u,hasAgreementLinks:u.length>0}}function $o(e,t){return t.hasCustomValues&&(e===t.trueValue||t.trueValue!=null&&e!=null&&e!==""&&String(e)===String(t.trueValue))?!0:e===!0||e==="true"||e==="1"||e===1}const qa=[{label:"黑龙江省",value:"230000",children:[{label:"哈尔滨市",value:"230100",children:[{label:"道里区",value:"230102"},{label:"南岗区",value:"230103"},{label:"道外区",value:"230104"},{label:"平房区",value:"230108"}]},{label:"齐齐哈尔市",value:"230200",children:[{label:"龙沙区",value:"230202"},{label:"建华区",value:"230203"}]}]},{label:"北京市",value:"110000",children:[{label:"北京市",value:"110100",children:[{label:"东城区",value:"110101"},{label:"西城区",value:"110102"},{label:"朝阳区",value:"110105"},{label:"海淀区",value:"110108"}]}]}],Qf=["哈尔滨银行股份有限公司","哈尔滨工业大学","黑龙江大学","中国移动通信集团黑龙江有限公司","国家电网有限公司黑龙江省电力有限公司","哈尔滨市第一医院"],Ke=(e,t)=>{const n=e.__vccOpts||e;for(const[s,l]of t)n[s]=l;return n};function ev(e,t){var l;if(!e||!t)return null;if(t.key&&e[t.key])return e[t.key];if(t.type&&e[t.type])return e[t.type];const n=typeof t.render=="string"?t.render:"";if(n&&e[n])return e[n];const s=typeof((l=t.props)==null?void 0:l.customControl)=="string"?t.props.customControl:"";return s&&e[s]?e[s]:null}const tv=[{id:"default",label:"金融蓝",brandColor:"#0F52BA",brandSoft:"#EEF4FF"},{id:"bank-red",label:"银行红",brandColor:"#C81E32",brandSoft:"#FEF2F2"},{id:"gov-navy",label:"政务深蓝",brandColor:"#1E3A8A",brandSoft:"#EFF6FF"},{id:"emerald",label:"普惠青绿",brandColor:"#047857",brandSoft:"#ECFDF5"}],Dt={"fin-minimal":{id:"fin-minimal",name:"A · 现代金融极简风",shortName:"A 金融极简",tagline:"大留白、微标签上置、零折行、呼吸感卡片与底部抽屉",inspiration:"Apple HIG Inset Grouped + Stripe / Wise",defaultLabelAlign:"top",vars:{"--fs-page-bg":"#F5F6FA","--fs-card-bg":"#FFFFFF","--fs-card-radius":"16px","--fs-card-border":"1px solid rgba(15, 23, 42, 0.06)","--fs-card-shadow":"0 2px 12px rgba(15, 23, 42, 0.035)","--fs-brand":"#0F52BA","--fs-brand-soft":"#EEF4FF","--fs-brand-ring":"rgba(15, 82, 186, 0.14)","--fs-error":"#DC2626","--fs-error-soft":"#FEF2F2","--fs-warning":"#D97706","--fs-warning-soft":"#FFFBEB","--fs-success":"#059669","--fs-success-soft":"#ECFDF5","--fs-text":"#0F172A","--fs-text-sub":"#475569","--fs-text-muted":"#94A3B8","--fs-divider":"rgba(15, 23, 42, 0.07)","--fs-input-bg":"transparent","--fs-input-border":"transparent","--fs-input-radius":"0px","--fs-field-py":"14px"}},"clean-outline":{id:"clean-outline",name:"B · 极简线框高效风",shortName:"B 极简线框",tagline:"独立细框输入域 + 聚焦蓝环,高信息密度,PC/移动一致",inspiration:"Stripe Elements + shadcn / Linear",defaultLabelAlign:"top",vars:{"--fs-page-bg":"#F8FAFC","--fs-card-bg":"#FFFFFF","--fs-card-radius":"12px","--fs-card-border":"1px solid #E2E8F0","--fs-card-shadow":"0 1px 2px rgba(15, 23, 42, 0.04)","--fs-brand":"#2563EB","--fs-brand-soft":"#EFF6FF","--fs-brand-ring":"rgba(37, 99, 235, 0.16)","--fs-error":"#DC2626","--fs-error-soft":"#FEF2F2","--fs-warning":"#D97706","--fs-warning-soft":"#FFFBEB","--fs-success":"#059669","--fs-success-soft":"#ECFDF5","--fs-text":"#09090B","--fs-text-sub":"#3F3F46","--fs-text-muted":"#A1A1AA","--fs-divider":"#F1F5F9","--fs-input-bg":"#FFFFFF","--fs-input-border":"#CBD5E1","--fs-input-radius":"8px","--fs-field-py":"10px"}},"bank-card":{id:"bank-card",name:"C · 国民银行卡片风",shortName:"C 国民银行",tagline:"左粗标右对齐、安全加密信任背书、大触控热区、零学习成本",inspiration:"Vant 4 Inset + 招行 / 支付宝金融表单",defaultLabelAlign:"left",showTrustBar:!0,vars:{"--fs-page-bg":"#F4F5F7","--fs-card-bg":"#FFFFFF","--fs-card-radius":"14px","--fs-card-border":"1px solid rgba(0, 0, 0, 0.04)","--fs-card-shadow":"0 2px 8px rgba(0, 0, 0, 0.03)","--fs-brand":"#1677FF","--fs-brand-soft":"#E6F4FF","--fs-brand-ring":"rgba(22, 119, 255, 0.15)","--fs-error":"#FF4D4F","--fs-error-soft":"#FFF2F0","--fs-warning":"#FA8C16","--fs-warning-soft":"#FFF7E6","--fs-success":"#00B578","--fs-success-soft":"#E8FFF3","--fs-text":"#111827","--fs-text-sub":"#4B5563","--fs-text-muted":"#9CA3AF","--fs-divider":"#F0F1F3","--fs-input-bg":"transparent","--fs-input-border":"transparent","--fs-input-radius":"0px","--fs-field-py":"14px"}}},nv=[Dt["fin-minimal"],Dt["clean-outline"],Dt["bank-card"]];function Ao(e,t){const n=e.trim().match(/^#([0-9a-fA-F]{6})$/);if(!n)return`rgba(15, 82, 186, ${t})`;const s=parseInt(n[1],16),l=s>>16&255,a=s>>8&255,i=s&255;return`rgba(${l}, ${a}, ${i}, ${t})`}function Mo(e,t){const s={...(Dt[e]||Dt["fin-minimal"]).vars};if(!t)return s;if(t.brandColor&&t.brandColor.trim()){const l=t.brandColor.trim();s["--fs-brand"]=l,s["--fs-brand-soft"]=t.brandSoft||Ao(l,.09),s["--fs-brand-ring"]=Ao(l,.16)}else t.brandSoft&&(s["--fs-brand-soft"]=t.brandSoft);return t.cardRadius&&(s["--fs-card-radius"]=t.cardRadius),t.density==="compact"?s["--fs-field-py"]="9px":t.density==="comfortable"&&(s["--fs-field-py"]="15px"),s}function sv(e,t){return typeof(t==null?void 0:t.showTrustBar)=="boolean"?t.showTrustBar:!!(Dt[e]||Dt["fin-minimal"]).showTrustBar}function Eo(e){return e===!0?!0:Array.isArray(e)?e.length>0:e&&typeof e=="object"?Object.values(e).some(t=>t!=null&&String(t).trim()!==""):typeof e=="string"?e.trim()!=="":typeof e=="number"?Number.isFinite(e):!1}function lv(e,t){let n=0,s=0,l=0,a=0;const i=[],r=[];for(const u of e||[]){let c=0,d=0,v=0,$=0;const x=[];for(const A of u.items||[]){const w=t==null?void 0:t[A.key];if(w&&w.visible===!1)continue;c+=1,n+=1;const O=Eo(w==null?void 0:w.value);O&&(d+=1,s+=1),(typeof(w==null?void 0:w.required)=="boolean"?w.required:A.required===!0||Array.isArray(A.rules)&&A.rules.some(b=>(b==null?void 0:b.type)==="required"))&&(v+=1,l+=1,O?($+=1,a+=1):(x.push(A.key),i.push(A.key)))}r.push({groupKey:u.key,title:u.title||u.key,total:c,filled:d,requiredTotal:v,requiredFilled:$,missingRequiredKeys:x})}const o=n>0?Math.round(s/n*100):0;return{total:n,filled:s,percent:o,requiredTotal:l,requiredFilled:a,missingRequiredKeys:i,firstMissingRequiredKey:i[0]||null,groups:r}}function av(e,t){const n=String(e??"").trim();if(!n||!/^-?\d+(\.\d+)?$/.test(n))return"";const s=Number(n);if(!Number.isFinite(s)||s<=0)return"";const l=String(t||"");if(!/金额|额度|收入|资产|负债|流水|租金|年薪|月薪|估值|房价|贷款|元/.test(l))return"";const i=s.toLocaleString("zh-CN",{maximumFractionDigits:2});if(/万元/.test(l))return`约 ${i} 万元`;if(s>=1e4){const r=(s/1e4).toLocaleString("zh-CN",{maximumFractionDigits:2});return`千分位:${i}(约 ${r} 万)`}return`千分位:${i}`}function iv(e){var l;if(!e)return"text";const t=String(e.type||"").toLowerCase(),n=String(((l=e.props)==null?void 0:l.keyboardType)||"").toLowerCase(),s=String(e.key||"").toLowerCase();return t==="idcard"||n==="idcard"?"idcard":n==="digit"||t==="number"?"digit":t==="phone"||t==="bankcard"||t==="verifycode"||n==="number"?"number":/id_?card|cert_?no/.test(s)&&t==="input"?"idcard":"text"}function rv(e,t="auto"){return e==="text"||t==="native-only"?!1:t==="always-custom"?!0:e==="idcard"}function Fo(e,t){const n=wt(t);switch(e){case"idcard":return{title:n.keyboardTitleIdcard,badge:n.keyboardBadgeIdcard,extraKey:"X"};case"digit":return{title:n.keyboardTitleDigit,badge:n.keyboardBadgeDigit,extraKey:"."};case"number":return{title:n.keyboardTitleNumber,badge:n.keyboardBadgeNumber,extraKey:""};default:return{title:n.keyboardTitleDefault,badge:"",extraKey:""}}}function Io(e,t,n){const s=String(e??""),l=typeof(n==null?void 0:n.maxlength)=="number"&&n.maxlength>0?n.maxlength:void 0;if(t==="idcard"){const a=s.replace(/[^0-9xX]/g,"").toUpperCase();let i="";for(let r=0;r<a.length;r++){const o=a[r];if(o==="X"?i.length===17&&(i+="X"):i+=o,i.length>=(l??18))break}return i}if(t==="number"){const a=s.replace(/\D/g,"");return l?a.slice(0,l):a}if(t==="digit"){const a=typeof(n==null?void 0:n.decimalPlaces)=="number"?n.decimalPlaces:2;let i=s.replace(/[^0-9.]/g,"");i.startsWith(".")&&(i=`0${i}`);const r=i.indexOf(".");if(r>=0){const o=i.slice(0,r),u=i.slice(r+1).replace(/\./g,"").slice(0,Math.max(0,a));i=`${o}.${u}`}return l?i.slice(0,l):i}return l?s.slice(0,l):s}function Do(e,t){const n=String(e??"").trim();if(!n||!t)return n;const s=String(t.type||"").toLowerCase(),l=String(t.key||"").toLowerCase();if(s==="phone"||/phone|mobile/.test(l)&&/^1\d{3,10}$/.test(n)){const a=n.replace(/\D/g,"").slice(0,11);return a.length<=3?a:a.length<=7?`${a.slice(0,3)} ${a.slice(3)}`:`${a.slice(0,3)} ${a.slice(3,7)} ${a.slice(7)}`}if(s==="bankcard"||/bank_?card/.test(l))return n.replace(/\D/g,"").replace(/(.{4})(?=.)/g,"$1 ");if(s==="idcard"||/id_?card|cert_?no/.test(l)){const a=n.replace(/\s+/g,"").toUpperCase();return a.length<=6?a:a.length<=14?`${a.slice(0,6)} ${a.slice(6)}`:`${a.slice(0,6)} ${a.slice(6,14)} ${a.slice(14)}`}return n}function ov(e,t){return t==="text"?e:String(e??"").replace(/\s+/g,"")}function cv(e){if(!e)return!1;const t=String(e.type||"").toLowerCase(),n=String(e.key||"").toLowerCase(),s=String(e.label||"");return!!(t==="phone"||t==="idcard"||t==="bankcard"||/phone|mobile|id_?card|cert_?no|bank_?card/.test(n)||/手机号|联系电话|身份证|证件号|银行卡/.test(s))}function uv(e,t){const n=String(e??"").trim().replace(/\s+/g,"");if(!n||!t)return n;const s=String(t.type||"").toLowerCase(),l=String(t.key||"").toLowerCase(),a=String(t.label||"");return s==="phone"||/phone|mobile/.test(l)||/手机|电话/.test(a)?n.length>=7?`${n.slice(0,3)}****${n.slice(-4)}`:n:s==="idcard"||/id_?card|cert_?no/.test(l)||/身份证|证件号/.test(a)?n.length>=10?`${n.slice(0,4)}${"*".repeat(Math.max(4,n.length-8))}${n.slice(-4)}`:n:(s==="bankcard"||/bank_?card/.test(l)||/银行卡/.test(a))&&n.length>=8?`${n.slice(0,4)} **** **** ${n.slice(-4)}`:n}function Po(e,t){const n=e==null?void 0:e[t];return n&&typeof n=="object"?String(n.code??n.name??"").trim():n==null?"":String(n).trim()}function Oo(e,t,n){var x,A;const s=wt(n),l=Array.isArray(t)?t:[],a=e.subItems||((x=e.props)==null?void 0:x.subItems)||[],i=e.listMeta||((A=e.props)==null?void 0:A.listMeta)||{},r={};let o="",u=null;const c=typeof i.minItems=="number"?i.minItems:0;l.length<c&&(o=s.listMinError(c,e.label||""));const d=(w,O,y)=>{r[w]||(r[w]={}),r[w][O]||(r[w][O]=y,u||(u={rowIndex:w,subKey:O}))};for(let w=0;w<l.length;w++){const O=l[w]||{};for(const y of a){const b=Po(O,y.key),C=Array.isArray(y.rules)?y.rules:[],B=C.find(D=>D.type==="required");if((y.required||B)&&!b){d(w,y.key,(B==null?void 0:B.message)||s.listSubRequired(y.label||y.key));continue}if(b){for(const D of C)if(D.type==="regex"&&D.regex)try{if(!new RegExp(D.regex).test(b)){d(w,y.key,D.message||s.listSubRegex(y.label||y.key));break}}catch{}}}}const v=Array.isArray(i.uniqueKeys)&&i.uniqueKeys.length>0?i.uniqueKeys:a.filter(w=>w.type==="phone"||w.type==="idcard"||/phone|mobile|id_?card/i.test(w.key)).map(w=>w.key);for(const w of v){const O=new Map,y=a.find(b=>b.key===w);for(let b=0;b<l.length;b++){const C=Po(l[b],w);C&&(O.has(C)?d(b,w,s.listSubDuplicate((y==null?void 0:y.label)||w,O.get(C)+1)):O.set(C,b))}}return{valid:!o&&Object.keys(r).length===0,listError:o,rowErrors:r,firstErrorPath:u}}function dv(){const e=[],t={};let n=0,s=0,l=0;const a=u=>(t[u]||(t[u]={fieldKey:u,focusCount:0,totalDwellMs:0,errorCount:0}),t[u]);return{events:e,record:u=>{if(e.push(u),u.fieldKey){const c=a(u.fieldKey);u.type==="field_focus"&&(c.focusCount+=1),u.type==="field_blur"&&typeof u.durationMs=="number"&&u.durationMs>=0&&(c.totalDwellMs+=u.durationMs),u.type==="field_error"&&(c.errorCount+=1,u.errorMessage&&(c.lastError=u.errorMessage))}u.type==="step_change"&&(l+=1),u.type==="submit_blocked"&&(n+=1),u.type==="submit_passed"&&(s+=1)},getSummary:()=>{const u=Object.values(t).filter(c=>c.errorCount>0).sort((c,d)=>d.errorCount-c.errorCount).slice(0,5);return{totalEvents:e.length,submitBlockedCount:n,submitPassedCount:s,stepChanges:l,topErrorFields:u,byField:{...t}}},clear:()=>{e.length=0;for(const u of Object.keys(t))delete t[u];n=0,s=0,l=0}}}const fv=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2],vv=["1","0","X","9","8","7","6","5","4","3","2"];function pv(e,t){const n=wt(t==null?void 0:t.locale),s=String(e??"").trim().replace(/\s+/g,"").toUpperCase();if(!s)return{valid:!0};if(!/^[1-9]\d{16}[\dX]$/.test(s))return{valid:!1,reason:n.valIdcardFormat};const l=Number(s.slice(6,10)),a=Number(s.slice(10,12)),i=Number(s.slice(12,14));if(l<1900||l>2099||a<1||a>12||i<1||i>31)return{valid:!1,reason:n.valIdcardBirthInvalid};const r=new Date(l,a-1,i);if(r.getFullYear()!==l||r.getMonth()!==a-1||r.getDate()!==i)return{valid:!1,reason:n.valIdcardBirthNonexistent};let o=0;for(let c=0;c<17;c++)o+=Number(s[c])*fv[c];const u=vv[o%11];return s[17]!==u?{valid:!1,reason:n.valIdcardChecksum}:{valid:!0}}function hv(e,t){const n=wt(t==null?void 0:t.locale),s=String(e??"").trim().replace(/\s+/g,"");if(!s)return{valid:!0};if(!/^\d{15,19}$/.test(s))return{valid:!1,reason:n.valBankCardLength};let l=0,a=!1;for(let i=s.length-1;i>=0;i--){let r=Number(s[i]);a&&(r*=2,r>9&&(r-=9)),l+=r,a=!a}return l%10!==0?{valid:!1,reason:n.valBankCardLuhn}:{valid:!0}}function Ro(e,t){const n=wt(t==null?void 0:t.locale),s=String(e??"").trim().replace(/[\s-]/g,"");return s?t!=null&&t.allowInternational&&/^\+\d{7,15}$/.test(s)?{valid:!0}:/^1[3-9]\d{9}$/.test(s)?{valid:!0}:{valid:!1,reason:n.valMobileInvalid}:{valid:!0}}function mv(e,t){const n=wt(t==null?void 0:t.locale),s=String(e??"").trim();if(!s)return{valid:!0};const l=Number(s);return Number.isFinite(l)?(t==null?void 0:t.allowNegative)===!1&&l<0?{valid:!1,reason:n.valNumberNegative}:typeof(t==null?void 0:t.min)=="number"&&l<t.min?{valid:!1,reason:n.valNumberMin(t.min)}:typeof(t==null?void 0:t.max)=="number"&&l>t.max?{valid:!1,reason:n.valNumberMax(t.max)}:{valid:!0}:{valid:!1,reason:n.valNumberInvalid}}function gv(e,t){const n=wt(t==null?void 0:t.locale);if(!e)return{valid:!0};let s="",l="";if(Array.isArray(e))s=String(e[0]||"").trim(),l=String(e[1]||"").trim();else if(typeof e=="object"){const i=e;s=String(i.start||"").trim(),l=String(i.end||"").trim()}if(!s&&!l)return{valid:!0};if(s&&(t!=null&&t.minDate)&&s<t.minDate)return{valid:!1,reason:n.valDateBeforeMin(t.minDate)};const a=l==="long_term"||l==="长期"||l==="Long-term";return a&&(t==null?void 0:t.allowLongTerm)===!1?{valid:!1,reason:n.valDateNoLongTerm}:l&&!a&&(t!=null&&t.maxDate)&&l>t.maxDate?{valid:!1,reason:n.valDateAfterMax(t.maxDate)}:s&&l&&!a&&s>l?{valid:!1,reason:n.valDateEndBeforeStart}:{valid:!0}}function yv(e,t){const n=wt(t==null?void 0:t.locale),s=typeof(t==null?void 0:t.maxSizeMB)=="number"&&t.maxSizeMB>0?t.maxSizeMB:10;if(typeof e.size=="number"&&e.size>s*1024*1024)return{valid:!1,reason:n.valFileSizeExceeded(s)};if(Array.isArray(t==null?void 0:t.accept)&&t.accept.length>0&&e.name){const l=e.name.toLowerCase(),a=t.accept.map(r=>r.toLowerCase().trim()).filter(Boolean);if(!a.some(r=>r.startsWith(".")?l.endsWith(r):r.endsWith("/*")&&e.type?e.type.toLowerCase().startsWith(r.slice(0,-1)):l.endsWith(`.${r}`)))return{valid:!1,reason:n.valFileTypeNotAllowed(a.join(" / "))}}return{valid:!0}}function Lo(e,t,n){if(t==null||t==="")return{valid:!0};const s=String(e.type||""),l=e.props||{};return s==="idcard"||l.validateAlgorithm==="cn-idcard"?pv(String(t),{locale:n}):s==="bankCard"||l.validateAlgorithm==="luhn"?hv(String(t),{locale:n}):s==="phone"||l.validateAlgorithm==="cn-mobile"?Ro(String(t),{allowInternational:!!l.allowInternational,locale:n}):s==="number"||s==="stepper"?mv(t,{min:typeof l.min=="number"?l.min:void 0,max:typeof l.max=="number"?l.max:void 0,allowNegative:l.allowNegative,locale:n}):s==="dateRange"?gv(t,{minDate:l.minDate,maxDate:l.maxDate,allowLongTerm:l.allowLongTerm,locale:n}):{valid:!0}}const Wa=Symbol("formRenderModernSkin"),No=Symbol("formRenderModernThemeOverride"),Vo=Symbol("formRenderModernCollapsible"),Bo=Symbol("formRenderModernKeyboardPolicy"),jo=Symbol("formRenderModernReadonly"),Ko=Symbol("formRenderModernTelemetry"),ts=Symbol("formRenderModernLocale"),bv=Symbol("formRenderModernCustomControls"),_v=["aria-label"],kv={class:"fs-sheet__header"},Cv={class:"fs-sheet__title"},Sv={key:1,class:"fs-sheet__spacer"},wv={key:0,class:"fs-sheet__search-wrap"},Tv=["value","placeholder"],xv={class:"fs-sheet__body"},Rs=Ke(Pe({__name:"ModernBottomSheet",props:{visible:{type:Boolean},title:{},confirmText:{},cancelText:{},showConfirm:{type:Boolean},searchable:{type:Boolean},searchPlaceholder:{}},emits:["update:visible","confirm","cancel","search"],setup(e,{emit:t}){const n=e,s=je(ts,"zh-CN"),l=E(()=>wt(Kt(Me(s)))),a=t,i=H("");ut(()=>n.visible,d=>{d||(i.value="",a("search",""))});function r(d){const v=d.target.value;i.value=v,a("search",v)}function o(){a("update:visible",!1),a("cancel")}function u(){a("confirm")}const c=E(()=>n.showConfirm===!0);return(d,v)=>(p(),st(fl,{to:"body"},[e.visible?(p(),h("div",{key:0,class:"fs-sheet-mask",onClick:lt(o,["self"])},[f("div",{class:"fs-sheet",role:"dialog","aria-label":e.title},[v[0]||(v[0]=f("div",{class:"fs-sheet__handle"},null,-1)),f("div",kv,[f("button",{type:"button",class:"fs-sheet__action",onClick:o},k(e.cancelText||l.value.cancel),1),f("div",Cv,k(e.title),1),c.value?(p(),h("button",{key:0,type:"button",class:"fs-sheet__action fs-sheet__action--primary",onClick:u},k(e.confirmText||l.value.confirm),1)):(p(),h("span",Sv))]),e.searchable?(p(),h("div",wv,[f("input",{value:i.value,type:"search",class:"fs-sheet__search",placeholder:e.searchPlaceholder||l.value.searchPlaceholder,onInput:r},null,40,Tv)])):V("",!0),f("div",xv,[ur(d.$slots,"default",{},void 0)])],8,_v)])):V("",!0)]))}}),[["__scopeId","data-v-19936a67"]]),$v=["data-keyboard-kind"],Av=["aria-label"],Mv={class:"fs-kb-head"},Ev={class:"fs-kb-head__left"},Fv={class:"fs-kb-title"},Iv={key:0,class:"fs-kb-field"},Dv={class:"fs-kb-head__right"},Pv={class:"fs-kb-preview"},Ov={key:0,class:"fs-kb-preview__len"},Rv={class:"fs-kb-grid"},Lv=["data-kb-key","onClick"],Uo=Ke(Pe({__name:"ModernNumberKeyboard",props:{visible:{type:Boolean},kind:{},label:{default:""},displayValue:{default:""},maxlength:{default:void 0}},emits:["update:visible","key","backspace","clear","done","switch-native"],setup(e,{emit:t}){const n=e,s=t,l=je(ts,"zh-CN"),a=E(()=>Kt(Me(l))),i=E(()=>wt(a.value)),r=E(()=>Fo(n.kind,a.value)),o=E(()=>["1","2","3","4","5","6","7","8","9",r.value.extraKey||"__clear__","0","__del__"]);function u(d){d==="__del__"?s("backspace"):d==="__clear__"?s("clear"):s("key",d)}function c(){s("done"),s("update:visible",!1)}return(d,v)=>(p(),st(fl,{to:"body"},[Ge(Es,{name:"fs-kb-slide"},{default:jt(()=>[e.visible?(p(),h("div",{key:0,class:"fs-kb-wrap","data-testid":"modern-number-keyboard","data-keyboard-kind":e.kind},[f("div",{class:"fs-kb-backdrop",onClick:c}),f("div",{class:"fs-kb-panel",role:"dialog","aria-label":r.value.title},[f("div",Mv,[f("div",Ev,[v[2]||(v[2]=f("span",{class:"fs-kb-shield"},"🛡",-1)),f("span",Fv,k(r.value.title),1),e.label?(p(),h("span",Iv,"· "+k(e.label),1)):V("",!0)]),f("div",Dv,[f("button",{type:"button",class:"fs-kb-native","data-testid":"modern-kb-switch-native",onClick:v[0]||(v[0]=$=>s("switch-native"))},k(i.value.systemKeyboard),1),f("button",{type:"button",class:"fs-kb-done",onClick:c},k(i.value.done),1)])]),f("div",Pv,[f("span",{class:se(["fs-kb-preview__val",{"is-empty":!e.displayValue}])},k(e.displayValue||i.value.keyboardTapHint),3),e.maxlength?(p(),h("span",Ov,k(e.displayValue.replace(/\s+/g,"").length)+"/"+k(e.maxlength),1)):V("",!0)]),f("div",Rv,[(p(!0),h(le,null,_e(o.value,$=>(p(),h("button",{key:$,type:"button",class:se(["fs-kb-key",{"is-fn":$==="__del__"||$==="__clear__"||$==="X"||$==="."}]),"data-kb-key":$,onMousedown:v[1]||(v[1]=lt(()=>{},["prevent"])),onClick:x=>u($)},[$==="__del__"?(p(),h(le,{key:0},[Je("⌫")],64)):$==="__clear__"?(p(),h(le,{key:1},[Je(k(i.value.clear),1)],64)):(p(),h(le,{key:2},[Je(k($),1)],64))],42,Lv))),128))])],8,Av)],8,$v)):V("",!0)]),_:1})]))}}),[["__scopeId","data-v-0b880d74"]]),Nv={class:"fs-sig","data-testid":"modern-signature-pad"},Vv={class:"fs-sig__hint"},Bv={class:"fs-sig__box"},jv={key:0,class:"fs-sig__watermark"},Kv={class:"fs-sig__actions"},Uv={class:"fs-sig__tip"},Hv=Ke(Pe({__name:"ModernSignaturePad",props:{visible:{type:Boolean},title:{default:""}},emits:["update:visible","confirm"],setup(e,{emit:t}){const n=e,s=je(ts,"zh-CN"),l=E(()=>wt(Kt(Me(s)))),a=t,i=H(null),r=H(!1);let o=!1,u=null;function c(){const O=i.value;if(!O)return;const y=O.getBoundingClientRect(),b=Math.max(window.devicePixelRatio||1,2),C=Math.max(280,Math.round(y.width||320)),B=190;O.width=C*b,O.height=B*b,u=O.getContext("2d"),u&&(u.scale(b,b),u.fillStyle="#FFFFFF",u.fillRect(0,0,C,B),u.strokeStyle="#0F172A",u.lineWidth=2.6,u.lineCap="round",u.lineJoin="round",r.value=!1)}ut(()=>n.visible,async O=>{O&&(await zn(),c())});function d(O){const b=i.value.getBoundingClientRect();return{x:O.clientX-b.left,y:O.clientY-b.top}}function v(O){var b,C;if(!u||!i.value)return;(C=(b=i.value).setPointerCapture)==null||C.call(b,O.pointerId),o=!0;const y=d(O);u.beginPath(),u.moveTo(y.x,y.y),u.lineTo(y.x+.1,y.y+.1),u.stroke(),r.value=!0}function $(O){if(!o||!u)return;const y=d(O);u.lineTo(y.x,y.y),u.stroke()}function x(){o=!1}function A(){c()}function w(){if(!i.value||!r.value)return;const O=i.value.toDataURL("image/png");a("confirm",O),a("update:visible",!1)}return(O,y)=>(p(),st(Rs,{visible:e.visible,title:e.title||l.value.signatureTitle,"show-confirm":!0,"confirm-text":l.value.signatureConfirm,"onUpdate:visible":y[0]||(y[0]=b=>a("update:visible",b)),onConfirm:w},{default:jt(()=>[f("div",Nv,[f("div",Vv,k(l.value.signatureHint),1),f("div",Bv,[f("canvas",{ref_key:"canvasRef",ref:i,class:"fs-sig__canvas",onPointerdown:v,onPointermove:$,onPointerup:x,onPointercancel:x},null,544),r.value?V("",!0):(p(),h("span",jv,k(l.value.signatureWatermark),1))]),f("div",Kv,[f("button",{type:"button",class:"fs-sig__clear",onClick:A},k(l.value.signatureClear),1),f("span",Uv,k(r.value?l.value.signatureReadyTip:l.value.signatureEmptyTip),1)])])]),_:1},8,["visible","title","confirm-text"]))}}),[["__scopeId","data-v-58065aef"]]),qv=["data-modern-skin","data-field-key","data-has-error"],Wv={key:0,class:"fs-review","data-testid":"modern-review-row"},Gv={class:"fs-review__head"},zv={class:"fs-review__label"},Yv={key:0,class:"fs-review__val-row"},Jv=["src","alt"],Xv={key:1,class:"fs-review__val-row"},Zv={key:0,class:"fs-upload-grid"},Qv=["src","alt"],ep={key:1,class:"fs-review__empty"},tp={key:2,class:"fs-review__list"},np={key:0,class:"fs-review__empty"},sp={class:"fs-review__subhead"},lp={class:"fs-review__subk"},ap={class:"fs-review__subv"},ip={class:"fs-task-row__left"},rp={key:0,viewBox:"0 0 16 16",fill:"none"},op={key:1,viewBox:"0 0 16 16",fill:"none"},cp={class:"fs-task-row__meta"},up={class:"fs-task-row__label"},dp={key:0,class:"fs-req"},fp={class:"fs-task-row__sub"},vp={class:"fs-task-row__right"},pp=["src","alt"],hp={key:0,class:"fs-chevron"},mp={key:2,class:"fs-agree"},gp=["disabled"],yp={key:0,viewBox:"0 0 14 14",fill:"none"},bp={class:"fs-agree__body"},_p={key:0,class:"fs-req"},kp={key:0,class:"fs-agree__links"},Cp=["onClick"],Sp={class:"fs-doc-body"},wp={key:3,class:"fs-row"},Tp={class:"fs-label"},xp={key:0,class:"fs-req"},$p={class:"fs-control-wrap"},Ap={key:0,class:"fs-custom-control","data-custom-control":"1"},Mp={key:1,class:"fs-input-box fs-input-box--area"},Ep=["value","placeholder","disabled","maxlength"],Fp={key:0,class:"fs-counter"},Ip={key:0,class:"fs-affix fs-affix--prefix"},Dp=["value","type","inputmode","readonly","placeholder","disabled","maxlength","data-keyboard-kind"],Pp={key:1,class:"fs-affix fs-affix--suffix"},Op=["title"],Rp=["title"],Lp=["aria-label"],Np={key:0,class:"fs-fintech-hint"},Vp={key:0,class:"fs-sheet-empty"},Bp={key:1,class:"fs-sheet-empty"},jp={key:2,class:"fs-opt-list"},Kp=["onClick"],Up={key:0,class:"fs-opt-check"},Hp={class:"fs-cascader-tabs"},qp=["onClick"],Wp={key:0,class:"fs-sheet-empty"},Gp={key:1,class:"fs-sheet-empty is-err"},zp={key:2,class:"fs-opt-list"},Yp=["onClick"],Jp={key:0,class:"fs-opt-check"},Xp={key:5,class:"fs-search-wrap"},Zp={class:"fs-input-box fs-input-box--search"},Qp=["value","placeholder","disabled"],eh={key:0,class:"fs-search-pop"},th={key:0,class:"fs-search-pop__empty"},nh=["onMousedown"],sh={key:0,class:"fs-daterange","data-testid":"modern-daterange-control"},lh=["disabled"],ah={class:"fs-daterange__sep"},ih=["disabled"],rh={key:0,class:"fs-date-bounds"},oh={class:"fs-date-cols"},ch={class:"fs-date-col"},uh={class:"fs-date-col__head"},dh={class:"fs-date-col__list"},fh=["onClick"],vh={key:0,class:"fs-date-col"},ph={class:"fs-date-col__head"},hh={class:"fs-date-col__list"},mh=["onClick"],gh={key:1,class:"fs-date-col"},yh={class:"fs-date-col__head"},bh={class:"fs-date-col__list"},_h=["onClick"],kh=["value","inputmode","readonly","placeholder","maxlength","disabled"],Ch=["disabled"],Sh={class:"fs-upload-grid"},wh=["src","alt","onClick"],Th=["onClick"],xh={key:0,class:"fs-upload-add"},$h=["accept"],Ah={class:"fs-upload-add__txt"},Mh=["src","alt"],Eh={key:9,class:"fs-files","data-testid":"modern-file-upload"},Fh={class:"fs-file-row__name"},Ih=["onClick"],Dh={key:0,class:"fs-file-add"},Ph=["accept"],Oh={key:10,class:"fs-switch-row","data-testid":"modern-switch-control"},Rh=["aria-checked","disabled"],Lh={class:"fs-switch__txt"},Nh={key:11,class:"fs-chips","data-testid":"modern-radio-group"},Vh=["disabled","onClick"],Bh={key:12,class:"fs-chips","data-testid":"modern-checkbox-group"},jh=["disabled","onClick"],Kh={key:0,class:"fs-chip__chk"},Uh={key:13,class:"fs-stepper-ctrl","data-testid":"modern-stepper-control"},Hh=["disabled"],qh={class:"fs-stepper-num"},Wh={key:0,style:{"font-size":"12px",color:"#64748b","margin-left":"3px","font-weight":"400"}},Gh=["disabled"],zh={key:14,class:"fs-rate","data-testid":"modern-rate-control"},Yh=["disabled","onClick"],Jh={key:0,class:"fs-rate-txt"},Xh={key:15,class:"fs-slider-row"},Zh=["value","min","max","step","disabled"],Qh={class:"fs-slider-val"},em={key:16,class:"fs-list","data-testid":"modern-list-control"},tm={key:0,class:"fs-list__empty"},nm=["data-list-index"],sm={class:"fs-list__card-head"},lm={class:"fs-list__card-title"},am=["onClick"],im={class:"fs-list__subfields"},rm={class:"fs-list__sublabel"},om={key:0,class:"fs-req"},cm=["value","disabled","onChange"],um={value:""},dm=["value"],fm={key:1,class:"fs-chips"},vm=["disabled","onClick"],pm=["disabled","onClick"],hm=["value","disabled","onInput"],mm=["value","type","inputmode","maxlength","placeholder","disabled","onInput"],gm={key:5,class:"fs-list__suberr","data-testid":"modern-list-suberr"},ym={key:17,class:"fs-trigger-box"},bm={class:"fs-trigger-val is-placeholder"},_m={key:1,class:"fs-help"},km=Ke(Pe({__name:"ModernFormItem",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=je(wo,void 0),s=je(Os,void 0),l=je(Wa,"fin-minimal"),a=je(Bo,"auto"),i=je(jo,!1),r=je(Ko,null),o=je(ts,"zh-CN"),u=je(bv,null),c=je("customControls",void 0),d=E(()=>Kt(Me(o))),v=E(()=>wt(d.value)),$=E(()=>{const m=Me(c)||{},_=Me(u)||{};return ev({...m,..._},t.item)});function x(m,_){ce.value="";const I=Ue.value==="error";P(m,_,_?void 0:{skipVerify:!I})}function A(m){var I;const _=m!==void 0?m:(I=t.field)==null?void 0:I.value;P(_,"inputBlur")}const w=E(()=>{const m=Me(l);return m&&Dt[m]?m:"fin-minimal"}),O=E(()=>Me(a)||"auto"),y=E(()=>!!Me(i)),b=E(()=>{const m=Me(r);return typeof m=="function"?m:null});let C=0;function B(m,_){var I;(I=b.value)==null||I.call(b,{type:m,timestamp:Date.now(),fieldKey:t.item.key,fieldType:t.item.type,..._})}const D=E(()=>cv(t.item)),U=H(!1),q=E(()=>s?Me(s):null),R=E(()=>n?Me(n):Nl),j=E(()=>Ff(t.item.type)),J=E(()=>Yf(t.item)),S=E(()=>t.item.props||{}),G=E(()=>{var m;return!!((m=t.field)!=null&&m.disabled||t.item.disabled)}),he=E(()=>{var m,_;return typeof((m=t.field)==null?void 0:m.required)=="boolean"?t.field.required:t.item.required===!0||((_=t.item.rules)==null?void 0:_.some(I=>I.type==="required"))}),Le=E(()=>Uf(t.item.labelPosition,R.value)),Ie=E(()=>t.item.type==="textarea"||t.item.type==="imageUpload"||t.item.type==="fileUpload"||t.item.type==="agreement"||t.item.type==="list"||t.item.type==="radioGroup"||t.item.type==="checkboxGroup"||t.item.type==="dateRange"?!0:Le.value==="top"),$e=E(()=>Hf(t.item.labelWidth,R.value)),ce=H(""),Ce=H(!1),Xe=H(!1),ze=H(!1),qe=E(()=>{var _,I;if((_=t.field)!=null&&_.errMsg||ce.value||Ce.value&&ze.value&&!Xe.value)return"";const m=Lo(t.item,(I=t.field)==null?void 0:I.value,d.value);return m.valid?"":m.reason||""}),Ue=E(()=>{var m,_;return(m=t.field)!=null&&m.errMsg||ce.value||qe.value?"error":(_=t.field)!=null&&_.warningMsg?"warning":"default"});function xt(m){return m?/共用业务|高频独立|fieldKey=|语料|绑定\s*\d+\s*个字段/.test(m):!1}const Jt=E(()=>{const m=String(t.item.help||"").trim();return!m||xt(m)?"":m}),kt=E(()=>{var m,_;return((m=t.field)==null?void 0:m.errMsg)||ce.value||qe.value||((_=t.field)==null?void 0:_.warningMsg)||""}),ke=H("");ut(()=>{var m;return(m=t.field)==null?void 0:m.value},m=>{m&&typeof m=="object"&&"name"in m?ke.value=String(m.name??""):ke.value=m==null?"":String(m)},{immediate:!0});function P(m,_,I){t.formCore.setControlData(t.item.key,m,{eventType:_,...I!=null&&I.skipVerify?{skipVerify:!0}:{},...I!=null&&I.skipRelation?{skipRelation:!0}:{}}),B("field_change")}ut(()=>{var m;return(m=t.field)==null?void 0:m.errMsg},(m,_)=>{m&&m!==_&&B("field_error",{errorMessage:String(m)})});const Ct=E(()=>iv(t.item)),ns=E(()=>Fo(Ct.value,d.value)),g=H(!1),T=H(null),L=E(()=>!G.value&&!y.value&&rv(Ct.value,O.value)),Y=E(()=>L.value&&!g.value);function N(){ze.value=!1,g.value=!0,setTimeout(()=>{var m;(m=T.value)==null||m.focus()},30)}function z(){g.value=!1,Ce.value=!0,ze.value=!0}const ne=E(()=>{const m=String(S.value.keyboardType||"").toLowerCase();return m==="number"||m==="digit"?"text":t.item.type==="phone"?"tel":"text"}),te=E(()=>{if(Y.value)return"none";const m=String(S.value.keyboardType||"").toLowerCase();return m==="digit"?"decimal":m==="number"?"numeric":t.item.type==="number"?"decimal":t.item.type==="phone"||t.item.type==="bankCard"?"numeric":"text"}),X=E(()=>typeof S.value.maxlength=="number"?S.value.maxlength:void 0),W=E(()=>typeof S.value.decimalPlaces=="number"?S.value.decimalPlaces:2),ue=E(()=>S.value.clearable!==!1),Z=E(()=>av(ke.value,t.item.label)),re=E(()=>Ce.value&&!Y.value?ke.value:Do(ke.value,t.item));function fe(){Xe.value=Ue.value==="error",Ce.value=!0,C=Date.now(),B("field_focus"),Y.value&&(ze.value=!0)}function ye(){Y.value&&(Ce.value||(Xe.value=Ue.value==="error"),Ce.value=!0,C||(C=Date.now(),B("field_focus")),ze.value=!0)}function Se(m){const _=m.target;if(t.item.type==="textarea"){ke.value=_.value,(Ue.value==="error"||Xe.value)&&(ce.value="",P(_.value,void 0,{skipRelation:!0}));return}const I=ov(_.value,Ct.value),pe=Io(I,Ct.value,{maxlength:X.value,decimalPlaces:W.value});ke.value=pe,_.value!==pe&&(_.value=pe),(Ue.value==="error"||Xe.value)&&(ce.value="",P(pe,void 0,{skipRelation:!0}))}function we(){ze.value||(Ce.value=!1,Xe.value=!1,ce.value="",C&&(B("field_blur",{durationMs:Date.now()-C}),C=0),P((ke.value||"").trim(),"inputBlur"))}function De(){ke.value="",ce.value="",P("","inputBlur")}function Ye(m){const _=Io(`${ke.value}${m}`,Ct.value,{maxlength:X.value,decimalPlaces:W.value});ke.value=_,ce.value="";const I=Ue.value==="error"||Xe.value;P(_,void 0,{skipVerify:!I,skipRelation:!0})}function ht(){const m=ke.value.slice(0,-1);ke.value=m,ce.value="";const _=Ue.value==="error"||Xe.value;P(m,void 0,{skipVerify:!_,skipRelation:!0})}function ft(){ke.value="",ce.value="";const m=Ue.value==="error"||Xe.value;P("",void 0,{skipVerify:!m,skipRelation:!0})}function Xt(){ze.value=!1,Ce.value=!1,Xe.value=!1,C&&(B("field_blur",{durationMs:Date.now()-C}),C=0),P((ke.value||"").trim(),"inputBlur")}const Zt=E(()=>To(t.field)),tt=E(()=>J.value?Jf(J.value,t.field,d.value):v.value.taskGoDefault),nt=H(!1),Ut=E(()=>{var _;const m=(_=t.field)==null?void 0:_.value;return m&&typeof m=="object"&&typeof m.signatureDataUrl=="string"?String(m.signatureDataUrl):""});function Qt(m){P({code:"signed",name:v.value.signatureDoneName,signatureDataUrl:m},"pickChange")}async function Bl(){var _;if(G.value||y.value||!J.value)return;const m=(_=q.value)==null?void 0:_.launchTask;if(typeof m=="function"){try{const I=await m({key:t.item.key,taskType:J.value.taskType,taskCategory:J.value.taskCategory,item:t.item,field:t.field});if(I&&typeof I=="object"&&I.useBuiltInSignaturePad){nt.value=!0;return}I!==void 0&&P(I,"pickChange")}catch{}return}J.value.taskType==="signature"&&(nt.value=!0)}const Vn=H([]),Ls=H(!1),Bn=H(!1),Ns=H(""),Pt=H([]),ss=E(()=>S.value.isSingle===!1||S.value.multiple===!0),en=E(()=>{var I;const m=(I=t.field)==null?void 0:I.options;if(Array.isArray(m)&&m.length)return m;const _=t.item.initOptions;return Array.isArray(_)&&_.length?_:Vn.value}),Vs=E(()=>{const m=Ns.value.trim().toLowerCase();return m?en.value.filter(_=>String(_.name||"").toLowerCase().includes(m)||String(_.code||"").toLowerCase().includes(m)):en.value}),ls=E(()=>{var _;const m=(_=t.field)==null?void 0:_.value;if(Array.isArray(m))return m.map(I=>I&&typeof I=="object"?I.name||I.code:I).filter(Boolean).join("、");if(m&&typeof m=="object"&&"name"in m)return String(m.name||"");if(m!=null&&m!==""){const I=en.value.find(pe=>String(pe.code)===String(m));return String(I?I.name:m)}return""});async function F(){var m,_;if(!G.value){if(!en.value.length&&typeof((m=q.value)==null?void 0:m.loadSelectOptions)=="function"){Ls.value=!0;try{const I=await q.value.loadSelectOptions({key:t.item.key,item:t.item,formCore:t.formCore});Array.isArray(I)&&(Vn.value=I)}finally{Ls.value=!1}}if(ss.value){const I=(_=t.field)==null?void 0:_.value;Pt.value=Array.isArray(I)?I.map(pe=>String(pe&&typeof pe=="object"?pe.code:pe)).filter(Boolean):[]}Bn.value=!0}}function M(m){var pe;if(ss.value)return Pt.value.includes(String(m));const _=(pe=t.field)==null?void 0:pe.value,I=_&&typeof _=="object"?_.code:_;return I!=null&&String(I)===String(m)}function Q(m){if(ss.value){const _=String(m.code);Pt.value.includes(_)?Pt.value=Pt.value.filter(I=>I!==_):Pt.value=[...Pt.value,_];return}P({code:m.code,name:m.name},"pickChange"),Bn.value=!1}function oe(){const m=en.value.filter(I=>Pt.value.includes(String(I.code))),_=t.item.valueType==="string"?m.map(I=>String(I.code)):m.map(I=>({code:I.code,name:I.name}));P(_,"pickChange"),Bn.value=!1}const ae=H(!1),ie=H(!1),de=H(""),ee=H([]),xe=H([]),Ne=H(0),We=E(()=>j.value.controlId==="address-control"&&S.value.taskType==="map"),Tn=E(()=>{var _;const m=(_=t.field)==null?void 0:_.value;return Array.isArray(m)&&m.length?m.map(I=>I&&typeof I=="object"?I.name||I.code:I).join(" / "):m&&typeof m=="object"&&"name"in m?String(m.name||""):typeof m=="string"?m:""});function tn(m){return(m||[]).map(_=>({code:String(_.value??_.code??_.adcode??_.name??_.label??""),name:String(_.label??_.name??_.value??_.code??""),child:Array.isArray(_.children)?tn(_.children):Array.isArray(_.child)?tn(_.child):void 0}))}async function jl(){var _;if(G.value)return;ae.value=!0,de.value="",ee.value=[],Ne.value=0;const m=t.item.initOptions;if(Array.isArray(m)&&m.length){xe.value=[tn(m)];return}if(j.value.controlId==="address-control"){const I=So(t.formCore,(_=q.value)!=null&&_.loadAddressChildren?(pe,Fe)=>q.value.loadAddressChildren(pe,{...Fe,item:t.item}):void 0);if(I.mode!=="sample"){ie.value=!0;try{const pe=await I.fetchRoot(String(S.value.url||""),Number(S.value.mapLevel||3));xe.value=[pe.length?tn(pe):tn(qa)]}catch{xe.value=[tn(qa)]}finally{ie.value=!1}return}}xe.value=[tn(qa)]}async function Kl(m){var Fe;const _=Ne.value,I=[...ee.value.slice(0,_),{code:m.code,name:m.name}];ee.value=I;const pe=Number(S.value.mapLevel||3);if(Array.isArray(m.child)&&m.child.length){xe.value=[...xe.value.slice(0,_+1),m.child],Ne.value=_+1;return}if(j.value.controlId==="address-control"&&I.length<pe){const at=So(t.formCore,(Fe=q.value)!=null&&Fe.loadAddressChildren?(Oe,it)=>q.value.loadAddressChildren(Oe,{...it,item:t.item}):void 0);if(at.mode!=="sample"){ie.value=!0,de.value="";try{const Oe=await at.loadChild({value:m.code,label:m.name},{url:String(S.value.url||""),path:I.slice(0,-1).map(Hn=>({value:Hn.code,label:Hn.name})),maxLevel:pe}),it=tn(Oe);if(it.length){xe.value=[...xe.value.slice(0,_+1),it],Ne.value=_+1;return}}catch{de.value=v.value.regionLoadFailed;return}finally{ie.value=!1}}}P(I,"pickChange"),ae.value=!1}async function Ze(){var _;if(G.value)return;const m=(_=q.value)==null?void 0:_.launchTask;if(typeof m=="function")try{const I=await m({key:t.item.key,taskType:"map",taskCategory:"TASKS",item:t.item,field:t.field});I!==void 0&&P(I,"pickChange")}catch{}}const He=H([]),hn=H(!1),as=H(!1);let Bs=null;function d_(m){const _=m.target.value;ke.value=_,Bs&&clearTimeout(Bs);const I=_.trim();if(!I){He.value=[],as.value=!1;return}as.value=!0,Bs=setTimeout(async()=>{var pe;hn.value=!0;try{if(typeof((pe=q.value)==null?void 0:pe.searchSuggest)=="function"){const Fe=await q.value.searchSuggest(I,{item:t.item});He.value=Pf(Fe,S.value.valueCustomKey)}else He.value=Qf.filter(Fe=>Fe.includes(I)).map((Fe,at)=>({code:`SAMPLE_${at}`,name:Fe,raw:{code:`SAMPLE_${at}`,name:Fe}}))}finally{hn.value=!1}},180)}function f_(m){ke.value=m.name,as.value=!1,He.value=[],P(Of(m,S.value.extraResKeys),"searchChange")}function v_(){Ce.value=!1,setTimeout(()=>{as.value=!1},160),Lf(S.value)&&P(Rf(ke.value),"searchChange")}const jn=E(()=>Xf(t.item)),js=H(!1),za=H("single"),Ya=new Date,Kn=H(Ya.getFullYear()),is=H(Ya.getMonth()+1),Ul=H(Ya.getDate()),Hl=E(()=>String(S.value.minDate||"").trim()),ql=E(()=>String(S.value.maxDate||"").trim()),Go=E(()=>!!(S.value.allowLongTerm??t.item.type==="dateRange")),nn=E(()=>{var _;const m=(_=t.field)==null?void 0:_.value;return Array.isArray(m)?[String(m[0]||""),String(m[1]||"")]:m&&typeof m=="object"?[String(m.start||""),String(m.end||"")]:["",""]}),p_=E(()=>{const m=new Date().getFullYear(),_=Hl.value&&Number(Hl.value.slice(0,4))||m-60,I=ql.value&&Number(ql.value.slice(0,4))||m+20,pe=[];for(let Fe=I;Fe>=_;Fe--)pe.push(Fe);return pe}),h_=[1,2,3,4,5,6,7,8,9,10,11,12],m_=E(()=>{const m=new Date(Kn.value,is.value,0).getDate();return Array.from({length:m},(_,I)=>I+1)});function Ja(m="single"){var pe;if(G.value)return;za.value=m;const I=(m==="start"?nn.value[0]:m==="end"?nn.value[1]:String(((pe=t.field)==null?void 0:pe.value)||"")).match(/^(\d{4})(?:-(\d{1,2}))?(?:-(\d{1,2}))?/);I&&(Kn.value=Number(I[1]),I[2]&&(is.value=Number(I[2])),I[3]&&(Ul.value=Number(I[3]))),js.value=!0}function g_(){const m=I=>String(I).padStart(2,"0");let _=`${Kn.value}-${m(is.value)}-${m(Ul.value)}`;jn.value.granularity==="year"?_=String(Kn.value):jn.value.granularity==="month"&&(_=`${Kn.value}-${m(is.value)}`),za.value==="start"?P([_,nn.value[1]],"pickChange"):za.value==="end"?P([nn.value[0],_],"pickChange"):P(_,"pickChange"),js.value=!1}const zo=E(()=>t.item.placeholder?t.item.placeholder:d.value==="en-US"?jn.value.granularity==="year"?v.value.datePlaceholderYear:jn.value.granularity==="month"?v.value.datePlaceholderMonth:v.value.datePlaceholderDay:jn.value.placeholder);function Xa(m){return m==="长期"||m==="long_term"||m==="Long-term"}function Za(m,_=""){return m?Xa(m)?v.value.dateLongTerm:m:_}function Yo(){if(G.value)return;const m=v.value.dateLongTermValue;t.item.type==="dateRange"?P([nn.value[0],m],"pickChange"):P(m,"pickChange"),js.value=!1}const xn=E(()=>xo(t.item,{defaultFalseValue:""})),Wl=E(()=>{var m;return $o((m=t.field)==null?void 0:m.value,xn.value)}),rs=H(null),Jo=E({get:()=>!!rs.value,set:m=>{m||(rs.value=null)}});function Xo(){G.value||P(Wl.value?xn.value.falseValue:xn.value.trueValue,"pickChange")}const Qa=E(()=>{var m;return Number(((m=t.field)==null?void 0:m.value)??S.value.min??0)});function y_(m){P(Number(m.target.value),"pickChange")}const Gl=E(()=>({countdownSeconds:Bf(S.value),maxlength:jf(S.value),buttonText:S.value.verifyText||S.value.btnText||S.value.sendText?Kf(S.value):v.value.verifyCodeButton})),Un=H(0);let os=null;async function b_(){var pe,Fe;if(G.value||Un.value>0)return;ce.value="";const m=S.value.mobileKey||S.value.bindMobileKey||S.value.phoneFieldKey,_=((pe=t.formCore)==null?void 0:pe.fields)||{},I=m||(_.mobile?"mobile":_.phone?"phone":"");if(I&&_[I]){const at=String(_[I].value??"").trim(),Oe=at?Ro(at,{allowInternational:!!(S.value.allowInternational||d.value==="en-US"),locale:d.value}):{valid:!1,reason:v.value.valMobileRequiredBeforeCode};if(!Oe.valid){ce.value=Oe.reason||v.value.valMobileRequiredBeforeCode;return}}typeof((Fe=q.value)==null?void 0:Fe.sendVerifyCode)=="function"&&await q.value.sendVerifyCode({item:t.item}),Un.value=Gl.value.countdownSeconds,os=setInterval(()=>{Un.value-=1,Un.value<=0&&os&&(clearInterval(os),os=null)},1e3)}const mn=E(()=>({maxCount:Vf(S.value),maxSizeMB:typeof S.value.maxSizeMB=="number"?S.value.maxSizeMB:10,accept:Array.isArray(S.value.accept)?S.value.accept:typeof S.value.accept=="string"?S.value.accept.split(",").map(m=>m.trim()).filter(Boolean):void 0})),zl=H(""),$n=E(()=>{var _;const m=(_=t.field)==null?void 0:_.value;return Array.isArray(m)?m.map(I=>typeof I=="string"?{url:I}:{url:I.url||I.path||"",name:I.name,size:I.size}):[]});async function Zo(m){var at,Oe;const _=m.target,I=(at=_.files)==null?void 0:at[0];if(_.value="",!I||G.value)return;ce.value="";const pe=yv({name:I.name,size:I.size,type:I.type},{maxSizeMB:mn.value.maxSizeMB,accept:mn.value.accept,locale:d.value});if(!pe.valid){ce.value=pe.reason||v.value.uploadGuardFallback;return}let Fe=URL.createObjectURL(I);if(typeof((Oe=q.value)==null?void 0:Oe.uploadFile)=="function"){const it=await q.value.uploadFile({name:I.name,size:I.size,raw:I},{item:t.item});it!=null&&it.url&&(Fe=it.url)}P([...$n.value,{url:Fe,name:I.name,size:I.size}],"pickChange")}function Qo(m){G.value||(ce.value="",P($n.value.filter((_,I)=>I!==m),"pickChange"))}const ec=E(()=>S.value.activeValue!==void 0?S.value.activeValue:!0),__=E(()=>S.value.inactiveValue!==void 0?S.value.inactiveValue:!1),Yl=E(()=>{var m;return((m=t.field)==null?void 0:m.value)===ec.value});function k_(){G.value||P(Yl.value?__.value:ec.value,"pickChange")}const ei=E(()=>en.value);function C_(m){if(G.value||m.disabled)return;const _=t.item.valueType==="string"?String(m.code):{code:m.code,name:m.name};P(_,"pickChange")}function S_(m){var pe;const _=(pe=t.field)==null?void 0:pe.value,I=_&&typeof _=="object"?_.code:_;return I!=null&&String(I)===String(m)}const ti=E(()=>{var _;const m=(_=t.field)==null?void 0:_.value;return Array.isArray(m)?m.map(I=>String(I&&typeof I=="object"?I.code:I)).filter(Boolean):[]});function w_(m){if(G.value||m.disabled)return;ce.value="";const _=String(m.code),I=ti.value;let pe;if(I.includes(_)){const Oe=typeof S.value.minSelect=="number"?S.value.minSelect:0;if(I.length-1<Oe){ce.value=v.value.minSelectError(Oe);return}pe=I.filter(it=>it!==_)}else{const Oe=typeof S.value.maxSelect=="number"?S.value.maxSelect:999;if(I.length>=Oe){ce.value=v.value.maxSelectError(Oe);return}pe=[...I,_]}const Fe=ei.value.filter(Oe=>pe.includes(String(Oe.code))),at=t.item.valueType==="string"?Fe.map(Oe=>String(Oe.code)):Fe.map(Oe=>({code:Oe.code,name:Oe.name}));P(at,"pickChange")}const Jl=E(()=>typeof S.value.min=="number"?S.value.min:0),tc=E(()=>typeof S.value.max=="number"?S.value.max:9999),nc=E(()=>typeof S.value.step=="number"&&S.value.step>0?S.value.step:1),Xl=E(()=>{var I;const m=(I=t.field)==null?void 0:I.value;if(m==null||m==="")return Jl.value;const _=Number(m);return Number.isFinite(_)?_:Jl.value});function sc(m){if(G.value)return;const _=Math.min(tc.value,Math.max(Jl.value,Xl.value+m));P(_,"pickChange")}const lc=E(()=>{const m=typeof S.value.max=="number"?S.value.max:S.value.count;return typeof m=="number"&&m>0?m:5}),ni=E(()=>{var _;const m=Number((_=t.field)==null?void 0:_.value);return Number.isFinite(m)?m:0});function T_(m){G.value||P(m,"pickChange")}const si=E(()=>{var _;const m=t.item.subItems||((_=t.item.props)==null?void 0:_.subItems);return Array.isArray(m)?m:[]}),Ks=E(()=>{var m;return t.item.listMeta||((m=t.item.props)==null?void 0:m.listMeta)||{}}),sn=E(()=>{var m;return Array.isArray((m=t.field)==null?void 0:m.value)?t.field.value:[]}),x_=E(()=>Number(Ks.value.minItems??0)),$_=E(()=>Ks.value.maxItems!=null?Number(Ks.value.maxItems):20),ac=E(()=>!G.value&&sn.value.length<$_.value),ic=E(()=>!G.value&&Ks.value.removable!==!1&&sn.value.length>x_.value),rc=E(()=>Oo(t.item,sn.value,d.value));function Us(m,_){const I=m==null?void 0:m[_.key];return I&&typeof I=="object"?String(I.code??I.name??""):I==null?"":String(I)}function Hs(m,_,I){const pe=sn.value.map((Fe,at)=>{if(at!==m)return Fe;let Oe=I;if(_.type==="select"&&Array.isArray(_.initOptions)&&_.valueType!=="string"){const it=_.initOptions.find(Hn=>String(Hn.code)===String(I));Oe=it?{code:it.code,name:it.name}:I}return{...Fe||{},[_.key]:Oe}});P(pe,"inputBlur")}function A_(){if(!ac.value)return;const m={};for(const _ of si.value)_.defaultValue!==void 0&&(m[_.key]=_.defaultValue);P([...sn.value,m],"pickChange")}function M_(m){ic.value&&P(sn.value.filter((_,I)=>I!==m),"pickChange")}const li=E(()=>{if(j.value.controlId==="select-control")return ls.value;if(j.value.controlId==="address-control"||j.value.controlId==="cascader-control")return Tn.value;if(j.value.controlId==="agreement-control")return Wl.value?v.value.agreementChecked:v.value.agreementUnchecked;if(j.value.controlId==="slider-control")return String(Qa.value);const m=ke.value.trim();return m?Do(m,t.item):""}),E_=E(()=>{const m=li.value;return m?D.value&&!U.value?uv(ke.value,t.item):m:v.value.reviewEmpty});return yl(()=>{Bs&&clearTimeout(Bs),os&&clearInterval(os)}),(m,_)=>{var I,pe,Fe,at,Oe,it,Hn,oc,cc;return p(),h("div",{class:se(["fs-field",[Ie.value?"fs-field--top":"fs-field--inline",`fs-field--${Ue.value}`,{"is-focused":Ce.value,"is-disabled":G.value}]]),"data-modern-skin":w.value,"data-field-key":e.item.key,"data-has-error":Ue.value==="error"?"1":void 0,style:$t({"--fs-label-width":$e.value})},[y.value?(p(),h("div",Wv,[f("div",Gv,[f("span",zv,k(e.item.label||((I=J.value)==null?void 0:I.label)||xn.value.displayLabel),1),D.value&&li.value?(p(),h("button",{key:0,type:"button",class:"fs-review__eye","data-testid":"review-mask-toggle",onClick:_[0]||(_[0]=K=>U.value=!U.value)},k(U.value?v.value.reviewHide:v.value.reviewReveal),1)):V("",!0)]),J.value?(p(),h("div",Yv,[Ut.value?(p(),h("img",{key:0,src:Ut.value,class:"fs-sig-thumb",alt:v.value.signatureAltSigned},null,8,Jv)):V("",!0),f("span",{class:se(["fs-task-pill",{"is-done":Zt.value}])},k(tt.value),3)])):j.value.controlId==="image-upload-control"?(p(),h("div",Xv,[$n.value.length?(p(),h("div",Zv,[(p(!0),h(le,null,_e($n.value,(K,be)=>(p(),h("div",{key:K.url+be,class:"fs-upload-thumb"},[f("img",{src:K.url,alt:K.name||v.value.uploadImageAlt},null,8,Qv)]))),128))])):(p(),h("span",ep,k(v.value.reviewNotUploaded),1))])):e.item.type==="list"||j.value.controlId==="list-control"?(p(),h("div",tp,[sn.value.length?V("",!0):(p(),h("div",np,k(v.value.reviewNoItems),1)),(p(!0),h(le,null,_e(sn.value,(K,be)=>(p(),h("div",{key:be,class:"fs-review__subcard"},[f("div",sp,k(v.value.listItemTitle(be+1)),1),(p(!0),h(le,null,_e(si.value,ge=>(p(),h("div",{key:ge.key,class:"fs-review__subline"},[f("span",lp,k(ge.label||ge.key),1),f("span",ap,k(Us(K,ge)||"—"),1)]))),128))]))),128))])):(p(),h("div",{key:3,class:se(["fs-review__val",{"is-empty":!li.value}])},k(E_.value),3))])):J.value&&!$.value?(p(),h("div",{key:1,class:"fs-task-row",onClick:Bl},[f("div",ip,[f("span",{class:se(["fs-task-row__icon",{"is-done":Zt.value}])},[Zt.value?(p(),h("svg",rp,[..._[21]||(_[21]=[f("path",{d:"M3.5 8.5L6.5 11.5L12.5 4.8",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(p(),h("svg",op,[..._[22]||(_[22]=[f("rect",{x:"2.5",y:"2.5",width:"11",height:"11",rx:"2.5",stroke:"currentColor","stroke-width":"1.4"},null,-1),f("path",{d:"M5.5 8h5M8 5.5v5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"},null,-1)])]))],2),f("div",cp,[f("div",up,[he.value?(p(),h("span",dp,"*")):V("",!0),Je(k(e.item.label||J.value.label),1)]),f("div",fp,k(J.value.taskCategory)+" · "+k(J.value.taskType),1)])]),f("div",vp,[Ut.value?(p(),h("img",{key:0,src:Ut.value,class:"fs-sig-thumb",alt:v.value.signatureAltPreview},null,8,pp)):V("",!0),f("span",{class:se(["fs-task-pill",{"is-done":Zt.value}])},[Je(k(tt.value)+" ",1),!Zt.value&&!G.value?(p(),h("span",hp,"›")):V("",!0)],2)]),J.value.taskType==="signature"?(p(),st(Hv,{key:0,visible:nt.value,"onUpdate:visible":_[1]||(_[1]=K=>nt.value=K),title:e.item.label||v.value.signatureTitle,onConfirm:Qt},null,8,["visible","title"])):V("",!0)])):j.value.controlId==="agreement-control"&&!$.value?(p(),h("div",mp,[f("button",{type:"button",class:se(["fs-agree__check",{"is-checked":Wl.value}]),disabled:G.value,onClick:Xo},[Wl.value?(p(),h("svg",yp,[..._[23]||(_[23]=[f("path",{d:"M3 7.2L5.8 10L11 4.2",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):V("",!0)],10,gp),f("div",bp,[f("div",{class:"fs-agree__text",onClick:Xo},[he.value?(p(),h("span",_p,"*")):V("",!0),Je(k(xn.value.displayLabel),1)]),xn.value.hasAgreementLinks?(p(),h("div",kp,[(p(!0),h(le,null,_e(xn.value.agreements,K=>(p(),h("button",{key:K.title,type:"button",class:"fs-agree__link",onClick:be=>rs.value=K},k(d.value==="en-US"?K.title:`《${K.title}》`),9,Cp))),128))])):V("",!0)]),Ge(Rs,{visible:Jo.value,"onUpdate:visible":_[2]||(_[2]=K=>Jo.value=K),title:((pe=rs.value)==null?void 0:pe.title)||v.value.agreementDetailTitle,"cancel-text":v.value.close},{default:jt(()=>{var K,be;return[f("div",Sp,k(((K=rs.value)==null?void 0:K.content)||((be=rs.value)==null?void 0:be.url)||xn.value.displayLabel),1)]}),_:1},8,["visible","title","cancel-text"])])):(p(),h("div",wp,[f("label",Tp,[he.value?(p(),h("span",xp,"*")):V("",!0),Je(k(e.item.label),1)]),f("div",$p,[$.value?(p(),h("div",Ap,[(p(),st(Xn($.value),{item:e.item,field:e.field,value:(Fe=e.field)==null?void 0:Fe.value,"model-value":(at=e.field)==null?void 0:at.value,disabled:G.value,readonly:y.value,"err-msg":kt.value,locale:d.value,"form-core":e.formCore,"host-handlers":q.value,"on-change":x,"on-blur":A,"onUpdate:modelValue":_[3]||(_[3]=K=>x(K)),onChange:_[4]||(_[4]=(K,be)=>x(K,be)),onBlur:_[5]||(_[5]=K=>A(K))},null,40,["item","field","value","model-value","disabled","readonly","err-msg","locale","form-core","host-handlers"]))])):j.value.controlId==="input-control"&&e.item.type==="textarea"?(p(),h("div",Mp,[f("textarea",{value:ke.value,class:"fs-textarea",rows:"3",placeholder:e.item.placeholder||v.value.inputPlaceholder,disabled:G.value,maxlength:X.value,onFocus:_[6]||(_[6]=K=>Ce.value=!0),onInput:Se,onBlur:we},null,40,Ep),X.value?(p(),h("div",Fp,k(ke.value.length)+"/"+k(X.value),1)):V("",!0)])):j.value.controlId==="input-control"?(p(),h(le,{key:2},[f("div",{class:"fs-input-box",onClick:ye},[S.value.prefix?(p(),h("span",Ip,k(S.value.prefix),1)):V("",!0),f("input",{ref_key:"inputElRef",ref:T,value:re.value,type:ne.value,inputmode:te.value,readonly:Y.value,class:se(["fs-input",{"is-custom-kb":Y.value}]),placeholder:e.item.placeholder||v.value.inputPlaceholder,disabled:G.value,maxlength:Y.value?void 0:X.value,"data-keyboard-kind":Ct.value,onFocus:fe,onInput:Se,onBlur:we},null,42,Dp),S.value.suffix||S.value.unit?(p(),h("span",Pp,k(S.value.suffix||S.value.unit),1)):V("",!0),Y.value&&ns.value.badge?(p(),h("button",{key:2,type:"button",class:"fs-kb-tag",title:v.value.keyboardHintWithSystem(ns.value.title),onClick:lt(N,["stop"])},k(ns.value.badge),9,Op)):L.value&&g.value?(p(),h("button",{key:3,type:"button",class:"fs-kb-tag",title:v.value.switchToSoftKeyboardTitle,onClick:lt(z,["stop"])},k(v.value.switchToSoftKeyboard),9,Rp)):V("",!0),ue.value&&ke.value&&!G.value?(p(),h("button",{key:4,type:"button",class:"fs-clear-btn","aria-label":v.value.clear,onMousedown:lt(De,["prevent"]),onClick:lt(De,["stop"])}," × ",40,Lp)):V("",!0)]),Z.value?(p(),h("div",Np,k(Z.value),1)):V("",!0),Y.value?(p(),st(Uo,{key:1,visible:ze.value,"onUpdate:visible":_[7]||(_[7]=K=>ze.value=K),kind:Ct.value,label:e.item.label,"display-value":re.value,maxlength:X.value,onKey:Ye,onBackspace:ht,onClear:ft,onDone:Xt,onSwitchNative:N},null,8,["visible","kind","label","display-value","maxlength"])):V("",!0)],64)):j.value.controlId==="select-control"?(p(),h(le,{key:3},[f("div",{class:"fs-trigger-box",onClick:F},[f("span",{class:se(["fs-trigger-val",{"is-placeholder":!ls.value}])},k(ls.value||e.item.placeholder||v.value.selectPlaceholder),3),_[24]||(_[24]=f("span",{class:"fs-chevron"},"›",-1))]),Ge(Rs,{visible:Bn.value,"onUpdate:visible":_[8]||(_[8]=K=>Bn.value=K),title:S.value.dialogTitle||e.item.label||v.value.selectPlaceholder,"show-confirm":ss.value,searchable:en.value.length>6,onSearch:_[9]||(_[9]=K=>Ns.value=K),onConfirm:oe},{default:jt(()=>[Ls.value?(p(),h("div",Vp,k(v.value.loadingOptions),1)):Vs.value.length?(p(),h("div",jp,[(p(!0),h(le,null,_e(Vs.value,K=>(p(),h("button",{key:String(K.code),type:"button",class:se(["fs-opt-item",{"is-active":M(K.code)}]),onClick:be=>Q(K)},[f("span",null,k(K.name),1),M(K.code)?(p(),h("span",Up,"✓")):V("",!0)],10,Kp))),128))])):(p(),h("div",Bp,k(v.value.noOptions),1))]),_:1},8,["visible","title","show-confirm","searchable"])],64)):j.value.controlId==="address-control"||j.value.controlId==="cascader-control"?(p(),h(le,{key:4},[f("div",{class:"fs-trigger-box",onClick:jl},[f("span",{class:se(["fs-trigger-val",{"is-placeholder":!Tn.value}])},k(Tn.value||e.item.placeholder||(j.value.controlId==="address-control"?v.value.selectAddressPlaceholder:v.value.selectPlaceholder)),3),We.value?(p(),h("button",{key:0,type:"button",class:"fs-map-pill",onClick:lt(Ze,["stop"])},k(v.value.mapPicker),1)):V("",!0),_[25]||(_[25]=f("span",{class:"fs-chevron"},"›",-1))]),Ge(Rs,{visible:ae.value,"onUpdate:visible":_[11]||(_[11]=K=>ae.value=K),title:S.value.dialogTitle||e.item.label||v.value.selectRegionTitle},{default:jt(()=>[f("div",Hp,[(p(!0),h(le,null,_e(ee.value,(K,be)=>(p(),h("button",{key:K.code,type:"button",class:se(["fs-ctab",{"is-active":Ne.value===be}]),onClick:ge=>Ne.value=be},k(K.name),11,qp))),128)),xe.value.length>ee.value.length?(p(),h("button",{key:0,type:"button",class:"fs-ctab is-active",onClick:_[10]||(_[10]=K=>Ne.value=ee.value.length)},k(v.value.selectPlaceholder),1)):V("",!0)]),ie.value?(p(),h("div",Wp,k(v.value.loadingRegion),1)):de.value?(p(),h("div",Gp,k(de.value),1)):(p(),h("div",zp,[(p(!0),h(le,null,_e(xe.value[Ne.value]||[],K=>{var be,ge;return p(),h("button",{key:K.code,type:"button",class:se(["fs-opt-item",{"is-active":((be=ee.value[Ne.value])==null?void 0:be.code)===K.code}]),onClick:ai=>Kl(K)},[f("span",null,k(K.name),1),((ge=ee.value[Ne.value])==null?void 0:ge.code)===K.code?(p(),h("span",Jp," ✓ ")):V("",!0)],10,Yp)}),128))]))]),_:1},8,["visible","title"])],64)):j.value.controlId==="search-control"?(p(),h("div",Xp,[f("div",Zp,[_[26]||(_[26]=f("svg",{class:"fs-search-icon",viewBox:"0 0 16 16",fill:"none"},[f("circle",{cx:"7.2",cy:"7.2",r:"4.8",stroke:"currentColor","stroke-width":"1.4"}),f("path",{d:"M11 11l3 3",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)),f("input",{value:ke.value,type:"text",class:"fs-input",placeholder:e.item.placeholder||v.value.searchInputPlaceholder,disabled:G.value,onFocus:_[12]||(_[12]=K=>{Ce.value=!0,He.value.length&&(as.value=!0)}),onInput:d_,onBlur:v_},null,40,Qp),ke.value&&!G.value?(p(),h("button",{key:0,type:"button",class:"fs-clear-btn",onMousedown:lt(De,["prevent"])}," × ",32)):V("",!0)]),as.value&&(hn.value||He.value.length)?(p(),h("div",eh,[hn.value?(p(),h("div",th,k(v.value.searching),1)):V("",!0),(p(!0),h(le,null,_e(He.value,K=>(p(),h("button",{key:K.code,type:"button",class:"fs-search-pop__item",onMousedown:lt(be=>f_(K),["prevent"])},k(K.name),41,nh))),128))])):V("",!0)])):j.value.controlId==="date-control"||j.value.controlId==="date-range-control"?(p(),h(le,{key:6},[j.value.controlId==="date-range-control"?(p(),h("div",sh,[f("button",{type:"button",class:"fs-daterange__btn",disabled:G.value,onClick:_[13]||(_[13]=K=>Ja("start"))},[f("span",{class:se({"is-placeholder":!nn.value[0]})},k(Za(nn.value[0],v.value.dateStart)),3)],8,lh),f("span",ah,k(v.value.dateTo),1),f("button",{type:"button",class:"fs-daterange__btn",disabled:G.value,onClick:_[14]||(_[14]=K=>Ja("end"))},[f("span",{class:se({"is-placeholder":!nn.value[1]})},k(Za(nn.value[1],v.value.dateEnd)),3)],8,ih),Go.value&&!G.value?(p(),h("button",{key:0,type:"button",class:se(["fs-longterm-btn",{"is-active":Xa(nn.value[1])}]),"data-testid":"modern-date-longterm",onClick:Yo},k(v.value.dateLongTerm),3)):V("",!0)])):(p(),h("div",{key:1,class:"fs-trigger-box",onClick:_[15]||(_[15]=K=>Ja("single"))},[f("span",{class:se(["fs-trigger-val",{"is-placeholder":!((Oe=e.field)!=null&&Oe.value)}])},k(Za((it=e.field)!=null&&it.value?String(e.field.value):"",zo.value)),3),Go.value&&!G.value?(p(),h("button",{key:0,type:"button",class:se(["fs-longterm-btn",{"is-active":Xa(String(((Hn=e.field)==null?void 0:Hn.value)||""))}]),onClick:lt(Yo,["stop"])},k(v.value.dateLongTerm),3)):V("",!0),_[27]||(_[27]=f("span",{class:"fs-chevron"},"›",-1))])),Ge(Rs,{visible:js.value,"onUpdate:visible":_[16]||(_[16]=K=>js.value=K),title:e.item.label||zo.value,"show-confirm":!0,onConfirm:g_},{default:jt(()=>[Hl.value||ql.value?(p(),h("div",rh,k(v.value.dateRangeBounds(Hl.value||v.value.dateUnlimited,ql.value||v.value.dateUnlimited)),1)):V("",!0),f("div",oh,[f("div",ch,[f("div",uh,k(v.value.dateYearHead),1),f("div",dh,[(p(!0),h(le,null,_e(p_.value,K=>(p(),h("button",{key:K,type:"button",class:se(["fs-date-opt",{"is-active":Kn.value===K}]),onClick:be=>Kn.value=K},k(v.value.dateYearOption(K)),11,fh))),128))])]),jn.value.granularity!=="year"?(p(),h("div",vh,[f("div",ph,k(v.value.dateMonthHead),1),f("div",hh,[(p(),h(le,null,_e(h_,K=>f("button",{key:K,type:"button",class:se(["fs-date-opt",{"is-active":is.value===K}]),onClick:be=>is.value=K},k(v.value.dateMonthOption(K)),11,mh)),64))])])):V("",!0),jn.value.granularity==="day"?(p(),h("div",gh,[f("div",yh,k(v.value.dateDayHead),1),f("div",bh,[(p(!0),h(le,null,_e(m_.value,K=>(p(),h("button",{key:K,type:"button",class:se(["fs-date-opt",{"is-active":Ul.value===K}]),onClick:be=>Ul.value=K},k(v.value.dateDayOption(K)),11,_h))),128))])])):V("",!0)])]),_:1},8,["visible","title"])],64)):j.value.controlId==="verify-code-control"?(p(),h(le,{key:7},[f("div",{class:"fs-input-box",onClick:ye},[f("input",{value:ke.value,type:"tel",inputmode:Y.value?"none":"numeric",readonly:Y.value,autocomplete:"one-time-code",class:"fs-input",placeholder:e.item.placeholder||v.value.verifyCodePlaceholder,maxlength:Gl.value.maxlength,disabled:G.value,onFocus:fe,onInput:Se,onBlur:we},null,40,kh),f("button",{type:"button",class:"fs-code-btn",disabled:G.value||Un.value>0,onClick:lt(b_,["stop"])},k(Un.value>0?`${Un.value}s`:Gl.value.buttonText),9,Ch)]),Y.value?(p(),st(Uo,{key:0,visible:ze.value,"onUpdate:visible":_[17]||(_[17]=K=>ze.value=K),kind:"number",label:e.item.label||v.value.verifyCodeLabel,"display-value":ke.value,maxlength:Gl.value.maxlength,onKey:Ye,onBackspace:ht,onClear:ft,onDone:Xt,onSwitchNative:N},null,8,["visible","label","display-value","maxlength"])):V("",!0)],64)):j.value.controlId==="image-upload-control"?(p(),h(le,{key:8},[f("div",Sh,[(p(!0),h(le,null,_e($n.value,(K,be)=>(p(),h("div",{key:K.url+be,class:"fs-upload-thumb"},[f("img",{src:K.url,alt:K.name||v.value.uploadImageAlt,onClick:ge=>zl.value=K.url},null,8,wh),G.value?V("",!0):(p(),h("button",{key:0,type:"button",class:"fs-upload-del",onClick:ge=>Qo(be)}," × ",8,Th))]))),128)),!G.value&&$n.value.length<mn.value.maxCount?(p(),h("label",xh,[f("input",{type:"file",accept:mn.value.accept?mn.value.accept.join(","):"image/*",hidden:"",onChange:Zo},null,40,$h),_[28]||(_[28]=f("span",{class:"fs-upload-add__plus"},"+",-1)),f("span",Ah,k(v.value.uploadAddText),1)])):V("",!0)]),(p(),st(fl,{to:"body"},[zl.value?(p(),h("div",{key:0,class:"fs-lightbox",onClick:_[18]||(_[18]=K=>zl.value="")},[f("img",{src:zl.value,alt:v.value.uploadLightboxAlt},null,8,Mh)])):V("",!0)]))],64)):j.value.controlId==="file-upload-control"?(p(),h("div",Eh,[(p(!0),h(le,null,_e($n.value,(K,be)=>(p(),h("div",{key:K.url+be,class:"fs-file-row"},[f("span",Fh,"📄 "+k(K.name||K.url),1),G.value?V("",!0):(p(),h("button",{key:0,type:"button",class:"fs-list__del",onClick:ge=>Qo(be)},k(v.value.delete),9,Ih))]))),128)),!G.value&&$n.value.length<mn.value.maxCount?(p(),h("label",Dh,[f("input",{type:"file",accept:mn.value.accept?mn.value.accept.join(","):".pdf,.doc,.docx,.xls,.xlsx,.png,.jpg,.jpeg",hidden:"",onChange:Zo},null,40,Ph),f("span",null,k(v.value.uploadFileAdd(mn.value.maxSizeMB)),1)])):V("",!0)])):j.value.controlId==="switch-control"?(p(),h("div",Oh,[f("button",{type:"button",role:"switch","aria-checked":Yl.value,class:se(["fs-switch",{"is-on":Yl.value}]),disabled:G.value,onClick:k_},[..._[29]||(_[29]=[f("span",{class:"fs-switch__thumb"},null,-1)])],10,Rh),f("span",Lh,k(Yl.value?S.value.activeText||v.value.switchOn:S.value.inactiveText||v.value.switchOff),1)])):j.value.controlId==="radio-group-control"?(p(),h("div",Nh,[(p(!0),h(le,null,_e(ei.value,K=>(p(),h("button",{key:String(K.code),type:"button",class:se(["fs-chip",{"is-active":S_(K.code)}]),disabled:G.value||K.disabled,onClick:be=>C_(K)},k(K.name),11,Vh))),128))])):j.value.controlId==="checkbox-group-control"?(p(),h("div",Bh,[(p(!0),h(le,null,_e(ei.value,K=>(p(),h("button",{key:String(K.code),type:"button",class:se(["fs-chip",{"is-active":ti.value.includes(String(K.code))}]),disabled:G.value||K.disabled,onClick:be=>w_(K)},[ti.value.includes(String(K.code))?(p(),h("span",Kh,"✓")):V("",!0),Je(" "+k(K.name),1)],10,jh))),128))])):j.value.controlId==="stepper-control"?(p(),h("div",Uh,[f("button",{type:"button",class:"fs-stepper-btn",disabled:G.value||Xl.value<=Jl.value,onClick:_[19]||(_[19]=K=>sc(-nc.value))},"−",8,Hh),f("span",qh,[Je(k(Xl.value),1),S.value.unit?(p(),h("span",Wh,k(S.value.unit),1)):V("",!0)]),f("button",{type:"button",class:"fs-stepper-btn",disabled:G.value||Xl.value>=tc.value,onClick:_[20]||(_[20]=K=>sc(nc.value))},"+",8,Gh)])):j.value.controlId==="rate-control"?(p(),h("div",zh,[(p(!0),h(le,null,_e(lc.value,K=>(p(),h("button",{key:K,type:"button",class:se(["fs-rate-star",{"is-on":K<=ni.value}]),disabled:G.value,onClick:be=>T_(K)}," ★ ",10,Yh))),128)),ni.value>0?(p(),h("span",Jh,k(ni.value)+" / "+k(lc.value),1)):V("",!0)])):j.value.controlId==="slider-control"?(p(),h("div",Xh,[f("input",{type:"range",class:"fs-slider",value:Qa.value,min:S.value.min??0,max:S.value.max??100,step:S.value.step??1,disabled:G.value,onInput:y_},null,40,Zh),f("span",Qh,k(Qa.value),1)])):e.item.type==="list"||j.value.controlId==="list-control"?(p(),h("div",em,[sn.value.length?V("",!0):(p(),h("div",tm,k(v.value.listEmpty),1)),(p(!0),h(le,null,_e(sn.value,(K,be)=>(p(),h("div",{key:be,class:"fs-list__card","data-list-index":be},[f("div",sm,[f("span",lm,k(v.value.listItemTitle(be+1)),1),ic.value?(p(),h("button",{key:0,type:"button",class:"fs-list__del",onClick:ge=>M_(be)},k(v.value.delete),9,am)):V("",!0)]),f("div",im,[(p(!0),h(le,null,_e(si.value,ge=>{var ai,uc;return p(),h("div",{key:ge.key,class:"fs-list__subrow"},[f("label",rm,[ge.required?(p(),h("span",om,"*")):V("",!0),Je(k(ge.label||ge.key),1)]),ge.type==="select"&&Array.isArray(ge.initOptions)?(p(),h("select",{key:0,class:"fs-list__subselect",value:Us(K,ge),disabled:G.value,onChange:St=>Hs(be,ge,St.target.value)},[f("option",um,k(ge.placeholder||v.value.selectPlaceholder),1),(p(!0),h(le,null,_e(ge.initOptions,St=>(p(),h("option",{key:String(St.code),value:String(St.code)},k(St.name),9,dm))),128))],40,cm)):ge.type==="radioGroup"&&Array.isArray(ge.initOptions)?(p(),h("div",fm,[(p(!0),h(le,null,_e(ge.initOptions,St=>(p(),h("button",{key:String(St.code),type:"button",class:se(["fs-chip fs-chip--sm",{"is-active":Us(K,ge)===String(St.code)}]),disabled:G.value,onClick:pk=>Hs(be,ge,String(St.code))},k(St.name),11,vm))),128))])):ge.type==="switch"?(p(),h("button",{key:2,type:"button",class:se(["fs-switch",{"is-on":!!(K!=null&&K[ge.key])}]),disabled:G.value,onClick:St=>Hs(be,ge,K!=null&&K[ge.key]?"":"1")},[..._[30]||(_[30]=[f("span",{class:"fs-switch__thumb"},null,-1)])],10,pm)):ge.type==="date"?(p(),h("input",{key:3,class:"fs-list__subinput",type:"date",value:Us(K,ge),disabled:G.value,onInput:St=>Hs(be,ge,St.target.value)},null,40,hm)):(p(),h("input",{key:4,class:"fs-list__subinput",value:Us(K,ge),type:ge.type==="phone"?"tel":"text",inputmode:ge.type==="phone"?"numeric":ge.type==="number"?"decimal":"text",maxlength:(ai=ge.props)==null?void 0:ai.maxlength,placeholder:ge.placeholder||v.value.inputPlaceholder,disabled:G.value,onInput:St=>Hs(be,ge,St.target.value)},null,40,mm)),(uc=rc.value.rowErrors[be])!=null&&uc[ge.key]?(p(),h("p",gm,k(rc.value.rowErrors[be][ge.key]),1)):V("",!0)])}),128))])],8,nm))),128)),ac.value?(p(),h("button",{key:1,type:"button",class:"fs-list__add","data-testid":"modern-list-add-btn",onClick:A_},k(Ks.value.addButtonText||v.value.listAddDefault),1)):V("",!0)])):(p(),h("div",ym,[f("span",bm,k(((oc=e.field)==null?void 0:oc.showValue)||((cc=e.field)==null?void 0:cc.value)||v.value.fallbackControl(e.item.type)),1)]))])])),!y.value&&(kt.value||Jt.value)?(p(),h("div",{key:4,class:se(["fs-feedback",{"is-inline":!Ie.value&&!J.value&&j.value.controlId!=="agreement-control"}])},[kt.value?(p(),h("p",{key:0,class:se(["fs-msg",`is-${Ue.value}`])},[_[31]||(_[31]=f("span",{class:"fs-msg__dot"},null,-1)),Je(k(kt.value),1)],2)):V("",!0),Jt.value?(p(),h("p",_m,k(Jt.value),1)):V("",!0)],2)):V("",!0)],14,qv)}}}),[["__scopeId","data-v-3852f18d"]]),Ho=Pe({__name:"ModernFormItemBridge",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=E(()=>{const s=t.item;return(s==null?void 0:s.raw)||s});return(s,l)=>(p(),st(km,{item:n.value,field:e.field,formCore:e.formCore},null,8,["item","field","formCore"]))}}),Cm=["data-modern-skin","data-group-key"],Sm={key:0,class:"fs-trust-bar"},wm={class:"fs-group__title-wrap"},Tm={class:"fs-group__title"},xm={key:0,class:"fs-group__err-badge"},$m={class:"fs-group__head-right"},Am={class:"fs-group__card"},Mm=Ke(Pe({__name:"ModernFormGroup",props:{group:{},fields:{},formCore:{}},setup(e){const t=e,n=je("FormItemComponent",void 0),s=je(Wa,"fin-minimal"),l=je(No,null),a=je(Vo,!1),i=je(ts,"zh-CN"),r=E(()=>wt(Kt(Me(i)))),o=E(()=>{const b=Me(s);return b&&Dt[b]?b:"fin-minimal"}),u=E(()=>{const b=Me(l);return b&&typeof b=="object"?b:null}),c=E(()=>Mo(o.value,u.value)),d=E(()=>sv(o.value,u.value)),v=E(()=>!!Me(a)),$=H(!1),x=E(()=>n?Me(n):Ho),A=E(()=>t.group.items.filter(b=>{const C=t.fields[b.key];return!C||C.visible!==!1})),w=E(()=>{var C;let b=0;for(const B of A.value)Eo((C=t.fields[B.key])==null?void 0:C.value)&&(b+=1);return b}),O=E(()=>{var C;let b=0;for(const B of A.value)(C=t.fields[B.key])!=null&&C.errMsg&&(b+=1);return b});ut(O,b=>{b>0&&$.value&&($.value=!1)}),ut(v,b=>{b||($.value=!1)});function y(){v.value&&($.value=!$.value)}return(b,C)=>A.value.length>0?(p(),h("section",{key:0,class:se(["fs-group",{"is-collapsed":$.value}]),"data-modern-skin":o.value,"data-group-key":e.group.key,style:$t(c.value)},[d.value?(p(),h("div",Sm,[C[0]||(C[0]=f("svg",{class:"fs-trust-bar__icon",viewBox:"0 0 16 16",fill:"none"},[f("path",{d:"M8 1.5L2.5 3.8v4.1c0 3.3 2.3 6 5.5 6.8 3.2-.8 5.5-3.5 5.5-6.8V3.8L8 1.5z",stroke:"currentColor","stroke-width":"1.4","stroke-linejoin":"round"}),f("path",{d:"M5.6 8.1L7.3 9.7L10.6 6.4",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),f("span",null,k(r.value.trustBarText),1)])):V("",!0),e.group.title||v.value?(p(),h("header",{key:1,class:se(["fs-group__head",{"is-collapsible":v.value}]),onClick:y},[f("div",wm,[f("span",Tm,k(e.group.title||r.value.defaultGroupTitle),1),O.value>0?(p(),h("span",xm,k(r.value.groupErrorBadge(O.value)),1)):V("",!0)]),f("div",$m,[f("span",{class:se(["fs-group__progress",{"is-done":w.value===A.value.length}])},k(w.value)+"/"+k(A.value.length),3),v.value?(p(),h("span",{key:0,class:se(["fs-group__chevron",{"is-folded":$.value}]),"aria-hidden":"true"}," ▾ ",2)):V("",!0)])],2)):V("",!0),Gi(f("div",Am,[(p(!0),h(le,null,_e(A.value,(B,D)=>(p(),st(Xn(x.value),{key:B.key,item:B,field:e.fields[B.key],formCore:e.formCore,"data-last-item":D===A.value.length-1?"1":void 0},null,8,["item","field","formCore","data-last-item"]))),128))],512),[[bd,!$.value]])],14,Cm)):V("",!0)}}),[["__scopeId","data-v-3b6906d4"]]);function Em(){return{FormGroupComponent:Mm,FormItemComponent:Ho}}const Fm={class:"ctrl-input-wrapper"},Im=["value","placeholder","disabled","maxlength"],Dm=["type","value","placeholder","disabled","maxlength"],Pm=Ke(Pe({__name:"InputControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){var o;const n=e,s=t,l=H(((o=n.field)==null?void 0:o.value)||"");ut(()=>{var u;return(u=n.field)==null?void 0:u.value},u=>{l.value=u||""});const a=E(()=>n.item.type==="textarea");function i(u){const c=u.target;l.value=c.value}function r(u){var v;const d=((v=u.target.value)==null?void 0:v.trim())||"";l.value=d,s("change",{value:d,eventType:"inputBlur"})}return(u,c)=>{var d,v,$,x,A;return p(),h("div",Fm,[a.value?(p(),h("textarea",{key:0,class:"ctrl-input ctrl-textarea",value:l.value,placeholder:e.item.placeholder||"请输入",disabled:(d=e.field)==null?void 0:d.disabled,maxlength:(v=e.item.props)==null?void 0:v.maxlength,rows:"3",onInput:i,onBlur:r},null,40,Im)):(p(),h("input",{key:1,class:"ctrl-input",type:e.item.type==="number"?"number":e.item.type==="phone"?"tel":"text",value:l.value,placeholder:e.item.placeholder||"请输入",disabled:($=e.field)==null?void 0:$.disabled,maxlength:(x=e.item.props)==null?void 0:x.maxlength,onInput:i,onBlur:r},null,40,Dm)),(A=e.item.props)!=null&&A.guideText?(p(),h("span",{key:2,class:"ctrl-guide",onClick:c[0]||(c[0]=w=>s("change",{eventType:"guideClick"}))},"查看示例")):V("",!0)])}}}),[["__scopeId","data-v-9fecb669"]]),Om={class:"ctrl-select"},Rm={class:"panel-header"},Lm={class:"panel-title"},Nm={class:"panel-body",role:"listbox"},Vm=["aria-selected","onClick"],Bm={class:"option-text"},jm=Ke(Pe({__name:"SelectControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){const n=e,s=t,l=H(!1),a=E(()=>{var $,x;const d=(($=n.item)==null?void 0:$.initOptions)||[],v=(x=n.field)==null?void 0:x.value;return v?d.map(A=>{var w;return{...A,_selected:((w=n.item.props)==null?void 0:w.isSingle)!==!1?(v==null?void 0:v.code)===A.code:Array.isArray(v)?v.some(O=>O.code===A.code):v===A.code}}):d}),i=E(()=>{var v,$;const d=(v=n.field)==null?void 0:v.value;return d?typeof d=="object"&&d.name?d.name:($=n.field)!=null&&$.showValue?n.field.showValue:String(d):""}),r=E(()=>{var d;return((d=n.item.props)==null?void 0:d.dialogTitle)||"请选择"});function o(){var d;(d=n.field)!=null&&d.disabled||(l.value=!0)}function u(){l.value=!1}function c(d){var $;(($=n.item.props)==null?void 0:$.isSingle)!==!1&&(s("change",{value:{code:d.code,name:d.name},eventType:"pickChange"}),l.value=!1)}return(d,v)=>{var $;return p(),h("div",Om,[f("div",{class:se(["select-trigger",{disabled:($=e.field)==null?void 0:$.disabled,placeholder:!i.value}]),onClick:o},[f("span",null,k(i.value||e.item.placeholder||"请选择"),1)],2),Ge(Es,{name:"panel"},{default:jt(()=>[l.value?(p(),h("div",{key:0,class:"select-overlay",onClick:u},[f("div",{class:"select-panel",role:"dialog","aria-label":"选择选项",onClick:v[0]||(v[0]=lt(()=>{},["stop"]))},[f("div",Rm,[f("span",Lm,k(r.value),1),f("button",{class:"panel-close",onClick:u,"aria-label":"关闭"},"×")]),f("div",Nm,[(p(!0),h(le,null,_e(a.value,x=>(p(),h("div",{key:x.code,class:se(["option-card",{"option-selected":x._selected}]),role:"option","aria-selected":x._selected,onClick:A=>c(x)},[f("span",Bm,k(x.name),1),f("span",{class:se(["option-btn",{"option-btn-selected":x._selected}])},k(x._selected?"✓ 已选":"选择"),3)],10,Vm))),128))]),v[1]||(v[1]=f("div",{class:"safe-area-bottom"},null,-1))])])):V("",!0)]),_:1})])}}}),[["__scopeId","data-v-7c19c7ab"]]),Km={class:"ctrl-cascader"},Um=["aria-label"],Hm={class:"panel-header"},qm={class:"panel-title"},Wm={key:0,class:"panel-path"},Gm={class:"panel-body",role:"listbox"},zm=["onClick"],Ym={class:"option-text"},Jm={key:0,class:"option-arrow"},Xm={key:0,class:"option-empty"},Zm=Ke(Pe({__name:"CascaderControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){const n=e,s=t,l=H(!1),a=H([]),i=E(()=>{var x;return((x=n.item)==null?void 0:x.initOptions)||[]}),r=E(()=>{var x;return a.value.length===0?i.value:((x=a.value[a.value.length-1])==null?void 0:x.child)||[]}),o=E(()=>{var A,w;const x=(A=n.field)==null?void 0:A.value;if(!x)return"";if(typeof x=="object"&&x!==null){if(Array.isArray(x.pathNames))return x.pathNames.join(" / ");if(x.name)return String(x.name);if(x.showValue)return String(x.showValue)}return(w=n.field)!=null&&w.showValue?String(n.field.showValue):String(x)}),u=E(()=>{var x;return((x=n.item.props)==null?void 0:x.dialogTitle)||n.item.label||"请选择"});function c(){var x;(x=n.field)!=null&&x.disabled||(a.value=[],l.value=!0)}function d(){l.value=!1}function v(x){const A=[...a.value,x];if(x.child&&x.child.length>0){a.value=A;return}s("change",{value:{code:x.code,name:x.name,pathCodes:A.map(w=>w.code),pathNames:A.map(w=>w.name)},eventType:"pickChange"}),l.value=!1}function $(){a.value=a.value.slice(0,-1)}return(x,A)=>{var w;return p(),h("div",Km,[f("div",{class:se(["cascader-trigger",{disabled:(w=e.field)==null?void 0:w.disabled,placeholder:!o.value}]),onClick:c},[f("span",null,k(o.value||e.item.placeholder||"请选择"),1)],2),Ge(Es,{name:"panel"},{default:jt(()=>[l.value?(p(),h("div",{key:0,class:"cascader-overlay",onClick:d},[f("div",{class:"cascader-panel",role:"dialog","aria-label":u.value,onClick:A[0]||(A[0]=lt(()=>{},["stop"]))},[f("div",Hm,[a.value.length?(p(),h("button",{key:0,type:"button",class:"panel-back","aria-label":"返回上一级",onClick:$}," ‹ ")):V("",!0),f("span",qm,k(u.value),1),f("button",{type:"button",class:"panel-close","aria-label":"关闭",onClick:d},"×")]),a.value.length?(p(),h("div",Wm,k(a.value.map(O=>O.name).join(" / ")),1)):V("",!0),f("div",Gm,[(p(!0),h(le,null,_e(r.value,O=>{var y;return p(),h("div",{key:O.code,class:"option-card",role:"option",onClick:b=>v(O)},[f("span",Ym,k(O.name),1),(y=O.child)!=null&&y.length?(p(),h("span",Jm,"›")):V("",!0)],8,zm)}),128)),r.value.length?V("",!0):(p(),h("div",Xm,"暂无选项"))]),A[1]||(A[1]=f("div",{class:"safe-area-bottom"},null,-1))],8,Um)])):V("",!0)]),_:1})])}}}),[["__scopeId","data-v-5e26815b"]]),Qm={class:"ctrl-search"},eg=["value","placeholder","disabled"],tg={key:0,class:"search-icon loading"},ng=["onClick"],sg={class:"result-name"},lg={key:0,class:"result-code"},ag={key:0,class:"search-hint"},ig=Ke(Pe({__name:"SearchControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){const n=e,s=t,l=H(""),a=H([]),i=H(!1),r=H(!1),o=H(!1),u=E(()=>{var b;return((b=n.item.props)==null?void 0:b.searchApi)||""}),c=H(null),d=H({});ut(()=>{var b;return(b=n.field)==null?void 0:b.value},b=>{o.value||(b&&typeof b=="object"&&b.name?l.value=b.name:typeof b=="string"&&b?l.value=b:l.value="")},{immediate:!0});function v(){if(!c.value)return;const b=c.value.getBoundingClientRect();d.value={position:"fixed",top:`${b.bottom+2}px`,left:`${b.left}px`,width:`${b.width}px`}}let $=null;function x(b){const C=b.target;l.value=C.value,o.value=!0,$&&clearTimeout($),$=setTimeout(()=>{l.value.trim()?A(l.value.trim()):(a.value=[],i.value=!1)},200)}async function A(b){if(u.value){r.value=!0;try{const C=await n.formCore.fetchApi(u.value,{keywords:b}),B=Array.isArray(C)?C:(C==null?void 0:C.data)||(C==null?void 0:C.list)||[];a.value=B,B.length>0&&(v(),i.value=!0)}catch{a.value=[],i.value=!1}finally{r.value=!1}}}function w(b){s("change",{value:b.name,eventType:"searchChange"}),l.value=b.name,o.value=!1,i.value=!1}function O(){a.value.length>0&&l.value&&(v(),i.value=!0)}function y(){i.value=!1,a.value=[],o.value&&s("change",{value:l.value.trim(),eventType:"inputBlur"}),o.value=!1}return(b,C)=>{var B;return p(),h("div",Qm,[f("div",{ref_key:"wrapRef",ref:c,class:"search-input-wrap"},[f("input",{class:"search-input",type:"text",value:l.value,placeholder:e.item.placeholder||"请输入关键词搜索",disabled:(B=e.field)==null?void 0:B.disabled,onInput:x,onFocus:O,onBlur:y},null,40,eg),r.value?(p(),h("span",tg,"⏳")):V("",!0)],512),(p(),st(fl,{to:"body"},[i.value&&a.value.length>0?(p(),h("div",{key:0,class:"search-dropdown",style:$t(d.value)},[(p(!0),h(le,null,_e(a.value,D=>(p(),h("div",{key:D.code,class:"search-result-item",onMousedown:C[0]||(C[0]=lt(()=>{},["prevent"])),onClick:U=>w(D)},[f("span",sg,k(D.name),1),D.code?(p(),h("span",lg,k(D.code),1)):V("",!0)],40,ng))),128))],4)):V("",!0)])),u.value?V("",!0):(p(),h("div",ag," ⚠ 未配置 searchApi "))])}}}),[["__scopeId","data-v-9acab941"]]),rg={class:"ctrl-address"},og={class:"addr-hd"},cg={class:"addr-crumbs"},ug=["onClick"],dg={class:"addr-body"},fg={key:0,class:"addr-loading"},vg=["onClick"],pg={key:0,class:"addr-check"},hg={key:1,class:"addr-empty"},mg=Ke(Pe({__name:"AddressControl",props:{item:{},field:{},formCore:{},onFetchLinkage:{}},emits:["change"],setup(e,{emit:t}){const n=e,s=t,l=E(()=>{var D,U;return((U=(D=n.item)==null?void 0:D.props)==null?void 0:U.linkageUrl)||"service/geo_code"}),a=E(()=>{var D,U;return((U=(D=n.item)==null?void 0:D.props)==null?void 0:U.mapLevel)||3}),i=H(!1),r=H(0),o=H(!1),u=H(!1),c=H([]),d=H([{adcode:"",name:"请选择"}]),v=new Map,$=E(()=>{var U,q,R;const D=(U=n.field)==null?void 0:U.value;if(Array.isArray(D)&&D.length)return D.map(j=>j.name).join("");if((q=n.field)!=null&&q.showValue)return n.field.showValue;if(D&&typeof D=="object"){const j=[D.province,D.city,D.country].filter(Boolean);if(j.length)return j.join("")}return(R=n.field)!=null&&R.province?[n.field.province,n.field.city,n.field.country].filter(Boolean).join(""):typeof D=="string"&&D?D:""}),x=E(()=>d.value.slice(0,a.value));function A(){var D;return n.onFetchLinkage?n.onFetchLinkage:(D=n.formCore)!=null&&D._linkageFetcher?n.formCore._linkageFetcher:async()=>({data:[]})}async function w(D){var j,J,S;o.value=!0;const U=A(),q=d.value.filter(G=>G.adcode),R={province_code:((j=q[0])==null?void 0:j.adcode)||"",city_code:((J=q[1])==null?void 0:J.adcode)||"",district_code:((S=q[2])==null?void 0:S.adcode)||""};try{const G=await U(R,l.value);if(G.data===null){d.value=d.value.filter(Le=>Le.adcode),u.value=!0,o.value=!1,B();return}c.value=G.data||[];const he=D||R.district_code||R.city_code||R.province_code||"root";c.value.length>0&&v.set(he,c.value)}catch{}finally{o.value=!1}}function O(){var q,R;if((q=n.field)!=null&&q.disabled)return;r.value=0;const D=(R=n.field)==null?void 0:R.value;Array.isArray(D)&&D.length&&D[0].code?(d.value=D.map(j=>({adcode:j.code,name:j.name})),u.value=d.value.length>=2):(d.value=[{adcode:"",name:"请选择"}],u.value=!1),i.value=!0;const U=v.get("root");U?c.value=U:w("root")}function y(){i.value=!1}function b(D){if(o.value||!D.adcode)return;const U={71e4:1,81e4:2,82e4:2},q=[...d.value];D.brother=c.value,q[r.value]=D;const R=U[D.adcode];if(R!==void 0){q.splice(R,q.length-R),d.value=q.filter(S=>S.adcode),u.value=!0,B();return}if(r.value<a.value-1&&(q[r.value+1]={adcode:"",name:""},q.splice(r.value+2)),r.value+=1,d.value=q.slice(0,a.value),q.filter(S=>S.adcode).length>=a.value){u.value=!0,B();return}const J=v.get(D.adcode);J?c.value=J:w(D.adcode)}function C(D){var R;r.value=D,u.value=!1;const U=d.value.slice(0,D+1);U[D].adcode||(U[D]={adcode:"",name:"请选择"}),d.value=U;const q=d.value[D];if(q.adcode&&q.brother)c.value=q.brother;else{const j=D>0?(R=d.value[D-1])==null?void 0:R.adcode:"root",J=v.get(j);J?c.value=J:w(j)}}function B(){const D=d.value.filter(R=>R.adcode);if(D.length===0)return;const U=D.map(R=>({code:R.adcode,name:R.name})),q={showValue:""};U.forEach((R,j)=>{q.showValue+=R.name,j===0&&(q.province_code=R.code,q.province=R.name),j===1&&(q.city_code=R.code,q.city=R.name),j===2&&(q.country_code=R.code,q.country=R.name)}),s("change",{value:U,eventType:"pickChange",...q}),i.value=!1}return ut(()=>{var D;return(D=n.field)==null?void 0:D.value},D=>{!i.value&&Array.isArray(D)&&D.length&&(d.value=D.map(U=>({adcode:U.code,name:U.name})))}),(D,U)=>{var q;return p(),h("div",rg,[f("div",{class:se(["address-trigger",{disabled:(q=e.field)==null?void 0:q.disabled,placeholder:!$.value}]),onClick:O},[f("span",null,k($.value||e.item.placeholder||"请选择省市区"),1)],2),Ge(Es,{name:"addr-fade"},{default:jt(()=>[i.value?(p(),h("div",{key:0,class:"addr-mask",onClick:y},[Ge(Es,{name:"addr-slide"},{default:jt(()=>[i.value?(p(),h("div",{key:0,class:"addr-panel",onClick:U[1]||(U[1]=lt(()=>{},["stop"]))},[f("div",og,[f("span",{class:"addr-hd-cancel",onClick:y},"取消"),U[2]||(U[2]=f("span",{class:"addr-hd-title"},"选择地址",-1)),f("span",{class:se(["addr-hd-ok",{on:u.value}]),onClick:U[0]||(U[0]=R=>u.value?B():null)},"确定",2)]),f("div",cg,[(p(!0),h(le,null,_e(x.value,(R,j)=>(p(),h(le,{key:j},[f("span",{class:se(["addr-dot",{cur:j===r.value,done:!!R.adcode&&j<r.value}])},null,2),f("span",{class:se(["addr-label",{cur:j===r.value,done:!!R.adcode}]),onClick:J=>R.adcode?C(j):null},k(R.adcode?R.name:"请选择"),11,ug),j<x.value.length-1?(p(),h("span",{key:0,class:se(["addr-line",{done:!!R.adcode&&j<r.value}])},null,2)):V("",!0)],64))),128))]),f("div",dg,[o.value?(p(),h("div",fg,[...U[3]||(U[3]=[f("span",{class:"addr-spinner"},null,-1),Je("加载中...",-1)])])):V("",!0),(p(!0),h(le,null,_e(c.value,R=>{var j,J;return p(),h("div",{key:R.adcode,class:se(["addr-item",{sel:((j=d.value[r.value])==null?void 0:j.adcode)===R.adcode}]),onClick:S=>b(R)},[f("span",null,k(R.name),1),((J=d.value[r.value])==null?void 0:J.adcode)===R.adcode?(p(),h("span",pg,"✓")):V("",!0)],10,vg)}),128)),!o.value&&c.value.length===0?(p(),h("div",hg,"暂无数据")):V("",!0)]),U[4]||(U[4]=f("div",{class:"addr-safe"},null,-1))])):V("",!0)]),_:1})])):V("",!0)]),_:1})])}}}),[["__scopeId","data-v-dfbeea42"]]),gg={class:"ctrl-agreement"},yg={key:0,class:"check-mark"},bg={class:"agreement-text"},_g=Ke(Pe({__name:"AgreementControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){const n=e,s=t,l=E(()=>{var u;return((u=n.item.props)==null?void 0:u.trueValue)??"true"}),a=E(()=>{var u;return((u=n.item.props)==null?void 0:u.falseValue)??""}),i=E(()=>{var c;const u=(c=n.field)==null?void 0:c.value;return u===l.value||u===!0||u===1||u==="1"}),r=E(()=>{var u;return n.item.label||((u=n.item.props)==null?void 0:u.guideText)||"本人已阅读并同意相关协议"});function o(){var c;if((c=n.field)!=null&&c.disabled)return;const u=i.value?a.value:l.value;s("change",{value:u,eventType:"pickChange"})}return(u,c)=>{var d;return p(),h("div",gg,[f("label",{class:"agreement-row",onClick:lt(o,["prevent"])},[f("span",{class:se(["checkbox",{checked:i.value,disabled:(d=e.field)==null?void 0:d.disabled}])},[i.value?(p(),h("span",yg,"✓")):V("",!0)],2),f("span",bg,k(r.value),1)])])}}}),[["__scopeId","data-v-76cc5619"]]),kg={class:"task-label"},Cg={class:"modal-card"},Sg={class:"modal-header"},wg={class:"modal-body"},Tg=["onUpdate:modelValue","placeholder"],qo=Ke(Pe({__name:"SubFormTask",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=H(!1),s=H({}),l=E(()=>{var v;const c=(v=t.item.props)==null?void 0:v.taskType,d={contact_info:[{label:"联系人姓名",key:"name",placeholder:"请输入姓名"},{label:"关系",key:"relation",placeholder:"如:朋友、同事"},{label:"联系电话",key:"phone",placeholder:"请输入手机号"}],business_info:[{label:"企业名称",key:"company",placeholder:"请输入企业名称"},{label:"经营范围",key:"scope",placeholder:"请输入经营范围"}],card_info_auth:[{label:"姓名",key:"name",placeholder:"请输入姓名"},{label:"身份证号",key:"idNumber",placeholder:"请输入身份证号"}],default:[{label:"字段1",key:"field1",placeholder:"请输入"},{label:"字段2",key:"field2",placeholder:"请输入"}]};return d[c]||d.default});function a(){s.value={},l.value.forEach(c=>{s.value[c.key]=""}),n.value=!0}function i(){n.value=!1,pn(t.formCore,t.item.key,{...s.value,_completed:!0,_completedAt:new Date().toISOString()})}function r(){n.value=!1}function o(c){c.stopPropagation(),c.target===c.currentTarget&&r()}const u=E(()=>{var d;const c=(d=t.field)==null?void 0:d.value;return c&&typeof c=="object"&&c._completed});return(c,d)=>(p(),h("div",{class:"task-subform",onClick:a},[f("div",{class:se(["task-trigger",{completed:u.value}])},[d[0]||(d[0]=f("span",{class:"task-icon"},"📋",-1)),f("span",kg,k(u.value?"✅ 已完成":e.item.placeholder||"点击填写子表单"),1),d[1]||(d[1]=f("span",{class:"task-arrow"},"▸",-1))],2),n.value?(p(),h("div",{key:0,class:"modal-overlay",onClick:o},[f("div",Cg,[f("div",Sg,[f("span",null,k(e.item.label||"子表单"),1),f("button",{class:"modal-close",onClick:r},"✕")]),f("div",wg,[(p(!0),h(le,null,_e(l.value,v=>(p(),h("div",{key:v.key,class:"modal-field"},[f("label",null,k(v.label),1),Gi(f("input",{"onUpdate:modelValue":$=>s.value[v.key]=$,placeholder:v.placeholder,class:"modal-input"},null,8,Tg),[[Ld,s.value[v.key]]])]))),128))]),f("div",{class:"modal-footer"},[f("button",{class:"btn-cancel",onClick:r},"取消"),f("button",{class:"btn-confirm",onClick:i},"确认")])])])):V("",!0)]))}}),[["__scopeId","data-v-1d2ebfc0"]]),xg={class:"task-label"},$g={class:"confirm-card"},Ag={class:"confirm-url"},Mg=Ke(Pe({__name:"H5JumpTask",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=H(!1),s=E(()=>{var u,c;return((u=t.item.props)==null?void 0:u.h5link)||((c=t.item.props)==null?void 0:c.taxLink)||"https://example.com/task"});function l(){n.value=!0}function a(){n.value=!1,setTimeout(()=>{pn(t.formCore,t.item.key,{url:s.value,_completed:!0,_completedAt:new Date().toISOString(),_mock:"模拟 H5 跳转已返回"})},500)}function i(){n.value=!1}function r(u,c){u.stopPropagation(),u.target===u.currentTarget&&c()}const o=E(()=>{var c;const u=(c=t.field)==null?void 0:c.value;return u&&typeof u=="object"&&u._completed});return(u,c)=>(p(),h("div",{class:"task-h5",onClick:l},[f("div",{class:se(["task-trigger",{completed:o.value}])},[c[1]||(c[1]=f("span",{class:"task-icon"},"🌐",-1)),f("span",xg,k(o.value?"✅ 已完成":e.item.placeholder||"点击跳转 H5 页面"),1),c[2]||(c[2]=f("span",{class:"task-badge"},"H5",-1)),c[3]||(c[3]=f("span",{class:"task-arrow"},"▸",-1))],2),n.value?(p(),h("div",{key:0,class:"modal-overlay",onClick:c[0]||(c[0]=d=>r(d,i))},[f("div",$g,[c[4]||(c[4]=f("div",{class:"confirm-icon"},"🌐",-1)),c[5]||(c[5]=f("div",{class:"confirm-title"},"即将跳转到外部页面",-1)),f("div",Ag,k(s.value),1),c[6]||(c[6]=f("div",{class:"confirm-hint"},"(Demo 模拟:实际将打开外部链接)",-1)),f("div",{class:"confirm-actions"},[f("button",{class:"btn-cancel",onClick:i},"取消"),f("button",{class:"btn-confirm",onClick:a},"确认跳转")])])])):V("",!0)]))}}),[["__scopeId","data-v-38867de4"]]),Eg={class:"task-icon"},Fg={class:"task-label"},Ig={class:"sig-card"},Dg={class:"sig-header"},Pg={class:"sig-body"},Og={key:0,class:"sig-placeholder"},Rg={class:"sig-footer"},Lg=["disabled"],Ng={class:"map-card"},Vg={class:"map-header"},Bg={class:"native-card"},jg={class:"native-icon"},Kg={class:"native-title"},Ug={class:"native-desc"},Hg={class:"native-actions"},Ga=Ke(Pe({__name:"NativeTask",props:{item:{},field:{},formCore:{}},setup(e){_d(J=>({v77bda564:j.value}));const t=e,n=E(()=>{var J;return((J=t.item.props)==null?void 0:J.taskType)||""}),s=H(!1),l=H(null),a=H(!1),i=H(null),r=H(!1);function o(){s.value=!0,r.value=!1,zn(()=>{const J=l.value;if(!J)return;const S=window.devicePixelRatio||1,G=J.getBoundingClientRect();J.width=G.width*S,J.height=G.height*S;const he=J.getContext("2d");he.scale(S,S),he.strokeStyle="#333",he.lineWidth=3,he.lineCap="round",he.lineJoin="round",i.value=he})}function u(J){const G=l.value.getBoundingClientRect(),he="touches"in J?J.touches[0].clientX:J.clientX,Le="touches"in J?J.touches[0].clientY:J.clientY;return{x:he-G.left,y:Le-G.top}}function c(J){J.preventDefault(),a.value=!0,r.value=!0;const{x:S,y:G}=u(J);i.value.beginPath(),i.value.moveTo(S,G)}function d(J){if(J.preventDefault(),!a.value)return;const{x:S,y:G}=u(J);i.value.lineTo(S,G),i.value.stroke()}function v(){a.value=!1}function $(){const J=l.value;i.value.clearRect(0,0,J.width,J.height),r.value=!1}function x(){const J=l.value.toDataURL("image/png");s.value=!1,pn(t.formCore,t.item.key,{signatureDataUrl:J,_completed:!0,_completedAt:new Date().toISOString()})}function A(){s.value=!1}const w=H(!1);function O(){w.value=!0}function y(){w.value=!1,pn(t.formCore,t.item.key,{lng:116.404+Math.random()*.1,lat:39.915+Math.random()*.1,address:`模拟选点地址 ${Date.now()}`,_completed:!0,_completedAt:new Date().toISOString()})}const b=H(!1);function C(){b.value=!0}function B(){b.value=!1,pn(t.formCore,t.item.key,{_completed:!0,_completedAt:new Date().toISOString(),_mock:`已完成原生任务: ${n.value}`})}function D(J,S){J.stopPropagation(),J.target===J.currentTarget&&S()}function U(){n.value==="signature"?o():n.value==="map"?O():C()}const q=E(()=>{var S;const J=(S=t.field)==null?void 0:S.value;return J&&typeof J=="object"&&J._completed}),R=E(()=>n.value==="signature"?"✍️":n.value==="map"?"📍":"📱"),j=E(()=>n.value==="signature"?"#eb2f96":n.value==="map"?"#2f54eb":"#fa8c16");return(J,S)=>(p(),h("div",{class:"task-native",onClick:U},[f("div",{class:se(["task-trigger",{completed:q.value}])},[f("span",Eg,k(R.value),1),f("span",Fg,k(q.value?"✅ 已完成":e.item.placeholder||`点击完成${e.item.label}`),1),S[4]||(S[4]=f("span",{class:"task-arrow"},"▸",-1))],2),s.value?(p(),h("div",{key:0,class:"modal-overlay",onClick:S[0]||(S[0]=G=>D(G,A))},[f("div",Ig,[f("div",Dg,[f("span",null,k(e.item.label||"手写签名"),1),f("button",{class:"modal-close",onClick:A},"✕")]),f("div",Pg,[f("canvas",{ref_key:"canvasRef",ref:l,class:"sig-canvas",onMousedown:c,onMousemove:d,onMouseup:v,onMouseleave:v,onTouchstart:c,onTouchmove:d,onTouchend:v},null,544),r.value?V("",!0):(p(),h("div",Og,"在此处签名"))]),f("div",Rg,[f("button",{class:"btn-clear",onClick:$},"清除"),f("button",{class:"btn-confirm-sig",onClick:x,disabled:!r.value},"确认签名",8,Lg)])])])):V("",!0),w.value?(p(),h("div",{key:1,class:"modal-overlay",onClick:S[1]||(S[1]=G=>D(G,y))},[f("div",Ng,[f("div",Vg,[f("span",null,k(e.item.label||"地图选点"),1),f("button",{class:"modal-close",onClick:y},"✕")]),S[5]||(S[5]=f("div",{class:"map-placeholder"},[f("span",{class:"map-pin"},"📍"),f("p",null,"地图选点(Demo 模拟)"),f("p",{class:"map-hint"},"点击任意位置确认选点")],-1)),f("div",{class:"map-footer"},[f("button",{class:"btn-confirm-sig",onClick:y},"在此位置选点")])])])):V("",!0),b.value?(p(),h("div",{key:2,class:"modal-overlay",onClick:S[3]||(S[3]=G=>D(G,()=>b.value=!1))},[f("div",Bg,[f("div",jg,k(R.value),1),f("div",Kg,k(e.item.label||"原生页面任务"),1),S[6]||(S[6]=f("div",{class:"native-hint"},"(Demo 模拟:实际将拉起原生页面)",-1)),f("div",Ug,"taskType: "+k(n.value),1),f("div",Hg,[f("button",{class:"btn-cancel",onClick:S[2]||(S[2]=G=>b.value=!1)},"取消"),f("button",{class:"btn-confirm-sig",onClick:B},"模拟完成")])])])):V("",!0)]))}}),[["__scopeId","data-v-07b1216e"]]),qg={class:"task-icon"},Wg={class:"task-label"},Gg={key:0,class:"spinner"},zg={key:1,class:"task-arrow"},Yg=Ke(Pe({__name:"ApiTask",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=H(!1),s=H(""),l=E(()=>{var o;return((o=t.item.props)==null?void 0:o.taskType)||""}),a=E(()=>pf()[l.value]);async function i(){if(!n.value){n.value=!0,s.value="";try{if(a.value){const o=await a.value(t.formCore,t.item.key);n.value=!1,pn(t.formCore,t.item.key,{...o,_completed:!0,_completedAt:new Date().toISOString()})}else await new Promise(o=>setTimeout(o,800)),n.value=!1,pn(t.formCore,t.item.key,{code:"00",data:{id:`mock_${Date.now()}`,name:`模拟${t.item.label}结果`},_completed:!0,_completedAt:new Date().toISOString()})}catch(o){n.value=!1,s.value=(o==null?void 0:o.message)||"请求失败",setTimeout(()=>{s.value=""},3e3)}}}const r=E(()=>{var u;const o=(u=t.field)==null?void 0:u.value;return o&&typeof o=="object"&&o._completed});return(o,u)=>(p(),h("div",{class:"task-api",onClick:i},[f("div",{class:se(["task-trigger",{completed:r.value,loading:n.value,error:!!s.value}])},[f("span",qg,k(n.value?"⏳":s.value?"⚠️":"🔌"),1),f("span",Wg,[n.value?(p(),h(le,{key:0},[Je("请求中...")],64)):s.value?(p(),h(le,{key:1},[Je(k(s.value),1)],64)):r.value?(p(),h(le,{key:2},[Je("✅ 已完成")],64)):(p(),h(le,{key:3},[Je(k(e.item.placeholder||`点击获取${e.item.label}`),1)],64))]),n.value?(p(),h("span",Gg)):(p(),h("span",zg,"▸"))],2)]))}}),[["__scopeId","data-v-a9e2ea16"]]),Jg={class:"task-icon"},Xg={class:"task-label"},Zg={key:0,class:"progress-bar"},Qg=Ke(Pe({__name:"CustomerTask",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=H(!1),s=H(0),l=E(()=>{var o;return((o=t.item.props)==null?void 0:o.taskType)||""});function a(){if(n.value)return;n.value=!0,s.value=0;const o=setInterval(()=>{s.value+=20,s.value>=100&&(clearInterval(o),n.value=!1,pn(t.formCore,t.item.key,{score:Math.floor(Math.random()*30)+70,passed:!0,_completed:!0,_completedAt:new Date().toISOString()}))},400)}const i=E(()=>{var u;const o=(u=t.field)==null?void 0:u.value;return o&&typeof o=="object"&&o._completed}),r=E(()=>l.value==="face_verify_sign"?"👤":"📷");return(o,u)=>(p(),h("div",{class:"task-customer",onClick:a},[f("div",{class:se(["task-trigger",{completed:i.value,loading:n.value}])},[f("span",Jg,k(r.value),1),f("span",Xg,k(n.value?"检测中...":i.value?"✅ 已完成":e.item.placeholder||`点击启动${e.item.label}`),1),u[0]||(u[0]=f("span",{class:"task-badge"},"SDK",-1))],2),n.value?(p(),h("div",Zg,[f("div",{class:"progress-fill",style:$t({width:s.value+"%"})},null,4)])):V("",!0)]))}}),[["__scopeId","data-v-cff849a4"]]),ey={class:"task-label"},ty={class:"inline-card"},ny={class:"inline-link"},sy=Ke(Pe({__name:"InlineTask",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=H(!1),s=E(()=>{var u;return((u=t.item.props)==null?void 0:u.taxLink)||`https://tax.example.com/copy?id=${Date.now()}`});function l(){n.value=!0}function a(){var u;n.value=!1,(u=navigator.clipboard)==null||u.writeText(s.value).catch(()=>{}),pn(t.formCore,t.item.key,{copied:!0,url:s.value,_completed:!0,_completedAt:new Date().toISOString()})}function i(){n.value=!1}function r(u,c){u.stopPropagation(),u.target===u.currentTarget&&c()}const o=E(()=>{var c;const u=(c=t.field)==null?void 0:c.value;return u&&typeof u=="object"&&u._completed});return(u,c)=>(p(),h("div",{class:"task-inline",onClick:l},[f("div",{class:se(["task-trigger",{completed:o.value}])},[c[1]||(c[1]=f("span",{class:"task-icon"},"🔗",-1)),f("span",ey,k(o.value?"✅ 已复制":e.item.placeholder||"复制链接"),1),c[2]||(c[2]=f("span",{class:"task-badge"},"inline",-1))],2),n.value?(p(),h("div",{key:0,class:"modal-overlay",onClick:c[0]||(c[0]=d=>r(d,i))},[f("div",ty,[c[3]||(c[3]=f("div",{class:"inline-icon"},"🔗",-1)),c[4]||(c[4]=f("div",{class:"inline-title"},"复制链接",-1)),f("div",ny,k(s.value),1),c[5]||(c[5]=f("div",{class:"inline-hint"},"(Demo 模拟:实际将复制并跳转)",-1)),f("div",{class:"inline-actions"},[f("button",{class:"btn-cancel",onClick:i},"取消"),f("button",{class:"btn-confirm",onClick:a},"复制并完成")])])])):V("",!0)]))}}),[["__scopeId","data-v-a152f69c"]]),ly=Pe({__name:"TaskControl",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=E(()=>{const s=hf(t.item.props);return{subForm:qo,h5:Mg,signature:Ga,map:Ga,native:Ga,api:Yg,customer:Qg,inline:sy}[s]||qo});return(s,l)=>(p(),st(Xn(n.value),{item:e.item,field:e.field,formCore:e.formCore},null,8,["item","field","formCore"]))}}),ay={class:"list-row-head"},iy=["disabled","onClick"],ry=["value","disabled","onChange"],oy={value:""},cy=["value"],uy=["type","value","placeholder","disabled","onBlur"],dy={key:2,class:"list-error"},fy={key:0,class:"list-summary-error"},vy=["disabled"],py={class:"list-hint"},hy=Ke(Pe({__name:"ListControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){const n=e,s=t,l=E(()=>{var b;return Array.isArray((b=n.field)==null?void 0:b.value)?n.field.value:[]}),a=E(()=>n.item.subItems??[]),i=E(()=>{var b;return((b=n.item.listMeta)==null?void 0:b.minItems)??1}),r=E(()=>{var b;return(b=n.item.listMeta)==null?void 0:b.maxItems}),o=E(()=>r.value===void 0||l.value.length<r.value),u=E(()=>{var b;return((b=n.item.listMeta)==null?void 0:b.removable)!==!1&&l.value.length>i.value}),c=E(()=>{var b;return((b=n.field)==null?void 0:b.collectionErrors)??{}});function d(b,C){var B;return((B=l.value[b])==null?void 0:B[C.key])??""}function v(b){return b&&typeof b=="object"?b.code||"":b==null?"":String(b)}function $(b,C,B){const D=l.value.map(U=>({...U}));D[b]={...D[b]??{},[C.key]:B},s("change",{value:D,eventType:"inputBlur"})}function x(b,C,B){const D=B.target;$(b,C,D.value.trim())}function A(b,C,B){const D=B.target,U=(C.initOptions??[]).find(q=>q.code===D.value);$(b,C,U?{code:U.code,name:U.name}:"")}function w(){var b;!o.value||(b=n.field)!=null&&b.disabled||s("change",{value:[...l.value,{}],eventType:"inputChange"})}function O(b){var C;!u.value||(C=n.field)!=null&&C.disabled||s("change",{value:l.value.filter((B,D)=>D!==b),eventType:"inputChange"})}function y(b,C){return c.value[`${n.item.key}[${b}].${C}`]}return(b,C)=>{var B,D,U;return p(),h("div",{class:se(["ctrl-list",{disabled:(B=e.field)==null?void 0:B.disabled}])},[(p(!0),h(le,null,_e(l.value,(q,R)=>{var j,J;return p(),h("article",{key:R,class:"list-row"},[f("div",ay,[f("strong",null,"联系人 "+k(R+1),1),((j=e.item.listMeta)==null?void 0:j.removable)!==!1?(p(),h("button",{key:0,type:"button",class:"remove-button",disabled:!u.value||((J=e.field)==null?void 0:J.disabled),onClick:S=>O(R)}," 删除 ",8,iy)):V("",!0)]),(p(!0),h(le,null,_e(a.value,S=>{var G,he;return p(),h("label",{key:S.key,class:"list-field"},[f("span",{class:se(["list-field-label",{required:S.required}])},k(S.label||S.key),3),S.type==="select"||S.type==="cascader"?(p(),h("select",{key:0,class:"list-input",value:v(d(R,S)),disabled:((G=e.field)==null?void 0:G.disabled)||S.disabled,onChange:Le=>A(R,S,Le)},[f("option",oy,k(S.placeholder||"请选择"),1),(p(!0),h(le,null,_e(S.initOptions||[],Le=>(p(),h("option",{key:Le.code,value:Le.code},k(Le.name),9,cy))),128))],40,ry)):(p(),h("input",{key:1,class:"list-input",type:S.type==="number"?"number":S.type==="phone"?"tel":"text",value:d(R,S),placeholder:S.placeholder||"请输入",disabled:((he=e.field)==null?void 0:he.disabled)||S.disabled,onBlur:Le=>x(R,S,Le)},null,40,uy)),y(R,S.key)?(p(),h("span",dy,k(y(R,S.key)),1)):V("",!0)])}),128))])}),128)),Object.keys(c.value).length?(p(),h("p",fy," 请修改重复或冲突的联系人手机号。 ")):V("",!0),f("button",{type:"button",class:"add-button",disabled:!o.value||((D=e.field)==null?void 0:D.disabled),onClick:w},k(((U=e.item.listMeta)==null?void 0:U.addButtonText)||"+ 添加联系人"),9,vy),f("p",py,k(i.value)+"–"+k(r.value??"∞")+" 项,当前 "+k(l.value.length)+" 项",1)],2)}}}),[["__scopeId","data-v-df895619"]]),my={class:"ctrl-date"},gy=["value","disabled","aria-label"],yy=["value","disabled","aria-label"],by=["value","disabled","aria-label"],_y=Ke(Pe({__name:"DateControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){var v,$,x;const n=e,s=t,l=E(()=>n.item.type==="dateRange"),a=H(o((v=n.field)==null?void 0:v.value)),i=H(u(($=n.field)==null?void 0:$.value)[0]),r=H(u((x=n.field)==null?void 0:x.value)[1]);ut(()=>{var A;return(A=n.field)==null?void 0:A.value},A=>{if(l.value){const[w,O]=u(A);i.value=w,r.value=O}else a.value=o(A)});function o(A){return A==null||A===""?"":String(A)}function u(A){if(Array.isArray(A))return[String(A[0]||""),String(A[1]||"")];if(A&&typeof A=="object"){const w=A;return[String(w.start||""),String(w.end||"")]}return["",""]}function c(A){const w=A.target.value||"";a.value=w,s("change",{value:w,eventType:"pickChange"})}function d(){const A=i.value,w=r.value;s("change",{value:A||w?[A,w]:"",eventType:"pickChange"})}return(A,w)=>{var O,y,b;return p(),h("div",my,[l.value?(p(),h(le,{key:0},[f("input",{class:"ctrl-date-input",type:"date",value:i.value,disabled:(O=e.field)==null?void 0:O.disabled,"aria-label":(e.item.label||"日期")+"开始",onChange:w[0]||(w[0]=C=>{i.value=C.target.value,d()})},null,40,gy),w[2]||(w[2]=f("span",{class:"ctrl-date-sep"},"至",-1)),f("input",{class:"ctrl-date-input",type:"date",value:r.value,disabled:(y=e.field)==null?void 0:y.disabled,"aria-label":(e.item.label||"日期")+"结束",onChange:w[1]||(w[1]=C=>{r.value=C.target.value,d()})},null,40,yy)],64)):(p(),h("input",{key:1,class:"ctrl-date-input",type:"date",value:a.value,disabled:(b=e.field)==null?void 0:b.disabled,"aria-label":e.item.label||"日期",onChange:c},null,40,by))])}}}),[["__scopeId","data-v-528a8417"]]),ky={class:"ctrl-verify-wrap"},Cy={class:"ctrl-verify"},Sy=["value","placeholder","disabled","maxlength"],wy=["disabled"],Ty={key:0,class:"ctrl-verify-error"},xy=Ke(Pe({__name:"VerifyCodeControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){var b;const n=e,s=t,l=je(Os,null),a=H(String(((b=n.field)==null?void 0:b.value)||"")),i=H(0),r=H(!1),o=H("");let u=null;ut(()=>{var C;return(C=n.field)==null?void 0:C.value},C=>{a.value=C==null?"":String(C)});const c=E(()=>{var C;return Number((C=n.item.props)==null?void 0:C.countTime)||60}),d=E(()=>{var C,B;return((C=n.item.props)==null?void 0:C.verifyText)||((B=n.item.props)==null?void 0:B.reVerifyText)||"获取验证码"}),v=E(()=>i.value>0),$=E(()=>i.value>0?`${i.value}s`:r.value?"发送中":d.value);function x(C){a.value=C.target.value}function A(){const C=a.value.trim();a.value=C,s("change",{value:C,eventType:"inputBlur"})}function w(){u&&(clearInterval(u),u=null)}function O(){i.value=c.value,w(),u=setInterval(()=>{i.value-=1,i.value<=0&&w()},1e3)}async function y(){var C,B,D,U,q,R;if(!(v.value||r.value||(C=n.field)!=null&&C.disabled)){o.value="",r.value=!0;try{const j=Me(l);if(j!=null&&j.sendVerifyCode){const J=((B=n.item.props)==null?void 0:B.mobileKey)||((D=n.item.props)==null?void 0:D.bindMobileKey),S=J&&((R=(q=(U=n.formCore)==null?void 0:U.fields)==null?void 0:q[J])==null?void 0:R.value)!=null?String(n.formCore.fields[J].value):void 0;await j.sendVerifyCode({item:n.item,mobile:S})}O()}catch(j){o.value=(j==null?void 0:j.message)||"发送失败"}finally{r.value=!1}}}return yl(w),(C,B)=>{var D,U,q;return p(),h("div",ky,[f("div",Cy,[f("input",{class:"ctrl-verify-input",type:"text",inputmode:"numeric",value:a.value,placeholder:e.item.placeholder||"请输入验证码",disabled:(D=e.field)==null?void 0:D.disabled,maxlength:((U=e.item.props)==null?void 0:U.maxlength)||6,onInput:x,onBlur:A},null,40,Sy),f("button",{type:"button",class:"ctrl-verify-btn",disabled:((q=e.field)==null?void 0:q.disabled)||v.value||r.value,onClick:y},k($.value),9,wy)]),o.value?(p(),h("div",Ty,k(o.value),1)):V("",!0)])}}}),[["__scopeId","data-v-2efef382"]]),$y={class:"ctrl-upload-wrap"},Ay={class:"ctrl-upload"},My=["src"],Ey=["onClick"],Fy={key:0,class:"ctrl-upload-add"},Iy={class:"ctrl-upload-hint"},Dy=["multiple"],Py={key:0,class:"ctrl-upload-error"},Oy=Ke(Pe({__name:"ImageUploadControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){var $;const n=e,s=t,l=je(Os,null),a=H(c(($=n.field)==null?void 0:$.value)),i=H(!1),r=H("");ut(()=>{var x;return(x=n.field)==null?void 0:x.value},x=>{a.value=c(x)});const o=E(()=>{var x;return Number((x=n.item.props)==null?void 0:x.maxCount)||1}),u=E(()=>{var x;return a.value.length<o.value&&!((x=n.field)!=null&&x.disabled)&&!i.value});function c(x){return Array.isArray(x)?x.map(String).filter(Boolean):typeof x=="string"&&x?[x]:[]}async function d(x){var b;const A=x.target,w=Array.from(A.files||[]);if(A.value="",!w.length||(b=n.field)!=null&&b.disabled)return;const O=o.value-a.value.length,y=w.slice(0,Math.max(0,O));if(y.length){r.value="",i.value=!0;try{const C=Me(l);let B;if(C!=null&&C.uploadFile){const D=[];for(const U of y){const q=await C.uploadFile({name:U.name,size:U.size,raw:U},{item:n.item});if(!(q!=null&&q.url))throw new Error("上传未返回 url");D.push(q.url)}B=[...a.value,...D]}else B=[...a.value,...y.map(D=>URL.createObjectURL(D))];a.value=B,s("change",{value:B,eventType:"pickChange"})}catch(C){r.value=(C==null?void 0:C.message)||"上传失败"}finally{i.value=!1}}}function v(x){var w;if((w=n.field)!=null&&w.disabled)return;const A=a.value.filter((O,y)=>y!==x);a.value=A,s("change",{value:A,eventType:"pickChange"})}return(x,A)=>(p(),h("div",$y,[f("div",Ay,[(p(!0),h(le,null,_e(a.value,(w,O)=>{var y;return p(),h("div",{key:w+O,class:"ctrl-upload-thumb"},[f("img",{src:w,alt:""},null,8,My),(y=e.field)!=null&&y.disabled?V("",!0):(p(),h("button",{key:0,type:"button",class:"ctrl-upload-remove","aria-label":"删除图片",onClick:b=>v(O)}," × ",8,Ey))])}),128)),u.value?(p(),h("label",Fy,[A[0]||(A[0]=f("span",null,"+",-1)),f("span",Iy,k(i.value?"…":e.item.placeholder||"上传"),1),f("input",{type:"file",accept:"image/*",multiple:o.value>1,hidden:"",onChange:d},null,40,Dy)])):V("",!0)]),r.value?(p(),h("div",Py,k(r.value),1)):V("",!0)]))}}),[["__scopeId","data-v-367b5f3b"]]),Ry={class:"ctrl-slider"},Ly=["min","max","step","value","disabled","aria-label"],Ny={class:"ctrl-slider-value"},Vy=Ke(Pe({__name:"SliderControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){var d;const n=e,s=t,l=E(()=>{var v;return Number(((v=n.item.props)==null?void 0:v.min)??0)}),a=E(()=>{var v;return Number(((v=n.item.props)==null?void 0:v.max)??100)}),i=E(()=>{var v;return Number(((v=n.item.props)==null?void 0:v.step)??1)}),r=H(o((d=n.field)==null?void 0:d.value,l.value));ut(()=>{var v;return(v=n.field)==null?void 0:v.value},v=>{r.value=o(v,l.value)});function o(v,$){const x=Number(v);return Number.isFinite(x)?x:$}function u(v){r.value=Number(v.target.value)}function c(v){const $=Number(v.target.value);r.value=$,s("change",{value:$,eventType:"pickChange"})}return(v,$)=>{var x;return p(),h("div",Ry,[f("input",{class:"ctrl-slider-input",type:"range",min:l.value,max:a.value,step:i.value,value:r.value,disabled:(x=e.field)==null?void 0:x.disabled,"aria-label":e.item.label||"滑块",onInput:u,onChange:c},null,40,Ly),f("span",Ny,k(r.value),1)])}}}),[["__scopeId","data-v-60976b1e"]]),By={input:"InputControl",textarea:"InputControl",number:"InputControl",idcard:"InputControl",phone:"InputControl",bankCard:"InputControl",select:"SelectControl",cascader:"CascaderControl",address:"AddressControl",address5:"AddressControl",addressPinyin:"AddressControl",search:"SearchControl",agreement:"AgreementControl",task:"TaskControl",date:"DateControl",dateRange:"DateControl",verifyCode:"VerifyCodeControl",imageUpload:"ImageUploadControl",slider:"SliderControl",signature:"TaskControl",custom:"InputControl",list:"ListControl"};function jy(e,t){return _o(e)?"TaskControl":By[t]||"InputControl"}function Ky(e,t,n){const s=_o(e);return s?{...n||{},taskType:e,taskCategory:s==="customer"?"CUSTOMER_TASK":s==="inline"?"inline":"TASKS"}:n}function Uy(e){if(typeof e!="object"||e===null)return{value:e};const t=e.value!==void 0?e.value:e,n=e.eventType,{value:s,eventType:l,...a}=e;return Object.keys(a).length>0?{value:t,eventType:n,extraFields:a}:{value:t,eventType:n}}const Hy=["data-label-position","data-field-key"],qy={key:0,class:"form-error"},Wy={key:1,class:"form-icon"},Gy={key:0},zy={key:1},Yy={key:2},Wo=Ke(Pe({__name:"FormItem",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=je("customControls",{}),s=je("themeLabelPosition",void 0),l={InputControl:Pm,SelectControl:jm,CascaderControl:Zm,SearchControl:ig,AddressControl:mg,AgreementControl:_g,TaskControl:ly,ListControl:hy,DateControl:_y,VerifyCodeControl:xy,ImageUploadControl:Oy,SliderControl:Vy},a=E(()=>{const u=Ky(t.item.key,t.item.type,t.item.raw.props||{});return u===t.item.raw.props?t.item:{...t.item,raw:{...t.item.raw,props:u}}}),i=E(()=>{var u;return bf((u=t.item.raw)==null?void 0:u.labelPosition,Me(s))}),r=E(()=>{var c;if(t.item.type==="custom"){const d=(c=t.item.raw)==null?void 0:c.customRender;if(d&&n[d])return n[d];if(d&&typeof d!="string")return d}const u=jy(t.item.key,t.item.type);return l[u]});function o(u){const{value:c,eventType:d,extraFields:v}=Uy(u);t.formCore.setControlData(t.item.key,c,{eventType:d,...v?{extraFields:v}:{}})}return(u,c)=>{var d,v;return p(),h("div",{class:se(["form-item",{"form-item-error":(d=e.field)==null?void 0:d.errMsg,"form-item--top":i.value==="top","form-item--left":i.value==="left"}]),"data-label-position":i.value,"data-field-key":e.item.key},[e.item.hideLabel?V("",!0):(p(),h("label",{key:0,class:se(["form-label",{required:e.item.required}])},k(e.item.label),3)),f("div",{class:se(["form-control",{"form-control-full":e.item.hideLabel}])},[(p(),st(Xn(r.value),{item:a.value.raw,field:e.field,formCore:e.formCore,onChange:o},null,40,["item","field","formCore"])),(v=e.field)!=null&&v.errMsg?(p(),h("div",qy,k(e.field.errMsg),1)):V("",!0)],2),e.item.rightIcon&&!e.item.hideLabel&&i.value==="left"?(p(),h("span",Wy,[e.item.rightIcon==="arrow"?(p(),h("span",Gy,"›")):e.item.rightIcon==="location"?(p(),h("span",zy,"📍")):e.item.rightIcon==="search"?(p(),h("span",Yy,"🔍")):V("",!0)])):V("",!0)],10,Hy)}}}),[["__scopeId","data-v-109afe7f"]]),Jy={class:"form-group"},Xy={class:"group-body"},Zy=Ke(Pe({__name:"FormGroup",props:{group:{},fields:{},formCore:{}},setup(e){const t=e,n=je("FormItemComponent",void 0),s=E(()=>n?Me(n):Wo),l=E(()=>t.group.items.filter(a=>{const i=t.fields[a.key];return!i||i.visible}));return(a,i)=>(p(),h("div",Jy,[f("div",Xy,[(p(!0),h(le,null,_e(l.value,r=>(p(),st(Xn(s.value),{key:r.key,item:r,field:e.fields[r.key],formCore:e.formCore},null,8,["item","field","formCore"]))),128))])]))}}),[["__scopeId","data-v-be65346c"]]),Qy=["data-shell","data-label-align","data-content-align"],eb={key:0,class:"form-render__title"},tb=Ke(Pe({__name:"FormRender",props:{groups:{},fields:{},formCore:{},customControls:{},labelPosition:{},title:{},labelAlign:{},labelWidth:{},contentAlign:{},FormGroupComponent:{},FormItemComponent:{},hostHandlers:{}},setup(e){const t=e,n=E(()=>t.labelAlign==="left"||t.labelAlign==="right"||t.labelAlign==="top"?t.labelAlign:t.labelPosition==="top"?"top":(t.labelPosition==="left","left")),s=E(()=>n.value==="top"?"top":"left");yt("customControls",t.customControls||{}),yt("themeLabelPosition",s),yt("formUiLayout",E(()=>({labelAlign:n.value,labelWidth:t.labelWidth??"81px",contentAlign:t.contentAlign??"left"}))),yt("FormItemComponent",E(()=>t.FormItemComponent||Wo)),yt(Os,E(()=>t.hostHandlers??null));const l=E(()=>t.FormGroupComponent||Zy);return(a,i)=>(p(),h("div",{class:"form-render","data-shell":e.FormGroupComponent?"override":"default","data-label-align":n.value,"data-content-align":e.contentAlign||"left"},[e.title?(p(),h("div",eb,k(e.title),1)):V("",!0),(p(!0),h(le,null,_e(e.groups,r=>(p(),st(Xn(l.value),{key:r.key,group:r,fields:e.fields,formCore:e.formCore},null,8,["group","fields","formCore"]))),128)),ur(a.$slots,"footer",{},void 0)],8,Qy))}}),[["__scopeId","data-v-a67197e5"]]),nb={key:0,class:"ap-exit-final-bar"},sb={class:"ap-exit-final-actions"},lb={class:"ap-header__title"},ab={class:"ap-header__text"},ib=["title"],rb={key:0,class:"ap-header__actions"},ob={key:2,class:"ap-final-prog"},cb={class:"ap-prog__top"},ub={key:1,class:"ap-done"},db={class:"ap-prog__track"},fb={key:3,class:"ap-toolbar","data-testid":"agent-debug-toolbar"},vb={class:"ap-skin-row"},pb=["onClick"],hb={class:"ap-row"},mb={class:"ap-seg"},gb=["disabled"],yb={class:"ap-dots"},bb=["title","aria-label","onClick"],_b={class:"ap-row ap-row--sub"},kb=["title"],Cb={class:"ap-seg__lbl"},Sb=["title"],wb={class:"ap-row ap-row--finalize"},Tb=["disabled"],xb=["title"],$b=["title"],Ab={key:0,class:"ap-prog"},Mb={class:"ap-prog__top"},Eb={key:1,class:"ap-done"},Fb={class:"ap-prog__track"},Ib={key:4,class:"ap-draft-bar","data-testid":"draft-restored-bar"},Db={key:5,class:"ap-err-summary-bar","data-testid":"error-summary-bar"},Pb={key:6,class:"ap-toast",role:"alert"},Ob={key:0,class:"ap-status is-err"},Rb={key:1,class:"ap-status"},Lb={key:0,class:"ap-desc"},Nb={key:1,class:"ap-stepper"},Vb=["onClick"],Bb={key:2,class:"ap-step-nav"},jb=["disabled"],Kb={class:"ap-step-idx"},Ub={class:"ap-footer"},Hb=["disabled"],qb={class:"ap-receipt","data-testid":"final-receipt-sheet"},Wb={class:"ap-receipt__head"},Gb={class:"ap-receipt__title"},zb={class:"ap-receipt__sub"},Yb={class:"ap-receipt__list"},Jb={class:"ap-receipt__lbl"},Xb={class:"ap-receipt__val"},Zb={class:"ap-receipt__actions"},Qb=["disabled"],e_={class:"ap-drawer","data-testid":"agent-drawer"},t_={class:"ap-drawer__head"},n_={class:"ap-drawer__tabs"},s_={class:"ap-drawer__body"},l_={key:1,class:"ap-inbox-bar"},a_=["disabled"],i_={key:0,class:"ap-inbox-ok"},r_={class:"ap-code"},o_={key:1,class:"ap-code"},c_={class:"ap-inbox-bar"},u_={class:"ap-code"};Kd(Ke(Pe({__name:"AgentPreviewApp",setup(e){var ls;const t=typeof window<"u"?new URLSearchParams(window.location.search):new URLSearchParams,n=t.get("embed")==="1",s=t.get("id")||"",l=t.get("lang")||t.get("locale"),a=H(Kt(l||(typeof window<"u"?(ls=window.__AGENT_THEME_CONFIG__)==null?void 0:ls.locale:void 0))),i=E(()=>a.value==="en-US"),r=H(t.get("final")==="1"||typeof window<"u"&&window.__AGENT_PREVIEW_MODE__==="final"),o=H(!1),u=E(()=>r.value||o.value),c=H(!1),d=H(!1),v=H(!1),$=H(!1),x=H(null),A=H(0),w=H(!1),O=H(""),y=H(null),b=sl({}),C=H([]),B=H({}),D=H([]),U=H(null),q=H(!1),R=H("payload"),j=H(""),J=H(!1),S=H(0),G=H(!1),he=H(null);let Le=null,Ie=null;const $e=H("fin-minimal"),ce=H("flat"),Ce=H(0),Xe=H(""),ze=H("comfortable"),qe=H("auto"),Ue=H(t.get("mode")==="desktop"?"desktop":"mobile"),xt=H(!1),Jt=H(!0),kt=H("top"),ke=H(""),P=E(()=>i.value?{defaultTitle:"Form",liveBadge:"● Live",liveTitle:F=>`SSE live reload connected (${F} updates)`,refresh:"Refresh",reset:"Reset",finalPreviewBanner:"Final Deliverable Preview (all debug toolbars hidden)",exportFinalHtml:"Export Final HTML",backToTuning:"Back to Tuning",progressLabel:"Progress",requiredLabel:"Required",jumpMissing:"Locate Missing ›",requiredDone:"All required done ✓",modeFlat:"Flat",modeCollapsible:"Collapsible",modeStep:"Step",reviewOn:"Review ✓",reviewOff:"Review",kbTitle:"Keypad policy: Auto uses native keyboard on PC & custom keypad on mobile",kbLabel:"Keypad",kbAuto:"Auto",kbCustom:"Keypad",kbNative:"Native",vpTitle:"Switch between Mobile and Desktop form viewport",vpMobile:"Mobile",vpDesktop:"Desktop",btnFinalPreview:"Final View",btnSaveTheme:"Save Theme",btnSavingTheme:"Saving…",btnExportSchema:"Schema",btnExportSchemaTitle:"Download pure FormSchema JSON for Vue / React / Miniapp SDKs",btnMobileBundle:"Bundle",btnMobileBundleTitle:"Download Mobile Bundle (FormSchema + locked ThemeConfig)",btnFinalHtml:"Final HTML",draftRestored:"Restored unsaved local draft",draftClear:"Clear & Restart",errSummary:F=>`${F} fields need attention`,errNext:"Next error ›",initCore:"Initializing FormCore…",stepFallback:F=>`Step ${F}`,stepPrev:"Previous",stepNext:"Next",stepVerify:"Verify All",footerPayload:"Data / Telemetry",footerSchema:"Schema",submitting:"Submitting…",submitDefault:"Submit Form",validateAndCollect:"Validate & Collect",receiptSubmitted:"Submitted ✓",receiptReady:"Validation Passed · Ready to Submit",receiptIdPrefix:" · Receipt ID ",receiptSaveInbox:"Save to Local Inbox",receiptSavedInbox:F=>`Saved to Inbox #${F}`,receiptDownloadJson:"Download Receipt JSON",receiptBack:"Back to Form",tabPayload:"Payload",tabTelemetry:F=>`Telemetry (${F})`,tabSchema:"Schema",close:"Close",validatePassed:"validateAll passed ✓",validateFailed:"validateAll has errors ✗",saveInboxBtn:"Save to Local Data Hub Inbox",savingInbox:"Saving…",savedInboxMeta:(F,M)=>`Saved #${F} (${M})`,dlPureSchema:"Download FormSchema JSON",dlMobileBundle:"Download Mobile Bundle (Schema + Theme)",toastMockCode:"Demo verification code sent: 666888 (preview mock)",toastDraftCleared:"Draft cleared — starting fresh",toastAllRequiredDone:"All required fields are completed ✓",toastNextError:(F,M,Q,oe)=>`Error ${F}/${M} "${Q}": ${oe}`,toastStepBlocked:(F,M,Q)=>`Please fix "${F}": ${M}${Q>1?` (${Q} issues in this step)`:""}`,toastSubmitBlocked:(F,M,Q)=>`Please fix "${F}": ${M}${Q>1?` (${Q} issues total)`:""}`,toastSubmitGenericErr:"Please fix the highlighted fields",toastSubmitFailed:F=>`Submit failed (${F}). Your input is preserved — please retry.`,toastThemeSaved:"Theme & interaction settings saved to theme.json ✓",toastThemeFailed:F=>`Failed to save theme: ${F}`,toastExportHtmlOk:"Exported zero-chrome Final HTML ✓",toastExportHtmlFallback:"Use CLI preview-html --mode final in this environment",toastExportFail:F=>`Export failed: ${F}`,toastExportBundleOk:"Exported Mobile Bundle (Schema + locked Theme) ✓",toastExportSchemaOk:"Exported pure FormSchema JSON ✓",toastInboxSaved:F=>`Saved to local inbox (${F} total)`,toastInboxFail:F=>`Failed to save: ${F}`,toastLiveUpdated:"Form schema hot-reloaded ✓",errLoadFailed:F=>`Failed to load preview (HTTP ${F})`,errInvalidSchema:"Preview payload missing valid FormSchema",errNoSchema:"No FormSchema provided (export via preview-html or pass ?id=)",agreeRequiredFallback:F=>`Please read and accept ${F||"the agreement"}`,yes:"Yes",no:"No",dateTo:" to ",longTerm:"Long-term",mockSearchSamples:["Acme Cloud Technologies Inc.","Northstar Digital Labs LLC","One Market Plaza, Suite 400"],mockSelectOptions:[{code:"opt_1",name:"Sample Option A"},{code:"opt_2",name:"Sample Option B"}],mockMapResult:[{code:"US-CA",name:"California"},{code:"US-CA-SF",name:"San Francisco"},{code:"US-CA-SF-SOMA",name:"SoMa District"}],mockTaskDone:"Completed (preview mock)",skins:{"fin-minimal":"Minimal","clean-outline":"Outline","bank-card":"Classic"},brandPresetLabels:{default:"Cobalt Blue","bank-red":"Crimson Red","gov-navy":"Deep Navy",emerald:"Emerald Green"}}:{defaultTitle:"表单填写",liveBadge:"● 实时",liveTitle:F=>`SSE 实时热更新已连接(已同步 ${F} 次)`,refresh:"刷新",reset:"重置",finalPreviewBanner:"定稿成品预览(当前隐藏所有调试栏)",exportFinalHtml:"导出定稿 HTML",backToTuning:"返回样式调试",progressLabel:"填写进度",requiredLabel:"必填",jumpMissing:"定位未填 ›",requiredDone:"必填已完成 ✓",modeFlat:"平铺",modeCollapsible:"折叠",modeStep:"分步",reviewOn:"审阅态 ✓",reviewOff:"审阅态",kbTitle:"自定义数字/身份证键盘策略:自动模式在PC走物理键盘、移动端弹定制键盘",kbLabel:"键盘",kbAuto:"自动",kbCustom:"软键盘",kbNative:"原生",vpTitle:"切换手机端与 PC 宽屏 Web 表单视图",vpMobile:"手机",vpDesktop:"PC宽屏",btnFinalPreview:"定稿预览",btnSaveTheme:"保存样式",btnSavingTheme:"保存中…",btnExportSchema:"导出 Schema",btnExportSchemaTitle:"下载纯净 FormSchema JSON,供移动端/小程序/Web SDK 直接渲染",btnMobileBundle:"移动端包",btnMobileBundleTitle:"下载移动端合一包(FormSchema + 锁定主题配置)",btnFinalHtml:"定稿 HTML",draftRestored:"已自动恢复上次未提交草稿",draftClear:"清空重填",errSummary:F=>`共 ${F} 项待完善`,errNext:"跳转下一报错项 ›",initCore:"初始化 FormCore…",stepFallback:F=>`第${F}步`,stepPrev:"上一步",stepNext:"下一步",stepVerify:"完成校验",footerPayload:"数据 / 埋点",footerSchema:"Schema",submitting:"提交中…",submitDefault:"提交表单",validateAndCollect:"校验并收集",receiptSubmitted:"提交成功 ✓",receiptReady:"表单校验通过,已准备提交",receiptIdPrefix:" · 回执号 ",receiptSaveInbox:"确认提交至收件箱",receiptSavedInbox:F=>`已存入收件箱 #${F}`,receiptDownloadJson:"下载回执 JSON",receiptBack:"返回表单",tabPayload:"Payload",tabTelemetry:F=>`埋点 (${F})`,tabSchema:"Schema",close:"关闭",validatePassed:"validateAll 校验通过 ✓",validateFailed:"validateAll 存在未通过项 ✗",saveInboxBtn:"存入本地 Data Hub 收件箱",savingInbox:"写入中…",savedInboxMeta:(F,M)=>`已入箱 #${F}(${M})`,dlPureSchema:"下载纯 FormSchema",dlMobileBundle:"下载移动端合一包 (Schema+Theme)",toastMockCode:"模拟验证码已发送:666888(预览演示)",toastDraftCleared:"已清空草稿,重新填写",toastAllRequiredDone:"全部必填项均已完成 ✓",toastNextError:(F,M,Q,oe)=>`第 ${F}/${M} 项「${Q}」:${oe}`,toastStepBlocked:(F,M,Q)=>`请完善「${F}」:${M}${Q>1?`(当前步共 ${Q} 项待完善)`:""}`,toastSubmitBlocked:(F,M,Q)=>`请完善「${F}」:${M}${Q>1?`(共 ${Q} 项待完善)`:""}`,toastSubmitGenericErr:"请完善标红的必填或格式有误字段",toastSubmitFailed:F=>`提交失败(${F}),已保留填写内容,请重试`,toastThemeSaved:"已保存当前样式与交互配置到 theme.json ✓",toastThemeFailed:F=>`保存样式失败:${F}`,toastExportHtmlOk:"已导出零调试栏定稿成品 HTML ✓",toastExportHtmlFallback:"当前环境请通过 CLI preview-html --mode final 导出",toastExportFail:F=>`导出失败:${F}`,toastExportBundleOk:"已导出移动端合一包(Schema + 锁定主题)✓",toastExportSchemaOk:"已导出纯净定稿 FormSchema JSON ✓",toastInboxSaved:F=>`已存入本地收件箱(共 ${F} 条)`,toastInboxFail:F=>`存入失败:${F}`,toastLiveUpdated:"表单配置已实时热更新 ✓",errLoadFailed:F=>`加载预览失败(HTTP ${F})`,errInvalidSchema:"预览数据缺少有效 FormSchema",errNoSchema:"未传入 FormSchema(请使用 preview-html 导出或带 ?id= 访问本机预览服务)",agreeRequiredFallback:F=>`请先阅读并同意${F||"相关协议"}`,yes:"是",no:"否",dateTo:" 至 ",longTerm:"长期",mockSearchSamples:["示例科技集团有限公司","示例普惠信息服务有限公司","高新南九道软件园 1 栋"],mockSelectOptions:[{code:"opt_1",name:"示例选项 A"},{code:"opt_2",name:"示例选项 B"}],mockMapResult:[{code:"440000",name:"广东省"},{code:"440300",name:"深圳市"},{code:"440305",name:"南山区"}],mockTaskDone:"已完成(预览模拟)",skins:{"fin-minimal":"Minimal 极简","clean-outline":"Outline 线框","bank-card":"Classic 商务"},brandPresetLabels:{default:"金融蓝","bank-red":"银行红","gov-navy":"政务深蓝",emerald:"普惠青绿"}});function Ct(){a.value=i.value?"zh-CN":"en-US"}const ns=Em(),g=dv(),T=H(0),L=E(()=>({brandColor:Xe.value||void 0,density:ze.value})),Y=E(()=>Mo($e.value,L.value));function N(F){j.value=F,Le&&clearTimeout(Le),Le=setTimeout(()=>{j.value=""},2400)}function z(F){D.value=[F,...D.value].slice(0,15)}const ne={async searchSuggest(F){return P.value.mockSearchSamples.filter(Q=>!F||Q.toLowerCase().includes(F.toLowerCase())).map((Q,oe)=>({code:`demo_${oe}`,name:Q}))},async loadSelectOptions({item:F}){return z(`loadSelectOptions: ${F.key}`),P.value.mockSelectOptions},async launchTask(F){return F.taskType==="signature"?(z(`launchTask: ${F.key} signature`),{useBuiltInSignaturePad:!0}):F.taskType==="map"?(z(`launchTask: ${F.key} map`),P.value.mockMapResult):(z(`launchTask: ${F.key} (${F.taskType})`),{code:`${F.taskType}_done`,name:P.value.mockTaskDone})},async uploadFile(F){return z(`uploadFile: ${F.name||"image"}`),{url:F.path||`local-preview://${encodeURIComponent(F.name||"img.png")}`,name:F.name}},async sendVerifyCode({item:F}){z(`sendVerifyCode: ${F.key} 666888`),N(P.value.toastMockCode)}};yt(Os,ne),yt(wo,E(()=>({...Nl,labelAlign:kt.value,labelWidth:"108px"}))),yt(Wa,$e),yt(No,L),yt(Vo,E(()=>ce.value==="collapsible")),yt(Bo,qe),yt(jo,xt),yt(ts,a),yt(Ko,F=>{g.record(F),T.value+=1});const te=E(()=>(T.value,g.getSummary())),X=E(()=>lv(C.value,b)),W=E(()=>C.value.length>1),ue=E(()=>{if(ce.value!=="step"||C.value.length<=1)return C.value;const F=Math.min(Ce.value,C.value.length-1);return[C.value[F]]});let Z=null,re=null;function fe(F,M){for(const oe of Object.keys(b))delete b[oe];for(const oe of Object.keys(F.fields))b[oe]={...F.fields[oe]};try{B.value=F.collectFormData({skipVerify:!0})}catch{B.value={}}const Q=yf(M,{...b});C.value=Q.groups}async function ye(F,M,Q){var jl,Kl;const oe=!!(Q!=null&&Q.preserveUiState),ae=(Q==null?void 0:Q.applyTheme)!==!1,ie={},de=Ce.value;if(oe&&Z)for(const[Ze,He]of Object.entries(Z.fields))He&&He.value!==void 0&&He.value!==null&&He.value!==""&&(ie[Ze]=He.value);oe||(w.value=!1),O.value="",Z&&re&&Z.off("afterChange",re),M&&ae&&(M.skin&&M.skin!=="tdesign"&&Dt[M.skin]&&($e.value=M.skin,kt.value=Dt[M.skin].defaultLabelAlign),((jl=M.override)==null?void 0:jl.brandColor)!==void 0&&(Xe.value=M.override.brandColor||""),(Kl=M.override)!=null&&Kl.density&&(ze.value=M.override.density),M.formMode&&(ce.value=M.formMode),typeof M.showProgressBar=="boolean"&&(Jt.value=M.showProgressBar),typeof M.readOnly=="boolean"&&(xt.value=M.readOnly),M.keyboardPolicy&&(qe.value=M.keyboardPolicy),M.viewportMode&&!t.get("mode")&&(Ue.value=M.viewportMode),M.submitText!==void 0&&(ke.value=M.submitText||""),M.locale&&!l&&(a.value=Kt(M.locale)),M.mode==="final"&&t.get("draft")!=="1"&&(r.value=!0));const ee={version:F.version||"1.0.0",title:F.title||P.value.defaultTitle,description:F.description||"",storageKey:F.storageKey||"agent_preview_form",submitApi:F.submitApi||"",apis:F.apis||[],groups:F.groups||[]};y.value=ee;const xe=new Map,Ne=`apf_draft:${ee.storageKey}:`,We=u.value&&!xt.value&&typeof window<"u"&&typeof window.localStorage<"u",Tn=[];if(We&&!oe)try{for(let Ze=0;Ze<window.localStorage.length;Ze+=1){const He=window.localStorage.key(Ze);if(He&&He.startsWith(Ne)){const hn=window.localStorage.getItem(He);hn&&hn!=='""'&&hn!=="null"&&hn!=="[]"&&Tn.push(He)}}}catch{}v.value=Tn.length>0;const tn=We?{get:Ze=>{try{const He=window.localStorage.getItem(`${Ne}${Ze}`);return He===null?void 0:JSON.parse(He)}catch{return xe.get(Ze)}},set:(Ze,He)=>{xe.set(Ze,He);try{window.localStorage.setItem(`${Ne}${Ze}`,JSON.stringify(He))}catch{}},remove:Ze=>{xe.delete(Ze);try{window.localStorage.removeItem(`${Ne}${Ze}`)}catch{}}}:{get:Ze=>xe.get(Ze),set:(Ze,He)=>xe.set(Ze,He),remove:Ze=>xe.delete(Ze)};Z=new uf(JSON.parse(JSON.stringify(ee)),tn),await Z.init(oe?ie:{}),re=()=>fe(Z,ee),Z.on("afterChange",re),fe(Z,ee),Ce.value=oe?Math.min(de,Math.max(0,C.value.length-1)):0,U.value=null,x.value=null,w.value=!0}function Se(F=!1){var oe;const Q=`apf_draft:${((oe=y.value)==null?void 0:oe.storageKey)||"agent_preview_form"}:`;try{if(typeof window<"u"&&window.localStorage){const ae=[];for(let ie=0;ie<window.localStorage.length;ie+=1){const de=window.localStorage.key(ie);de&&de.startsWith(Q)&&ae.push(de)}for(const ie of ae)window.localStorage.removeItem(ie)}}catch{}v.value=!1,F&&y.value&&(ye(y.value),N(P.value.toastDraftCleared))}function we(F){$e.value=F,kt.value=Dt[F].defaultLabelAlign}async function De(F,M){if(ce.value==="step"&&C.value.length>1){const ae=C.value.findIndex(ie=>ie.items.some(de=>de.key===F));ae>=0&&Ce.value!==ae&&(Ce.value=ae,await zn())}M!=null&&M.toast&&N(M.toast),await zn(),typeof window<"u"&&typeof window.requestAnimationFrame=="function"&&await new Promise(ae=>window.requestAnimationFrame(()=>ae()));const Q=document.querySelector(`[data-field-key="${F}"]`);if(!Q)return;Q.scrollIntoView({behavior:"smooth",block:"center"}),(M==null?void 0:M.pulse)!==!1&&(Q.classList.remove("is-locate-pulse"),Q.offsetWidth,Q.classList.add("is-locate-pulse"),setTimeout(()=>Q.classList.remove("is-locate-pulse"),1250));const oe=Q.querySelector('input:not([type="hidden"]):not([readonly]):not(:disabled), textarea:not(:disabled), select:not(:disabled)');if(oe&&typeof oe.focus=="function")try{oe.focus({preventScroll:!0})}catch{oe.focus()}}async function Ye(){const F=X.value.firstMissingRequiredKey;if(!F){N(P.value.toastAllRequiredDone);return}await De(F,{pulse:!0})}function ht(F){var Q,oe;const M=[];for(const ae of F){const ie=b[ae.key];if(!ie||ie.visible===!1)continue;let de=String(ie.errMsg||"").trim();if(!de&&ae.type==="agreement"){const ee=ae.required===!0||Array.isArray(ae.rules)&&ae.rules.some(Ne=>Ne.type==="required"),xe=xo(ae,{defaultFalseValue:""});if(ee&&!$o(ie.value,xe)){const Ne=Array.isArray(ae.rules)?(Q=ae.rules.find(We=>We.type==="required"))==null?void 0:Q.message:"";de=String(Ne||P.value.agreeRequiredFallback(ae.label||"")),b[ae.key]={...ie,errMsg:de}}}if(!de&&ae.type==="list"){const ee=Array.isArray(ie.value)?ie.value:[],xe=Oo(ae,ee,a.value);if(!xe.valid){const Ne=xe.firstErrorPath,We=Ne?(oe=xe.rowErrors[Ne.rowIndex])==null?void 0:oe[Ne.subKey]:"";de=xe.listError||We||"",de&&(b[ae.key]={...ie,errMsg:de})}}if(!de){const ee=Lo(ae,ie.value,a.value);!ee.valid&&ee.reason&&(de=ee.reason,b[ae.key]={...ie,errMsg:de})}de&&M.push({key:ae.key,label:ae.label||ae.key,message:de})}return M}const ft=E(()=>{const F=[];for(const M of C.value)for(const Q of M.items){const oe=b[Q.key];if(!oe||oe.visible===!1)continue;const ae=String(oe.errMsg||"").trim();ae&&F.push({key:Q.key,label:Q.label||Q.key,message:ae})}return F});async function Xt(){const F=ft.value;if(!F.length)return;const M=A.value%F.length;A.value=(M+1)%F.length;const Q=F[M];await De(Q.key,{toast:P.value.toastNextError(M+1,F.length,Q.label,Q.message),pulse:!0})}async function Zt(){if(!Z||!y.value)return;const F=ue.value[0];if(!F)return;for(const Q of F.items){const oe=Z.fields[Q.key];!oe||oe.visible===!1||Z.setControlData(Q.key,oe.value,{eventType:"submit",skipRelation:!0})}fe(Z,y.value);const M=ht(F.items);if(M.length>0){const Q=M[0];await De(Q.key,{toast:P.value.toastStepBlocked(Q.label,Q.message,M.length),pulse:!0});return}Ce.value=Math.min(C.value.length-1,Ce.value+1),await zn(),window.scrollTo({top:0,behavior:"smooth"})}async function tt(){var ae;if(!Z||!y.value)return;const F=Z.validateAll();fe(Z,y.value);const M=C.value.flatMap(ie=>ie.items),Q=ht(M),oe=F&&Q.length===0;if(U.value=oe,!oe){const ie=Q.map(ee=>ee.key);g.record({type:"submit_blocked",timestamp:Date.now(),blockedKeys:ie}),T.value+=1;const de=Q[0];de?await De(de.key,{toast:P.value.toastSubmitBlocked(de.label,de.message,Q.length),pulse:!0}):N(P.value.toastSubmitGenericErr);return}try{B.value=Z.collectFormData({skipVerify:!0})}catch{}if(g.record({type:"submit_passed",timestamp:Date.now()}),T.value+=1,he.value=null,u.value){const ie=String(((ae=y.value)==null?void 0:ae.submitApi)||"").trim();if(/^https?:\/\//i.test(ie)){if($.value)return;$.value=!0,x.value=null;const de=`sub_${Date.now().toString(36)}`;try{const ee=await fetch(ie,{method:"POST",headers:{"Content-Type":"application/json","Idempotency-Key":de},body:JSON.stringify({submissionId:de,schemaVersion:y.value.version||"1.0.0",storageKey:y.value.storageKey||"",title:y.value.title||"",submittedAt:new Date().toISOString(),channel:Ue.value==="desktop"?"web-desktop":"web-mobile",data:B.value})});if(!ee.ok)throw new Error(`HTTP ${ee.status}`);x.value={ok:!0,status:ee.status,submissionId:de},Se(!1),d.value=!0}catch(ee){x.value={ok:!1,message:(ee==null?void 0:ee.message)||"Network error"},N(P.value.toastSubmitFailed((ee==null?void 0:ee.message)||"Network error"))}finally{$.value=!1}return}Se(!1),d.value=!0;return}R.value="payload",q.value=!0}function nt(F="preview"){return{skin:$e.value,override:{...Xe.value?{brandColor:Xe.value}:{},density:ze.value},formMode:ce.value,showProgressBar:Jt.value,readOnly:xt.value,keyboardPolicy:qe.value,viewportMode:Ue.value,...ke.value?{submitText:ke.value}:{},locale:a.value,mode:F}}async function Ut(F="preview",M=!1){if(!s)return!1;c.value=!0;try{const Q=await fetch(`/__form_agent/v2/preview/${encodeURIComponent(s)}/theme`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({themeConfig:nt(F)})});if(!Q.ok)throw new Error(`HTTP ${Q.status}`);return M||N(P.value.toastThemeSaved),!0}catch(Q){return M||N(P.value.toastThemeFailed((Q==null?void 0:Q.message)||"Preview server unavailable")),!1}finally{c.value=!1}}function Qt(F,M,Q="text/html;charset=utf-8"){const oe=new Blob([F],{type:Q}),ae=URL.createObjectURL(oe),ie=document.createElement("a");ie.href=ae,ie.download=M,document.body.appendChild(ie),ie.click(),ie.remove(),setTimeout(()=>URL.revokeObjectURL(ae),1e3)}async function Bl(){var Ne;const F=String(((Ne=y.value)==null?void 0:Ne.storageKey)||"form").replace(/[^a-zA-Z0-9_-]+/g,"_").slice(0,60);if(s){await Ut("preview",!0);try{const We=await fetch(`/__form_agent/v2/preview/${encodeURIComponent(s)}/final-html`,{cache:"no-store"});if(!We.ok)throw new Error(`HTTP ${We.status}`);const Tn=await We.text();Qt(Tn,`${F}-final.html`),N(P.value.toastExportHtmlOk);return}catch(We){N(P.value.toastExportFail((We==null?void 0:We.message)||"Preview server unavailable"));return}}if(!y.value)return;const M=Array.from(document.querySelectorAll("style")).map(We=>We.textContent||"").join(`
22
- `),Q=Array.from(document.querySelectorAll("script")).map(We=>We.textContent||"").find(We=>We.length>5e3&&!We.includes("__AGENT_FORM_SCHEMA__"));if(!Q){N(P.value.toastExportHtmlFallback);return}const oe=We=>We.replace(/<\/(script)/gi,"<\\/$1"),ae=String(y.value.title||P.value.defaultTitle).replace(/[<>&"]/g,""),ie=nt("final"),de="<script>",ee="<\/script>",xe=["<!DOCTYPE html>",`<html lang="${a.value}">`,"<head>",'<meta charset="UTF-8" />','<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />',`<title>${ae}</title>`,`<style>${M}</style>`,"</head>","<body>",'<div id="app"></div>',de,'window.__AGENT_PREVIEW_MODE__ = "final";',`window.__AGENT_FORM_SCHEMA__ = ${oe(JSON.stringify(y.value))};`,`window.__AGENT_THEME_CONFIG__ = ${oe(JSON.stringify(ie))};`,ee,de+oe(Q)+ee,"</body>","</html>",""].join(`
23
- `);Qt(xe,`${F}-final.html`),N(P.value.toastExportHtmlOk)}async function Vn(F=!1){if(!y.value)return;s&&await Ut("preview",!0);const M=String(y.value.storageKey||"form").replace(/[^a-zA-Z0-9_-]+/g,"_").slice(0,60);if(F){const Q={format:"agentprismform-mobile-bundle/v1",exportedAt:new Date().toISOString(),schema:y.value,themeConfig:nt("final")};Qt(JSON.stringify(Q,null,2)+`
24
- `,`${M}.bundle.json`,"application/json;charset=utf-8"),N(P.value.toastExportBundleOk);return}Qt(JSON.stringify(y.value,null,2)+`
25
- `,`${M}.schema.json`,"application/json;charset=utf-8"),N(P.value.toastExportSchemaOk)}const Ls=E(()=>{const F=[],M=B.value||{};for(const Q of C.value)for(const oe of Q.items){if(!(oe.key in M))continue;const ae=M[oe.key];if(ae==null||ae==="")continue;let ie="";if(Array.isArray(ae))if(oe.type==="dateRange"){const de=ae[1]==="long_term"||ae[1]==="长期"?P.value.longTerm:ae[1]||"";ie=`${ae[0]||""}${P.value.dateTo}${de}`}else ie=ae.map(de=>de&&typeof de=="object"?de.name||de.label||de.code||JSON.stringify(de):String(de)).join(i.value?", ":"、");else if(typeof ae=="boolean")ie=ae?P.value.yes:P.value.no;else if(typeof ae=="object"){const de=ae;ie=de.name||de.label||de.code||JSON.stringify(de)}else ie=String(ae);if(oe.type==="phone"&&/^\d{11}$/.test(ie))ie=`${ie.slice(0,3)}****${ie.slice(-4)}`;else if(oe.type==="idcard"&&ie.length>=15)ie=`${ie.slice(0,4)}**********${ie.slice(-4)}`;else if(oe.type==="bankCard"&&ie.replace(/\s+/g,"").length>=12){const de=ie.replace(/\s+/g,"");ie=`${de.slice(0,4)} **** **** ${de.slice(-4)}`}F.push({key:oe.key,label:oe.label||oe.key,value:ie})}return F});function Bn(){var M,Q;const F=String(((M=y.value)==null?void 0:M.storageKey)||"form").replace(/[^a-zA-Z0-9_-]+/g,"_");Qt(JSON.stringify({title:(Q=y.value)==null?void 0:Q.title,submittedAt:new Date().toISOString(),data:B.value},null,2),`${F}-receipt.json`,"application/json;charset=utf-8")}async function Ns(){if(!(!s||G.value)){G.value=!0;try{const F=await fetch(`/__form_agent/v2/preview/${encodeURIComponent(s)}/submit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rawData:B.value,channel:Ue.value==="desktop"?"web-desktop":"web-mobile",maskPii:!0})});if(!F.ok)throw new Error(`HTTP ${F.status}`);const M=await F.json();he.value={submissionId:M.submissionId,totalInInbox:M.totalInInbox,formKey:M.formKey},N(P.value.toastInboxSaved(M.totalInInbox))}catch(F){N(P.value.toastInboxFail((F==null?void 0:F.message)||"Preview server unavailable"))}finally{G.value=!1}}}async function Pt(F){var oe;const M=window.__AGENT_FORM_SCHEMA__,Q=window.__AGENT_THEME_CONFIG__;if(M&&Array.isArray(M.groups)){await ye(M,Q);return}if(s)try{const ae=await fetch(`/__form_agent/v2/preview/${encodeURIComponent(s)}`,{cache:"no-store"});if(!ae.ok)throw new Error(P.value.errLoadFailed(ae.status));const ie=await ae.json();if(!((oe=ie==null?void 0:ie.schema)!=null&&oe.groups))throw new Error(P.value.errInvalidSchema);await ye(ie.schema,ie.themeConfig,F);return}catch(ae){O.value=(ae==null?void 0:ae.message)||String(ae);return}O.value=P.value.errNoSchema}function ss(){if(!s||typeof EventSource>"u")return;Ie&&(Ie.close(),Ie=null);const F=new EventSource(`/__form_agent/v2/preview/${encodeURIComponent(s)}/events`);F.addEventListener("connected",()=>{J.value=!0}),F.addEventListener("update",async M=>{let Q={};try{Q=JSON.parse(M.data||"{}")}catch{}S.value+=1,await Pt({preserveUiState:!0,applyTheme:!!Q.themeChanged}),N(P.value.toastLiveUpdated)}),F.onerror=()=>{J.value=!1},Ie=F}function en(F){const M=F.data;!M||typeof M!="object"||(M.type==="APF_UPDATE_SCHEMA"&&M.schema&&Array.isArray(M.schema.groups)?((M.viewportMode==="desktop"||M.viewportMode==="mobile")&&(Ue.value=M.viewportMode),M.locale&&(a.value=Kt(M.locale)),ye(M.schema,M.theme||null,{preserveUiState:!!M.preserveUiState,applyTheme:!!M.theme})):M.type==="APF_SET_VIEWPORT"&&(M.viewportMode==="desktop"||M.viewportMode==="mobile")?Ue.value=M.viewportMode:M.type==="APF_SET_KEYBOARD"&&["auto","always-custom","native"].includes(M.policy)?qe.value=M.policy:M.type==="APF_SET_LOCALE"&&M.locale?a.value=Kt(M.locale):M.type==="APF_SET_FINAL"&&(r.value=!!M.final,o.value=!1))}function Vs(F){F.key==="Escape"&&(d.value?d.value=!1:q.value&&(q.value=!1))}return gl(()=>{Pt(),ss(),window.addEventListener("message",en),window.addEventListener("keydown",Vs)}),bl(()=>{window.removeEventListener("message",en),window.removeEventListener("keydown",Vs),Ie&&(Ie.close(),Ie=null),Z&&re&&Z.off("afterChange",re)}),(F,M)=>{var Q,oe,ae,ie,de;return p(),h("div",{class:se(["ap-shell",{"is-embed":n,"is-desktop":Ue.value==="desktop","is-final":u.value}]),"data-testid":"agent-preview-root"},[f("div",{class:"ap-phone",style:$t(Y.value)},[!r.value&&o.value?(p(),h("div",nb,[f("span",null,k(P.value.finalPreviewBanner),1),f("div",sb,[f("button",{type:"button",class:"ap-exit-btn is-primary",onClick:Bl},k(P.value.exportFinalHtml),1),f("button",{type:"button",class:"ap-exit-btn",onClick:M[0]||(M[0]=ee=>o.value=!1)},k(P.value.backToTuning),1)])])):V("",!0),n?V("",!0):(p(),h("header",{key:1,class:se(["ap-header",{"is-final-header":u.value}])},[f("div",lb,[f("span",ab,k(((Q=y.value)==null?void 0:Q.title)||P.value.defaultTitle),1),J.value&&!u.value?(p(),h("span",{key:0,class:"ap-live-badge","data-testid":"agent-live-badge",title:P.value.liveTitle(S.value)},k(P.value.liveBadge),9,ib)):V("",!0)]),u.value?V("",!0):(p(),h("div",rb,[f("button",{type:"button",class:"ap-mini","data-testid":"agent-locale-toggle",onClick:Ct},k(i.value?"中文":"EN"),1),Me(s)?(p(),h("button",{key:0,type:"button",class:"ap-link",onClick:M[1]||(M[1]=ee=>Pt({preserveUiState:!0,applyTheme:!0}))},k(P.value.refresh),1)):V("",!0),f("button",{type:"button",class:"ap-link",onClick:M[2]||(M[2]=ee=>y.value&&ye(y.value))},k(P.value.reset),1)]))],2)),!n&&w.value&&u.value&&Jt.value&&X.value.total>0?(p(),h("div",ob,[f("div",cb,[f("span",null,[Je(k(P.value.progressLabel)+" ",1),f("strong",null,k(X.value.percent)+"%",1)]),X.value.firstMissingRequiredKey?(p(),h("button",{key:0,type:"button",class:"ap-jump",onClick:Ye},k(P.value.jumpMissing),1)):X.value.requiredTotal>0?(p(),h("span",ub,k(P.value.requiredDone),1)):V("",!0)]),f("div",db,[f("div",{class:"ap-prog__fill",style:$t({width:`${X.value.percent}%`})},null,4)])])):V("",!0),!n&&w.value&&!u.value?(p(),h("section",fb,[f("div",vb,[(p(!0),h(le,null,_e(Me(nv),ee=>(p(),h("button",{key:ee.id,type:"button",class:se(["ap-pill",{"is-active":$e.value===ee.id}]),onClick:xe=>we(ee.id)},k(P.value.skins[ee.id]||ee.shortName),11,pb))),128))]),f("div",hb,[f("div",mb,[f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":ce.value==="flat"}]),onClick:M[3]||(M[3]=ee=>ce.value="flat")},k(P.value.modeFlat),3),f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":ce.value==="collapsible"}]),onClick:M[4]||(M[4]=ee=>ce.value="collapsible")},k(P.value.modeCollapsible),3),f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":ce.value==="step"}]),disabled:!W.value,onClick:M[5]||(M[5]=ee=>{ce.value="step",Ce.value=0})},k(P.value.modeStep),11,gb)]),f("div",yb,[(p(!0),h(le,null,_e(Me(tv),ee=>(p(),h("button",{key:ee.id,type:"button",class:se(["ap-dot",{"is-active":(Xe.value||"#0F52BA")===ee.brandColor}]),style:$t({background:ee.brandColor}),title:P.value.brandPresetLabels[ee.id]||ee.label,"aria-label":P.value.brandPresetLabels[ee.id]||ee.label,onClick:xe=>Xe.value=ee.id==="default"?"":ee.brandColor},null,14,bb))),128)),f("button",{type:"button",class:se(["ap-mini",{"is-active":xt.value}]),"data-testid":"agent-review-toggle",onClick:M[6]||(M[6]=ee=>xt.value=!xt.value)},k(xt.value?P.value.reviewOn:P.value.reviewOff),3)])]),f("div",_b,[f("div",{class:"ap-seg",title:P.value.kbTitle},[f("span",Cb,k(P.value.kbLabel),1),f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":qe.value==="auto"}]),onClick:M[7]||(M[7]=ee=>qe.value="auto")},k(P.value.kbAuto),3),f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":qe.value==="always-custom"}]),onClick:M[8]||(M[8]=ee=>qe.value="always-custom")},k(P.value.kbCustom),3),f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":qe.value==="native"}]),onClick:M[9]||(M[9]=ee=>qe.value="native")},k(P.value.kbNative),3)],8,kb),f("div",{class:"ap-seg",title:P.value.vpTitle},[f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":Ue.value==="mobile"}]),onClick:M[10]||(M[10]=ee=>Ue.value="mobile")},k(P.value.vpMobile),3),f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":Ue.value==="desktop"}]),onClick:M[11]||(M[11]=ee=>Ue.value="desktop")},k(P.value.vpDesktop),3)],8,Sb)]),f("div",wb,[f("button",{type:"button",class:"ap-fin-btn","data-testid":"preview-final-toggle",onClick:M[12]||(M[12]=ee=>o.value=!0)},k(P.value.btnFinalPreview),1),Me(s)?(p(),h("button",{key:0,type:"button",class:"ap-fin-btn",disabled:c.value,onClick:M[13]||(M[13]=ee=>Ut("preview"))},k(c.value?P.value.btnSavingTheme:P.value.btnSaveTheme),9,Tb)):V("",!0),f("button",{type:"button",class:"ap-fin-btn","data-testid":"export-final-schema-btn",onClick:M[14]||(M[14]=ee=>Vn(!1)),title:P.value.btnExportSchemaTitle},k(P.value.btnExportSchema),9,xb),f("button",{type:"button",class:"ap-fin-btn","data-testid":"export-mobile-bundle-btn",onClick:M[15]||(M[15]=ee=>Vn(!0)),title:P.value.btnMobileBundleTitle},k(P.value.btnMobileBundle),9,$b),f("button",{type:"button",class:"ap-fin-btn is-accent","data-testid":"export-final-html-btn",onClick:Bl},k(P.value.btnFinalHtml),1)]),Jt.value&&X.value.total>0?(p(),h("div",Ab,[f("div",Mb,[f("span",null,[Je(k(P.value.progressLabel)+" ",1),f("strong",null,k(X.value.percent)+"%",1),Je(" · "+k(P.value.requiredLabel)+" "+k(X.value.requiredFilled)+"/"+k(X.value.requiredTotal),1)]),X.value.firstMissingRequiredKey?(p(),h("button",{key:0,type:"button",class:"ap-jump",onClick:Ye},k(P.value.jumpMissing),1)):X.value.requiredTotal>0?(p(),h("span",Eb,k(P.value.requiredDone),1)):V("",!0)]),f("div",Fb,[f("div",{class:"ap-prog__fill",style:$t({width:`${X.value.percent}%`})},null,4)])])):V("",!0)])):V("",!0),v.value&&u.value?(p(),h("div",Ib,[f("span",null,k(P.value.draftRestored),1),f("button",{type:"button",class:"ap-jump",onClick:M[16]||(M[16]=ee=>Se(!0))},k(P.value.draftClear),1)])):V("",!0),ft.value.length>=2?(p(),h("div",Db,[f("span",null,k(P.value.errSummary(ft.value.length)),1),f("button",{type:"button",class:"ap-err-next-btn",onClick:Xt},k(P.value.errNext),1)])):V("",!0),j.value?(p(),h("div",Pb,k(j.value),1)):V("",!0),f("main",{class:"ap-body",style:$t({background:Y.value["--fs-page-bg"]})},[O.value?(p(),h("div",Ob,k(O.value),1)):w.value?(p(),h(le,{key:2},[(oe=y.value)!=null&&oe.description?(p(),h("div",Lb,k(y.value.description),1)):V("",!0),ce.value==="step"&&W.value?(p(),h("div",Nb,[(p(!0),h(le,null,_e(C.value,(ee,xe)=>(p(),h("button",{key:ee.key,type:"button",class:se(["ap-step",{"is-active":Ce.value===xe}]),onClick:Ne=>Ce.value=xe},k(xe+1)+". "+k(ee.title||P.value.stepFallback(xe+1)),11,Vb))),128))])):V("",!0),Ge(Me(tb),Nr({groups:ue.value,fields:b,formCore:Me(Z),"label-align":kt.value,"label-width":"108px","host-handlers":ne},Me(ns)),null,16,["groups","fields","formCore","label-align"]),ce.value==="step"&&W.value?(p(),h("div",Bb,[f("button",{type:"button",class:"ap-step-btn",disabled:Ce.value<=0,onClick:M[17]||(M[17]=ee=>Ce.value=Math.max(0,Ce.value-1))},k(P.value.stepPrev),9,jb),f("span",Kb,k(Ce.value+1)+" / "+k(C.value.length),1),Ce.value<C.value.length-1?(p(),h("button",{key:0,type:"button",class:"ap-step-btn is-primary",onClick:Zt},k(P.value.stepNext),1)):(p(),h("button",{key:1,type:"button",class:"ap-step-btn is-primary",onClick:tt},k(P.value.stepVerify),1))])):V("",!0)],64)):(p(),h("div",Rb,k(P.value.initCore),1))],4),f("footer",Ub,[u.value?V("",!0):(p(),h(le,{key:0},[f("button",{type:"button",class:"ap-fbtn",onClick:M[18]||(M[18]=ee=>{R.value="payload",q.value=!0})},k(P.value.footerPayload),1),f("button",{type:"button",class:"ap-fbtn",onClick:M[19]||(M[19]=ee=>{R.value="schema",q.value=!0})},k(P.value.footerSchema),1)],64)),f("button",{type:"button",class:"ap-fprimary","data-testid":"agent-validate-btn",disabled:$.value,onClick:tt},k($.value?P.value.submitting:u.value?ke.value||P.value.submitDefault:P.value.validateAndCollect),9,Hb)]),d.value?(p(),h("div",{key:7,class:"ap-mask",onClick:M[21]||(M[21]=lt(ee=>d.value=!1,["self"]))},[f("div",qb,[f("div",Wb,[M[29]||(M[29]=f("div",{class:"ap-receipt__icon"},"✓",-1)),f("div",null,[f("div",Gb,k((ae=x.value)!=null&&ae.ok?P.value.receiptSubmitted:P.value.receiptReady),1),f("div",zb,[Je(k(((ie=y.value)==null?void 0:ie.title)||P.value.defaultTitle)+" ",1),(de=x.value)!=null&&de.submissionId?(p(),h(le,{key:0},[Je(k(P.value.receiptIdPrefix)+k(x.value.submissionId),1)],64)):V("",!0)])])]),f("div",Yb,[(p(!0),h(le,null,_e(Ls.value,ee=>(p(),h("div",{key:ee.key,class:"ap-receipt__row"},[f("span",Jb,k(ee.label),1),f("span",Xb,k(ee.value),1)]))),128))]),f("div",Zb,[Me(s)?(p(),h("button",{key:0,type:"button",class:"ap-fprimary",disabled:G.value,onClick:Ns},k(he.value?P.value.receiptSavedInbox(he.value.totalInInbox):G.value?P.value.submitting:P.value.receiptSaveInbox),9,Qb)):V("",!0),f("button",{type:"button",class:"ap-fbtn",onClick:Bn},k(P.value.receiptDownloadJson),1),f("button",{type:"button",class:"ap-fbtn",onClick:M[20]||(M[20]=ee=>d.value=!1)},k(P.value.receiptBack),1)])])])):V("",!0),q.value?(p(),h("div",{key:8,class:"ap-mask",onClick:M[28]||(M[28]=lt(ee=>q.value=!1,["self"]))},[f("div",e_,[f("div",t_,[f("div",n_,[f("button",{type:"button",class:se(["ap-dtab",{"is-active":R.value==="payload"}]),onClick:M[22]||(M[22]=ee=>R.value="payload")},k(P.value.tabPayload),3),f("button",{type:"button",class:se(["ap-dtab",{"is-active":R.value==="telemetry"}]),onClick:M[23]||(M[23]=ee=>R.value="telemetry")},k(P.value.tabTelemetry(te.value.totalEvents)),3),f("button",{type:"button",class:se(["ap-dtab",{"is-active":R.value==="schema"}]),onClick:M[24]||(M[24]=ee=>R.value="schema")},k(P.value.tabSchema),3)]),f("button",{type:"button",class:"ap-link",onClick:M[25]||(M[25]=ee=>q.value=!1)},k(P.value.close),1)]),f("div",s_,[R.value==="payload"?(p(),h(le,{key:0},[U.value!==null?(p(),h("div",{key:0,class:se(["ap-banner",U.value?"is-ok":"is-err"])},k(U.value?P.value.validatePassed:P.value.validateFailed),3)):V("",!0),Me(s)&&U.value?(p(),h("div",l_,[f("button",{type:"button",class:"ap-inbox-btn","data-testid":"save-local-inbox-btn",disabled:G.value,onClick:Ns},k(G.value?P.value.savingInbox:P.value.saveInboxBtn),9,a_),he.value?(p(),h("span",i_,k(P.value.savedInboxMeta(he.value.totalInInbox,he.value.submissionId)),1)):V("",!0)])):V("",!0),f("pre",r_,k(JSON.stringify(B.value,null,2)),1)],64)):R.value==="telemetry"?(p(),h("pre",o_,k(JSON.stringify(te.value,null,2)),1)):(p(),h(le,{key:2},[f("div",c_,[f("button",{type:"button",class:"ap-inbox-btn",onClick:M[26]||(M[26]=ee=>Vn(!1))},k(P.value.dlPureSchema),1),f("button",{type:"button",class:"ap-inbox-btn",onClick:M[27]||(M[27]=ee=>Vn(!0))},k(P.value.dlMobileBundle),1)]),f("pre",u_,k(JSON.stringify(y.value,null,2)),1)],64))])])])):V("",!0)],4)],2)}}}),[["__scopeId","data-v-a0eabfad"]])).mount("#app")})();
20
+ **/let Ra;const Wr=typeof window<"u"&&window.trustedTypes;if(Wr)try{Ra=Wr.createPolicy("vue",{createHTML:e=>e})}catch{}const Gr=Ra?e=>Ra.createHTML(e):e=>e,ud="http://www.w3.org/2000/svg",dd="http://www.w3.org/1998/Math/MathML",dn=typeof document<"u"?document:null,zr=dn&&dn.createElement("template"),fd={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const l=t==="svg"?dn.createElementNS(ud,e):t==="mathml"?dn.createElementNS(dd,e):n?dn.createElement(e,{is:n}):dn.createElement(e);return e==="select"&&s&&s.multiple!=null&&l.setAttribute("multiple",s.multiple),l},createText:e=>dn.createTextNode(e),createComment:e=>dn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>dn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,l,a){const i=n?n.previousSibling:t.lastChild;if(l&&(l===a||l.nextSibling))for(;t.insertBefore(l.cloneNode(!0),n),!(l===a||!(l=l.nextSibling)););else{zr.innerHTML=Gr(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const r=zr.content;if(s==="svg"||s==="mathml"){const o=r.firstChild;for(;o.firstChild;)r.appendChild(o.firstChild);r.removeChild(o)}t.insertBefore(r,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Sn="transition",As="animation",Ms=Symbol("_vtc"),Yr={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},vd=et({},Qi,Yr),Es=(e=>(e.displayName="Transition",e.props=vd,e))((e,{slots:t})=>od(fu,pd(e),t)),Rn=(e,t=[])=>{pe(e)?e.forEach(n=>n(...t)):e&&e(...t)},Jr=e=>e?pe(e)?e.some(t=>t.length>1):e.length>1:!1;function pd(e){const t={};for(const S in e)S in Yr||(t[S]=e[S]);if(e.css===!1)return t;const{name:n="v",type:s,duration:l,enterFromClass:a=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:r=`${n}-enter-to`,appearFromClass:o=a,appearActiveClass:u=i,appearToClass:c=r,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:v=`${n}-leave-active`,leaveToClass:A=`${n}-leave-to`}=e,x=hd(l),M=x&&x[0],w=x&&x[1],{onBeforeEnter:O,onEnter:y,onEnterCancelled:b,onLeave:C,onLeaveCancelled:B,onBeforeAppear:D=O,onAppear:U=y,onAppearCancelled:q=b}=t,R=(S,G,he,Le)=>{S._enterCancelled=Le,Ln(S,G?c:r),Ln(S,G?u:i),he&&he()},j=(S,G)=>{S._isLeaving=!1,Ln(S,d),Ln(S,A),Ln(S,v),G&&G()},J=S=>(G,he)=>{const Le=S?U:y,Ie=()=>R(G,S,he);Rn(Le,[G,Ie]),Xr(()=>{Ln(G,S?o:a),fn(G,S?c:r),Jr(Le)||Zr(G,s,M,Ie)})};return et(t,{onBeforeEnter(S){Rn(O,[S]),fn(S,a),fn(S,i)},onBeforeAppear(S){Rn(D,[S]),fn(S,o),fn(S,u)},onEnter:J(!1),onAppear:J(!0),onLeave(S,G){S._isLeaving=!0;const he=()=>j(S,G);fn(S,d),S._enterCancelled?(fn(S,v),to(S)):(to(S),fn(S,v)),Xr(()=>{S._isLeaving&&(Ln(S,d),fn(S,A),Jr(C)||Zr(S,s,w,he))}),Rn(C,[S,he])},onEnterCancelled(S){R(S,!1,void 0,!0),Rn(b,[S])},onAppearCancelled(S){R(S,!0,void 0,!0),Rn(q,[S])},onLeaveCancelled(S){j(S),Rn(B,[S])}})}function hd(e){if(e==null)return null;if(Fe(e))return[La(e.enter),La(e.leave)];{const t=La(e);return[t,t]}}function La(e){return hc(e)}function fn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ms]||(e[Ms]=new Set)).add(t)}function Ln(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Ms];n&&(n.delete(t),n.size||(e[Ms]=void 0))}function Xr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let md=0;function Zr(e,t,n,s){const l=e._endId=++md,a=()=>{l===e._endId&&s()};if(n!=null)return setTimeout(a,n);const{type:i,timeout:r,propCount:o}=gd(e,t);if(!i)return s();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,v),a()},v=A=>{A.target===e&&++c>=o&&d()};setTimeout(()=>{c<o&&d()},r+1),e.addEventListener(u,v)}function gd(e,t){const n=window.getComputedStyle(e),s=x=>(n[x]||"").split(", "),l=s(`${Sn}Delay`),a=s(`${Sn}Duration`),i=Qr(l,a),r=s(`${As}Delay`),o=s(`${As}Duration`),u=Qr(r,o);let c=null,d=0,v=0;t===Sn?i>0&&(c=Sn,d=i,v=a.length):t===As?u>0&&(c=As,d=u,v=o.length):(d=Math.max(i,u),c=d>0?i>u?Sn:As:null,v=c?c===Sn?a.length:o.length:0);const A=c===Sn&&/\b(?:transform|all)(?:,|$)/.test(s(`${Sn}Property`).toString());return{type:c,timeout:d,propCount:v,hasTransform:A}}function Qr(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>eo(n)+eo(e[s])))}function eo(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function to(e){return(e?e.ownerDocument:document).body.offsetHeight}function yd(e,t,n){const s=e[Ms];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ml=Symbol("_vod"),no=Symbol("_vsh"),bd={name:"show",beforeMount(e,{value:t},{transition:n}){e[Ml]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Fs(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Fs(e,!0),s.enter(e)):s.leave(e,()=>{Fs(e,!1)}):Fs(e,t))},beforeUnmount(e,{value:t}){Fs(e,t)}};function Fs(e,t){e.style.display=t?e[Ml]:"none",e[no]=!t}const so=Symbol("");function _d(e){const t=Oa();if(!t)return;const n=t.ut=(l=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(a=>El(a,l))},s=()=>{const l=e(t.proxy);t.ce?El(t.ce,l):Na(t.subTree,l),n(l)};rr(()=>{Ki(s)}),gl(()=>{ut(s,Ot,{flush:"post"});const l=new MutationObserver(s);l.observe(t.subTree.el.parentNode,{childList:!0}),bl(()=>l.disconnect())})}function Na(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Na(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)El(e.el,t);else if(e.type===le)e.children.forEach(n=>Na(n,t));else if(e.type===Sl){let{el:n,anchor:s}=e;for(;n&&(El(n,t),n!==s);)n=n.nextSibling}}function El(e,t){if(e.nodeType===1){const n=e.style;let s="";for(const l in t){const a=Sc(t[l]);n.setProperty(`--${l}`,a),s+=`--${l}: ${a};`}n[so]=s}}const kd=/(?:^|;)\s*display\s*:/;function Cd(e,t,n){const s=e.style,l=Ve(n);let a=!1;if(n&&!l){if(t)if(Ve(t))for(const i of t.split(";")){const r=i.slice(0,i.indexOf(":")).trim();n[r]==null&&Is(s,r,"")}else for(const i in t)n[i]==null&&Is(s,i,"");for(const i in n){i==="display"&&(a=!0);const r=n[i];r!=null?wd(e,i,!Ve(t)&&t?t[i]:void 0,r)||Is(s,i,r):Is(s,i,"")}}else if(l){if(t!==n){const i=s[so];i&&(n+=";"+i),s.cssText=n,a=kd.test(n)}}else t&&e.removeAttribute("style");Ml in e&&((!l||t!==n)&&(e[Ml]=a?s.display:""),e[no]&&(s.display="none"))}const Fl=/\s*!important$/;function Is(e,t,n){if(pe(n))n.forEach(s=>Is(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))Fl.test(n)?e.setProperty(t,n.replace(Fl,""),"important"):e.setProperty(t,n);else{const s=Sd(e,t);Fl.test(n)?e.setProperty(Mn(s),n.replace(Fl,""),"important"):e[s]=n}}const lo=["Webkit","Moz","ms"],Va={};function Sd(e,t){const n=Va[t];if(n)return n;let s=mt(t);if(s!=="filter"&&s in e)return Va[t]=s;s=Ys(s);for(let l=0;l<lo.length;l++){const a=lo[l]+s;if(a in e)return Va[t]=a}return t}function wd(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Ve(s)&&n===s}const ao="http://www.w3.org/1999/xlink";function io(e,t,n,s,l,a=_c(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ao,t.slice(6,t.length)):e.setAttributeNS(ao,t,n):n==null||a&&!vi(n)?e.removeAttribute(t):e.setAttribute(t,a?"":Rt(n)?String(n):n)}function ro(e,t,n,s,l){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Gr(n):n);return}const a=e.tagName;if(t==="value"&&a!=="PROGRESS"&&!a.includes("-")){const r=a==="OPTION"?e.getAttribute("value")||"":e.value,o=n==null?e.type==="checkbox"?"on":"":String(n);(r!==o||!("_value"in e))&&(e.value=o),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const r=typeof e[t];r==="boolean"?n=vi(n):n==null&&r==="string"?(n="",i=!0):r==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(l||t)}function es(e,t,n,s){e.addEventListener(t,n,s)}function Td(e,t,n,s){e.removeEventListener(t,n,s)}const oo=Symbol("_vei");function xd(e,t,n,s,l=null){const a=e[oo]||(e[oo]={}),i=a[t];if(s&&i)i.value=s;else{const[r,o]=Md(t);if(s){const u=a[t]=Id(s,l);es(e,r,u,o)}else i&&(Td(e,r,i,o),a[t]=void 0)}}const $d=/(Once|Passive|Capture)$/,Ad=/^on:?(?:Once|Passive|Capture)$/;function Md(e){let t,n;for(;(n=e.match($d))&&!Ad.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Mn(e.slice(2)),t]}let Ba=0;const Ed=Promise.resolve(),Fd=()=>Ba||(Ed.then(()=>Ba=0),Ba=Date.now());function Id(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const l=n.value;if(pe(l)){const a=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{a.call(s),s._stopped=!0};const i=l.slice(),r=[s];for(let o=0;o<i.length&&!s._stopped;o++){const u=i[o];u&&Et(u,t,5,r)}}else Et(l,t,5,[s])};return n.value=e,n.attached=Fd(),n}const co=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Dd=(e,t,n,s,l,a)=>{const i=l==="svg";t==="class"?yd(e,s,i):t==="style"?Cd(e,n,s):qs(t)?Ws(t)||xd(e,t,n,s,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Pd(e,t,s,i))?(ro(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&io(e,t,s,i,a,t!=="value")):e._isVueCE&&(Od(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ve(s)))?ro(e,mt(t),s,a,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),io(e,t,s,i))};function Pd(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&co(t)&&me(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const l=e.tagName;if(l==="IMG"||l==="VIDEO"||l==="CANVAS"||l==="SOURCE")return!1}return co(t)&&Ve(n)?!1:t in e}function Od(e,t){const n=e._def.props;if(!n)return!1;const s=mt(t);return Array.isArray(n)?n.some(l=>mt(l)===s):Object.keys(n).some(l=>mt(l)===s)}const uo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return pe(t)?n=>Js(t,n):t};function Rd(e){e.target.composing=!0}function fo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Il=Symbol("_assign"),Dl=Symbol("_initialValue");function ja(e,t,n){return t&&(e=e.trim()),n&&(e=na(e)),e}const Ld={created(e,{modifiers:{lazy:t,trim:n,number:s}},l){e.parentNode&&(e.type==="text"?e[Dl]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Dl]=e.defaultValue.replace(/\r\n?/g,`
21
+ `))),e[Il]=uo(l);const a=s||l.props&&l.props.type==="number";es(e,t?"change":"input",i=>{i.target.composing||e[Il](ja(e.value,n,a))}),(n||a)&&es(e,"change",()=>{e.value=ja(e.value,n,a)}),t||(es(e,"compositionstart",Rd),es(e,"compositionend",fo),es(e,"change",fo))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const l=t??"",a=e[Dl];delete e[Dl],a!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==a?e[Il](ja(e.value,n,s)):e.value=l},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:l,number:a}},i){if(e[Il]=uo(i),e.composing)return;const r=(a||e.type==="number")&&!/^0\d/.test(e.value)?na(e.value):e.value,o=t??"";if(r===o)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(s&&t===n||l&&e.value.trim()===o)||(e.value=o)}},Nd=["ctrl","shift","alt","meta"],Vd={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Nd.some(n=>e[`${n}Key`]&&!t.includes(n))},lt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(l,...a)=>{for(let i=0;i<t.length;i++){const r=Vd[t[i]];if(r&&r(l,t))return}return e(l,...a)})},Bd=et({patchProp:Dd},fd);let vo;function jd(){return vo||(vo=qu(Bd))}const Kd=(...e)=>{const t=jd().createApp(...e),{mount:n}=t;return t.mount=s=>{const l=Hd(s);if(!l)return;const a=t._component;!me(a)&&!a.render&&!a.template&&(a.template=l.innerHTML),l.nodeType===1&&(l.textContent="");const i=n(l,!1,Ud(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),i},t};function Ud(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Hd(e){return Ve(e)?document.querySelector(e):e}class Qe extends Error{constructor(t,n){super(n),this.name="ExpressionError",this.code=t}}const qd=512,po=32,ho=new Set(["globalThis","window","process","Function","eval","this","constructor","__proto__","prototype","require","module","exports","document","self","Deno","Buffer","setTimeout","setInterval","fetch","XMLHttpRequest"]),Wd=new Set(["isEmpty","len","includes","min","max","abs","str","num","bool"]);function Gd(e){return/[A-Za-z_$]/.test(e)}function zd(e){return/[A-Za-z0-9_$]/.test(e)}function Yd(e){const t=[];let n=0;for(;n<e.length;){const s=e[n];if(/\s/.test(s)){n+=1;continue}if(s==="("){t.push({type:"lparen",value:s}),n+=1;continue}if(s===")"){t.push({type:"rparen",value:s}),n+=1;continue}if(s===","){t.push({type:"comma",value:s}),n+=1;continue}if(s==="'"||s==='"'){const i=s;n+=1;let r="";for(;n<e.length&&e[n]!==i;){if(e[n]==="\\"&&n+1<e.length){r+=e[n+1],n+=2;continue}r+=e[n],n+=1}if(n>=e.length)throw new Qe("EXPR_UNTERMINATED_STRING","字符串未正确结束");n+=1,t.push({type:"string",value:r});continue}if(/[0-9]/.test(s)||s==="."&&/[0-9]/.test(e[n+1]||"")){let i="";for(;n<e.length&&/[0-9.]/.test(e[n]);)i+=e[n],n+=1;if(!/^\d+(\.\d+)?$/.test(i))throw new Qe("EXPR_INVALID_NUMBER",`非法数字: ${i}`);t.push({type:"number",value:i});continue}const l=e.slice(n,n+2),a=e.slice(n,n+3);if(["===","!=="].includes(a)){t.push({type:"op",value:a}),n+=3;continue}if(["==","!=","<=",">=","&&","||"].includes(l)){t.push({type:"op",value:l}),n+=2;continue}if(["+","-","*","/","%","<",">","!"].includes(s)){t.push({type:"op",value:s}),n+=1;continue}if(s==="."||s==="["||s==="]"||s==="{"||s==="}"||s===";")throw new Qe("EXPR_FORBIDDEN_TOKEN",`禁止的符号: ${s}`);if(Gd(s)){let i="";for(;n<e.length&&zd(e[n]);)i+=e[n],n+=1;t.push({type:"ident",value:i});continue}throw new Qe("EXPR_UNEXPECTED_CHAR",`意外字符: ${s}`)}return t.push({type:"eof",value:""}),t}class Jd{constructor(t,n){this.tokens=t,this.maxDepth=n,this.pos=0}parse(){const t=this.parseOr(0);if(this.current().type!=="eof")throw new Qe("EXPR_TRAILING",`多余内容: ${this.current().value}`);return t}current(){return this.tokens[this.pos]||{type:"eof",value:""}}eat(){const t=this.current();return this.pos+=1,t}parseOr(t){this.assertDepth(t);let n=this.parseAnd(t+1);for(;this.current().type==="op"&&this.current().value==="||";){const s=this.eat().value,l=this.parseAnd(t+1);n={kind:"binary",op:s,left:n,right:l}}return n}parseAnd(t){this.assertDepth(t);let n=this.parseEquality(t+1);for(;this.current().type==="op"&&this.current().value==="&&";){const s=this.eat().value,l=this.parseEquality(t+1);n={kind:"binary",op:s,left:n,right:l}}return n}parseEquality(t){this.assertDepth(t);let n=this.parseCompare(t+1);for(;this.current().type==="op"&&["==","!=","===","!=="].includes(this.current().value);){const s=this.eat().value,l=this.parseCompare(t+1);n={kind:"binary",op:s,left:n,right:l}}return n}parseCompare(t){this.assertDepth(t);let n=this.parseAdd(t+1);for(;this.current().type==="op"&&["<",">","<=",">="].includes(this.current().value);){const s=this.eat().value,l=this.parseAdd(t+1);n={kind:"binary",op:s,left:n,right:l}}return n}parseAdd(t){this.assertDepth(t);let n=this.parseMul(t+1);for(;this.current().type==="op"&&["+","-"].includes(this.current().value);){const s=this.eat().value,l=this.parseMul(t+1);n={kind:"binary",op:s,left:n,right:l}}return n}parseMul(t){this.assertDepth(t);let n=this.parseUnary(t+1);for(;this.current().type==="op"&&["*","/","%"].includes(this.current().value);){const s=this.eat().value,l=this.parseUnary(t+1);n={kind:"binary",op:s,left:n,right:l}}return n}parseUnary(t){return this.assertDepth(t),this.current().type==="op"&&["!","-","+"].includes(this.current().value)?{kind:"unary",op:this.eat().value,arg:this.parseUnary(t+1)}:this.parsePrimary(t+1)}parsePrimary(t){this.assertDepth(t);const n=this.current();if(n.type==="number")return this.eat(),{kind:"literal",value:Number(n.value)};if(n.type==="string")return this.eat(),{kind:"literal",value:n.value};if(n.type==="ident"){if(this.eat(),n.value==="true")return{kind:"literal",value:!0};if(n.value==="false")return{kind:"literal",value:!1};if(n.value==="null")return{kind:"literal",value:null};if(n.value==="undefined")return{kind:"literal",value:void 0};if(ho.has(n.value))throw new Qe("EXPR_FORBIDDEN_IDENT",`禁止标识符: ${n.value}`);if(this.current().type==="lparen"){if(!Wd.has(n.value))throw new Qe("EXPR_FORBIDDEN_CALL",`非白名单函数: ${n.value}`);this.eat();const s=[];if(this.current().type!=="rparen")for(s.push(this.parseOr(t+1));this.current().type==="comma";)this.eat(),s.push(this.parseOr(t+1));if(this.current().type!=="rparen")throw new Qe("EXPR_MISSING_RPAREN","缺少 )");return this.eat(),{kind:"call",name:n.value,args:s}}return{kind:"ident",name:n.value}}if(n.type==="lparen"){this.eat();const s=this.parseOr(t+1);if(this.current().type!=="rparen")throw new Qe("EXPR_MISSING_RPAREN","缺少 )");return this.eat(),s}throw new Qe("EXPR_UNEXPECTED_TOKEN",`意外 token: ${n.value||n.type}`)}assertDepth(t){if(t>this.maxDepth)throw new Qe("EXPR_TOO_DEEP",`表达式嵌套超过 ${this.maxDepth}`)}}function Xd(e,t){switch(e){case"isEmpty":{const n=t[0];return n==null||n===""||Array.isArray(n)&&n.length===0}case"len":{const n=t[0];return typeof n=="string"||Array.isArray(n)?n.length:0}case"includes":{const n=t[0],s=t[1];return typeof n=="string"?n.includes(String(s)):Array.isArray(n)?n.includes(s):!1}case"min":return Math.min(...t.map(Number));case"max":return Math.max(...t.map(Number));case"abs":return Math.abs(Number(t[0]));case"str":return String(t[0]??"");case"num":return Number(t[0]);case"bool":return t[0]==="0"?!1:!!t[0];default:throw new Qe("EXPR_FORBIDDEN_CALL",`非白名单函数: ${e}`)}}function vn(e,t){switch(e.kind){case"literal":return e.value;case"ident":{if(ho.has(e.name))throw new Qe("EXPR_FORBIDDEN_IDENT",`禁止标识符: ${e.name}`);if(!(e.name in t))return;const n=t[e.name];if(typeof n=="function")throw new Qe("EXPR_FORBIDDEN_VALUE",`字段 ${e.name} 不可为函数`);return n}case"unary":{const n=vn(e.arg,t);if(e.op==="!")return!n;if(e.op==="-")return-Number(n);if(e.op==="+")return+Number(n);throw new Qe("EXPR_UNKNOWN_OP",`未知一元运算: ${e.op}`)}case"binary":{if(e.op==="&&"){const l=vn(e.left,t);return l&&vn(e.right,t)}if(e.op==="||"){const l=vn(e.left,t);return l||vn(e.right,t)}const n=vn(e.left,t),s=vn(e.right,t);switch(e.op){case"==":case"===":return n===s;case"!=":case"!==":return n!==s;case"<":return n<s;case">":return n>s;case"<=":return n<=s;case">=":return n>=s;case"+":return n+s;case"-":return Number(n)-Number(s);case"*":return Number(n)*Number(s);case"/":return Number(n)/Number(s);case"%":return Number(n)%Number(s);default:throw new Qe("EXPR_UNKNOWN_OP",`未知运算: ${e.op}`)}}case"call":return Xd(e.name,e.args.map(n=>vn(n,t)))}}function Zd(e,t=po){const n=Yd(e);return new Jd(n,t).parse()}function Qd(e,t,n){const s=(n==null?void 0:n.maxLength)??qd,l=(n==null?void 0:n.maxDepth)??po;if(typeof e!="string")throw new Qe("EXPR_NOT_STRING","表达式必须是字符串");if(e.length>s)throw new Qe("EXPR_TOO_LONG",`表达式长度超过 ${s}`);const a=Zd(e,l);return vn(a,t||{})}function ef(e,t){const n=String(e).trim(),s=n.startsWith("return")?n:`return ${n}`,l=Object.keys(t),a=Object.values(t);return new Function(...l,s)(...a)}function tf(e,t={},n={}){const s=n.trust??"untrusted",l=n.dialect??(s==="untrusted"?"safe-v1":"legacy");if(s==="untrusted"&&l==="legacy")throw new Qe("UNTRUSTED_LEGACY","不可信路径禁止执行 legacy 表达式;请转换为 safe-v1 或标记为可信环境");if(l==="safe-v1"||s==="untrusted")return Qd(e,t,{maxLength:n.maxLength,maxDepth:n.maxDepth});try{return ef(e,t)}catch(a){throw a instanceof Qe?a:new Qe("LEGACY_EVAL_FAILED",(a==null?void 0:a.message)||"legacy 表达式执行失败")}}function Ds(e,t,n){try{return tf(t,e||{},{trust:(n==null?void 0:n.trust)??"trusted",dialect:(n==null?void 0:n.dialect)??"legacy",maxLength:n==null?void 0:n.maxLength,maxDepth:n==null?void 0:n.maxDepth})}catch{return}}function nf(e){return e==null?0:(typeof e!="string"&&(e=String(e)),e.replace(/[^\x00-\xff]/g,"01").length)}function Nn(e){try{return JSON.parse(JSON.stringify(e))}catch{return e}}function mo(e){return!(e==null||Array.isArray(e)&&e.length===0)}function go(e,t){switch(t){case"number":return Number(e)||0;case"string":return String(e??"");case"boolean":return e==="0"?!1:!!e;case"object":return e&&typeof e=="object"?e:{};case"array":return Array.isArray(e)?e:[];case"no":default:return e}}function wn(e){return e==null||typeof e=="string"&&e===""||Array.isArray(e)&&e.length===0}function sf(e){return e.type==="collection"&&e.collectionType==="unique-within-items"}function lf(e){var t,n;return e.type==="logic"&&(((t=e.repeatableRelation)==null?void 0:t.type)==="not-equal"||((n=e.repeatableRelation)==null?void 0:n.type)==="unique-within-items")}function Pl(e){if(typeof e=="number"&&Number.isNaN(e))return"number:NaN";try{return`${typeof e}:${JSON.stringify(e)}`}catch{return`${typeof e}:${String(e)}`}}function af(e,t,n,s="submit",l={}){var r;if(e.type!=="list"||!Array.isArray(n))return[];const a=(e.rules??[]).filter(o=>sf(o)&&(s==="submit"||o.trigger!=="submit")),i=[];for(const o of a){const u=(r=e.subItems)==null?void 0:r.find(d=>d.key===o.fieldKey);if(!u)continue;const c=new Map;n.forEach((d,v)=>{if(!d||typeof d!="object"||Array.isArray(d))return;const A=d[o.fieldKey];if(wn(A)||u.required===!1&&o.includeOptionalFields===!1||u.visible===!1&&o.includeHiddenFields!==!0)return;const x=Pl(A),M=c.get(x)??[];M.push(v),c.set(x,M)});for(const d of c.values())if(!(d.length<2))for(const v of d)i.push({path:`${t}[${v}].${o.fieldKey}`,listKey:t,itemIndex:v,fieldKey:o.fieldKey,message:o.message})}for(const o of e.subItems??[]){const u=(o.rules??[]).filter(c=>lf(c)&&(s==="submit"||c.trigger!=="submit"));for(const c of u){const d=c.repeatableRelation;if(d.type==="unique-within-items"){const v=new Map;n.forEach((A,x)=>{if(!A||typeof A!="object"||Array.isArray(A))return;const M=A[d.fieldKey];if(wn(M)||o.required===!1&&d.includeOptionalFields===!1||o.visible===!1&&d.includeHiddenFields!==!0)return;const w=Pl(M);v.set(w,[...v.get(w)??[],x])});for(const A of v.values())if(!(A.length<2))for(const x of A)i.push({path:`${t}[${x}].${d.fieldKey}`,listKey:t,itemIndex:x,fieldKey:d.fieldKey,message:c.message});continue}n.forEach((v,A)=>{if(!v||typeof v!="object"||Array.isArray(v))return;const x=v[d.fieldKey];if(wn(x))return;const M=d.right,w=M.scope==="form"?l[M.runtimeKey??M.businessFieldId]:v[M.fieldKey];wn(w)||Pl(x)===Pl(w)&&i.push({path:`${t}[${A}].${d.fieldKey}`,listKey:t,itemIndex:A,fieldKey:d.fieldKey,message:c.message})})}}return[...new Map(i.map(o=>[`${o.path}:${o.message}`,o])).values()]}function Ol(e){var o,u;const{item:t,value:n,formValues:s={},expressionOptions:l}=e;let a="",i="";const r=wn(n);if(t.required&&r&&(a=((u=(o=t.rules)==null?void 0:o.find(c=>c.type==="required"))==null?void 0:u.message)||"字段不能为空"),t.required===!1&&r)return{errMsg:a,popMsg:i,value:n};if(!a&&t.rules)for(const c of t.rules){if(c.type==="required")continue;const d=yo(c,n,s,l);if(d){a=d;break}}if(t.warningRules)for(const c of t.warningRules){const d=yo(c,n,s,l);if(d){i=d;break}}return{errMsg:a,popMsg:i,value:n}}function yo(e,t,n,s){switch(e.type){case"regex":{if(!e.regex)return null;const l=t!=null?String(t):"";return new RegExp(e.regex).test(l)?null:e.message||"格式不正确"}case"logic":{if(!e.logic)return null;try{const l={...n,value:t};return Ds(l,e.logic,s)?null:e.message||"校验不通过"}catch{return e.message||"校验异常"}}case"byteLength":return e.byteLength&&nf(t)>e.byteLength?e.message||`不得超过${e.byteLength}字节`:null;default:return null}}function rf(e){const{sourceKey:t,value:n,formSnapshot:s,relations:l,expressionOptions:a}=e,i=[];for(const r of l){if(r.type==="remote")continue;const o=r.target;if(!o||o===t)continue;const u=s[o]||{value:void 0},c={...of(s),value:n,[t]:n,target:u.value};if(r.effect==="value"&&r.logic)try{const d=Ds(c,r.logic,a);d!==void 0&&i.push({target:o,effect:"value",newValue:d})}catch{}if(r.effect==="visible"&&r.logic)try{const d=Ds(c,r.logic,a);typeof d=="boolean"&&i.push({target:o,effect:"visible",newValue:d})}catch{}if(r.effect==="disabled"&&r.logic)try{const d=Ds(c,r.logic,a);typeof d=="boolean"&&i.push({target:o,effect:"disabled",newValue:d})}catch{}}return i}function of(e){const t={};for(const n of Object.keys(e)){const s=e[n];t[n]=s.value}return t}const cf={get:()=>({}),set:()=>{},remove:()=>{}};class uf{constructor(t,n,s){this._fields={},this._itemMap={},this._relationsMap={},this._listeners=new Map,this._isInit=!1,this._dirtyTracking=!1,this._queue=[],this._pendingAsyncTasks=[],this._isProcessing=!1,this._lastRelationTrace=null,this._lastValidateFails=[],this.schema=t,this._storage=n||cf,this._expressionOptions=s??{trust:"trusted",dialect:"legacy"};for(const l of t.groups)for(const a of l.items)this._itemMap[a.key]=a,a.relations&&a.relations.length>0&&(this._relationsMap[a.key]=a.relations)}get fields(){return this._fields}get isInit(){return this._isInit}getItem(t){return this._itemMap[t]}getLastRelationTrace(){return this._lastRelationTrace?Nn(this._lastRelationTrace):null}getLastValidateFails(){return Nn(this._lastValidateFails)}clearDebugTraces(){this._lastRelationTrace=null,this._lastValidateFails=[]}explainField(t){const n=this._itemMap[t],s=this._fields[t];if(!n)return{key:t,exists:!1,asSource:[],asTarget:[]};const l=this._relationsMap[t]?Nn(this._relationsMap[t]):[],a=[];for(const[i,r]of Object.entries(this._relationsMap))for(const o of r)o.target===t&&a.push({sourceKey:i,relation:Nn(o)});return{key:t,exists:!0,type:n.type,label:n.label,value:s==null?void 0:s.value,visible:s==null?void 0:s.visible,disabled:s==null?void 0:s.disabled,errMsg:(s==null?void 0:s.errMsg)||"",warningMsg:(s==null?void 0:s.warningMsg)||"",required:n.required===!0,dataKey:t,rules:(n.rules||[]).map(i=>({type:i.type,message:i.message,trigger:i.trigger})),asSource:l,asTarget:a}}_evalLogic(t,n){return Ds(t,n,this._expressionOptions)}_recordValidateFail(t){const n={...t,at:Date.now()};this._lastValidateFails=this._lastValidateFails.filter(s=>s.key!==t.key),this._lastValidateFails.push(n)}async init(t){var d,v,A,x;const n=this.schema.storageKey;this._global={SL:{},selectors:{},admittanceData:[]};const s=["enumeration","payback","admittance"],l=(this.schema.apis||[]).filter(M=>s.includes(M.scene));let a={},i={},r=[];for(const M of l)try{const w=await this._fetchAPI(M);M.scene==="enumeration"&&w?a={...a,...w}:M.scene==="payback"&&w?i={...i,...w}:M.scene==="admittance"&&w&&(r=Array.isArray(w)?w:[w])}catch{}this._admittanceData=r,this._enumData=a;const o=(this.schema.apis||[]).filter(M=>M.scene==="localData"),u={};for(const M of o)try{const w=M.params||[];for(const O of w)(O.source==="inject"||O.key)&&(u[O.name]=this._storage.get(O.key||O.name))}catch{}this._global={SL:u,selectors:a,admittanceData:r};let c={};n&&(c=this._storage.get(n)||{});for(const M of this.schema.groups)for(const w of M.items){const O=w.key;let y;if((t==null?void 0:t[O])!==void 0?y=t[O]:c[O]!==void 0?y=c[O]:i[O]!==void 0&&(y=i[O]),y===void 0&&w.defaultValue!==void 0&&(y=w.defaultValue,typeof y=="string"&&w.defaultValueMode!=="literal"))try{const C=y.startsWith("return ")?y:"return "+y,B=this._evalLogic({...this._global||{}},C);y=B!==void 0?B:y}catch{}if(y===void 0&&(y=this._resolveSelectDefault(w)),w.backfillable===!1&&c[O]!==void 0&&(y=w.defaultValue),w.initOptions&&w.initOptions.length>0&&y!=null&&y!==""&&typeof y=="object"&&!w.isJustValidate){const C=w.initOptions,B=((d=w.props)==null?void 0:d.isSingle)!==!1,D=(v=w.extra)==null?void 0:v.defaultMultiStepCodes,U=(A=w.extra)==null?void 0:A.defaultSelectCode;if(D||U)if(Array.isArray(y)&&D){let q=C,R=!0;for(const j of y){const J=q.findIndex(S=>S.code===j.code&&S.name===j.name);if(J===-1){R=!1;break}q=((x=q[J])==null?void 0:x.child)||[]}y=R?y:""}else Array.isArray(y)&&U&&!B?y=y.every(R=>C.some(j=>j.code===R.code&&j.name===R.name))?y:"":y=C.some(q=>q.code===y.code&&q.name===y.name)?y:""}let b="";if(y!=null&&y!==""&&w.showValueTemplate)try{const C={...this._buildFormValues(),value:y,global:this._global};b=String(this._evalLogic(C,w.showValueTemplate)||"")}catch{}if(!b&&y!=null&&y!==""&&(Array.isArray(y)?b=y.map(C=>C.name||C).join(""):b=String(y)),this._fields[O]={value:y!==void 0?y:"",showValue:b,visible:w.visible!==!1,disabled:w.disabled===!0,focused:!1,errMsg:"",warningMsg:"",valueType:w.valueType,defaultValue:w.defaultValue},w.extra){for(const C of Object.keys(w.extra))if(C.startsWith("init")&&typeof w.extra[C]=="string")try{const B=this._evalLogic({...this._buildFormValues(),global:this._global,value:y},w.extra[C]);B!==void 0&&(this._fields[O][C.replace(/^init/,"")]=B)}catch{}}}for(const M of this.schema.groups)for(const w of M.items){const O=this._fields[w.key];if(!O)continue;if(w.initRelationsAtStart&&this._relationsMap[w.key]&&(O.visible||w.relationsWhenHidden)&&!O.errMsg){const b=O.value;mo(b)?this._trackAsync(this._applyRelations(w.key,b)):this._trackAsync(this._applyRelations(w.key,b,!0))}}for(;this._pendingAsyncTasks.length>0;){const M=this._pendingAsyncTasks.splice(0);await Promise.all(M)}this._isInit=!0,this._dirtyTracking=!0,await this._emit("afterInit",Nn(this._fields))}setControlData(t,n,s){var i;if(!this._fields[t]&&!this._itemMap[t])return;const l=["inputChange","inputFocus","pickShow"];if(s!=null&&s.eventType&&l.includes(s.eventType)&&!(((i=this._itemMap[t])==null?void 0:i.type)==="list"&&s.eventType==="inputChange")){this._emit("controlAction",{key:t,eventType:s.eventType,value:n});return}(s==null?void 0:s.eventType)==="searchChange"&&(s={...s,skipRelation:!0});const a=()=>{var u,c;const r=this._itemMap[t];if((s==null?void 0:s.changeType)==="clear"){const d=(r==null?void 0:r.extra)||{},v=d.clearBoth,A=d.clearValue;if(n=A!==void 0?A:(r==null?void 0:r.defaultValue)??"",Array.isArray(v))for(const x of v)this._fields[x]&&(this._dirtyTracking&&this._fields[x].value!==""&&(this._fields[x]._dirty=!0),this._fields[x].value="",this._fields[x].showValue="",this._fields[x].errMsg="")}if(this._dirtyTracking&&this._fields[t]&&this._fields[t].value!==n&&(this._fields[t]._dirty=!0),s!=null&&s.extraFields&&Object.assign(this._fields[t],s.extraFields),this._fields[t].value=n,this._computeShowValue(t,n,r),!(s!=null&&s.skipVerify)&&(r==null?void 0:r.type)==="list"&&((s==null?void 0:s.eventType)===void 0||s.eventType==="inputChange"||s.eventType==="inputBlur"||s.eventType==="confirm")&&this._validateListCollections(t,n,"blur",!0),!(s!=null&&s.skipVerify)){const d=(r==null?void 0:r.rules)&&r.rules.length>0,v=(r==null?void 0:r.warningRules)&&r.warningRules.length>0,A=r==null?void 0:r.required;if(d||v||A){const x=Ol({expressionOptions:this._expressionOptions,item:r,value:n,formValues:this._buildFormValues()}),M=(r==null?void 0:r.rules)&&r.rules.length>0&&r.rules.every(w=>w.trigger==="submit");M?this._fields[t]._pendingErrMsg=x.errMsg:(this._fields[t].errMsg=x.errMsg,this._fields[t].warningMsg=x.popMsg),x.errMsg||x.popMsg?(this._recordValidateFail({key:t,errMsg:x.errMsg,popMsg:x.popMsg,value:n,rules:((r==null?void 0:r.rules)||[]).filter(w=>!M||w.trigger==="submit").map(w=>({type:w.type,message:w.message,trigger:w.trigger}))}),this._emit("checkFail",{key:t,errMsg:x.errMsg,popMsg:x.popMsg,value:n,rules:((r==null?void 0:r.rules)||[]).map(w=>({type:w.type,message:w.message,trigger:w.trigger}))})):this._lastValidateFails=this._lastValidateFails.filter(w=>w.key!==t)}}this._persistField(t),!(s!=null&&s.skipRelation)&&(this._fields[t].visible||(r==null?void 0:r.relationsWhenHidden))&&this._trackAsync(this._applyRelations(t,n)),this._emit("afterChange",{key:t,value:n}),(r==null?void 0:r.type)==="task"&&!(s!=null&&s.skipJump)&&this._emit("controlJump",{key:t,value:n,taskType:(u=r.props)==null?void 0:u.taskType,taskCategory:(c=r.props)==null?void 0:c.taskCategory,props:r.props})};this._queue.push(a),this._isProcessing||this._drainQueue()}validateAll(){let t=!1;for(const n of Object.keys(this._fields)){const s=this._fields[n],l=this._itemMap[n];if(!l||!s.visible||l.type==="agreement"||!l.label)continue;s._pendingErrMsg&&(s.errMsg=s._pendingErrMsg,delete s._pendingErrMsg);const a=Ol({expressionOptions:this._expressionOptions,item:l,value:s.value,formValues:this._buildFormValues()});a.errMsg?(s.errMsg=a.errMsg,t=!0):s.errMsg="",s.warningMsg=a.popMsg,(a.errMsg||a.popMsg)&&this._emit("checkFail",{key:n,errMsg:a.errMsg,popMsg:a.popMsg,value:s.value}),l.type==="list"&&this._validateListCollections(n,s.value,"submit",!0)&&(t=!0)}return this._emit("afterChange",{validateAll:!0,hasError:t}),!t}getControlData(t){return this._fields[t]?Nn(this._fields[t]):void 0}collectFormData(t){const n={},s=[];for(const l of Object.keys(this._fields)){const a=this._fields[l],i=this._itemMap[l];if(i){if(!a.visible){const r=i.collectWhenHidden?a.value:i.defaultValue;if(mo(r)&&(n[l]=r),!n[l]||Array.isArray(n[l])&&!n[l].length){delete n[l];continue}}a.visible&&s.push(l)}}for(const l of s)(()=>{const i=this._fields[l],r=this._itemMap[l];if(r){if(!(t!=null&&t.skipVerify)&&r.rules&&r.rules.length>0){const o=Ol({expressionOptions:this._expressionOptions,item:r,value:i.value,formValues:this._buildFormValues()});i.errMsg=o.errMsg,i.warningMsg=o.popMsg}!(t!=null&&t.skipVerify)&&r.type==="list"&&this._validateListCollections(l,i.value,"submit",!0)}})();for(const l of s){const a=this._fields[l],i=this._itemMap[l];if(i&&i.submittable!==!1){if(!(t!=null&&t.skipVerify)){if(a._pendingErrMsg&&(a.errMsg=a._pendingErrMsg,delete a._pendingErrMsg),a.errMsg)throw new Error(`字段校验失败: ${l}, 错误信息: ${a.errMsg}`);const r=a.collectionErrors,o=r&&Object.entries(r)[0];if(o)throw new Error(`字段校验失败: ${o[0]}, 错误信息: ${o[1]}`)}n[l]=i.emptyValuePolicy==="preserve"&&wn(a.value)?a.value:go(a.value,i.valueType)}}return this._emit("fetchFormFields",n),n}async collectFormDataAsync(t){var s;const n={};for(const l of Object.keys(this._fields)){const a=this._fields[l],i=this._itemMap[l];if(i&&!(!a.visible&&!i.collectWhenHidden)&&i.submittable!==!1){if(!(t!=null&&t.skipVerify)){if(a._pendingErrMsg)throw a.errMsg=a._pendingErrMsg,delete a._pendingErrMsg,new Error(`字段校验失败: ${l}, ${a.errMsg}`);const r=Ol({expressionOptions:this._expressionOptions,item:i,value:a.value,formValues:this._buildFormValues()});if(r.errMsg)throw a.errMsg=r.errMsg,new Error(`字段校验失败: ${l}, ${r.errMsg}`);if(i.type==="list"&&this._validateListCollections(l,a.value,"submit",!0)){const o=a.collectionErrors,u=Object.entries(o)[0];throw new Error(`字段校验失败: ${u[0]}, ${u[1]}`)}if(i.serverValidate&&(i.required!==!1||!wn(a.value)))try{const o=(this.schema.apis||[]).find(u=>u.id===i.serverValidate);if(o){const u=await this._fetchAPI(o,{key:l,value:a.value});if(u&&u.code!==0)throw a.errMsg=u.msg||"服务端校验不通过",new Error(`字段校验失败: ${l}, ${a.errMsg}`)}}catch(o){if((s=o.message)!=null&&s.includes("字段校验失败"))throw o}}n[l]=i.emptyValuePolicy==="preserve"&&wn(a.value)?a.value:go(a.value,i.valueType)}}return this._emit("fetchFormFields",n),n}async submitForm(t){let n=await this.collectFormDataAsync(t);const s=await this._emitAsync("beforeSubmit",n);s!==void 0&&(n=s);let l,a;try{const i=(this.schema.apis||[]).find(r=>r.id===this.schema.submitApi);i&&(l=await this._fetchAPI(i,{submitData:n}))}catch(i){a=i}if(await this._emitAsync("afterSubmit",{response:l,err:a}),t!=null&&t.isClearStore&&this.clearStore(),a)throw a;return l}clearStore(){this.schema.storageKey&&this._storage.remove(this.schema.storageKey)}on(t,n){const s=this._listeners.get(t)||[];s.push(n),this._listeners.set(t,s)}off(t,n){const s=this._listeners.get(t)||[];this._listeners.set(t,s.filter(l=>l!==n))}destroy(){this._listeners.clear(),this._fields={},this._itemMap={},this._relationsMap={}}async fetchApi(t,n){let s;return typeof t=="string"?s=(this.schema.apis||[]).find(l=>l.id===t):s=t,s?this._fetchAPI(s,n):this._emitAsync("fetchAPI",{id:typeof t=="string"?t:t.id,scene:"other",extraParams:n||{},injects:{...this._buildFormValues(),global:this._global,...n}})}flush(){for(;this._queue.length>0;){const t=this._queue.shift();if(t)try{t()}catch{}}this._isProcessing=!1}async flushAsync(){for(this.flush();this._pendingAsyncTasks.length>0;){const t=this._pendingAsyncTasks.splice(0);await Promise.all(t)}}collectDirtyData(t){const n=[];for(const s of t){const l=s.item_key,a=this._fields[l];if(!a||!a._dirty||!a.visible)continue;const i=this._formatInterruptAnswer(l,a.value);if(i.answer===s.answer)continue;const r={...s,answer:i.answer,answered:!0};(s.answer_items!==void 0||i.answerItems!==void 0)&&(r.answer_items=i.answerItems||s.answer_items),(s.answer_extra_json!==void 0||i.extraJson!==void 0)&&(r.answer_extra_json=i.extraJson||s.answer_extra_json),n.push(r)}return n}resetDirty(t){if(t)this._fields[t]&&delete this._fields[t]._dirty;else for(const n of Object.keys(this._fields))delete this._fields[n]._dirty}_trackAsync(t){this._pendingAsyncTasks.push(t),t.finally(()=>{const n=this._pendingAsyncTasks.indexOf(t);n>=0&&this._pendingAsyncTasks.splice(n,1)})}_drainQueue(){if(!this._isProcessing){for(this._isProcessing=!0;this._queue.length>0;){const t=this._queue.shift();if(t)try{t()}catch{}}this._isProcessing=!1}}_computeShowValue(t,n,s){var a,i,r;const l=s||this._itemMap[t];if(l!=null&&l.showValueTemplate&&n!=null&&n!=="")try{const o={...this._buildFormValues(),value:n,global:this._global};this._fields[t].showValue=String(this._evalLogic(o,l.showValueTemplate)||"")}catch{}else Array.isArray(n)&&n.length>0?(this._fields[t].showValue=n.map(o=>o.name||o).join(""),(a=n[0])!=null&&a.adcode&&(this._fields[t].province=n[0].name,this._fields[t].province_code=n[0].adcode),(i=n[1])!=null&&i.adcode&&(this._fields[t].city=n[1].name,this._fields[t].city_code=n[1].adcode),(r=n[2])!=null&&r.adcode&&(this._fields[t].country=n[2].name,this._fields[t].country_code=n[2].adcode),this._computeExtraJson(t)):n!=null&&n!==""?typeof n=="object"&&n.name?this._fields[t].showValue=n.name:this._fields[t].showValue=String(n):this._fields[t].showValue=""}_computeExtraJson(t){const n=this._fields[t];n&&(n.extraJson=JSON.stringify({province_code:n.province_code||"",province_name:n.province||"",city_code:n.city_code||"",city_name:n.city||"",district_code:n.country_code||"",district_name:n.country||"",rd_code:"",rd_name:"",location:"",town_code:"",town_name:""}))}async _applyRelations(t,n,s=!1){var x,M,w,O;const l=(x=this._relationsMap[t])==null?void 0:x.filter(y=>!s||y.type==="local"&&(y.effect==="visible"||y.effect==="disabled"));if(!l||l.length===0)return;const a=new Map,i=l.filter(y=>{let b=!0;if(!y.when)b=!0;else if(typeof y.when=="boolean")b=y.when;else if(typeof y.when=="object"&&"logic"in y.when)try{b=!!this._evalLogic({...this._buildFormValues(),value:n},y.when.logic)}catch{b=!1}return a.set(y,b),b}),r=i.filter(y=>y.type==="local"),o=i.filter(y=>y.type==="remote");let u={};for(const y of o)if(y.api)try{const b=(this.schema.apis||[]).find(C=>C.id===y.api);if(b){const C=await this._fetchAPI(b,{sourceKey:t,value:n});C&&(u={...u,...C})}}catch{}const c=this._buildSnapshot();for(const y of Object.keys(u))c[y]&&(c[y].value=u[y]);const d=rf({sourceKey:t,value:n,formSnapshot:c,relations:r}),v=[];for(const y of o){const b=y.target;if(!b||!this._fields[b])continue;const C=this._fields[b];switch(y.effect){case"value":{const B=C.value,D=(M=c[b])==null?void 0:M.value;D!==void 0&&D!==B&&(this._dirtyTracking&&(C._dirty=!0),C.value=D,this._computeShowValue(b,D),this._persistField(b),this._emit("afterChange",{key:b,value:D}),v.push({target:b,effect:"value",type:"remote",oldValue:B,newValue:D,logic:y.logic}));break}case"visible":if(typeof((w=c[b])==null?void 0:w.visible)=="boolean"){const B=C.visible,D=c[b].visible;C.visible=D,B!==D&&v.push({target:b,effect:"visible",type:"remote",oldValue:B,newValue:D,logic:y.logic})}break;case"disabled":if(typeof((O=c[b])==null?void 0:O.disabled)=="boolean"){const B=C.disabled,D=c[b].disabled;C.disabled=D,B!==D&&v.push({target:b,effect:"disabled",type:"remote",oldValue:B,newValue:D,logic:y.logic})}break}}for(const y of d){const b=this._fields[y.target];if(!b)continue;const C=y.effect==="value"?b.value:y.effect==="visible"?b.visible:b.disabled;switch(y.effect){case"value":this._dirtyTracking&&(b._dirty=!0),b.value=y.newValue,this._computeShowValue(y.target,y.newValue),this._persistField(y.target),this._emit("afterChange",{key:y.target,value:y.newValue});break;case"visible":b.visible=y.newValue;break;case"disabled":b.disabled=y.newValue;break}if(C!==y.newValue){const B=r.find(D=>D.target===y.target&&D.effect===y.effect);v.push({target:y.target,effect:y.effect,type:"local",oldValue:C,newValue:y.newValue,logic:B==null?void 0:B.logic})}}const A={sourceKey:t,sourceValue:n,at:Date.now(),evaluated:l.map(y=>({target:y.target,effect:y.effect,type:y.type,whenActive:a.get(y)!==!1,logic:y.logic})),applied:v};this._lastRelationTrace=A,this._emit("relationTrace",Nn(A))}_persistField(t){var l;const n=this._itemMap[t];if(!n||n.persistable===!1||!this.schema.storageKey)return;const s=this._storage.get(this.schema.storageKey)||{};s[t]=(l=this._fields[t])==null?void 0:l.value,this._storage.set(this.schema.storageKey,s)}_buildSnapshot(){const t={};for(const n of Object.keys(this._fields)){const s=this._fields[n];t[n]={value:s.value,visible:s.visible,disabled:s.disabled}}return t}_buildFormValues(){const t={};for(const n of Object.keys(this._fields))t[n]=this._fields[n].value;return t}_buildFormValuesWithBusinessFields(){var n,s;const t=this._buildFormValues();for(const l of Object.keys(this._fields)){const a=(s=(n=this._itemMap[l])==null?void 0:n.extra)==null?void 0:s.businessField;typeof a=="string"&&!(a in t)&&(t[a]=this._fields[l].value)}return t}_validateListCollections(t,n,s,l){const a=this._itemMap[t],i=this._fields[t];if(!a||!i||a.type!=="list")return!1;const r=af(a,t,n,s,this._buildFormValuesWithBusinessFields()),o={};for(const u of r)o[u.path]=u.message,l&&this._emit("checkFail",{key:u.path,errMsg:u.message,popMsg:"",value:n});return Object.keys(o).length>0?i.collectionErrors=o:delete i.collectionErrors,r.length>0}_formatInterruptAnswer(t,n){var i,r,o,u,c,d,v;const s=this._itemMap[t],l=(s==null?void 0:s.type)||"input",a={answer:""};if(/^address/.test(l)&&Array.isArray(n)&&n.length>0){const A=n.map(M=>M.name||"").filter(Boolean);a.answer=A.join("");const x={province_code:((i=n[0])==null?void 0:i.adcode)||"",province_name:((r=n[0])==null?void 0:r.name)||"",city_code:((o=n[1])==null?void 0:o.adcode)||"",city_name:((u=n[1])==null?void 0:u.name)||"",district_code:((c=n[2])==null?void 0:c.adcode)||"",district_name:((d=n[2])==null?void 0:d.name)||"",rd_code:"",rd_name:"",location:"",town_code:"",town_name:""};return a.extraJson=JSON.stringify(x),a}return(l==="select"||l==="cascader"||l==="search")&&n!=null&&typeof n=="object"&&!Array.isArray(n)&&n.code!==void 0?(a.answer=`${n.code}: ${n.name||""}`,a.answerItems=[{code:String(n.code),name:n.name||""}],a):(l==="select"||l==="cascader")&&Array.isArray(n)&&n.length>0&&((v=n[0])==null?void 0:v.code)!==void 0?(a.answer=n.map(A=>`${A.code}: ${A.name||""}`).join(", "),a.answerItems=n.map(A=>({code:String(A.code),name:A.name||""})),a):(n!=null&&n!==""&&(typeof n=="object"&&n.name?a.answer=String(n.name):a.answer=String(n)),a)}_resolveSelectDefault(t){var s,l;const n=t.extra||{};return n.defaultSelectCode!==void 0||((s=t.props)==null?void 0:s.defaultSelectCode)!==void 0?this._normalSelectDefault(t):n.defaultMultiStepCodes!==void 0||((l=t.props)==null?void 0:l.defaultMultiStepCodes)!==void 0?this._multiStepSelectDefault(t):t.initOptions&&t.initOptions.length>0?[]:t.defaultValue}_normalSelectDefault(t){var i,r,o;const n=String(((i=t.extra)==null?void 0:i.defaultSelectCode)??((r=t.props)==null?void 0:r.defaultSelectCode)??""),s=n.trim().split(","),l=t.initOptions||[];return((o=t.props)==null?void 0:o.isSingle)!==!1?l.find(u=>u.code===n)||null:l.filter(u=>s.includes(String(u.code)))}_multiStepSelectDefault(t){var r,o;const s=String(((r=t.extra)==null?void 0:r.defaultMultiStepCodes)??((o=t.props)==null?void 0:o.defaultMultiStepCodes)??"").trim().split(",");if(s.length<2)return[];const a=(t.initOptions||[]).find(u=>u.code===s[0]);if(!a||!Array.isArray(a.child))return[];const i=a.child.find(u=>u.code===s[1]);return i?[{code:a.code,name:a.name},{code:i.code,name:i.name}]:[]}async _fetchAPI(t,n){const s={...this._buildFormValues(),global:this._global,...n};let l={};if(t.additionParams)try{const o=this._evalLogic(s,t.additionParams);o&&typeof o=="object"&&(l=o)}catch{}if(t.params&&t.params.length>0)for(const o of t.params){if(l[o.name]!==void 0)continue;const u=await this._emitAsync("addApiParam",{api:t,paramName:o.name,defaultValue:o.default,injects:s});u!==void 0?l[o.name]=u:o.default!==void 0&&(l[o.name]=o.default)}let a,i;try{a=await this._emitAsync("fetchAPI",{id:t.id,scene:t.scene,api:t,extraParams:l,injects:s})}catch(o){i=o}if(i||a===void 0){if(t.failback)try{return this._evalLogic(s,t.failback)}catch{}if(i)throw i;return}let r=a;if(t.interptor)try{const o=this._evalLogic({...s,res:a},t.interptor);o!==void 0&&(r=o)}catch{}if(t.extraLogic)try{this._evalLogic({...s,response:r},t.extraLogic)}catch{}return r}_emit(t,...n){const s=this._listeners.get(t)||[];for(const l of s)try{l(...n)}catch{}}async _emitAsync(t,...n){const s=this._listeners.get(t)||[];let l;for(const a of s)try{const i=await a(...n);i!==void 0&&(l=i)}catch{}return l}}function df(e){switch(e){case"select":case"cascader":return"arrow";case"address":case"address5":case"addressPinyin":return"location";case"search":return"search";default:return null}}function ff(e){return e.type==="task"||e.type==="agreement"||!e.label}const Ps="/pages/dynamic-form/sub-form",Ka="/packageSub/pages/web/web",bo={...{signature:{jumpMode:"navigate",page:"/packageSub/pages/auth/signature",callbackKey:"signatureData",category:"TASKS",uiCategory:"native"},map:{jumpMode:"navigate",page:"/packageSub/pages/auth/map",callbackKey:"selectMapItem",category:"TASKS",uiCategory:"native"},checkCard:{jumpMode:"navigate",page:"/packageSub/pages/bank-card/bind?fromTaxLink=true",callbackKey:"checkCardData",category:"TASKS",uiCategory:"native"},wxBill:{jumpMode:"navigate",page:"/packageCoBorrow/pages/increase-quota/wechat-credit",callbackKey:"wxbillRecordId",category:"TASKS",uiCategory:"native"},signDoc:{jumpMode:"navigate",page:"/packageThird/pages/todo/signAndDoc?needCallBack=1",callbackKey:"hasSignDoc",category:"TASKS",uiCategory:"native"},auth_contract:{jumpMode:"navigate",page:"/packageThird/pages/todo-sign/sign",callbackKey:"auth_contract",category:"TASKS",uiCategory:"native"},xinge_authorize:{jumpMode:"navigate",callbackKey:"xinge_auth_data",category:"TASKS",uiCategory:"native"}},...{contact_info:{jumpMode:"subForm",page:Ps,callbackKey:"contact_info",category:"TASKS",uiCategory:"subForm"},business_info:{jumpMode:"subForm",page:Ps,callbackKey:"business_info",category:"TASKS",uiCategory:"subForm"},card_info_auth:{jumpMode:"subForm",page:Ps,callbackKey:"card_info_auth",category:"TASKS",uiCategory:"subForm"},outside_authorize:{jumpMode:"subForm",page:Ps,callbackKey:"outside_authorize",category:"TASKS",uiCategory:"subForm"},subForm:{jumpMode:"subForm",page:Ps,category:"TASKS",uiCategory:"subForm"}},...{taxLink:{jumpMode:"webview",page:Ka,callbackKey:"taxHandleData",category:"TASKS",uiCategory:"h5"},standard_tianxun_paas_auth:{jumpMode:"webview",page:Ka,category:"TASKS",uiCategory:"h5"},tianxun_paas_auth:{jumpMode:"webview",callbackKey:"tianxun_paas_auth",category:"TASKS",uiCategory:"h5"},h5_jump:{jumpMode:"webview",page:Ka,category:"TASKS",uiCategory:"h5"}},...{business_agency:{jumpMode:"inline",callbackKey:"userAllotInfo",category:"inline",uiCategory:"api"},bank_bill_files:{jumpMode:"inline",page:"/packageThird/pages/collect-bill/index",callbackKey:"collect_bill_data",category:"TASKS",uiCategory:"native"},inqure_tax_administartion:{jumpMode:"inline",category:"inline",uiCategory:"api"},re_credit_living:{jumpMode:"inline",callbackKey:"reCreditLiving",category:"CUSTOMER_TASK",uiCategory:"customer"},face_verify_sign:{jumpMode:"inline",callbackKey:"creditApplyFaceSignResult",category:"CUSTOMER_TASK",uiCategory:"customer"},navigate_h5_tax_copy:{jumpMode:"inline",category:"inline",uiCategory:"inline"}},...{company_seal:{jumpMode:"actionSheet",callbackKey:"company_seal_info",actions:[{label:"拍摄",type:"navigate",page:"/packageSub/pages/auth/companySeal/card-photo?cardType=font"},{label:"从手机相册中选择",type:"chooseImage"}],category:"TASKS",uiCategory:"api"}}};let vf={};function pf(){return{...vf}}function hf(e){const t=(e==null?void 0:e.taskType)||"",n=(e==null?void 0:e.taskCategory)||"",s=bo[t];return s?s.uiCategory:n==="CUSTOMER_TASK"?"customer":n==="inline"?"inline":n==="TASKS"?"native":"subForm"}let Rl=null;function mf(){if(!Rl){Rl={};for(const[e,t]of Object.entries(bo))Rl[e]=t.uiCategory}return Rl}function _o(e){return mf()[e]||null}function pn(e,t,n){e.setControlData(t,n,{skipJump:!0})}function gf(e,t){return{key:e.key,type:e.type,label:e.label||e.key,required:e.required===!0,placeholder:e.placeholder||"",disabled:(t==null?void 0:t.disabled)===!0,visible:(t==null?void 0:t.visible)!==!1,rightIcon:df(e.type),hideLabel:ff(e),raw:e}}function ko(e,t,n){return e.groups.map(s=>({key:s.key,title:s.title,items:s.items.filter(l=>!0).map(l=>gf(l,t==null?void 0:t[l.key]))}))}function yf(e,t,n){const s={groups:ko(e,t)};let l=t;return{...s,update(a){if(a&&l){const i=Object.keys(l),r=Object.keys(a);if(i.length===r.length){let o=!1;for(const u of r){const c=l[u],d=a[u];if((c==null?void 0:c.visible)!==(d==null?void 0:d.visible)||(c==null?void 0:c.disabled)!==(d==null?void 0:d.disabled)){o=!0;break}}if(!o)return}}l=a,s.groups=ko(e,a)}}}const Ll={label:{position:"left",width:96,fontSize:16,color:"rgba(0, 0, 0, 0.9)",requiredColor:"#D54941"},colors:{primary:"#0052D9",error:"#D54941",errorBg:"transparent",success:"#2BA471",containerBg:"#F3F3F3",cardBg:"#FFFFFF",divider:"#E7E7E7",icon:"rgba(0, 0, 0, 0.4)"}};({...Ll.colors},{...Ll.label}),{...Ll.colors},{...Ll.label};function bf(e,t){return e==="top"||e==="left"?e:t==="top"||t==="left"?t:"left"}const Os="formUiHostHandlers",_f={71e4:1,81e4:2,82e4:2};function kf(e,t=3){return _f[e]??t}function Co(e,t){if(!(e!=null&&e.length))return[];const n=(t==null?void 0:t.lazy)!==!1,s=(t==null?void 0:t.level)??1,l=(t==null?void 0:t.maxLevel)??3;return e.map(a=>{const i=String(a.adcode),r=kf(i,l),o=s<r&&s<l,u={label:a.name,value:i};return o&&n&&(u.children=!0),u})}function Cf(e){return{province_code:e[0]?String(e[0].value):"",city_code:e[1]?String(e[1].value):"",district_code:e[2]?String(e[2].value):"",town_code:e[3]?String(e[3].value):""}}function So(e,t){if(e)return{mode:"host",fetchRoot:async(s,l)=>(await e(null,{url:s,level:1,path:[]})).map(i=>({...i,children:i.children===!0||Array.isArray(i.children)&&i.children.length?i.children:!0})),loadChild:async(s,l)=>{const a=[...l.path,{value:s.value,label:String(s.label||"")}];return e({value:s.value,label:s.label},{url:l.url,level:a.length+1,path:a})}};const n=t==null?void 0:t._linkageFetcher;return n?{mode:"fetcher",fetchRoot:async(s,l)=>{const a=await n({province_code:"",city_code:"",district_code:""},s);return Co(a.data,{lazy:!0,level:1,maxLevel:l})},loadChild:async(s,l)=>{const a=[...l.path,{value:s.value,label:String(s.label||"")}],i=Cf(a),r=await n(i,l.url);return r.data===null?[]:Co(r.data,{lazy:!0,level:a.length+1,maxLevel:l.maxLevel})}}:{mode:"sample",fetchRoot:async()=>[],loadChild:async()=>[]}}const Sf=["input","textarea","number","idcard","phone","bankCard","select","cascader","search","address","address5","addressPinyin","agreement","date","dateRange","slider","verifyCode","imageUpload","fileUpload","switch","radioGroup","checkboxGroup","stepper","rate"],wf=["custom","signature","task","list"],Tf=new Set(Sf),xf=new Set(wf);function $f(e){return Tf.has(e)}function Af(e){return xf.has(e)}const Mf=new Set(["input","textarea","number","idcard","phone","bankCard"]),Ef=new Set(["address","address5","addressPinyin"]);function Ff(e){if(!$f(e))return Af(e)?{controlId:"_unsupported",type:e,supported:!1,reason:"explicitly_unsupported"}:{controlId:"_unsupported",type:e,supported:!1,reason:"unknown_type"};let t="input-control";return e==="select"?t="select-control":e==="cascader"?t="cascader-control":e==="search"?t="search-control":Ef.has(e)?t="address-control":e==="agreement"?t="agreement-control":e==="date"?t="date-control":e==="dateRange"?t="date-range-control":e==="slider"?t="slider-control":e==="verifyCode"?t="verify-code-control":e==="imageUpload"?t="image-upload-control":e==="fileUpload"?t="file-upload-control":e==="switch"?t="switch-control":e==="radioGroup"?t="radio-group-control":e==="checkboxGroup"?t="checkbox-group-control":e==="stepper"?t="stepper-control":e==="rate"?t="rate-control":Mf.has(e)||(t="input-control"),{controlId:t,type:e,supported:!0,supportedType:e}}const If={allowFreeText:!0};function Df(e){if(Array.isArray(e))return e;if(e&&typeof e=="object"){const t=e;if(Array.isArray(t.data))return t.data;if(Array.isArray(t.list))return t.list;if(t.data&&typeof t.data=="object"&&Array.isArray(t.data.list))return t.data.list}return[]}function Pf(e,t){const n=(t==null?void 0:t.valueCustomKey)||"name";return Df(e).map(s=>{if(s==null)return null;if(typeof s=="string")return{code:s,name:s,raw:{name:s,code:s}};if(typeof s!="object")return null;const l=s,a=String(l[n]??l.name??l.label??""),i=String(l.code??l.value??l.id??a);return!a&&!i?null:{code:i||a,name:a||i,raw:l}}).filter(Boolean)}function Of(e,t){const n={code:e.code,name:e.name},s=e.raw||{};for(const l of t||[])l==="code"||l==="name"||l in s&&(n[l]=s[l]);return n}function Rf(e){const t=(e||"").trim();return t?{name:t,code:t}:""}function Lf(e){return e&&typeof e.allowFreeText=="boolean"?e.allowFreeText:If.allowFreeText}const Nf={maxCount:3};function Vf(e){const t=e==null?void 0:e.maxCount;return typeof t=="number"&&t>0?t:Nf.maxCount}const Ua={countTime:60,maxlength:6,verifyText:"获取验证码"};function Bf(e){const t=e==null?void 0:e.countTime;return typeof t=="number"&&t>0?t:Ua.countTime}function jf(e){const t=e==null?void 0:e.maxlength;return typeof t=="number"&&t>0?t:Ua.maxlength}function Kf(e){const t=e==null?void 0:e.verifyText;return typeof t=="string"&&t.trim()?t.trim():Ua.verifyText}const wo="formUiLayout",Nl={labelAlign:"left",labelWidth:"81px",contentAlign:"left"};function Uf(e,t){if(e==="top")return"top";if(e==="left")return(t==null?void 0:t.labelAlign)==="right"?"right":"left";const n=t==null?void 0:t.labelAlign;return n==="left"||n==="right"||n==="top"?n:Nl.labelAlign}function Hf(e,t){const n=e??(t==null?void 0:t.labelWidth)??Nl.labelWidth;return typeof n=="number"?`${n}px`:String(n)}function Kt(e){const t=String(e||"").trim().toLowerCase();return t==="en"||t.startsWith("en-")||t.startsWith("en_")?"en-US":"zh-CN"}const qf={cancel:"取消",confirm:"确认",close:"关闭",clear:"清空",delete:"删除",done:"完成",searchPlaceholder:"输入关键词快速筛选…",inputPlaceholder:"请输入",selectPlaceholder:"请选择",selectAddressPlaceholder:"请选择省市区",selectRegionTitle:"请选择地区",searchInputPlaceholder:"请输入关键词搜索",verifyCodePlaceholder:"请输入验证码",verifyCodeLabel:"短信验证码",verifyCodeButton:"获取验证码",loadingOptions:"加载选项中…",noOptions:"暂无可选项",loadingRegion:"加载下级地区中…",regionLoadFailed:"加载下级地区失败,可点击重试",searching:"联想检索中…",defaultGroupTitle:"表单分组",trustBarText:"信息采用银行级加密传输,仅用于本次业务审核",groupErrorBadge:e=>`${e} 项待完善`,systemKeyboard:"系统键盘",switchToSoftKeyboard:"切软键盘",switchToSoftKeyboardTitle:"切换回内置安全软键盘",keyboardTapHint:"点击下方按键输入",keyboardTitleIdcard:"身份证安全数字键盘",keyboardBadgeIdcard:"身份证键盘 · X",keyboardTitleDigit:"金额 / 小数数字键盘",keyboardBadgeDigit:"小数键盘 · .",keyboardTitleNumber:"纯数字安全键盘",keyboardBadgeNumber:"纯数字键盘",keyboardTitleDefault:"标准键盘",keyboardHintWithSystem:e=>`${e}(点击可切系统键盘)`,signatureTitle:"电子手写签名",signatureConfirm:"确认签署",signatureHint:"请在下方签名区内使用手指或鼠标正楷签署本人姓名",signatureWatermark:"签名区",signatureClear:"重写签名",signatureReadyTip:"已书写,点击右上角「确认签署」回写表单",signatureEmptyTip:"请先书写签名",signatureDoneName:"已手写电子签名",signatureAltPreview:"电子签名预览",signatureAltSigned:"已签署签名",taskGoDefault:"去办理",taskGoSignature:"去签名",taskGoMap:"去选点",taskCompleted:"已完成",agreementDetailTitle:"协议详情",agreementDefaultText:"请阅读并同意相关协议",agreementChecked:"已阅读并同意",agreementUnchecked:"未勾选",dateStart:"开始日期",dateEnd:"结束日期",dateTo:"至",dateLongTerm:"长期",dateLongTermValue:"长期",dateRangeBounds:(e,t)=>`可选范围:${e} ~ ${t}`,dateUnlimited:"不限",dateYearHead:"年",dateMonthHead:"月",dateDayHead:"日",dateYearOption:e=>`${e}年`,dateMonthOption:e=>`${e}月`,dateDayOption:e=>`${e}日`,datePlaceholderDay:"请选择日期",datePlaceholderMonth:"请选择年月",datePlaceholderYear:"请选择年份",uploadImageAlt:"已上传",uploadAddText:"上传资料",uploadLightboxAlt:"图片预览",uploadFileAdd:e=>`+ 选择附件(单文件 ≤ ${e}MB)`,uploadGuardFallback:"文件不符合上传要求",switchOn:"已开启",switchOff:"未开启",mapPicker:"地图选点",minSelectError:e=>`至少需选择 ${e} 项`,maxSelectError:e=>`最多只能选择 ${e} 项`,listEmpty:"暂无条目,点击下方按钮添加",listItemTitle:e=>`第 ${e} 项`,listAddDefault:"+ 添加一条",listMinError:(e,t)=>`请至少填写 ${e} 条${t||"记录"}`,listSubRequired:e=>`请完善${e}`,listSubRegex:e=>`${e}格式有误`,listSubDuplicate:(e,t)=>`${e}不能与第 ${t} 项重复`,reviewEmpty:"未填写",reviewNotUploaded:"未上传",reviewNoItems:"暂无条目",reviewReveal:"查看原文",reviewHide:"隐藏脱敏",fallbackControl:e=>`扩展控件 (${e})`,valIdcardFormat:"请输入18位有效身份证号",valIdcardBirthInvalid:"身份证出生日期不合法",valIdcardBirthNonexistent:"身份证出生日期不存在",valIdcardChecksum:"身份证校验位不正确,请核对末位数字或X",valBankCardLength:"请输入15至19位有效银行卡号",valBankCardLuhn:"银行卡号校验未通过,请核对卡号是否输错",valMobileInvalid:"请输入11位有效中国大陆手机号",valMobileRequiredBeforeCode:"请先填写有效的手机号再获取验证码",valNumberInvalid:"请输入有效数值",valNumberNegative:"数值不能为负数",valNumberMin:e=>`数值不能小于 ${e}`,valNumberMax:e=>`数值不能大于 ${e}`,valDateBeforeMin:e=>`开始日期不能早于 ${e}`,valDateNoLongTerm:"该日期区间不支持长期有效",valDateAfterMax:e=>`结束日期不能晚于 ${e}`,valDateEndBeforeStart:"结束日期不能早于开始日期",valFileSizeExceeded:e=>`单个文件不能超过 ${e}MB`,valFileTypeNotAllowed:e=>`仅支持以下格式:${e}`},Wf={cancel:"Cancel",confirm:"Confirm",close:"Close",clear:"Clear",delete:"Remove",done:"Done",searchPlaceholder:"Filter options…",inputPlaceholder:"Enter value",selectPlaceholder:"Select",selectAddressPlaceholder:"Select region",selectRegionTitle:"Select Region",searchInputPlaceholder:"Type keyword to search",verifyCodePlaceholder:"Enter code",verifyCodeLabel:"Verification Code",verifyCodeButton:"Send Code",loadingOptions:"Loading options…",noOptions:"No options available",loadingRegion:"Loading sub-regions…",regionLoadFailed:"Failed to load regions. Tap to retry.",searching:"Searching…",defaultGroupTitle:"Section",trustBarText:"Encrypted end-to-end for verification only",groupErrorBadge:e=>`${e} issue${e>1?"s":""}`,systemKeyboard:"System KB",switchToSoftKeyboard:"Keypad",switchToSoftKeyboardTitle:"Switch to built-in secure keypad",keyboardTapHint:"Tap keys below to enter",keyboardTitleIdcard:"Secure ID Keypad",keyboardBadgeIdcard:"ID Keypad · X",keyboardTitleDigit:"Decimal Keypad",keyboardBadgeDigit:"Decimal · .",keyboardTitleNumber:"Secure Numeric Keypad",keyboardBadgeNumber:"Numeric Keypad",keyboardTitleDefault:"Standard Keyboard",keyboardHintWithSystem:e=>`${e} (tap for system keyboard)`,signatureTitle:"Electronic Signature",signatureConfirm:"Sign & Save",signatureHint:"Sign your full name in the box below using finger or mouse",signatureWatermark:"Sign Here",signatureClear:"Clear",signatureReadyTip:'Signed — tap "Sign & Save" to apply',signatureEmptyTip:"Please draw your signature first",signatureDoneName:"Signed Electronically",signatureAltPreview:"Signature preview",signatureAltSigned:"Signed signature",taskGoDefault:"Start",taskGoSignature:"Sign",taskGoMap:"Pick Location",taskCompleted:"Completed",agreementDetailTitle:"Agreement Details",agreementDefaultText:"Please read and accept the agreement",agreementChecked:"Accepted",agreementUnchecked:"Not accepted",dateStart:"Start Date",dateEnd:"End Date",dateTo:"to",dateLongTerm:"Long-term",dateLongTermValue:"long_term",dateRangeBounds:(e,t)=>`Range: ${e} – ${t}`,dateUnlimited:"Any",dateYearHead:"Year",dateMonthHead:"Month",dateDayHead:"Day",dateYearOption:e=>`${e}`,dateMonthOption:e=>String(e).padStart(2,"0"),dateDayOption:e=>String(e).padStart(2,"0"),datePlaceholderDay:"Select date",datePlaceholderMonth:"Select month",datePlaceholderYear:"Select year",uploadImageAlt:"Uploaded",uploadAddText:"Upload",uploadLightboxAlt:"Image preview",uploadFileAdd:e=>`+ Attach File (≤ ${e}MB each)`,uploadGuardFallback:"File does not meet upload requirements",switchOn:"On",switchOff:"Off",mapPicker:"Map Pin",minSelectError:e=>`Select at least ${e} option${e>1?"s":""}`,maxSelectError:e=>`Select at most ${e} option${e>1?"s":""}`,listEmpty:"No items yet. Tap the button below to add one.",listItemTitle:e=>`Item #${e}`,listAddDefault:"+ Add Item",listMinError:(e,t)=>`Please add at least ${e} ${t||"entry"}`,listSubRequired:e=>`Please complete ${e}`,listSubRegex:e=>`Invalid format for ${e}`,listSubDuplicate:(e,t)=>`${e} duplicates item #${t}`,reviewEmpty:"Not provided",reviewNotUploaded:"Not uploaded",reviewNoItems:"No items",reviewReveal:"Show",reviewHide:"Mask",fallbackControl:e=>`Custom Control (${e})`,valIdcardFormat:"Please enter a valid 18-digit ID number",valIdcardBirthInvalid:"Invalid birth date in ID number",valIdcardBirthNonexistent:"Non-existent calendar date in ID number",valIdcardChecksum:"ID checksum mismatch — please check the last character",valBankCardLength:"Please enter a valid 15–19 digit card number",valBankCardLuhn:"Card number failed Luhn check — please verify digits",valMobileInvalid:"Please enter a valid phone number",valMobileRequiredBeforeCode:"Please enter a valid phone number before requesting a code",valNumberInvalid:"Please enter a valid number",valNumberNegative:"Value cannot be negative",valNumberMin:e=>`Value must be at least ${e}`,valNumberMax:e=>`Value must be at most ${e}`,valDateBeforeMin:e=>`Start date cannot be earlier than ${e}`,valDateNoLongTerm:"Long-term option is not allowed for this field",valDateAfterMax:e=>`End date cannot be later than ${e}`,valDateEndBeforeStart:"End date cannot be earlier than start date",valFileSizeExceeded:e=>`Each file must be under ${e}MB`,valFileTypeNotAllowed:e=>`Allowed formats: ${e}`};function wt(e){return Kt(e)==="en-US"?Wf:qf}const Gf=new Set(["address","address5","addressPinyin"]),Vl={signature:"手写签名",business_agency:"业务办理机构",taxLink:"税务授权",taxLInk:"税务授权",tianxun_paas_auth:"天讯授权",standard_tianxun_paas_auth:"天讯授权",re_credit_living:"活体检测",face_verify_sign:"人脸核身签署",company_seal:"公司印章",houseDataSource:"房产数据源授权",owner_list:"关联方信息",navigate_h5_tax_copy:"复制税务链接",inqure_tax_administartion:"税务查询",h5_jump:"H5 跳转",xinge_authorize:"信鸽授权",business_info:"经营信息",contact_info:"联系人信息",card_info_auth:"身份证认证",outside_authorize:"外部授权",subForm:"子表单",checkCard:"绑卡验卡",wxBill:"微信账单",signDoc:"签章签署",auth_contract:"授权签署",bank_bill_files:"流水采集",map:"地图选点"},zf=new Set(Object.keys(Vl).filter(e=>e!=="map"));function Ha(e){return e==="re_credit_living"||e==="face_verify_sign"?"CUSTOMER_TASK":e==="navigate_h5_tax_copy"?"inline":"TASKS"}function Yf(e){if(!e)return null;const t=String(e.type||"");if(Gf.has(t))return null;const n=e.props||{},s=typeof n.taskType=="string"?n.taskType.trim():"",l=typeof n.taskCategory=="string"?n.taskCategory.trim():"",a=String(e.key||"");if(t==="task"||t==="signature"){const i=s||(t==="signature"?"signature":a||"subForm");return{isTask:!0,taskType:i,taskCategory:l||Ha(i),label:Vl[i]||"外跳任务"}}if(s||l){const i=s||a||"subForm";return{isTask:!0,taskType:i,taskCategory:l||Ha(i),label:Vl[i]||"外跳任务"}}return a&&zf.has(a)?{isTask:!0,taskType:a,taskCategory:Ha(a),label:Vl[a]||"外跳任务"}:null}function To(e){if(!e)return!1;const t=e.value;return t===!0?!0:typeof t=="string"?t.trim().length>0:typeof t=="number"?Number.isFinite(t):Array.isArray(t)?t.length>0:t&&typeof t=="object"?Object.values(t).some(n=>n!=null&&String(n).trim().length>0):!!(e.showValue&&String(e.showValue).trim())}function Jf(e,t,n){const s=wt(n);return t!=null&&t.showValue&&String(t.showValue).trim()?String(t.showValue).trim():t!=null&&t.value&&typeof t.value=="object"&&t.value.name&&String(t.value.name).trim()?String(t.value.name).trim():To(t)?s.taskCompleted:e.taskType==="signature"?s.taskGoSignature:e.taskType==="map"?s.taskGoMap:s.taskGoDefault}function Xf(e){var n,s,l;const t=String(((n=e==null?void 0:e.props)==null?void 0:n.fields)||((l=(s=e==null?void 0:e.extra)==null?void 0:s.nodeProps)==null?void 0:l.fields)||"").trim().toLowerCase();return t==="year"?{granularity:"year",tdMode:"year",format:"YYYY",nativeFields:"year",placeholder:(e==null?void 0:e.placeholder)||"请选择年份"}:t==="month"?{granularity:"month",tdMode:"month",format:"YYYY-MM",nativeFields:"month",placeholder:(e==null?void 0:e.placeholder)||"请选择年月"}:{granularity:"day",tdMode:"date",format:"YYYY-MM-DD",nativeFields:"day",placeholder:(e==null?void 0:e.placeholder)||"请选择日期"}}function Zf(e){var l,a,i,r,o,u;const t=[],n=(l=e==null?void 0:e.props)==null?void 0:l.agreements;if(Array.isArray(n)){for(const c of n)if(typeof c=="string"&&c.trim())t.push({title:c.trim()});else if(c&&typeof c=="object"){const d=String(c.title||c.name||c.label||"").trim();d&&t.push({title:d,url:c.url||c.link?String(c.url||c.link):void 0,content:c.content?String(c.content):void 0})}}const s=(i=(a=e==null?void 0:e.extra)==null?void 0:a.nodeProps)==null?void 0:i.agreementlist;if(Array.isArray(s)){for(const c of s)if(typeof c=="string"&&c.trim())t.push({title:c.trim()});else if(c&&typeof c=="object"){const d=String(c.title||c.name||c.label||"").trim();d&&t.push({title:d,url:c.url||c.link?String(c.url||c.link):void 0,content:c.content?String(c.content):void 0})}}else typeof s=="string"&&s.trim()&&t.length===0&&((r=e==null?void 0:e.props)!=null&&r.agreementLink&&typeof e.props.agreementLink=="string"?t.push({title:"相关服务协议",url:e.props.agreementLink}):t.push({title:"相关服务协议",content:(e==null?void 0:e.label)||((o=e==null?void 0:e.props)==null?void 0:o.guideText)||"请阅读并同意相关服务协议。"}));return(u=e==null?void 0:e.props)!=null&&u.agreementLink&&typeof e.props.agreementLink=="string"&&t.length===0&&t.push({title:"查看协议",url:e.props.agreementLink}),t}function xo(e,t){var d,v;const n=((d=e==null?void 0:e.extra)==null?void 0:d.nodeProps)||{},s=Object.prototype.hasOwnProperty.call(n,"true_value")&&n.true_value!==void 0,l=Object.prototype.hasOwnProperty.call(n,"false_value")&&n.false_value!==void 0,a=s||l,i=s?n.true_value:!0,r=t&&"defaultFalseValue"in t?t.defaultFalseValue:!1,o=l?n.false_value:r,u=Zf(e),c=(e==null?void 0:e.label)&&String(e.label).trim()||((v=e==null?void 0:e.props)==null?void 0:v.guideText)&&String(e.props.guideText).trim()||"请阅读并同意相关协议";return{hasCustomValues:a,trueValue:i,falseValue:o,displayLabel:c,agreements:u,hasAgreementLinks:u.length>0}}function $o(e,t){return t.hasCustomValues&&(e===t.trueValue||t.trueValue!=null&&e!=null&&e!==""&&String(e)===String(t.trueValue))?!0:e===!0||e==="true"||e==="1"||e===1}const qa=[{label:"黑龙江省",value:"230000",children:[{label:"哈尔滨市",value:"230100",children:[{label:"道里区",value:"230102"},{label:"南岗区",value:"230103"},{label:"道外区",value:"230104"},{label:"平房区",value:"230108"}]},{label:"齐齐哈尔市",value:"230200",children:[{label:"龙沙区",value:"230202"},{label:"建华区",value:"230203"}]}]},{label:"北京市",value:"110000",children:[{label:"北京市",value:"110100",children:[{label:"东城区",value:"110101"},{label:"西城区",value:"110102"},{label:"朝阳区",value:"110105"},{label:"海淀区",value:"110108"}]}]}],Qf=["哈尔滨银行股份有限公司","哈尔滨工业大学","黑龙江大学","中国移动通信集团黑龙江有限公司","国家电网有限公司黑龙江省电力有限公司","哈尔滨市第一医院"],Ke=(e,t)=>{const n=e.__vccOpts||e;for(const[s,l]of t)n[s]=l;return n};function ev(e,t){var l;if(!e||!t)return null;if(t.key&&e[t.key])return e[t.key];if(t.type&&e[t.type])return e[t.type];const n=typeof t.render=="string"?t.render:"";if(n&&e[n])return e[n];const s=typeof((l=t.props)==null?void 0:l.customControl)=="string"?t.props.customControl:"";return s&&e[s]?e[s]:null}const tv=[{id:"default",label:"金融蓝",brandColor:"#0F52BA",brandSoft:"#EEF4FF"},{id:"bank-red",label:"银行红",brandColor:"#C81E32",brandSoft:"#FEF2F2"},{id:"gov-navy",label:"政务深蓝",brandColor:"#1E3A8A",brandSoft:"#EFF6FF"},{id:"emerald",label:"普惠青绿",brandColor:"#047857",brandSoft:"#ECFDF5"}],Dt={"fin-minimal":{id:"fin-minimal",name:"A · 现代金融极简风",shortName:"A 金融极简",tagline:"大留白、微标签上置、零折行、呼吸感卡片与底部抽屉",inspiration:"Apple HIG Inset Grouped + Stripe / Wise",defaultLabelAlign:"top",vars:{"--fs-page-bg":"#F5F6FA","--fs-card-bg":"#FFFFFF","--fs-card-radius":"16px","--fs-card-border":"1px solid rgba(15, 23, 42, 0.06)","--fs-card-shadow":"0 2px 12px rgba(15, 23, 42, 0.035)","--fs-brand":"#0F52BA","--fs-brand-soft":"#EEF4FF","--fs-brand-ring":"rgba(15, 82, 186, 0.14)","--fs-error":"#DC2626","--fs-error-soft":"#FEF2F2","--fs-warning":"#D97706","--fs-warning-soft":"#FFFBEB","--fs-success":"#059669","--fs-success-soft":"#ECFDF5","--fs-text":"#0F172A","--fs-text-sub":"#475569","--fs-text-muted":"#94A3B8","--fs-divider":"rgba(15, 23, 42, 0.07)","--fs-input-bg":"transparent","--fs-input-border":"transparent","--fs-input-radius":"0px","--fs-field-py":"14px"}},"clean-outline":{id:"clean-outline",name:"B · 极简线框高效风",shortName:"B 极简线框",tagline:"独立细框输入域 + 聚焦蓝环,高信息密度,PC/移动一致",inspiration:"Stripe Elements + shadcn / Linear",defaultLabelAlign:"top",vars:{"--fs-page-bg":"#F8FAFC","--fs-card-bg":"#FFFFFF","--fs-card-radius":"12px","--fs-card-border":"1px solid #E2E8F0","--fs-card-shadow":"0 1px 2px rgba(15, 23, 42, 0.04)","--fs-brand":"#2563EB","--fs-brand-soft":"#EFF6FF","--fs-brand-ring":"rgba(37, 99, 235, 0.16)","--fs-error":"#DC2626","--fs-error-soft":"#FEF2F2","--fs-warning":"#D97706","--fs-warning-soft":"#FFFBEB","--fs-success":"#059669","--fs-success-soft":"#ECFDF5","--fs-text":"#09090B","--fs-text-sub":"#3F3F46","--fs-text-muted":"#A1A1AA","--fs-divider":"#F1F5F9","--fs-input-bg":"#FFFFFF","--fs-input-border":"#CBD5E1","--fs-input-radius":"8px","--fs-field-py":"10px"}},"bank-card":{id:"bank-card",name:"C · 国民银行卡片风",shortName:"C 国民银行",tagline:"左粗标右对齐、安全加密信任背书、大触控热区、零学习成本",inspiration:"Vant 4 Inset + 招行 / 支付宝金融表单",defaultLabelAlign:"left",showTrustBar:!0,vars:{"--fs-page-bg":"#F4F5F7","--fs-card-bg":"#FFFFFF","--fs-card-radius":"14px","--fs-card-border":"1px solid rgba(0, 0, 0, 0.04)","--fs-card-shadow":"0 2px 8px rgba(0, 0, 0, 0.03)","--fs-brand":"#1677FF","--fs-brand-soft":"#E6F4FF","--fs-brand-ring":"rgba(22, 119, 255, 0.15)","--fs-error":"#FF4D4F","--fs-error-soft":"#FFF2F0","--fs-warning":"#FA8C16","--fs-warning-soft":"#FFF7E6","--fs-success":"#00B578","--fs-success-soft":"#E8FFF3","--fs-text":"#111827","--fs-text-sub":"#4B5563","--fs-text-muted":"#9CA3AF","--fs-divider":"#F0F1F3","--fs-input-bg":"transparent","--fs-input-border":"transparent","--fs-input-radius":"0px","--fs-field-py":"14px"}}},nv=[Dt["fin-minimal"],Dt["clean-outline"],Dt["bank-card"]];function Ao(e,t){const n=e.trim().match(/^#([0-9a-fA-F]{6})$/);if(!n)return`rgba(15, 82, 186, ${t})`;const s=parseInt(n[1],16),l=s>>16&255,a=s>>8&255,i=s&255;return`rgba(${l}, ${a}, ${i}, ${t})`}function Mo(e,t){const s={...(Dt[e]||Dt["fin-minimal"]).vars};if(!t)return s;if(t.brandColor&&t.brandColor.trim()){const l=t.brandColor.trim();s["--fs-brand"]=l,s["--fs-brand-soft"]=t.brandSoft||Ao(l,.09),s["--fs-brand-ring"]=Ao(l,.16)}else t.brandSoft&&(s["--fs-brand-soft"]=t.brandSoft);return t.cardRadius&&(s["--fs-card-radius"]=t.cardRadius),t.density==="compact"?s["--fs-field-py"]="9px":t.density==="comfortable"&&(s["--fs-field-py"]="15px"),s}function sv(e,t){return typeof(t==null?void 0:t.showTrustBar)=="boolean"?t.showTrustBar:!!(Dt[e]||Dt["fin-minimal"]).showTrustBar}function Eo(e){return e===!0?!0:Array.isArray(e)?e.length>0:e&&typeof e=="object"?Object.values(e).some(t=>t!=null&&String(t).trim()!==""):typeof e=="string"?e.trim()!=="":typeof e=="number"?Number.isFinite(e):!1}function lv(e,t){let n=0,s=0,l=0,a=0;const i=[],r=[];for(const u of e||[]){let c=0,d=0,v=0,A=0;const x=[];for(const M of u.items||[]){const w=t==null?void 0:t[M.key];if(w&&w.visible===!1)continue;c+=1,n+=1;const O=Eo(w==null?void 0:w.value);O&&(d+=1,s+=1),(typeof(w==null?void 0:w.required)=="boolean"?w.required:M.required===!0||Array.isArray(M.rules)&&M.rules.some(b=>(b==null?void 0:b.type)==="required"))&&(v+=1,l+=1,O?(A+=1,a+=1):(x.push(M.key),i.push(M.key)))}r.push({groupKey:u.key,title:u.title||u.key,total:c,filled:d,requiredTotal:v,requiredFilled:A,missingRequiredKeys:x})}const o=n>0?Math.round(s/n*100):0;return{total:n,filled:s,percent:o,requiredTotal:l,requiredFilled:a,missingRequiredKeys:i,firstMissingRequiredKey:i[0]||null,groups:r}}function av(e,t){const n=String(e??"").trim();if(!n||!/^-?\d+(\.\d+)?$/.test(n))return"";const s=Number(n);if(!Number.isFinite(s)||s<=0)return"";const l=String(t||"");if(!/金额|额度|收入|资产|负债|流水|租金|年薪|月薪|估值|房价|贷款|元/.test(l))return"";const i=s.toLocaleString("zh-CN",{maximumFractionDigits:2});if(/万元/.test(l))return`约 ${i} 万元`;if(s>=1e4){const r=(s/1e4).toLocaleString("zh-CN",{maximumFractionDigits:2});return`千分位:${i}(约 ${r} 万)`}return`千分位:${i}`}function iv(e){var l;if(!e)return"text";const t=String(e.type||"").toLowerCase(),n=String(((l=e.props)==null?void 0:l.keyboardType)||"").toLowerCase(),s=String(e.key||"").toLowerCase();return t==="idcard"||n==="idcard"?"idcard":n==="digit"||t==="number"?"digit":t==="phone"||t==="bankcard"||t==="verifycode"||n==="number"?"number":/id_?card|cert_?no/.test(s)&&t==="input"?"idcard":"text"}function rv(e,t="auto"){return e==="text"||t==="native-only"?!1:t==="always-custom"?!0:e==="idcard"}function Fo(e,t){const n=wt(t);switch(e){case"idcard":return{title:n.keyboardTitleIdcard,badge:n.keyboardBadgeIdcard,extraKey:"X"};case"digit":return{title:n.keyboardTitleDigit,badge:n.keyboardBadgeDigit,extraKey:"."};case"number":return{title:n.keyboardTitleNumber,badge:n.keyboardBadgeNumber,extraKey:""};default:return{title:n.keyboardTitleDefault,badge:"",extraKey:""}}}function Io(e,t,n){const s=String(e??""),l=typeof(n==null?void 0:n.maxlength)=="number"&&n.maxlength>0?n.maxlength:void 0;if(t==="idcard"){const a=s.replace(/[^0-9xX]/g,"").toUpperCase();let i="";for(let r=0;r<a.length;r++){const o=a[r];if(o==="X"?i.length===17&&(i+="X"):i+=o,i.length>=(l??18))break}return i}if(t==="number"){const a=s.replace(/\D/g,"");return l?a.slice(0,l):a}if(t==="digit"){const a=typeof(n==null?void 0:n.decimalPlaces)=="number"?n.decimalPlaces:2;let i=s.replace(/[^0-9.]/g,"");i.startsWith(".")&&(i=`0${i}`);const r=i.indexOf(".");if(r>=0){const o=i.slice(0,r),u=i.slice(r+1).replace(/\./g,"").slice(0,Math.max(0,a));i=`${o}.${u}`}return l?i.slice(0,l):i}return l?s.slice(0,l):s}function Do(e,t){const n=String(e??"").trim();if(!n||!t)return n;const s=String(t.type||"").toLowerCase(),l=String(t.key||"").toLowerCase();if(s==="phone"||/phone|mobile/.test(l)&&/^1\d{3,10}$/.test(n)){const a=n.replace(/\D/g,"").slice(0,11);return a.length<=3?a:a.length<=7?`${a.slice(0,3)} ${a.slice(3)}`:`${a.slice(0,3)} ${a.slice(3,7)} ${a.slice(7)}`}if(s==="bankcard"||/bank_?card/.test(l))return n.replace(/\D/g,"").replace(/(.{4})(?=.)/g,"$1 ");if(s==="idcard"||/id_?card|cert_?no/.test(l)){const a=n.replace(/\s+/g,"").toUpperCase();return a.length<=6?a:a.length<=14?`${a.slice(0,6)} ${a.slice(6)}`:`${a.slice(0,6)} ${a.slice(6,14)} ${a.slice(14)}`}return n}function ov(e,t){return t==="text"?e:String(e??"").replace(/\s+/g,"")}function cv(e){if(!e)return!1;const t=String(e.type||"").toLowerCase(),n=String(e.key||"").toLowerCase(),s=String(e.label||"");return!!(t==="phone"||t==="idcard"||t==="bankcard"||/phone|mobile|id_?card|cert_?no|bank_?card/.test(n)||/手机号|联系电话|身份证|证件号|银行卡/.test(s))}function uv(e,t){const n=String(e??"").trim().replace(/\s+/g,"");if(!n||!t)return n;const s=String(t.type||"").toLowerCase(),l=String(t.key||"").toLowerCase(),a=String(t.label||"");return s==="phone"||/phone|mobile/.test(l)||/手机|电话/.test(a)?n.length>=7?`${n.slice(0,3)}****${n.slice(-4)}`:n:s==="idcard"||/id_?card|cert_?no/.test(l)||/身份证|证件号/.test(a)?n.length>=10?`${n.slice(0,4)}${"*".repeat(Math.max(4,n.length-8))}${n.slice(-4)}`:n:(s==="bankcard"||/bank_?card/.test(l)||/银行卡/.test(a))&&n.length>=8?`${n.slice(0,4)} **** **** ${n.slice(-4)}`:n}function Po(e,t){const n=e==null?void 0:e[t];return n&&typeof n=="object"?String(n.code??n.name??"").trim():n==null?"":String(n).trim()}function Oo(e,t,n){var x,M;const s=wt(n),l=Array.isArray(t)?t:[],a=e.subItems||((x=e.props)==null?void 0:x.subItems)||[],i=e.listMeta||((M=e.props)==null?void 0:M.listMeta)||{},r={};let o="",u=null;const c=typeof i.minItems=="number"?i.minItems:0;l.length<c&&(o=s.listMinError(c,e.label||""));const d=(w,O,y)=>{r[w]||(r[w]={}),r[w][O]||(r[w][O]=y,u||(u={rowIndex:w,subKey:O}))};for(let w=0;w<l.length;w++){const O=l[w]||{};for(const y of a){const b=Po(O,y.key),C=Array.isArray(y.rules)?y.rules:[],B=C.find(D=>D.type==="required");if((y.required||B)&&!b){d(w,y.key,(B==null?void 0:B.message)||s.listSubRequired(y.label||y.key));continue}if(b){for(const D of C)if(D.type==="regex"&&D.regex)try{if(!new RegExp(D.regex).test(b)){d(w,y.key,D.message||s.listSubRegex(y.label||y.key));break}}catch{}}}}const v=Array.isArray(i.uniqueKeys)&&i.uniqueKeys.length>0?i.uniqueKeys:a.filter(w=>w.type==="phone"||w.type==="idcard"||/phone|mobile|id_?card/i.test(w.key)).map(w=>w.key);for(const w of v){const O=new Map,y=a.find(b=>b.key===w);for(let b=0;b<l.length;b++){const C=Po(l[b],w);C&&(O.has(C)?d(b,w,s.listSubDuplicate((y==null?void 0:y.label)||w,O.get(C)+1)):O.set(C,b))}}return{valid:!o&&Object.keys(r).length===0,listError:o,rowErrors:r,firstErrorPath:u}}function dv(){const e=[],t={};let n=0,s=0,l=0;const a=u=>(t[u]||(t[u]={fieldKey:u,focusCount:0,totalDwellMs:0,errorCount:0}),t[u]);return{events:e,record:u=>{if(e.push(u),u.fieldKey){const c=a(u.fieldKey);u.type==="field_focus"&&(c.focusCount+=1),u.type==="field_blur"&&typeof u.durationMs=="number"&&u.durationMs>=0&&(c.totalDwellMs+=u.durationMs),u.type==="field_error"&&(c.errorCount+=1,u.errorMessage&&(c.lastError=u.errorMessage))}u.type==="step_change"&&(l+=1),u.type==="submit_blocked"&&(n+=1),u.type==="submit_passed"&&(s+=1)},getSummary:()=>{const u=Object.values(t).filter(c=>c.errorCount>0).sort((c,d)=>d.errorCount-c.errorCount).slice(0,5);return{totalEvents:e.length,submitBlockedCount:n,submitPassedCount:s,stepChanges:l,topErrorFields:u,byField:{...t}}},clear:()=>{e.length=0;for(const u of Object.keys(t))delete t[u];n=0,s=0,l=0}}}const fv=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2],vv=["1","0","X","9","8","7","6","5","4","3","2"];function pv(e,t){const n=wt(t==null?void 0:t.locale),s=String(e??"").trim().replace(/\s+/g,"").toUpperCase();if(!s)return{valid:!0};if(!/^[1-9]\d{16}[\dX]$/.test(s))return{valid:!1,reason:n.valIdcardFormat};const l=Number(s.slice(6,10)),a=Number(s.slice(10,12)),i=Number(s.slice(12,14));if(l<1900||l>2099||a<1||a>12||i<1||i>31)return{valid:!1,reason:n.valIdcardBirthInvalid};const r=new Date(l,a-1,i);if(r.getFullYear()!==l||r.getMonth()!==a-1||r.getDate()!==i)return{valid:!1,reason:n.valIdcardBirthNonexistent};let o=0;for(let c=0;c<17;c++)o+=Number(s[c])*fv[c];const u=vv[o%11];return s[17]!==u?{valid:!1,reason:n.valIdcardChecksum}:{valid:!0}}function hv(e,t){const n=wt(t==null?void 0:t.locale),s=String(e??"").trim().replace(/\s+/g,"");if(!s)return{valid:!0};if(!/^\d{15,19}$/.test(s))return{valid:!1,reason:n.valBankCardLength};let l=0,a=!1;for(let i=s.length-1;i>=0;i--){let r=Number(s[i]);a&&(r*=2,r>9&&(r-=9)),l+=r,a=!a}return l%10!==0?{valid:!1,reason:n.valBankCardLuhn}:{valid:!0}}function Ro(e,t){const n=wt(t==null?void 0:t.locale),s=String(e??"").trim().replace(/[\s-]/g,"");return s?t!=null&&t.allowInternational&&/^\+\d{7,15}$/.test(s)?{valid:!0}:/^1[3-9]\d{9}$/.test(s)?{valid:!0}:{valid:!1,reason:n.valMobileInvalid}:{valid:!0}}function mv(e,t){const n=wt(t==null?void 0:t.locale),s=String(e??"").trim();if(!s)return{valid:!0};const l=Number(s);return Number.isFinite(l)?(t==null?void 0:t.allowNegative)===!1&&l<0?{valid:!1,reason:n.valNumberNegative}:typeof(t==null?void 0:t.min)=="number"&&l<t.min?{valid:!1,reason:n.valNumberMin(t.min)}:typeof(t==null?void 0:t.max)=="number"&&l>t.max?{valid:!1,reason:n.valNumberMax(t.max)}:{valid:!0}:{valid:!1,reason:n.valNumberInvalid}}function gv(e,t){const n=wt(t==null?void 0:t.locale);if(!e)return{valid:!0};let s="",l="";if(Array.isArray(e))s=String(e[0]||"").trim(),l=String(e[1]||"").trim();else if(typeof e=="object"){const i=e;s=String(i.start||"").trim(),l=String(i.end||"").trim()}if(!s&&!l)return{valid:!0};if(s&&(t!=null&&t.minDate)&&s<t.minDate)return{valid:!1,reason:n.valDateBeforeMin(t.minDate)};const a=l==="long_term"||l==="长期"||l==="Long-term";return a&&(t==null?void 0:t.allowLongTerm)===!1?{valid:!1,reason:n.valDateNoLongTerm}:l&&!a&&(t!=null&&t.maxDate)&&l>t.maxDate?{valid:!1,reason:n.valDateAfterMax(t.maxDate)}:s&&l&&!a&&s>l?{valid:!1,reason:n.valDateEndBeforeStart}:{valid:!0}}function yv(e,t){const n=wt(t==null?void 0:t.locale),s=typeof(t==null?void 0:t.maxSizeMB)=="number"&&t.maxSizeMB>0?t.maxSizeMB:10;if(typeof e.size=="number"&&e.size>s*1024*1024)return{valid:!1,reason:n.valFileSizeExceeded(s)};if(Array.isArray(t==null?void 0:t.accept)&&t.accept.length>0&&e.name){const l=e.name.toLowerCase(),a=t.accept.map(r=>r.toLowerCase().trim()).filter(Boolean);if(!a.some(r=>r.startsWith(".")?l.endsWith(r):r.endsWith("/*")&&e.type?e.type.toLowerCase().startsWith(r.slice(0,-1)):l.endsWith(`.${r}`)))return{valid:!1,reason:n.valFileTypeNotAllowed(a.join(" / "))}}return{valid:!0}}function Lo(e,t,n){if(t==null||t==="")return{valid:!0};const s=String(e.type||""),l=e.props||{};return s==="idcard"||l.validateAlgorithm==="cn-idcard"?pv(String(t),{locale:n}):s==="bankCard"||l.validateAlgorithm==="luhn"?hv(String(t),{locale:n}):s==="phone"||l.validateAlgorithm==="cn-mobile"?Ro(String(t),{allowInternational:!!l.allowInternational,locale:n}):s==="number"||s==="stepper"?mv(t,{min:typeof l.min=="number"?l.min:void 0,max:typeof l.max=="number"?l.max:void 0,allowNegative:l.allowNegative,locale:n}):s==="dateRange"?gv(t,{minDate:l.minDate,maxDate:l.maxDate,allowLongTerm:l.allowLongTerm,locale:n}):{valid:!0}}const Wa=Symbol("formRenderModernSkin"),No=Symbol("formRenderModernThemeOverride"),Vo=Symbol("formRenderModernCollapsible"),Bo=Symbol("formRenderModernKeyboardPolicy"),jo=Symbol("formRenderModernReadonly"),Ko=Symbol("formRenderModernTelemetry"),ts=Symbol("formRenderModernLocale"),bv=Symbol("formRenderModernCustomControls"),_v=["aria-label"],kv={class:"fs-sheet__header"},Cv={class:"fs-sheet__title"},Sv={key:1,class:"fs-sheet__spacer"},wv={key:0,class:"fs-sheet__search-wrap"},Tv=["value","placeholder"],xv={class:"fs-sheet__body"},Rs=Ke(Pe({__name:"ModernBottomSheet",props:{visible:{type:Boolean},title:{},confirmText:{},cancelText:{},showConfirm:{type:Boolean},searchable:{type:Boolean},searchPlaceholder:{}},emits:["update:visible","confirm","cancel","search"],setup(e,{emit:t}){const n=e,s=je(ts,"zh-CN"),l=E(()=>wt(Kt(Ee(s)))),a=t,i=H("");ut(()=>n.visible,d=>{d||(i.value="",a("search",""))});function r(d){const v=d.target.value;i.value=v,a("search",v)}function o(){a("update:visible",!1),a("cancel")}function u(){a("confirm")}const c=E(()=>n.showConfirm===!0);return(d,v)=>(p(),st(fl,{to:"body"},[e.visible?(p(),h("div",{key:0,class:"fs-sheet-mask",onClick:lt(o,["self"])},[f("div",{class:"fs-sheet",role:"dialog","aria-label":e.title},[v[0]||(v[0]=f("div",{class:"fs-sheet__handle"},null,-1)),f("div",kv,[f("button",{type:"button",class:"fs-sheet__action",onClick:o},k(e.cancelText||l.value.cancel),1),f("div",Cv,k(e.title),1),c.value?(p(),h("button",{key:0,type:"button",class:"fs-sheet__action fs-sheet__action--primary",onClick:u},k(e.confirmText||l.value.confirm),1)):(p(),h("span",Sv))]),e.searchable?(p(),h("div",wv,[f("input",{value:i.value,type:"search",class:"fs-sheet__search",placeholder:e.searchPlaceholder||l.value.searchPlaceholder,onInput:r},null,40,Tv)])):V("",!0),f("div",xv,[ur(d.$slots,"default",{},void 0)])],8,_v)])):V("",!0)]))}}),[["__scopeId","data-v-19936a67"]]),$v=["data-keyboard-kind"],Av=["aria-label"],Mv={class:"fs-kb-head"},Ev={class:"fs-kb-head__left"},Fv={class:"fs-kb-title"},Iv={key:0,class:"fs-kb-field"},Dv={class:"fs-kb-head__right"},Pv={class:"fs-kb-preview"},Ov={key:0,class:"fs-kb-preview__len"},Rv={class:"fs-kb-grid"},Lv=["data-kb-key","onClick"],Uo=Ke(Pe({__name:"ModernNumberKeyboard",props:{visible:{type:Boolean},kind:{},label:{default:""},displayValue:{default:""},maxlength:{default:void 0}},emits:["update:visible","key","backspace","clear","done","switch-native"],setup(e,{emit:t}){const n=e,s=t,l=je(ts,"zh-CN"),a=E(()=>Kt(Ee(l))),i=E(()=>wt(a.value)),r=E(()=>Fo(n.kind,a.value)),o=E(()=>["1","2","3","4","5","6","7","8","9",r.value.extraKey||"__clear__","0","__del__"]);function u(d){d==="__del__"?s("backspace"):d==="__clear__"?s("clear"):s("key",d)}function c(){s("done"),s("update:visible",!1)}return(d,v)=>(p(),st(fl,{to:"body"},[Ge(Es,{name:"fs-kb-slide"},{default:jt(()=>[e.visible?(p(),h("div",{key:0,class:"fs-kb-wrap","data-testid":"modern-number-keyboard","data-keyboard-kind":e.kind},[f("div",{class:"fs-kb-backdrop",onClick:c}),f("div",{class:"fs-kb-panel",role:"dialog","aria-label":r.value.title},[f("div",Mv,[f("div",Ev,[v[2]||(v[2]=f("span",{class:"fs-kb-shield"},"🛡",-1)),f("span",Fv,k(r.value.title),1),e.label?(p(),h("span",Iv,"· "+k(e.label),1)):V("",!0)]),f("div",Dv,[f("button",{type:"button",class:"fs-kb-native","data-testid":"modern-kb-switch-native",onClick:v[0]||(v[0]=A=>s("switch-native"))},k(i.value.systemKeyboard),1),f("button",{type:"button",class:"fs-kb-done",onClick:c},k(i.value.done),1)])]),f("div",Pv,[f("span",{class:se(["fs-kb-preview__val",{"is-empty":!e.displayValue}])},k(e.displayValue||i.value.keyboardTapHint),3),e.maxlength?(p(),h("span",Ov,k(e.displayValue.replace(/\s+/g,"").length)+"/"+k(e.maxlength),1)):V("",!0)]),f("div",Rv,[(p(!0),h(le,null,ke(o.value,A=>(p(),h("button",{key:A,type:"button",class:se(["fs-kb-key",{"is-fn":A==="__del__"||A==="__clear__"||A==="X"||A==="."}]),"data-kb-key":A,onMousedown:v[1]||(v[1]=lt(()=>{},["prevent"])),onClick:x=>u(A)},[A==="__del__"?(p(),h(le,{key:0},[Je("⌫")],64)):A==="__clear__"?(p(),h(le,{key:1},[Je(k(i.value.clear),1)],64)):(p(),h(le,{key:2},[Je(k(A),1)],64))],42,Lv))),128))])],8,Av)],8,$v)):V("",!0)]),_:1})]))}}),[["__scopeId","data-v-0b880d74"]]),Nv={class:"fs-sig","data-testid":"modern-signature-pad"},Vv={class:"fs-sig__hint"},Bv={class:"fs-sig__box"},jv={key:0,class:"fs-sig__watermark"},Kv={class:"fs-sig__actions"},Uv={class:"fs-sig__tip"},Hv=Ke(Pe({__name:"ModernSignaturePad",props:{visible:{type:Boolean},title:{default:""}},emits:["update:visible","confirm"],setup(e,{emit:t}){const n=e,s=je(ts,"zh-CN"),l=E(()=>wt(Kt(Ee(s)))),a=t,i=H(null),r=H(!1);let o=!1,u=null;function c(){const O=i.value;if(!O)return;const y=O.getBoundingClientRect(),b=Math.max(window.devicePixelRatio||1,2),C=Math.max(280,Math.round(y.width||320)),B=190;O.width=C*b,O.height=B*b,u=O.getContext("2d"),u&&(u.scale(b,b),u.fillStyle="#FFFFFF",u.fillRect(0,0,C,B),u.strokeStyle="#0F172A",u.lineWidth=2.6,u.lineCap="round",u.lineJoin="round",r.value=!1)}ut(()=>n.visible,async O=>{O&&(await zn(),c())});function d(O){const b=i.value.getBoundingClientRect();return{x:O.clientX-b.left,y:O.clientY-b.top}}function v(O){var b,C;if(!u||!i.value)return;(C=(b=i.value).setPointerCapture)==null||C.call(b,O.pointerId),o=!0;const y=d(O);u.beginPath(),u.moveTo(y.x,y.y),u.lineTo(y.x+.1,y.y+.1),u.stroke(),r.value=!0}function A(O){if(!o||!u)return;const y=d(O);u.lineTo(y.x,y.y),u.stroke()}function x(){o=!1}function M(){c()}function w(){if(!i.value||!r.value)return;const O=i.value.toDataURL("image/png");a("confirm",O),a("update:visible",!1)}return(O,y)=>(p(),st(Rs,{visible:e.visible,title:e.title||l.value.signatureTitle,"show-confirm":!0,"confirm-text":l.value.signatureConfirm,"onUpdate:visible":y[0]||(y[0]=b=>a("update:visible",b)),onConfirm:w},{default:jt(()=>[f("div",Nv,[f("div",Vv,k(l.value.signatureHint),1),f("div",Bv,[f("canvas",{ref_key:"canvasRef",ref:i,class:"fs-sig__canvas",onPointerdown:v,onPointermove:A,onPointerup:x,onPointercancel:x},null,544),r.value?V("",!0):(p(),h("span",jv,k(l.value.signatureWatermark),1))]),f("div",Kv,[f("button",{type:"button",class:"fs-sig__clear",onClick:M},k(l.value.signatureClear),1),f("span",Uv,k(r.value?l.value.signatureReadyTip:l.value.signatureEmptyTip),1)])])]),_:1},8,["visible","title","confirm-text"]))}}),[["__scopeId","data-v-58065aef"]]),qv=["data-modern-skin","data-field-key","data-has-error"],Wv={key:0,class:"fs-review","data-testid":"modern-review-row"},Gv={class:"fs-review__head"},zv={class:"fs-review__label"},Yv={key:0,class:"fs-review__val-row"},Jv=["src","alt"],Xv={key:1,class:"fs-review__val-row"},Zv={key:0,class:"fs-upload-grid"},Qv=["src","alt"],ep={key:1,class:"fs-review__empty"},tp={key:2,class:"fs-review__list"},np={key:0,class:"fs-review__empty"},sp={class:"fs-review__subhead"},lp={class:"fs-review__subk"},ap={class:"fs-review__subv"},ip={class:"fs-task-row__left"},rp={key:0,viewBox:"0 0 16 16",fill:"none"},op={key:1,viewBox:"0 0 16 16",fill:"none"},cp={class:"fs-task-row__meta"},up={class:"fs-task-row__label"},dp={key:0,class:"fs-req"},fp={class:"fs-task-row__sub"},vp={class:"fs-task-row__right"},pp=["src","alt"],hp={key:0,class:"fs-chevron"},mp={key:2,class:"fs-agree"},gp=["disabled"],yp={key:0,viewBox:"0 0 14 14",fill:"none"},bp={class:"fs-agree__body"},_p={key:0,class:"fs-req"},kp={key:0,class:"fs-agree__links"},Cp=["onClick"],Sp={class:"fs-doc-body"},wp={key:3,class:"fs-row"},Tp={class:"fs-label"},xp={key:0,class:"fs-req"},$p={class:"fs-control-wrap"},Ap={key:0,class:"fs-custom-control","data-custom-control":"1"},Mp={key:1,class:"fs-input-box fs-input-box--area"},Ep=["value","placeholder","disabled","maxlength"],Fp={key:0,class:"fs-counter"},Ip={key:0,class:"fs-affix fs-affix--prefix"},Dp=["value","type","inputmode","readonly","placeholder","disabled","maxlength","data-keyboard-kind"],Pp={key:1,class:"fs-affix fs-affix--suffix"},Op=["title"],Rp=["title"],Lp=["aria-label"],Np={key:0,class:"fs-fintech-hint"},Vp={key:0,class:"fs-sheet-empty"},Bp={key:1,class:"fs-sheet-empty"},jp={key:2,class:"fs-opt-list"},Kp=["onClick"],Up={key:0,class:"fs-opt-check"},Hp={class:"fs-cascader-tabs"},qp=["onClick"],Wp={key:0,class:"fs-sheet-empty"},Gp={key:1,class:"fs-sheet-empty is-err"},zp={key:2,class:"fs-opt-list"},Yp=["onClick"],Jp={key:0,class:"fs-opt-check"},Xp={key:5,class:"fs-search-wrap"},Zp={class:"fs-input-box fs-input-box--search"},Qp=["value","placeholder","disabled"],eh={key:0,class:"fs-search-pop"},th={key:0,class:"fs-search-pop__empty"},nh=["onMousedown"],sh={key:0,class:"fs-daterange","data-testid":"modern-daterange-control"},lh=["disabled"],ah={class:"fs-daterange__sep"},ih=["disabled"],rh={key:0,class:"fs-date-bounds"},oh={class:"fs-date-cols"},ch={class:"fs-date-col"},uh={class:"fs-date-col__head"},dh={class:"fs-date-col__list"},fh=["onClick"],vh={key:0,class:"fs-date-col"},ph={class:"fs-date-col__head"},hh={class:"fs-date-col__list"},mh=["onClick"],gh={key:1,class:"fs-date-col"},yh={class:"fs-date-col__head"},bh={class:"fs-date-col__list"},_h=["onClick"],kh=["value","inputmode","readonly","placeholder","maxlength","disabled"],Ch=["disabled"],Sh={class:"fs-upload-grid"},wh=["src","alt","onClick"],Th=["onClick"],xh={key:0,class:"fs-upload-add"},$h=["accept"],Ah={class:"fs-upload-add__txt"},Mh=["src","alt"],Eh={key:9,class:"fs-files","data-testid":"modern-file-upload"},Fh={class:"fs-file-row__name"},Ih=["onClick"],Dh={key:0,class:"fs-file-add"},Ph=["accept"],Oh={key:10,class:"fs-switch-row","data-testid":"modern-switch-control"},Rh=["aria-checked","disabled"],Lh={class:"fs-switch__txt"},Nh={key:11,class:"fs-chips","data-testid":"modern-radio-group"},Vh=["disabled","onClick"],Bh={key:12,class:"fs-chips","data-testid":"modern-checkbox-group"},jh=["disabled","onClick"],Kh={key:0,class:"fs-chip__chk"},Uh={key:13,class:"fs-stepper-ctrl","data-testid":"modern-stepper-control"},Hh=["disabled"],qh={class:"fs-stepper-num"},Wh={key:0,style:{"font-size":"12px",color:"#64748b","margin-left":"3px","font-weight":"400"}},Gh=["disabled"],zh={key:14,class:"fs-rate","data-testid":"modern-rate-control"},Yh=["disabled","onClick"],Jh={key:0,class:"fs-rate-txt"},Xh={key:15,class:"fs-slider-row"},Zh=["value","min","max","step","disabled"],Qh={class:"fs-slider-val"},em={key:16,class:"fs-list","data-testid":"modern-list-control"},tm={key:0,class:"fs-list__empty"},nm=["data-list-index"],sm={class:"fs-list__card-head"},lm={class:"fs-list__card-title"},am=["onClick"],im={class:"fs-list__subfields"},rm={class:"fs-list__sublabel"},om={key:0,class:"fs-req"},cm=["value","disabled","onChange"],um={value:""},dm=["value"],fm={key:1,class:"fs-chips"},vm=["disabled","onClick"],pm=["disabled","onClick"],hm=["value","disabled","onInput"],mm=["value","type","inputmode","maxlength","placeholder","disabled","onInput"],gm={key:5,class:"fs-list__suberr","data-testid":"modern-list-suberr"},ym={key:17,class:"fs-trigger-box"},bm={class:"fs-trigger-val is-placeholder"},_m={key:1,class:"fs-help"},km=Ke(Pe({__name:"ModernFormItem",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=je(wo,void 0),s=je(Os,void 0),l=je(Wa,"fin-minimal"),a=je(Bo,"auto"),i=je(jo,!1),r=je(Ko,null),o=je(ts,"zh-CN"),u=je(bv,null),c=je("customControls",void 0),d=E(()=>Kt(Ee(o))),v=E(()=>wt(d.value)),A=E(()=>{const m=Ee(c)||{},_=Ee(u)||{};return ev({...m,..._},t.item)});function x(m,_){ce.value="";const I=Ue.value==="error";P(m,_,_?void 0:{skipVerify:!I})}function M(m){var I;const _=m!==void 0?m:(I=t.field)==null?void 0:I.value;P(_,"inputBlur")}const w=E(()=>{const m=Ee(l);return m&&Dt[m]?m:"fin-minimal"}),O=E(()=>Ee(a)||"auto"),y=E(()=>!!Ee(i)),b=E(()=>{const m=Ee(r);return typeof m=="function"?m:null});let C=0;function B(m,_){var I;(I=b.value)==null||I.call(b,{type:m,timestamp:Date.now(),fieldKey:t.item.key,fieldType:t.item.type,..._})}const D=E(()=>cv(t.item)),U=H(!1),q=E(()=>s?Ee(s):null),R=E(()=>n?Ee(n):Nl),j=E(()=>Ff(t.item.type)),J=E(()=>Yf(t.item)),S=E(()=>t.item.props||{}),G=E(()=>{var m;return!!((m=t.field)!=null&&m.disabled||t.item.disabled)}),he=E(()=>{var m,_;return typeof((m=t.field)==null?void 0:m.required)=="boolean"?t.field.required:t.item.required===!0||((_=t.item.rules)==null?void 0:_.some(I=>I.type==="required"))}),Le=E(()=>Uf(t.item.labelPosition,R.value)),Ie=E(()=>t.item.type==="textarea"||t.item.type==="imageUpload"||t.item.type==="fileUpload"||t.item.type==="agreement"||t.item.type==="list"||t.item.type==="radioGroup"||t.item.type==="checkboxGroup"||t.item.type==="dateRange"?!0:Le.value==="top"),$e=E(()=>Hf(t.item.labelWidth,R.value)),ce=H(""),Se=H(!1),Xe=H(!1),ze=H(!1),qe=E(()=>{var _,I;if((_=t.field)!=null&&_.errMsg||ce.value||Se.value&&ze.value&&!Xe.value)return"";const m=Lo(t.item,(I=t.field)==null?void 0:I.value,d.value);return m.valid?"":m.reason||""}),Ue=E(()=>{var m,_;return(m=t.field)!=null&&m.errMsg||ce.value||qe.value?"error":(_=t.field)!=null&&_.warningMsg?"warning":"default"});function xt(m){return m?/共用业务|高频独立|fieldKey=|语料|绑定\s*\d+\s*个字段/.test(m):!1}const Xt=E(()=>{const m=String(t.item.help||"").trim();return!m||xt(m)?"":m}),kt=E(()=>{var _,I;const m=((_=t.field)==null?void 0:_.errMsg)||ce.value||qe.value||((I=t.field)==null?void 0:I.warningMsg)||"";return d.value==="en-US"&&m==="字段不能为空"?"This field is required":m}),Ce=H("");ut(()=>{var m;return(m=t.field)==null?void 0:m.value},m=>{m&&typeof m=="object"&&"name"in m?Ce.value=String(m.name??""):Ce.value=m==null?"":String(m)},{immediate:!0});function P(m,_,I){t.formCore.setControlData(t.item.key,m,{eventType:_,...I!=null&&I.skipVerify?{skipVerify:!0}:{},...I!=null&&I.skipRelation?{skipRelation:!0}:{}}),B("field_change")}ut(()=>{var m;return(m=t.field)==null?void 0:m.errMsg},(m,_)=>{m&&m!==_&&B("field_error",{errorMessage:String(m)})});const Ct=E(()=>iv(t.item)),ns=E(()=>Fo(Ct.value,d.value)),g=H(!1),T=H(null),L=E(()=>!G.value&&!y.value&&rv(Ct.value,O.value)),Y=E(()=>L.value&&!g.value);function N(){ze.value=!1,g.value=!0,setTimeout(()=>{var m;(m=T.value)==null||m.focus()},30)}function z(){g.value=!1,Se.value=!0,ze.value=!0}const te=E(()=>{const m=String(S.value.keyboardType||"").toLowerCase();return m==="number"||m==="digit"?"text":t.item.type==="phone"?"tel":"text"}),ee=E(()=>{if(Y.value)return"none";const m=String(S.value.keyboardType||"").toLowerCase();return m==="digit"?"decimal":m==="number"?"numeric":t.item.type==="number"?"decimal":t.item.type==="phone"||t.item.type==="bankCard"?"numeric":"text"}),X=E(()=>typeof S.value.maxlength=="number"?S.value.maxlength:void 0),W=E(()=>typeof S.value.decimalPlaces=="number"?S.value.decimalPlaces:2),ue=E(()=>S.value.clearable!==!1),Z=E(()=>av(Ce.value,t.item.label)),re=E(()=>Se.value&&!Y.value?Ce.value:Do(Ce.value,t.item));function fe(){Xe.value=Ue.value==="error",Se.value=!0,C=Date.now(),B("field_focus"),Y.value&&(ze.value=!0)}function be(){Y.value&&(Se.value||(Xe.value=Ue.value==="error"),Se.value=!0,C||(C=Date.now(),B("field_focus")),ze.value=!0)}function we(m){const _=m.target;if(t.item.type==="textarea"){Ce.value=_.value,(Ue.value==="error"||Xe.value)&&(ce.value="",P(_.value,void 0,{skipRelation:!0}));return}const I=ov(_.value,Ct.value),ve=Io(I,Ct.value,{maxlength:X.value,decimalPlaces:W.value});Ce.value=ve,_.value!==ve&&(_.value=ve),(Ue.value==="error"||Xe.value)&&(ce.value="",P(ve,void 0,{skipRelation:!0}))}function Te(){ze.value||(Se.value=!1,Xe.value=!1,ce.value="",C&&(B("field_blur",{durationMs:Date.now()-C}),C=0),P((Ce.value||"").trim(),"inputBlur"))}function De(){Ce.value="",ce.value="",P("","inputBlur")}function Ye(m){const _=Io(`${Ce.value}${m}`,Ct.value,{maxlength:X.value,decimalPlaces:W.value});Ce.value=_,ce.value="";const I=Ue.value==="error"||Xe.value;P(_,void 0,{skipVerify:!I,skipRelation:!0})}function ht(){const m=Ce.value.slice(0,-1);Ce.value=m,ce.value="";const _=Ue.value==="error"||Xe.value;P(m,void 0,{skipVerify:!_,skipRelation:!0})}function ft(){Ce.value="",ce.value="";const m=Ue.value==="error"||Xe.value;P("",void 0,{skipVerify:!m,skipRelation:!0})}function Zt(){ze.value=!1,Se.value=!1,Xe.value=!1,C&&(B("field_blur",{durationMs:Date.now()-C}),C=0),P((Ce.value||"").trim(),"inputBlur")}const Qt=E(()=>To(t.field)),tt=E(()=>J.value?Jf(J.value,t.field,d.value):v.value.taskGoDefault),nt=H(!1),Ut=E(()=>{var _;const m=(_=t.field)==null?void 0:_.value;return m&&typeof m=="object"&&typeof m.signatureDataUrl=="string"?String(m.signatureDataUrl):""});function en(m){P({code:"signed",name:v.value.signatureDoneName,signatureDataUrl:m},"pickChange")}async function Bl(){var _;if(G.value||y.value||!J.value)return;const m=(_=q.value)==null?void 0:_.launchTask;if(typeof m=="function"){try{const I=await m({key:t.item.key,taskType:J.value.taskType,taskCategory:J.value.taskCategory,item:t.item,field:t.field});if(I&&typeof I=="object"&&I.useBuiltInSignaturePad){nt.value=!0;return}I!==void 0&&P(I,"pickChange")}catch{}return}J.value.taskType==="signature"&&(nt.value=!0)}const Vn=H([]),Ls=H(!1),Bn=H(!1),Ns=H(""),Pt=H([]),ss=E(()=>S.value.isSingle===!1||S.value.multiple===!0),Ht=E(()=>{var I;const m=(I=t.field)==null?void 0:I.options;if(Array.isArray(m)&&m.length)return m;const _=t.item.initOptions;return Array.isArray(_)&&_.length?_:Vn.value}),Vs=E(()=>{const m=Ns.value.trim().toLowerCase();return m?Ht.value.filter(_=>String(_.name||"").toLowerCase().includes(m)||String(_.code||"").toLowerCase().includes(m)):Ht.value}),ls=E(()=>{var _;const m=(_=t.field)==null?void 0:_.value;if(Array.isArray(m))return m.map(I=>{if(I&&typeof I=="object")return I.name||I.code;const ve=Ht.value.find(Ae=>String(Ae.code)===String(I));return ve?ve.name:I}).filter(Boolean).join(d.value==="en-US"?", ":"、");if(m&&typeof m=="object"&&"name"in m)return String(m.name||"");if(m!=null&&m!==""){const I=Ht.value.find(ve=>String(ve.code)===String(m));return String(I?I.name:m)}return""});async function F(){var m,_;if(!G.value){if(!Ht.value.length&&typeof((m=q.value)==null?void 0:m.loadSelectOptions)=="function"){Ls.value=!0;try{const I=await q.value.loadSelectOptions({key:t.item.key,item:t.item,formCore:t.formCore});Array.isArray(I)&&(Vn.value=I)}finally{Ls.value=!1}}if(ss.value){const I=(_=t.field)==null?void 0:_.value;Pt.value=Array.isArray(I)?I.map(ve=>String(ve&&typeof ve=="object"?ve.code:ve)).filter(Boolean):[]}Bn.value=!0}}function $(m){var ve;if(ss.value)return Pt.value.includes(String(m));const _=(ve=t.field)==null?void 0:ve.value,I=_&&typeof _=="object"?_.code:_;return I!=null&&String(I)===String(m)}function Q(m){if(ss.value){const I=String(m.code);Pt.value.includes(I)?Pt.value=Pt.value.filter(ve=>ve!==I):Pt.value=[...Pt.value,I];return}const _=t.item.valueType==="object"?{code:m.code,name:m.name}:String(m.code);P(_,"pickChange"),Bn.value=!1}function oe(){const m=Ht.value.filter(I=>Pt.value.includes(String(I.code))),_=t.item.valueType==="object"?m.map(I=>({code:I.code,name:I.name})):m.map(I=>String(I.code));P(_,"pickChange"),Bn.value=!1}const ae=H(!1),ie=H(!1),de=H(""),ne=H([]),ge=H([]),Ne=H(0),We=E(()=>j.value.controlId==="address-control"&&S.value.taskType==="map"),Tn=E(()=>{var _;const m=(_=t.field)==null?void 0:_.value;return Array.isArray(m)&&m.length?m.map(I=>I&&typeof I=="object"?I.name||I.code:I).join(" / "):m&&typeof m=="object"&&"name"in m?String(m.name||""):typeof m=="string"?m:""});function tn(m){return(m||[]).map(_=>({code:String(_.value??_.code??_.adcode??_.name??_.label??""),name:String(_.label??_.name??_.value??_.code??""),child:Array.isArray(_.children)?tn(_.children):Array.isArray(_.child)?tn(_.child):void 0}))}async function jl(){var _;if(G.value)return;ae.value=!0,de.value="",ne.value=[],Ne.value=0;const m=t.item.initOptions;if(Array.isArray(m)&&m.length){ge.value=[tn(m)];return}if(j.value.controlId==="address-control"){const I=So(t.formCore,(_=q.value)!=null&&_.loadAddressChildren?(ve,Ae)=>q.value.loadAddressChildren(ve,{...Ae,item:t.item}):void 0);if(I.mode!=="sample"){ie.value=!0;try{const ve=await I.fetchRoot(String(S.value.url||""),Number(S.value.mapLevel||3));ge.value=[ve.length?tn(ve):tn(qa)]}catch{ge.value=[tn(qa)]}finally{ie.value=!1}return}}ge.value=[tn(qa)]}async function Kl(m){var Ae;const _=Ne.value,I=[...ne.value.slice(0,_),{code:m.code,name:m.name}];ne.value=I;const ve=Number(S.value.mapLevel||3);if(Array.isArray(m.child)&&m.child.length){ge.value=[...ge.value.slice(0,_+1),m.child],Ne.value=_+1;return}if(j.value.controlId==="address-control"&&I.length<ve){const at=So(t.formCore,(Ae=q.value)!=null&&Ae.loadAddressChildren?(Oe,it)=>q.value.loadAddressChildren(Oe,{...it,item:t.item}):void 0);if(at.mode!=="sample"){ie.value=!0,de.value="";try{const Oe=await at.loadChild({value:m.code,label:m.name},{url:String(S.value.url||""),path:I.slice(0,-1).map(Hn=>({value:Hn.code,label:Hn.name})),maxLevel:ve}),it=tn(Oe);if(it.length){ge.value=[...ge.value.slice(0,_+1),it],Ne.value=_+1;return}}catch{de.value=v.value.regionLoadFailed;return}finally{ie.value=!1}}}P(I,"pickChange"),ae.value=!1}async function Ze(){var _;if(G.value)return;const m=(_=q.value)==null?void 0:_.launchTask;if(typeof m=="function")try{const I=await m({key:t.item.key,taskType:"map",taskCategory:"TASKS",item:t.item,field:t.field});I!==void 0&&P(I,"pickChange")}catch{}}const He=H([]),hn=H(!1),as=H(!1);let Bs=null;function d_(m){const _=m.target.value;Ce.value=_,Bs&&clearTimeout(Bs);const I=_.trim();if(!I){He.value=[],as.value=!1;return}as.value=!0,Bs=setTimeout(async()=>{var ve;hn.value=!0;try{if(typeof((ve=q.value)==null?void 0:ve.searchSuggest)=="function"){const Ae=await q.value.searchSuggest(I,{item:t.item});He.value=Pf(Ae,S.value.valueCustomKey)}else He.value=Qf.filter(Ae=>Ae.includes(I)).map((Ae,at)=>({code:`SAMPLE_${at}`,name:Ae,raw:{code:`SAMPLE_${at}`,name:Ae}}))}finally{hn.value=!1}},180)}function f_(m){Ce.value=m.name,as.value=!1,He.value=[],P(Of(m,S.value.extraResKeys),"searchChange")}function v_(){Se.value=!1,setTimeout(()=>{as.value=!1},160),Lf(S.value)&&P(Rf(Ce.value),"searchChange")}const jn=E(()=>Xf(t.item)),js=H(!1),za=H("single"),Ya=new Date,Kn=H(Ya.getFullYear()),is=H(Ya.getMonth()+1),Ul=H(Ya.getDate()),Hl=E(()=>String(S.value.minDate||"").trim()),ql=E(()=>String(S.value.maxDate||"").trim()),Go=E(()=>!!(S.value.allowLongTerm??t.item.type==="dateRange")),nn=E(()=>{var _;const m=(_=t.field)==null?void 0:_.value;return Array.isArray(m)?[String(m[0]||""),String(m[1]||"")]:m&&typeof m=="object"?[String(m.start||""),String(m.end||"")]:["",""]}),p_=E(()=>{const m=new Date().getFullYear(),_=Hl.value&&Number(Hl.value.slice(0,4))||m-60,I=ql.value&&Number(ql.value.slice(0,4))||m+20,ve=[];for(let Ae=I;Ae>=_;Ae--)ve.push(Ae);return ve}),h_=[1,2,3,4,5,6,7,8,9,10,11,12],m_=E(()=>{const m=new Date(Kn.value,is.value,0).getDate();return Array.from({length:m},(_,I)=>I+1)});function Ja(m="single"){var ve;if(G.value)return;za.value=m;const I=(m==="start"?nn.value[0]:m==="end"?nn.value[1]:String(((ve=t.field)==null?void 0:ve.value)||"")).match(/^(\d{4})(?:-(\d{1,2}))?(?:-(\d{1,2}))?/);I&&(Kn.value=Number(I[1]),I[2]&&(is.value=Number(I[2])),I[3]&&(Ul.value=Number(I[3]))),js.value=!0}function g_(){const m=I=>String(I).padStart(2,"0");let _=`${Kn.value}-${m(is.value)}-${m(Ul.value)}`;jn.value.granularity==="year"?_=String(Kn.value):jn.value.granularity==="month"&&(_=`${Kn.value}-${m(is.value)}`),za.value==="start"?P([_,nn.value[1]],"pickChange"):za.value==="end"?P([nn.value[0],_],"pickChange"):P(_,"pickChange"),js.value=!1}const zo=E(()=>t.item.placeholder?t.item.placeholder:d.value==="en-US"?jn.value.granularity==="year"?v.value.datePlaceholderYear:jn.value.granularity==="month"?v.value.datePlaceholderMonth:v.value.datePlaceholderDay:jn.value.placeholder);function Xa(m){return m==="长期"||m==="long_term"||m==="Long-term"}function Za(m,_=""){return m?Xa(m)?v.value.dateLongTerm:m:_}function Yo(){if(G.value)return;const m=v.value.dateLongTermValue;t.item.type==="dateRange"?P([nn.value[0],m],"pickChange"):P(m,"pickChange"),js.value=!1}const xn=E(()=>xo(t.item,{defaultFalseValue:""})),Wl=E(()=>{var m;return $o((m=t.field)==null?void 0:m.value,xn.value)}),rs=H(null),Jo=E({get:()=>!!rs.value,set:m=>{m||(rs.value=null)}});function Xo(){G.value||P(Wl.value?xn.value.falseValue:xn.value.trueValue,"pickChange")}const Qa=E(()=>{var m;return Number(((m=t.field)==null?void 0:m.value)??S.value.min??0)});function y_(m){P(Number(m.target.value),"pickChange")}const Gl=E(()=>({countdownSeconds:Bf(S.value),maxlength:jf(S.value),buttonText:S.value.verifyText||S.value.btnText||S.value.sendText?Kf(S.value):v.value.verifyCodeButton})),Un=H(0);let os=null;async function b_(){var ve,Ae;if(G.value||Un.value>0)return;ce.value="";const m=S.value.mobileKey||S.value.bindMobileKey||S.value.phoneFieldKey,_=((ve=t.formCore)==null?void 0:ve.fields)||{},I=m||(_.mobile?"mobile":_.phone?"phone":"");if(I&&_[I]){const at=String(_[I].value??"").trim(),Oe=at?Ro(at,{allowInternational:!!(S.value.allowInternational||d.value==="en-US"),locale:d.value}):{valid:!1,reason:v.value.valMobileRequiredBeforeCode};if(!Oe.valid){ce.value=Oe.reason||v.value.valMobileRequiredBeforeCode;return}}typeof((Ae=q.value)==null?void 0:Ae.sendVerifyCode)=="function"&&await q.value.sendVerifyCode({item:t.item}),Un.value=Gl.value.countdownSeconds,os=setInterval(()=>{Un.value-=1,Un.value<=0&&os&&(clearInterval(os),os=null)},1e3)}const mn=E(()=>({maxCount:Vf(S.value),maxSizeMB:typeof S.value.maxSizeMB=="number"?S.value.maxSizeMB:10,accept:Array.isArray(S.value.accept)?S.value.accept:typeof S.value.accept=="string"?S.value.accept.split(",").map(m=>m.trim()).filter(Boolean):void 0})),zl=H(""),$n=E(()=>{var _;const m=(_=t.field)==null?void 0:_.value;return Array.isArray(m)?m.map(I=>typeof I=="string"?{url:I}:{url:I.url||I.path||"",name:I.name,size:I.size}):[]});async function Zo(m){var at,Oe;const _=m.target,I=(at=_.files)==null?void 0:at[0];if(_.value="",!I||G.value)return;ce.value="";const ve=yv({name:I.name,size:I.size,type:I.type},{maxSizeMB:mn.value.maxSizeMB,accept:mn.value.accept,locale:d.value});if(!ve.valid){ce.value=ve.reason||v.value.uploadGuardFallback;return}let Ae=URL.createObjectURL(I);if(typeof((Oe=q.value)==null?void 0:Oe.uploadFile)=="function"){const it=await q.value.uploadFile({name:I.name,size:I.size,raw:I},{item:t.item});it!=null&&it.url&&(Ae=it.url)}P([...$n.value,{url:Ae,name:I.name,size:I.size}],"pickChange")}function Qo(m){G.value||(ce.value="",P($n.value.filter((_,I)=>I!==m),"pickChange"))}const ec=E(()=>S.value.activeValue!==void 0?S.value.activeValue:!0),__=E(()=>S.value.inactiveValue!==void 0?S.value.inactiveValue:!1),Yl=E(()=>{var m;return((m=t.field)==null?void 0:m.value)===ec.value});function k_(){G.value||P(Yl.value?__.value:ec.value,"pickChange")}const ei=E(()=>Ht.value);function C_(m){if(G.value||m.disabled)return;const _=t.item.valueType==="object"?{code:m.code,name:m.name}:String(m.code);P(_,"pickChange")}function S_(m){var ve;const _=(ve=t.field)==null?void 0:ve.value,I=_&&typeof _=="object"?_.code:_;return I!=null&&String(I)===String(m)}const ti=E(()=>{var _;const m=(_=t.field)==null?void 0:_.value;return Array.isArray(m)?m.map(I=>String(I&&typeof I=="object"?I.code:I)).filter(Boolean):[]});function w_(m){if(G.value||m.disabled)return;ce.value="";const _=String(m.code),I=ti.value;let ve;if(I.includes(_)){const Oe=typeof S.value.minSelect=="number"?S.value.minSelect:0;if(I.length-1<Oe){ce.value=v.value.minSelectError(Oe);return}ve=I.filter(it=>it!==_)}else{const Oe=typeof S.value.maxSelect=="number"?S.value.maxSelect:999;if(I.length>=Oe){ce.value=v.value.maxSelectError(Oe);return}ve=[...I,_]}const Ae=ei.value.filter(Oe=>ve.includes(String(Oe.code))),at=t.item.valueType==="object"?Ae.map(Oe=>({code:Oe.code,name:Oe.name})):Ae.map(Oe=>String(Oe.code));P(at,"pickChange")}const Jl=E(()=>typeof S.value.min=="number"?S.value.min:0),tc=E(()=>typeof S.value.max=="number"?S.value.max:9999),nc=E(()=>typeof S.value.step=="number"&&S.value.step>0?S.value.step:1),Xl=E(()=>{var I;const m=(I=t.field)==null?void 0:I.value;if(m==null||m==="")return Jl.value;const _=Number(m);return Number.isFinite(_)?_:Jl.value});function sc(m){if(G.value)return;const _=Math.min(tc.value,Math.max(Jl.value,Xl.value+m));P(_,"pickChange")}const lc=E(()=>{const m=typeof S.value.max=="number"?S.value.max:S.value.count;return typeof m=="number"&&m>0?m:5}),ni=E(()=>{var _;const m=Number((_=t.field)==null?void 0:_.value);return Number.isFinite(m)?m:0});function T_(m){G.value||P(m,"pickChange")}const si=E(()=>{var _;const m=t.item.subItems||((_=t.item.props)==null?void 0:_.subItems);return Array.isArray(m)?m:[]}),Ks=E(()=>{var m;return t.item.listMeta||((m=t.item.props)==null?void 0:m.listMeta)||{}}),sn=E(()=>{var m;return Array.isArray((m=t.field)==null?void 0:m.value)?t.field.value:[]}),x_=E(()=>Number(Ks.value.minItems??0)),$_=E(()=>Ks.value.maxItems!=null?Number(Ks.value.maxItems):20),ac=E(()=>!G.value&&sn.value.length<$_.value),ic=E(()=>!G.value&&Ks.value.removable!==!1&&sn.value.length>x_.value),rc=E(()=>Oo(t.item,sn.value,d.value));function Us(m,_){const I=m==null?void 0:m[_.key];return I&&typeof I=="object"?String(I.code??I.name??""):I==null?"":String(I)}function Hs(m,_,I){const ve=sn.value.map((Ae,at)=>{if(at!==m)return Ae;let Oe=I;if(_.type==="select"&&Array.isArray(_.initOptions)&&_.valueType==="object"){const it=_.initOptions.find(Hn=>String(Hn.code)===String(I));Oe=it?{code:it.code,name:it.name}:I}return{...Ae||{},[_.key]:Oe}});P(ve,"inputBlur")}function A_(){if(!ac.value)return;const m={};for(const _ of si.value)_.defaultValue!==void 0&&(m[_.key]=_.defaultValue);P([...sn.value,m],"pickChange")}function M_(m){ic.value&&P(sn.value.filter((_,I)=>I!==m),"pickChange")}const li=E(()=>{if(j.value.controlId==="select-control")return ls.value;if(j.value.controlId==="address-control"||j.value.controlId==="cascader-control")return Tn.value;if(j.value.controlId==="agreement-control")return Wl.value?v.value.agreementChecked:v.value.agreementUnchecked;if(j.value.controlId==="slider-control")return String(Qa.value);const m=Ce.value.trim();return m?Do(m,t.item):""}),E_=E(()=>{const m=li.value;return m?D.value&&!U.value?uv(Ce.value,t.item):m:v.value.reviewEmpty});return yl(()=>{Bs&&clearTimeout(Bs),os&&clearInterval(os)}),(m,_)=>{var I,ve,Ae,at,Oe,it,Hn,oc,cc;return p(),h("div",{class:se(["fs-field",[Ie.value?"fs-field--top":"fs-field--inline",`fs-field--${Ue.value}`,{"is-focused":Se.value,"is-disabled":G.value}]]),"data-modern-skin":w.value,"data-field-key":e.item.key,"data-has-error":Ue.value==="error"?"1":void 0,style:$t({"--fs-label-width":$e.value})},[y.value?(p(),h("div",Wv,[f("div",Gv,[f("span",zv,k(e.item.label||((I=J.value)==null?void 0:I.label)||xn.value.displayLabel),1),D.value&&li.value?(p(),h("button",{key:0,type:"button",class:"fs-review__eye","data-testid":"review-mask-toggle",onClick:_[0]||(_[0]=K=>U.value=!U.value)},k(U.value?v.value.reviewHide:v.value.reviewReveal),1)):V("",!0)]),J.value?(p(),h("div",Yv,[Ut.value?(p(),h("img",{key:0,src:Ut.value,class:"fs-sig-thumb",alt:v.value.signatureAltSigned},null,8,Jv)):V("",!0),f("span",{class:se(["fs-task-pill",{"is-done":Qt.value}])},k(tt.value),3)])):j.value.controlId==="image-upload-control"?(p(),h("div",Xv,[$n.value.length?(p(),h("div",Zv,[(p(!0),h(le,null,ke($n.value,(K,_e)=>(p(),h("div",{key:K.url+_e,class:"fs-upload-thumb"},[f("img",{src:K.url,alt:K.name||v.value.uploadImageAlt},null,8,Qv)]))),128))])):(p(),h("span",ep,k(v.value.reviewNotUploaded),1))])):e.item.type==="list"||j.value.controlId==="list-control"?(p(),h("div",tp,[sn.value.length?V("",!0):(p(),h("div",np,k(v.value.reviewNoItems),1)),(p(!0),h(le,null,ke(sn.value,(K,_e)=>(p(),h("div",{key:_e,class:"fs-review__subcard"},[f("div",sp,k(v.value.listItemTitle(_e+1)),1),(p(!0),h(le,null,ke(si.value,ye=>(p(),h("div",{key:ye.key,class:"fs-review__subline"},[f("span",lp,k(ye.label||ye.key),1),f("span",ap,k(Us(K,ye)||"—"),1)]))),128))]))),128))])):(p(),h("div",{key:3,class:se(["fs-review__val",{"is-empty":!li.value}])},k(E_.value),3))])):J.value&&!A.value?(p(),h("div",{key:1,class:"fs-task-row",onClick:Bl},[f("div",ip,[f("span",{class:se(["fs-task-row__icon",{"is-done":Qt.value}])},[Qt.value?(p(),h("svg",rp,[..._[21]||(_[21]=[f("path",{d:"M3.5 8.5L6.5 11.5L12.5 4.8",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(p(),h("svg",op,[..._[22]||(_[22]=[f("rect",{x:"2.5",y:"2.5",width:"11",height:"11",rx:"2.5",stroke:"currentColor","stroke-width":"1.4"},null,-1),f("path",{d:"M5.5 8h5M8 5.5v5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"},null,-1)])]))],2),f("div",cp,[f("div",up,[he.value?(p(),h("span",dp,"*")):V("",!0),Je(k(e.item.label||J.value.label),1)]),f("div",fp,k(J.value.taskCategory)+" · "+k(J.value.taskType),1)])]),f("div",vp,[Ut.value?(p(),h("img",{key:0,src:Ut.value,class:"fs-sig-thumb",alt:v.value.signatureAltPreview},null,8,pp)):V("",!0),f("span",{class:se(["fs-task-pill",{"is-done":Qt.value}])},[Je(k(tt.value)+" ",1),!Qt.value&&!G.value?(p(),h("span",hp,"›")):V("",!0)],2)]),J.value.taskType==="signature"?(p(),st(Hv,{key:0,visible:nt.value,"onUpdate:visible":_[1]||(_[1]=K=>nt.value=K),title:e.item.label||v.value.signatureTitle,onConfirm:en},null,8,["visible","title"])):V("",!0)])):j.value.controlId==="agreement-control"&&!A.value?(p(),h("div",mp,[f("button",{type:"button",class:se(["fs-agree__check",{"is-checked":Wl.value}]),disabled:G.value,onClick:Xo},[Wl.value?(p(),h("svg",yp,[..._[23]||(_[23]=[f("path",{d:"M3 7.2L5.8 10L11 4.2",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):V("",!0)],10,gp),f("div",bp,[f("div",{class:"fs-agree__text",onClick:Xo},[he.value?(p(),h("span",_p,"*")):V("",!0),Je(k(xn.value.displayLabel),1)]),xn.value.hasAgreementLinks?(p(),h("div",kp,[(p(!0),h(le,null,ke(xn.value.agreements,K=>(p(),h("button",{key:K.title,type:"button",class:"fs-agree__link",onClick:_e=>rs.value=K},k(d.value==="en-US"?K.title:`《${K.title}》`),9,Cp))),128))])):V("",!0)]),Ge(Rs,{visible:Jo.value,"onUpdate:visible":_[2]||(_[2]=K=>Jo.value=K),title:((ve=rs.value)==null?void 0:ve.title)||v.value.agreementDetailTitle,"cancel-text":v.value.close},{default:jt(()=>{var K,_e;return[f("div",Sp,k(((K=rs.value)==null?void 0:K.content)||((_e=rs.value)==null?void 0:_e.url)||xn.value.displayLabel),1)]}),_:1},8,["visible","title","cancel-text"])])):(p(),h("div",wp,[f("label",Tp,[he.value?(p(),h("span",xp,"*")):V("",!0),Je(k(e.item.label),1)]),f("div",$p,[A.value?(p(),h("div",Ap,[(p(),st(Xn(A.value),{item:e.item,field:e.field,value:(Ae=e.field)==null?void 0:Ae.value,"model-value":(at=e.field)==null?void 0:at.value,disabled:G.value,readonly:y.value,"err-msg":kt.value,locale:d.value,"form-core":e.formCore,"host-handlers":q.value,"on-change":x,"on-blur":M,"onUpdate:modelValue":_[3]||(_[3]=K=>x(K)),onChange:_[4]||(_[4]=(K,_e)=>x(K,_e)),onBlur:_[5]||(_[5]=K=>M(K))},null,40,["item","field","value","model-value","disabled","readonly","err-msg","locale","form-core","host-handlers"]))])):j.value.controlId==="input-control"&&e.item.type==="textarea"?(p(),h("div",Mp,[f("textarea",{value:Ce.value,class:"fs-textarea",rows:"3",placeholder:e.item.placeholder||v.value.inputPlaceholder,disabled:G.value,maxlength:X.value,onFocus:_[6]||(_[6]=K=>Se.value=!0),onInput:we,onBlur:Te},null,40,Ep),X.value?(p(),h("div",Fp,k(Ce.value.length)+"/"+k(X.value),1)):V("",!0)])):j.value.controlId==="input-control"?(p(),h(le,{key:2},[f("div",{class:"fs-input-box",onClick:be},[S.value.prefix?(p(),h("span",Ip,k(S.value.prefix),1)):V("",!0),f("input",{ref_key:"inputElRef",ref:T,value:re.value,type:te.value,inputmode:ee.value,readonly:Y.value,class:se(["fs-input",{"is-custom-kb":Y.value}]),placeholder:e.item.placeholder||v.value.inputPlaceholder,disabled:G.value,maxlength:Y.value?void 0:X.value,"data-keyboard-kind":Ct.value,onFocus:fe,onInput:we,onBlur:Te},null,42,Dp),S.value.suffix||S.value.unit?(p(),h("span",Pp,k(S.value.suffix||S.value.unit),1)):V("",!0),Y.value&&ns.value.badge?(p(),h("button",{key:2,type:"button",class:"fs-kb-tag",title:v.value.keyboardHintWithSystem(ns.value.title),onClick:lt(N,["stop"])},k(ns.value.badge),9,Op)):L.value&&g.value?(p(),h("button",{key:3,type:"button",class:"fs-kb-tag",title:v.value.switchToSoftKeyboardTitle,onClick:lt(z,["stop"])},k(v.value.switchToSoftKeyboard),9,Rp)):V("",!0),ue.value&&Ce.value&&!G.value?(p(),h("button",{key:4,type:"button",class:"fs-clear-btn","aria-label":v.value.clear,onMousedown:lt(De,["prevent"]),onClick:lt(De,["stop"])}," × ",40,Lp)):V("",!0)]),Z.value?(p(),h("div",Np,k(Z.value),1)):V("",!0),Y.value?(p(),st(Uo,{key:1,visible:ze.value,"onUpdate:visible":_[7]||(_[7]=K=>ze.value=K),kind:Ct.value,label:e.item.label,"display-value":re.value,maxlength:X.value,onKey:Ye,onBackspace:ht,onClear:ft,onDone:Zt,onSwitchNative:N},null,8,["visible","kind","label","display-value","maxlength"])):V("",!0)],64)):j.value.controlId==="select-control"?(p(),h(le,{key:3},[f("div",{class:"fs-trigger-box",onClick:F},[f("span",{class:se(["fs-trigger-val",{"is-placeholder":!ls.value}])},k(ls.value||e.item.placeholder||v.value.selectPlaceholder),3),_[24]||(_[24]=f("span",{class:"fs-chevron"},"›",-1))]),Ge(Rs,{visible:Bn.value,"onUpdate:visible":_[8]||(_[8]=K=>Bn.value=K),title:S.value.dialogTitle||e.item.label||v.value.selectPlaceholder,"show-confirm":ss.value,searchable:Ht.value.length>6,onSearch:_[9]||(_[9]=K=>Ns.value=K),onConfirm:oe},{default:jt(()=>[Ls.value?(p(),h("div",Vp,k(v.value.loadingOptions),1)):Vs.value.length?(p(),h("div",jp,[(p(!0),h(le,null,ke(Vs.value,K=>(p(),h("button",{key:String(K.code),type:"button",class:se(["fs-opt-item",{"is-active":$(K.code)}]),onClick:_e=>Q(K)},[f("span",null,k(K.name),1),$(K.code)?(p(),h("span",Up,"✓")):V("",!0)],10,Kp))),128))])):(p(),h("div",Bp,k(v.value.noOptions),1))]),_:1},8,["visible","title","show-confirm","searchable"])],64)):j.value.controlId==="address-control"||j.value.controlId==="cascader-control"?(p(),h(le,{key:4},[f("div",{class:"fs-trigger-box",onClick:jl},[f("span",{class:se(["fs-trigger-val",{"is-placeholder":!Tn.value}])},k(Tn.value||e.item.placeholder||(j.value.controlId==="address-control"?v.value.selectAddressPlaceholder:v.value.selectPlaceholder)),3),We.value?(p(),h("button",{key:0,type:"button",class:"fs-map-pill",onClick:lt(Ze,["stop"])},k(v.value.mapPicker),1)):V("",!0),_[25]||(_[25]=f("span",{class:"fs-chevron"},"›",-1))]),Ge(Rs,{visible:ae.value,"onUpdate:visible":_[11]||(_[11]=K=>ae.value=K),title:S.value.dialogTitle||e.item.label||v.value.selectRegionTitle},{default:jt(()=>[f("div",Hp,[(p(!0),h(le,null,ke(ne.value,(K,_e)=>(p(),h("button",{key:K.code,type:"button",class:se(["fs-ctab",{"is-active":Ne.value===_e}]),onClick:ye=>Ne.value=_e},k(K.name),11,qp))),128)),ge.value.length>ne.value.length?(p(),h("button",{key:0,type:"button",class:"fs-ctab is-active",onClick:_[10]||(_[10]=K=>Ne.value=ne.value.length)},k(v.value.selectPlaceholder),1)):V("",!0)]),ie.value?(p(),h("div",Wp,k(v.value.loadingRegion),1)):de.value?(p(),h("div",Gp,k(de.value),1)):(p(),h("div",zp,[(p(!0),h(le,null,ke(ge.value[Ne.value]||[],K=>{var _e,ye;return p(),h("button",{key:K.code,type:"button",class:se(["fs-opt-item",{"is-active":((_e=ne.value[Ne.value])==null?void 0:_e.code)===K.code}]),onClick:ai=>Kl(K)},[f("span",null,k(K.name),1),((ye=ne.value[Ne.value])==null?void 0:ye.code)===K.code?(p(),h("span",Jp," ✓ ")):V("",!0)],10,Yp)}),128))]))]),_:1},8,["visible","title"])],64)):j.value.controlId==="search-control"?(p(),h("div",Xp,[f("div",Zp,[_[26]||(_[26]=f("svg",{class:"fs-search-icon",viewBox:"0 0 16 16",fill:"none"},[f("circle",{cx:"7.2",cy:"7.2",r:"4.8",stroke:"currentColor","stroke-width":"1.4"}),f("path",{d:"M11 11l3 3",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)),f("input",{value:Ce.value,type:"text",class:"fs-input",placeholder:e.item.placeholder||v.value.searchInputPlaceholder,disabled:G.value,onFocus:_[12]||(_[12]=K=>{Se.value=!0,He.value.length&&(as.value=!0)}),onInput:d_,onBlur:v_},null,40,Qp),Ce.value&&!G.value?(p(),h("button",{key:0,type:"button",class:"fs-clear-btn",onMousedown:lt(De,["prevent"])}," × ",32)):V("",!0)]),as.value&&(hn.value||He.value.length)?(p(),h("div",eh,[hn.value?(p(),h("div",th,k(v.value.searching),1)):V("",!0),(p(!0),h(le,null,ke(He.value,K=>(p(),h("button",{key:K.code,type:"button",class:"fs-search-pop__item",onMousedown:lt(_e=>f_(K),["prevent"])},k(K.name),41,nh))),128))])):V("",!0)])):j.value.controlId==="date-control"||j.value.controlId==="date-range-control"?(p(),h(le,{key:6},[j.value.controlId==="date-range-control"?(p(),h("div",sh,[f("button",{type:"button",class:"fs-daterange__btn",disabled:G.value,onClick:_[13]||(_[13]=K=>Ja("start"))},[f("span",{class:se({"is-placeholder":!nn.value[0]})},k(Za(nn.value[0],v.value.dateStart)),3)],8,lh),f("span",ah,k(v.value.dateTo),1),f("button",{type:"button",class:"fs-daterange__btn",disabled:G.value,onClick:_[14]||(_[14]=K=>Ja("end"))},[f("span",{class:se({"is-placeholder":!nn.value[1]})},k(Za(nn.value[1],v.value.dateEnd)),3)],8,ih),Go.value&&!G.value?(p(),h("button",{key:0,type:"button",class:se(["fs-longterm-btn",{"is-active":Xa(nn.value[1])}]),"data-testid":"modern-date-longterm",onClick:Yo},k(v.value.dateLongTerm),3)):V("",!0)])):(p(),h("div",{key:1,class:"fs-trigger-box",onClick:_[15]||(_[15]=K=>Ja("single"))},[f("span",{class:se(["fs-trigger-val",{"is-placeholder":!((Oe=e.field)!=null&&Oe.value)}])},k(Za((it=e.field)!=null&&it.value?String(e.field.value):"",zo.value)),3),Go.value&&!G.value?(p(),h("button",{key:0,type:"button",class:se(["fs-longterm-btn",{"is-active":Xa(String(((Hn=e.field)==null?void 0:Hn.value)||""))}]),onClick:lt(Yo,["stop"])},k(v.value.dateLongTerm),3)):V("",!0),_[27]||(_[27]=f("span",{class:"fs-chevron"},"›",-1))])),Ge(Rs,{visible:js.value,"onUpdate:visible":_[16]||(_[16]=K=>js.value=K),title:e.item.label||zo.value,"show-confirm":!0,onConfirm:g_},{default:jt(()=>[Hl.value||ql.value?(p(),h("div",rh,k(v.value.dateRangeBounds(Hl.value||v.value.dateUnlimited,ql.value||v.value.dateUnlimited)),1)):V("",!0),f("div",oh,[f("div",ch,[f("div",uh,k(v.value.dateYearHead),1),f("div",dh,[(p(!0),h(le,null,ke(p_.value,K=>(p(),h("button",{key:K,type:"button",class:se(["fs-date-opt",{"is-active":Kn.value===K}]),onClick:_e=>Kn.value=K},k(v.value.dateYearOption(K)),11,fh))),128))])]),jn.value.granularity!=="year"?(p(),h("div",vh,[f("div",ph,k(v.value.dateMonthHead),1),f("div",hh,[(p(),h(le,null,ke(h_,K=>f("button",{key:K,type:"button",class:se(["fs-date-opt",{"is-active":is.value===K}]),onClick:_e=>is.value=K},k(v.value.dateMonthOption(K)),11,mh)),64))])])):V("",!0),jn.value.granularity==="day"?(p(),h("div",gh,[f("div",yh,k(v.value.dateDayHead),1),f("div",bh,[(p(!0),h(le,null,ke(m_.value,K=>(p(),h("button",{key:K,type:"button",class:se(["fs-date-opt",{"is-active":Ul.value===K}]),onClick:_e=>Ul.value=K},k(v.value.dateDayOption(K)),11,_h))),128))])])):V("",!0)])]),_:1},8,["visible","title"])],64)):j.value.controlId==="verify-code-control"?(p(),h(le,{key:7},[f("div",{class:"fs-input-box",onClick:be},[f("input",{value:Ce.value,type:"tel",inputmode:Y.value?"none":"numeric",readonly:Y.value,autocomplete:"one-time-code",class:"fs-input",placeholder:e.item.placeholder||v.value.verifyCodePlaceholder,maxlength:Gl.value.maxlength,disabled:G.value,onFocus:fe,onInput:we,onBlur:Te},null,40,kh),f("button",{type:"button",class:"fs-code-btn",disabled:G.value||Un.value>0,onClick:lt(b_,["stop"])},k(Un.value>0?`${Un.value}s`:Gl.value.buttonText),9,Ch)]),Y.value?(p(),st(Uo,{key:0,visible:ze.value,"onUpdate:visible":_[17]||(_[17]=K=>ze.value=K),kind:"number",label:e.item.label||v.value.verifyCodeLabel,"display-value":Ce.value,maxlength:Gl.value.maxlength,onKey:Ye,onBackspace:ht,onClear:ft,onDone:Zt,onSwitchNative:N},null,8,["visible","label","display-value","maxlength"])):V("",!0)],64)):j.value.controlId==="image-upload-control"?(p(),h(le,{key:8},[f("div",Sh,[(p(!0),h(le,null,ke($n.value,(K,_e)=>(p(),h("div",{key:K.url+_e,class:"fs-upload-thumb"},[f("img",{src:K.url,alt:K.name||v.value.uploadImageAlt,onClick:ye=>zl.value=K.url},null,8,wh),G.value?V("",!0):(p(),h("button",{key:0,type:"button",class:"fs-upload-del",onClick:ye=>Qo(_e)}," × ",8,Th))]))),128)),!G.value&&$n.value.length<mn.value.maxCount?(p(),h("label",xh,[f("input",{type:"file",accept:mn.value.accept?mn.value.accept.join(","):"image/*",hidden:"",onChange:Zo},null,40,$h),_[28]||(_[28]=f("span",{class:"fs-upload-add__plus"},"+",-1)),f("span",Ah,k(v.value.uploadAddText),1)])):V("",!0)]),(p(),st(fl,{to:"body"},[zl.value?(p(),h("div",{key:0,class:"fs-lightbox",onClick:_[18]||(_[18]=K=>zl.value="")},[f("img",{src:zl.value,alt:v.value.uploadLightboxAlt},null,8,Mh)])):V("",!0)]))],64)):j.value.controlId==="file-upload-control"?(p(),h("div",Eh,[(p(!0),h(le,null,ke($n.value,(K,_e)=>(p(),h("div",{key:K.url+_e,class:"fs-file-row"},[f("span",Fh,"📄 "+k(K.name||K.url),1),G.value?V("",!0):(p(),h("button",{key:0,type:"button",class:"fs-list__del",onClick:ye=>Qo(_e)},k(v.value.delete),9,Ih))]))),128)),!G.value&&$n.value.length<mn.value.maxCount?(p(),h("label",Dh,[f("input",{type:"file",accept:mn.value.accept?mn.value.accept.join(","):".pdf,.doc,.docx,.xls,.xlsx,.png,.jpg,.jpeg",hidden:"",onChange:Zo},null,40,Ph),f("span",null,k(v.value.uploadFileAdd(mn.value.maxSizeMB)),1)])):V("",!0)])):j.value.controlId==="switch-control"?(p(),h("div",Oh,[f("button",{type:"button",role:"switch","aria-checked":Yl.value,class:se(["fs-switch",{"is-on":Yl.value}]),disabled:G.value,onClick:k_},[..._[29]||(_[29]=[f("span",{class:"fs-switch__thumb"},null,-1)])],10,Rh),f("span",Lh,k(Yl.value?S.value.activeText||v.value.switchOn:S.value.inactiveText||v.value.switchOff),1)])):j.value.controlId==="radio-group-control"?(p(),h("div",Nh,[(p(!0),h(le,null,ke(ei.value,K=>(p(),h("button",{key:String(K.code),type:"button",class:se(["fs-chip",{"is-active":S_(K.code)}]),disabled:G.value||K.disabled,onClick:_e=>C_(K)},k(K.name),11,Vh))),128))])):j.value.controlId==="checkbox-group-control"?(p(),h("div",Bh,[(p(!0),h(le,null,ke(ei.value,K=>(p(),h("button",{key:String(K.code),type:"button",class:se(["fs-chip",{"is-active":ti.value.includes(String(K.code))}]),disabled:G.value||K.disabled,onClick:_e=>w_(K)},[ti.value.includes(String(K.code))?(p(),h("span",Kh,"✓")):V("",!0),Je(" "+k(K.name),1)],10,jh))),128))])):j.value.controlId==="stepper-control"?(p(),h("div",Uh,[f("button",{type:"button",class:"fs-stepper-btn",disabled:G.value||Xl.value<=Jl.value,onClick:_[19]||(_[19]=K=>sc(-nc.value))},"−",8,Hh),f("span",qh,[Je(k(Xl.value),1),S.value.unit?(p(),h("span",Wh,k(S.value.unit),1)):V("",!0)]),f("button",{type:"button",class:"fs-stepper-btn",disabled:G.value||Xl.value>=tc.value,onClick:_[20]||(_[20]=K=>sc(nc.value))},"+",8,Gh)])):j.value.controlId==="rate-control"?(p(),h("div",zh,[(p(!0),h(le,null,ke(lc.value,K=>(p(),h("button",{key:K,type:"button",class:se(["fs-rate-star",{"is-on":K<=ni.value}]),disabled:G.value,onClick:_e=>T_(K)}," ★ ",10,Yh))),128)),ni.value>0?(p(),h("span",Jh,k(ni.value)+" / "+k(lc.value),1)):V("",!0)])):j.value.controlId==="slider-control"?(p(),h("div",Xh,[f("input",{type:"range",class:"fs-slider",value:Qa.value,min:S.value.min??0,max:S.value.max??100,step:S.value.step??1,disabled:G.value,onInput:y_},null,40,Zh),f("span",Qh,k(Qa.value),1)])):e.item.type==="list"||j.value.controlId==="list-control"?(p(),h("div",em,[sn.value.length?V("",!0):(p(),h("div",tm,k(v.value.listEmpty),1)),(p(!0),h(le,null,ke(sn.value,(K,_e)=>(p(),h("div",{key:_e,class:"fs-list__card","data-list-index":_e},[f("div",sm,[f("span",lm,k(v.value.listItemTitle(_e+1)),1),ic.value?(p(),h("button",{key:0,type:"button",class:"fs-list__del",onClick:ye=>M_(_e)},k(v.value.delete),9,am)):V("",!0)]),f("div",im,[(p(!0),h(le,null,ke(si.value,ye=>{var ai,uc;return p(),h("div",{key:ye.key,class:"fs-list__subrow"},[f("label",rm,[ye.required?(p(),h("span",om,"*")):V("",!0),Je(k(ye.label||ye.key),1)]),ye.type==="select"&&Array.isArray(ye.initOptions)?(p(),h("select",{key:0,class:"fs-list__subselect",value:Us(K,ye),disabled:G.value,onChange:St=>Hs(_e,ye,St.target.value)},[f("option",um,k(ye.placeholder||v.value.selectPlaceholder),1),(p(!0),h(le,null,ke(ye.initOptions,St=>(p(),h("option",{key:String(St.code),value:String(St.code)},k(St.name),9,dm))),128))],40,cm)):ye.type==="radioGroup"&&Array.isArray(ye.initOptions)?(p(),h("div",fm,[(p(!0),h(le,null,ke(ye.initOptions,St=>(p(),h("button",{key:String(St.code),type:"button",class:se(["fs-chip fs-chip--sm",{"is-active":Us(K,ye)===String(St.code)}]),disabled:G.value,onClick:pk=>Hs(_e,ye,String(St.code))},k(St.name),11,vm))),128))])):ye.type==="switch"?(p(),h("button",{key:2,type:"button",class:se(["fs-switch",{"is-on":!!(K!=null&&K[ye.key])}]),disabled:G.value,onClick:St=>Hs(_e,ye,K!=null&&K[ye.key]?"":"1")},[..._[30]||(_[30]=[f("span",{class:"fs-switch__thumb"},null,-1)])],10,pm)):ye.type==="date"?(p(),h("input",{key:3,class:"fs-list__subinput",type:"date",value:Us(K,ye),disabled:G.value,onInput:St=>Hs(_e,ye,St.target.value)},null,40,hm)):(p(),h("input",{key:4,class:"fs-list__subinput",value:Us(K,ye),type:ye.type==="phone"?"tel":"text",inputmode:ye.type==="phone"?"numeric":ye.type==="number"?"decimal":"text",maxlength:(ai=ye.props)==null?void 0:ai.maxlength,placeholder:ye.placeholder||v.value.inputPlaceholder,disabled:G.value,onInput:St=>Hs(_e,ye,St.target.value)},null,40,mm)),(uc=rc.value.rowErrors[_e])!=null&&uc[ye.key]?(p(),h("p",gm,k(rc.value.rowErrors[_e][ye.key]),1)):V("",!0)])}),128))])],8,nm))),128)),ac.value?(p(),h("button",{key:1,type:"button",class:"fs-list__add","data-testid":"modern-list-add-btn",onClick:A_},k(Ks.value.addButtonText||v.value.listAddDefault),1)):V("",!0)])):(p(),h("div",ym,[f("span",bm,k(((oc=e.field)==null?void 0:oc.showValue)||((cc=e.field)==null?void 0:cc.value)||v.value.fallbackControl(e.item.type)),1)]))])])),!y.value&&(kt.value||Xt.value)?(p(),h("div",{key:4,class:se(["fs-feedback",{"is-inline":!Ie.value&&!J.value&&j.value.controlId!=="agreement-control"}])},[kt.value?(p(),h("p",{key:0,class:se(["fs-msg",`is-${Ue.value}`])},[_[31]||(_[31]=f("span",{class:"fs-msg__dot"},null,-1)),Je(k(kt.value),1)],2)):V("",!0),Xt.value?(p(),h("p",_m,k(Xt.value),1)):V("",!0)],2)):V("",!0)],14,qv)}}}),[["__scopeId","data-v-8689e4fc"]]),Ho=Pe({__name:"ModernFormItemBridge",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=E(()=>{const s=t.item;return(s==null?void 0:s.raw)||s});return(s,l)=>(p(),st(km,{item:n.value,field:e.field,formCore:e.formCore},null,8,["item","field","formCore"]))}}),Cm=["data-modern-skin","data-group-key"],Sm={key:0,class:"fs-trust-bar"},wm={class:"fs-group__title-wrap"},Tm={class:"fs-group__title"},xm={key:0,class:"fs-group__err-badge"},$m={class:"fs-group__head-right"},Am={class:"fs-group__card"},Mm=Ke(Pe({__name:"ModernFormGroup",props:{group:{},fields:{},formCore:{}},setup(e){const t=e,n=je("FormItemComponent",void 0),s=je(Wa,"fin-minimal"),l=je(No,null),a=je(Vo,!1),i=je(ts,"zh-CN"),r=E(()=>wt(Kt(Ee(i)))),o=E(()=>{const b=Ee(s);return b&&Dt[b]?b:"fin-minimal"}),u=E(()=>{const b=Ee(l);return b&&typeof b=="object"?b:null}),c=E(()=>Mo(o.value,u.value)),d=E(()=>sv(o.value,u.value)),v=E(()=>!!Ee(a)),A=H(!1),x=E(()=>n?Ee(n):Ho),M=E(()=>t.group.items.filter(b=>{const C=t.fields[b.key];return!C||C.visible!==!1})),w=E(()=>{var C;let b=0;for(const B of M.value)Eo((C=t.fields[B.key])==null?void 0:C.value)&&(b+=1);return b}),O=E(()=>{var C;let b=0;for(const B of M.value)(C=t.fields[B.key])!=null&&C.errMsg&&(b+=1);return b});ut(O,b=>{b>0&&A.value&&(A.value=!1)}),ut(v,b=>{b||(A.value=!1)});function y(){v.value&&(A.value=!A.value)}return(b,C)=>M.value.length>0?(p(),h("section",{key:0,class:se(["fs-group",{"is-collapsed":A.value}]),"data-modern-skin":o.value,"data-group-key":e.group.key,style:$t(c.value)},[d.value?(p(),h("div",Sm,[C[0]||(C[0]=f("svg",{class:"fs-trust-bar__icon",viewBox:"0 0 16 16",fill:"none"},[f("path",{d:"M8 1.5L2.5 3.8v4.1c0 3.3 2.3 6 5.5 6.8 3.2-.8 5.5-3.5 5.5-6.8V3.8L8 1.5z",stroke:"currentColor","stroke-width":"1.4","stroke-linejoin":"round"}),f("path",{d:"M5.6 8.1L7.3 9.7L10.6 6.4",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),f("span",null,k(r.value.trustBarText),1)])):V("",!0),e.group.title||v.value?(p(),h("header",{key:1,class:se(["fs-group__head",{"is-collapsible":v.value}]),onClick:y},[f("div",wm,[f("span",Tm,k(e.group.title||r.value.defaultGroupTitle),1),O.value>0?(p(),h("span",xm,k(r.value.groupErrorBadge(O.value)),1)):V("",!0)]),f("div",$m,[f("span",{class:se(["fs-group__progress",{"is-done":w.value===M.value.length}])},k(w.value)+"/"+k(M.value.length),3),v.value?(p(),h("span",{key:0,class:se(["fs-group__chevron",{"is-folded":A.value}]),"aria-hidden":"true"}," ▾ ",2)):V("",!0)])],2)):V("",!0),Gi(f("div",Am,[(p(!0),h(le,null,ke(M.value,(B,D)=>(p(),st(Xn(x.value),{key:B.key,item:B,field:e.fields[B.key],formCore:e.formCore,"data-last-item":D===M.value.length-1?"1":void 0},null,8,["item","field","formCore","data-last-item"]))),128))],512),[[bd,!A.value]])],14,Cm)):V("",!0)}}),[["__scopeId","data-v-3b6906d4"]]);function Em(){return{FormGroupComponent:Mm,FormItemComponent:Ho}}const Fm={class:"ctrl-input-wrapper"},Im=["value","placeholder","disabled","maxlength"],Dm=["type","value","placeholder","disabled","maxlength"],Pm=Ke(Pe({__name:"InputControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){var o;const n=e,s=t,l=H(((o=n.field)==null?void 0:o.value)||"");ut(()=>{var u;return(u=n.field)==null?void 0:u.value},u=>{l.value=u||""});const a=E(()=>n.item.type==="textarea");function i(u){const c=u.target;l.value=c.value}function r(u){var v;const d=((v=u.target.value)==null?void 0:v.trim())||"";l.value=d,s("change",{value:d,eventType:"inputBlur"})}return(u,c)=>{var d,v,A,x,M;return p(),h("div",Fm,[a.value?(p(),h("textarea",{key:0,class:"ctrl-input ctrl-textarea",value:l.value,placeholder:e.item.placeholder||"请输入",disabled:(d=e.field)==null?void 0:d.disabled,maxlength:(v=e.item.props)==null?void 0:v.maxlength,rows:"3",onInput:i,onBlur:r},null,40,Im)):(p(),h("input",{key:1,class:"ctrl-input",type:e.item.type==="number"?"number":e.item.type==="phone"?"tel":"text",value:l.value,placeholder:e.item.placeholder||"请输入",disabled:(A=e.field)==null?void 0:A.disabled,maxlength:(x=e.item.props)==null?void 0:x.maxlength,onInput:i,onBlur:r},null,40,Dm)),(M=e.item.props)!=null&&M.guideText?(p(),h("span",{key:2,class:"ctrl-guide",onClick:c[0]||(c[0]=w=>s("change",{eventType:"guideClick"}))},"查看示例")):V("",!0)])}}}),[["__scopeId","data-v-9fecb669"]]),Om={class:"ctrl-select"},Rm={class:"panel-header"},Lm={class:"panel-title"},Nm={class:"panel-body",role:"listbox"},Vm=["aria-selected","onClick"],Bm={class:"option-text"},jm=Ke(Pe({__name:"SelectControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){const n=e,s=t,l=H(!1),a=E(()=>{var A,x;const d=((A=n.item)==null?void 0:A.initOptions)||[],v=(x=n.field)==null?void 0:x.value;return v?d.map(M=>{var w;return{...M,_selected:((w=n.item.props)==null?void 0:w.isSingle)!==!1?(v==null?void 0:v.code)===M.code:Array.isArray(v)?v.some(O=>O.code===M.code):v===M.code}}):d}),i=E(()=>{var v,A;const d=(v=n.field)==null?void 0:v.value;return d?typeof d=="object"&&d.name?d.name:(A=n.field)!=null&&A.showValue?n.field.showValue:String(d):""}),r=E(()=>{var d;return((d=n.item.props)==null?void 0:d.dialogTitle)||"请选择"});function o(){var d;(d=n.field)!=null&&d.disabled||(l.value=!0)}function u(){l.value=!1}function c(d){var A;((A=n.item.props)==null?void 0:A.isSingle)!==!1&&(s("change",{value:{code:d.code,name:d.name},eventType:"pickChange"}),l.value=!1)}return(d,v)=>{var A;return p(),h("div",Om,[f("div",{class:se(["select-trigger",{disabled:(A=e.field)==null?void 0:A.disabled,placeholder:!i.value}]),onClick:o},[f("span",null,k(i.value||e.item.placeholder||"请选择"),1)],2),Ge(Es,{name:"panel"},{default:jt(()=>[l.value?(p(),h("div",{key:0,class:"select-overlay",onClick:u},[f("div",{class:"select-panel",role:"dialog","aria-label":"选择选项",onClick:v[0]||(v[0]=lt(()=>{},["stop"]))},[f("div",Rm,[f("span",Lm,k(r.value),1),f("button",{class:"panel-close",onClick:u,"aria-label":"关闭"},"×")]),f("div",Nm,[(p(!0),h(le,null,ke(a.value,x=>(p(),h("div",{key:x.code,class:se(["option-card",{"option-selected":x._selected}]),role:"option","aria-selected":x._selected,onClick:M=>c(x)},[f("span",Bm,k(x.name),1),f("span",{class:se(["option-btn",{"option-btn-selected":x._selected}])},k(x._selected?"✓ 已选":"选择"),3)],10,Vm))),128))]),v[1]||(v[1]=f("div",{class:"safe-area-bottom"},null,-1))])])):V("",!0)]),_:1})])}}}),[["__scopeId","data-v-7c19c7ab"]]),Km={class:"ctrl-cascader"},Um=["aria-label"],Hm={class:"panel-header"},qm={class:"panel-title"},Wm={key:0,class:"panel-path"},Gm={class:"panel-body",role:"listbox"},zm=["onClick"],Ym={class:"option-text"},Jm={key:0,class:"option-arrow"},Xm={key:0,class:"option-empty"},Zm=Ke(Pe({__name:"CascaderControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){const n=e,s=t,l=H(!1),a=H([]),i=E(()=>{var x;return((x=n.item)==null?void 0:x.initOptions)||[]}),r=E(()=>{var x;return a.value.length===0?i.value:((x=a.value[a.value.length-1])==null?void 0:x.child)||[]}),o=E(()=>{var M,w;const x=(M=n.field)==null?void 0:M.value;if(!x)return"";if(typeof x=="object"&&x!==null){if(Array.isArray(x.pathNames))return x.pathNames.join(" / ");if(x.name)return String(x.name);if(x.showValue)return String(x.showValue)}return(w=n.field)!=null&&w.showValue?String(n.field.showValue):String(x)}),u=E(()=>{var x;return((x=n.item.props)==null?void 0:x.dialogTitle)||n.item.label||"请选择"});function c(){var x;(x=n.field)!=null&&x.disabled||(a.value=[],l.value=!0)}function d(){l.value=!1}function v(x){const M=[...a.value,x];if(x.child&&x.child.length>0){a.value=M;return}s("change",{value:{code:x.code,name:x.name,pathCodes:M.map(w=>w.code),pathNames:M.map(w=>w.name)},eventType:"pickChange"}),l.value=!1}function A(){a.value=a.value.slice(0,-1)}return(x,M)=>{var w;return p(),h("div",Km,[f("div",{class:se(["cascader-trigger",{disabled:(w=e.field)==null?void 0:w.disabled,placeholder:!o.value}]),onClick:c},[f("span",null,k(o.value||e.item.placeholder||"请选择"),1)],2),Ge(Es,{name:"panel"},{default:jt(()=>[l.value?(p(),h("div",{key:0,class:"cascader-overlay",onClick:d},[f("div",{class:"cascader-panel",role:"dialog","aria-label":u.value,onClick:M[0]||(M[0]=lt(()=>{},["stop"]))},[f("div",Hm,[a.value.length?(p(),h("button",{key:0,type:"button",class:"panel-back","aria-label":"返回上一级",onClick:A}," ‹ ")):V("",!0),f("span",qm,k(u.value),1),f("button",{type:"button",class:"panel-close","aria-label":"关闭",onClick:d},"×")]),a.value.length?(p(),h("div",Wm,k(a.value.map(O=>O.name).join(" / ")),1)):V("",!0),f("div",Gm,[(p(!0),h(le,null,ke(r.value,O=>{var y;return p(),h("div",{key:O.code,class:"option-card",role:"option",onClick:b=>v(O)},[f("span",Ym,k(O.name),1),(y=O.child)!=null&&y.length?(p(),h("span",Jm,"›")):V("",!0)],8,zm)}),128)),r.value.length?V("",!0):(p(),h("div",Xm,"暂无选项"))]),M[1]||(M[1]=f("div",{class:"safe-area-bottom"},null,-1))],8,Um)])):V("",!0)]),_:1})])}}}),[["__scopeId","data-v-5e26815b"]]),Qm={class:"ctrl-search"},eg=["value","placeholder","disabled"],tg={key:0,class:"search-icon loading"},ng=["onClick"],sg={class:"result-name"},lg={key:0,class:"result-code"},ag={key:0,class:"search-hint"},ig=Ke(Pe({__name:"SearchControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){const n=e,s=t,l=H(""),a=H([]),i=H(!1),r=H(!1),o=H(!1),u=E(()=>{var b;return((b=n.item.props)==null?void 0:b.searchApi)||""}),c=H(null),d=H({});ut(()=>{var b;return(b=n.field)==null?void 0:b.value},b=>{o.value||(b&&typeof b=="object"&&b.name?l.value=b.name:typeof b=="string"&&b?l.value=b:l.value="")},{immediate:!0});function v(){if(!c.value)return;const b=c.value.getBoundingClientRect();d.value={position:"fixed",top:`${b.bottom+2}px`,left:`${b.left}px`,width:`${b.width}px`}}let A=null;function x(b){const C=b.target;l.value=C.value,o.value=!0,A&&clearTimeout(A),A=setTimeout(()=>{l.value.trim()?M(l.value.trim()):(a.value=[],i.value=!1)},200)}async function M(b){if(u.value){r.value=!0;try{const C=await n.formCore.fetchApi(u.value,{keywords:b}),B=Array.isArray(C)?C:(C==null?void 0:C.data)||(C==null?void 0:C.list)||[];a.value=B,B.length>0&&(v(),i.value=!0)}catch{a.value=[],i.value=!1}finally{r.value=!1}}}function w(b){s("change",{value:b.name,eventType:"searchChange"}),l.value=b.name,o.value=!1,i.value=!1}function O(){a.value.length>0&&l.value&&(v(),i.value=!0)}function y(){i.value=!1,a.value=[],o.value&&s("change",{value:l.value.trim(),eventType:"inputBlur"}),o.value=!1}return(b,C)=>{var B;return p(),h("div",Qm,[f("div",{ref_key:"wrapRef",ref:c,class:"search-input-wrap"},[f("input",{class:"search-input",type:"text",value:l.value,placeholder:e.item.placeholder||"请输入关键词搜索",disabled:(B=e.field)==null?void 0:B.disabled,onInput:x,onFocus:O,onBlur:y},null,40,eg),r.value?(p(),h("span",tg,"⏳")):V("",!0)],512),(p(),st(fl,{to:"body"},[i.value&&a.value.length>0?(p(),h("div",{key:0,class:"search-dropdown",style:$t(d.value)},[(p(!0),h(le,null,ke(a.value,D=>(p(),h("div",{key:D.code,class:"search-result-item",onMousedown:C[0]||(C[0]=lt(()=>{},["prevent"])),onClick:U=>w(D)},[f("span",sg,k(D.name),1),D.code?(p(),h("span",lg,k(D.code),1)):V("",!0)],40,ng))),128))],4)):V("",!0)])),u.value?V("",!0):(p(),h("div",ag," ⚠ 未配置 searchApi "))])}}}),[["__scopeId","data-v-9acab941"]]),rg={class:"ctrl-address"},og={class:"addr-hd"},cg={class:"addr-crumbs"},ug=["onClick"],dg={class:"addr-body"},fg={key:0,class:"addr-loading"},vg=["onClick"],pg={key:0,class:"addr-check"},hg={key:1,class:"addr-empty"},mg=Ke(Pe({__name:"AddressControl",props:{item:{},field:{},formCore:{},onFetchLinkage:{}},emits:["change"],setup(e,{emit:t}){const n=e,s=t,l=E(()=>{var D,U;return((U=(D=n.item)==null?void 0:D.props)==null?void 0:U.linkageUrl)||"service/geo_code"}),a=E(()=>{var D,U;return((U=(D=n.item)==null?void 0:D.props)==null?void 0:U.mapLevel)||3}),i=H(!1),r=H(0),o=H(!1),u=H(!1),c=H([]),d=H([{adcode:"",name:"请选择"}]),v=new Map,A=E(()=>{var U,q,R;const D=(U=n.field)==null?void 0:U.value;if(Array.isArray(D)&&D.length)return D.map(j=>j.name).join("");if((q=n.field)!=null&&q.showValue)return n.field.showValue;if(D&&typeof D=="object"){const j=[D.province,D.city,D.country].filter(Boolean);if(j.length)return j.join("")}return(R=n.field)!=null&&R.province?[n.field.province,n.field.city,n.field.country].filter(Boolean).join(""):typeof D=="string"&&D?D:""}),x=E(()=>d.value.slice(0,a.value));function M(){var D;return n.onFetchLinkage?n.onFetchLinkage:(D=n.formCore)!=null&&D._linkageFetcher?n.formCore._linkageFetcher:async()=>({data:[]})}async function w(D){var j,J,S;o.value=!0;const U=M(),q=d.value.filter(G=>G.adcode),R={province_code:((j=q[0])==null?void 0:j.adcode)||"",city_code:((J=q[1])==null?void 0:J.adcode)||"",district_code:((S=q[2])==null?void 0:S.adcode)||""};try{const G=await U(R,l.value);if(G.data===null){d.value=d.value.filter(Le=>Le.adcode),u.value=!0,o.value=!1,B();return}c.value=G.data||[];const he=D||R.district_code||R.city_code||R.province_code||"root";c.value.length>0&&v.set(he,c.value)}catch{}finally{o.value=!1}}function O(){var q,R;if((q=n.field)!=null&&q.disabled)return;r.value=0;const D=(R=n.field)==null?void 0:R.value;Array.isArray(D)&&D.length&&D[0].code?(d.value=D.map(j=>({adcode:j.code,name:j.name})),u.value=d.value.length>=2):(d.value=[{adcode:"",name:"请选择"}],u.value=!1),i.value=!0;const U=v.get("root");U?c.value=U:w("root")}function y(){i.value=!1}function b(D){if(o.value||!D.adcode)return;const U={71e4:1,81e4:2,82e4:2},q=[...d.value];D.brother=c.value,q[r.value]=D;const R=U[D.adcode];if(R!==void 0){q.splice(R,q.length-R),d.value=q.filter(S=>S.adcode),u.value=!0,B();return}if(r.value<a.value-1&&(q[r.value+1]={adcode:"",name:""},q.splice(r.value+2)),r.value+=1,d.value=q.slice(0,a.value),q.filter(S=>S.adcode).length>=a.value){u.value=!0,B();return}const J=v.get(D.adcode);J?c.value=J:w(D.adcode)}function C(D){var R;r.value=D,u.value=!1;const U=d.value.slice(0,D+1);U[D].adcode||(U[D]={adcode:"",name:"请选择"}),d.value=U;const q=d.value[D];if(q.adcode&&q.brother)c.value=q.brother;else{const j=D>0?(R=d.value[D-1])==null?void 0:R.adcode:"root",J=v.get(j);J?c.value=J:w(j)}}function B(){const D=d.value.filter(R=>R.adcode);if(D.length===0)return;const U=D.map(R=>({code:R.adcode,name:R.name})),q={showValue:""};U.forEach((R,j)=>{q.showValue+=R.name,j===0&&(q.province_code=R.code,q.province=R.name),j===1&&(q.city_code=R.code,q.city=R.name),j===2&&(q.country_code=R.code,q.country=R.name)}),s("change",{value:U,eventType:"pickChange",...q}),i.value=!1}return ut(()=>{var D;return(D=n.field)==null?void 0:D.value},D=>{!i.value&&Array.isArray(D)&&D.length&&(d.value=D.map(U=>({adcode:U.code,name:U.name})))}),(D,U)=>{var q;return p(),h("div",rg,[f("div",{class:se(["address-trigger",{disabled:(q=e.field)==null?void 0:q.disabled,placeholder:!A.value}]),onClick:O},[f("span",null,k(A.value||e.item.placeholder||"请选择省市区"),1)],2),Ge(Es,{name:"addr-fade"},{default:jt(()=>[i.value?(p(),h("div",{key:0,class:"addr-mask",onClick:y},[Ge(Es,{name:"addr-slide"},{default:jt(()=>[i.value?(p(),h("div",{key:0,class:"addr-panel",onClick:U[1]||(U[1]=lt(()=>{},["stop"]))},[f("div",og,[f("span",{class:"addr-hd-cancel",onClick:y},"取消"),U[2]||(U[2]=f("span",{class:"addr-hd-title"},"选择地址",-1)),f("span",{class:se(["addr-hd-ok",{on:u.value}]),onClick:U[0]||(U[0]=R=>u.value?B():null)},"确定",2)]),f("div",cg,[(p(!0),h(le,null,ke(x.value,(R,j)=>(p(),h(le,{key:j},[f("span",{class:se(["addr-dot",{cur:j===r.value,done:!!R.adcode&&j<r.value}])},null,2),f("span",{class:se(["addr-label",{cur:j===r.value,done:!!R.adcode}]),onClick:J=>R.adcode?C(j):null},k(R.adcode?R.name:"请选择"),11,ug),j<x.value.length-1?(p(),h("span",{key:0,class:se(["addr-line",{done:!!R.adcode&&j<r.value}])},null,2)):V("",!0)],64))),128))]),f("div",dg,[o.value?(p(),h("div",fg,[...U[3]||(U[3]=[f("span",{class:"addr-spinner"},null,-1),Je("加载中...",-1)])])):V("",!0),(p(!0),h(le,null,ke(c.value,R=>{var j,J;return p(),h("div",{key:R.adcode,class:se(["addr-item",{sel:((j=d.value[r.value])==null?void 0:j.adcode)===R.adcode}]),onClick:S=>b(R)},[f("span",null,k(R.name),1),((J=d.value[r.value])==null?void 0:J.adcode)===R.adcode?(p(),h("span",pg,"✓")):V("",!0)],10,vg)}),128)),!o.value&&c.value.length===0?(p(),h("div",hg,"暂无数据")):V("",!0)]),U[4]||(U[4]=f("div",{class:"addr-safe"},null,-1))])):V("",!0)]),_:1})])):V("",!0)]),_:1})])}}}),[["__scopeId","data-v-dfbeea42"]]),gg={class:"ctrl-agreement"},yg={key:0,class:"check-mark"},bg={class:"agreement-text"},_g=Ke(Pe({__name:"AgreementControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){const n=e,s=t,l=E(()=>{var u;return((u=n.item.props)==null?void 0:u.trueValue)??"true"}),a=E(()=>{var u;return((u=n.item.props)==null?void 0:u.falseValue)??""}),i=E(()=>{var c;const u=(c=n.field)==null?void 0:c.value;return u===l.value||u===!0||u===1||u==="1"}),r=E(()=>{var u;return n.item.label||((u=n.item.props)==null?void 0:u.guideText)||"本人已阅读并同意相关协议"});function o(){var c;if((c=n.field)!=null&&c.disabled)return;const u=i.value?a.value:l.value;s("change",{value:u,eventType:"pickChange"})}return(u,c)=>{var d;return p(),h("div",gg,[f("label",{class:"agreement-row",onClick:lt(o,["prevent"])},[f("span",{class:se(["checkbox",{checked:i.value,disabled:(d=e.field)==null?void 0:d.disabled}])},[i.value?(p(),h("span",yg,"✓")):V("",!0)],2),f("span",bg,k(r.value),1)])])}}}),[["__scopeId","data-v-76cc5619"]]),kg={class:"task-label"},Cg={class:"modal-card"},Sg={class:"modal-header"},wg={class:"modal-body"},Tg=["onUpdate:modelValue","placeholder"],qo=Ke(Pe({__name:"SubFormTask",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=H(!1),s=H({}),l=E(()=>{var v;const c=(v=t.item.props)==null?void 0:v.taskType,d={contact_info:[{label:"联系人姓名",key:"name",placeholder:"请输入姓名"},{label:"关系",key:"relation",placeholder:"如:朋友、同事"},{label:"联系电话",key:"phone",placeholder:"请输入手机号"}],business_info:[{label:"企业名称",key:"company",placeholder:"请输入企业名称"},{label:"经营范围",key:"scope",placeholder:"请输入经营范围"}],card_info_auth:[{label:"姓名",key:"name",placeholder:"请输入姓名"},{label:"身份证号",key:"idNumber",placeholder:"请输入身份证号"}],default:[{label:"字段1",key:"field1",placeholder:"请输入"},{label:"字段2",key:"field2",placeholder:"请输入"}]};return d[c]||d.default});function a(){s.value={},l.value.forEach(c=>{s.value[c.key]=""}),n.value=!0}function i(){n.value=!1,pn(t.formCore,t.item.key,{...s.value,_completed:!0,_completedAt:new Date().toISOString()})}function r(){n.value=!1}function o(c){c.stopPropagation(),c.target===c.currentTarget&&r()}const u=E(()=>{var d;const c=(d=t.field)==null?void 0:d.value;return c&&typeof c=="object"&&c._completed});return(c,d)=>(p(),h("div",{class:"task-subform",onClick:a},[f("div",{class:se(["task-trigger",{completed:u.value}])},[d[0]||(d[0]=f("span",{class:"task-icon"},"📋",-1)),f("span",kg,k(u.value?"✅ 已完成":e.item.placeholder||"点击填写子表单"),1),d[1]||(d[1]=f("span",{class:"task-arrow"},"▸",-1))],2),n.value?(p(),h("div",{key:0,class:"modal-overlay",onClick:o},[f("div",Cg,[f("div",Sg,[f("span",null,k(e.item.label||"子表单"),1),f("button",{class:"modal-close",onClick:r},"✕")]),f("div",wg,[(p(!0),h(le,null,ke(l.value,v=>(p(),h("div",{key:v.key,class:"modal-field"},[f("label",null,k(v.label),1),Gi(f("input",{"onUpdate:modelValue":A=>s.value[v.key]=A,placeholder:v.placeholder,class:"modal-input"},null,8,Tg),[[Ld,s.value[v.key]]])]))),128))]),f("div",{class:"modal-footer"},[f("button",{class:"btn-cancel",onClick:r},"取消"),f("button",{class:"btn-confirm",onClick:i},"确认")])])])):V("",!0)]))}}),[["__scopeId","data-v-1d2ebfc0"]]),xg={class:"task-label"},$g={class:"confirm-card"},Ag={class:"confirm-url"},Mg=Ke(Pe({__name:"H5JumpTask",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=H(!1),s=E(()=>{var u,c;return((u=t.item.props)==null?void 0:u.h5link)||((c=t.item.props)==null?void 0:c.taxLink)||"https://example.com/task"});function l(){n.value=!0}function a(){n.value=!1,setTimeout(()=>{pn(t.formCore,t.item.key,{url:s.value,_completed:!0,_completedAt:new Date().toISOString(),_mock:"模拟 H5 跳转已返回"})},500)}function i(){n.value=!1}function r(u,c){u.stopPropagation(),u.target===u.currentTarget&&c()}const o=E(()=>{var c;const u=(c=t.field)==null?void 0:c.value;return u&&typeof u=="object"&&u._completed});return(u,c)=>(p(),h("div",{class:"task-h5",onClick:l},[f("div",{class:se(["task-trigger",{completed:o.value}])},[c[1]||(c[1]=f("span",{class:"task-icon"},"🌐",-1)),f("span",xg,k(o.value?"✅ 已完成":e.item.placeholder||"点击跳转 H5 页面"),1),c[2]||(c[2]=f("span",{class:"task-badge"},"H5",-1)),c[3]||(c[3]=f("span",{class:"task-arrow"},"▸",-1))],2),n.value?(p(),h("div",{key:0,class:"modal-overlay",onClick:c[0]||(c[0]=d=>r(d,i))},[f("div",$g,[c[4]||(c[4]=f("div",{class:"confirm-icon"},"🌐",-1)),c[5]||(c[5]=f("div",{class:"confirm-title"},"即将跳转到外部页面",-1)),f("div",Ag,k(s.value),1),c[6]||(c[6]=f("div",{class:"confirm-hint"},"(Demo 模拟:实际将打开外部链接)",-1)),f("div",{class:"confirm-actions"},[f("button",{class:"btn-cancel",onClick:i},"取消"),f("button",{class:"btn-confirm",onClick:a},"确认跳转")])])])):V("",!0)]))}}),[["__scopeId","data-v-38867de4"]]),Eg={class:"task-icon"},Fg={class:"task-label"},Ig={class:"sig-card"},Dg={class:"sig-header"},Pg={class:"sig-body"},Og={key:0,class:"sig-placeholder"},Rg={class:"sig-footer"},Lg=["disabled"],Ng={class:"map-card"},Vg={class:"map-header"},Bg={class:"native-card"},jg={class:"native-icon"},Kg={class:"native-title"},Ug={class:"native-desc"},Hg={class:"native-actions"},Ga=Ke(Pe({__name:"NativeTask",props:{item:{},field:{},formCore:{}},setup(e){_d(J=>({v77bda564:j.value}));const t=e,n=E(()=>{var J;return((J=t.item.props)==null?void 0:J.taskType)||""}),s=H(!1),l=H(null),a=H(!1),i=H(null),r=H(!1);function o(){s.value=!0,r.value=!1,zn(()=>{const J=l.value;if(!J)return;const S=window.devicePixelRatio||1,G=J.getBoundingClientRect();J.width=G.width*S,J.height=G.height*S;const he=J.getContext("2d");he.scale(S,S),he.strokeStyle="#333",he.lineWidth=3,he.lineCap="round",he.lineJoin="round",i.value=he})}function u(J){const G=l.value.getBoundingClientRect(),he="touches"in J?J.touches[0].clientX:J.clientX,Le="touches"in J?J.touches[0].clientY:J.clientY;return{x:he-G.left,y:Le-G.top}}function c(J){J.preventDefault(),a.value=!0,r.value=!0;const{x:S,y:G}=u(J);i.value.beginPath(),i.value.moveTo(S,G)}function d(J){if(J.preventDefault(),!a.value)return;const{x:S,y:G}=u(J);i.value.lineTo(S,G),i.value.stroke()}function v(){a.value=!1}function A(){const J=l.value;i.value.clearRect(0,0,J.width,J.height),r.value=!1}function x(){const J=l.value.toDataURL("image/png");s.value=!1,pn(t.formCore,t.item.key,{signatureDataUrl:J,_completed:!0,_completedAt:new Date().toISOString()})}function M(){s.value=!1}const w=H(!1);function O(){w.value=!0}function y(){w.value=!1,pn(t.formCore,t.item.key,{lng:116.404+Math.random()*.1,lat:39.915+Math.random()*.1,address:`模拟选点地址 ${Date.now()}`,_completed:!0,_completedAt:new Date().toISOString()})}const b=H(!1);function C(){b.value=!0}function B(){b.value=!1,pn(t.formCore,t.item.key,{_completed:!0,_completedAt:new Date().toISOString(),_mock:`已完成原生任务: ${n.value}`})}function D(J,S){J.stopPropagation(),J.target===J.currentTarget&&S()}function U(){n.value==="signature"?o():n.value==="map"?O():C()}const q=E(()=>{var S;const J=(S=t.field)==null?void 0:S.value;return J&&typeof J=="object"&&J._completed}),R=E(()=>n.value==="signature"?"✍️":n.value==="map"?"📍":"📱"),j=E(()=>n.value==="signature"?"#eb2f96":n.value==="map"?"#2f54eb":"#fa8c16");return(J,S)=>(p(),h("div",{class:"task-native",onClick:U},[f("div",{class:se(["task-trigger",{completed:q.value}])},[f("span",Eg,k(R.value),1),f("span",Fg,k(q.value?"✅ 已完成":e.item.placeholder||`点击完成${e.item.label}`),1),S[4]||(S[4]=f("span",{class:"task-arrow"},"▸",-1))],2),s.value?(p(),h("div",{key:0,class:"modal-overlay",onClick:S[0]||(S[0]=G=>D(G,M))},[f("div",Ig,[f("div",Dg,[f("span",null,k(e.item.label||"手写签名"),1),f("button",{class:"modal-close",onClick:M},"✕")]),f("div",Pg,[f("canvas",{ref_key:"canvasRef",ref:l,class:"sig-canvas",onMousedown:c,onMousemove:d,onMouseup:v,onMouseleave:v,onTouchstart:c,onTouchmove:d,onTouchend:v},null,544),r.value?V("",!0):(p(),h("div",Og,"在此处签名"))]),f("div",Rg,[f("button",{class:"btn-clear",onClick:A},"清除"),f("button",{class:"btn-confirm-sig",onClick:x,disabled:!r.value},"确认签名",8,Lg)])])])):V("",!0),w.value?(p(),h("div",{key:1,class:"modal-overlay",onClick:S[1]||(S[1]=G=>D(G,y))},[f("div",Ng,[f("div",Vg,[f("span",null,k(e.item.label||"地图选点"),1),f("button",{class:"modal-close",onClick:y},"✕")]),S[5]||(S[5]=f("div",{class:"map-placeholder"},[f("span",{class:"map-pin"},"📍"),f("p",null,"地图选点(Demo 模拟)"),f("p",{class:"map-hint"},"点击任意位置确认选点")],-1)),f("div",{class:"map-footer"},[f("button",{class:"btn-confirm-sig",onClick:y},"在此位置选点")])])])):V("",!0),b.value?(p(),h("div",{key:2,class:"modal-overlay",onClick:S[3]||(S[3]=G=>D(G,()=>b.value=!1))},[f("div",Bg,[f("div",jg,k(R.value),1),f("div",Kg,k(e.item.label||"原生页面任务"),1),S[6]||(S[6]=f("div",{class:"native-hint"},"(Demo 模拟:实际将拉起原生页面)",-1)),f("div",Ug,"taskType: "+k(n.value),1),f("div",Hg,[f("button",{class:"btn-cancel",onClick:S[2]||(S[2]=G=>b.value=!1)},"取消"),f("button",{class:"btn-confirm-sig",onClick:B},"模拟完成")])])])):V("",!0)]))}}),[["__scopeId","data-v-07b1216e"]]),qg={class:"task-icon"},Wg={class:"task-label"},Gg={key:0,class:"spinner"},zg={key:1,class:"task-arrow"},Yg=Ke(Pe({__name:"ApiTask",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=H(!1),s=H(""),l=E(()=>{var o;return((o=t.item.props)==null?void 0:o.taskType)||""}),a=E(()=>pf()[l.value]);async function i(){if(!n.value){n.value=!0,s.value="";try{if(a.value){const o=await a.value(t.formCore,t.item.key);n.value=!1,pn(t.formCore,t.item.key,{...o,_completed:!0,_completedAt:new Date().toISOString()})}else await new Promise(o=>setTimeout(o,800)),n.value=!1,pn(t.formCore,t.item.key,{code:"00",data:{id:`mock_${Date.now()}`,name:`模拟${t.item.label}结果`},_completed:!0,_completedAt:new Date().toISOString()})}catch(o){n.value=!1,s.value=(o==null?void 0:o.message)||"请求失败",setTimeout(()=>{s.value=""},3e3)}}}const r=E(()=>{var u;const o=(u=t.field)==null?void 0:u.value;return o&&typeof o=="object"&&o._completed});return(o,u)=>(p(),h("div",{class:"task-api",onClick:i},[f("div",{class:se(["task-trigger",{completed:r.value,loading:n.value,error:!!s.value}])},[f("span",qg,k(n.value?"⏳":s.value?"⚠️":"🔌"),1),f("span",Wg,[n.value?(p(),h(le,{key:0},[Je("请求中...")],64)):s.value?(p(),h(le,{key:1},[Je(k(s.value),1)],64)):r.value?(p(),h(le,{key:2},[Je("✅ 已完成")],64)):(p(),h(le,{key:3},[Je(k(e.item.placeholder||`点击获取${e.item.label}`),1)],64))]),n.value?(p(),h("span",Gg)):(p(),h("span",zg,"▸"))],2)]))}}),[["__scopeId","data-v-a9e2ea16"]]),Jg={class:"task-icon"},Xg={class:"task-label"},Zg={key:0,class:"progress-bar"},Qg=Ke(Pe({__name:"CustomerTask",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=H(!1),s=H(0),l=E(()=>{var o;return((o=t.item.props)==null?void 0:o.taskType)||""});function a(){if(n.value)return;n.value=!0,s.value=0;const o=setInterval(()=>{s.value+=20,s.value>=100&&(clearInterval(o),n.value=!1,pn(t.formCore,t.item.key,{score:Math.floor(Math.random()*30)+70,passed:!0,_completed:!0,_completedAt:new Date().toISOString()}))},400)}const i=E(()=>{var u;const o=(u=t.field)==null?void 0:u.value;return o&&typeof o=="object"&&o._completed}),r=E(()=>l.value==="face_verify_sign"?"👤":"📷");return(o,u)=>(p(),h("div",{class:"task-customer",onClick:a},[f("div",{class:se(["task-trigger",{completed:i.value,loading:n.value}])},[f("span",Jg,k(r.value),1),f("span",Xg,k(n.value?"检测中...":i.value?"✅ 已完成":e.item.placeholder||`点击启动${e.item.label}`),1),u[0]||(u[0]=f("span",{class:"task-badge"},"SDK",-1))],2),n.value?(p(),h("div",Zg,[f("div",{class:"progress-fill",style:$t({width:s.value+"%"})},null,4)])):V("",!0)]))}}),[["__scopeId","data-v-cff849a4"]]),ey={class:"task-label"},ty={class:"inline-card"},ny={class:"inline-link"},sy=Ke(Pe({__name:"InlineTask",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=H(!1),s=E(()=>{var u;return((u=t.item.props)==null?void 0:u.taxLink)||`https://tax.example.com/copy?id=${Date.now()}`});function l(){n.value=!0}function a(){var u;n.value=!1,(u=navigator.clipboard)==null||u.writeText(s.value).catch(()=>{}),pn(t.formCore,t.item.key,{copied:!0,url:s.value,_completed:!0,_completedAt:new Date().toISOString()})}function i(){n.value=!1}function r(u,c){u.stopPropagation(),u.target===u.currentTarget&&c()}const o=E(()=>{var c;const u=(c=t.field)==null?void 0:c.value;return u&&typeof u=="object"&&u._completed});return(u,c)=>(p(),h("div",{class:"task-inline",onClick:l},[f("div",{class:se(["task-trigger",{completed:o.value}])},[c[1]||(c[1]=f("span",{class:"task-icon"},"🔗",-1)),f("span",ey,k(o.value?"✅ 已复制":e.item.placeholder||"复制链接"),1),c[2]||(c[2]=f("span",{class:"task-badge"},"inline",-1))],2),n.value?(p(),h("div",{key:0,class:"modal-overlay",onClick:c[0]||(c[0]=d=>r(d,i))},[f("div",ty,[c[3]||(c[3]=f("div",{class:"inline-icon"},"🔗",-1)),c[4]||(c[4]=f("div",{class:"inline-title"},"复制链接",-1)),f("div",ny,k(s.value),1),c[5]||(c[5]=f("div",{class:"inline-hint"},"(Demo 模拟:实际将复制并跳转)",-1)),f("div",{class:"inline-actions"},[f("button",{class:"btn-cancel",onClick:i},"取消"),f("button",{class:"btn-confirm",onClick:a},"复制并完成")])])])):V("",!0)]))}}),[["__scopeId","data-v-a152f69c"]]),ly=Pe({__name:"TaskControl",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=E(()=>{const s=hf(t.item.props);return{subForm:qo,h5:Mg,signature:Ga,map:Ga,native:Ga,api:Yg,customer:Qg,inline:sy}[s]||qo});return(s,l)=>(p(),st(Xn(n.value),{item:e.item,field:e.field,formCore:e.formCore},null,8,["item","field","formCore"]))}}),ay={class:"list-row-head"},iy=["disabled","onClick"],ry=["value","disabled","onChange"],oy={value:""},cy=["value"],uy=["type","value","placeholder","disabled","onBlur"],dy={key:2,class:"list-error"},fy={key:0,class:"list-summary-error"},vy=["disabled"],py={class:"list-hint"},hy=Ke(Pe({__name:"ListControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){const n=e,s=t,l=E(()=>{var b;return Array.isArray((b=n.field)==null?void 0:b.value)?n.field.value:[]}),a=E(()=>n.item.subItems??[]),i=E(()=>{var b;return((b=n.item.listMeta)==null?void 0:b.minItems)??1}),r=E(()=>{var b;return(b=n.item.listMeta)==null?void 0:b.maxItems}),o=E(()=>r.value===void 0||l.value.length<r.value),u=E(()=>{var b;return((b=n.item.listMeta)==null?void 0:b.removable)!==!1&&l.value.length>i.value}),c=E(()=>{var b;return((b=n.field)==null?void 0:b.collectionErrors)??{}});function d(b,C){var B;return((B=l.value[b])==null?void 0:B[C.key])??""}function v(b){return b&&typeof b=="object"?b.code||"":b==null?"":String(b)}function A(b,C,B){const D=l.value.map(U=>({...U}));D[b]={...D[b]??{},[C.key]:B},s("change",{value:D,eventType:"inputBlur"})}function x(b,C,B){const D=B.target;A(b,C,D.value.trim())}function M(b,C,B){const D=B.target,U=(C.initOptions??[]).find(q=>q.code===D.value);A(b,C,U?{code:U.code,name:U.name}:"")}function w(){var b;!o.value||(b=n.field)!=null&&b.disabled||s("change",{value:[...l.value,{}],eventType:"inputChange"})}function O(b){var C;!u.value||(C=n.field)!=null&&C.disabled||s("change",{value:l.value.filter((B,D)=>D!==b),eventType:"inputChange"})}function y(b,C){return c.value[`${n.item.key}[${b}].${C}`]}return(b,C)=>{var B,D,U;return p(),h("div",{class:se(["ctrl-list",{disabled:(B=e.field)==null?void 0:B.disabled}])},[(p(!0),h(le,null,ke(l.value,(q,R)=>{var j,J;return p(),h("article",{key:R,class:"list-row"},[f("div",ay,[f("strong",null,"联系人 "+k(R+1),1),((j=e.item.listMeta)==null?void 0:j.removable)!==!1?(p(),h("button",{key:0,type:"button",class:"remove-button",disabled:!u.value||((J=e.field)==null?void 0:J.disabled),onClick:S=>O(R)}," 删除 ",8,iy)):V("",!0)]),(p(!0),h(le,null,ke(a.value,S=>{var G,he;return p(),h("label",{key:S.key,class:"list-field"},[f("span",{class:se(["list-field-label",{required:S.required}])},k(S.label||S.key),3),S.type==="select"||S.type==="cascader"?(p(),h("select",{key:0,class:"list-input",value:v(d(R,S)),disabled:((G=e.field)==null?void 0:G.disabled)||S.disabled,onChange:Le=>M(R,S,Le)},[f("option",oy,k(S.placeholder||"请选择"),1),(p(!0),h(le,null,ke(S.initOptions||[],Le=>(p(),h("option",{key:Le.code,value:Le.code},k(Le.name),9,cy))),128))],40,ry)):(p(),h("input",{key:1,class:"list-input",type:S.type==="number"?"number":S.type==="phone"?"tel":"text",value:d(R,S),placeholder:S.placeholder||"请输入",disabled:((he=e.field)==null?void 0:he.disabled)||S.disabled,onBlur:Le=>x(R,S,Le)},null,40,uy)),y(R,S.key)?(p(),h("span",dy,k(y(R,S.key)),1)):V("",!0)])}),128))])}),128)),Object.keys(c.value).length?(p(),h("p",fy," 请修改重复或冲突的联系人手机号。 ")):V("",!0),f("button",{type:"button",class:"add-button",disabled:!o.value||((D=e.field)==null?void 0:D.disabled),onClick:w},k(((U=e.item.listMeta)==null?void 0:U.addButtonText)||"+ 添加联系人"),9,vy),f("p",py,k(i.value)+"–"+k(r.value??"∞")+" 项,当前 "+k(l.value.length)+" 项",1)],2)}}}),[["__scopeId","data-v-df895619"]]),my={class:"ctrl-date"},gy=["value","disabled","aria-label"],yy=["value","disabled","aria-label"],by=["value","disabled","aria-label"],_y=Ke(Pe({__name:"DateControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){var v,A,x;const n=e,s=t,l=E(()=>n.item.type==="dateRange"),a=H(o((v=n.field)==null?void 0:v.value)),i=H(u((A=n.field)==null?void 0:A.value)[0]),r=H(u((x=n.field)==null?void 0:x.value)[1]);ut(()=>{var M;return(M=n.field)==null?void 0:M.value},M=>{if(l.value){const[w,O]=u(M);i.value=w,r.value=O}else a.value=o(M)});function o(M){return M==null||M===""?"":String(M)}function u(M){if(Array.isArray(M))return[String(M[0]||""),String(M[1]||"")];if(M&&typeof M=="object"){const w=M;return[String(w.start||""),String(w.end||"")]}return["",""]}function c(M){const w=M.target.value||"";a.value=w,s("change",{value:w,eventType:"pickChange"})}function d(){const M=i.value,w=r.value;s("change",{value:M||w?[M,w]:"",eventType:"pickChange"})}return(M,w)=>{var O,y,b;return p(),h("div",my,[l.value?(p(),h(le,{key:0},[f("input",{class:"ctrl-date-input",type:"date",value:i.value,disabled:(O=e.field)==null?void 0:O.disabled,"aria-label":(e.item.label||"日期")+"开始",onChange:w[0]||(w[0]=C=>{i.value=C.target.value,d()})},null,40,gy),w[2]||(w[2]=f("span",{class:"ctrl-date-sep"},"至",-1)),f("input",{class:"ctrl-date-input",type:"date",value:r.value,disabled:(y=e.field)==null?void 0:y.disabled,"aria-label":(e.item.label||"日期")+"结束",onChange:w[1]||(w[1]=C=>{r.value=C.target.value,d()})},null,40,yy)],64)):(p(),h("input",{key:1,class:"ctrl-date-input",type:"date",value:a.value,disabled:(b=e.field)==null?void 0:b.disabled,"aria-label":e.item.label||"日期",onChange:c},null,40,by))])}}}),[["__scopeId","data-v-528a8417"]]),ky={class:"ctrl-verify-wrap"},Cy={class:"ctrl-verify"},Sy=["value","placeholder","disabled","maxlength"],wy=["disabled"],Ty={key:0,class:"ctrl-verify-error"},xy=Ke(Pe({__name:"VerifyCodeControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){var b;const n=e,s=t,l=je(Os,null),a=H(String(((b=n.field)==null?void 0:b.value)||"")),i=H(0),r=H(!1),o=H("");let u=null;ut(()=>{var C;return(C=n.field)==null?void 0:C.value},C=>{a.value=C==null?"":String(C)});const c=E(()=>{var C;return Number((C=n.item.props)==null?void 0:C.countTime)||60}),d=E(()=>{var C,B;return((C=n.item.props)==null?void 0:C.verifyText)||((B=n.item.props)==null?void 0:B.reVerifyText)||"获取验证码"}),v=E(()=>i.value>0),A=E(()=>i.value>0?`${i.value}s`:r.value?"发送中":d.value);function x(C){a.value=C.target.value}function M(){const C=a.value.trim();a.value=C,s("change",{value:C,eventType:"inputBlur"})}function w(){u&&(clearInterval(u),u=null)}function O(){i.value=c.value,w(),u=setInterval(()=>{i.value-=1,i.value<=0&&w()},1e3)}async function y(){var C,B,D,U,q,R;if(!(v.value||r.value||(C=n.field)!=null&&C.disabled)){o.value="",r.value=!0;try{const j=Ee(l);if(j!=null&&j.sendVerifyCode){const J=((B=n.item.props)==null?void 0:B.mobileKey)||((D=n.item.props)==null?void 0:D.bindMobileKey),S=J&&((R=(q=(U=n.formCore)==null?void 0:U.fields)==null?void 0:q[J])==null?void 0:R.value)!=null?String(n.formCore.fields[J].value):void 0;await j.sendVerifyCode({item:n.item,mobile:S})}O()}catch(j){o.value=(j==null?void 0:j.message)||"发送失败"}finally{r.value=!1}}}return yl(w),(C,B)=>{var D,U,q;return p(),h("div",ky,[f("div",Cy,[f("input",{class:"ctrl-verify-input",type:"text",inputmode:"numeric",value:a.value,placeholder:e.item.placeholder||"请输入验证码",disabled:(D=e.field)==null?void 0:D.disabled,maxlength:((U=e.item.props)==null?void 0:U.maxlength)||6,onInput:x,onBlur:M},null,40,Sy),f("button",{type:"button",class:"ctrl-verify-btn",disabled:((q=e.field)==null?void 0:q.disabled)||v.value||r.value,onClick:y},k(A.value),9,wy)]),o.value?(p(),h("div",Ty,k(o.value),1)):V("",!0)])}}}),[["__scopeId","data-v-2efef382"]]),$y={class:"ctrl-upload-wrap"},Ay={class:"ctrl-upload"},My=["src"],Ey=["onClick"],Fy={key:0,class:"ctrl-upload-add"},Iy={class:"ctrl-upload-hint"},Dy=["multiple"],Py={key:0,class:"ctrl-upload-error"},Oy=Ke(Pe({__name:"ImageUploadControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){var A;const n=e,s=t,l=je(Os,null),a=H(c((A=n.field)==null?void 0:A.value)),i=H(!1),r=H("");ut(()=>{var x;return(x=n.field)==null?void 0:x.value},x=>{a.value=c(x)});const o=E(()=>{var x;return Number((x=n.item.props)==null?void 0:x.maxCount)||1}),u=E(()=>{var x;return a.value.length<o.value&&!((x=n.field)!=null&&x.disabled)&&!i.value});function c(x){return Array.isArray(x)?x.map(String).filter(Boolean):typeof x=="string"&&x?[x]:[]}async function d(x){var b;const M=x.target,w=Array.from(M.files||[]);if(M.value="",!w.length||(b=n.field)!=null&&b.disabled)return;const O=o.value-a.value.length,y=w.slice(0,Math.max(0,O));if(y.length){r.value="",i.value=!0;try{const C=Ee(l);let B;if(C!=null&&C.uploadFile){const D=[];for(const U of y){const q=await C.uploadFile({name:U.name,size:U.size,raw:U},{item:n.item});if(!(q!=null&&q.url))throw new Error("上传未返回 url");D.push(q.url)}B=[...a.value,...D]}else B=[...a.value,...y.map(D=>URL.createObjectURL(D))];a.value=B,s("change",{value:B,eventType:"pickChange"})}catch(C){r.value=(C==null?void 0:C.message)||"上传失败"}finally{i.value=!1}}}function v(x){var w;if((w=n.field)!=null&&w.disabled)return;const M=a.value.filter((O,y)=>y!==x);a.value=M,s("change",{value:M,eventType:"pickChange"})}return(x,M)=>(p(),h("div",$y,[f("div",Ay,[(p(!0),h(le,null,ke(a.value,(w,O)=>{var y;return p(),h("div",{key:w+O,class:"ctrl-upload-thumb"},[f("img",{src:w,alt:""},null,8,My),(y=e.field)!=null&&y.disabled?V("",!0):(p(),h("button",{key:0,type:"button",class:"ctrl-upload-remove","aria-label":"删除图片",onClick:b=>v(O)}," × ",8,Ey))])}),128)),u.value?(p(),h("label",Fy,[M[0]||(M[0]=f("span",null,"+",-1)),f("span",Iy,k(i.value?"…":e.item.placeholder||"上传"),1),f("input",{type:"file",accept:"image/*",multiple:o.value>1,hidden:"",onChange:d},null,40,Dy)])):V("",!0)]),r.value?(p(),h("div",Py,k(r.value),1)):V("",!0)]))}}),[["__scopeId","data-v-367b5f3b"]]),Ry={class:"ctrl-slider"},Ly=["min","max","step","value","disabled","aria-label"],Ny={class:"ctrl-slider-value"},Vy=Ke(Pe({__name:"SliderControl",props:{item:{},field:{},formCore:{}},emits:["change"],setup(e,{emit:t}){var d;const n=e,s=t,l=E(()=>{var v;return Number(((v=n.item.props)==null?void 0:v.min)??0)}),a=E(()=>{var v;return Number(((v=n.item.props)==null?void 0:v.max)??100)}),i=E(()=>{var v;return Number(((v=n.item.props)==null?void 0:v.step)??1)}),r=H(o((d=n.field)==null?void 0:d.value,l.value));ut(()=>{var v;return(v=n.field)==null?void 0:v.value},v=>{r.value=o(v,l.value)});function o(v,A){const x=Number(v);return Number.isFinite(x)?x:A}function u(v){r.value=Number(v.target.value)}function c(v){const A=Number(v.target.value);r.value=A,s("change",{value:A,eventType:"pickChange"})}return(v,A)=>{var x;return p(),h("div",Ry,[f("input",{class:"ctrl-slider-input",type:"range",min:l.value,max:a.value,step:i.value,value:r.value,disabled:(x=e.field)==null?void 0:x.disabled,"aria-label":e.item.label||"滑块",onInput:u,onChange:c},null,40,Ly),f("span",Ny,k(r.value),1)])}}}),[["__scopeId","data-v-60976b1e"]]),By={input:"InputControl",textarea:"InputControl",number:"InputControl",idcard:"InputControl",phone:"InputControl",bankCard:"InputControl",select:"SelectControl",cascader:"CascaderControl",address:"AddressControl",address5:"AddressControl",addressPinyin:"AddressControl",search:"SearchControl",agreement:"AgreementControl",task:"TaskControl",date:"DateControl",dateRange:"DateControl",verifyCode:"VerifyCodeControl",imageUpload:"ImageUploadControl",slider:"SliderControl",signature:"TaskControl",custom:"InputControl",list:"ListControl"};function jy(e,t){return _o(e)?"TaskControl":By[t]||"InputControl"}function Ky(e,t,n){const s=_o(e);return s?{...n||{},taskType:e,taskCategory:s==="customer"?"CUSTOMER_TASK":s==="inline"?"inline":"TASKS"}:n}function Uy(e){if(typeof e!="object"||e===null)return{value:e};const t=e.value!==void 0?e.value:e,n=e.eventType,{value:s,eventType:l,...a}=e;return Object.keys(a).length>0?{value:t,eventType:n,extraFields:a}:{value:t,eventType:n}}const Hy=["data-label-position","data-field-key"],qy={key:0,class:"form-error"},Wy={key:1,class:"form-icon"},Gy={key:0},zy={key:1},Yy={key:2},Wo=Ke(Pe({__name:"FormItem",props:{item:{},field:{},formCore:{}},setup(e){const t=e,n=je("customControls",{}),s=je("themeLabelPosition",void 0),l={InputControl:Pm,SelectControl:jm,CascaderControl:Zm,SearchControl:ig,AddressControl:mg,AgreementControl:_g,TaskControl:ly,ListControl:hy,DateControl:_y,VerifyCodeControl:xy,ImageUploadControl:Oy,SliderControl:Vy},a=E(()=>{const u=Ky(t.item.key,t.item.type,t.item.raw.props||{});return u===t.item.raw.props?t.item:{...t.item,raw:{...t.item.raw,props:u}}}),i=E(()=>{var u;return bf((u=t.item.raw)==null?void 0:u.labelPosition,Ee(s))}),r=E(()=>{var c;if(t.item.type==="custom"){const d=(c=t.item.raw)==null?void 0:c.customRender;if(d&&n[d])return n[d];if(d&&typeof d!="string")return d}const u=jy(t.item.key,t.item.type);return l[u]});function o(u){const{value:c,eventType:d,extraFields:v}=Uy(u);t.formCore.setControlData(t.item.key,c,{eventType:d,...v?{extraFields:v}:{}})}return(u,c)=>{var d,v;return p(),h("div",{class:se(["form-item",{"form-item-error":(d=e.field)==null?void 0:d.errMsg,"form-item--top":i.value==="top","form-item--left":i.value==="left"}]),"data-label-position":i.value,"data-field-key":e.item.key},[e.item.hideLabel?V("",!0):(p(),h("label",{key:0,class:se(["form-label",{required:e.item.required}])},k(e.item.label),3)),f("div",{class:se(["form-control",{"form-control-full":e.item.hideLabel}])},[(p(),st(Xn(r.value),{item:a.value.raw,field:e.field,formCore:e.formCore,onChange:o},null,40,["item","field","formCore"])),(v=e.field)!=null&&v.errMsg?(p(),h("div",qy,k(e.field.errMsg),1)):V("",!0)],2),e.item.rightIcon&&!e.item.hideLabel&&i.value==="left"?(p(),h("span",Wy,[e.item.rightIcon==="arrow"?(p(),h("span",Gy,"›")):e.item.rightIcon==="location"?(p(),h("span",zy,"📍")):e.item.rightIcon==="search"?(p(),h("span",Yy,"🔍")):V("",!0)])):V("",!0)],10,Hy)}}}),[["__scopeId","data-v-109afe7f"]]),Jy={class:"form-group"},Xy={class:"group-body"},Zy=Ke(Pe({__name:"FormGroup",props:{group:{},fields:{},formCore:{}},setup(e){const t=e,n=je("FormItemComponent",void 0),s=E(()=>n?Ee(n):Wo),l=E(()=>t.group.items.filter(a=>{const i=t.fields[a.key];return!i||i.visible}));return(a,i)=>(p(),h("div",Jy,[f("div",Xy,[(p(!0),h(le,null,ke(l.value,r=>(p(),st(Xn(s.value),{key:r.key,item:r,field:e.fields[r.key],formCore:e.formCore},null,8,["item","field","formCore"]))),128))])]))}}),[["__scopeId","data-v-be65346c"]]),Qy=["data-shell","data-label-align","data-content-align"],eb={key:0,class:"form-render__title"},tb=Ke(Pe({__name:"FormRender",props:{groups:{},fields:{},formCore:{},customControls:{},labelPosition:{},title:{},labelAlign:{},labelWidth:{},contentAlign:{},FormGroupComponent:{},FormItemComponent:{},hostHandlers:{}},setup(e){const t=e,n=E(()=>t.labelAlign==="left"||t.labelAlign==="right"||t.labelAlign==="top"?t.labelAlign:t.labelPosition==="top"?"top":(t.labelPosition==="left","left")),s=E(()=>n.value==="top"?"top":"left");yt("customControls",t.customControls||{}),yt("themeLabelPosition",s),yt("formUiLayout",E(()=>({labelAlign:n.value,labelWidth:t.labelWidth??"81px",contentAlign:t.contentAlign??"left"}))),yt("FormItemComponent",E(()=>t.FormItemComponent||Wo)),yt(Os,E(()=>t.hostHandlers??null));const l=E(()=>t.FormGroupComponent||Zy);return(a,i)=>(p(),h("div",{class:"form-render","data-shell":e.FormGroupComponent?"override":"default","data-label-align":n.value,"data-content-align":e.contentAlign||"left"},[e.title?(p(),h("div",eb,k(e.title),1)):V("",!0),(p(!0),h(le,null,ke(e.groups,r=>(p(),st(Xn(l.value),{key:r.key,group:r,fields:e.fields,formCore:e.formCore},null,8,["group","fields","formCore"]))),128)),ur(a.$slots,"footer",{},void 0)],8,Qy))}}),[["__scopeId","data-v-a67197e5"]]),nb={key:0,class:"ap-exit-final-bar"},sb={class:"ap-exit-final-actions"},lb={class:"ap-header__title"},ab={class:"ap-header__text"},ib=["title"],rb={key:0,class:"ap-header__actions"},ob={key:2,class:"ap-final-prog"},cb={class:"ap-prog__top"},ub={key:1,class:"ap-done"},db={class:"ap-prog__track"},fb={key:3,class:"ap-toolbar","data-testid":"agent-debug-toolbar"},vb={class:"ap-skin-row"},pb=["onClick"],hb={class:"ap-row"},mb={class:"ap-seg"},gb=["disabled"],yb={class:"ap-dots"},bb=["title","aria-label","onClick"],_b={class:"ap-row ap-row--sub"},kb=["title"],Cb={class:"ap-seg__lbl"},Sb=["title"],wb={class:"ap-row ap-row--finalize"},Tb=["disabled"],xb=["title"],$b=["title"],Ab={key:0,class:"ap-prog"},Mb={class:"ap-prog__top"},Eb={key:1,class:"ap-done"},Fb={class:"ap-prog__track"},Ib={key:4,class:"ap-draft-bar","data-testid":"draft-restored-bar"},Db={key:5,class:"ap-err-summary-bar","data-testid":"error-summary-bar"},Pb={key:6,class:"ap-toast",role:"alert"},Ob={key:0,class:"ap-status is-err"},Rb={key:1,class:"ap-status"},Lb={key:0,class:"ap-desc"},Nb={key:1,class:"ap-stepper"},Vb=["onClick"],Bb={key:2,class:"ap-step-nav"},jb=["disabled"],Kb={class:"ap-step-idx"},Ub={class:"ap-footer"},Hb=["disabled"],qb={class:"ap-receipt","data-testid":"final-receipt-sheet"},Wb={class:"ap-receipt__head"},Gb={class:"ap-receipt__title"},zb={class:"ap-receipt__sub"},Yb={class:"ap-receipt__list"},Jb={class:"ap-receipt__lbl"},Xb={class:"ap-receipt__val"},Zb={class:"ap-receipt__actions"},Qb=["disabled"],e_={class:"ap-drawer","data-testid":"agent-drawer"},t_={class:"ap-drawer__head"},n_={class:"ap-drawer__tabs"},s_={class:"ap-drawer__body"},l_={key:1,class:"ap-inbox-bar"},a_=["disabled"],i_={key:0,class:"ap-inbox-ok"},r_={class:"ap-code"},o_={key:1,class:"ap-code"},c_={class:"ap-inbox-bar"},u_={class:"ap-code"};Kd(Ke(Pe({__name:"AgentPreviewApp",setup(e){var ls;const t=typeof window<"u"?new URLSearchParams(window.location.search):new URLSearchParams,n=t.get("embed")==="1",s=t.get("id")||"",l=t.get("lang")||t.get("locale"),a=H(Kt(l||(typeof window<"u"?(ls=window.__AGENT_THEME_CONFIG__)==null?void 0:ls.locale:void 0))),i=E(()=>a.value==="en-US"),r=H(t.get("final")==="1"||typeof window<"u"&&window.__AGENT_PREVIEW_MODE__==="final"),o=H(!1),u=E(()=>r.value||o.value),c=H(!1),d=H(!1),v=H(!1),A=H(!1),x=H(null),M=H(0),w=H(!1),O=H(""),y=H(null),b=sl({}),C=H([]),B=H({}),D=H([]),U=H(null),q=H(!1),R=H("payload"),j=H(""),J=H(!1),S=H(0),G=H(!1),he=H(null);let Le=null,Ie=null;const $e=H("fin-minimal"),ce=H("flat"),Se=H(0),Xe=H(""),ze=H("comfortable"),qe=H("auto"),Ue=H(t.get("mode")==="desktop"?"desktop":"mobile"),xt=H(!1),Xt=H(!0),kt=H("top"),Ce=H(""),P=E(()=>i.value?{defaultTitle:"Form",liveBadge:"● Live",liveTitle:F=>`SSE live reload connected (${F} updates)`,refresh:"Refresh",reset:"Reset",finalPreviewBanner:"Final Deliverable Preview (all debug toolbars hidden)",exportFinalHtml:"Export Final HTML",backToTuning:"Back to Tuning",progressLabel:"Progress",requiredLabel:"Required",jumpMissing:"Locate Missing ›",requiredDone:"All required done ✓",modeFlat:"Flat",modeCollapsible:"Collapsible",modeStep:"Step",reviewOn:"Review ✓",reviewOff:"Review",kbTitle:"Keypad policy: Auto uses native keyboard on PC & custom keypad on mobile",kbLabel:"Keypad",kbAuto:"Auto",kbCustom:"Keypad",kbNative:"Native",vpTitle:"Switch between Mobile and Desktop form viewport",vpMobile:"Mobile",vpDesktop:"Desktop",btnFinalPreview:"Final View",btnSaveTheme:"Save Theme",btnSavingTheme:"Saving…",btnExportSchema:"Schema",btnExportSchemaTitle:"Download pure FormSchema JSON for Vue / React / Miniapp SDKs",btnMobileBundle:"Bundle",btnMobileBundleTitle:"Download Mobile Bundle (FormSchema + locked ThemeConfig)",btnFinalHtml:"Final HTML",draftRestored:"Restored unsaved local draft",draftClear:"Clear & Restart",errSummary:F=>`${F} fields need attention`,errNext:"Next error ›",initCore:"Initializing FormCore…",stepFallback:F=>`Step ${F}`,stepPrev:"Previous",stepNext:"Next",stepVerify:"Verify All",footerPayload:"Data / Telemetry",footerSchema:"Schema",submitting:"Submitting…",submitDefault:"Submit Form",validateAndCollect:"Validate & Collect",receiptSubmitted:"Submitted ✓",receiptReady:"Validation Passed · Ready to Submit",receiptIdPrefix:" · Receipt ID ",receiptSaveInbox:"Save to Local Inbox",receiptSavedInbox:F=>`Saved to Inbox #${F}`,receiptDownloadJson:"Download Receipt JSON",receiptBack:"Back to Form",tabPayload:"Payload",tabTelemetry:F=>`Telemetry (${F})`,tabSchema:"Schema",close:"Close",validatePassed:"validateAll passed ✓",validateFailed:"validateAll has errors ✗",saveInboxBtn:"Save to Local Data Hub Inbox",savingInbox:"Saving…",savedInboxMeta:(F,$)=>`Saved #${F} (${$})`,dlPureSchema:"Download FormSchema JSON",dlMobileBundle:"Download Mobile Bundle (Schema + Theme)",toastMockCode:"Demo verification code sent: 666888 (preview mock)",toastDraftCleared:"Draft cleared — starting fresh",toastAllRequiredDone:"All required fields are completed ✓",toastNextError:(F,$,Q,oe)=>`Error ${F}/${$} "${Q}": ${oe}`,toastStepBlocked:(F,$,Q)=>`Please fix "${F}": ${$}${Q>1?` (${Q} issues in this step)`:""}`,toastSubmitBlocked:(F,$,Q)=>`Please fix "${F}": ${$}${Q>1?` (${Q} issues total)`:""}`,toastSubmitGenericErr:"Please fix the highlighted fields",toastSubmitFailed:F=>`Submit failed (${F}). Your input is preserved — please retry.`,toastThemeSaved:"Theme & interaction settings saved to theme.json ✓",toastThemeFailed:F=>`Failed to save theme: ${F}`,toastExportHtmlOk:"Exported zero-chrome Final HTML ✓",toastExportHtmlFallback:"Use CLI preview-html --mode final in this environment",toastExportFail:F=>`Export failed: ${F}`,toastExportBundleOk:"Exported Mobile Bundle (Schema + locked Theme) ✓",toastExportSchemaOk:"Exported pure FormSchema JSON ✓",toastInboxSaved:F=>`Saved to local inbox (${F} total)`,toastInboxFail:F=>`Failed to save: ${F}`,toastLiveUpdated:"Form schema hot-reloaded ✓",errLoadFailed:F=>`Failed to load preview (HTTP ${F})`,errInvalidSchema:"Preview payload missing valid FormSchema",errNoSchema:"No FormSchema provided (export via preview-html or pass ?id=)",agreeRequiredFallback:F=>{const $=String(F||"").trim();return $&&/^(I have read|I agree|Agree)/i.test($)?`Please accept "${$}"`:`Please read and accept ${$||"the agreement"}`},yes:"Yes",no:"No",dateTo:" to ",longTerm:"Long-term",mockSearchSamples:["Acme Cloud Technologies Inc.","Northstar Digital Labs LLC","One Market Plaza, Suite 400"],mockSelectOptions:[{code:"opt_1",name:"Sample Option A"},{code:"opt_2",name:"Sample Option B"}],mockMapResult:[{code:"US-CA",name:"California"},{code:"US-CA-SF",name:"San Francisco"},{code:"US-CA-SF-SOMA",name:"SoMa District"}],mockTaskDone:"Completed (preview mock)",skins:{"fin-minimal":"Minimal","clean-outline":"Outline","bank-card":"Classic"},brandPresetLabels:{default:"Cobalt Blue","bank-red":"Crimson Red","gov-navy":"Deep Navy",emerald:"Emerald Green"}}:{defaultTitle:"表单填写",liveBadge:"● 实时",liveTitle:F=>`SSE 实时热更新已连接(已同步 ${F} 次)`,refresh:"刷新",reset:"重置",finalPreviewBanner:"定稿成品预览(当前隐藏所有调试栏)",exportFinalHtml:"导出定稿 HTML",backToTuning:"返回样式调试",progressLabel:"填写进度",requiredLabel:"必填",jumpMissing:"定位未填 ›",requiredDone:"必填已完成 ✓",modeFlat:"平铺",modeCollapsible:"折叠",modeStep:"分步",reviewOn:"审阅态 ✓",reviewOff:"审阅态",kbTitle:"自定义数字/身份证键盘策略:自动模式在PC走物理键盘、移动端弹定制键盘",kbLabel:"键盘",kbAuto:"自动",kbCustom:"软键盘",kbNative:"原生",vpTitle:"切换手机端与 PC 宽屏 Web 表单视图",vpMobile:"手机",vpDesktop:"PC宽屏",btnFinalPreview:"定稿预览",btnSaveTheme:"保存样式",btnSavingTheme:"保存中…",btnExportSchema:"导出 Schema",btnExportSchemaTitle:"下载纯净 FormSchema JSON,供移动端/小程序/Web SDK 直接渲染",btnMobileBundle:"移动端包",btnMobileBundleTitle:"下载移动端合一包(FormSchema + 锁定主题配置)",btnFinalHtml:"定稿 HTML",draftRestored:"已自动恢复上次未提交草稿",draftClear:"清空重填",errSummary:F=>`共 ${F} 项待完善`,errNext:"跳转下一报错项 ›",initCore:"初始化 FormCore…",stepFallback:F=>`第${F}步`,stepPrev:"上一步",stepNext:"下一步",stepVerify:"完成校验",footerPayload:"数据 / 埋点",footerSchema:"Schema",submitting:"提交中…",submitDefault:"提交表单",validateAndCollect:"校验并收集",receiptSubmitted:"提交成功 ✓",receiptReady:"表单校验通过,已准备提交",receiptIdPrefix:" · 回执号 ",receiptSaveInbox:"确认提交至收件箱",receiptSavedInbox:F=>`已存入收件箱 #${F}`,receiptDownloadJson:"下载回执 JSON",receiptBack:"返回表单",tabPayload:"Payload",tabTelemetry:F=>`埋点 (${F})`,tabSchema:"Schema",close:"关闭",validatePassed:"validateAll 校验通过 ✓",validateFailed:"validateAll 存在未通过项 ✗",saveInboxBtn:"存入本地 Data Hub 收件箱",savingInbox:"写入中…",savedInboxMeta:(F,$)=>`已入箱 #${F}(${$})`,dlPureSchema:"下载纯 FormSchema",dlMobileBundle:"下载移动端合一包 (Schema+Theme)",toastMockCode:"模拟验证码已发送:666888(预览演示)",toastDraftCleared:"已清空草稿,重新填写",toastAllRequiredDone:"全部必填项均已完成 ✓",toastNextError:(F,$,Q,oe)=>`第 ${F}/${$} 项「${Q}」:${oe}`,toastStepBlocked:(F,$,Q)=>`请完善「${F}」:${$}${Q>1?`(当前步共 ${Q} 项待完善)`:""}`,toastSubmitBlocked:(F,$,Q)=>`请完善「${F}」:${$}${Q>1?`(共 ${Q} 项待完善)`:""}`,toastSubmitGenericErr:"请完善标红的必填或格式有误字段",toastSubmitFailed:F=>`提交失败(${F}),已保留填写内容,请重试`,toastThemeSaved:"已保存当前样式与交互配置到 theme.json ✓",toastThemeFailed:F=>`保存样式失败:${F}`,toastExportHtmlOk:"已导出零调试栏定稿成品 HTML ✓",toastExportHtmlFallback:"当前环境请通过 CLI preview-html --mode final 导出",toastExportFail:F=>`导出失败:${F}`,toastExportBundleOk:"已导出移动端合一包(Schema + 锁定主题)✓",toastExportSchemaOk:"已导出纯净定稿 FormSchema JSON ✓",toastInboxSaved:F=>`已存入本地收件箱(共 ${F} 条)`,toastInboxFail:F=>`存入失败:${F}`,toastLiveUpdated:"表单配置已实时热更新 ✓",errLoadFailed:F=>`加载预览失败(HTTP ${F})`,errInvalidSchema:"预览数据缺少有效 FormSchema",errNoSchema:"未传入 FormSchema(请使用 preview-html 导出或带 ?id= 访问本机预览服务)",agreeRequiredFallback:F=>{const $=String(F||"").trim();return $&&/^(我已|已)?阅读并同意/.test($)?`请先勾选「${$}」`:`请先阅读并同意${$||"相关协议"}`},yes:"是",no:"否",dateTo:" 至 ",longTerm:"长期",mockSearchSamples:["示例科技集团有限公司","示例普惠信息服务有限公司","高新南九道软件园 1 栋"],mockSelectOptions:[{code:"opt_1",name:"示例选项 A"},{code:"opt_2",name:"示例选项 B"}],mockMapResult:[{code:"440000",name:"广东省"},{code:"440300",name:"深圳市"},{code:"440305",name:"南山区"}],mockTaskDone:"已完成(预览模拟)",skins:{"fin-minimal":"Minimal 极简","clean-outline":"Outline 线框","bank-card":"Classic 商务"},brandPresetLabels:{default:"金融蓝","bank-red":"银行红","gov-navy":"政务深蓝",emerald:"普惠青绿"}});function Ct(){a.value=i.value?"zh-CN":"en-US"}const ns=Em(),g=dv(),T=H(0),L=E(()=>({brandColor:Xe.value||void 0,density:ze.value})),Y=E(()=>Mo($e.value,L.value));function N(F){j.value=F,Le&&clearTimeout(Le),Le=setTimeout(()=>{j.value=""},2400)}function z(F){D.value=[F,...D.value].slice(0,15)}const te={async searchSuggest(F){return P.value.mockSearchSamples.filter(Q=>!F||Q.toLowerCase().includes(F.toLowerCase())).map((Q,oe)=>({code:`demo_${oe}`,name:Q}))},async loadSelectOptions({item:F}){return z(`loadSelectOptions: ${F.key}`),P.value.mockSelectOptions},async launchTask(F){return F.taskType==="signature"?(z(`launchTask: ${F.key} signature`),{useBuiltInSignaturePad:!0}):F.taskType==="map"?(z(`launchTask: ${F.key} map`),P.value.mockMapResult):(z(`launchTask: ${F.key} (${F.taskType})`),{code:`${F.taskType}_done`,name:P.value.mockTaskDone})},async uploadFile(F){return z(`uploadFile: ${F.name||"image"}`),{url:F.path||`local-preview://${encodeURIComponent(F.name||"img.png")}`,name:F.name}},async sendVerifyCode({item:F}){z(`sendVerifyCode: ${F.key} 666888`),N(P.value.toastMockCode)}};yt(Os,te),yt(wo,E(()=>({...Nl,labelAlign:kt.value,labelWidth:"108px"}))),yt(Wa,$e),yt(No,L),yt(Vo,E(()=>ce.value==="collapsible")),yt(Bo,qe),yt(jo,xt),yt(ts,a),yt(Ko,F=>{g.record(F),T.value+=1});const ee=E(()=>(T.value,g.getSummary())),X=E(()=>lv(C.value,b)),W=E(()=>C.value.length>1),ue=E(()=>{if(ce.value!=="step"||C.value.length<=1)return C.value;const F=Math.min(Se.value,C.value.length-1);return[C.value[F]]});let Z=null,re=null;function fe(F,$){for(const oe of Object.keys(b))delete b[oe];for(const oe of Object.keys(F.fields))b[oe]={...F.fields[oe]};try{B.value=F.collectFormData({skipVerify:!0})}catch{B.value={}}const Q=yf($,{...b});C.value=Q.groups}async function be(F,$,Q){var jl,Kl;const oe=!!(Q!=null&&Q.preserveUiState),ae=(Q==null?void 0:Q.applyTheme)!==!1,ie={},de=Se.value;if(oe&&Z)for(const[Ze,He]of Object.entries(Z.fields))He&&He.value!==void 0&&He.value!==null&&He.value!==""&&(ie[Ze]=He.value);oe||(w.value=!1),O.value="",Z&&re&&Z.off("afterChange",re),$&&ae&&($.skin&&$.skin!=="tdesign"&&Dt[$.skin]&&($e.value=$.skin,kt.value=Dt[$.skin].defaultLabelAlign),((jl=$.override)==null?void 0:jl.brandColor)!==void 0&&(Xe.value=$.override.brandColor||""),(Kl=$.override)!=null&&Kl.density&&(ze.value=$.override.density),$.formMode&&(ce.value=$.formMode),typeof $.showProgressBar=="boolean"&&(Xt.value=$.showProgressBar),typeof $.readOnly=="boolean"&&(xt.value=$.readOnly),$.keyboardPolicy&&(qe.value=$.keyboardPolicy),$.viewportMode&&!t.get("mode")&&(Ue.value=$.viewportMode),$.submitText!==void 0&&(Ce.value=$.submitText||""),$.locale&&!l&&(a.value=Kt($.locale)),$.mode==="final"&&t.get("draft")!=="1"&&(r.value=!0));const ne={version:F.version||"1.0.0",title:F.title||P.value.defaultTitle,description:F.description||"",storageKey:F.storageKey||"agent_preview_form",submitApi:F.submitApi||"",apis:F.apis||[],groups:F.groups||[]};y.value=ne;const ge=new Map,Ne=`apf_draft:${ne.storageKey}:`,We=u.value&&!xt.value&&typeof window<"u"&&typeof window.localStorage<"u",Tn=[];if(We&&!oe)try{for(let Ze=0;Ze<window.localStorage.length;Ze+=1){const He=window.localStorage.key(Ze);if(He&&He.startsWith(Ne)){const hn=window.localStorage.getItem(He);hn&&hn!=='""'&&hn!=="null"&&hn!=="[]"&&Tn.push(He)}}}catch{}v.value=Tn.length>0;const tn=We?{get:Ze=>{try{const He=window.localStorage.getItem(`${Ne}${Ze}`);return He===null?void 0:JSON.parse(He)}catch{return ge.get(Ze)}},set:(Ze,He)=>{ge.set(Ze,He);try{window.localStorage.setItem(`${Ne}${Ze}`,JSON.stringify(He))}catch{}},remove:Ze=>{ge.delete(Ze);try{window.localStorage.removeItem(`${Ne}${Ze}`)}catch{}}}:{get:Ze=>ge.get(Ze),set:(Ze,He)=>ge.set(Ze,He),remove:Ze=>ge.delete(Ze)};Z=new uf(JSON.parse(JSON.stringify(ne)),tn),await Z.init(oe?ie:{}),re=()=>fe(Z,ne),Z.on("afterChange",re),fe(Z,ne),Se.value=oe?Math.min(de,Math.max(0,C.value.length-1)):0,U.value=null,x.value=null,w.value=!0}function we(F=!1){var oe;const Q=`apf_draft:${((oe=y.value)==null?void 0:oe.storageKey)||"agent_preview_form"}:`;try{if(typeof window<"u"&&window.localStorage){const ae=[];for(let ie=0;ie<window.localStorage.length;ie+=1){const de=window.localStorage.key(ie);de&&de.startsWith(Q)&&ae.push(de)}for(const ie of ae)window.localStorage.removeItem(ie)}}catch{}v.value=!1,F&&y.value&&(be(y.value),N(P.value.toastDraftCleared))}function Te(F){$e.value=F,kt.value=Dt[F].defaultLabelAlign}async function De(F,$){if(ce.value==="step"&&C.value.length>1){const ae=C.value.findIndex(ie=>ie.items.some(de=>de.key===F));ae>=0&&Se.value!==ae&&(Se.value=ae,await zn())}$!=null&&$.toast&&N($.toast),await zn(),typeof window<"u"&&typeof window.requestAnimationFrame=="function"&&await new Promise(ae=>window.requestAnimationFrame(()=>ae()));const Q=document.querySelector(`[data-field-key="${F}"]`);if(!Q)return;Q.scrollIntoView({behavior:"smooth",block:"center"}),($==null?void 0:$.pulse)!==!1&&(Q.classList.remove("is-locate-pulse"),Q.offsetWidth,Q.classList.add("is-locate-pulse"),setTimeout(()=>Q.classList.remove("is-locate-pulse"),1250));const oe=Q.querySelector('input:not([type="hidden"]):not([readonly]):not(:disabled), textarea:not(:disabled), select:not(:disabled)');if(oe&&typeof oe.focus=="function")try{oe.focus({preventScroll:!0})}catch{oe.focus()}}async function Ye(){const F=X.value.firstMissingRequiredKey;if(!F){N(P.value.toastAllRequiredDone);return}await De(F,{pulse:!0})}function ht(F){var Q,oe;const $=[];for(const ae of F){const ie=b[ae.key];if(!ie||ie.visible===!1)continue;let de=String(ie.errMsg||"").trim();if(!de&&ae.type==="agreement"){const ne=ae.required===!0||Array.isArray(ae.rules)&&ae.rules.some(Ne=>Ne.type==="required"),ge=xo(ae,{defaultFalseValue:""});if(ne&&!$o(ie.value,ge)){const Ne=Array.isArray(ae.rules)?(Q=ae.rules.find(We=>We.type==="required"))==null?void 0:Q.message:"";de=String(Ne||P.value.agreeRequiredFallback(ae.label||"")),b[ae.key]={...ie,errMsg:de}}}if(!de&&ae.type==="list"){const ne=Array.isArray(ie.value)?ie.value:[],ge=Oo(ae,ne,a.value);if(!ge.valid){const Ne=ge.firstErrorPath,We=Ne?(oe=ge.rowErrors[Ne.rowIndex])==null?void 0:oe[Ne.subKey]:"";de=ge.listError||We||"",de&&(b[ae.key]={...ie,errMsg:de})}}if(!de){const ne=Lo(ae,ie.value,a.value);!ne.valid&&ne.reason&&(de=ne.reason,b[ae.key]={...ie,errMsg:de})}de&&$.push({key:ae.key,label:ae.label||ae.key,message:de})}return $}const ft=E(()=>{const F=[];for(const $ of C.value)for(const Q of $.items){const oe=b[Q.key];if(!oe||oe.visible===!1)continue;const ae=String(oe.errMsg||"").trim();ae&&F.push({key:Q.key,label:Q.label||Q.key,message:ae})}return F});async function Zt(){const F=ft.value;if(!F.length)return;const $=M.value%F.length;M.value=($+1)%F.length;const Q=F[$];await De(Q.key,{toast:P.value.toastNextError($+1,F.length,Q.label,Q.message),pulse:!0})}async function Qt(){if(!Z||!y.value)return;const F=ue.value[0];if(!F)return;for(const Q of F.items){const oe=Z.fields[Q.key];!oe||oe.visible===!1||Z.setControlData(Q.key,oe.value,{eventType:"submit",skipRelation:!0})}fe(Z,y.value);const $=ht(F.items);if($.length>0){const Q=$[0];await De(Q.key,{toast:P.value.toastStepBlocked(Q.label,Q.message,$.length),pulse:!0});return}Se.value=Math.min(C.value.length-1,Se.value+1),await zn(),window.scrollTo({top:0,behavior:"smooth"})}async function tt(){var ae;if(!Z||!y.value)return;const F=Z.validateAll();fe(Z,y.value);const $=C.value.flatMap(ie=>ie.items),Q=ht($),oe=F&&Q.length===0;if(U.value=oe,!oe){const ie=Q.map(ne=>ne.key);g.record({type:"submit_blocked",timestamp:Date.now(),blockedKeys:ie}),T.value+=1;const de=Q[0];de?await De(de.key,{toast:P.value.toastSubmitBlocked(de.label,de.message,Q.length),pulse:!0}):N(P.value.toastSubmitGenericErr);return}try{B.value=Z.collectFormData({skipVerify:!0})}catch{}if(g.record({type:"submit_passed",timestamp:Date.now()}),T.value+=1,he.value=null,u.value){const de=(typeof window<"u"?String(window.__AGENT_SUBMIT_URL__||"").trim():"")||String(((ae=y.value)==null?void 0:ae.submitApi)||"").trim();if(/^https?:\/\//i.test(de)){if(A.value)return;A.value=!0,x.value=null;const ne=`sub_${Date.now().toString(36)}`;try{const ge=await fetch(de,{method:"POST",headers:{"Content-Type":"application/json","Idempotency-Key":ne},body:JSON.stringify({submissionId:ne,schemaVersion:y.value.version||"1.0.0",storageKey:y.value.storageKey||"",title:y.value.title||"",submittedAt:new Date().toISOString(),channel:Ue.value==="desktop"?"web-desktop":"web-mobile",data:B.value})});if(!ge.ok)throw new Error(`HTTP ${ge.status}`);x.value={ok:!0,status:ge.status,submissionId:ne},we(!1),d.value=!0}catch(ge){x.value={ok:!1,message:(ge==null?void 0:ge.message)||"Network error"},N(P.value.toastSubmitFailed((ge==null?void 0:ge.message)||"Network error"))}finally{A.value=!1}return}we(!1),d.value=!0;return}R.value="payload",q.value=!0}function nt(F="preview"){return{skin:$e.value,override:{...Xe.value?{brandColor:Xe.value}:{},density:ze.value},formMode:ce.value,showProgressBar:Xt.value,readOnly:xt.value,keyboardPolicy:qe.value,viewportMode:Ue.value,...Ce.value?{submitText:Ce.value}:{},locale:a.value,mode:F}}async function Ut(F="preview",$=!1){if(!s)return!1;c.value=!0;try{const Q=await fetch(`/__form_agent/v2/preview/${encodeURIComponent(s)}/theme`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({themeConfig:nt(F)})});if(!Q.ok)throw new Error(`HTTP ${Q.status}`);return $||N(P.value.toastThemeSaved),!0}catch(Q){return $||N(P.value.toastThemeFailed((Q==null?void 0:Q.message)||"Preview server unavailable")),!1}finally{c.value=!1}}function en(F,$,Q="text/html;charset=utf-8"){const oe=new Blob([F],{type:Q}),ae=URL.createObjectURL(oe),ie=document.createElement("a");ie.href=ae,ie.download=$,document.body.appendChild(ie),ie.click(),ie.remove(),setTimeout(()=>URL.revokeObjectURL(ae),1e3)}async function Bl(){var Ne;const F=String(((Ne=y.value)==null?void 0:Ne.storageKey)||"form").replace(/[^a-zA-Z0-9_-]+/g,"_").slice(0,60);if(s){await Ut("preview",!0);try{const We=await fetch(`/__form_agent/v2/preview/${encodeURIComponent(s)}/final-html`,{cache:"no-store"});if(!We.ok)throw new Error(`HTTP ${We.status}`);const Tn=await We.text();en(Tn,`${F}-final.html`),N(P.value.toastExportHtmlOk);return}catch(We){N(P.value.toastExportFail((We==null?void 0:We.message)||"Preview server unavailable"));return}}if(!y.value)return;const $=Array.from(document.querySelectorAll("style")).map(We=>We.textContent||"").join(`
22
+ `),Q=Array.from(document.querySelectorAll("script")).map(We=>We.textContent||"").find(We=>We.length>5e3&&!We.includes("__AGENT_FORM_SCHEMA__"));if(!Q){N(P.value.toastExportHtmlFallback);return}const oe=We=>We.replace(/<\/(script)/gi,"<\\/$1"),ae=String(y.value.title||P.value.defaultTitle).replace(/[<>&"]/g,""),ie=nt("final"),de="<script>",ne="<\/script>",ge=["<!DOCTYPE html>",`<html lang="${a.value}">`,"<head>",'<meta charset="UTF-8" />','<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />',`<title>${ae}</title>`,`<style>${$}</style>`,"</head>","<body>",'<div id="app"></div>',de,'window.__AGENT_PREVIEW_MODE__ = "final";',...typeof window<"u"&&window.__AGENT_SUBMIT_URL__?[`window.__AGENT_SUBMIT_URL__ = ${oe(JSON.stringify(String(window.__AGENT_SUBMIT_URL__)))};`]:[],`window.__AGENT_FORM_SCHEMA__ = ${oe(JSON.stringify(y.value))};`,`window.__AGENT_THEME_CONFIG__ = ${oe(JSON.stringify(ie))};`,ne,de+oe(Q)+ne,"</body>","</html>",""].join(`
23
+ `);en(ge,`${F}-final.html`),N(P.value.toastExportHtmlOk)}async function Vn(F=!1){if(!y.value)return;s&&await Ut("preview",!0);const $=String(y.value.storageKey||"form").replace(/[^a-zA-Z0-9_-]+/g,"_").slice(0,60);if(F){const Q={format:"agentprismform-mobile-bundle/v1",exportedAt:new Date().toISOString(),schema:y.value,themeConfig:nt("final")};en(JSON.stringify(Q,null,2)+`
24
+ `,`${$}.bundle.json`,"application/json;charset=utf-8"),N(P.value.toastExportBundleOk);return}en(JSON.stringify(y.value,null,2)+`
25
+ `,`${$}.schema.json`,"application/json;charset=utf-8"),N(P.value.toastExportSchemaOk)}const Ls=E(()=>{const F=[],$=B.value||{};for(const Q of C.value)for(const oe of Q.items){if(!(oe.key in $))continue;const ae=$[oe.key];if(ae==null||ae==="")continue;let ie="";if(Array.isArray(ae))if(oe.type==="dateRange"){const de=ae[1]==="long_term"||ae[1]==="长期"?P.value.longTerm:ae[1]||"";ie=`${ae[0]||""}${P.value.dateTo}${de}`}else ie=ae.map(de=>de&&typeof de=="object"?de.name||de.label||de.code||JSON.stringify(de):String(de)).join(i.value?", ":"、");else if(typeof ae=="boolean")ie=ae?P.value.yes:P.value.no;else if(typeof ae=="object"){const de=ae;ie=de.name||de.label||de.code||JSON.stringify(de)}else ie=String(ae);if(oe.type==="phone"&&/^\d{11}$/.test(ie))ie=`${ie.slice(0,3)}****${ie.slice(-4)}`;else if(oe.type==="idcard"&&ie.length>=15)ie=`${ie.slice(0,4)}**********${ie.slice(-4)}`;else if(oe.type==="bankCard"&&ie.replace(/\s+/g,"").length>=12){const de=ie.replace(/\s+/g,"");ie=`${de.slice(0,4)} **** **** ${de.slice(-4)}`}F.push({key:oe.key,label:oe.label||oe.key,value:ie})}return F});function Bn(){var $,Q;const F=String((($=y.value)==null?void 0:$.storageKey)||"form").replace(/[^a-zA-Z0-9_-]+/g,"_");en(JSON.stringify({title:(Q=y.value)==null?void 0:Q.title,submittedAt:new Date().toISOString(),data:B.value},null,2),`${F}-receipt.json`,"application/json;charset=utf-8")}async function Ns(){if(!(!s||G.value)){G.value=!0;try{const F=await fetch(`/__form_agent/v2/preview/${encodeURIComponent(s)}/submit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rawData:B.value,channel:Ue.value==="desktop"?"web-desktop":"web-mobile",maskPii:!0})});if(!F.ok)throw new Error(`HTTP ${F.status}`);const $=await F.json();he.value={submissionId:$.submissionId,totalInInbox:$.totalInInbox,formKey:$.formKey},N(P.value.toastInboxSaved($.totalInInbox))}catch(F){N(P.value.toastInboxFail((F==null?void 0:F.message)||"Preview server unavailable"))}finally{G.value=!1}}}async function Pt(F){var oe;const $=window.__AGENT_FORM_SCHEMA__,Q=window.__AGENT_THEME_CONFIG__;if($&&Array.isArray($.groups)){await be($,Q);return}if(s)try{const ae=await fetch(`/__form_agent/v2/preview/${encodeURIComponent(s)}`,{cache:"no-store"});if(!ae.ok)throw new Error(P.value.errLoadFailed(ae.status));const ie=await ae.json();if(!((oe=ie==null?void 0:ie.schema)!=null&&oe.groups))throw new Error(P.value.errInvalidSchema);await be(ie.schema,ie.themeConfig,F);return}catch(ae){O.value=(ae==null?void 0:ae.message)||String(ae);return}O.value=P.value.errNoSchema}function ss(){if(!s||typeof EventSource>"u")return;Ie&&(Ie.close(),Ie=null);const F=new EventSource(`/__form_agent/v2/preview/${encodeURIComponent(s)}/events`);F.addEventListener("connected",()=>{J.value=!0}),F.addEventListener("update",async $=>{let Q={};try{Q=JSON.parse($.data||"{}")}catch{}S.value+=1,await Pt({preserveUiState:!0,applyTheme:!!Q.themeChanged}),N(P.value.toastLiveUpdated)}),F.onerror=()=>{J.value=!1},Ie=F}function Ht(F){const $=F.data;!$||typeof $!="object"||($.type==="APF_UPDATE_SCHEMA"&&$.schema&&Array.isArray($.schema.groups)?(($.viewportMode==="desktop"||$.viewportMode==="mobile")&&(Ue.value=$.viewportMode),$.locale&&(a.value=Kt($.locale)),be($.schema,$.theme||null,{preserveUiState:!!$.preserveUiState,applyTheme:!!$.theme})):$.type==="APF_SET_VIEWPORT"&&($.viewportMode==="desktop"||$.viewportMode==="mobile")?Ue.value=$.viewportMode:$.type==="APF_SET_KEYBOARD"&&["auto","always-custom","native"].includes($.policy)?qe.value=$.policy:$.type==="APF_SET_LOCALE"&&$.locale?a.value=Kt($.locale):$.type==="APF_SET_FINAL"&&(r.value=!!$.final,o.value=!1))}function Vs(F){F.key==="Escape"&&(d.value?d.value=!1:q.value&&(q.value=!1))}return gl(()=>{Pt(),ss(),window.addEventListener("message",Ht),window.addEventListener("keydown",Vs)}),bl(()=>{window.removeEventListener("message",Ht),window.removeEventListener("keydown",Vs),Ie&&(Ie.close(),Ie=null),Z&&re&&Z.off("afterChange",re)}),(F,$)=>{var Q,oe,ae,ie,de;return p(),h("div",{class:se(["ap-shell",{"is-embed":n,"is-desktop":Ue.value==="desktop","is-final":u.value}]),"data-testid":"agent-preview-root"},[f("div",{class:"ap-phone",style:$t(Y.value)},[!r.value&&o.value?(p(),h("div",nb,[f("span",null,k(P.value.finalPreviewBanner),1),f("div",sb,[f("button",{type:"button",class:"ap-exit-btn is-primary",onClick:Bl},k(P.value.exportFinalHtml),1),f("button",{type:"button",class:"ap-exit-btn",onClick:$[0]||($[0]=ne=>o.value=!1)},k(P.value.backToTuning),1)])])):V("",!0),n?V("",!0):(p(),h("header",{key:1,class:se(["ap-header",{"is-final-header":u.value}])},[f("div",lb,[f("span",ab,k(((Q=y.value)==null?void 0:Q.title)||P.value.defaultTitle),1),J.value&&!u.value?(p(),h("span",{key:0,class:"ap-live-badge","data-testid":"agent-live-badge",title:P.value.liveTitle(S.value)},k(P.value.liveBadge),9,ib)):V("",!0)]),u.value?V("",!0):(p(),h("div",rb,[f("button",{type:"button",class:"ap-mini","data-testid":"agent-locale-toggle",onClick:Ct},k(i.value?"中文":"EN"),1),Ee(s)?(p(),h("button",{key:0,type:"button",class:"ap-link",onClick:$[1]||($[1]=ne=>Pt({preserveUiState:!0,applyTheme:!0}))},k(P.value.refresh),1)):V("",!0),f("button",{type:"button",class:"ap-link",onClick:$[2]||($[2]=ne=>y.value&&be(y.value))},k(P.value.reset),1)]))],2)),!n&&w.value&&u.value&&Xt.value&&X.value.total>0?(p(),h("div",ob,[f("div",cb,[f("span",null,[Je(k(P.value.progressLabel)+" ",1),f("strong",null,k(X.value.percent)+"%",1)]),X.value.firstMissingRequiredKey?(p(),h("button",{key:0,type:"button",class:"ap-jump",onClick:Ye},k(P.value.jumpMissing),1)):X.value.requiredTotal>0?(p(),h("span",ub,k(P.value.requiredDone),1)):V("",!0)]),f("div",db,[f("div",{class:"ap-prog__fill",style:$t({width:`${X.value.percent}%`})},null,4)])])):V("",!0),!n&&w.value&&!u.value?(p(),h("section",fb,[f("div",vb,[(p(!0),h(le,null,ke(Ee(nv),ne=>(p(),h("button",{key:ne.id,type:"button",class:se(["ap-pill",{"is-active":$e.value===ne.id}]),onClick:ge=>Te(ne.id)},k(P.value.skins[ne.id]||ne.shortName),11,pb))),128))]),f("div",hb,[f("div",mb,[f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":ce.value==="flat"}]),onClick:$[3]||($[3]=ne=>ce.value="flat")},k(P.value.modeFlat),3),f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":ce.value==="collapsible"}]),onClick:$[4]||($[4]=ne=>ce.value="collapsible")},k(P.value.modeCollapsible),3),f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":ce.value==="step"}]),disabled:!W.value,onClick:$[5]||($[5]=ne=>{ce.value="step",Se.value=0})},k(P.value.modeStep),11,gb)]),f("div",yb,[(p(!0),h(le,null,ke(Ee(tv),ne=>(p(),h("button",{key:ne.id,type:"button",class:se(["ap-dot",{"is-active":(Xe.value||"#0F52BA")===ne.brandColor}]),style:$t({background:ne.brandColor}),title:P.value.brandPresetLabels[ne.id]||ne.label,"aria-label":P.value.brandPresetLabels[ne.id]||ne.label,onClick:ge=>Xe.value=ne.id==="default"?"":ne.brandColor},null,14,bb))),128)),f("button",{type:"button",class:se(["ap-mini",{"is-active":xt.value}]),"data-testid":"agent-review-toggle",onClick:$[6]||($[6]=ne=>xt.value=!xt.value)},k(xt.value?P.value.reviewOn:P.value.reviewOff),3)])]),f("div",_b,[f("div",{class:"ap-seg",title:P.value.kbTitle},[f("span",Cb,k(P.value.kbLabel),1),f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":qe.value==="auto"}]),onClick:$[7]||($[7]=ne=>qe.value="auto")},k(P.value.kbAuto),3),f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":qe.value==="always-custom"}]),onClick:$[8]||($[8]=ne=>qe.value="always-custom")},k(P.value.kbCustom),3),f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":qe.value==="native"}]),onClick:$[9]||($[9]=ne=>qe.value="native")},k(P.value.kbNative),3)],8,kb),f("div",{class:"ap-seg",title:P.value.vpTitle},[f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":Ue.value==="mobile"}]),onClick:$[10]||($[10]=ne=>Ue.value="mobile")},k(P.value.vpMobile),3),f("button",{type:"button",class:se(["ap-seg__btn",{"is-active":Ue.value==="desktop"}]),onClick:$[11]||($[11]=ne=>Ue.value="desktop")},k(P.value.vpDesktop),3)],8,Sb)]),f("div",wb,[f("button",{type:"button",class:"ap-fin-btn","data-testid":"preview-final-toggle",onClick:$[12]||($[12]=ne=>o.value=!0)},k(P.value.btnFinalPreview),1),Ee(s)?(p(),h("button",{key:0,type:"button",class:"ap-fin-btn",disabled:c.value,onClick:$[13]||($[13]=ne=>Ut("preview"))},k(c.value?P.value.btnSavingTheme:P.value.btnSaveTheme),9,Tb)):V("",!0),f("button",{type:"button",class:"ap-fin-btn","data-testid":"export-final-schema-btn",onClick:$[14]||($[14]=ne=>Vn(!1)),title:P.value.btnExportSchemaTitle},k(P.value.btnExportSchema),9,xb),f("button",{type:"button",class:"ap-fin-btn","data-testid":"export-mobile-bundle-btn",onClick:$[15]||($[15]=ne=>Vn(!0)),title:P.value.btnMobileBundleTitle},k(P.value.btnMobileBundle),9,$b),f("button",{type:"button",class:"ap-fin-btn is-accent","data-testid":"export-final-html-btn",onClick:Bl},k(P.value.btnFinalHtml),1)]),Xt.value&&X.value.total>0?(p(),h("div",Ab,[f("div",Mb,[f("span",null,[Je(k(P.value.progressLabel)+" ",1),f("strong",null,k(X.value.percent)+"%",1),Je(" · "+k(P.value.requiredLabel)+" "+k(X.value.requiredFilled)+"/"+k(X.value.requiredTotal),1)]),X.value.firstMissingRequiredKey?(p(),h("button",{key:0,type:"button",class:"ap-jump",onClick:Ye},k(P.value.jumpMissing),1)):X.value.requiredTotal>0?(p(),h("span",Eb,k(P.value.requiredDone),1)):V("",!0)]),f("div",Fb,[f("div",{class:"ap-prog__fill",style:$t({width:`${X.value.percent}%`})},null,4)])])):V("",!0)])):V("",!0),v.value&&u.value?(p(),h("div",Ib,[f("span",null,k(P.value.draftRestored),1),f("button",{type:"button",class:"ap-jump",onClick:$[16]||($[16]=ne=>we(!0))},k(P.value.draftClear),1)])):V("",!0),ft.value.length>=2?(p(),h("div",Db,[f("span",null,k(P.value.errSummary(ft.value.length)),1),f("button",{type:"button",class:"ap-err-next-btn",onClick:Zt},k(P.value.errNext),1)])):V("",!0),j.value?(p(),h("div",Pb,k(j.value),1)):V("",!0),f("main",{class:"ap-body",style:$t({background:Y.value["--fs-page-bg"]})},[O.value?(p(),h("div",Ob,k(O.value),1)):w.value?(p(),h(le,{key:2},[(oe=y.value)!=null&&oe.description?(p(),h("div",Lb,k(y.value.description),1)):V("",!0),ce.value==="step"&&W.value?(p(),h("div",Nb,[(p(!0),h(le,null,ke(C.value,(ne,ge)=>(p(),h("button",{key:ne.key,type:"button",class:se(["ap-step",{"is-active":Se.value===ge}]),onClick:Ne=>Se.value=ge},k(ge+1)+". "+k(ne.title||P.value.stepFallback(ge+1)),11,Vb))),128))])):V("",!0),Ge(Ee(tb),Nr({groups:ue.value,fields:b,formCore:Ee(Z),"label-align":kt.value,"label-width":"108px","host-handlers":te},Ee(ns)),null,16,["groups","fields","formCore","label-align"]),ce.value==="step"&&W.value?(p(),h("div",Bb,[f("button",{type:"button",class:"ap-step-btn",disabled:Se.value<=0,onClick:$[17]||($[17]=ne=>Se.value=Math.max(0,Se.value-1))},k(P.value.stepPrev),9,jb),f("span",Kb,k(Se.value+1)+" / "+k(C.value.length),1),Se.value<C.value.length-1?(p(),h("button",{key:0,type:"button",class:"ap-step-btn is-primary",onClick:Qt},k(P.value.stepNext),1)):(p(),h("button",{key:1,type:"button",class:"ap-step-btn is-primary",onClick:tt},k(P.value.stepVerify),1))])):V("",!0)],64)):(p(),h("div",Rb,k(P.value.initCore),1))],4),f("footer",Ub,[u.value?V("",!0):(p(),h(le,{key:0},[f("button",{type:"button",class:"ap-fbtn",onClick:$[18]||($[18]=ne=>{R.value="payload",q.value=!0})},k(P.value.footerPayload),1),f("button",{type:"button",class:"ap-fbtn",onClick:$[19]||($[19]=ne=>{R.value="schema",q.value=!0})},k(P.value.footerSchema),1)],64)),f("button",{type:"button",class:"ap-fprimary","data-testid":"agent-validate-btn",disabled:A.value,onClick:tt},k(A.value?P.value.submitting:u.value?Ce.value||P.value.submitDefault:P.value.validateAndCollect),9,Hb)]),d.value?(p(),h("div",{key:7,class:"ap-mask",onClick:$[21]||($[21]=lt(ne=>d.value=!1,["self"]))},[f("div",qb,[f("div",Wb,[$[29]||($[29]=f("div",{class:"ap-receipt__icon"},"✓",-1)),f("div",null,[f("div",Gb,k((ae=x.value)!=null&&ae.ok?P.value.receiptSubmitted:P.value.receiptReady),1),f("div",zb,[Je(k(((ie=y.value)==null?void 0:ie.title)||P.value.defaultTitle)+" ",1),(de=x.value)!=null&&de.submissionId?(p(),h(le,{key:0},[Je(k(P.value.receiptIdPrefix)+k(x.value.submissionId),1)],64)):V("",!0)])])]),f("div",Yb,[(p(!0),h(le,null,ke(Ls.value,ne=>(p(),h("div",{key:ne.key,class:"ap-receipt__row"},[f("span",Jb,k(ne.label),1),f("span",Xb,k(ne.value),1)]))),128))]),f("div",Zb,[Ee(s)?(p(),h("button",{key:0,type:"button",class:"ap-fprimary",disabled:G.value,onClick:Ns},k(he.value?P.value.receiptSavedInbox(he.value.totalInInbox):G.value?P.value.submitting:P.value.receiptSaveInbox),9,Qb)):V("",!0),f("button",{type:"button",class:"ap-fbtn",onClick:Bn},k(P.value.receiptDownloadJson),1),f("button",{type:"button",class:"ap-fbtn",onClick:$[20]||($[20]=ne=>d.value=!1)},k(P.value.receiptBack),1)])])])):V("",!0),q.value?(p(),h("div",{key:8,class:"ap-mask",onClick:$[28]||($[28]=lt(ne=>q.value=!1,["self"]))},[f("div",e_,[f("div",t_,[f("div",n_,[f("button",{type:"button",class:se(["ap-dtab",{"is-active":R.value==="payload"}]),onClick:$[22]||($[22]=ne=>R.value="payload")},k(P.value.tabPayload),3),f("button",{type:"button",class:se(["ap-dtab",{"is-active":R.value==="telemetry"}]),onClick:$[23]||($[23]=ne=>R.value="telemetry")},k(P.value.tabTelemetry(ee.value.totalEvents)),3),f("button",{type:"button",class:se(["ap-dtab",{"is-active":R.value==="schema"}]),onClick:$[24]||($[24]=ne=>R.value="schema")},k(P.value.tabSchema),3)]),f("button",{type:"button",class:"ap-link",onClick:$[25]||($[25]=ne=>q.value=!1)},k(P.value.close),1)]),f("div",s_,[R.value==="payload"?(p(),h(le,{key:0},[U.value!==null?(p(),h("div",{key:0,class:se(["ap-banner",U.value?"is-ok":"is-err"])},k(U.value?P.value.validatePassed:P.value.validateFailed),3)):V("",!0),Ee(s)&&U.value?(p(),h("div",l_,[f("button",{type:"button",class:"ap-inbox-btn","data-testid":"save-local-inbox-btn",disabled:G.value,onClick:Ns},k(G.value?P.value.savingInbox:P.value.saveInboxBtn),9,a_),he.value?(p(),h("span",i_,k(P.value.savedInboxMeta(he.value.totalInInbox,he.value.submissionId)),1)):V("",!0)])):V("",!0),f("pre",r_,k(JSON.stringify(B.value,null,2)),1)],64)):R.value==="telemetry"?(p(),h("pre",o_,k(JSON.stringify(ee.value,null,2)),1)):(p(),h(le,{key:2},[f("div",c_,[f("button",{type:"button",class:"ap-inbox-btn",onClick:$[26]||($[26]=ne=>Vn(!1))},k(P.value.dlPureSchema),1),f("button",{type:"button",class:"ap-inbox-btn",onClick:$[27]||($[27]=ne=>Vn(!0))},k(P.value.dlMobileBundle),1)]),f("pre",u_,k(JSON.stringify(y.value,null,2)),1)],64))])])])):V("",!0)],4)],2)}}}),[["__scopeId","data-v-dd3cdf23"]])).mount("#app")})();