@fox-js/foxui 4.0.1-30 → 4.0.1-31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";/*!
2
- * @fox-js/foxui-base v4.0.0 Wed Mar 06 2024 14:31:39 GMT+0800 (中国标准时间)
2
+ * @fox-js/foxui-base v4.0.0 Mon Mar 11 2024 00:43:29 GMT+0800 (中国标准时间)
3
3
  */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),_e=require("@fox-js/validator"),te=require("@fox-js/icons-vue"),ae=require("@fox-js/i18n"),Yt=window,Vs=typeof window<"u";function As(){return typeof Yt<"u"?Yt.requestAnimationFrame||Yt.webkitRequestAnimationFrame||function(e){Yt.setTimeout(e,1e3/60)}:function(e){setTimeout(e,1e3/60)}}function hr(e){Vs?cancelAnimationFrame(e):clearTimeout(e)}const je=As();/*!
4
4
  * @fox-js/big-decimal v4.0.1-6 Thu Aug 17 2023 21:31:19 GMT+0800 (中国标准时间)
5
- */function no(e,o="0"){let l=0,n=-1;e[0]=="-"&&(l++,n=1,e=e.substring(1),e.length),o[0]=="-"&&(l++,n=2,o=o.substring(1),o.length),e=Se(e),o=Se(o),[e,o]=$n(Se(e),Se(o)),l==1&&(n==1?e=Uo(e):o=Uo(o));let a=gr(e,o);return l?l==2?"-"+Se(a):e.length<a.length?Se(a.substring(1)):"-"+Se(Uo(a)):Se(a)}function Uo(e){let o="",l=e.length,n=e.split(".")[1],a=n?n.length:0;for(let s=0;s<l;s++)e[s]>="0"&&e[s]<="9"?o+=9-parseInt(e[s]):o+=e[s];let r=a>0?"0."+new Array(a).join("0")+"1":"1";return gr(o,r)}function Se(e){let o=e.split(".");for(o[0]||(o[0]="0");o[0][0]=="0"&&o[0].length>1;)o[0]=o[0].substring(1);return o[0]+(o[1]?"."+o[1]:"")}function $n(e,o){let l=e.split("."),n=o.split("."),a=l[0].length,r=n[0].length;return a>r?n[0]=new Array(Math.abs(a-r)+1).join("0")+(n[0]?n[0]:""):l[0]=new Array(Math.abs(a-r)+1).join("0")+(l[0]?l[0]:""),a=l[1]?l[1].length:0,r=n[1]?n[1].length:0,(a||r)&&(a>r?n[1]=(n[1]?n[1]:"")+new Array(Math.abs(a-r)+1).join("0"):l[1]=(l[1]?l[1]:"")+new Array(Math.abs(a-r)+1).join("0")),e=l[0]+(l[1]?"."+l[1]:""),o=n[0]+(n[1]?"."+n[1]:""),[e,o]}function gr(e,o){[e,o]=$n(e,o);let l="",n=0;for(let a=e.length-1;a>=0;a--){if(e[a]==="."){l="."+l;continue}let r=parseInt(e[a])+parseInt(o[a])+n;l=r%10+l,n=Math.floor(r/10)}return n?n.toString()+l:l}var ye=(e=>(e[e.CEILING=0]="CEILING",e[e.DOWN=1]="DOWN",e[e.FLOOR=2]="FLOOR",e[e.HALF_DOWN=3]="HALF_DOWN",e[e.HALF_EVEN=4]="HALF_EVEN",e[e.HALF_UP=5]="HALF_UP",e[e.UNNECESSARY=6]="UNNECESSARY",e[e.UP=7]="UP",e))(ye||{});function It(e,o=0,l=ye.HALF_EVEN){if(l===ye.UNNECESSARY)throw new Error("UNNECESSARY Rounding Mode has not yet been implemented");typeof e=="number"&&(e=e.toString());let n=!1;e[0]==="-"&&(n=!0,e=e.substring(1));let a=e.split("."),r=a[0],s=a[1];if(o<0){if(o=-o,r.length<=o)return"0";{let c=r.substr(0,r.length-o);return e=c+"."+r.substr(r.length-o)+s,c=It(e,0,l),(n?"-":"")+c+new Array(o+1).join("0")}}if(o==0)return r.length,Aa(a[1],r,n,l)?(n?"-":"")+Ho(r):(n?"-":"")+r;if(a[1]){if(a[1].length<o)return(n?"-":"")+r+"."+a[1]+new Array(o-a[1].length+1).join("0")}else return(n?"-":"")+r+"."+new Array(o+1).join("0");s=a[1].substring(0,o);let i=a[1].substring(o);return i&&Aa(i,s,n,l)&&(s=Ho(s),s.length>o)?(n?"-":"")+Ho(r,parseInt(s[0]))+"."+s.substring(1):(n?"-":"")+r+"."+s}function Aa(e,o,l,n){if(!e||e===new Array(e.length+1).join("0")||n===ye.DOWN||!l&&n===ye.FLOOR||l&&n===ye.CEILING)return!1;if(n===ye.UP||l&&n===ye.FLOOR||!l&&n===ye.CEILING)return!0;let a="5"+new Array(e.length).join("0");if(e>a)return!0;if(e<a)return!1;switch(n){case ye.HALF_DOWN:return!1;case ye.HALF_UP:return!0;case ye.HALF_EVEN:default:return parseInt(o[o.length-1])%2==1}}function Ho(e,o=0){o||(o=1),typeof e=="number"&&e.toString();let l=e.length-1,n="";for(let a=l;a>=0;a--){let r=parseInt(e[a])+o;r==10?(o=1,r=0):o=0,n+=r}return o&&(n+=o),n.split("").reverse().join("")}function tn(e,o){e=e.toString(),o=o.toString();let l=0;e[0]=="-"&&(l++,e=e.substr(1)),o[0]=="-"&&(l++,o=o.substr(1)),e=wt(e),o=wt(o);let n=0,a=0;e.indexOf(".")!=-1&&(n=e.length-e.indexOf(".")-1),o.indexOf(".")!=-1&&(a=o.length-o.indexOf(".")-1);let r=n+a;if(e=wt(e.replace(".","")),o=wt(o.replace(".","")),e.length<o.length){let m=e;e=o,o=m}if(o=="0")return"0";let s=o.length,i=0,c=[],d=s-1,f="";for(let m=0;m<s;m++)c[m]=e.length-1;for(let m=0;m<2*e.length;m++){let h=0;for(let y=o.length-1;y>=d&&y>=0;y--)c[y]>-1&&c[y]<e.length&&(h+=parseInt(e[c[y]--])*parseInt(o[y]));h+=i,i=Math.floor(h/10),f=h%10+f,d--}return f=wt(Ts(f,r)),l==1&&(f="-"+f),f}function Ts(e,o){return o==0?e:(e=o>=e.length?new Array(o-e.length+1).join("0")+e:e,e.substr(0,e.length-o)+"."+e.substr(e.length-o,o))}function wt(e){for(;e[0]=="0";)e=e.substr(1);if(e.indexOf(".")!=-1)for(;e[e.length-1]=="0";)e=e.substr(0,e.length-1);return e==""||e=="."?e="0":e[e.length-1]=="."&&(e=e.substr(0,e.length-1)),e[0]=="."&&(e="0"+e),e}function on(e,o,l=8){if(o==0)throw new Error("Cannot divide by 0");if(e=e.toString(),o=o.toString(),e=e.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),o=o.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),e==0)return"0";let n=0;o[0]=="-"&&(o=o.substring(1),n++),e[0]=="-"&&(e=e.substring(1),n++);var a=o.indexOf(".")>0?o.length-o.indexOf(".")-1:-1;if(o=Se(o.replace(".","")),a>=0){let d=e.indexOf(".")>0?e.length-e.indexOf(".")-1:-1;if(d==-1)e=Se(e+new Array(a+1).join("0"));else if(a>d)e=e.replace(".",""),e=Se(e+new Array(a-d+1).join("0"));else if(a<d){e=e.replace(".","");let f=e.length-d+a;e=Se(e.substring(0,f)+"."+e.substring(f))}else a==d&&(e=Se(e.replace(".","")))}let r=0,s=o.length,i="",c=e.indexOf(".")>-1&&e.indexOf(".")<s?e.substring(0,s+1):e.substring(0,s);if(e=e.indexOf(".")>-1&&e.indexOf(".")<s?e.substring(s+1):e.substring(s),c.indexOf(".")>-1){let d=c.length-c.indexOf(".")-1;c=c.replace(".",""),s>c.length&&(d+=s-c.length,c=c+new Array(s-c.length+1).join("0")),r=d,i="0."+new Array(d).join("0")}for(l=l+2;r<=l;){let d=0;for(;parseInt(c)>=parseInt(o);)c=no(c,"-"+o),d++;i+=d,e?(e[0]=="."&&(i+=".",r++,e=e.substring(1)),c=c+e.substring(0,1),e=e.substring(1)):(r||(i+="."),r++,c=c+"0")}return(n==1?"-":"")+Se(It(i,l-2))}function nn(e,o){return e=e.toString(),o=o.toString(),o=ln(o),no(e,o)}function ln(e){return e[0]=="-"?e=e.substr(1):e="-"+e,e}function Ta(e,o){if(o==0)throw new Error("Cannot divide by 0");e=e.toString(),o=o.toString(),$a(e),$a(o);let l="";e[0]=="-"&&(l="-",e=e.substr(1)),o[0]=="-"&&(o=o.substr(1));let n=nn(e,tn(o,It(on(e,o),0,ye.FLOOR)));return l+n}function $a(e){if(e.indexOf(".")!=-1)throw new Error("Modulus of non-integers not supported")}function Ea(e,o){let l=!1;if(e[0]=="-"&&o[0]!="-")return-1;if(e[0]!="-"&&o[0]=="-")return 1;if(e[0]=="-"&&o[0]=="-"&&(e=e.substr(1),o=o.substr(1),l=!0),[e,o]=$n(e,o),e.localeCompare(o)==0)return 0;for(let n=0;n<e.length;n++)if(e[n]!=o[n])return e[n]>o[n]?l?-1:1:l?1:-1;return 0}class re{value;static RoundingModes=ye;static validate(o){if(o){if(o=o.toString(),isNaN(o))throw Error("Parameter is not a number: "+o);o[0]=="+"&&(o=o.substring(1))}else o="0";if(o.startsWith(".")?o="0"+o:o.startsWith("-.")&&(o="-0"+o.substr(1)),/e/i.test(o)){let[l,n]=o.split(/[eE]/);l=Se(l);let a="";l[0]=="-"&&(a="-",l=l.substring(1)),l.indexOf(".")>=0?(n=parseInt(n)+l.indexOf("."),l=l.replace(".","")):n=parseInt(n)+l.length,l.length<n?o=a+l+new Array(n-l.length+1).join("0"):l.length>=n&&n>0?o=a+Se(l.substring(0,n))+(l.length>n?"."+l.substring(n):""):o=a+"0."+new Array(-n+1).join("0")+l}return o}constructor(o="0"){this.value=re.validate(o)}getValue(){return this.value}static getPrettyValue(o,l,n){if(!(l||n))l=3,n=",";else if(!(l&&n))throw Error("Illegal Arguments. Should pass both digits and separator or pass none");o=re.validate(o);let a=o.charAt(0)=="-";a&&(o=o.substring(1));var r=o.indexOf(".");r=r>0?r:o.length;for(var s="",i=r;i>0;)i<l?(l=i,i=0):i-=l,s=o.substring(i,i+l)+(i<r-l&&i>=0?n:"")+s;return(a?"-":"")+s+o.substring(r)}getPrettyValue(o,l){return re.getPrettyValue(this.value,o,l)}static round(o,l=0,n=ye.HALF_EVEN){if(o=re.validate(o),isNaN(l))throw Error("Precision is not a number: "+l);return It(o,l,n)}round(o=0,l=ye.HALF_EVEN){if(isNaN(o))throw Error("Precision is not a number: "+o);return new re(It(this.value,o,l))}static floor(o){return o=re.validate(o),o.indexOf(".")===-1?o:re.round(o,0,ye.FLOOR)}floor(){return this.value.indexOf(".")===-1?new re(this.value):new re(this.value).round(0,ye.FLOOR)}static ceil(o){return o=re.validate(o),o.indexOf(".")===-1?o:re.round(o,0,ye.CEILING)}ceil(){return this.value.indexOf(".")===-1?new re(this.value):new re(this.value).round(0,ye.CEILING)}static add(o,l){return o=re.validate(o),l=re.validate(l),no(o,l)}add(o){return new re(no(this.value,o.getValue()))}static subtract(o,l){return o=re.validate(o),l=re.validate(l),nn(o,l)}subtract(o){return new re(nn(this.value,o.getValue()))}static multiply(o,l){return o=re.validate(o),l=re.validate(l),tn(o,l)}multiply(o){return new re(tn(this.value,o.getValue()))}static divide(o,l,n){return o=re.validate(o),l=re.validate(l),on(o,l,n)}divide(o,l){return new re(on(this.value,o.getValue(),l))}static modulus(o,l){return o=re.validate(o),l=re.validate(l),Ta(o,l)}modulus(o){return new re(Ta(this.value,o.getValue()))}static compareTo(o,l){return o=re.validate(o),l=re.validate(l),Ea(o,l)}compareTo(o){return Ea(this.value,o.getValue())}static negate(o){return o=re.validate(o),ln(o)}negate(){return new re(ln(this.value))}}function yr(e,o){return re.multiply(`${e}`,`${o}`)}function En(e,o,l=8){return re.divide(`${e}`,`${o}`,l)}function an(e,o){return e=`${e}`,o=`${o}`,re.compareTo(e,o)}function vr(e){return re.negate(e)}function mo(e,o=-1,l=!1,n=3,a=","){let r=`${e}`;if(r.length==0||r==="-")return"";let s=r.charAt(0);s=="-"?r=r.substring(1):s="";let i=r,c="",d=r.indexOf(".");d!=-1&&(i=r.substring(0,d),c=r.substring(d+1)),o!=-1&&(o<c.length?c=c.substring(0,o):l&&o>c.length&&(c=c.padEnd(o,"0")));let f;if(n>0){let m="",h=i.split("").reverse();for(let y=0;y<h.length;y++)m+=h[y]+((y+1)%n==0&&y+1!=h.length?a:"");c.length==0?f=`${s}${m.split("").reverse().join("")}`:f=`${s}${m.split("").reverse().join("")}.${c}`}else c.length==0?f=`${s}${i}`:f=`${s}${i}.${c}`;return f}function kr(e){let o=`${e}`,l=o.charAt(0);l=="-"?o=o.substring(1):l="";let n=o.replace(/[^\d\.-]/g,"");return`${l}${n}`}const st=typeof window<"u",Le=je;function br(e){return e==null}const po=Array.isArray,$s=e=>ho(e)==="[object Map]",Es=e=>ho(e)==="[object Set]",Fe=e=>e instanceof Date,lo=e=>typeof e=="function",Sr=e=>typeof e=="string",Ds=e=>typeof e=="symbol",Be=e=>e!==null&&typeof e=="object",Dn=e=>Be(e)&&lo(e.then)&&lo(e.catch),Cr=Object.prototype.toString,ho=e=>Cr.call(e),rn=e=>ho(e)==="[object Object]",wr=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function xs(e){return e.__esModule||wr&&e[Symbol.toStringTag]==="Module"}const Is=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function nt(...e){let o=e[0]!==void 0&&e[0]!==null?e[0]:{},l=1,n=e.length,a=!1;for(typeof o=="boolean"&&(a=o,o=e[l]??{},l++),typeof o!="object"&&(o={});l<n;l++)if(e[l]!==null&&e[l]!==void 0){let r=e[l];for(let s in r){let i=o[s],c=r[s];if(i!==c)if(a===!0&&c&&typeof c=="object"){let d;Array.isArray(c)?d=i&&Array.isArray(i)?i:[]:d=i&&typeof i=="object"?i:{},o[s]=nt(a,d,c)}else c!==void 0&&(o[s]=c)}}return o}function sn(e,o,l=!1){if(!l)nt(!0,e,o);else{if(typeof o!="object")return{};typeof e!="object"&&(e={});for(let a in o){let r=e[a],s=o[a];if(r!==s)if(typeof s=="object"){if(!Array.isArray(s)&&!rn(s))continue;r=sn(r,s,l),e[a]=r}else{if(typeof s=="function")continue;e[a]=s}}const n=Object.getOwnPropertySymbols(o);for(let a of n){let r=e[a],s=o[a];if(r!==s)if(typeof s=="object"){if(!Array.isArray(s)&&!rn(s))continue;r=sn(r,s,l),e[a]=r}else{if(typeof s=="function")continue;e[a]=s}}}return e}const jo=Is?Promise.resolve():null;function qs(e,...o){jo!==null?o&&o.length>0?jo.then(()=>{e(o)}):jo.then(e):o&&o.length>0?setTimeout(()=>{e(o)}):setTimeout(e)}function pe(e){return e==null?!1:typeof e=="boolean"?e:typeof e=="string"?e.toLocaleLowerCase()==="true":!!e}function me(e){return typeof e=="number"?e:Number(e)}const Ms={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Object]":"object"};function lt(e){let l=Object.prototype.toString.call(e);return e==null?String(e):Ms[l]||"object"}function go(e){if(!e)return!0;const{display:o}=window.getComputedStyle(e);return o==="none"}function Nr(e){return e&&typeof e=="object"&&"setInterval"in e}function Br(e){let o=!!e&&"length"in e&&e.length,l=lt(e);return l==="function"||Nr(e)?!1:l==="array"||o===0||typeof o=="number"&&o>0&&o-1 in e}function Vr(e,o){let l=+o.length,n=0,a=e.length;for(;n<l;n++)e[a++]=o[n];return e.length=a,e}function zs(e,o=[]){let l=o;return e!=null&&(Br(Object(e))?Vr(l,typeof e=="string"?[e]:e):l.push(e)),l}function xe(e,o){if(e==o)return!0;if(e===void 0||o===void 0)return!1;let l=lt(e),n=lt(o);if(l!==n)return!1;if(l==="object"){let a=Object.keys(e),r=Object.keys(o);if(a.length!==r.length)return!1;for(let s=0;s<a.length;s++){let i=a[s],c=e[i],d=o[i];if(!xe(c,d))return!1}return!0}else if(l==="array"){if(e.length!==o.length)return!1;for(let a=0;a<e.length;a++){let r=e[a],s=o[a];if(!xe(r,s))return!1}return!0}return!1}function Ar(e){return Object.prototype.toString.call(e)==="[object RegExp]"}const ie=e=>e==null?!0:typeof e!="string"?!1:e.length===0;function Tr(e){return ie(e)?!0:(e.charAt(0)=="-"&&(e=e.substring(1)),ie(e)||/^(([1-9][0-9]*\.[0-9]*)|([0]\.[0-9]*)|([0-9]*)|([0]{1}))$/.test(e))}function $r(e){if(e==null)return 0;let o=`${e}`;if(o.length==0)return 0;o.charAt(0)=="-"&&(o=o.substring(1)),o=o.replace(/[^\d\.-]/g,"");const l=o.indexOf(".");return l==-1?o.length:l}function Er(e){if(e==null)return 0;const o=`${e}`;if(o.length==0)return 0;const l=o.indexOf(".");return l==-1?0:o.length-(l+1)}function Da(e,o,l){const n=e.indexOf(o);return n===-1?e:o==="-"&&n!==0?e.slice(0,n):e.slice(0,n+1)+e.slice(n).replace(l,"")}function cn(e,o=!0,l=!0){o?e=Da(e,".",/\./g):e=e.replace(/\./g,""),l?e=Da(e,"-",/-/g):e=e.replace(/-/,"");const n=o?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(n,"")}function Ls(e,o){return typeof e=="object"||Array.isArray(e)?o.findIndex(l=>{if(xe(e,l))return!0}):o.indexOf(e)}function Ps(e,o){if(typeof e=="object"||Array.isArray(e)){let l=o.reverse().findIndex(n=>{if(xe(e,n))return!0});return l!==-1&&(l=o.length-1-l),l}return o.lastIndexOf(e)}function ge(e){return e==null||e==null?0:typeof e=="string"?e.length:`${e}`.length}function he(e,...o){const l={};return o.forEach(n=>{for(const a in n)l[a]=e[a]}),l}function xn(e,...o){const l=[];o.forEach(a=>{Reflect.apply([].push,l,Reflect.ownKeys(a))});const n={};for(const a in e)l.includes(a)||(n[a]=e[a]);return n}const Dr=(e,o,l)=>{const n=Object.assign({},e),a=Object.assign({},l);return Object.keys(o).length>0?(Object.keys(n).forEach(r=>{a.hasOwnProperty(r)?typeof a[r]=="string"&&(n[r]=o[a[r]]):o[r]&&(n[r]=o[r])}),n):e};function un(e,o){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),o&&e.stopPropagation()}const Je=(e,o=2)=>{for(e+="";e.length<o;)e="0"+e;return e.toString()},Pe=(e,o,l)=>Math.min(Math.max(e,o),l),In=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,ke=Symbol.for("BroadcastKey");class qn{parent;children=[];callbacks=new Map;proxy=null;name;constructor(o,l,n){this.parent=o,this.proxy=l,this.name=n,o!==null&&o.addChild(this)}addChild(o){this.children.push(o)}removeChild(o){const l=this.children.findIndex(n=>o===n);l!==-1&&this.children.splice(l,1)}destroy(){this.parent!==null&&this.parent.removeChild(this),this.parent=null,this.proxy=null}emit(o,l,...n){if(o.maxLevel!==void 0&&o.maxLevel!==null&&o.maxLevel>0){if(o.level=o.level??0,o.level>o.maxLevel)return[];o.level++}let a=!1;!o.name||o.name==="*"?a=!0:!o.name||o.name==="+"?(a=!1,o.name="*"):Ar(o.name)&&this.name&&o.name.test(this.name)?a=!0:typeof o.name=="function"?a=Reflect.apply(o.name,null,[this.name]):o.name===this.name&&(a=!0);const r=[];if(a){const s=this.callbacks.get(l);if(typeof s=="function"){const c=Reflect.apply(s,this.proxy,[...n]);c!=null&&r.push(c)}const i=this.proxy??{};if(typeof i[l]=="function"){const c=Reflect.apply(i[l],i,[...n]);c!=null&&r.push(c)}}return this.children.forEach(s=>{const i=Reflect.apply(s.emit,s,[{...o},l,...n]);i!=null&&Array.isArray(i)&&Reflect.apply([].push,r,[...i])}),r}emitToChildren(o,l,...n){const a=[];return this.children.forEach(r=>{const s=Reflect.apply(r.emit,r,[{...o},l,...n]);s!=null&&Array.isArray(s)&&Reflect.apply([].push,a,[...s])}),a}on(o,l){this.callbacks.set(o,l)}}function yo(e,o,l,n){const a=new qn(o,e,l);if(n&&typeof n=="object")for(const r in n)a.on(r,n[r]);return a}function Rs(e,o,l){const n=l;if(n[ke])return n[ke];const a=t.inject(ke,null),r=new qn(a,l,e);if(o&&typeof o=="object")for(const s in o)r.on(s,o[s]);return n[ke]=r,t.provide(ke,r),t.onUnmounted(()=>{r.destroy(),n[ke]=void 0}),r}function $t(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[ke]??t.inject(ke,null):t.inject(ke,null)}const et=e=>e.default??e;class Fs{error(o,l){const n=l,a=$t(l);a?a.emit({name:"*",maxLevel:1},"setErrorTip",o):typeof n.setErrorTip=="function"&&n.setErrorTip(o)}reset(o){const l=o,n=$t(o);n?n.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof l.setErrorTip=="function"&&l.setErrorTip("")}success(o){const l=o,n=$t(o);n?n.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof l.setErrorTip=="function"&&l.setErrorTip("")}decorate(o,l,n){Array.isArray(o)||(o=[o]);const a=n,r=$t(n),s=l.find(c=>c.required===!0||c.type==="required"&&c.required!==!1),i=o.find(c=>c.required===!0||c.type==="required"&&c.required!==!1);!s&&i?r?r.emit({name:"*"},"setRequired",!0):typeof a.setRequired=="function"&&a.setRequired(!0):s&&!i&&(r?r.emit({name:"*"},"setRequired",!1):typeof a.setRequired=="function"&&a.setRequired(!1),this.reset(n))}getValue(o){return o.modelValue}}let xr=new Fs;function Os(e){xr=e}function Ks(e,o){et(_e).setValidator(e,o)}function Us(e){et(_e).deleteValidator(e)}let Ir=["blur","clear"];function Hs(e){Ir=e}function qr(){return Ir}let Mr=["focus","change"];function js(e){Mr=e}function zr(){return Mr}function Ws(e){et(_e).messages(e)}function Nt(...e){const o=[];return e.forEach(l=>{l.forEach(n=>{const a=o.findIndex(r=>r.type===n.type);a!==-1&&o.splice(a,1),o.push(n)})}),o}function Xt(e){return e.forEach(o=>{o.type==="required"&&(o.required===null||o.required===void 0)&&(o.required=!0),!o.type&&(o.required===!0||o.required===!1)&&(o.type="required")}),e}const Re=Symbol("ValidateSchemaKey");class Lr{parent=null;validators={};attrRules=[];rules=[];descriptor;proxy;scope=null;constructor(o,l,n){this.parent=o,this.descriptor=l,this.proxy=n,(this.descriptor.validate??!0)&&this.init()}init(){if(this.descriptor.pureDataValidate===!0||!this.descriptor.valueName||!this.proxy)return;let o=this.proxy.$attrs;o&&(this.scope=t.effectScope(),this.scope.run(()=>{t.watchEffect(()=>{const l=Xt(Nt(this.attrRules,this.rules)),n=[];for(let r in o){let s=o[r];if(this.hasValidator(r,!0)){if(s===!1)continue;let c={type:r};s!==null&&typeof s=="object"&&Object.assign(c,s),n.push(c);continue}let i=this.getValidator(r);if(i!==null){let c={type:r,validator:i};n.push(c)}}this.attrRules=Xt(n);const a=Nt(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(a,l)})})}))}destroy(){this.scope&&(this.scope.stop(),this.scope=null),this.parent=null}execHandler(o,...l){const n=this.descriptor.validateHandler;if(n&&typeof n[o]=="function")return Reflect.apply(n[o],n,[...l]);const a=xr;return a&&typeof a[o]=="function"?Reflect.apply(a[o],a,[...l]):null}decorate(o,l){this.descriptor.pureDataValidate!==!0&&this.execHandler("decorate",o,l,this.proxy)}success(){this.descriptor.pureDataValidate!==!0&&this.execHandler("success",this.proxy)}error(o){this.descriptor.pureDataValidate!==!0&&this.execHandler("error",o,this.proxy)}getValue(){return this.proxy===null?null:this.execHandler("getValue",this.proxy)}setValidator(o,l,n=!1){n?et(_e).setValidator(o,l):this.validators[o]=l}getValidator(o){let l=this.validators[o]??null;return l||(l=this.parent?.getValidator(o)??null),l}deleteValidator(o,l=!1){l?et(_e).deleteValidator(o):Reflect.deleteProperty(this.validators,o)}hasValidator(o,l=!1){if(l)return et(_e).hasValidator(o);{let n=Reflect.has(this.validators,o);return!n&&this.parent!==null&&(n=this.parent.hasValidator(o,!1)),n}}setRule(o){const l=Nt(this.attrRules,this.rules);o===null?this.rules=[]:Array.isArray(o)?this.rules=Xt(o):this.rules=Xt([o]);const n=Nt(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(n,l)})}clear(){this.proxy===null||this.descriptor.pureDataValidate===!0||this.execHandler("reset",this.proxy)}validate(){if(this.descriptor.validate??!0){let l=Nt(this.attrRules,this.rules);const n=this.descriptor.fieldName??"value";if(l.length>0){const a={[`${n}`]:l},r=this.getValue(),s={[`${n}`]:r},i=et(_e),c=new i(a),d=this.proxy??s;return c.validate(s,{context:d}).then(m=>{if(m.pass)this.success();else{let h="error";Array.isArray(m.errors)&&m.errors.length>0&&(h=m.errors[0].message??h,m.errors=[m.errors[0]],m.errors[0].ref=d),this.error(h)}return m}).catch(m=>{const h=m.message??`${m}`;return this.error(h),m})}}return Promise.resolve({pass:!0})}}function vo(e,o,l){if(l.valueName=l.valueName??"modelValue",l.valueType=l.valueType??"string",!l.validateHandler&&l.valueName!=="modelValue"){const a=l.valueName;l.validateHandler={getValue(r){return r[a]}}}return new Lr(o,l,e)}const xa=Symbol("EventEmitterKey");class Ys{register=new Map;proxy;constructor(o){this.proxy=o}destroy(){this.proxy=null,this.register.clear()}off(o,l){let n=this.register.get(o);if(n&&Array.isArray(n)){let a=n.findIndex(r=>r===l);a!==-1&&n.splice(a,1)}}on(o,l){let n=this.register.get(o);n||(n=new Array,this.register.set(o,n)),n.push(l)}emit(o,...l){const n=this.register.get(o);n&&n.forEach(a=>{try{Reflect.apply(a,null,[o,...l])}catch(r){console.error(r.message,r)}}),this.proxy&&Reflect.apply(this.proxy.$emit,this.proxy,[o,...l])}}function ht(e,o){let l=null;return function(...n){l&&clearTimeout(l),l=setTimeout(()=>{l=null,Reflect.apply(e,null,[...n])},o)}}function ao(e,o){let l=0;return function(...n){const a=new Date().getTime();a-l<o||(l=a,Reflect.apply(e,null,[...n]))}}function Xs(e,o){const l=ht((n,a)=>{e=n,a()},o);return t.customRef((n,a)=>({get(){return n(),e},set(r){l(r,a)}}))}function Qs(e){let o=!1;return function(...l){o||(o=!0,Reflect.apply(e,null,[...l]))}}function Mn(e,o,l,n=0,a=!0){let r=o,s=0;if(a){const c=e();if(s++,c||s>l)return}const i=()=>{const c=e();s++,!(c||s>l)&&(r+=n,setTimeout(i,r))};setTimeout(i,r)}const De=Symbol("DomainKey"),ut=Symbol("DataItemsKey");class ko{_parent=null;get parent(){return this._parent}set parent(o){this._parent=o}_name=null;get name(){return this._name}_broadcast=null;get broadcast(){return this._broadcast}set broadcast(o){this._broadcast=o}_validateSchema=null;get validateSchema(){return this._validateSchema}set validateSchema(o){this._validateSchema=o}_props=t.reactive({});constructor(o=null){this._name=o}destroy(){this._parent=null,this._broadcast=null,this._validateSchema=null,this._props={}}merge(o,l=[]){for(const n in o){const a=o[n];l.length>0&&l.indexOf(a)!==-1||(this._props[n]=a)}}has(o){if(Reflect.has(this._props,o)){const l=this._props[o];if(l!=null)return!0}return this.parent==null?!1:this.parent.has(o)}delete(o){Reflect.deleteProperty(this._props,o)}set(o,l){this._props[o]=l}get(o,l){if(Reflect.has(this._props,o)){const n=this._props[o];if(n!=null)return n}return this.parent==null?l:this.parent.get(o,l)}getForParent(o,l){return this.parent==null?l:this.parent.get(o,l)}getForSelf(o){return this._props[o]}getAll(o){const l=[];let n=this;for(;n!=null;){if(Reflect.has(n._props,o)){const a=n._props[o];l.push(a)}n=n._parent}return l}}const Gs=new ko;function mt(){return Gs}function Oe(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[De]??t.inject(De,null):t.inject(De,null)}const Wo=Symbol("OriginalDateKey");function zn(e,o,l=[],n){const a=t.getCurrentInstance(),r=a?.proxy;let s=t.inject(De,null);s===null&&(s=mt());const i=e||o.prop||o.name,c=new ko(i);c.parent=s;const d=v=>{r[Wo]||h(v),c.set("modelValue",v)},f=()=>c.getForSelf("modelValue")??null,m=()=>r[Wo]??null,h=v=>{const b={};nt(!0,b,t.toRaw(v)),r[Wo]=b};t.isReactive(o)||typeof o=="function"?t.watch(o,v=>{c.merge(v,l)},{immediate:!0}):c.merge(o,l),o.modelValue&&h(o.modelValue),r[De]=c,t.provide(De,c);let y=null,g=null;if(a!==null){const v=t.inject(ke,null);y=yo(r,v,i,n),c.broadcast=y,r[ke]=y,t.provide(ke,y),r.broadcast=(u,p,...k)=>Reflect.apply(y.emit,y,[u,p,...k]);const b=t.inject(Re,null);g=vo(r,b,{componentName:""}),c.validateSchema=g,r[Re]=g,t.provide(Re,g),r[ut]=new Map,r.validate=(u=!0)=>{const p=[];let k=null;const S={deep:!1};if(u===!0)k={name:"*"};else if(Array.isArray(u)&&u.length>0){const w=u;k={name:N=>N?w.indexOf(N)!==-1:!1}}else if(u!=null&&typeof u=="object"){const w=u;if(S.ignoreHidden=w.ignoreHidden,Array.isArray(w.include)&&w.include.length>0){const N=w.include;k={name:T=>T?N.indexOf(T)!==-1:!1}}else if(Array.isArray(w.exclude)&&w.exclude.length>0){const N=w.exclude;k={name:T=>T?N.indexOf(T)===-1:!1}}else k={name:"*"}}if(k){const w=y?.emitToChildren(k,"validate",S);w&&Reflect.apply([].push,p,w)}return p.length==1?p[0]:p.length>1?Promise.all(p).then(w=>{let N=[];return w.forEach(T=>{T.pass===!1&&Array.isArray(T.errors)&&(N=[...N,...T.errors])}),N.length>0?{pass:!1,errors:N}:{pass:!0}}):Promise.resolve({pass:!0})},r.setNameValidateRules=(u,p=!0,k=!1)=>{if(k===!0){Reflect.ownKeys(u).forEach(w=>{let N=String(w);const B=Fr(c,N,{componentName:"",fieldName:N,pureDataValidate:!0},y,g);r[ut].set(N,B);const D=u[N];D&&B.validateSchema.setRule(D)});return}if(p){const S=Reflect.ownKeys(u),w={name:N=>S.includes(N)};y?.emitToChildren(w,"setNameValidateRules",u,!1)}},r.clearValidate=(u=!0)=>{let p=null;if(u===!0)p={name:"*"};else if(Array.isArray(u)&&u.length>0){const k=u;p={name:S=>S?k.indexOf(S)!==-1:!1}}else if(u!=null&&typeof u=="object"){const k=u;if(Array.isArray(k.include)&&k.include.length>0){const S=k.include;p={name:w=>w?S.indexOf(w)!==-1:!1}}else if(Array.isArray(k.exclude)&&k.exclude.length>0){const S=k.exclude;p={name:w=>w?S.indexOf(w)===-1:!1}}else p={name:"*"}}p&&y?.emitToChildren(p,"clearValidate",!1)},r.resetFields=u=>{const p=f();if(!p)return;const k={};if(nt(!0,k,m()??{}),Array.isArray(u))u.forEach(S=>{p[S]=k[S]});else if(u&&Array.isArray(u.include))(u.include??[]).forEach(w=>{p[w]=k[w]});else if(u&&Array.isArray(u.exclude)){let S=u.exclude??[];Reflect.ownKeys(k).forEach(w=>{S.includes(w)||(p[w]=k[w])})}else Object.assign(p,k);r.clearValidate(u)},r.setModelValue=(u,p)=>{!p||p===i?d(u):y?.emitToChildren({name:p},"setModelValue",u)},r.getModelValue=()=>f()}return t.onUnmounted(()=>{c.destroy(),r[De]=void 0,r[ut]&&(r[ut].clear(),r[ut]=void 0),y!==null&&(y.destroy(),r[ke]=void 0),g!==null&&(g.destroy(),r[Re]=void 0)}),c}function Pr(e,o,l=[]){const a=t.getCurrentInstance()?.proxy;let r=t.inject(De,null);r===null&&(r=mt());const s=e||o.prop||o.name,i=new ko(s);return i.parent=r,t.isReactive(o)||typeof o=="function"?t.watch(o,c=>{i.merge(c,l)},{immediate:!0}):i.merge(o,l),a[De]=i,t.provide(De,i),t.onUnmounted(()=>{i.destroy(),a[De]=void 0}),i}function Rr(e,o,l){const a=Oe(e)?.get("rules");if(!a)return;let r=a[l];r&&(Array.isArray(r)||(r=[r]),o.setRule(r))}function we(e,o,l){const a=t.getCurrentInstance()?.proxy,r=o??"",s=t.inject(ke,null),i=yo(a,s,r,l);a[ke]=i,t.provide(ke,i),a.broadcast=(g,v,...b)=>Reflect.apply(i.emit,i,[g,v,...b]);const c=t.inject(Re,null);e.fieldName=e.fieldName??r;const d=vo(a,c,e);a[Re]=d,t.provide(Re,d),Rr(a,d,r),a.validate=(g=null)=>{const v=[];let b=!1,u=!1;if(Array.isArray(g)&&g.indexOf(r)!==-1)u=!0,b=!0;else if(g&&typeof g=="object"){const p=g;p.ignoreHidden===!0&&go(a.$el)?u=!1:(Array.isArray(p.include)&&p.include.indexOf(r)!==-1||Array.isArray(p.exclude)&&p.exclude.indexOf(r),u=!0),b=p.deep??!1}else typeof g=="boolean"&&(b=g),u=!0;if(u){const p=d?.validate();v.push(p)}if(b){let p=null;const k={deep:!1};if(g===!0)p={name:"*"};else if(Array.isArray(g)&&g.length>0){const S=g;p={name:w=>w?S.indexOf(w)!==-1:!1}}else if(g!=null&&typeof g=="object"){const S=g;if(k.ignoreHidden=S.ignoreHidden,Array.isArray(S.include)&&S.include.length>0){const w=S.include;p={name:N=>N?w.indexOf(N)!==-1:!1}}else if(Array.isArray(S.exclude)&&S.exclude.length>0){const w=S.exclude;p={name:N=>N?w.indexOf(N)===-1:!1}}else p={name:"*"}}if(p){const S=i.emitToChildren(p,"validate",k);Reflect.apply([].push,v,S)}}return v.length==1?v[0]:v.length>1?Promise.all(v).then(p=>{let k=[];return p.forEach(S=>{S.pass===!1&&Array.isArray(S.errors)&&(k=[...k,...S.errors])}),k.length>0?{pass:!1,errors:k}:{pass:!0}}):Promise.resolve({pass:!0})},a.setValidateRule=g=>d?.setRule(g),a.setNameValidateRules=(g,v=!1)=>{const b=g[r];if(b&&d?.setRule(b),v){const u={name:p=>Reflect.ownKeys(g).includes(p)};i.emitToChildren(u,"setNameValidateRules",g,!1)}},a.clearValidate=(g=null)=>{(!Array.isArray(g)||g.indexOf(o??"")!==-1)&&d?.clear();let v=null;if(g===!0)v={name:"*"};else if(Array.isArray(g)&&g.length>0){const b=g;v={name:u=>u?b.indexOf(u)!==-1:!1}}else if(g!=null&&typeof g=="object"){const b=g;if(Array.isArray(b.include)&&b.include.length>0){const u=b.include;v={name:p=>p?u.indexOf(p)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const u=b.exclude;v={name:p=>p?u.indexOf(p)===-1:!1}}else v={name:"*"}}v&&i.emitToChildren(v,"clearValidate",!1)};const f=new Ys(a);a[xa]=f;const m=ht((g="validate")=>{g==="reset"?d.clear():d.validate()},60);return(Array.isArray(e.validateCheckEvents)?e.validateCheckEvents:qr()).forEach(g=>{f.on(g,v=>{m("validate")})}),(Array.isArray(e.validateResetEvents)?e.validateResetEvents:zr()).forEach(g=>{f.on(g,v=>{m("reset")})}),t.onUnmounted(()=>{i.destroy(),a[ke]=void 0,d.destroy(),a[Re]=void 0,f.destroy(),a[xa]=void 0}),{broadcast:i,validateSchema:d,emitEvent:(g,...v)=>{Reflect.apply(f.emit,f,[g,...v])},onEvent:(g,v)=>{Reflect.apply(f.on,f,[v])},offEvent:(g,v)=>{Reflect.apply(f.off,f,[v])}}}function Fr(e,o,l,n,a){const r={},s=o??"",i={getValue(){const f=e.getForSelf("modelValue");return f?f[s]:null},isExist(){const f=e.getForSelf("modelValue");return f?Reflect.has(f,s):!1}};l.fieldName=s,l.validateHandler={getValue(f){return i.getValue()}};const c=vo({},a,l);r.validate=(f=null)=>{if(!i.isExist())return console.warn(`validate error: field [${s}] not exist`),Promise.resolve({pass:!0});const m=[];let h=!1,y=!1;if(Array.isArray(f)&&f.indexOf(s)!==-1)y=!0,h=!0;else if(f&&typeof f=="object"){const g=f;Array.isArray(g.include)&&g.include.indexOf(s)!==-1||Array.isArray(g.exclude)&&g.exclude.indexOf(s),y=!0,h=g.deep??!1}else typeof f=="boolean"&&(h=f),y=!0;if(y){const g=c?.validate();m.push(g)}if(h){let g=null;const v={deep:!1};if(f===!0)g={name:"*"};else if(Array.isArray(f)&&f.length>0){const b=f;g={name:u=>u?b.indexOf(u)!==-1:!1}}else if(f!=null&&typeof f=="object"){const b=f;if(Array.isArray(b.include)&&b.include.length>0){const u=b.include;g={name:p=>p?u.indexOf(p)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const u=b.exclude;g={name:p=>p?u.indexOf(p)===-1:!1}}else g={name:"*"}}if(g){const b=d.emitToChildren(g,"validate",v);Reflect.apply([].push,m,b)}}return m.length==1?m[0]:m.length>1?Promise.all(m).then(g=>{let v=[];return g.forEach(b=>{b.pass===!1&&Array.isArray(b.errors)&&(v=[...v,...b.errors])}),v.length>0?{pass:!1,errors:v}:{pass:!0}}):Promise.resolve({pass:!0})},r.setValidateRule=f=>c?.setRule(f),r.setNameValidateRules=f=>{const m=f[s];m&&c?.setRule(m)};const d=yo(null,n,s,r);return{broadcast:d,validateSchema:c}}const fe=e=>e?`${se(e)}px`:"";function se(e,o=-1){if(typeof e=="number")return e>0&&e<1&&o>0?e*o:e;if(e=e.trim().toLocaleLowerCase(),e.length===0)return 0;let l=e.indexOf("px");if(l!==-1)return Number(e.substring(0,l));if(l=e.indexOf("rem"),l!==-1){let a=Number(e.substring(0,l)),r=1;if(st){const{fontSize:s}=window.getComputedStyle(document.documentElement,null),i=s.indexOf("px");i>0&&(r=Number(s.substring(0,i)))}return a*=r,a}if(l=e.indexOf("%"),l!==-1)return Number(e.substring(0,l))*o;const n=Number(e);return isNaN(n)?0:n}const We="PageStateKey";function Me(e){const o={top:null,left:null,bottom:null,right:null};return e&&(e.top!==null&&e.top!==void 0&&(o.top=se(e.top)),e.left!==null&&e.left!==void 0&&(o.left=se(e.left)),e.bottom!==null&&e.bottom!==void 0&&(o.bottom=se(e.bottom)),e.right!==null&&e.right!==void 0&&(o.right=se(e.right))),o}function dn(e,o,l={},n=!0,a=-1,r=-1,s=0,i=0){if(e.headerHeight=se(l.headerHeight??o.headerHeight??-1),e.headerPadding=Me(l.headerPadding??o.headerPadding),e.footerHeight=se(l.footerHeight??o.footerHeight??-1),e.footerPadding=Me(l.footerPadding??o.footerPadding),e.contentPadding=Me(l.contentPadding??o.contentPadding),n){const c=l.height??o.height;c?e.height=se(c,r):e.height=se(r)-se(s,r)-se(i,r),e.width=se(l.width??o.width??0,a)}}function Or(e,o={}){const l={top:null,left:null,bottom:null,right:null},n={width:0,height:0,headerHeight:0,headerPadding:{...l},footerHeight:0,footerPadding:{...l},contentPadding:{...l},contentHeight:null,safeAreaTop:0,safeAreaBottom:0,safeAreaLeft:0,safeAreaRight:0,headerMounted:!1,footerMounted:!1},a=Object.assign(e.get("safeAreaInset")??{},o.safeAreaInset??{});a&&(n.safeAreaTop=se(a.top),n.safeAreaBottom=se(a.bottom),n.safeAreaLeft=se(a.left),n.safeAreaRight=se(a.right));const r=e.get("pageLayout");if(!r)return null;const s=e.get("rootWidth")??-1,i=e.get("rootHeight")??-1,c=e.get("headerBarHeight")??0,d=e.get("footerBarHeight")??0;dn(n,r,o,!0,s,i,c,d);const f=t.reactive(n),m=e.getForParent(We);m&&(n.height=ro(e,m),n.width=so(e,m),t.watch([()=>ro(e,m),()=>so(e,m)],([y,g])=>{f.height=y,f.width=g}));const h=!m;return t.watch([()=>o.height,()=>e.get("pageLayout"),()=>e.get("rootWidth"),()=>e.get("rootHeight"),()=>e.get("headerBarHeight"),()=>e.get("footerBarHeight")],([y,g,v=-1,b=-1,u=0,p=0])=>{dn(f,g,o,h,v,b,u,p)}),e.set(We,f),f}function bo(e){return e.get(We)}function So(e,o){if(o=o??e.get(We),o&&o.headerMounted){const l=o.safeAreaTop==-1?0:o.safeAreaTop;return o.headerAllHeight??o.headerHeight+l}return 0}function Co(e,o){if(o=o??e.get(We),o&&o.footerMounted){const l=o.safeAreaBottom==-1?0:o.safeAreaBottom;return o.footerAllHeight??o.footerHeight+l}return 0}function ro(e,o){if(o=o??e.get(We),o){if(o.contentInnerHeight)return o.contentInnerHeight;const l=So(e,o),n=Co(e,o);return o.height-l-n-(o.contentPadding.top??0)-(o.contentPadding.bottom??0)}return 0}function so(e,o){return o=o??e.get(We),o?o.contentInnerWidth??o.width-(o.contentPadding.left??0)-(o.contentPadding.right??0):0}function Zs(e,o){const l=e.get("isInnerPage");return typeof l=="function"?Reflect.apply(l,{},[o,e]):!1}function Js(e){return!!e.getForParent(We)}var io=(e=>(e[e.Parent=0]="Parent",e[e.Near=1]="Near",e))(io||{});function Yo(e,o){return e==null?!1:typeof o=="function"?o(e):!0}function Ne(e,o,l=1,n){const a=Oe();return a==null?e:l===0?t.computed(()=>{const r=a.getAll(o);for(let i=r.length-1;i>=0;i--){const c=r[i];if(Yo(c,n))return c}const s=e.value;return Yo(s,n)?s:null}):t.computed(()=>{const r=e.value;return Yo(r,n)?r:a?.get(o)})}function Ae(e){return Ne(e,"readonly",0,function(l){return pe(l)})}function Ce(e){return Ne(e,"disabled",0,function(l){return pe(l)})}function Ee(e,o="modelValue",l){const n=t.toRef(e,o);let a=n.value;typeof l=="function"&&(a=l(n.value));const r=t.ref(a);return t.watch(n,s=>{if(typeof l=="function"){const i=l(s);i!==r.value&&(r.value=i)}else s!==r.value&&(r.value=s)}),r}const Kr=new Map,co=new Map;let fn=null;function _s(e){fn=e}function Ur(e,o,l){if(l){let n=co.get(l);n||(n=new Map,co.set(l,n)),n.set(e,o)}else Kr.set(e,o)}function Ge(e,o,l){!l&&fn&&(l=fn(e)??void 0);let n=null;if(l){let a=co.get(l);a&&(n=a.get(o))}return n||(n=Kr.get(o)),n}function ei(e,o){for(let l in e){const n=e[l];Ur(l,n,o)}}function ti(e){co.delete(e)}function oi(){return{top:0,left:0,bottom:0,right:0}}function ni(e=0,o=0){if(st){const l=document.documentElement.clientWidth||document.body.clientWidth,n=document.documentElement.clientHeight||document.body.clientHeight,a={width:l,height:n-se(e,n)-se(o,n)};return{rootWidth:l,rootHeight:n,pageLayout:a}}else return{rootWidth:-1,rootHeight:-1,pageLayout:{width:"100%",height:"100%",headerHeight:-1,footerHeight:-1}}}class li{packages;_version;get version(){return this._version}constructor(o,l){this.packages=o,this._version=l}install(o,l){l?.install!==!1&&this.packages.forEach(r=>{r.install?o.use(r):r.name&&o.component(r.name,r)});const n=["safeAreaInset","pageLayout","headerBarHeight","footerBarHeight"],a=mt();if(this.initPageLayout(l,a),l.autoAdjustPageLayout!==!1&&window.ResizeObserver){const r=ao(()=>{const i={...l},c=document.documentElement.clientWidth||document.body.clientWidth,d=document.documentElement.clientHeight||document.body.clientHeight;i.width=c,i.height=d,this.initPageLayout(i,a)},150);new window.ResizeObserver(r).observe(window.document.body)}for(const r in l)n.indexOf(r)===-1&&a.set(r,l[r])}initPageLayout(o,l){const n=o.headerBarHeight??0,a=o.footerBarHeight??0,r=nt({},oi(),o.safeAreaInset),s=ni(n,a),i=nt({},s.pageLayout,o.pageLayout);l=l??mt(),l.set("safeAreaInset",r),l.set("headerBarHeight",n),l.set("footerBarHeight",a),l.set("pageLayout",i),l.set("rootWidth",s.rootWidth),l.set("rootHeight",s.rootHeight)}setScopeGetter(o){_s(o)}setAPI(o,l,n){Ur(o,l,n)}getAPI(o,l,n){return Ge(o,l,n)}batchSetAPI(o,l){ei(o,l)}clearScopeAPI(o){ti(o)}getRootDomain(){return mt()}}function X(e){const o="fox-"+e;return{componentName:o,scope:e.replace("-",""),create(l){return l.baseName=e,l.name=o,l.install=n=>{n.component(l.name,l)},t.defineComponent(l)},createDemo(l){return l.baseName=e,l.name="demo-"+e,t.defineComponent(l)}}}const ai=(e,o)=>{let l=document.body;const n=e.teleport||"body";n!="body"&&(Sr(n)?l=document.querySelector(n):l=e.teleport);const a=document.createElement("view"),r=o.name?o.name+"-":"",s=e.id||new Date().getTime();a.id=r+s;let i={};lo(o.wrapper)?i=o.wrapper(l,a):i=o.wrapper;const c=t.createApp(i,e),d=o.components;return d&&d.forEach(f=>{c.use(f)}),l.appendChild(a),{instance:c.mount(a),unmount:()=>{c.unmount(),l.removeChild(a)}}},Hr=(e,o)=>e?t.h(e,o):"",ue={disabled:{type:[Boolean,String],required:!1},readonly:{type:[Boolean,String],required:!1},labelPosition:{type:String,required:!1},labelWidth:{type:[String,Number],required:!1},hasBorder:{type:Boolean,required:!1,default:!0}},de={prop:{type:String,required:!1},label:{type:String,required:!1},labelPosition:{type:String,required:!1},labelWidth:{type:[String,Number],required:!1},isRequired:{type:[String,Boolean],required:!1,default:!1},span:{type:[Number,String],required:!1,default:1},offset:{type:[Number,String],default:0},width:{type:[String,Number],required:!1},infoMarkClass:{type:String,required:!1,default:"is-info"},warnMarkClass:{type:String,required:!1,default:"is-warn"},errorMarkClass:{type:String,required:!1,default:"is-error"},errorTip:{type:String,required:!1},errorIcon:{type:Object,required:!1},errorClass:{type:String,required:!1},warnTip:{type:String,required:!1},warnIcon:{type:Object,required:!1},warnClass:{type:String,required:!1},infoTip:{type:String,required:!1},infoIcon:{type:Object,required:!1},infoClass:{type:String,required:!1},contentClass:{type:String,required:!1,default:"content--default"},contentStyle:{type:Object,required:!1,default:{}},hintType:{type:String,required:!1,default:"text"},hintText:{type:[String,Number],required:!1},hintVisible:{type:[Boolean,String],required:!1,default:!0},hintProps:{type:Object,required:!1,default:{}},appearListen:{type:[Boolean,String],required:!1,default:!1}},jr={column:{type:[String,Number],required:!1},columnWidth:{type:[String,Number],required:!1},gutter:{type:[String,Number],required:!1},minItemWidth:{type:[String,Number],required:!1},maxItemWidth:{type:[String,Number],required:!1}},Wr={name:{type:String,required:!1},tag:{type:String,required:!1,default:"div"},modelValue:{type:String,required:!1},rules:{type:[Object],required:!1},pureDataRules:{type:[Object],required:!1},type:{type:[String],required:!1},justify:{type:[String],required:!1,default:"stretch"},align:{type:[String],required:!1,default:"start"},span:{type:[Number,String],required:!1,default:1},offset:{type:[Number],default:0},autoLayout:{type:[Boolean],required:!1,default:!0},isWrap:{type:[Boolean,String],required:!1,default:!0},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1},showMark:{type:[String,Boolean],required:!1,default:!1},markColor:{type:[String],required:!1},title:{type:String,default:""},titleColor:{type:[String],required:!1},collapse:{type:[String,Boolean],requried:!1},showCollapse:{type:[String,Boolean],required:!1,default:!1},collapsePosition:{type:[String],requried:!1,default:"right"},collapseText:{type:[String],requried:!1},expandText:{type:[String],requried:!1},collapseIcon:{type:[Object],requried:!1},collapseHeight:{type:[String,Number],requried:!1},rollingDisplay:{type:[Boolean],requried:!1,default:!0}},Yr=[];for(const e in Wr)Yr.push(e);function Te(e,o=null){if(o||(o=t.getCurrentInstance()),o&&o.proxy){let l=o.proxy;Object.assign(l,e)}}const ri=Symbol.for("InnerPageScopeKey"),si=(e,o)=>({inheritAttrs:!0,props:{...ue,...jr,name:{type:String,required:!1,default:""},modelValue:{type:Object,required:!1},width:{type:[Number,String],required:!1},height:{type:[Number,String],required:!1},safeAreaInset:{type:Object,required:!1},contentPadding:{type:Object,required:!1},headerPadding:{type:Object,required:!1},footerPadding:{type:Object,required:!1},headerHeight:{type:[Number,String],required:!1},footerHeight:{type:[Number,String],required:!1},rules:{type:[Object],required:!1},pureDataRules:{type:[Object],required:!1}},setup(l,n){const a=zn(l.name,l);if(a){const d=Or(a,l);Te({getPageContentHeight:()=>ro(a,d),getPageContentWidth:()=>so(a,d),getPageHeaderHeight:()=>So(a,d),getPageFooterHeight:()=>Co(a,d)});const f=t.inject(ri,!1);d&&f&&(d.contentHeight="100%")}const r=t.computed(()=>({[e]:!0})),s=t.computed(()=>({})),i=t.getCurrentInstance(),c=(d,f=!1)=>{const m=i?.proxy;m&&typeof m.setNameValidateRules=="function"&&m.setNameValidateRules(d,!0,f)};return t.watch([()=>l.rules,()=>l.pureDataRules],([d,f],[m,h])=>{if(d&&m){const y=t.toRaw(m),g=t.toRaw(d),v=g?Reflect.ownKeys(g):[];(y?Reflect.ownKeys(y):[]).forEach(u=>{v.includes(u)||(g[u]=[])}),c(g)}if(f&&h){const y=t.toRaw(h),g=t.toRaw(f),v=g?Reflect.ownKeys(g):[];(y?Reflect.ownKeys(y):[]).forEach(u=>{v.includes(u)||(g[u]=[])}),c(g,!0)}},{deep:!0}),t.onMounted(()=>{if(l.rules){const d=t.toRaw(l.rules);c(d)}if(l.pureDataRules){const d=t.toRaw(l.pureDataRules);c(d,!0)}}),{classes:r,styles:s}}}),{componentName:ii,create:ci,scope:VB}=X("page"),ui=ci(si(ii));function di(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles)},[t.renderSlot(e.$slots,"default")],6)}const J=(e,o)=>{const l=e.__vccOpts||e;for(const[n,a]of o)l[n]=a;return l},Ln=J(ui,[["render",di]]);function wo(e){const o=t.unref(e);return{width:o.offsetWidth,height:o.offsetHeight}}function Pn(e){const o=t.unref(e),l=window.getComputedStyle(o,null),n=parseFloat(l.getPropertyValue("padding-left")),a=parseFloat(l.getPropertyValue("padding-right")),r=parseFloat(l.getPropertyValue("padding-top")),s=parseFloat(l.getPropertyValue("padding-bottom"));return{width:o.clientWidth-n-a,height:o.clientHeight-r-s}}const fi=(e,o,l,n=!1)=>({props:{fixed:{type:Boolean,required:!1,default:!0},safeAreaInsetTop:{type:Boolean,required:!1,default:!0},border:{type:Boolean,required:!1,default:!1},height:{type:[String,Number],required:!1},align:{type:[String],default:"center"},padding:{type:[Object],required:!1},leftShow:{type:[Boolean,String],required:!1,default:!0},leftIcon:{type:[Object],required:!1,default:l},leftText:{type:String,required:!1},titleShow:{type:Boolean,required:!1,default:!0},title:{type:String,required:!1,default:""},titleIcon:{type:[Object],required:!1},rightShow:{type:[String,Boolean],required:!1,default:!0},rightIcon:{type:[Object],required:!1},rightText:{type:String,required:!1,default:""}},emits:["back","click-title","click-right","click-right-text"],setup(a,r){const s=Oe(),i=s?bo(s):null;i&&(i.headerMounted=!0);const c=e,d=t.computed(()=>({[c]:!0,[`${c}--border`]:a.border,[`${c}--fixed`]:a.fixed,[`${c}--safe-area-inset-top`]:a.safeAreaInsetTop})),f=t.computed(()=>({[`${c}__inner`]:!0,[`${c}__inner--${a.align}`]:!0})),m=a.height!==null&&a.height!==void 0?se(a.height):null,h=t.computed(()=>{const C={safeAreaTop:null,height:null,left:null,top:null,right:null,bottom:null};if(s&&i){const V=Me(a.padding??i.headerPadding);return Object.assign(C,V),m&&(i.headerHeight=m),i.headerHeight>0&&(C.height=i.headerHeight),C.safeAreaTop=i.safeAreaTop===-1?0:i.safeAreaTop,C.safeAreaTop>0&&(C.top=C.safeAreaTop+(V.top??0),C.height&&C.height>0&&(C.height=C.height+C.safeAreaTop)),C}if(m&&(C.height=m),a.padding){const V=Me(a.padding);Object.assign(C,V)}return C}),y=t.ref(null),g=()=>{if(i&&y.value&&!go(y.value)){if(!n){const C=wo(y.value);i.headerAllHeight=C.height}return i.headerMounted=!0,!0}return!1};let v=null;t.onMounted(()=>{i&&(Mn(g,50,5,50,!0),window.ResizeObserver&&y.value&&(v=new window.ResizeObserver(()=>{g()}),v.observe(y.value)))}),t.onUnmounted(()=>{i&&(i.headerMounted=!1,v&&(v.disconnect(),v=null))});const b=t.computed(()=>{const C={};return h.value.height!==null&&h.value.height!==void 0&&(C.height=`${h.value.height}px`),h.value.top!==null&&h.value.top!==void 0&&(C.paddingTop=`${h.value.top}px`),h.value.left!==null&&h.value.left!==void 0&&(C.paddingLeft=`${h.value.left}px`),h.value.right!==null&&h.value.right!==void 0&&(C.paddingRight=`${h.value.right}px`),h.value.bottom!==null&&h.value.bottom!==void 0&&(C.paddingBottom=`${h.value.bottom}px`),C}),u=t.computed(()=>!(h.value.height!==null&&h.value.height!==void 0&&h.value.height<=0));function p(){r.emit("back")}function k(){r.emit("click-title")}function S(){r.emit("click-right")}function w(){r.emit("click-right-text")}const N=()=>{if(!a.leftShow)return null;const C=[];if(r.slots.left)C.push(r.slots.left());else{if(r.slots.leftIcon){const V=t.h("view",{class:"left-icon",onClick:p},[r.slots.leftIcon()]);C.push(V)}else if(a.leftIcon){const V=t.h("view",{class:"left-icon",onClick:p},[t.h(a.leftIcon)]);C.push(V)}if(a.leftText){const V=t.h("view",{class:"left-text",onClick:p},[a.leftText]);C.push(V)}}return C.length===0?null:t.h("view",{class:"fox-header-bar__left"},C)},T=()=>{if(!a.rightShow)return null;const C=[];if(r.slots.right)C.push(r.slots.right());else{if(a.rightText){const V=t.h("view",{class:"right-text",onClick:w},[a.rightText]);C.push(V)}if(r.slots.rightIcon){const V=t.h("view",{class:"right-icon",onClick:S},[r.slots.rightIcon()]);C.push(V)}else if(a.rightIcon){const V=t.h("view",{class:"right-icon",onClick:S},[t.h(a.rightIcon)]);C.push(V)}}return C.length===0?null:t.h("view",{class:"fox-header-bar__right"},C)},B=()=>{if(!a.titleShow)return null;const C=[],V=r.slots.default?r.slots.default():null;if(V)C.push(V);else{if(a.title){const M=t.h("view",{class:"title-text"},[a.title]);C.push(M)}if(r.slots.titleIcon){const M=t.h("view",{class:"title-icon",onClick:k},[r.slots.titleIcon()]);C.push(M)}else if(a.titleIcon){const M=t.h("view",{class:"title-icon",onClick:k},[t.h(a.titleIcon)]);C.push(M)}}return C.length===0?null:t.h("view",{class:"fox-header-bar__title"},C)},D=()=>{const C=[],V=r.slots.bottom?r.slots.bottom():null;return V&&C.push(V),C.length===0?null:t.h("view",{class:"fox-header-bar__bottom"},C)};return()=>{if(!u.value)return null;const C=[];if(r.slots.all)C.push(r.slots.all());else{const M=[],L=N();L&&M.push(L);const $=B();$&&M.push($);const E=T();if(E&&M.push(E),M.length>0){const A=t.h("view",{class:f.value},M);C.push(A)}const x=D();x&&C.push(x)}if(C.length===0)return null;const V={class:d.value,style:b.value,ref:y};return t.h("view",V,C)}}}),{componentName:mi,create:pi,scope:hi}=X("header-bar"),Rn=pi(fi(mi,hi,te.Left,!1));function gi(e,o,l=!1){return{props:{fixed:{type:Boolean,required:!1,default:!0},safeAreaInsetBottom:{type:Boolean,required:!1,default:!0},border:{type:Boolean,required:!1,default:!1},height:{type:[String,Number],required:!1},padding:{type:[Object],required:!1},align:{type:String,required:!1,default:"center"}},setup(n,a){const r=Oe(),s=r?bo(r):null,i=t.computed(()=>{const g=e;return{[g]:!0,[`${g}--${n.align}`]:!0,[`${g}--border`]:n.border,[`${g}--fixed`]:n.fixed,[`${g}--safe-area-inset-bottom`]:n.safeAreaInsetBottom}}),c=n.height!==null&&n.height!==void 0?se(n.height):null,d=t.computed(()=>{const g={safeAreaBottom:null,height:null,left:null,top:null,right:null,bottom:null};if(r&&s){const v=Me(n.padding??s.footerPadding);return Object.assign(g,v),c&&(s.footerHeight=c),s.footerHeight>0&&(g.height=s.footerHeight),g.safeAreaBottom=s.safeAreaBottom===-1?0:s.safeAreaBottom,g.safeAreaBottom>0&&(g.bottom=g.safeAreaBottom+(v.bottom??0),g.height&&g.height>0&&(g.height=g.height+g.safeAreaBottom)),g}if(c&&(g.height=c),n.padding){const v=Me(n.padding);Object.assign(g,v)}return g}),f=t.ref(null),m=()=>{if(s&&f.value&&!go(f.value)){if(!l){const g=wo(f.value);s.footerAllHeight=g.height}return s.footerMounted=!0,!0}return!1};let h=null;t.onMounted(()=>{s&&(Mn(m,50,5,50,!0),window.ResizeObserver&&(h=new window.ResizeObserver(()=>{m()}),h.observe(f.value)))}),t.onUnmounted(()=>{s&&(s.footerMounted=!1,h&&(h.disconnect(),h=null))});const y=t.computed(()=>{const g={};return d.value.height!==null&&d.value.height!==void 0&&(g.height=fe(d.value.height)),d.value.top!==null&&d.value.top!==void 0&&(g.paddingTop=fe(d.value.top)),d.value.left!==null&&d.value.left!==void 0&&(g.paddingLeft=fe(d.value.left)),d.value.right!==null&&d.value.right!==void 0&&(g.paddingRight=fe(d.value.right)),d.value.bottom!==null&&d.value.bottom!==void 0&&(g.paddingBottom=fe(d.value.bottom)),g});return()=>{const g=a.slots.default?a.slots.default():[],v={ref:f,class:i.value,style:y.value};return t.h("view",v,g)}}}}const{componentName:yi,create:vi,scope:ki}=X("footer-bar"),Fn=vi(gi(yi,ki,!1));function bi(e,o){return{props:{padding:{type:[Object],required:!1}},setup(l){const n=Oe(),a=t.computed(()=>({[e]:!0})),r=n?bo(n):null,s=t.computed(()=>{const d={};if(n&&r){if(l.padding){const u=Me(l.padding);Object.assign(r.contentPadding,u)}const f=So(n,r),m=Co(n,r);let h="";r.contentHeight?h=`${r.contentHeight}`:h=`${r.height}px`,console.debug("[content]page height:",h),console.debug("[content]header height:",f),console.debug("[content]footer height:",m),console.debug("[content]padding:",r.contentPadding),d.height=h;let y=(r&&r.contentPadding&&r.contentPadding.top)??-1;(y>=0||f>0)&&(y=y<0?0:y,d.paddingTop=`${f+y}px`);let g=(r&&r.contentPadding&&r.contentPadding.bottom)??-1;(g>=0||m>0)&&(g=g<0?0:g,d.paddingBottom=`${m+g}px`);const v=(r&&r.contentPadding&&r.contentPadding.left)??-1;v>=0&&(d.paddingLeft=`${v}px`);const b=(r&&r.contentPadding&&r.contentPadding.right)??-1;return b>=0&&(d.paddingRight=`${b}px`),d}if(l.padding){const f=Me(l.padding);f.left&&(d.paddingLeft=`${f.left}px`),f.top&&(d.paddingTop=`${f.top}px`),f.right&&(d.paddingRight=`${f.right}px`),f.bottom&&(d.paddingBottom=`${f.bottom}px`)}return d}),i=t.ref(null),c=ht(()=>{if(r&&i.value){const d=Pn(i.value);r.contentInnerHeight=d.height,r.contentInnerWidth=d.width}},0);return t.onMounted(()=>{c()}),n&&r&&t.watch([()=>s.value,()=>a.value],([])=>{c()}),{contentRef:i,classes:a,styles:s}}}}const{componentName:Si,create:Ci,scope:AB}=X("content"),wi=Ci(bi(Si));function Ni(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{ref:"contentRef",class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles)},[t.renderSlot(e.$slots,"default")],6)}const On=J(wi,[["render",Ni]]),gt="GroupStateKey",Xr=Symbol.for("GroupScopeKey");function No(){return t.inject(Xr,!1)}function Bo(e=!0){t.provide(Xr,e)}function Bi(e,o={}){Reflect.ownKeys(o).forEach(n=>{if(typeof n!="string")return;const a=o[n];br(a)||(e[n]=a)})}function Vi(e,o={}){const n={type:"grid",width:e.get("width",-1),column:-1,gutter:-1};Bi(n,o);const a=t.shallowRef(n),r=t.markRaw({layout:a,passport:0,order:{index:0}});return e.set(gt,r),r}function Xo(e,o,l=-1,n=-1,a=!1,r,s,i){const c=e.get(gt);if(!c)return;const d=e.get("groupLayout")??{};l===-1&&(l=d.column??1),n===-1&&(n=d.gutter??0),r||(r=d.minItemWidth??-1),s||(s=d.maxItemWidth??-1);const f=se(r),m=se(s);i||(i=d.type??"grid");const h=()=>{const y=o===""||o===-1,g=se(o);let v=me(l);const b=se(n);if(!y){let k=(g-(v-1)*b)/v;for(;m!==-1&&k>m;)v++,k=(g-(v-1)*b)/v;for(;f!==-1&&v>1&&k<f;)v--,k=(g-(v-1)*b)/v}let u=!1;const p=c.layout;p.value.width=o,p.value.column!==v&&(p.value.column=v,u=!0),p.value.gutter!==b&&(p.value.gutter=b,u=!0),p.value.type!==i&&(p.value.type=i,u=!0),u&&t.triggerRef(p)};if(a)h();else{const y=++c.passport;setTimeout(()=>{y===c.passport&&h()},50)}}function Vo(e,o=!1){let l;return o?l=e.getForParent(gt):l=e.get(gt),l.layout}function Ao(e,o=!1){let l;return o?l=e.getForParent(gt):l=e.get(gt),l.order}function Ia(e,o=1){if(o==="stretch")return-1;const l=me(o);return l===-1?100:100*l/e}function To(e,o,l=1,n=0,a){const r={};let s=0;a?s=se(a):s=Ia(o.column,l),s>0&&(r.width=`${s}%`);const i=Ia(o.column,n);i>0&&(r["margin-left"]=`${i}%`);const c=o.gutter/2;return c>0&&(r["padding-left"]=`${c}px`,r["padding-right"]=`${c}px`),r}function $o(e,o,l=1,n=0){if(l==="stretch"){const c=e.index%o.column,d=c+(o.column-c);return e.index=e.index+(d-c),{"grid-column":`${c+1} / -1`}}let a=me(l);if(a===-1){const c=e.index%o.column;return o.column,c==0?e.index=e.index+o.column:e.index=e.index+(o.column-c)+o.column,{"grid-column":"1 / -1"}}if(a>o.column){const c=e.index%o.column;return o.column,c==0?e.index=e.index+o.column:e.index=e.index+(o.column-c)+o.column,{"grid-column":"1 / -1"}}const r=me(n)%o.column;let s=(e.index+r)%o.column,i=s+a;return i>o.column?(s=0,i=s+a,e.index=e.index+(o.column-s)+a):e.index=e.index+r+a,r>0?{"grid-column":`${s+1} / span ${a}`}:{"grid-column-start":`span ${a}`}}const Qr=Symbol("RollingStateKey");function Ai(e){t.provide(Qr,e)}function Ti(){return t.inject(Qr,null)}function mn(e){let o=0;const l=window.getComputedStyle(e,null);if(l.getPropertyValue("box-sizing")==="content-box"){const a=parseFloat(l.getPropertyValue("padding-top")),r=parseFloat(l.getPropertyValue("padding-bottom"));o=e.clientHeight-a-r}else o=e.offsetHeight;return o}function $i(e){let o=mn(e);if(o<=0){const l=e.cloneNode(!0),n=e.offsetWidth;l.style=`width: ${n}px; height: initial; overflow: initial; visibility: hidden;`,document.body.appendChild(l),o=mn(l),document.body.removeChild(l)}return o}function Ei(e,o,l){if(e<=0)return"1fr";const n=(e-(o-1)*l)/o;return n>0?`${n}px`:"1fr"}const Di={...ue,...jr,...Wr};function xi(e,o,l){return{props:Di,emits:["update:collapse"],setup(n,a){const r=zn(n.name,n,Yr),s=Vi(r,{type:n.type}),i=No();Bo(!0);const c=n.rollingDisplay?Ti():null,d=t.ref(null),f=t.computed(()=>n.rollingDisplay?c&&!c.disabled:!1),m=t.computed(()=>i&&r?Vo(r,!0).value:null),h=t.getCurrentInstance(),y=(O,G=!1)=>{const Q=h?.proxy;Q&&typeof Q.setNameValidateRules=="function"&&Q.setNameValidateRules(O,!0,G)};t.watch([()=>n.rules,()=>n.pureDataRules],([O,G],[Q,ee])=>{if(O&&Q){const _=t.toRaw(Q),oe=t.toRaw(O),le=oe?Reflect.ownKeys(oe):[];(_?Reflect.ownKeys(_):[]).forEach(ve=>{le.includes(ve)||(oe[ve]=[])}),y(oe)}if(G&&ee){const _=t.toRaw(ee),oe=t.toRaw(G),le=oe?Reflect.ownKeys(oe):[];(_?Reflect.ownKeys(_):[]).forEach(ve=>{le.includes(ve)||(oe[ve]=[])}),y(oe,!0)}},{deep:!0});const g=e,v=t.computed(()=>{const O={};if(O.height=E.value,n.width)n.width!=="auto"&&(O.width=fe(n.width));else{const G=i?Ao(r,!0):null;if(m.value&&G){if(m.value.type==="grid"){const Q=$o(G,m.value,n.span,n.offset);Object.assign(O,Q)}else if(m.value.type==="flow"){const Q=To(G,m.value,n.span,n.offset,n.width);Object.assign(O,Q)}}}return O}),b=t.computed(()=>{const O=s.layout.value.type;return O==="grid"||O==="flow"?{[`${g}--${O}`]:!0,[`${g}--${O}-justify-${n.justify}`]:!0,[`${g}--${O}-align-${n.align}`]:!0,[`${g}--gutter`]:!0}:{[`${g}--${O}`]:!0,[`${g}--gutter`]:!0}}),u=t.computed(()=>{if(s.layout.value.type==="grid"){let G="";if(n.columnWidth)G=`repeat(auto-fill, ${n.columnWidth})`;else{const Q=Ei(B.value,s.layout.value.column,s.layout.value.gutter);G=`repeat(${s.layout.value.column}, ${Q})`}return{"column-gap":`${s.layout.value.gutter}px`,"grid-template-columns":G}}}),p=t.toRef(n,"gutter"),k=t.toRef(n,"column"),S=t.computed(()=>i||f.value?!0:pe(n.isWrap)),w=[],N=O=>{w.push(O)},T=()=>{let O=w.length;w.splice(0,O)},B=t.ref(-1),D=O=>{const G=Pn(O).width;G>0&&G!==B.value&&(B.value=G)};Xo(r,B.value,k.value,p.value,!0,n.minItemWidth,n.maxItemWidth,n.type),n.autoLayout&&t.watch([B,k,p],([O,G,Q])=>{s.order.index=0,Xo(r,O,G,Q,!1,n.minItemWidth,n.maxItemWidth,n.type)});const C=t.computed(()=>x.value?n.expandText??"":n.collapseText??""),V=t.computed(()=>({[`${e}__header-collapse-text`]:!0})),M=t.computed(()=>({[`${e}__header-collapse-icon`]:!0,"is-expand":!x.value,"is-collapse":x.value})),L=t.ref(),$=t.ref(),E=t.computed(()=>A.value||fe(n.height)||""),x=t.ref(!1),A=t.ref(""),H=t.ref(!1);let R=-1;const Y=(O,G=!0)=>{const Q=L.value;if(Q&&x.value!==O){if(R=R===-1?$i(Q):R,H.value=!0,G)if(Q.style["will-change"]="height",Q.ontransitionend=function(){Q.ontransitionend=null,this.style["will-change"]="auto",O||(A.value="",H.value=!1)},O){let ee=0;n.collapseHeight?ee=n.collapseHeight:$.value&&$.value.classList.contains(`${e}__header`)&&(ee=$.value.offsetHeight),A.value=`${R}px`,t.nextTick(()=>{A.value=`${ee}px`})}else A.value=`${R}px`;else if(O){let ee=0;n.collapseHeight?ee=n.collapseHeight:$.value&&$.value.classList.contains(`${e}__header`)&&(ee=$.value.offsetHeight),A.value=`${ee}px`}else H.value=!1,A.value=`${R}px`;x.value=O,a.emit("update:collapse",O)}};t.watch(()=>n.collapse,O=>{Y(O)});const U=()=>{P()},P=O=>{O=O??!x.value,Y(O)};Te({toggleCollapse:P,doLayout:()=>{w[0]&&(D(w[0]),Xo(r,B.value,k.value,p.value,!0,n.minItemWidth,n.maxItemWidth,n.type))}});let j=null,q=!0;const F=O=>{if(n.rules){const G=t.toRaw(n.rules);y(G)}if(n.pureDataRules){const G=t.toRaw(n.pureDataRules);y(G,!0)}if(st&&(O&&Y(pe(n.collapse),!1),n.autoLayout&&Array.isArray(w)&&w.length>0)){const G=w[0];D(G),window.ResizeObserver&&(j=new window.ResizeObserver(()=>{D(G)}),j.observe(G))}},I=()=>{j?.disconnect(),j=null},K=!f.value||c?.acquire();K&&(d.value=f.value?!0:null),t.onMounted(()=>{if(K&&(F(q),q=!1),f.value&&c){let O=null,G=c.initialHeight;c.observe(L.value,Q=>{if(Q!==d.value)if(Q)d.value=!0,x.value||(A.value=""),O=setTimeout(()=>{O=null,d.value!==!1&&(F(q),q=!1)},100);else{if(O!==null&&clearTimeout(O),d.value=!1,!x.value)if(q)A.value=c.initialHeight;else{let ee=mn(L.value);ee<=0?A.value=G:(A.value=`${ee}px`,G=A.value)}q||I()}})}}),t.onUnmounted(()=>{j?.disconnect(),c&&c.unobserve(L.value)});const W=(O="right")=>{const G=[];if(C.value){const _={class:V.value},oe=t.h("span",_,[C.value]);G.push(oe)}const Q={class:M.value},ee=l(n.collapseIcon,Q);return ee&&G.push(ee),G.length>0?t.h("div",{class:{[`${g}__header-collapse`]:!0,[`is-${O}`]:!0},onClick:U},G):null},Z=(O,G,Q,ee)=>{const _={...b.value};return G===0&&(_[`${g}__first`]=!0),Q>=ee-1&&(_[`${g}__last`]=!0),t.h("div",{ref:N,key:`${G}`,class:_,style:u.value},O)};return()=>{if(f.value&&d.value!==!0){const _=n.tag||"div";return t.h(_,{ref:L,prop:n.name,class:{[`${g}`]:!0,"is-collapse":H.value},style:v.value},[])}s.order.index=0;const O=[];let G=0;if(a.slots.header){const _={key:`${G++}`,ref:$,class:{[`${g}__header`]:!0,[`${g}__first`]:!0}},oe=t.h("div",_,[a.slots.header()]);O.push(oe)}else{const _=[],oe=n.collapsePosition==="left";if(oe&&n.showCollapse){const le=W("left");le&&_.push(le)}if(n.title||a.slots.title){if(n.showMark){const le={class:{[`${g}__header-mark`]:!0}};n.markColor&&(le.style={background:n.markColor});const $e=t.h("div",le);_.push($e)}if(a.slots.title){const le=t.h("div",{class:{[`${g}__header-title`]:!0}},[a.slots.title()]);_.push(le)}else if(n.title){const le=t.h("div",{class:{[`${g}__header-title`]:!0}},[n.title]);_.push(le)}}if(a.slots.toolbar&&_.push(a.slots.toolbar()),!oe&&n.showCollapse){const le=W("right");le&&_.push(le)}if(_.length>0){const le={key:`${G++}`,ref:$,class:{[`${g}__header`]:!0,[`${g}__first`]:!0}},$e=t.h("div",le,_);O.push($e)}}T();const Q=a.slots.default?a.slots.default():[],ee=s.layout.value.type;if(ee==="grid"){const _=Z(Q,G++,0,Q.length);O.push(_)}else if(ee==="flow"){const _=Z(Q,G++,0,Q.length);O.push(_)}else for(let _=0;_<Q.length;_++){const oe=Q[_],le=Z([oe],G++,_,Q.length);O.push(le)}if(S.value){const _=n.tag||"div";return t.h(_,{ref:L,prop:n.name,class:{[`${g}`]:!0,"is-collapse":H.value},style:v.value},[O])}else return O}}}}const{componentName:Ii,create:qi,scope:Mi}=X("group"),zi=(e=te.RectUp,o={})=>t.h(e,o),Kn=qi(xi(Ii,Mi,zi));function Li(e){return e===window}const Pi=/matrix\((.+)\)/,Gr=e=>{const o=t.unref(e);if(!o)return{x:0,y:0};if(Li(o))return{x:0,y:0};let l=0,n=0,a=o;for(;a!==null;)l+=a.offsetLeft,n+=a.offsetTop,a=a.offsetParent;let r=0,s=0,i=0,c=0;for(a=o;a!==document;){s+=a.scrollTop,r+=a.scrollLeft;const{transform:d}=window.getComputedStyle(a);if(d){const f=Pi.exec(d);if(f){let h=f[1].split(/\s*,\s*/);h.length==6&&(i+=Number(h[4]),c+=Number(h[5]))}}a=a.parentNode}return l-=r,n-=s,l+=i,n+=c,{x:l,y:n}};class Ri{watchedListeners=[];add(o){this.watchedListeners.push(o)}remove(o){const l=this.watchedListeners.indexOf(o);l!==-1&&this.watchedListeners.splice(l,1)}size(){return this.watchedListeners.length}listen=()=>{this.watchedListeners.forEach(o=>{try{o()}catch{}})}}class Fi{monitorRegister=new WeakMap;watch(o,l){let n=o.parentNode;const a=document.body.parentNode;for(;n&&n!==a;){let r=this.monitorRegister.get(n);r||(r=new Ri,n.addEventListener("scroll",r.listen),n===document.body&&n.addEventListener("resize",r.listen),this.monitorRegister.set(n,r)),r.add(l),n=n.parentNode}}unwatch(o,l){let n=o.parentNode;const a=document.body.parentNode;for(;n&&n!==a;){let r=this.monitorRegister.get(n);r&&(r.remove(l),r.size()===0&&(this.monitorRegister.delete(n),n.removeEventListener("scroll",r.listen),n===document.body&&n.removeEventListener("resize",r.listen))),n=n.parentNode}}}const qa=new Fi,Zr={price:{type:[Number,String],default:0},needSymbol:{type:Boolean,default:!0},symbol:{type:String,default:"&yen;"},decimalLength:{type:[Number,String],required:!1,default:2},digits:{type:[Number,String],required:!1,default:3},separator:{type:String,required:!1,default:","},position:{type:String,default:"before"},size:{type:String,default:"large"}},{componentName:Oi,create:Ki}=X("price"),Ui=Ki({props:{...Zr},setup(e){const o=t.computed(()=>({[Oi]:!0})),l=t.computed(()=>e.needSymbol?e.symbol:""),n=t.computed(()=>ge(e.price)==0?"":mo(e.price,e.decimalLength,!0,me(e.digits),e.separator)),a=t.computed(()=>{let s=n.value;if(s.length==0)return"";let i=s.indexOf(".");return s.substring(0,i)}),r=t.computed(()=>{let s=n.value;if(s.length==0)return"";let i=s.indexOf(".");return s.substring(i+1)});return{classes:o,showSymbol:l,intText:a,decimalText:r}}}),Hi=["innerHTML"],ji=["innerHTML"];function Wi(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[e.needSymbol&&e.position=="before"?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-price--symbol",`fox-price--symbol-${e.size}`]),innerHTML:e.showSymbol},null,10,Hi)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(`fox-price--${e.size}`)},t.toDisplayString(e.intText),3),e.decimalText.length!=0?(t.openBlock(),t.createElementBlock("view",{key:1,class:t.normalizeClass(`fox-price--decimal-${e.size}`)},".",2)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(`fox-price--decimal-${e.size}`)},t.toDisplayString(e.decimalText),3),e.needSymbol&&e.position=="after"?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass(["fox-price--symbol",`fox-price--symbol-${e.size}`]),innerHTML:e.showSymbol},null,10,ji)):t.createCommentVNode("",!0)],2)}const Ye=J(Ui,[["render",Wi]]),{componentName:Qo,create:Yi}=X("hint-text"),Xi=Yi({components:{Price:Ye},props:{...Zr,type:{type:String,default:"number"},placement:{type:String,default:"top-start"},transition:{type:Boolean,default:!0},size:{type:String,default:"default"},arrowSize:{type:Number,default:6},showArrow:{type:Boolean,default:!0},arrowOffset:{type:Number,default:20},offset:{type:Number,default:12},id:{type:String},reference:{type:Object},autoFit:{type:Boolean,default:!0},message:{type:String,default:""},visible:{type:Boolean,default:!0},unmount:{type:Function},customClass:{type:String},customStyle:{type:Object},customTextClass:{type:String},customTextStyle:{type:Object},closeOnClick:{type:Boolean},zIndex:{type:[String,Number]}},emits:["update:visible"],setup(e,o){const l=t.ref({top:null,right:null,bottom:null,left:null}),n=t.ref({x:0,y:0}),a=t.ref(0),r=t.ref(0),s=t.ref(e.placement),i=t.ref(!1),c=t.ref(null),d=(V,M,L,$,E,x)=>{const A=document.documentElement.clientWidth||document.body.clientWidth,H=document.documentElement.clientHeight||document.body.clientHeight,R=V.split("-");let Y=[];R[0]==="top"?Y=["top","bottom","right","left"]:R[0]==="bottom"?Y=["bottom","top","right","left"]:R[0]==="left"?Y=["left","top","bottom","right"]:R[0]==="right"&&(Y=["right","top","bottom","left"]);const U={top:null,right:null,bottom:null,left:null},P=[];for(let z=0;z<Y.length;z++){const j=Y[z];if(P[0]=j,R[1]&&(P[1]=R[1]),j==="top"){const q=M.y-x-e.arrowSize-e.offset;if(q>=0){U.top=q;let F=0;R[1]==="start"?F=M.x:R[1]==="end"?F=M.x+L-E:F=M.x+L/2-E/2;const I=A-F-E;I<0?(F+=I,m.value=-I):m.value=0,U.left=F<0?0:F;break}}else if(j==="bottom"){const q=M.y+$+e.arrowSize+e.offset;if(q+x<=H){U.top=q;let F=0;R[1]==="start"?F=M.x:R[1]==="end"?F=M.x+L-E:F=M.x+L/2-E/2;const I=A-F-E;I<0?(F+=I,m.value=-I):m.value=0,U.left=F<0?0:F;break}}else if(j==="left"){const q=M.x-E-e.arrowSize-e.offset;if(q>=0){U.left=q;let F=0;R[1]==="start"?F=M.y:R[1]==="end"?F=M.y+$-x:F=M.y+$/2-x/2,U.top=F<0?0:F;break}}else if(j==="right"){const q=M.x+L+e.arrowSize+e.offset;if(q+E<=A){U.left=q;let F=0;R[1]==="start"?F=M.y:R[1]==="end"?F=M.y+$-x:F=M.y+$/2-x/2,U.top=F<0?0:F;break}}}return{bestPlacement:P.join("-"),bestInsetRect:U}},f=(V,M,L=10)=>{if(!st||M===!1||!V)return;n.value=Gr(e.reference),a.value=e.reference.offsetWidth,r.value=e.reference.offsetHeight;const $=c.value.offsetHeight,E=c.value.offsetWidth,{bestPlacement:x,bestInsetRect:A}=d(e.placement,n.value,a.value,r.value,E,$);s.value=x,l.value=A,i.value=!0},m=t.ref(0),h=ht(()=>{f(e.message,e.visible)},10),y=t.ref(e.visible);t.watch(()=>e.visible,V=>{y.value=V});const g=t.computed(()=>y.value&&v.value),v=t.ref(!0),b=ht(V=>{const M=V[0];M&&(v.value=M.isIntersecting)},10),u=new IntersectionObserver(b);t.watch([()=>e.message,()=>e.visible],([V,M])=>{setTimeout(()=>{f(e.message,e.visible)},0)}),t.onMounted(()=>{setTimeout(()=>{f(e.message,e.visible)},0),qa.watch(e.reference,h),u.observe(e.reference)}),t.onBeforeMount(()=>{qa.unwatch(e.reference,h),u.unobserve(e.reference),u.disconnect()});const p=t.computed(()=>{const V={[Qo]:!0};return s.value.startsWith("top")?V["is-top"]=!0:s.value.startsWith("right")?V["is-right"]=!0:s.value.startsWith("bottom")?V["is-bottom"]=!0:s.value.startsWith("right")&&(V["is-right"]=!0),e.size==="small"?V["is-small"]=!0:e.size==="large"&&(V["is-large"]=!0),e.customClass&&typeof e.customClass=="string"&&(V[`${e.customClass}`]=!0),V}),k=t.computed(()=>{const V={};l.value.top!==null&&(V.top=`${l.value.top}px`),l.value.right!==null&&(V.right=`${l.value.right}px`),l.value.bottom!==null&&(V.bottom=`${l.value.bottom}px`),l.value.left!==null&&(V.left=`${l.value.left}px`),e.autoFit&&(V["min-width"]=`${a.value}px`);const M=document.documentElement.clientWidth||document.body.clientWidth;return V["max-width"]=`${M}px`,i.value&&(V.opacity="1"),e.transition||(V.transition="none"),e.zIndex&&(V["z-index"]=`${e.zIndex}`),e.customStyle&&typeof e.customStyle=="object"&&Object.assign(V,e.customStyle),V}),S=t.computed(()=>{const V=[`${Qo}__content`];return e.customTextClass&&V.push(e.customTextClass),V}),w=t.computed(()=>{const V={};return e.customTextStyle&&typeof e.customTextStyle=="object"&&Object.assign(V,e.customTextStyle),V}),N=t.computed(()=>({[`${Qo}__arrow`]:!0})),T=t.computed(()=>{const V={};return e.showArrow?(V.width=`${e.arrowSize}px`,V.height=`${e.arrowSize}px`,s.value==="top"?(V.left="50%",V.bottom=`-${e.arrowSize}px`,V.transform=" translate(-50%, 0%)"):s.value==="top-start"?(V.left=`${e.arrowOffset+m.value}px`,V.bottom=`-${e.arrowSize}px`):s.value==="top-end"?(V.right=`${e.arrowOffset-m.value}px`,V.bottom=`-${e.arrowSize}px`):s.value==="right"?(V.left=`-${e.arrowSize}px`,V.top="50%",V.transform=" translate(0%, -50%)"):s.value==="right-start"?(V.left=`-${e.arrowSize}px`,V.top=`${e.arrowOffset}px`):s.value==="right-end"?(V.left=`-${e.arrowSize}px`,V.bottom=`-${e.arrowOffset}px`):s.value==="bottom"?(V.left="50%",V.top=`-${e.arrowSize}px`,V.transform=" translate(-50%, 0%)"):s.value==="bottom-start"?(V.left=`${e.arrowOffset+m.value}px`,V.top=`-${e.arrowSize}px`):s.value==="bottom-end"?(V.right=`${e.arrowOffset-m.value}px`,V.top=`-${e.arrowSize}px`):s.value==="left"?(V.right=`-${e.arrowSize}px`,V.top="50%",V.transform=" translate(0%, -50%)"):s.value==="left-start"?(V.right=`-${e.arrowSize}px`,V.top=`${e.arrowOffset}px`):s.value==="left-end"&&(V.right=`-${e.arrowSize}px`,V.bottom=`-${e.arrowOffset}px`),V):{display:"none"}}),B=t.computed(()=>g.value&&e.closeOnClick),D=t.computed(()=>{const V={};return e.zIndex&&(V["z-index"]=`${e.zIndex}`),V});return{show:g,tipRef:c,classes:p,styles:k,textClasses:S,textStyles:w,arrowClasses:N,arrowStyles:T,overlayShow:B,overlayStyle:D,onClickOverlay:()=>{y.value=!1,o.emit("update:visible",!1)}}}});function Qi(e,o,l,n,a,r){const s=t.resolveComponent("Price");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.overlayShow?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fox-hint-text__overlay",style:t.normalizeStyle(e.overlayStyle),onClick:o[0]||(o[0]=(...i)=>e.onClickOverlay&&e.onClickOverlay(...i))},null,4)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",{ref:"tipRef",class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles)},[t.createElementVNode("div",{class:t.normalizeClass(e.textClasses),style:t.normalizeStyle(e.textStyles)},[e.type=="number"?(t.openBlock(),t.createBlock(s,{key:0,price:e.message,position:"before",size:e.size},null,8,["price","size"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(e.message),1)],64))],6),t.createElementVNode("div",{class:t.normalizeClass(e.arrowClasses),style:t.normalizeStyle(e.arrowStyles)},null,6)],6),[[t.vShow,e.show]])],64)}const Jr=J(Xi,[["render",Qi]]);class Un{seed=new Date().getTime();constructor(o){this.seed=o??new Date().getTime()}get(){let o=this.seed++;return this.seed<0&&(this.seed=0),o}}const pn={},Gi=new Un,pt=new Map,uo=e=>{if(e){const o=document.getElementById(e);pt.delete(e),o&&o.parentNode?.removeChild(o)}else{for(const o of pt.keys()){const l=document.getElementById(o);l&&l.parentNode?.removeChild(l)}pt.clear()}},Zi=e=>{e.unmount=uo;const o=document.getElementById(e.id);if(o){const l=pt.get(e.id);l?e={...pn,...l,...e}:e={...pn,...e},e.transition=!1;const n=t.createVNode(Jr,e);return t.render(n,o),e.id}},Ji=e=>{e.unmount=uo;let o=e.id??`hinttext_${Gi.get()}`;e={...pn,...e},e.id=o,pt.set(o,e);const l=document.createElement("div");l.id=e.id;const n=t.createVNode(Jr,e);return t.render(n,l),document.body.appendChild(l),o},_i=e=>{if(!e){console.warn("[FoxUI HintText]: msg不能为空");return}},ot={show(e,o,l={},n=!0){_i(o);const a=l.id;return a&&pt.has(a)?Zi({...l,message:o,reference:e}):(n&&uo(),Ji({...l,message:o,reference:e}))},hide(e){uo(e)},install(e){e.config.globalProperties.$hintText=ot}},{componentName:Ma,create:ec}=X("item"),tc=ec({inheritAttrs:!0,props:{...ue,...de},emits:["appear","disappear"],setup(e,o){const l=e.prop??o.attrs.name;we({componentName:Ma,validate:!1},l);const n=Oe(),a=No();Bo(!1);const r=t.computed(()=>a&&n?Vo(n,!1).value:null),s=Ma,i=t.ref(null),c=t.computed(()=>{const O={[s]:!0,[`${s}__gutter`]:r.value&&r.value.type!=="flow",[`${s}__stretch`]:e.span==="stretch",[`${s}__input--border`]:pe(e.hasBorder)};if(O[e.errorMarkClass]=!!M.value,O[e.warnMarkClass]=!!C.value,O[e.infoMarkClass]=!!B.value,typeof i.value=="function"){const G=i.value(l);O[G]=!0}else if(typeof i.value=="string"){const G=i.value;O[G]=!0}return O}),d=t.ref(null),f=t.computed(()=>{const O={};if(e.width)e.width!=="auto"&&(O.width=fe(e.width));else{const G=a&&n?Ao(n,!1):null;if(r.value&&G){if(r.value.type==="grid"){const Q=$o(G,r.value,e.span,e.offset);Object.assign(O,Q)}else if(r.value.type==="flow"){const Q=To(G,r.value,e.span,e.offset,e.width);Object.assign(O,Q)}}}if(typeof d.value=="function"){const G=d.value(l);G&&Object.assign(O,G)}else if(d.value&&typeof d.value=="object"){const G=d.value;Object.assign(O,G)}return O}),m=t.ref(null),h=t.computed({get:()=>m.value??pe(e.isRequired),set:O=>{m.value=O}}),y=t.computed(()=>typeof e.label=="string"&&e.label.length>0||typeof o.slots.label=="function"),g=Ne(t.toRef(e,"labelPosition"),"labelPosition",io.Near),v=t.computed(()=>g&&g.value==="top"?"top":g&&g.value==="right"?"right":"left"),b=t.computed(()=>({[`${s}__main`]:!0,[`${s}__main--${v.value}`]:!0})),u=t.computed(()=>({label:!0,[`label--${v.value}`]:!0})),p=Ne(t.toRef(e,"labelWidth"),"labelWidth",io.Near),k=t.computed(()=>p&&p.value?{width:fe(p.value)}:{}),S=t.computed(()=>({"label--string":!0,"label--required":h.value})),w=t.computed(()=>({content:!0,[e.contentClass]:!0})),N=t.computed(()=>({...e.contentStyle})),T=t.shallowReactive({errorTip:"",errorIcon:null,warnTip:"",warnIcon:null,infoTip:"",infoIcon:null});Te({setRequired(O){h.value=O},setErrorTip(O){T.errorTip=O},setErrorIcon(O){T.errorIcon=O},setWarnTip(O){T.warnTip=O},setWarnIcon(O){T.warnIcon=O},setInfoTip(O){T.infoTip=O},setInfoIcon(O){T.infoIcon=O},setCustomClassName(O){i.value=O},setCustomStyle(O){d.value=O}});const B=t.computed(()=>e.infoTip||T.infoTip),D=t.computed(()=>e.infoIcon||T.infoIcon),C=t.computed(()=>e.warnTip||T.warnTip),V=t.computed(()=>e.warnIcon||T.warnIcon),M=t.computed(()=>e.errorTip||T.errorTip),L=t.computed(()=>e.errorIcon||T.errorIcon),$=t.computed(()=>M.value?"error":C.value?"warn":B.value?"info":""),E=t.computed(()=>$.value.length>0),x=t.computed(()=>$.value==="error"?M.value:$.value==="warn"?C.value:$.value==="info"?B.value:""),A=t.computed(()=>$.value==="error"?L.value:$.value==="warn"?V.value:$.value==="info"?D.value:null),H=t.computed(()=>{let O={[`${s}__tip`]:!0,[`${s}__tip--${$.value}`]:!0};return $.value==="error"&&e.errorClass?O[`${e.errorClass}`]=!0:$.value==="warn"&&e.warnClass?O[`${e.warnClass}`]=!0:$.value==="info"&&e.infoClass&&(O[`${e.infoClass}`]=!0),O}),R=t.computed(()=>{let O={};return g&&g.value==="top"||!y.value?O["padding-left"]="0px":p&&p.value&&(O["padding-left"]=fe(p.value)),O}),Y=()=>{const O=A.value;return O?typeof O=="function"?t.h("div",{class:"fox-item__tip--icon"},[O()]):t.h("div",{class:"fox-item__tip--icon"},[t.h(O)]):null},U=()=>{const O=x.value;return O?typeof O=="function"?t.h("div",{class:"fox-item__tip--text"},[O()]):t.h("div",{class:"fox-item__tip--text"},[O]):null},P=t.computed(()=>o.slots.fixedPreTip),z=t.computed(()=>({[`${s}__fixed-pre-tip`]:!0})),j=t.computed(()=>o.slots.fixedTip),q=t.computed(()=>({[`${s}__fixed-tip`]:!0})),F=t.ref();let I="";t.watch([()=>e.hintVisible,()=>e.hintText,()=>e.hintType,()=>e.hintProps],([O,G,Q,ee])=>{F.value&&(O&&!ie(G)?I?ot.show(F.value,G,{...ee,id:I,type:Q},!0):I=ot.show(F.value,G,{...ee,type:Q},!0):ot.hide(I))});let K=null;const W=()=>{K||!F.value||(K=new IntersectionObserver(O=>{let G=!1;for(let Q of O)if(Q.intersectionRatio>0){G=!0,G&&o.emit("appear",Q);break}G||o.emit("disappear")}),K.observe(F.value))},Z=()=>{!K||!F.value||(K.unobserve(F.value),K=null)};return t.watch(()=>pe(e.appearListen),O=>{O?W():Z()}),t.onMounted(()=>{pe(e.appearListen)&&W()}),t.onUnmounted(Z),{classes:c,styles:f,mainClasses:b,hasLabel:y,labelClasses:u,labelStyles:k,labelStringClasses:S,contentClasses:w,contentStyles:N,contentRef:F,hasTip:E,mTip:x,mIcon:A,renderIcon:Y,renderTip:U,tipClasses:H,tipStyles:R,hasFixedTip:j,fixedTipClasses:q,hasFixedPreTip:P,fixedPreTipClasses:z}}}),oc=["prop"];function nc(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles),prop:e.prop},[t.createElementVNode("div",{class:t.normalizeClass(e.mainClasses)},[e.hasLabel?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.labelClasses),style:t.normalizeStyle(e.labelStyles)},[t.createElementVNode("div",{class:t.normalizeClass(e.labelStringClasses)},[t.renderSlot(e.$slots,"label",{},()=>[t.createTextVNode(t.toDisplayString(e.label),1)])],2),t.renderSlot(e.$slots,"fixedPreTip")],6)):t.createCommentVNode("",!0),t.createElementVNode("div",{ref:"contentRef",class:t.normalizeClass(e.contentClasses),style:t.normalizeStyle(e.contentStyles)},[t.renderSlot(e.$slots,"prepend"),t.renderSlot(e.$slots,"default"),t.renderSlot(e.$slots,"append"),e.hasFixedTip?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.fixedTipClasses)},[t.renderSlot(e.$slots,"fixedTip")],2)):t.createCommentVNode("",!0)],6)],2),t.createVNode(t.Transition,{name:"fox-item__animate"},{default:t.withCtx(()=>[e.hasTip?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.tipClasses),style:t.normalizeStyle(e.tipStyles)},[e.mIcon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon()),{key:0})):t.createCommentVNode("",!0),e.mTip?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderTip()),{key:1})):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0)]),_:1}),t.renderSlot(e.$slots,"hide")],14,oc)}const be=J(tc,[["render",nc]]);function lc(e,o){return{props:{span:{type:[Number,String],required:!1,default:-1},offset:{type:[Number],default:0},width:{type:[String,Number],required:!1},align:{type:[String],required:!1,default:"center"},contentClass:{type:[String],required:!1},contentStyle:{type:[Object]},divide:{type:[Boolean,String],required:!1,default:!1}},setup(l,n){const a=e,r=t.computed(()=>({[a]:!0,[`${a}__stretch`]:l.span==="stretch",[`${a}__${l.align}`]:!0})),s=Oe(),i=No();Bo(!1);const c=t.computed(()=>{const d={};if(l.width)l.width!=="auto"&&(d.width=fe(l.width));else if(i&&s){const f=Vo(s,!1),m=Ao(s,!1);if(f.value&&m){if(f.value.type==="grid"){const h=$o(m,f.value,l.span,l.offset);Object.assign(d,h)}else if(f.value.type==="flow"){const h=To(m,f.value,l.span,l.offset,l.width);Object.assign(d,h)}}}return d});return()=>{const d=[];if(n.slots.default){const m=n.slots.default();if(l.divide)for(let h=0;h<m.length;h++){if(h>0){const y=t.h("div",{class:{[`${a}__divide`]:!0}});d.push(y)}d.push(m[h])}else Reflect.apply([].push,d,m)}const f={class:r.value,style:c.value};return t.h("div",f,d)}}}}const{componentName:ac,create:rc,scope:TB}=X("row-item"),Hn=rc(lc(ac));function sc(e,o){return{props:{span:{type:[Number,String],required:!1,default:1},offset:{type:[Number],default:0},width:{type:[String,Number],required:!1}},setup(l,n){const a=Oe(),r=No();Bo(!1);const s=t.computed(()=>r&&a?Vo(a,!1).value:null),i=e,c=t.computed(()=>({[i]:!0,[`${i}__gutter`]:s.value&&s.value.type!=="flow",[`${i}__stretch`]:l.span==="stretch"})),d=t.computed(()=>{const f={};if(l.width)l.width!=="auto"&&(f.width=fe(l.width));else{const m=r&&a?Ao(a,!1):null;if(s.value&&m){if(s.value.type==="grid"){const h=$o(m,s.value,l.span,l.offset);Object.assign(f,h)}else if(s.value.type==="flow"){const h=To(m,s.value,l.span,l.offset,l.width);Object.assign(f,h)}}}return f});return()=>{const f={class:c.value,style:d.value};return n.slots&&typeof n.slots.default=="function"?t.h("div",f,n.slots.default()):t.h("div",f)}}}}const{componentName:ic,create:cc,scope:$B}=X("slot-item"),jn=cc(sc(ic)),za={type:{type:String,default:"text"},modelValue:{type:[String,Number],default:""},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},adjustPosition:{type:Boolean,default:!0},alwaysSystem:{type:Boolean,default:!1}};function uc(e,o,l,n){return{props:{...ue,...de,...za},emits:["change","update:modelValue","blur","focus","clear"],setup(a,r){const s=Ce(t.computed(()=>a.disabled)),i=Ae(t.computed(()=>a.readonly)),{emitEvent:c}=we({componentName:e,get validate(){return!s.value&&!i.value}},a.prop??r.attrs.name),{toLocaleRefs:d}=ae.useFoxI18n(o),f=d(a,["placeholder"]),m=t.ref(!1),h=Ee(a,"modelValue"),y=e,g=t.computed(()=>({[y]:!0,[`${y}__disabled`]:s.value,[`${y}__readonly`]:i.value})),v=Ne(t.computed(()=>a.textAlign),"textAlign"),b=t.computed(()=>{const E={};return v.value&&(E["text-align"]=v.value),E}),u=E=>{let A=E.target.value;a.type==="digit"&&(A=cn(A,!0)),a.type==="number"&&(A=cn(A,!1)),a.maxLength&&A.length>Number(a.maxLength)&&(A=A.slice(0,Number(a.maxLength))),h.value=A,c("update:modelValue",A,E),c("change",A,E)};let p=Ee(a,"hintText"),k=t.ref(!1);const S=E=>{let A=E.target.value;m.value=!0,ie(p.value)||(k.value=!0),c("focus",A,E)},w=E=>{setTimeout(()=>{k.value&&(k.value=!1),m.value=!1},0);let A=E.target.value;a.maxLength&&A.length>Number(a.maxLength)&&(A=A.slice(0,Number(a.maxLength))),c("blur",A,E)},N=t.computed(()=>({[`${y}__append`]:!0})),T=t.computed(()=>{const E={};return r.slots.append&&!B.value&&!L.value&&(E.display="none"),E}),B=t.computed(()=>ge(a.unit)>0),D=t.computed(()=>!L.value),C=t.computed(()=>({hidden:!D.value})),V=E=>{h.value="",c("update:modelValue","",E),c("change","",E),c("clear","")},M=t.computed(()=>pe(a.clearable)&&!s.value&&!i.value),L=t.computed(()=>{let E=ge(h.value)>0;return pe(a.clearable)&&E&&m.value}),$=t.computed(()=>({action:!0,hidden:!L.value}));return()=>{const E={class:g.value,style:b.value,type:a.type,maxlength:a.maxLength,placeholder:f.placeholder.value,disabled:s.value,readonly:i.value,value:h.value,"adjust-position":a.adjustPosition,"always-system":a.alwaysSystem,onInput:u,onFocus:S,onBlur:w},x=[],A=t.h("input",E);x.push(A);const H=[];if(M.value){const q={class:["action-icon"]},F=t.h(n,q),I={class:$.value,onClick:V},K=t.h("view",I,{default:()=>[F]});H.push(K)}if(B.value){const q=t.h("view",{class:C.value},[a.unit]);H.push(q)}const R={class:N.value,style:T.value},Y=t.h("view",R,{default:()=>H});x.push(Y);const U={default:()=>x};U.label=r.slots.default,U.prepend=r.slots.prepend,U.append=r.slots.append,U.fixedPreTip=r.slots.fixedPreTip,U.fixedTip=r.slots.fixedTip;const z={...xn(a,za),hintText:p.value,hintVisible:k.value};return t.h(l,z,U)}}}}const{componentName:dc,create:fc,scope:mc}=X("input-item"),Wn=fc(uc(dc,mc,be,te.CircleClose));function La(e,o=0){let l=`${e}`,n=l.indexOf(".");if(n==-1)return l;let a=n;for(let r=l.length-1;r>=n;r--)if(l.charAt(r)!="0"){a=r;break}return a-n<o?a=n+o+1:a!=n&&(a+=1),a>l.length?l=l.padEnd(a,"0"):l=l.substring(0,a),l}function Pa(e,o,l=20){if(typeof o=="string"&&(o=me(o)),o==1||o==-1)return`${e}`;if(o==0)return"0";if(o>0){let n=yr(`${e}`,`${o}`);return La(n)}else{let n=En(`${e}`,vr(`${o}`),20);return La(n)}}function pc(e,o=-1,l=!1,n=3,a=","){return mo(e,o,l,n,a)}function Ra(e,o,l,n,a=!0){if(e=="")return"";if(e=kr(e),o=me(o),o==1)return e;if(n)e=Pa(e,o),l&&(e=="0"&&a?e=`${e}.`.padEnd(me(l)+2,"0"):e=En(e,1,me(l)));else{let r=-1*o;e=Pa(e,r)}return e}function Fa(e,o){let l={maxValid:!0,minValid:!0,message:""};if(o.min!==void 0){let n=pe(o.minInclude),a=an(e,o.min);if(n&&a==-1||!n&&(a==0||a==-1)){let r="请输入不小于 {0} 的数值";l.message=r.replace("{0}",o.min),l.minValid=!1}}if(o.max!=null){let n=pe(o.maxInclude),a=an(e,o.max);(n&&a==1||!n&&(a==0||a==1))&&(l.maxValid=!1)}return l}const Oa={clearable:{type:Boolean,default:!0},modelValue:{type:[String,Number],default:""},showTip:{type:[Boolean,String],required:!1,default:!0},min:{type:[Number,String],required:!1},minInclude:{type:[Boolean,String],required:!1,default:!0},max:{type:[Number,String],required:!1},maxInclude:{type:[Boolean,String],required:!1,default:!0},unit:{type:String,required:!1},rates:{type:[Number,String],required:!1,default:1},precision:{type:[Number,String],required:!1},integerLength:{type:[Number,String],required:!1,default:-1},decimalLength:{type:[Number,String],required:!1,default:2},autoPadding:{type:Boolean,required:!1,default:!0},digits:{type:Number,required:!1,default:3},separator:{type:String,required:!1,default:","},placeholder:{type:String,required:!1,default:""},textAlign:{type:String,required:!1},adjustPosition:{type:Boolean,default:!0},alwaysSystem:{type:Boolean,default:!1}};function hc(e,o,l,n){return{props:{...ue,...de,...Oa},emits:["change","update:modelValue","blur","focus","clear"],setup(a,r){const s=Ce(t.computed(()=>a.disabled)),i=Ae(t.computed(()=>a.readonly)),{emitEvent:c}=we({componentName:e,get validate(){return!s.value&&!i.value}},a.prop??r.attrs.name),d=t.ref(!1),f=Ee(a,"modelValue"),m=t.ref("");t.watch([()=>f.value,()=>a.rates,()=>a.precision],([R,Y,U])=>{if(ie(R)){m.value="";return}const P=Ra(R,Y,U,!1);m.value!==P&&(m.value=P)},{immediate:!0});const h=t.computed(()=>{let R="";return d.value&&(R=m.value),R}),{t:y}=ae.useFoxI18n(o),g=t.computed(()=>{let R=a.placeholder??"";return!d.value&&!ie(m.value)?R=pc(m.value,a.decimalLength,a.autoPadding,a.digits,a.separator):R=ie(R)?y(["placeholder"]):R,R}),v=e,b=t.computed(()=>({[v]:!0,[`${v}__disabled`]:s.value,[`${v}__placeholder`]:m.value.length>0})),u=Ne(t.computed(()=>a.textAlign),"textAlign"),p=t.computed(()=>{const R={};return u.value&&(R["text-align"]=u.value),R}),k=t.ref(""),S=t.computed(()=>{let R=k.value;return ie(R)&&(R=a.errorTip??""),R}),w=t.ref(""),N=t.ref(!1),T=R=>{let U=R.target.value;if(ie(U)){m.value="",f.value="",c("update:modelValue","",R),c("change","",R),pe(a.showTip)&&N.value&&(N.value=!1);return}if(U.length>=2){let P=U;if(P.charAt(0)=="-"&&(P=P.substring(1)),P.length>=2&&P.charAt(0)=="0"&&P.charAt(1)!="."){t.triggerRef(m);return}}if(U!="-"){if(!Tr(U)){t.triggerRef(m);return}if(a.integerLength!=-1&&$r(U)>Number(a.integerLength)){t.triggerRef(m);return}if(a.decimalLength&&a.decimalLength!=-1&&Er(U)>Number(a.decimalLength)){t.triggerRef(m);return}let P=Fa(U,a);if(P.maxValid===!1){k.value=P.message,t.triggerRef(m);return}}else if(a.min!=null&&me(a.min)>=0){t.triggerRef(m);return}w.value=U,pe(a.showTip)&&(N.value=U.length>0),m.value=U,f.value=Ra(U,a.rates,a.precision,!0),c("update:modelValue",f.value,R),c("change",f.value,R)},B=R=>{if(d.value=!0,pe(a.showTip)){let Y=m.value;ie(Y)&&(Y=a.hintText),ie(Y)||(w.value=Y,N.value=!0)}k.value="",c("focus",f.value,R)},D=R=>{if(setTimeout(()=>{d.value=!1,pe(a.showTip)&&N.value===!0&&(N.value=!1)},0),!ie(m.value)){let Y=Fa(m.value,a);if(Y.minValid===!1||Y.maxValid===!1){k.value=Y.message;return}}c("update:modelValue",f.value,R),c("blur",f.value,R)},C=t.computed(()=>({[`${v}__append`]:!0})),V=t.computed(()=>{const R={};return r.slots.append&&!M.value&&!A.value&&(R.display="none"),R}),M=t.computed(()=>ge(a.unit)>0),L=t.computed(()=>!A.value),$=t.computed(()=>({hidden:!L.value})),E=R=>{f.value="",c("update:modelValue","",R),c("change","",R),c("clear","")},x=t.computed(()=>pe(a.clearable)&&!s.value&&!i.value),A=t.computed(()=>{let R=ge(f.value)>0;return pe(a.clearable)&&R&&d.value}),H=t.computed(()=>({action:!0,hidden:!A.value}));return()=>{let R={class:b.value,style:p.value,type:"digit",maxlength:a.maxLength,placeholder:g.value,disabled:s.value,readonly:i.value,value:h.value,"adjust-position":a.adjustPosition,"always-system":a.alwaysSystem,onInput:T,onFocus:B,onBlur:D},Y=[],U=t.h("input",R);Y.push(U);let P=[];if(x.value){const W={class:["action-icon"]},Z=t.h(n,W),O={class:H.value,onClick:E},G=t.h("view",O,{default:()=>[Z]});P.push(G)}if(M.value){const W=t.h("view",{class:$.value},[a.unit]);P.push(W)}const z={class:C.value,style:V.value},j=t.h("view",z,{default:()=>P});Y.push(j);const q={default:()=>Y};if(r.slots.default){let W=r.slots.default();q.label=()=>W}if(r.slots.prepend){let W=r.slots.prepend();q.prepend=()=>W}if(r.slots.append){let W=r.slots.append();q.append=()=>W}let I={...xn(a,Oa),errorTip:S.value,hintText:w.value,hintVisible:N.value,hintType:"number"};return t.h(l,I,q)}}}}const{componentName:gc,create:yc,scope:vc}=X("money-item"),Yn=yc(hc(gc,vc,be,te.CircleClose)),hn={modelValue:{type:[String,Number],default:""},textAlign:{type:String,default:""},limitShow:{type:Boolean,default:!1},maxLength:{type:[String,Number],default:""},rows:{type:[String,Number],default:"2"},placeholder:{type:String,default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autosize:{type:[Boolean,Object],default:!1},autofocus:{type:Boolean,default:!1}},{componentName:kc,create:bc,scope:Sc}=X("textarea"),Cc=bc({props:{...hn},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:o}){let{toLocaleRefs:l}=ae.useFoxI18n(Sc);const n=l(e,["placeholder"]),a=t.ref(),r=t.computed(()=>{const h=kc;return{[h]:!0,[`${h}--disabled`]:e.disabled}});t.onMounted(()=>{e.modelValue&&c(String(e.modelValue)),e.autosize&&t.nextTick(i)});const s=t.computed(()=>({textAlign:e.textAlign})),i=()=>{let h=a.value;h.style.height="auto";let y=h.scrollHeight;if(typeof e.autosize=="object"){const{maxHeight:g,minHeight:v}=e.autosize;g!==void 0&&(y=Math.min(y,g)),v!==void 0&&(y=Math.max(y,v))}y&&(h.style.height=y+"px")};t.watch(()=>e.modelValue,()=>{e.autosize&&t.nextTick(i)});const c=(h,y)=>{e.maxLength&&h.length>Number(e.maxLength)&&(h=h.substring(0,Number(e.maxLength))),o("update:modelValue",h,y),o("change",h,y)};return{...n,textareaRef:a,classes:r,styles:s,change:h=>{const y=h.target;c(y.value,h)},focus:h=>{e.disabled||e.readonly||o("focus",h)},blur:h=>{if(e.disabled||e.readonly)return;let g=h.target.value;c(g,h),o("blur",{value:g,event:h})}}}}),wc=["rows","disabled","readonly","value","maxlength","placeholder","autofocus"],Nc={key:0,class:"fox-textarea__limit"};function Bc(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createElementVNode("textarea",{ref:"textareaRef",class:"fox-textarea__textarea",style:t.normalizeStyle(e.styles),rows:e.rows,disabled:e.disabled,readonly:e.readonly,value:e.modelValue,onInput:o[0]||(o[0]=(...s)=>e.change&&e.change(...s)),onBlur:o[1]||(o[1]=(...s)=>e.blur&&e.blur(...s)),onFocus:o[2]||(o[2]=(...s)=>e.focus&&e.focus(...s)),maxlength:e.maxLength,placeholder:e.placeholder,autofocus:e.autofocus},null,44,wc),e.limitShow?(t.openBlock(),t.createElementBlock("view",Nc,t.toDisplayString(e.modelValue?e.modelValue.length:0)+"/"+t.toDisplayString(e.maxLength),1)):t.createCommentVNode("",!0)],2)}const Eo=J(Cc,[["render",Bc]]);function Vc(e,o,l,n){return{props:{...ue,...de,...hn},emits:["update:modelValue","change","blur","focus"],setup(a,r){const s=Ce(t.computed(()=>a.disabled)),i=Ae(t.computed(()=>a.readonly)),{emitEvent:c}=we({componentName:e,get validate(){return!s.value&&!i.value}},a.prop??r.attrs.name),d=Ee(a,"modelValue"),f=v=>{d.value=v,c("update:modelValue",v,{}),c("change",v,{})};let m=Ee(a,"hintText"),h=t.ref(!1);const y=v=>{ie(m.value)||(h.value=!0),c("focus",d.value,v)},g=v=>{setTimeout(()=>{h.value&&(h.value=!1)},0),c("blur",d.value,v)};return()=>{const b={...he(a,hn),disabled:s.value,readonly:i.value,value:d.value,"onUpdate:modelValue":f,onFocus:y,onBlur:g},u=[],p=t.h(n,b);u.push(p);const k={default:()=>u};k.label=r.slots.default,k.prepend=r.slots.prepend,k.append=r.slots.append,k.fixedPreTip=r.slots.fixedPreTip,k.fixedTip=r.slots.fixedTip;const S=he(a,de,ue);return t.h(l,S,k)}}}}const{componentName:Ac,create:Tc,scope:$c}=X("textarea-item"),Xn=Tc(Vc(Ac,$c,be,Eo));function Ec(e){return e===window}const Ve=e=>{const o=t.unref(e);if(Ec(o)){const l=o.innerWidth,n=o.innerHeight;return{top:0,left:0,right:l,bottom:n,width:l,height:n}}return o&&o.getBoundingClientRect?o.getBoundingClientRect():{top:0,left:0,right:0,bottom:0,width:0,height:0}},Xe={visible:{type:Boolean,default:!1},zIndex:{type:[Number,String],default:2e3},duration:{type:[Number,String],default:.3},lockScroll:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},position:{type:String,default:"center"},transition:{type:String,default:""},style:{type:Object,default:{}},popClass:{type:String,default:""},closeable:{type:Boolean,default:!1},closeIconPosition:{type:String,default:"top-right"},destroyOnClose:{type:Boolean,default:!0},teleport:{type:[String,Element],default:"body"},overlay:{type:Boolean,default:!0},round:{type:Boolean,default:!1},teleportDisable:{type:Boolean,default:!1},safeAreaInsetBottom:{type:Boolean,default:!1},overlayClass:{type:String,default:""},overlayStyle:{type:Object,default:{}}},_r=2e3;let Ka=_r;const Dc=(e,o)=>({components:o,props:{...Xe},emits:["click-pop","click-close-icon","open","close","opend","closed","click-overlay","update:visible"],setup(l,{emit:n}){const a=t.reactive({zIndex:l.zIndex,showSlot:!0,closed:l.closeable}),r=t.computed(()=>({[e]:!0,round:l.round,[`fox-popup--${l.position}`]:!0,[`fox-popup--${l.position}--safebottom`]:l.position==="bottom"&&l.safeAreaInsetBottom,[l.popClass]:!0})),s=t.computed(()=>({zIndex:a.zIndex,transitionDuration:`${l.duration}s`,...l.style})),i=t.computed(()=>l.transition?l.transition:`fox-popup-slide-${l.position}`),c=()=>{l.zIndex!==_r&&(Ka=Number(l.zIndex)),n("update:visible",!0),a.zIndex=++Ka,l.destroyOnClose&&(a.showSlot=!0),n("open")},d=()=>{n("update:visible",!1),n("close"),l.destroyOnClose&&setTimeout(()=>{a.showSlot=!1},+l.duration*1e3)},f=v=>{n("click-pop",v)},m=v=>{v.stopPropagation(),n("click-close-icon",v),n("update:visible",!1)},h=v=>{n("click-overlay",v),l.closeOnClickOverlay&&n("update:visible",!1)},y=v=>{n("opend",v)},g=v=>{n("closed",v)};return t.watch(()=>l.visible,v=>{l.visible?c():d()}),t.watch(()=>l.closeable,v=>{a.closed=v}),{...t.toRefs(a),popStyle:s,transitionName:i,classes:r,onClick:f,onClickCloseIcon:m,onClickOverlay:h,onOpened:y,onClosed:g}}});let Bt=0;const Ua="fox-overflow-hidden",Ha=()=>st?document.body:{classList:[]},xc=e=>[()=>{if(e())try{!Bt&&Ha().classList.add(Ua),Bt++}catch{}},()=>{if(e()&&Bt)try{Bt--,!Bt&&Ha().classList.remove(Ua)}catch{}}],Ic={visible:{type:Boolean,default:!1},zIndex:{type:[Number,String],default:2e3},duration:{type:[Number,String],default:.3},lockScroll:{type:Boolean,default:!0},overlayClass:{type:String,default:""},overlayStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}},{componentName:qc,create:Mc}=X("overlay"),zc=Mc({props:{...Ic},emits:["click","update:visible"],setup(e,{emit:o}){const[l,n]=xc(()=>e.lockScroll),a=t.computed(()=>({[qc]:!0,[e.overlayClass]:!0})),r=t.computed(()=>({transitionDuration:`${e.duration}s`,zIndex:e.zIndex,...e.overlayStyle}));return t.watch(()=>e.visible,i=>{i?l():n()}),{classes:a,style:r,onClick:i=>{o("click",i),e.closeOnClickOverlay&&o("update:visible",!1)}}}});function Lc(e,o,l,n,a,r){return t.openBlock(),t.createBlock(t.Transition,{name:"overlay-fade"},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("view",{class:t.normalizeClass(e.classes),onClick:o[0]||(o[0]=t.withModifiers((...s)=>e.onClick&&e.onClick(...s),["stop"])),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6),[[t.vShow,e.visible]])]),_:3})}const at=J(zc,[["render",Lc]]),{componentName:Pc,create:Rc}=X("popup"),Fc=Rc(Dc(Pc,{FoxOverLay:at,Close:te.Close}));function Oc(e,o,l,n,a,r){const s=t.resolveComponent("FoxOverLay"),i=t.resolveComponent("Close");return t.openBlock(),t.createBlock(t.Teleport,{to:e.teleport,disabled:e.teleportDisable},[e.overlay?(t.openBlock(),t.createBlock(s,t.mergeProps({key:0,visible:e.visible,"close-on-click-overlay":e.closeOnClickOverlay,"z-index":e.zIndex,"lock-scroll":e.lockScroll,duration:e.duration,"overlay-class":e.overlayClass,"overlay-style":e.overlayStyle,onClick:e.onClickOverlay},e.$attrs),null,16,["visible","close-on-click-overlay","z-index","lock-scroll","duration","overlay-class","overlay-style","onClick"])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{name:e.transitionName,onAfterEnter:e.onOpened,onAfterLeave:e.onClosed},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.popStyle),onClick:o[1]||(o[1]=(...c)=>e.onClick&&e.onClick(...c))},[e.showSlot?t.renderSlot(e.$slots,"default",{key:0}):t.createCommentVNode("",!0),e.closed?(t.openBlock(),t.createElementBlock("view",{key:1,onClick:o[0]||(o[0]=(...c)=>e.onClickCloseIcon&&e.onClickCloseIcon(...c)),class:t.normalizeClass(["fox-popup__close-icon","fox-popup__close-icon--"+e.closeIconPosition])},[t.renderSlot(e.$slots,"close-icon",{},()=>[t.createVNode(i,{height:"12px"})])],2)):t.createCommentVNode("",!0)],6),[[t.vShow,e.visible]])]),_:3},8,["name","onAfterEnter","onAfterLeave"])],8,["to","disabled"])}const ce=J(Fc,[["render",Oc]]),ja=10;function Kc(e,o){return e>o&&e>ja?"horizontal":o>e&&o>ja?"vertical":""}function Ke(){const e=t.ref(0),o=t.ref(0),l=t.ref(0),n=t.ref(0),a=t.ref(0),r=t.ref(0),s=t.ref(0),i=t.ref(0),c=t.ref(0),d=t.ref(0),f=t.ref(""),m=()=>f.value==="vertical",h=()=>f.value==="horizontal",y=()=>{s.value=0,i.value=0,c.value=0,d.value=0,f.value="",l.value=0};return{move:b=>{const u=b.touches[0];s.value=u.clientX-e.value,i.value=u.clientY-o.value,a.value=u.clientX,r.value=u.clientY,c.value=Math.abs(s.value),d.value=Math.abs(i.value),n.value=Date.now()-l.value,f.value||(f.value=Kc(c.value,d.value))},start:b=>{y(),e.value=b.touches[0].clientX,o.value=b.touches[0].clientY,l.value=Date.now()},reset:y,startX:e,startY:o,startTime:l,duration:n,moveX:a,moveY:r,deltaX:s,deltaY:i,offsetX:c,offsetY:d,direction:f,isVertical:m,isHorizontal:h}}const es={readonly:{type:Boolean,default:!1},visibleItemCount:{type:[Number,String],default:7},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},childrenKey:{type:String,required:!1,default:"children"},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:1e3}},gn={...Xe,...es,modelValue:{type:[String,Number,Boolean,Object,Array],default:""},text:{type:[Array],default:[]},columnOptions:{type:[Object,Function]},source:{type:[Array,Function,String],default:[]},params:{type:Object},valueType:{type:String,required:!1,default:"value"},title:{type:String,default:""},cancelText:{type:String,default:""},clearText:{type:String,default:""},confirmText:{type:String,default:""}};let ts=36;function Uc(){return ts}function Hc(e){ts=e}function qe(e,o){return typeof e.textKey=="string"&&e.textKey.length>0?o[e.textKey]:o.text}function yn(e,o){return typeof e.childrenKey=="string"&&e.childrenKey.length>0?o[e.childrenKey]:o.children??null}function jc(e,o,l){typeof e.childrenKey=="string"&&e.childrenKey.length>0&&(o[e.childrenKey]=l),o.children=l}function rt(e,o){return typeof e.valueKey=="string"&&e.valueKey.length>0?o[e.valueKey]:o.value}function Wa(e,o){return typeof e.itemOptions=="function"?e.columnOptions(o):e.columnOptions}let Wc=class{proxy;constructor(o){this.proxy=o}async load(o,l,n){if(Array.isArray(l))return l;if(typeof l=="function")return await l(n);const a=Ge(this.proxy,o);return a===null?(console.error(`${o} component not found api function`),[]):(Be(n)&&t.isReactive(n)&&(n=t.toRaw(n)),await a(l,n))}};function Yc(){const e=t.getCurrentInstance();return new Wc(e.proxy)}function Ya(e,o,l){const n=qe(e,o),a=qe(e,l);if(n!==a)return!1;const r=rt(e,o),s=rt(e,l);return r===s}function Xc(e,o,l,n){if(l.length==0)return[];Array.isArray(o)||(o=[o]);const a=[],r=e.valueType??"value";if(n==="singleColumn"||n==="multipleColumn")for(let s=0;s<o.length&&s<l.length;s++){const i=o[s];let d=l[s].findIndex(f=>{if(r==="text")return qe(e,f)===i;if(r==="value"){let m=rt(e,f);return m==null&&(m=qe(e,f)),m===i}else if(r==="item")return Ya(e,f,i)});if(d==-1)break;a.push(d)}else{let s=l[0];for(let i=0;i<o.length;i++){const c=o[i];let d=s.findIndex(m=>{if(r==="text")return qe(e,m)===c;if(r==="value"){let h=rt(e,m);return h==null&&(h=qe(e,m)),h===c}else if(r==="item")return Ya(e,m,c)});if(d==-1)break;a.push(d);const f=yn(e,s[d]);if(!Array.isArray(f))break;s=f}}return a}function Xa(e,o,l,n){if(l.length==0)return null;const a={texts:[],values:[],items:[]},r=e.valueType??"value";if(n==="singleColumn"||n==="multipleColumn")for(let s=0;s<o.length&&s<l.length;s++){const i=l[s];let c=o[s];c<0&&c>=i.length&&(c=0);const d=i[c],f=qe(e,d);if(a.texts.push(f),a.items.push(d),r==="text")a.values.push(f);else if(r==="value"){let m=rt(e,d);m==null&&(m=f),a.values.push(m)}else a.values.push(d)}else{let s=l[0];for(let i=0;i<o.length;i++){let c=o[i];c<0&&c>=s.length&&(c=0);const d=s[c],f=Object.assign({},d);f.children=null;const m=qe(e,d);if(a.texts.push(m),a.items.push(f),r==="text")a.values.push(m);else if(r==="value"){let h=rt(e,d);h==null&&(h=m),a.values.push(h)}else a.values.push(f);if(!Array.isArray(d.children))break;s=d.children}}return a}function Qa(e){return{text:e,value:e}}const Qc=15,Gc=300,Zc=200,{create:Jc}=X("picker-column");function _c(e){e.stopPropagation()}function eu(e,o){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),o&&_c(e)}const tu=Jc({props:{source:{type:Array,default:[]},columnIndex:{type:Number,required:!0,default:0},modelValue:{type:Number,required:!0,default:0},itemHeight:{type:Number,required:!0,default:35},...es},emits:["click","change","update:modelValue"],setup(e,{emit:o}){const l=t.computed(()=>({"fox-picker__list":!0})),n=t.computed(()=>({height:`${me(e.visibleItemCount)*+e.itemHeight}px`})),a=t.computed(()=>({"fox-picker__content":!0,"fox-picker__content-tile":!e.threeDimensional,"fox-picker__content-roller":e.threeDimensional})),r=t.computed(()=>e.itemHeight*Math.floor(+e.visibleItemCount/2)),s=B=>B>=m.currIndex+8||B<=m.currIndex-8,i=t.computed(()=>({transition:`transform ${m.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`rotate3d(1, 0, 0, ${m.deg})`,top:`${r.value}px`})),c=B=>`transform: rotate3d(1, 0, 0, ${-m.rotation*B}deg) translate3d(0px, 0px, 104px)`,d=t.computed(()=>({transition:`transform ${m.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`translate3d(0, ${m.scrollDistance+r.value}px, 0)`})),f=t.ref(null),m=t.reactive({currIndex:e.modelValue,startDistance:0,scrollDistance:0,scrollTime:0,moving:!1,rotation:20,deg:0,transitionEndTrigger:null}),h=t.toRef(e,"source"),y=B=>qe(e,B),g=B=>rt(e,B),v=Ke(),b=()=>{m.transitionEndTrigger&&(m.transitionEndTrigger(),m.transitionEndTrigger=null)},u=(B,D=!1,C=!1)=>{if(m.currIndex=B,D){const V=()=>{m.moving=!1,o("update:modelValue",B),o("change",B)};C?m.transitionEndTrigger=V:V()}},p=(B,D,C)=>{let V=B+m.startDistance;if(D==="end"){const M=-(h.value.length-1)*e.itemHeight;V<M&&(V=M,(!C||C<=0)&&(C=e.swipeDuration)),V>0&&(V=0,(!C||C<=0)&&(C=e.swipeDuration));let L=Math.abs(Math.round(-V/e.itemHeight));const $=-L*e.itemHeight,E=`${(L+1)*m.rotation}deg`,x=C?C>0:!1;u(L,!0,x),k($,D,C,E)}else{let M=(-V/e.itemHeight+1)*m.rotation;const L=(h.value.length+1)*m.rotation,$=0;if(M=Math.min(Math.max(M,$),L),e.threeDimensional&&(M<$||M>L))return;k(V,null,void 0,`${M}deg`)}},k=(B=0,D,C=Zc,V)=>{D==="end"?m.scrollTime=C:m.scrollTime=0,m.deg=V,m.scrollDistance=B},S=(B,D)=>(B=Math.abs(B/D)/.003*(B<0?-1:1),B),w=B=>{e.readonly||(m.startDistance=m.scrollDistance,v.start(B),m.transitionEndTrigger=null)},N=B=>{e.readonly||(m.moving=!0,v.move(B),v.isVertical()&&(m.moving=!0,eu(B,!0)),p(v.deltaY.value,"",0))},T=()=>{if(e.readonly)return;const B=v.deltaY.value,D=v.duration.value;if(D<Gc&&Math.abs(B)>Qc){const V=S(B,D);p(V,"end",e.swipeDuration)}else p(B,"end",0)};return t.watch(()=>e.modelValue,B=>{if(m.currIndex!==B){m.currIndex=B;const D=-B*e.itemHeight;p(D)}}),t.onMounted(()=>{const B=-e.modelValue*e.itemHeight;p(B)}),{classes:l,styles:n,contentClasses:a,source:h,itemText:y,itemValue:g,...t.toRefs(m),roller:f,getItemText:qe,onTouchStart:w,onTouchMove:N,onTouchEnd:T,isHidden:s,setRollerStyle:c,touchRollerStyle:i,touchTileStyle:d,stopMomentum:b}}}),ou={key:1,class:"fox-picker__item-tile"};function nu(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles),onTouchstart:o[0]||(o[0]=(...s)=>e.onTouchStart&&e.onTouchStart(...s)),onTouchmove:o[1]||(o[1]=(...s)=>e.onTouchMove&&e.onTouchMove(...s)),onTouchend:o[2]||(o[2]=(...s)=>e.onTouchEnd&&e.onTouchEnd(...s)),onTouchcancel:o[3]||(o[3]=(...s)=>e.onTouchEnd&&e.onTouchEnd(...s)),onTransitionend:o[4]||(o[4]=(...s)=>e.stopMomentum&&e.stopMomentum(...s))},[t.createElementVNode("view",{ref:"roller",class:t.normalizeClass(e.contentClasses),style:t.normalizeStyle(e.threeDimensional?e.touchRollerStyle:e.touchTileStyle)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.source,(s,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${e.columnIndex}_${i}`},[e.threeDimensional?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-picker__item",{"fox-picker__item-hidden":e.isHidden(i+1)}]),style:t.normalizeStyle(e.setRollerStyle(i+1))},t.toDisplayString(e.itemText(s)),7)):(t.openBlock(),t.createElementBlock("view",ou,t.toDisplayString(e.itemText(s)),1))],64))),128))],6)],38)}const Ga=J(tu,[["render",nu]]),{create:lu,componentName:au,scope:ru}=X("picker"),su=lu({components:{[Ga.name]:Ga,[ce.name]:ce},props:{...gn},emits:["close","change","confirm","update:visible","update:text","update:modelValue","clear"],setup(e,{emit:o}){const{toLocaleRefs:l,t:n}=ae.useFoxI18n(ru),a=l(e,["title","cancelText","clearText","confirmText"]),r=t.ref(null),s=t.ref(Uc());t.watch(()=>e.visible,C=>{C&&s.value<=0&&setTimeout(()=>{if(r.value){const V=Ve(r.value);s.value=V.height,Hc(s.value)}},50)});const i=t.computed(()=>({[au]:!0})),c=Yc(),d=t.ref("singleColumn");let f=t.ref([]);t.watch([()=>e.source,()=>e.params],async([C,V])=>{if(C){let M=await c.load("picker",C,V);if(M.length>0){let L=M[0];if(Array.isArray(L)){if(typeof L[0]=="string"){let $=M,E=[];$.forEach(x=>{let A=x.map(H=>Qa(H));E.push(A)}),f.value=E}else f.value=M;d.value="multipleColumn"}else if(typeof L=="string"){let $=M,E=[],x=$.map(A=>Qa(A));E.push(x),f.value=E,d.value="singleColumn"}else{const $=yn(e,L);Array.isArray($)?(d.value="cascade",f.value=[M]):(d.value="singleColumn",f.value=[M])}}else f.value=[]}},{immediate:!0});const m=t.ref([]),h=t.ref(e.modelValue),y=t.ref([]),g=t.ref([]);t.watch([()=>e.modelValue,()=>f.value],([C,V])=>{let M=Xc(e,C,V,d.value);if(!xe(M,g.value)){g.value=M;let L=Xa(e,M,V,d.value);L&&(m.value=L.texts,o("update:text",m.value))}});const v=t.ref(e.visible);t.watch(()=>e.visible,C=>{v.value=C});const b=C=>{let V=Wa(e,C);return Be(V)?V.defaultIndex??0:0},u=C=>{if(e.readonly===!0)return!0;let V=Wa(e,C);return Be(V)?V.readonly??!1:!1},p=(C,V)=>{let M=g.value;M[C]=V;for(let $=0;$<C;$++)M[$]==null&&(M[$]=b($));if(d.value==="cascade")for(let $=C+1;$<S.value.length;$++){let E=b($);$<M.length?M[$]=E:M.push(E)}else for(let $=M.length;$<S.value.length;$++){let E=b($);M.push(E)}g.value=M;let L=Xa(e,M,f.value,d.value);L&&(m.value=L.texts,h.value=L.values,y.value=L.items)},k=C=>C<g.value.length?g.value[C]:b(C),S=t.computed(()=>{if(f.value.length==0)return[];if(d.value=="singleColumn"||d.value=="multipleColumn")return f.value;let C=[],V=0,M=f.value[0],L=0;for(;;){let $=M.map(A=>{let H=Object.assign({},A);return jc(e,H,null),H});C.push($),V>=g.value.length?L=0:L=g.value[V],(L<0||L>=M.length)&&(L=0);let E=M[L];const x=yn(e,E);if(!Array.isArray(x))break;M=x,V++}return C}),w=t.computed(()=>me(+e.visibleItemCount-1)/2*s.value);return{...a,pickerLineRef:r,classes:i,columns:S,dataType:d,show:v,itemHeight:s,top:w,isReadonly:u,getIndex:k,change:(C,V)=>{p(C,V)},close:()=>{o("close"),o("update:visible",!1)},confirm:()=>{if(e.readonly===!0){o("update:visible",!1);return}let C=f.value.length-1;for(;C>=0&&!(g.value[C]===null||g.value[C]===void 0);C--);if(C>=0&&p(C,0),d.value==="singleColumn"){let V=h.value.length>0?h.value[0]:"",M=y.value.length>0?y.value[0]:null;e.readonly||(o("update:modelValue",V),o("update:text",m.value),o("change",V,M)),o("confirm",V)}else e.readonly||(o("update:modelValue",h.value),o("update:text",m.value),o("change",h.value,y.value)),o("confirm",h.value);o("update:visible",!1)},clear:()=>{if(e.readonly===!0){o("update:visible",!1);return}d.value==="singleColumn"?(o("update:modelValue",""),o("change","")):(o("update:modelValue",[]),o("change",[])),o("clear",""),o("update:visible",!1)}}}}),iu={class:"fox-picker__bar"},cu={class:"fox-picker__title"},uu={class:"fox-picker__bar__action"},du={class:"fox-picker__column"};function fu(e,o,l,n,a,r){const s=t.resolveComponent("fox-picker-column"),i=t.resolveComponent("fox-popup");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createVNode(i,{position:"bottom",visible:e.show,"onUpdate:visible":o[3]||(o[3]=c=>e.show=c),teleport:e.teleport,"lock-scroll":e.lockScroll,"close-on-click-overlay":e.closeOnClickOverlay,onClose:e.close,round:!0,"teleport-disable":e.teleportDisable},{default:t.withCtx(()=>[t.createElementVNode("view",iu,[t.createElementVNode("view",cu,t.toDisplayString(e.title),1),t.createElementVNode("view",uu,[t.createElementVNode("view",{class:"fox-picker__left fox-picker__cancel fox-picker__button",onClick:o[0]||(o[0]=(...c)=>e.close&&e.close(...c))},t.toDisplayString(e.cancelText),1),t.createElementVNode("view",{class:"fox-picker__right fox-picker__confirm fox-picker__button",onClick:o[1]||(o[1]=(...c)=>e.confirm&&e.confirm(...c))},t.toDisplayString(e.confirmText),1),e.clearText?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-picker__right fox-picker__clear fox-picker__button",onClick:o[2]||(o[2]=(...c)=>e.clear&&e.clear(...c))},t.toDisplayString(e.clearText),1)):t.createCommentVNode("",!0)])]),t.renderSlot(e.$slots,"top"),t.createElementVNode("view",du,[t.createElementVNode("view",{class:"fox-picker__mask",style:t.normalizeStyle({backgroundSize:`100% ${e.top}px`})},null,4),t.createElementVNode("view",{ref:"pickerLineRef",class:"fox-picker__hairline",style:t.normalizeStyle({top:` ${e.top}px`})},null,4),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,(c,d)=>(t.openBlock(),t.createElementBlock("view",{key:d,class:"fox-picker__columnitem"},[t.createVNode(s,{source:c,readonly:e.isReadonly(d),"column-index":d,modelValue:e.getIndex(d),"onUpdate:modelValue":f=>e.change(d,f),"visible-item-count":e.visibleItemCount,"three-dimensional":e.threeDimensional,"swipe-duration":e.swipeDuration,"item-height":e.itemHeight,"text-key":e.textKey,"value-key":e.valueKey},null,8,["source","readonly","column-index","modelValue","onUpdate:modelValue","visible-item-count","three-dimensional","swipe-duration","item-height","text-key","value-key"])]))),128))]),t.renderSlot(e.$slots,"default")]),_:3},8,["visible","teleport","lock-scroll","close-on-click-overlay","onClose","teleport-disable"])],2)}const yt=J(su,[["render",fu]]);function mu(e,o,l,n,a,r,s=!0){return{props:{...ue,...de,...gn,type:{type:String,default:"text"},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},text:{type:String},separator:{type:[String],required:!1,defualt:" "}},emits:["change","update:modelValue","blur","focus","clear","update:text"],setup(i,c){const d=Ce(t.computed(()=>i.disabled)),f=Ae(t.computed(()=>i.readonly)),{emitEvent:m}=we({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus"],get validate(){return!d.value&&!f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ae.useFoxI18n(o),y=h(i,["placeholder"]),g=t.ref(!1),v=Ee(i,"modelValue"),b=t.ref([]),u=t.computed(()=>Array.isArray(b.value)?b.value.join(i.separator):b.value),p="fox-input-item",k=t.computed(()=>({[p]:!0,[`${p}__disabled`]:d.value})),S=Ne(t.computed(()=>i.textAlign),"textAlign"),w=t.computed(()=>{const j={};return S.value&&(j["text-align"]=S.value),j}),N=t.ref(!1),T=()=>{N.value=!0},B=j=>{N.value=j},D=j=>{v.value=j,m("update:modelValue",j)},C=(j,q)=>{m("change",j,q)},V=j=>{let F=j.target.value;g.value=!0,m("focus",F,j)},M=j=>{setTimeout(()=>{g.value=!1},0);let F=j.target.value;i.maxLength&&F.length>Number(i.maxLength)&&(F=F.slice(0,Number(i.maxLength))),m("blur",F,j)},L=j=>{b.value=j,Array.isArray(j)&&j.length===0?m("update:text",j[0]):m("update:text",j)},$=t.computed(()=>({[`${p}__append`]:!0})),E=t.computed(()=>ge(i.unit)>0),x=t.computed(()=>ge(i.unit)>0&&!g.value),A=t.computed(()=>({hidden:!x.value})),H=j=>{v.value="",m("update:modelValue","",j),m("change","",j),m("clear","")},R=t.computed(()=>i.clearable&&!d.value&&!f.value),Y=t.computed(()=>ge(v.value)>0&&g.value),U=j=>{Y.value?H(j):T()},P=t.computed(()=>Y.value&&R.value?n:a),z=t.computed(()=>({action:!0}));return()=>{const j={class:k.value,style:w.value,type:"text",maxlength:i.maxLength,placeholder:y.placeholder.value,readonly:!0,unselectable:"on",value:u.value,onClick:T,onFocus:V,onBlur:M};s&&(j.disabled=!0);const q=[],F=t.h("input",j);q.push(F);const I=[],K={class:["action-icon"]},W=t.h(P.value,K),Z={class:z.value,onClick:U},O=t.h("view",Z,{default:()=>[W]});if(I.push(O),E.value){const ve=t.h("view",{class:A.value},[i.unit]);I.push(ve)}const G={class:$.value},Q=t.h("view",G,{default:()=>I});q.push(Q);const ee={default:()=>q};ee.label=c.slots.default,ee.prepend=c.slots.prepend,ee.append=c.slots.append,ee.fixedPreTip=c.slots.fixedPreTip,ee.fixedTip=c.slots.fixedTip;const _=he(i,gn);_.disabled=!1,_.readonly=d.value||f.value,_.visible=N.value,_["onUpdate:visible"]=B,_.modelValue=v.value,_["onUpdate:modelValue"]=D,_.text=b.value,_["onUpdate:text"]=L,_.onChange=C;const oe=t.h(r,_);ee.hide=()=>[oe];const le=he(i,de,ue);return t.h(l,le,ee)}}}}const{componentName:pu,create:hu,scope:gu}=X("picker-item"),Qn=hu(mu(pu,gu,be,te.CircleClose,te.ArrowRight,yt,!1)),Jt=(e,o,l)=>e.map(n=>{const{value:a="value",text:r="text",children:s="children"}=l??{},{[a]:i,[r]:c,[s]:d,...f}=n,m={loading:!1,...f,level:o?(o&&o.level||0)+1:0,value:i,text:c,children:d,_parent:o};return m.children&&m.children.length&&(m.children=Jt(m.children,m,l)),m}),os=(e,o)=>{let l=0,n;for(;(n=e[l++])&&o(n)!==!0;)n.children&&n.children.length&&os(n.children,o)},yu={topId:null,idKey:"id",pidKey:"pid",sortKey:""},vu=(e,o)=>{const l={...yu,...o||{}},{topId:n,idKey:a,pidKey:r,sortKey:s}=l;let i=[],c={};return e.forEach(d=>{d={...d};const{[a]:f,[r]:m}=d,h=c[m]=c[m]||[];!i.length&&m===n&&(i=h),h.push(d),d.children=c[f]||(c[f]=[])}),s&&Object.keys(c).forEach(d=>{c[d].length>1&&c[d].sort((f,m)=>f[s]-m[s])}),c=null,i},ku=/scroll|auto|overlay/i,ns=window;function bu(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function vn(e,o=ns){let l=e;for(;l&&l!==o&&bu(l);){const{overflowY:n}=window.getComputedStyle(l);if(ku.test(n))return l;l=l.parentNode}return o}function ls(e,o=ns){const l=t.ref();return t.onMounted(()=>{e.value&&(l.value=vn(e.value,o))}),l}const{create:Su}=X("sticky"),Cu=Su({props:{position:{type:String,default:"top"},top:{type:[Number,String],default:0},bottom:{type:[Number,String],default:0},container:{type:Object},zIndex:{type:[Number,String],default:99}},emits:["change"],setup(e,{emit:o}){const l=t.ref(),n=t.ref(),a=t.reactive({fixed:!1,height:0,transform:0}),r=t.computed(()=>e.position==="top"?Number(e.top):Number(e.bottom)),s=t.computed(()=>a.fixed?{height:`${a.height}px`}:{}),i=t.computed(()=>a.fixed?{[e.position]:`${r.value}px`,transform:a.transform?`translate3d(0, ${a.transform}px, 0)`:void 0,position:a.fixed?"fixed":void 0,zIndex:Number(e.zIndex)}:{}),c=()=>{const d=e.container;if(!l.value&&!d)return;const f=Ve(l),m=n.value,h=Ve(m),y=Ve(d);a.height=f.height;const g=()=>{let b=!1;if(e.position==="top")b=d?r.value>f.top&&y.bottom>0:r.value>f.top;else{const u=document.documentElement.clientHeight;b=d?y.bottom>0&&u-r.value-h.height>y.top:u-r.value<f.bottom}return b},v=()=>{if(d)if(e.position==="top"){const b=y.bottom-r.value-h.height;return b<0?b:0}else{const b=document.documentElement.clientHeight,u=y.bottom-(b-r.value);return u<0?u:0}return 0};a.transform=v(),a.fixed=g()};return t.watch(()=>a.fixed,d=>{o("change",d)}),t.onMounted(()=>{c(),vn(l.value).addEventListener("scroll",c,!0)}),t.onUnmounted(()=>{vn(l.value).removeEventListener("scroll",c)}),{rootRef:l,rootStyle:s,stickyRef:n,stickyStyle:i}}});function wu(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("div",{class:"fox-sticky",ref:"rootRef",style:t.normalizeStyle(e.rootStyle)},[t.createElementVNode("div",{class:"fox-sticky__box",ref:"stickyRef",style:t.normalizeStyle(e.stickyStyle)},[t.renderSlot(e.$slots,"default")],4)],4)}const qt=J(Cu,[["render",wu]]),Nu=(e,o,l,n)=>{const a=t.ref(),r=t.ref({width:0,height:0}),s=async()=>{if(l&&l.getEnv()!==l.ENV_TYPE.WEB){let h=await n(a,l);r.value.width=h.width||0,r.value.height=h.height||0}else r.value.width=a.value?.clientWidth||0,r.value.height=a.value?.clientHeight||0};t.onMounted(()=>{setTimeout(()=>{s()},100)});const i=t.reactive({offset:0,moving:!1}),c=Ke();let d="";const f=(h,y)=>{let g=h;switch(e.direction=="horizontal"?(d=h>0?"right":"left",g=Math.abs(g)/r.value.width*100):(d=y>0?"bottom":"top",g=y,g=Math.abs(g)/r.value?.height*100),g>85&&(g=85),d){case"left":case"top":o.isEnd()&&(g=0,i.moving=!1);break;case"right":case"bottom":g=-g,o.isBegin()&&(g=0,i.moving=!1);break}i.offset=g};return{touchMethods:{onTouchStart(h){e.swipeable&&c.start(h)},onTouchMove(h){e.swipeable&&(c.move(h),i.moving=!0,f(c.deltaX.value,c.deltaY.value),e.direction=="horizontal"&&c.isHorizontal()&&(h.preventDefault(),h.stopPropagation()),e.direction=="vertical"&&c.isVertical()&&(h.preventDefault(),h.stopPropagation()))},onTouchEnd(){if(i.moving)switch(i.moving=!1,d){case"left":case"top":i.offset>35&&o.next();break;case"right":case"bottom":i.offset<-35&&o.prev();break}}},touchState:i,tabsContentRef:a}};class Bu{title="";titleSlot;paneKey="";disabled=!1;constructor(){}}const{create:Vu}=X("tabs"),Au=Vu({components:{[qt.name]:qt,JoySmile:te.JoySmile},props:{modelValue:{type:[String,Number],default:0},color:{type:String,default:""},direction:{type:String,default:"horizontal"},size:{type:String,default:"normal"},type:{type:String,default:"line"},titleScroll:{type:Boolean,default:!1},ellipsis:{type:Boolean,default:!0},swipeable:{type:Boolean,default:!1},autoHeight:{type:Boolean,default:!1},background:{type:String,default:""},animatedTime:{type:[Number,String],default:300},titleGutter:{type:[Number,String],default:0},sticky:{type:Boolean,default:!1},top:{type:Number,default:0}},emits:["update:modelValue","click","change"],setup(e,{emit:o,slots:l}){const n=t.ref(null);let a;t.provide("tabsOpiton",{activeKey:t.computed(()=>e.modelValue||"0"),autoHeight:t.computed(()=>e.autoHeight),animatedTime:t.computed(()=>e.animatedTime)});const r=t.ref([]),s=C=>{C.forEach((V,M)=>{let L=V.type;if(L=L.name||L,L=="fox-tab-pane"){let $=new Bu;if(V.props?.title||V.props?.["pane-key"]||V.props?.paneKey){let E=lt(V.props?.["pane-key"]),x=E=="number"||E=="string"?String(V.props?.["pane-key"]):null,A=lt(V.props?.paneKey),H=A=="number"||A=="string"?String(V.props?.paneKey):null;$.title=V.props?.title,$.paneKey=x||H||String(M),$.disabled=V.props?.disabled}r.value.push($)}else{if(V.children==" ")return;Array.isArray(V.children)&&s(V.children)}})},i=t.ref(e.modelValue||0),c=C=>{let V=r.value.findIndex(M=>M.paneKey==C);r.value.length==0||V==-1||(i.value=V)},d=t.computed(()=>e.titleScroll&&e.direction==="vertical"),f=t.ref(),m=t.ref([]),h=C=>{const V=f.value,M=m.value;if(!V||!M||!M[i.value])return;const L=M[i.value];let $=0;e.direction==="vertical"?$=L.offsetTop-V.offsetTop+10-(V.offsetHeight-L.offsetHeight)/2:$=L.offsetLeft-(V.offsetWidth-L.offsetWidth)/2,y(V,$,C?0:.3,e.direction)},y=(C,V,M,L)=>{let $=0;const E=L==="horizontal"?C.scrollLeft:C.scrollTop,x=M===0?1:Math.round(M*1e3/16);function A(){L==="horizontal"?C.scrollLeft+=(V-E)/x:C.scrollTop+=(V-E)/x,++$<x&&Le(A)}A()},g=(C=l.default?.())=>{r.value=[],C=C?.filter(V=>typeof V.children!="string"),C&&C.length&&s(C),c(e.modelValue),t.nextTick(()=>{h()})},v=C=>{a=C.fixed};t.watch(()=>l.default?.(),C=>{g(C)});const b=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;t.watch(()=>e.modelValue,C=>{if(c(C),h(),a){let V=Ve(n.value).top+b(),M=Math.ceil(V-e.top);window.scrollTo({top:M,behavior:"smooth"})}}),t.onMounted(g),t.onActivated(g);const u={isBegin:()=>i.value==0,isEnd:()=>i.value==r.value.length-1,next:()=>{i.value+=1,u.updateValue(r.value[i.value])},prev:()=>{i.value-=1,u.updateValue(r.value[i.value])},updateValue:C=>{o("update:modelValue",C.paneKey),o("change",C)},tabChange:(C,V)=>{o("click",C),!(C.disabled||i.value==V)&&(i.value=V,u.updateValue(C))},setTabItemRef:(C,V)=>{m.value[V]=C}},{tabsContentRef:p,touchState:k,touchMethods:S}=Nu(e,u),w=t.computed(()=>{let C=i.value*100;k.moving&&(C+=k.offset);let V={transform:e.direction=="horizontal"?`translate3d(-${C}%, 0, 0)`:`translate3d( 0,-${C}%, 0)`,transitionDuration:k.moving?void 0:`${e.animatedTime}ms`};return e.animatedTime==0&&(V={}),V}),N=t.computed(()=>({background:e.background})),T=t.computed(()=>({color:e.type=="smile"?e.color:"",background:e.type=="line"?e.color:""})),B=t.computed(()=>{if(!e.titleGutter)return{};const C=fe(e.titleGutter);return e.direction==="vertical"?{marginTop:C,marginBottom:C}:{marginLeft:C,marginRight:C}}),D=t.computed(()=>l.fixedTitle);return{navRef:f,tabsContentRef:p,titles:r,contentStyle:w,tabsNavStyle:N,titleStyle:B,tabsActiveStyle:T,container:n,getScrollY:d,onStickyScroll:v,...u,...S,hasFixedTitle:D}}}),Tu=["onClick"],$u={key:0,class:"fox-tabs__titles-fixed-item"},Eu=["onClick"],Du={key:0,class:"fox-tabs__titles-fixed-item"};function xu(e,o,l,n,a,r){const s=t.resolveComponent("JoySmile"),i=t.resolveComponent("fox-sticky");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(["fox-tabs",[e.direction]]),ref:"container"},[e.sticky?(t.openBlock(),t.createBlock(i,{key:0,top:e.top,container:e.container,onScroll:e.onStickyScroll},{default:t.withCtx(()=>[t.createElementVNode("view",{class:t.normalizeClass(["fox-tabs__titles",{[e.type]:e.type,scrollable:e.titleScroll,[e.size]:e.size}]),style:t.normalizeStyle(e.tabsNavStyle),ref:"navRef"},[e.$slots.titles?t.renderSlot(e.$slots,"titles",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.titles,(c,d)=>(t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(["fox-tabs__titles-item",{active:c.paneKey==e.modelValue,disabled:c.disabled}]),style:t.normalizeStyle(e.titleStyle),onClick:f=>e.tabChange(c,d),key:c.paneKey},[t.renderSlot(e.$slots,"title",{title:c.title,paneKey:c.paneKey},()=>[e.type=="line"?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-tabs__titles-item__line",style:t.normalizeStyle(e.tabsActiveStyle)},null,4)):t.createCommentVNode("",!0),e.type=="smile"?(t.openBlock(),t.createElementBlock("view",{key:1,class:"fox-tabs__titles-item__smile",style:t.normalizeStyle(e.tabsActiveStyle)},[t.createVNode(s,{color:e.color},null,8,["color"])],4)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(["fox-tabs__titles-item__text",{ellipsis:e.ellipsis}])},t.toDisplayString(c.title),3)])],14,Tu))),128)),e.hasFixedTitle?(t.openBlock(),t.createElementBlock("view",$u,[t.renderSlot(e.$slots,"fixedTitle")])):t.createCommentVNode("",!0)],64))],6)]),_:3},8,["top","container","onScroll"])):(t.openBlock(),t.createElementBlock("view",{key:1,class:t.normalizeClass(["fox-tabs__titles",{[e.type]:e.type,scrollable:e.titleScroll,"scroll-vertical":e.getScrollY,[e.size]:e.size}]),style:t.normalizeStyle(e.tabsNavStyle),ref:"navRef"},[e.$slots.titles?t.renderSlot(e.$slots,"titles",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.titles,(c,d)=>(t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(["fox-tabs__titles-item",{active:c.paneKey==e.modelValue,disabled:c.disabled}]),style:t.normalizeStyle(e.titleStyle),onClick:f=>e.tabChange(c,d),key:c.paneKey,ref_for:!0,ref:f=>e.setTabItemRef(f,d)},[t.renderSlot(e.$slots,"title",{title:c.title,paneKey:c.paneKey},()=>[e.type=="line"?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-tabs__titles-item__line",style:t.normalizeStyle(e.tabsActiveStyle)},null,4)):t.createCommentVNode("",!0),e.type=="smile"?(t.openBlock(),t.createElementBlock("view",{key:1,class:"fox-tabs__titles-item__smile",style:t.normalizeStyle(e.tabsActiveStyle)},[t.createVNode(s,{color:e.color},null,8,["color"])],4)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(["fox-tabs__titles-item__text",{ellipsis:e.ellipsis}])},t.toDisplayString(c.title),3)])],14,Eu))),128)),e.hasFixedTitle?(t.openBlock(),t.createElementBlock("view",Du,[t.renderSlot(e.$slots,"fixedTitle")])):t.createCommentVNode("",!0)],64))],6)),t.createElementVNode("view",{class:"fox-tabs__content",ref:"tabsContentRef",style:t.normalizeStyle(e.contentStyle),onTouchstart:o[0]||(o[0]=(...c)=>e.onTouchStart&&e.onTouchStart(...c)),onTouchmove:o[1]||(o[1]=(...c)=>e.onTouchMove&&e.onTouchMove(...c)),onTouchend:o[2]||(o[2]=(...c)=>e.onTouchEnd&&e.onTouchEnd(...c)),onTouchcancel:o[3]||(o[3]=(...c)=>e.onTouchEnd&&e.onTouchEnd(...c))},[t.renderSlot(e.$slots,"default")],36)],2)}const Mt=J(Au,[["render",xu]]),{create:Iu}=X("tab-pane"),qu=Iu({props:{title:{type:[String,Number],default:""},paneKey:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:o}){const l=t.inject("tabsOpiton"),n=t.computed(()=>({display:l.animatedTime.value==0&&e.paneKey!=l.activeKey.value?"none":void 0}));return{...l,paneStyle:n}}});function Mu(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(["fox-tab-pane",{inactive:e.paneKey!=e.activeKey&&e.autoHeight}]),style:t.normalizeStyle(e.paneStyle)},[t.renderSlot(e.$slots,"default")],6)}const zt=J(qu,[["render",Mu]]);class Za{nodes;config;constructor(o,l){this.config={value:"value",text:"text",children:"children",...l||{}},this.nodes=Jt(o,null,this.config)}updateChildren(o,l){l?l.children=Jt(o,l,this.config):this.nodes=Jt(o,null,this.config)}getNodeByValue(o){let l;return os(this.nodes,n=>{if(n.value===o)return l=n,!0}),l}getPathNodesByValue(o){if(!o.length)return[];const l=[];let n=this.nodes;for(;n&&n.length;){const a=n.find(r=>r.value===o[r.level]);if(!a)break;l.push(a),n=a.children}return l}isLeaf(o,l){const{leaf:n,children:a}=o,r=Array.isArray(a)&&!!a.length;return n||!r&&!l}hasChildren(o,l){if(this.isLeaf(o,l))return!1;const{children:a}=o;return Array.isArray(a)&&!!a.length}}const{create:zu,scope:Lu}=X("cascader-pane"),Pu=zu({components:{Loading:te.Loading,Checklist:te.Checklist,[Mt.name]:Mt,[zt.name]:zt},props:{visible:{type:Boolean,required:!0},modelValue:{type:Array,required:!0},options:{type:Array,default:()=>[]},lazy:{type:Boolean,required:!1},lazyLoad:{type:Function,required:!1},valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},convertConfig:{type:Object,required:!1}},emits:["update:modelValue","change","pathChange"],setup(e,{emit:o}){const l=t.computed(()=>({lazy:e.lazy,lazyLoad:e.lazyLoad,valueKey:e.valueKey,textKey:e.textKey,childrenKey:e.childrenKey,convertConfig:e.convertConfig})),n=t.ref(0),a=t.ref(!1),r=t.ref(e.modelValue),s=t.ref(new Za([],{})),i=t.ref([]),c=t.computed(()=>l.value.lazy&&!!l.value.lazyLoad),d=new Map;let f;const m=async()=>{d.clear(),i.value=[],n.value=0,a.value=!1,f=null;let{options:u}=e;l.value.convertConfig&&(u=vu(u,l.value.convertConfig)),s.value=new Za(u,{value:l.value.valueKey,text:l.value.textKey,children:l.value.childrenKey}),c.value&&!s.value.nodes.length&&await y({root:!0,loading:!0,text:"",value:""}),i.value=[{nodes:s.value.nodes,selectedNode:null}],h()},h=async()=>{const u=r.value;if(u===void 0||!s.value.nodes.length)return;if(u.length===0){n.value=0,i.value=[{nodes:s.value.nodes,selectedNode:null}];return}let p=u;if(c.value&&Array.isArray(u)&&u.length){p=[];let k=s.value.nodes.find(S=>S.value===u[0]);if(k){p=[k.value],a.value=!0;const S=await u.slice(1).reduce(async(w,N)=>{const T=await w;await y(T);const B=T?.children?.find(D=>D.value===N);return B&&p.push(N),Promise.resolve(B)},Promise.resolve(k));await y(S),a.value=!1}}p.length&&u===e.modelValue&&s.value.getPathNodesByValue(p).map((S,w)=>{n.value=w,b.handleNode(S,!0)})},y=async u=>{if(!u)return;if(!l.value.lazyLoad){u.leaf=!0;return}if(s.value.isLeaf(u,c.value)||s.value.hasChildren(u,c.value))return;u.loading=!0;const p=u.root?null:u;let k=d.get(u);k||(k=new Promise(w=>{l.value.lazyLoad?.(u,w)}),d.set(u,k));const S=await k;Array.isArray(S)&&S.length>0?s.value.updateChildren(S,p):u.leaf=!0,u.loading=!1,d.delete(u)},g=u=>{const p=u.map(k=>k.value);r.value=p,o("change",p,u),o("update:modelValue",p,u)},{t:v}=ae.useFoxI18n(Lu),b={async handleNode(u,p){const{disabled:k,loading:S}=u;if(!(!p&&k||!i.value[n.value])){if(s.value.isLeaf(u,c.value)){if(u.leaf=!0,i.value[n.value].selectedNode=u,i.value=i.value.slice(0,u.level+1),!p){const w=i.value.map(N=>N.selectedNode);g(w),o("pathChange",w)}return}if(s.value.hasChildren(u,c.value)){const w=u.level+1;if(i.value[n.value].selectedNode=u,i.value=i.value.slice(0,w),i.value.push({nodes:u.children||[],selectedNode:null}),n.value=w,!p){const N=i.value.map(T=>T.selectedNode);o("pathChange",N)}return}f=u,!S&&(await y(u),f===u&&(i.value[n.value].selectedNode=u,b.handleNode(u,p)))}},handleTabClick(u){f=null,n.value=Number(u.paneKey)},formatTabTitle(u){return u.selectedNode?u.selectedNode.text:v("select")},isSelected(u,p){return u.selectedNode&&u.selectedNode.value===p.value}};return t.watch([l,()=>e.options],()=>{m()},{deep:!0,immediate:!0}),t.watch(()=>e.modelValue,u=>{u!==r.value&&(r.value=u,h())}),t.watch(()=>e.visible,u=>{u&&Array.isArray(r.value)&&r.value.length>0&&h()}),{panes:i,initLoading:a,tabsCursor:n,...b}}}),Ru={role:"menu",class:"fox-cascader__pane"},Fu=["aria-checked","aria-disabled","onClick"],Ou={class:"fox-cascader__item__title"},Ku=t.createElementVNode("view",{class:"fox-cascader__pane"},null,-1);function Uu(e,o,l,n,a,r){const s=t.resolveComponent("Loading"),i=t.resolveComponent("Checklist"),c=t.resolveComponent("fox-tab-pane"),d=t.resolveComponent("fox-tabs");return t.openBlock(),t.createBlock(d,{class:"fox-cascader",modelValue:e.tabsCursor,"onUpdate:modelValue":o[0]||(o[0]=f=>e.tabsCursor=f),onClick:e.handleTabClick,"title-scroll":""},{default:t.withCtx(()=>[!e.initLoading&&e.panes.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.panes,(f,m)=>(t.openBlock(),t.createBlock(c,{title:e.formatTabTitle(f),key:m},{default:t.withCtx(()=>[t.createElementVNode("view",Ru,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.nodes,h=>(t.openBlock(),t.createElementBlock("view",{key:h.value,class:t.normalizeClass(["fox-cascader__item",{active:e.isSelected(f,h),disabled:h.disabled}]),"aria-checked":e.isSelected(f,h),"aria-disabled":h.disabled||void 0,role:"menuitemradio",onClick:y=>e.handleNode(h,!1)},[t.createElementVNode("view",Ou,t.toDisplayString(h.text),1),h.loading?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-cascader__item__icon-loading",name:"loading"})):(t.openBlock(),t.createBlock(i,{key:1,class:"fox-cascader__item__icon-check",name:"checklist"}))],10,Fu))),128))])]),_:2},1032,["title"]))),128)):(t.openBlock(),t.createBlock(c,{key:1,title:"Loading..."},{default:t.withCtx(()=>[Ku]),_:1}))]),_:1},8,["modelValue","onClick"])}const Hu=J(Pu,[["render",Uu]]),{create:ju}=X("cascader"),Wu=ju({components:{FoxCascaderPane:Hu,FoxPopup:ce},props:{...Xe,modelValue:Array,visible:Boolean,title:String,options:{type:Array,default:()=>[]},lazy:Boolean,lazyLoad:Function,valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},poppable:{type:Boolean,default:!0},convertConfig:Object},emits:["update:modelValue","change","pathChange","update:visible"],setup(e,{emit:o}){const l=t.ref(e.modelValue),n=t.computed({get(){return e.visible},set(s){o("update:visible",s)}}),a=(s,i)=>{l.value=s,n.value=!1,o("change",s,i),o("update:modelValue",s)},r=s=>{o("pathChange",s)};return t.watch(()=>e.modelValue,s=>{s!==l.value&&(l.value=s)}),{onChange:a,onPathChange:r,innerValue:l,innerVisible:n}}}),Yu=["innerHTML"];function Xu(e,o,l,n,a,r){const s=t.resolveComponent("FoxCascaderPane"),i=t.resolveComponent("FoxPopup");return e.poppable?(t.openBlock(),t.createBlock(i,{key:0,visible:e.innerVisible,"onUpdate:visible":o[0]||(o[0]=c=>e.innerVisible=c),position:"bottom","pop-class":"fox-cascader__popup",round:"",closeable:e.closeable,"destroy-on-close":!1,"close-icon-position":e.closeIconPosition},{default:t.withCtx(()=>[e.title?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-cascader__bar",innerHTML:e.title},null,8,Yu)):t.createCommentVNode("",!0),t.createVNode(s,{onChange:e.onChange,onPathChange:e.onPathChange,modelValue:e.innerValue,options:e.options,lazy:e.lazy,"lazy-load":e.lazyLoad,"value-key":e.valueKey,"text-key":e.textKey,"children-key":e.childrenKey,"convert-config":e.convertConfig,visible:e.innerVisible},null,8,["onChange","onPathChange","modelValue","options","lazy","lazy-load","value-key","text-key","children-key","convert-config","visible"])]),_:1},8,["visible","closeable","close-icon-position"])):(t.openBlock(),t.createBlock(s,{key:1,onChange:e.onChange,onPathChange:e.onPathChange,modelValue:e.innerValue,options:e.options,lazy:e.lazy,"lazy-load":e.lazyLoad,"value-key":e.valueKey,"text-key":e.textKey,"children-key":e.childrenKey,"convert-config":e.convertConfig,visible:e.innerVisible},null,8,["onChange","onPathChange","modelValue","options","lazy","lazy-load","value-key","text-key","children-key","convert-config","visible"]))}const Do=J(Wu,[["render",Xu]]);function Lt(e,o){const l=e.textKey??"text";return o[l]??""}function Pt(e,o){const l=e.valueKey??"value";return o[l]}function as(e,o){const l=e.childrenKey??"children";return o[l]}function Qt(e,o=[]){const l={texts:[],values:[]};for(let n=0;n<o.length;n++){const a=o[n],r=Lt(e,a),s=Pt(e,a);l.texts.push(r),l.values.push(s??"")}return l}function rs(e,o,l,n,a=[]){if(!l)return;const r=l[n];for(let s=0;s<o.length;s++)if(Lt(e,o[s])===r){const c=Pt(e,o[s])??"",d={[e.textKey]:r,[e.valueKey]:c};a.push(d);const f=as(e,o[s]);Array.isArray(f)&&rs(e,f,l,n+1,a);return}}function ss(e,o,l,n,a=[]){if(!l)return;const r=l[n];for(let s=0;s<o.length;s++)if(Pt(e,o[s])===r){const c=Lt(e,o[s])??"",d={[e.textKey]:c,[e.valueKey]:r};a.push(d);const f=as(e,o[s]);Array.isArray(f)&&ss(e,f,l,n+1,a);return}}function Go(e,o,l){if(o===l)return!0;if(o.length!==l.length)return!1;for(let n=0;n<o.length;n++){const a=Lt(e,o[n]),r=Lt(e,l[n]);if(a!==r)return!1;const s=Pt(e,o[n]),i=Pt(e,l[n]);if(s!==i)return!1}return!0}let Qu=class{proxy;constructor(o){this.proxy=o}async load(o,l){const n="cascader";if(Array.isArray(o))return o;if(typeof o=="function")return await o(l);const a=Ge(this.proxy,n);return a===null?(console.error(`${n} component not found api function`),[]):(Be(l)&&t.isReactive(l)&&(l=t.toRaw(l)),await a(o,l))}};function Gu(){const e=t.getCurrentInstance();return new Qu(e.proxy)}function Zu(e,o,l,n,a,r,s=!1){return{props:{...ue,...de,modelValue:{type:[Array,String]},pathNodes:{type:[Array]},title:{type:String,required:!1},placeholder:{type:String,required:!1,default:""},source:{type:[Array,Function,String],default:[]},params:{type:Object},valueType:{type:String,required:!1,default:"value"},lazy:{type:Boolean,required:!1},lazyLoad:{type:Function,required:!1},valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},convertConfig:{type:Object}},emits:["update:modelValue","change","pathChange","blur","focus","clear","update:pathNodes"],setup(i,c){const d=Ce(t.computed(()=>i.disabled)),f=Ae(t.computed(()=>i.readonly)),{emitEvent:m}=we({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus"],get validate(){return!d.value&&!f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ae.useFoxI18n(o),y=h(i,["placeholder"]),g=t.ref(!1),v=Gu(),b=t.ref([]);t.watch([()=>i.source,()=>i.params],async([F,I])=>{F&&(b.value=await v.load(F,I))},{immediate:!0});const u=t.ref([]),p=t.computed(()=>Array.isArray(u.value)?u.value.join(" "):u.value),k=t.ref([]),S=t.ref([]);t.watch([()=>i.modelValue],async([F])=>{if(i.lazy===!0){S.value.length==0&&(u.value=Array.isArray(F)?F:[],k.value=Array.isArray(F)?F:[]);return}if(i.valueType==="item"){let I=F;if(!Go(i,I,S.value)){S.value=I;let K=Qt(i,I);u.value=K.texts,k.value=K.values}}else if(i.valueType==="text"){let I=F,K=[];if(rs(i,b.value,I,0,K),!Go(i,K,S.value)){S.value=K;let W=Qt(i,K);I.value=W.texts,k.value=W.values}}else{let I=[];if(ss(i,b.value,F,0,I),!Go(i,I,S.value)){S.value=I;let K=Qt(i,I);u.value=K.texts,k.value=K.values}}},{immediate:!0});const w="fox-input-item",N=t.computed(()=>({[w]:!0,[`${w}__disabled`]:d.value})),T=Ne(t.computed(()=>i.textAlign),"textAlign"),B=t.computed(()=>{const F={};return T.value&&(F["text-align"]=T.value),F}),D=t.ref(!1),C=()=>{d.value===!0||f.value===!0||(D.value=!0)},V=F=>{D.value=F},M=(F,I)=>{let K=I.map(Z=>{if(Z==null)return Z;let O={...Z};return Reflect.deleteProperty(O,"text"),O[i.textKey]=Z.text??"",Reflect.deleteProperty(O,"value"),O[i.valueKey]=Z.value??"",O});S.value=K;let W=Qt(i,K);u.value=W.texts,k.value=W.values,i.valueType==="text"?(m("change",u.value,K),m("update:modelValue",u.value)):i.valueType==="item"?(m("change",K,K),m("update:modelValue",K)):(m("change",k.value,K),m("update:modelValue",k.value)),m("update:pathNodes",K)},L=F=>{let I=F.map(K=>{if(K==null)return K;let W={...K};return Reflect.deleteProperty(W,"text"),W[i.textKey]=K.text??"",Reflect.deleteProperty(W,"value"),W[i.valueKey]=K.value??"",W});m("pathChange",I)},$=F=>{g.value=!0,m("focus",k.value,F)},E=F=>{setTimeout(()=>{g.value=!1},0),m("blur",k.value,F)},x=t.computed(()=>({[`${w}__append`]:!0})),A=t.computed(()=>ge(i.unit)>0),H=t.computed(()=>ge(i.unit)>0&&!g.value),R=t.computed(()=>({hidden:!H.value})),Y=F=>{S.value=[],u.value=[],k.value=[],m("update:modelValue",[]),m("change",[],F),m("clear",[]),m("update:pathNodes",[])},U=t.computed(()=>i.clearable&&!d.value&&!f.value),P=t.computed(()=>{let F=k.value&&k.value.length>0;return i.clearable&&F&&g.value}),z=F=>{P.value?Y(F):C()},j=t.computed(()=>P.value&&U.value?n:a),q=t.computed(()=>({action:!0}));return()=>{const F={class:N.value,style:B.value,type:"text",maxlength:i.maxLength,placeholder:y.placeholder.value,readonly:!0,unselectable:"on",value:p.value,onClick:C,onFocus:$,onBlur:E};s&&(F.disabled=!0);const I=[],K=t.h("input",F);I.push(K);const W=[],Z={class:["action-icon"]},O=t.h(j.value,Z),G={class:q.value,onClick:z},Q=t.h("view",G,{default:()=>[O]});if(W.push(Q),A.value){const Ze=t.h("view",{class:R.value},[i.unit]);W.push(Ze)}const ee={class:x.value},_=t.h("view",ee,{default:()=>W});I.push(_);const oe={default:()=>I};oe.label=c.slots.default,oe.prepend=c.slots.prepend,oe.append=c.slots.append,oe.fixedPreTip=c.slots.fixedPreTip,oe.fixedTip=c.slots.fixedTip;let le={};le.visible=D.value,le["onUpdate:visible"]=V,le.modelValue=k.value,le.onChange=M,le.onPathChange=L,le.options=b.value,le.title=i.title,le.lazy=i.lazy,le.lazyLoad=i.lazyLoad,le.valueKey=i.valueKey,le.textKey=i.textKey,le.childrenKey=i.childrenKey,le.convertConfig=i.convertConfig;const $e=t.h(r,le);oe.hide=()=>[$e];const ve=he(i,de,ue);return t.h(l,ve,oe)}}}}const{componentName:Ju,create:_u,scope:ed}=X("cascader-item"),Gn=_u(Zu(Ju,ed,be,te.CircleClose,te.ArrowRight,Do,!1));var Ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function He(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var is={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){var l=1e3,n=6e4,a=36e5,r="millisecond",s="second",i="minute",c="hour",d="day",f="week",m="month",h="quarter",y="year",g="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,u=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},k=function(L,$,E){var x=String(L);return!x||x.length>=$?L:""+Array($+1-x.length).join(E)+L},S={s:k,z:function(L){var $=-L.utcOffset(),E=Math.abs($),x=Math.floor(E/60),A=E%60;return($<=0?"+":"-")+k(x,2,"0")+":"+k(A,2,"0")},m:function L($,E){if($.date()<E.date())return-L(E,$);var x=12*(E.year()-$.year())+(E.month()-$.month()),A=$.clone().add(x,m),H=E-A<0,R=$.clone().add(x+(H?-1:1),m);return+(-(x+(E-A)/(H?A-R:R-A))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:m,y,w:f,d,D:g,h:c,m:i,s,ms:r,Q:h}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},w="en",N={};N[w]=p;var T=function(L){return L instanceof V},B=function L($,E,x){var A;if(!$)return w;if(typeof $=="string"){var H=$.toLowerCase();N[H]&&(A=H),E&&(N[H]=E,A=H);var R=$.split("-");if(!A&&R.length>1)return L(R[0])}else{var Y=$.name;N[Y]=$,A=Y}return!x&&A&&(w=A),A||!x&&w},D=function(L,$){if(T(L))return L.clone();var E=typeof $=="object"?$:{};return E.date=L,E.args=arguments,new V(E)},C=S;C.l=B,C.i=T,C.w=function(L,$){return D(L,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var V=function(){function L(E){this.$L=B(E.locale,null,!0),this.parse(E)}var $=L.prototype;return $.parse=function(E){this.$d=function(x){var A=x.date,H=x.utc;if(A===null)return new Date(NaN);if(C.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var R=A.match(b);if(R){var Y=R[2]-1||0,U=(R[7]||"0").substring(0,3);return H?new Date(Date.UTC(R[1],Y,R[3]||1,R[4]||0,R[5]||0,R[6]||0,U)):new Date(R[1],Y,R[3]||1,R[4]||0,R[5]||0,R[6]||0,U)}}return new Date(A)}(E),this.$x=E.x||{},this.init()},$.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},$.$utils=function(){return C},$.isValid=function(){return this.$d.toString()!==v},$.isSame=function(E,x){var A=D(E);return this.startOf(x)<=A&&A<=this.endOf(x)},$.isAfter=function(E,x){return D(E)<this.startOf(x)},$.isBefore=function(E,x){return this.endOf(x)<D(E)},$.$g=function(E,x,A){return C.u(E)?this[x]:this.set(A,E)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(E,x){var A=this,H=!!C.u(x)||x,R=C.p(E),Y=function(K,W){var Z=C.w(A.$u?Date.UTC(A.$y,W,K):new Date(A.$y,W,K),A);return H?Z:Z.endOf(d)},U=function(K,W){return C.w(A.toDate()[K].apply(A.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(W)),A)},P=this.$W,z=this.$M,j=this.$D,q="set"+(this.$u?"UTC":"");switch(R){case y:return H?Y(1,0):Y(31,11);case m:return H?Y(1,z):Y(0,z+1);case f:var F=this.$locale().weekStart||0,I=(P<F?P+7:P)-F;return Y(H?j-I:j+(6-I),z);case d:case g:return U(q+"Hours",0);case c:return U(q+"Minutes",1);case i:return U(q+"Seconds",2);case s:return U(q+"Milliseconds",3);default:return this.clone()}},$.endOf=function(E){return this.startOf(E,!1)},$.$set=function(E,x){var A,H=C.p(E),R="set"+(this.$u?"UTC":""),Y=(A={},A[d]=R+"Date",A[g]=R+"Date",A[m]=R+"Month",A[y]=R+"FullYear",A[c]=R+"Hours",A[i]=R+"Minutes",A[s]=R+"Seconds",A[r]=R+"Milliseconds",A)[H],U=H===d?this.$D+(x-this.$W):x;if(H===m||H===y){var P=this.clone().set(g,1);P.$d[Y](U),P.init(),this.$d=P.set(g,Math.min(this.$D,P.daysInMonth())).$d}else Y&&this.$d[Y](U);return this.init(),this},$.set=function(E,x){return this.clone().$set(E,x)},$.get=function(E){return this[C.p(E)]()},$.add=function(E,x){var A,H=this;E=Number(E);var R=C.p(x),Y=function(z){var j=D(H);return C.w(j.date(j.date()+Math.round(z*E)),H)};if(R===m)return this.set(m,this.$M+E);if(R===y)return this.set(y,this.$y+E);if(R===d)return Y(1);if(R===f)return Y(7);var U=(A={},A[i]=n,A[c]=a,A[s]=l,A)[R]||1,P=this.$d.getTime()+E*U;return C.w(P,this)},$.subtract=function(E,x){return this.add(-1*E,x)},$.format=function(E){var x=this,A=this.$locale();if(!this.isValid())return A.invalidDate||v;var H=E||"YYYY-MM-DDTHH:mm:ssZ",R=C.z(this),Y=this.$H,U=this.$m,P=this.$M,z=A.weekdays,j=A.months,q=function(W,Z,O,G){return W&&(W[Z]||W(x,H))||O[Z].slice(0,G)},F=function(W){return C.s(Y%12||12,W,"0")},I=A.meridiem||function(W,Z,O){var G=W<12?"AM":"PM";return O?G.toLowerCase():G},K={YY:String(this.$y).slice(-2),YYYY:this.$y,M:P+1,MM:C.s(P+1,2,"0"),MMM:q(A.monthsShort,P,j,3),MMMM:q(j,P),D:this.$D,DD:C.s(this.$D,2,"0"),d:String(this.$W),dd:q(A.weekdaysMin,this.$W,z,2),ddd:q(A.weekdaysShort,this.$W,z,3),dddd:z[this.$W],H:String(Y),HH:C.s(Y,2,"0"),h:F(1),hh:F(2),a:I(Y,U,!0),A:I(Y,U,!1),m:String(U),mm:C.s(U,2,"0"),s:String(this.$s),ss:C.s(this.$s,2,"0"),SSS:C.s(this.$ms,3,"0"),Z:R};return H.replace(u,function(W,Z){return Z||K[W]||R.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(E,x,A){var H,R=C.p(x),Y=D(E),U=(Y.utcOffset()-this.utcOffset())*n,P=this-Y,z=C.m(this,Y);return z=(H={},H[y]=z/12,H[m]=z,H[h]=z/3,H[f]=(P-U)/6048e5,H[d]=(P-U)/864e5,H[c]=P/a,H[i]=P/n,H[s]=P/l,H)[R]||P,A?z:C.a(z)},$.daysInMonth=function(){return this.endOf(m).$D},$.$locale=function(){return N[this.$L]},$.locale=function(E,x){if(!E)return this.$L;var A=this.clone(),H=B(E,x,!0);return H&&(A.$L=H),A},$.clone=function(){return C.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},L}(),M=V.prototype;return D.prototype=M,[["$ms",r],["$s",s],["$m",i],["$H",c],["$W",d],["$M",m],["$y",y],["$D",g]].forEach(function(L){M[L[1]]=function($){return this.$g($,L[0],L[1])}}),D.extend=function(L,$){return L.$i||(L($,V,D),L.$i=!0),D},D.locale=B,D.isDayjs=T,D.unix=function(L){return D(1e3*L)},D.en=N[w],D.Ls=N,D.p={},D})})(is);var td=is.exports;const ze=He(td);var cs={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){var l={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d\d/,r=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,i={},c=function(v){return(v=+v)+(v>68?1900:2e3)},d=function(v){return function(b){this[v]=+b}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var u=b.match(/([+-]|\d\d)/g),p=60*u[1]+(+u[2]||0);return p===0?0:u[0]==="+"?-p:p}(v)}],m=function(v){var b=i[v];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(v,b){var u,p=i.meridiem;if(p){for(var k=1;k<=24;k+=1)if(v.indexOf(p(k,0,b))>-1){u=k>12;break}}else u=v===(b?"pm":"PM");return u},y={A:[s,function(v){this.afternoon=h(v,!1)}],a:[s,function(v){this.afternoon=h(v,!0)}],S:[/\d/,function(v){this.milliseconds=100*+v}],SS:[a,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[r,d("seconds")],ss:[r,d("seconds")],m:[r,d("minutes")],mm:[r,d("minutes")],H:[r,d("hours")],h:[r,d("hours")],HH:[r,d("hours")],hh:[r,d("hours")],D:[r,d("day")],DD:[a,d("day")],Do:[s,function(v){var b=i.ordinal,u=v.match(/\d+/);if(this.day=u[0],b)for(var p=1;p<=31;p+=1)b(p).replace(/\[|\]/g,"")===v&&(this.day=p)}],M:[r,d("month")],MM:[a,d("month")],MMM:[s,function(v){var b=m("months"),u=(m("monthsShort")||b.map(function(p){return p.slice(0,3)})).indexOf(v)+1;if(u<1)throw new Error;this.month=u%12||u}],MMMM:[s,function(v){var b=m("months").indexOf(v)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(v){this.year=c(v)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function g(v){var b,u;b=v,u=i&&i.formats;for(var p=(v=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(D,C,V){var M=V&&V.toUpperCase();return C||u[V]||l[V]||u[M].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(L,$,E){return $||E.slice(1)})})).match(n),k=p.length,S=0;S<k;S+=1){var w=p[S],N=y[w],T=N&&N[0],B=N&&N[1];p[S]=B?{regex:T,parser:B}:w.replace(/^\[|\]$/g,"")}return function(D){for(var C={},V=0,M=0;V<k;V+=1){var L=p[V];if(typeof L=="string")M+=L.length;else{var $=L.regex,E=L.parser,x=D.slice(M),A=$.exec(x)[0];E.call(C,A),D=D.replace(A,"")}}return function(H){var R=H.afternoon;if(R!==void 0){var Y=H.hours;R?Y<12&&(H.hours+=12):Y===12&&(H.hours=0),delete H.afternoon}}(C),C}}return function(v,b,u){u.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(c=v.parseTwoDigitYear);var p=b.prototype,k=p.parse;p.parse=function(S){var w=S.date,N=S.utc,T=S.args;this.$u=N;var B=T[1];if(typeof B=="string"){var D=T[2]===!0,C=T[3]===!0,V=D||C,M=T[2];C&&(M=T[2]),i=this.$locale(),!D&&M&&(i=u.Ls[M]),this.$d=function(x,A,H){try{if(["x","X"].indexOf(A)>-1)return new Date((A==="X"?1e3:1)*x);var R=g(A)(x),Y=R.year,U=R.month,P=R.day,z=R.hours,j=R.minutes,q=R.seconds,F=R.milliseconds,I=R.zone,K=new Date,W=P||(Y||U?1:K.getDate()),Z=Y||K.getFullYear(),O=0;Y&&!U||(O=U>0?U-1:K.getMonth());var G=z||0,Q=j||0,ee=q||0,_=F||0;return I?new Date(Date.UTC(Z,O,W,G,Q,ee,_+60*I.offset*1e3)):H?new Date(Date.UTC(Z,O,W,G,Q,ee,_)):new Date(Z,O,W,G,Q,ee,_)}catch{return new Date("")}}(w,B,N),this.init(),M&&M!==!0&&(this.$L=this.locale(M).$L),V&&w!=this.format(B)&&(this.$d=new Date("")),i={}}else if(B instanceof Array)for(var L=B.length,$=1;$<=L;$+=1){T[1]=B[$-1];var E=u.apply(this,T);if(E.isValid()){this.$d=E.$d,this.$L=E.$L,this.init();break}$===L&&(this.$d=new Date(""))}else k.call(this,S)}}})})(cs);var od=cs.exports;const nd=He(od);var us={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){return function(l,n,a){var r=n.prototype,s=r.format;a.en.ordinal=function(i){var c=["th","st","nd","rd"],d=i%100;return"["+i+(c[(d-20)%10]||c[d]||c[0])+"]"},r.format=function(i){var c=this,d=this.$locale();if(!this.isValid())return s.bind(this)(i);var f=this.$utils(),m=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(h){switch(h){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return d.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return d.ordinal(c.week(),"W");case"w":case"ww":return f.s(c.week(),h==="w"?1:2,"0");case"W":case"WW":return f.s(c.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return f.s(String(c.$H===0?24:c.$H),h==="k"?1:2,"0");case"X":return Math.floor(c.$d.getTime()/1e3);case"x":return c.$d.getTime();case"z":return"["+c.offsetName()+"]";case"zzz":return"["+c.offsetName("long")+"]";default:return h}});return s.bind(this)(m)}}})})(us);var ld=us.exports;const ad=He(ld);var ds={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){return function(l,n,a){var r=n.prototype,s=function(m){return m&&(m.indexOf?m:m.s)},i=function(m,h,y,g,v){var b=m.name?m:m.$locale(),u=s(b[h]),p=s(b[y]),k=u||p.map(function(w){return w.slice(0,g)});if(!v)return k;var S=b.weekStart;return k.map(function(w,N){return k[(N+(S||0))%7]})},c=function(){return a.Ls[a.locale()]},d=function(m,h){return m.formats[h]||function(y){return y.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(g,v,b){return v||b.slice(1)})}(m.formats[h.toUpperCase()])},f=function(){var m=this;return{months:function(h){return h?h.format("MMMM"):i(m,"months")},monthsShort:function(h){return h?h.format("MMM"):i(m,"monthsShort","months",3)},firstDayOfWeek:function(){return m.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):i(m,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):i(m,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):i(m,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return d(m.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return f.bind(this)()},a.localeData=function(){var m=c();return{firstDayOfWeek:function(){return m.weekStart||0},weekdays:function(){return a.weekdays()},weekdaysShort:function(){return a.weekdaysShort()},weekdaysMin:function(){return a.weekdaysMin()},months:function(){return a.months()},monthsShort:function(){return a.monthsShort()},longDateFormat:function(h){return d(m,h)},meridiem:m.meridiem,ordinal:m.ordinal}},a.months=function(){return i(c(),"months")},a.monthsShort=function(){return i(c(),"monthsShort","months",3)},a.weekdays=function(m){return i(c(),"weekdays",null,null,m)},a.weekdaysShort=function(m){return i(c(),"weekdaysShort","weekdays",3,m)},a.weekdaysMin=function(m){return i(c(),"weekdaysMin","weekdays",2,m)}}})})(ds);var rd=ds.exports;const sd=He(rd);var fs={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){var l="week",n="year";return function(a,r,s){var i=r.prototype;i.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var d=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var f=s(this).startOf(n).add(1,n).date(d),m=s(this).endOf(l);if(f.isBefore(m))return 1}var h=s(this).startOf(n).date(d).startOf(l).subtract(1,"millisecond"),y=this.diff(h,l,!0);return y<0?s(this).startOf("week").week():Math.ceil(y)},i.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(fs);var id=fs.exports;const cd=He(id);var ms={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){return function(l,n){n.prototype.weekYear=function(){var a=this.month(),r=this.week(),s=this.year();return r===1&&a===11?s+1:a===0&&r>=52?s-1:s}}})})(ms);var ud=ms.exports;const dd=He(ud);var ps={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){return function(l,n,a){n.prototype.dayOfYear=function(r){var s=Math.round((a(this).startOf("day")-a(this).startOf("year"))/864e5)+1;return r==null?s:this.add(r-s,"day")}}})})(ps);var fd=ps.exports;const md=He(fd);var hs={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){return function(l,n){n.prototype.isSameOrAfter=function(a,r){return this.isSame(a,r)||this.isAfter(a,r)}}})})(hs);var pd=hs.exports;const hd=He(pd);var gs={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){return function(l,n){n.prototype.isSameOrBefore=function(a,r){return this.isSame(a,r)||this.isBefore(a,r)}}})})(gs);var gd=gs.exports;const yd=He(gd);ze.extend(sd);ze.extend(ad);ze.extend(nd);ze.extend(cd);ze.extend(dd);ze.extend(md);ze.extend(hd);ze.extend(yd);const ne={format(e,o){return ze(e).format(o)},parser(e,o){return ze(e,o).toDate()},isLeapYear(e){return e%4==0&&e%100!=0||e%400==0},getWhatDay(e,o,l){const a=new Date(e+"/"+o+"/"+l).getDay();return["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][a]},getMonthPreDay(e,o){let n=new Date(e+"/"+o+"/01").getDay();return n==0&&(n=7),n},getMonthDays(e,o){return/^0/.test(o)&&(o=o.split("")[1]),[0,31,this.isLeapYear(Number(e))?29:28,31,30,31,30,31,31,30,31,30,31][o]},getNumTwoBit(e){return e=Number(e),(e>9?"":"0")+e},date2Str:function(e,o){o=o||"-";const l=e.getFullYear(),n=this.getNumTwoBit(e.getMonth()+1),a=this.getNumTwoBit(e.getDate());return[l,n,a].join(o)},getDay(e,o){e=e||0;let l=o??new Date;const n=e*(1e3*60*60*24);return l=new Date(l.getTime()+n),this.date2Str(l)},compareDate(e,o){let l;typeof e=="string"?l=new Date(e.replace("-","/").replace("-","/")):l=e;let n;return typeof o=="string"?n=new Date(o.replace("-","/").replace("-","/")):n=o,!(l>=n)},isEqual(e,o){if(e===o)return!0;if(!e||!o)return!1;let l;typeof e=="string"?l=new Date(e).getTime():l=e;let n;return typeof o=="string"?n=new Date(o).getTime():n=o,l==n},getMonthWeek:function(e,o,l,n=0){const a=new Date(Number(e),parseInt(o)-1,Number(l));let r=a.getDay(),s=a.getDate(),i=6-r;return n!==0&&(r=r==0?7:r,i=7-r),Math.ceil((s+i)/7)},getYearWeek:function(e,o,l,n=0){const a=new Date(Number(e),parseInt(o)-1,Number(l)),r=new Date(Number(e),0,1),s=Math.round((a.valueOf()-r.valueOf())/864e5);let i=a.getDay(),c=6-i;return n!==0&&(i=i==0?7:i,c=7-i),Math.ceil((s+c)/7)},getWeekDate:function(e,o,l,n=0){const a=new Date(Number(e),parseInt(o)-1,Number(l)),r=a.getTime();let s=a.getDay();if(n===0){const c=r-s*864e5,d=r+(6-s)*864e5,f=this.date2Str(new Date(c)),m=this.date2Str(new Date(d));return[f,m]}else{s=s==0?7:s;const i=24*60*60*1e3,c=r-(s-1)*i,d=r+(7-s)*i,f=this.date2Str(new Date(c)),m=this.date2Str(new Date(d));return[f,m]}},formatResultDate:function(e){let o=[...e.split("-")];return o[2]=ne.getNumTwoBit(Number(o[2])),o[3]=`${o[0]}-${o[1]}-${o[2]}`,o[4]=ne.getWhatDay(+o[0],+o[1],+o[2]),o},inScope4Day(e,o,l){const n=new Date(new Date(o).setDate(o.getDate()+l)),a=e.getTime(),r=n.getTime(),s=o.getTime();return r>s?a>=s&&a<=r:a>=r&&a<=s},inScope4Month(e,o,l){const n=new Date(new Date(o).setMonth(o.getMonth()+l)),a=e.getTime(),r=n.getTime(),s=o.getTime();return r>s?a>=s&&a<=r:a>=r&&a<=s}},Ja=new Date().getFullYear(),Zn={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss",time:"HH:mm:ss","year-month":"YYYY-MM","month-day":"MM-DD",datehour:"YYYY-MM-DD HH","hour-minute":"HH:mm"},fo=(e,o,l)=>{let n;if(Fe(o)?n=o:typeof o=="string"&&ge(o)>0?n=ne.parser(o,l):n=new Date,n.toString()==="Invalid Date")return null;let a=Math.max(n.getTime(),e.minDate.getTime());return a=Math.min(a,e.maxDate.getTime()),new Date(a)},kn=(e,o,l)=>{Fe(o)||(o=e.minDate);let n=Math.max(o.getTime(),e.minDate.getTime());return n=Math.min(n,e.maxDate.getTime()),ne.format(new Date(n),l)};let bn={modelValue:{type:[String,Date]},confirmText:{type:String,default:""},cancelText:{type:String,default:""},type:{type:String,default:"date"},valueFormat:{type:String},visible:{type:Boolean,default:!1},title:{type:String,default:""},isShowChinese:{type:Boolean,default:!0},minuteStep:{type:Number,default:1},minDate:{type:Date,default:()=>new Date(Ja-10,0,1),validator:Fe},maxDate:{type:Date,default:()=>new Date(Ja+10,11,31),validator:Fe},visibleItemCount:{type:[Number,String],default:7},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:1e3},teleportDisable:{type:Boolean}};const{create:vd,scope:kd}=X("date-picker"),bd=vd({components:{[yt.name]:yt},props:{...bn},emits:["click","update:visible","update:modelValue","update:dateIndexs","update:close","cancel","confirm","clear"],setup(e,{emit:o}){const{t:l}=ae.useFoxI18n(kd),n={day:l("day"),year:l("year"),month:l("month"),hour:l("hour"),minute:l("minute"),seconds:l("seconds")},a=t.ref(!1);t.watch(()=>e.visible,u=>{a.value=u});function r(u,p){return new Date(u,p,0).getDate()}const s=(u,p)=>{const k=e[`${u}Date`],S=k.getFullYear();let w=1,N=1,T=0,B=0;u==="max"&&(w=12,N=r(p.getFullYear(),p.getMonth()+1),T=23,B=59);const D=B;return p.getFullYear()===S&&(w=k.getMonth()+1,p.getMonth()+1===w&&(N=k.getDate(),p.getDate()===N&&(T=k.getHours(),p.getHours()===T&&(B=k.getMinutes())))),{[`${u}Year`]:S,[`${u}Month`]:w,[`${u}Date`]:N,[`${u}Hour`]:T,[`${u}Minute`]:B,[`${u}Seconds`]:D}},i=t.computed(()=>{if(!h.value)return[];const{maxYear:u,maxDate:p,maxMonth:k,maxHour:S,maxMinute:w,maxSeconds:N}=s("max",h.value),{minYear:T,minDate:B,minMonth:D,minHour:C,minMinute:V,minSeconds:M}=s("min",h.value);let L=[{type:"year",range:[T,u]},{type:"month",range:[D,k]},{type:"day",range:[B,p]},{type:"hour",range:[C,S]},{type:"minute",range:[V,w]},{type:"seconds",range:[M,N]}];switch(e.type){case"date":L=L.slice(0,3);break;case"datetime":L=L.slice(0,5);break;case"time":L=L.slice(3,6);break;case"year-month":L=L.slice(0,2);break;case"month-day":L=L.slice(1,3);break;case"datehour":L=L.slice(0,4);break;case"hour-minute":L=L.slice(3,5);break}return L}),c=(u,p,k)=>{if(!(p>u))return null;const S=[];for(;u<=p;)e.isShowChinese?S.push({text:u+n[k],value:u}):S.push({text:`${u}`,value:u}),k==="minute"?u+=e.minuteStep:u++;return S},d=t.computed(()=>{let u=[];return i.value.forEach(p=>{let k=c(p.range[0],p.range[1],p.type);k&&u.push(k)}),u}),f=(u,p)=>u==="year"?p.getFullYear():u==="month"?p.getMonth()+1:u==="day"?p.getDate():u==="hour"?p.getHours():u==="minute"?p.getMinutes():u==="seconds"?p.getSeconds():0,m=t.ref(),h=t.ref(null);t.watchEffect(()=>{let u,p=e.modelValue;if(typeof p=="string"?p.length==0?u=new Date:e.valueFormat?u=fo(e,e.modelValue,e.valueFormat):u=fo(e,p,Zn[e.type]):Fe(p)?u=p:u=new Date,!!u&&(!h.value||u.getTime()!==h.value.getTime())){h.value=u;let k=[];i.value.forEach(S=>{let w=f(S.type,u);k.push(w)}),m.value=k}});const y=u=>{if(e.type==="date"){let p=u;h.value=new Date(p[0],p[1]-1,Math.min(p[2],r(p[0],p[1])))}else if(e.type==="datetime"){let p=u;h.value=new Date(p[0],p[1]-1,Math.min(p[2],r(p[0],p[1])),p[3],p[4])}else if(e.type==="time"){let p=u,k=h.value??new Date,S=new Date(k.getFullYear(),k.getMonth(),k.getDate(),p[0],p[1],p[2]);h.value=S}else if(e.type==="year-month"){let p=u,k=new Date(p[0],p[1]-1);h.value=k}else if(e.type==="month-day"){let p=u,k=h.value??new Date,S=new Date(k.getFullYear(),p[0]-1,p[1]);h.value=S}else if(e.type==="datehour"){let p=u;h.value=new Date(p[0],p[1]-1,Math.min(p[2],r(p[0],p[1])),p[3])}else if(e.type==="hour-minute"){let p=u,k=h.value??new Date,S=new Date(k.getFullYear(),k.getMonth(),k.getDate(),p[0],p[1]);h.value=S}m.value=u};return{columns:d,dateIndexs:m,show:a,onClose:()=>{a.value=!1,o("update:visible",!1),o("update:close",!1)},onConfirm:u=>{y(u),a.value=!1;let p=h.value??new Date;if(e.valueFormat){let k=kn(e,p,e.valueFormat);o("update:modelValue",k)}else o("update:modelValue",p);o("update:visible",!1),o("confirm",u)},onClear:()=>{o("clear")}}}});function Sd(e,o,l,n,a,r){const s=t.resolveComponent("fox-picker");return t.openBlock(),t.createBlock(s,{visible:e.show,"model-value":e.dateIndexs,source:e.columns,"value-type":"value","confirm-text":e.confirmText,"cancel-text":e.cancelText,title:e.title,onConfirm:e.onConfirm,onClose:e.onClose,onClear:e.onClear,"visible-item-count":e.visibleItemCount,"three-dimensional":e.threeDimensional,"swipe-duration":e.swipeDuration,"teleport-disable":e.teleportDisable},{top:t.withCtx(()=>[t.renderSlot(e.$slots,"top")]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["visible","model-value","source","confirm-text","cancel-text","title","onConfirm","onClose","onClear","visible-item-count","three-dimensional","swipe-duration","teleport-disable"])}const xo=J(bd,[["render",Sd]]);function Cd(e){let o=e.format;if(!o){let l=e.type??"date";o=Zn[l]}return o}function wd(e,o,l,n,a,r,s=!1){return{props:{...ue,...de,...bn,format:{type:String},placeholder:{type:String,default:""},textAlign:{type:String},clearable:{type:Boolean,default:!0}},emits:["change","update:modelValue","blur","focus","clear"],setup(i,c){const d=Ce(t.computed(()=>i.disabled)),f=Ae(t.computed(()=>i.readonly)),{emitEvent:m}=we({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus"],get validate(){return!d.value&&!f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ae.useFoxI18n(o),y=h(i,["placeholder"]),g=t.ref(!1),b=Ee(i,"modelValue",z=>z==null?null:typeof z=="string"?z.length==0?null:i.valueFormat?fo(i,z,i.valueFormat)??z:fo(i,z,Zn[i.type])??z:Fe(z)?z:null),u=t.computed(()=>{if(!b.value)return"";const z=Cd(i);return kn(i,b.value,z)}),p="fox-input-item",k=t.computed(()=>({[p]:!0,[`${p}__disabled`]:d.value})),S=Ne(t.computed(()=>i.textAlign),"textAlign"),w=t.computed(()=>{const z={};return S.value&&(z["text-align"]=S.value),z}),N=t.ref(!1),T=()=>{N.value=!0},B=()=>{N.value=!1};c.expose({showPicker:T,hidePicker:B});const D=z=>{N.value=z},C=z=>{if(b.value=z,i.valueFormat){let j=kn(i,z,i.valueFormat);m("update:modelValue",j,{}),m("change",j,{})}else m("update:modelValue",z,{}),m("change",z,{})},V=z=>{let q=z.target.value;g.value=!0,m("focus",q,z)},M=z=>{setTimeout(()=>{g.value=!1},0);let q=z.target.value;i.maxLength&&q.length>Number(i.maxLength)&&(q=q.slice(0,Number(i.maxLength))),m("blur",q,z)},L=t.computed(()=>({[`${p}__append`]:!0})),$=t.computed(()=>ge(i.unit)>0),E=t.computed(()=>ge(i.unit)>0&&!g.value),x=t.computed(()=>({hidden:!E.value})),A=z=>{b.value="",m("update:modelValue","",z),m("change","",z),m("clear",""),B()},H=t.computed(()=>i.clearable&&!d.value&&!f.value),R=t.computed(()=>{let z=ge(b.value)>0;return i.clearable&&z&&g.value}),Y=z=>{R.value?A(z):T()},U=t.computed(()=>R.value&&H.value?n:a),P=t.computed(()=>({action:!0}));return()=>{const z={class:k.value,style:w.value,type:"text",maxlength:i.maxLength,placeholder:y.placeholder.value,readonly:!0,unselectable:"on",value:u.value,onClick:T,onFocus:V,onBlur:M};s&&(z.disabled=!0);const j=[],q=t.h("input",z);j.push(q);const F=[],I={class:["action-icon"]},K=t.h(U.value,I),W={class:P.value,onClick:Y},Z=t.h("view",W,{default:()=>[K]});if(F.push(Z),$.value){const ve=t.h("view",{class:x.value},[i.unit]);F.push(ve)}const O={class:L.value},G=t.h("view",O,{default:()=>F});j.push(G);const Q={default:()=>j};Q.label=c.slots.default,Q.prepend=c.slots.prepend,Q.append=c.slots.append,Q.fixedPreTip=c.slots.fixedPreTip,Q.fixedTip=c.slots.fixedTip;const ee=he(i,bn);ee.valueFormat=null,ee.disabled=!1,ee.readonly=d.value||f.value,ee.visible=N.value,ee["onUpdate:visible"]=D,ee.modelValue=b.value,ee["onUpdate:modelValue"]=C,ee.onClear=A;const _={};if(c.slots.top){const ve=c.slots.top();_.top=()=>ve}if(c.slots.bottom){const ve=c.slots.bottom();_.default=()=>ve}const oe=t.h(r,ee,_);Q.hide=()=>[oe];const le=he(i,de,ue);return t.h(l,le,Q)}}}}const{create:Nd,componentName:Bd,scope:Vd}=X("date-item"),Jn=Nd(wd(Bd,Vd,be,te.CircleClose,te.Date,xo,!1)),Ad=39,Td=64,{create:$d,scope:Ed}=X("calendar-pane"),Dd=$d({props:{type:{type:String,default:"one"},valueFormat:{type:String,default:"YYYY-MM-DD"},isAutoBackFill:{type:Boolean,default:!1},toDateAnimation:{type:Boolean,default:!0},poppable:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showSubTitle:{type:Boolean,default:!0},showToday:{type:Boolean,default:!0},title:{type:String,default:""},confirmText:{type:String,default:""},startText:{type:String,default:""},endText:{type:String,default:""},defaultValue:{type:[String,Array],default:""},startDate:{type:String,default:ne.getDay(0)},endDate:{type:String,default:ne.getDay(365)},firstDayOfWeek:{type:Number,default:0}},emits:["choose","update","close","select"],setup(e,{emit:o,slots:l}){const{toLocaleRefs:n,t:a}=ae.useFoxI18n(Ed),r=n(e,["title","confirmText","startText","endText","today"]),s=JSON.parse(a("weekdays")),i=t.ref([...s.slice(e.firstDayOfWeek,7),...s.slice(0,e.firstDayOfWeek)]),c=t.ref(null),d=t.ref(null),f=t.ref(null),m=t.ref(null),h=t.ref(0),y=t.computed(()=>u.monthsData.slice(u.defaultRange[0],u.defaultRange[1])),g=t.computed(()=>l.btn),v=t.computed(()=>l["top-info"]),b=t.computed(()=>l["bottom-info"]),u=t.reactive({yearMonthTitle:"",defaultRange:[],currDate:"",propStartDate:"",propEndDate:"",unLoadPrev:!1,touchParams:{startY:0,endY:0,startTime:0,endTime:0,lastY:0,lastTime:0},transformY:0,translateY:0,scrollDistance:0,defaultData:[],chooseData:[],monthsData:[],dayPrefix:"fox-calendar__day",startData:"",endData:"",isRange:e.type==="range",timer:0,currentIndex:0,containerHeight:0,avgHeight:0,monthsNum:0}),p=I=>I.split("-"),k=I=>ne.isEqual(u.currDate[0],I),S=I=>ne.isEqual(u.currDate[1],I),w=I=>u.currDate?.length>0?u.currDate?.some(K=>ne.isEqual(K,I)):!1,N=(I,K)=>K.curData[0]+"-"+K.curData[1]+"-"+ne.getNumTwoBit(+I.day),T=(I,K)=>{const W=N(I,K),{type:Z}=e;return I.type=="curr"?ne.isEqual(u.currDate,W)||(Z=="range"||Z=="week")&&(k(W)||S(W))||Z=="multiple"&&w(W)?`${u.dayPrefix}--active`:u.propStartDate&&ne.compareDate(W,u.propStartDate)||u.propEndDate&&ne.compareDate(u.propEndDate,W)?`${u.dayPrefix}--disabled`:(Z=="range"||Z=="week")&&Array.isArray(u.currDate)&&Object.values(u.currDate).length==2&&ne.compareDate(u.currDate[0],W)&&ne.compareDate(W,u.currDate[1])?`${u.dayPrefix}--choose`:null:`${u.dayPrefix}--disabled`},B=()=>{const{type:I}=e;if(I=="range"&&u.chooseData.length==2||I!="range"){let K=u.chooseData.slice(0);I=="week"&&(K={weekDate:[C(u.chooseData[0]),C(u.chooseData[1])]}),o("choose",K),e.poppable&&o("update")}},D=(I,K,W=!1)=>{if(T(I,K)!=`${u.dayPrefix}--disabled`){const{type:Z}=e;let[O,G]=K.curData,Q=[...K.curData];if(Q[2]=ne.getNumTwoBit(Number(I.day)),Q[3]=`${Q[0]}-${Q[1]}-${Q[2]}`,Q[4]=ne.getWhatDay(+Q[0],+Q[1],+Q[2]),Z=="multiple")if(u.currDate?.length>0){let ee;u.currDate?.forEach((_,oe)=>{_==Q[3]&&(ee=oe)}),W?u.chooseData.push([...Q]):ee!==void 0?(u.currDate.splice(ee,1),u.chooseData.splice(ee,1)):(u.currDate.push(Q[3]),u.chooseData.push([...Q]))}else u.currDate=[Q[3]],u.chooseData=[[...Q]];else if(Z=="range"){let ee=Object.values(u.currDate).length;ee==2||ee==0?u.currDate=[Q[3]]:ne.compareDate(u.currDate[0],Q[3])?Array.isArray(u.currDate)&&u.currDate.push(Q[3]):Array.isArray(u.currDate)&&u.currDate.unshift(Q[3]),u.chooseData.length==2||!u.chooseData.length?u.chooseData=[[...Q]]:ne.compareDate(u.chooseData[0][3],Q[3])?u.chooseData=[...u.chooseData,[...Q]]:u.chooseData=[[...Q],...u.chooseData]}else if(Z=="week"){let ee=ne.getWeekDate(O,G,I.day,e.firstDayOfWeek);u.propStartDate&&ne.compareDate(ee[0],u.propStartDate)&&ee.splice(0,1,u.propStartDate),u.propEndDate&&ne.compareDate(u.propEndDate,ee[1])&&ee.splice(1,1,u.propEndDate),u.currDate=ee,u.chooseData=[ne.formatResultDate(ee[0]),ne.formatResultDate(ee[1])]}else u.currDate=Q[3],u.chooseData=[...Q];if(!W){let ee=u.chooseData;Z=="week"&&(ee={weekDate:[C(u.chooseData[0]),C(u.chooseData[1])]}),o("select",ee),(e.isAutoBackFill||!e.poppable)&&B()}}},C=I=>{let[K,W,Z]=I;return{date:I,monthWeekNum:ne.getMonthWeek(K,W,Z,e.firstDayOfWeek),yearWeekNum:ne.getYearWeek(K,W,Z,e.firstDayOfWeek)}},V=I=>{const K=I=="prev"?u.monthsData[0]:u.monthsData[u.monthsData.length-1];let W=parseInt(K.curData[0]),Z=parseInt(K.curData[1].toString().replace(/^0/,""));switch(I){case"prev":Z==1&&(W-=1),Z=Z==1?12:--Z;break;case"next":Z==12&&(W+=1),Z=Z==12?1:++Z;break}return[W+"",ne.getNumTwoBit(Z),ne.getMonthDays(String(W),String(Z))+""]},M=(I,K,W)=>{let{year:Z,month:O}=W;return K=="prev"&&I>=7&&(I-=7),Array.from(Array(I),(G,Q)=>({day:String(Q+1),type:K,year:Z,month:O}))},L=(I,K,W,Z)=>{I=I-e.firstDayOfWeek;let{year:O,month:G}=W;return K=="prev"&&I>=7&&(I-=7),Array.from(Array(Z),(ee,_)=>({day:String(_+1),type:K,year:O,month:G})).slice(Z-I)},$=(I,K)=>{const W=ne.getMonthPreDay(+I[0],+I[1]);let Z=Number(I[1])-1,O=Number(I[0]);Z<=0&&(Z=12,O+=1);const G=ne.getMonthDays(String(I[0]),String(I[1])),Q=ne.getMonthDays(O+"",Z+""),ee={year:I[0],month:I[1]},_={curData:I,title:a("monthTitle",{year:ee.year,month:ee.month}),monthData:[...L(W,"prev",{month:String(Z),year:String(O)},Q),...M(G,"curr",ee)],cssHeight:0,cssScrollHeight:0},oe=_.monthData.length>35?6:5;_.cssHeight=Ad+Td*oe;let le=0;u.monthsData.length>0&&(le=u.monthsData[u.monthsData.length-1].cssScrollHeight+u.monthsData[u.monthsData.length-1].cssHeight),_.cssScrollHeight=le,K=="next"?(!u.endData||!ne.compareDate(`${u.endData[0]}-${u.endData[1]}-${ne.getMonthDays(u.endData[0],u.endData[1])}`,`${I[0]}-${I[1]}-${I[2]}`))&&u.monthsData.push(_):!u.startData||!ne.compareDate(`${I[0]}-${I[1]}-${I[2]}`,`${u.startData[0]}-${u.startData[1]}-01`)?u.monthsData.unshift(_):u.unLoadPrev=!0},E=()=>{let I=e.startDate?e.startDate:ne.getDay(0),K=e.endDate?e.endDate:ne.getDay(365);u.propStartDate=I,u.propEndDate=K,u.startData=p(I),u.endData=p(K),(e.defaultValue||Array.isArray(e.defaultValue)&&e.defaultValue.length>0)&&(u.currDate=e.type!=="one"?[...e.defaultValue]:e.defaultValue);const W={year:Number(u.startData[0]),month:Number(u.startData[1])},Z={year:Number(u.endData[0]),month:Number(u.endData[1])};let O=Z.month-W.month;Z.year-W.year>0&&(O=O+12*(Z.year-W.year)),O<=0&&(O=1),$(u.startData,"next");let G=1;do $(V("next"),"next");while(G++<O);if(u.monthsNum=O,e.type=="range"&&Array.isArray(u.currDate))u.currDate.length>0&&(I&&ne.compareDate(u.currDate[0],I)&&u.currDate.splice(0,1,I),K&&ne.compareDate(K,u.currDate[1])&&u.currDate.splice(1,1,K),u.defaultData=[...p(u.currDate[0]),...p(u.currDate[1])]);else if(e.type=="multiple"&&Array.isArray(u.currDate)){if(u.currDate.length>0){let Q=[],ee={};u.currDate.forEach(_=>{I&&!ne.compareDate(_,I)&&K&&!ne.compareDate(K,_)&&(Object.hasOwnProperty.call(ee,_)||(Q.push(_),ee[_]=_))}),u.currDate=[...Q],u.defaultData=[...p(Q[0])]}}else if(e.type=="week"&&Array.isArray(u.currDate)){if(u.currDate.length>0){let[Q,ee,_]=p(u.currDate[0]),oe=ne.getWeekDate(Q,ee,_,e.firstDayOfWeek);u.currDate=oe,I&&ne.compareDate(u.currDate[0],I)&&u.currDate.splice(0,1,I),K&&ne.compareDate(K,u.currDate[1])&&u.currDate.splice(1,1,K),u.defaultData=[...p(u.currDate[0]),...p(u.currDate[1])]}}else u.currDate&&(I&&ne.compareDate(u.currDate,I)?u.currDate=I:K&&!ne.compareDate(u.currDate,K)&&(u.currDate=K),u.defaultData=[...p(u.currDate)])};Te({scrollToDate:I=>{ne.compareDate(I,u.propStartDate)?I=u.propStartDate:ne.compareDate(I,u.propEndDate)||(I=u.propEndDate);let K=p(I);u.monthsData.forEach((W,Z)=>{if(W.title==a("monthTitle",{year:K[0],month:K[1]})&&c.value){let O=u.monthsData[Z].cssScrollHeight-c.value.scrollTop;if(e.toDateAnimation){let G=0,Q=setInterval(()=>{if(G++,c.value){let ee=O/10;c.value.scrollTop=c.value.scrollTop+ee}G>=10&&(clearInterval(Q),c.value&&(c.value.scrollTop=u.monthsData[Z].cssScrollHeight))},40)}else c.value.scrollTop=u.monthsData[Z].cssScrollHeight}})},initPosition:()=>{c?.value&&(c.value.scrollTop=u.monthsData[u.currentIndex].cssScrollHeight)},doLayout:()=>{let I=0,K=0;u.defaultData.length>0&&u.monthsData.forEach((O,G)=>{O.title==a("monthTitle",{year:u.defaultData[0],month:u.defaultData[1]})&&(I=G),(e.type=="range"||e.type=="week")&&O.title==a("monthTitle",{year:u.defaultData[3],month:u.defaultData[4]})&&(K=G)}),R(u.monthsNum,I),u.currentIndex=I,u.yearMonthTitle=u.monthsData[u.currentIndex].title,u.defaultData.length>0&&(u.isRange?(D({day:u.defaultData[2],type:"curr"},u.monthsData[u.currentIndex],!0),D({day:u.defaultData[5],type:"curr"},u.monthsData[K],!0)):e.type=="week"?D({day:u.defaultData[2],type:"curr"},u.monthsData[u.currentIndex],!0):e.type=="multiple"?[...u.currDate].forEach(O=>{let G=p(O),Q=u.currentIndex;u.monthsData.forEach((ee,_)=>{ee.title==a("monthTitle",{year:G[0],month:G[1]})&&(Q=_)}),D({day:G[2],type:"curr"},u.monthsData[Q],!0)}):D({day:u.defaultData[2],type:"curr"},u.monthsData[u.currentIndex],!0));let W=u.monthsData[u.monthsData.length-1],Z=W.cssHeight+W.cssScrollHeight;je(()=>{c?.value&&d?.value&&m?.value&&(h.value=c.value.clientHeight,d.value.style.height=`${Z}px`,c.value.scrollTop=u.monthsData[u.currentIndex].cssScrollHeight)}),u.avgHeight=Math.floor(Z/(u.monthsNum+1))}});const R=(I,K)=>{I>=3?K>0&&K<I?u.defaultRange=[K-1,K+3]:K==0?u.defaultRange=[K,K+4]:K==I&&(u.defaultRange=[K-2,K+2]):u.defaultRange=[0,I+2];let W=u.monthsData[u.defaultRange[0]].cssScrollHeight;u.translateY=W},Y=(I,K)=>(e.type=="range"||e.type=="week")&&I.type=="curr"&&T(I,K)=="fox-calendar__day--active",U=(I,K)=>Y(I,K)&&k(N(I,K)),P=(I,K)=>u.currDate.length>=2&&S(N(I,K))?Y(I,K):!1,z=()=>{if(u.currDate.length>=2)return ne.isEqual(u.currDate[0],u.currDate[1])},j=I=>{const K=`${I.year}-${I.month}-${Number(I.day)<10?"0"+I.day:I.day}`;return ne.isEqual(K,ne.date2Str(new Date))},q=I=>{if(u.monthsData.length<=1)return;const K=I.target.scrollTop;let W=Math.floor(K/u.avgHeight);if(W==0)K>=u.monthsData[W+1].cssScrollHeight&&(W+=1);else if(W>0&&W<u.monthsNum-1)K>=u.monthsData[W+1].cssScrollHeight&&(W+=1),K<u.monthsData[W].cssScrollHeight&&(W-=1);else{const Z=Math.round(K+h.value);Z<u.monthsData[W].cssScrollHeight+u.monthsData[W].cssHeight&&K>u.monthsData[W-1].cssScrollHeight&&(W-=1),W+1<=u.monthsNum&&Z>=u.monthsData[W+1].cssScrollHeight+u.monthsData[W+1].cssHeight&&(W+=1),W>=1&&K<u.monthsData[W-1].cssScrollHeight&&(W-=1)}u.currentIndex!==W&&(u.currentIndex=W,R(u.monthsNum,W)),u.yearMonthTitle=u.monthsData[W].title},F=()=>{u.chooseData.splice(0),u.monthsData.splice(0),E()};return E(),t.watch(()=>e.defaultValue,I=>{I&&e.poppable&&F()}),{weeks:i,compConthsData:y,showTopBtn:g,topInfo:v,bottomInfo:b,rangeTip:z,mothsViewScroll:q,getClass:T,isStartTip:U,isEndTip:P,chooseDay:D,isCurrDay:j,confirm:B,months:c,...t.toRefs(u),...t.toRefs(e),...r,monthsPanel:d,weeksPanel:f,viewArea:m}}}),xd={class:"fox-calendar__header"},Id={key:0,class:"fox-calendar__header-title"},qd={key:1,class:"fox-calendar__header-slot"},Md={key:2,class:"fox-calendar__header-subtitle"},zd={class:"fox-calendar__weekdays",ref:"weeksPanel"},Ld={class:"fox-calendar__panel",ref:"monthsPanel"},Pd={class:"fox-calendar__month-title"},Rd={class:"fox-calendar__days"},Fd=["onClick"],Od={class:"fox-calendar__day-value"},Kd={key:0,class:"fox-calendar__day-tips fox-calendar__day-tips--top"},Ud={key:1,class:"fox-calendar__day-tips fox-calendar__day-tips--bottom"},Hd={key:2,class:"fox-calendar__day-tips--curr"},jd={key:4,class:"fox-calendar__day-tip"},Wd={key:0,class:"fox-calendar__footer"};function Yd(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(["fox-calendar",{"fox-calendar--nopop":!e.poppable,"fox-calendar--nofooter":e.isAutoBackFill}])},[t.createElementVNode("view",xd,[e.showTitle?(t.openBlock(),t.createElementBlock("view",Id,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.showTopBtn?(t.openBlock(),t.createElementBlock("view",qd,[t.renderSlot(e.$slots,"btn")])):t.createCommentVNode("",!0),e.showSubTitle?(t.openBlock(),t.createElementBlock("view",Md,t.toDisplayString(e.yearMonthTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("view",zd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.weeks,(s,i)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__weekday",key:i},t.toDisplayString(s),1))),128))],512)]),t.createElementVNode("view",{class:"fox-calendar__content",ref:"months",onScroll:o[0]||(o[0]=(...s)=>e.mothsViewScroll&&e.mothsViewScroll(...s))},[t.createElementVNode("view",Ld,[t.createElementVNode("view",{class:"fox-calendar__body",ref:"viewArea",style:t.normalizeStyle({transform:`translateY(${e.translateY}px)`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.compConthsData,(s,i)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__month",key:i},[t.createElementVNode("view",Pd,t.toDisplayString(s.title),1),t.createElementVNode("view",Rd,[t.createElementVNode("view",{class:t.normalizeClass(["fox-calendar__days-item",e.type==="range"?"fox-calendar__days-item--range":""])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.monthData,(c,d)=>(t.openBlock(),t.createElementBlock("view",{key:d,class:t.normalizeClass(["fox-calendar__day",e.getClass(c,s)]),onClick:f=>e.chooseDay(c,s)},[t.createElementVNode("view",Od,[t.renderSlot(e.$slots,"day",{date:c.type=="curr"?c:""},()=>[t.createTextVNode(t.toDisplayString(c.type=="curr"?c.day:""),1)])]),e.topInfo?(t.openBlock(),t.createElementBlock("view",Kd,[t.renderSlot(e.$slots,"top-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),e.bottomInfo?(t.openBlock(),t.createElementBlock("view",Ud,[t.renderSlot(e.$slots,"bottom-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),!e.bottomInfo&&e.showToday&&e.isCurrDay(c)?(t.openBlock(),t.createElementBlock("view",Hd,t.toDisplayString(e.today),1)):t.createCommentVNode("",!0),e.isStartTip(c,s)?(t.openBlock(),t.createElementBlock("view",{key:3,class:t.normalizeClass(["fox-calendar__day-tip",{"fox-calendar__day-tips--top":e.rangeTip()}])},t.toDisplayString(e.startText),3)):t.createCommentVNode("",!0),e.isEndTip(c,s)?(t.openBlock(),t.createElementBlock("view",jd,t.toDisplayString(e.endText),1)):t.createCommentVNode("",!0)],10,Fd))),128))],2)])]))),128))],4)],512)],544),e.poppable&&!e.isAutoBackFill?(t.openBlock(),t.createElementBlock("view",Wd,[t.createElementVNode("view",{class:"fox-calendar__confirm",onClick:o[1]||(o[1]=(...s)=>e.confirm&&e.confirm(...s))},t.toDisplayString(e.confirmText),1)])):t.createCommentVNode("",!0)],2)}const _a=J(Dd,[["render",Yd]]),Xd=e=>!!(!e||typeof e=="string"&&e.length==0||Array.isArray(e)&&e.length==0),Sn={type:{type:String,default:"one"},isAutoBackFill:{type:Boolean,default:!1},toDateAnimation:{type:Boolean,default:!0},poppable:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showSubTitle:{type:Boolean,default:!0},visible:{type:Boolean,default:!1},showToday:{type:Boolean,default:!0},title:{type:String,default:""},confirmText:{type:String,default:""},startText:{type:String,default:""},endText:{type:String,default:""},defaultValue:{type:[String,Array]},startDate:{type:String},endDate:{type:String},firstDayOfWeek:{type:Number,default:0,validator:e=>e>=0&&e<=6}},{create:Qd}=X("calendar"),Gd=Qd({components:{[_a.name]:_a,[ce.name]:ce},props:{...Sn},emits:["choose","close","update:visible","select"],setup(e,{emit:o,slots:l}){const n=t.computed(()=>l.btn),a=t.computed(()=>l["top-info"]),r=t.computed(()=>l.day),s=t.computed(()=>l["bottom-info"]),i=t.ref(null),c=v=>{i.value?.scrollToDate(v)},d=()=>{i.value?.initPosition()};t.watch(()=>e.visible,v=>{v&&t.nextTick(()=>{i.value?i.value.doLayout():setTimeout(()=>{i.value&&i.value.doLayout()},250)})}),Te({scrollToDate:c,initPosition:d});const f=()=>{o("update:visible",!1)},m=()=>{o("close"),o("update:visible",!1)};return{closePopup:()=>{m()},update:f,close:m,select:v=>{o("select",v)},choose:v=>{m(),o("choose",v)},calendarRef:i,showTopBtn:n,topInfo:a,dayInfo:r,bottomInfo:s}}});function Zd(e,o,l,n,a,r){const s=t.resolveComponent("fox-calendar-pane"),i=t.resolveComponent("fox-popup");return e.poppable?(t.openBlock(),t.createBlock(i,t.mergeProps({key:0,visible:e.visible,position:"bottom",round:"",closeable:""},e.$attrs,{onClickOverlay:e.closePopup,onClickCloseIcon:e.closePopup,style:{height:"85vh"}}),{default:t.withCtx(()=>[t.createVNode(s,{ref:"calendarRef",type:e.type,"is-auto-back-fill":e.isAutoBackFill,poppable:e.poppable,title:e.title,"default-value":e.defaultValue,"start-date":e.startDate,"end-date":e.endDate,onUpdate:e.update,onClose:e.close,onChoose:e.choose,onSelect:e.select,"confirm-text":e.confirmText,"start-text":e.startText,"end-text":e.endText,"show-today":e.showToday,"show-title":e.showTitle,"show-sub-title":e.showSubTitle,"to-date-animation":e.toDateAnimation,"first-day-of-week":e.firstDayOfWeek},t.createSlots({_:2},[e.showTopBtn?{name:"btn",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"btn")]),key:"0"}:void 0,e.dayInfo?{name:"day",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"day",{date:c.date})]),key:"1"}:void 0,e.topInfo?{name:"top-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"top-info",{date:c.date})]),key:"2"}:void 0,e.bottomInfo?{name:"bottom-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"bottom-info",{date:c.date})]),key:"3"}:void 0]),1032,["type","is-auto-back-fill","poppable","title","default-value","start-date","end-date","onUpdate","onClose","onChoose","onSelect","confirm-text","start-text","end-text","show-today","show-title","show-sub-title","to-date-animation","first-day-of-week"])]),_:3},16,["visible","onClickOverlay","onClickCloseIcon"])):(t.openBlock(),t.createBlock(s,{key:1,type:e.type,"is-auto-back-fill":e.isAutoBackFill,poppable:e.poppable,title:e.title,ref:"calendarRef","confirm-text":e.confirmText,"start-text":e.startText,"end-text":e.endText,"default-value":e.defaultValue,"start-date":e.startDate,"end-date":e.endDate,onUpdate:e.update,onClose:e.close,onChoose:e.choose,onSelect:e.select,"show-title":e.showTitle,"show-sub-title":e.showSubTitle,"to-date-animation":e.toDateAnimation,"show-today":e.showToday,"first-day-of-week":e.firstDayOfWeek},t.createSlots({_:2},[e.showTopBtn?{name:"btn",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"btn")]),key:"0"}:void 0,e.dayInfo?{name:"day",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"day",{date:c.date})]),key:"1"}:void 0,e.topInfo?{name:"top-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"top-info",{date:c.date})]),key:"2"}:void 0,e.bottomInfo?{name:"bottom-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"bottom-info",{date:c.date})]),key:"3"}:void 0]),1032,["type","is-auto-back-fill","poppable","title","confirm-text","start-text","end-text","default-value","start-date","end-date","onUpdate","onClose","onChoose","onSelect","show-title","show-sub-title","to-date-animation","show-today","first-day-of-week"]))}const Io=J(Gd,[["render",Zd]]),Zo=(e,o)=>{let l;return Fe(e)?l=e:typeof e=="string"&&ge(e)>0?l=ne.parser(e,o):l=new Date,l},it=(e,o,l)=>(Fe(o)||(o=new Date),ne.format(o,l)),ct=e=>{let o=`${e.getFullYear()}`,l=`${e.getMonth()+1}`,n=`${e.getDate()}`,a=ne.date2Str(e),r=ne.getWhatDay(e.getFullYear(),e.getMonth()+1,e.getDate());return[o,l,n,a,r]};function Jd(e,o,l,n,{CloseIcon:a,MarkIcon:r},s=!1){return{props:{...ue,...de,...Sn,modelValue:{type:[String,Date,Array],default:null},rangeSeparator:{type:String,default:"-"},valueFormat:{type:String,default:"YYYY-MM-DD"},format:{type:String,default:"YYYY-MM-DD"},showWeek:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},textAlign:{type:String},clearable:{type:Boolean,default:!0}},emits:["change","update:modelValue","blur","focus","clear"],setup(i,c){const d=Ce(t.computed(()=>i.disabled)),f=Ae(t.computed(()=>i.readonly)),{emitEvent:m}=we({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus"],get validate(){return!d.value&&!f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ae.useFoxI18n(o),y=h(i,["placeholder"]),g=t.ref(!1),v=t.computed(()=>i.type==="range"),b=t.reactive({startDate:null,endDate:null,startArray:[],endArray:[]}),u=()=>{b.startDate!==null&&(b.startDate=null,b.endDate=null,b.startArray=[],b.endArray=[])},p=(q,F="one",I="YYYY-MM-DD")=>{if(Xd(q)){u();return}if(v.value&&Array.isArray(q)&&q.length==2){let K,W;typeof q[0]=="string"?(K=Zo(q[0],I),W=Zo(q[1],I)):(K=q[0],W=q[1]);let Z=ct(K),O=ct(W);(b.startDate===null||b.startDate.getTime()!==K.getTime()||b.endDate?.getTime()!==W.getTime())&&(b.startDate=K,b.startArray=Z,b.endDate=W,b.endArray=O)}else{let K;typeof q=="string"?K=Zo(q,I):K=q;let W=ct(K);(b.startDate===null||b.startDate.getTime()!==K.getTime())&&(b.startDate=K,b.startArray=W)}};p(i.modelValue,i.type,i.valueFormat),t.watch(()=>i.modelValue,q=>{p(q,i.type,i.valueFormat)});const k=t.computed(()=>{if(b.startDate===null)return"";if(v.value){let q=it(i,b.startDate,i.format),F=it(i,b.endDate,i.format);return`${q} ${i.rangeSeparator} ${F}`}else{let q=it(i,b.startDate,i.format);return i.showWeek&&(q=`${q} ${b.startArray[4]}`),q}}),S=t.computed(()=>{if(b.startDate===null)return null;if(v.value){let q=ne.date2Str(b.startDate),F=ne.date2Str(b.endDate??new Date);return[q,F]}else return ne.date2Str(b.startDate)}),w="fox-input-item",N=t.computed(()=>({[w]:!0,[`${w}__disabled`]:d.value})),T=Ne(t.computed(()=>i.textAlign),"textAlign"),B=t.computed(()=>{const q={};return T.value&&(q["text-align"]=T.value),q}),D=t.ref(!1),C=()=>{f.value||d.value||(D.value=!0)},V=q=>{D.value=q},M=q=>{if(q){if(v.value&&Array.isArray(q)){let F=q[0],I=me(F[0]),K=me(F[1]),W=me(F[2]),Z=new Date(I,K-1,W),O=q[1];I=me(O[0]),K=me(O[1]),W=me(O[2]);let G=new Date(I,K-1,W);if(b.startDate=Z,b.startArray=ct(Z),b.endDate=G,b.endArray=ct(G),i.valueFormat){let Q=it(i,Z,i.valueFormat),ee=it(i,G,i.valueFormat);m("update:modelValue",[Q,ee],{})}else m("update:modelValue",[Z,G],{})}else{let F=q,I=me(F[0]),K=me(F[1]),W=me(F[2]),Z=new Date(I,K-1,W);if(b.startDate=Z,b.startArray=ct(Z),i.valueFormat){let O=it(i,Z,i.valueFormat);m("update:modelValue",O,{})}else m("update:modelValue",Z,{})}m("change",q,{})}},L=q=>{let I=q.target.value;g.value=!0,m("focus",I,q)},$=q=>{setTimeout(()=>{g.value=!1},0);let I=q.target.value;i.maxLength&&I.length>Number(i.maxLength)&&(I=I.slice(0,Number(i.maxLength))),m("blur",I,q)},E=t.computed(()=>({[`${w}__append`]:!0})),x=t.computed(()=>ge(i.unit)>0),A=t.computed(()=>ge(i.unit)>0&&!g.value),H=t.computed(()=>({hidden:!A.value})),R=q=>{u(),m("update:modelValue",null,q),m("change","",q),m("clear","")},Y=t.computed(()=>i.clearable&&!d.value&&!f.value),U=t.computed(()=>{let q=ge(k.value)>0;return i.clearable&&q&&g.value}),P=q=>{U.value?R(q):C()},z=t.computed(()=>U.value&&Y.value?a:r),j=t.computed(()=>({action:!0}));return()=>{const q={class:N.value,style:B.value,type:"text",maxlength:i.maxLength,placeholder:y.placeholder.value,readonly:!0,unselectable:"on",value:k.value,onClick:C,onFocus:L,onBlur:$};s&&(q.disabled=!0);const F=[],I=t.h("input",q);F.push(I);const K=[],W={class:["action-icon"]},Z=t.h(z.value,W),O={class:j.value,onClick:P},G=t.h("view",O,{default:()=>[Z]});if(K.push(G),x.value){const Ze=t.h("view",{class:H.value},[i.unit]);K.push(Ze)}const Q={class:E.value},ee=t.h("view",Q,{default:()=>K});F.push(ee);const _={default:()=>F};_.label=c.slots.default,_.prepend=c.slots.prepend,_.append=c.slots.append,_.fixedPreTip=c.slots.fixedPreTip,_.fixedTip=c.slots.fixedTip;const oe=he(i,Sn);oe.visible=D.value,oe["onUpdate:visible"]=V,oe["default-value"]=S.value,oe.onChoose=M;const le={};if(c.slots.btn){const Ze=c.slots.btn();le.btn=()=>Ze}c.slots.day&&(le.day=c.slots.day),c.slots.topInfo&&(le.topInfo=c.slots.topInfo),c.slots.bottomInfo&&(le.bottomInfo=c.slots.bottomInfo);const $e=t.h(l,oe,le);_.hide=()=>[$e];const ve=he(i,de,ue);return t.h(n,ve,_)}}}}const{componentName:_d,create:ef,scope:tf}=X("calendar-item"),_n=ef(Jd(_d,tf,Io,be,{CloseIcon:te.CircleClose,MarkIcon:te.Date},!1)),of={readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},shape:{type:String,default:"round"},label:{type:[String,Number,Boolean],default:""},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}};function nf(e,{CheckNormal:o,Checked:l}){return{props:{...of},setup(n,{emit:a,slots:r}){let s=t.inject("parent",null);const i=t.computed(()=>s.label.value===n.label),c=t.computed(()=>n.disabled?"fox-radio__icon--disable":i.value?"fox-radio__icon":"fox-radio__icon--unchecked"),d=t.computed(()=>s.position),f=()=>{if(i.value){if(r.checkedIcon)return r.checkedIcon();{const v=se(n.iconSize),b=n.checkedIcon??l;return t.h(b,{width:v,height:v,class:c.value})}}else{if(r.icon)return r.icon();{const v=se(n.iconSize),b=n.icon??o;return t.h(b,{width:v,height:v,class:c.value})}}},m=()=>t.h("view",{class:`${e}__label ${n.disabled?`${e}__label--disabled`:""}`},r.default?.()),h=()=>t.h("view",{class:`${e}__button ${i.value&&`${e}__button--active`} ${n.disabled?`${e}__button--disabled`:""}`},r.default?.()),y=()=>{i.value||n.disabled||n.readonly||s.updateValue(n.label)},g=d.value==="left";return()=>t.h("view",{class:`${e} ${e}--${n.shape} ${g?`${e}--reverse`:""}`,onClick:y},[n.shape=="button"?h():g?[m(),f()]:[f(),m()]])}}}const{componentName:lf,create:af}=X("radio"),qo=af(nf(lf,{CheckNormal:te.CheckNormal,Checked:te.CheckChecked})),{componentName:er,create:rf}=X("radio-group"),Mo=rf({props:{modelValue:{type:[Object],default:""},direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},emits:["change","update:modelValue"],setup(e,{emit:o,slots:l}){const n=a=>o("update:modelValue",a);return t.provide("parent",{label:t.readonly(t.computed(()=>e.modelValue)),position:e.textPosition,updateValue:n}),t.watch(()=>e.modelValue,a=>o("change",a)),()=>{const a={};return e.textAlign&&(a["text-align"]=e.textAlign),t.h("view",{class:`${er} ${er}--${e.direction}`,style:a},l.default?.())}}});function tr(e,o,l,n="value"){for(let a=0;a<o.length;a++){let r=o[a];if(n==="text"){if(_t(e,r)===l)return a}else if(n==="item"){if(xe(l,r))return a}else if(Et(e,r)===l)return a}return-1}function _t(e,o){return typeof e.textKey=="string"&&e.textKey.length>0?o[e.textKey]:o.text}function Et(e,o){return typeof e.valueKey=="string"&&e.valueKey.length>0?o[e.valueKey]:o.value}function sf(e,o){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?o[e.disabledKey]:o.disabled??null}function cf(e,o,l){return typeof e.itemOptions=="function"?e.itemOptions(o,l):e.itemOptions}let uf=class{proxy;constructor(o){this.proxy=o}async load(o,l,n){if(Array.isArray(l))return l;if(typeof l=="function")return await l(n);let a=Ge(this.proxy,o);return a===null?(console.error(`${o} component not found api function`),[]):(Be(n)&&t.isReactive(n)&&(n=t.toRaw(n)),await a(l,n))}};function df(){const e=t.getCurrentInstance();return new uf(e.proxy)}function ff(e){return{text:e,value:e}}const or={shape:{type:String,default:"round"},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}},mf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}};function pf(e,o,l,n,a){return{props:{...ue,...de,...or,...mf,source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},modelValue:{type:[Number,String,Boolean,Object],default:""}},emits:["change","update:modelValue"],setup(r,s){const i=Ae(t.computed(()=>r.readonly)),c=Ce(t.computed(()=>r.disabled)),d=Ne(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:f}=we({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus"],get validate(){return!c.value||!i.value}},r.prop??s.attrs.name),m=df(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([u,p])=>{if(u){const k=await m.load("radio",u,p);if(k.length>0)if(typeof k[0]=="string"){const N=k.map(T=>ff(T));h.value=N}else h.value=k}},{immediate:!0});let y=t.ref(-1);t.watch([()=>r.modelValue,()=>h.value],async([u,p])=>{y.value=tr(r,p,u,r.valueType)},{deep:!0});const g=t.computed(()=>{if(!r.source)return r.modelValue;if(y.value===-1)return null;const u=h.value[y.value];return Et(r,u)}),v=u=>{let p=null,k=null;if(h.value.length>0){let S=tr(r,h.value,u,"value");y.value=S,S>=0&&(k=h.value[S],r.valueType==="text"?p=_t(r,k):r.valueType==="item"?p=k:p=Et(r,k))}else p=u;f("update:modelValue",p),f("change",p,k)},b=()=>{let u=null,p=null;if(h.value.length>0&&y.value!==-1){let k=h.value[y.value];r.valueType==="text"?u=_t(r,k):r.valueType==="item"?u=k:u=Et(r,k)}f("update:modelValue",u),f("change",u,p)};if(Te({clear(){y.value!==-1&&(y.value=-1,b())}}),r.source){const u=()=>{const p=[],k=he(r,or);return h.value.forEach((S,w)=>{const N=Et(r,S),T=sf(r,S);let B={...k,label:N,disabled:T};const D=cf(r,S,w);B={...B,...D},c.value&&(B.disabled=!0),i.value&&(B.readonly=!0);const C={};if(s.slots.icon&&(C.icon=s.slots.icon),s.slots.checkedIcon&&(C.checkedIcon=s.slots.checkedIcon),typeof s.slots.text=="function"){const M=s.slots.text(S);C.default=()=>[M]}else{const M=_t(r,S);C.default=()=>M}let V=t.h(a,B,C);p.push(V)}),p};return()=>{const p=u(),k={class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:d.value,modelValue:g,"onUpdate:modelValue":v},S=t.h(n,k,{default:()=>p}),w={default:()=>S};w.label=s.slots.default,w.prepend=s.slots.prepend,w.append=s.slots.append,w.fixedPreTip=s.slots.fixedPreTip,w.fixedTip=s.slots.fixedTip;const N=he(r,de,ue);return t.h(l,N,w)}}else return()=>{const u=s.slots.options?.()??[];return t.h(n,{class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:d.value,modelValue:g,"update:modelValue":v},{default:()=>u})}}}}const{componentName:hf,create:gf,scope:yf}=X("radio-item"),el=gf(pf(hf,yf,be,Mo,qo)),vf=(e,{CheckNormal:o,Checked:l,Indeterminate:n})=>({props:{modelValue:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},textPosition:{type:String,default:"right"},icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},label:{type:[String,Number,Boolean],default:""},indeterminate:{type:Boolean,default:!1},shape:{type:String,default:"round"}},emits:["change","update:modelValue"],setup(a,{emit:r,slots:s}){const i=t.inject("parent",null),c=t.reactive({partialSelect:a.indeterminate});t.watch(()=>a.indeterminate,k=>{c.partialSelect=k});const d=t.computed(()=>!!i),f=t.computed(()=>d.value?i.value.value.includes(a.label):!!a.modelValue),m=t.computed(()=>d.value?i.position:a.textPosition),h=t.computed(()=>a.disabled?"fox-checkbox__icon--disable":c.partialSelect?"fox-checkbox__icon--indeterminate":f.value?"fox-checkbox__icon":"fox-checkbox__icon--unchecked");let y="";const g=(k,S)=>{y="click",r("update:modelValue",k),r("change",k,S)};t.watch(()=>a.modelValue,k=>{y=="click"?y="":r("change",k)});const v=()=>{if(c.partialSelect){if(s.indeterminateIcon)return s.indeterminateIcon();{const k=se(a.iconSize),S=a.indeterminateIcon??n;return t.h(S,{width:k,height:k,class:h.value})}}else if(f.value){if(s.checkedIcon)return s.checkedIcon();{const k=se(a.iconSize),S=a.checkedIcon??l;return t.h(S,{width:k,height:k,class:h.value})}}else{if(s.icon)return s.icon();{const k=se(a.iconSize),S=a.icon??o;return t.h(S,{width:k,height:k,class:h.value})}}},b=()=>t.h("view",{class:`${e}__label ${a.disabled?`${e}__label--disabled`:""}`},s.default?.()),u=()=>t.h("view",{class:`${e}__button ${f.value&&`${e}__button--active`} ${a.disabled?`${e}__button--disabled`:""}`},s.default?.()),p=k=>{if(!(a.disabled||a.readonly)){if(f.value&&c.partialSelect){c.partialSelect=!1,g(f.value,s.default?.()[0].children);return}if(g(!f.value,s.default?.()[0].children),d.value){const S=i.value.value,w=i.max.value,{label:N}=a,T=S.indexOf(N);T>-1?S.splice(T,1):T<=-1&&(S.length<w||!w)&&S.push(N),i.updateValue(S)}}};return t.onMounted(()=>{d.value&&i.link(t.getCurrentInstance())}),t.onBeforeUnmount(()=>{d.value&&i.unlink(t.getCurrentInstance())}),()=>t.h("view",{class:`${e} ${e}--${a.shape} ${m.value==="left"?`${e}--reverse`:""}`,onClick:p},[a.shape=="button"?u():[v(),b()]])}}),{componentName:kf,create:bf}=X("checkbox"),zo=bf(vf(kf,{CheckNormal:te.CheckNormal,Checked:te.Checked,Indeterminate:te.CheckDisabled})),{create:Sf,componentName:nr}=X("checkbox-group"),Lo=Sf({props:{modelValue:{type:Array,default:()=>[]},direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},emits:["change","update:modelValue"],setup(e,{slots:o,emit:l}){const n=t.reactive({children:[]}),a=d=>{d.proxy&&n.children.push(d.proxy)},r=d=>{d.proxy&&(n.children=n.children.filter(f=>f!==d.proxy))},s=d=>{l("update:modelValue",d),l("change",d)},i=d=>{const f=[];d&&n.children.forEach(m=>{m?.disabled||f.push(m?.label)}),l("update:modelValue",f)},c=()=>{const d=n.children.filter(f=>f?.disabled?!1:!e.modelValue.includes(f.label)).map(f=>f.label);l("update:modelValue",d)};return t.provide("parent",{value:t.computed(()=>Array.isArray(e.modelValue)?e.modelValue:[]),position:e.textPosition,max:t.computed(()=>e.max),updateValue:s,link:a,unlink:r}),t.watch(()=>e.modelValue,d=>{l("change",d)}),Te({toggleAll:i,toggleReverse:c}),()=>{const d={};return e.textAlign&&(d["text-align"]=e.textAlign),t.h("view",{class:`${nr} ${nr}--${e.direction}`,style:d},o.default?.())}}});function lr(e,o,l,n="value"){for(let a=0;a<o.length;a++){let r=o[a];if(n==="text"){if(Cn(e,r)===l)return a}else if(n==="item"){if(xe(l,r))return a}else if(eo(e,r)===l)return a}return-1}function Cn(e,o){return typeof e.textKey=="string"&&e.textKey.length>0?o[e.textKey]:o.text}function eo(e,o){return typeof e.valueKey=="string"&&e.valueKey.length>0?o[e.valueKey]:o.value}function Cf(e,o){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?o[e.disabledKey]:o.disabled??null}function wf(e,o,l){return typeof e.itemOptions=="function"?e.itemOptions(o,l):e.itemOptions}let Nf=class{proxy;constructor(o){this.proxy=o}async load(o,l,n){if(Array.isArray(l))return l;if(typeof l=="function")return await l(n);let a=Ge(this.proxy,o);return a===null?(console.error(`${o} component not found api function`),[]):(Be(n)&&t.isReactive(n)&&(n=t.toRaw(n)),await a(l,n))}};function Bf(){const e=t.getCurrentInstance();return new Nf(e.proxy)}function Vf(e){return{text:e,value:e}}const Af={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},ar={icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},shape:{type:String,default:"round"}};function Tf(e,o,l,n,a){return{props:{...Af,...ar,...ue,...de,source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},modelValue:{type:[Array,String],default:[]}},emits:["change","update:modelValue"],setup(r,s){const i=Ce(t.computed(()=>r.disabled)),c=Ce(t.computed(()=>r.readonly)),d=Ne(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:f}=we({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus"],get validate(){return!i.value||!c.value}},r.prop??s.attrs.name),m=Bf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([u,p])=>{if(u){const k=await m.load("checkbox",u,p);if(k.length>0)if(typeof k[0]=="string"){const N=k.map(T=>Vf(T));h.value=N}else h.value=k}},{immediate:!0});const y=t.ref([]);t.watch([()=>r.modelValue,()=>h.value],async([u,p])=>{const k=[];Array.isArray(u)&&u.forEach(S=>{let w=lr(r,p,S,r.valueType);w!==-1&&k.push(w)}),!xe(k,y.value)&&(y.value=k)},{deep:!0});const g=t.computed(()=>{if(!r.source)return r.modelValue;let u=[];return y.value.forEach(p=>{let k=h.value[p];u.push(eo(r,k))}),u}),v=u=>{let p=[],k=[];if(h.value.length>0){const S=[];Array.isArray(u)&&u.forEach(w=>{let N=lr(r,h.value,w,"value");N!==-1&&S.push(N);const T=h.value[N];k.push(T),r.valueType==="text"?p.push(Cn(r,T)):r.valueType==="item"?p.push(T):p.push(eo(r,T))}),y.value=S}else p=u;f("update:modelValue",p),f("change",p,k)},b=t.ref();if(Te({toggleAll:u=>{b.value.toggleAll(u)},toggleReverse:()=>{b.value.toggleReverse()}}),r.source){const u=()=>{const p=[],k=he(r,ar);return h.value.forEach((S,w)=>{const N=eo(r,S),T=Cf(r,S);let B={...k,label:N,disabled:T};const D=wf(r,S,w);B={...B,...D},i.value&&(B.disabled=!0),c.value&&(B.readonly=!0);const C={};if(s.slots.icon&&(C.icon=s.slots.icon),s.slots.checkedIcon&&(C.checkedIcon=s.slots.checkedIcon),s.slots.indeterminateIcon&&(C.indeterminateIcon=s.slots.indeterminateIcon),typeof s.slots.text=="function"){const M=s.slots.text(S);C.default=()=>[M]}else{const M=Cn(r,S);C.default=()=>M}let V=t.h(a,B,C);p.push(V)}),p};return()=>{const p=u(),k={class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,modelValue:g.value,"onUpdate:modelValue":v},S=t.h(n,k,{default:()=>p}),w={default:()=>S};w.label=s.slots.default,w.prepend=s.slots.prepend,w.append=s.slots.append,w.fixedPreTip=s.slots.fixedPreTip,w.fixedTip=s.slots.fixedTip;const N=he(r,de,ue);return t.h(l,N,w)}}else return()=>{const u=s.slots.options?.()??[];return t.h("view",{class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,textAlign:d.value,modelValue:g,"onUpdate:modelValue":v},{default:()=>u})}}}}const{componentName:$f,create:Ef,scope:Df}=X("checkbox-item"),tl=Ef(Tf($f,Df,be,Lo,zo)),wn={modelValue:{type:[String,Number,Boolean],default:!1},disable:{type:Boolean,default:!1},activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[String,Number,Boolean],default:!0},inactiveValue:{type:[String,Number,Boolean],default:!1},loading:{type:Boolean,default:!1},name:{type:String,default:"loading1"},size:{type:[String,Number],default:"12px"},color:{type:String,default:""}},{componentName:xf,create:If}=X("switch"),qf=If({components:{Loading1:te.Loading1},props:{...wn},emits:["change","update:modelValue","update:loading"],setup(e,{emit:o}){const l=t.computed(()=>e.modelValue===e.activeValue),n=t.computed(()=>{const i=xf;return{[i]:!0,[l.value?"fox-switch-open":"fox-switch-close"]:!0,[`${i}-disable`]:e.disable,[`${i}-base`]:!0}}),a=t.computed(()=>({backgroundColor:l.value?e.activeColor:e.inactiveColor}));let r="";const s=i=>{if(e.disable||e.loading)return;r="click";const c=l.value?e.inactiveValue:e.activeValue;o("update:modelValue",c),o("change",c,i)};return t.watch(()=>e.modelValue,i=>{r=="click"?r="":o("change",i)}),{classes:n,style:a,isActive:l,onClick:s}}}),Mf={class:"fox-switch-button"};function zf(e,o,l,n,a,r){const s=t.resolveComponent("Loading1");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onClick:o[0]||(o[0]=(...i)=>e.onClick&&e.onClick(...i)),style:t.normalizeStyle(e.style)},[t.createElementVNode("view",Mf,[e.loading?t.renderSlot(e.$slots,"icon",{key:0},()=>[t.createVNode(s,{name:"loading",color:e.activeColor},null,8,["color"])]):t.createCommentVNode("",!0),e.activeText?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.withDirectives(t.createElementVNode("view",{class:"fox-switch-label open"},t.toDisplayString(e.activeText),513),[[t.vShow,e.isActive]]),t.withDirectives(t.createElementVNode("view",{class:"fox-switch-label close"},t.toDisplayString(e.inactiveText),513),[[t.vShow,!e.isActive]])],64)):t.createCommentVNode("",!0)])],6)}const Po=J(qf,[["render",zf]]);function Lf(e,o,l,n){return{props:{...ue,...de,...wn},emits:["change","update:modelValue"],setup(a,r){const s=Ce(t.computed(()=>a.disabled)),i=Ae(t.computed(()=>a.readonly)),{emitEvent:c}=we({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus"],get validate(){return!s.value&&!i.value}},a.prop??r.attrs.name),d=e,f=Ee(a,"modelValue"),m=h=>{f.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const y={...he(a,wn),disabled:s.value,readonly:i.value,value:f.value,"onUpdate:modelValue":m},g=[],v=t.h(n,y);g.push(v);const b={default:()=>g};b.label=r.slots.default,b.fixedPreTip=r.slots.fixedPreTip,b.fixedTip=r.slots.fixedTip;const u=he(a,de,ue);return u["content-class"]=d,t.h(l,u,b)}}}}const{componentName:Pf,create:Rf,scope:Ff}=X("switch-item"),ol=Rf(Lf(Pf,Ff,be,Po));function Of(e,o,l,n){return{props:{...ue,...de,placeholder:{type:String,default:""},textAlign:{type:String},modelValue:{type:[String],required:!1},desc:{type:[String],required:!1},icon:{type:[Object],required:!1},iconSize:{type:[String],required:!1,default:""}},emits:["click","focus","blur"],setup(a,r){const{emitEvent:s}=we({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus"]},a.prop??r.attrs.name),{toLocaleRefs:i}=ae.useFoxI18n(o),c=i(a,["placeholder"]),d=Ce(t.computed(()=>a.disabled)),f=Ae(t.computed(()=>a.readonly)),m=Ee(a,"modelValue"),h=t.computed(()=>({[`${e}`]:!0})),y=t.computed(()=>({[`${e}__main`]:!0,[`${e}__disabled`]:d.value,[`${e}__placeholder`]:!d.value&&ie(m.value)})),g=Ne(t.computed(()=>a.textAlign),"textAlign"),v=t.computed(()=>{const M={};return g.value&&(M["text-align"]=g.value),M}),b=t.computed(()=>!ie(a.modelValue)||r.slots.main?!0:!!ie(a.desc)),u=t.computed(()=>ie(m.value)?c.placeholder.value:m.value),p=t.computed(()=>!ie(a.desc)||r.slots.sub),k=t.computed(()=>({[`${e}__sub`]:!0})),S=t.computed(()=>{const M={};return g.value&&(M["text-align"]=g.value),M}),w=()=>{s("focus",m.value)},N=()=>{s("blur",m.value)},T=t.computed(()=>({[`${e}__append`]:!0})),B=t.computed(()=>ge(a.unit)>0),D=M=>{d.value==!0||f.value==!0||s("click")},C=t.computed(()=>a.icon??l),V=t.computed(()=>({action:!0}));return()=>{const M=[];if(typeof r.slots.content=="function"){const z=r.slots.content();M.push(z)}else{const z=[];if(b.value){const F={tabIndex:0,class:y.value,style:v.value,onFocus:w,onBlur:N,onClick:D};let I=null;r.slots.main?I=t.h("view",F,[r.slots.main(u.value)]):I=t.h("view",F,[u.value]),z.push(I)}if(p.value){const F={tabIndex:0,class:k.value,style:S.value,onFocus:w,onBlur:N,onClick:D};let I=null;r.slots.sub?I=t.h("view",F,[r.slots.sub(a.desc)]):I=t.h("view",F,[a.desc]),z.push(I)}const j={class:h.value},q=t.h("view",j,z);M.push(q)}const L=[],$=se(a.iconSize);let E=r.slots.icon;if(!E){const z={width:$,height:$,class:["action-icon"]};E=t.h(C.value,z)}const x={class:V.value,onClick:D},A=t.h("view",x,{default:()=>[E]});if(L.push(A),B.value){const z=t.h("view",{},[a.unit]);L.push(z)}const H={class:T.value},R=t.h("view",H,{default:()=>L});M.push(R);const Y={default:()=>M};Y.label=r.slots.default,Y.prepend=r.slots.prepend,Y.append=r.slots.append,Y.fixedPreTip=r.slots.fixedPreTip,Y.fixedTip=r.slots.fixedTip;const U=he(a,de,ue);return t.h(n,U,Y)}}}}const{componentName:Kf,create:Uf,scope:Hf}=X("link-item"),nl=Uf(Of(Kf,Hf,te.ArrowRight,be)),Nn={count:{type:[String,Number],default:5},modelValue:{type:[String,Number],default:0},customIcon:{type:Object},size:{type:[String,Number],default:void 0},activeColor:{type:String,default:""},voidColor:{type:String,default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},allowHalf:{type:Boolean,default:!1},touchable:{type:Boolean,default:!0},spacing:{type:[String,Number],default:void 0}},{create:jf,componentName:Wf}=X("rate"),Yf=jf({props:{...Nn},emits:["update:modelValue","change"],setup(e,{emit:o,slots:l}){const n=t.ref([]),a=t.computed(()=>({[Wf]:!0})),r=y=>{o("update:modelValue",y),o("change",y)},s=(y,g)=>{if(e.disabled||e.readonly)return;let v=0;g===1&&e.modelValue===g||(v=g,e.allowHalf&&y==2&&(v-=.5)),r(v)},i=(y,g,v)=>{let b=0;for(let u=g.value.length-1;u>=0;u--){const p=g.value[u];if(y>p.offsetLeft){v?b=u+(y>p.offsetLeft+p.clientWidth/2?1:.5):b=u+1;break}}return b},c=Ke(),d={onTouchStart(y){!e.touchable||e.readonly||c.start(y)},onTouchMove(y){e.touchable&&(c.move(y),c.isHorizontal()&&n.value&&(y.preventDefault(),r(i(c.moveX.value,n,e.allowHalf))))}},f=Math.random().toString(36).slice(-8),m=t.computed(()=>e.customIcon??te.StarFillN);return{classes:a,...d,onClick:s,toPxDesc:fe,renderIcon:(y,g)=>t.h(y,g),rateRefs:n,refRandomId:f,slots:l,customIcon:m}}}),Xf=["id"],Qf={class:"fox-rate-item__icon--full"},Gf={key:0,class:"fox-rate-item__icon--half"},Zf={key:1,class:"fox-rate-item__icon--half"};function Jf(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onTouchstart:o[0]||(o[0]=(...s)=>e.onTouchStart&&e.onTouchStart(...s)),onTouchmove:o[1]||(o[1]=(...s)=>e.onTouchMove&&e.onTouchMove(...s))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Number(e.count),s=>(t.openBlock(),t.createElementBlock("view",{class:"fox-rate-item",key:s,ref_for:!0,ref:"rateRefs",id:"rateRefs-"+e.refRandomId+s,style:t.normalizeStyle(s<Number(e.count)?{marginRight:e.toPxDesc(e.spacing)}:{})},[t.createElementVNode("view",Qf,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:s<=e.modelValue?e.activeColor:e.voidColor})),{class:t.normalizeClass(["fox-rate-item__icon",{"fox-rate-item__icon--disabled":e.disabled||s>e.modelValue}]),onClick:i=>e.onClick(1,s)},null,8,["class","onClick"]))]),e.allowHalf&&Number(e.modelValue)+1>s?(t.openBlock(),t.createElementBlock("view",Gf,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:s<=Number(e.modelValue)+1?e.activeColor:e.voidColor})),{class:"fox-rate-item__icon",onClick:i=>e.onClick(2,s)},null,8,["onClick"]))])):e.allowHalf&&Number(e.modelValue)+1<s?(t.openBlock(),t.createElementBlock("view",Zf,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:e.voidColor})),{class:"fox-rate-item__icon fox-rate-item__icon--disabled",onClick:i=>e.onClick(2,s)},null,8,["onClick"]))])):t.createCommentVNode("",!0)],12,Xf))),128))],34)}const vt=J(Yf,[["render",Jf]]);function _f(e,o,l,n){return{props:{...ue,...de,...Nn},emits:["change","update:modelValue"],setup(a,r){const s=Ce(t.computed(()=>a.disabled)),i=Ae(t.computed(()=>a.readonly)),{emitEvent:c}=we({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus"],get validate(){return!s.value&&!i.value}},a.prop??r.attrs.name),d=e,f=Ee(a,"modelValue"),m=h=>{f.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const y={...he(a,Nn),disabled:s.value,readonly:i.value,value:f.value,"onUpdate:modelValue":m},g=[],v=t.h(n,y);g.push(v);const b={default:()=>g};if(r.slots.default){const k=r.slots.default();b.label=()=>k}const u=he(a,de,ue);return u["content-class"]=d,t.h(l,u,b)}}}}const{componentName:em,create:tm,scope:om}=X("rate-item"),ll=tm(_f(em,om,be,vt)),Bn={poppable:{type:[Boolean],default:!1},modelValue:{type:[Array,Number,Boolean,String],default:[]},visible:{type:[Boolean]},disabled:{type:[Boolean,String],required:!1},source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},subTextKey:{type:String,required:!1,default:"subText"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number]},pageSize:{type:[Number],required:!1,default:10},optionsHeight:{type:[String],required:!1},multiple:{type:[Boolean]},position:{type:[String],default:"bottom"},closeOnClickOverlay:{type:[Boolean],default:!0},title:{type:[String]},confirmText:{type:[String]},loadText:{type:[String]},loadMoreText:{type:[String]},isAutoBackFill:{type:[Boolean]},showHeader:{type:[Boolean],default:!0},showFooter:{type:[Boolean],default:!0},showSearchbar:{type:[Boolean],default:!0},searchKey:{type:String,required:!1,default:"keyword"},seachPlaceholder:{type:String,required:!1},popClass:{type:String,required:!1},popCloseable:{type:Boolean,required:!1,default:!0}};function nm(e,o,l,n="value"){for(let a=0;a<o.length;a++){let r=o[a];if(n==="text"){if(to(e,r)===l)return a}else if(n==="item"){if(xe(l,r))return a}else if(ys(e,r)===l)return a}return-1}function to(e,o){return typeof e.textKey=="string"&&e.textKey.length>0?o[e.textKey]:o.text}function rr(e,o){return typeof e.subTextKey=="string"&&e.subTextKey.length>0?o[e.subTextKey]:o.text}function ys(e,o){return typeof e.valueKey=="string"&&e.valueKey.length>0?o[e.valueKey]:o.value}function lm(e,o){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?o[e.disabledKey]:o.disabled??null}function am(e,o,l){return typeof e.itemOptions=="function"?e.itemOptions(o,l):e.itemOptions}let rm=class{proxy;constructor(o){this.proxy=o}async load(o,l,n,a,r,s,i){if(Array.isArray(l)){let d=l;typeof i=="function"&&(d=d.filter(i));let f=(n-1)*a,m=f+a;m>d.length&&(m=d.length);const h=d.slice(f,m);return{totalSize:d.length,page:h}}if(typeof l=="function")return await Reflect.apply(l,null,[n,a,r,s]);const c=Ge(this.proxy,o);return c===null?(console.error(`${o} component not found api function`),{totalSize:0,page:[]}):(Be(r)&&t.isReactive(r)&&(r=t.toRaw(r)),await Reflect.apply(c,null,[l,n,a,r]))}};function sm(){const e=t.getCurrentInstance();return new rm(e.proxy)}const{componentName:im,create:cm,scope:um}=X("infinite-loading"),dm=cm({props:{modelValue:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!0},threshold:{type:Number,default:200},loadText:{type:String},loadMoreText:{type:String},useCapture:{type:Boolean,default:!1}},emits:["scroll-change","load-more","update:modelValue"],components:{Loading:te.Loading},setup(e,{emit:o,slots:l}){const{toLocaleRefs:n}=ae.useFoxI18n(um),a=n(e,["pullText","loadText","loadMoreText"]),r=t.ref(),s=ls(r),i=t.reactive({beforeScrollTop:0,isInfiniting:!1,y:0,x:0,distance:0}),c=t.computed(()=>({[im]:!0})),d=v=>v?v.offsetTop+d(v.offsetParent):0,f=()=>{let v=0,b=0,u="down";if(s.value==window){const p=In();r.value&&(v=d(r.value)+r.value.offsetHeight-p-window.innerHeight),b=p}else{const{scrollHeight:p,clientHeight:k,scrollTop:S}=s.value;v=p-k-S,b=S}return i.beforeScrollTop>b?u="up":u="down",i.beforeScrollTop=b,o("scroll-change",b),v<=e.threshold&&u=="down"},m=()=>{je(()=>{if(!f()||!e.hasMore||i.isInfiniting)return!1;i.isInfiniting=!0,o("update:modelValue",!0),t.nextTick(()=>o("load-more"))})},h=()=>{s.value&&s.value.addEventListener("scroll",m,e.useCapture)},y=()=>{s.value&&s.value.removeEventListener("scroll",m,e.useCapture)};t.onMounted(()=>{h()}),t.onUnmounted(()=>{y()});const g=t.ref(!1);return t.onActivated(()=>{g.value&&(g.value=!1,h())}),t.onDeactivated(()=>{g.value=!0,y()}),t.watch(()=>e.modelValue,v=>{v||(i.isInfiniting=!1)}),{classes:c,scroller:r,...t.toRefs(i),slots:l,...a}}}),fm={class:"fox-infinite__container"},mm={class:"fox-infinite__bottom"},pm={key:0,class:"fox-infinite__bottom-box"},hm={class:"fox-infinite__bottom-box__text"},gm={class:"fox-infinite__bottom-tips"};function ym(e,o,l,n,a,r){const s=t.resolveComponent("Loading");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),ref:"scroller"},[t.createElementVNode("view",fm,[t.renderSlot(e.$slots,"default")]),t.createElementVNode("view",mm,[e.isInfiniting?(t.openBlock(),t.createElementBlock("view",pm,[t.renderSlot(e.$slots,"loading",{},()=>[t.renderSlot(e.$slots,"loading-icon",{},()=>[t.createVNode(s,{class:"fox-icon-loading fox-infinite__bottom-box__img"})]),t.createElementVNode("view",hm,t.toDisplayString(e.loadText),1)])])):e.hasMore?t.createCommentVNode("",!0):t.renderSlot(e.$slots,"finished",{key:1},()=>[t.createElementVNode("view",gm,t.toDisplayString(e.loadMoreText),1)])])],2)}const Ro=J(dm,[["render",ym]]),{componentName:vm,create:km}=X("button"),bm=km({components:{Loading:te.Loading},props:{color:String,shape:{type:String,default:"round"},plain:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{type:String,default:"default"},size:{type:String,default:"normal"},block:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:o,slots:l}){const{type:n,size:a,shape:r,disabled:s,loading:i,color:c,plain:d,block:f}=t.toRefs(e),m=g=>{!i.value&&!s.value&&o("click",g)},h=t.computed(()=>{const g=vm;return{[g]:!0,[`${g}--${n.value}`]:n.value,[`${g}--${a.value}`]:a.value,[`${g}--${r.value}`]:r.value,[`${g}--plain`]:d.value,[`${g}--block`]:f.value,[`${g}--disabled`]:s.value,[`${g}--loading`]:i.value}}),y=t.computed(()=>{const g={};return c?.value&&(d.value?(g.color=c.value,g.background="#fff",c.value?.includes("gradient")||(g.borderColor=c.value)):(g.color="#fff",g.background=c.value)),g});return{handleClick:m,classes:h,getStyle:y}}}),Sm={class:"fox-button__wrap"};function Cm(e,o,l,n,a,r){const s=t.resolveComponent("Loading");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.getStyle),onClick:o[0]||(o[0]=(...i)=>e.handleClick&&e.handleClick(...i))},[t.createElementVNode("view",Sm,[e.loading?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-icon-loading"})):t.createCommentVNode("",!0),e.$slots.icon&&!e.loading?t.renderSlot(e.$slots,"icon",{key:1}):t.createCommentVNode("",!0),e.$slots.default?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass({"fox-button__text":e.$slots.icon||e.loading})},[t.renderSlot(e.$slots,"default")],2)):t.createCommentVNode("",!0)])],6)}const Ie=J(bm,[["render",Cm]]),{create:wm,scope:Nm}=X("searchbar"),Bm=wm({props:{modelValue:{type:[String,Number],default:""},inputType:{type:String,default:"text"},label:{type:String,default:""},shape:{type:String,default:"round"},maxLength:{type:[String,Number],default:"9999"},placeholder:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:Object,default:()=>te.CircleClose},background:{type:String,default:""},inputBackground:{type:String,default:""},focusStyle:{type:Object,default:()=>({})},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inputAlign:{type:String,default:"left"}},emits:["change","update:modelValue","blur","focus","clear","search","click-input","click-left-icon","click-right-icon"],setup(e,{emit:o}){const{toLocaleRefs:l}=ae.useFoxI18n(Nm),n=l(e,["placeholder"]),a=t.reactive({active:!1}),r=t.computed(()=>({background:e.background})),s=t.computed(()=>({background:e.inputBackground})),i=p=>{let S=p.target.value;e.maxLength&&S.length>Number(e.maxLength)&&(S=S.slice(0,Number(e.maxLength))),o("update:modelValue",S,p),o("change",S,p)},c=t.ref({}),d=p=>{let S=p.target.value;a.active=!0,c.value=e.focusStyle,o("focus",S,p)},f=p=>{setTimeout(()=>{a.active=!1},0);let S=p.target.value;e.maxLength&&S.length>Number(e.maxLength)&&(S=S.slice(0,Number(e.maxLength))),c.value={},o("blur",S,p)},m=p=>{o("update:modelValue","",p),o("change","",p),o("clear","")},h=()=>{o("search",e.modelValue)},y=p=>{o("click-input",p)},g=p=>{o("click-left-icon",e.modelValue,p)},v=p=>{o("click-right-icon",e.modelValue,p)},b=t.computed(()=>({textAlign:e.inputAlign})),u=t.ref(null);return t.onMounted(()=>{e.autofocus&&u.value.focus()}),{...n,inputsearch:u,...t.toRefs(a),valueChange:i,valueFocus:d,valueBlur:f,handleClear:m,handleSubmit:h,searchbarStyle:r,inputSearchbarStyle:s,focusCss:c,clickInput:y,leftIconClick:g,rightIconClick:v,styleSearchbar:b}}}),Vm={key:0,class:"fox-searchbar__search-label"},Am={key:1,class:"fox-searchbar__search-icon fox-searchbar__left-search-icon"},Tm=["type","maxlength","placeholder","value","disabled","readonly"],$m={key:1,class:"fox-searchbar__search-icon fox-searchbar__iptright-search-icon"},Em={key:2,class:"fox-searchbar__search-icon fox-searchbar__right-search-icon"};function Dm(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:"fox-searchbar",style:t.normalizeStyle(e.searchbarStyle)},[e.label?(t.openBlock(),t.createElementBlock("span",Vm,t.toDisplayString(e.label),1)):t.createCommentVNode("",!0),e.$slots.leftout?(t.openBlock(),t.createElementBlock("view",Am,[t.renderSlot(e.$slots,"leftout")])):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(["fox-searchbar__search-input",e.shape]),style:t.normalizeStyle({...e.inputSearchbarStyle,...e.focusCss})},[e.$slots.leftin?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-searchbar__search-icon fox-searchbar__iptleft-search-icon",onClick:o[0]||(o[0]=(...s)=>e.leftIconClick&&e.leftIconClick(...s))},[t.renderSlot(e.$slots,"leftin")])):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(["fox-searchbar__input-inner",e.$slots.rightin&&"fox-searchbar__input-inner-absolute"])},[t.createElementVNode("form",{class:"fox-searchbar__input-form",action:"#",onSubmit:o[5]||(o[5]=t.withModifiers((...s)=>e.handleSubmit&&e.handleSubmit(...s),["prevent"]))},[t.createElementVNode("input",{ref:"inputsearch",class:t.normalizeClass(["fox-searchbar__input-bar",e.clearable&&"fox-searchbar__input-bar_clear"]),type:e.inputType,maxlength:e.maxLength,placeholder:e.placeholder,value:e.modelValue,disabled:e.disabled,readonly:e.readonly,onClick:o[1]||(o[1]=(...s)=>e.clickInput&&e.clickInput(...s)),onInput:o[2]||(o[2]=(...s)=>e.valueChange&&e.valueChange(...s)),onFocus:o[3]||(o[3]=(...s)=>e.valueFocus&&e.valueFocus(...s)),onBlur:o[4]||(o[4]=(...s)=>e.valueBlur&&e.valueBlur(...s)),style:t.normalizeStyle(e.styleSearchbar)},null,46,Tm)],32)],2),t.createElementVNode("view",{class:t.normalizeClass(["fox-searchbar__input-inner-icon",e.$slots.rightin&&"fox-searchbar__input-inner-icon-absolute"])},[e.clearable?t.withDirectives((t.openBlock(),t.createElementBlock("view",{key:0,onClick:o[6]||(o[6]=(...s)=>e.handleClear&&e.handleClear(...s)),class:"fox-searchbar__search-icon fox-searchbar__input-clear"},[e.$slots["clear-icon"]?t.renderSlot(e.$slots,"clear-icon",{key:0}):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.clearIcon),{key:1}))],512)),[[t.vShow,String(e.modelValue).length>0]]):t.createCommentVNode("",!0),e.$slots.rightin?(t.openBlock(),t.createElementBlock("view",$m,[t.renderSlot(e.$slots,"rightin")])):t.createCommentVNode("",!0)],2)],6),e.$slots.rightout?(t.openBlock(),t.createElementBlock("view",Em,[t.renderSlot(e.$slots,"rightout")])):t.createCommentVNode("",!0)],4)}const Fo=J(Bm,[["render",Dm]]);function xm(e,o,l){return{props:{...Bn},emits:["change","update:modelValue","update:text","loaded-data","update:visible"],setup(n,{emit:a,slots:r}){const{toLocaleRefs:s}=ae.useFoxI18n(o),i=s(n,["title","loadText","loadMoreText","seachPlaceholder","confirmText"]),c=sm(),d=t.ref([]),f=t.ref(1),m=t.ref(""),h=t.shallowRef(null),y=t.computed(()=>{const U={};return n.params&&Object.assign(U,n.params),ie(m.value)||(U[`${n.searchKey}`]=m.value),h.value&&Object.assign(U,h.value),U});let g=!0;const v=async(U,P,z)=>{try{let j=null;ie(m.value)||(j=F=>{const I=to(n,F);if(typeof I=="string"&&I.includes(m.value))return!0;const K=rr(n,F);return!!(typeof K=="string"&&K.includes(m.value))});const q=await c.load("actionsheet",U,P,z,y.value,g,j??void 0);g=!1,Array.isArray(q)?(d.value=q,L.value=!1,f.value=1):q.page.length===0?L.value=!1:(Reflect.apply([].push,d.value,q.page),d.value.length>=q.totalSize?L.value=!1:f.value=d.value.length/n.pageSize),M.value=!1}catch(j){console.error("[FoxUI] Load ActionSheet Data Fail",j),d.value=[]}setTimeout(()=>{a("loaded-data")},250)};t.watch([()=>n.source,()=>n.pageSize,()=>n.params],async([U,P,z])=>{n.source&&v(n.source,f.value,P)},{immediate:!0});const b=t.computed(()=>!n.multiple&&n.isAutoBackFill),u=t.ref([]);let p=null;const k=t.ref(n.visible);t.watch(()=>n.visible,U=>{k.value!==U&&(k.value=U),U?p=[...u.value]:p=null});const S=(U,P)=>{const z=[];return Array.isArray(U)||(U=[U]),U.forEach(j=>{let q=nm(n,P,j,n.valueType);q!==-1&&z.push(q)}),xe(z,u.value)?!1:(u.value=z,!0)};t.watch([()=>n.modelValue,()=>d.value],([U,P],[z,j])=>{S(U,P)&&w()},{deep:!0});const w=()=>{const U=[],P=[],z=[];for(let j of u.value){const q=d.value[j];P.push(q);const F=to(n,q);if(z.push(F),n.valueType==="item")U.push(q);else if(n.valueType==="text")U.push(F);else{const I=ys(n,q);U.push(I)}}n.multiple?(a("update:modelValue",U),a("update:text",z),a("change",U,P)):(a("update:modelValue",U[0]??null),a("update:text",z[0]??null),a("change",U[0],P[0]??null))},N=()=>{p&&(u.value=p)},T=U=>{const P=u.value.indexOf(U);n.multiple?P===-1?u.value.push(U):u.value.splice(P,1):P===-1?u.value=[U]:u.value=[],(b.value||!n.poppable&&!n.showFooter)&&(w(),B(!1))},B=U=>{k.value=U,a("update:visible",U)},D=()=>{N(),B(!1)},C=()=>{B(!1),w()},V=()=>{d.value=[],f.value=1,n.source&&v(n.source,f.value,n.pageSize)},M=t.ref(!1),L=t.ref(!0),$=async()=>{if(!n.source){M.value=!1;return}await v(n.source,f.value,n.pageSize)};t.watch(()=>m.value,(U,P)=>{ie(U)&&!ie(P)&&$()});const E=()=>{let U=i.title.value??"";r.title&&(U=r.title());const P=t.h("view",{class:["fox-actionsheet__header-title"]},[U]),z=t.h(te.Close,{class:["fox-actionsheet__header-icon"],onClick:D});return t.h("view",{class:["fox-actionsheet__header"]},[P,z])},x=()=>{let U=null;if(r.search)U=r.search();else{const P={onSearch:V,placeholder:i.seachPlaceholder.value,disabled:n.disabled,modelValue:m.value,"onUpdate:modelValue":z=>{m.value=z}};U=t.h(Fo,P,{leftin:()=>t.h(te.Search2)})}return t.h("view",{class:["fox-actionsheet__searchbar"]},[U])},A=(U,P,z,j,q)=>{if(r.optionLabel)return r.optionLabel({text:U,checked:P,disabled:z,subText:j,item:q});const F=[],I=t.h("view",{class:"fox-actionsheet__list-item-text"},[U]);if(F.push(I),j){const K=t.h("view",{class:"fox-actionsheet__list-item-subtext"},[j]);F.push(K)}return t.h("view",{class:["fox-actionsheet__list-item-label"]},F)},H=(U,P,z,j)=>{if(r.optionIcon)return r.optionIcon({checked:U,disabled:P,iconSize:z,item:j});if(U){if(r.checkedIcon)return r.checkedIcon({disabled:P,item:j});{const q=n.checkedIcon??te.Checked;return t.h(q,{width:z,height:z,class:["fox-actionsheet__list-item-icon"]})}}else{if(r.icon)return r.icon({disabled:P,item:j});{const q=n.icon??te.CheckNormal;return t.h(q,{width:z,height:z,class:["fox-actionsheet__list-item-icon"]})}}},R=()=>{const U=[];for(let P=0;P<d.value.length;P++){const z=d.value[P],j=to(n,z),q=rr(n,z),F=["fox-actionsheet__list-item"],I={};let K=lm(n,z),W=n.iconSize?se(n.iconSize):null;const Z=am(n,z,P);Z&&(K=K||Z.disabled,Z.class&&F.push(Z.class),Z.style&&Object.assign(I,Z.style)),K=!!(n.disabled||K);const O=u.value.includes(P);K&&F.push("is-disabled"),O&&F.push("is-checked");const G={class:F,style:I,key:`${P}`,onClick:()=>{K||T(P)}};let Q=[];if(r.option)Q.push(r.option({item:z,checked:O,disabled:K}));else{const _=A(j,O,K,q,z);Q.push(_);const oe=H(O,K,W,z);Q.push(oe)}const ee=t.h("view",G,Q);U.push(ee)}return U},Y=()=>{let U=[];if(r.buttons)U=r.buttons();else{const z=t.h(Ie,{type:"primary",block:"block",onClick:C,disabled:n.disabled},{default:()=>i.confirmText.value});U.push(z)}return t.h("view",{class:"fox-actionsheet__footer"},[U])};return Te({search:async(U=null,P=!0)=>{h.value=U&&t.toRaw(U),t.triggerRef(h),P&&(d.value=[],f.value=1),t.nextTick(()=>{$()})},clear:()=>{d.value=[],f.value=1}}),()=>{const U=[];if(n.showHeader){const W=E();U.push(W)}if(n.showSearchbar){const W=x();U.push(W)}let P=null;if(r.content)P=r.content();else{const W=R(),Z={hasMore:L.value,loadText:i.loadText.value,loadMoreText:i.loadMoreText.value,modelValue:M.value,"onUpdate:modelValue":O=>{M.value=O},onLoadMore:$};P=t.h(Ro,Z,{default:()=>W})}const z={};n.optionsHeight&&(z.height=n.optionsHeight);const j={"fox-actionsheet__list":!0};n.poppable||(j["fox-actionsheet__list--inner"]=!0);const q=t.h("view",{class:j,style:z},[P]);if(U.push(q),n.showFooter&&!b.value){const W=Y();U.push(W)}const F=t.h("view",{class:"fox-actionsheet"},U);if(!n.poppable)return F;const I=["fox-actionsheet__popup"];n.popClass&&I.push(n.popClass);const K={popClass:I.join(" "),visible:k.value,closeable:!1,"onUpdate:visible":B,position:n.position,round:"round",onClickOverlay:D,closeOnClickOverlay:n.closeOnClickOverlay};return t.h(ce,K,{default:()=>F})}}}}const{componentName:Im,create:qm,scope:Mm}=X("actionsheet-pane"),Oo=qm(xm(Im,Mm)),zm={type:{type:String,default:"text"},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},text:{type:String},actionSheetClass:{type:String},separator:{type:[String],required:!1,defualt:" "}};function Lm(e,o,l,n,a,r,s){return{props:{...ue,...de,...zm,...Bn},emits:["change","update:modelValue","blur","focus","clear","update:text"],setup(i,c){const d=Ce(t.computed(()=>i.disabled)),f=Ae(t.computed(()=>i.readonly)),{emitEvent:m}=we({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus"],get validate(){return!d.value&&!f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ae.useFoxI18n(o),y=h(i,["placeholder"]),g=t.ref(!1),v=Ee(i,"modelValue"),b=t.ref(""),u=t.computed(()=>Array.isArray(b.value)?b.value.join(i.separator):b.value),p="fox-input-item",k=t.computed(()=>({[p]:!0,[`${p}__disabled`]:d.value})),S=Ne(t.computed(()=>i.textAlign),"textAlign"),w=t.computed(()=>{const q={};return S.value&&(q["text-align"]=S.value),q}),N=t.ref(!1),T=()=>{N.value=!0},B=q=>{N.value=q},D=q=>{v.value=q,m("update:modelValue",q)},C=(q,F)=>{m("change",q,F)},V=q=>{let I=q.target.value;g.value=!0,m("focus",I,q)},M=q=>{setTimeout(()=>{g.value=!1},0);let I=q.target.value;i.maxLength&&I.length>Number(i.maxLength)&&(I=I.slice(0,Number(i.maxLength))),m("blur",I,q)},L=q=>{b.value=q,m("update:text",q)},$=t.computed(()=>({[`${p}__append`]:!0})),E=t.computed(()=>ge(i.unit)>0),x=t.computed(()=>ge(i.unit)>0&&!g.value),A=t.computed(()=>({hidden:!x.value})),H=q=>{v.value="",m("update:modelValue","",q),m("change","",q),m("clear","")},R=t.computed(()=>i.clearable&&!d.value&&!f.value),Y=t.computed(()=>ge(v.value)>0&&g.value),U=q=>{Y.value?H(q):T()},P=t.computed(()=>Y.value&&R.value?n:a),z=t.computed(()=>({action:!0})),j=t.ref(null);return Te({search:q=>{j.value&&j.value.search(q)}}),()=>{const q={class:k.value,style:w.value,type:"text",maxlength:i.maxLength,placeholder:y.placeholder.value,readonly:!0,unselectable:"on",value:u.value,onClick:T,onFocus:V,onBlur:M};s&&(q.disabled=!0);const F=[],I=t.h("input",q);F.push(I);const K=[],W={class:["action-icon"]},Z=t.h(P.value,W),O={class:z.value,onClick:U},G=t.h("view",O,{default:()=>[Z]});if(K.push(G),E.value){const Ze=t.h("view",{class:A.value},[i.unit]);K.push(Ze)}const Q={class:$.value},ee=t.h("view",Q,{default:()=>K});F.push(ee);const _={default:()=>F};_.label=c.slots.default,_.prepend=c.slots.prepend,_.append=c.slots.append,_.fixedPreTip=c.slots.fixedPreTip,_.fixedTip=c.slots.fixedTip;const oe=he(i,Bn);oe.ref=j,oe.class=i.actionsheetProps,oe.disabled=d.value||f.value,oe.visible=N.value,oe["onUpdate:visible"]=B,oe.modelValue=v.value,oe["onUpdate:modelValue"]=D,oe.text=b.value,oe["onUpdate:text"]=L,oe.onChange=C,oe.poppable=!0;const le={title:c.slots.title,search:c.slots.search,option:c.slots.option,optionLabel:c.slots.optionLabel,optionIcon:c.slots.optionIcon,buttons:c.slots.buttons},$e=t.h(r,oe,le);_.hide=()=>[$e];const ve=he(i,de,ue);return t.h(l,ve,_)}}}}const{componentName:Pm,create:Rm,scope:Fm}=X("actionsheet-item"),al=Rm(Lm(Pm,Fm,be,te.CircleClose,te.ArrowRight,Oo)),Vn={modelValue:{type:[Number,String],default:0},inputWidth:{type:[Number,String],default:""},buttonSize:{type:[Number,String],default:""},min:{type:[Number,String],default:1},max:{type:[Number,String],default:9999},step:{type:[Number,String],default:1},decimalPlaces:{type:[Number,String],default:0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},{componentName:Om,create:Km}=X("input-number"),Um=Km({components:{Minus:te.Minus,Plus:te.Plus},props:{...Vn},emits:["update:modelValue","change","blur","focus","reduce","add","overlimit"],setup(e,{emit:o}){const l=t.computed(()=>{const y=Om;return{[y]:!0,[`${y}--disabled`]:e.disabled}}),n=y=>Number(y).toFixed(Number(e.decimalPlaces)),a=y=>{const g=y.target;o("update:modelValue",g.valueAsNumber,y)},r=(y,g)=>{let v=n(y);o("update:modelValue",v,g),o("change",v,g)},s=(y=Number(e.modelValue))=>y<Number(e.max)&&!e.disabled,i=(y=Number(e.modelValue))=>y>Number(e.min)&&!e.disabled,c=y=>{if(o("reduce",y),i()){let g=Number(e.modelValue)-Number(e.step);r(g,y)}else o("overlimit",y,"reduce")},d=y=>{if(o("add",y),s()){let g=Number(e.modelValue)+Number(e.step);r(g,y)}else o("overlimit",y,"add")},f=y=>{e.disabled||e.readonly||o("focus",y)},m=y=>{if(e.disabled||e.readonly)return;let v=y.target.valueAsNumber;v<Number(e.min)?v=Number(e.min):v>Number(e.max)&&(v=Number(e.max)),r(v,y),o("blur",y)},h=y=>{let g=Number(y);return g<Number(e.min)?g=Number(e.min):g>Number(e.max)&&(g=Number(e.max)),g};return t.watch(()=>[e.max,e.min],()=>{Number(e.min)>Number(e.max)&&console.warn("[FoxUI] <InputNumber>","props.max < props.min");const y=h(e.modelValue);y!==Number(e.modelValue)&&r(y,{})}),{classes:l,change:a,blur:m,focus:f,add:d,addAllow:s,reduce:c,reduceAllow:i,toPxDesc:fe}}}),Hm=["min","max","disabled","readonly","value"];function jm(e,o,l,n,a,r){const s=t.resolveComponent("Minus"),i=t.resolveComponent("Plus");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createElementVNode("view",{class:t.normalizeClass(["fox-input-number__icon fox-input-number__left",{"fox-input-number__icon--disabled":!e.reduceAllow()}]),onClick:o[0]||(o[0]=(...c)=>e.reduce&&e.reduce(...c))},[t.renderSlot(e.$slots,"left-icon",{},()=>[t.createVNode(s,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2),t.createElementVNode("input",{type:"number",min:e.min,max:e.max,style:t.normalizeStyle({width:e.toPxDesc(e.inputWidth),height:e.toPxDesc(e.buttonSize)}),disabled:e.disabled,readonly:e.readonly,value:e.modelValue,onInput:o[1]||(o[1]=(...c)=>e.change&&e.change(...c)),onBlur:o[2]||(o[2]=(...c)=>e.blur&&e.blur(...c)),onFocus:o[3]||(o[3]=(...c)=>e.focus&&e.focus(...c))},null,44,Hm),t.createElementVNode("view",{class:t.normalizeClass(["fox-input-number__icon fox-input-number__right",{"fox-input-number__icon--disabled":!e.addAllow()}]),onClick:o[4]||(o[4]=(...c)=>e.add&&e.add(...c))},[t.renderSlot(e.$slots,"right-icon",{},()=>[t.createVNode(i,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2)],2)}const Qe=J(Um,[["render",jm]]);function Wm(e,o,l,n){return{props:{...ue,...de,...Vn},emits:["change","update:modelValue"],setup(a,r){const s=Ce(t.computed(()=>a.disabled)),i=Ae(t.computed(()=>a.readonly)),{emitEvent:c}=we({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus"],get validate(){return!s.value&&!i.value}},a.prop??r.attrs.name),d=e,f=Ee(a,"modelValue"),m=h=>{f.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const h={"left-icon":r.slots["left-icon"],"right-icon":r.slots["right-icon"]},g={...he(a,Vn),disabled:s.value,readonly:i.value,value:f.value,"onUpdate:modelValue":m},v=t.h(n,g,h),b=[];b.push(v);const u={default:()=>b};u.label=r.slots.default,u.fixedPreTip=r.slots.fixedPreTip,u.fixedTip=r.slots.fixedTip;const p=he(a,de,ue);return p["content-class"]=d,t.h(l,p,u)}}}}const{componentName:Ym,create:Xm,scope:Qm}=X("inputnumber-item"),rl=Xm(Wm(Ym,Qm,be,Qe)),{create:Gm,componentName:Gt,scope:MB}=X("tabs-bar"),Zm=Gm({components:{MoreH:te.MoreH},props:{modelValue:{type:[String,Number],default:0},data:{type:[Array]},textKey:{type:String,default:"text"},valueKey:{type:String,default:"value"},visibleKey:{type:String,default:"visibile"},disabledKey:{type:String,default:"disabled"},direction:{type:String,default:"horizontal"},size:{type:String,default:"normal"},shape:{type:String},align:{type:String},markShape:{type:String,default:"line"},scroll:{type:Boolean,default:!1},ellipsis:{type:Boolean,default:!0},animatedTime:{type:[Number,String],default:300},gutter:{type:[Number,String],default:0},itemOptions:{type:Object},showQuickNavigation:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(e,{slots:o,emit:l}){const n=t.computed(()=>{const x={};return x[`${Gt}`]=!0,x}),a=t.computed(()=>{const x={};return x[`${Gt}__titles`]=!0,x[`${e.direction}`]=!0,e.align==="left"&&(x.left=!0),e.scroll===!0&&(x.scrollable=!0),e.shape&&(x[`${e.shape}`]=!0),x}),r=t.computed(()=>({})),s=t.computed(()=>{if(!e.gutter)return 0;const x=se(e.gutter);return x<=0?0:x}),i=t.ref(e.modelValue);t.watch(()=>e.modelValue,x=>{i.value!==x&&(i.value=x,E(!1))});const c=t.ref({"fox-tabs-bar__popup":!0,"fox-tabs-bar__popup--show":!1,"fox-tabs-bar__popup--hide":!1}),d=t.ref(),f=t.ref(!1),m=()=>{const x=!f.value;h(x)},h=x=>{const A=x;A?(f.value=A,setTimeout(()=>{c.value["fox-tabs-bar__popup--show"]=!0,c.value["fox-tabs-bar__popup--hide"]=!1},0)):(c.value["fox-tabs-bar__popup--show"]=!1,c.value["fox-tabs-bar__popup--hide"]=!0,d.value?d.value.addEventListener("transitionend",()=>{f.value=!1},{once:!0}):setTimeout(()=>{f.value=!1},0))},y=t.ref(),g=t.ref([]),v=(x,A)=>{g.value[A]=x},b=x=>A=>{v(A,x)},u=(x,A)=>{const H=y.value,R=g.value;if(!H||!R||!R[x])return;const Y=R[x];let U=0;e.direction==="vertical"?U=Y.offsetTop-(H.offsetHeight-Y.offsetHeight)/2:U=Y.offsetLeft-(H.offsetWidth-Y.offsetWidth)/2,p(H,U,A?0:.3,e.direction)},p=(x,A,H,R)=>{let Y=0;const U=R==="horizontal"?x.scrollLeft:x.scrollTop,P=H===0?1:Math.round(H*1e3/16);function z(){R==="horizontal"?x.scrollLeft+=(A-U)/P:x.scrollTop+=(A-U)/P,++Y<P&&Le(z)}z()},k=x=>x[e.textKey],S=x=>x[e.valueKey],w=x=>x[e.visibleKey],N=x=>x[e.disabledKey],T=(x,A)=>{const H=e.itemOptions;return typeof H=="function"?H(x,A):H||null},B=(x,A)=>{const H=S(x),R={};R[`${Gt}__titles-item`]=!0,R.disabled=N(x),R.active=H===i.value,e.shape&&(R[`${e.shape}`]=!0),e.ellipsis&&(R.ellipsis=!0);const Y=T(x,A);return Y&&(Y.class&&(R[`${Y.class}`]=!0),Y.disabled===!0&&(R.disabled=Y.disabled)),R},D=(x,A)=>{const H={};if(s.value>0){const Y=Math.abs(s.value/2);e.direction==="vertical"?(H["margin-top"]=`${Y}px`,H["margin-bottom"]=`${Y}px`):(H["margin-left"]=`${Y}px`,H["margin-right"]=`${Y}px`)}const R=T(x,A);return R&&R.style&&Object.assign(H,R.style),H},C=(x,A)=>`${S(x)??A}`,V=(x,A)=>{const H=S(x),R={};R[`${Gt}__popup-item`]=!0,R.disabled=N(x),R.active=H===i.value,e.shape&&(R[`${e.shape}`]=!0);const Y=T(x,A);return Y&&Y.disabled===!0&&(R.disabled=Y.disabled),R},M=t.computed(()=>(e.data??[]).filter(A=>w(A)!==!1)),L=(x,A)=>{const H=S(x);i.value=H,e.scroll&&u(A,!1),l("update:modelValue",H),l("change",x,A)},$=(x,A)=>{L(x,A),h(!1)},E=x=>{if(!Array.isArray(e.data)||!e.scroll)return;const A=e.data.findIndex(H=>S(H)===i.value);A!==-1&&u(A,x)};return t.watch(()=>e.data,()=>{setTimeout(E,0)}),t.onMounted(()=>{E(!0)}),{classes:n,titlesClasses:a,titlesStyles:r,itemClasses:B,itemStyles:D,itemKey:C,popupItemClasses:V,filterTabItems:M,getItemText:k,getItemValue:S,onTabChange:L,titlesRef:y,createItemRefs:b,togglePopupVisible:m,onQuickNavigate:$,popupClasses:c,popupVisible:f,popupRef:d}}}),Jm={class:"fox-tabs-bar"},_m=["onClick"],ep={class:"fox-tabs-bar__titles-item-text"},tp=t.createElementVNode("view",{class:"fox-tabs-bar__titles-item-line"},null,-1),op=["onClick"];function np(e,o,l,n,a,r){const s=t.resolveComponent("MoreH");return t.openBlock(),t.createElementBlock("view",Jm,[t.createElementVNode("view",{ref:"titlesRef",class:t.normalizeClass(e.titlesClasses),style:t.normalizeStyle(e.titlesStyles)},[t.renderSlot(e.$slots,"default",{},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filterTabItems,(i,c)=>(t.openBlock(),t.createElementBlock("view",{ref_for:!0,ref:e.createItemRefs(c),class:t.normalizeClass(e.itemClasses(i,c)),style:t.normalizeStyle(e.itemStyles(i,c)),key:e.itemKey(i),onClick:d=>e.onTabChange(i,c)},[t.renderSlot(e.$slots,"item",{item:i,index:c},()=>[t.createElementVNode("view",ep,t.toDisplayString(e.getItemText(i)),1),tp])],14,_m))),128))])],6),e.showQuickNavigation?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-tabs-bar__navigation",onClick:o[0]||(o[0]=(...i)=>e.togglePopupVisible&&e.togglePopupVisible(...i))},[t.renderSlot(e.$slots,"navigation",{},()=>[t.createVNode(s)])])):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("view",{ref:"popupRef",class:t.normalizeClass(e.popupClasses)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filterTabItems,(i,c)=>(t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.popupItemClasses(i,c)),key:e.itemKey(i),onClick:d=>e.onQuickNavigate(i,c)},[t.renderSlot(e.$slots,"popup-item",{item:i,index:c},()=>[t.createTextVNode(t.toDisplayString(e.getItemText(i)),1)])],10,op))),128))],2),[[t.vShow,e.popupVisible]])])}const sl=J(Zm,[["render",np]]),vs=Symbol("TabsStatesKey"),{create:lp}=X("tabs-container"),ap=lp({props:{modelValue:{type:[String,Number]},direction:{type:[String],default:"horizontal"}},emits:["update:modelValue","change"],setup(e,{emit:o}){const l=t.shallowRef([]),n={current:t.ref(e.modelValue??""),direction:t.ref(e.direction),tabWidth:t.ref(-1),tabHeight:t.ref(-1),add:f=>{const m={name:f};n.current.value===f&&(m.loaded=!0),l.value.push(m),t.triggerRef(l)},remove:f=>{const m=l.value.findIndex(h=>h.name===f);m!==-1&&l.value.splice(m,1)},isLoaded:f=>{const m=l.value.findIndex(h=>h.name===f);return m!==-1?n.current.value?l.value[m].loaded??!1:m===0:!1}};t.provide(vs,n);const a=f=>{const m=l.value.findIndex(h=>h.name===f);m!==-1&&(l.value[m].loaded=!0,t.triggerRef(l))};t.watch([()=>e.modelValue,()=>e.direction],([f,m])=>{n.current.value!==f&&(n.current.value=f??"",a(f??"")),n.direction.value!==m&&(n.direction.value=m)});const r=t.ref(null),s=t.ref(null),i=t.computed(()=>({"fox-tabs-container":!0,[`${e.direction}`]:!0})),c=t.computed(()=>{const f={},m=l.value.length;if(m<=0)return f;const h=l.value.findIndex(y=>y.name===n.current.value);return n.direction.value==="vertical"?n.tabHeight.value>0&&(f.height=`${m*n.tabHeight.value}px`,h!==-1&&(f.transform=`translate(0, -${h*n.tabHeight.value}px)`)):n.tabWidth.value>0&&(f.width=`${m*n.tabWidth.value}px`,h!==-1&&(f.transform=`translate(-${h*n.tabWidth.value}px, 0)`)),f});let d=null;return t.onMounted(()=>{if(!r.value)return;const f=()=>{const m=wo(r.value);n.tabWidth.value=m.width,n.tabHeight.value=m.height};window.ResizeObserver&&(d=new window.ResizeObserver(f),d.observe(r.value)),f()}),t.onBeforeUnmount(()=>{d&&(d.disconnect(),d=null)}),{tabsRef:r,panesRef:s,classes:i,panesStyles:c}}});function rp(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),ref:"tabsRef"},[t.createElementVNode("view",{class:"fox-tabs-container__panes",style:t.normalizeStyle(e.panesStyles),ref:"panesRef"},[t.renderSlot(e.$slots,"default")],4)],2)}const il=J(ap,[["render",rp]]),{create:sp}=X("tabs-pane"),ip=sp({components:{Loading:te.Loading},props:{paneKey:{type:[String,Number],required:!0},loaded:{type:[Boolean,String],default:null}},setup(e,{emit:o}){const l=t.inject(vs);t.onMounted(()=>{l.add(e.paneKey)}),t.onBeforeUnmount(()=>{l.remove(e.paneKey)});const n=t.computed(()=>{const r={};return l.direction.value==="vertical"&&l.tabHeight.value>0?r.height=`${l.tabHeight.value}px`:l.tabWidth.value>0&&(r.width=`${l.tabWidth.value}px`),r}),a=t.computed(()=>e.loaded!=null?pe(e.loaded):l.isLoaded(e.paneKey));return{styles:n,isLoaded:a}}}),cp={class:"fox-tabs-pane__empty"},up=t.createElementVNode("view",{class:"fox-tabs-pane__empty-text"},"loading",-1);function dp(e,o,l,n,a,r){const s=t.resolveComponent("Loading");return t.openBlock(),t.createElementBlock("view",{class:"fox-tabs-pane",style:t.normalizeStyle(e.styles)},[e.isLoaded?t.renderSlot(e.$slots,"default",{key:0}):t.renderSlot(e.$slots,"empty",{key:1},()=>[t.createElementVNode("view",cp,[t.createVNode(s,{class:"fox-tabs-pane__empty-icon"}),up])])],4)}const cl=J(ip,[["render",dp]]),fp={direction:{type:[String],default:"horizontal"},mode:{type:[String]},modelValue:{type:[Number,Boolean,String]},disabled:{type:[Boolean,String],required:!1},data:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},visibleKey:{type:String,required:!1,default:"visible"},statusKey:{type:String,required:!1,default:"status"},itemOptions:{type:[Object,Function],required:!1},step:{type:[Boolean,String]},clickNavigatePolicy:{type:[String]},icon:{type:[String]},iconSize:{type:[String,Number]},markIcon:{type:[String]},markIconSize:{type:[String,Number]},layout:{type:[Array],default:()=>["head","main","sub"]},scroll:{type:[Boolean]}};function mp(e,o){return typeof e.textKey=="string"&&e.textKey.length>0?o[e.textKey]:o.text}function sr(e,o){return typeof e.valueKey=="string"&&e.valueKey.length>0?o[e.valueKey]:o.value}function ir(e,o){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?o[e.disabledKey]:o.disabled??null}function pp(e,o){return typeof e.visibleKey=="string"&&e.visibleKey.length>0?o[e.visibleKey]:o.visible??null}function Jo(e,o){return typeof e.statusKey=="string"&&e.statusKey.length>0?o[e.statusKey]:o.statusKey??null}function _o(e,o,l){return typeof e.itemOptions=="function"?e.itemOptions(o,l):e.itemOptions}let hp=class{proxy;constructor(o){this.proxy=o}async load(o,l,n){if(Array.isArray(l))return l;if(typeof l=="function")return await Reflect.apply(l,null,[n]);const a=Ge(this.proxy,o);return a===null?(console.error(`${o} component not found api function`),[]):(Be(n)&&t.isReactive(n)&&(n=t.toRaw(n)),await Reflect.apply(a,null,[l,n]))}};function gp(){const e=t.getCurrentInstance();return new hp(e.proxy)}function yp(e,o,l,n){return{props:{...fp},emits:["update:modelValue","change","loaded-data"],setup(a,{slots:r,emit:s}){const i=e,c=gp(),d=t.ref([]),f=t.computed(()=>d.value.filter(P=>pp(a,P)!==!1)),m=t.ref(-1),h=()=>{const P=a.modelValue,z=f.value.findIndex(j=>sr(a,j)===P);m.value!==z&&(m.value=z,a.scroll&&Y(z,!1))};t.watch([()=>a.modelValue,f],()=>{h()});const y=P=>m.value===P,g=P=>{if(P<0&&P>=f.value.length)return!1;const z=f.value[P],q=(_o(a,z,P)??{}).status??Jo(a,z);return y(P)||q},v=t.computed(()=>{const P={[i]:!0};return a.mode?P[`is-${a.mode}`]=!0:a.direction&&(P[`is-${a.direction}`]=!0),a.scroll&&(P["is-scroll"]=!0),P}),b=t.computed(()=>({})),u=(P,z,j,q)=>{const F={[`${i}__step`]:!0};return q&&(F[`${q}`]=!0),P===m.value?F["is-active"]=!0:z==="done"?F["is-done"]=!0:z==="error"?F["is-error"]=!0:z==="half"?F["is-half"]=!0:j?F["is-disabled"]=!0:F["is-normal"]=!0,F},p=(P,z={})=>{const j={...z};return P===f.value.length-1?j.flex="0 0 auto":a.step?a.direction==="vertical"?j.height=a.step:j.width=a.step:j.flex="1 1 100%",j},k=(P,z)=>{let j={};if(z<f.value.length-1){const q=z+1;g(z)&&g(q)?a.direction==="vertical"?j.height="100%":j.width="100%":j.opacity="0"}return j},S=P=>f.value.length-1===P,w=(P,z)=>{debugger;if(a.clickNavigatePolicy==="disabled"||(a.clickNavigatePolicy==="only-back"||a.clickNavigatePolicy==="only-back-reset")&&z>m.value||m.value===z)return;const j=m.value,q=z;m.value=z,a.scroll&&Y(z,!1);const F=sr(a,P);s("update:modelValue",F);const I={fromIndex:j,currentIndex:q,item:P,items:f.value,clickNavigatePolicy:a.clickNavigatePolicy};s("change",F,I)},N=t.ref(!0),T=async(P,z)=>{try{const j=await c.load("stesbar",P,z);Array.isArray(j)&&(d.value=j),N.value=!1}catch(j){console.error("[FoxUI] Load StepsBar Data Fail",j),d.value=[]}setTimeout(()=>{s("loaded-data")},250)};t.watch([()=>a.data,()=>a.params],async([P,z])=>{P&&T(P,z)},{immediate:!0});const B=(P,z,j,q)=>{let F=null;if(r.icon)F=r.icon({item:P,index:z,status:j});else if(j==="done"){const K={};a.iconSize&&(K.width=a.iconSize,K.height=a.iconSize);const W=a.icon??l;F=t.h(W,K)}else F=t.h("span",{},[`${z+1}`]);const I={class:"fox-steps-bar__icon",onClick:()=>{q||w(P,z)}};return t.h("view",I,[F])},D=(P,z,j)=>{const q=t.h("i",{class:"fox-steps-bar__line-inner",style:k(P,z)});return t.h("view",{class:"fox-steps-bar__line"},[q])},C=()=>{let P=null;if(r.markIcon)P=r.markIcon();else{const j={};a.iconSize&&(j.width=a.markIconSize,j.height=a.markIconSize);const q=a.markIcon??n;P=t.h(q,j)}return t.h("view",{class:"fox-steps-bar__mark"},[P])},V=(P,z,j,q)=>{const F=[];if(!S(z)){const W=D(P,z);F.push(W)}const I=B(P,z,j,q);F.push(I);const K={class:"fox-steps-bar__head"};return t.h("view",K,F)},M=(P,z,j,q)=>{let F=null;r.main?F=r.main({item:P,index:z,status:j}):F=mp(a,P);const I={class:"fox-steps-bar__main",onClick:()=>{q||w(P,z)}};return t.h("view",I,[F])},L=(P,z,j)=>{let q=null;if(r.sub){q=r.sub({item:P,index:z,status:j});const F={class:"fox-steps-bar__sub"};return t.h("view",F,[q])}return null},$=(P,z)=>{const j=_o(a,P,z)??{},q=j.status??Jo(a,P);let F=ir(a,P);j.disabled===!0&&(F=!0),a.disabled===!0&&(F=!0);const I=[],K=B(P,z,q,F);K&&I.push(K);const W=M(P,z,q,F);W&&I.push(W);const Z=D(P,z);Z&&I.push(Z);const O=t.h("view",{class:"fox-steps-bar__head"},I),G=j.class,Q=j.style??{},ee={ref:R(z),class:u(z,q,F,G),style:p(z,Q)};return t.h("view",ee,[O])},E=(P,z)=>{const j=_o(a,P,z)??{},q=j.status??Jo(a,P);let F=ir(a,P);j.disabled===!0&&(F=!0),a.disabled===!0&&(F=!0);const I=[],K=a.layout;for(let G of K)if(G==="head"){const Q=V(P,z,q,F);I.push(Q)}else if(G==="main"){const Q=M(P,z,q,F);I.push(Q)}else if(G==="sub"){const Q=L(P,z,q);I.push(Q)}else if(G==="mark"){const Q=C();I.push(Q)}const W=j.class,Z=j.style??{},O={ref:R(z),class:u(z,q,F,W),style:p(z,Z)};return t.h("view",O,I)},x=t.ref(),A=t.ref([]),H=(P,z)=>{A.value[z]=P},R=P=>z=>{H(z,P)},Y=(P,z)=>{const j=x.value,q=A.value;if(!j||!q||!q[P])return;const F=q[P];let I=0;a.direction==="vertical"?I=F.offsetTop-(j.offsetHeight-F.offsetHeight)/2:I=F.offsetLeft-(j.offsetWidth-F.offsetWidth)/2,U(j,I,z?0:.3,a.direction)},U=(P,z,j,q)=>{let F=0;const I=q==="horizontal"?P.scrollLeft:P.scrollTop,K=j===0?1:Math.round(j*1e3/16);function W(){q==="horizontal"?P.scrollLeft+=(z-I)/K:P.scrollTop+=(z-I)/K,++F<K&&Le(W)}W()};return()=>{const P=[];if(a.mode==="simple")for(let j=0;j<f.value.length;j++){const q=f.value[j],F=$(q,j);P.push(F)}else for(let j=0;j<f.value.length;j++){const q=f.value[j],F=E(q,j);P.push(F)}const z={ref:x,class:v.value,style:b.value};return t.h("view",z,P)}}}}const{componentName:vp,create:kp,scope:bp}=X("steps-bar"),ul=kp(yp(vp,bp,te.Checklist,te.ArrowRight)),cr=10;function Sp(e,o){return e>o&&e>cr?"horizontal":o>e&&o>cr?"vertical":""}function Cp(){const e={startX:0,startY:0,startTime:0,duration:0,moveX:0,moveY:0,deltaX:0,deltaY:0,offsetX:0,offsetY:0,direction:""},o=()=>e.direction==="vertical",l=()=>e.direction==="horizontal",n=()=>{e.deltaX=0,e.deltaY=0,e.offsetX=0,e.offsetY=0,e.direction="",e.startTime=0};return{move:s=>{if(s.touches){const i=s.touches[0];e.deltaX=i.clientX-e.startX,e.deltaY=i.clientY-e.startY,e.moveX=i.clientX,e.moveY=i.clientY}else e.deltaX=s.clientX-e.startX,e.deltaY=s.clientY-e.startY,e.moveX=s.clientX,e.moveY=s.clientY;e.offsetX=Math.abs(e.deltaX),e.offsetY=Math.abs(e.deltaY),e.duration=Date.now()-e.startTime,e.direction||(e.direction=Sp(e.offsetX,e.offsetY))},start:s=>{if(n(),s.touches){const i=s.touches[0];e.startX=i.clientX,e.startY=i.clientY}else e.startX=s.clientX,e.startY=s.clientY;e.startTime=Date.now()},reset:n,isVertical:o,isHorizontal:l,state:e}}function wp(){const e=window.navigator.userAgent;return"ontouchstart"in window||e.indexOf("touch")!==-1||e.indexOf("mobile")!==-1}function Np(e){e.stopPropagation()}function Bp(e,o){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),o&&Np(e)}class Vp{startMove;updateMove;isTouch=!1;els=null;moving=!1;touchstart=null;touchmove=null;touchend=null;constructor(o,l){this.startMove=o,this.updateMove=l,this.isTouch=wp()}open(o){Array.isArray(o)||(o=[o]),this.els=o;const l=Cp(),n=(a,r,s,i)=>{this.updateMove({x:a,y:r})};this.touchstart=a=>{this.moving||(l.start(a),this.startMove({x:l.state.startX,y:l.state.startY}),document.addEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),document.addEventListener(this.isTouch?"touchend":"mouseup",this.touchend),this.moving=!0)},this.touchmove=a=>{this.moving&&(l.move(a),Bp(a,!0),n(l.state.deltaX,l.state.deltaY))},this.touchend=()=>{n(l.state.deltaX,l.state.deltaY),this.touchmove&&document.removeEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),this.touchend&&document.removeEventListener(this.isTouch?"touchend":"mouseup",this.touchend),l.reset(),this.moving=!1},this.els.forEach(a=>{this.touchstart&&a.addEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)})}close(){Array.isArray(this.els)&&this.els.forEach(o=>{this.touchstart&&o.removeEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)}),this.els=null}}function Ap(e,o){return new Vp(e,o)}const Tp={top:{type:[String]},right:{type:[String]},bottom:{type:[String]},left:{type:[String]},width:{type:[String]},height:{type:[String]},color:{type:[String]},background:{type:[String]},draggable:{type:[Boolean]}},$p=(e,o,l,n=!1)=>({props:{...Tp},emits:["click"],setup(a,{slots:r,emit:s}){const i=t.reactive({top:a.top,right:a.right,bottom:a.bottom,left:a.left}),c=t.computed(()=>({[`${e}`]:!0})),d=t.computed(()=>{const p={};return ie(i.top)||(p.top=i.top),ie(i.right)||(p.right=i.right),ie(i.bottom)||(p.bottom=i.bottom),ie(i.left)||(p.left=i.left),ie(a.width)||(p.width=a.width),ie(a.height)||(p.height=a.height),ie(a.color)||(p.color=a.color),ie(a.background)||(p.background=a.background),p}),f=t.computed(()=>({[`${e}__icon`]:!0})),m=()=>{s("click")},h=t.ref(null),y=()=>{i.top=null,i.right=null,i.bottom=null,i.left=null},g={x:0,y:0},u=Ap(p=>{if(!h.value)return;const k=h.value;y(),i.left=k.offsetLeft,i.top=k.offsetTop,k.style.left=`${i.left}px`,k.style.top=`${i.top}px`,k.style.right=null,k.style.bottom=null,g.x=i.left,g.y=i.top},p=>{if(!h.value)return;const k=h.value;y(),i.left=g.x+p.x,i.top=g.y+p.y,k.style.left=`${i.left}px`,k.style.top=`${i.top}px`});return t.onMounted(()=>{if(a.draggable&&h.value){const p=[h.value];u.open(p)}}),t.onBeforeUnmount(()=>{a.draggable&&h.value&&u.close()}),()=>{let p=[];const k=typeof r.default=="function"?r.default():[];if(k&&k.length>0)p=k;else{const w=t.h(l,{class:f.value});p.push(w)}const S={ref:w=>{h.value=w},class:c.value,style:d.value,onClick:m};return t.h("view",S,p)}}}),{componentName:Ep,create:Dp,scope:xp}=X("floating-button"),dl=Dp($p(Ep,xp,te.Uploader,!1)),Ip={width:{type:[String,Number]},height:{type:[String,Number]},type:{type:[String],required:!1,default:"info"},icon:{type:[String,Object],required:!1},closeIcon:{type:[String,Object],required:!1},showClose:{type:[Boolean],required:!1},title:{type:[String],required:!1},message:{type:[Array,String,Object],required:!1},showConfirmButton:{type:[Boolean],required:!1},confirmButtonText:{type:[String],required:!1},confirmText:{type:[String],required:!1},confirmButtonClass:{type:[String],required:!1},confirmButtonStyle:{type:[Object],required:!1},showCancelButton:{type:[Boolean],required:!1},cancelButtonText:{type:[String],required:!1},cancelText:{type:[String],required:!1},cancelButtonClass:{type:[String],required:!1},cancelButtonStyle:{type:[Object],required:!1},popClass:{type:[String]},position:{type:[String],default:"center"},closeOnClickOverlay:{type:[Boolean],required:!1,default:!0},unmount:{type:[Function],required:!1},callback:{type:[Function],required:!1}},qp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0);function Mp(e,o,l){return{props:{...Ip},setup(n,{attrs:a,slots:r}){const{toLocaleRefs:s}=ae.useFoxI18n(o),i=s(n,["confirmText","cancelText"]),c=e,d=t.ref(!0),f=S=>{d.value=S},m=S=>{if(typeof n.unmount=="function")try{n.unmount()}catch(w){console.error(w)}if(typeof n.callback=="function")try{n.callback(S)}catch(w){console.error(w)}},h=()=>{m("confirm")},y=()=>{m("cancel")},g=()=>{m("close")},v=(S,w)=>qp(S)?(w.src=S,t.h("img",w)):typeof S=="string"?(Array.isArray(w.class)?w.class.push(S):w.class&&typeof w.class=="object"?w[`${S}`]=!0:typeof w.class=="string"?w.class=`${w.class}, ${S}`:w.class=S,t.h(n.tag,w)):t.h(S,w),b=()=>{const S=[];if(n.icon){const N={class:[`${c}__header-icon`]},T=v(n.icon,N);S.push(T)}if(n.title){const N=t.h("view",{class:`${c}__header-title`},[n.title]);S.push(N)}if(n.showClose&&n.closeIcon){const N={class:[`${c}__header-close-icon`],onClick:g},T=v(n.closeIcon,N);S.push(T)}const w={class:[`${c}__header`]};return t.h("view",w,S)},u=(S,w)=>{const N=[];if(w){const B={class:`${c}__group-title`},D=t.h("view",B,[w]);N.push(D)}if(S){const B=[];Array.isArray(S)||(S=[S]);for(let D of S){const C={class:`${c}__group-row`,innerHTML:D},V=t.h("view",C);B.push(V)}if(B.length>0){const D={class:`${c}__group-rows`},C=t.h("view",D,B);N.push(C)}}if(N.length===0)return null;const T={class:`${c}__group`};return t.h("view",T,N)},p=()=>{const S=[];if(typeof n.message=="string"){const w=u(n.message);S.push(w)}else if(Array.isArray(n.message))for(let w of n.message)if(typeof w=="string"){const N=u(w);S.push(N)}else{const N=u(w.content,w.title);S.push(N)}else if(typeof n.message=="function"){const w=n.message();S.push(w)}else{const w=n.message;S.push(w)}return S},k=()=>{const S=[];if(n.showCancelButton){const N={class:[`${c}__footer-button`],style:{},onClick:y};n.cancelButtonClass&&N.class.push(n.cancelButtonClass),n.cancleButtonStyle&&typeof n.cancleButtonStyle=="object"&&Object.assign(N.style,n.cancleButtonStyle);const T=t.h("button",N,[n.cancelButtonText??i.cancelText.value]);S.push(T)}if(n.showConfirmButton){const N={class:[`${c}__footer-button`],style:{},onClick:h};n.confirmButtonClass&&N.class.push(n.confirmButtonClass),n.confirmButtonStyle&&typeof n.confirmButtonStyle=="object"&&Object.assign(N.style,n.confirmButtonStyle);const T=t.h("button",N,[n.confirmButtonText??i.confirmText.value]);S.push(T)}if(S.length===0)return null;const w={class:`${c}__footer`};return t.h("view",w,S)};return()=>{const S=[],w=b();w&&S.push(w);const N=p();N&&S.push(N);const T=k();T&&S.push(T);const B={class:{[`${c}`]:!0,[`${c}--${n.type||"info"}`]:!0}},D=t.h("view",B,S),C=[`${c}__popup`];n.popClass&&C.push(n.popClass);const V={};n.width&&(V.width=typeof n.width=="number"?`${n.width}px`:n.width),n.height&&(V.height=typeof n.height=="number"?`${n.height}px`:n.height);const M={popClass:C.join(" "),style:V,visible:d.value,teleportDisable:!0,closeable:!1,"onUpdate:visible":f,position:n.position,round:"round",onClickOverlay:g,closeOnClickOverlay:n.closeOnClickOverlay};return t.h(l,M,{default:()=>D})}}}}const{componentName:zp,create:Lp,scope:Pp}=X("messagebox"),Rp=Lp(Mp(zp,Pp,ce)),Fp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='110'%20viewBox='0%200%20102%20110'%20fill='none'%3e%3cg%20clip-path='url(%23clip-path-0)'%3e%3cpath%20d='M82.5121%201.93968L81.7498%206.07825C81.6498%206.6214%2081.1284%206.98064%2080.5853%206.8806C80.4326%206.85251%2080.2886%206.78925%2080.1646%206.69578L77.1586%204.43061C76.7175%204.09823%2076.6294%203.47123%2076.9618%203.03016C77.0552%202.90617%2077.1762%202.80562%2077.3153%202.73655L81.0834%200.863097C81.5779%200.617235%2082.1782%200.818843%2082.4241%201.31339C82.5204%201.50712%2082.5512%201.72688%2082.5121%201.93968Z'%20fill='%23FFD1C9'%20%3e%3c/path%3e%3cpath%20d='M3.08218%20102.2L6.53454%2094.2358C6.75419%2093.7291%207.34251%2093.4968%207.84925%2093.7164C7.99216%2093.7778%208.11815%2093.872%208.21791%2093.9909L13.2085%2099.9384C13.5635%20100.361%2013.5081%20100.992%2013.0852%20101.347C12.9665%20101.447%2012.8261%20101.518%2012.675%20101.554L4.23203%20103.571C3.69484%20103.699%203.15538%20103.367%203.02699%20102.83C2.97674%20102.62%202.99607%20102.399%203.08218%20102.2Z'%20fill='%23FFB5AD'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='59'%20r='28'%20fill='%23FF5959'%20%3e%3c/circle%3e%3cpath%20d='M59.935%2049.6213C61.3827%2051.069%2061.3827%2053.4162%2059.935%2054.864L45.935%2068.864C44.4873%2070.3117%2042.1401%2070.3117%2040.6924%2068.864C39.2447%2067.4162%2039.2447%2065.069%2040.6924%2063.6213L54.6924%2049.6213C56.1401%2048.1736%2058.4873%2048.1736%2059.935%2049.6213Z'%20fill='%23FFB5AD'%20%3e%3c/path%3e%3cpath%20d='M40.6924%2049.6213C39.2447%2051.069%2039.2447%2053.4162%2040.6924%2054.864L54.6924%2068.864C56.1401%2070.3117%2058.4873%2070.3117%2059.935%2068.864C61.3827%2067.4162%2061.3827%2065.069%2059.935%2063.6213L45.935%2049.6213C44.4873%2048.1736%2042.1401%2048.1736%2040.6924%2049.6213Z'%20fill='%23FFFFFF'%20%3e%3c/path%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%23FFB5AD'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='106.5'%20r='3.5'%20fill='%23FFD1C9'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='30'%20r='7'%20fill='%23FFB5AD'%20%3e%3c/circle%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip-path-0'%3e%3cpath%20d='M0%20110L102%20110L102%200L0%200L0%20110Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Op="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='110'%20viewBox='0%200%20102%20110'%20fill='none'%3e%3cpath%20d='M8%2087L8%2095C8%2095.5523%207.55228%2096%207%2096C6.44772%2096%206%2095.5523%206%2095L6%2087L2%2087C1.44772%2087%201%2086.5523%201%2086C1%2085.4477%201.44772%2085%202%2085L6%2085L6%2082C6%2081.4477%206.44772%2081%207%2081C7.55228%2081%208%2081.4477%208%2082L8%2085L12%2085C12.5523%2085%2013%2085.4477%2013%2086C13%2086.5523%2012.5523%2087%2012%2087L8%2087Z'%20fill-rule='evenodd'%20fill='%2396CEFF'%20%3e%3c/path%3e%3cpath%20d='M89%205L89%2010C89%2010.5523%2088.5523%2011%2088%2011C87.4477%2011%2087%2010.5523%2087%2010L87%205L85%205C84.4477%205%2084%204.55228%2084%204C84%203.44772%2084.4477%203%2085%203L87%203L87%201C87%200.447715%2087.4477%200%2088%200C88.5523%200%2089%200.447715%2089%201L89%203L91%203C91.5523%203%2092%203.44772%2092%204C92%204.55228%2091.5523%205%2091%205L89%205Z'%20fill-rule='evenodd'%20fill='%23BDE2FF'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='59'%20r='28'%20fill='%23237FFA'%20%3e%3c/circle%3e%3crect%20x='47.5'%20y='45'%20width='7'%20height='17'%20rx='3'%20fill='%2396CEFF'%20%3e%3c/rect%3e%3crect%20x='47.5'%20y='66'%20width='7'%20height='7'%20rx='4'%20fill='%23FFFFFF'%20%3e%3c/rect%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='106.5'%20r='3.5'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='30'%20r='7'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3c/svg%3e",Kp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='105'%20viewBox='0%200%20102%20105'%20fill='none'%3e%3cpath%20d='M7%2076C7.55228%2076%208%2076.4477%208%2077L7.999%2079.999L12%2080C12.5523%2080%2013%2080.4477%2013%2081C13%2081.5523%2012.5523%2082%2012%2082L7.999%2081.999L8%2090C8%2090.5523%207.55228%2091%207%2091C6.44772%2091%206%2090.5523%206%2090L5.999%2081.999L2%2082C1.44772%2082%201%2081.5523%201%2081C1%2080.4477%201.44772%2080%202%2080L5.999%2079.999L6%2077C6%2076.4477%206.44772%2076%207%2076Z'%20fill='%2338D677'%20%3e%3c/path%3e%3cpath%20d='M75%201.72421e-32C75.5523%20-1.01453e-16%2076%200.447715%2076%201L76%202.999L78%203C78.5523%203%2079%203.44772%2079%204C79%204.55228%2078.5523%205%2078%205L76%204.999L76%2010C76%2010.5523%2075.5523%2011%2075%2011C74.4477%2011%2074%2010.5523%2074%2010L74%204.999L72%205C71.4477%205%2071%204.55228%2071%204C71%203.44772%2071.4477%203%2072%203L74%202.999L74%201C74%200.447715%2074.4477%201.01453e-16%2075%201.72421e-32Z'%20fill='%238BF0AD'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='54'%20r='28'%20fill='%2338D677'%20%3e%3c/circle%3e%3cpath%20d='M36.8787%2051.8786C38.3265%2050.4309%2040.6736%2050.4309%2042.1213%2051.8786L50.1214%2059.8786C51.5691%2061.3263%2051.5691%2063.6735%2050.1214%2065.1212C48.6737%2066.5689%2046.3265%2066.5689%2044.8787%2065.1212L36.8787%2057.1212C35.431%2055.6735%2035.431%2053.3263%2036.8787%2051.8786Z'%20fill='%23B3F2C6'%20%3e%3c/path%3e%3cpath%20d='M64.1214%2045.8786C65.5691%2047.3263%2065.5691%2049.6735%2064.1214%2051.1212L50.1213%2065.1212C48.6736%2066.5689%2046.3265%2066.5689%2044.8787%2065.1212C43.431%2063.6735%2043.431%2061.3263%2044.8787%2059.8786L58.8788%2045.8786C60.3265%2044.4309%2062.6737%2044.4309%2064.1214%2045.8786Z'%20fill='%23FFFFFF'%20%3e%3c/path%3e%3ccircle%20cx='3.5'%20cy='14.5'%20r='3.5'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='101.5'%20r='3.5'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='25'%20r='7'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3c/svg%3e",Up="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='101'%20height='110'%20viewBox='0%200%20101%20110'%20fill='none'%3e%3cg%20clip-path='url(%23clip-path-0)'%3e%3cpath%20d='M81.512%201.93968L80.7498%206.07825C80.6498%206.6214%2080.1284%206.98064%2079.5852%206.8806C79.4326%206.85251%2079.2886%206.78925%2079.1645%206.69578L76.1585%204.43061C75.7175%204.09823%2075.6293%203.47123%2075.9617%203.03016C76.0552%202.90617%2076.1761%202.80562%2076.3152%202.73655L80.0833%200.863097C80.5779%200.617235%2081.1781%200.818843%2081.424%201.31339C81.5203%201.50712%2081.5512%201.72688%2081.512%201.93968Z'%20fill='%23FEFAE0'%20%3e%3c/path%3e%3cpath%20d='M2.08224%20102.2L5.5346%2094.2358C5.75425%2093.7291%206.34257%2093.4968%206.84931%2093.7164C6.99222%2093.7778%207.11822%2093.872%207.21798%2093.9909L12.2086%2099.9384C12.5636%20100.361%2012.5082%20100.992%2012.0853%20101.347C11.9666%20101.447%2011.8261%20101.518%2011.675%20101.554L3.23209%20103.571C2.6949%20103.699%202.15544%20103.367%202.02705%20102.83C1.97681%20102.62%201.99613%20102.399%202.08224%20102.2Z'%20fill='%23FEE789'%20%3e%3c/path%3e%3ccircle%20cx='50'%20cy='59'%20r='28'%20fill='%23FAB007'%20%3e%3c/circle%3e%3crect%20x='46.5'%20y='45'%20width='7'%20height='17'%20rx='3'%20fill='%23FEE789'%20%3e%3c/rect%3e%3crect%20x='46.5'%20y='66'%20width='7'%20height='7'%20rx='3.5'%20fill='%23FFFFFF'%20%3e%3c/rect%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%23FEE789'%20%3e%3c/circle%3e%3ccircle%20cx='84.5'%20cy='106.5'%20r='3.5'%20fill='%23FEE789'%20%3e%3c/circle%3e%3ccircle%20cx='94'%20cy='30'%20r='7'%20fill='%23FEE789'%20%3e%3c/circle%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip-path-0'%3e%3cpath%20d='M0%20110L101%20110L101%200L0%200L0%20110Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Hp=new Un,jp={showCancelButton:!0,cancelButtonText:"取消",showConfirmButton:!0,confirmButtonText:"确认"},Wp=e=>{let o=document.body,l=e.teleport;l!="body"&&(typeof l=="string"?o=document.querySelector(l):l&&(o=e.teleport));const n=document.createElement("view"),a=`messagebox-${Hp.get()}`;n.id=a,e.unmount=()=>{const s=document.querySelector(`#${a}`);s&&s.parentNode?.removeChild(s)};const r=t.createVNode(Rp,e);o.appendChild(n),t.render(r,n)},tt={show:(e,o,l,n)=>{const a={...jp};o&&!Array.isArray(o)&&typeof o=="object"?Object.assign(a,o):(o&&(a.message=o),l&&typeof l=="object"?Object.assign(a,l):(typeof l=="string"&&(a.title=l),n&&typeof n=="object"?Object.assign(a,n):typeof n=="string"&&(a.type=n)));const r=a.type??"info";return a.icon||(r==="success"?a.icon=Kp:r==="warning"?a.icon=Up:r==="error"?a.icon=Fp:a.icon=Op),e==="alert"?(a.showCancelButton=!1,a.showConfirmButton=!0):e==="confirm"&&(a.showCancelButton=!0,a.showConfirmButton=!0),a.showClose&&!a.closeIcon&&(a.closeIcon=te.Close),new Promise((s,i)=>{const c=a.callback;a.callback=d=>{if(typeof c=="function")try{c(d)}catch(f){console.error(f)}s({action:d})},Wp(a)})},alert:(e,o,l)=>tt.show("alert",e,o,l),confirm:(e,o,l)=>tt.show("confirm",e,o,l),install(e){e.config.globalProperties.$alert=tt.alert,e.config.globalProperties.$confirm=tt.confirm}};function Yp(e,o){const l=document.createRange();l.setStart(e,0),l.setEnd(e,e.childNodes.length);const n=l.getBoundingClientRect().width;if(n>0){o(n);return}e.classList.add("is-selectable"),setTimeout(()=>{l.setStart(e,0),l.setEnd(e,e.childNodes.length);const a=l.getBoundingClientRect().width;e.classList.remove("is-selectable"),o(a)},500)}const Xp={tag:{type:[String],required:!1,default:"span"},showOverflowTooltip:{type:[Boolean],required:!1,default:!0},type:{type:[String],required:!1},size:{type:[String],required:!1},truncated:{type:[Boolean,String],required:!1,default:!0},numberFormat:{type:[Boolean],required:!1,default:!1},decimalLength:{type:[Number,String],required:!1,default:-1},autoPadding:{type:[Boolean,String],required:!1,default:!1},digits:{type:[Number,String],required:!1,default:4},separator:{type:String,required:!1,default:" "},highlightFilter:{type:[String,Function],required:!1},mark:{type:[Boolean],required:!1},color:{type:[String],required:!1},icon:{type:[Object],required:!1},textPosition:{type:String,default:"right"},textColor:{type:String}};function Qp(e,o,l=!1){return{props:{...Xp},emits:["click"],setup(n,a){const r=t.ref(!0),s=t.ref(null),i=t.computed(()=>{const y={[`${e}`]:!0,"is-truncated":n.truncated};return n.type&&(y[`${e}--${n.type??"default"}`]=!0),n.size&&(y[`${e}--${n.size}`]=!0),y}),c=t.computed(()=>{const y={},g=n.textColor??n.color;return g&&(y.color=g),y}),d=y=>{if(y&&pe(n.showOverflowTooltip)){const g=y.clientWidth;Yp(y,v=>{r.value=v<=g})}};let f=null;t.onMounted(()=>{if(!pe(n.showOverflowTooltip))return;const y=s.value;d(y),y&&window.ResizeObserver&&(f=new window.ResizeObserver(()=>{d(y)}),f.observe(y))}),t.onUnmounted(()=>{f?.disconnect()});const m=(y,g)=>{let v=null;if(typeof n.highlightFilter=="string"&&n.highlightFilter.length>0){const b=n.highlightFilter;if(y.indexOf(b)!==-1){const p=y.replace(new RegExp(b,"g"),`<span>${b}</span>`);g.innerHTML=p,g.class["is-highlight"]=!0,v=t.h(n.tag,g)}}else if(typeof n.highlightFilter=="function"){const b=n.highlightFilter(y);b&&(g.innerHTML=b,g.class["is-highlight"]=!0,v=t.h(n.tag,g))}return v},h=y=>{a.emit("click",y)};return()=>{const y={onClick:h,class:i.value,style:c.value,ref:s};let g=null;if(pe(n.numberFormat)&&typeof a.slots.default=="function"){const p=a.slots.default();if(Array.isArray(p)&&p.length===1){const k=p[0].type.toString();if(k==="Symbol(Text)"||k==="Symbol(v-txt)"){const S=me(n.digits),w=me(n.decimalLength),N=pe(n.autoPadding);let T=`${p[0].children}`,B=T.split("").reverse().join("");B=mo(B,w,N,S,n.separator),T=B.split("").reverse().join(""),n.highlightFilter!==void 0&&(g=m(T,y)),g||(y.innerHTML=T,g=t.h(n.tag,y))}}}else{if(n.highlightFilter!==void 0&&typeof a.slots.default=="function"){const p=a.slots.default();if(Array.isArray(p)&&p.length===1){const k=p[0].type.toString();if(k==="Symbol(Text)"||k==="Symbol(v-txt)"){const S=`${p[0].children}`;g=m(S,y),g||(y.innerHTML=S,g=t.h(n.tag,y))}}}g||(g=t.h(n.tag,y,{default:a.slots.default}))}if(!n.mark&&!n.icon&&!a.slots.mark)return g;let b=null;if(n.icon){const p={[`${e}__mark-wrap`]:!0};n.type&&(p[`${e}__mark-wrap--${n.type}`]=!0);const k={},S=n.color;S&&(k.color=S);const w={class:p,style:k};b=t.h("view",w,t.h(n.icon))}else if(a.slots.mark){const p={[`${e}__mark-wrap`]:!0};n.type&&(p[`${e}__mark-wrap--${n.type}`]=!0);const k={},S=n.color;S&&(k.color=S);const w={class:p,style:k};b=t.h("view",w,{default:a.slots.mark})}else{const p={[`${e}__mark`]:!0};n.type&&(p[`${e}__mark--${n.type??"default"}`]=!0);const k={},S=n.color;S&&(k["background-color"]=S);const w={class:p,style:k};b=t.h("view",w)}const u={class:{"fox-text__wrap":!0,"text-left":n.textPosition==="left","text-right":n.textPosition==="right"}};return t.h("view",u,[b,g])}}}}const{componentName:Gp,create:Zp,scope:Jp}=X("text"),fl=Zp(Qp(Gp,Jp,!1));function _p(e,o,l,n,a){let r=[];Array.isArray(e)?r=e:r=[e];const s=[],i=o[0];if(Array.isArray(e)&&!Array.isArray(i)&&!i[a]){let c=o;for(let d=0;c&&d<r.length;d++){let f=r[d],m=c.find(h=>h[n]===f);if(!m)break;s.push(m[l])}return s}if(Array.isArray(i))for(let c=0;c<o.length&&c<r.length;c++){let d=o[c],f=r[c];const m=d.find(h=>h[n]===f);if(!m)break;s.push(m[l])}else{let c=o;for(let d=0;c&&d<r.length;d++){let f=r[d],m=c.find(h=>h[n]===f);if(!m)break;s.push(m[l]),c=m[a]}}return s}class eh{proxy;constructor(o){this.proxy=o}async load(o,l,n){if(Array.isArray(l))return l;if(typeof l=="function")return await l(n);const a=Ge(this.proxy,o);return a===null?(console.error(`${o} component not found api function`),[]):(Be(n)&&t.isReactive(n)&&(n=t.toRaw(n)),await a(l,n))}}function th(){const e=t.getCurrentInstance();return new eh(e.proxy)}const oh={tag:{type:[String,Object],required:!1,default:"span"},resolveTag:{type:[Boolean],required:!1,default:!1},source:{type:[Array,Function,String],required:!1},sourceType:{type:[String],required:!1,default:"mapping"},params:{type:[Object,String],required:!1},modelValue:{type:[String,Boolean,Number,Array],required:!1},separator:{type:[String,Boolean,Number,Array],required:!1,default:"/"},optionType:{type:String,required:!1},textKey:{type:[String],required:!1,default:"text"},valueKey:{type:[String],required:!1,default:"value"},childrenKey:{type:[String],required:!1,default:"children"},emptyText:{type:[String],required:!1},emptyTag:{type:[String],required:!1,default:"span"},emptyClass:{type:[String],required:!1}};function nh(e,o,l=!1){return{props:{...oh},setup(n,{attrs:a,slots:r}){const s=th(),i=t.ref([]);t.watch([()=>n.source,()=>n.params],async([f,m])=>{i.value=await s.load(n.sourceType,f,m)},{immediate:!0});const c=t.computed(()=>{if(!Array.isArray(i.value)||i.value.length===0)return"";let f=_p(n.modelValue,i.value,n.textKey,n.valueKey,n.childrenKey);return f.length==0?n.emptyText??"":f.length===1?n.optionType=="item"?`${n.modelValue}${n.separator}${f[0]}`:f[0]:f.join(n.separator)}),d=n.resolveTag?t.resolveComponent(n.tag):n.tag;return()=>{const f={...a};return r.default?r.default({text:c.value,value:n.modelValue}):n.resolveTag?n.emptyText!==void 0&&n.emptyText===c.value?t.h(n.emptyTag??"span",{...a,class:n.emptyClass},c.value):t.h(d,f,{default:()=>c.value}):t.h(d,f,c.value)}}}}const{componentName:lh,create:ah,scope:rh}=X("mapping"),ml=ah(nh(lh,rh,!1));function sh(e,o){return{inheritAttrs:!1,props:{name:{type:[String],required:!1,default:""},config:{type:[Object],required:!1,default:{}}},setup(l,{slots:n}){return Pr(l.name,()=>l.config),()=>typeof n.default=="function"?n.default():null}}}const{componentName:LB,create:ih,scope:PB}=X("domain-provider"),pl=ih(sh()),ch={initialVisibleObserverSize:{type:[Number],required:!1},initialInvisibleObserverHeight:{type:[String],required:!1,default:"250px"},disabled:{type:[Boolean],required:!1},loadPolicy:{type:[String],required:!1,default:"rolling"},rootMargin:{type:[String],required:!1,default:"250px 0px 250px 0px"},threshold:{type:[Array],required:!1,default:[0,.25]},root:{type:[Object,String]}};function uh(e,o){return{inheritAttrs:!1,props:ch,setup(l,{slots:n}){if(st&&window.IntersectionObserver){const a=new WeakMap;let r=new Map;const s=(h,y)=>{if(f===null){r.set(h,{visible:null,callback:y});return}a.has(h)&&f.unobserve(h),a.set(h,{visible:null,callback:y}),f.observe(h)},i=h=>{if(f===null){r.delete(h);return}a.has(h)&&(a.delete(h),f.unobserve(h))};let c=l.initialVisibleObserverSize;Ai({acquire:()=>{const h=c>0;return c--,h},get disabled(){return l.disabled},get initialHeight(){return l.initialInvisibleObserverHeight},observe:s,unobserve:i});let f=null;const m=(h,y,g)=>{f=new IntersectionObserver(v=>{for(let b of v){let u=!1;b.intersectionRatio>0&&(u=!0);const p=a.get(b.target);if(p)try{if(l.loadPolicy==="lazy"&&!u&&p.visible!==null)return;p.visible=u,p.callback(u)}catch(k){console.error(k)}}},{root:h,rootMargin:y,threshold:g}),r.forEach((v,b)=>{a.set(b,v),f?.observe(b)}),r.clear()};t.watch([()=>l.root,()=>l.disabled],([h,y])=>{if(y||!h||f)return;let g=null;typeof h=="string"?g=document.querySelector(h):g=h,g&&m(g,l.rootMargin,l.threshold)},{immediate:!0}),t.onUnmounted(()=>{f&&(f.disconnect(),f=null)})}return()=>typeof n.default=="function"?n.default():null}}}const{componentName:RB,create:dh,scope:FB}=X("rolling-provider"),hl=dh(uh()),{componentName:fh,create:mh}=X("cell"),ph=mh({components:{Right:te.Right},props:{title:{type:String,default:""},subTitle:{type:String,default:""},desc:{type:String,default:""},descTextAlign:{type:String,default:"right"},isLink:{type:Boolean,default:!1},roundRadius:{type:[String,Number],default:""},url:{type:String,default:""},center:{type:Boolean,default:!1},size:{type:String,default:""}},emits:["click"],setup(e,{emit:o}){const l=t.computed(()=>{const r=fh;return{[r]:!0,[`${r}--clickable`]:e.isLink,[`${r}--center`]:e.center,[`${r}--large`]:e.size=="large"}}),n=t.computed(()=>({borderRadius:fe(e.roundRadius)}));return{handleClick:r=>{o("click",r)},classes:l,baseStyle:n}}}),hh={key:0,class:"fox-cell__icon"},gh={key:1,class:"fox-cell__title"},yh={class:"title"},vh={class:"fox-cell__title-desc"};function kh(e,o,l,n,a,r){const s=t.resolveComponent("Right");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.baseStyle),onClick:o[0]||(o[0]=(...i)=>e.handleClick&&e.handleClick(...i))},[t.renderSlot(e.$slots,"default",{},()=>[e.$slots.icon?(t.openBlock(),t.createElementBlock("view",hh,[t.renderSlot(e.$slots,"icon")])):t.createCommentVNode("",!0),e.title||e.subTitle||e.$slots.title?(t.openBlock(),t.createElementBlock("view",gh,[e.subTitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(e.$slots,"title",{},()=>[t.createElementVNode("view",yh,t.toDisplayString(e.title),1)]),t.createElementVNode("view",vh,t.toDisplayString(e.subTitle),1)],64)):t.renderSlot(e.$slots,"title",{key:1},()=>[t.createTextVNode(t.toDisplayString(e.title),1)])])):t.createCommentVNode("",!0),e.desc?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass(["fox-cell__value",{"fox-cell__value--alone":!e.title&&!e.subTitle&&!e.$slots.title}]),style:t.normalizeStyle({"text-align":e.descTextAlign})},t.toDisplayString(e.desc),7)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"link",{},()=>[e.isLink?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-cell__link"})):t.createCommentVNode("",!0)])])],6)}const gl=J(ph,[["render",kh]]),{componentName:bh,create:Sh}=X("cell-group"),Ch=Sh({props:{title:{type:String,default:""},desc:{type:String,default:""}},setup(){return{classes:t.computed(()=>({[bh]:!0}))}}}),wh={key:1,class:"fox-cell-group__title"},Nh={key:3,class:"fox-cell-group__desc"},Bh={class:"fox-cell-group__wrap"};function Vh(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[e.$slots.title?t.renderSlot(e.$slots,"title",{key:0}):e.title?(t.openBlock(),t.createElementBlock("view",wh,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.$slots.desc?t.renderSlot(e.$slots,"desc",{key:2}):e.desc?(t.openBlock(),t.createElementBlock("view",Nh,t.toDisplayString(e.desc),1)):t.createCommentVNode("",!0),t.createElementVNode("view",Bh,[t.renderSlot(e.$slots,"default")])],2)}const yl=J(Ch,[["render",Vh]]),{componentName:Ah,create:Th}=X("image"),$h=Th({props:{src:String,fit:{type:String,default:"fill"},position:{type:String,default:"center"},alt:{type:String,default:""},width:{type:String,default:"center"},height:{type:String,default:""},round:{type:Boolean,default:!1},radius:[String,Number],showError:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},lazyLoad:{type:Boolean,default:!1}},components:{Image:te.Image,ImageError:te.ImageError},emits:["click","load","error"],setup(e,{emit:o}){const l=t.reactive({loading:!0,isError:!1,slotLoding:t.useSlots().loading,slotError:t.useSlots().error}),n=t.computed(()=>{const y=Ah;return{[y]:!0,[`${y}-round`]:e.round}}),a=t.ref(null),r=t.ref(!1),s=t.ref(null),i=()=>{const y={threshold:[0],rootMargin:"0px"};a.value=new IntersectionObserver(g=>{g.forEach(v=>{v.isIntersecting&&(r.value=!0,a.value.disconnect())})},y),s.value&&a.value.observe(s.value)};t.onMounted(()=>{e.lazyLoad&&i()}),t.onBeforeUnmount(()=>{a.value&&a.value.disconnect()});const c=t.computed(()=>{let y={};return e.width&&(y.width=fe(e.width)),e.height&&(y.height=fe(e.height)),e.radius!==void 0&&e.radius!==null&&(y.overflow="hidden",y.borderRadius=fe(e.radius)),y}),d=t.computed(()=>({objectFit:e.fit,objectPosition:e.position}));t.watch(()=>e.src,y=>{l.isError=!1,l.loading=!0});const f=()=>{l.loading=!1,o("load")},m=()=>{l.isError=!0,l.loading=!1,o("error")},h=y=>{o("click",y)};return{...t.toRefs(l),imageClick:h,classes:n,styles:d,stylebox:c,error:m,load:f,show:r,imgRef:s}}}),Eh=["src","date-src","alt"],Dh={key:0,class:"fox-img-loading"},xh={key:1,class:"fox-img-error"};function Ih(e,o,l,n,a,r){const s=t.resolveComponent("Image"),i=t.resolveComponent("ImageError");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.stylebox),onClick:o[2]||(o[2]=(...c)=>e.imageClick&&e.imageClick(...c))},[t.createElementVNode("img",{ref:"imgRef",class:"fox-img",src:e.lazyLoad?e.show?e.src:void 0:e.src,"date-src":e.lazyLoad?e.show?void 0:e.src:void 0,alt:e.alt,onLoad:o[0]||(o[0]=(...c)=>e.load&&e.load(...c)),onError:o[1]||(o[1]=(...c)=>e.error&&e.error(...c)),style:t.normalizeStyle(e.styles)},null,44,Eh),e.loading?(t.openBlock(),t.createElementBlock("div",Dh,[e.slotLoding?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(s,{key:0,width:"16px",height:"20px",name:"image"})),t.renderSlot(e.$slots,"loading")])):t.createCommentVNode("",!0),e.isError&&!e.loading?(t.openBlock(),t.createElementBlock("div",xh,[e.slotError?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(i,{key:0,width:"16px",height:"20px",name:"imageError"})),t.renderSlot(e.$slots,"error")])):t.createCommentVNode("",!0)],6)}const vl=J($h,[["render",Ih]]),{create:qh}=X("layout"),kl=qh({}),{componentName:Mh,create:zh}=X("col"),Lh=zh({props:{span:{type:[String,Number],default:"24"},offset:{type:[String,Number],default:"0"}},setup(e){const o=Mh,l=t.inject("gutter"),n=t.computed(()=>({[o]:!0,[`${o}-gutter`]:l,[`fox-col-${e.span}`]:!0,[`fox-col-offset-${e.offset}`]:!0})),a=t.computed(()=>({paddingLeft:l/2+"px",paddingRight:l/2+"px"}));return{classes:n,style:a}}});function Ph(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6)}const bl=J(Lh,[["render",Ph]]),{componentName:Rh,create:Fh}=X("row"),Oh=Fh({props:{type:{type:String,default:""},gutter:{type:[String,Number],default:""},justify:{type:String,default:"start"},align:{type:String,default:"flex-start"},flexWrap:{type:String,default:"nowrap"}},setup(e){const o=Rh;t.provide("gutter",e.gutter);const l=(a,r)=>a?r?`fox-row-${a}-${r}`:"":`fox-row-${r}`;return{classes:t.computed(()=>e.type==="flex"?`
5
+ */function no(e,o="0"){let l=0,n=-1;e[0]=="-"&&(l++,n=1,e=e.substring(1),e.length),o[0]=="-"&&(l++,n=2,o=o.substring(1),o.length),e=Se(e),o=Se(o),[e,o]=$n(Se(e),Se(o)),l==1&&(n==1?e=Uo(e):o=Uo(o));let a=gr(e,o);return l?l==2?"-"+Se(a):e.length<a.length?Se(a.substring(1)):"-"+Se(Uo(a)):Se(a)}function Uo(e){let o="",l=e.length,n=e.split(".")[1],a=n?n.length:0;for(let s=0;s<l;s++)e[s]>="0"&&e[s]<="9"?o+=9-parseInt(e[s]):o+=e[s];let r=a>0?"0."+new Array(a).join("0")+"1":"1";return gr(o,r)}function Se(e){let o=e.split(".");for(o[0]||(o[0]="0");o[0][0]=="0"&&o[0].length>1;)o[0]=o[0].substring(1);return o[0]+(o[1]?"."+o[1]:"")}function $n(e,o){let l=e.split("."),n=o.split("."),a=l[0].length,r=n[0].length;return a>r?n[0]=new Array(Math.abs(a-r)+1).join("0")+(n[0]?n[0]:""):l[0]=new Array(Math.abs(a-r)+1).join("0")+(l[0]?l[0]:""),a=l[1]?l[1].length:0,r=n[1]?n[1].length:0,(a||r)&&(a>r?n[1]=(n[1]?n[1]:"")+new Array(Math.abs(a-r)+1).join("0"):l[1]=(l[1]?l[1]:"")+new Array(Math.abs(a-r)+1).join("0")),e=l[0]+(l[1]?"."+l[1]:""),o=n[0]+(n[1]?"."+n[1]:""),[e,o]}function gr(e,o){[e,o]=$n(e,o);let l="",n=0;for(let a=e.length-1;a>=0;a--){if(e[a]==="."){l="."+l;continue}let r=parseInt(e[a])+parseInt(o[a])+n;l=r%10+l,n=Math.floor(r/10)}return n?n.toString()+l:l}var ye=(e=>(e[e.CEILING=0]="CEILING",e[e.DOWN=1]="DOWN",e[e.FLOOR=2]="FLOOR",e[e.HALF_DOWN=3]="HALF_DOWN",e[e.HALF_EVEN=4]="HALF_EVEN",e[e.HALF_UP=5]="HALF_UP",e[e.UNNECESSARY=6]="UNNECESSARY",e[e.UP=7]="UP",e))(ye||{});function It(e,o=0,l=ye.HALF_EVEN){if(l===ye.UNNECESSARY)throw new Error("UNNECESSARY Rounding Mode has not yet been implemented");typeof e=="number"&&(e=e.toString());let n=!1;e[0]==="-"&&(n=!0,e=e.substring(1));let a=e.split("."),r=a[0],s=a[1];if(o<0){if(o=-o,r.length<=o)return"0";{let c=r.substr(0,r.length-o);return e=c+"."+r.substr(r.length-o)+s,c=It(e,0,l),(n?"-":"")+c+new Array(o+1).join("0")}}if(o==0)return r.length,Aa(a[1],r,n,l)?(n?"-":"")+Ho(r):(n?"-":"")+r;if(a[1]){if(a[1].length<o)return(n?"-":"")+r+"."+a[1]+new Array(o-a[1].length+1).join("0")}else return(n?"-":"")+r+"."+new Array(o+1).join("0");s=a[1].substring(0,o);let i=a[1].substring(o);return i&&Aa(i,s,n,l)&&(s=Ho(s),s.length>o)?(n?"-":"")+Ho(r,parseInt(s[0]))+"."+s.substring(1):(n?"-":"")+r+"."+s}function Aa(e,o,l,n){if(!e||e===new Array(e.length+1).join("0")||n===ye.DOWN||!l&&n===ye.FLOOR||l&&n===ye.CEILING)return!1;if(n===ye.UP||l&&n===ye.FLOOR||!l&&n===ye.CEILING)return!0;let a="5"+new Array(e.length).join("0");if(e>a)return!0;if(e<a)return!1;switch(n){case ye.HALF_DOWN:return!1;case ye.HALF_UP:return!0;case ye.HALF_EVEN:default:return parseInt(o[o.length-1])%2==1}}function Ho(e,o=0){o||(o=1),typeof e=="number"&&e.toString();let l=e.length-1,n="";for(let a=l;a>=0;a--){let r=parseInt(e[a])+o;r==10?(o=1,r=0):o=0,n+=r}return o&&(n+=o),n.split("").reverse().join("")}function tn(e,o){e=e.toString(),o=o.toString();let l=0;e[0]=="-"&&(l++,e=e.substr(1)),o[0]=="-"&&(l++,o=o.substr(1)),e=wt(e),o=wt(o);let n=0,a=0;e.indexOf(".")!=-1&&(n=e.length-e.indexOf(".")-1),o.indexOf(".")!=-1&&(a=o.length-o.indexOf(".")-1);let r=n+a;if(e=wt(e.replace(".","")),o=wt(o.replace(".","")),e.length<o.length){let m=e;e=o,o=m}if(o=="0")return"0";let s=o.length,i=0,c=[],d=s-1,f="";for(let m=0;m<s;m++)c[m]=e.length-1;for(let m=0;m<2*e.length;m++){let h=0;for(let y=o.length-1;y>=d&&y>=0;y--)c[y]>-1&&c[y]<e.length&&(h+=parseInt(e[c[y]--])*parseInt(o[y]));h+=i,i=Math.floor(h/10),f=h%10+f,d--}return f=wt(Ts(f,r)),l==1&&(f="-"+f),f}function Ts(e,o){return o==0?e:(e=o>=e.length?new Array(o-e.length+1).join("0")+e:e,e.substr(0,e.length-o)+"."+e.substr(e.length-o,o))}function wt(e){for(;e[0]=="0";)e=e.substr(1);if(e.indexOf(".")!=-1)for(;e[e.length-1]=="0";)e=e.substr(0,e.length-1);return e==""||e=="."?e="0":e[e.length-1]=="."&&(e=e.substr(0,e.length-1)),e[0]=="."&&(e="0"+e),e}function on(e,o,l=8){if(o==0)throw new Error("Cannot divide by 0");if(e=e.toString(),o=o.toString(),e=e.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),o=o.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),e==0)return"0";let n=0;o[0]=="-"&&(o=o.substring(1),n++),e[0]=="-"&&(e=e.substring(1),n++);var a=o.indexOf(".")>0?o.length-o.indexOf(".")-1:-1;if(o=Se(o.replace(".","")),a>=0){let d=e.indexOf(".")>0?e.length-e.indexOf(".")-1:-1;if(d==-1)e=Se(e+new Array(a+1).join("0"));else if(a>d)e=e.replace(".",""),e=Se(e+new Array(a-d+1).join("0"));else if(a<d){e=e.replace(".","");let f=e.length-d+a;e=Se(e.substring(0,f)+"."+e.substring(f))}else a==d&&(e=Se(e.replace(".","")))}let r=0,s=o.length,i="",c=e.indexOf(".")>-1&&e.indexOf(".")<s?e.substring(0,s+1):e.substring(0,s);if(e=e.indexOf(".")>-1&&e.indexOf(".")<s?e.substring(s+1):e.substring(s),c.indexOf(".")>-1){let d=c.length-c.indexOf(".")-1;c=c.replace(".",""),s>c.length&&(d+=s-c.length,c=c+new Array(s-c.length+1).join("0")),r=d,i="0."+new Array(d).join("0")}for(l=l+2;r<=l;){let d=0;for(;parseInt(c)>=parseInt(o);)c=no(c,"-"+o),d++;i+=d,e?(e[0]=="."&&(i+=".",r++,e=e.substring(1)),c=c+e.substring(0,1),e=e.substring(1)):(r||(i+="."),r++,c=c+"0")}return(n==1?"-":"")+Se(It(i,l-2))}function nn(e,o){return e=e.toString(),o=o.toString(),o=ln(o),no(e,o)}function ln(e){return e[0]=="-"?e=e.substr(1):e="-"+e,e}function Ta(e,o){if(o==0)throw new Error("Cannot divide by 0");e=e.toString(),o=o.toString(),$a(e),$a(o);let l="";e[0]=="-"&&(l="-",e=e.substr(1)),o[0]=="-"&&(o=o.substr(1));let n=nn(e,tn(o,It(on(e,o),0,ye.FLOOR)));return l+n}function $a(e){if(e.indexOf(".")!=-1)throw new Error("Modulus of non-integers not supported")}function Ea(e,o){let l=!1;if(e[0]=="-"&&o[0]!="-")return-1;if(e[0]!="-"&&o[0]=="-")return 1;if(e[0]=="-"&&o[0]=="-"&&(e=e.substr(1),o=o.substr(1),l=!0),[e,o]=$n(e,o),e.localeCompare(o)==0)return 0;for(let n=0;n<e.length;n++)if(e[n]!=o[n])return e[n]>o[n]?l?-1:1:l?1:-1;return 0}class re{value;static RoundingModes=ye;static validate(o){if(o){if(o=o.toString(),isNaN(o))throw Error("Parameter is not a number: "+o);o[0]=="+"&&(o=o.substring(1))}else o="0";if(o.startsWith(".")?o="0"+o:o.startsWith("-.")&&(o="-0"+o.substr(1)),/e/i.test(o)){let[l,n]=o.split(/[eE]/);l=Se(l);let a="";l[0]=="-"&&(a="-",l=l.substring(1)),l.indexOf(".")>=0?(n=parseInt(n)+l.indexOf("."),l=l.replace(".","")):n=parseInt(n)+l.length,l.length<n?o=a+l+new Array(n-l.length+1).join("0"):l.length>=n&&n>0?o=a+Se(l.substring(0,n))+(l.length>n?"."+l.substring(n):""):o=a+"0."+new Array(-n+1).join("0")+l}return o}constructor(o="0"){this.value=re.validate(o)}getValue(){return this.value}static getPrettyValue(o,l,n){if(!(l||n))l=3,n=",";else if(!(l&&n))throw Error("Illegal Arguments. Should pass both digits and separator or pass none");o=re.validate(o);let a=o.charAt(0)=="-";a&&(o=o.substring(1));var r=o.indexOf(".");r=r>0?r:o.length;for(var s="",i=r;i>0;)i<l?(l=i,i=0):i-=l,s=o.substring(i,i+l)+(i<r-l&&i>=0?n:"")+s;return(a?"-":"")+s+o.substring(r)}getPrettyValue(o,l){return re.getPrettyValue(this.value,o,l)}static round(o,l=0,n=ye.HALF_EVEN){if(o=re.validate(o),isNaN(l))throw Error("Precision is not a number: "+l);return It(o,l,n)}round(o=0,l=ye.HALF_EVEN){if(isNaN(o))throw Error("Precision is not a number: "+o);return new re(It(this.value,o,l))}static floor(o){return o=re.validate(o),o.indexOf(".")===-1?o:re.round(o,0,ye.FLOOR)}floor(){return this.value.indexOf(".")===-1?new re(this.value):new re(this.value).round(0,ye.FLOOR)}static ceil(o){return o=re.validate(o),o.indexOf(".")===-1?o:re.round(o,0,ye.CEILING)}ceil(){return this.value.indexOf(".")===-1?new re(this.value):new re(this.value).round(0,ye.CEILING)}static add(o,l){return o=re.validate(o),l=re.validate(l),no(o,l)}add(o){return new re(no(this.value,o.getValue()))}static subtract(o,l){return o=re.validate(o),l=re.validate(l),nn(o,l)}subtract(o){return new re(nn(this.value,o.getValue()))}static multiply(o,l){return o=re.validate(o),l=re.validate(l),tn(o,l)}multiply(o){return new re(tn(this.value,o.getValue()))}static divide(o,l,n){return o=re.validate(o),l=re.validate(l),on(o,l,n)}divide(o,l){return new re(on(this.value,o.getValue(),l))}static modulus(o,l){return o=re.validate(o),l=re.validate(l),Ta(o,l)}modulus(o){return new re(Ta(this.value,o.getValue()))}static compareTo(o,l){return o=re.validate(o),l=re.validate(l),Ea(o,l)}compareTo(o){return Ea(this.value,o.getValue())}static negate(o){return o=re.validate(o),ln(o)}negate(){return new re(ln(this.value))}}function yr(e,o){return re.multiply(`${e}`,`${o}`)}function En(e,o,l=8){return re.divide(`${e}`,`${o}`,l)}function an(e,o){return e=`${e}`,o=`${o}`,re.compareTo(e,o)}function vr(e){return re.negate(e)}function mo(e,o=-1,l=!1,n=3,a=","){let r=`${e}`;if(r.length==0||r==="-")return"";let s=r.charAt(0);s=="-"?r=r.substring(1):s="";let i=r,c="",d=r.indexOf(".");d!=-1&&(i=r.substring(0,d),c=r.substring(d+1)),o!=-1&&(o<c.length?c=c.substring(0,o):l&&o>c.length&&(c=c.padEnd(o,"0")));let f;if(n>0){let m="",h=i.split("").reverse();for(let y=0;y<h.length;y++)m+=h[y]+((y+1)%n==0&&y+1!=h.length?a:"");c.length==0?f=`${s}${m.split("").reverse().join("")}`:f=`${s}${m.split("").reverse().join("")}.${c}`}else c.length==0?f=`${s}${i}`:f=`${s}${i}.${c}`;return f}function kr(e){let o=`${e}`,l=o.charAt(0);l=="-"?o=o.substring(1):l="";let n=o.replace(/[^\d\.-]/g,"");return`${l}${n}`}const st=typeof window<"u",Le=je;function br(e){return e==null}const po=Array.isArray,$s=e=>ho(e)==="[object Map]",Es=e=>ho(e)==="[object Set]",Fe=e=>e instanceof Date,lo=e=>typeof e=="function",Sr=e=>typeof e=="string",Ds=e=>typeof e=="symbol",Be=e=>e!==null&&typeof e=="object",Dn=e=>Be(e)&&lo(e.then)&&lo(e.catch),Cr=Object.prototype.toString,ho=e=>Cr.call(e),rn=e=>ho(e)==="[object Object]",wr=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function xs(e){return e.__esModule||wr&&e[Symbol.toStringTag]==="Module"}const Is=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function nt(...e){let o=e[0]!==void 0&&e[0]!==null?e[0]:{},l=1,n=e.length,a=!1;for(typeof o=="boolean"&&(a=o,o=e[l]??{},l++),typeof o!="object"&&(o={});l<n;l++)if(e[l]!==null&&e[l]!==void 0){let r=e[l];for(let s in r){let i=o[s],c=r[s];if(i!==c)if(a===!0&&c&&typeof c=="object"){let d;Array.isArray(c)?d=i&&Array.isArray(i)?i:[]:d=i&&typeof i=="object"?i:{},o[s]=nt(a,d,c)}else c!==void 0&&(o[s]=c)}}return o}function sn(e,o,l=!1){if(!l)nt(!0,e,o);else{if(typeof o!="object")return{};typeof e!="object"&&(e={});for(let a in o){let r=e[a],s=o[a];if(r!==s)if(typeof s=="object"){if(!Array.isArray(s)&&!rn(s))continue;r=sn(r,s,l),e[a]=r}else{if(typeof s=="function")continue;e[a]=s}}const n=Object.getOwnPropertySymbols(o);for(let a of n){let r=e[a],s=o[a];if(r!==s)if(typeof s=="object"){if(!Array.isArray(s)&&!rn(s))continue;r=sn(r,s,l),e[a]=r}else{if(typeof s=="function")continue;e[a]=s}}}return e}const jo=Is?Promise.resolve():null;function qs(e,...o){jo!==null?o&&o.length>0?jo.then(()=>{e(o)}):jo.then(e):o&&o.length>0?setTimeout(()=>{e(o)}):setTimeout(e)}function pe(e){return e==null?!1:typeof e=="boolean"?e:typeof e=="string"?e.toLocaleLowerCase()==="true":!!e}function me(e){return typeof e=="number"?e:Number(e)}const Ms={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Object]":"object"};function lt(e){let l=Object.prototype.toString.call(e);return e==null?String(e):Ms[l]||"object"}function go(e){if(!e)return!0;const{display:o}=window.getComputedStyle(e);return o==="none"}function Nr(e){return e&&typeof e=="object"&&"setInterval"in e}function Br(e){let o=!!e&&"length"in e&&e.length,l=lt(e);return l==="function"||Nr(e)?!1:l==="array"||o===0||typeof o=="number"&&o>0&&o-1 in e}function Vr(e,o){let l=+o.length,n=0,a=e.length;for(;n<l;n++)e[a++]=o[n];return e.length=a,e}function zs(e,o=[]){let l=o;return e!=null&&(Br(Object(e))?Vr(l,typeof e=="string"?[e]:e):l.push(e)),l}function xe(e,o){if(e==o)return!0;if(e===void 0||o===void 0)return!1;let l=lt(e),n=lt(o);if(l!==n)return!1;if(l==="object"){let a=Object.keys(e),r=Object.keys(o);if(a.length!==r.length)return!1;for(let s=0;s<a.length;s++){let i=a[s],c=e[i],d=o[i];if(!xe(c,d))return!1}return!0}else if(l==="array"){if(e.length!==o.length)return!1;for(let a=0;a<e.length;a++){let r=e[a],s=o[a];if(!xe(r,s))return!1}return!0}return!1}function Ar(e){return Object.prototype.toString.call(e)==="[object RegExp]"}const ie=e=>e==null?!0:typeof e!="string"?!1:e.length===0;function Tr(e){return ie(e)?!0:(e.charAt(0)=="-"&&(e=e.substring(1)),ie(e)||/^(([1-9][0-9]*\.[0-9]*)|([0]\.[0-9]*)|([0-9]*)|([0]{1}))$/.test(e))}function $r(e){if(e==null)return 0;let o=`${e}`;if(o.length==0)return 0;o.charAt(0)=="-"&&(o=o.substring(1)),o=o.replace(/[^\d\.-]/g,"");const l=o.indexOf(".");return l==-1?o.length:l}function Er(e){if(e==null)return 0;const o=`${e}`;if(o.length==0)return 0;const l=o.indexOf(".");return l==-1?0:o.length-(l+1)}function Da(e,o,l){const n=e.indexOf(o);return n===-1?e:o==="-"&&n!==0?e.slice(0,n):e.slice(0,n+1)+e.slice(n).replace(l,"")}function cn(e,o=!0,l=!0){o?e=Da(e,".",/\./g):e=e.replace(/\./g,""),l?e=Da(e,"-",/-/g):e=e.replace(/-/,"");const n=o?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(n,"")}function Ls(e,o){return typeof e=="object"||Array.isArray(e)?o.findIndex(l=>{if(xe(e,l))return!0}):o.indexOf(e)}function Ps(e,o){if(typeof e=="object"||Array.isArray(e)){let l=o.reverse().findIndex(n=>{if(xe(e,n))return!0});return l!==-1&&(l=o.length-1-l),l}return o.lastIndexOf(e)}function ge(e){return e==null||e==null?0:typeof e=="string"?e.length:`${e}`.length}function he(e,...o){const l={};return o.forEach(n=>{for(const a in n)l[a]=e[a]}),l}function xn(e,...o){const l=[];o.forEach(a=>{Reflect.apply([].push,l,Reflect.ownKeys(a))});const n={};for(const a in e)l.includes(a)||(n[a]=e[a]);return n}const Dr=(e,o,l)=>{const n=Object.assign({},e),a=Object.assign({},l);return Object.keys(o).length>0?(Object.keys(n).forEach(r=>{a.hasOwnProperty(r)?typeof a[r]=="string"&&(n[r]=o[a[r]]):o[r]&&(n[r]=o[r])}),n):e};function un(e,o){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),o&&e.stopPropagation()}const Je=(e,o=2)=>{for(e+="";e.length<o;)e="0"+e;return e.toString()},Pe=(e,o,l)=>Math.min(Math.max(e,o),l),In=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,ke=Symbol.for("BroadcastKey");class qn{parent;children=[];callbacks=new Map;proxy=null;name;constructor(o,l,n){this.parent=o,this.proxy=l,this.name=n,o!==null&&o.addChild(this)}addChild(o){this.children.push(o)}removeChild(o){const l=this.children.findIndex(n=>o===n);l!==-1&&this.children.splice(l,1)}destroy(){this.parent!==null&&this.parent.removeChild(this),this.parent=null,this.proxy=null}emit(o,l,...n){if(o.maxLevel!==void 0&&o.maxLevel!==null&&o.maxLevel>0){if(o.level=o.level??0,o.level>o.maxLevel)return[];o.level++}let a=!1;!o.name||o.name==="*"?a=!0:!o.name||o.name==="+"?(a=!1,o.name="*"):Ar(o.name)&&this.name&&o.name.test(this.name)?a=!0:typeof o.name=="function"?a=Reflect.apply(o.name,null,[this.name]):o.name===this.name&&(a=!0);const r=[];if(a){const s=this.callbacks.get(l);if(typeof s=="function"){const c=Reflect.apply(s,this.proxy,[...n]);c!=null&&r.push(c)}const i=this.proxy??{};if(typeof i[l]=="function"){const c=Reflect.apply(i[l],i,[...n]);c!=null&&r.push(c)}}return this.children.forEach(s=>{const i=Reflect.apply(s.emit,s,[{...o},l,...n]);i!=null&&Array.isArray(i)&&Reflect.apply([].push,r,[...i])}),r}emitToChildren(o,l,...n){const a=[];return this.children.forEach(r=>{const s=Reflect.apply(r.emit,r,[{...o},l,...n]);s!=null&&Array.isArray(s)&&Reflect.apply([].push,a,[...s])}),a}on(o,l){this.callbacks.set(o,l)}}function yo(e,o,l,n){const a=new qn(o,e,l);if(n&&typeof n=="object")for(const r in n)a.on(r,n[r]);return a}function Rs(e,o,l){const n=l;if(n[ke])return n[ke];const a=t.inject(ke,null),r=new qn(a,l,e);if(o&&typeof o=="object")for(const s in o)r.on(s,o[s]);return n[ke]=r,t.provide(ke,r),t.onUnmounted(()=>{r.destroy(),n[ke]=void 0}),r}function $t(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[ke]??t.inject(ke,null):t.inject(ke,null)}const et=e=>e.default??e;class Fs{error(o,l){const n=l,a=$t(l);a?a.emit({name:"*",maxLevel:1},"setErrorTip",o):typeof n.setErrorTip=="function"&&n.setErrorTip(o)}reset(o){const l=o,n=$t(o);n?n.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof l.setErrorTip=="function"&&l.setErrorTip("")}success(o){const l=o,n=$t(o);n?n.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof l.setErrorTip=="function"&&l.setErrorTip("")}decorate(o,l,n){Array.isArray(o)||(o=[o]);const a=n,r=$t(n),s=l.find(c=>c.required===!0||c.type==="required"&&c.required!==!1),i=o.find(c=>c.required===!0||c.type==="required"&&c.required!==!1);!s&&i?r?r.emit({name:"*"},"setRequired",!0):typeof a.setRequired=="function"&&a.setRequired(!0):s&&!i&&(r?r.emit({name:"*"},"setRequired",!1):typeof a.setRequired=="function"&&a.setRequired(!1),this.reset(n))}getValue(o){return o.modelValue}}let xr=new Fs;function Os(e){xr=e}function Ks(e,o){et(_e).setValidator(e,o)}function Us(e){et(_e).deleteValidator(e)}let Ir=["blur","clear"];function Hs(e){Ir=e}function qr(){return Ir}let Mr=["focus","change"];function js(e){Mr=e}function zr(){return Mr}function Ws(e){et(_e).messages(e)}function Nt(...e){const o=[];return e.forEach(l=>{l.forEach(n=>{const a=o.findIndex(r=>r.type===n.type);a!==-1&&o.splice(a,1),o.push(n)})}),o}function Xt(e){return e.forEach(o=>{o.type==="required"&&(o.required===null||o.required===void 0)&&(o.required=!0),!o.type&&(o.required===!0||o.required===!1)&&(o.type="required")}),e}const Re=Symbol("ValidateSchemaKey");class Lr{parent=null;validators={};attrRules=[];rules=[];descriptor;proxy;scope=null;constructor(o,l,n){this.parent=o,this.descriptor=l,this.proxy=n,(this.descriptor.validate??!0)&&this.init()}init(){if(this.descriptor.pureDataValidate===!0||!this.descriptor.valueName||!this.proxy)return;let o=this.proxy.$attrs;o&&(this.scope=t.effectScope(),this.scope.run(()=>{t.watchEffect(()=>{const l=Xt(Nt(this.attrRules,this.rules)),n=[];for(let r in o){let s=o[r];if(this.hasValidator(r,!0)){if(s===!1)continue;let c={type:r};s!==null&&typeof s=="object"&&Object.assign(c,s),n.push(c);continue}let i=this.getValidator(r);if(i!==null){let c={type:r,validator:i};n.push(c)}}this.attrRules=Xt(n);const a=Nt(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(a,l)})})}))}destroy(){this.scope&&(this.scope.stop(),this.scope=null),this.parent=null}execHandler(o,...l){const n=this.descriptor.validateHandler;if(n&&typeof n[o]=="function")return Reflect.apply(n[o],n,[...l]);const a=xr;return a&&typeof a[o]=="function"?Reflect.apply(a[o],a,[...l]):null}decorate(o,l){this.descriptor.pureDataValidate!==!0&&this.execHandler("decorate",o,l,this.proxy)}success(){this.descriptor.pureDataValidate!==!0&&this.execHandler("success",this.proxy)}error(o){this.descriptor.pureDataValidate!==!0&&this.execHandler("error",o,this.proxy)}getValue(){return this.proxy===null?null:this.execHandler("getValue",this.proxy)}setValidator(o,l,n=!1){n?et(_e).setValidator(o,l):this.validators[o]=l}getValidator(o){let l=this.validators[o]??null;return l||(l=this.parent?.getValidator(o)??null),l}deleteValidator(o,l=!1){l?et(_e).deleteValidator(o):Reflect.deleteProperty(this.validators,o)}hasValidator(o,l=!1){if(l)return et(_e).hasValidator(o);{let n=Reflect.has(this.validators,o);return!n&&this.parent!==null&&(n=this.parent.hasValidator(o,!1)),n}}setRule(o){const l=Nt(this.attrRules,this.rules);o===null?this.rules=[]:Array.isArray(o)?this.rules=Xt(o):this.rules=Xt([o]);const n=Nt(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(n,l)})}clear(){this.proxy===null||this.descriptor.pureDataValidate===!0||this.execHandler("reset",this.proxy)}validate(){if(this.descriptor.validate??!0){let l=Nt(this.attrRules,this.rules);const n=this.descriptor.fieldName??"value";if(l.length>0){const a={[`${n}`]:l},r=this.getValue(),s={[`${n}`]:r},i=et(_e),c=new i(a),d=this.proxy??s;return c.validate(s,{context:d}).then(m=>{if(m.pass)this.success();else{let h="error";Array.isArray(m.errors)&&m.errors.length>0&&(h=m.errors[0].message??h,m.errors=[m.errors[0]],m.errors[0].ref=d),this.error(h)}return m}).catch(m=>{const h=m.message??`${m}`;return this.error(h),m})}}return Promise.resolve({pass:!0})}}function vo(e,o,l){if(l.valueName=l.valueName??"modelValue",l.valueType=l.valueType??"string",!l.validateHandler&&l.valueName!=="modelValue"){const a=l.valueName;l.validateHandler={getValue(r){return r[a]}}}return new Lr(o,l,e)}const xa=Symbol("EventEmitterKey");class Ys{register=new Map;proxy;constructor(o){this.proxy=o}destroy(){this.proxy=null,this.register.clear()}off(o,l){let n=this.register.get(o);if(n&&Array.isArray(n)){let a=n.findIndex(r=>r===l);a!==-1&&n.splice(a,1)}}on(o,l){let n=this.register.get(o);n||(n=new Array,this.register.set(o,n)),n.push(l)}emit(o,...l){const n=this.register.get(o);n&&n.forEach(a=>{try{Reflect.apply(a,null,[o,...l])}catch(r){console.error(r.message,r)}}),this.proxy&&Reflect.apply(this.proxy.$emit,this.proxy,[o,...l])}}function ht(e,o){let l=null;return function(...n){l&&clearTimeout(l),l=setTimeout(()=>{l=null,Reflect.apply(e,null,[...n])},o)}}function ao(e,o){let l=0;return function(...n){const a=new Date().getTime();a-l<o||(l=a,Reflect.apply(e,null,[...n]))}}function Xs(e,o){const l=ht((n,a)=>{e=n,a()},o);return t.customRef((n,a)=>({get(){return n(),e},set(r){l(r,a)}}))}function Qs(e){let o=!1;return function(...l){o||(o=!0,Reflect.apply(e,null,[...l]))}}function Mn(e,o,l,n=0,a=!0){let r=o,s=0;if(a){const c=e();if(s++,c||s>l)return}const i=()=>{const c=e();s++,!(c||s>l)&&(r+=n,setTimeout(i,r))};setTimeout(i,r)}const De=Symbol("DomainKey"),ut=Symbol("DataItemsKey");class ko{_parent=null;get parent(){return this._parent}set parent(o){this._parent=o}_name=null;get name(){return this._name}_broadcast=null;get broadcast(){return this._broadcast}set broadcast(o){this._broadcast=o}_validateSchema=null;get validateSchema(){return this._validateSchema}set validateSchema(o){this._validateSchema=o}_props=t.reactive({});constructor(o=null){this._name=o}destroy(){this._parent=null,this._broadcast=null,this._validateSchema=null,this._props={}}merge(o,l=[]){for(const n in o){const a=o[n];l.length>0&&l.indexOf(a)!==-1||(this._props[n]=a)}}has(o){if(Reflect.has(this._props,o)){const l=this._props[o];if(l!=null)return!0}return this.parent==null?!1:this.parent.has(o)}delete(o){Reflect.deleteProperty(this._props,o)}set(o,l){this._props[o]=l}get(o,l){if(Reflect.has(this._props,o)){const n=this._props[o];if(n!=null)return n}return this.parent==null?l:this.parent.get(o,l)}getForParent(o,l){return this.parent==null?l:this.parent.get(o,l)}getForSelf(o){return this._props[o]}getAll(o){const l=[];let n=this;for(;n!=null;){if(Reflect.has(n._props,o)){const a=n._props[o];l.push(a)}n=n._parent}return l}}const Gs=new ko;function mt(){return Gs}function Oe(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[De]??t.inject(De,null):t.inject(De,null)}const Wo=Symbol("OriginalDateKey");function zn(e,o,l=[],n){const a=t.getCurrentInstance(),r=a?.proxy;let s=t.inject(De,null);s===null&&(s=mt());const i=e||o.prop||o.name,c=new ko(i);c.parent=s;const d=v=>{r[Wo]||h(v),c.set("modelValue",v)},f=()=>c.getForSelf("modelValue")??null,m=()=>r[Wo]??null,h=v=>{const b={};nt(!0,b,t.toRaw(v)),r[Wo]=b};t.isReactive(o)||typeof o=="function"?t.watch(o,v=>{c.merge(v,l)},{immediate:!0}):c.merge(o,l),o.modelValue&&h(o.modelValue),r[De]=c,t.provide(De,c);let y=null,g=null;if(a!==null){const v=t.inject(ke,null);y=yo(r,v,i,n),c.broadcast=y,r[ke]=y,t.provide(ke,y),r.broadcast=(u,p,...k)=>Reflect.apply(y.emit,y,[u,p,...k]);const b=t.inject(Re,null);g=vo(r,b,{componentName:""}),c.validateSchema=g,r[Re]=g,t.provide(Re,g),r[ut]=new Map,r.validate=(u=!0)=>{const p=[];let k=null;const S={deep:!1};if(u===!0)k={name:"*"};else if(Array.isArray(u)&&u.length>0){const w=u;k={name:N=>N?w.indexOf(N)!==-1:!1}}else if(u!=null&&typeof u=="object"){const w=u;if(S.ignoreHidden=w.ignoreHidden,Array.isArray(w.include)&&w.include.length>0){const N=w.include;k={name:T=>T?N.indexOf(T)!==-1:!1}}else if(Array.isArray(w.exclude)&&w.exclude.length>0){const N=w.exclude;k={name:T=>T?N.indexOf(T)===-1:!1}}else k={name:"*"}}if(k){const w=y?.emitToChildren(k,"validate",S);w&&Reflect.apply([].push,p,w)}return p.length==1?p[0]:p.length>1?Promise.all(p).then(w=>{let N=[];return w.forEach(T=>{T.pass===!1&&Array.isArray(T.errors)&&(N=[...N,...T.errors])}),N.length>0?{pass:!1,errors:N}:{pass:!0}}):Promise.resolve({pass:!0})},r.setNameValidateRules=(u,p=!0,k=!1)=>{if(k===!0){Reflect.ownKeys(u).forEach(w=>{let N=String(w);const B=Fr(c,N,{componentName:"",fieldName:N,pureDataValidate:!0},y,g);r[ut].set(N,B);const D=u[N];D&&B.validateSchema.setRule(D)});return}if(p){const S=Reflect.ownKeys(u),w={name:N=>S.includes(N)};y?.emitToChildren(w,"setNameValidateRules",u,!1)}},r.clearValidate=(u=!0)=>{let p=null;if(u===!0)p={name:"*"};else if(Array.isArray(u)&&u.length>0){const k=u;p={name:S=>S?k.indexOf(S)!==-1:!1}}else if(u!=null&&typeof u=="object"){const k=u;if(Array.isArray(k.include)&&k.include.length>0){const S=k.include;p={name:w=>w?S.indexOf(w)!==-1:!1}}else if(Array.isArray(k.exclude)&&k.exclude.length>0){const S=k.exclude;p={name:w=>w?S.indexOf(w)===-1:!1}}else p={name:"*"}}p&&y?.emitToChildren(p,"clearValidate",!1)},r.resetFields=u=>{const p=f();if(!p)return;const k={};if(nt(!0,k,m()??{}),Array.isArray(u))u.forEach(S=>{p[S]=k[S]});else if(u&&Array.isArray(u.include))(u.include??[]).forEach(w=>{p[w]=k[w]});else if(u&&Array.isArray(u.exclude)){let S=u.exclude??[];Reflect.ownKeys(k).forEach(w=>{S.includes(w)||(p[w]=k[w])})}else Object.assign(p,k);r.clearValidate(u)},r.setModelValue=(u,p)=>{!p||p===i?d(u):y?.emitToChildren({name:p},"setModelValue",u)},r.getModelValue=()=>f()}return t.onUnmounted(()=>{c.destroy(),r[De]=void 0,r[ut]&&(r[ut].clear(),r[ut]=void 0),y!==null&&(y.destroy(),r[ke]=void 0),g!==null&&(g.destroy(),r[Re]=void 0)}),c}function Pr(e,o,l=[]){const a=t.getCurrentInstance()?.proxy;let r=t.inject(De,null);r===null&&(r=mt());const s=e||o.prop||o.name,i=new ko(s);return i.parent=r,t.isReactive(o)||typeof o=="function"?t.watch(o,c=>{i.merge(c,l)},{immediate:!0}):i.merge(o,l),a[De]=i,t.provide(De,i),t.onUnmounted(()=>{i.destroy(),a[De]=void 0}),i}function Rr(e,o,l){const a=Oe(e)?.get("rules");if(!a)return;let r=a[l];r&&(Array.isArray(r)||(r=[r]),o.setRule(r))}function we(e,o,l){const a=t.getCurrentInstance()?.proxy,r=o??"",s=t.inject(ke,null),i=yo(a,s,r,l);a[ke]=i,t.provide(ke,i),a.broadcast=(g,v,...b)=>Reflect.apply(i.emit,i,[g,v,...b]);const c=t.inject(Re,null);e.fieldName=e.fieldName??r;const d=vo(a,c,e);a[Re]=d,t.provide(Re,d),Rr(a,d,r),a.validate=(g=null)=>{const v=[];let b=!1,u=!1;if(Array.isArray(g)&&g.indexOf(r)!==-1)u=!0,b=!0;else if(g&&typeof g=="object"){const p=g;p.ignoreHidden===!0&&go(a.$el)?u=!1:(Array.isArray(p.include)&&p.include.indexOf(r)!==-1||Array.isArray(p.exclude)&&p.exclude.indexOf(r),u=!0),b=p.deep??!1}else typeof g=="boolean"&&(b=g),u=!0;if(u){const p=d?.validate();v.push(p)}if(b){let p=null;const k={deep:!1};if(g===!0)p={name:"*"};else if(Array.isArray(g)&&g.length>0){const S=g;p={name:w=>w?S.indexOf(w)!==-1:!1}}else if(g!=null&&typeof g=="object"){const S=g;if(k.ignoreHidden=S.ignoreHidden,Array.isArray(S.include)&&S.include.length>0){const w=S.include;p={name:N=>N?w.indexOf(N)!==-1:!1}}else if(Array.isArray(S.exclude)&&S.exclude.length>0){const w=S.exclude;p={name:N=>N?w.indexOf(N)===-1:!1}}else p={name:"*"}}if(p){const S=i.emitToChildren(p,"validate",k);Reflect.apply([].push,v,S)}}return v.length==1?v[0]:v.length>1?Promise.all(v).then(p=>{let k=[];return p.forEach(S=>{S.pass===!1&&Array.isArray(S.errors)&&(k=[...k,...S.errors])}),k.length>0?{pass:!1,errors:k}:{pass:!0}}):Promise.resolve({pass:!0})},a.setValidateRule=g=>d?.setRule(g),a.setNameValidateRules=(g,v=!1)=>{const b=g[r];if(b&&d?.setRule(b),v){const u={name:p=>Reflect.ownKeys(g).includes(p)};i.emitToChildren(u,"setNameValidateRules",g,!1)}},a.clearValidate=(g=null)=>{(!Array.isArray(g)||g.indexOf(o??"")!==-1)&&d?.clear();let v=null;if(g===!0)v={name:"*"};else if(Array.isArray(g)&&g.length>0){const b=g;v={name:u=>u?b.indexOf(u)!==-1:!1}}else if(g!=null&&typeof g=="object"){const b=g;if(Array.isArray(b.include)&&b.include.length>0){const u=b.include;v={name:p=>p?u.indexOf(p)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const u=b.exclude;v={name:p=>p?u.indexOf(p)===-1:!1}}else v={name:"*"}}v&&i.emitToChildren(v,"clearValidate",!1)};const f=new Ys(a);a[xa]=f;const m=ht((g="validate")=>{g==="reset"?d.clear():d.validate()},60);return(Array.isArray(e.validateCheckEvents)?e.validateCheckEvents:qr()).forEach(g=>{f.on(g,v=>{m("validate")})}),(Array.isArray(e.validateResetEvents)?e.validateResetEvents:zr()).forEach(g=>{f.on(g,v=>{m("reset")})}),t.onUnmounted(()=>{i.destroy(),a[ke]=void 0,d.destroy(),a[Re]=void 0,f.destroy(),a[xa]=void 0}),{broadcast:i,validateSchema:d,emitEvent:(g,...v)=>{Reflect.apply(f.emit,f,[g,...v])},onEvent:(g,v)=>{Reflect.apply(f.on,f,[v])},offEvent:(g,v)=>{Reflect.apply(f.off,f,[v])}}}function Fr(e,o,l,n,a){const r={},s=o??"",i={getValue(){const f=e.getForSelf("modelValue");return f?f[s]:null},isExist(){const f=e.getForSelf("modelValue");return f?Reflect.has(f,s):!1}};l.fieldName=s,l.validateHandler={getValue(f){return i.getValue()}};const c=vo({},a,l);r.validate=(f=null)=>{if(!i.isExist())return console.warn(`validate error: field [${s}] not exist`),Promise.resolve({pass:!0});const m=[];let h=!1,y=!1;if(Array.isArray(f)&&f.indexOf(s)!==-1)y=!0,h=!0;else if(f&&typeof f=="object"){const g=f;Array.isArray(g.include)&&g.include.indexOf(s)!==-1||Array.isArray(g.exclude)&&g.exclude.indexOf(s),y=!0,h=g.deep??!1}else typeof f=="boolean"&&(h=f),y=!0;if(y){const g=c?.validate();m.push(g)}if(h){let g=null;const v={deep:!1};if(f===!0)g={name:"*"};else if(Array.isArray(f)&&f.length>0){const b=f;g={name:u=>u?b.indexOf(u)!==-1:!1}}else if(f!=null&&typeof f=="object"){const b=f;if(Array.isArray(b.include)&&b.include.length>0){const u=b.include;g={name:p=>p?u.indexOf(p)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const u=b.exclude;g={name:p=>p?u.indexOf(p)===-1:!1}}else g={name:"*"}}if(g){const b=d.emitToChildren(g,"validate",v);Reflect.apply([].push,m,b)}}return m.length==1?m[0]:m.length>1?Promise.all(m).then(g=>{let v=[];return g.forEach(b=>{b.pass===!1&&Array.isArray(b.errors)&&(v=[...v,...b.errors])}),v.length>0?{pass:!1,errors:v}:{pass:!0}}):Promise.resolve({pass:!0})},r.setValidateRule=f=>c?.setRule(f),r.setNameValidateRules=f=>{const m=f[s];m&&c?.setRule(m)};const d=yo(null,n,s,r);return{broadcast:d,validateSchema:c}}const fe=e=>e?`${se(e)}px`:"";function se(e,o=-1){if(typeof e=="number")return e>0&&e<1&&o>0?e*o:e;if(e=e.trim().toLocaleLowerCase(),e.length===0)return 0;let l=e.indexOf("px");if(l!==-1)return Number(e.substring(0,l));if(l=e.indexOf("rem"),l!==-1){let a=Number(e.substring(0,l)),r=1;if(st){const{fontSize:s}=window.getComputedStyle(document.documentElement,null),i=s.indexOf("px");i>0&&(r=Number(s.substring(0,i)))}return a*=r,a}if(l=e.indexOf("%"),l!==-1)return Number(e.substring(0,l))*o;const n=Number(e);return isNaN(n)?0:n}const We="PageStateKey";function Me(e){const o={top:null,left:null,bottom:null,right:null};return e&&(e.top!==null&&e.top!==void 0&&(o.top=se(e.top)),e.left!==null&&e.left!==void 0&&(o.left=se(e.left)),e.bottom!==null&&e.bottom!==void 0&&(o.bottom=se(e.bottom)),e.right!==null&&e.right!==void 0&&(o.right=se(e.right))),o}function dn(e,o,l={},n=!0,a=-1,r=-1,s=0,i=0){if(e.headerHeight=se(l.headerHeight??o.headerHeight??-1),e.headerPadding=Me(l.headerPadding??o.headerPadding),e.footerHeight=se(l.footerHeight??o.footerHeight??-1),e.footerPadding=Me(l.footerPadding??o.footerPadding),e.contentPadding=Me(l.contentPadding??o.contentPadding),n){const c=l.height??o.height;c?e.height=se(c,r):e.height=se(r)-se(s,r)-se(i,r),e.width=se(l.width??o.width??0,a)}}function Or(e,o={}){const l={top:null,left:null,bottom:null,right:null},n={width:0,height:0,headerHeight:0,headerPadding:{...l},footerHeight:0,footerPadding:{...l},contentPadding:{...l},contentHeight:null,safeAreaTop:0,safeAreaBottom:0,safeAreaLeft:0,safeAreaRight:0,headerMounted:!1,footerMounted:!1},a=Object.assign(e.get("safeAreaInset")??{},o.safeAreaInset??{});a&&(n.safeAreaTop=se(a.top),n.safeAreaBottom=se(a.bottom),n.safeAreaLeft=se(a.left),n.safeAreaRight=se(a.right));const r=e.get("pageLayout");if(!r)return null;const s=e.get("rootWidth")??-1,i=e.get("rootHeight")??-1,c=e.get("headerBarHeight")??0,d=e.get("footerBarHeight")??0;dn(n,r,o,!0,s,i,c,d);const f=t.reactive(n),m=e.getForParent(We);m&&(n.height=ro(e,m),n.width=so(e,m),t.watch([()=>ro(e,m),()=>so(e,m)],([y,g])=>{f.height=y,f.width=g}));const h=!m;return t.watch([()=>o.height,()=>e.get("pageLayout"),()=>e.get("rootWidth"),()=>e.get("rootHeight"),()=>e.get("headerBarHeight"),()=>e.get("footerBarHeight")],([y,g,v=-1,b=-1,u=0,p=0])=>{dn(f,g,o,h,v,b,u,p)}),e.set(We,f),f}function bo(e){return e.get(We)}function So(e,o){if(o=o??e.get(We),o&&o.headerMounted){const l=o.safeAreaTop==-1?0:o.safeAreaTop;return o.headerAllHeight??o.headerHeight+l}return 0}function Co(e,o){if(o=o??e.get(We),o&&o.footerMounted){const l=o.safeAreaBottom==-1?0:o.safeAreaBottom;return o.footerAllHeight??o.footerHeight+l}return 0}function ro(e,o){if(o=o??e.get(We),o){if(o.contentInnerHeight)return o.contentInnerHeight;const l=So(e,o),n=Co(e,o);return o.height-l-n-(o.contentPadding.top??0)-(o.contentPadding.bottom??0)}return 0}function so(e,o){return o=o??e.get(We),o?o.contentInnerWidth??o.width-(o.contentPadding.left??0)-(o.contentPadding.right??0):0}function Zs(e,o){const l=e.get("isInnerPage");return typeof l=="function"?Reflect.apply(l,{},[o,e]):!1}function Js(e){return!!e.getForParent(We)}var io=(e=>(e[e.Parent=0]="Parent",e[e.Near=1]="Near",e))(io||{});function Yo(e,o){return e==null?!1:typeof o=="function"?o(e):!0}function Ne(e,o,l=1,n){const a=Oe();return a==null?e:l===0?t.computed(()=>{const r=a.getAll(o);for(let i=r.length-1;i>=0;i--){const c=r[i];if(Yo(c,n))return c}const s=e.value;return Yo(s,n)?s:null}):t.computed(()=>{const r=e.value;return Yo(r,n)?r:a?.get(o)})}function Ae(e){return Ne(e,"readonly",0,function(l){return pe(l)})}function Ce(e){return Ne(e,"disabled",0,function(l){return pe(l)})}function Ee(e,o="modelValue",l){const n=t.toRef(e,o);let a=n.value;typeof l=="function"&&(a=l(n.value));const r=t.ref(a);return t.watch(n,s=>{if(typeof l=="function"){const i=l(s);i!==r.value&&(r.value=i)}else s!==r.value&&(r.value=s)}),r}const Kr=new Map,co=new Map;let fn=null;function _s(e){fn=e}function Ur(e,o,l){if(l){let n=co.get(l);n||(n=new Map,co.set(l,n)),n.set(e,o)}else Kr.set(e,o)}function Ge(e,o,l){!l&&fn&&(l=fn(e)??void 0);let n=null;if(l){let a=co.get(l);a&&(n=a.get(o))}return n||(n=Kr.get(o)),n}function ei(e,o){for(let l in e){const n=e[l];Ur(l,n,o)}}function ti(e){co.delete(e)}function oi(){return{top:0,left:0,bottom:0,right:0}}function ni(e=0,o=0){if(st){const l=document.documentElement.clientWidth||document.body.clientWidth,n=document.documentElement.clientHeight||document.body.clientHeight,a={width:l,height:n-se(e,n)-se(o,n)};return{rootWidth:l,rootHeight:n,pageLayout:a}}else return{rootWidth:-1,rootHeight:-1,pageLayout:{width:"100%",height:"100%",headerHeight:-1,footerHeight:-1}}}class li{packages;_version;get version(){return this._version}constructor(o,l){this.packages=o,this._version=l}install(o,l){l?.install!==!1&&this.packages.forEach(r=>{r.install?o.use(r):r.name&&o.component(r.name,r)});const n=["safeAreaInset","pageLayout","headerBarHeight","footerBarHeight"],a=mt();if(this.initPageLayout(l,a),l.autoAdjustPageLayout!==!1&&window.ResizeObserver){const r=ao(()=>{const i={...l},c=document.documentElement.clientWidth||document.body.clientWidth,d=document.documentElement.clientHeight||document.body.clientHeight;i.width=c,i.height=d,this.initPageLayout(i,a)},150);new window.ResizeObserver(r).observe(window.document.body)}for(const r in l)n.indexOf(r)===-1&&a.set(r,l[r])}initPageLayout(o,l){const n=o.headerBarHeight??0,a=o.footerBarHeight??0,r=nt({},oi(),o.safeAreaInset),s=ni(n,a),i=nt({},s.pageLayout,o.pageLayout);l=l??mt(),l.set("safeAreaInset",r),l.set("headerBarHeight",n),l.set("footerBarHeight",a),l.set("pageLayout",i),l.set("rootWidth",s.rootWidth),l.set("rootHeight",s.rootHeight)}setScopeGetter(o){_s(o)}setAPI(o,l,n){Ur(o,l,n)}getAPI(o,l,n){return Ge(o,l,n)}batchSetAPI(o,l){ei(o,l)}clearScopeAPI(o){ti(o)}getRootDomain(){return mt()}}function X(e){const o="fox-"+e;return{componentName:o,scope:e.replace("-",""),create(l){return l.baseName=e,l.name=o,l.install=n=>{n.component(l.name,l)},t.defineComponent(l)},createDemo(l){return l.baseName=e,l.name="demo-"+e,t.defineComponent(l)}}}const ai=(e,o)=>{let l=document.body;const n=e.teleport||"body";n!="body"&&(Sr(n)?l=document.querySelector(n):l=e.teleport);const a=document.createElement("view"),r=o.name?o.name+"-":"",s=e.id||new Date().getTime();a.id=r+s;let i={};lo(o.wrapper)?i=o.wrapper(l,a):i=o.wrapper;const c=t.createApp(i,e),d=o.components;return d&&d.forEach(f=>{c.use(f)}),l.appendChild(a),{instance:c.mount(a),unmount:()=>{c.unmount(),l.removeChild(a)}}},Hr=(e,o)=>e?t.h(e,o):"",ue={disabled:{type:[Boolean,String],required:!1},readonly:{type:[Boolean,String],required:!1},labelPosition:{type:String,required:!1},labelWidth:{type:[String,Number],required:!1},hasBorder:{type:Boolean,required:!1,default:!0}},de={prop:{type:String,required:!1},label:{type:String,required:!1},labelPosition:{type:String,required:!1},labelWidth:{type:[String,Number],required:!1},isRequired:{type:[String,Boolean],required:!1,default:!1},span:{type:[Number,String],required:!1,default:1},offset:{type:[Number,String],default:0},width:{type:[String,Number],required:!1},infoMarkClass:{type:String,required:!1,default:"is-info"},warnMarkClass:{type:String,required:!1,default:"is-warn"},errorMarkClass:{type:String,required:!1,default:"is-error"},errorTip:{type:String,required:!1},errorIcon:{type:Object,required:!1},errorClass:{type:String,required:!1},warnTip:{type:String,required:!1},warnIcon:{type:Object,required:!1},warnClass:{type:String,required:!1},infoTip:{type:String,required:!1},infoIcon:{type:Object,required:!1},infoClass:{type:String,required:!1},contentClass:{type:String,required:!1,default:"content--default"},contentStyle:{type:Object,required:!1,default:{}},hintType:{type:String,required:!1,default:"text"},hintText:{type:[String,Number],required:!1},hintVisible:{type:[Boolean,String],required:!1,default:!0},hintProps:{type:Object,required:!1,default:{}},appearListen:{type:[Boolean,String],required:!1,default:!1}},jr={column:{type:[String,Number],required:!1},columnWidth:{type:[String,Number],required:!1},gutter:{type:[String,Number],required:!1},minItemWidth:{type:[String,Number],required:!1},maxItemWidth:{type:[String,Number],required:!1}},Wr={name:{type:String,required:!1},tag:{type:String,required:!1,default:"div"},modelValue:{type:String,required:!1},rules:{type:[Object],required:!1},pureDataRules:{type:[Object],required:!1},type:{type:[String],required:!1},justify:{type:[String],required:!1,default:"stretch"},align:{type:[String],required:!1,default:"start"},span:{type:[Number,String],required:!1,default:1},offset:{type:[Number],default:0},autoLayout:{type:[Boolean],required:!1,default:!0},isWrap:{type:[Boolean,String],required:!1,default:!0},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1},showMark:{type:[String,Boolean],required:!1,default:!1},markColor:{type:[String],required:!1},title:{type:String,default:""},titleColor:{type:[String],required:!1},collapse:{type:[String,Boolean],requried:!1},showCollapse:{type:[String,Boolean],required:!1,default:!1},collapsePosition:{type:[String],requried:!1,default:"right"},collapseText:{type:[String],requried:!1},expandText:{type:[String],requried:!1},collapseIcon:{type:[Object],requried:!1},collapseHeight:{type:[String,Number],requried:!1},rollingDisplay:{type:[Boolean],requried:!1,default:!0}},Yr=[];for(const e in Wr)Yr.push(e);function Te(e,o=null){if(o||(o=t.getCurrentInstance()),o&&o.proxy){let l=o.proxy;Object.assign(l,e)}}const ri=Symbol.for("InnerPageScopeKey"),si=(e,o)=>({inheritAttrs:!0,props:{...ue,...jr,name:{type:String,required:!1,default:""},modelValue:{type:Object,required:!1},width:{type:[Number,String],required:!1},height:{type:[Number,String],required:!1},safeAreaInset:{type:Object,required:!1},contentPadding:{type:Object,required:!1},headerPadding:{type:Object,required:!1},footerPadding:{type:Object,required:!1},headerHeight:{type:[Number,String],required:!1},footerHeight:{type:[Number,String],required:!1},rules:{type:[Object],required:!1},pureDataRules:{type:[Object],required:!1}},setup(l,n){const a=zn(l.name,l);if(a){const d=Or(a,l);Te({getPageContentHeight:()=>ro(a,d),getPageContentWidth:()=>so(a,d),getPageHeaderHeight:()=>So(a,d),getPageFooterHeight:()=>Co(a,d)});const f=t.inject(ri,!1);d&&f&&(d.contentHeight="100%")}const r=t.computed(()=>({[e]:!0})),s=t.computed(()=>({})),i=t.getCurrentInstance(),c=(d,f=!1)=>{const m=i?.proxy;m&&typeof m.setNameValidateRules=="function"&&m.setNameValidateRules(d,!0,f)};return t.watch([()=>l.rules,()=>l.pureDataRules],([d,f],[m,h])=>{if(d&&m){const y=t.toRaw(m),g=t.toRaw(d),v=g?Reflect.ownKeys(g):[];(y?Reflect.ownKeys(y):[]).forEach(u=>{v.includes(u)||(g[u]=[])}),c(g)}if(f&&h){const y=t.toRaw(h),g=t.toRaw(f),v=g?Reflect.ownKeys(g):[];(y?Reflect.ownKeys(y):[]).forEach(u=>{v.includes(u)||(g[u]=[])}),c(g,!0)}},{deep:!0}),t.onMounted(()=>{if(l.rules){const d=t.toRaw(l.rules);c(d)}if(l.pureDataRules){const d=t.toRaw(l.pureDataRules);c(d,!0)}}),{classes:r,styles:s}}}),{componentName:ii,create:ci,scope:VB}=X("page"),ui=ci(si(ii));function di(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles)},[t.renderSlot(e.$slots,"default")],6)}const J=(e,o)=>{const l=e.__vccOpts||e;for(const[n,a]of o)l[n]=a;return l},Ln=J(ui,[["render",di]]);function wo(e){const o=t.unref(e);return{width:o.offsetWidth,height:o.offsetHeight}}function Pn(e){const o=t.unref(e),l=window.getComputedStyle(o,null),n=parseFloat(l.getPropertyValue("padding-left")),a=parseFloat(l.getPropertyValue("padding-right")),r=parseFloat(l.getPropertyValue("padding-top")),s=parseFloat(l.getPropertyValue("padding-bottom"));return{width:o.clientWidth-n-a,height:o.clientHeight-r-s}}const fi=(e,o,l,n=!1)=>({props:{fixed:{type:Boolean,required:!1,default:!0},safeAreaInsetTop:{type:Boolean,required:!1,default:!0},border:{type:Boolean,required:!1,default:!1},height:{type:[String,Number],required:!1},align:{type:[String],default:"center"},padding:{type:[Object],required:!1},leftShow:{type:[Boolean,String],required:!1,default:!0},leftIcon:{type:[Object],required:!1,default:l},leftText:{type:String,required:!1},titleShow:{type:Boolean,required:!1,default:!0},title:{type:String,required:!1,default:""},titleIcon:{type:[Object],required:!1},rightShow:{type:[String,Boolean],required:!1,default:!0},rightIcon:{type:[Object],required:!1},rightText:{type:String,required:!1,default:""}},emits:["back","click-title","click-right","click-right-text"],setup(a,r){const s=Oe(),i=s?bo(s):null;i&&(i.headerMounted=!0);const c=e,d=t.computed(()=>({[c]:!0,[`${c}--border`]:a.border,[`${c}--fixed`]:a.fixed,[`${c}--safe-area-inset-top`]:a.safeAreaInsetTop})),f=t.computed(()=>({[`${c}__inner`]:!0,[`${c}__inner--${a.align}`]:!0})),m=a.height!==null&&a.height!==void 0?se(a.height):null,h=t.computed(()=>{const C={safeAreaTop:null,height:null,left:null,top:null,right:null,bottom:null};if(s&&i){const V=Me(a.padding??i.headerPadding);return Object.assign(C,V),m&&(i.headerHeight=m),i.headerHeight>0&&(C.height=i.headerHeight),C.safeAreaTop=i.safeAreaTop===-1?0:i.safeAreaTop,C.safeAreaTop>0&&(C.top=C.safeAreaTop+(V.top??0),C.height&&C.height>0&&(C.height=C.height+C.safeAreaTop)),C}if(m&&(C.height=m),a.padding){const V=Me(a.padding);Object.assign(C,V)}return C}),y=t.ref(null),g=()=>{if(i&&y.value&&!go(y.value)){if(!n){const C=wo(y.value);i.headerAllHeight=C.height}return i.headerMounted=!0,!0}return!1};let v=null;t.onMounted(()=>{i&&(Mn(g,50,5,50,!0),window.ResizeObserver&&y.value&&(v=new window.ResizeObserver(()=>{g()}),v.observe(y.value)))}),t.onUnmounted(()=>{i&&(i.headerMounted=!1,v&&(v.disconnect(),v=null))});const b=t.computed(()=>{const C={};return h.value.height!==null&&h.value.height!==void 0&&(C.height=`${h.value.height}px`),h.value.top!==null&&h.value.top!==void 0&&(C.paddingTop=`${h.value.top}px`),h.value.left!==null&&h.value.left!==void 0&&(C.paddingLeft=`${h.value.left}px`),h.value.right!==null&&h.value.right!==void 0&&(C.paddingRight=`${h.value.right}px`),h.value.bottom!==null&&h.value.bottom!==void 0&&(C.paddingBottom=`${h.value.bottom}px`),C}),u=t.computed(()=>!(h.value.height!==null&&h.value.height!==void 0&&h.value.height<=0));function p(){r.emit("back")}function k(){r.emit("click-title")}function S(){r.emit("click-right")}function w(){r.emit("click-right-text")}const N=()=>{if(!a.leftShow)return null;const C=[];if(r.slots.left)C.push(r.slots.left());else{if(r.slots.leftIcon){const V=t.h("view",{class:"left-icon",onClick:p},[r.slots.leftIcon()]);C.push(V)}else if(a.leftIcon){const V=t.h("view",{class:"left-icon",onClick:p},[t.h(a.leftIcon)]);C.push(V)}if(a.leftText){const V=t.h("view",{class:"left-text",onClick:p},[a.leftText]);C.push(V)}}return C.length===0?null:t.h("view",{class:"fox-header-bar__left"},C)},T=()=>{if(!a.rightShow)return null;const C=[];if(r.slots.right)C.push(r.slots.right());else{if(a.rightText){const V=t.h("view",{class:"right-text",onClick:w},[a.rightText]);C.push(V)}if(r.slots.rightIcon){const V=t.h("view",{class:"right-icon",onClick:S},[r.slots.rightIcon()]);C.push(V)}else if(a.rightIcon){const V=t.h("view",{class:"right-icon",onClick:S},[t.h(a.rightIcon)]);C.push(V)}}return C.length===0?null:t.h("view",{class:"fox-header-bar__right"},C)},B=()=>{if(!a.titleShow)return null;const C=[],V=r.slots.default?r.slots.default():null;if(V)C.push(V);else{if(a.title){const M=t.h("view",{class:"title-text"},[a.title]);C.push(M)}if(r.slots.titleIcon){const M=t.h("view",{class:"title-icon",onClick:k},[r.slots.titleIcon()]);C.push(M)}else if(a.titleIcon){const M=t.h("view",{class:"title-icon",onClick:k},[t.h(a.titleIcon)]);C.push(M)}}return C.length===0?null:t.h("view",{class:"fox-header-bar__title"},C)},D=()=>{const C=[],V=r.slots.bottom?r.slots.bottom():null;return V&&C.push(V),C.length===0?null:t.h("view",{class:"fox-header-bar__bottom"},C)};return()=>{if(!u.value)return null;const C=[];if(r.slots.all)C.push(r.slots.all());else{const M=[],L=N();L&&M.push(L);const $=B();$&&M.push($);const E=T();if(E&&M.push(E),M.length>0){const A=t.h("view",{class:f.value},M);C.push(A)}const x=D();x&&C.push(x)}if(C.length===0)return null;const V={class:d.value,style:b.value,ref:y};return t.h("view",V,C)}}}),{componentName:mi,create:pi,scope:hi}=X("header-bar"),Rn=pi(fi(mi,hi,te.Left,!1));function gi(e,o,l=!1){return{props:{fixed:{type:Boolean,required:!1,default:!0},safeAreaInsetBottom:{type:Boolean,required:!1,default:!0},border:{type:Boolean,required:!1,default:!1},height:{type:[String,Number],required:!1},padding:{type:[Object],required:!1},align:{type:String,required:!1,default:"center"}},setup(n,a){const r=Oe(),s=r?bo(r):null,i=t.computed(()=>{const g=e;return{[g]:!0,[`${g}--${n.align}`]:!0,[`${g}--border`]:n.border,[`${g}--fixed`]:n.fixed,[`${g}--safe-area-inset-bottom`]:n.safeAreaInsetBottom}}),c=n.height!==null&&n.height!==void 0?se(n.height):null,d=t.computed(()=>{const g={safeAreaBottom:null,height:null,left:null,top:null,right:null,bottom:null};if(r&&s){const v=Me(n.padding??s.footerPadding);return Object.assign(g,v),c&&(s.footerHeight=c),s.footerHeight>0&&(g.height=s.footerHeight),g.safeAreaBottom=s.safeAreaBottom===-1?0:s.safeAreaBottom,g.safeAreaBottom>0&&(g.bottom=g.safeAreaBottom+(v.bottom??0),g.height&&g.height>0&&(g.height=g.height+g.safeAreaBottom)),g}if(c&&(g.height=c),n.padding){const v=Me(n.padding);Object.assign(g,v)}return g}),f=t.ref(null),m=()=>{if(s&&f.value&&!go(f.value)){if(!l){const g=wo(f.value);s.footerAllHeight=g.height}return s.footerMounted=!0,!0}return!1};let h=null;t.onMounted(()=>{s&&(Mn(m,50,5,50,!0),window.ResizeObserver&&(h=new window.ResizeObserver(()=>{m()}),h.observe(f.value)))}),t.onUnmounted(()=>{s&&(s.footerMounted=!1,h&&(h.disconnect(),h=null))});const y=t.computed(()=>{const g={};return d.value.height!==null&&d.value.height!==void 0&&(g.height=fe(d.value.height)),d.value.top!==null&&d.value.top!==void 0&&(g.paddingTop=fe(d.value.top)),d.value.left!==null&&d.value.left!==void 0&&(g.paddingLeft=fe(d.value.left)),d.value.right!==null&&d.value.right!==void 0&&(g.paddingRight=fe(d.value.right)),d.value.bottom!==null&&d.value.bottom!==void 0&&(g.paddingBottom=fe(d.value.bottom)),g});return()=>{const g=a.slots.default?a.slots.default():[],v={ref:f,class:i.value,style:y.value};return t.h("view",v,g)}}}}const{componentName:yi,create:vi,scope:ki}=X("footer-bar"),Fn=vi(gi(yi,ki,!1));function bi(e,o){return{props:{padding:{type:[Object],required:!1}},setup(l){const n=Oe(),a=t.computed(()=>({[e]:!0})),r=n?bo(n):null,s=t.computed(()=>{const d={};if(n&&r){if(l.padding){const u=Me(l.padding);Object.assign(r.contentPadding,u)}const f=So(n,r),m=Co(n,r);let h="";r.contentHeight?h=`${r.contentHeight}`:h=`${r.height}px`,console.debug("[content]page height:",h),console.debug("[content]header height:",f),console.debug("[content]footer height:",m),console.debug("[content]padding:",r.contentPadding),d.height=h;let y=(r&&r.contentPadding&&r.contentPadding.top)??-1;(y>=0||f>0)&&(y=y<0?0:y,d.paddingTop=`${f+y}px`);let g=(r&&r.contentPadding&&r.contentPadding.bottom)??-1;(g>=0||m>0)&&(g=g<0?0:g,d.paddingBottom=`${m+g}px`);const v=(r&&r.contentPadding&&r.contentPadding.left)??-1;v>=0&&(d.paddingLeft=`${v}px`);const b=(r&&r.contentPadding&&r.contentPadding.right)??-1;return b>=0&&(d.paddingRight=`${b}px`),d}if(l.padding){const f=Me(l.padding);f.left&&(d.paddingLeft=`${f.left}px`),f.top&&(d.paddingTop=`${f.top}px`),f.right&&(d.paddingRight=`${f.right}px`),f.bottom&&(d.paddingBottom=`${f.bottom}px`)}return d}),i=t.ref(null),c=ht(()=>{if(r&&i.value){const d=Pn(i.value);r.contentInnerHeight=d.height,r.contentInnerWidth=d.width}},0);return t.onMounted(()=>{c()}),n&&r&&t.watch([()=>s.value,()=>a.value],([])=>{c()}),{contentRef:i,classes:a,styles:s}}}}const{componentName:Si,create:Ci,scope:AB}=X("content"),wi=Ci(bi(Si));function Ni(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{ref:"contentRef",class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles)},[t.renderSlot(e.$slots,"default")],6)}const On=J(wi,[["render",Ni]]),gt="GroupStateKey",Xr=Symbol.for("GroupScopeKey");function No(){return t.inject(Xr,!1)}function Bo(e=!0){t.provide(Xr,e)}function Bi(e,o={}){Reflect.ownKeys(o).forEach(n=>{if(typeof n!="string")return;const a=o[n];br(a)||(e[n]=a)})}function Vi(e,o={}){const n={type:"grid",width:e.get("width",-1),column:-1,gutter:-1};Bi(n,o);const a=t.shallowRef(n),r=t.markRaw({layout:a,passport:0,order:{index:0}});return e.set(gt,r),r}function Xo(e,o,l=-1,n=-1,a=!1,r,s,i){const c=e.get(gt);if(!c)return;const d=e.get("groupLayout")??{};l===-1&&(l=d.column??1),n===-1&&(n=d.gutter??0),r||(r=d.minItemWidth??-1),s||(s=d.maxItemWidth??-1);const f=se(r),m=se(s);i||(i=d.type??"grid");const h=()=>{const y=o===""||o===-1,g=se(o);let v=me(l);const b=se(n);if(!y){let k=(g-(v-1)*b)/v;for(;m!==-1&&k>m;)v++,k=(g-(v-1)*b)/v;for(;f!==-1&&v>1&&k<f;)v--,k=(g-(v-1)*b)/v}let u=!1;const p=c.layout;p.value.width=o,p.value.column!==v&&(p.value.column=v,u=!0),p.value.gutter!==b&&(p.value.gutter=b,u=!0),p.value.type!==i&&(p.value.type=i,u=!0),u&&t.triggerRef(p)};if(a)h();else{const y=++c.passport;setTimeout(()=>{y===c.passport&&h()},50)}}function Vo(e,o=!1){let l;return o?l=e.getForParent(gt):l=e.get(gt),l.layout}function Ao(e,o=!1){let l;return o?l=e.getForParent(gt):l=e.get(gt),l.order}function Ia(e,o=1){if(o==="stretch")return-1;const l=me(o);return l===-1?100:100*l/e}function To(e,o,l=1,n=0,a){const r={};let s=0;a?s=se(a):s=Ia(o.column,l),s>0&&(r.width=`${s}%`);const i=Ia(o.column,n);i>0&&(r["margin-left"]=`${i}%`);const c=o.gutter/2;return c>0&&(r["padding-left"]=`${c}px`,r["padding-right"]=`${c}px`),r}function $o(e,o,l=1,n=0){if(l==="stretch"){const c=e.index%o.column,d=c+(o.column-c);return e.index=e.index+(d-c),{"grid-column":`${c+1} / -1`}}let a=me(l);if(a===-1){const c=e.index%o.column;return o.column,c==0?e.index=e.index+o.column:e.index=e.index+(o.column-c)+o.column,{"grid-column":"1 / -1"}}if(a>o.column){const c=e.index%o.column;return o.column,c==0?e.index=e.index+o.column:e.index=e.index+(o.column-c)+o.column,{"grid-column":"1 / -1"}}const r=me(n)%o.column;let s=(e.index+r)%o.column,i=s+a;return i>o.column?(s=0,i=s+a,e.index=e.index+(o.column-s)+a):e.index=e.index+r+a,r>0?{"grid-column":`${s+1} / span ${a}`}:{"grid-column-start":`span ${a}`}}const Qr=Symbol("RollingStateKey");function Ai(e){t.provide(Qr,e)}function Ti(){return t.inject(Qr,null)}function mn(e){let o=0;const l=window.getComputedStyle(e,null);if(l.getPropertyValue("box-sizing")==="content-box"){const a=parseFloat(l.getPropertyValue("padding-top")),r=parseFloat(l.getPropertyValue("padding-bottom"));o=e.clientHeight-a-r}else o=e.offsetHeight;return o}function $i(e){let o=mn(e);if(o<=0){const l=e.cloneNode(!0),n=e.offsetWidth;l.style=`width: ${n}px; height: initial; overflow: initial; visibility: hidden;`,document.body.appendChild(l),o=mn(l),document.body.removeChild(l)}return o}function Ei(e,o,l){if(e<=0)return"1fr";const n=(e-(o-1)*l)/o;return n>0?`${n}px`:"1fr"}const Di={...ue,...jr,...Wr};function xi(e,o,l){return{props:Di,emits:["update:collapse"],setup(n,a){const r=zn(n.name,n,Yr),s=Vi(r,{type:n.type}),i=No();Bo(!0);const c=n.rollingDisplay?Ti():null,d=t.ref(null),f=t.computed(()=>n.rollingDisplay?c&&!c.disabled:!1),m=t.computed(()=>i&&r?Vo(r,!0).value:null),h=t.getCurrentInstance(),y=(O,G=!1)=>{const Q=h?.proxy;Q&&typeof Q.setNameValidateRules=="function"&&Q.setNameValidateRules(O,!0,G)};t.watch([()=>n.rules,()=>n.pureDataRules],([O,G],[Q,ee])=>{if(O&&Q){const _=t.toRaw(Q),oe=t.toRaw(O),le=oe?Reflect.ownKeys(oe):[];(_?Reflect.ownKeys(_):[]).forEach(ve=>{le.includes(ve)||(oe[ve]=[])}),y(oe)}if(G&&ee){const _=t.toRaw(ee),oe=t.toRaw(G),le=oe?Reflect.ownKeys(oe):[];(_?Reflect.ownKeys(_):[]).forEach(ve=>{le.includes(ve)||(oe[ve]=[])}),y(oe,!0)}},{deep:!0});const g=e,v=t.computed(()=>{const O={};if(O.height=E.value,n.width)n.width!=="auto"&&(O.width=fe(n.width));else{const G=i?Ao(r,!0):null;if(m.value&&G){if(m.value.type==="grid"){const Q=$o(G,m.value,n.span,n.offset);Object.assign(O,Q)}else if(m.value.type==="flow"){const Q=To(G,m.value,n.span,n.offset,n.width);Object.assign(O,Q)}}}return O}),b=t.computed(()=>{const O=s.layout.value.type;return O==="grid"||O==="flow"?{[`${g}--${O}`]:!0,[`${g}--${O}-justify-${n.justify}`]:!0,[`${g}--${O}-align-${n.align}`]:!0,[`${g}--gutter`]:!0}:{[`${g}--${O}`]:!0,[`${g}--gutter`]:!0}}),u=t.computed(()=>{if(s.layout.value.type==="grid"){let G="";if(n.columnWidth)G=`repeat(auto-fill, ${n.columnWidth})`;else{const Q=Ei(B.value,s.layout.value.column,s.layout.value.gutter);G=`repeat(${s.layout.value.column}, ${Q})`}return{"column-gap":`${s.layout.value.gutter}px`,"grid-template-columns":G}}}),p=t.toRef(n,"gutter"),k=t.toRef(n,"column"),S=t.computed(()=>i||f.value?!0:pe(n.isWrap)),w=[],N=O=>{w.push(O)},T=()=>{let O=w.length;w.splice(0,O)},B=t.ref(-1),D=O=>{const G=Pn(O).width;G>0&&G!==B.value&&(B.value=G)};Xo(r,B.value,k.value,p.value,!0,n.minItemWidth,n.maxItemWidth,n.type),n.autoLayout&&t.watch([B,k,p],([O,G,Q])=>{s.order.index=0,Xo(r,O,G,Q,!1,n.minItemWidth,n.maxItemWidth,n.type)});const C=t.computed(()=>x.value?n.expandText??"":n.collapseText??""),V=t.computed(()=>({[`${e}__header-collapse-text`]:!0})),M=t.computed(()=>({[`${e}__header-collapse-icon`]:!0,"is-expand":!x.value,"is-collapse":x.value})),L=t.ref(),$=t.ref(),E=t.computed(()=>A.value||fe(n.height)||""),x=t.ref(!1),A=t.ref(""),H=t.ref(!1);let R=-1;const Y=(O,G=!0)=>{const Q=L.value;if(Q&&x.value!==O){if(R=R===-1?$i(Q):R,H.value=!0,G)if(Q.style["will-change"]="height",Q.ontransitionend=function(){Q.ontransitionend=null,this.style["will-change"]="auto",O||(A.value="",H.value=!1)},O){let ee=0;n.collapseHeight?ee=n.collapseHeight:$.value&&$.value.classList.contains(`${e}__header`)&&(ee=$.value.offsetHeight),A.value=`${R}px`,t.nextTick(()=>{A.value=`${ee}px`})}else A.value=`${R}px`;else if(O){let ee=0;n.collapseHeight?ee=n.collapseHeight:$.value&&$.value.classList.contains(`${e}__header`)&&(ee=$.value.offsetHeight),A.value=`${ee}px`}else H.value=!1,A.value=`${R}px`;x.value=O,a.emit("update:collapse",O)}};t.watch(()=>n.collapse,O=>{Y(O)});const U=()=>{P()},P=O=>{O=O??!x.value,Y(O)};Te({toggleCollapse:P,doLayout:()=>{w[0]&&(D(w[0]),Xo(r,B.value,k.value,p.value,!0,n.minItemWidth,n.maxItemWidth,n.type))}});let j=null,q=!0;const F=O=>{if(n.rules){const G=t.toRaw(n.rules);y(G)}if(n.pureDataRules){const G=t.toRaw(n.pureDataRules);y(G,!0)}if(st&&(O&&Y(pe(n.collapse),!1),n.autoLayout&&Array.isArray(w)&&w.length>0)){const G=w[0];D(G),window.ResizeObserver&&(j=new window.ResizeObserver(()=>{D(G)}),j.observe(G))}},I=()=>{j?.disconnect(),j=null},K=!f.value||c?.acquire();K&&(d.value=f.value?!0:null),t.onMounted(()=>{if(K&&(F(q),q=!1),f.value&&c){let O=null,G=c.initialHeight;c.observe(L.value,Q=>{if(Q!==d.value)if(Q)d.value=!0,x.value||(A.value=""),O=setTimeout(()=>{O=null,d.value!==!1&&(F(q),q=!1)},100);else{if(O!==null&&clearTimeout(O),d.value=!1,!x.value)if(q)A.value=c.initialHeight;else{let ee=mn(L.value);ee<=0?A.value=G:(A.value=`${ee}px`,G=A.value)}q||I()}})}}),t.onUnmounted(()=>{j?.disconnect(),c&&c.unobserve(L.value)});const W=(O="right")=>{const G=[];if(C.value){const _={class:V.value},oe=t.h("span",_,[C.value]);G.push(oe)}const Q={class:M.value},ee=l(n.collapseIcon,Q);return ee&&G.push(ee),G.length>0?t.h("div",{class:{[`${g}__header-collapse`]:!0,[`is-${O}`]:!0},onClick:U},G):null},Z=(O,G,Q,ee)=>{const _={...b.value};return G===0&&(_[`${g}__first`]=!0),Q>=ee-1&&(_[`${g}__last`]=!0),t.h("div",{ref:N,key:`${G}`,class:_,style:u.value},O)};return()=>{if(f.value&&d.value!==!0){const _=n.tag||"div";return t.h(_,{ref:L,prop:n.name,class:{[`${g}`]:!0,"is-collapse":H.value},style:v.value},[])}s.order.index=0;const O=[];let G=0;if(a.slots.header){const _={key:`${G++}`,ref:$,class:{[`${g}__header`]:!0,[`${g}__first`]:!0}},oe=t.h("div",_,[a.slots.header()]);O.push(oe)}else{const _=[],oe=n.collapsePosition==="left";if(oe&&n.showCollapse){const le=W("left");le&&_.push(le)}if(n.title||a.slots.title){if(n.showMark){const le={class:{[`${g}__header-mark`]:!0}};n.markColor&&(le.style={background:n.markColor});const $e=t.h("div",le);_.push($e)}if(a.slots.title){const le=t.h("div",{class:{[`${g}__header-title`]:!0}},[a.slots.title()]);_.push(le)}else if(n.title){const le=t.h("div",{class:{[`${g}__header-title`]:!0}},[n.title]);_.push(le)}}if(a.slots.toolbar&&_.push(a.slots.toolbar()),!oe&&n.showCollapse){const le=W("right");le&&_.push(le)}if(_.length>0){const le={key:`${G++}`,ref:$,class:{[`${g}__header`]:!0,[`${g}__first`]:!0}},$e=t.h("div",le,_);O.push($e)}}T();const Q=a.slots.default?a.slots.default():[],ee=s.layout.value.type;if(ee==="grid"){const _=Z(Q,G++,0,Q.length);O.push(_)}else if(ee==="flow"){const _=Z(Q,G++,0,Q.length);O.push(_)}else for(let _=0;_<Q.length;_++){const oe=Q[_],le=Z([oe],G++,_,Q.length);O.push(le)}if(S.value){const _=n.tag||"div";return t.h(_,{ref:L,prop:n.name,class:{[`${g}`]:!0,"is-collapse":H.value},style:v.value},[O])}else return O}}}}const{componentName:Ii,create:qi,scope:Mi}=X("group"),zi=(e=te.RectUp,o={})=>t.h(e,o),Kn=qi(xi(Ii,Mi,zi));function Li(e){return e===window}const Pi=/matrix\((.+)\)/,Gr=e=>{const o=t.unref(e);if(!o)return{x:0,y:0};if(Li(o))return{x:0,y:0};let l=0,n=0,a=o;for(;a!==null;)l+=a.offsetLeft,n+=a.offsetTop,a=a.offsetParent;let r=0,s=0,i=0,c=0;for(a=o;a!==document;){s+=a.scrollTop,r+=a.scrollLeft;const{transform:d}=window.getComputedStyle(a);if(d){const f=Pi.exec(d);if(f){let h=f[1].split(/\s*,\s*/);h.length==6&&(i+=Number(h[4]),c+=Number(h[5]))}}a=a.parentNode}return l-=r,n-=s,l+=i,n+=c,{x:l,y:n}};class Ri{watchedListeners=[];add(o){this.watchedListeners.push(o)}remove(o){const l=this.watchedListeners.indexOf(o);l!==-1&&this.watchedListeners.splice(l,1)}size(){return this.watchedListeners.length}listen=()=>{this.watchedListeners.forEach(o=>{try{o()}catch{}})}}class Fi{monitorRegister=new WeakMap;watch(o,l){let n=o.parentNode;const a=document.body.parentNode;for(;n&&n!==a;){let r=this.monitorRegister.get(n);r||(r=new Ri,n.addEventListener("scroll",r.listen),n===document.body&&n.addEventListener("resize",r.listen),this.monitorRegister.set(n,r)),r.add(l),n=n.parentNode}}unwatch(o,l){let n=o.parentNode;const a=document.body.parentNode;for(;n&&n!==a;){let r=this.monitorRegister.get(n);r&&(r.remove(l),r.size()===0&&(this.monitorRegister.delete(n),n.removeEventListener("scroll",r.listen),n===document.body&&n.removeEventListener("resize",r.listen))),n=n.parentNode}}}const qa=new Fi,Zr={price:{type:[Number,String],default:0},needSymbol:{type:Boolean,default:!0},symbol:{type:String,default:"&yen;"},decimalLength:{type:[Number,String],required:!1,default:2},digits:{type:[Number,String],required:!1,default:3},separator:{type:String,required:!1,default:","},position:{type:String,default:"before"},size:{type:String,default:"large"}},{componentName:Oi,create:Ki}=X("price"),Ui=Ki({props:{...Zr},setup(e){const o=t.computed(()=>({[Oi]:!0})),l=t.computed(()=>e.needSymbol?e.symbol:""),n=t.computed(()=>ge(e.price)==0?"":mo(e.price,e.decimalLength,!0,me(e.digits),e.separator)),a=t.computed(()=>{let s=n.value;if(s.length==0)return"";let i=s.indexOf(".");return s.substring(0,i)}),r=t.computed(()=>{let s=n.value;if(s.length==0)return"";let i=s.indexOf(".");return s.substring(i+1)});return{classes:o,showSymbol:l,intText:a,decimalText:r}}}),Hi=["innerHTML"],ji=["innerHTML"];function Wi(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[e.needSymbol&&e.position=="before"?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-price--symbol",`fox-price--symbol-${e.size}`]),innerHTML:e.showSymbol},null,10,Hi)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(`fox-price--${e.size}`)},t.toDisplayString(e.intText),3),e.decimalText.length!=0?(t.openBlock(),t.createElementBlock("view",{key:1,class:t.normalizeClass(`fox-price--decimal-${e.size}`)},".",2)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(`fox-price--decimal-${e.size}`)},t.toDisplayString(e.decimalText),3),e.needSymbol&&e.position=="after"?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass(["fox-price--symbol",`fox-price--symbol-${e.size}`]),innerHTML:e.showSymbol},null,10,ji)):t.createCommentVNode("",!0)],2)}const Ye=J(Ui,[["render",Wi]]),{componentName:Qo,create:Yi}=X("hint-text"),Xi=Yi({components:{Price:Ye},props:{...Zr,type:{type:String,default:"number"},placement:{type:String,default:"top-start"},transition:{type:Boolean,default:!0},size:{type:String,default:"default"},arrowSize:{type:Number,default:6},showArrow:{type:Boolean,default:!0},arrowOffset:{type:Number,default:20},offset:{type:Number,default:12},id:{type:String},reference:{type:Object},autoFit:{type:Boolean,default:!0},message:{type:String,default:""},visible:{type:Boolean,default:!0},unmount:{type:Function},customClass:{type:String},customStyle:{type:Object},customTextClass:{type:String},customTextStyle:{type:Object},closeOnClick:{type:Boolean},zIndex:{type:[String,Number]}},emits:["update:visible"],setup(e,o){const l=t.ref({top:null,right:null,bottom:null,left:null}),n=t.ref({x:0,y:0}),a=t.ref(0),r=t.ref(0),s=t.ref(e.placement),i=t.ref(!1),c=t.ref(null),d=(V,M,L,$,E,x)=>{const A=document.documentElement.clientWidth||document.body.clientWidth,H=document.documentElement.clientHeight||document.body.clientHeight,R=V.split("-");let Y=[];R[0]==="top"?Y=["top","bottom","right","left"]:R[0]==="bottom"?Y=["bottom","top","right","left"]:R[0]==="left"?Y=["left","top","bottom","right"]:R[0]==="right"&&(Y=["right","top","bottom","left"]);const U={top:null,right:null,bottom:null,left:null},P=[];for(let z=0;z<Y.length;z++){const j=Y[z];if(P[0]=j,R[1]&&(P[1]=R[1]),j==="top"){const q=M.y-x-e.arrowSize-e.offset;if(q>=0){U.top=q;let F=0;R[1]==="start"?F=M.x:R[1]==="end"?F=M.x+L-E:F=M.x+L/2-E/2;const I=A-F-E;I<0?(F+=I,m.value=-I):m.value=0,U.left=F<0?0:F;break}}else if(j==="bottom"){const q=M.y+$+e.arrowSize+e.offset;if(q+x<=H){U.top=q;let F=0;R[1]==="start"?F=M.x:R[1]==="end"?F=M.x+L-E:F=M.x+L/2-E/2;const I=A-F-E;I<0?(F+=I,m.value=-I):m.value=0,U.left=F<0?0:F;break}}else if(j==="left"){const q=M.x-E-e.arrowSize-e.offset;if(q>=0){U.left=q;let F=0;R[1]==="start"?F=M.y:R[1]==="end"?F=M.y+$-x:F=M.y+$/2-x/2,U.top=F<0?0:F;break}}else if(j==="right"){const q=M.x+L+e.arrowSize+e.offset;if(q+E<=A){U.left=q;let F=0;R[1]==="start"?F=M.y:R[1]==="end"?F=M.y+$-x:F=M.y+$/2-x/2,U.top=F<0?0:F;break}}}return{bestPlacement:P.join("-"),bestInsetRect:U}},f=(V,M,L=10)=>{if(!st||M===!1||!V)return;n.value=Gr(e.reference),a.value=e.reference.offsetWidth,r.value=e.reference.offsetHeight;const $=c.value.offsetHeight,E=c.value.offsetWidth,{bestPlacement:x,bestInsetRect:A}=d(e.placement,n.value,a.value,r.value,E,$);s.value=x,l.value=A,i.value=!0},m=t.ref(0),h=ht(()=>{f(e.message,e.visible)},10),y=t.ref(e.visible);t.watch(()=>e.visible,V=>{y.value=V});const g=t.computed(()=>y.value&&v.value),v=t.ref(!0),b=ht(V=>{const M=V[0];M&&(v.value=M.isIntersecting)},10),u=new IntersectionObserver(b);t.watch([()=>e.message,()=>e.visible],([V,M])=>{setTimeout(()=>{f(e.message,e.visible)},0)}),t.onMounted(()=>{setTimeout(()=>{f(e.message,e.visible)},0),qa.watch(e.reference,h),u.observe(e.reference)}),t.onBeforeMount(()=>{qa.unwatch(e.reference,h),u.unobserve(e.reference),u.disconnect()});const p=t.computed(()=>{const V={[Qo]:!0};return s.value.startsWith("top")?V["is-top"]=!0:s.value.startsWith("right")?V["is-right"]=!0:s.value.startsWith("bottom")?V["is-bottom"]=!0:s.value.startsWith("right")&&(V["is-right"]=!0),e.size==="small"?V["is-small"]=!0:e.size==="large"&&(V["is-large"]=!0),e.customClass&&typeof e.customClass=="string"&&(V[`${e.customClass}`]=!0),V}),k=t.computed(()=>{const V={};l.value.top!==null&&(V.top=`${l.value.top}px`),l.value.right!==null&&(V.right=`${l.value.right}px`),l.value.bottom!==null&&(V.bottom=`${l.value.bottom}px`),l.value.left!==null&&(V.left=`${l.value.left}px`),e.autoFit&&(V["min-width"]=`${a.value}px`);const M=document.documentElement.clientWidth||document.body.clientWidth;return V["max-width"]=`${M}px`,i.value&&(V.opacity="1"),e.transition||(V.transition="none"),e.zIndex&&(V["z-index"]=`${e.zIndex}`),e.customStyle&&typeof e.customStyle=="object"&&Object.assign(V,e.customStyle),V}),S=t.computed(()=>{const V=[`${Qo}__content`];return e.customTextClass&&V.push(e.customTextClass),V}),w=t.computed(()=>{const V={};return e.customTextStyle&&typeof e.customTextStyle=="object"&&Object.assign(V,e.customTextStyle),V}),N=t.computed(()=>({[`${Qo}__arrow`]:!0})),T=t.computed(()=>{const V={};return e.showArrow?(V.width=`${e.arrowSize}px`,V.height=`${e.arrowSize}px`,s.value==="top"?(V.left="50%",V.bottom=`-${e.arrowSize}px`,V.transform=" translate(-50%, 0%)"):s.value==="top-start"?(V.left=`${e.arrowOffset+m.value}px`,V.bottom=`-${e.arrowSize}px`):s.value==="top-end"?(V.right=`${e.arrowOffset-m.value}px`,V.bottom=`-${e.arrowSize}px`):s.value==="right"?(V.left=`-${e.arrowSize}px`,V.top="50%",V.transform=" translate(0%, -50%)"):s.value==="right-start"?(V.left=`-${e.arrowSize}px`,V.top=`${e.arrowOffset}px`):s.value==="right-end"?(V.left=`-${e.arrowSize}px`,V.bottom=`-${e.arrowOffset}px`):s.value==="bottom"?(V.left="50%",V.top=`-${e.arrowSize}px`,V.transform=" translate(-50%, 0%)"):s.value==="bottom-start"?(V.left=`${e.arrowOffset+m.value}px`,V.top=`-${e.arrowSize}px`):s.value==="bottom-end"?(V.right=`${e.arrowOffset-m.value}px`,V.top=`-${e.arrowSize}px`):s.value==="left"?(V.right=`-${e.arrowSize}px`,V.top="50%",V.transform=" translate(0%, -50%)"):s.value==="left-start"?(V.right=`-${e.arrowSize}px`,V.top=`${e.arrowOffset}px`):s.value==="left-end"&&(V.right=`-${e.arrowSize}px`,V.bottom=`-${e.arrowOffset}px`),V):{display:"none"}}),B=t.computed(()=>g.value&&e.closeOnClick),D=t.computed(()=>{const V={};return e.zIndex&&(V["z-index"]=`${e.zIndex}`),V});return{show:g,tipRef:c,classes:p,styles:k,textClasses:S,textStyles:w,arrowClasses:N,arrowStyles:T,overlayShow:B,overlayStyle:D,onClickOverlay:()=>{y.value=!1,o.emit("update:visible",!1)}}}});function Qi(e,o,l,n,a,r){const s=t.resolveComponent("Price");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.overlayShow?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fox-hint-text__overlay",style:t.normalizeStyle(e.overlayStyle),onClick:o[0]||(o[0]=(...i)=>e.onClickOverlay&&e.onClickOverlay(...i))},null,4)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",{ref:"tipRef",class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles)},[t.createElementVNode("div",{class:t.normalizeClass(e.textClasses),style:t.normalizeStyle(e.textStyles)},[e.type=="number"?(t.openBlock(),t.createBlock(s,{key:0,price:e.message,position:"before",size:e.size},null,8,["price","size"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(e.message),1)],64))],6),t.createElementVNode("div",{class:t.normalizeClass(e.arrowClasses),style:t.normalizeStyle(e.arrowStyles)},null,6)],6),[[t.vShow,e.show]])],64)}const Jr=J(Xi,[["render",Qi]]);class Un{seed=new Date().getTime();constructor(o){this.seed=o??new Date().getTime()}get(){let o=this.seed++;return this.seed<0&&(this.seed=0),o}}const pn={},Gi=new Un,pt=new Map,uo=e=>{if(e){const o=document.getElementById(e);pt.delete(e),o&&o.parentNode?.removeChild(o)}else{for(const o of pt.keys()){const l=document.getElementById(o);l&&l.parentNode?.removeChild(l)}pt.clear()}},Zi=e=>{e.unmount=uo;const o=document.getElementById(e.id);if(o){const l=pt.get(e.id);l?e={...pn,...l,...e}:e={...pn,...e},e.transition=!1;const n=t.createVNode(Jr,e);return t.render(n,o),e.id}},Ji=e=>{e.unmount=uo;let o=e.id??`hinttext_${Gi.get()}`;e={...pn,...e},e.id=o,pt.set(o,e);const l=document.createElement("div");l.id=e.id;const n=t.createVNode(Jr,e);return t.render(n,l),document.body.appendChild(l),o},_i=e=>{if(!e){console.warn("[FoxUI HintText]: msg不能为空");return}},ot={show(e,o,l={},n=!0){_i(o);const a=l.id;return a&&pt.has(a)?Zi({...l,message:o,reference:e}):(n&&uo(),Ji({...l,message:o,reference:e}))},hide(e){uo(e)},install(e){e.config.globalProperties.$hintText=ot}},{componentName:Ma,create:ec}=X("item"),tc=ec({inheritAttrs:!0,props:{...ue,...de},emits:["appear","disappear"],setup(e,o){const l=e.prop??o.attrs.name;we({componentName:Ma,validate:!1},l);const n=Oe(),a=No();Bo(!1);const r=t.computed(()=>a&&n?Vo(n,!1).value:null),s=Ma,i=t.ref(null),c=t.computed(()=>{const O={[s]:!0,[`${s}__gutter`]:r.value&&r.value.type!=="flow",[`${s}__stretch`]:e.span==="stretch",[`${s}__input--border`]:pe(e.hasBorder)};if(O[e.errorMarkClass]=!!M.value,O[e.warnMarkClass]=!!C.value,O[e.infoMarkClass]=!!B.value,typeof i.value=="function"){const G=i.value(l);O[G]=!0}else if(typeof i.value=="string"){const G=i.value;O[G]=!0}return O}),d=t.ref(null),f=t.computed(()=>{const O={};if(e.width)e.width!=="auto"&&(O.width=fe(e.width));else{const G=a&&n?Ao(n,!1):null;if(r.value&&G){if(r.value.type==="grid"){const Q=$o(G,r.value,e.span,e.offset);Object.assign(O,Q)}else if(r.value.type==="flow"){const Q=To(G,r.value,e.span,e.offset,e.width);Object.assign(O,Q)}}}if(typeof d.value=="function"){const G=d.value(l);G&&Object.assign(O,G)}else if(d.value&&typeof d.value=="object"){const G=d.value;Object.assign(O,G)}return O}),m=t.ref(null),h=t.computed({get:()=>m.value??pe(e.isRequired),set:O=>{m.value=O}}),y=t.computed(()=>typeof e.label=="string"&&e.label.length>0||typeof o.slots.label=="function"),g=Ne(t.toRef(e,"labelPosition"),"labelPosition",io.Near),v=t.computed(()=>g&&g.value==="top"?"top":g&&g.value==="right"?"right":"left"),b=t.computed(()=>({[`${s}__main`]:!0,[`${s}__main--${v.value}`]:!0})),u=t.computed(()=>({label:!0,[`label--${v.value}`]:!0})),p=Ne(t.toRef(e,"labelWidth"),"labelWidth",io.Near),k=t.computed(()=>p&&p.value?{width:fe(p.value)}:{}),S=t.computed(()=>({"label--string":!0,"label--required":h.value})),w=t.computed(()=>({content:!0,[e.contentClass]:!0})),N=t.computed(()=>({...e.contentStyle})),T=t.shallowReactive({errorTip:"",errorIcon:null,warnTip:"",warnIcon:null,infoTip:"",infoIcon:null});Te({setRequired(O){h.value=O},setErrorTip(O){T.errorTip=O},setErrorIcon(O){T.errorIcon=O},setWarnTip(O){T.warnTip=O},setWarnIcon(O){T.warnIcon=O},setInfoTip(O){T.infoTip=O},setInfoIcon(O){T.infoIcon=O},setCustomClassName(O){i.value=O},setCustomStyle(O){d.value=O}});const B=t.computed(()=>e.infoTip||T.infoTip),D=t.computed(()=>e.infoIcon||T.infoIcon),C=t.computed(()=>e.warnTip||T.warnTip),V=t.computed(()=>e.warnIcon||T.warnIcon),M=t.computed(()=>e.errorTip||T.errorTip),L=t.computed(()=>e.errorIcon||T.errorIcon),$=t.computed(()=>M.value?"error":C.value?"warn":B.value?"info":""),E=t.computed(()=>$.value.length>0),x=t.computed(()=>$.value==="error"?M.value:$.value==="warn"?C.value:$.value==="info"?B.value:""),A=t.computed(()=>$.value==="error"?L.value:$.value==="warn"?V.value:$.value==="info"?D.value:null),H=t.computed(()=>{let O={[`${s}__tip`]:!0,[`${s}__tip--${$.value}`]:!0};return $.value==="error"&&e.errorClass?O[`${e.errorClass}`]=!0:$.value==="warn"&&e.warnClass?O[`${e.warnClass}`]=!0:$.value==="info"&&e.infoClass&&(O[`${e.infoClass}`]=!0),O}),R=t.computed(()=>{let O={};return g&&g.value==="top"||!y.value?O["padding-left"]="0px":p&&p.value&&(O["padding-left"]=fe(p.value)),O}),Y=()=>{const O=A.value;return O?typeof O=="function"?t.h("div",{class:"fox-item__tip--icon"},[O()]):t.h("div",{class:"fox-item__tip--icon"},[t.h(O)]):null},U=()=>{const O=x.value;return O?typeof O=="function"?t.h("div",{class:"fox-item__tip--text"},[O()]):t.h("div",{class:"fox-item__tip--text"},[O]):null},P=t.computed(()=>o.slots.fixedPreTip),z=t.computed(()=>({[`${s}__fixed-pre-tip`]:!0})),j=t.computed(()=>o.slots.fixedTip),q=t.computed(()=>({[`${s}__fixed-tip`]:!0})),F=t.ref();let I="";t.watch([()=>e.hintVisible,()=>e.hintText,()=>e.hintType,()=>e.hintProps],([O,G,Q,ee])=>{F.value&&(O&&!ie(G)?I?ot.show(F.value,G,{...ee,id:I,type:Q},!0):I=ot.show(F.value,G,{...ee,type:Q},!0):ot.hide(I))});let K=null;const W=()=>{K||!F.value||(K=new IntersectionObserver(O=>{let G=!1;for(let Q of O)if(Q.intersectionRatio>0){G=!0,G&&o.emit("appear",Q);break}G||o.emit("disappear")}),K.observe(F.value))},Z=()=>{!K||!F.value||(K.unobserve(F.value),K=null)};return t.watch(()=>pe(e.appearListen),O=>{O?W():Z()}),t.onMounted(()=>{pe(e.appearListen)&&W()}),t.onUnmounted(Z),{classes:c,styles:f,mainClasses:b,hasLabel:y,labelClasses:u,labelStyles:k,labelStringClasses:S,contentClasses:w,contentStyles:N,contentRef:F,hasTip:E,mTip:x,mIcon:A,renderIcon:Y,renderTip:U,tipClasses:H,tipStyles:R,hasFixedTip:j,fixedTipClasses:q,hasFixedPreTip:P,fixedPreTipClasses:z}}}),oc=["prop"];function nc(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles),prop:e.prop},[t.createElementVNode("div",{class:t.normalizeClass(e.mainClasses)},[e.hasLabel?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.labelClasses),style:t.normalizeStyle(e.labelStyles)},[t.createElementVNode("div",{class:t.normalizeClass(e.labelStringClasses)},[t.renderSlot(e.$slots,"label",{},()=>[t.createTextVNode(t.toDisplayString(e.label),1)])],2),t.renderSlot(e.$slots,"fixedPreTip")],6)):t.createCommentVNode("",!0),t.createElementVNode("div",{ref:"contentRef",class:t.normalizeClass(e.contentClasses),style:t.normalizeStyle(e.contentStyles)},[t.renderSlot(e.$slots,"prepend"),t.renderSlot(e.$slots,"default"),t.renderSlot(e.$slots,"append"),e.hasFixedTip?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.fixedTipClasses)},[t.renderSlot(e.$slots,"fixedTip")],2)):t.createCommentVNode("",!0)],6)],2),t.createVNode(t.Transition,{name:"fox-item__animate"},{default:t.withCtx(()=>[e.hasTip?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.tipClasses),style:t.normalizeStyle(e.tipStyles)},[e.mIcon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon()),{key:0})):t.createCommentVNode("",!0),e.mTip?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderTip()),{key:1})):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0)]),_:1}),t.renderSlot(e.$slots,"hide")],14,oc)}const be=J(tc,[["render",nc]]);function lc(e,o){return{props:{span:{type:[Number,String],required:!1,default:-1},offset:{type:[Number],default:0},width:{type:[String,Number],required:!1},align:{type:[String],required:!1,default:"center"},contentClass:{type:[String],required:!1},contentStyle:{type:[Object]},divide:{type:[Boolean,String],required:!1,default:!1}},setup(l,n){const a=e,r=t.computed(()=>({[a]:!0,[`${a}__stretch`]:l.span==="stretch",[`${a}__${l.align}`]:!0})),s=Oe(),i=No();Bo(!1);const c=t.computed(()=>{const d={};if(l.width)l.width!=="auto"&&(d.width=fe(l.width));else if(i&&s){const f=Vo(s,!1),m=Ao(s,!1);if(f.value&&m){if(f.value.type==="grid"){const h=$o(m,f.value,l.span,l.offset);Object.assign(d,h)}else if(f.value.type==="flow"){const h=To(m,f.value,l.span,l.offset,l.width);Object.assign(d,h)}}}return d});return()=>{const d=[];if(n.slots.default){const m=n.slots.default();if(l.divide)for(let h=0;h<m.length;h++){if(h>0){const y=t.h("div",{class:{[`${a}__divide`]:!0}});d.push(y)}d.push(m[h])}else Reflect.apply([].push,d,m)}const f={class:r.value,style:c.value};return t.h("div",f,d)}}}}const{componentName:ac,create:rc,scope:TB}=X("row-item"),Hn=rc(lc(ac));function sc(e,o){return{props:{span:{type:[Number,String],required:!1,default:1},offset:{type:[Number],default:0},width:{type:[String,Number],required:!1}},setup(l,n){const a=Oe(),r=No();Bo(!1);const s=t.computed(()=>r&&a?Vo(a,!1).value:null),i=e,c=t.computed(()=>({[i]:!0,[`${i}__gutter`]:s.value&&s.value.type!=="flow",[`${i}__stretch`]:l.span==="stretch"})),d=t.computed(()=>{const f={};if(l.width)l.width!=="auto"&&(f.width=fe(l.width));else{const m=r&&a?Ao(a,!1):null;if(s.value&&m){if(s.value.type==="grid"){const h=$o(m,s.value,l.span,l.offset);Object.assign(f,h)}else if(s.value.type==="flow"){const h=To(m,s.value,l.span,l.offset,l.width);Object.assign(f,h)}}}return f});return()=>{const f={class:c.value,style:d.value};return n.slots&&typeof n.slots.default=="function"?t.h("div",f,n.slots.default()):t.h("div",f)}}}}const{componentName:ic,create:cc,scope:$B}=X("slot-item"),jn=cc(sc(ic)),za={type:{type:String,default:"text"},modelValue:{type:[String,Number],default:""},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},adjustPosition:{type:Boolean,default:!0},alwaysSystem:{type:Boolean,default:!1}};function uc(e,o,l,n){return{props:{...ue,...de,...za},emits:["change","update:modelValue","blur","focus","clear"],setup(a,r){const s=Ce(t.computed(()=>a.disabled)),i=Ae(t.computed(()=>a.readonly)),{emitEvent:c}=we({componentName:e,get validate(){return!s.value&&!i.value}},a.prop??r.attrs.name),{toLocaleRefs:d}=ae.useFoxI18n(o),f=d(a,["placeholder"]),m=t.ref(!1),h=Ee(a,"modelValue"),y=e,g=t.computed(()=>({[y]:!0,[`${y}--disabled`]:s.value,[`${y}--readonly`]:i.value})),v=Ne(t.computed(()=>a.textAlign),"textAlign"),b=t.computed(()=>{const E={};return v.value&&(E["text-align"]=v.value),E}),u=E=>{let A=E.target.value;a.type==="digit"&&(A=cn(A,!0)),a.type==="number"&&(A=cn(A,!1)),a.maxLength&&A.length>Number(a.maxLength)&&(A=A.slice(0,Number(a.maxLength))),h.value=A,c("update:modelValue",A,E),c("change",A,E)};let p=Ee(a,"hintText"),k=t.ref(!1);const S=E=>{let A=E.target.value;m.value=!0,ie(p.value)||(k.value=!0),c("focus",A,E)},w=E=>{setTimeout(()=>{k.value&&(k.value=!1),m.value=!1},0);let A=E.target.value;a.maxLength&&A.length>Number(a.maxLength)&&(A=A.slice(0,Number(a.maxLength))),c("blur",A,E)},N=t.computed(()=>({[`${y}__append`]:!0})),T=t.computed(()=>{const E={};return r.slots.append&&!B.value&&!L.value&&(E.display="none"),E}),B=t.computed(()=>ge(a.unit)>0),D=t.computed(()=>!L.value),C=t.computed(()=>({[`${y}__unit`]:!0,hidden:!D.value})),V=E=>{h.value="",c("update:modelValue","",E),c("change","",E),c("clear","")},M=t.computed(()=>pe(a.clearable)&&!s.value&&!i.value),L=t.computed(()=>{let E=ge(h.value)>0;return pe(a.clearable)&&E&&m.value}),$=t.computed(()=>({action:!0,hidden:!L.value}));return()=>{const E={class:g.value,style:b.value,type:a.type,maxlength:a.maxLength,placeholder:f.placeholder.value,disabled:s.value,readonly:i.value,value:h.value,"adjust-position":a.adjustPosition,"always-system":a.alwaysSystem,onInput:u,onFocus:S,onBlur:w},x=[],A=t.h("input",E);x.push(A);const H=[];if(M.value){const q={class:["action-icon"]},F=t.h(n,q),I={class:$.value,onClick:V},K=t.h("view",I,{default:()=>[F]});H.push(K)}if(B.value){const q=t.h("view",{class:C.value},[a.unit]);H.push(q)}const R={class:N.value,style:T.value},Y=t.h("view",R,{default:()=>H});x.push(Y);const U={default:()=>x};U.label=r.slots.default,U.prepend=r.slots.prepend,U.append=r.slots.append,U.fixedPreTip=r.slots.fixedPreTip,U.fixedTip=r.slots.fixedTip;const z={...xn(a,za),hintText:p.value,hintVisible:k.value};return t.h(l,z,U)}}}}const{componentName:dc,create:fc,scope:mc}=X("input-item"),Wn=fc(uc(dc,mc,be,te.CircleClose));function La(e,o=0){let l=`${e}`,n=l.indexOf(".");if(n==-1)return l;let a=n;for(let r=l.length-1;r>=n;r--)if(l.charAt(r)!="0"){a=r;break}return a-n<o?a=n+o+1:a!=n&&(a+=1),a>l.length?l=l.padEnd(a,"0"):l=l.substring(0,a),l}function Pa(e,o,l=20){if(typeof o=="string"&&(o=me(o)),o==1||o==-1)return`${e}`;if(o==0)return"0";if(o>0){let n=yr(`${e}`,`${o}`);return La(n)}else{let n=En(`${e}`,vr(`${o}`),20);return La(n)}}function pc(e,o=-1,l=!1,n=3,a=","){return mo(e,o,l,n,a)}function Ra(e,o,l,n,a=!0){if(e=="")return"";if(e=kr(e),o=me(o),o==1)return e;if(n)e=Pa(e,o),l&&(e=="0"&&a?e=`${e}.`.padEnd(me(l)+2,"0"):e=En(e,1,me(l)));else{let r=-1*o;e=Pa(e,r)}return e}function Fa(e,o){let l={maxValid:!0,minValid:!0,message:""};if(o.min!==void 0){let n=pe(o.minInclude),a=an(e,o.min);if(n&&a==-1||!n&&(a==0||a==-1)){let r="请输入不小于 {0} 的数值";l.message=r.replace("{0}",o.min),l.minValid=!1}}if(o.max!=null){let n=pe(o.maxInclude),a=an(e,o.max);(n&&a==1||!n&&(a==0||a==1))&&(l.maxValid=!1)}return l}const Oa={clearable:{type:Boolean,default:!0},modelValue:{type:[String,Number],default:""},showTip:{type:[Boolean,String],required:!1,default:!0},min:{type:[Number,String],required:!1},minInclude:{type:[Boolean,String],required:!1,default:!0},max:{type:[Number,String],required:!1},maxInclude:{type:[Boolean,String],required:!1,default:!0},unit:{type:String,required:!1},rates:{type:[Number,String],required:!1,default:1},precision:{type:[Number,String],required:!1},integerLength:{type:[Number,String],required:!1,default:-1},decimalLength:{type:[Number,String],required:!1,default:2},autoPadding:{type:Boolean,required:!1,default:!0},digits:{type:Number,required:!1,default:3},separator:{type:String,required:!1,default:","},placeholder:{type:String,required:!1,default:""},textAlign:{type:String,required:!1},adjustPosition:{type:Boolean,default:!0},alwaysSystem:{type:Boolean,default:!1}};function hc(e,o,l,n){return{props:{...ue,...de,...Oa},emits:["change","update:modelValue","blur","focus","clear"],setup(a,r){const s=Ce(t.computed(()=>a.disabled)),i=Ae(t.computed(()=>a.readonly)),{emitEvent:c}=we({componentName:e,get validate(){return!s.value&&!i.value}},a.prop??r.attrs.name),d=t.ref(!1),f=Ee(a,"modelValue"),m=t.ref("");t.watch([()=>f.value,()=>a.rates,()=>a.precision],([R,Y,U])=>{if(ie(R)){m.value="";return}const P=Ra(R,Y,U,!1);m.value!==P&&(m.value=P)},{immediate:!0});const h=t.computed(()=>{let R="";return d.value&&(R=m.value),R}),{t:y}=ae.useFoxI18n(o),g=t.computed(()=>{let R=a.placeholder??"";return!d.value&&!ie(m.value)?R=pc(m.value,a.decimalLength,a.autoPadding,a.digits,a.separator):R=ie(R)?y(["placeholder"]):R,R}),v=e,b=t.computed(()=>({[v]:!0,[`${v}--disabled`]:s.value,[`${v}__placeholder`]:m.value.length>0})),u=Ne(t.computed(()=>a.textAlign),"textAlign"),p=t.computed(()=>{const R={};return u.value&&(R["text-align"]=u.value),R}),k=t.ref(""),S=t.computed(()=>{let R=k.value;return ie(R)&&(R=a.errorTip??""),R}),w=t.ref(""),N=t.ref(!1),T=R=>{let U=R.target.value;if(ie(U)){m.value="",f.value="",c("update:modelValue","",R),c("change","",R),pe(a.showTip)&&N.value&&(N.value=!1);return}if(U.length>=2){let P=U;if(P.charAt(0)=="-"&&(P=P.substring(1)),P.length>=2&&P.charAt(0)=="0"&&P.charAt(1)!="."){t.triggerRef(m);return}}if(U!="-"){if(!Tr(U)){t.triggerRef(m);return}if(a.integerLength!=-1&&$r(U)>Number(a.integerLength)){t.triggerRef(m);return}if(a.decimalLength&&a.decimalLength!=-1&&Er(U)>Number(a.decimalLength)){t.triggerRef(m);return}let P=Fa(U,a);if(P.maxValid===!1){k.value=P.message,t.triggerRef(m);return}}else if(a.min!=null&&me(a.min)>=0){t.triggerRef(m);return}w.value=U,pe(a.showTip)&&(N.value=U.length>0),m.value=U,f.value=Ra(U,a.rates,a.precision,!0),c("update:modelValue",f.value,R),c("change",f.value,R)},B=R=>{if(d.value=!0,pe(a.showTip)){let Y=m.value;ie(Y)&&(Y=a.hintText),ie(Y)||(w.value=Y,N.value=!0)}k.value="",c("focus",f.value,R)},D=R=>{if(setTimeout(()=>{d.value=!1,pe(a.showTip)&&N.value===!0&&(N.value=!1)},0),!ie(m.value)){let Y=Fa(m.value,a);if(Y.minValid===!1||Y.maxValid===!1){k.value=Y.message;return}}c("update:modelValue",f.value,R),c("blur",f.value,R)},C=t.computed(()=>({[`${v}__append`]:!0})),V=t.computed(()=>{const R={};return r.slots.append&&!M.value&&!A.value&&(R.display="none"),R}),M=t.computed(()=>ge(a.unit)>0),L=t.computed(()=>!A.value),$=t.computed(()=>({[`${v}__unit`]:!0,hidden:!L.value})),E=R=>{f.value="",c("update:modelValue","",R),c("change","",R),c("clear","")},x=t.computed(()=>pe(a.clearable)&&!s.value&&!i.value),A=t.computed(()=>{let R=ge(f.value)>0;return pe(a.clearable)&&R&&d.value}),H=t.computed(()=>({action:!0,hidden:!A.value}));return()=>{let R={class:b.value,style:p.value,type:"digit",maxlength:a.maxLength,placeholder:g.value,disabled:s.value,readonly:i.value,value:h.value,"adjust-position":a.adjustPosition,"always-system":a.alwaysSystem,onInput:T,onFocus:B,onBlur:D},Y=[],U=t.h("input",R);Y.push(U);let P=[];if(x.value){const W={class:["action-icon"]},Z=t.h(n,W),O={class:H.value,onClick:E},G=t.h("view",O,{default:()=>[Z]});P.push(G)}if(M.value){const W=t.h("view",{class:$.value},[a.unit]);P.push(W)}const z={class:C.value,style:V.value},j=t.h("view",z,{default:()=>P});Y.push(j);const q={default:()=>Y};q.label=r.slots.default,q.prepend=r.slots.prepend,q.append=r.slots.append,q.fixedPreTip=r.slots.fixedPreTip,q.fixedTip=r.slots.fixedTip;let I={...xn(a,Oa),errorTip:S.value,hintText:w.value,hintVisible:N.value,hintType:"number"};return t.h(l,I,q)}}}}const{componentName:gc,create:yc,scope:vc}=X("money-item"),Yn=yc(hc(gc,vc,be,te.CircleClose)),hn={modelValue:{type:[String,Number],default:""},textAlign:{type:String,default:""},limitShow:{type:Boolean,default:!1},maxLength:{type:[String,Number],default:""},rows:{type:[String,Number],default:"2"},placeholder:{type:String,default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autosize:{type:[Boolean,Object],default:!1},autofocus:{type:Boolean,default:!1}},{componentName:kc,create:bc,scope:Sc}=X("textarea"),Cc=bc({props:{...hn},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:o}){let{toLocaleRefs:l}=ae.useFoxI18n(Sc);const n=l(e,["placeholder"]),a=t.ref(),r=t.computed(()=>{const h=kc;return{[h]:!0,[`${h}--disabled`]:e.disabled}});t.onMounted(()=>{e.modelValue&&c(String(e.modelValue)),e.autosize&&t.nextTick(i)});const s=t.computed(()=>({textAlign:e.textAlign})),i=()=>{let h=a.value;h.style.height="auto";let y=h.scrollHeight;if(typeof e.autosize=="object"){const{maxHeight:g,minHeight:v}=e.autosize;g!==void 0&&(y=Math.min(y,g)),v!==void 0&&(y=Math.max(y,v))}y&&(h.style.height=y+"px")};t.watch(()=>e.modelValue,()=>{e.autosize&&t.nextTick(i)});const c=(h,y)=>{e.maxLength&&h.length>Number(e.maxLength)&&(h=h.substring(0,Number(e.maxLength))),o("update:modelValue",h,y),o("change",h,y)};return{...n,textareaRef:a,classes:r,styles:s,change:h=>{const y=h.target;c(y.value,h)},focus:h=>{e.disabled||e.readonly||o("focus",h)},blur:h=>{if(e.disabled||e.readonly)return;let g=h.target.value;c(g,h),o("blur",{value:g,event:h})}}}}),wc=["rows","disabled","readonly","value","maxlength","placeholder","autofocus"],Nc={key:0,class:"fox-textarea__limit"};function Bc(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createElementVNode("textarea",{ref:"textareaRef",class:"fox-textarea__textarea",style:t.normalizeStyle(e.styles),rows:e.rows,disabled:e.disabled,readonly:e.readonly,value:e.modelValue,onInput:o[0]||(o[0]=(...s)=>e.change&&e.change(...s)),onBlur:o[1]||(o[1]=(...s)=>e.blur&&e.blur(...s)),onFocus:o[2]||(o[2]=(...s)=>e.focus&&e.focus(...s)),maxlength:e.maxLength,placeholder:e.placeholder,autofocus:e.autofocus},null,44,wc),e.limitShow?(t.openBlock(),t.createElementBlock("view",Nc,t.toDisplayString(e.modelValue?e.modelValue.length:0)+"/"+t.toDisplayString(e.maxLength),1)):t.createCommentVNode("",!0)],2)}const Eo=J(Cc,[["render",Bc]]);function Vc(e,o,l,n){return{props:{...ue,...de,...hn},emits:["update:modelValue","change","blur","focus"],setup(a,r){const s=Ce(t.computed(()=>a.disabled)),i=Ae(t.computed(()=>a.readonly)),{emitEvent:c}=we({componentName:e,get validate(){return!s.value&&!i.value}},a.prop??r.attrs.name),d=Ee(a,"modelValue"),f=v=>{d.value=v,c("update:modelValue",v,{}),c("change",v,{})};let m=Ee(a,"hintText"),h=t.ref(!1);const y=v=>{ie(m.value)||(h.value=!0),c("focus",d.value,v)},g=v=>{setTimeout(()=>{h.value&&(h.value=!1)},0),c("blur",d.value,v)};return()=>{const b={...he(a,hn),disabled:s.value,readonly:i.value,value:d.value,"onUpdate:modelValue":f,onFocus:y,onBlur:g},u=[],p=t.h(n,b);u.push(p);const k={default:()=>u};k.label=r.slots.default,k.prepend=r.slots.prepend,k.append=r.slots.append,k.fixedPreTip=r.slots.fixedPreTip,k.fixedTip=r.slots.fixedTip;const S=he(a,de,ue);return t.h(l,S,k)}}}}const{componentName:Ac,create:Tc,scope:$c}=X("textarea-item"),Xn=Tc(Vc(Ac,$c,be,Eo));function Ec(e){return e===window}const Ve=e=>{const o=t.unref(e);if(Ec(o)){const l=o.innerWidth,n=o.innerHeight;return{top:0,left:0,right:l,bottom:n,width:l,height:n}}return o&&o.getBoundingClientRect?o.getBoundingClientRect():{top:0,left:0,right:0,bottom:0,width:0,height:0}},Xe={visible:{type:Boolean,default:!1},zIndex:{type:[Number,String],default:2e3},duration:{type:[Number,String],default:.3},lockScroll:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},position:{type:String,default:"center"},transition:{type:String,default:""},style:{type:Object,default:{}},popClass:{type:String,default:""},closeable:{type:Boolean,default:!1},closeIconPosition:{type:String,default:"top-right"},destroyOnClose:{type:Boolean,default:!0},teleport:{type:[String,Element],default:"body"},overlay:{type:Boolean,default:!0},round:{type:Boolean,default:!1},teleportDisable:{type:Boolean,default:!1},safeAreaInsetBottom:{type:Boolean,default:!1},overlayClass:{type:String,default:""},overlayStyle:{type:Object,default:{}}},_r=2e3;let Ka=_r;const Dc=(e,o)=>({components:o,props:{...Xe},emits:["click-pop","click-close-icon","open","close","opend","closed","click-overlay","update:visible"],setup(l,{emit:n}){const a=t.reactive({zIndex:l.zIndex,showSlot:!0,closed:l.closeable}),r=t.computed(()=>({[e]:!0,round:l.round,[`fox-popup--${l.position}`]:!0,[`fox-popup--${l.position}--safebottom`]:l.position==="bottom"&&l.safeAreaInsetBottom,[l.popClass]:!0})),s=t.computed(()=>({zIndex:a.zIndex,transitionDuration:`${l.duration}s`,...l.style})),i=t.computed(()=>l.transition?l.transition:`fox-popup-slide-${l.position}`),c=()=>{l.zIndex!==_r&&(Ka=Number(l.zIndex)),n("update:visible",!0),a.zIndex=++Ka,l.destroyOnClose&&(a.showSlot=!0),n("open")},d=()=>{n("update:visible",!1),n("close"),l.destroyOnClose&&setTimeout(()=>{a.showSlot=!1},+l.duration*1e3)},f=v=>{n("click-pop",v)},m=v=>{v.stopPropagation(),n("click-close-icon",v),n("update:visible",!1)},h=v=>{n("click-overlay",v),l.closeOnClickOverlay&&n("update:visible",!1)},y=v=>{n("opend",v)},g=v=>{n("closed",v)};return t.watch(()=>l.visible,v=>{l.visible?c():d()}),t.watch(()=>l.closeable,v=>{a.closed=v}),{...t.toRefs(a),popStyle:s,transitionName:i,classes:r,onClick:f,onClickCloseIcon:m,onClickOverlay:h,onOpened:y,onClosed:g}}});let Bt=0;const Ua="fox-overflow-hidden",Ha=()=>st?document.body:{classList:[]},xc=e=>[()=>{if(e())try{!Bt&&Ha().classList.add(Ua),Bt++}catch{}},()=>{if(e()&&Bt)try{Bt--,!Bt&&Ha().classList.remove(Ua)}catch{}}],Ic={visible:{type:Boolean,default:!1},zIndex:{type:[Number,String],default:2e3},duration:{type:[Number,String],default:.3},lockScroll:{type:Boolean,default:!0},overlayClass:{type:String,default:""},overlayStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}},{componentName:qc,create:Mc}=X("overlay"),zc=Mc({props:{...Ic},emits:["click","update:visible"],setup(e,{emit:o}){const[l,n]=xc(()=>e.lockScroll),a=t.computed(()=>({[qc]:!0,[e.overlayClass]:!0})),r=t.computed(()=>({transitionDuration:`${e.duration}s`,zIndex:e.zIndex,...e.overlayStyle}));return t.watch(()=>e.visible,i=>{i?l():n()}),{classes:a,style:r,onClick:i=>{o("click",i),e.closeOnClickOverlay&&o("update:visible",!1)}}}});function Lc(e,o,l,n,a,r){return t.openBlock(),t.createBlock(t.Transition,{name:"overlay-fade"},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("view",{class:t.normalizeClass(e.classes),onClick:o[0]||(o[0]=t.withModifiers((...s)=>e.onClick&&e.onClick(...s),["stop"])),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6),[[t.vShow,e.visible]])]),_:3})}const at=J(zc,[["render",Lc]]),{componentName:Pc,create:Rc}=X("popup"),Fc=Rc(Dc(Pc,{FoxOverLay:at,Close:te.Close}));function Oc(e,o,l,n,a,r){const s=t.resolveComponent("FoxOverLay"),i=t.resolveComponent("Close");return t.openBlock(),t.createBlock(t.Teleport,{to:e.teleport,disabled:e.teleportDisable},[e.overlay?(t.openBlock(),t.createBlock(s,t.mergeProps({key:0,visible:e.visible,"close-on-click-overlay":e.closeOnClickOverlay,"z-index":e.zIndex,"lock-scroll":e.lockScroll,duration:e.duration,"overlay-class":e.overlayClass,"overlay-style":e.overlayStyle,onClick:e.onClickOverlay},e.$attrs),null,16,["visible","close-on-click-overlay","z-index","lock-scroll","duration","overlay-class","overlay-style","onClick"])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{name:e.transitionName,onAfterEnter:e.onOpened,onAfterLeave:e.onClosed},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.popStyle),onClick:o[1]||(o[1]=(...c)=>e.onClick&&e.onClick(...c))},[e.showSlot?t.renderSlot(e.$slots,"default",{key:0}):t.createCommentVNode("",!0),e.closed?(t.openBlock(),t.createElementBlock("view",{key:1,onClick:o[0]||(o[0]=(...c)=>e.onClickCloseIcon&&e.onClickCloseIcon(...c)),class:t.normalizeClass(["fox-popup__close-icon","fox-popup__close-icon--"+e.closeIconPosition])},[t.renderSlot(e.$slots,"close-icon",{},()=>[t.createVNode(i,{height:"12px"})])],2)):t.createCommentVNode("",!0)],6),[[t.vShow,e.visible]])]),_:3},8,["name","onAfterEnter","onAfterLeave"])],8,["to","disabled"])}const ce=J(Fc,[["render",Oc]]),ja=10;function Kc(e,o){return e>o&&e>ja?"horizontal":o>e&&o>ja?"vertical":""}function Ke(){const e=t.ref(0),o=t.ref(0),l=t.ref(0),n=t.ref(0),a=t.ref(0),r=t.ref(0),s=t.ref(0),i=t.ref(0),c=t.ref(0),d=t.ref(0),f=t.ref(""),m=()=>f.value==="vertical",h=()=>f.value==="horizontal",y=()=>{s.value=0,i.value=0,c.value=0,d.value=0,f.value="",l.value=0};return{move:b=>{const u=b.touches[0];s.value=u.clientX-e.value,i.value=u.clientY-o.value,a.value=u.clientX,r.value=u.clientY,c.value=Math.abs(s.value),d.value=Math.abs(i.value),n.value=Date.now()-l.value,f.value||(f.value=Kc(c.value,d.value))},start:b=>{y(),e.value=b.touches[0].clientX,o.value=b.touches[0].clientY,l.value=Date.now()},reset:y,startX:e,startY:o,startTime:l,duration:n,moveX:a,moveY:r,deltaX:s,deltaY:i,offsetX:c,offsetY:d,direction:f,isVertical:m,isHorizontal:h}}const es={readonly:{type:Boolean,default:!1},visibleItemCount:{type:[Number,String],default:7},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},childrenKey:{type:String,required:!1,default:"children"},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:1e3}},gn={...Xe,...es,modelValue:{type:[String,Number,Boolean,Object,Array],default:""},text:{type:[Array],default:[]},columnOptions:{type:[Object,Function]},source:{type:[Array,Function,String],default:[]},params:{type:Object},valueType:{type:String,required:!1,default:"value"},title:{type:String,default:""},cancelText:{type:String,default:""},clearText:{type:String,default:""},confirmText:{type:String,default:""}};let ts=36;function Uc(){return ts}function Hc(e){ts=e}function qe(e,o){return typeof e.textKey=="string"&&e.textKey.length>0?o[e.textKey]:o.text}function yn(e,o){return typeof e.childrenKey=="string"&&e.childrenKey.length>0?o[e.childrenKey]:o.children??null}function jc(e,o,l){typeof e.childrenKey=="string"&&e.childrenKey.length>0&&(o[e.childrenKey]=l),o.children=l}function rt(e,o){return typeof e.valueKey=="string"&&e.valueKey.length>0?o[e.valueKey]:o.value}function Wa(e,o){return typeof e.itemOptions=="function"?e.columnOptions(o):e.columnOptions}let Wc=class{proxy;constructor(o){this.proxy=o}async load(o,l,n){if(Array.isArray(l))return l;if(typeof l=="function")return await l(n);const a=Ge(this.proxy,o);return a===null?(console.error(`${o} component not found api function`),[]):(Be(n)&&t.isReactive(n)&&(n=t.toRaw(n)),await a(l,n))}};function Yc(){const e=t.getCurrentInstance();return new Wc(e.proxy)}function Ya(e,o,l){const n=qe(e,o),a=qe(e,l);if(n!==a)return!1;const r=rt(e,o),s=rt(e,l);return r===s}function Xc(e,o,l,n){if(l.length==0)return[];Array.isArray(o)||(o=[o]);const a=[],r=e.valueType??"value";if(n==="singleColumn"||n==="multipleColumn")for(let s=0;s<o.length&&s<l.length;s++){const i=o[s];let d=l[s].findIndex(f=>{if(r==="text")return qe(e,f)===i;if(r==="value"){let m=rt(e,f);return m==null&&(m=qe(e,f)),m===i}else if(r==="item")return Ya(e,f,i)});if(d==-1)break;a.push(d)}else{let s=l[0];for(let i=0;i<o.length;i++){const c=o[i];let d=s.findIndex(m=>{if(r==="text")return qe(e,m)===c;if(r==="value"){let h=rt(e,m);return h==null&&(h=qe(e,m)),h===c}else if(r==="item")return Ya(e,m,c)});if(d==-1)break;a.push(d);const f=yn(e,s[d]);if(!Array.isArray(f))break;s=f}}return a}function Xa(e,o,l,n){if(l.length==0)return null;const a={texts:[],values:[],items:[]},r=e.valueType??"value";if(n==="singleColumn"||n==="multipleColumn")for(let s=0;s<o.length&&s<l.length;s++){const i=l[s];let c=o[s];c<0&&c>=i.length&&(c=0);const d=i[c],f=qe(e,d);if(a.texts.push(f),a.items.push(d),r==="text")a.values.push(f);else if(r==="value"){let m=rt(e,d);m==null&&(m=f),a.values.push(m)}else a.values.push(d)}else{let s=l[0];for(let i=0;i<o.length;i++){let c=o[i];c<0&&c>=s.length&&(c=0);const d=s[c],f=Object.assign({},d);f.children=null;const m=qe(e,d);if(a.texts.push(m),a.items.push(f),r==="text")a.values.push(m);else if(r==="value"){let h=rt(e,d);h==null&&(h=m),a.values.push(h)}else a.values.push(f);if(!Array.isArray(d.children))break;s=d.children}}return a}function Qa(e){return{text:e,value:e}}const Qc=15,Gc=300,Zc=200,{create:Jc}=X("picker-column");function _c(e){e.stopPropagation()}function eu(e,o){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),o&&_c(e)}const tu=Jc({props:{source:{type:Array,default:[]},columnIndex:{type:Number,required:!0,default:0},modelValue:{type:Number,required:!0,default:0},itemHeight:{type:Number,required:!0,default:35},...es},emits:["click","change","update:modelValue"],setup(e,{emit:o}){const l=t.computed(()=>({"fox-picker__list":!0})),n=t.computed(()=>({height:`${me(e.visibleItemCount)*+e.itemHeight}px`})),a=t.computed(()=>({"fox-picker__content":!0,"fox-picker__content-tile":!e.threeDimensional,"fox-picker__content-roller":e.threeDimensional})),r=t.computed(()=>e.itemHeight*Math.floor(+e.visibleItemCount/2)),s=B=>B>=m.currIndex+8||B<=m.currIndex-8,i=t.computed(()=>({transition:`transform ${m.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`rotate3d(1, 0, 0, ${m.deg})`,top:`${r.value}px`})),c=B=>`transform: rotate3d(1, 0, 0, ${-m.rotation*B}deg) translate3d(0px, 0px, 104px)`,d=t.computed(()=>({transition:`transform ${m.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`translate3d(0, ${m.scrollDistance+r.value}px, 0)`})),f=t.ref(null),m=t.reactive({currIndex:e.modelValue,startDistance:0,scrollDistance:0,scrollTime:0,moving:!1,rotation:20,deg:0,transitionEndTrigger:null}),h=t.toRef(e,"source"),y=B=>qe(e,B),g=B=>rt(e,B),v=Ke(),b=()=>{m.transitionEndTrigger&&(m.transitionEndTrigger(),m.transitionEndTrigger=null)},u=(B,D=!1,C=!1)=>{if(m.currIndex=B,D){const V=()=>{m.moving=!1,o("update:modelValue",B),o("change",B)};C?m.transitionEndTrigger=V:V()}},p=(B,D,C)=>{let V=B+m.startDistance;if(D==="end"){const M=-(h.value.length-1)*e.itemHeight;V<M&&(V=M,(!C||C<=0)&&(C=e.swipeDuration)),V>0&&(V=0,(!C||C<=0)&&(C=e.swipeDuration));let L=Math.abs(Math.round(-V/e.itemHeight));const $=-L*e.itemHeight,E=`${(L+1)*m.rotation}deg`,x=C?C>0:!1;u(L,!0,x),k($,D,C,E)}else{let M=(-V/e.itemHeight+1)*m.rotation;const L=(h.value.length+1)*m.rotation,$=0;if(M=Math.min(Math.max(M,$),L),e.threeDimensional&&(M<$||M>L))return;k(V,null,void 0,`${M}deg`)}},k=(B=0,D,C=Zc,V)=>{D==="end"?m.scrollTime=C:m.scrollTime=0,m.deg=V,m.scrollDistance=B},S=(B,D)=>(B=Math.abs(B/D)/.003*(B<0?-1:1),B),w=B=>{e.readonly||(m.startDistance=m.scrollDistance,v.start(B),m.transitionEndTrigger=null)},N=B=>{e.readonly||(m.moving=!0,v.move(B),v.isVertical()&&(m.moving=!0,eu(B,!0)),p(v.deltaY.value,"",0))},T=()=>{if(e.readonly)return;const B=v.deltaY.value,D=v.duration.value;if(D<Gc&&Math.abs(B)>Qc){const V=S(B,D);p(V,"end",e.swipeDuration)}else p(B,"end",0)};return t.watch(()=>e.modelValue,B=>{if(m.currIndex!==B){m.currIndex=B;const D=-B*e.itemHeight;p(D)}}),t.onMounted(()=>{const B=-e.modelValue*e.itemHeight;p(B)}),{classes:l,styles:n,contentClasses:a,source:h,itemText:y,itemValue:g,...t.toRefs(m),roller:f,getItemText:qe,onTouchStart:w,onTouchMove:N,onTouchEnd:T,isHidden:s,setRollerStyle:c,touchRollerStyle:i,touchTileStyle:d,stopMomentum:b}}}),ou={key:1,class:"fox-picker__item-tile"};function nu(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles),onTouchstart:o[0]||(o[0]=(...s)=>e.onTouchStart&&e.onTouchStart(...s)),onTouchmove:o[1]||(o[1]=(...s)=>e.onTouchMove&&e.onTouchMove(...s)),onTouchend:o[2]||(o[2]=(...s)=>e.onTouchEnd&&e.onTouchEnd(...s)),onTouchcancel:o[3]||(o[3]=(...s)=>e.onTouchEnd&&e.onTouchEnd(...s)),onTransitionend:o[4]||(o[4]=(...s)=>e.stopMomentum&&e.stopMomentum(...s))},[t.createElementVNode("view",{ref:"roller",class:t.normalizeClass(e.contentClasses),style:t.normalizeStyle(e.threeDimensional?e.touchRollerStyle:e.touchTileStyle)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.source,(s,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${e.columnIndex}_${i}`},[e.threeDimensional?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-picker__item",{"fox-picker__item-hidden":e.isHidden(i+1)}]),style:t.normalizeStyle(e.setRollerStyle(i+1))},t.toDisplayString(e.itemText(s)),7)):(t.openBlock(),t.createElementBlock("view",ou,t.toDisplayString(e.itemText(s)),1))],64))),128))],6)],38)}const Ga=J(tu,[["render",nu]]),{create:lu,componentName:au,scope:ru}=X("picker"),su=lu({components:{[Ga.name]:Ga,[ce.name]:ce},props:{...gn},emits:["close","change","confirm","update:visible","update:text","update:modelValue","clear"],setup(e,{emit:o}){const{toLocaleRefs:l,t:n}=ae.useFoxI18n(ru),a=l(e,["title","cancelText","clearText","confirmText"]),r=t.ref(null),s=t.ref(Uc());t.watch(()=>e.visible,C=>{C&&s.value<=0&&setTimeout(()=>{if(r.value){const V=Ve(r.value);s.value=V.height,Hc(s.value)}},50)});const i=t.computed(()=>({[au]:!0})),c=Yc(),d=t.ref("singleColumn");let f=t.ref([]);t.watch([()=>e.source,()=>e.params],async([C,V])=>{if(C){let M=await c.load("picker",C,V);if(M.length>0){let L=M[0];if(Array.isArray(L)){if(typeof L[0]=="string"){let $=M,E=[];$.forEach(x=>{let A=x.map(H=>Qa(H));E.push(A)}),f.value=E}else f.value=M;d.value="multipleColumn"}else if(typeof L=="string"){let $=M,E=[],x=$.map(A=>Qa(A));E.push(x),f.value=E,d.value="singleColumn"}else{const $=yn(e,L);Array.isArray($)?(d.value="cascade",f.value=[M]):(d.value="singleColumn",f.value=[M])}}else f.value=[]}},{immediate:!0});const m=t.ref([]),h=t.ref(e.modelValue),y=t.ref([]),g=t.ref([]);t.watch([()=>e.modelValue,()=>f.value],([C,V])=>{let M=Xc(e,C,V,d.value);if(!xe(M,g.value)){g.value=M;let L=Xa(e,M,V,d.value);L&&(m.value=L.texts,o("update:text",m.value))}});const v=t.ref(e.visible);t.watch(()=>e.visible,C=>{v.value=C});const b=C=>{let V=Wa(e,C);return Be(V)?V.defaultIndex??0:0},u=C=>{if(e.readonly===!0)return!0;let V=Wa(e,C);return Be(V)?V.readonly??!1:!1},p=(C,V)=>{let M=g.value;M[C]=V;for(let $=0;$<C;$++)M[$]==null&&(M[$]=b($));if(d.value==="cascade")for(let $=C+1;$<S.value.length;$++){let E=b($);$<M.length?M[$]=E:M.push(E)}else for(let $=M.length;$<S.value.length;$++){let E=b($);M.push(E)}g.value=M;let L=Xa(e,M,f.value,d.value);L&&(m.value=L.texts,h.value=L.values,y.value=L.items)},k=C=>C<g.value.length?g.value[C]:b(C),S=t.computed(()=>{if(f.value.length==0)return[];if(d.value=="singleColumn"||d.value=="multipleColumn")return f.value;let C=[],V=0,M=f.value[0],L=0;for(;;){let $=M.map(A=>{let H=Object.assign({},A);return jc(e,H,null),H});C.push($),V>=g.value.length?L=0:L=g.value[V],(L<0||L>=M.length)&&(L=0);let E=M[L];const x=yn(e,E);if(!Array.isArray(x))break;M=x,V++}return C}),w=t.computed(()=>me(+e.visibleItemCount-1)/2*s.value);return{...a,pickerLineRef:r,classes:i,columns:S,dataType:d,show:v,itemHeight:s,top:w,isReadonly:u,getIndex:k,change:(C,V)=>{p(C,V)},close:()=>{o("close"),o("update:visible",!1)},confirm:()=>{if(e.readonly===!0){o("update:visible",!1);return}let C=f.value.length-1;for(;C>=0&&!(g.value[C]===null||g.value[C]===void 0);C--);if(C>=0&&p(C,0),d.value==="singleColumn"){let V=h.value.length>0?h.value[0]:"",M=y.value.length>0?y.value[0]:null;e.readonly||(o("update:modelValue",V),o("update:text",m.value),o("change",V,M)),o("confirm",V)}else e.readonly||(o("update:modelValue",h.value),o("update:text",m.value),o("change",h.value,y.value)),o("confirm",h.value);o("update:visible",!1)},clear:()=>{if(e.readonly===!0){o("update:visible",!1);return}d.value==="singleColumn"?(o("update:modelValue",""),o("change","")):(o("update:modelValue",[]),o("change",[])),o("clear",""),o("update:visible",!1)}}}}),iu={class:"fox-picker__bar"},cu={class:"fox-picker__title"},uu={class:"fox-picker__bar__action"},du={class:"fox-picker__column"};function fu(e,o,l,n,a,r){const s=t.resolveComponent("fox-picker-column"),i=t.resolveComponent("fox-popup");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createVNode(i,{position:"bottom",visible:e.show,"onUpdate:visible":o[3]||(o[3]=c=>e.show=c),teleport:e.teleport,"lock-scroll":e.lockScroll,"close-on-click-overlay":e.closeOnClickOverlay,onClose:e.close,round:!0,"teleport-disable":e.teleportDisable},{default:t.withCtx(()=>[t.createElementVNode("view",iu,[t.createElementVNode("view",cu,t.toDisplayString(e.title),1),t.createElementVNode("view",uu,[t.createElementVNode("view",{class:"fox-picker__left fox-picker__cancel fox-picker__button",onClick:o[0]||(o[0]=(...c)=>e.close&&e.close(...c))},t.toDisplayString(e.cancelText),1),t.createElementVNode("view",{class:"fox-picker__right fox-picker__confirm fox-picker__button",onClick:o[1]||(o[1]=(...c)=>e.confirm&&e.confirm(...c))},t.toDisplayString(e.confirmText),1),e.clearText?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-picker__right fox-picker__clear fox-picker__button",onClick:o[2]||(o[2]=(...c)=>e.clear&&e.clear(...c))},t.toDisplayString(e.clearText),1)):t.createCommentVNode("",!0)])]),t.renderSlot(e.$slots,"top"),t.createElementVNode("view",du,[t.createElementVNode("view",{class:"fox-picker__mask",style:t.normalizeStyle({backgroundSize:`100% ${e.top}px`})},null,4),t.createElementVNode("view",{ref:"pickerLineRef",class:"fox-picker__hairline",style:t.normalizeStyle({top:` ${e.top}px`})},null,4),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,(c,d)=>(t.openBlock(),t.createElementBlock("view",{key:d,class:"fox-picker__columnitem"},[t.createVNode(s,{source:c,readonly:e.isReadonly(d),"column-index":d,modelValue:e.getIndex(d),"onUpdate:modelValue":f=>e.change(d,f),"visible-item-count":e.visibleItemCount,"three-dimensional":e.threeDimensional,"swipe-duration":e.swipeDuration,"item-height":e.itemHeight,"text-key":e.textKey,"value-key":e.valueKey},null,8,["source","readonly","column-index","modelValue","onUpdate:modelValue","visible-item-count","three-dimensional","swipe-duration","item-height","text-key","value-key"])]))),128))]),t.renderSlot(e.$slots,"default")]),_:3},8,["visible","teleport","lock-scroll","close-on-click-overlay","onClose","teleport-disable"])],2)}const yt=J(su,[["render",fu]]);function mu(e,o,l,n,a,r,s=!0){return{props:{...ue,...de,...gn,type:{type:String,default:"text"},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},text:{type:String},separator:{type:[String],required:!1,defualt:" "}},emits:["change","update:modelValue","blur","focus","clear","update:text"],setup(i,c){const d=Ce(t.computed(()=>i.disabled)),f=Ae(t.computed(()=>i.readonly)),{emitEvent:m}=we({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus"],get validate(){return!d.value&&!f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ae.useFoxI18n(o),y=h(i,["placeholder"]),g=t.ref(!1),v=Ee(i,"modelValue"),b=t.ref([]),u=t.computed(()=>Array.isArray(b.value)?b.value.join(i.separator):b.value),p="fox-input-item",k=t.computed(()=>({[p]:!0,[`${p}__disabled`]:d.value})),S=Ne(t.computed(()=>i.textAlign),"textAlign"),w=t.computed(()=>{const j={};return S.value&&(j["text-align"]=S.value),j}),N=t.ref(!1),T=()=>{N.value=!0},B=j=>{N.value=j},D=j=>{v.value=j,m("update:modelValue",j)},C=(j,q)=>{m("change",j,q)},V=j=>{let F=j.target.value;g.value=!0,m("focus",F,j)},M=j=>{setTimeout(()=>{g.value=!1},0);let F=j.target.value;i.maxLength&&F.length>Number(i.maxLength)&&(F=F.slice(0,Number(i.maxLength))),m("blur",F,j)},L=j=>{b.value=j,Array.isArray(j)&&j.length===0?m("update:text",j[0]):m("update:text",j)},$=t.computed(()=>({[`${p}__append`]:!0})),E=t.computed(()=>ge(i.unit)>0),x=t.computed(()=>ge(i.unit)>0&&!g.value),A=t.computed(()=>({hidden:!x.value})),H=j=>{v.value="",m("update:modelValue","",j),m("change","",j),m("clear","")},R=t.computed(()=>i.clearable&&!d.value&&!f.value),Y=t.computed(()=>ge(v.value)>0&&g.value),U=j=>{Y.value?H(j):T()},P=t.computed(()=>Y.value&&R.value?n:a),z=t.computed(()=>({action:!0}));return()=>{const j={class:k.value,style:w.value,type:"text",maxlength:i.maxLength,placeholder:y.placeholder.value,readonly:!0,unselectable:"on",value:u.value,onClick:T,onFocus:V,onBlur:M};s&&(j.disabled=!0);const q=[],F=t.h("input",j);q.push(F);const I=[],K={class:["action-icon"]},W=t.h(P.value,K),Z={class:z.value,onClick:U},O=t.h("view",Z,{default:()=>[W]});if(I.push(O),E.value){const ve=t.h("view",{class:A.value},[i.unit]);I.push(ve)}const G={class:$.value},Q=t.h("view",G,{default:()=>I});q.push(Q);const ee={default:()=>q};ee.label=c.slots.default,ee.prepend=c.slots.prepend,ee.append=c.slots.append,ee.fixedPreTip=c.slots.fixedPreTip,ee.fixedTip=c.slots.fixedTip;const _=he(i,gn);_.disabled=!1,_.readonly=d.value||f.value,_.visible=N.value,_["onUpdate:visible"]=B,_.modelValue=v.value,_["onUpdate:modelValue"]=D,_.text=b.value,_["onUpdate:text"]=L,_.onChange=C;const oe=t.h(r,_);ee.hide=()=>[oe];const le=he(i,de,ue);return t.h(l,le,ee)}}}}const{componentName:pu,create:hu,scope:gu}=X("picker-item"),Qn=hu(mu(pu,gu,be,te.CircleClose,te.ArrowRight,yt,!1)),Jt=(e,o,l)=>e.map(n=>{const{value:a="value",text:r="text",children:s="children"}=l??{},{[a]:i,[r]:c,[s]:d,...f}=n,m={loading:!1,...f,level:o?(o&&o.level||0)+1:0,value:i,text:c,children:d,_parent:o};return m.children&&m.children.length&&(m.children=Jt(m.children,m,l)),m}),os=(e,o)=>{let l=0,n;for(;(n=e[l++])&&o(n)!==!0;)n.children&&n.children.length&&os(n.children,o)},yu={topId:null,idKey:"id",pidKey:"pid",sortKey:""},vu=(e,o)=>{const l={...yu,...o||{}},{topId:n,idKey:a,pidKey:r,sortKey:s}=l;let i=[],c={};return e.forEach(d=>{d={...d};const{[a]:f,[r]:m}=d,h=c[m]=c[m]||[];!i.length&&m===n&&(i=h),h.push(d),d.children=c[f]||(c[f]=[])}),s&&Object.keys(c).forEach(d=>{c[d].length>1&&c[d].sort((f,m)=>f[s]-m[s])}),c=null,i},ku=/scroll|auto|overlay/i,ns=window;function bu(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function vn(e,o=ns){let l=e;for(;l&&l!==o&&bu(l);){const{overflowY:n}=window.getComputedStyle(l);if(ku.test(n))return l;l=l.parentNode}return o}function ls(e,o=ns){const l=t.ref();return t.onMounted(()=>{e.value&&(l.value=vn(e.value,o))}),l}const{create:Su}=X("sticky"),Cu=Su({props:{position:{type:String,default:"top"},top:{type:[Number,String],default:0},bottom:{type:[Number,String],default:0},container:{type:Object},zIndex:{type:[Number,String],default:99}},emits:["change"],setup(e,{emit:o}){const l=t.ref(),n=t.ref(),a=t.reactive({fixed:!1,height:0,transform:0}),r=t.computed(()=>e.position==="top"?Number(e.top):Number(e.bottom)),s=t.computed(()=>a.fixed?{height:`${a.height}px`}:{}),i=t.computed(()=>a.fixed?{[e.position]:`${r.value}px`,transform:a.transform?`translate3d(0, ${a.transform}px, 0)`:void 0,position:a.fixed?"fixed":void 0,zIndex:Number(e.zIndex)}:{}),c=()=>{const d=e.container;if(!l.value&&!d)return;const f=Ve(l),m=n.value,h=Ve(m),y=Ve(d);a.height=f.height;const g=()=>{let b=!1;if(e.position==="top")b=d?r.value>f.top&&y.bottom>0:r.value>f.top;else{const u=document.documentElement.clientHeight;b=d?y.bottom>0&&u-r.value-h.height>y.top:u-r.value<f.bottom}return b},v=()=>{if(d)if(e.position==="top"){const b=y.bottom-r.value-h.height;return b<0?b:0}else{const b=document.documentElement.clientHeight,u=y.bottom-(b-r.value);return u<0?u:0}return 0};a.transform=v(),a.fixed=g()};return t.watch(()=>a.fixed,d=>{o("change",d)}),t.onMounted(()=>{c(),vn(l.value).addEventListener("scroll",c,!0)}),t.onUnmounted(()=>{vn(l.value).removeEventListener("scroll",c)}),{rootRef:l,rootStyle:s,stickyRef:n,stickyStyle:i}}});function wu(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("div",{class:"fox-sticky",ref:"rootRef",style:t.normalizeStyle(e.rootStyle)},[t.createElementVNode("div",{class:"fox-sticky__box",ref:"stickyRef",style:t.normalizeStyle(e.stickyStyle)},[t.renderSlot(e.$slots,"default")],4)],4)}const qt=J(Cu,[["render",wu]]),Nu=(e,o,l,n)=>{const a=t.ref(),r=t.ref({width:0,height:0}),s=async()=>{if(l&&l.getEnv()!==l.ENV_TYPE.WEB){let h=await n(a,l);r.value.width=h.width||0,r.value.height=h.height||0}else r.value.width=a.value?.clientWidth||0,r.value.height=a.value?.clientHeight||0};t.onMounted(()=>{setTimeout(()=>{s()},100)});const i=t.reactive({offset:0,moving:!1}),c=Ke();let d="";const f=(h,y)=>{let g=h;switch(e.direction=="horizontal"?(d=h>0?"right":"left",g=Math.abs(g)/r.value.width*100):(d=y>0?"bottom":"top",g=y,g=Math.abs(g)/r.value?.height*100),g>85&&(g=85),d){case"left":case"top":o.isEnd()&&(g=0,i.moving=!1);break;case"right":case"bottom":g=-g,o.isBegin()&&(g=0,i.moving=!1);break}i.offset=g};return{touchMethods:{onTouchStart(h){e.swipeable&&c.start(h)},onTouchMove(h){e.swipeable&&(c.move(h),i.moving=!0,f(c.deltaX.value,c.deltaY.value),e.direction=="horizontal"&&c.isHorizontal()&&(h.preventDefault(),h.stopPropagation()),e.direction=="vertical"&&c.isVertical()&&(h.preventDefault(),h.stopPropagation()))},onTouchEnd(){if(i.moving)switch(i.moving=!1,d){case"left":case"top":i.offset>35&&o.next();break;case"right":case"bottom":i.offset<-35&&o.prev();break}}},touchState:i,tabsContentRef:a}};class Bu{title="";titleSlot;paneKey="";disabled=!1;constructor(){}}const{create:Vu}=X("tabs"),Au=Vu({components:{[qt.name]:qt,JoySmile:te.JoySmile},props:{modelValue:{type:[String,Number],default:0},color:{type:String,default:""},direction:{type:String,default:"horizontal"},size:{type:String,default:"normal"},type:{type:String,default:"line"},titleScroll:{type:Boolean,default:!1},ellipsis:{type:Boolean,default:!0},swipeable:{type:Boolean,default:!1},autoHeight:{type:Boolean,default:!1},background:{type:String,default:""},animatedTime:{type:[Number,String],default:300},titleGutter:{type:[Number,String],default:0},sticky:{type:Boolean,default:!1},top:{type:Number,default:0}},emits:["update:modelValue","click","change"],setup(e,{emit:o,slots:l}){const n=t.ref(null);let a;t.provide("tabsOpiton",{activeKey:t.computed(()=>e.modelValue||"0"),autoHeight:t.computed(()=>e.autoHeight),animatedTime:t.computed(()=>e.animatedTime)});const r=t.ref([]),s=C=>{C.forEach((V,M)=>{let L=V.type;if(L=L.name||L,L=="fox-tab-pane"){let $=new Bu;if(V.props?.title||V.props?.["pane-key"]||V.props?.paneKey){let E=lt(V.props?.["pane-key"]),x=E=="number"||E=="string"?String(V.props?.["pane-key"]):null,A=lt(V.props?.paneKey),H=A=="number"||A=="string"?String(V.props?.paneKey):null;$.title=V.props?.title,$.paneKey=x||H||String(M),$.disabled=V.props?.disabled}r.value.push($)}else{if(V.children==" ")return;Array.isArray(V.children)&&s(V.children)}})},i=t.ref(e.modelValue||0),c=C=>{let V=r.value.findIndex(M=>M.paneKey==C);r.value.length==0||V==-1||(i.value=V)},d=t.computed(()=>e.titleScroll&&e.direction==="vertical"),f=t.ref(),m=t.ref([]),h=C=>{const V=f.value,M=m.value;if(!V||!M||!M[i.value])return;const L=M[i.value];let $=0;e.direction==="vertical"?$=L.offsetTop-V.offsetTop+10-(V.offsetHeight-L.offsetHeight)/2:$=L.offsetLeft-(V.offsetWidth-L.offsetWidth)/2,y(V,$,C?0:.3,e.direction)},y=(C,V,M,L)=>{let $=0;const E=L==="horizontal"?C.scrollLeft:C.scrollTop,x=M===0?1:Math.round(M*1e3/16);function A(){L==="horizontal"?C.scrollLeft+=(V-E)/x:C.scrollTop+=(V-E)/x,++$<x&&Le(A)}A()},g=(C=l.default?.())=>{r.value=[],C=C?.filter(V=>typeof V.children!="string"),C&&C.length&&s(C),c(e.modelValue),t.nextTick(()=>{h()})},v=C=>{a=C.fixed};t.watch(()=>l.default?.(),C=>{g(C)});const b=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;t.watch(()=>e.modelValue,C=>{if(c(C),h(),a){let V=Ve(n.value).top+b(),M=Math.ceil(V-e.top);window.scrollTo({top:M,behavior:"smooth"})}}),t.onMounted(g),t.onActivated(g);const u={isBegin:()=>i.value==0,isEnd:()=>i.value==r.value.length-1,next:()=>{i.value+=1,u.updateValue(r.value[i.value])},prev:()=>{i.value-=1,u.updateValue(r.value[i.value])},updateValue:C=>{o("update:modelValue",C.paneKey),o("change",C)},tabChange:(C,V)=>{o("click",C),!(C.disabled||i.value==V)&&(i.value=V,u.updateValue(C))},setTabItemRef:(C,V)=>{m.value[V]=C}},{tabsContentRef:p,touchState:k,touchMethods:S}=Nu(e,u),w=t.computed(()=>{let C=i.value*100;k.moving&&(C+=k.offset);let V={transform:e.direction=="horizontal"?`translate3d(-${C}%, 0, 0)`:`translate3d( 0,-${C}%, 0)`,transitionDuration:k.moving?void 0:`${e.animatedTime}ms`};return e.animatedTime==0&&(V={}),V}),N=t.computed(()=>({background:e.background})),T=t.computed(()=>({color:e.type=="smile"?e.color:"",background:e.type=="line"?e.color:""})),B=t.computed(()=>{if(!e.titleGutter)return{};const C=fe(e.titleGutter);return e.direction==="vertical"?{marginTop:C,marginBottom:C}:{marginLeft:C,marginRight:C}}),D=t.computed(()=>l.fixedTitle);return{navRef:f,tabsContentRef:p,titles:r,contentStyle:w,tabsNavStyle:N,titleStyle:B,tabsActiveStyle:T,container:n,getScrollY:d,onStickyScroll:v,...u,...S,hasFixedTitle:D}}}),Tu=["onClick"],$u={key:0,class:"fox-tabs__titles-fixed-item"},Eu=["onClick"],Du={key:0,class:"fox-tabs__titles-fixed-item"};function xu(e,o,l,n,a,r){const s=t.resolveComponent("JoySmile"),i=t.resolveComponent("fox-sticky");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(["fox-tabs",[e.direction]]),ref:"container"},[e.sticky?(t.openBlock(),t.createBlock(i,{key:0,top:e.top,container:e.container,onScroll:e.onStickyScroll},{default:t.withCtx(()=>[t.createElementVNode("view",{class:t.normalizeClass(["fox-tabs__titles",{[e.type]:e.type,scrollable:e.titleScroll,[e.size]:e.size}]),style:t.normalizeStyle(e.tabsNavStyle),ref:"navRef"},[e.$slots.titles?t.renderSlot(e.$slots,"titles",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.titles,(c,d)=>(t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(["fox-tabs__titles-item",{active:c.paneKey==e.modelValue,disabled:c.disabled}]),style:t.normalizeStyle(e.titleStyle),onClick:f=>e.tabChange(c,d),key:c.paneKey},[t.renderSlot(e.$slots,"title",{title:c.title,paneKey:c.paneKey},()=>[e.type=="line"?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-tabs__titles-item__line",style:t.normalizeStyle(e.tabsActiveStyle)},null,4)):t.createCommentVNode("",!0),e.type=="smile"?(t.openBlock(),t.createElementBlock("view",{key:1,class:"fox-tabs__titles-item__smile",style:t.normalizeStyle(e.tabsActiveStyle)},[t.createVNode(s,{color:e.color},null,8,["color"])],4)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(["fox-tabs__titles-item__text",{ellipsis:e.ellipsis}])},t.toDisplayString(c.title),3)])],14,Tu))),128)),e.hasFixedTitle?(t.openBlock(),t.createElementBlock("view",$u,[t.renderSlot(e.$slots,"fixedTitle")])):t.createCommentVNode("",!0)],64))],6)]),_:3},8,["top","container","onScroll"])):(t.openBlock(),t.createElementBlock("view",{key:1,class:t.normalizeClass(["fox-tabs__titles",{[e.type]:e.type,scrollable:e.titleScroll,"scroll-vertical":e.getScrollY,[e.size]:e.size}]),style:t.normalizeStyle(e.tabsNavStyle),ref:"navRef"},[e.$slots.titles?t.renderSlot(e.$slots,"titles",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.titles,(c,d)=>(t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(["fox-tabs__titles-item",{active:c.paneKey==e.modelValue,disabled:c.disabled}]),style:t.normalizeStyle(e.titleStyle),onClick:f=>e.tabChange(c,d),key:c.paneKey,ref_for:!0,ref:f=>e.setTabItemRef(f,d)},[t.renderSlot(e.$slots,"title",{title:c.title,paneKey:c.paneKey},()=>[e.type=="line"?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-tabs__titles-item__line",style:t.normalizeStyle(e.tabsActiveStyle)},null,4)):t.createCommentVNode("",!0),e.type=="smile"?(t.openBlock(),t.createElementBlock("view",{key:1,class:"fox-tabs__titles-item__smile",style:t.normalizeStyle(e.tabsActiveStyle)},[t.createVNode(s,{color:e.color},null,8,["color"])],4)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(["fox-tabs__titles-item__text",{ellipsis:e.ellipsis}])},t.toDisplayString(c.title),3)])],14,Eu))),128)),e.hasFixedTitle?(t.openBlock(),t.createElementBlock("view",Du,[t.renderSlot(e.$slots,"fixedTitle")])):t.createCommentVNode("",!0)],64))],6)),t.createElementVNode("view",{class:"fox-tabs__content",ref:"tabsContentRef",style:t.normalizeStyle(e.contentStyle),onTouchstart:o[0]||(o[0]=(...c)=>e.onTouchStart&&e.onTouchStart(...c)),onTouchmove:o[1]||(o[1]=(...c)=>e.onTouchMove&&e.onTouchMove(...c)),onTouchend:o[2]||(o[2]=(...c)=>e.onTouchEnd&&e.onTouchEnd(...c)),onTouchcancel:o[3]||(o[3]=(...c)=>e.onTouchEnd&&e.onTouchEnd(...c))},[t.renderSlot(e.$slots,"default")],36)],2)}const Mt=J(Au,[["render",xu]]),{create:Iu}=X("tab-pane"),qu=Iu({props:{title:{type:[String,Number],default:""},paneKey:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:o}){const l=t.inject("tabsOpiton"),n=t.computed(()=>({display:l.animatedTime.value==0&&e.paneKey!=l.activeKey.value?"none":void 0}));return{...l,paneStyle:n}}});function Mu(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(["fox-tab-pane",{inactive:e.paneKey!=e.activeKey&&e.autoHeight}]),style:t.normalizeStyle(e.paneStyle)},[t.renderSlot(e.$slots,"default")],6)}const zt=J(qu,[["render",Mu]]);class Za{nodes;config;constructor(o,l){this.config={value:"value",text:"text",children:"children",...l||{}},this.nodes=Jt(o,null,this.config)}updateChildren(o,l){l?l.children=Jt(o,l,this.config):this.nodes=Jt(o,null,this.config)}getNodeByValue(o){let l;return os(this.nodes,n=>{if(n.value===o)return l=n,!0}),l}getPathNodesByValue(o){if(!o.length)return[];const l=[];let n=this.nodes;for(;n&&n.length;){const a=n.find(r=>r.value===o[r.level]);if(!a)break;l.push(a),n=a.children}return l}isLeaf(o,l){const{leaf:n,children:a}=o,r=Array.isArray(a)&&!!a.length;return n||!r&&!l}hasChildren(o,l){if(this.isLeaf(o,l))return!1;const{children:a}=o;return Array.isArray(a)&&!!a.length}}const{create:zu,scope:Lu}=X("cascader-pane"),Pu=zu({components:{Loading:te.Loading,Checklist:te.Checklist,[Mt.name]:Mt,[zt.name]:zt},props:{visible:{type:Boolean,required:!0},modelValue:{type:Array,required:!0},options:{type:Array,default:()=>[]},lazy:{type:Boolean,required:!1},lazyLoad:{type:Function,required:!1},valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},convertConfig:{type:Object,required:!1}},emits:["update:modelValue","change","pathChange"],setup(e,{emit:o}){const l=t.computed(()=>({lazy:e.lazy,lazyLoad:e.lazyLoad,valueKey:e.valueKey,textKey:e.textKey,childrenKey:e.childrenKey,convertConfig:e.convertConfig})),n=t.ref(0),a=t.ref(!1),r=t.ref(e.modelValue),s=t.ref(new Za([],{})),i=t.ref([]),c=t.computed(()=>l.value.lazy&&!!l.value.lazyLoad),d=new Map;let f;const m=async()=>{d.clear(),i.value=[],n.value=0,a.value=!1,f=null;let{options:u}=e;l.value.convertConfig&&(u=vu(u,l.value.convertConfig)),s.value=new Za(u,{value:l.value.valueKey,text:l.value.textKey,children:l.value.childrenKey}),c.value&&!s.value.nodes.length&&await y({root:!0,loading:!0,text:"",value:""}),i.value=[{nodes:s.value.nodes,selectedNode:null}],h()},h=async()=>{const u=r.value;if(u===void 0||!s.value.nodes.length)return;if(u.length===0){n.value=0,i.value=[{nodes:s.value.nodes,selectedNode:null}];return}let p=u;if(c.value&&Array.isArray(u)&&u.length){p=[];let k=s.value.nodes.find(S=>S.value===u[0]);if(k){p=[k.value],a.value=!0;const S=await u.slice(1).reduce(async(w,N)=>{const T=await w;await y(T);const B=T?.children?.find(D=>D.value===N);return B&&p.push(N),Promise.resolve(B)},Promise.resolve(k));await y(S),a.value=!1}}p.length&&u===e.modelValue&&s.value.getPathNodesByValue(p).map((S,w)=>{n.value=w,b.handleNode(S,!0)})},y=async u=>{if(!u)return;if(!l.value.lazyLoad){u.leaf=!0;return}if(s.value.isLeaf(u,c.value)||s.value.hasChildren(u,c.value))return;u.loading=!0;const p=u.root?null:u;let k=d.get(u);k||(k=new Promise(w=>{l.value.lazyLoad?.(u,w)}),d.set(u,k));const S=await k;Array.isArray(S)&&S.length>0?s.value.updateChildren(S,p):u.leaf=!0,u.loading=!1,d.delete(u)},g=u=>{const p=u.map(k=>k.value);r.value=p,o("change",p,u),o("update:modelValue",p,u)},{t:v}=ae.useFoxI18n(Lu),b={async handleNode(u,p){const{disabled:k,loading:S}=u;if(!(!p&&k||!i.value[n.value])){if(s.value.isLeaf(u,c.value)){if(u.leaf=!0,i.value[n.value].selectedNode=u,i.value=i.value.slice(0,u.level+1),!p){const w=i.value.map(N=>N.selectedNode);g(w),o("pathChange",w)}return}if(s.value.hasChildren(u,c.value)){const w=u.level+1;if(i.value[n.value].selectedNode=u,i.value=i.value.slice(0,w),i.value.push({nodes:u.children||[],selectedNode:null}),n.value=w,!p){const N=i.value.map(T=>T.selectedNode);o("pathChange",N)}return}f=u,!S&&(await y(u),f===u&&(i.value[n.value].selectedNode=u,b.handleNode(u,p)))}},handleTabClick(u){f=null,n.value=Number(u.paneKey)},formatTabTitle(u){return u.selectedNode?u.selectedNode.text:v("select")},isSelected(u,p){return u.selectedNode&&u.selectedNode.value===p.value}};return t.watch([l,()=>e.options],()=>{m()},{deep:!0,immediate:!0}),t.watch(()=>e.modelValue,u=>{u!==r.value&&(r.value=u,h())}),t.watch(()=>e.visible,u=>{u&&Array.isArray(r.value)&&r.value.length>0&&h()}),{panes:i,initLoading:a,tabsCursor:n,...b}}}),Ru={role:"menu",class:"fox-cascader__pane"},Fu=["aria-checked","aria-disabled","onClick"],Ou={class:"fox-cascader__item__title"},Ku=t.createElementVNode("view",{class:"fox-cascader__pane"},null,-1);function Uu(e,o,l,n,a,r){const s=t.resolveComponent("Loading"),i=t.resolveComponent("Checklist"),c=t.resolveComponent("fox-tab-pane"),d=t.resolveComponent("fox-tabs");return t.openBlock(),t.createBlock(d,{class:"fox-cascader",modelValue:e.tabsCursor,"onUpdate:modelValue":o[0]||(o[0]=f=>e.tabsCursor=f),onClick:e.handleTabClick,"title-scroll":""},{default:t.withCtx(()=>[!e.initLoading&&e.panes.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.panes,(f,m)=>(t.openBlock(),t.createBlock(c,{title:e.formatTabTitle(f),key:m},{default:t.withCtx(()=>[t.createElementVNode("view",Ru,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.nodes,h=>(t.openBlock(),t.createElementBlock("view",{key:h.value,class:t.normalizeClass(["fox-cascader__item",{active:e.isSelected(f,h),disabled:h.disabled}]),"aria-checked":e.isSelected(f,h),"aria-disabled":h.disabled||void 0,role:"menuitemradio",onClick:y=>e.handleNode(h,!1)},[t.createElementVNode("view",Ou,t.toDisplayString(h.text),1),h.loading?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-cascader__item__icon-loading",name:"loading"})):(t.openBlock(),t.createBlock(i,{key:1,class:"fox-cascader__item__icon-check",name:"checklist"}))],10,Fu))),128))])]),_:2},1032,["title"]))),128)):(t.openBlock(),t.createBlock(c,{key:1,title:"Loading..."},{default:t.withCtx(()=>[Ku]),_:1}))]),_:1},8,["modelValue","onClick"])}const Hu=J(Pu,[["render",Uu]]),{create:ju}=X("cascader"),Wu=ju({components:{FoxCascaderPane:Hu,FoxPopup:ce},props:{...Xe,modelValue:Array,visible:Boolean,title:String,options:{type:Array,default:()=>[]},lazy:Boolean,lazyLoad:Function,valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},poppable:{type:Boolean,default:!0},convertConfig:Object},emits:["update:modelValue","change","pathChange","update:visible"],setup(e,{emit:o}){const l=t.ref(e.modelValue),n=t.computed({get(){return e.visible},set(s){o("update:visible",s)}}),a=(s,i)=>{l.value=s,n.value=!1,o("change",s,i),o("update:modelValue",s)},r=s=>{o("pathChange",s)};return t.watch(()=>e.modelValue,s=>{s!==l.value&&(l.value=s)}),{onChange:a,onPathChange:r,innerValue:l,innerVisible:n}}}),Yu=["innerHTML"];function Xu(e,o,l,n,a,r){const s=t.resolveComponent("FoxCascaderPane"),i=t.resolveComponent("FoxPopup");return e.poppable?(t.openBlock(),t.createBlock(i,{key:0,visible:e.innerVisible,"onUpdate:visible":o[0]||(o[0]=c=>e.innerVisible=c),position:"bottom","pop-class":"fox-cascader__popup",round:"",closeable:e.closeable,"destroy-on-close":!1,"close-icon-position":e.closeIconPosition},{default:t.withCtx(()=>[e.title?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-cascader__bar",innerHTML:e.title},null,8,Yu)):t.createCommentVNode("",!0),t.createVNode(s,{onChange:e.onChange,onPathChange:e.onPathChange,modelValue:e.innerValue,options:e.options,lazy:e.lazy,"lazy-load":e.lazyLoad,"value-key":e.valueKey,"text-key":e.textKey,"children-key":e.childrenKey,"convert-config":e.convertConfig,visible:e.innerVisible},null,8,["onChange","onPathChange","modelValue","options","lazy","lazy-load","value-key","text-key","children-key","convert-config","visible"])]),_:1},8,["visible","closeable","close-icon-position"])):(t.openBlock(),t.createBlock(s,{key:1,onChange:e.onChange,onPathChange:e.onPathChange,modelValue:e.innerValue,options:e.options,lazy:e.lazy,"lazy-load":e.lazyLoad,"value-key":e.valueKey,"text-key":e.textKey,"children-key":e.childrenKey,"convert-config":e.convertConfig,visible:e.innerVisible},null,8,["onChange","onPathChange","modelValue","options","lazy","lazy-load","value-key","text-key","children-key","convert-config","visible"]))}const Do=J(Wu,[["render",Xu]]);function Lt(e,o){const l=e.textKey??"text";return o[l]??""}function Pt(e,o){const l=e.valueKey??"value";return o[l]}function as(e,o){const l=e.childrenKey??"children";return o[l]}function Qt(e,o=[]){const l={texts:[],values:[]};for(let n=0;n<o.length;n++){const a=o[n],r=Lt(e,a),s=Pt(e,a);l.texts.push(r),l.values.push(s??"")}return l}function rs(e,o,l,n,a=[]){if(!l)return;const r=l[n];for(let s=0;s<o.length;s++)if(Lt(e,o[s])===r){const c=Pt(e,o[s])??"",d={[e.textKey]:r,[e.valueKey]:c};a.push(d);const f=as(e,o[s]);Array.isArray(f)&&rs(e,f,l,n+1,a);return}}function ss(e,o,l,n,a=[]){if(!l)return;const r=l[n];for(let s=0;s<o.length;s++)if(Pt(e,o[s])===r){const c=Lt(e,o[s])??"",d={[e.textKey]:c,[e.valueKey]:r};a.push(d);const f=as(e,o[s]);Array.isArray(f)&&ss(e,f,l,n+1,a);return}}function Go(e,o,l){if(o===l)return!0;if(o.length!==l.length)return!1;for(let n=0;n<o.length;n++){const a=Lt(e,o[n]),r=Lt(e,l[n]);if(a!==r)return!1;const s=Pt(e,o[n]),i=Pt(e,l[n]);if(s!==i)return!1}return!0}let Qu=class{proxy;constructor(o){this.proxy=o}async load(o,l){const n="cascader";if(Array.isArray(o))return o;if(typeof o=="function")return await o(l);const a=Ge(this.proxy,n);return a===null?(console.error(`${n} component not found api function`),[]):(Be(l)&&t.isReactive(l)&&(l=t.toRaw(l)),await a(o,l))}};function Gu(){const e=t.getCurrentInstance();return new Qu(e.proxy)}function Zu(e,o,l,n,a,r,s=!1){return{props:{...ue,...de,modelValue:{type:[Array,String]},pathNodes:{type:[Array]},title:{type:String,required:!1},placeholder:{type:String,required:!1,default:""},source:{type:[Array,Function,String],default:[]},params:{type:Object},valueType:{type:String,required:!1,default:"value"},lazy:{type:Boolean,required:!1},lazyLoad:{type:Function,required:!1},valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},convertConfig:{type:Object}},emits:["update:modelValue","change","pathChange","blur","focus","clear","update:pathNodes"],setup(i,c){const d=Ce(t.computed(()=>i.disabled)),f=Ae(t.computed(()=>i.readonly)),{emitEvent:m}=we({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus"],get validate(){return!d.value&&!f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ae.useFoxI18n(o),y=h(i,["placeholder"]),g=t.ref(!1),v=Gu(),b=t.ref([]);t.watch([()=>i.source,()=>i.params],async([F,I])=>{F&&(b.value=await v.load(F,I))},{immediate:!0});const u=t.ref([]),p=t.computed(()=>Array.isArray(u.value)?u.value.join(" "):u.value),k=t.ref([]),S=t.ref([]);t.watch([()=>i.modelValue],async([F])=>{if(i.lazy===!0){S.value.length==0&&(u.value=Array.isArray(F)?F:[],k.value=Array.isArray(F)?F:[]);return}if(i.valueType==="item"){let I=F;if(!Go(i,I,S.value)){S.value=I;let K=Qt(i,I);u.value=K.texts,k.value=K.values}}else if(i.valueType==="text"){let I=F,K=[];if(rs(i,b.value,I,0,K),!Go(i,K,S.value)){S.value=K;let W=Qt(i,K);I.value=W.texts,k.value=W.values}}else{let I=[];if(ss(i,b.value,F,0,I),!Go(i,I,S.value)){S.value=I;let K=Qt(i,I);u.value=K.texts,k.value=K.values}}},{immediate:!0});const w="fox-input-item",N=t.computed(()=>({[w]:!0,[`${w}__disabled`]:d.value})),T=Ne(t.computed(()=>i.textAlign),"textAlign"),B=t.computed(()=>{const F={};return T.value&&(F["text-align"]=T.value),F}),D=t.ref(!1),C=()=>{d.value===!0||f.value===!0||(D.value=!0)},V=F=>{D.value=F},M=(F,I)=>{let K=I.map(Z=>{if(Z==null)return Z;let O={...Z};return Reflect.deleteProperty(O,"text"),O[i.textKey]=Z.text??"",Reflect.deleteProperty(O,"value"),O[i.valueKey]=Z.value??"",O});S.value=K;let W=Qt(i,K);u.value=W.texts,k.value=W.values,i.valueType==="text"?(m("change",u.value,K),m("update:modelValue",u.value)):i.valueType==="item"?(m("change",K,K),m("update:modelValue",K)):(m("change",k.value,K),m("update:modelValue",k.value)),m("update:pathNodes",K)},L=F=>{let I=F.map(K=>{if(K==null)return K;let W={...K};return Reflect.deleteProperty(W,"text"),W[i.textKey]=K.text??"",Reflect.deleteProperty(W,"value"),W[i.valueKey]=K.value??"",W});m("pathChange",I)},$=F=>{g.value=!0,m("focus",k.value,F)},E=F=>{setTimeout(()=>{g.value=!1},0),m("blur",k.value,F)},x=t.computed(()=>({[`${w}__append`]:!0})),A=t.computed(()=>ge(i.unit)>0),H=t.computed(()=>ge(i.unit)>0&&!g.value),R=t.computed(()=>({hidden:!H.value})),Y=F=>{S.value=[],u.value=[],k.value=[],m("update:modelValue",[]),m("change",[],F),m("clear",[]),m("update:pathNodes",[])},U=t.computed(()=>i.clearable&&!d.value&&!f.value),P=t.computed(()=>{let F=k.value&&k.value.length>0;return i.clearable&&F&&g.value}),z=F=>{P.value?Y(F):C()},j=t.computed(()=>P.value&&U.value?n:a),q=t.computed(()=>({action:!0}));return()=>{const F={class:N.value,style:B.value,type:"text",maxlength:i.maxLength,placeholder:y.placeholder.value,readonly:!0,unselectable:"on",value:p.value,onClick:C,onFocus:$,onBlur:E};s&&(F.disabled=!0);const I=[],K=t.h("input",F);I.push(K);const W=[],Z={class:["action-icon"]},O=t.h(j.value,Z),G={class:q.value,onClick:z},Q=t.h("view",G,{default:()=>[O]});if(W.push(Q),A.value){const Ze=t.h("view",{class:R.value},[i.unit]);W.push(Ze)}const ee={class:x.value},_=t.h("view",ee,{default:()=>W});I.push(_);const oe={default:()=>I};oe.label=c.slots.default,oe.prepend=c.slots.prepend,oe.append=c.slots.append,oe.fixedPreTip=c.slots.fixedPreTip,oe.fixedTip=c.slots.fixedTip;let le={};le.visible=D.value,le["onUpdate:visible"]=V,le.modelValue=k.value,le.onChange=M,le.onPathChange=L,le.options=b.value,le.title=i.title,le.lazy=i.lazy,le.lazyLoad=i.lazyLoad,le.valueKey=i.valueKey,le.textKey=i.textKey,le.childrenKey=i.childrenKey,le.convertConfig=i.convertConfig;const $e=t.h(r,le);oe.hide=()=>[$e];const ve=he(i,de,ue);return t.h(l,ve,oe)}}}}const{componentName:Ju,create:_u,scope:ed}=X("cascader-item"),Gn=_u(Zu(Ju,ed,be,te.CircleClose,te.ArrowRight,Do,!1));var Ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function He(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var is={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){var l=1e3,n=6e4,a=36e5,r="millisecond",s="second",i="minute",c="hour",d="day",f="week",m="month",h="quarter",y="year",g="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,u=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},k=function(L,$,E){var x=String(L);return!x||x.length>=$?L:""+Array($+1-x.length).join(E)+L},S={s:k,z:function(L){var $=-L.utcOffset(),E=Math.abs($),x=Math.floor(E/60),A=E%60;return($<=0?"+":"-")+k(x,2,"0")+":"+k(A,2,"0")},m:function L($,E){if($.date()<E.date())return-L(E,$);var x=12*(E.year()-$.year())+(E.month()-$.month()),A=$.clone().add(x,m),H=E-A<0,R=$.clone().add(x+(H?-1:1),m);return+(-(x+(E-A)/(H?A-R:R-A))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:m,y,w:f,d,D:g,h:c,m:i,s,ms:r,Q:h}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},w="en",N={};N[w]=p;var T=function(L){return L instanceof V},B=function L($,E,x){var A;if(!$)return w;if(typeof $=="string"){var H=$.toLowerCase();N[H]&&(A=H),E&&(N[H]=E,A=H);var R=$.split("-");if(!A&&R.length>1)return L(R[0])}else{var Y=$.name;N[Y]=$,A=Y}return!x&&A&&(w=A),A||!x&&w},D=function(L,$){if(T(L))return L.clone();var E=typeof $=="object"?$:{};return E.date=L,E.args=arguments,new V(E)},C=S;C.l=B,C.i=T,C.w=function(L,$){return D(L,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var V=function(){function L(E){this.$L=B(E.locale,null,!0),this.parse(E)}var $=L.prototype;return $.parse=function(E){this.$d=function(x){var A=x.date,H=x.utc;if(A===null)return new Date(NaN);if(C.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var R=A.match(b);if(R){var Y=R[2]-1||0,U=(R[7]||"0").substring(0,3);return H?new Date(Date.UTC(R[1],Y,R[3]||1,R[4]||0,R[5]||0,R[6]||0,U)):new Date(R[1],Y,R[3]||1,R[4]||0,R[5]||0,R[6]||0,U)}}return new Date(A)}(E),this.$x=E.x||{},this.init()},$.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},$.$utils=function(){return C},$.isValid=function(){return this.$d.toString()!==v},$.isSame=function(E,x){var A=D(E);return this.startOf(x)<=A&&A<=this.endOf(x)},$.isAfter=function(E,x){return D(E)<this.startOf(x)},$.isBefore=function(E,x){return this.endOf(x)<D(E)},$.$g=function(E,x,A){return C.u(E)?this[x]:this.set(A,E)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(E,x){var A=this,H=!!C.u(x)||x,R=C.p(E),Y=function(K,W){var Z=C.w(A.$u?Date.UTC(A.$y,W,K):new Date(A.$y,W,K),A);return H?Z:Z.endOf(d)},U=function(K,W){return C.w(A.toDate()[K].apply(A.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(W)),A)},P=this.$W,z=this.$M,j=this.$D,q="set"+(this.$u?"UTC":"");switch(R){case y:return H?Y(1,0):Y(31,11);case m:return H?Y(1,z):Y(0,z+1);case f:var F=this.$locale().weekStart||0,I=(P<F?P+7:P)-F;return Y(H?j-I:j+(6-I),z);case d:case g:return U(q+"Hours",0);case c:return U(q+"Minutes",1);case i:return U(q+"Seconds",2);case s:return U(q+"Milliseconds",3);default:return this.clone()}},$.endOf=function(E){return this.startOf(E,!1)},$.$set=function(E,x){var A,H=C.p(E),R="set"+(this.$u?"UTC":""),Y=(A={},A[d]=R+"Date",A[g]=R+"Date",A[m]=R+"Month",A[y]=R+"FullYear",A[c]=R+"Hours",A[i]=R+"Minutes",A[s]=R+"Seconds",A[r]=R+"Milliseconds",A)[H],U=H===d?this.$D+(x-this.$W):x;if(H===m||H===y){var P=this.clone().set(g,1);P.$d[Y](U),P.init(),this.$d=P.set(g,Math.min(this.$D,P.daysInMonth())).$d}else Y&&this.$d[Y](U);return this.init(),this},$.set=function(E,x){return this.clone().$set(E,x)},$.get=function(E){return this[C.p(E)]()},$.add=function(E,x){var A,H=this;E=Number(E);var R=C.p(x),Y=function(z){var j=D(H);return C.w(j.date(j.date()+Math.round(z*E)),H)};if(R===m)return this.set(m,this.$M+E);if(R===y)return this.set(y,this.$y+E);if(R===d)return Y(1);if(R===f)return Y(7);var U=(A={},A[i]=n,A[c]=a,A[s]=l,A)[R]||1,P=this.$d.getTime()+E*U;return C.w(P,this)},$.subtract=function(E,x){return this.add(-1*E,x)},$.format=function(E){var x=this,A=this.$locale();if(!this.isValid())return A.invalidDate||v;var H=E||"YYYY-MM-DDTHH:mm:ssZ",R=C.z(this),Y=this.$H,U=this.$m,P=this.$M,z=A.weekdays,j=A.months,q=function(W,Z,O,G){return W&&(W[Z]||W(x,H))||O[Z].slice(0,G)},F=function(W){return C.s(Y%12||12,W,"0")},I=A.meridiem||function(W,Z,O){var G=W<12?"AM":"PM";return O?G.toLowerCase():G},K={YY:String(this.$y).slice(-2),YYYY:this.$y,M:P+1,MM:C.s(P+1,2,"0"),MMM:q(A.monthsShort,P,j,3),MMMM:q(j,P),D:this.$D,DD:C.s(this.$D,2,"0"),d:String(this.$W),dd:q(A.weekdaysMin,this.$W,z,2),ddd:q(A.weekdaysShort,this.$W,z,3),dddd:z[this.$W],H:String(Y),HH:C.s(Y,2,"0"),h:F(1),hh:F(2),a:I(Y,U,!0),A:I(Y,U,!1),m:String(U),mm:C.s(U,2,"0"),s:String(this.$s),ss:C.s(this.$s,2,"0"),SSS:C.s(this.$ms,3,"0"),Z:R};return H.replace(u,function(W,Z){return Z||K[W]||R.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(E,x,A){var H,R=C.p(x),Y=D(E),U=(Y.utcOffset()-this.utcOffset())*n,P=this-Y,z=C.m(this,Y);return z=(H={},H[y]=z/12,H[m]=z,H[h]=z/3,H[f]=(P-U)/6048e5,H[d]=(P-U)/864e5,H[c]=P/a,H[i]=P/n,H[s]=P/l,H)[R]||P,A?z:C.a(z)},$.daysInMonth=function(){return this.endOf(m).$D},$.$locale=function(){return N[this.$L]},$.locale=function(E,x){if(!E)return this.$L;var A=this.clone(),H=B(E,x,!0);return H&&(A.$L=H),A},$.clone=function(){return C.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},L}(),M=V.prototype;return D.prototype=M,[["$ms",r],["$s",s],["$m",i],["$H",c],["$W",d],["$M",m],["$y",y],["$D",g]].forEach(function(L){M[L[1]]=function($){return this.$g($,L[0],L[1])}}),D.extend=function(L,$){return L.$i||(L($,V,D),L.$i=!0),D},D.locale=B,D.isDayjs=T,D.unix=function(L){return D(1e3*L)},D.en=N[w],D.Ls=N,D.p={},D})})(is);var td=is.exports;const ze=He(td);var cs={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){var l={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d\d/,r=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,i={},c=function(v){return(v=+v)+(v>68?1900:2e3)},d=function(v){return function(b){this[v]=+b}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var u=b.match(/([+-]|\d\d)/g),p=60*u[1]+(+u[2]||0);return p===0?0:u[0]==="+"?-p:p}(v)}],m=function(v){var b=i[v];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(v,b){var u,p=i.meridiem;if(p){for(var k=1;k<=24;k+=1)if(v.indexOf(p(k,0,b))>-1){u=k>12;break}}else u=v===(b?"pm":"PM");return u},y={A:[s,function(v){this.afternoon=h(v,!1)}],a:[s,function(v){this.afternoon=h(v,!0)}],S:[/\d/,function(v){this.milliseconds=100*+v}],SS:[a,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[r,d("seconds")],ss:[r,d("seconds")],m:[r,d("minutes")],mm:[r,d("minutes")],H:[r,d("hours")],h:[r,d("hours")],HH:[r,d("hours")],hh:[r,d("hours")],D:[r,d("day")],DD:[a,d("day")],Do:[s,function(v){var b=i.ordinal,u=v.match(/\d+/);if(this.day=u[0],b)for(var p=1;p<=31;p+=1)b(p).replace(/\[|\]/g,"")===v&&(this.day=p)}],M:[r,d("month")],MM:[a,d("month")],MMM:[s,function(v){var b=m("months"),u=(m("monthsShort")||b.map(function(p){return p.slice(0,3)})).indexOf(v)+1;if(u<1)throw new Error;this.month=u%12||u}],MMMM:[s,function(v){var b=m("months").indexOf(v)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(v){this.year=c(v)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function g(v){var b,u;b=v,u=i&&i.formats;for(var p=(v=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(D,C,V){var M=V&&V.toUpperCase();return C||u[V]||l[V]||u[M].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(L,$,E){return $||E.slice(1)})})).match(n),k=p.length,S=0;S<k;S+=1){var w=p[S],N=y[w],T=N&&N[0],B=N&&N[1];p[S]=B?{regex:T,parser:B}:w.replace(/^\[|\]$/g,"")}return function(D){for(var C={},V=0,M=0;V<k;V+=1){var L=p[V];if(typeof L=="string")M+=L.length;else{var $=L.regex,E=L.parser,x=D.slice(M),A=$.exec(x)[0];E.call(C,A),D=D.replace(A,"")}}return function(H){var R=H.afternoon;if(R!==void 0){var Y=H.hours;R?Y<12&&(H.hours+=12):Y===12&&(H.hours=0),delete H.afternoon}}(C),C}}return function(v,b,u){u.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(c=v.parseTwoDigitYear);var p=b.prototype,k=p.parse;p.parse=function(S){var w=S.date,N=S.utc,T=S.args;this.$u=N;var B=T[1];if(typeof B=="string"){var D=T[2]===!0,C=T[3]===!0,V=D||C,M=T[2];C&&(M=T[2]),i=this.$locale(),!D&&M&&(i=u.Ls[M]),this.$d=function(x,A,H){try{if(["x","X"].indexOf(A)>-1)return new Date((A==="X"?1e3:1)*x);var R=g(A)(x),Y=R.year,U=R.month,P=R.day,z=R.hours,j=R.minutes,q=R.seconds,F=R.milliseconds,I=R.zone,K=new Date,W=P||(Y||U?1:K.getDate()),Z=Y||K.getFullYear(),O=0;Y&&!U||(O=U>0?U-1:K.getMonth());var G=z||0,Q=j||0,ee=q||0,_=F||0;return I?new Date(Date.UTC(Z,O,W,G,Q,ee,_+60*I.offset*1e3)):H?new Date(Date.UTC(Z,O,W,G,Q,ee,_)):new Date(Z,O,W,G,Q,ee,_)}catch{return new Date("")}}(w,B,N),this.init(),M&&M!==!0&&(this.$L=this.locale(M).$L),V&&w!=this.format(B)&&(this.$d=new Date("")),i={}}else if(B instanceof Array)for(var L=B.length,$=1;$<=L;$+=1){T[1]=B[$-1];var E=u.apply(this,T);if(E.isValid()){this.$d=E.$d,this.$L=E.$L,this.init();break}$===L&&(this.$d=new Date(""))}else k.call(this,S)}}})})(cs);var od=cs.exports;const nd=He(od);var us={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){return function(l,n,a){var r=n.prototype,s=r.format;a.en.ordinal=function(i){var c=["th","st","nd","rd"],d=i%100;return"["+i+(c[(d-20)%10]||c[d]||c[0])+"]"},r.format=function(i){var c=this,d=this.$locale();if(!this.isValid())return s.bind(this)(i);var f=this.$utils(),m=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(h){switch(h){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return d.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return d.ordinal(c.week(),"W");case"w":case"ww":return f.s(c.week(),h==="w"?1:2,"0");case"W":case"WW":return f.s(c.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return f.s(String(c.$H===0?24:c.$H),h==="k"?1:2,"0");case"X":return Math.floor(c.$d.getTime()/1e3);case"x":return c.$d.getTime();case"z":return"["+c.offsetName()+"]";case"zzz":return"["+c.offsetName("long")+"]";default:return h}});return s.bind(this)(m)}}})})(us);var ld=us.exports;const ad=He(ld);var ds={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){return function(l,n,a){var r=n.prototype,s=function(m){return m&&(m.indexOf?m:m.s)},i=function(m,h,y,g,v){var b=m.name?m:m.$locale(),u=s(b[h]),p=s(b[y]),k=u||p.map(function(w){return w.slice(0,g)});if(!v)return k;var S=b.weekStart;return k.map(function(w,N){return k[(N+(S||0))%7]})},c=function(){return a.Ls[a.locale()]},d=function(m,h){return m.formats[h]||function(y){return y.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(g,v,b){return v||b.slice(1)})}(m.formats[h.toUpperCase()])},f=function(){var m=this;return{months:function(h){return h?h.format("MMMM"):i(m,"months")},monthsShort:function(h){return h?h.format("MMM"):i(m,"monthsShort","months",3)},firstDayOfWeek:function(){return m.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):i(m,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):i(m,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):i(m,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return d(m.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return f.bind(this)()},a.localeData=function(){var m=c();return{firstDayOfWeek:function(){return m.weekStart||0},weekdays:function(){return a.weekdays()},weekdaysShort:function(){return a.weekdaysShort()},weekdaysMin:function(){return a.weekdaysMin()},months:function(){return a.months()},monthsShort:function(){return a.monthsShort()},longDateFormat:function(h){return d(m,h)},meridiem:m.meridiem,ordinal:m.ordinal}},a.months=function(){return i(c(),"months")},a.monthsShort=function(){return i(c(),"monthsShort","months",3)},a.weekdays=function(m){return i(c(),"weekdays",null,null,m)},a.weekdaysShort=function(m){return i(c(),"weekdaysShort","weekdays",3,m)},a.weekdaysMin=function(m){return i(c(),"weekdaysMin","weekdays",2,m)}}})})(ds);var rd=ds.exports;const sd=He(rd);var fs={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){var l="week",n="year";return function(a,r,s){var i=r.prototype;i.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var d=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var f=s(this).startOf(n).add(1,n).date(d),m=s(this).endOf(l);if(f.isBefore(m))return 1}var h=s(this).startOf(n).date(d).startOf(l).subtract(1,"millisecond"),y=this.diff(h,l,!0);return y<0?s(this).startOf("week").week():Math.ceil(y)},i.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(fs);var id=fs.exports;const cd=He(id);var ms={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){return function(l,n){n.prototype.weekYear=function(){var a=this.month(),r=this.week(),s=this.year();return r===1&&a===11?s+1:a===0&&r>=52?s-1:s}}})})(ms);var ud=ms.exports;const dd=He(ud);var ps={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){return function(l,n,a){n.prototype.dayOfYear=function(r){var s=Math.round((a(this).startOf("day")-a(this).startOf("year"))/864e5)+1;return r==null?s:this.add(r-s,"day")}}})})(ps);var fd=ps.exports;const md=He(fd);var hs={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){return function(l,n){n.prototype.isSameOrAfter=function(a,r){return this.isSame(a,r)||this.isAfter(a,r)}}})})(hs);var pd=hs.exports;const hd=He(pd);var gs={exports:{}};(function(e,o){(function(l,n){e.exports=n()})(Ue,function(){return function(l,n){n.prototype.isSameOrBefore=function(a,r){return this.isSame(a,r)||this.isBefore(a,r)}}})})(gs);var gd=gs.exports;const yd=He(gd);ze.extend(sd);ze.extend(ad);ze.extend(nd);ze.extend(cd);ze.extend(dd);ze.extend(md);ze.extend(hd);ze.extend(yd);const ne={format(e,o){return ze(e).format(o)},parser(e,o){return ze(e,o).toDate()},isLeapYear(e){return e%4==0&&e%100!=0||e%400==0},getWhatDay(e,o,l){const a=new Date(e+"/"+o+"/"+l).getDay();return["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][a]},getMonthPreDay(e,o){let n=new Date(e+"/"+o+"/01").getDay();return n==0&&(n=7),n},getMonthDays(e,o){return/^0/.test(o)&&(o=o.split("")[1]),[0,31,this.isLeapYear(Number(e))?29:28,31,30,31,30,31,31,30,31,30,31][o]},getNumTwoBit(e){return e=Number(e),(e>9?"":"0")+e},date2Str:function(e,o){o=o||"-";const l=e.getFullYear(),n=this.getNumTwoBit(e.getMonth()+1),a=this.getNumTwoBit(e.getDate());return[l,n,a].join(o)},getDay(e,o){e=e||0;let l=o??new Date;const n=e*(1e3*60*60*24);return l=new Date(l.getTime()+n),this.date2Str(l)},compareDate(e,o){let l;typeof e=="string"?l=new Date(e.replace("-","/").replace("-","/")):l=e;let n;return typeof o=="string"?n=new Date(o.replace("-","/").replace("-","/")):n=o,!(l>=n)},isEqual(e,o){if(e===o)return!0;if(!e||!o)return!1;let l;typeof e=="string"?l=new Date(e).getTime():l=e;let n;return typeof o=="string"?n=new Date(o).getTime():n=o,l==n},getMonthWeek:function(e,o,l,n=0){const a=new Date(Number(e),parseInt(o)-1,Number(l));let r=a.getDay(),s=a.getDate(),i=6-r;return n!==0&&(r=r==0?7:r,i=7-r),Math.ceil((s+i)/7)},getYearWeek:function(e,o,l,n=0){const a=new Date(Number(e),parseInt(o)-1,Number(l)),r=new Date(Number(e),0,1),s=Math.round((a.valueOf()-r.valueOf())/864e5);let i=a.getDay(),c=6-i;return n!==0&&(i=i==0?7:i,c=7-i),Math.ceil((s+c)/7)},getWeekDate:function(e,o,l,n=0){const a=new Date(Number(e),parseInt(o)-1,Number(l)),r=a.getTime();let s=a.getDay();if(n===0){const c=r-s*864e5,d=r+(6-s)*864e5,f=this.date2Str(new Date(c)),m=this.date2Str(new Date(d));return[f,m]}else{s=s==0?7:s;const i=24*60*60*1e3,c=r-(s-1)*i,d=r+(7-s)*i,f=this.date2Str(new Date(c)),m=this.date2Str(new Date(d));return[f,m]}},formatResultDate:function(e){let o=[...e.split("-")];return o[2]=ne.getNumTwoBit(Number(o[2])),o[3]=`${o[0]}-${o[1]}-${o[2]}`,o[4]=ne.getWhatDay(+o[0],+o[1],+o[2]),o},inScope4Day(e,o,l){const n=new Date(new Date(o).setDate(o.getDate()+l)),a=e.getTime(),r=n.getTime(),s=o.getTime();return r>s?a>=s&&a<=r:a>=r&&a<=s},inScope4Month(e,o,l){const n=new Date(new Date(o).setMonth(o.getMonth()+l)),a=e.getTime(),r=n.getTime(),s=o.getTime();return r>s?a>=s&&a<=r:a>=r&&a<=s}},Ja=new Date().getFullYear(),Zn={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss",time:"HH:mm:ss","year-month":"YYYY-MM","month-day":"MM-DD",datehour:"YYYY-MM-DD HH","hour-minute":"HH:mm"},fo=(e,o,l)=>{let n;if(Fe(o)?n=o:typeof o=="string"&&ge(o)>0?n=ne.parser(o,l):n=new Date,n.toString()==="Invalid Date")return null;let a=Math.max(n.getTime(),e.minDate.getTime());return a=Math.min(a,e.maxDate.getTime()),new Date(a)},kn=(e,o,l)=>{Fe(o)||(o=e.minDate);let n=Math.max(o.getTime(),e.minDate.getTime());return n=Math.min(n,e.maxDate.getTime()),ne.format(new Date(n),l)};let bn={modelValue:{type:[String,Date]},confirmText:{type:String,default:""},cancelText:{type:String,default:""},type:{type:String,default:"date"},valueFormat:{type:String},visible:{type:Boolean,default:!1},title:{type:String,default:""},isShowChinese:{type:Boolean,default:!0},minuteStep:{type:Number,default:1},minDate:{type:Date,default:()=>new Date(Ja-10,0,1),validator:Fe},maxDate:{type:Date,default:()=>new Date(Ja+10,11,31),validator:Fe},visibleItemCount:{type:[Number,String],default:7},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:1e3},teleportDisable:{type:Boolean}};const{create:vd,scope:kd}=X("date-picker"),bd=vd({components:{[yt.name]:yt},props:{...bn},emits:["click","update:visible","update:modelValue","update:dateIndexs","update:close","cancel","confirm","clear"],setup(e,{emit:o}){const{t:l}=ae.useFoxI18n(kd),n={day:l("day"),year:l("year"),month:l("month"),hour:l("hour"),minute:l("minute"),seconds:l("seconds")},a=t.ref(!1);t.watch(()=>e.visible,u=>{a.value=u});function r(u,p){return new Date(u,p,0).getDate()}const s=(u,p)=>{const k=e[`${u}Date`],S=k.getFullYear();let w=1,N=1,T=0,B=0;u==="max"&&(w=12,N=r(p.getFullYear(),p.getMonth()+1),T=23,B=59);const D=B;return p.getFullYear()===S&&(w=k.getMonth()+1,p.getMonth()+1===w&&(N=k.getDate(),p.getDate()===N&&(T=k.getHours(),p.getHours()===T&&(B=k.getMinutes())))),{[`${u}Year`]:S,[`${u}Month`]:w,[`${u}Date`]:N,[`${u}Hour`]:T,[`${u}Minute`]:B,[`${u}Seconds`]:D}},i=t.computed(()=>{if(!h.value)return[];const{maxYear:u,maxDate:p,maxMonth:k,maxHour:S,maxMinute:w,maxSeconds:N}=s("max",h.value),{minYear:T,minDate:B,minMonth:D,minHour:C,minMinute:V,minSeconds:M}=s("min",h.value);let L=[{type:"year",range:[T,u]},{type:"month",range:[D,k]},{type:"day",range:[B,p]},{type:"hour",range:[C,S]},{type:"minute",range:[V,w]},{type:"seconds",range:[M,N]}];switch(e.type){case"date":L=L.slice(0,3);break;case"datetime":L=L.slice(0,5);break;case"time":L=L.slice(3,6);break;case"year-month":L=L.slice(0,2);break;case"month-day":L=L.slice(1,3);break;case"datehour":L=L.slice(0,4);break;case"hour-minute":L=L.slice(3,5);break}return L}),c=(u,p,k)=>{if(!(p>u))return null;const S=[];for(;u<=p;)e.isShowChinese?S.push({text:u+n[k],value:u}):S.push({text:`${u}`,value:u}),k==="minute"?u+=e.minuteStep:u++;return S},d=t.computed(()=>{let u=[];return i.value.forEach(p=>{let k=c(p.range[0],p.range[1],p.type);k&&u.push(k)}),u}),f=(u,p)=>u==="year"?p.getFullYear():u==="month"?p.getMonth()+1:u==="day"?p.getDate():u==="hour"?p.getHours():u==="minute"?p.getMinutes():u==="seconds"?p.getSeconds():0,m=t.ref(),h=t.ref(null);t.watchEffect(()=>{let u,p=e.modelValue;if(typeof p=="string"?p.length==0?u=new Date:e.valueFormat?u=fo(e,e.modelValue,e.valueFormat):u=fo(e,p,Zn[e.type]):Fe(p)?u=p:u=new Date,!!u&&(!h.value||u.getTime()!==h.value.getTime())){h.value=u;let k=[];i.value.forEach(S=>{let w=f(S.type,u);k.push(w)}),m.value=k}});const y=u=>{if(e.type==="date"){let p=u;h.value=new Date(p[0],p[1]-1,Math.min(p[2],r(p[0],p[1])))}else if(e.type==="datetime"){let p=u;h.value=new Date(p[0],p[1]-1,Math.min(p[2],r(p[0],p[1])),p[3],p[4])}else if(e.type==="time"){let p=u,k=h.value??new Date,S=new Date(k.getFullYear(),k.getMonth(),k.getDate(),p[0],p[1],p[2]);h.value=S}else if(e.type==="year-month"){let p=u,k=new Date(p[0],p[1]-1);h.value=k}else if(e.type==="month-day"){let p=u,k=h.value??new Date,S=new Date(k.getFullYear(),p[0]-1,p[1]);h.value=S}else if(e.type==="datehour"){let p=u;h.value=new Date(p[0],p[1]-1,Math.min(p[2],r(p[0],p[1])),p[3])}else if(e.type==="hour-minute"){let p=u,k=h.value??new Date,S=new Date(k.getFullYear(),k.getMonth(),k.getDate(),p[0],p[1]);h.value=S}m.value=u};return{columns:d,dateIndexs:m,show:a,onClose:()=>{a.value=!1,o("update:visible",!1),o("update:close",!1)},onConfirm:u=>{y(u),a.value=!1;let p=h.value??new Date;if(e.valueFormat){let k=kn(e,p,e.valueFormat);o("update:modelValue",k)}else o("update:modelValue",p);o("update:visible",!1),o("confirm",u)},onClear:()=>{o("clear")}}}});function Sd(e,o,l,n,a,r){const s=t.resolveComponent("fox-picker");return t.openBlock(),t.createBlock(s,{visible:e.show,"model-value":e.dateIndexs,source:e.columns,"value-type":"value","confirm-text":e.confirmText,"cancel-text":e.cancelText,title:e.title,onConfirm:e.onConfirm,onClose:e.onClose,onClear:e.onClear,"visible-item-count":e.visibleItemCount,"three-dimensional":e.threeDimensional,"swipe-duration":e.swipeDuration,"teleport-disable":e.teleportDisable},{top:t.withCtx(()=>[t.renderSlot(e.$slots,"top")]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["visible","model-value","source","confirm-text","cancel-text","title","onConfirm","onClose","onClear","visible-item-count","three-dimensional","swipe-duration","teleport-disable"])}const xo=J(bd,[["render",Sd]]);function Cd(e){let o=e.format;if(!o){let l=e.type??"date";o=Zn[l]}return o}function wd(e,o,l,n,a,r,s=!1){return{props:{...ue,...de,...bn,format:{type:String},placeholder:{type:String,default:""},textAlign:{type:String},clearable:{type:Boolean,default:!0}},emits:["change","update:modelValue","blur","focus","clear"],setup(i,c){const d=Ce(t.computed(()=>i.disabled)),f=Ae(t.computed(()=>i.readonly)),{emitEvent:m}=we({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus"],get validate(){return!d.value&&!f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ae.useFoxI18n(o),y=h(i,["placeholder"]),g=t.ref(!1),b=Ee(i,"modelValue",z=>z==null?null:typeof z=="string"?z.length==0?null:i.valueFormat?fo(i,z,i.valueFormat)??z:fo(i,z,Zn[i.type])??z:Fe(z)?z:null),u=t.computed(()=>{if(!b.value)return"";const z=Cd(i);return kn(i,b.value,z)}),p="fox-input-item",k=t.computed(()=>({[p]:!0,[`${p}__disabled`]:d.value})),S=Ne(t.computed(()=>i.textAlign),"textAlign"),w=t.computed(()=>{const z={};return S.value&&(z["text-align"]=S.value),z}),N=t.ref(!1),T=()=>{N.value=!0},B=()=>{N.value=!1};c.expose({showPicker:T,hidePicker:B});const D=z=>{N.value=z},C=z=>{if(b.value=z,i.valueFormat){let j=kn(i,z,i.valueFormat);m("update:modelValue",j,{}),m("change",j,{})}else m("update:modelValue",z,{}),m("change",z,{})},V=z=>{let q=z.target.value;g.value=!0,m("focus",q,z)},M=z=>{setTimeout(()=>{g.value=!1},0);let q=z.target.value;i.maxLength&&q.length>Number(i.maxLength)&&(q=q.slice(0,Number(i.maxLength))),m("blur",q,z)},L=t.computed(()=>({[`${p}__append`]:!0})),$=t.computed(()=>ge(i.unit)>0),E=t.computed(()=>ge(i.unit)>0&&!g.value),x=t.computed(()=>({hidden:!E.value})),A=z=>{b.value="",m("update:modelValue","",z),m("change","",z),m("clear",""),B()},H=t.computed(()=>i.clearable&&!d.value&&!f.value),R=t.computed(()=>{let z=ge(b.value)>0;return i.clearable&&z&&g.value}),Y=z=>{R.value?A(z):T()},U=t.computed(()=>R.value&&H.value?n:a),P=t.computed(()=>({action:!0}));return()=>{const z={class:k.value,style:w.value,type:"text",maxlength:i.maxLength,placeholder:y.placeholder.value,readonly:!0,unselectable:"on",value:u.value,onClick:T,onFocus:V,onBlur:M};s&&(z.disabled=!0);const j=[],q=t.h("input",z);j.push(q);const F=[],I={class:["action-icon"]},K=t.h(U.value,I),W={class:P.value,onClick:Y},Z=t.h("view",W,{default:()=>[K]});if(F.push(Z),$.value){const ve=t.h("view",{class:x.value},[i.unit]);F.push(ve)}const O={class:L.value},G=t.h("view",O,{default:()=>F});j.push(G);const Q={default:()=>j};Q.label=c.slots.default,Q.prepend=c.slots.prepend,Q.append=c.slots.append,Q.fixedPreTip=c.slots.fixedPreTip,Q.fixedTip=c.slots.fixedTip;const ee=he(i,bn);ee.valueFormat=null,ee.disabled=!1,ee.readonly=d.value||f.value,ee.visible=N.value,ee["onUpdate:visible"]=D,ee.modelValue=b.value,ee["onUpdate:modelValue"]=C,ee.onClear=A;const _={};if(c.slots.top){const ve=c.slots.top();_.top=()=>ve}if(c.slots.bottom){const ve=c.slots.bottom();_.default=()=>ve}const oe=t.h(r,ee,_);Q.hide=()=>[oe];const le=he(i,de,ue);return t.h(l,le,Q)}}}}const{create:Nd,componentName:Bd,scope:Vd}=X("date-item"),Jn=Nd(wd(Bd,Vd,be,te.CircleClose,te.Date,xo,!1)),Ad=39,Td=64,{create:$d,scope:Ed}=X("calendar-pane"),Dd=$d({props:{type:{type:String,default:"one"},valueFormat:{type:String,default:"YYYY-MM-DD"},isAutoBackFill:{type:Boolean,default:!1},toDateAnimation:{type:Boolean,default:!0},poppable:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showSubTitle:{type:Boolean,default:!0},showToday:{type:Boolean,default:!0},title:{type:String,default:""},confirmText:{type:String,default:""},startText:{type:String,default:""},endText:{type:String,default:""},defaultValue:{type:[String,Array],default:""},startDate:{type:String,default:ne.getDay(0)},endDate:{type:String,default:ne.getDay(365)},firstDayOfWeek:{type:Number,default:0}},emits:["choose","update","close","select"],setup(e,{emit:o,slots:l}){const{toLocaleRefs:n,t:a}=ae.useFoxI18n(Ed),r=n(e,["title","confirmText","startText","endText","today"]),s=JSON.parse(a("weekdays")),i=t.ref([...s.slice(e.firstDayOfWeek,7),...s.slice(0,e.firstDayOfWeek)]),c=t.ref(null),d=t.ref(null),f=t.ref(null),m=t.ref(null),h=t.ref(0),y=t.computed(()=>u.monthsData.slice(u.defaultRange[0],u.defaultRange[1])),g=t.computed(()=>l.btn),v=t.computed(()=>l["top-info"]),b=t.computed(()=>l["bottom-info"]),u=t.reactive({yearMonthTitle:"",defaultRange:[],currDate:"",propStartDate:"",propEndDate:"",unLoadPrev:!1,touchParams:{startY:0,endY:0,startTime:0,endTime:0,lastY:0,lastTime:0},transformY:0,translateY:0,scrollDistance:0,defaultData:[],chooseData:[],monthsData:[],dayPrefix:"fox-calendar__day",startData:"",endData:"",isRange:e.type==="range",timer:0,currentIndex:0,containerHeight:0,avgHeight:0,monthsNum:0}),p=I=>I.split("-"),k=I=>ne.isEqual(u.currDate[0],I),S=I=>ne.isEqual(u.currDate[1],I),w=I=>u.currDate?.length>0?u.currDate?.some(K=>ne.isEqual(K,I)):!1,N=(I,K)=>K.curData[0]+"-"+K.curData[1]+"-"+ne.getNumTwoBit(+I.day),T=(I,K)=>{const W=N(I,K),{type:Z}=e;return I.type=="curr"?ne.isEqual(u.currDate,W)||(Z=="range"||Z=="week")&&(k(W)||S(W))||Z=="multiple"&&w(W)?`${u.dayPrefix}--active`:u.propStartDate&&ne.compareDate(W,u.propStartDate)||u.propEndDate&&ne.compareDate(u.propEndDate,W)?`${u.dayPrefix}--disabled`:(Z=="range"||Z=="week")&&Array.isArray(u.currDate)&&Object.values(u.currDate).length==2&&ne.compareDate(u.currDate[0],W)&&ne.compareDate(W,u.currDate[1])?`${u.dayPrefix}--choose`:null:`${u.dayPrefix}--disabled`},B=()=>{const{type:I}=e;if(I=="range"&&u.chooseData.length==2||I!="range"){let K=u.chooseData.slice(0);I=="week"&&(K={weekDate:[C(u.chooseData[0]),C(u.chooseData[1])]}),o("choose",K),e.poppable&&o("update")}},D=(I,K,W=!1)=>{if(T(I,K)!=`${u.dayPrefix}--disabled`){const{type:Z}=e;let[O,G]=K.curData,Q=[...K.curData];if(Q[2]=ne.getNumTwoBit(Number(I.day)),Q[3]=`${Q[0]}-${Q[1]}-${Q[2]}`,Q[4]=ne.getWhatDay(+Q[0],+Q[1],+Q[2]),Z=="multiple")if(u.currDate?.length>0){let ee;u.currDate?.forEach((_,oe)=>{_==Q[3]&&(ee=oe)}),W?u.chooseData.push([...Q]):ee!==void 0?(u.currDate.splice(ee,1),u.chooseData.splice(ee,1)):(u.currDate.push(Q[3]),u.chooseData.push([...Q]))}else u.currDate=[Q[3]],u.chooseData=[[...Q]];else if(Z=="range"){let ee=Object.values(u.currDate).length;ee==2||ee==0?u.currDate=[Q[3]]:ne.compareDate(u.currDate[0],Q[3])?Array.isArray(u.currDate)&&u.currDate.push(Q[3]):Array.isArray(u.currDate)&&u.currDate.unshift(Q[3]),u.chooseData.length==2||!u.chooseData.length?u.chooseData=[[...Q]]:ne.compareDate(u.chooseData[0][3],Q[3])?u.chooseData=[...u.chooseData,[...Q]]:u.chooseData=[[...Q],...u.chooseData]}else if(Z=="week"){let ee=ne.getWeekDate(O,G,I.day,e.firstDayOfWeek);u.propStartDate&&ne.compareDate(ee[0],u.propStartDate)&&ee.splice(0,1,u.propStartDate),u.propEndDate&&ne.compareDate(u.propEndDate,ee[1])&&ee.splice(1,1,u.propEndDate),u.currDate=ee,u.chooseData=[ne.formatResultDate(ee[0]),ne.formatResultDate(ee[1])]}else u.currDate=Q[3],u.chooseData=[...Q];if(!W){let ee=u.chooseData;Z=="week"&&(ee={weekDate:[C(u.chooseData[0]),C(u.chooseData[1])]}),o("select",ee),(e.isAutoBackFill||!e.poppable)&&B()}}},C=I=>{let[K,W,Z]=I;return{date:I,monthWeekNum:ne.getMonthWeek(K,W,Z,e.firstDayOfWeek),yearWeekNum:ne.getYearWeek(K,W,Z,e.firstDayOfWeek)}},V=I=>{const K=I=="prev"?u.monthsData[0]:u.monthsData[u.monthsData.length-1];let W=parseInt(K.curData[0]),Z=parseInt(K.curData[1].toString().replace(/^0/,""));switch(I){case"prev":Z==1&&(W-=1),Z=Z==1?12:--Z;break;case"next":Z==12&&(W+=1),Z=Z==12?1:++Z;break}return[W+"",ne.getNumTwoBit(Z),ne.getMonthDays(String(W),String(Z))+""]},M=(I,K,W)=>{let{year:Z,month:O}=W;return K=="prev"&&I>=7&&(I-=7),Array.from(Array(I),(G,Q)=>({day:String(Q+1),type:K,year:Z,month:O}))},L=(I,K,W,Z)=>{I=I-e.firstDayOfWeek;let{year:O,month:G}=W;return K=="prev"&&I>=7&&(I-=7),Array.from(Array(Z),(ee,_)=>({day:String(_+1),type:K,year:O,month:G})).slice(Z-I)},$=(I,K)=>{const W=ne.getMonthPreDay(+I[0],+I[1]);let Z=Number(I[1])-1,O=Number(I[0]);Z<=0&&(Z=12,O+=1);const G=ne.getMonthDays(String(I[0]),String(I[1])),Q=ne.getMonthDays(O+"",Z+""),ee={year:I[0],month:I[1]},_={curData:I,title:a("monthTitle",{year:ee.year,month:ee.month}),monthData:[...L(W,"prev",{month:String(Z),year:String(O)},Q),...M(G,"curr",ee)],cssHeight:0,cssScrollHeight:0},oe=_.monthData.length>35?6:5;_.cssHeight=Ad+Td*oe;let le=0;u.monthsData.length>0&&(le=u.monthsData[u.monthsData.length-1].cssScrollHeight+u.monthsData[u.monthsData.length-1].cssHeight),_.cssScrollHeight=le,K=="next"?(!u.endData||!ne.compareDate(`${u.endData[0]}-${u.endData[1]}-${ne.getMonthDays(u.endData[0],u.endData[1])}`,`${I[0]}-${I[1]}-${I[2]}`))&&u.monthsData.push(_):!u.startData||!ne.compareDate(`${I[0]}-${I[1]}-${I[2]}`,`${u.startData[0]}-${u.startData[1]}-01`)?u.monthsData.unshift(_):u.unLoadPrev=!0},E=()=>{let I=e.startDate?e.startDate:ne.getDay(0),K=e.endDate?e.endDate:ne.getDay(365);u.propStartDate=I,u.propEndDate=K,u.startData=p(I),u.endData=p(K),(e.defaultValue||Array.isArray(e.defaultValue)&&e.defaultValue.length>0)&&(u.currDate=e.type!=="one"?[...e.defaultValue]:e.defaultValue);const W={year:Number(u.startData[0]),month:Number(u.startData[1])},Z={year:Number(u.endData[0]),month:Number(u.endData[1])};let O=Z.month-W.month;Z.year-W.year>0&&(O=O+12*(Z.year-W.year)),O<=0&&(O=1),$(u.startData,"next");let G=1;do $(V("next"),"next");while(G++<O);if(u.monthsNum=O,e.type=="range"&&Array.isArray(u.currDate))u.currDate.length>0&&(I&&ne.compareDate(u.currDate[0],I)&&u.currDate.splice(0,1,I),K&&ne.compareDate(K,u.currDate[1])&&u.currDate.splice(1,1,K),u.defaultData=[...p(u.currDate[0]),...p(u.currDate[1])]);else if(e.type=="multiple"&&Array.isArray(u.currDate)){if(u.currDate.length>0){let Q=[],ee={};u.currDate.forEach(_=>{I&&!ne.compareDate(_,I)&&K&&!ne.compareDate(K,_)&&(Object.hasOwnProperty.call(ee,_)||(Q.push(_),ee[_]=_))}),u.currDate=[...Q],u.defaultData=[...p(Q[0])]}}else if(e.type=="week"&&Array.isArray(u.currDate)){if(u.currDate.length>0){let[Q,ee,_]=p(u.currDate[0]),oe=ne.getWeekDate(Q,ee,_,e.firstDayOfWeek);u.currDate=oe,I&&ne.compareDate(u.currDate[0],I)&&u.currDate.splice(0,1,I),K&&ne.compareDate(K,u.currDate[1])&&u.currDate.splice(1,1,K),u.defaultData=[...p(u.currDate[0]),...p(u.currDate[1])]}}else u.currDate&&(I&&ne.compareDate(u.currDate,I)?u.currDate=I:K&&!ne.compareDate(u.currDate,K)&&(u.currDate=K),u.defaultData=[...p(u.currDate)])};Te({scrollToDate:I=>{ne.compareDate(I,u.propStartDate)?I=u.propStartDate:ne.compareDate(I,u.propEndDate)||(I=u.propEndDate);let K=p(I);u.monthsData.forEach((W,Z)=>{if(W.title==a("monthTitle",{year:K[0],month:K[1]})&&c.value){let O=u.monthsData[Z].cssScrollHeight-c.value.scrollTop;if(e.toDateAnimation){let G=0,Q=setInterval(()=>{if(G++,c.value){let ee=O/10;c.value.scrollTop=c.value.scrollTop+ee}G>=10&&(clearInterval(Q),c.value&&(c.value.scrollTop=u.monthsData[Z].cssScrollHeight))},40)}else c.value.scrollTop=u.monthsData[Z].cssScrollHeight}})},initPosition:()=>{c?.value&&(c.value.scrollTop=u.monthsData[u.currentIndex].cssScrollHeight)},doLayout:()=>{let I=0,K=0;u.defaultData.length>0&&u.monthsData.forEach((O,G)=>{O.title==a("monthTitle",{year:u.defaultData[0],month:u.defaultData[1]})&&(I=G),(e.type=="range"||e.type=="week")&&O.title==a("monthTitle",{year:u.defaultData[3],month:u.defaultData[4]})&&(K=G)}),R(u.monthsNum,I),u.currentIndex=I,u.yearMonthTitle=u.monthsData[u.currentIndex].title,u.defaultData.length>0&&(u.isRange?(D({day:u.defaultData[2],type:"curr"},u.monthsData[u.currentIndex],!0),D({day:u.defaultData[5],type:"curr"},u.monthsData[K],!0)):e.type=="week"?D({day:u.defaultData[2],type:"curr"},u.monthsData[u.currentIndex],!0):e.type=="multiple"?[...u.currDate].forEach(O=>{let G=p(O),Q=u.currentIndex;u.monthsData.forEach((ee,_)=>{ee.title==a("monthTitle",{year:G[0],month:G[1]})&&(Q=_)}),D({day:G[2],type:"curr"},u.monthsData[Q],!0)}):D({day:u.defaultData[2],type:"curr"},u.monthsData[u.currentIndex],!0));let W=u.monthsData[u.monthsData.length-1],Z=W.cssHeight+W.cssScrollHeight;je(()=>{c?.value&&d?.value&&m?.value&&(h.value=c.value.clientHeight,d.value.style.height=`${Z}px`,c.value.scrollTop=u.monthsData[u.currentIndex].cssScrollHeight)}),u.avgHeight=Math.floor(Z/(u.monthsNum+1))}});const R=(I,K)=>{I>=3?K>0&&K<I?u.defaultRange=[K-1,K+3]:K==0?u.defaultRange=[K,K+4]:K==I&&(u.defaultRange=[K-2,K+2]):u.defaultRange=[0,I+2];let W=u.monthsData[u.defaultRange[0]].cssScrollHeight;u.translateY=W},Y=(I,K)=>(e.type=="range"||e.type=="week")&&I.type=="curr"&&T(I,K)=="fox-calendar__day--active",U=(I,K)=>Y(I,K)&&k(N(I,K)),P=(I,K)=>u.currDate.length>=2&&S(N(I,K))?Y(I,K):!1,z=()=>{if(u.currDate.length>=2)return ne.isEqual(u.currDate[0],u.currDate[1])},j=I=>{const K=`${I.year}-${I.month}-${Number(I.day)<10?"0"+I.day:I.day}`;return ne.isEqual(K,ne.date2Str(new Date))},q=I=>{if(u.monthsData.length<=1)return;const K=I.target.scrollTop;let W=Math.floor(K/u.avgHeight);if(W==0)K>=u.monthsData[W+1].cssScrollHeight&&(W+=1);else if(W>0&&W<u.monthsNum-1)K>=u.monthsData[W+1].cssScrollHeight&&(W+=1),K<u.monthsData[W].cssScrollHeight&&(W-=1);else{const Z=Math.round(K+h.value);Z<u.monthsData[W].cssScrollHeight+u.monthsData[W].cssHeight&&K>u.monthsData[W-1].cssScrollHeight&&(W-=1),W+1<=u.monthsNum&&Z>=u.monthsData[W+1].cssScrollHeight+u.monthsData[W+1].cssHeight&&(W+=1),W>=1&&K<u.monthsData[W-1].cssScrollHeight&&(W-=1)}u.currentIndex!==W&&(u.currentIndex=W,R(u.monthsNum,W)),u.yearMonthTitle=u.monthsData[W].title},F=()=>{u.chooseData.splice(0),u.monthsData.splice(0),E()};return E(),t.watch(()=>e.defaultValue,I=>{I&&e.poppable&&F()}),{weeks:i,compConthsData:y,showTopBtn:g,topInfo:v,bottomInfo:b,rangeTip:z,mothsViewScroll:q,getClass:T,isStartTip:U,isEndTip:P,chooseDay:D,isCurrDay:j,confirm:B,months:c,...t.toRefs(u),...t.toRefs(e),...r,monthsPanel:d,weeksPanel:f,viewArea:m}}}),xd={class:"fox-calendar__header"},Id={key:0,class:"fox-calendar__header-title"},qd={key:1,class:"fox-calendar__header-slot"},Md={key:2,class:"fox-calendar__header-subtitle"},zd={class:"fox-calendar__weekdays",ref:"weeksPanel"},Ld={class:"fox-calendar__panel",ref:"monthsPanel"},Pd={class:"fox-calendar__month-title"},Rd={class:"fox-calendar__days"},Fd=["onClick"],Od={class:"fox-calendar__day-value"},Kd={key:0,class:"fox-calendar__day-tips fox-calendar__day-tips--top"},Ud={key:1,class:"fox-calendar__day-tips fox-calendar__day-tips--bottom"},Hd={key:2,class:"fox-calendar__day-tips--curr"},jd={key:4,class:"fox-calendar__day-tip"},Wd={key:0,class:"fox-calendar__footer"};function Yd(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(["fox-calendar",{"fox-calendar--nopop":!e.poppable,"fox-calendar--nofooter":e.isAutoBackFill}])},[t.createElementVNode("view",xd,[e.showTitle?(t.openBlock(),t.createElementBlock("view",Id,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.showTopBtn?(t.openBlock(),t.createElementBlock("view",qd,[t.renderSlot(e.$slots,"btn")])):t.createCommentVNode("",!0),e.showSubTitle?(t.openBlock(),t.createElementBlock("view",Md,t.toDisplayString(e.yearMonthTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("view",zd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.weeks,(s,i)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__weekday",key:i},t.toDisplayString(s),1))),128))],512)]),t.createElementVNode("view",{class:"fox-calendar__content",ref:"months",onScroll:o[0]||(o[0]=(...s)=>e.mothsViewScroll&&e.mothsViewScroll(...s))},[t.createElementVNode("view",Ld,[t.createElementVNode("view",{class:"fox-calendar__body",ref:"viewArea",style:t.normalizeStyle({transform:`translateY(${e.translateY}px)`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.compConthsData,(s,i)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__month",key:i},[t.createElementVNode("view",Pd,t.toDisplayString(s.title),1),t.createElementVNode("view",Rd,[t.createElementVNode("view",{class:t.normalizeClass(["fox-calendar__days-item",e.type==="range"?"fox-calendar__days-item--range":""])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.monthData,(c,d)=>(t.openBlock(),t.createElementBlock("view",{key:d,class:t.normalizeClass(["fox-calendar__day",e.getClass(c,s)]),onClick:f=>e.chooseDay(c,s)},[t.createElementVNode("view",Od,[t.renderSlot(e.$slots,"day",{date:c.type=="curr"?c:""},()=>[t.createTextVNode(t.toDisplayString(c.type=="curr"?c.day:""),1)])]),e.topInfo?(t.openBlock(),t.createElementBlock("view",Kd,[t.renderSlot(e.$slots,"top-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),e.bottomInfo?(t.openBlock(),t.createElementBlock("view",Ud,[t.renderSlot(e.$slots,"bottom-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),!e.bottomInfo&&e.showToday&&e.isCurrDay(c)?(t.openBlock(),t.createElementBlock("view",Hd,t.toDisplayString(e.today),1)):t.createCommentVNode("",!0),e.isStartTip(c,s)?(t.openBlock(),t.createElementBlock("view",{key:3,class:t.normalizeClass(["fox-calendar__day-tip",{"fox-calendar__day-tips--top":e.rangeTip()}])},t.toDisplayString(e.startText),3)):t.createCommentVNode("",!0),e.isEndTip(c,s)?(t.openBlock(),t.createElementBlock("view",jd,t.toDisplayString(e.endText),1)):t.createCommentVNode("",!0)],10,Fd))),128))],2)])]))),128))],4)],512)],544),e.poppable&&!e.isAutoBackFill?(t.openBlock(),t.createElementBlock("view",Wd,[t.createElementVNode("view",{class:"fox-calendar__confirm",onClick:o[1]||(o[1]=(...s)=>e.confirm&&e.confirm(...s))},t.toDisplayString(e.confirmText),1)])):t.createCommentVNode("",!0)],2)}const _a=J(Dd,[["render",Yd]]),Xd=e=>!!(!e||typeof e=="string"&&e.length==0||Array.isArray(e)&&e.length==0),Sn={type:{type:String,default:"one"},isAutoBackFill:{type:Boolean,default:!1},toDateAnimation:{type:Boolean,default:!0},poppable:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showSubTitle:{type:Boolean,default:!0},visible:{type:Boolean,default:!1},showToday:{type:Boolean,default:!0},title:{type:String,default:""},confirmText:{type:String,default:""},startText:{type:String,default:""},endText:{type:String,default:""},defaultValue:{type:[String,Array]},startDate:{type:String},endDate:{type:String},firstDayOfWeek:{type:Number,default:0,validator:e=>e>=0&&e<=6}},{create:Qd}=X("calendar"),Gd=Qd({components:{[_a.name]:_a,[ce.name]:ce},props:{...Sn},emits:["choose","close","update:visible","select"],setup(e,{emit:o,slots:l}){const n=t.computed(()=>l.btn),a=t.computed(()=>l["top-info"]),r=t.computed(()=>l.day),s=t.computed(()=>l["bottom-info"]),i=t.ref(null),c=v=>{i.value?.scrollToDate(v)},d=()=>{i.value?.initPosition()};t.watch(()=>e.visible,v=>{v&&t.nextTick(()=>{i.value?i.value.doLayout():setTimeout(()=>{i.value&&i.value.doLayout()},250)})}),Te({scrollToDate:c,initPosition:d});const f=()=>{o("update:visible",!1)},m=()=>{o("close"),o("update:visible",!1)};return{closePopup:()=>{m()},update:f,close:m,select:v=>{o("select",v)},choose:v=>{m(),o("choose",v)},calendarRef:i,showTopBtn:n,topInfo:a,dayInfo:r,bottomInfo:s}}});function Zd(e,o,l,n,a,r){const s=t.resolveComponent("fox-calendar-pane"),i=t.resolveComponent("fox-popup");return e.poppable?(t.openBlock(),t.createBlock(i,t.mergeProps({key:0,visible:e.visible,position:"bottom",round:"",closeable:""},e.$attrs,{onClickOverlay:e.closePopup,onClickCloseIcon:e.closePopup,style:{height:"85vh"}}),{default:t.withCtx(()=>[t.createVNode(s,{ref:"calendarRef",type:e.type,"is-auto-back-fill":e.isAutoBackFill,poppable:e.poppable,title:e.title,"default-value":e.defaultValue,"start-date":e.startDate,"end-date":e.endDate,onUpdate:e.update,onClose:e.close,onChoose:e.choose,onSelect:e.select,"confirm-text":e.confirmText,"start-text":e.startText,"end-text":e.endText,"show-today":e.showToday,"show-title":e.showTitle,"show-sub-title":e.showSubTitle,"to-date-animation":e.toDateAnimation,"first-day-of-week":e.firstDayOfWeek},t.createSlots({_:2},[e.showTopBtn?{name:"btn",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"btn")]),key:"0"}:void 0,e.dayInfo?{name:"day",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"day",{date:c.date})]),key:"1"}:void 0,e.topInfo?{name:"top-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"top-info",{date:c.date})]),key:"2"}:void 0,e.bottomInfo?{name:"bottom-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"bottom-info",{date:c.date})]),key:"3"}:void 0]),1032,["type","is-auto-back-fill","poppable","title","default-value","start-date","end-date","onUpdate","onClose","onChoose","onSelect","confirm-text","start-text","end-text","show-today","show-title","show-sub-title","to-date-animation","first-day-of-week"])]),_:3},16,["visible","onClickOverlay","onClickCloseIcon"])):(t.openBlock(),t.createBlock(s,{key:1,type:e.type,"is-auto-back-fill":e.isAutoBackFill,poppable:e.poppable,title:e.title,ref:"calendarRef","confirm-text":e.confirmText,"start-text":e.startText,"end-text":e.endText,"default-value":e.defaultValue,"start-date":e.startDate,"end-date":e.endDate,onUpdate:e.update,onClose:e.close,onChoose:e.choose,onSelect:e.select,"show-title":e.showTitle,"show-sub-title":e.showSubTitle,"to-date-animation":e.toDateAnimation,"show-today":e.showToday,"first-day-of-week":e.firstDayOfWeek},t.createSlots({_:2},[e.showTopBtn?{name:"btn",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"btn")]),key:"0"}:void 0,e.dayInfo?{name:"day",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"day",{date:c.date})]),key:"1"}:void 0,e.topInfo?{name:"top-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"top-info",{date:c.date})]),key:"2"}:void 0,e.bottomInfo?{name:"bottom-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"bottom-info",{date:c.date})]),key:"3"}:void 0]),1032,["type","is-auto-back-fill","poppable","title","confirm-text","start-text","end-text","default-value","start-date","end-date","onUpdate","onClose","onChoose","onSelect","show-title","show-sub-title","to-date-animation","show-today","first-day-of-week"]))}const Io=J(Gd,[["render",Zd]]),Zo=(e,o)=>{let l;return Fe(e)?l=e:typeof e=="string"&&ge(e)>0?l=ne.parser(e,o):l=new Date,l},it=(e,o,l)=>(Fe(o)||(o=new Date),ne.format(o,l)),ct=e=>{let o=`${e.getFullYear()}`,l=`${e.getMonth()+1}`,n=`${e.getDate()}`,a=ne.date2Str(e),r=ne.getWhatDay(e.getFullYear(),e.getMonth()+1,e.getDate());return[o,l,n,a,r]};function Jd(e,o,l,n,{CloseIcon:a,MarkIcon:r},s=!1){return{props:{...ue,...de,...Sn,modelValue:{type:[String,Date,Array],default:null},rangeSeparator:{type:String,default:"-"},valueFormat:{type:String,default:"YYYY-MM-DD"},format:{type:String,default:"YYYY-MM-DD"},showWeek:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},textAlign:{type:String},clearable:{type:Boolean,default:!0}},emits:["change","update:modelValue","blur","focus","clear"],setup(i,c){const d=Ce(t.computed(()=>i.disabled)),f=Ae(t.computed(()=>i.readonly)),{emitEvent:m}=we({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus"],get validate(){return!d.value&&!f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ae.useFoxI18n(o),y=h(i,["placeholder"]),g=t.ref(!1),v=t.computed(()=>i.type==="range"),b=t.reactive({startDate:null,endDate:null,startArray:[],endArray:[]}),u=()=>{b.startDate!==null&&(b.startDate=null,b.endDate=null,b.startArray=[],b.endArray=[])},p=(q,F="one",I="YYYY-MM-DD")=>{if(Xd(q)){u();return}if(v.value&&Array.isArray(q)&&q.length==2){let K,W;typeof q[0]=="string"?(K=Zo(q[0],I),W=Zo(q[1],I)):(K=q[0],W=q[1]);let Z=ct(K),O=ct(W);(b.startDate===null||b.startDate.getTime()!==K.getTime()||b.endDate?.getTime()!==W.getTime())&&(b.startDate=K,b.startArray=Z,b.endDate=W,b.endArray=O)}else{let K;typeof q=="string"?K=Zo(q,I):K=q;let W=ct(K);(b.startDate===null||b.startDate.getTime()!==K.getTime())&&(b.startDate=K,b.startArray=W)}};p(i.modelValue,i.type,i.valueFormat),t.watch(()=>i.modelValue,q=>{p(q,i.type,i.valueFormat)});const k=t.computed(()=>{if(b.startDate===null)return"";if(v.value){let q=it(i,b.startDate,i.format),F=it(i,b.endDate,i.format);return`${q} ${i.rangeSeparator} ${F}`}else{let q=it(i,b.startDate,i.format);return i.showWeek&&(q=`${q} ${b.startArray[4]}`),q}}),S=t.computed(()=>{if(b.startDate===null)return null;if(v.value){let q=ne.date2Str(b.startDate),F=ne.date2Str(b.endDate??new Date);return[q,F]}else return ne.date2Str(b.startDate)}),w="fox-input-item",N=t.computed(()=>({[w]:!0,[`${w}__disabled`]:d.value})),T=Ne(t.computed(()=>i.textAlign),"textAlign"),B=t.computed(()=>{const q={};return T.value&&(q["text-align"]=T.value),q}),D=t.ref(!1),C=()=>{f.value||d.value||(D.value=!0)},V=q=>{D.value=q},M=q=>{if(q){if(v.value&&Array.isArray(q)){let F=q[0],I=me(F[0]),K=me(F[1]),W=me(F[2]),Z=new Date(I,K-1,W),O=q[1];I=me(O[0]),K=me(O[1]),W=me(O[2]);let G=new Date(I,K-1,W);if(b.startDate=Z,b.startArray=ct(Z),b.endDate=G,b.endArray=ct(G),i.valueFormat){let Q=it(i,Z,i.valueFormat),ee=it(i,G,i.valueFormat);m("update:modelValue",[Q,ee],{})}else m("update:modelValue",[Z,G],{})}else{let F=q,I=me(F[0]),K=me(F[1]),W=me(F[2]),Z=new Date(I,K-1,W);if(b.startDate=Z,b.startArray=ct(Z),i.valueFormat){let O=it(i,Z,i.valueFormat);m("update:modelValue",O,{})}else m("update:modelValue",Z,{})}m("change",q,{})}},L=q=>{let I=q.target.value;g.value=!0,m("focus",I,q)},$=q=>{setTimeout(()=>{g.value=!1},0);let I=q.target.value;i.maxLength&&I.length>Number(i.maxLength)&&(I=I.slice(0,Number(i.maxLength))),m("blur",I,q)},E=t.computed(()=>({[`${w}__append`]:!0})),x=t.computed(()=>ge(i.unit)>0),A=t.computed(()=>ge(i.unit)>0&&!g.value),H=t.computed(()=>({hidden:!A.value})),R=q=>{u(),m("update:modelValue",null,q),m("change","",q),m("clear","")},Y=t.computed(()=>i.clearable&&!d.value&&!f.value),U=t.computed(()=>{let q=ge(k.value)>0;return i.clearable&&q&&g.value}),P=q=>{U.value?R(q):C()},z=t.computed(()=>U.value&&Y.value?a:r),j=t.computed(()=>({action:!0}));return()=>{const q={class:N.value,style:B.value,type:"text",maxlength:i.maxLength,placeholder:y.placeholder.value,readonly:!0,unselectable:"on",value:k.value,onClick:C,onFocus:L,onBlur:$};s&&(q.disabled=!0);const F=[],I=t.h("input",q);F.push(I);const K=[],W={class:["action-icon"]},Z=t.h(z.value,W),O={class:j.value,onClick:P},G=t.h("view",O,{default:()=>[Z]});if(K.push(G),x.value){const Ze=t.h("view",{class:H.value},[i.unit]);K.push(Ze)}const Q={class:E.value},ee=t.h("view",Q,{default:()=>K});F.push(ee);const _={default:()=>F};_.label=c.slots.default,_.prepend=c.slots.prepend,_.append=c.slots.append,_.fixedPreTip=c.slots.fixedPreTip,_.fixedTip=c.slots.fixedTip;const oe=he(i,Sn);oe.visible=D.value,oe["onUpdate:visible"]=V,oe["default-value"]=S.value,oe.onChoose=M;const le={};if(c.slots.btn){const Ze=c.slots.btn();le.btn=()=>Ze}c.slots.day&&(le.day=c.slots.day),c.slots.topInfo&&(le.topInfo=c.slots.topInfo),c.slots.bottomInfo&&(le.bottomInfo=c.slots.bottomInfo);const $e=t.h(l,oe,le);_.hide=()=>[$e];const ve=he(i,de,ue);return t.h(n,ve,_)}}}}const{componentName:_d,create:ef,scope:tf}=X("calendar-item"),_n=ef(Jd(_d,tf,Io,be,{CloseIcon:te.CircleClose,MarkIcon:te.Date},!1)),of={readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},shape:{type:String,default:"round"},label:{type:[String,Number,Boolean],default:""},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}};function nf(e,{CheckNormal:o,Checked:l}){return{props:{...of},setup(n,{emit:a,slots:r}){let s=t.inject("parent",null);const i=t.computed(()=>s.label.value===n.label),c=t.computed(()=>n.disabled?"fox-radio__icon--disable":i.value?"fox-radio__icon":"fox-radio__icon--unchecked"),d=t.computed(()=>s.position),f=()=>{if(i.value){if(r.checkedIcon)return r.checkedIcon();{const v=se(n.iconSize),b=n.checkedIcon??l;return t.h(b,{width:v,height:v,class:c.value})}}else{if(r.icon)return r.icon();{const v=se(n.iconSize),b=n.icon??o;return t.h(b,{width:v,height:v,class:c.value})}}},m=()=>t.h("view",{class:`${e}__label ${n.disabled?`${e}__label--disabled`:""}`},r.default?.()),h=()=>t.h("view",{class:`${e}__button ${i.value&&`${e}__button--active`} ${n.disabled?`${e}__button--disabled`:""}`},r.default?.()),y=()=>{i.value||n.disabled||n.readonly||s.updateValue(n.label)},g=d.value==="left";return()=>t.h("view",{class:`${e} ${e}--${n.shape} ${g?`${e}--reverse`:""}`,onClick:y},[n.shape=="button"?h():g?[m(),f()]:[f(),m()]])}}}const{componentName:lf,create:af}=X("radio"),qo=af(nf(lf,{CheckNormal:te.CheckNormal,Checked:te.CheckChecked})),{componentName:er,create:rf}=X("radio-group"),Mo=rf({props:{modelValue:{type:[Object],default:""},direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},emits:["change","update:modelValue"],setup(e,{emit:o,slots:l}){const n=a=>o("update:modelValue",a);return t.provide("parent",{label:t.readonly(t.computed(()=>e.modelValue)),position:e.textPosition,updateValue:n}),t.watch(()=>e.modelValue,a=>o("change",a)),()=>{const a={};return e.textAlign&&(a["text-align"]=e.textAlign),t.h("view",{class:`${er} ${er}--${e.direction}`,style:a},l.default?.())}}});function tr(e,o,l,n="value"){for(let a=0;a<o.length;a++){let r=o[a];if(n==="text"){if(_t(e,r)===l)return a}else if(n==="item"){if(xe(l,r))return a}else if(Et(e,r)===l)return a}return-1}function _t(e,o){return typeof e.textKey=="string"&&e.textKey.length>0?o[e.textKey]:o.text}function Et(e,o){return typeof e.valueKey=="string"&&e.valueKey.length>0?o[e.valueKey]:o.value}function sf(e,o){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?o[e.disabledKey]:o.disabled??null}function cf(e,o,l){return typeof e.itemOptions=="function"?e.itemOptions(o,l):e.itemOptions}let uf=class{proxy;constructor(o){this.proxy=o}async load(o,l,n){if(Array.isArray(l))return l;if(typeof l=="function")return await l(n);let a=Ge(this.proxy,o);return a===null?(console.error(`${o} component not found api function`),[]):(Be(n)&&t.isReactive(n)&&(n=t.toRaw(n)),await a(l,n))}};function df(){const e=t.getCurrentInstance();return new uf(e.proxy)}function ff(e){return{text:e,value:e}}const or={shape:{type:String,default:"round"},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}},mf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}};function pf(e,o,l,n,a){return{props:{...ue,...de,...or,...mf,source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},modelValue:{type:[Number,String,Boolean,Object],default:""}},emits:["change","update:modelValue"],setup(r,s){const i=Ae(t.computed(()=>r.readonly)),c=Ce(t.computed(()=>r.disabled)),d=Ne(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:f}=we({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus"],get validate(){return!c.value||!i.value}},r.prop??s.attrs.name),m=df(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([u,p])=>{if(u){const k=await m.load("radio",u,p);if(k.length>0)if(typeof k[0]=="string"){const N=k.map(T=>ff(T));h.value=N}else h.value=k}},{immediate:!0});let y=t.ref(-1);t.watch([()=>r.modelValue,()=>h.value],async([u,p])=>{y.value=tr(r,p,u,r.valueType)},{deep:!0});const g=t.computed(()=>{if(!r.source)return r.modelValue;if(y.value===-1)return null;const u=h.value[y.value];return Et(r,u)}),v=u=>{let p=null,k=null;if(h.value.length>0){let S=tr(r,h.value,u,"value");y.value=S,S>=0&&(k=h.value[S],r.valueType==="text"?p=_t(r,k):r.valueType==="item"?p=k:p=Et(r,k))}else p=u;f("update:modelValue",p),f("change",p,k)},b=()=>{let u=null,p=null;if(h.value.length>0&&y.value!==-1){let k=h.value[y.value];r.valueType==="text"?u=_t(r,k):r.valueType==="item"?u=k:u=Et(r,k)}f("update:modelValue",u),f("change",u,p)};if(Te({clear(){y.value!==-1&&(y.value=-1,b())}}),r.source){const u=()=>{const p=[],k=he(r,or);return h.value.forEach((S,w)=>{const N=Et(r,S),T=sf(r,S);let B={...k,label:N,disabled:T};const D=cf(r,S,w);B={...B,...D},c.value&&(B.disabled=!0),i.value&&(B.readonly=!0);const C={};if(s.slots.icon&&(C.icon=s.slots.icon),s.slots.checkedIcon&&(C.checkedIcon=s.slots.checkedIcon),typeof s.slots.text=="function"){const M=s.slots.text(S);C.default=()=>[M]}else{const M=_t(r,S);C.default=()=>M}let V=t.h(a,B,C);p.push(V)}),p};return()=>{const p=u(),k={class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:d.value,modelValue:g,"onUpdate:modelValue":v},S=t.h(n,k,{default:()=>p}),w={default:()=>S};w.label=s.slots.default,w.prepend=s.slots.prepend,w.append=s.slots.append,w.fixedPreTip=s.slots.fixedPreTip,w.fixedTip=s.slots.fixedTip;const N=he(r,de,ue);return t.h(l,N,w)}}else return()=>{const u=s.slots.options?.()??[];return t.h(n,{class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:d.value,modelValue:g,"update:modelValue":v},{default:()=>u})}}}}const{componentName:hf,create:gf,scope:yf}=X("radio-item"),el=gf(pf(hf,yf,be,Mo,qo)),vf=(e,{CheckNormal:o,Checked:l,Indeterminate:n})=>({props:{modelValue:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},textPosition:{type:String,default:"right"},icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},label:{type:[String,Number,Boolean],default:""},indeterminate:{type:Boolean,default:!1},shape:{type:String,default:"round"}},emits:["change","update:modelValue"],setup(a,{emit:r,slots:s}){const i=t.inject("parent",null),c=t.reactive({partialSelect:a.indeterminate});t.watch(()=>a.indeterminate,k=>{c.partialSelect=k});const d=t.computed(()=>!!i),f=t.computed(()=>d.value?i.value.value.includes(a.label):!!a.modelValue),m=t.computed(()=>d.value?i.position:a.textPosition),h=t.computed(()=>a.disabled?"fox-checkbox__icon--disable":c.partialSelect?"fox-checkbox__icon--indeterminate":f.value?"fox-checkbox__icon":"fox-checkbox__icon--unchecked");let y="";const g=(k,S)=>{y="click",r("update:modelValue",k),r("change",k,S)};t.watch(()=>a.modelValue,k=>{y=="click"?y="":r("change",k)});const v=()=>{if(c.partialSelect){if(s.indeterminateIcon)return s.indeterminateIcon();{const k=se(a.iconSize),S=a.indeterminateIcon??n;return t.h(S,{width:k,height:k,class:h.value})}}else if(f.value){if(s.checkedIcon)return s.checkedIcon();{const k=se(a.iconSize),S=a.checkedIcon??l;return t.h(S,{width:k,height:k,class:h.value})}}else{if(s.icon)return s.icon();{const k=se(a.iconSize),S=a.icon??o;return t.h(S,{width:k,height:k,class:h.value})}}},b=()=>t.h("view",{class:`${e}__label ${a.disabled?`${e}__label--disabled`:""}`},s.default?.()),u=()=>t.h("view",{class:`${e}__button ${f.value&&`${e}__button--active`} ${a.disabled?`${e}__button--disabled`:""}`},s.default?.()),p=k=>{if(!(a.disabled||a.readonly)){if(f.value&&c.partialSelect){c.partialSelect=!1,g(f.value,s.default?.()[0].children);return}if(g(!f.value,s.default?.()[0].children),d.value){const S=i.value.value,w=i.max.value,{label:N}=a,T=S.indexOf(N);T>-1?S.splice(T,1):T<=-1&&(S.length<w||!w)&&S.push(N),i.updateValue(S)}}};return t.onMounted(()=>{d.value&&i.link(t.getCurrentInstance())}),t.onBeforeUnmount(()=>{d.value&&i.unlink(t.getCurrentInstance())}),()=>t.h("view",{class:`${e} ${e}--${a.shape} ${m.value==="left"?`${e}--reverse`:""}`,onClick:p},[a.shape=="button"?u():[v(),b()]])}}),{componentName:kf,create:bf}=X("checkbox"),zo=bf(vf(kf,{CheckNormal:te.CheckNormal,Checked:te.Checked,Indeterminate:te.CheckDisabled})),{create:Sf,componentName:nr}=X("checkbox-group"),Lo=Sf({props:{modelValue:{type:Array,default:()=>[]},direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},emits:["change","update:modelValue"],setup(e,{slots:o,emit:l}){const n=t.reactive({children:[]}),a=d=>{d.proxy&&n.children.push(d.proxy)},r=d=>{d.proxy&&(n.children=n.children.filter(f=>f!==d.proxy))},s=d=>{l("update:modelValue",d),l("change",d)},i=d=>{const f=[];d&&n.children.forEach(m=>{m?.disabled||f.push(m?.label)}),l("update:modelValue",f)},c=()=>{const d=n.children.filter(f=>f?.disabled?!1:!e.modelValue.includes(f.label)).map(f=>f.label);l("update:modelValue",d)};return t.provide("parent",{value:t.computed(()=>Array.isArray(e.modelValue)?e.modelValue:[]),position:e.textPosition,max:t.computed(()=>e.max),updateValue:s,link:a,unlink:r}),t.watch(()=>e.modelValue,d=>{l("change",d)}),Te({toggleAll:i,toggleReverse:c}),()=>{const d={};return e.textAlign&&(d["text-align"]=e.textAlign),t.h("view",{class:`${nr} ${nr}--${e.direction}`,style:d},o.default?.())}}});function lr(e,o,l,n="value"){for(let a=0;a<o.length;a++){let r=o[a];if(n==="text"){if(Cn(e,r)===l)return a}else if(n==="item"){if(xe(l,r))return a}else if(eo(e,r)===l)return a}return-1}function Cn(e,o){return typeof e.textKey=="string"&&e.textKey.length>0?o[e.textKey]:o.text}function eo(e,o){return typeof e.valueKey=="string"&&e.valueKey.length>0?o[e.valueKey]:o.value}function Cf(e,o){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?o[e.disabledKey]:o.disabled??null}function wf(e,o,l){return typeof e.itemOptions=="function"?e.itemOptions(o,l):e.itemOptions}let Nf=class{proxy;constructor(o){this.proxy=o}async load(o,l,n){if(Array.isArray(l))return l;if(typeof l=="function")return await l(n);let a=Ge(this.proxy,o);return a===null?(console.error(`${o} component not found api function`),[]):(Be(n)&&t.isReactive(n)&&(n=t.toRaw(n)),await a(l,n))}};function Bf(){const e=t.getCurrentInstance();return new Nf(e.proxy)}function Vf(e){return{text:e,value:e}}const Af={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},ar={icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},shape:{type:String,default:"round"}};function Tf(e,o,l,n,a){return{props:{...Af,...ar,...ue,...de,source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},modelValue:{type:[Array,String],default:[]}},emits:["change","update:modelValue"],setup(r,s){const i=Ce(t.computed(()=>r.disabled)),c=Ce(t.computed(()=>r.readonly)),d=Ne(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:f}=we({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus"],get validate(){return!i.value||!c.value}},r.prop??s.attrs.name),m=Bf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([u,p])=>{if(u){const k=await m.load("checkbox",u,p);if(k.length>0)if(typeof k[0]=="string"){const N=k.map(T=>Vf(T));h.value=N}else h.value=k}},{immediate:!0});const y=t.ref([]);t.watch([()=>r.modelValue,()=>h.value],async([u,p])=>{const k=[];Array.isArray(u)&&u.forEach(S=>{let w=lr(r,p,S,r.valueType);w!==-1&&k.push(w)}),!xe(k,y.value)&&(y.value=k)},{deep:!0});const g=t.computed(()=>{if(!r.source)return r.modelValue;let u=[];return y.value.forEach(p=>{let k=h.value[p];u.push(eo(r,k))}),u}),v=u=>{let p=[],k=[];if(h.value.length>0){const S=[];Array.isArray(u)&&u.forEach(w=>{let N=lr(r,h.value,w,"value");N!==-1&&S.push(N);const T=h.value[N];k.push(T),r.valueType==="text"?p.push(Cn(r,T)):r.valueType==="item"?p.push(T):p.push(eo(r,T))}),y.value=S}else p=u;f("update:modelValue",p),f("change",p,k)},b=t.ref();if(Te({toggleAll:u=>{b.value.toggleAll(u)},toggleReverse:()=>{b.value.toggleReverse()}}),r.source){const u=()=>{const p=[],k=he(r,ar);return h.value.forEach((S,w)=>{const N=eo(r,S),T=Cf(r,S);let B={...k,label:N,disabled:T};const D=wf(r,S,w);B={...B,...D},i.value&&(B.disabled=!0),c.value&&(B.readonly=!0);const C={};if(s.slots.icon&&(C.icon=s.slots.icon),s.slots.checkedIcon&&(C.checkedIcon=s.slots.checkedIcon),s.slots.indeterminateIcon&&(C.indeterminateIcon=s.slots.indeterminateIcon),typeof s.slots.text=="function"){const M=s.slots.text(S);C.default=()=>[M]}else{const M=Cn(r,S);C.default=()=>M}let V=t.h(a,B,C);p.push(V)}),p};return()=>{const p=u(),k={class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,modelValue:g.value,"onUpdate:modelValue":v},S=t.h(n,k,{default:()=>p}),w={default:()=>S};w.label=s.slots.default,w.prepend=s.slots.prepend,w.append=s.slots.append,w.fixedPreTip=s.slots.fixedPreTip,w.fixedTip=s.slots.fixedTip;const N=he(r,de,ue);return t.h(l,N,w)}}else return()=>{const u=s.slots.options?.()??[];return t.h("view",{class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,textAlign:d.value,modelValue:g,"onUpdate:modelValue":v},{default:()=>u})}}}}const{componentName:$f,create:Ef,scope:Df}=X("checkbox-item"),tl=Ef(Tf($f,Df,be,Lo,zo)),wn={modelValue:{type:[String,Number,Boolean],default:!1},disable:{type:Boolean,default:!1},activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[String,Number,Boolean],default:!0},inactiveValue:{type:[String,Number,Boolean],default:!1},loading:{type:Boolean,default:!1},name:{type:String,default:"loading1"},size:{type:[String,Number],default:"12px"},color:{type:String,default:""}},{componentName:xf,create:If}=X("switch"),qf=If({components:{Loading1:te.Loading1},props:{...wn},emits:["change","update:modelValue","update:loading"],setup(e,{emit:o}){const l=t.computed(()=>e.modelValue===e.activeValue),n=t.computed(()=>{const i=xf;return{[i]:!0,[l.value?"fox-switch-open":"fox-switch-close"]:!0,[`${i}-disable`]:e.disable,[`${i}-base`]:!0}}),a=t.computed(()=>({backgroundColor:l.value?e.activeColor:e.inactiveColor}));let r="";const s=i=>{if(e.disable||e.loading)return;r="click";const c=l.value?e.inactiveValue:e.activeValue;o("update:modelValue",c),o("change",c,i)};return t.watch(()=>e.modelValue,i=>{r=="click"?r="":o("change",i)}),{classes:n,style:a,isActive:l,onClick:s}}}),Mf={class:"fox-switch-button"};function zf(e,o,l,n,a,r){const s=t.resolveComponent("Loading1");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onClick:o[0]||(o[0]=(...i)=>e.onClick&&e.onClick(...i)),style:t.normalizeStyle(e.style)},[t.createElementVNode("view",Mf,[e.loading?t.renderSlot(e.$slots,"icon",{key:0},()=>[t.createVNode(s,{name:"loading",color:e.activeColor},null,8,["color"])]):t.createCommentVNode("",!0),e.activeText?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.withDirectives(t.createElementVNode("view",{class:"fox-switch-label open"},t.toDisplayString(e.activeText),513),[[t.vShow,e.isActive]]),t.withDirectives(t.createElementVNode("view",{class:"fox-switch-label close"},t.toDisplayString(e.inactiveText),513),[[t.vShow,!e.isActive]])],64)):t.createCommentVNode("",!0)])],6)}const Po=J(qf,[["render",zf]]);function Lf(e,o,l,n){return{props:{...ue,...de,...wn},emits:["change","update:modelValue"],setup(a,r){const s=Ce(t.computed(()=>a.disabled)),i=Ae(t.computed(()=>a.readonly)),{emitEvent:c}=we({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus"],get validate(){return!s.value&&!i.value}},a.prop??r.attrs.name),d=e,f=Ee(a,"modelValue"),m=h=>{f.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const y={...he(a,wn),disabled:s.value,readonly:i.value,value:f.value,"onUpdate:modelValue":m},g=[],v=t.h(n,y);g.push(v);const b={default:()=>g};b.label=r.slots.default,b.fixedPreTip=r.slots.fixedPreTip,b.fixedTip=r.slots.fixedTip;const u=he(a,de,ue);return u["content-class"]=d,t.h(l,u,b)}}}}const{componentName:Pf,create:Rf,scope:Ff}=X("switch-item"),ol=Rf(Lf(Pf,Ff,be,Po));function Of(e,o,l,n){return{props:{...ue,...de,placeholder:{type:String,default:""},textAlign:{type:String},modelValue:{type:[String],required:!1},desc:{type:[String],required:!1},icon:{type:[Object],required:!1},iconSize:{type:[String],required:!1,default:""}},emits:["click","focus","blur"],setup(a,r){const{emitEvent:s}=we({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus"]},a.prop??r.attrs.name),{toLocaleRefs:i}=ae.useFoxI18n(o),c=i(a,["placeholder"]),d=Ce(t.computed(()=>a.disabled)),f=Ae(t.computed(()=>a.readonly)),m=Ee(a,"modelValue"),h=t.computed(()=>({[`${e}`]:!0})),y=t.computed(()=>({[`${e}__main`]:!0,[`${e}__disabled`]:d.value,[`${e}__placeholder`]:!d.value&&ie(m.value)})),g=Ne(t.computed(()=>a.textAlign),"textAlign"),v=t.computed(()=>{const M={};return g.value&&(M["text-align"]=g.value),M}),b=t.computed(()=>!ie(a.modelValue)||r.slots.main?!0:!!ie(a.desc)),u=t.computed(()=>ie(m.value)?c.placeholder.value:m.value),p=t.computed(()=>!ie(a.desc)||r.slots.sub),k=t.computed(()=>({[`${e}__sub`]:!0})),S=t.computed(()=>{const M={};return g.value&&(M["text-align"]=g.value),M}),w=()=>{s("focus",m.value)},N=()=>{s("blur",m.value)},T=t.computed(()=>({[`${e}__append`]:!0})),B=t.computed(()=>ge(a.unit)>0),D=M=>{d.value==!0||f.value==!0||s("click")},C=t.computed(()=>a.icon??l),V=t.computed(()=>({action:!0}));return()=>{const M=[];if(typeof r.slots.content=="function"){const z=r.slots.content();M.push(z)}else{const z=[];if(b.value){const F={tabIndex:0,class:y.value,style:v.value,onFocus:w,onBlur:N,onClick:D};let I=null;r.slots.main?I=t.h("view",F,[r.slots.main(u.value)]):I=t.h("view",F,[u.value]),z.push(I)}if(p.value){const F={tabIndex:0,class:k.value,style:S.value,onFocus:w,onBlur:N,onClick:D};let I=null;r.slots.sub?I=t.h("view",F,[r.slots.sub(a.desc)]):I=t.h("view",F,[a.desc]),z.push(I)}const j={class:h.value},q=t.h("view",j,z);M.push(q)}const L=[],$=se(a.iconSize);let E=r.slots.icon;if(!E){const z={width:$,height:$,class:["action-icon"]};E=t.h(C.value,z)}const x={class:V.value,onClick:D},A=t.h("view",x,{default:()=>[E]});if(L.push(A),B.value){const z=t.h("view",{},[a.unit]);L.push(z)}const H={class:T.value},R=t.h("view",H,{default:()=>L});M.push(R);const Y={default:()=>M};Y.label=r.slots.default,Y.prepend=r.slots.prepend,Y.append=r.slots.append,Y.fixedPreTip=r.slots.fixedPreTip,Y.fixedTip=r.slots.fixedTip;const U=he(a,de,ue);return t.h(n,U,Y)}}}}const{componentName:Kf,create:Uf,scope:Hf}=X("link-item"),nl=Uf(Of(Kf,Hf,te.ArrowRight,be)),Nn={count:{type:[String,Number],default:5},modelValue:{type:[String,Number],default:0},customIcon:{type:Object},size:{type:[String,Number],default:void 0},activeColor:{type:String,default:""},voidColor:{type:String,default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},allowHalf:{type:Boolean,default:!1},touchable:{type:Boolean,default:!0},spacing:{type:[String,Number],default:void 0}},{create:jf,componentName:Wf}=X("rate"),Yf=jf({props:{...Nn},emits:["update:modelValue","change"],setup(e,{emit:o,slots:l}){const n=t.ref([]),a=t.computed(()=>({[Wf]:!0})),r=y=>{o("update:modelValue",y),o("change",y)},s=(y,g)=>{if(e.disabled||e.readonly)return;let v=0;g===1&&e.modelValue===g||(v=g,e.allowHalf&&y==2&&(v-=.5)),r(v)},i=(y,g,v)=>{let b=0;for(let u=g.value.length-1;u>=0;u--){const p=g.value[u];if(y>p.offsetLeft){v?b=u+(y>p.offsetLeft+p.clientWidth/2?1:.5):b=u+1;break}}return b},c=Ke(),d={onTouchStart(y){!e.touchable||e.readonly||c.start(y)},onTouchMove(y){e.touchable&&(c.move(y),c.isHorizontal()&&n.value&&(y.preventDefault(),r(i(c.moveX.value,n,e.allowHalf))))}},f=Math.random().toString(36).slice(-8),m=t.computed(()=>e.customIcon??te.StarFillN);return{classes:a,...d,onClick:s,toPxDesc:fe,renderIcon:(y,g)=>t.h(y,g),rateRefs:n,refRandomId:f,slots:l,customIcon:m}}}),Xf=["id"],Qf={class:"fox-rate-item__icon--full"},Gf={key:0,class:"fox-rate-item__icon--half"},Zf={key:1,class:"fox-rate-item__icon--half"};function Jf(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onTouchstart:o[0]||(o[0]=(...s)=>e.onTouchStart&&e.onTouchStart(...s)),onTouchmove:o[1]||(o[1]=(...s)=>e.onTouchMove&&e.onTouchMove(...s))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Number(e.count),s=>(t.openBlock(),t.createElementBlock("view",{class:"fox-rate-item",key:s,ref_for:!0,ref:"rateRefs",id:"rateRefs-"+e.refRandomId+s,style:t.normalizeStyle(s<Number(e.count)?{marginRight:e.toPxDesc(e.spacing)}:{})},[t.createElementVNode("view",Qf,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:s<=e.modelValue?e.activeColor:e.voidColor})),{class:t.normalizeClass(["fox-rate-item__icon",{"fox-rate-item__icon--disabled":e.disabled||s>e.modelValue}]),onClick:i=>e.onClick(1,s)},null,8,["class","onClick"]))]),e.allowHalf&&Number(e.modelValue)+1>s?(t.openBlock(),t.createElementBlock("view",Gf,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:s<=Number(e.modelValue)+1?e.activeColor:e.voidColor})),{class:"fox-rate-item__icon",onClick:i=>e.onClick(2,s)},null,8,["onClick"]))])):e.allowHalf&&Number(e.modelValue)+1<s?(t.openBlock(),t.createElementBlock("view",Zf,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:e.voidColor})),{class:"fox-rate-item__icon fox-rate-item__icon--disabled",onClick:i=>e.onClick(2,s)},null,8,["onClick"]))])):t.createCommentVNode("",!0)],12,Xf))),128))],34)}const vt=J(Yf,[["render",Jf]]);function _f(e,o,l,n){return{props:{...ue,...de,...Nn},emits:["change","update:modelValue"],setup(a,r){const s=Ce(t.computed(()=>a.disabled)),i=Ae(t.computed(()=>a.readonly)),{emitEvent:c}=we({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus"],get validate(){return!s.value&&!i.value}},a.prop??r.attrs.name),d=e,f=Ee(a,"modelValue"),m=h=>{f.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const y={...he(a,Nn),disabled:s.value,readonly:i.value,value:f.value,"onUpdate:modelValue":m},g=[],v=t.h(n,y);g.push(v);const b={default:()=>g};if(r.slots.default){const k=r.slots.default();b.label=()=>k}const u=he(a,de,ue);return u["content-class"]=d,t.h(l,u,b)}}}}const{componentName:em,create:tm,scope:om}=X("rate-item"),ll=tm(_f(em,om,be,vt)),Bn={poppable:{type:[Boolean],default:!1},modelValue:{type:[Array,Number,Boolean,String],default:[]},visible:{type:[Boolean]},disabled:{type:[Boolean,String],required:!1},source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},subTextKey:{type:String,required:!1,default:"subText"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number]},pageSize:{type:[Number],required:!1,default:10},optionsHeight:{type:[String],required:!1},multiple:{type:[Boolean]},position:{type:[String],default:"bottom"},closeOnClickOverlay:{type:[Boolean],default:!0},title:{type:[String]},confirmText:{type:[String]},loadText:{type:[String]},loadMoreText:{type:[String]},isAutoBackFill:{type:[Boolean]},showHeader:{type:[Boolean],default:!0},showFooter:{type:[Boolean],default:!0},showSearchbar:{type:[Boolean],default:!0},searchKey:{type:String,required:!1,default:"keyword"},seachPlaceholder:{type:String,required:!1},popClass:{type:String,required:!1},popCloseable:{type:Boolean,required:!1,default:!0}};function nm(e,o,l,n="value"){for(let a=0;a<o.length;a++){let r=o[a];if(n==="text"){if(to(e,r)===l)return a}else if(n==="item"){if(xe(l,r))return a}else if(ys(e,r)===l)return a}return-1}function to(e,o){return typeof e.textKey=="string"&&e.textKey.length>0?o[e.textKey]:o.text}function rr(e,o){return typeof e.subTextKey=="string"&&e.subTextKey.length>0?o[e.subTextKey]:o.text}function ys(e,o){return typeof e.valueKey=="string"&&e.valueKey.length>0?o[e.valueKey]:o.value}function lm(e,o){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?o[e.disabledKey]:o.disabled??null}function am(e,o,l){return typeof e.itemOptions=="function"?e.itemOptions(o,l):e.itemOptions}let rm=class{proxy;constructor(o){this.proxy=o}async load(o,l,n,a,r,s,i){if(Array.isArray(l)){let d=l;typeof i=="function"&&(d=d.filter(i));let f=(n-1)*a,m=f+a;m>d.length&&(m=d.length);const h=d.slice(f,m);return{totalSize:d.length,page:h}}if(typeof l=="function")return await Reflect.apply(l,null,[n,a,r,s]);const c=Ge(this.proxy,o);return c===null?(console.error(`${o} component not found api function`),{totalSize:0,page:[]}):(Be(r)&&t.isReactive(r)&&(r=t.toRaw(r)),await Reflect.apply(c,null,[l,n,a,r]))}};function sm(){const e=t.getCurrentInstance();return new rm(e.proxy)}const{componentName:im,create:cm,scope:um}=X("infinite-loading"),dm=cm({props:{modelValue:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!0},threshold:{type:Number,default:200},loadText:{type:String},loadMoreText:{type:String},useCapture:{type:Boolean,default:!1}},emits:["scroll-change","load-more","update:modelValue"],components:{Loading:te.Loading},setup(e,{emit:o,slots:l}){const{toLocaleRefs:n}=ae.useFoxI18n(um),a=n(e,["pullText","loadText","loadMoreText"]),r=t.ref(),s=ls(r),i=t.reactive({beforeScrollTop:0,isInfiniting:!1,y:0,x:0,distance:0}),c=t.computed(()=>({[im]:!0})),d=v=>v?v.offsetTop+d(v.offsetParent):0,f=()=>{let v=0,b=0,u="down";if(s.value==window){const p=In();r.value&&(v=d(r.value)+r.value.offsetHeight-p-window.innerHeight),b=p}else{const{scrollHeight:p,clientHeight:k,scrollTop:S}=s.value;v=p-k-S,b=S}return i.beforeScrollTop>b?u="up":u="down",i.beforeScrollTop=b,o("scroll-change",b),v<=e.threshold&&u=="down"},m=()=>{je(()=>{if(!f()||!e.hasMore||i.isInfiniting)return!1;i.isInfiniting=!0,o("update:modelValue",!0),t.nextTick(()=>o("load-more"))})},h=()=>{s.value&&s.value.addEventListener("scroll",m,e.useCapture)},y=()=>{s.value&&s.value.removeEventListener("scroll",m,e.useCapture)};t.onMounted(()=>{h()}),t.onUnmounted(()=>{y()});const g=t.ref(!1);return t.onActivated(()=>{g.value&&(g.value=!1,h())}),t.onDeactivated(()=>{g.value=!0,y()}),t.watch(()=>e.modelValue,v=>{v||(i.isInfiniting=!1)}),{classes:c,scroller:r,...t.toRefs(i),slots:l,...a}}}),fm={class:"fox-infinite__container"},mm={class:"fox-infinite__bottom"},pm={key:0,class:"fox-infinite__bottom-box"},hm={class:"fox-infinite__bottom-box__text"},gm={class:"fox-infinite__bottom-tips"};function ym(e,o,l,n,a,r){const s=t.resolveComponent("Loading");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),ref:"scroller"},[t.createElementVNode("view",fm,[t.renderSlot(e.$slots,"default")]),t.createElementVNode("view",mm,[e.isInfiniting?(t.openBlock(),t.createElementBlock("view",pm,[t.renderSlot(e.$slots,"loading",{},()=>[t.renderSlot(e.$slots,"loading-icon",{},()=>[t.createVNode(s,{class:"fox-icon-loading fox-infinite__bottom-box__img"})]),t.createElementVNode("view",hm,t.toDisplayString(e.loadText),1)])])):e.hasMore?t.createCommentVNode("",!0):t.renderSlot(e.$slots,"finished",{key:1},()=>[t.createElementVNode("view",gm,t.toDisplayString(e.loadMoreText),1)])])],2)}const Ro=J(dm,[["render",ym]]),{componentName:vm,create:km}=X("button"),bm=km({components:{Loading:te.Loading},props:{color:String,shape:{type:String,default:"round"},plain:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{type:String,default:"default"},size:{type:String,default:"normal"},block:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:o,slots:l}){const{type:n,size:a,shape:r,disabled:s,loading:i,color:c,plain:d,block:f}=t.toRefs(e),m=g=>{!i.value&&!s.value&&o("click",g)},h=t.computed(()=>{const g=vm;return{[g]:!0,[`${g}--${n.value}`]:n.value,[`${g}--${a.value}`]:a.value,[`${g}--${r.value}`]:r.value,[`${g}--plain`]:d.value,[`${g}--block`]:f.value,[`${g}--disabled`]:s.value,[`${g}--loading`]:i.value}}),y=t.computed(()=>{const g={};return c?.value&&(d.value?(g.color=c.value,g.background="#fff",c.value?.includes("gradient")||(g.borderColor=c.value)):(g.color="#fff",g.background=c.value)),g});return{handleClick:m,classes:h,getStyle:y}}}),Sm={class:"fox-button__wrap"};function Cm(e,o,l,n,a,r){const s=t.resolveComponent("Loading");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.getStyle),onClick:o[0]||(o[0]=(...i)=>e.handleClick&&e.handleClick(...i))},[t.createElementVNode("view",Sm,[e.loading?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-icon-loading"})):t.createCommentVNode("",!0),e.$slots.icon&&!e.loading?t.renderSlot(e.$slots,"icon",{key:1}):t.createCommentVNode("",!0),e.$slots.default?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass({"fox-button__text":e.$slots.icon||e.loading})},[t.renderSlot(e.$slots,"default")],2)):t.createCommentVNode("",!0)])],6)}const Ie=J(bm,[["render",Cm]]),{create:wm,scope:Nm}=X("searchbar"),Bm=wm({props:{modelValue:{type:[String,Number],default:""},inputType:{type:String,default:"text"},label:{type:String,default:""},shape:{type:String,default:"round"},maxLength:{type:[String,Number],default:"9999"},placeholder:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:Object,default:()=>te.CircleClose},background:{type:String,default:""},inputBackground:{type:String,default:""},focusStyle:{type:Object,default:()=>({})},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inputAlign:{type:String,default:"left"}},emits:["change","update:modelValue","blur","focus","clear","search","click-input","click-left-icon","click-right-icon"],setup(e,{emit:o}){const{toLocaleRefs:l}=ae.useFoxI18n(Nm),n=l(e,["placeholder"]),a=t.reactive({active:!1}),r=t.computed(()=>({background:e.background})),s=t.computed(()=>({background:e.inputBackground})),i=p=>{let S=p.target.value;e.maxLength&&S.length>Number(e.maxLength)&&(S=S.slice(0,Number(e.maxLength))),o("update:modelValue",S,p),o("change",S,p)},c=t.ref({}),d=p=>{let S=p.target.value;a.active=!0,c.value=e.focusStyle,o("focus",S,p)},f=p=>{setTimeout(()=>{a.active=!1},0);let S=p.target.value;e.maxLength&&S.length>Number(e.maxLength)&&(S=S.slice(0,Number(e.maxLength))),c.value={},o("blur",S,p)},m=p=>{o("update:modelValue","",p),o("change","",p),o("clear","")},h=()=>{o("search",e.modelValue)},y=p=>{o("click-input",p)},g=p=>{o("click-left-icon",e.modelValue,p)},v=p=>{o("click-right-icon",e.modelValue,p)},b=t.computed(()=>({textAlign:e.inputAlign})),u=t.ref(null);return t.onMounted(()=>{e.autofocus&&u.value.focus()}),{...n,inputsearch:u,...t.toRefs(a),valueChange:i,valueFocus:d,valueBlur:f,handleClear:m,handleSubmit:h,searchbarStyle:r,inputSearchbarStyle:s,focusCss:c,clickInput:y,leftIconClick:g,rightIconClick:v,styleSearchbar:b}}}),Vm={key:0,class:"fox-searchbar__search-label"},Am={key:1,class:"fox-searchbar__search-icon fox-searchbar__left-search-icon"},Tm=["type","maxlength","placeholder","value","disabled","readonly"],$m={key:1,class:"fox-searchbar__search-icon fox-searchbar__iptright-search-icon"},Em={key:2,class:"fox-searchbar__search-icon fox-searchbar__right-search-icon"};function Dm(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:"fox-searchbar",style:t.normalizeStyle(e.searchbarStyle)},[e.label?(t.openBlock(),t.createElementBlock("span",Vm,t.toDisplayString(e.label),1)):t.createCommentVNode("",!0),e.$slots.leftout?(t.openBlock(),t.createElementBlock("view",Am,[t.renderSlot(e.$slots,"leftout")])):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(["fox-searchbar__search-input",e.shape]),style:t.normalizeStyle({...e.inputSearchbarStyle,...e.focusCss})},[e.$slots.leftin?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-searchbar__search-icon fox-searchbar__iptleft-search-icon",onClick:o[0]||(o[0]=(...s)=>e.leftIconClick&&e.leftIconClick(...s))},[t.renderSlot(e.$slots,"leftin")])):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(["fox-searchbar__input-inner",e.$slots.rightin&&"fox-searchbar__input-inner-absolute"])},[t.createElementVNode("form",{class:"fox-searchbar__input-form",action:"#",onSubmit:o[5]||(o[5]=t.withModifiers((...s)=>e.handleSubmit&&e.handleSubmit(...s),["prevent"]))},[t.createElementVNode("input",{ref:"inputsearch",class:t.normalizeClass(["fox-searchbar__input-bar",e.clearable&&"fox-searchbar__input-bar_clear"]),type:e.inputType,maxlength:e.maxLength,placeholder:e.placeholder,value:e.modelValue,disabled:e.disabled,readonly:e.readonly,onClick:o[1]||(o[1]=(...s)=>e.clickInput&&e.clickInput(...s)),onInput:o[2]||(o[2]=(...s)=>e.valueChange&&e.valueChange(...s)),onFocus:o[3]||(o[3]=(...s)=>e.valueFocus&&e.valueFocus(...s)),onBlur:o[4]||(o[4]=(...s)=>e.valueBlur&&e.valueBlur(...s)),style:t.normalizeStyle(e.styleSearchbar)},null,46,Tm)],32)],2),t.createElementVNode("view",{class:t.normalizeClass(["fox-searchbar__input-inner-icon",e.$slots.rightin&&"fox-searchbar__input-inner-icon-absolute"])},[e.clearable?t.withDirectives((t.openBlock(),t.createElementBlock("view",{key:0,onClick:o[6]||(o[6]=(...s)=>e.handleClear&&e.handleClear(...s)),class:"fox-searchbar__search-icon fox-searchbar__input-clear"},[e.$slots["clear-icon"]?t.renderSlot(e.$slots,"clear-icon",{key:0}):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.clearIcon),{key:1}))],512)),[[t.vShow,String(e.modelValue).length>0]]):t.createCommentVNode("",!0),e.$slots.rightin?(t.openBlock(),t.createElementBlock("view",$m,[t.renderSlot(e.$slots,"rightin")])):t.createCommentVNode("",!0)],2)],6),e.$slots.rightout?(t.openBlock(),t.createElementBlock("view",Em,[t.renderSlot(e.$slots,"rightout")])):t.createCommentVNode("",!0)],4)}const Fo=J(Bm,[["render",Dm]]);function xm(e,o,l){return{props:{...Bn},emits:["change","update:modelValue","update:text","loaded-data","update:visible"],setup(n,{emit:a,slots:r}){const{toLocaleRefs:s}=ae.useFoxI18n(o),i=s(n,["title","loadText","loadMoreText","seachPlaceholder","confirmText"]),c=sm(),d=t.ref([]),f=t.ref(1),m=t.ref(""),h=t.shallowRef(null),y=t.computed(()=>{const U={};return n.params&&Object.assign(U,n.params),ie(m.value)||(U[`${n.searchKey}`]=m.value),h.value&&Object.assign(U,h.value),U});let g=!0;const v=async(U,P,z)=>{try{let j=null;ie(m.value)||(j=F=>{const I=to(n,F);if(typeof I=="string"&&I.includes(m.value))return!0;const K=rr(n,F);return!!(typeof K=="string"&&K.includes(m.value))});const q=await c.load("actionsheet",U,P,z,y.value,g,j??void 0);g=!1,Array.isArray(q)?(d.value=q,L.value=!1,f.value=1):q.page.length===0?L.value=!1:(Reflect.apply([].push,d.value,q.page),d.value.length>=q.totalSize?L.value=!1:f.value=d.value.length/n.pageSize),M.value=!1}catch(j){console.error("[FoxUI] Load ActionSheet Data Fail",j),d.value=[]}setTimeout(()=>{a("loaded-data")},250)};t.watch([()=>n.source,()=>n.pageSize,()=>n.params],async([U,P,z])=>{n.source&&v(n.source,f.value,P)},{immediate:!0});const b=t.computed(()=>!n.multiple&&n.isAutoBackFill),u=t.ref([]);let p=null;const k=t.ref(n.visible);t.watch(()=>n.visible,U=>{k.value!==U&&(k.value=U),U?p=[...u.value]:p=null});const S=(U,P)=>{const z=[];return Array.isArray(U)||(U=[U]),U.forEach(j=>{let q=nm(n,P,j,n.valueType);q!==-1&&z.push(q)}),xe(z,u.value)?!1:(u.value=z,!0)};t.watch([()=>n.modelValue,()=>d.value],([U,P],[z,j])=>{S(U,P)&&w()},{deep:!0});const w=()=>{const U=[],P=[],z=[];for(let j of u.value){const q=d.value[j];P.push(q);const F=to(n,q);if(z.push(F),n.valueType==="item")U.push(q);else if(n.valueType==="text")U.push(F);else{const I=ys(n,q);U.push(I)}}n.multiple?(a("update:modelValue",U),a("update:text",z),a("change",U,P)):(a("update:modelValue",U[0]??null),a("update:text",z[0]??null),a("change",U[0],P[0]??null))},N=()=>{p&&(u.value=p)},T=U=>{const P=u.value.indexOf(U);n.multiple?P===-1?u.value.push(U):u.value.splice(P,1):P===-1?u.value=[U]:u.value=[],(b.value||!n.poppable&&!n.showFooter)&&(w(),B(!1))},B=U=>{k.value=U,a("update:visible",U)},D=()=>{N(),B(!1)},C=()=>{B(!1),w()},V=()=>{d.value=[],f.value=1,n.source&&v(n.source,f.value,n.pageSize)},M=t.ref(!1),L=t.ref(!0),$=async()=>{if(!n.source){M.value=!1;return}await v(n.source,f.value,n.pageSize)};t.watch(()=>m.value,(U,P)=>{ie(U)&&!ie(P)&&$()});const E=()=>{let U=i.title.value??"";r.title&&(U=r.title());const P=t.h("view",{class:["fox-actionsheet__header-title"]},[U]),z=t.h(te.Close,{class:["fox-actionsheet__header-icon"],onClick:D});return t.h("view",{class:["fox-actionsheet__header"]},[P,z])},x=()=>{let U=null;if(r.search)U=r.search();else{const P={onSearch:V,placeholder:i.seachPlaceholder.value,disabled:n.disabled,modelValue:m.value,"onUpdate:modelValue":z=>{m.value=z}};U=t.h(Fo,P,{leftin:()=>t.h(te.Search2)})}return t.h("view",{class:["fox-actionsheet__searchbar"]},[U])},A=(U,P,z,j,q)=>{if(r.optionLabel)return r.optionLabel({text:U,checked:P,disabled:z,subText:j,item:q});const F=[],I=t.h("view",{class:"fox-actionsheet__list-item-text"},[U]);if(F.push(I),j){const K=t.h("view",{class:"fox-actionsheet__list-item-subtext"},[j]);F.push(K)}return t.h("view",{class:["fox-actionsheet__list-item-label"]},F)},H=(U,P,z,j)=>{if(r.optionIcon)return r.optionIcon({checked:U,disabled:P,iconSize:z,item:j});if(U){if(r.checkedIcon)return r.checkedIcon({disabled:P,item:j});{const q=n.checkedIcon??te.Checked;return t.h(q,{width:z,height:z,class:["fox-actionsheet__list-item-icon"]})}}else{if(r.icon)return r.icon({disabled:P,item:j});{const q=n.icon??te.CheckNormal;return t.h(q,{width:z,height:z,class:["fox-actionsheet__list-item-icon"]})}}},R=()=>{const U=[];for(let P=0;P<d.value.length;P++){const z=d.value[P],j=to(n,z),q=rr(n,z),F=["fox-actionsheet__list-item"],I={};let K=lm(n,z),W=n.iconSize?se(n.iconSize):null;const Z=am(n,z,P);Z&&(K=K||Z.disabled,Z.class&&F.push(Z.class),Z.style&&Object.assign(I,Z.style)),K=!!(n.disabled||K);const O=u.value.includes(P);K&&F.push("is-disabled"),O&&F.push("is-checked");const G={class:F,style:I,key:`${P}`,onClick:()=>{K||T(P)}};let Q=[];if(r.option)Q.push(r.option({item:z,checked:O,disabled:K}));else{const _=A(j,O,K,q,z);Q.push(_);const oe=H(O,K,W,z);Q.push(oe)}const ee=t.h("view",G,Q);U.push(ee)}return U},Y=()=>{let U=[];if(r.buttons)U=r.buttons();else{const z=t.h(Ie,{type:"primary",block:"block",onClick:C,disabled:n.disabled},{default:()=>i.confirmText.value});U.push(z)}return t.h("view",{class:"fox-actionsheet__footer"},[U])};return Te({search:async(U=null,P=!0)=>{h.value=U&&t.toRaw(U),t.triggerRef(h),P&&(d.value=[],f.value=1),t.nextTick(()=>{$()})},clear:()=>{d.value=[],f.value=1},confirm:()=>{C()},cancel:()=>{D()}}),()=>{const U=[];if(n.showHeader){const W=E();U.push(W)}if(n.showSearchbar){const W=x();U.push(W)}let P=null;if(r.content)P=r.content();else{const W=R(),Z={hasMore:L.value,loadText:i.loadText.value,loadMoreText:i.loadMoreText.value,modelValue:M.value,"onUpdate:modelValue":O=>{M.value=O},onLoadMore:$};P=t.h(Ro,Z,{default:()=>W})}const z={};n.optionsHeight&&(z.height=n.optionsHeight);const j={"fox-actionsheet__list":!0};n.poppable||(j["fox-actionsheet__list--inner"]=!0);const q=t.h("view",{class:j,style:z},[P]);if(U.push(q),n.showFooter&&!b.value){const W=Y();U.push(W)}const F=t.h("view",{class:"fox-actionsheet"},U);if(!n.poppable)return F;const I=["fox-actionsheet__popup"];n.popClass&&I.push(n.popClass);const K={popClass:I.join(" "),visible:k.value,closeable:!1,"onUpdate:visible":B,position:n.position,round:"round",onClickOverlay:D,closeOnClickOverlay:n.closeOnClickOverlay};return t.h(ce,K,{default:()=>F})}}}}const{componentName:Im,create:qm,scope:Mm}=X("actionsheet-pane"),Oo=qm(xm(Im,Mm)),zm={type:{type:String,default:"text"},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},text:{type:String},actionSheetClass:{type:String},separator:{type:[String],required:!1,defualt:" "}};function Lm(e,o,l,n,a,r,s){return{props:{...ue,...de,...zm,...Bn},emits:["change","update:modelValue","blur","focus","clear","update:text"],setup(i,c){const d=Ce(t.computed(()=>i.disabled)),f=Ae(t.computed(()=>i.readonly)),{emitEvent:m}=we({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus"],get validate(){return!d.value&&!f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ae.useFoxI18n(o),y=h(i,["placeholder"]),g=t.ref(!1),v=Ee(i,"modelValue"),b=t.ref(""),u=t.computed(()=>Array.isArray(b.value)?b.value.join(i.separator):b.value),p="fox-input-item",k=t.computed(()=>({[p]:!0,[`${p}__disabled`]:d.value})),S=Ne(t.computed(()=>i.textAlign),"textAlign"),w=t.computed(()=>{const q={};return S.value&&(q["text-align"]=S.value),q}),N=t.ref(!1),T=()=>{N.value=!0},B=q=>{N.value=q},D=q=>{v.value=q,m("update:modelValue",q)},C=(q,F)=>{m("change",q,F)},V=q=>{let I=q.target.value;g.value=!0,m("focus",I,q)},M=q=>{setTimeout(()=>{g.value=!1},0);let I=q.target.value;i.maxLength&&I.length>Number(i.maxLength)&&(I=I.slice(0,Number(i.maxLength))),m("blur",I,q)},L=q=>{b.value=q,m("update:text",q)},$=t.computed(()=>({[`${p}__append`]:!0})),E=t.computed(()=>ge(i.unit)>0),x=t.computed(()=>ge(i.unit)>0&&!g.value),A=t.computed(()=>({hidden:!x.value})),H=q=>{v.value="",m("update:modelValue","",q),m("change","",q),m("clear","")},R=t.computed(()=>i.clearable&&!d.value&&!f.value),Y=t.computed(()=>ge(v.value)>0&&g.value),U=q=>{Y.value?H(q):T()},P=t.computed(()=>Y.value&&R.value?n:a),z=t.computed(()=>({action:!0})),j=t.ref(null);return Te({search:q=>{j.value&&j.value.search(q)},clear:()=>{j.value&&j.value.clear},confirm:q=>{j.value&&j.value.confirm()},cancel:()=>{j.value&&j.value.cancel()}}),()=>{const q={class:k.value,style:w.value,type:"text",maxlength:i.maxLength,placeholder:y.placeholder.value,readonly:!0,unselectable:"on",value:u.value,onClick:T,onFocus:V,onBlur:M};s&&(q.disabled=!0);const F=[],I=t.h("input",q);F.push(I);const K=[],W={class:["action-icon"]},Z=t.h(P.value,W),O={class:z.value,onClick:U},G=t.h("view",O,{default:()=>[Z]});if(K.push(G),E.value){const Ze=t.h("view",{class:A.value},[i.unit]);K.push(Ze)}const Q={class:$.value},ee=t.h("view",Q,{default:()=>K});F.push(ee);const _={default:()=>F};_.label=c.slots.default,_.prepend=c.slots.prepend,_.append=c.slots.append,_.fixedPreTip=c.slots.fixedPreTip,_.fixedTip=c.slots.fixedTip;const oe=he(i,Bn);oe.ref=j,oe.class=i.actionsheetProps,oe.disabled=d.value||f.value,oe.visible=N.value,oe["onUpdate:visible"]=B,oe.modelValue=v.value,oe["onUpdate:modelValue"]=D,oe.text=b.value,oe["onUpdate:text"]=L,oe.onChange=C,oe.poppable=!0;const le={title:c.slots.title,search:c.slots.search,option:c.slots.option,optionLabel:c.slots.optionLabel,optionIcon:c.slots.optionIcon,buttons:c.slots.buttons},$e=t.h(r,oe,le);_.hide=()=>[$e];const ve=he(i,de,ue);return t.h(l,ve,_)}}}}const{componentName:Pm,create:Rm,scope:Fm}=X("actionsheet-item"),al=Rm(Lm(Pm,Fm,be,te.CircleClose,te.ArrowRight,Oo)),Vn={modelValue:{type:[Number,String],default:0},inputWidth:{type:[Number,String],default:""},buttonSize:{type:[Number,String],default:""},min:{type:[Number,String],default:1},max:{type:[Number,String],default:9999},step:{type:[Number,String],default:1},decimalPlaces:{type:[Number,String],default:0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},{componentName:Om,create:Km}=X("input-number"),Um=Km({components:{Minus:te.Minus,Plus:te.Plus},props:{...Vn},emits:["update:modelValue","change","blur","focus","reduce","add","overlimit"],setup(e,{emit:o}){const l=t.computed(()=>{const y=Om;return{[y]:!0,[`${y}--disabled`]:e.disabled}}),n=y=>Number(y).toFixed(Number(e.decimalPlaces)),a=y=>{const g=y.target;o("update:modelValue",g.valueAsNumber,y)},r=(y,g)=>{let v=n(y);o("update:modelValue",v,g),o("change",v,g)},s=(y=Number(e.modelValue))=>y<Number(e.max)&&!e.disabled,i=(y=Number(e.modelValue))=>y>Number(e.min)&&!e.disabled,c=y=>{if(o("reduce",y),i()){let g=Number(e.modelValue)-Number(e.step);r(g,y)}else o("overlimit",y,"reduce")},d=y=>{if(o("add",y),s()){let g=Number(e.modelValue)+Number(e.step);r(g,y)}else o("overlimit",y,"add")},f=y=>{e.disabled||e.readonly||o("focus",y)},m=y=>{if(e.disabled||e.readonly)return;let v=y.target.valueAsNumber;v<Number(e.min)?v=Number(e.min):v>Number(e.max)&&(v=Number(e.max)),r(v,y),o("blur",y)},h=y=>{let g=Number(y);return g<Number(e.min)?g=Number(e.min):g>Number(e.max)&&(g=Number(e.max)),g};return t.watch(()=>[e.max,e.min],()=>{Number(e.min)>Number(e.max)&&console.warn("[FoxUI] <InputNumber>","props.max < props.min");const y=h(e.modelValue);y!==Number(e.modelValue)&&r(y,{})}),{classes:l,change:a,blur:m,focus:f,add:d,addAllow:s,reduce:c,reduceAllow:i,toPxDesc:fe}}}),Hm=["min","max","disabled","readonly","value"];function jm(e,o,l,n,a,r){const s=t.resolveComponent("Minus"),i=t.resolveComponent("Plus");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createElementVNode("view",{class:t.normalizeClass(["fox-input-number__icon fox-input-number__left",{"fox-input-number__icon--disabled":!e.reduceAllow()}]),onClick:o[0]||(o[0]=(...c)=>e.reduce&&e.reduce(...c))},[t.renderSlot(e.$slots,"left-icon",{},()=>[t.createVNode(s,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2),t.createElementVNode("input",{type:"number",min:e.min,max:e.max,style:t.normalizeStyle({width:e.toPxDesc(e.inputWidth),height:e.toPxDesc(e.buttonSize)}),disabled:e.disabled,readonly:e.readonly,value:e.modelValue,onInput:o[1]||(o[1]=(...c)=>e.change&&e.change(...c)),onBlur:o[2]||(o[2]=(...c)=>e.blur&&e.blur(...c)),onFocus:o[3]||(o[3]=(...c)=>e.focus&&e.focus(...c))},null,44,Hm),t.createElementVNode("view",{class:t.normalizeClass(["fox-input-number__icon fox-input-number__right",{"fox-input-number__icon--disabled":!e.addAllow()}]),onClick:o[4]||(o[4]=(...c)=>e.add&&e.add(...c))},[t.renderSlot(e.$slots,"right-icon",{},()=>[t.createVNode(i,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2)],2)}const Qe=J(Um,[["render",jm]]);function Wm(e,o,l,n){return{props:{...ue,...de,...Vn},emits:["change","update:modelValue"],setup(a,r){const s=Ce(t.computed(()=>a.disabled)),i=Ae(t.computed(()=>a.readonly)),{emitEvent:c}=we({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus"],get validate(){return!s.value&&!i.value}},a.prop??r.attrs.name),d=e,f=Ee(a,"modelValue"),m=h=>{f.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const h={"left-icon":r.slots["left-icon"],"right-icon":r.slots["right-icon"]},g={...he(a,Vn),disabled:s.value,readonly:i.value,value:f.value,"onUpdate:modelValue":m},v=t.h(n,g,h),b=[];b.push(v);const u={default:()=>b};u.label=r.slots.default,u.fixedPreTip=r.slots.fixedPreTip,u.fixedTip=r.slots.fixedTip;const p=he(a,de,ue);return p["content-class"]=d,t.h(l,p,u)}}}}const{componentName:Ym,create:Xm,scope:Qm}=X("inputnumber-item"),rl=Xm(Wm(Ym,Qm,be,Qe)),{create:Gm,componentName:Gt,scope:MB}=X("tabs-bar"),Zm=Gm({components:{MoreH:te.MoreH},props:{modelValue:{type:[String,Number],default:0},data:{type:[Array]},textKey:{type:String,default:"text"},valueKey:{type:String,default:"value"},visibleKey:{type:String,default:"visibile"},disabledKey:{type:String,default:"disabled"},direction:{type:String,default:"horizontal"},size:{type:String,default:"normal"},shape:{type:String},align:{type:String},markShape:{type:String,default:"line"},scroll:{type:Boolean,default:!1},ellipsis:{type:Boolean,default:!0},animatedTime:{type:[Number,String],default:300},gutter:{type:[Number,String],default:0},itemOptions:{type:Object},showQuickNavigation:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(e,{slots:o,emit:l}){const n=t.computed(()=>{const x={};return x[`${Gt}`]=!0,x}),a=t.computed(()=>{const x={};return x[`${Gt}__titles`]=!0,x[`${e.direction}`]=!0,e.align==="left"&&(x.left=!0),e.scroll===!0&&(x.scrollable=!0),e.shape&&(x[`${e.shape}`]=!0),x}),r=t.computed(()=>({})),s=t.computed(()=>{if(!e.gutter)return 0;const x=se(e.gutter);return x<=0?0:x}),i=t.ref(e.modelValue);t.watch(()=>e.modelValue,x=>{i.value!==x&&(i.value=x,E(!1))});const c=t.ref({"fox-tabs-bar__popup":!0,"fox-tabs-bar__popup--show":!1,"fox-tabs-bar__popup--hide":!1}),d=t.ref(),f=t.ref(!1),m=()=>{const x=!f.value;h(x)},h=x=>{const A=x;A?(f.value=A,setTimeout(()=>{c.value["fox-tabs-bar__popup--show"]=!0,c.value["fox-tabs-bar__popup--hide"]=!1},0)):(c.value["fox-tabs-bar__popup--show"]=!1,c.value["fox-tabs-bar__popup--hide"]=!0,d.value?d.value.addEventListener("transitionend",()=>{f.value=!1},{once:!0}):setTimeout(()=>{f.value=!1},0))},y=t.ref(),g=t.ref([]),v=(x,A)=>{g.value[A]=x},b=x=>A=>{v(A,x)},u=(x,A)=>{const H=y.value,R=g.value;if(!H||!R||!R[x])return;const Y=R[x];let U=0;e.direction==="vertical"?U=Y.offsetTop-(H.offsetHeight-Y.offsetHeight)/2:U=Y.offsetLeft-(H.offsetWidth-Y.offsetWidth)/2,p(H,U,A?0:.3,e.direction)},p=(x,A,H,R)=>{let Y=0;const U=R==="horizontal"?x.scrollLeft:x.scrollTop,P=H===0?1:Math.round(H*1e3/16);function z(){R==="horizontal"?x.scrollLeft+=(A-U)/P:x.scrollTop+=(A-U)/P,++Y<P&&Le(z)}z()},k=x=>x[e.textKey],S=x=>x[e.valueKey],w=x=>x[e.visibleKey],N=x=>x[e.disabledKey],T=(x,A)=>{const H=e.itemOptions;return typeof H=="function"?H(x,A):H||null},B=(x,A)=>{const H=S(x),R={};R[`${Gt}__titles-item`]=!0,R.disabled=N(x),R.active=H===i.value,e.shape&&(R[`${e.shape}`]=!0),e.ellipsis&&(R.ellipsis=!0);const Y=T(x,A);return Y&&(Y.class&&(R[`${Y.class}`]=!0),Y.disabled===!0&&(R.disabled=Y.disabled)),R},D=(x,A)=>{const H={};if(s.value>0){const Y=Math.abs(s.value/2);e.direction==="vertical"?(H["margin-top"]=`${Y}px`,H["margin-bottom"]=`${Y}px`):(H["margin-left"]=`${Y}px`,H["margin-right"]=`${Y}px`)}const R=T(x,A);return R&&R.style&&Object.assign(H,R.style),H},C=(x,A)=>`${S(x)??A}`,V=(x,A)=>{const H=S(x),R={};R[`${Gt}__popup-item`]=!0,R.disabled=N(x),R.active=H===i.value,e.shape&&(R[`${e.shape}`]=!0);const Y=T(x,A);return Y&&Y.disabled===!0&&(R.disabled=Y.disabled),R},M=t.computed(()=>(e.data??[]).filter(A=>w(A)!==!1)),L=(x,A)=>{const H=S(x);i.value=H,e.scroll&&u(A,!1),l("update:modelValue",H),l("change",x,A)},$=(x,A)=>{L(x,A),h(!1)},E=x=>{if(!Array.isArray(e.data)||!e.scroll)return;const A=e.data.findIndex(H=>S(H)===i.value);A!==-1&&u(A,x)};return t.watch(()=>e.data,()=>{setTimeout(E,0)}),t.onMounted(()=>{E(!0)}),{classes:n,titlesClasses:a,titlesStyles:r,itemClasses:B,itemStyles:D,itemKey:C,popupItemClasses:V,filterTabItems:M,getItemText:k,getItemValue:S,onTabChange:L,titlesRef:y,createItemRefs:b,togglePopupVisible:m,onQuickNavigate:$,popupClasses:c,popupVisible:f,popupRef:d}}}),Jm={class:"fox-tabs-bar"},_m=["onClick"],ep={class:"fox-tabs-bar__titles-item-text"},tp=t.createElementVNode("view",{class:"fox-tabs-bar__titles-item-line"},null,-1),op=["onClick"];function np(e,o,l,n,a,r){const s=t.resolveComponent("MoreH");return t.openBlock(),t.createElementBlock("view",Jm,[t.createElementVNode("view",{ref:"titlesRef",class:t.normalizeClass(e.titlesClasses),style:t.normalizeStyle(e.titlesStyles)},[t.renderSlot(e.$slots,"default",{},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filterTabItems,(i,c)=>(t.openBlock(),t.createElementBlock("view",{ref_for:!0,ref:e.createItemRefs(c),class:t.normalizeClass(e.itemClasses(i,c)),style:t.normalizeStyle(e.itemStyles(i,c)),key:e.itemKey(i),onClick:d=>e.onTabChange(i,c)},[t.renderSlot(e.$slots,"item",{item:i,index:c},()=>[t.createElementVNode("view",ep,t.toDisplayString(e.getItemText(i)),1),tp])],14,_m))),128))])],6),e.showQuickNavigation?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-tabs-bar__navigation",onClick:o[0]||(o[0]=(...i)=>e.togglePopupVisible&&e.togglePopupVisible(...i))},[t.renderSlot(e.$slots,"navigation",{},()=>[t.createVNode(s)])])):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("view",{ref:"popupRef",class:t.normalizeClass(e.popupClasses)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filterTabItems,(i,c)=>(t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.popupItemClasses(i,c)),key:e.itemKey(i),onClick:d=>e.onQuickNavigate(i,c)},[t.renderSlot(e.$slots,"popup-item",{item:i,index:c},()=>[t.createTextVNode(t.toDisplayString(e.getItemText(i)),1)])],10,op))),128))],2),[[t.vShow,e.popupVisible]])])}const sl=J(Zm,[["render",np]]),vs=Symbol("TabsStatesKey"),{create:lp}=X("tabs-container"),ap=lp({props:{modelValue:{type:[String,Number]},direction:{type:[String],default:"horizontal"}},emits:["update:modelValue","change"],setup(e,{emit:o}){const l=t.shallowRef([]),n={current:t.ref(e.modelValue??""),direction:t.ref(e.direction),tabWidth:t.ref(-1),tabHeight:t.ref(-1),add:f=>{const m={name:f};n.current.value===f&&(m.loaded=!0),l.value.push(m),t.triggerRef(l)},remove:f=>{const m=l.value.findIndex(h=>h.name===f);m!==-1&&l.value.splice(m,1)},isLoaded:f=>{const m=l.value.findIndex(h=>h.name===f);return m!==-1?n.current.value?l.value[m].loaded??!1:m===0:!1}};t.provide(vs,n);const a=f=>{const m=l.value.findIndex(h=>h.name===f);m!==-1&&(l.value[m].loaded=!0,t.triggerRef(l))};t.watch([()=>e.modelValue,()=>e.direction],([f,m])=>{n.current.value!==f&&(n.current.value=f??"",a(f??"")),n.direction.value!==m&&(n.direction.value=m)});const r=t.ref(null),s=t.ref(null),i=t.computed(()=>({"fox-tabs-container":!0,[`${e.direction}`]:!0})),c=t.computed(()=>{const f={},m=l.value.length;if(m<=0)return f;const h=l.value.findIndex(y=>y.name===n.current.value);return n.direction.value==="vertical"?n.tabHeight.value>0&&(f.height=`${m*n.tabHeight.value}px`,h!==-1&&(f.transform=`translate(0, -${h*n.tabHeight.value}px)`)):n.tabWidth.value>0&&(f.width=`${m*n.tabWidth.value}px`,h!==-1&&(f.transform=`translate(-${h*n.tabWidth.value}px, 0)`)),f});let d=null;return t.onMounted(()=>{if(!r.value)return;const f=()=>{const m=wo(r.value);n.tabWidth.value=m.width,n.tabHeight.value=m.height};window.ResizeObserver&&(d=new window.ResizeObserver(f),d.observe(r.value)),f()}),t.onBeforeUnmount(()=>{d&&(d.disconnect(),d=null)}),{tabsRef:r,panesRef:s,classes:i,panesStyles:c}}});function rp(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),ref:"tabsRef"},[t.createElementVNode("view",{class:"fox-tabs-container__panes",style:t.normalizeStyle(e.panesStyles),ref:"panesRef"},[t.renderSlot(e.$slots,"default")],4)],2)}const il=J(ap,[["render",rp]]),{create:sp}=X("tabs-pane"),ip=sp({components:{Loading:te.Loading},props:{paneKey:{type:[String,Number],required:!0},loaded:{type:[Boolean,String],default:null}},setup(e,{emit:o}){const l=t.inject(vs);t.onMounted(()=>{l.add(e.paneKey)}),t.onBeforeUnmount(()=>{l.remove(e.paneKey)});const n=t.computed(()=>{const r={};return l.direction.value==="vertical"&&l.tabHeight.value>0?r.height=`${l.tabHeight.value}px`:l.tabWidth.value>0&&(r.width=`${l.tabWidth.value}px`),r}),a=t.computed(()=>e.loaded!=null?pe(e.loaded):l.isLoaded(e.paneKey));return{styles:n,isLoaded:a}}}),cp={class:"fox-tabs-pane__empty"},up=t.createElementVNode("view",{class:"fox-tabs-pane__empty-text"},"loading",-1);function dp(e,o,l,n,a,r){const s=t.resolveComponent("Loading");return t.openBlock(),t.createElementBlock("view",{class:"fox-tabs-pane",style:t.normalizeStyle(e.styles)},[e.isLoaded?t.renderSlot(e.$slots,"default",{key:0}):t.renderSlot(e.$slots,"empty",{key:1},()=>[t.createElementVNode("view",cp,[t.createVNode(s,{class:"fox-tabs-pane__empty-icon"}),up])])],4)}const cl=J(ip,[["render",dp]]),fp={direction:{type:[String],default:"horizontal"},mode:{type:[String]},modelValue:{type:[Number,Boolean,String]},disabled:{type:[Boolean,String],required:!1},data:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},visibleKey:{type:String,required:!1,default:"visible"},statusKey:{type:String,required:!1,default:"status"},itemOptions:{type:[Object,Function],required:!1},step:{type:[Boolean,String]},clickNavigatePolicy:{type:[String]},icon:{type:[String]},iconSize:{type:[String,Number]},markIcon:{type:[String]},markIconSize:{type:[String,Number]},layout:{type:[Array],default:()=>["head","main","sub"]},scroll:{type:[Boolean]}};function mp(e,o){return typeof e.textKey=="string"&&e.textKey.length>0?o[e.textKey]:o.text}function sr(e,o){return typeof e.valueKey=="string"&&e.valueKey.length>0?o[e.valueKey]:o.value}function ir(e,o){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?o[e.disabledKey]:o.disabled??null}function pp(e,o){return typeof e.visibleKey=="string"&&e.visibleKey.length>0?o[e.visibleKey]:o.visible??null}function Jo(e,o){return typeof e.statusKey=="string"&&e.statusKey.length>0?o[e.statusKey]:o.statusKey??null}function _o(e,o,l){return typeof e.itemOptions=="function"?e.itemOptions(o,l):e.itemOptions}let hp=class{proxy;constructor(o){this.proxy=o}async load(o,l,n){if(Array.isArray(l))return l;if(typeof l=="function")return await Reflect.apply(l,null,[n]);const a=Ge(this.proxy,o);return a===null?(console.error(`${o} component not found api function`),[]):(Be(n)&&t.isReactive(n)&&(n=t.toRaw(n)),await Reflect.apply(a,null,[l,n]))}};function gp(){const e=t.getCurrentInstance();return new hp(e.proxy)}function yp(e,o,l,n){return{props:{...fp},emits:["update:modelValue","change","loaded-data"],setup(a,{slots:r,emit:s}){const i=e,c=gp(),d=t.ref([]),f=t.computed(()=>d.value.filter(P=>pp(a,P)!==!1)),m=t.ref(-1),h=()=>{const P=a.modelValue,z=f.value.findIndex(j=>sr(a,j)===P);m.value!==z&&(m.value=z,a.scroll&&Y(z,!1))};t.watch([()=>a.modelValue,f],()=>{h()});const y=P=>m.value===P,g=P=>{if(P<0&&P>=f.value.length)return!1;const z=f.value[P],q=(_o(a,z,P)??{}).status??Jo(a,z);return y(P)||q},v=t.computed(()=>{const P={[i]:!0};return a.mode?P[`is-${a.mode}`]=!0:a.direction&&(P[`is-${a.direction}`]=!0),a.scroll&&(P["is-scroll"]=!0),P}),b=t.computed(()=>({})),u=(P,z,j,q)=>{const F={[`${i}__step`]:!0};return q&&(F[`${q}`]=!0),P===m.value?F["is-active"]=!0:z==="done"?F["is-done"]=!0:z==="error"?F["is-error"]=!0:z==="half"?F["is-half"]=!0:j?F["is-disabled"]=!0:F["is-normal"]=!0,F},p=(P,z={})=>{const j={...z};return P===f.value.length-1?j.flex="0 0 auto":a.step?a.direction==="vertical"?j.height=a.step:j.width=a.step:j.flex="1 1 100%",j},k=(P,z)=>{let j={};if(z<f.value.length-1){const q=z+1;g(z)&&g(q)?a.direction==="vertical"?j.height="100%":j.width="100%":j.opacity="0"}return j},S=P=>f.value.length-1===P,w=(P,z)=>{debugger;if(a.clickNavigatePolicy==="disabled"||(a.clickNavigatePolicy==="only-back"||a.clickNavigatePolicy==="only-back-reset")&&z>m.value||m.value===z)return;const j=m.value,q=z;m.value=z,a.scroll&&Y(z,!1);const F=sr(a,P);s("update:modelValue",F);const I={fromIndex:j,currentIndex:q,item:P,items:f.value,clickNavigatePolicy:a.clickNavigatePolicy};s("change",F,I)},N=t.ref(!0),T=async(P,z)=>{try{const j=await c.load("stesbar",P,z);Array.isArray(j)&&(d.value=j),N.value=!1}catch(j){console.error("[FoxUI] Load StepsBar Data Fail",j),d.value=[]}setTimeout(()=>{s("loaded-data")},250)};t.watch([()=>a.data,()=>a.params],async([P,z])=>{P&&T(P,z)},{immediate:!0});const B=(P,z,j,q)=>{let F=null;if(r.icon)F=r.icon({item:P,index:z,status:j});else if(j==="done"){const K={};a.iconSize&&(K.width=a.iconSize,K.height=a.iconSize);const W=a.icon??l;F=t.h(W,K)}else F=t.h("span",{},[`${z+1}`]);const I={class:"fox-steps-bar__icon",onClick:()=>{q||w(P,z)}};return t.h("view",I,[F])},D=(P,z,j)=>{const q=t.h("i",{class:"fox-steps-bar__line-inner",style:k(P,z)});return t.h("view",{class:"fox-steps-bar__line"},[q])},C=()=>{let P=null;if(r.markIcon)P=r.markIcon();else{const j={};a.iconSize&&(j.width=a.markIconSize,j.height=a.markIconSize);const q=a.markIcon??n;P=t.h(q,j)}return t.h("view",{class:"fox-steps-bar__mark"},[P])},V=(P,z,j,q)=>{const F=[];if(!S(z)){const W=D(P,z);F.push(W)}const I=B(P,z,j,q);F.push(I);const K={class:"fox-steps-bar__head"};return t.h("view",K,F)},M=(P,z,j,q)=>{let F=null;r.main?F=r.main({item:P,index:z,status:j}):F=mp(a,P);const I={class:"fox-steps-bar__main",onClick:()=>{q||w(P,z)}};return t.h("view",I,[F])},L=(P,z,j)=>{let q=null;if(r.sub){q=r.sub({item:P,index:z,status:j});const F={class:"fox-steps-bar__sub"};return t.h("view",F,[q])}return null},$=(P,z)=>{const j=_o(a,P,z)??{},q=j.status??Jo(a,P);let F=ir(a,P);j.disabled===!0&&(F=!0),a.disabled===!0&&(F=!0);const I=[],K=B(P,z,q,F);K&&I.push(K);const W=M(P,z,q,F);W&&I.push(W);const Z=D(P,z);Z&&I.push(Z);const O=t.h("view",{class:"fox-steps-bar__head"},I),G=j.class,Q=j.style??{},ee={ref:R(z),class:u(z,q,F,G),style:p(z,Q)};return t.h("view",ee,[O])},E=(P,z)=>{const j=_o(a,P,z)??{},q=j.status??Jo(a,P);let F=ir(a,P);j.disabled===!0&&(F=!0),a.disabled===!0&&(F=!0);const I=[],K=a.layout;for(let G of K)if(G==="head"){const Q=V(P,z,q,F);I.push(Q)}else if(G==="main"){const Q=M(P,z,q,F);I.push(Q)}else if(G==="sub"){const Q=L(P,z,q);I.push(Q)}else if(G==="mark"){const Q=C();I.push(Q)}const W=j.class,Z=j.style??{},O={ref:R(z),class:u(z,q,F,W),style:p(z,Z)};return t.h("view",O,I)},x=t.ref(),A=t.ref([]),H=(P,z)=>{A.value[z]=P},R=P=>z=>{H(z,P)},Y=(P,z)=>{const j=x.value,q=A.value;if(!j||!q||!q[P])return;const F=q[P];let I=0;a.direction==="vertical"?I=F.offsetTop-(j.offsetHeight-F.offsetHeight)/2:I=F.offsetLeft-(j.offsetWidth-F.offsetWidth)/2,U(j,I,z?0:.3,a.direction)},U=(P,z,j,q)=>{let F=0;const I=q==="horizontal"?P.scrollLeft:P.scrollTop,K=j===0?1:Math.round(j*1e3/16);function W(){q==="horizontal"?P.scrollLeft+=(z-I)/K:P.scrollTop+=(z-I)/K,++F<K&&Le(W)}W()};return()=>{const P=[];if(a.mode==="simple")for(let j=0;j<f.value.length;j++){const q=f.value[j],F=$(q,j);P.push(F)}else for(let j=0;j<f.value.length;j++){const q=f.value[j],F=E(q,j);P.push(F)}const z={ref:x,class:v.value,style:b.value};return t.h("view",z,P)}}}}const{componentName:vp,create:kp,scope:bp}=X("steps-bar"),ul=kp(yp(vp,bp,te.Checklist,te.ArrowRight)),cr=10;function Sp(e,o){return e>o&&e>cr?"horizontal":o>e&&o>cr?"vertical":""}function Cp(){const e={startX:0,startY:0,startTime:0,duration:0,moveX:0,moveY:0,deltaX:0,deltaY:0,offsetX:0,offsetY:0,direction:""},o=()=>e.direction==="vertical",l=()=>e.direction==="horizontal",n=()=>{e.deltaX=0,e.deltaY=0,e.offsetX=0,e.offsetY=0,e.direction="",e.startTime=0};return{move:s=>{if(s.touches){const i=s.touches[0];e.deltaX=i.clientX-e.startX,e.deltaY=i.clientY-e.startY,e.moveX=i.clientX,e.moveY=i.clientY}else e.deltaX=s.clientX-e.startX,e.deltaY=s.clientY-e.startY,e.moveX=s.clientX,e.moveY=s.clientY;e.offsetX=Math.abs(e.deltaX),e.offsetY=Math.abs(e.deltaY),e.duration=Date.now()-e.startTime,e.direction||(e.direction=Sp(e.offsetX,e.offsetY))},start:s=>{if(n(),s.touches){const i=s.touches[0];e.startX=i.clientX,e.startY=i.clientY}else e.startX=s.clientX,e.startY=s.clientY;e.startTime=Date.now()},reset:n,isVertical:o,isHorizontal:l,state:e}}function wp(){const e=window.navigator.userAgent;return"ontouchstart"in window||e.indexOf("touch")!==-1||e.indexOf("mobile")!==-1}function Np(e){e.stopPropagation()}function Bp(e,o){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),o&&Np(e)}class Vp{startMove;updateMove;isTouch=!1;els=null;moving=!1;touchstart=null;touchmove=null;touchend=null;constructor(o,l){this.startMove=o,this.updateMove=l,this.isTouch=wp()}open(o){Array.isArray(o)||(o=[o]),this.els=o;const l=Cp(),n=(a,r,s,i)=>{this.updateMove({x:a,y:r})};this.touchstart=a=>{this.moving||(l.start(a),this.startMove({x:l.state.startX,y:l.state.startY}),document.addEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),document.addEventListener(this.isTouch?"touchend":"mouseup",this.touchend),this.moving=!0)},this.touchmove=a=>{this.moving&&(l.move(a),Bp(a,!0),n(l.state.deltaX,l.state.deltaY))},this.touchend=()=>{n(l.state.deltaX,l.state.deltaY),this.touchmove&&document.removeEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),this.touchend&&document.removeEventListener(this.isTouch?"touchend":"mouseup",this.touchend),l.reset(),this.moving=!1},this.els.forEach(a=>{this.touchstart&&a.addEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)})}close(){Array.isArray(this.els)&&this.els.forEach(o=>{this.touchstart&&o.removeEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)}),this.els=null}}function Ap(e,o){return new Vp(e,o)}const Tp={top:{type:[String]},right:{type:[String]},bottom:{type:[String]},left:{type:[String]},width:{type:[String]},height:{type:[String]},color:{type:[String]},background:{type:[String]},draggable:{type:[Boolean]}},$p=(e,o,l,n=!1)=>({props:{...Tp},emits:["click"],setup(a,{slots:r,emit:s}){const i=t.reactive({top:a.top,right:a.right,bottom:a.bottom,left:a.left}),c=t.computed(()=>({[`${e}`]:!0})),d=t.computed(()=>{const p={};return ie(i.top)||(p.top=i.top),ie(i.right)||(p.right=i.right),ie(i.bottom)||(p.bottom=i.bottom),ie(i.left)||(p.left=i.left),ie(a.width)||(p.width=a.width),ie(a.height)||(p.height=a.height),ie(a.color)||(p.color=a.color),ie(a.background)||(p.background=a.background),p}),f=t.computed(()=>({[`${e}__icon`]:!0})),m=()=>{s("click")},h=t.ref(null),y=()=>{i.top=null,i.right=null,i.bottom=null,i.left=null},g={x:0,y:0},u=Ap(p=>{if(!h.value)return;const k=h.value;y(),i.left=k.offsetLeft,i.top=k.offsetTop,k.style.left=`${i.left}px`,k.style.top=`${i.top}px`,k.style.right=null,k.style.bottom=null,g.x=i.left,g.y=i.top},p=>{if(!h.value)return;const k=h.value;y(),i.left=g.x+p.x,i.top=g.y+p.y,k.style.left=`${i.left}px`,k.style.top=`${i.top}px`});return t.onMounted(()=>{if(a.draggable&&h.value){const p=[h.value];u.open(p)}}),t.onBeforeUnmount(()=>{a.draggable&&h.value&&u.close()}),()=>{let p=[];const k=typeof r.default=="function"?r.default():[];if(k&&k.length>0)p=k;else{const w=t.h(l,{class:f.value});p.push(w)}const S={ref:w=>{h.value=w},class:c.value,style:d.value,onClick:m};return t.h("view",S,p)}}}),{componentName:Ep,create:Dp,scope:xp}=X("floating-button"),dl=Dp($p(Ep,xp,te.Uploader,!1)),Ip={width:{type:[String,Number]},height:{type:[String,Number]},type:{type:[String],required:!1,default:"info"},icon:{type:[String,Object],required:!1},closeIcon:{type:[String,Object],required:!1},showClose:{type:[Boolean],required:!1},title:{type:[String],required:!1},message:{type:[Array,String,Object],required:!1},showConfirmButton:{type:[Boolean],required:!1},confirmButtonText:{type:[String],required:!1},confirmText:{type:[String],required:!1},confirmButtonClass:{type:[String],required:!1},confirmButtonStyle:{type:[Object],required:!1},showCancelButton:{type:[Boolean],required:!1},cancelButtonText:{type:[String],required:!1},cancelText:{type:[String],required:!1},cancelButtonClass:{type:[String],required:!1},cancelButtonStyle:{type:[Object],required:!1},popClass:{type:[String]},position:{type:[String],default:"center"},closeOnClickOverlay:{type:[Boolean],required:!1,default:!0},unmount:{type:[Function],required:!1},callback:{type:[Function],required:!1}},qp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0);function Mp(e,o,l){return{props:{...Ip},setup(n,{attrs:a,slots:r}){const{toLocaleRefs:s}=ae.useFoxI18n(o),i=s(n,["confirmText","cancelText"]),c=e,d=t.ref(!0),f=S=>{d.value=S},m=S=>{if(typeof n.unmount=="function")try{n.unmount()}catch(w){console.error(w)}if(typeof n.callback=="function")try{n.callback(S)}catch(w){console.error(w)}},h=()=>{m("confirm")},y=()=>{m("cancel")},g=()=>{m("close")},v=(S,w)=>qp(S)?(w.src=S,t.h("img",w)):typeof S=="string"?(Array.isArray(w.class)?w.class.push(S):w.class&&typeof w.class=="object"?w[`${S}`]=!0:typeof w.class=="string"?w.class=`${w.class}, ${S}`:w.class=S,t.h(n.tag,w)):t.h(S,w),b=()=>{const S=[];if(n.icon){const N={class:[`${c}__header-icon`]},T=v(n.icon,N);S.push(T)}if(n.title){const N=t.h("view",{class:`${c}__header-title`},[n.title]);S.push(N)}if(n.showClose&&n.closeIcon){const N={class:[`${c}__header-close-icon`],onClick:g},T=v(n.closeIcon,N);S.push(T)}const w={class:[`${c}__header`]};return t.h("view",w,S)},u=(S,w)=>{const N=[];if(w){const B={class:`${c}__group-title`},D=t.h("view",B,[w]);N.push(D)}if(S){const B=[];Array.isArray(S)||(S=[S]);for(let D of S){const C={class:`${c}__group-row`,innerHTML:D},V=t.h("view",C);B.push(V)}if(B.length>0){const D={class:`${c}__group-rows`},C=t.h("view",D,B);N.push(C)}}if(N.length===0)return null;const T={class:`${c}__group`};return t.h("view",T,N)},p=()=>{const S=[];if(typeof n.message=="string")S.push(n.message);else if(Array.isArray(n.message))for(let N of n.message)if(typeof N=="string"){const T=u(N);S.push(T)}else{const T=u(N.content,N.title);S.push(T)}else if(typeof n.message=="function"){const N=n.message();S.push(N)}else{const N=n.message;S.push(N)}const w={class:`${c}__body`};return t.h("view",w,S)},k=()=>{const S=[];if(n.showCancelButton){const N={class:[`${c}__footer-button`],style:{},onClick:y};n.cancelButtonClass&&N.class.push(n.cancelButtonClass),n.cancleButtonStyle&&typeof n.cancleButtonStyle=="object"&&Object.assign(N.style,n.cancleButtonStyle);const T=t.h("button",N,[n.cancelButtonText??i.cancelText.value]);S.push(T)}if(n.showConfirmButton){const N={class:[`${c}__footer-button`],style:{},onClick:h};n.confirmButtonClass&&N.class.push(n.confirmButtonClass),n.confirmButtonStyle&&typeof n.confirmButtonStyle=="object"&&Object.assign(N.style,n.confirmButtonStyle);const T=t.h("button",N,[n.confirmButtonText??i.confirmText.value]);S.push(T)}if(S.length===0)return null;const w={class:`${c}__footer`};return t.h("view",w,S)};return()=>{const S=[],w=b();w&&S.push(w);const N=p();N&&S.push(N);const T=k();T&&S.push(T);const B={class:{[`${c}`]:!0,[`${c}--${n.type||"info"}`]:!0}},D=t.h("view",B,S),C=[`${c}__popup`];n.popClass&&C.push(n.popClass);const V={};n.width&&(V.width=typeof n.width=="number"?`${n.width}px`:n.width),n.height&&(V.height=typeof n.height=="number"?`${n.height}px`:n.height);const M={popClass:C.join(" "),style:V,visible:d.value,teleportDisable:!0,closeable:!1,"onUpdate:visible":f,position:n.position,round:"round",onClickOverlay:g,closeOnClickOverlay:n.closeOnClickOverlay};return t.h(l,M,{default:()=>D})}}}}const{componentName:zp,create:Lp,scope:Pp}=X("messagebox"),Rp=Lp(Mp(zp,Pp,ce)),Fp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='110'%20viewBox='0%200%20102%20110'%20fill='none'%3e%3cg%20clip-path='url(%23clip-path-0)'%3e%3cpath%20d='M82.5121%201.93968L81.7498%206.07825C81.6498%206.6214%2081.1284%206.98064%2080.5853%206.8806C80.4326%206.85251%2080.2886%206.78925%2080.1646%206.69578L77.1586%204.43061C76.7175%204.09823%2076.6294%203.47123%2076.9618%203.03016C77.0552%202.90617%2077.1762%202.80562%2077.3153%202.73655L81.0834%200.863097C81.5779%200.617235%2082.1782%200.818843%2082.4241%201.31339C82.5204%201.50712%2082.5512%201.72688%2082.5121%201.93968Z'%20fill='%23FFD1C9'%20%3e%3c/path%3e%3cpath%20d='M3.08218%20102.2L6.53454%2094.2358C6.75419%2093.7291%207.34251%2093.4968%207.84925%2093.7164C7.99216%2093.7778%208.11815%2093.872%208.21791%2093.9909L13.2085%2099.9384C13.5635%20100.361%2013.5081%20100.992%2013.0852%20101.347C12.9665%20101.447%2012.8261%20101.518%2012.675%20101.554L4.23203%20103.571C3.69484%20103.699%203.15538%20103.367%203.02699%20102.83C2.97674%20102.62%202.99607%20102.399%203.08218%20102.2Z'%20fill='%23FFB5AD'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='59'%20r='28'%20fill='%23FF5959'%20%3e%3c/circle%3e%3cpath%20d='M59.935%2049.6213C61.3827%2051.069%2061.3827%2053.4162%2059.935%2054.864L45.935%2068.864C44.4873%2070.3117%2042.1401%2070.3117%2040.6924%2068.864C39.2447%2067.4162%2039.2447%2065.069%2040.6924%2063.6213L54.6924%2049.6213C56.1401%2048.1736%2058.4873%2048.1736%2059.935%2049.6213Z'%20fill='%23FFB5AD'%20%3e%3c/path%3e%3cpath%20d='M40.6924%2049.6213C39.2447%2051.069%2039.2447%2053.4162%2040.6924%2054.864L54.6924%2068.864C56.1401%2070.3117%2058.4873%2070.3117%2059.935%2068.864C61.3827%2067.4162%2061.3827%2065.069%2059.935%2063.6213L45.935%2049.6213C44.4873%2048.1736%2042.1401%2048.1736%2040.6924%2049.6213Z'%20fill='%23FFFFFF'%20%3e%3c/path%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%23FFB5AD'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='106.5'%20r='3.5'%20fill='%23FFD1C9'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='30'%20r='7'%20fill='%23FFB5AD'%20%3e%3c/circle%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip-path-0'%3e%3cpath%20d='M0%20110L102%20110L102%200L0%200L0%20110Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Op="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='110'%20viewBox='0%200%20102%20110'%20fill='none'%3e%3cpath%20d='M8%2087L8%2095C8%2095.5523%207.55228%2096%207%2096C6.44772%2096%206%2095.5523%206%2095L6%2087L2%2087C1.44772%2087%201%2086.5523%201%2086C1%2085.4477%201.44772%2085%202%2085L6%2085L6%2082C6%2081.4477%206.44772%2081%207%2081C7.55228%2081%208%2081.4477%208%2082L8%2085L12%2085C12.5523%2085%2013%2085.4477%2013%2086C13%2086.5523%2012.5523%2087%2012%2087L8%2087Z'%20fill-rule='evenodd'%20fill='%2396CEFF'%20%3e%3c/path%3e%3cpath%20d='M89%205L89%2010C89%2010.5523%2088.5523%2011%2088%2011C87.4477%2011%2087%2010.5523%2087%2010L87%205L85%205C84.4477%205%2084%204.55228%2084%204C84%203.44772%2084.4477%203%2085%203L87%203L87%201C87%200.447715%2087.4477%200%2088%200C88.5523%200%2089%200.447715%2089%201L89%203L91%203C91.5523%203%2092%203.44772%2092%204C92%204.55228%2091.5523%205%2091%205L89%205Z'%20fill-rule='evenodd'%20fill='%23BDE2FF'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='59'%20r='28'%20fill='%23237FFA'%20%3e%3c/circle%3e%3crect%20x='47.5'%20y='45'%20width='7'%20height='17'%20rx='3'%20fill='%2396CEFF'%20%3e%3c/rect%3e%3crect%20x='47.5'%20y='66'%20width='7'%20height='7'%20rx='4'%20fill='%23FFFFFF'%20%3e%3c/rect%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='106.5'%20r='3.5'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='30'%20r='7'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3c/svg%3e",Kp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='105'%20viewBox='0%200%20102%20105'%20fill='none'%3e%3cpath%20d='M7%2076C7.55228%2076%208%2076.4477%208%2077L7.999%2079.999L12%2080C12.5523%2080%2013%2080.4477%2013%2081C13%2081.5523%2012.5523%2082%2012%2082L7.999%2081.999L8%2090C8%2090.5523%207.55228%2091%207%2091C6.44772%2091%206%2090.5523%206%2090L5.999%2081.999L2%2082C1.44772%2082%201%2081.5523%201%2081C1%2080.4477%201.44772%2080%202%2080L5.999%2079.999L6%2077C6%2076.4477%206.44772%2076%207%2076Z'%20fill='%2338D677'%20%3e%3c/path%3e%3cpath%20d='M75%201.72421e-32C75.5523%20-1.01453e-16%2076%200.447715%2076%201L76%202.999L78%203C78.5523%203%2079%203.44772%2079%204C79%204.55228%2078.5523%205%2078%205L76%204.999L76%2010C76%2010.5523%2075.5523%2011%2075%2011C74.4477%2011%2074%2010.5523%2074%2010L74%204.999L72%205C71.4477%205%2071%204.55228%2071%204C71%203.44772%2071.4477%203%2072%203L74%202.999L74%201C74%200.447715%2074.4477%201.01453e-16%2075%201.72421e-32Z'%20fill='%238BF0AD'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='54'%20r='28'%20fill='%2338D677'%20%3e%3c/circle%3e%3cpath%20d='M36.8787%2051.8786C38.3265%2050.4309%2040.6736%2050.4309%2042.1213%2051.8786L50.1214%2059.8786C51.5691%2061.3263%2051.5691%2063.6735%2050.1214%2065.1212C48.6737%2066.5689%2046.3265%2066.5689%2044.8787%2065.1212L36.8787%2057.1212C35.431%2055.6735%2035.431%2053.3263%2036.8787%2051.8786Z'%20fill='%23B3F2C6'%20%3e%3c/path%3e%3cpath%20d='M64.1214%2045.8786C65.5691%2047.3263%2065.5691%2049.6735%2064.1214%2051.1212L50.1213%2065.1212C48.6736%2066.5689%2046.3265%2066.5689%2044.8787%2065.1212C43.431%2063.6735%2043.431%2061.3263%2044.8787%2059.8786L58.8788%2045.8786C60.3265%2044.4309%2062.6737%2044.4309%2064.1214%2045.8786Z'%20fill='%23FFFFFF'%20%3e%3c/path%3e%3ccircle%20cx='3.5'%20cy='14.5'%20r='3.5'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='101.5'%20r='3.5'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='25'%20r='7'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3c/svg%3e",Up="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='101'%20height='110'%20viewBox='0%200%20101%20110'%20fill='none'%3e%3cg%20clip-path='url(%23clip-path-0)'%3e%3cpath%20d='M81.512%201.93968L80.7498%206.07825C80.6498%206.6214%2080.1284%206.98064%2079.5852%206.8806C79.4326%206.85251%2079.2886%206.78925%2079.1645%206.69578L76.1585%204.43061C75.7175%204.09823%2075.6293%203.47123%2075.9617%203.03016C76.0552%202.90617%2076.1761%202.80562%2076.3152%202.73655L80.0833%200.863097C80.5779%200.617235%2081.1781%200.818843%2081.424%201.31339C81.5203%201.50712%2081.5512%201.72688%2081.512%201.93968Z'%20fill='%23FEFAE0'%20%3e%3c/path%3e%3cpath%20d='M2.08224%20102.2L5.5346%2094.2358C5.75425%2093.7291%206.34257%2093.4968%206.84931%2093.7164C6.99222%2093.7778%207.11822%2093.872%207.21798%2093.9909L12.2086%2099.9384C12.5636%20100.361%2012.5082%20100.992%2012.0853%20101.347C11.9666%20101.447%2011.8261%20101.518%2011.675%20101.554L3.23209%20103.571C2.6949%20103.699%202.15544%20103.367%202.02705%20102.83C1.97681%20102.62%201.99613%20102.399%202.08224%20102.2Z'%20fill='%23FEE789'%20%3e%3c/path%3e%3ccircle%20cx='50'%20cy='59'%20r='28'%20fill='%23FAB007'%20%3e%3c/circle%3e%3crect%20x='46.5'%20y='45'%20width='7'%20height='17'%20rx='3'%20fill='%23FEE789'%20%3e%3c/rect%3e%3crect%20x='46.5'%20y='66'%20width='7'%20height='7'%20rx='3.5'%20fill='%23FFFFFF'%20%3e%3c/rect%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%23FEE789'%20%3e%3c/circle%3e%3ccircle%20cx='84.5'%20cy='106.5'%20r='3.5'%20fill='%23FEE789'%20%3e%3c/circle%3e%3ccircle%20cx='94'%20cy='30'%20r='7'%20fill='%23FEE789'%20%3e%3c/circle%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip-path-0'%3e%3cpath%20d='M0%20110L101%20110L101%200L0%200L0%20110Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Hp=new Un,jp={showCancelButton:!0,cancelButtonText:"取消",showConfirmButton:!0,confirmButtonText:"确认"},Wp=e=>{let o=document.body,l=e.teleport;l!="body"&&(typeof l=="string"?o=document.querySelector(l):l&&(o=e.teleport));const n=document.createElement("view"),a=`messagebox-${Hp.get()}`;n.id=a,e.unmount=()=>{const s=document.querySelector(`#${a}`);s&&s.parentNode?.removeChild(s)};const r=t.createVNode(Rp,e);o.appendChild(n),t.render(r,n)},tt={show:(e,o,l,n)=>{const a={...jp};o&&!Array.isArray(o)&&typeof o=="object"?Object.assign(a,o):(o&&(a.message=o),l&&typeof l=="object"?Object.assign(a,l):(typeof l=="string"&&(a.title=l),n&&typeof n=="object"?Object.assign(a,n):typeof n=="string"&&(a.type=n)));const r=a.type??"info";return a.icon||(r==="success"?a.icon=Kp:r==="warning"?a.icon=Up:r==="error"?a.icon=Fp:a.icon=Op),e==="alert"?(a.showCancelButton=!1,a.showConfirmButton=!0):e==="confirm"&&(a.showCancelButton=!0,a.showConfirmButton=!0),a.showClose&&!a.closeIcon&&(a.closeIcon=te.Close),new Promise((s,i)=>{const c=a.callback;a.callback=d=>{if(typeof c=="function")try{c(d)}catch(f){console.error(f)}s({action:d})},Wp(a)})},alert:(e,o,l)=>tt.show("alert",e,o,l),confirm:(e,o,l)=>tt.show("confirm",e,o,l),install(e){e.config.globalProperties.$alert=tt.alert,e.config.globalProperties.$confirm=tt.confirm}};function Yp(e,o){const l=document.createRange();l.setStart(e,0),l.setEnd(e,e.childNodes.length);const n=l.getBoundingClientRect().width;if(n>0){o(n);return}e.classList.add("is-selectable"),setTimeout(()=>{l.setStart(e,0),l.setEnd(e,e.childNodes.length);const a=l.getBoundingClientRect().width;e.classList.remove("is-selectable"),o(a)},500)}const Xp={tag:{type:[String],required:!1,default:"span"},showOverflowTooltip:{type:[Boolean],required:!1,default:!0},type:{type:[String],required:!1},size:{type:[String],required:!1},truncated:{type:[Boolean,String],required:!1,default:!0},numberFormat:{type:[Boolean],required:!1,default:!1},decimalLength:{type:[Number,String],required:!1,default:-1},autoPadding:{type:[Boolean,String],required:!1,default:!1},digits:{type:[Number,String],required:!1,default:4},separator:{type:String,required:!1,default:" "},highlightFilter:{type:[String,Function],required:!1},mark:{type:[Boolean],required:!1},color:{type:[String],required:!1},icon:{type:[Object],required:!1},textPosition:{type:String,default:"right"},textColor:{type:String}};function Qp(e,o,l=!1){return{props:{...Xp},emits:["click"],setup(n,a){const r=t.ref(!0),s=t.ref(null),i=t.computed(()=>{const y={[`${e}`]:!0,"is-truncated":n.truncated};return n.type&&(y[`${e}--${n.type??"default"}`]=!0),n.size&&(y[`${e}--${n.size}`]=!0),y}),c=t.computed(()=>{const y={},g=n.textColor??n.color;return g&&(y.color=g),y}),d=y=>{if(y&&pe(n.showOverflowTooltip)){const g=y.clientWidth;Yp(y,v=>{r.value=v<=g})}};let f=null;t.onMounted(()=>{if(!pe(n.showOverflowTooltip))return;const y=s.value;d(y),y&&window.ResizeObserver&&(f=new window.ResizeObserver(()=>{d(y)}),f.observe(y))}),t.onUnmounted(()=>{f?.disconnect()});const m=(y,g)=>{let v=null;if(typeof n.highlightFilter=="string"&&n.highlightFilter.length>0){const b=n.highlightFilter;if(y.indexOf(b)!==-1){const p=y.replace(new RegExp(b,"g"),`<span>${b}</span>`);g.innerHTML=p,g.class["is-highlight"]=!0,v=t.h(n.tag,g)}}else if(typeof n.highlightFilter=="function"){const b=n.highlightFilter(y);b&&(g.innerHTML=b,g.class["is-highlight"]=!0,v=t.h(n.tag,g))}return v},h=y=>{a.emit("click",y)};return()=>{const y={onClick:h,class:i.value,style:c.value,ref:s};let g=null;if(pe(n.numberFormat)&&typeof a.slots.default=="function"){const p=a.slots.default();if(Array.isArray(p)&&p.length===1){const k=p[0].type.toString();if(k==="Symbol(Text)"||k==="Symbol(v-txt)"){const S=me(n.digits),w=me(n.decimalLength),N=pe(n.autoPadding);let T=`${p[0].children}`,B=T.split("").reverse().join("");B=mo(B,w,N,S,n.separator),T=B.split("").reverse().join(""),n.highlightFilter!==void 0&&(g=m(T,y)),g||(y.innerHTML=T,g=t.h(n.tag,y))}}}else{if(n.highlightFilter!==void 0&&typeof a.slots.default=="function"){const p=a.slots.default();if(Array.isArray(p)&&p.length===1){const k=p[0].type.toString();if(k==="Symbol(Text)"||k==="Symbol(v-txt)"){const S=`${p[0].children}`;g=m(S,y),g||(y.innerHTML=S,g=t.h(n.tag,y))}}}g||(g=t.h(n.tag,y,{default:a.slots.default}))}if(!n.mark&&!n.icon&&!a.slots.mark)return g;let b=null;if(n.icon){const p={[`${e}__mark-wrap`]:!0};n.type&&(p[`${e}__mark-wrap--${n.type}`]=!0);const k={},S=n.color;S&&(k.color=S);const w={class:p,style:k};b=t.h("view",w,t.h(n.icon))}else if(a.slots.mark){const p={[`${e}__mark-wrap`]:!0};n.type&&(p[`${e}__mark-wrap--${n.type}`]=!0);const k={},S=n.color;S&&(k.color=S);const w={class:p,style:k};b=t.h("view",w,{default:a.slots.mark})}else{const p={[`${e}__mark`]:!0};n.type&&(p[`${e}__mark--${n.type??"default"}`]=!0);const k={},S=n.color;S&&(k["background-color"]=S);const w={class:p,style:k};b=t.h("view",w)}const u={class:{"fox-text__wrap":!0,"text-left":n.textPosition==="left","text-right":n.textPosition==="right"}};return t.h("view",u,[b,g])}}}}const{componentName:Gp,create:Zp,scope:Jp}=X("text"),fl=Zp(Qp(Gp,Jp,!1));function _p(e,o,l,n,a){let r=[];Array.isArray(e)?r=e:r=[e];const s=[],i=o[0];if(Array.isArray(e)&&!Array.isArray(i)&&!i[a]){let c=o;for(let d=0;c&&d<r.length;d++){let f=r[d],m=c.find(h=>h[n]===f);if(!m)break;s.push(m[l])}return s}if(Array.isArray(i))for(let c=0;c<o.length&&c<r.length;c++){let d=o[c],f=r[c];const m=d.find(h=>h[n]===f);if(!m)break;s.push(m[l])}else{let c=o;for(let d=0;c&&d<r.length;d++){let f=r[d],m=c.find(h=>h[n]===f);if(!m)break;s.push(m[l]),c=m[a]}}return s}class eh{proxy;constructor(o){this.proxy=o}async load(o,l,n){if(Array.isArray(l))return l;if(typeof l=="function")return await l(n);const a=Ge(this.proxy,o);return a===null?(console.error(`${o} component not found api function`),[]):(Be(n)&&t.isReactive(n)&&(n=t.toRaw(n)),await a(l,n))}}function th(){const e=t.getCurrentInstance();return new eh(e.proxy)}const oh={tag:{type:[String,Object],required:!1,default:"span"},resolveTag:{type:[Boolean],required:!1,default:!1},source:{type:[Array,Function,String],required:!1},sourceType:{type:[String],required:!1,default:"mapping"},params:{type:[Object,String],required:!1},modelValue:{type:[String,Boolean,Number,Array],required:!1},separator:{type:[String,Boolean,Number,Array],required:!1,default:"/"},optionType:{type:String,required:!1},textKey:{type:[String],required:!1,default:"text"},valueKey:{type:[String],required:!1,default:"value"},childrenKey:{type:[String],required:!1,default:"children"},emptyText:{type:[String],required:!1},emptyTag:{type:[String],required:!1,default:"span"},emptyClass:{type:[String],required:!1}};function nh(e,o,l=!1){return{props:{...oh},setup(n,{attrs:a,slots:r}){const s=th(),i=t.ref([]);t.watch([()=>n.source,()=>n.params],async([f,m])=>{i.value=await s.load(n.sourceType,f,m)},{immediate:!0});const c=t.computed(()=>{if(!Array.isArray(i.value)||i.value.length===0)return"";let f=_p(n.modelValue,i.value,n.textKey,n.valueKey,n.childrenKey);return f.length==0?n.emptyText??"":f.length===1?n.optionType=="item"?`${n.modelValue}${n.separator}${f[0]}`:f[0]:f.join(n.separator)}),d=n.resolveTag?t.resolveComponent(n.tag):n.tag;return()=>{const f={...a};return r.default?r.default({text:c.value,value:n.modelValue}):n.resolveTag?n.emptyText!==void 0&&n.emptyText===c.value?t.h(n.emptyTag??"span",{...a,class:n.emptyClass},c.value):t.h(d,f,{default:()=>c.value}):t.h(d,f,c.value)}}}}const{componentName:lh,create:ah,scope:rh}=X("mapping"),ml=ah(nh(lh,rh,!1));function sh(e,o){return{inheritAttrs:!1,props:{name:{type:[String],required:!1,default:""},config:{type:[Object],required:!1,default:{}}},setup(l,{slots:n}){return Pr(l.name,()=>l.config),()=>typeof n.default=="function"?n.default():null}}}const{componentName:LB,create:ih,scope:PB}=X("domain-provider"),pl=ih(sh()),ch={initialVisibleObserverSize:{type:[Number],required:!1},initialInvisibleObserverHeight:{type:[String],required:!1,default:"250px"},disabled:{type:[Boolean],required:!1},loadPolicy:{type:[String],required:!1,default:"rolling"},rootMargin:{type:[String],required:!1,default:"250px 0px 250px 0px"},threshold:{type:[Array],required:!1,default:[0,.25]},root:{type:[Object,String]}};function uh(e,o){return{inheritAttrs:!1,props:ch,setup(l,{slots:n}){if(st&&window.IntersectionObserver){const a=new WeakMap;let r=new Map;const s=(h,y)=>{if(f===null){r.set(h,{visible:null,callback:y});return}a.has(h)&&f.unobserve(h),a.set(h,{visible:null,callback:y}),f.observe(h)},i=h=>{if(f===null){r.delete(h);return}a.has(h)&&(a.delete(h),f.unobserve(h))};let c=l.initialVisibleObserverSize;Ai({acquire:()=>{const h=c>0;return c--,h},get disabled(){return l.disabled},get initialHeight(){return l.initialInvisibleObserverHeight},observe:s,unobserve:i});let f=null;const m=(h,y,g)=>{f=new IntersectionObserver(v=>{for(let b of v){let u=!1;b.intersectionRatio>0&&(u=!0);const p=a.get(b.target);if(p)try{if(l.loadPolicy==="lazy"&&!u&&p.visible!==null)return;p.visible=u,p.callback(u)}catch(k){console.error(k)}}},{root:h,rootMargin:y,threshold:g}),r.forEach((v,b)=>{a.set(b,v),f?.observe(b)}),r.clear()};t.watch([()=>l.root,()=>l.disabled],([h,y])=>{if(y||!h||f)return;let g=null;typeof h=="string"?g=document.querySelector(h):g=h,g&&m(g,l.rootMargin,l.threshold)},{immediate:!0}),t.onUnmounted(()=>{f&&(f.disconnect(),f=null)})}return()=>typeof n.default=="function"?n.default():null}}}const{componentName:RB,create:dh,scope:FB}=X("rolling-provider"),hl=dh(uh()),{componentName:fh,create:mh}=X("cell"),ph=mh({components:{Right:te.Right},props:{title:{type:String,default:""},subTitle:{type:String,default:""},desc:{type:String,default:""},descTextAlign:{type:String,default:"right"},isLink:{type:Boolean,default:!1},roundRadius:{type:[String,Number],default:""},url:{type:String,default:""},center:{type:Boolean,default:!1},size:{type:String,default:""}},emits:["click"],setup(e,{emit:o}){const l=t.computed(()=>{const r=fh;return{[r]:!0,[`${r}--clickable`]:e.isLink,[`${r}--center`]:e.center,[`${r}--large`]:e.size=="large"}}),n=t.computed(()=>({borderRadius:fe(e.roundRadius)}));return{handleClick:r=>{o("click",r)},classes:l,baseStyle:n}}}),hh={key:0,class:"fox-cell__icon"},gh={key:1,class:"fox-cell__title"},yh={class:"title"},vh={class:"fox-cell__title-desc"};function kh(e,o,l,n,a,r){const s=t.resolveComponent("Right");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.baseStyle),onClick:o[0]||(o[0]=(...i)=>e.handleClick&&e.handleClick(...i))},[t.renderSlot(e.$slots,"default",{},()=>[e.$slots.icon?(t.openBlock(),t.createElementBlock("view",hh,[t.renderSlot(e.$slots,"icon")])):t.createCommentVNode("",!0),e.title||e.subTitle||e.$slots.title?(t.openBlock(),t.createElementBlock("view",gh,[e.subTitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(e.$slots,"title",{},()=>[t.createElementVNode("view",yh,t.toDisplayString(e.title),1)]),t.createElementVNode("view",vh,t.toDisplayString(e.subTitle),1)],64)):t.renderSlot(e.$slots,"title",{key:1},()=>[t.createTextVNode(t.toDisplayString(e.title),1)])])):t.createCommentVNode("",!0),e.desc?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass(["fox-cell__value",{"fox-cell__value--alone":!e.title&&!e.subTitle&&!e.$slots.title}]),style:t.normalizeStyle({"text-align":e.descTextAlign})},t.toDisplayString(e.desc),7)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"link",{},()=>[e.isLink?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-cell__link"})):t.createCommentVNode("",!0)])])],6)}const gl=J(ph,[["render",kh]]),{componentName:bh,create:Sh}=X("cell-group"),Ch=Sh({props:{title:{type:String,default:""},desc:{type:String,default:""}},setup(){return{classes:t.computed(()=>({[bh]:!0}))}}}),wh={key:1,class:"fox-cell-group__title"},Nh={key:3,class:"fox-cell-group__desc"},Bh={class:"fox-cell-group__wrap"};function Vh(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[e.$slots.title?t.renderSlot(e.$slots,"title",{key:0}):e.title?(t.openBlock(),t.createElementBlock("view",wh,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.$slots.desc?t.renderSlot(e.$slots,"desc",{key:2}):e.desc?(t.openBlock(),t.createElementBlock("view",Nh,t.toDisplayString(e.desc),1)):t.createCommentVNode("",!0),t.createElementVNode("view",Bh,[t.renderSlot(e.$slots,"default")])],2)}const yl=J(Ch,[["render",Vh]]),{componentName:Ah,create:Th}=X("image"),$h=Th({props:{src:String,fit:{type:String,default:"fill"},position:{type:String,default:"center"},alt:{type:String,default:""},width:{type:String,default:"center"},height:{type:String,default:""},round:{type:Boolean,default:!1},radius:[String,Number],showError:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},lazyLoad:{type:Boolean,default:!1}},components:{Image:te.Image,ImageError:te.ImageError},emits:["click","load","error"],setup(e,{emit:o}){const l=t.reactive({loading:!0,isError:!1,slotLoding:t.useSlots().loading,slotError:t.useSlots().error}),n=t.computed(()=>{const y=Ah;return{[y]:!0,[`${y}-round`]:e.round}}),a=t.ref(null),r=t.ref(!1),s=t.ref(null),i=()=>{const y={threshold:[0],rootMargin:"0px"};a.value=new IntersectionObserver(g=>{g.forEach(v=>{v.isIntersecting&&(r.value=!0,a.value.disconnect())})},y),s.value&&a.value.observe(s.value)};t.onMounted(()=>{e.lazyLoad&&i()}),t.onBeforeUnmount(()=>{a.value&&a.value.disconnect()});const c=t.computed(()=>{let y={};return e.width&&(y.width=fe(e.width)),e.height&&(y.height=fe(e.height)),e.radius!==void 0&&e.radius!==null&&(y.overflow="hidden",y.borderRadius=fe(e.radius)),y}),d=t.computed(()=>({objectFit:e.fit,objectPosition:e.position}));t.watch(()=>e.src,y=>{l.isError=!1,l.loading=!0});const f=()=>{l.loading=!1,o("load")},m=()=>{l.isError=!0,l.loading=!1,o("error")},h=y=>{o("click",y)};return{...t.toRefs(l),imageClick:h,classes:n,styles:d,stylebox:c,error:m,load:f,show:r,imgRef:s}}}),Eh=["src","date-src","alt"],Dh={key:0,class:"fox-img-loading"},xh={key:1,class:"fox-img-error"};function Ih(e,o,l,n,a,r){const s=t.resolveComponent("Image"),i=t.resolveComponent("ImageError");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.stylebox),onClick:o[2]||(o[2]=(...c)=>e.imageClick&&e.imageClick(...c))},[t.createElementVNode("img",{ref:"imgRef",class:"fox-img",src:e.lazyLoad?e.show?e.src:void 0:e.src,"date-src":e.lazyLoad?e.show?void 0:e.src:void 0,alt:e.alt,onLoad:o[0]||(o[0]=(...c)=>e.load&&e.load(...c)),onError:o[1]||(o[1]=(...c)=>e.error&&e.error(...c)),style:t.normalizeStyle(e.styles)},null,44,Eh),e.loading?(t.openBlock(),t.createElementBlock("div",Dh,[e.slotLoding?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(s,{key:0,width:"16px",height:"20px",name:"image"})),t.renderSlot(e.$slots,"loading")])):t.createCommentVNode("",!0),e.isError&&!e.loading?(t.openBlock(),t.createElementBlock("div",xh,[e.slotError?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(i,{key:0,width:"16px",height:"20px",name:"imageError"})),t.renderSlot(e.$slots,"error")])):t.createCommentVNode("",!0)],6)}const vl=J($h,[["render",Ih]]),{create:qh}=X("layout"),kl=qh({}),{componentName:Mh,create:zh}=X("col"),Lh=zh({props:{span:{type:[String,Number],default:"24"},offset:{type:[String,Number],default:"0"}},setup(e){const o=Mh,l=t.inject("gutter"),n=t.computed(()=>({[o]:!0,[`${o}-gutter`]:l,[`fox-col-${e.span}`]:!0,[`fox-col-offset-${e.offset}`]:!0})),a=t.computed(()=>({paddingLeft:l/2+"px",paddingRight:l/2+"px"}));return{classes:n,style:a}}});function Ph(e,o,l,n,a,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6)}const bl=J(Lh,[["render",Ph]]),{componentName:Rh,create:Fh}=X("row"),Oh=Fh({props:{type:{type:String,default:""},gutter:{type:[String,Number],default:""},justify:{type:String,default:"start"},align:{type:String,default:"flex-start"},flexWrap:{type:String,default:"nowrap"}},setup(e){const o=Rh;t.provide("gutter",e.gutter);const l=(a,r)=>a?r?`fox-row-${a}-${r}`:"":`fox-row-${r}`;return{classes:t.computed(()=>e.type==="flex"?`
6
6
  ${l("",e.type)}
7
7
  ${l("justify",e.justify)}
8
8
  ${l("align",e.align)}