@fox-js/foxui 4.0.1-69 → 4.0.1-70
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 +2 -2
- package/dist/index.esm.js +4 -2
- package/dist/index.umd.js +2 -2
- package/dist/locale/index.esm.js +1 -1
- package/dist/locale/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";/*!
|
|
2
|
-
* @fox-js/foxui-base v4.0.0
|
|
2
|
+
* @fox-js/foxui-base v4.0.0 Sat Nov 30 2024 09:30:04 GMT+0800 (中国标准时间)
|
|
3
3
|
*/Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),lt=require("@fox-js/validator"),oe=require("@fox-js/icons-vue"),se=require("@fox-js/i18n"),tn=window,Ys=typeof window<"u";function Xs(){return typeof tn<"u"?tn.requestAnimationFrame||tn.webkitRequestAnimationFrame||function(e){tn.setTimeout(e,1e3/60)}:function(e){setTimeout(e,1e3/60)}}function Dr(e){Ys?cancelAnimationFrame(e):clearTimeout(e)}const Xe=Xs();/*!
|
|
4
4
|
* @fox-js/big-decimal v4.0.1-6 Sat Aug 24 2024 07:04:11 GMT+0800 (中国标准时间)
|
|
5
|
-
*/function pn(e,n="0"){let a=0,o=-1;e[0]=="-"&&(a++,o=1,e=e.substring(1),e.length),n[0]=="-"&&(a++,o=2,n=n.substring(1),n.length),e=Be(e),n=Be(n),[e,n]=Ko(Be(e),Be(n)),a==1&&(o==1?e=ao(e):n=ao(n));let l=Ir(e,n);return a?a==2?"-"+Be(l):e.length<l.length?Be(l.substring(1)):"-"+Be(ao(l)):Be(l)}function ao(e){let n="",a=e.length,o=e.split(".")[1],l=o?o.length:0;for(let i=0;i<a;i++)e[i]>="0"&&e[i]<="9"?n+=9-parseInt(e[i]):n+=e[i];let r=l>0?"0."+new Array(l).join("0")+"1":"1";return Ir(n,r)}function Be(e){let n=e.split(".");for(n[0]||(n[0]="0");n[0][0]=="0"&&n[0].length>1;)n[0]=n[0].substring(1);return n[0]+(n[1]?"."+n[1]:"")}function Ko(e,n){let a=e.split("."),o=n.split("."),l=a[0].length,r=o[0].length;return l>r?o[0]=new Array(Math.abs(l-r)+1).join("0")+(o[0]?o[0]:""):a[0]=new Array(Math.abs(l-r)+1).join("0")+(a[0]?a[0]:""),l=a[1]?a[1].length:0,r=o[1]?o[1].length:0,(l||r)&&(l>r?o[1]=(o[1]?o[1]:"")+new Array(Math.abs(l-r)+1).join("0"):a[1]=(a[1]?a[1]:"")+new Array(Math.abs(l-r)+1).join("0")),e=a[0]+(a[1]?"."+a[1]:""),n=o[0]+(o[1]?"."+o[1]:""),[e,n]}function Ir(e,n){[e,n]=Ko(e,n);let a="",o=0;for(let l=e.length-1;l>=0;l--){if(e[l]==="."){a="."+a;continue}let r=parseInt(e[l])+parseInt(n[l])+o;a=r%10+a,o=Math.floor(r/10)}return o?o.toString()+a:a}var ke=(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))(ke||{});function Ut(e,n=0,a=ke.HALF_EVEN){if(a===ke.UNNECESSARY)throw new Error("UNNECESSARY Rounding Mode has not yet been implemented");typeof e=="number"&&(e=e.toString());let o=!1;e[0]==="-"&&(o=!0,e=e.substring(1));let l=e.split("."),r=l[0],i=l[1];if(n<0){if(n=-n,r.length<=n)return"0";{let c=r.substr(0,r.length-n);return e=c+"."+r.substr(r.length-n)+i,c=Ut(e,0,a),(o?"-":"")+c+new Array(n+1).join("0")}}if(n==0)return r.length,Ra(l[1],r,o,a)?(o?"-":"")+ro(r):(o?"-":"")+r;if(l[1]){if(l[1].length<n)return(o?"-":"")+r+"."+l[1]+new Array(n-l[1].length+1).join("0")}else return(o?"-":"")+r+"."+new Array(n+1).join("0");i=l[1].substring(0,n);let s=l[1].substring(n);return s&&Ra(s,i,o,a)&&(i=ro(i),i.length>n)?(o?"-":"")+ro(r,parseInt(i[0]))+"."+i.substring(1):(o?"-":"")+r+"."+i}function Ra(e,n,a,o){if(!e||e===new Array(e.length+1).join("0")||o===ke.DOWN||!a&&o===ke.FLOOR||a&&o===ke.CEILING)return!1;if(o===ke.UP||a&&o===ke.FLOOR||!a&&o===ke.CEILING)return!0;let l="5"+new Array(e.length).join("0");if(e>l)return!0;if(e<l)return!1;switch(o){case ke.HALF_DOWN:return!1;case ke.HALF_UP:return!0;case ke.HALF_EVEN:default:return parseInt(n[n.length-1])%2==1}}function ro(e,n=0){n||(n=1),typeof e=="number"&&e.toString();let a=e.length-1,o="";for(let l=a;l>=0;l--){let r=parseInt(e[l])+n;r==10?(n=1,r=0):n=0,o+=r}return n&&(o+=n),o.split("").reverse().join("")}function yo(e,n){e=e.toString(),n=n.toString();let a=0;e[0]=="-"&&(a++,e=e.substr(1)),n[0]=="-"&&(a++,n=n.substr(1)),e=Et(e),n=Et(n);let o=0,l=0;e.indexOf(".")!=-1&&(o=e.length-e.indexOf(".")-1),n.indexOf(".")!=-1&&(l=n.length-n.indexOf(".")-1);let r=o+l;if(e=Et(e.replace(".","")),n=Et(n.replace(".","")),e.length<n.length){let u=e;e=n,n=u}if(n=="0")return"0";let i=n.length,s=0,c=[],d=i-1,p="";for(let u=0;u<i;u++)c[u]=e.length-1;for(let u=0;u<2*e.length;u++){let g=0;for(let k=n.length-1;k>=d&&k>=0;k--)c[k]>-1&&c[k]<e.length&&(g+=parseInt(e[c[k]--])*parseInt(n[k]));g+=s,s=Math.floor(g/10),p=g%10+p,d--}return p=Et(Qs(p,r)),a==1&&(p="-"+p),p}function Qs(e,n){return n==0?e:(e=n>=e.length?new Array(n-e.length+1).join("0")+e:e,e.substr(0,e.length-n)+"."+e.substr(e.length-n,n))}function Et(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 vo(e,n,a=8){if(n==0)throw new Error("Cannot divide by 0");if(e=e.toString(),n=n.toString(),e=e.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),n=n.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),e==0)return"0";let o=0;n[0]=="-"&&(n=n.substring(1),o++),e[0]=="-"&&(e=e.substring(1),o++);var l=n.indexOf(".")>0?n.length-n.indexOf(".")-1:-1;if(n=Be(n.replace(".","")),l>=0){let d=e.indexOf(".")>0?e.length-e.indexOf(".")-1:-1;if(d==-1)e=Be(e+new Array(l+1).join("0"));else if(l>d)e=e.replace(".",""),e=Be(e+new Array(l-d+1).join("0"));else if(l<d){e=e.replace(".","");let p=e.length-d+l;e=Be(e.substring(0,p)+"."+e.substring(p))}else l==d&&(e=Be(e.replace(".","")))}let r=0,i=n.length,s="",c=e.indexOf(".")>-1&&e.indexOf(".")<i?e.substring(0,i+1):e.substring(0,i);if(e=e.indexOf(".")>-1&&e.indexOf(".")<i?e.substring(i+1):e.substring(i),c.indexOf(".")>-1){let d=c.length-c.indexOf(".")-1;c=c.replace(".",""),i>c.length&&(d+=i-c.length,c=c+new Array(i-c.length+1).join("0")),r=d,s="0."+new Array(d).join("0")}for(a=a+2;r<=a;){let d=0;for(;parseInt(c)>=parseInt(n);)c=pn(c,"-"+n),d++;s+=d,e?(e[0]=="."&&(s+=".",r++,e=e.substring(1)),c=c+e.substring(0,1),e=e.substring(1)):(r||(s+="."),r++,c=c+"0")}return(o==1?"-":"")+Be(Ut(s,a-2))}function bo(e,n){return e=e.toString(),n=n.toString(),n=ko(n),pn(e,n)}function ko(e){return e[0]=="-"?e=e.substr(1):e="-"+e,e}function Ka(e,n){if(n==0)throw new Error("Cannot divide by 0");e=e.toString(),n=n.toString(),Ua(e),Ua(n);let a="";e[0]=="-"&&(a="-",e=e.substr(1)),n[0]=="-"&&(n=n.substr(1));let o=bo(e,yo(n,Ut(vo(e,n),0,ke.FLOOR)));return a+o}function Ua(e){if(e.indexOf(".")!=-1)throw new Error("Modulus of non-integers not supported")}function Ha(e,n){let a=!1;if(e[0]=="-"&&n[0]!="-")return-1;if(e[0]!="-"&&n[0]=="-")return 1;if(e[0]=="-"&&n[0]=="-"&&(e=e.substr(1),n=n.substr(1),a=!0),[e,n]=Ko(e,n),e.localeCompare(n)==0)return 0;for(let o=0;o<e.length;o++)if(e[o]!=n[o])return e[o]>n[o]?a?-1:1:a?1:-1;return 0}class ie{value;static RoundingModes=ke;static validate(n){if(n){if(n=n.toString(),isNaN(n))throw Error("Parameter is not a number: "+n);n[0]=="+"&&(n=n.substring(1))}else n="0";if(n.startsWith(".")?n="0"+n:n.startsWith("-.")&&(n="-0"+n.substr(1)),/e/i.test(n)){let[a,o]=n.split(/[eE]/);a=Be(a);let l="";a[0]=="-"&&(l="-",a=a.substring(1)),a.indexOf(".")>=0?(o=parseInt(o)+a.indexOf("."),a=a.replace(".","")):o=parseInt(o)+a.length,a.length<o?n=l+a+new Array(o-a.length+1).join("0"):a.length>=o&&o>0?n=l+Be(a.substring(0,o))+(a.length>o?"."+a.substring(o):""):n=l+"0."+new Array(-o+1).join("0")+a}return n}constructor(n="0"){this.value=ie.validate(n)}getValue(){return this.value}static getPrettyValue(n,a,o){if(!(a||o))a=3,o=",";else if(!(a&&o))throw Error("Illegal Arguments. Should pass both digits and separator or pass none");n=ie.validate(n);let l=n.charAt(0)=="-";l&&(n=n.substring(1));var r=n.indexOf(".");r=r>0?r:n.length;for(var i="",s=r;s>0;)s<a?(a=s,s=0):s-=a,i=n.substring(s,s+a)+(s<r-a&&s>=0?o:"")+i;return(l?"-":"")+i+n.substring(r)}getPrettyValue(n,a){return ie.getPrettyValue(this.value,n,a)}static round(n,a=0,o=ke.HALF_EVEN){if(n=ie.validate(n),isNaN(a))throw Error("Precision is not a number: "+a);return Ut(n,a,o)}round(n=0,a=ke.HALF_EVEN){if(isNaN(n))throw Error("Precision is not a number: "+n);return new ie(Ut(this.value,n,a))}static floor(n){return n=ie.validate(n),n.indexOf(".")===-1?n:ie.round(n,0,ke.FLOOR)}floor(){return this.value.indexOf(".")===-1?new ie(this.value):new ie(this.value).round(0,ke.FLOOR)}static ceil(n){return n=ie.validate(n),n.indexOf(".")===-1?n:ie.round(n,0,ke.CEILING)}ceil(){return this.value.indexOf(".")===-1?new ie(this.value):new ie(this.value).round(0,ke.CEILING)}static add(n,a){return n=ie.validate(n),a=ie.validate(a),pn(n,a)}add(n){return new ie(pn(this.value,n.getValue()))}static subtract(n,a){return n=ie.validate(n),a=ie.validate(a),bo(n,a)}subtract(n){return new ie(bo(this.value,n.getValue()))}static multiply(n,a){return n=ie.validate(n),a=ie.validate(a),yo(n,a)}multiply(n){return new ie(yo(this.value,n.getValue()))}static divide(n,a,o){return n=ie.validate(n),a=ie.validate(a),vo(n,a,o)}divide(n,a){return new ie(vo(this.value,n.getValue(),a))}static modulus(n,a){return n=ie.validate(n),a=ie.validate(a),Ka(n,a)}modulus(n){return new ie(Ka(this.value,n.getValue()))}static compareTo(n,a){return n=ie.validate(n),a=ie.validate(a),Ha(n,a)}compareTo(n){return Ha(this.value,n.getValue())}static negate(n){return n=ie.validate(n),ko(n)}negate(){return new ie(ko(this.value))}}function qr(e,n){return ie.multiply(`${e}`,`${n}`)}function Uo(e,n,a=8){return ie.divide(`${e}`,`${n}`,a)}function So(e,n){return e=`${e}`,n=`${n}`,ie.compareTo(e,n)}function Pr(e){return ie.negate(e)}function Nn(e,n=-1,a=!1,o=3,l=","){let r=`${e}`;if(r.length==0||r==="-")return"";let i=r.charAt(0);i=="-"?r=r.substring(1):i="";let s=r,c="",d=r.indexOf(".");d!=-1&&(s=r.substring(0,d),c=r.substring(d+1)),n!=-1&&(n<c.length?c=c.substring(0,n):a&&n>c.length&&(c=c.padEnd(n,"0")));let p;if(o>0){let u="",g=s.split("").reverse();for(let k=0;k<g.length;k++)u+=g[k]+((k+1)%o==0&&k+1!=g.length?l:"");c.length==0?p=`${i}${u.split("").reverse().join("")}`:p=`${i}${u.split("").reverse().join("")}.${c}`}else c.length==0?p=`${i}${s}`:p=`${i}${s}.${c}`;return p}function Mr(e){let n=`${e}`,a=n.charAt(0);a=="-"?n=n.substring(1):a="";let o=n.replace(/[^\d\.-]/g,"");return`${a}${o}`}const _e=typeof window<"u",Ke=Xe;function Lr(e){return e==null}const Bn=Array.isArray,Gs=e=>An(e)==="[object Map]",Zs=e=>An(e)==="[object Set]",He=e=>e instanceof Date,hn=e=>typeof e=="function",zr=e=>typeof e=="string",Js=e=>typeof e=="symbol",xe=e=>e!==null&&typeof e=="object",bt=e=>xe(e)&&hn(e.then)&&hn(e.catch),Or=Object.prototype.toString,An=e=>Or.call(e),Co=e=>An(e)==="[object Object]",Fr=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function _s(e){return e.__esModule||Fr&&e[Symbol.toStringTag]==="Module"}const ei=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function st(...e){let n=e[0]!==void 0&&e[0]!==null?e[0]:{},a=1,o=e.length,l=!1;for(typeof n=="boolean"&&(l=n,n=e[a]??{},a++),typeof n!="object"&&(n={});a<o;a++)if(e[a]!==null&&e[a]!==void 0){let r=e[a];for(let i in r){let s=n[i],c=r[i];if(s!==c)if(l===!0&&c&&typeof c=="object"){let d;Array.isArray(c)?d=s&&Array.isArray(s)?s:[]:d=s&&typeof s=="object"?s:{},n[i]=st(l,d,c)}else c!==void 0&&(n[i]=c)}}return n}function wo(e,n,a=!1){if(!a)st(!0,e,n);else{if(typeof n!="object")return{};typeof e!="object"&&(e={});for(let l in n){let r=e[l],i=n[l];if(r!==i)if(typeof i=="object"){if(!Array.isArray(i)&&!Co(i))continue;r=wo(r,i,a),e[l]=r}else{if(typeof i=="function")continue;e[l]=i}}const o=Object.getOwnPropertySymbols(n);for(let l of o){let r=e[l],i=n[l];if(r!==i)if(typeof i=="object"){if(!Array.isArray(i)&&!Co(i))continue;r=wo(r,i,a),e[l]=r}else{if(typeof i=="function")continue;e[l]=i}}}return e}const so=ei?Promise.resolve():null;function ti(e,...n){so!==null?n&&n.length>0?so.then(()=>{e(n)}):so.then(e):n&&n.length>0?setTimeout(()=>{e(n)}):setTimeout(e)}function ye(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 ni={"[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 it(e){let a=Object.prototype.toString.call(e);return e==null?String(e):ni[a]||"object"}function Vn(e){if(!e)return!0;const{display:n}=window.getComputedStyle(e);return n==="none"}function Rr(e){return e&&typeof e=="object"&&"setInterval"in e}function Kr(e){let n=!!e&&"length"in e&&e.length,a=it(e);return a==="function"||Rr(e)?!1:a==="array"||n===0||typeof n=="number"&&n>0&&n-1 in e}function Ur(e,n){let a=+n.length,o=0,l=e.length;for(;o<a;o++)e[l++]=n[o];return e.length=l,e}function oi(e,n=[]){let a=n;return e!=null&&(Kr(Object(e))?Ur(a,typeof e=="string"?[e]:e):a.push(e)),a}function Pe(e,n){if(e==n)return!0;if(e===void 0||n===void 0)return!1;let a=it(e),o=it(n);if(a!==o)return!1;if(a==="object"){let l=Object.keys(e),r=Object.keys(n);if(l.length!==r.length)return!1;for(let i=0;i<l.length;i++){let s=l[i],c=e[s],d=n[s];if(!Pe(c,d))return!1}return!0}else if(a==="array"){if(e.length!==n.length)return!1;for(let l=0;l<e.length;l++){let r=e[l],i=n[l];if(!Pe(r,i))return!1}return!0}return!1}function Hr(e){return Object.prototype.toString.call(e)==="[object RegExp]"}const ue=e=>e==null?!0:typeof e!="string"?!1:e.length===0;function jr(e){return ue(e)?!0:(e.charAt(0)=="-"&&(e=e.substring(1)),ue(e)||/^(([1-9][0-9]*\.[0-9]*)|([0]\.[0-9]*)|([0-9]*)|([0]{1}))$/.test(e))}function Wr(e){if(e==null)return 0;let n=`${e}`;if(n.length==0)return 0;n.charAt(0)=="-"&&(n=n.substring(1)),n=n.replace(/[^\d\.-]/g,"");const a=n.indexOf(".");return a==-1?n.length:a}function Yr(e){if(e==null)return 0;const n=`${e}`;if(n.length==0)return 0;const a=n.indexOf(".");return a==-1?0:n.length-(a+1)}function ja(e,n,a){const o=e.indexOf(n);return o===-1?e:n==="-"&&o!==0?e.slice(0,o):e.slice(0,o+1)+e.slice(o).replace(a,"")}function No(e,n=!0,a=!0){n?e=ja(e,".",/\./g):e=e.replace(/\./g,""),a?e=ja(e,"-",/-/g):e=e.replace(/-/,"");const o=n?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(o,"")}function li(e,n){return typeof e=="object"||Array.isArray(e)?n.findIndex(a=>{if(Pe(e,a))return!0}):n.indexOf(e)}function ai(e,n){if(typeof e=="object"||Array.isArray(e)){let a=n.reverse().findIndex(o=>{if(Pe(e,o))return!0});return a!==-1&&(a=n.length-1-a),a}return n.lastIndexOf(e)}function ve(e){return e==null||e==null?0:typeof e=="string"?e.length:`${e}`.length}function be(e,...n){const a={};return n.forEach(o=>{for(const l in o)a[l]=e[l]}),a}function dt(e,...n){const a=[];n.forEach(l=>{Reflect.apply([].push,a,Reflect.ownKeys(l))});const o={};for(const l in e)a.includes(l)||(o[l]=e[l]);return o}const Xr=(e,n,a)=>{const o=Object.assign({},e),l=Object.assign({},a);return Object.keys(n).length>0?(Object.keys(o).forEach(r=>{l.hasOwnProperty(r)?typeof l[r]=="string"&&(o[r]=n[l[r]]):n[r]&&(o[r]=n[r])}),o):e};function Bo(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&e.stopPropagation()}const ot=(e,n=2)=>{for(e+="";e.length<n;)e="0"+e;return e.toString()},Ue=(e,n,a)=>Math.min(Math.max(e,n),a),Se=Symbol.for("BroadcastKey");class Ho{parent;children=[];callbacks=new Map;proxy=null;name;constructor(n,a,o){this.parent=n,this.proxy=a,this.name=o,n!==null&&n.addChild(this)}addChild(n){this.children.push(n)}removeChild(n){const a=this.children.findIndex(o=>n===o);a!==-1&&this.children.splice(a,1)}destroy(){this.parent!==null&&this.parent.removeChild(this),this.parent=null,this.proxy=null}emit(n,a,...o){if(n.maxLevel!==void 0&&n.maxLevel!==null&&n.maxLevel>0){if(n.level=n.level??0,n.level>n.maxLevel)return[];n.level++}let l=!1;!n.name||n.name==="*"?l=!0:!n.name||n.name==="+"?(l=!1,n.name="*"):Hr(n.name)&&this.name&&n.name.test(this.name)?l=!0:typeof n.name=="function"?l=Reflect.apply(n.name,null,[this.name]):n.name===this.name&&(l=!0);const r=[];if(l){const i=this.callbacks.get(a);if(typeof i=="function"){const c=Reflect.apply(i,this.proxy,[...o]);c!=null&&r.push(c)}const s=this.proxy??{};if(typeof s[a]=="function"){const c=Reflect.apply(s[a],s,[...o]);c!=null&&r.push(c)}}return this.children.forEach(i=>{const s=Reflect.apply(i.emit,i,[{...n},a,...o]);s!=null&&Array.isArray(s)&&Reflect.apply([].push,r,[...s])}),r}emitToChildren(n,a,...o){const l=[];return this.children.forEach(r=>{const i=Reflect.apply(r.emit,r,[{...n},a,...o]);i!=null&&Array.isArray(i)&&Reflect.apply([].push,l,[...i])}),l}on(n,a){this.callbacks.set(n,a)}}function Tn(e,n,a,o){const l=new Ho(n,e,a);if(o&&typeof o=="object")for(const r in o)l.on(r,o[r]);return l}function ri(e,n,a){const o=a;if(o[Se])return o[Se];const l=t.inject(Se,null),r=new Ho(l,a,e);if(n&&typeof n=="object")for(const i in n)r.on(i,n[i]);return o[Se]=r,t.provide(Se,r),t.onUnmounted(()=>{r.destroy(),o[Se]=void 0}),r}function Lt(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[Se]??t.inject(Se,null):t.inject(Se,null)}const at=e=>e.default??e;class si{error(n,a){const o=a,l=a||t.hasInjectionContext()?Lt(a):null;l?l.emit({name:"*",maxLevel:1},"setErrorTip",n):typeof o.setErrorTip=="function"&&o.setErrorTip(n)}reset(n){const a=n,o=n||t.hasInjectionContext()?Lt(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}success(n){const a=n,o=n||t.hasInjectionContext()?Lt(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}decorate(n,a,o){Array.isArray(n)||(n=[n]);const l=o,r=o||t.hasInjectionContext()?Lt(o):null,i=a.find(c=>c.required===!0||c.type==="required"&&c.required!==!1),s=n.find(c=>c.required===!0||c.type==="required"&&c.required!==!1);!i&&s?r?r.emit({name:"*"},"setRequired",!0):typeof l.setRequired=="function"&&l.setRequired(!0):i&&!s&&(r?r.emit({name:"*"},"setRequired",!1):typeof l.setRequired=="function"&&l.setRequired(!1),this.reset(o))}getValue(n){return n.modelValue}}let Ot=new si;function ii(e){Ot=e}function ci(e){Ot?Object.assign(Ot,e):Ot=e}function ui(e,n){at(lt).setValidator(e,n)}function di(e){at(lt).deleteValidator(e)}let Qr=["blur","clear"];function fi(e){Qr=e}function Gr(){return Qr}let Zr=["focus","change","setValue"];function mi(e){Zr=e}function Jr(){return Zr}function pi(e){at(lt).messages(e)}function xt(...e){const n=[];return e.forEach(a=>{a.forEach(o=>{const l=n.findIndex(r=>r.type===o.type);l!==-1&&n.splice(l,1),n.push(o)})}),n}function nn(e){return e.forEach(n=>{n.type==="required"&&(n.required===null||n.required===void 0)&&(n.required=!0),!n.type&&(n.required===!0||n.required===!1)&&(n.type="required")}),e}const Me=Symbol("ValidateSchemaKey");class _r{parent=null;validators={};attrRules=[];rules=[];descriptor;proxy;scope=null;constructor(n,a,o){this.parent=n,this.descriptor=a,this.proxy=o,(this.descriptor.validate??!0)&&this.init()}init(){if(this.descriptor.pureDataValidate===!0||!this.descriptor.valueName||!this.proxy)return;let n=this.proxy.$attrs;n&&(this.scope=t.effectScope(!0),this.scope.run(()=>{t.watchEffect(()=>{const a=nn(xt(this.attrRules,this.rules)),o=[];for(let r in n){let i=n[r];if(this.hasValidator(r,!0)){if(i===!1)continue;let c={type:r};i!==null&&typeof i=="object"&&Object.assign(c,i),o.push(c);continue}let s=this.getValidator(r);if(s!==null){let c={type:r,validator:s};o.push(c)}}this.attrRules=nn(o);const l=xt(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(l,a)})})}))}destroy(){this.scope&&(this.scope.stop(),this.scope=null),this.parent=null,this.proxy=null}execHandler(n,...a){const o=this.descriptor.validateHandler;if(o&&typeof o[n]=="function")return Reflect.apply(o[n],o,[...a]);const l=Ot;return l&&typeof l[n]=="function"?Reflect.apply(l[n],l,[...a]):null}decorate(n,a){this.descriptor.pureDataValidate!==!0&&this.execHandler("decorate",n,a,this.proxy)}success(){this.descriptor.pureDataValidate!==!0&&this.execHandler("success",this.proxy)}error(n){this.descriptor.pureDataValidate!==!0&&this.execHandler("error",n,this.proxy)}getValue(){return this.proxy===null?null:this.execHandler("getValue",this.proxy)}setValidator(n,a,o=!1){o?at(lt).setValidator(n,a):this.validators[n]=a}getValidator(n){let a=this.validators[n]??null;return a||(a=this.parent?.getValidator(n)??null),a}deleteValidator(n,a=!1){a?at(lt).deleteValidator(n):Reflect.deleteProperty(this.validators,n)}hasValidator(n,a=!1){if(a)return at(lt).hasValidator(n);{let o=Reflect.has(this.validators,n);return!o&&this.parent!==null&&(o=this.parent.hasValidator(n,!1)),o}}setRule(n){const a=xt(this.attrRules,this.rules);n===null?this.rules=[]:Array.isArray(n)?this.rules=nn(n):this.rules=nn([n]);const o=xt(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(o,a)})}clear(){this.proxy===null||this.descriptor.pureDataValidate===!0||this.execHandler("reset",this.proxy)}validate(){if(this.descriptor.validate??!0){let a=xt(this.attrRules,this.rules);const o=this.descriptor.fieldName??"value";if(a.length>0){const l={[`${o}`]:a},r=this.getValue(),i={[`${o}`]:r},s=at(lt),c=new s(l),d=this.proxy??i;return c.validate(i,{context:d}).then(u=>{if(u.pass)this.success();else{let g="error";Array.isArray(u.errors)&&u.errors.length>0&&(g=u.errors[0].message??g,u.errors=[u.errors[0]],u.errors[0].ref=d),this.error(g)}return u}).catch(u=>{const g=u.message??`${u}`;return this.error(g),u})}}return Promise.resolve({pass:!0})}}function $n(e,n,a){if(a.valueName=a.valueName??"modelValue",a.valueType=a.valueType??"string",!a.validateHandler&&a.valueName!=="modelValue"){const l=a.valueName;a.validateHandler={getValue(r){return r[l]}}}return new _r(n,a,e)}const gn=Symbol.for("EventEmitterKey");class es{register=new Map;proxy;constructor(n){this.proxy=n}destroy(){this.proxy=null,this.register.clear()}off(n,a){let o=this.register.get(n);if(o&&Array.isArray(o)){let l=o.findIndex(r=>r===a);l!==-1&&o.splice(l,1)}}on(n,a){let o=this.register.get(n);o||(o=new Array,this.register.set(n,o)),o.push(a)}emit(n,...a){const o=this.register.get(n);o&&o.forEach(l=>{try{Reflect.apply(l,null,[n,...a])}catch(r){console.error(r.message,r)}}),this.proxy&&Reflect.apply(this.proxy.$emit,this.proxy,[n,...a])}}function Qe(e,n){let a=null;return function(...o){a&&clearTimeout(a),a=setTimeout(()=>{a=null,Reflect.apply(e,null,[...o])},n)}}function yn(e,n){let a=0;return function(...o){const l=new Date().getTime();l-a<n||(a=l,Reflect.apply(e,null,[...o]))}}function hi(e,n){const a=Qe((o,l)=>{e=o,l()},n);return t.customRef((o,l)=>({get(){return o(),e},set(r){a(r,l)}}))}function gi(e){let n=!1;return function(...a){n||(n=!0,Reflect.apply(e,null,[...a]))}}function jo(e,n,a,o=0,l=!0){let r=n,i=0;if(l){const c=e();if(i++,c||i>a)return}const s=()=>{const c=e();i++,!(c||i>a)&&(r+=o,setTimeout(s,r))};setTimeout(s,r)}const Ee=Symbol("DomainKey"),pt=Symbol("DataItemsKey");class En{_parent=null;get parent(){return this._parent}set parent(n){this._parent=n}_name=null;get name(){return this._name}_broadcast=null;get broadcast(){return this._broadcast}set broadcast(n){this._broadcast=n}_validateSchema=null;get validateSchema(){return this._validateSchema}set validateSchema(n){this._validateSchema=n}_props=t.reactive({});constructor(n=null){this._name=n}destroy(){this._parent=null,this._broadcast=null,this._validateSchema=null,this._props={}}merge(n,a=[]){for(const o in n){const l=n[o];a.length>0&&a.indexOf(l)!==-1||(this._props[o]=l)}}has(n){if(Reflect.has(this._props,n)){const a=this._props[n];if(a!=null)return!0}return this.parent==null?!1:this.parent.has(n)}delete(n){Reflect.deleteProperty(this._props,n)}set(n,a){this._props[n]=a}get(n,a){if(Reflect.has(this._props,n)){const o=this._props[n];if(o!=null)return o}return this.parent==null?a:this.parent.get(n,a)}getForParent(n,a){return this.parent==null?a:this.parent.get(n,a)}getForSelf(n){return this._props[n]}getAll(n){const a=[];let o=this;for(;o!=null;){if(Reflect.has(o._props,n)){const l=o._props[n];a.push(l)}o=o._parent}return a}}const yi=new En;function yt(){return yi}function je(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[Ee]??t.inject(Ee,null):t.inject(Ee,null)}const io=Symbol("OriginalDateKey");function Wo(e,n,a=[],o){const l=t.getCurrentInstance();let r=l?.proxy,i=t.inject(Ee,null);i===null&&(i=yt());const s=e||n.prop||n.name;let c=new En(s);c.parent=i;const d=y=>{r[io]||g(y),c?.set("modelValue",y)},p=()=>c?.getForSelf("modelValue")??null,u=()=>r[io]??null,g=y=>{const b={};st(!0,b,t.toRaw(y)),r[io]=b};t.isReactive(n)||typeof n=="function"?t.watch(n,y=>{c?.merge(y,a)},{immediate:!0}):c.merge(n,a),n.modelValue&&g(n.modelValue);const k=(y,b)=>{c?.set(y,b)},v=y=>c?.getForSelf(y)??null;if(r[Ee]=c,t.provide(Ee,c),l!==null){const y=t.inject(Se,null),b=Tn(r,y,s,o);c.broadcast=b,r[Se]=b,t.provide(Se,b),r.broadcast=(h,S,...N)=>Reflect.apply(b.emit,b,[h,S,...N]);const f=t.inject(Me,null),m=$n(r,f,{componentName:""});c.validateSchema=m,r[Me]=m,t.provide(Me,m),r[pt]=new Map,r.validate=(h=!0)=>{const S=[];let N=null;const C={deep:!1};if(h===!0)N={name:"*"};else if(Array.isArray(h)&&h.length>0){const w=h;N={name:B=>B?w.indexOf(B)!==-1:!1}}else if(h!=null&&typeof h=="object"){const w=h;if(Object.assign(C,w),Array.isArray(w.include)&&w.include.length>0){const B=w.include;N={name:A=>A?B.indexOf(A)!==-1:!1}}else if(Array.isArray(w.exclude)&&w.exclude.length>0){const B=w.exclude;N={name:A=>A?B.indexOf(A)===-1:!1}}else N={name:"*"}}if(N){const w=b?.emitToChildren(N,"validate",C);w&&Reflect.apply([].push,S,w)}return S.length==1?S[0]:S.length>1?Promise.all(S).then(w=>{let B=[];return w.forEach(A=>{A.pass===!1&&Array.isArray(A.errors)&&(B=[...B,...A.errors])}),B.length>0?{pass:!1,errors:B}:{pass:!0}}):Promise.resolve({pass:!0})},r.setNameValidateRules=(h,S=!0,N=!1)=>{if(N===!0){Reflect.ownKeys(h).forEach(w=>{let B=String(w);const A={componentName:"",fieldName:B,pureDataValidate:!0};if(c){const T=os(c,B,A,b,m);r[pt].set(B,T);const $=h[B];$&&T.validateSchema.setRule($)}});return}if(S){const C=Reflect.ownKeys(h),w={name:B=>C.includes(B)};b?.emitToChildren(w,"setNameValidateRules",h,!1)}},r.clearValidate=(h=!0)=>{let S=null;if(h===!0)S={name:"*"};else if(Array.isArray(h)&&h.length>0){const N=h;S={name:C=>C?N.indexOf(C)!==-1:!1}}else if(h!=null&&typeof h=="object"){const N=h;if(Array.isArray(N.include)&&N.include.length>0){const C=N.include;S={name:w=>w?C.indexOf(w)!==-1:!1}}else if(Array.isArray(N.exclude)&&N.exclude.length>0){const C=N.exclude;S={name:w=>w?C.indexOf(w)===-1:!1}}else S={name:"*"}}S&&b?.emitToChildren(S,"clearValidate",!1)},r.resetFields=h=>{const S=p();if(!S)return;const N={};if(st(!0,N,u()??{}),Array.isArray(h))h.forEach(C=>{S[C]=N[C]});else if(h&&Array.isArray(h.include))(h.include??[]).forEach(w=>{S[w]=N[w]});else if(h&&Array.isArray(h.exclude)){let C=h.exclude??[];Reflect.ownKeys(N).forEach(w=>{C.includes(w)||(S[w]=N[w])})}else Object.assign(S,N);r.clearValidate(h)},r.setModelValue=(h,S)=>{!S||S===s?d(h):b?.emitToChildren({name:S},"setModelValue",h)},r.getModelValue=()=>p(),r.setDomainProperty=(h,S)=>{k(h,S)},r.getDomainProperty=h=>v(h)}return t.onUnmounted(function(){c?.validateSchema&&(c.validateSchema.destroy(),r[Me]=void 0,t.provide(Me,null)),c?.broadcast&&(c?.broadcast?.destroy(),r[Se]=void 0,t.provide(Se,null)),c?.destroy(),r[Ee]=void 0,t.provide(Ee,null),r[pt]&&(r[pt].clear(),r[pt]=void 0),r.broadcast=null,r.validate=null,r.setNameValidateRules=null,r.clearValidate=null,r.resetFields=null,r.setModelValue=null,r.getModelValue=null,r.setDomainProperty=null,r.getDomainProperty=null,c=null,r=null}),c}function ts(e,n,a=[]){let l=t.getCurrentInstance()?.proxy,r=t.inject(Ee,null);r===null&&(r=yt());const i=e||n.prop||n.name;let s=new En(i);return s.parent=r,t.isReactive(n)||typeof n=="function"?t.watch(n,c=>{s?.merge(c,a)},{immediate:!0}):s.merge(n,a),l[Ee]=s,t.provide(Ee,s),t.onUnmounted(()=>{s?.destroy(),l[Ee]=void 0,t.provide(Ee,null),s=null,l=null}),s}function ns(e,n,a){const l=je(e)?.get("rules");if(!l)return;let r=l[a];r&&(Array.isArray(r)||(r=[r]),n.setRule(r))}function Ae(e,n,a){const l=t.getCurrentInstance()?.proxy,r=n??"",i=t.inject(Se,null);let s=Tn(l,i,r,a);l[Se]=s,t.provide(Se,s),l.broadcast=(v,y,...b)=>s?Reflect.apply(s.emit,s,[v,y,...b]):null;const c=t.inject(Me,null);e.fieldName=e.fieldName??r;let d=$n(l,c,e);l[Me]=d,t.provide(Me,d),ns(l,d,r),l.validate=(v=null)=>{if(!d)return Promise.resolve({pass:!0});const y=[];let b=!1,f=!1;if(Array.isArray(v)&&v.indexOf(r)!==-1)f=!0,b=!0;else if(v&&typeof v=="object"){const m=v,h=m.ignoreDisabled??!0,S=m.ignoreReadonly??!0,N=m.ignoreHidden??!0;h===!0&&e.disabled===!0||S===!0&&e.readonly===!0||N===!0&&Vn(l.$el)?f=!1:(Array.isArray(m.include)&&m.include.indexOf(r)!==-1||Array.isArray(m.exclude)&&m.exclude.indexOf(r),f=!0),b=m.deep??!1}else typeof v=="boolean"&&(b=v),f=!0;if(f){const m=d?.validate();y.push(m)}if(b){let m=null;const h={deep:!1};if(v===!0)m={name:"*"};else if(Array.isArray(v)&&v.length>0){const S=v;m={name:N=>N?S.indexOf(N)!==-1:!1}}else if(v!=null&&typeof v=="object"){const S=v;if(Object.assign(h,S),Array.isArray(S.include)&&S.include.length>0){const N=S.include;m={name:C=>C?N.indexOf(C)!==-1:!1}}else if(Array.isArray(S.exclude)&&S.exclude.length>0){const N=S.exclude;m={name:C=>C?N.indexOf(C)===-1:!1}}else m={name:"*"}}if(m&&s){const S=s.emitToChildren(m,"validate",h);Reflect.apply([].push,y,S)}}return y.length==1?y[0]:y.length>1?Promise.all(y).then(m=>{let h=[];return m.forEach(S=>{S.pass===!1&&Array.isArray(S.errors)&&(h=[...h,...S.errors])}),h.length>0?{pass:!1,errors:h}:{pass:!0}}):Promise.resolve({pass:!0})},l.setValidateRule=v=>d?.setRule(v),l.setNameValidateRules=(v,y=!1)=>{const b=v[r];if(b&&d?.setRule(b),y&&s){const f={name:m=>Reflect.ownKeys(v).includes(m)};s.emitToChildren(f,"setNameValidateRules",v,!1)}},l.clearValidate=(v=null)=>{(!Array.isArray(v)||v.indexOf(n??"")!==-1)&&d?.clear();let y=null;if(v===!0)y={name:"*"};else if(Array.isArray(v)&&v.length>0){const b=v;y={name:f=>f?b.indexOf(f)!==-1:!1}}else if(v!=null&&typeof v=="object"){const b=v;if(Array.isArray(b.include)&&b.include.length>0){const f=b.include;y={name:m=>m?f.indexOf(m)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const f=b.exclude;y={name:m=>m?f.indexOf(m)===-1:!1}}else y={name:"*"}}y&&s&&s.emitToChildren(y,"clearValidate",!1)};let p=new es(l);l[gn]=p;const u=Qe((v="validate")=>{d&&(v==="reset"?d.clear():d.validate())},60);return(Array.isArray(e.validateCheckEvents)?e.validateCheckEvents:Gr()).forEach(v=>{p&&p.on(v,y=>{u("validate")})}),(Array.isArray(e.validateResetEvents)?e.validateResetEvents:Jr()).forEach(v=>{p&&p.on(v,y=>{u("reset")})}),t.onUnmounted(()=>{s?.destroy(),l[Se]=void 0,t.provide(Se,null),s=null,d?.destroy(),l[Me]=void 0,t.provide(Me,null),d=null,p?.destroy(),l[gn]=void 0,p=null,l.broadcast=null,l.validate=null,l.setValidateRule=null,l.setNameValidateRules=null,l.clearValidate=null}),{broadcast:s,validateSchema:d,emitEvent:(v,...y)=>{p&&Reflect.apply(p.emit,p,[v,...y])},onEvent:(v,y)=>{p&&Reflect.apply(p.on,p,[y])},offEvent:(v,y)=>{p&&Reflect.apply(p.off,p,[y])}}}function os(e,n,a,o,l){const r={},i=n??"",s={getValue(){const p=e.getForSelf("modelValue");return p?p[i]:null},isExist(){const p=e.getForSelf("modelValue");return p?Reflect.has(p,i):!1}};a.fieldName=i,a.validateHandler={getValue(p){return s.getValue()}};let c=$n({},l,a);r.validate=(p=null)=>{if(!s.isExist())return console.warn(`validate error: field [${i}] not exist`),Promise.resolve({pass:!0});const u=[];let g=!1,k=!1;if(Array.isArray(p)&&p.indexOf(i)!==-1)k=!0,g=!0;else if(p&&typeof p=="object"){const v=p;Array.isArray(v.include)&&v.include.indexOf(i)!==-1||Array.isArray(v.exclude)&&v.exclude.indexOf(i),k=!0,g=v.deep??!1}else typeof p=="boolean"&&(g=p),k=!0;if(k&&c){const v=c.validate();u.push(v)}if(g){let v=null;const y={deep:!1};if(p===!0)v={name:"*"};else if(Array.isArray(p)&&p.length>0){const b=p;v={name:f=>f?b.indexOf(f)!==-1:!1}}else if(p!=null&&typeof p=="object"){const b=p;if(Object.assign(y,b),Array.isArray(b.include)&&b.include.length>0){const f=b.include;v={name:m=>m?f.indexOf(m)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const f=b.exclude;v={name:m=>m?f.indexOf(m)===-1:!1}}else v={name:"*"}}if(v&&d){const b=d.emitToChildren(v,"validate",y);Reflect.apply([].push,u,b)}}return u.length==1?u[0]:u.length>1?Promise.all(u).then(v=>{let y=[];return v.forEach(b=>{b.pass===!1&&Array.isArray(b.errors)&&(y=[...y,...b.errors])}),y.length>0?{pass:!1,errors:y}:{pass:!0}}):Promise.resolve({pass:!0})},r.setValidateRule=p=>c?.setRule(p),r.setNameValidateRules=p=>{const u=p[i];u&&c?.setRule(u)};let d=Tn(null,o,i,r);return t.onUnmounted(()=>{c=null,d=null}),{broadcast:d,validateSchema:c}}function Vt(){let n=t.getCurrentInstance()?.proxy,a=new es(n);return n[gn]=a,t.onUnmounted(()=>{a?.destroy(),n[gn]=void 0,a=null,n=null}),{emitEvent:(o,...l)=>{a&&Reflect.apply(a.emit,a,[o,...l])},onEvent:(o,l)=>{a&&Reflect.apply(a.on,a,[l])},offEvent:(o,l)=>{a&&Reflect.apply(a.off,a,[l])}}}const he=e=>e?`${de(e)}px`:"";function de(e,n=-1){if(e==null)return 0;if(typeof e=="number")return e>0&&e<1&&n>0?e*n:e;if(e=e.trim().toLocaleLowerCase(),e.length===0)return 0;let a=e.indexOf("px");if(a!==-1)return Number(e.substring(0,a));if(a=e.indexOf("rem"),a!==-1){let l=Number(e.substring(0,a)),r=1;if(_e){const{fontSize:i}=window.getComputedStyle(document.documentElement,null),s=i.indexOf("px");s>0&&(r=Number(i.substring(0,s)))}return l*=r,l}if(a=e.indexOf("%"),a!==-1)return Number(e.substring(0,a))*n;const o=Number(e);return isNaN(o)?0:o}const Ge="PageStateKey";function Oe(e){const n={top:null,left:null,bottom:null,right:null};return e&&(e.top!==null&&e.top!==void 0&&(n.top=de(e.top)),e.left!==null&&e.left!==void 0&&(n.left=de(e.left)),e.bottom!==null&&e.bottom!==void 0&&(n.bottom=de(e.bottom)),e.right!==null&&e.right!==void 0&&(n.right=de(e.right))),n}function Ao(e,n,a={},o=!0,l=-1,r=-1,i=0,s=0){if(e.headerHeight=de(a.headerHeight??n.headerHeight??-1),e.headerPadding=Oe(a.headerPadding??n.headerPadding),e.footerHeight=de(a.footerHeight??n.footerHeight??-1),e.footerPadding=Oe(a.footerPadding??n.footerPadding),e.contentPadding=Oe(a.contentPadding??n.contentPadding),o){const c=a.height??n.height;c?e.height=de(c,r):e.height=de(r)-de(i,r)-de(s,r),e.width=de(a.width??n.width??0,l)}}function ls(e,n={}){const a={top:null,left:null,bottom:null,right:null},o={width:0,height:0,headerHeight:0,headerPadding:{...a},footerHeight:0,footerPadding:{...a},contentPadding:{...a},contentHeight:null,safeAreaTop:0,safeAreaBottom:0,safeAreaLeft:0,safeAreaRight:0,headerMounted:!1,footerMounted:!1},l=Object.assign(e.get("safeAreaInset")??{},n.safeAreaInset??{});l&&(o.safeAreaTop=de(l.top),o.safeAreaBottom=de(l.bottom),o.safeAreaLeft=de(l.left),o.safeAreaRight=de(l.right));const r=e.get("pageLayout");if(!r)return null;const i=e.get("rootWidth")??-1,s=e.get("rootHeight")??-1,c=e.get("headerBarHeight")??0,d=e.get("footerBarHeight")??0;Ao(o,r,n,!0,i,s,c,d);const p=t.reactive(o),u=e.getForParent(Ge);u&&(o.height=vn(e,u),o.width=bn(e,u),t.watch([()=>vn(e,u),()=>bn(e,u)],([k,v])=>{p.height=k,p.width=v}));const g=!u;return t.watch([()=>n.height,()=>e.get("pageLayout"),()=>e.get("rootWidth"),()=>e.get("rootHeight"),()=>e.get("headerBarHeight"),()=>e.get("footerBarHeight")],([k,v,y=-1,b=-1,f=0,m=0])=>{Ao(p,v,n,g,y,b,f,m)}),e.set(Ge,p),p}function xn(e){return e.get(Ge)}function Dn(e,n){if(n=n??e.get(Ge),n&&n.headerMounted){const a=n.safeAreaTop==-1?0:n.safeAreaTop;return n.headerAllHeight??n.headerHeight+a}return 0}function In(e,n){if(n=n??e.get(Ge),n&&n.footerMounted){const a=n.safeAreaBottom==-1?0:n.safeAreaBottom;return n.footerAllHeight??n.footerHeight+a}return 0}function vn(e,n){if(n=n??e.get(Ge),n){if(n.contentInnerHeight)return n.contentInnerHeight;const a=Dn(e,n),o=In(e,n);return n.height-a-o-(n.contentPadding.top??0)-(n.contentPadding.bottom??0)}return 0}function bn(e,n){return n=n??e.get(Ge),n?n.contentInnerWidth??n.width-(n.contentPadding.left??0)-(n.contentPadding.right??0):0}function vi(e,n){const a=e.get("isInnerPage");return typeof a=="function"?Reflect.apply(a,{},[n,e]):!1}function bi(e){return!!e.getForParent(Ge)}var kn=(e=>(e[e.Parent=0]="Parent",e[e.Near=1]="Near",e))(kn||{});function on(e,n){return e==null?!1:typeof n=="function"?n(e):!0}function Ve(e,n,a=1,o){const l=je();return l==null?e:a===0?t.computed(()=>{const r=l.getAll(n);for(let s=r.length-1;s>=0;s--){const c=r[s];if(on(c,o))return c}const i=e.value;return on(i,o)?i:null}):t.computed(()=>{const r=e.value;if(on(r,o))return r;const i=l.getAll(n);for(let s=0;s<i.length;s++){const c=i[s];if(on(c,o))return c}return null})}function Te(e){return Ve(e,"readonly",1)}function $e(e){return Ve(e,"disabled",1)}function qe(e,n="modelValue",a=null,o){const l=t.toRef(e,n);let r=l.value;typeof a=="function"&&(r=a(l.value));const i=t.ref(r);return t.watch(l,s=>{if(typeof a=="function"){const c=a(s);c!==i.value&&(i.value=c,o&&o("setValue",c))}else s!==i.value&&(i.value=s,o&&o("setValue",s))}),i}const as=new Map,Sn=new Map;let Vo=null;function ki(e){Vo=e}function rs(e,n,a){if(a){let o=Sn.get(a);o||(o=new Map,Sn.set(a,o)),o.set(e,n)}else as.set(e,n)}function et(e,n,a){!a&&Vo&&(a=Vo(e)??void 0);let o=null;if(a){let l=Sn.get(a);l&&(o=l.get(n))}return o||(o=as.get(n)),o}function Si(e,n){for(let a in e){const o=e[a];rs(a,o,n)}}function Ci(e){Sn.delete(e)}function wi(){return{top:0,left:0,bottom:0,right:0}}function Ni(){if(_e){const e=document.documentElement.clientWidth||document.body.clientWidth,n=document.documentElement.clientHeight||document.body.clientHeight;return{rootWidth:e,rootHeight:n,pageLayout:{}}}else return{rootWidth:-1,rootHeight:-1,pageLayout:{headerHeight:-1,footerHeight:-1}}}function Bi(e,n){if(n.componentPrefix){const a=e.indexOf("-");return`${n.componentPrefix}${e.slice(a)}`}return e}class Ai{packages;_version;get version(){return this._version}constructor(n,a){this.packages=n,this._version=a}install(n,a){a?.install!==!1&&this.packages.forEach(r=>{if(r.install)n.use(r);else if(r.name){const i=Bi(r.name,a);n.component(i,r)}});const o=["safeAreaInset","pageLayout","headerBarHeight","footerBarHeight"],l=yt();if(this.initPageLayout(a,l),a.autoAdjustPageLayout!==!1&&window.ResizeObserver){const r=yn(()=>{const s={...a},c=document.documentElement.clientWidth||document.body.clientWidth,d=document.documentElement.clientHeight||document.body.clientHeight;s.width=c,s.height=d,this.initPageLayout(s,l)},150);new window.ResizeObserver(r).observe(window.document.body)}for(const r in a)o.indexOf(r)===-1&&l.set(r,a[r])}initPageLayout(n,a){const o=n.headerBarHeight??0,l=n.footerBarHeight??0,r=st({},wi(),n.safeAreaInset),i=Ni(),s=st({},i.pageLayout,n.pageLayout);a=a??yt(),a.set("safeAreaInset",r),a.set("headerBarHeight",o),a.set("footerBarHeight",l),a.set("pageLayout",s),a.set("rootWidth",i.rootWidth),a.set("rootHeight",i.rootHeight)}setScopeGetter(n){ki(n)}setAPI(n,a,o){rs(n,a,o)}getAPI(n,a,o){return et(n,a,o)}batchSetAPI(n,a){Si(n,a)}clearScopeAPI(n){Ci(n)}getRootDomain(){return yt()}}function J(e){const n="fox-"+e;return{componentName:n,scope:e.replace("-",""),create(a){return a.baseName=e,a.name=n,a.install=o=>{o.component(a.name,a)},t.defineComponent(a)},createDemo(a){return a.baseName=e,a.name="demo-"+e,t.defineComponent(a)}}}const Vi=(e,n)=>{let a=document.body;const o=e.teleport||"body";o!="body"&&(zr(o)?a=document.querySelector(o):a=e.teleport);const l=document.createElement("view"),r=n.name?n.name+"-":"",i=e.id||new Date().getTime();l.id=r+i;let s={};hn(n.wrapper)?s=n.wrapper(a,l):s=n.wrapper;const c=t.createApp(s,e),d=n.components;return d&&d.forEach(p=>{c.use(p)}),a.appendChild(l),{instance:c.mount(l),unmount:()=>{c.unmount(),a.removeChild(l)}}},ss=(e,n)=>e?t.h(e,n):"";function Ie(e,n=null){if(n||(n=t.getCurrentInstance()),n&&n.proxy){let a=n.proxy;Object.assign(a,e)}}const pe={disabled:{type:[Boolean,String],required:!1,default:()=>null},readonly:{type:[Boolean,String],required:!1,default:()=>null},labelPosition:{type:String,required:!1,default:()=>null},labelWidth:{type:[String,Number],required:!1,default:()=>null},textAlign:{type:[String],required:!1,default:()=>null},hasBorder:{type:Boolean,required:!1,default:()=>!0}},ge={prop:{type:String,required:!1},label:{type:String,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}},is={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}},cs={name:{type:String,required:!1},prop:{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}},us=[];for(const e in cs)us.push(e);const Ti=Symbol.for("InnerPageScopeKey"),$i={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}},Ei=(e,n)=>({inheritAttrs:!0,props:{...pe,...is,...$i},setup(a,{slots:o}){const l=Wo(a.name,a),r=t.inject(Ti,!1);if(l){const p=ls(l,a);Ie({getPageContentHeight:()=>vn(l,p),getPageContentWidth:()=>bn(l,p),getPageHeaderHeight:()=>Dn(l,p),getPageFooterHeight:()=>In(l,p)}),p&&r&&(p.contentHeight="100%")}const i=t.computed(()=>({[e]:!0})),s=t.computed(()=>({})),c=t.getCurrentInstance(),d=(p,u=!1)=>{const g=c?.proxy;g&&typeof g.setNameValidateRules=="function"&&g.setNameValidateRules(p,!0,u)};return t.watch([()=>a.rules,()=>a.pureDataRules],([p,u],[g,k])=>{if(p&&g){const v=t.toRaw(g),y=t.toRaw(p),b=y?Reflect.ownKeys(y):[];(v?Reflect.ownKeys(v):[]).forEach(m=>{b.includes(m)||(y[m]=[])}),d(y)}if(u&&k){const v=t.toRaw(k),y=t.toRaw(u),b=y?Reflect.ownKeys(y):[];(v?Reflect.ownKeys(v):[]).forEach(m=>{b.includes(m)||(y[m]=[])}),d(y,!0)}},{deep:!0}),t.onMounted(()=>{if(a.rules){const p=t.toRaw(a.rules);d(p)}if(a.pureDataRules){const p=t.toRaw(a.pureDataRules);d(p,!0)}}),()=>{const p={class:i.value,style:s.value};return t.h("div",p,[o?.default?.()])}}}),{componentName:xi,create:Di,scope:mA}=J("page"),Yo=Di(Ei(xi));function Xo(e){const n=t.unref(e);return{width:n.offsetWidth,height:n.offsetHeight}}function qn(e){const n=t.unref(e),a=window.getComputedStyle(n,null),o=parseFloat(a.getPropertyValue("padding-left")),l=parseFloat(a.getPropertyValue("padding-right")),r=parseFloat(a.getPropertyValue("padding-top")),i=parseFloat(a.getPropertyValue("padding-bottom"));return{width:n.clientWidth-o-l,height:n.clientHeight-r-i}}const Ii=Symbol.for("InnerPageScopeKey"),ds={headerbar:{},radio:{},checkbox:{}};function qi(e){Object.assign(ds,e)}function Pn(){return ds}const Pi=(e,n,a,o=!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},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(l,r){const i=je(),s=i?xn(i):null,c=t.inject(Ii,!1),d=Pn(),p=e,u=t.computed(()=>{const q={[p]:!0,[`${p}--border`]:l.border,[`${p}--fixed`]:l.fixed};return c||(q[`${p}--safe-area-inset-top`]=l.safeAreaInsetTop),q}),g=t.computed(()=>({[`${p}__inner`]:!0,[`${p}__inner--${l.align}`]:!0})),k=l.height!==null&&l.height!==void 0?de(l.height):null,v=t.computed(()=>{const q={safeAreaTop:null,height:null,left:null,top:null,right:null,bottom:null};if(i&&s){const R=Oe(l.padding??s.headerPadding);return Object.assign(q,R),k&&(s.headerHeight=k),s.headerHeight>0&&(q.height=s.headerHeight),q.safeAreaTop=s.safeAreaTop===-1?0:s.safeAreaTop,q.safeAreaTop>0&&(q.top=q.safeAreaTop+(R.top??0),q.height&&q.height>0&&(q.height=q.height+q.safeAreaTop)),q}if(k&&(q.height=k),l.padding){const R=Oe(l.padding);Object.assign(q,R)}return q}),y=t.ref(null),b=()=>{if(s&&y.value&&!Vn(y.value)){if(!o){const q=Xo(y.value);s.headerAllHeight=q.height}return s.headerMounted=!0,!0}return!1};let f=null;t.onMounted(()=>{s&&(jo(b,50,5,50,!0),window.ResizeObserver&&y.value&&(f=new window.ResizeObserver(()=>{b()}),f.observe(y.value)))}),t.onUnmounted(()=>{s&&(s.headerMounted=!1,f&&(f.disconnect(),f=null))});const m=t.computed(()=>{const q={};return v.value.height!==null&&v.value.height!==void 0&&(q.height=`${v.value.height}px`),v.value.top!==null&&v.value.top!==void 0&&(q.paddingTop=`${v.value.top}px`),v.value.left!==null&&v.value.left!==void 0&&(q.paddingLeft=`${v.value.left}px`),v.value.right!==null&&v.value.right!==void 0&&(q.paddingRight=`${v.value.right}px`),v.value.bottom!==null&&v.value.bottom!==void 0&&(q.paddingBottom=`${v.value.bottom}px`),q}),h=t.computed(()=>!(v.value.height!==null&&v.value.height!==void 0&&v.value.height<=0));function S(){r.emit("back")}function N(){r.emit("click-title")}function C(){r.emit("click-right")}function w(){r.emit("click-right-text")}const B=()=>{if(!l.leftShow)return null;const q=[];if(r.slots.left)q.push(r.slots.left());else{if(r.slots.leftIcon){const R=t.h("view",{class:"left-icon",onClick:S},[r.slots.leftIcon()]);q.push(R)}else{const R=l.leftIcon??d.headerbar.Left??a,V=t.h("view",{class:"left-icon",onClick:S},[t.h(R)]);q.push(V)}if(l.leftText){const R=t.h("view",{class:"left-text",onClick:S},[l.leftText]);q.push(R)}}return q.length===0?null:t.h("view",{class:"fox-header-bar__left"},q)},A=()=>{if(!l.rightShow)return null;const q=[];if(r.slots.right)q.push(r.slots.right());else{if(l.rightText){const R=t.h("view",{class:"right-text",onClick:w},[l.rightText]);q.push(R)}if(r.slots.rightIcon){const R=t.h("view",{class:"right-icon",onClick:C},[r.slots.rightIcon()]);q.push(R)}else if(l.rightIcon){const R=t.h("view",{class:"right-icon",onClick:C},[t.h(l.rightIcon)]);q.push(R)}}return q.length===0?null:t.h("view",{class:"fox-header-bar__right"},q)},T=()=>{if(!l.titleShow)return null;const q=[],R=r.slots.default?r.slots.default():null;if(R)q.push(R);else{if(l.title){const V=t.h("view",{class:"title-text"},[l.title]);q.push(V)}if(r.slots.titleIcon){const V=t.h("view",{class:"title-icon",onClick:N},[r.slots.titleIcon()]);q.push(V)}else if(l.titleIcon){const V=t.h("view",{class:"title-icon",onClick:N},[t.h(l.titleIcon)]);q.push(V)}}return q.length===0?null:t.h("view",{class:"fox-header-bar__title"},q)},$=()=>{const q=[],R=r.slots.bottom?r.slots.bottom():null;return R&&q.push(R),q.length===0?null:t.h("view",{class:"fox-header-bar__bottom"},q)};return()=>{if(!h.value)return null;const q=[];if(r.slots.all)q.push(r.slots.all());else{const V=[],E=B();E&&V.push(E);const M=T();M&&V.push(M);const x=A();if(x&&V.push(x),V.length>0){const H=t.h("view",{class:g.value},V);q.push(H)}const j=$();j&&q.push(j)}if(q.length===0)return null;const R={class:u.value,style:m.value,ref:y};return t.h("view",R,q)}}}),{componentName:Mi,create:Li,scope:zi}=J("header-bar"),Qo=Li(Pi(Mi,zi,oe.Left,!1)),Oi=Symbol.for("InnerPageScopeKey");function Fi(e,n,a=!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(o,l){const r=je(),i=r?xn(r):null,s=t.inject(Oi,!1),c=e,d=t.computed(()=>{const b={[c]:!0,[`${c}--${o.align}`]:!0,[`${c}--border`]:o.border,[`${c}--fixed`]:o.fixed};return s||(b[`${c}--safe-area-inset-bottom`]=o.safeAreaInsetBottom),b}),p=o.height!==null&&o.height!==void 0?de(o.height):null,u=t.computed(()=>{const b={safeAreaBottom:null,height:null,left:null,top:null,right:null,bottom:null};if(r&&i){const f=Oe(o.padding??i.footerPadding);return Object.assign(b,f),p&&(i.footerHeight=p),i.footerHeight>0&&(b.height=i.footerHeight),b.safeAreaBottom=i.safeAreaBottom===-1?0:i.safeAreaBottom,b.safeAreaBottom>0&&(b.bottom=b.safeAreaBottom+(f.bottom??0),b.height&&b.height>0&&(b.height=b.height+b.safeAreaBottom)),b}if(p&&(b.height=p),o.padding){const f=Oe(o.padding);Object.assign(b,f)}return b}),g=t.ref(null),k=()=>{if(i&&g.value&&!Vn(g.value)){if(!a){const b=Xo(g.value);i.footerAllHeight=b.height}return i.footerMounted=!0,!0}return!1};let v=null;t.onMounted(()=>{i&&(jo(k,50,5,50,!0),window.ResizeObserver&&(v=new window.ResizeObserver(()=>{k()}),v.observe(g.value)))}),t.onUnmounted(()=>{i&&(i.footerMounted=!1,v&&(v.disconnect(),v=null))});const y=t.computed(()=>{const b={};return u.value.height!==null&&u.value.height!==void 0&&(b.height=he(u.value.height)),u.value.top!==null&&u.value.top!==void 0&&(b.paddingTop=he(u.value.top)),u.value.left!==null&&u.value.left!==void 0&&(b.paddingLeft=he(u.value.left)),u.value.right!==null&&u.value.right!==void 0&&(b.paddingRight=he(u.value.right)),u.value.bottom!==null&&u.value.bottom!==void 0&&(b.paddingBottom=he(u.value.bottom)),b});return()=>{const b=l.slots.default?l.slots.default():[],f={ref:g,class:d.value,style:y.value};return t.h("view",f,b)}}}}const{componentName:Ri,create:Ki,scope:Ui}=J("footer-bar"),Go=Ki(Fi(Ri,Ui,!1));function Hi(e,n){return{props:{padding:{type:[Object],required:!1}},setup(a){const o=je(),l=t.computed(()=>({[e]:!0})),r=o?xn(o):null,i=t.computed(()=>{const d={};if(o&&r){if(a.padding){const f=Oe(a.padding);Object.assign(r.contentPadding,f)}const p=Dn(o,r),u=In(o,r);let g="";r.contentHeight?g=`${r.contentHeight}`:g=`${r.height}px`,console.debug("[content]page height:",g),console.debug("[content]header height:",p),console.debug("[content]footer height:",u),console.debug("[content]padding:",r.contentPadding),d.height=g;let k=(r&&r.contentPadding&&r.contentPadding.top)??-1;(k>=0||p>0)&&(k=k<0?0:k,d.paddingTop=`${p+k}px`);let v=(r&&r.contentPadding&&r.contentPadding.bottom)??-1;(v>=0||u>0)&&(v=v<0?0:v,d.paddingBottom=`${u+v}px`);const y=(r&&r.contentPadding&&r.contentPadding.left)??-1;y>=0&&(d.paddingLeft=`${y}px`);const b=(r&&r.contentPadding&&r.contentPadding.right)??-1;return b>=0&&(d.paddingRight=`${b}px`),d}if(a.padding){const p=Oe(a.padding);p.left&&(d.paddingLeft=`${p.left}px`),p.top&&(d.paddingTop=`${p.top}px`),p.right&&(d.paddingRight=`${p.right}px`),p.bottom&&(d.paddingBottom=`${p.bottom}px`)}return d}),s=t.ref(null),c=Qe(()=>{if(r&&s.value){const d=qn(s.value);r.contentInnerHeight=d.height,r.contentInnerWidth=d.width}},0);return t.onMounted(()=>{c()}),o&&r&&t.watch([()=>i.value,()=>l.value],([])=>{c()}),{contentRef:s,classes:l,styles:i}}}}const{componentName:ji,create:Wi,scope:pA}=J("content"),Yi=Wi(Hi(ji));function Xi(e,n,a,o,l,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 ne=(e,n)=>{const a=e.__vccOpts||e;for(const[o,l]of n)a[o]=l;return a},Zo=ne(Yi,[["render",Xi]]),kt="GroupStateKey",fs=Symbol.for("GroupScopeKey");function Mn(){return t.inject(fs,!1)}function Ln(e=!0){t.provide(fs,e)}function Qi(e,n={}){Reflect.ownKeys(n).forEach(o=>{if(typeof o!="string")return;const l=n[o];Lr(l)||(e[o]=l)})}function Gi(e,n={}){const o={type:"grid",width:e.get("width",-1),column:-1,gutter:-1};Qi(o,n);const l=t.shallowRef(o),r=t.markRaw({layout:l,passport:0,order:{index:0}});return e.set(kt,r),r}function co(e,n,a=-1,o=-1,l=!1,r,i,s){const c=e.get(kt);if(!c)return;const d=e.get("groupLayout")??{};a===-1&&(a=d.column??1),o===-1&&(o=d.gutter??0),r||(r=d.minItemWidth??-1),i||(i=d.maxItemWidth??-1);const p=de(r),u=de(i);s||(s=d.type??"grid");const g=()=>{const k=n===""||n===-1,v=de(n);let y=me(a);const b=de(o);if(!k){let h=(v-(y-1)*b)/y;for(;u!==-1&&h>u;)y++,h=(v-(y-1)*b)/y;for(;p!==-1&&y>1&&h<p;)y--,h=(v-(y-1)*b)/y}let f=!1;const m=c.layout;m.value.width=n,m.value.column!==y&&(m.value.column=y,f=!0),m.value.gutter!==b&&(m.value.gutter=b,f=!0),m.value.type!==s&&(m.value.type=s,f=!0),f&&t.triggerRef(m)};if(l)g();else{const k=++c.passport;setTimeout(()=>{k===c.passport&&g()},50)}}function zn(e,n=!1){let a;return n?a=e.getForParent(kt):a=e.get(kt),a.layout}function On(e,n=!1){let a;return n?a=e.getForParent(kt):a=e.get(kt),a.order}function Wa(e,n=1){if(n==="stretch")return-1;const a=me(n);return a===-1?100:100*a/e}function Fn(e,n,a=1,o=0,l){const r={};let i=0;l?i=de(l):i=Wa(n.column,a),i>0&&(r.width=`${i}%`);const s=Wa(n.column,o);s>0&&(r["margin-left"]=`${s}%`);const c=n.gutter/2;return c>0&&(r["padding-left"]=`${c}px`,r["padding-right"]=`${c}px`),r}function Rn(e,n,a=1,o=0){if(a==="stretch"){const c=e.index%n.column,d=c+(n.column-c);return e.index=e.index+(d-c),{"grid-column":`${c+1} / -1`}}let l=me(a);if(l===-1){const c=e.index%n.column;return n.column,c==0?e.index=e.index+n.column:e.index=e.index+(n.column-c)+n.column,{"grid-column":"1 / -1"}}if(l>n.column){const c=e.index%n.column;return n.column,c==0?e.index=e.index+n.column:e.index=e.index+(n.column-c)+n.column,{"grid-column":"1 / -1"}}const r=me(o)%n.column;let i=(e.index+r)%n.column,s=i+l;return s>n.column?(i=0,s=i+l,e.index=e.index+(n.column-i)+l):e.index=e.index+r+l,r>0?{"grid-column":`${i+1} / span ${l}`}:{"grid-column-start":`span ${l}`}}const ms=Symbol("RollingStateKey");function Zi(e){t.provide(ms,e)}function Ji(){return t.inject(ms,null)}function To(e){let n=0;const a=window.getComputedStyle(e,null);if(a.getPropertyValue("box-sizing")==="content-box"){const l=parseFloat(a.getPropertyValue("padding-top")),r=parseFloat(a.getPropertyValue("padding-bottom"));n=e.clientHeight-l-r}else n=e.offsetHeight;return n}function _i(e){let n=To(e);if(n<=0){const a=e.cloneNode(!0),o=e.offsetWidth;a.style=`width: ${o}px; height: initial; overflow: initial; visibility: hidden;`,document.body.appendChild(a),n=To(a),console.info("2.---------- get expand height",n),document.body.removeChild(a)}return n}function ec(e,n,a){if(e<=0)return"1fr";const o=(e-(n-1)*a)/n;return o>0?`${o}px`:"1fr"}const tc={...pe,...is,...cs};function nc(e,n,a){return{props:tc,emits:["update:collapse","header-click"],setup(o,l){const r=Wo(o.prop??o.name,o,us),i=Gi(r,{type:o.type}),s=Mn();Ln(!0);const c=o.rollingDisplay?Ji():null,d=t.ref(null),p=t.computed(()=>o.rollingDisplay?c&&!c.disabled:!1),u=t.computed(()=>s&&r?zn(r,!0).value:null),g=t.getCurrentInstance(),k=(F,Y=!1)=>{const X=g?.proxy;X&&typeof X.setNameValidateRules=="function"&&X.setNameValidateRules(F,!0,Y)};t.watch([()=>o.rules,()=>o.pureDataRules],([F,Y],[X,K])=>{if(F&&X){const Z=t.toRaw(X),ee=t.toRaw(F),le=ee?Reflect.ownKeys(ee):[];(Z?Reflect.ownKeys(Z):[]).forEach(ce=>{le.includes(ce)||(ee[ce]=[])}),k(ee)}if(Y&&K){const Z=t.toRaw(K),ee=t.toRaw(Y),le=ee?Reflect.ownKeys(ee):[];(Z?Reflect.ownKeys(Z):[]).forEach(ce=>{le.includes(ce)||(ee[ce]=[])}),k(ee,!0)}},{deep:!0});const v=e,y=t.computed(()=>{const F={};if(F.height=E.value,o.width)o.width!=="auto"&&(F.width=he(o.width));else{const Y=s?On(r,!0):null;if(u.value&&Y){if(u.value.type==="grid"){const X=Rn(Y,u.value,o.span,o.offset);Object.assign(F,X)}else if(u.value.type==="flow"){const X=Fn(Y,u.value,o.span,o.offset,o.width);Object.assign(F,X)}}}return F}),b=t.computed(()=>{const F=i.layout.value.type;return F==="grid"||F==="flow"?{[`${v}--${F}`]:!0,[`${v}--${F}-justify-${o.justify}`]:!0,[`${v}--${F}-align-${o.align}`]:!0,[`${v}--gutter`]:!0}:{[`${v}--${F}`]:!0,[`${v}--gutter`]:!0}}),f=t.computed(()=>{if(i.layout.value.type==="grid"){let Y="";if(o.columnWidth)Y=`repeat(auto-fill, ${o.columnWidth})`;else{const X=ec(B.value,i.layout.value.column,i.layout.value.gutter);Y=`repeat(${i.layout.value.column}, ${X})`}return{"column-gap":`${i.layout.value.gutter}px`,"grid-template-columns":Y}}}),m=t.toRef(o,"gutter"),h=t.toRef(o,"column"),S=t.computed(()=>s||p.value?!0:ye(o.isWrap)),N=[],C=F=>{N.push(F)},w=()=>{let F=N.length;N.splice(0,F)},B=t.ref(-1),A=F=>{const Y=qn(F).width;Y>0&&Y!==B.value&&(B.value=Y)};co(r,B.value,h.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type),o.autoLayout&&t.watch([B,h,m],([F,Y,X])=>{i.order.index=0,co(r,F,Y,X,!1,o.minItemWidth,o.maxItemWidth,o.type)});const T=t.computed(()=>M.value?o.expandText??"":o.collapseText??""),$=t.computed(()=>({[`${e}__header-collapse-text`]:!0})),q=t.computed(()=>({[`${e}__header-collapse-icon`]:!0,"is-expand":!M.value,"is-collapse":M.value})),R=t.ref(),V=t.ref(),E=t.computed(()=>x.value||he(o.height)||""),M=t.ref(!1),x=t.ref(""),j=t.ref(!1);let H=-1;const z=(F,Y=!0)=>{const X=R.value;if(X&&M.value!==F){if(H=H<=0?_i(X):H,j.value=!0,Y)if(X.style["will-change"]="height",X.ontransitionend=function(){X.ontransitionend=null,this.style["will-change"]="auto",F||(x.value="",j.value=!1)},F){let K=0;o.collapseHeight?K=o.collapseHeight:V.value&&V.value.classList.contains(`${e}__header`)&&(K=V.value.offsetHeight),x.value=`${H}px`,t.nextTick(()=>{x.value=`${K}px`})}else x.value=`${H}px`;else if(F){let K=0;o.collapseHeight?K=o.collapseHeight:V.value&&V.value.classList.contains(`${e}__header`)&&(K=V.value.offsetHeight),x.value=`${K}px`}else j.value=!1,x.value=`${H}px`;M.value=F,l.emit("update:collapse",F)}};t.watch(()=>o.collapse,F=>{z(F)});const _=F=>{l.emit("header-click",F)},U=()=>{I()},I=F=>{F=F??!M.value,z(F)};Ie({toggleCollapse:I,doLayout:()=>{N[0]&&(A(N[0]),co(r,B.value,h.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type))}});let D=null,W=!0;const L=F=>{if(o.rules){const Y=t.toRaw(o.rules);k(Y)}if(o.pureDataRules){const Y=t.toRaw(o.pureDataRules);k(Y,!0)}if(_e&&(F&&z(ye(o.collapse),!1),o.autoLayout&&Array.isArray(N)&&N.length>0)){const Y=N[0];A(Y),window.ResizeObserver&&(D=new window.ResizeObserver(()=>{A(Y)}),D.observe(Y))}},O=()=>{D?.disconnect(),D=null},Q=!p.value||c?.acquire();Q&&(d.value=p.value?!0:null),t.onMounted(()=>{if(Q&&(L(W),W=!1),p.value&&c){let F=null,Y=c.initialHeight;c.observe(R.value,X=>{if(X!==d.value)if(X)d.value=!0,M.value||(x.value=""),F=setTimeout(()=>{F=null,d.value!==!1&&(L(W),W=!1)},100);else{if(F!==null&&clearTimeout(F),d.value=!1,!M.value)if(W)x.value=c.initialHeight;else{let K=To(R.value);K<=0?x.value=Y:(x.value=`${K}px`,Y=x.value)}W||O()}})}}),t.onUnmounted(()=>{D?.disconnect(),c&&c.unobserve(R.value)});const G=(F="right")=>{const Y=[];if(T.value){const ee={class:$.value},le=t.h("span",ee,[T.value]);Y.push(le)}const X={class:q.value},K=o.collapseIcon??a,Z=t.h(K,X);return Y.push(Z),Y.length>0?t.h("div",{class:{[`${v}__header-collapse`]:!0,[`is-${F}`]:!0},onClick:U},Y):null},te=(F,Y,X,K)=>{const Z={...b.value};return Y===0&&(Z[`${v}__first`]=!0),X>=K-1&&(Z[`${v}__last`]=!0),t.h("div",{ref:C,key:`${Y}`,class:Z,style:f.value},F)};return()=>{if(p.value&&d.value!==!0){const Z=o.tag||"div";return t.h(Z,{ref:R,prop:o.name,class:{[`${v}`]:!0,"is-collapse":j.value},style:y.value},[])}i.order.index=0;const F=[];let Y=0;if(l.slots.header){const Z={key:`${Y++}`,ref:V,class:{[`${v}__header`]:!0,[`${v}__first`]:!0},onClick:_},ee=t.h("div",Z,[l.slots.header()]);F.push(ee)}else{const Z=[],ee=o.collapsePosition==="left";if(ee&&o.showCollapse){const le=G("left");le&&Z.push(le)}if(o.title||l.slots.title){if(o.showMark){const le={class:{[`${v}__header-mark`]:!0}};o.markColor&&(le.style={background:o.markColor});const re=t.h("div",le);Z.push(re)}if(l.slots.title){const le=t.h("div",{class:{[`${v}__header-title`]:!0}},[l.slots.title()]);Z.push(le)}else if(o.title){const le=t.h("div",{class:{[`${v}__header-title`]:!0}},[o.title]);Z.push(le)}}if(l.slots.toolbar&&Z.push(l.slots.toolbar()),!ee&&o.showCollapse){const le=G("right");le&&Z.push(le)}if(Z.length>0){const le={key:`${Y++}`,ref:V,class:{[`${v}__header`]:!0,[`${v}__first`]:!0},onClick:_},re=t.h("div",le,Z);F.push(re)}}w();const X=l.slots.default?l.slots.default():[],K=i.layout.value.type;if(K==="grid"){const Z=te(X,Y++,0,X.length);F.push(Z)}else if(K==="flow"){const Z=te(X,Y++,0,X.length);F.push(Z)}else for(let Z=0;Z<X.length;Z++){const ee=X[Z],le=te([ee],Y++,Z,X.length);F.push(le)}if(S.value){const Z=o.tag||"div";return t.h(Z,{ref:R,prop:o.name,class:{[`${v}`]:!0,"is-collapse":j.value},style:y.value},[F])}else return F}}}}const{componentName:oc,create:lc,scope:ac}=J("group"),Jo=lc(nc(oc,ac,oe.RectUp));function rc(e){return e===window}const sc=/matrix\((.+)\)/,_o=e=>{const n=t.unref(e);if(!n)return{x:0,y:0};if(rc(n))return{x:0,y:0};let a=0,o=0,l=n;for(;l!==null;)a+=l.offsetLeft,o+=l.offsetTop,l=l.offsetParent;let r=0,i=0,s=0,c=0;for(l=n;l!==document;){i+=l.scrollTop,r+=l.scrollLeft;const{transform:d}=window.getComputedStyle(l);if(d){const p=sc.exec(d);if(p){let g=p[1].split(/\s*,\s*/);g.length==6&&(s+=Number(g[4]),c+=Number(g[5]))}}l=l.parentNode}return a-=r,o-=i,a+=s,o+=c,{x:a,y:o}};class ic{watchedListeners=[];add(n){this.watchedListeners.push(n)}remove(n){const a=this.watchedListeners.indexOf(n);a!==-1&&this.watchedListeners.splice(a,1)}size(){return this.watchedListeners.length}listen=()=>{this.watchedListeners.forEach(n=>{try{n()}catch{}})}}class cc{monitorRegister=new WeakMap;watch(n,a){let o=n.parentNode;const l=document.body.parentNode;for(;o&&o!==l;){let r=this.monitorRegister.get(o);r||(r=new ic,o.addEventListener("scroll",r.listen),o===document.body&&o.addEventListener("resize",r.listen),this.monitorRegister.set(o,r)),r.add(a),o=o.parentNode}}unwatch(n,a){let o=n.parentNode;const l=document.body.parentNode;for(;o&&o!==l;){let r=this.monitorRegister.get(o);r&&(r.remove(a),r.size()===0&&(this.monitorRegister.delete(o),o.removeEventListener("scroll",r.listen),o===document.body&&o.removeEventListener("resize",r.listen))),o=o.parentNode}}}const Ft=new cc,ps={price:{type:[Number,String],default:0},needSymbol:{type:Boolean,default:!0},symbol:{type:String,default:"¥"},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:uc,create:dc}=J("price"),fc=dc({props:{...ps},setup(e){const n=t.computed(()=>({[uc]:!0})),a=t.computed(()=>e.needSymbol?e.symbol:""),o=t.computed(()=>ve(e.price)==0?"":Nn(e.price,e.decimalLength,!0,me(e.digits),e.separator)),l=t.computed(()=>{let i=o.value;if(i.length==0)return"";let s=i.indexOf(".");return i.substring(0,s)}),r=t.computed(()=>{let i=o.value;if(i.length==0)return"";let s=i.indexOf(".");return i.substring(s+1)});return{classes:n,showSymbol:a,intText:l,decimalText:r}}}),mc=["innerHTML"],pc=["innerHTML"];function hc(e,n,a,o,l,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,mc)):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,pc)):t.createCommentVNode("",!0)],2)}const Ze=ne(fc,[["render",hc]]),{componentName:uo,create:gc}=J("hint-text"),yc=gc({components:{Price:Ze},props:{...ps,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,n){const a=t.ref({top:null,right:null,bottom:null,left:null}),o=t.ref({x:0,y:0}),l=t.ref(0),r=t.ref(0),i=t.ref(e.placement),s=t.ref(!1),c=t.ref(null),d=($,q,R,V,E,M)=>{const x=document.documentElement.clientWidth||document.body.clientWidth,j=document.documentElement.clientHeight||document.body.clientHeight,H=$.split("-");let z=[];H[0]==="top"?z=["top","bottom","right","left"]:H[0]==="bottom"?z=["bottom","top","right","left"]:H[0]==="left"?z=["left","top","bottom","right"]:H[0]==="right"&&(z=["right","top","bottom","left"]);const _={top:null,right:null,bottom:null,left:null},U=[];for(let I=0;I<z.length;I++){const P=z[I];if(U[0]=P,H[1]&&(U[1]=H[1]),P==="top"){const D=q.y-M-e.arrowSize-e.offset;if(D>=0){_.top=D;let W=0;H[1]==="start"?W=q.x:H[1]==="end"?W=q.x+R-E:W=q.x+R/2-E/2;const L=x-W-E;L<0?(W+=L,u.value=-L):u.value=0,_.left=W<0?0:W;break}}else if(P==="bottom"){const D=q.y+V+e.arrowSize+e.offset;if(D+M<=j){_.top=D;let W=0;H[1]==="start"?W=q.x:H[1]==="end"?W=q.x+R-E:W=q.x+R/2-E/2;const L=x-W-E;L<0?(W+=L,u.value=-L):u.value=0,_.left=W<0?0:W;break}}else if(P==="left"){const D=q.x-E-e.arrowSize-e.offset;if(D>=0){_.left=D;let W=0;H[1]==="start"?W=q.y:H[1]==="end"?W=q.y+V-M:W=q.y+V/2-M/2,_.top=W<0?0:W;break}}else if(P==="right"){const D=q.x+R+e.arrowSize+e.offset;if(D+E<=x){_.left=D;let W=0;H[1]==="start"?W=q.y:H[1]==="end"?W=q.y+V-M:W=q.y+V/2-M/2,_.top=W<0?0:W;break}}}return{bestPlacement:U.join("-"),bestInsetRect:_}},p=($,q,R=10)=>{if(!_e||q===!1||!$)return;o.value=_o(e.reference),l.value=e.reference.offsetWidth,r.value=e.reference.offsetHeight;const V=c.value.offsetHeight,E=c.value.offsetWidth,{bestPlacement:M,bestInsetRect:x}=d(e.placement,o.value,l.value,r.value,E,V);i.value=M,a.value=x,s.value=!0},u=t.ref(0),g=Qe(()=>{p(e.message,e.visible)},10),k=t.ref(e.visible);t.watch(()=>e.visible,$=>{k.value=$});const v=t.computed(()=>k.value&&y.value),y=t.ref(!0),b=Qe($=>{const q=$[0];q&&(y.value=q.isIntersecting)},10),f=new IntersectionObserver(b);t.watch([()=>e.message,()=>e.visible],([$,q])=>{setTimeout(()=>{p(e.message,e.visible)},0)}),t.onMounted(()=>{setTimeout(()=>{p(e.message,e.visible)},0),Ft.watch(e.reference,g),f.observe(e.reference)}),t.onBeforeUnmount(()=>{Ft.unwatch(e.reference,g),f.unobserve(e.reference),f.disconnect()});const m=t.computed(()=>{const $={[uo]:!0};return i.value.startsWith("top")?$["is-top"]=!0:i.value.startsWith("right")?$["is-right"]=!0:i.value.startsWith("bottom")?$["is-bottom"]=!0:i.value.startsWith("right")&&($["is-right"]=!0),e.size==="small"?$["is-small"]=!0:e.size==="large"&&($["is-large"]=!0),e.customClass&&typeof e.customClass=="string"&&($[`${e.customClass}`]=!0),$}),h=t.computed(()=>{const $={};a.value.top!==null&&($.top=`${a.value.top}px`),a.value.right!==null&&($.right=`${a.value.right}px`),a.value.bottom!==null&&($.bottom=`${a.value.bottom}px`),a.value.left!==null&&($.left=`${a.value.left}px`),e.autoFit&&($["min-width"]=`${l.value}px`);const q=document.documentElement.clientWidth||document.body.clientWidth;return $["max-width"]=`${q}px`,s.value&&($.opacity="1"),e.transition||($.transition="none"),e.zIndex&&($["z-index"]=`${e.zIndex}`),e.customStyle&&typeof e.customStyle=="object"&&Object.assign($,e.customStyle),$}),S=t.computed(()=>{const $=[`${uo}__content`];return e.customTextClass&&$.push(e.customTextClass),$}),N=t.computed(()=>{const $={};return e.customTextStyle&&typeof e.customTextStyle=="object"&&Object.assign($,e.customTextStyle),$}),C=t.computed(()=>({[`${uo}__arrow`]:!0})),w=t.computed(()=>{const $={};return e.showArrow?($.width=`${e.arrowSize}px`,$.height=`${e.arrowSize}px`,i.value==="top"?($.left="50%",$.bottom=`-${e.arrowSize}px`,$.transform=" translate(-50%, 0%)"):i.value==="top-start"?($.left=`${e.arrowOffset+u.value}px`,$.bottom=`-${e.arrowSize}px`):i.value==="top-end"?($.right=`${e.arrowOffset-u.value}px`,$.bottom=`-${e.arrowSize}px`):i.value==="right"?($.left=`-${e.arrowSize}px`,$.top="50%",$.transform=" translate(0%, -50%)"):i.value==="right-start"?($.left=`-${e.arrowSize}px`,$.top=`${e.arrowOffset}px`):i.value==="right-end"?($.left=`-${e.arrowSize}px`,$.bottom=`-${e.arrowOffset}px`):i.value==="bottom"?($.left="50%",$.top=`-${e.arrowSize}px`,$.transform=" translate(-50%, 0%)"):i.value==="bottom-start"?($.left=`${e.arrowOffset+u.value}px`,$.top=`-${e.arrowSize}px`):i.value==="bottom-end"?($.right=`${e.arrowOffset-u.value}px`,$.top=`-${e.arrowSize}px`):i.value==="left"?($.right=`-${e.arrowSize}px`,$.top="50%",$.transform=" translate(0%, -50%)"):i.value==="left-start"?($.right=`-${e.arrowSize}px`,$.top=`${e.arrowOffset}px`):i.value==="left-end"&&($.right=`-${e.arrowSize}px`,$.bottom=`-${e.arrowOffset}px`),$):{display:"none"}}),B=t.computed(()=>v.value&&e.closeOnClick),A=t.computed(()=>{const $={};return e.zIndex&&($["z-index"]=`${e.zIndex}`),$});return{show:v,tipRef:c,classes:m,styles:h,textClasses:S,textStyles:N,arrowClasses:C,arrowStyles:w,overlayShow:B,overlayStyle:A,onClickOverlay:()=>{k.value=!1,n.emit("update:visible",!1)}}}}),vc=["innerHTML"];function bc(e,n,a,o,l,r){const i=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:n[0]||(n[0]=(...s)=>e.onClickOverlay&&e.onClickOverlay(...s))},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(i,{key:0,price:e.message,position:"before",size:e.size},null,8,["price","size"])):(t.openBlock(),t.createElementBlock("span",{key:1,innerHTML:e.message},null,8,vc))],6),t.createElementVNode("div",{class:t.normalizeClass(e.arrowClasses),style:t.normalizeStyle(e.arrowStyles)},null,6)],6),[[t.vShow,e.show]])],64)}const hs=ne(yc,[["render",bc]]);class Kn{seed=new Date().getTime();constructor(n){this.seed=n??new Date().getTime()}get(){let n=this.seed++;return this.seed<0&&(this.seed=0),n}}const $o={},kc=new Kn,vt=new Map,Cn=e=>{if(e){const n=document.getElementById(e);vt.delete(e),n&&n.parentNode?.removeChild(n)}else{for(const n of vt.keys()){const a=document.getElementById(n);a&&a.parentNode?.removeChild(a)}vt.clear()}},Sc=e=>{e.unmount=Cn;const n=document.getElementById(e.id);if(n){const a=vt.get(e.id);a?e={...$o,...a,...e}:e={...$o,...e},e.transition=!1;const o=t.createVNode(hs,e);return t.render(o,n),e.id}},Cc=e=>{e.unmount=Cn;let n=e.id??`hinttext_${kc.get()}`;e={...$o,...e},e.id=n,vt.set(n,e);const a=document.createElement("div");a.id=e.id;const o=t.createVNode(hs,e);return t.render(o,a),document.body.appendChild(a),n},wc=e=>{if(!e){console.warn("[FoxUI HintText]: msg不能为空");return}},Tt={show(e,n,a={},o=!0){wc(n);const l=a.id;return l&&vt.has(l)?Sc({...a,message:n,reference:e}):(o&&Cn(),Cc({...a,message:n,reference:e}))},hide(e){Cn(e)},install(e){e.config.globalProperties.$hintText=Tt}};function Nc(e,n,a,o=!1){return{inheritAttrs:!0,props:{...pe,...ge},emits:["appear","disappear"],setup(l,r){const i=l.prop??r.attrs.name;Ae({componentName:e,validate:!1},i);const s=je(),c=Mn();Ln(!1);const d=t.computed(()=>c&&s?zn(s,!1).value:null),p=e,u=t.ref(null),g=t.computed(()=>{const K={[p]:!0,[`${p}__gutter`]:d.value&&d.value.type!=="flow",[`${p}__stretch`]:l.span==="stretch",[`${p}__input--border`]:ye(l.hasBorder)};if(K[l.errorMarkClass]=!!M.value,K[l.warnMarkClass]=!!V.value,K[l.infoMarkClass]=!!q.value,typeof u.value=="function"){const Z=u.value(i);K[Z]=!0}else if(typeof u.value=="string"){const Z=u.value;K[Z]=!0}return K}),k=t.ref(null),v=t.computed(()=>{const K={};if(l.width)l.width!=="auto"&&(K.width=he(l.width));else{const Z=c&&s?On(s,!1):null;if(d.value&&Z){if(d.value.type==="grid"){const ee=Rn(Z,d.value,l.span,l.offset);Object.assign(K,ee)}else if(d.value.type==="flow"){const ee=Fn(Z,d.value,l.span,l.offset,l.width);Object.assign(K,ee)}}}if(typeof k.value=="function"){const Z=k.value(i);Z&&Object.assign(K,Z)}else if(k.value&&typeof k.value=="object"){const Z=k.value;Object.assign(K,Z)}return K}),y=t.ref(null),b=t.computed({get:()=>y.value??ye(l.isRequired),set:K=>{y.value=K}}),f=()=>typeof l.label=="string"&&l.label.length>0||typeof r.slots.label=="function",m=Ve(t.toRef(l,"labelPosition"),"labelPosition",kn.Near),h=t.computed(()=>m&&m.value==="top"?"top":m&&m.value==="right"?"right":"left"),S=t.computed(()=>({[`${p}__main`]:!0,[`${p}__main--${h.value}`]:!0})),N=t.computed(()=>({label:!0,[`label--${h.value}`]:!0})),C=Ve(t.toRef(l,"labelWidth"),"labelWidth",kn.Near),w=t.computed(()=>C&&C.value?{width:he(C.value)}:{}),B=t.computed(()=>({"label--string":!0,"label--required":b.value})),A=t.computed(()=>({content:!0,[l.contentClass]:!0})),T=t.computed(()=>({...l.contentStyle})),$=t.shallowReactive({errorTip:"",errorIcon:null,warnTip:"",warnIcon:null,infoTip:"",infoIcon:null});Ie({setRequired(K){b.value=K},setErrorTip(K){$.errorTip=K},setErrorIcon(K){$.errorIcon=K},setWarnTip(K){$.warnTip=K},setWarnIcon(K){$.warnIcon=K},setInfoTip(K){$.infoTip=K},setInfoIcon(K){$.infoIcon=K},setCustomClassName(K){u.value=K},setCustomStyle(K){k.value=K}});const q=t.computed(()=>l.infoTip||$.infoTip),R=t.computed(()=>l.infoIcon||$.infoIcon),V=t.computed(()=>l.warnTip||$.warnTip),E=t.computed(()=>l.warnIcon||$.warnIcon),M=t.computed(()=>l.errorTip||$.errorTip),x=t.computed(()=>l.errorIcon||$.errorIcon),j=t.computed(()=>M.value?"error":V.value?"warn":q.value?"info":""),H=()=>j.value.length>0,z=t.computed(()=>j.value==="error"?M.value:j.value==="warn"?V.value:j.value==="info"?q.value:""),_=t.computed(()=>j.value==="error"?x.value:j.value==="warn"?E.value:j.value==="info"?R.value:null),U=t.computed(()=>{const K={[`${p}__tip`]:!0,[`${p}__tip--${j.value}`]:!0,[`${p}--animate`]:!0};return j.value==="error"&&l.errorClass?K[`${l.errorClass}`]=!0:j.value==="warn"&&l.warnClass?K[`${l.warnClass}`]=!0:j.value==="info"&&l.infoClass&&(K[`${l.infoClass}`]=!0),K}),I=t.computed(()=>{const K={};return m&&m.value==="top"||!f()?K["padding-left"]="0px":C&&C.value&&(K["padding-left"]=he(C.value)),K}),P=t.ref();let D="";t.watch([()=>l.hintVisible,()=>l.hintText,()=>l.hintType,()=>l.hintProps],([K,Z,ee,le])=>{P.value&&(K&&!ue(Z)?D?a.show(P.value,Z,{...le,id:D,type:ee},!0):D=a.show(P.value,Z,{...le,type:ee},!0):a.hide(D))});let W=null;const L=()=>{W||!P.value||(W=new IntersectionObserver(K=>{let Z=!1;for(let ee of K)if(ee.intersectionRatio>0){Z=!0,Z&&r.emit("appear",ee);break}Z||r.emit("disappear")}),W.observe(P.value))},O=()=>{!W||!P.value||(W.unobserve(P.value),W=null)};t.watch(()=>ye(l.appearListen),K=>{K?L():O()}),t.onMounted(()=>{ye(l.appearListen)&&L()}),t.onUnmounted(O);const Q=()=>{if(!f())return null;const K=[],Z=r.slots?.label?.()??l.label,ee={class:B.value},le=t.h("div",ee,[Z]);if(K.push(le),r.slots.fixedPreTip){const ce=r.slots.fixedPreTip();K.push(ce)}const re={class:N.value,style:w.value};return t.h("div",re,K)},G=()=>{const K=[];if(r.slots.prepend){const ee=r.slots.prepend();K.push(ee)}if(r.slots.default){const ee=r.slots.default();K.push(ee)}if(r.slots.append){const ee=r.slots.append();K.push(ee)}if(r.slots.fixedTip){const ee={class:[`${p}__fixed-tip`]},le=t.h("div",ee,[r.slots.fixedTip()]);K.push(le)}const Z={ref:P,class:A.value,style:T.value};return t.h("div",Z,K)},te=()=>{const K=_.value;return K?typeof K=="function"?t.h("div",{class:"fox-item__tip--icon"},[K()]):t.h("div",{class:"fox-item__tip--icon"},[t.h(K)]):null},F=()=>{const K=z.value;return K?typeof K=="function"?t.h("div",{class:"fox-item__tip--text"},[K()]):t.h("div",{class:"fox-item__tip--text"},[K]):null},Y=()=>{if(!H())return null;const K=[],Z=te();Z&&K.push(Z);const ee=F();ee&&K.push(ee);const le={class:U.value,style:I.value};return t.h("div",le,K)},X=()=>r.slots?.hide?.()??null;return()=>{const K=[],Z=[],ee=Q();ee&&Z.push(ee);const le=G();le&&Z.push(le);const re={class:S.value},ce=t.h("div",re,Z);K.push(ce);const Ne=Y();Ne&&K.push(Ne);const Ce=X();Ce&&K.push(Ce);const en={class:g.value,style:v.value,prop:l.prop};return t.h("div",en,K)}}}}const{componentName:Bc,create:Ac,scope:Vc}=J("item"),we=Ac(Nc(Bc,Vc,Tt,!1));function Tc(e,n){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(a,o){const l=e,r=t.computed(()=>({[l]:!0,[`${l}__stretch`]:a.span==="stretch",[`${l}__${a.align}`]:!0})),i=je(),s=Mn();Ln(!1);const c=t.computed(()=>{const d={};if(a.width)a.width!=="auto"&&(d.width=he(a.width));else if(s&&i){const p=zn(i,!1),u=On(i,!1);if(p.value&&u){if(p.value.type==="grid"){const g=Rn(u,p.value,a.span,a.offset);Object.assign(d,g)}else if(p.value.type==="flow"){const g=Fn(u,p.value,a.span,a.offset,a.width);Object.assign(d,g)}}}return d});return()=>{const d=[];if(o.slots.default){const u=o.slots.default();if(a.divide)for(let g=0;g<u.length;g++){if(g>0){const k=t.h("div",{class:{[`${l}__divide`]:!0}});d.push(k)}d.push(u[g])}else Reflect.apply([].push,d,u)}const p={class:r.value,style:c.value};return t.h("div",p,d)}}}}const{componentName:$c,create:Ec,scope:hA}=J("row-item"),el=Ec(Tc($c));function xc(e,n){return{props:{span:{type:[Number,String],required:!1,default:1},offset:{type:[Number,String],default:0},width:{type:[String,Number],required:!1}},setup(a,o){const l=je(),r=Mn();Ln(!1);const i=t.computed(()=>r&&l?zn(l,!1).value:null),s=e,c=t.computed(()=>({[s]:!0,[`${s}__gutter`]:i.value&&i.value.type!=="flow",[`${s}__stretch`]:a.span==="stretch"})),d=t.computed(()=>{const p={};if(a.width)a.width!=="auto"&&(p.width=he(a.width));else{const u=r&&l?On(l,!1):null;if(i.value&&u){if(i.value.type==="grid"){const g=Rn(u,i.value,a.span,a.offset);Object.assign(p,g)}else if(i.value.type==="flow"){const g=Fn(u,i.value,a.span,a.offset,a.width);Object.assign(p,g)}}}return p});return()=>{const p={class:c.value,style:d.value};return o.slots&&typeof o.slots.default=="function"?t.h("div",p,o.slots.default()):t.h("div",p)}}}}const{componentName:Dc,create:Ic,scope:gA}=J("slot-item"),tl=Ic(xc(Dc)),Ya={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 qc(e,n,a,o){return{props:{...pe,...ge,...Ya},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const i=$e(t.computed(()=>l.disabled)),s=Te(t.computed(()=>l.readonly)),{emitEvent:c}=Ae({componentName:e,get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),{toLocaleRefs:d}=se.useFoxI18n(n),p=d(l,["placeholder"]),u=t.ref(!1),g=qe(l,"modelValue",null,c),k=e,v=t.computed(()=>({[k]:!0,"is-disabled":i.value,"is-readonly":s.value})),y=Ve(t.computed(()=>l.textAlign),"textAlign"),b=t.computed(()=>{const E={};return y.value&&(E["text-align"]=y.value),E}),f=E=>{let x=E.target.value;l.type==="digit"&&(x=No(x,!0)),l.type==="number"&&(x=No(x,!1)),l.maxLength&&x.length>Number(l.maxLength)&&(x=x.slice(0,Number(l.maxLength))),g.value=x,c("update:modelValue",x,E),c("change",x,E)};let m=qe(l,"hintText"),h=t.ref(!1);const S=E=>{let x=E.target.value;u.value=!0,ue(m.value)||(h.value=!0),c("focus",x,E)},N=E=>{setTimeout(()=>{h.value&&(h.value=!1),u.value=!1},0);let x=E.target.value;l.maxLength&&x.length>Number(l.maxLength)&&(x=x.slice(0,Number(l.maxLength))),c("blur",x,E)},C=t.computed(()=>({[`${k}__append`]:!0,"is-disabled":i.value,"is-readonly":s.value})),w=t.computed(()=>{const E={};return r.slots.append&&!B.value&&!R.value&&(E.display="none"),E}),B=t.computed(()=>ve(l.unit)>0),A=t.computed(()=>!R.value),T=t.computed(()=>({[`${k}__unit`]:!0,hidden:!A.value})),$=E=>{g.value="",c("update:modelValue","",E),c("change","",E),c("clear","")},q=t.computed(()=>ye(l.clearable)&&!i.value&&!s.value),R=t.computed(()=>{let E=ve(g.value)>0;return ye(l.clearable)&&E&&u.value}),V=t.computed(()=>({action:!0,hidden:!R.value}));return()=>{const E={class:v.value,style:b.value,type:l.type,maxlength:l.maxLength,placeholder:p.placeholder.value,disabled:i.value,readonly:s.value,value:g.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:f,onFocus:S,onBlur:N},M=[],x=t.h("input",E);M.push(x);const j=[];if(q.value){const D={class:["action-icon"]},W=t.h(o,D),L={class:V.value,onClick:$},O=t.h("view",L,{default:()=>[W]});j.push(O)}if(B.value){const D=t.h("view",{class:T.value},[l.unit]);j.push(D)}const H={class:C.value,style:w.value},z=t.h("view",H,{default:()=>j});M.push(z);const _={default:()=>M};_.label=r.slots.default,_.prepend=r.slots.prepend,_.append=r.slots.append,_.fixedPreTip=r.slots.fixedPreTip,_.fixedTip=r.slots.fixedTip;const I={...dt(l,Ya),hintText:m.value,hintVisible:h.value};return l.prop&&(I.prop=`${l.prop}_item`),t.h(a,I,_)}}}}const{componentName:Pc,create:Mc,scope:Lc}=J("input-item"),nl=Mc(qc(Pc,Lc,we,oe.CircleClose));function Xa(e,n=0){let a=`${e}`,o=a.indexOf(".");if(o==-1)return a;let l=o;for(let r=a.length-1;r>=o;r--)if(a.charAt(r)!="0"){l=r;break}return l-o<n?l=o+n+1:l!=o&&(l+=1),l>a.length?a=a.padEnd(l,"0"):a=a.substring(0,l),a}function Qa(e,n,a=20){if(typeof n=="string"&&(n=me(n)),n==1||n==-1)return`${e}`;if(n==0)return"0";if(n>0){let o=qr(`${e}`,`${n}`);return Xa(o)}else{let o=Uo(`${e}`,Pr(`${n}`),20);return Xa(o)}}function zc(e,n=-1,a=!1,o=3,l=","){return Nn(e,n,a,o,l)}function Ga(e,n,a,o,l=!0){if(e==="")return"";if(e=Mr(e),n=me(n),n==1)return e;if(o)e=Qa(e,n),a&&(e=="0"&&l?e=`${e}.`.padEnd(me(a)+2,"0"):e=Uo(e,1,me(a)));else{let r=-1*n;e=Qa(e,r)}return e}function Za(e,n){let a={maxValid:!0,minValid:!0,message:""};if(n.min!==void 0){let o=ye(n.minInclude),l=So(e,n.min);if(o&&l==-1||!o&&(l==0||l==-1)){let r="请输入不小于 {0} 的数值";a.message=r.replace("{0}",n.min),a.minValid=!1}}if(n.max!=null){let o=ye(n.maxInclude),l=So(e,n.max);(o&&l==1||!o&&(l==0||l==1))&&(a.maxValid=!1)}return a}const Ja={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},textAlign:{type:String,required:!1},adjustPosition:{type:Boolean,default:!0},alwaysSystem:{type:Boolean,default:!1}};function Oc(e,n,a,o){return{props:{...pe,...ge,...Ja},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const i=$e(t.computed(()=>l.disabled)),s=Te(t.computed(()=>l.readonly)),{emitEvent:c}=Ae({componentName:e,get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),d=t.ref(!1),p=qe(l,"modelValue",null,c),u=t.ref("");t.watch([()=>p.value,()=>l.rates,()=>l.precision],([H,z,_])=>{if(ue(H)){u.value="";return}const U=Ga(H,z,_,!1);u.value!==U&&(u.value=U)},{immediate:!0});const g=t.computed(()=>{let H="";return d.value&&(H=u.value),H}),{t:k}=se.useFoxI18n(n),v=t.computed(()=>{let H=l.placeholder??"";return!d.value&&!ue(u.value)?H=zc(u.value,l.decimalLength,l.autoPadding,l.digits,l.separator):H=ue(H)?k(["placeholder"]):H,H}),y=e,b=t.computed(()=>({[y]:!0,[`${y}__placeholder`]:u.value.length>0,"is-disabled":i.value,"is-readonly":s.value})),f=Ve(t.computed(()=>l.textAlign),"textAlign"),m=t.computed(()=>{const H={};return f.value&&(H["text-align"]=f.value),H}),h=t.ref(""),S=t.computed(()=>{let H=h.value;return ue(H)&&(H=l.errorTip??""),H}),N=t.ref(""),C=t.ref(!1),w=H=>{let _=H.target.value;if(ue(_)){u.value="",p.value="",c("update:modelValue","",H),c("change","",H),ye(l.showTip)&&C.value&&(C.value=!1);return}if(_.length>=2){let U=_;if(U.charAt(0)=="-"&&(U=U.substring(1)),U.length>=2&&U.charAt(0)=="0"&&U.charAt(1)!="."){t.triggerRef(u);return}}if(_!="-"){if(!jr(_)){t.triggerRef(u);return}if(l.integerLength!=-1&&Wr(_)>Number(l.integerLength)){t.triggerRef(u);return}if(l.decimalLength&&l.decimalLength!=-1&&Yr(_)>Number(l.decimalLength)){t.triggerRef(u);return}let U=Za(_,l);if(U.maxValid===!1){h.value=U.message,t.triggerRef(u);return}}else if(l.min!=null&&me(l.min)>=0){t.triggerRef(u);return}N.value=_,ye(l.showTip)&&(C.value=_.length>0),u.value=_,p.value=Ga(_,l.rates,l.precision,!0),c("update:modelValue",p.value,H),c("change",p.value,H)},B=H=>{if(d.value=!0,ye(l.showTip)){let z=u.value;ue(z)&&(z=l.hintText),ue(z)||(N.value=z,C.value=!0)}h.value="",c("focus",p.value,H)},A=H=>{if(setTimeout(()=>{d.value=!1,ye(l.showTip)&&C.value===!0&&(C.value=!1)},0),!ue(u.value)){let z=Za(u.value,l);if(z.minValid===!1||z.maxValid===!1){h.value=z.message;return}}c("update:modelValue",p.value,H),c("blur",p.value,H)},T=t.computed(()=>({[`${y}__append`]:!0,"is-disabled":i.value,"is-readonly":s.value})),$=t.computed(()=>{const H={};return r.slots.append&&!q.value&&!x.value&&(H.display="none"),H}),q=t.computed(()=>ve(l.unit)>0),R=t.computed(()=>!x.value),V=t.computed(()=>({[`${y}__unit`]:!0,hidden:!R.value})),E=H=>{p.value="",c("update:modelValue","",H),c("change","",H),c("clear","")},M=t.computed(()=>ye(l.clearable)&&!i.value&&!s.value),x=t.computed(()=>{let H=ve(p.value)>0;return ye(l.clearable)&&H&&d.value}),j=t.computed(()=>({action:!0,hidden:!x.value}));return()=>{let H={class:b.value,style:m.value,type:"digit",maxlength:l.maxLength,placeholder:v.value,disabled:i.value,readonly:s.value,value:g.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:w,onFocus:B,onBlur:A},z=[],_=t.h("input",H);z.push(_);let U=[];if(M.value){const O={class:["action-icon"]},Q=t.h(o,O),G={class:j.value,onClick:E},te=t.h("view",G,{default:()=>[Q]});U.push(te)}if(q.value){const O=t.h("view",{class:V.value},[l.unit]);U.push(O)}const I={class:T.value,style:$.value},P=t.h("view",I,{default:()=>U});z.push(P);const D={default:()=>z};D.label=r.slots.default,D.prepend=r.slots.prepend,D.append=r.slots.append,D.fixedPreTip=r.slots.fixedPreTip,D.fixedTip=r.slots.fixedTip;const L={...dt(l,Ja),errorTip:S.value,hintText:N.value,hintVisible:C.value,hintType:"number"};return l.prop&&(L.prop=`${l.prop}_item`),t.h(a,L,D)}}}}const{componentName:Fc,create:Rc,scope:Kc}=J("money-item"),ol=Rc(Oc(Fc,Kc,we,oe.CircleClose)),Eo={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:Uc,create:Hc,scope:jc}=J("textarea"),Wc=Hc({props:{...Eo},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:n}){let{toLocaleRefs:a}=se.useFoxI18n(jc);const o=a(e,["placeholder"]),l=t.ref(),r=t.computed(()=>{const g=Uc;return{[g]:!0,[`${g}--disabled`]:e.disabled}});t.onMounted(()=>{e.modelValue&&c(String(e.modelValue)),e.autosize&&t.nextTick(s)});const i=t.computed(()=>({textAlign:e.textAlign})),s=()=>{let g=l.value;g.style.height="auto";let k=g.scrollHeight;if(typeof e.autosize=="object"){const{maxHeight:v,minHeight:y}=e.autosize;v!==void 0&&(k=Math.min(k,v)),y!==void 0&&(k=Math.max(k,y))}k&&(console.info("----------- height",k),g.style.height=k+"px")};t.watch(()=>e.modelValue,()=>{e.autosize&&t.nextTick(s)});const c=(g,k)=>{e.maxLength&&g.length>Number(e.maxLength)&&(g=g.substring(0,Number(e.maxLength))),n("update:modelValue",g,k),n("change",g,k)};return{...o,textareaRef:l,classes:r,styles:i,change:g=>{const k=g.target;c(k.value,g)},focus:g=>{e.disabled||e.readonly||n("focus",g)},blur:g=>{if(e.disabled||e.readonly)return;let v=g.target.value;c(v,g),n("blur",{value:v,event:g})}}}}),Yc=["rows","disabled","readonly","value","maxlength","placeholder","autofocus"],Xc={key:0,class:"fox-textarea__limit"};function Qc(e,n,a,o,l,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:n[0]||(n[0]=(...i)=>e.change&&e.change(...i)),onBlur:n[1]||(n[1]=(...i)=>e.blur&&e.blur(...i)),onFocus:n[2]||(n[2]=(...i)=>e.focus&&e.focus(...i)),maxlength:e.maxLength,placeholder:e.placeholder,autofocus:e.autofocus},null,44,Yc),e.limitShow?(t.openBlock(),t.createElementBlock("view",Xc,t.toDisplayString(e.modelValue?e.modelValue.length:0)+"/"+t.toDisplayString(e.maxLength),1)):t.createCommentVNode("",!0)],2)}const Un=ne(Wc,[["render",Qc]]);function Gc(e,n,a,o){return{props:{...pe,...ge,...Eo},emits:["update:modelValue","change","blur","focus","setValue"],setup(l,r){const i=$e(t.computed(()=>l.disabled)),s=Te(t.computed(()=>l.readonly)),{emitEvent:c}=Ae({componentName:e,get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),d=qe(l,"modelValue",null,c),p=y=>{d.value=y,c("update:modelValue",y,{}),c("change",y,{})};let u=qe(l,"hintText"),g=t.ref(!1);const k=y=>{ue(u.value)||(g.value=!0),c("focus",d.value,y)},v=y=>{setTimeout(()=>{g.value&&(g.value=!1)},0),c("blur",d.value,y)};return()=>{const b={...be(l,Eo),disabled:i.value,readonly:s.value,value:d.value,"onUpdate:modelValue":p,onFocus:k,onBlur:v},f=[],m=t.h(o,b);f.push(m);const h={default:()=>f};h.label=r.slots.default,h.prepend=r.slots.prepend,h.append=r.slots.append,h.fixedPreTip=r.slots.fixedPreTip,h.fixedTip=r.slots.fixedTip;const N={...be(l,ge,pe)};return l.prop&&(N.prop=`${l.prop}_item`),t.h(a,N,h)}}}}const{componentName:Zc,create:Jc,scope:_c}=J("textarea-item"),ll=Jc(Gc(Zc,_c,we,Un));function eu(e){return e===window}const De=e=>{const n=t.unref(e);if(eu(n)){const a=n.innerWidth,o=n.innerHeight;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}return n&&n.getBoundingClientRect?n.getBoundingClientRect():{top:0,left:0,right:0,bottom:0,width:0,height:0}},_a=10;function gs(e,n){return e>n&&e>_a?"horizontal":n>e&&n>_a?"vertical":""}function al(){const e=window.navigator.userAgent;return"ontouchstart"in window||e.indexOf("touch")!==-1||e.indexOf("mobile")!==-1}function rl(){const e={startX:0,startY:0,startTime:0,duration:0,moveX:0,moveY:0,deltaX:0,deltaY:0,offsetX:0,offsetY:0,direction:""},n=()=>e.direction==="vertical",a=()=>e.direction==="horizontal",o=()=>{e.deltaX=0,e.deltaY=0,e.offsetX=0,e.offsetY=0,e.direction="",e.startTime=0};return{move:i=>{if(i.touches){const d=i.touches[0];e.deltaX=d.clientX-e.startX,e.deltaY=d.clientY-e.startY,e.moveX=d.clientX,e.moveY=d.clientY}else{const c=i;e.deltaX=c.clientX-e.startX,e.deltaY=c.clientY-e.startY,e.moveX=c.clientX,e.moveY=c.clientY}e.offsetX=Math.abs(e.deltaX),e.offsetY=Math.abs(e.deltaY),e.duration=Date.now()-e.startTime,e.direction||(e.direction=gs(e.offsetX,e.offsetY))},start:i=>{if(o(),i.touches){const d=i.touches[0];e.startX=d.clientX,e.startY=d.clientY}else{const c=i;e.startX=c.clientX,e.startY=c.clientY}e.startTime=Date.now()},reset:o,isVertical:n,isHorizontal:a,state:e}}function tt(){const e=t.ref(0),n=t.ref(0),a=t.ref(0),o=t.ref(0),l=t.ref(0),r=t.ref(0),i=t.ref(0),s=t.ref(0),c=t.ref(0),d=t.ref(0),p=t.ref(""),u=()=>p.value==="vertical",g=()=>p.value==="horizontal",k=()=>{i.value=0,s.value=0,c.value=0,d.value=0,p.value="",a.value=0};return{move:b=>{if(b.touches){const h=b.touches[0];i.value=h.clientX-e.value,s.value=h.clientY-n.value,l.value=h.clientX,r.value=h.clientY}else{const m=b;i.value=m.clientX-e.value,s.value=m.clientY-n.value,l.value=m.clientX,r.value=m.clientY}c.value=Math.abs(i.value),d.value=Math.abs(s.value),o.value=Date.now()-a.value,p.value||(p.value=gs(c.value,d.value))},start:b=>{if(k(),b.touches){const h=b.touches[0];e.value=h.clientX,n.value=h.clientY}else{const m=b;e.value=m.clientX,n.value=m.clientY}a.value=Date.now()},reset:k,startX:e,startY:n,startTime:a,duration:o,moveX:l,moveY:r,deltaX:i,deltaY:s,offsetX:c,offsetY:d,direction:p,isVertical:u,isHorizontal:g}}let tu=2e3;const er=()=>tu++,Fe={visible:{type:Boolean,default:!1},zIndex:{type:[String,Number]},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,Array],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:{}}},nu=(e,n)=>({components:n,props:{...Fe},emits:["click-pop","click-close-icon","open","close","opend","closed","click-overlay","update:visible"],setup(a,{emit:o}){const l=t.reactive({zIndex:0,showSlot:!0,closed:a.closeable});a.visible&&(l.zIndex=er());const r=t.computed(()=>{const y=e,b=[y,`${y}--${a.position}`];return a.round&&b.push("round"),a.position==="bottom"&&a.safeAreaInsetBottom&&b.push(`${y}--${a.position}--safebottom`),typeof a.popClass=="string"?b.push(a.popClass):Array.isArray(a.popClass)&&a.popClass.forEach(f=>{b.push(f)}),b}),i=t.computed(()=>({zIndex:l.zIndex,transitionDuration:`${a.duration}s`,...a.style})),s=t.computed(()=>a.transition?a.transition:`fox-popup-slide-${a.position}`),c=()=>{o("update:visible",!0),a.zIndex?l.zIndex=a.zIndex:l.zIndex=er(),a.destroyOnClose&&(l.showSlot=!0),o("open")},d=()=>{o("update:visible",!1),o("close"),a.destroyOnClose&&setTimeout(()=>{l.showSlot=!1},+a.duration*1e3)},p=y=>{o("click-pop",y)},u=y=>{y.stopPropagation(),o("click-close-icon",y),o("update:visible",!1)},g=y=>{o("click-overlay",y),a.closeOnClickOverlay&&o("update:visible",!1)},k=y=>{o("opend",y)},v=y=>{o("closed",y)};return t.watch(()=>a.visible,y=>{a.visible?c():d()}),t.watch(()=>a.closeable,y=>{l.closed=y}),{...t.toRefs(l),popStyle:i,transitionName:s,classes:r,onClick:p,onClickCloseIcon:u,onClickOverlay:g,onOpened:k,onClosed:v}}}),ys={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:360}},xo={...Fe,...ys,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},cancelText:{type:String},clearText:{type:String},confirmText:{type:String},isAutoBackFill:{type:[Boolean],default:()=>!0},poppable:{type:[Boolean],default:()=>!0}};let vs=36;function ou(){return vs}function lu(e){vs=e}function ze(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Do(e,n){return typeof e.childrenKey=="string"&&e.childrenKey.length>0?n[e.childrenKey]:n.children??null}function au(e,n,a){typeof e.childrenKey=="string"&&e.childrenKey.length>0&&(n[e.childrenKey]=a),n.children=a}function ct(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function tr(e,n){return typeof e.itemOptions=="function"?e.columnOptions(n):e.columnOptions}let ru=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);const l=et(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(xe(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function su(){const e=t.getCurrentInstance();return new ru(e.proxy)}function nr(e,n,a){const o=ze(e,n),l=ze(e,a);if(o!==l)return!1;const r=ct(e,n),i=ct(e,a);return r===i}function iu(e,n,a,o){if(a.length==0)return[];Array.isArray(n)||(n=[n]);const l=[],r=e.valueType??"value";if(o==="singleColumn"||o==="multipleColumn")for(let i=0;i<n.length&&i<a.length;i++){const s=n[i];let d=a[i].findIndex(p=>{if(r==="text")return ze(e,p)===s;if(r==="value"){let u=ct(e,p);return u==null&&(u=ze(e,p)),u===s}else if(r==="item")return nr(e,p,s)});if(d==-1)break;l.push(d)}else{let i=a[0];for(let s=0;s<n.length;s++){const c=n[s];let d=i.findIndex(u=>{if(r==="text")return ze(e,u)===c;if(r==="value"){let g=ct(e,u);return g==null&&(g=ze(e,u)),g===c}else if(r==="item")return nr(e,u,c)});if(d==-1)break;l.push(d);const p=Do(e,i[d]);if(!Array.isArray(p))break;i=p}}return l}function or(e,n,a,o){if(a.length==0)return null;const l={texts:[],values:[],items:[]},r=e.valueType??"value";if(o==="singleColumn"||o==="multipleColumn")for(let i=0;i<n.length&&i<a.length;i++){const s=a[i];let c=n[i];c<0&&c>=s.length&&(c=0);const d=s[c],p=ze(e,d);if(l.texts.push(p),l.items.push(d),r==="text")l.values.push(p);else if(r==="value"){let u=ct(e,d);u==null&&(u=p),l.values.push(u)}else l.values.push(d)}else{let i=a[0];for(let s=0;s<n.length;s++){let c=n[s];c<0&&c>=i.length&&(c=0);const d=i[c],p=Object.assign({},d);p.children=null;const u=ze(e,d);if(l.texts.push(u),l.items.push(p),r==="text")l.values.push(u);else if(r==="value"){let g=ct(e,d);g==null&&(g=u),l.values.push(g)}else l.values.push(p);if(!Array.isArray(d.children))break;i=d.children}}return l}function lr(e){return{text:e,value:e}}const cu=15,uu=300,du=200,{create:fu}=J("picker-column");function mu(e){e.stopPropagation()}function pu(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),mu(e)}const hu=fu({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},visible:{type:Boolean,default:!1},...ys},emits:["click","change","update:modelValue"],setup(e,{emit:n}){const a=t.computed(()=>({"fox-picker__list":!0})),o=t.computed(()=>({height:`${me(e.visibleItemCount)*+e.itemHeight}px`})),l=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)),i=w=>w>=u.currIndex+8||w<=u.currIndex-8,s=t.computed(()=>({transition:`transform ${u.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`rotate3d(1, 0, 0, ${u.deg})`,top:`${r.value}px`})),c=w=>`transform: rotate3d(1, 0, 0, ${-u.rotation*w}deg) translate3d(0px, 0px, 104px)`,d=t.computed(()=>({transition:`transform ${u.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`translate3d(0, ${u.scrollDistance+r.value}px, 0)`})),p=t.ref(null),u=t.reactive({currIndex:e.modelValue,startDistance:0,scrollDistance:0,scrollTime:0,moving:!1,rotation:20,deg:0,transitionEndTrigger:null}),g=w=>ze(e,w),k=w=>ct(e,w),v=tt(),y=()=>{u.transitionEndTrigger&&(u.transitionEndTrigger(),u.transitionEndTrigger=null)},b=(w,B=!1,A=!1)=>{if(u.currIndex=w,B){const T=()=>{u.moving=!1,n("update:modelValue",w),n("change",w)};A?u.transitionEndTrigger=T:T()}},f=(w,B,A)=>{let T=w+u.startDistance;if(B==="end"){const $=-(e.source.length-1)*e.itemHeight;T<$&&(T=$),T>0&&(T=0);let q=Math.abs(Math.round(-T/e.itemHeight));const R=-q*e.itemHeight,V=`${(q+1)*u.rotation}deg`,E=A?A>0:!1;b(q,!0,E),m(R,B,A,V)}else{let $=(-T/e.itemHeight+1)*u.rotation;const q=(e.source.length+1)*u.rotation,R=0;if($=Math.min(Math.max($,R),q),e.threeDimensional&&($<R||$>q))return;m(T,null,void 0,`${$}deg`)}},m=(w=0,B,A=du,T)=>{B==="end"?u.scrollTime=A:u.scrollTime=0,u.deg=T,u.scrollDistance=w},h=(w,B)=>(w=Math.abs(w/B)/.003*(w<0?-1:1),w),S=w=>{e.readonly||(u.startDistance=u.scrollDistance,v.start(w),u.transitionEndTrigger=null)},N=w=>{e.readonly||(u.moving=!0,v.move(w),v.isVertical()&&(u.moving=!0,pu(w)),f(v.deltaY.value,"",0))},C=()=>{if(e.readonly)return;const w=v.deltaY.value,B=v.duration.value;if(B<uu&&Math.abs(w)>cu){const T=h(w,B);f(T,"end",e.swipeDuration)}else f(w,"end",0)};return t.watch(()=>e.modelValue,w=>{const B=u.currIndex-w;if(B!==0){u.currIndex=w,u.startDistance=u.scrollDistance;const A=B*e.itemHeight;f(A,"",0)}}),t.watch(()=>e.source,w=>{if(u.currIndex>=w.length){const T=(w.length-1-u.currIndex)*e.itemHeight;u.startDistance=u.scrollDistance,f(T,"end",0)}}),t.watch(()=>e.visible,w=>{w===!1&&y()}),t.onMounted(()=>{const w=-e.modelValue*e.itemHeight;f(w)}),{classes:a,styles:o,contentClasses:l,itemText:g,itemValue:k,...t.toRefs(u),roller:p,getItemText:ze,onTouchStart:S,onTouchMove:N,onTouchEnd:C,isHidden:i,setRollerStyle:c,touchRollerStyle:s,touchTileStyle:d,stopMomentum:y}}}),gu={key:1,class:"fox-picker__item-tile"};function yu(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles),onTouchstart:n[0]||(n[0]=(...i)=>e.onTouchStart&&e.onTouchStart(...i)),onTouchmove:n[1]||(n[1]=(...i)=>e.onTouchMove&&e.onTouchMove(...i)),onTouchend:n[2]||(n[2]=(...i)=>e.onTouchEnd&&e.onTouchEnd(...i)),onTouchcancel:n[3]||(n[3]=(...i)=>e.onTouchEnd&&e.onTouchEnd(...i)),onTransitionend:n[4]||(n[4]=(...i)=>e.stopMomentum&&e.stopMomentum(...i))},[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,(i,s)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${e.columnIndex}_${s}`},[e.threeDimensional?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-picker__item",{"fox-picker__item-hidden":e.isHidden(s+1)}]),style:t.normalizeStyle(e.setRollerStyle(s+1))},t.toDisplayString(e.itemText(i)),7)):(t.openBlock(),t.createElementBlock("view",gu,t.toDisplayString(e.itemText(i)),1))],64))),128))],6)],38)}const vu=ne(hu,[["render",yu]]);let Dt=0;const ar="fox-overflow-hidden",rr=()=>_e?document.body:{classList:[]},bu=e=>[()=>{if(e())try{!Dt&&rr().classList.add(ar),Dt++}catch{}},()=>{if(e()&&Dt)try{Dt--,!Dt&&rr().classList.remove(ar)}catch{}}],ku={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:Su,create:Cu}=J("overlay"),wu=Cu({props:{...ku},emits:["click","update:visible"],setup(e,{emit:n}){const[a,o]=bu(()=>e.lockScroll),l=t.computed(()=>({[Su]:!0,[e.overlayClass]:!0})),r=t.computed(()=>({transitionDuration:`${e.duration}s`,zIndex:e.zIndex,...e.overlayStyle}));return t.watch(()=>e.visible,s=>{s?a():o()}),{classes:l,style:r,onClick:s=>{n("click",s),e.closeOnClickOverlay&&n("update:visible",!1)}}}});function Nu(e,n,a,o,l,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:n[0]||(n[0]=t.withModifiers((...i)=>e.onClick&&e.onClick(...i),["stop"])),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6),[[t.vShow,e.visible]])]),_:3})}const ut=ne(wu,[["render",Nu]]),{componentName:Bu,create:Au}=J("popup"),Vu=Au(nu(Bu,{FoxOverLay:ut,Close:oe.Close}));function Tu(e,n,a,o,l,r){const i=t.resolveComponent("FoxOverLay"),s=t.resolveComponent("Close");return t.openBlock(),t.createBlock(t.Teleport,{to:e.teleport,disabled:e.teleportDisable},[e.overlay?(t.openBlock(),t.createBlock(i,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:n[1]||(n[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:n[0]||(n[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(s)])],2)):t.createCommentVNode("",!0)],6),[[t.vShow,e.visible]])]),_:3},8,["name","onAfterEnter","onAfterLeave"])],8,["to","disabled"])}const fe=ne(Vu,[["render",Tu]]),$u=t.defineComponent({props:{position:{type:[String],default:()=>"bottom"},visible:{type:[Boolean]},teleport:{type:[String,Element],default:()=>"body"},lockScroll:{type:[Boolean],default:()=>!0},closeOnClickOverlay:{type:[Boolean],default:()=>!0},round:{type:[Boolean],default:()=>!1},teleportDisable:{type:[Boolean],default:()=>!1},poppable:{type:[Boolean],default:()=>!0}},setup(e,{slots:n}){return()=>{if(e.poppable){const a=dt({...e},{poppable:!1});return t.h(fe,a,n)}else return n?.default?.()??null}}});function Eu(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("div",null,[t.renderSlot(e.$slots,"default")])}const xu=ne($u,[["render",Eu]]),{create:Du,componentName:Iu,scope:qu}=J("picker"),Pu=Du({components:{Column:vu,Wrapper:xu},props:{...xo},emits:["close","change","confirm","update:visible","update:text","update:modelValue","clear"],setup(e,{emit:n}){const{toLocaleRefs:a,t:o}=se.useFoxI18n(qu),l=a(e,["title","cancelText","clearText","confirmText"]),r=t.ref(null),i=t.ref(ou());t.watch(()=>e.visible,V=>{V&&i.value<=0&&setTimeout(()=>{if(r.value){const E=De(r.value);i.value=E.height,lu(i.value)}},50)});const s=t.computed(()=>({[Iu]:!0})),c=su(),d=t.ref("singleColumn");let p=t.ref([]);t.watch([()=>e.source,()=>e.params],async([V,E])=>{if(V){let M=await c.load("picker",V,E);if(M.length>0){let x=M[0];if(Array.isArray(x)){if(typeof x[0]=="string"){let j=M,H=[];j.forEach(z=>{let _=z.map(U=>lr(U));H.push(_)}),p.value=H}else p.value=M;d.value="multipleColumn"}else if(typeof x=="string"){let j=M,H=[],z=j.map(_=>lr(_));H.push(z),p.value=H,d.value="singleColumn"}else{const j=Do(e,x);Array.isArray(j)?(d.value="cascade",p.value=[M]):(d.value="singleColumn",p.value=[M])}}else p.value=[]}},{immediate:!0});const u=t.ref([]),g=t.ref(e.modelValue),k=t.ref([]);let v=null;const y=t.ref([]);t.watch([()=>e.modelValue,()=>p.value],([V,E])=>{let M=iu(e,V,E,d.value);if(!Pe(M,y.value)){y.value=M,v||(v=M?[...M]:[]);let x=or(e,M,E,d.value);x&&(u.value=x.texts,n("update:text",u.value))}});let b="";const f=t.ref(e.visible);t.watch(()=>e.visible,V=>{f.value=V,V&&(b="active",y.value.length>0&&(v=[...y.value]))});const m=V=>{let E=tr(e,V);return xe(E)?E.defaultIndex??0:0},h=V=>{if(e.readonly===!0)return!0;let E=tr(e,V);return xe(E)?E.readonly??!1:!1},S=(V,E)=>{let M=y.value;M[V]=E;for(let j=0;j<V;j++)M[j]==null&&(M[j]=m(j));if(d.value==="cascade")for(let j=V+1;j<C.value.length;j++){let H=m(j);j<M.length?M[j]=H:M.push(H)}else for(let j=M.length;j<C.value.length;j++){let H=m(j);M.push(H)}y.value=M;let x=or(e,M,p.value,d.value);x&&(u.value=x.texts,g.value=x.values,k.value=x.items)},N=V=>V<y.value.length?y.value[V]:m(V),C=t.computed(()=>{if(p.value.length==0)return[];if(d.value=="singleColumn"||d.value=="multipleColumn")return p.value;let V=[],E=0,M=p.value[0],x=0;for(;;){let j=M.map(_=>{let U=Object.assign({},_);return au(e,U,null),U});V.push(j),E>=y.value.length?x=0:x=y.value[E],(x<0||x>=M.length)&&(x=0);let H=M[x];const z=Do(e,H);if(!Array.isArray(z))break;M=z,E++}return V}),w=t.computed(()=>me(+e.visibleItemCount-1)/2*i.value),B=(V=!1)=>{if(e.readonly===!0){V&&n("update:visible",!1);return}let E=p.value.length-1;for(;E>=0&&!(y.value[E]===null||y.value[E]===void 0);E--);if(E>=0&&S(E,0),d.value==="singleColumn"){let M=g.value.length>0?g.value[0]:"",x=k.value.length>0?k.value[0]:null;n("update:modelValue",M),n("update:text",u.value),n("change",M,x),V&&(n("confirm",M),n("update:visible",!1))}else n("update:modelValue",g.value),n("update:text",u.value),n("change",g.value,k.value),V&&(n("confirm",g.value),n("update:visible",!1))},A=(V,E)=>{if(b!=="close"&&(S(V,E),e.isAutoBackFill)){const M=!f.value;B(M)}},T=()=>{b==="active"&&(b="confirm",v=Array.isArray(y.value)?[...y.value]:[],B(!0))},$=()=>{d.value==="singleColumn"?(n("update:modelValue",""),n("update:text",""),n("change","")):(n("update:modelValue",[]),n("update:text",""),n("change",[])),y.value=[],v=null};return{...l,pickerLineRef:r,classes:s,columns:C,dataType:d,show:f,itemHeight:i,top:w,isReadonly:h,getIndex:N,change:A,close:()=>{if(b==="active"){if(b="close",v===null||v.length===0)$();else{if(Array.isArray(v))for(let V=0;V<v.length;V++)S(V,v[V]);B(!1)}n("close"),n("update:visible",!1)}},confirm:T,clear:()=>{if(b==="active"){if(b="clear",e.readonly===!0){n("update:visible",!1);return}$(),v=null,n("clear",""),n("update:visible",!1)}}}}}),Mu={key:0,class:"fox-picker__bar"},Lu={class:"fox-picker__title"},zu={class:"fox-picker__bar__action"},Ou={class:"fox-picker__column"};function Fu(e,n,a,o,l,r){const i=t.resolveComponent("Column"),s=t.resolveComponent("Wrapper");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createVNode(s,{position:"bottom",visible:e.show,"onUpdate:visible":n[3]||(n[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,poppable:e.poppable},{default:t.withCtx(()=>[e.poppable?(t.openBlock(),t.createElementBlock("view",Mu,[t.createElementVNode("view",Lu,t.toDisplayString(e.title),1),t.createElementVNode("view",zu,[t.createElementVNode("view",{class:"fox-picker__left fox-picker__cancel fox-picker__button",onClick:n[0]||(n[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:n[1]||(n[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:n[2]||(n[2]=(...c)=>e.clear&&e.clear(...c))},t.toDisplayString(e.clearText),1)):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"top"),t.createElementVNode("view",Ou,[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(i,{visible:e.show,source:c,readonly:e.isReadonly(d),"column-index":d,modelValue:e.getIndex(d),"onUpdate:modelValue":p=>e.change(d,p),"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,["visible","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","poppable"])],2)}const _t=ne(Pu,[["render",Fu]]);function Ru(e,n,a,o,l,r,i=!0){return{props:{...pe,...ge,...xo,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","setValue"],setup(s,c){const d=$e(t.computed(()=>s.disabled)),p=Te(t.computed(()=>s.readonly)),{emitEvent:u}=Ae({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return d.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=se.useFoxI18n(n),k=g(s,["placeholder"]),v=t.ref(!1),y=qe(s,"modelValue",null,u),b=t.ref([]),f=t.computed(()=>Array.isArray(b.value)?b.value.join(s.separator):b.value),m="fox-input-item",h=t.computed(()=>({[m]:!0,"is-disabled":d.value,"is-readonly":p.value})),S=Ve(t.computed(()=>s.textAlign),"textAlign"),N=t.computed(()=>{const P={};return S.value&&(P["text-align"]=S.value),P}),C=t.ref(!1),w=()=>{C.value=!0},B=P=>{C.value=P},A=P=>{y.value=P,u("update:modelValue",P)},T=(P,D)=>{u("change",P,D)},$=P=>{let W=P.target.value;v.value=!0,u("focus",W,P)},q=P=>{setTimeout(()=>{v.value=!1},0);let W=P.target.value;s.maxLength&&W.length>Number(s.maxLength)&&(W=W.slice(0,Number(s.maxLength))),u("blur",W,P)},R=P=>{b.value=P,Array.isArray(P)&&P.length===0?u("update:text",P[0]):u("update:text",P)},V=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":d.value,"is-readonly":p.value})),E=t.computed(()=>ve(s.unit)>0),M=t.computed(()=>ve(s.unit)>0&&!v.value),x=t.computed(()=>({hidden:!M.value})),j=P=>{y.value="",u("update:modelValue","",P),u("change","",P),u("clear","")},H=t.computed(()=>s.clearable&&!d.value&&!p.value),z=t.computed(()=>ve(y.value)>0&&v.value),_=P=>{z.value?j(P):w()},U=t.computed(()=>z.value&&H.value?o:l),I=t.computed(()=>({action:!0}));return()=>{const P={class:h.value,style:N.value,type:"text",maxlength:s.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:w,onFocus:$,onBlur:q};i&&(P.disabled=!0);const D=[],W=t.h("input",P);D.push(W);const L=[],O={class:["action-icon"]},Q=t.h(U.value,O),G={class:I.value,onClick:_},te=t.h("view",G,{default:()=>[Q]});if(L.push(te),E.value){const re=t.h("view",{class:x.value},[s.unit]);L.push(re)}const F={class:V.value},Y=t.h("view",F,{default:()=>L});D.push(Y);const X={default:()=>D};X.label=c.slots.default,X.prepend=c.slots.prepend,X.append=c.slots.append,X.fixedPreTip=c.slots.fixedPreTip,X.fixedTip=c.slots.fixedTip;const K=be(s,xo);K.disabled=!1,K.readonly=d.value||p.value,K.visible=C.value,K["onUpdate:visible"]=B,K.modelValue=y.value,K["onUpdate:modelValue"]=A,K.text=b.value,K["onUpdate:text"]=R,K.onChange=T;const Z=t.h(r,K);X.hide=()=>[Z];const ee=be(s,ge,pe);return s.prop&&(ee.prop=`${s.prop}_item`),t.h(a,ee,X)}}}}const{componentName:Ku,create:Uu,scope:Hu}=J("picker-item"),sl=Uu(Ru(Ku,Hu,we,oe.CircleClose,oe.ArrowRight,_t,!1)),rn=(e,n,a)=>e.map(o=>{const{value:l="value",text:r="text",children:i="children"}=a??{},{[l]:s,[r]:c,[i]:d,...p}=o,u={loading:!1,...p,level:n?(n&&n.level||0)+1:0,value:s,text:c,children:d,_parent:n};return u.children&&u.children.length&&(u.children=rn(u.children,u,a)),u}),bs=(e,n)=>{let a=0,o;for(;(o=e[a++])&&n(o)!==!0;)o.children&&o.children.length&&bs(o.children,n)},ju={topId:null,idKey:"id",pidKey:"pid",sortKey:""},Wu=(e,n)=>{const a={...ju,...n||{}},{topId:o,idKey:l,pidKey:r,sortKey:i}=a;let s=[],c={};return e.forEach(d=>{d={...d};const{[l]:p,[r]:u}=d,g=c[u]=c[u]||[];!s.length&&u===o&&(s=g),g.push(d),d.children=c[p]||(c[p]=[])}),i&&Object.keys(c).forEach(d=>{c[d].length>1&&c[d].sort((p,u)=>p[i]-u[i])}),c=null,s},Yu={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"},doitKey:{type:String,default:"doit"},numKey:{type:String,default:"num"},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},beforeChange:{type:Function}},sr=(e,n)=>n[e.textKey],It=(e,n)=>n[e.valueKey],Xu=(e,n)=>n[e.visibleKey],ir=(e,n)=>n[e.disabledKey],Qu=(e,n)=>{const a=n[e.doitKey];return ye(a)},Gu=(e,n)=>{const a=n[e.numKey];return a==null?null:me(n[a])},cr=(e,n,a)=>{const o=e.itemOptions;return typeof o=="function"?o(n,a):o||null};function Zu(e,n,a,o=!1){return{props:{...Yu},emits:["update:modelValue","change","click"],setup(l,{slots:r,emit:i}){const s=t.computed(()=>{const U={};return U[`${e}`]=!0,U}),c=t.computed(()=>{const U={};return U[`${e}__titles`]=!0,U[`${l.direction}`]=!0,l.align==="left"&&(U.left=!0),l.scroll===!0&&(U.scrollable=!0),l.shape&&(U[`${l.shape}`]=!0),U}),d=t.computed(()=>({})),p=t.computed(()=>{if(!l.gutter)return 0;const U=de(l.gutter);return U<=0?0:U}),u=t.ref(l.modelValue);t.watch(()=>l.modelValue,U=>{u.value!==U&&(u.value=U,x(!1))});const g=t.ref({"fox-tabs-bar__popup":!0,"fox-tabs-bar__popup--show":!1,"fox-tabs-bar__popup--hide":!1}),k=t.computed(()=>{const U={};return y.value||(U.display="none"),U}),v=t.ref(),y=t.ref(!1),b=()=>{const U=!y.value;f(U)},f=U=>{const I=U;I?(y.value=I,setTimeout(()=>{g.value["fox-tabs-bar__popup--show"]=!0,g.value["fox-tabs-bar__popup--hide"]=!1},0)):(g.value["fox-tabs-bar__popup--show"]=!1,g.value["fox-tabs-bar__popup--hide"]=!0,v.value?v.value.addEventListener("transitionend",()=>{y.value=!1},{once:!0}):setTimeout(()=>{y.value=!1},0))},m=t.ref(),h=t.ref([]),S=(U,I)=>{h.value[I]=U},N=U=>I=>{S(I,U)},C=(U,I)=>{const P=m.value,D=h.value;if(!P||!D||!D[U])return;const W=D[U];let L=0;l.direction==="vertical"?L=W.offsetTop-(P.offsetHeight-W.offsetHeight)/2:L=W.offsetLeft-(P.offsetWidth-W.offsetWidth)/2,w(P,L,I?0:.3,l.direction)},w=(U,I,P,D)=>{let W=0;const L=D==="horizontal"?U.scrollLeft:U.scrollTop,O=P===0?1:Math.round(P*1e3/16);function Q(){D==="horizontal"?U.scrollLeft+=(I-L)/O:U.scrollTop+=(I-L)/O,++W<O&&Ke(Q)}Q()},B=(U,I)=>{const P=It(l,U),D={};return D[`${e}__titles-item`]=!0,D.disabled=ir(l,U),D.active=P===u.value,l.shape&&(D[`${l.shape}`]=!0),l.ellipsis&&(D.ellipsis=!0),I&&(I.class&&(D[`${I.class}`]=!0),I.disabled===!0&&(D.disabled=I.disabled)),D},A=(U,I)=>{const P={};if(p.value>0){const D=Math.abs(p.value/2);l.direction==="vertical"?(P["margin-top"]=`${D}px`,P["margin-bottom"]=`${D}px`):(P["margin-left"]=`${D}px`,P["margin-right"]=`${D}px`)}return I&&I.style&&Object.assign(P,I.style),P},T=(U,I)=>`${It(l,U)??I}`,$=(U,I)=>{const P=It(l,U),D={};D[`${e}__popup-item`]=!0,D.disabled=ir(l,U),D.active=P===u.value,l.shape&&(D[`${l.shape}`]=!0);const W=cr(l,U,I);return W&&W.disabled===!0&&(D.disabled=W.disabled),D},q=t.computed(()=>(l.data??[]).filter(I=>Xu(l,I)!==!1)),R=(U,I)=>{const P=It(l,U);if(i("click",U,I),u.value==P)return;const D=()=>{u.value=P,l.scroll&&C(I,!1),i("update:modelValue",P),i("change",U,I)};if(typeof l.beforeChange=="function"){const W=l.beforeChange(U,I);bt(W)?W.then(L=>{L!==!1&&D()}).catch(()=>{D()}):W!==!1&&D()}else D()},V=(U,I)=>function(){R(U,I)},E=(U,I)=>{R(U,I),f(!1)},M=(U,I)=>function(){E(U,I)},x=U=>{if(!Array.isArray(l.data)||!l.scroll)return;const I=l.data.findIndex(P=>It(l,P)===u.value);I!==-1&&C(I,U)};t.watch(()=>l.data,()=>{setTimeout(x,0)}),t.onMounted(()=>{x(!0)});const j=(U,I)=>{if(r.item)return r.item({item:U,index:I});const P=cr(l,U,I),D=[];if(r.text){const Q=r.text({item:U,index:I});D.push(Q)}else{const Q=[];if(P?.doit===!0||Qu(l,U)){const Y={class:[`${e}__titles-item-tip`,"doit"]},X=t.h("view",Y);Q.push(X)}const G=P?.num??Gu(l,U);if(G){let Y="";const X=me(G);X>=100?Y="99+":Y=`${X}`;const K={class:[`${e}__titles-item-tip`,"num"]},Z=t.h("view",K,[Y]);Q.push(Z)}const te={class:`${e}__titles-item-text`};Q.push(sr(l,U));const F=t.h("view",te,Q);D.push(F)}const W={class:`${e}__titles-item-line`},L=t.h("view",W);D.push(L);const O={ref:N(I),class:B(U,P),style:A(U,P),key:T(U,I),onClick:V(U,I)};return t.h("view",O,D)},H=()=>{const U=r.default?r.default():[];if(U.length===0)for(let P=0;P<q.value.length;P++){const D=q.value[P],W=j(D,P);U.push(W)}const I={ref:m,class:c.value,style:d.value};return t.h("view",I,U)},z=()=>{let U=null;r.navigation?U=r.navigation():U=t.h(a);const I={class:`${e}__navigation`,onClick:b};return t.h("view",I,[U])},_=()=>{const U=[];for(let P=0;P<q.value.length;P++){const D=q.value[P];let W=null;r.popupItem?W=r.popupItem({item:D,index:P}):W=sr(l,D);const L={class:$(D,P),key:T(D,P),onClick:M(D,P)},O=t.h("view",L,[W]);U.push(O)}const I={class:g.value,style:k.value};return t.h("view",I,U)};return()=>{const U=[],I=H();if(U.push(I),l.showQuickNavigation){const D=z();U.push(D);const W=_();U.push(W)}const P={class:s.value};return t.h("view",P,U)}}}}const{create:Ju,componentName:_u,scope:ed}=J("tabs-bar"),Hn=Ju(Zu(_u,ed,oe.MoreH,!1)),ks=Symbol("TabsStatesKey"),td={modelValue:{type:[String,Number]},direction:{type:[String],default:"horizontal"},lazy:{type:[Boolean],default:!0}};function nd(e,n,a=!1){return{props:{...td},emits:["update:modelValue","change"],setup(o,{emit:l,slots:r}){const i=t.shallowRef([]),s={current:t.ref(o.modelValue??""),direction:t.ref(o.direction),tabWidth:t.ref(-1),tabHeight:t.ref(-1),add:y=>{const b={name:y};s.current.value===y&&(b.loaded=!0),i.value.push(b),t.triggerRef(i)},remove:y=>{const b=i.value.findIndex(f=>f.name===y);b!==-1&&i.value.splice(b,1)},isLoaded:y=>{if(!o.lazy)return!0;const b=i.value.findIndex(f=>f.name===y);return b!==-1?s.current.value?i.value[b].loaded??!1:b===0:!1}};t.provide(ks,s);const c=y=>{const b=i.value.findIndex(f=>f.name===y);b!==-1&&(i.value[b].loaded=!0,t.triggerRef(i))};t.watch([()=>o.modelValue,()=>o.direction],([y,b])=>{s.current.value!==y&&(s.current.value=y??"",c(y??"")),s.direction.value!==b&&(s.direction.value=b)});const d=t.ref(null),p=t.ref(null),u=t.computed(()=>({[e]:!0,[`${o.direction}`]:!0}));let g=!0;const k=t.computed(()=>{const y={},b=i.value.length;if(b<=0)return y;const f=i.value.findIndex(m=>m.name===s.current.value);return s.direction.value==="vertical"?s.tabHeight.value>0&&(y.height=`${b*s.tabHeight.value}px`,f!==-1&&(y.transform=`translate(0, -${f*s.tabHeight.value}px)`)):s.tabWidth.value>0&&(y.width=`${b*s.tabWidth.value}px`,f!==-1&&(y.transform=`translate(-${f*s.tabWidth.value}px, 0)`)),g&&(g=!1,y.transition="transform 0s ease"),y});let v=null;return t.onMounted(()=>{if(!d.value)return;const y=()=>{const b=qn(d.value);s.tabWidth.value=b.width,s.tabHeight.value=b.height};window.ResizeObserver&&(v=new window.ResizeObserver(y),v.observe(d.value)),y()}),t.onBeforeUnmount(()=>{v&&(v.disconnect(),v=null)}),()=>{const y={class:`${e}__panes`,style:k.value,ref:p},b=t.h("view",y,[r?.default?.()]),f={class:u.value,ref:d};return t.h("view",f,[b])}}}}const{create:od,componentName:ld,scope:ad}=J("tabs-container"),jn=od(nd(ld,ad,!1)),rd={paneKey:{type:[String,Number],required:!0},loaded:{type:[Boolean,String],default:null},emptyIcon:{type:[Object],required:!1},emptyText:{type:[String],required:!1}};function sd(e,n,a){return{props:{...rd},setup(o,{emit:l,slots:r}){const i=t.inject(ks);t.onMounted(()=>{i.add(o.paneKey)}),t.onBeforeUnmount(()=>{i.remove(o.paneKey)});const s=t.computed(()=>{const d={};return i.direction.value==="vertical"&&i.tabHeight.value>0?d.height=`${i.tabHeight.value}px`:i.tabWidth.value>0&&(d.width=`${i.tabWidth.value}px`),d}),c=t.computed(()=>o.loaded!=null?ye(o.loaded):i.isLoaded(o.paneKey));return()=>{let d=[];if(c.value)d=r?.default?.()??[];else if(r.empty)d=r.empty();else{const u={class:`${e}__empty-icon`},g=o.emptyIcon??a,k=t.h(g,u),v={class:`${e}__empty-text`},y=o.emptyText??"Loading",b=t.h("view",v,[y]),f={class:`${e}__empty`},m=t.h("view",f,[k,b]);d.push(m)}const p={class:`${e}`,style:s.value};return t.h("view",p,d)}}}}const{create:id,componentName:cd,scope:ud}=J("tabs-pane"),Wn=id(sd(cd,ud,oe.Loading));class ur{nodes;config;constructor(n,a){this.config={value:"value",text:"text",children:"children",...a||{}},this.nodes=rn(n,null,this.config)}updateChildren(n,a){a?a.children=rn(n,a,this.config):this.nodes=rn(n,null,this.config)}getNodeByValue(n){let a;return bs(this.nodes,o=>{if(o.value===n)return a=o,!0}),a}getPathNodesByValue(n){if(!n.length)return[];const a=[];let o=this.nodes;for(;o&&o.length;){const l=o.find(r=>r.value===n[r.level]);if(!l)break;a.push(l),o=l.children}return a}isLeaf(n,a){const{leaf:o,children:l}=n,r=Array.isArray(l)&&!!l.length;return o||!r&&!a}hasChildren(n,a){if(this.isLeaf(n,a))return!1;const{children:l}=n;return Array.isArray(l)&&!!l.length}}const{create:dd,scope:fd}=J("cascader-pane"),md=dd({components:{Loading:oe.Loading,Checklist:oe.Checklist,TabsBar:Hn,TabsContainer:jn,TabsPane:Wn},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:n}){const{t:a}=se.useFoxI18n(fd),o=t.computed(()=>({lazy:e.lazy,lazyLoad:e.lazyLoad,valueKey:e.valueKey,textKey:e.textKey,childrenKey:e.childrenKey,convertConfig:e.convertConfig})),l=t.ref(0),r=t.ref(!1),i=t.ref(e.modelValue),s=t.ref(new ur([],{})),c=t.ref([]),d=t.computed(()=>o.value.lazy&&!!o.value.lazyLoad),p=t.computed(()=>r.value==!0||c.value.length==0?[{text:"Loading",value:0}]:c.value.map((m,h)=>({text:m.selectedNode?m.selectedNode.text:a("select"),value:h}))),u=new Map;let g;const k=async()=>{u.clear(),c.value=[],l.value=0,r.value=!1,g=null;let{options:m}=e;o.value.convertConfig&&(m=Wu(m,o.value.convertConfig)),s.value=new ur(m,{value:o.value.valueKey,text:o.value.textKey,children:o.value.childrenKey}),d.value&&!s.value.nodes.length&&await y({root:!0,loading:!0,text:"",value:""}),c.value=[{nodes:s.value.nodes,selectedNode:null}],v(!d.value)},v=async(m=!0)=>{const h=i.value;if(h===void 0||!s.value.nodes.length)return;if(h.length===0){l.value=0,c.value=[{nodes:s.value.nodes,selectedNode:null}];return}let S=h;if(d.value&&Array.isArray(h)&&h.length){S=[];let N=s.value.nodes.find(C=>C.value===h[0]);if(N){S=[N.value],r.value=!0;const C=await h.slice(1).reduce(async(w,B)=>{const A=await w;await y(A);const T=A?.children?.find($=>$.value===B);return T&&S.push(B),Promise.resolve(T)},Promise.resolve(N));await y(C),r.value=!1}}S.length&&h===e.modelValue&&s.value.getPathNodesByValue(S).map((C,w)=>{l.value=w,f.handleNode(C,m)})},y=async m=>{if(!m)return;if(!o.value.lazyLoad){m.leaf=!0;return}if(s.value.isLeaf(m,d.value)||s.value.hasChildren(m,d.value))return;m.loading=!0;const h=m.root?null:m;let S=u.get(m);S||(S=new Promise(C=>{o.value.lazyLoad?.(m,C)}),u.set(m,S));const N=await S;Array.isArray(N)&&N.length>0?s.value.updateChildren(N,h):m.leaf=!0,m.loading=!1,u.delete(m)},b=m=>{const h=m.map(S=>S.value);i.value=h,n("change",h,m),n("pathChange",m),n("update:modelValue",h)},f={async handleNode(m,h){const{disabled:S,loading:N}=m;if(!(!h&&S||!c.value[l.value])){if(s.value.isLeaf(m,d.value)){if(m.leaf=!0,c.value[l.value].selectedNode=m,c.value=c.value.slice(0,m.level+1),!h){const C=c.value.map(w=>w.selectedNode);b(C),n("pathChange",C)}return}if(s.value.hasChildren(m,d.value)){const C=m.level+1;if(c.value[l.value].selectedNode=m,c.value=c.value.slice(0,C),c.value.push({nodes:m.children||[],selectedNode:null}),l.value=C,!h){const w=c.value.map(B=>B.selectedNode);n("pathChange",w)}return}g=m,!N&&(await y(m),g===m&&(c.value[l.value].selectedNode=m,f.handleNode(m,h)))}},handleTabChange(m,h){g=null},formatTabTitle(m){return m.selectedNode?m.selectedNode.text:a("select")},isSelected(m,h){return m.selectedNode&&m.selectedNode.value===h.value}};return t.watch([o,()=>e.options],()=>{k()},{deep:!0,immediate:!0}),t.watch(()=>e.modelValue,m=>{Pe(m,i.value)||(i.value=m,v(!d.value))}),t.watch(()=>e.visible,m=>{m&&Array.isArray(i.value)&&i.value.length>0&&v()}),{panes:c,panesTitles:p,initLoading:r,tabsCursor:l,...f}}}),pd={class:"fox-cascader"},hd={role:"menu",class:"fox-cascader__pane"},gd=["aria-checked","aria-disabled","onClick"],yd={class:"fox-cascader__item__title"};function vd(e,n,a,o,l,r){const i=t.resolveComponent("TabsBar"),s=t.resolveComponent("Loading"),c=t.resolveComponent("Checklist"),d=t.resolveComponent("TabsPane"),p=t.resolveComponent("TabsContainer");return t.openBlock(),t.createElementBlock("view",pd,[t.createVNode(i,{modelValue:e.tabsCursor,"onUpdate:modelValue":n[0]||(n[0]=u=>e.tabsCursor=u),data:e.panesTitles,onChange:e.handleTabChange,scroll:!0,align:"left"},null,8,["modelValue","data","onChange"]),t.createVNode(p,{modelValue:e.tabsCursor,"onUpdate:modelValue":n[1]||(n[1]=u=>e.tabsCursor=u)},{default:t.withCtx(()=>[!e.initLoading&&e.panes.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.panes,(u,g)=>(t.openBlock(),t.createBlock(d,{"pane-key":g,key:g},{default:t.withCtx(()=>[t.createElementVNode("view",hd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.nodes,k=>(t.openBlock(),t.createElementBlock("view",{key:k.value,class:t.normalizeClass(["fox-cascader__item",{active:e.isSelected(u,k),disabled:k.disabled}]),"aria-checked":e.isSelected(u,k),"aria-disabled":k.disabled||void 0,role:"menuitemradio",onClick:v=>e.handleNode(k,!1)},[t.createElementVNode("view",yd,t.toDisplayString(k.text),1),k.loading?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-cascader__item__icon-loading",name:"loading"})):(t.openBlock(),t.createBlock(c,{key:1,class:"fox-cascader__item__icon-check",name:"checklist"}))],10,gd))),128))])]),_:2},1032,["pane-key"]))),128)):(t.openBlock(),t.createBlock(d,{key:1,"pane-key":0},{default:t.withCtx(()=>n[2]||(n[2]=[t.createElementVNode("view",{class:"fox-cascader__pane"},null,-1)])),_:1}))]),_:1},8,["modelValue"])])}const bd=ne(md,[["render",vd]]),{create:kd}=J("cascader"),Sd=kd({components:{FoxCascaderPane:bd,FoxPopup:fe},props:{...Fe,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:n}){const a=t.ref(e.modelValue),o=t.computed({get(){return e.visible},set(i){n("update:visible",i)}}),l=(i,s)=>{a.value=i,o.value=!1,n("change",i,s),n("update:modelValue",i)},r=i=>{n("pathChange",i)};return t.watch(()=>e.modelValue,i=>{i!==a.value&&(a.value=i)}),{onChange:l,onPathChange:r,innerValue:a,innerVisible:o}}}),Cd=["innerHTML"];function wd(e,n,a,o,l,r){const i=t.resolveComponent("FoxCascaderPane"),s=t.resolveComponent("FoxPopup");return e.poppable?(t.openBlock(),t.createBlock(s,{key:0,visible:e.innerVisible,"onUpdate:visible":n[0]||(n[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,Cd)):t.createCommentVNode("",!0),t.createVNode(i,{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(i,{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 Yn=ne(Sd,[["render",wd]]);function St(e,n){const a=e.textKey??"text";return n[a]??""}function Ct(e,n){const a=e.valueKey??"value";return n[a]}function Ss(e,n){const a=e.childrenKey??"children";return n[a]}function ln(e,n=[]){const a={texts:[],values:[]};for(let o=0;o<n.length;o++){const l=n[o],r=St(e,l),i=Ct(e,l);a.texts.push(r),a.values.push(i??"")}return a}function Cs(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let i=0;i<n.length;i++)if(St(e,n[i])===r){const c=Ct(e,n[i])??"",d={[e.textKey]:r,[e.valueKey]:c};l.push(d);const p=Ss(e,n[i]);Array.isArray(p)&&Cs(e,p,a,o+1,l);return}}function ws(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let i=0;i<n.length;i++)if(Ct(e,n[i])===r){const c=St(e,n[i])??"",d={[e.textKey]:c,[e.valueKey]:r};l.push(d);const p=Ss(e,n[i]);Array.isArray(p)&&ws(e,p,a,o+1,l);return}}function fo(e,n,a){if(n===a)return!0;if(n.length!==a.length)return!1;for(let o=0;o<n.length;o++){const l=St(e,n[o]),r=St(e,a[o]);if(l!==r)return!1;const i=Ct(e,n[o]),s=Ct(e,a[o]);if(i!==s)return!1}return!0}let Nd=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){const l="cascader";if(Array.isArray(n))return n;if(typeof n=="function")return await n(a,o);const r=et(this.proxy,l);return r===null?(console.error(`${l} component not found api function`),[]):(xe(a)&&t.isReactive(a)&&(a=t.toRaw(a)),await r(n,a,o))}};function Bd(){const e=t.getCurrentInstance();return new Nd(e.proxy)}const dr={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},showAllLevels:{type:[Boolean],default:!0},separator:{type:[String],default:"/"}};function Ad(e,n,a,o,l,r,i=!1){return{props:{...pe,...ge,...dr},emits:["update:modelValue","change","pathChange","blur","focus","clear","update:pathNodes","setValue"],setup(s,c){const d=$e(t.computed(()=>s.disabled)),p=Te(t.computed(()=>s.readonly)),{emitEvent:u}=Ae({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return d.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=se.useFoxI18n(n),k=g(s,["placeholder"]),v=t.ref(!1),y=Bd(),b=t.ref([]),f=t.ref([]),m=t.computed(()=>{if(Array.isArray(f.value)){if(s.showAllLevels===!1){const O=f.value.length-1;return f.value[O]}return f.value.join(s.separator)}else return f.value}),h=t.ref([]),S=t.ref([]);t.watch([()=>s.modelValue,()=>b.value],async([O,Q])=>{if(u("setValue",O),s.lazy===!0){S.value.length==0&&(h.value=Array.isArray(O)?O:[]);return}if(s.valueType==="item"){let G=O;if(!fo(s,G,S.value)){S.value=G;let te=ln(s,G);f.value=te.texts,h.value=te.values}}else if(s.valueType==="text"){let G=O,te=[];if(Cs(s,Q,G,0,te),!fo(s,te,S.value)){S.value=te;let F=ln(s,te);G.value=F.texts,h.value=F.values}}else{let G=[];if(ws(s,Q,O,0,G),!fo(s,G,S.value)){S.value=G;let te=ln(s,G);f.value=te.texts,h.value=te.values}}}),s.lazy===!0&&(h.value=Array.isArray(s.modelValue)?s.modelValue:[]),t.watch([()=>s.source,()=>s.params],async([O,Q])=>{s.lazy||O&&(b.value=await y.load(O,Q))},{immediate:!0});const N="fox-input-item",C=t.computed(()=>({[N]:!0,"is-disabled":d.value,"is-readonly":p.value})),w=Ve(t.computed(()=>s.textAlign),"textAlign"),B=t.computed(()=>{const O={};return w.value&&(O["text-align"]=w.value),O}),A=t.ref(!1),T=()=>{d.value===!0||p.value===!0||(A.value=!0)},$=O=>{A.value=O},q=(O,Q)=>{let G=Q.map(F=>{if(F==null)return F;let Y={...F};return Reflect.deleteProperty(Y,"text"),Y[s.textKey]=F.text??"",Reflect.deleteProperty(Y,"value"),Y[s.valueKey]=F.value??"",Y});S.value=G;let te=ln(s,G);f.value=te.texts,h.value=te.values,s.valueType==="text"?(u("change",f.value,G),u("update:modelValue",f.value)):s.valueType==="item"?(u("change",G,G),u("update:modelValue",G)):(u("change",h.value,G),u("update:modelValue",h.value)),u("update:pathNodes",G)},R=O=>{let Q=O.map(G=>{if(G==null)return G;let te={...G};return Reflect.deleteProperty(te,"text"),te[s.textKey]=G.text??"",Reflect.deleteProperty(te,"value"),te[s.valueKey]=G.value??"",te});u("pathChange",Q)},V=O=>{v.value=!0,u("focus",h.value,O)},E=O=>{setTimeout(()=>{v.value=!1},0),u("blur",h.value,O)},M=t.computed(()=>({[`${N}__append`]:!0,"is-disabled":d.value,"is-readonly":p.value})),x=t.computed(()=>ve(s.unit)>0),j=t.computed(()=>ve(s.unit)>0&&!v.value),H=t.computed(()=>({hidden:!j.value})),z=O=>{S.value=[],f.value=[],h.value=[],u("update:modelValue",[]),u("change",[],O),u("clear",[]),u("update:pathNodes",[])},_=t.computed(()=>s.clearable&&!d.value&&!p.value),U=t.computed(()=>{let O=h.value&&h.value.length>0;return s.clearable&&O&&v.value}),I=O=>{U.value?z(O):T()},P=t.computed(()=>U.value&&_.value?o:l),D=t.computed(()=>({action:!0}));let W=null;const L=()=>typeof W=="function"?W:typeof s.lazyLoad=="function"?s.lazyLoad:(W=async(O,Q)=>{const G=[],te=[];let F=0;if(!O.root){let X=O;for(;X;){const K=St(s,X),Z=Ct(s,X);te.splice(0,0,K),G.splice(0,0,Z),X=X._parent}F=G.length}const Y=await y.load(s.source,{...O,level:F,pathLabels:te,pathValues:G},!0);Q(Y)},W);return()=>{const O={class:C.value,style:B.value,type:"text",maxlength:s.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:m.value,onClick:T,onFocus:V,onBlur:E};i&&(O.disabled=!0);const Q=[],G=t.h("input",O);Q.push(G);const te=[],F={class:["action-icon"]},Y=t.h(P.value,F),X={class:D.value,onClick:I},K=t.h("view",X,{default:()=>[Y]});if(te.push(K),x.value){const nt=t.h("view",{class:H.value},[s.unit]);te.push(nt)}const Z={class:M.value},ee=t.h("view",Z,{default:()=>te});Q.push(ee);const le={default:()=>Q};le.label=c.slots.default,le.prepend=c.slots.prepend,le.append=c.slots.append,le.fixedPreTip=c.slots.fixedPreTip,le.fixedTip=c.slots.fixedTip;let re={};re.visible=A.value,re["onUpdate:visible"]=$,re.modelValue=h.value,re.onChange=q,re.onPathChange=R,re.title=s.title,re.valueKey=s.valueKey,re.textKey=s.textKey,re.childrenKey=s.childrenKey,re.convertConfig=s.convertConfig,s.lazy?(re.lazy=!0,re.lazyLoad=L()):re.options=b.value;const ce=t.h(r,re);le.hide=()=>[ce];const Ce={...dt(s,dr)};return s.prop&&(Ce.prop=`${s.prop}_item`),t.h(a,Ce,le)}}}}const{componentName:Vd,create:Td,scope:$d}=J("cascader-item"),il=Td(Ad(Vd,$d,we,oe.CircleClose,oe.ArrowRight,Yn,!1));var We=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ns={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a=1e3,o=6e4,l=36e5,r="millisecond",i="second",s="minute",c="hour",d="day",p="week",u="month",g="quarter",k="year",v="date",y="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|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,m={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("_")},h=function(R,V,E){var M=String(R);return!M||M.length>=V?R:""+Array(V+1-M.length).join(E)+R},S={s:h,z:function(R){var V=-R.utcOffset(),E=Math.abs(V),M=Math.floor(E/60),x=E%60;return(V<=0?"+":"-")+h(M,2,"0")+":"+h(x,2,"0")},m:function R(V,E){if(V.date()<E.date())return-R(E,V);var M=12*(E.year()-V.year())+(E.month()-V.month()),x=V.clone().add(M,u),j=E-x<0,H=V.clone().add(M+(j?-1:1),u);return+(-(M+(E-x)/(j?x-H:H-x))||0)},a:function(R){return R<0?Math.ceil(R)||0:Math.floor(R)},p:function(R){return{M:u,y:k,w:p,d,D:v,h:c,m:s,s:i,ms:r,Q:g}[R]||String(R||"").toLowerCase().replace(/s$/,"")},u:function(R){return R===void 0}},N="en",C={};C[N]=m;var w=function(R){return R instanceof $},B=function R(V,E,M){var x;if(!V)return N;if(typeof V=="string"){var j=V.toLowerCase();C[j]&&(x=j),E&&(C[j]=E,x=j);var H=V.split("-");if(!x&&H.length>1)return R(H[0])}else{var z=V.name;C[z]=V,x=z}return!M&&x&&(N=x),x||!M&&N},A=function(R,V){if(w(R))return R.clone();var E=typeof V=="object"?V:{};return E.date=R,E.args=arguments,new $(E)},T=S;T.l=B,T.i=w,T.w=function(R,V){return A(R,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var $=function(){function R(E){this.$L=B(E.locale,null,!0),this.parse(E)}var V=R.prototype;return V.parse=function(E){this.$d=function(M){var x=M.date,j=M.utc;if(x===null)return new Date(NaN);if(T.u(x))return new Date;if(x instanceof Date)return new Date(x);if(typeof x=="string"&&!/Z$/i.test(x)){var H=x.match(b);if(H){var z=H[2]-1||0,_=(H[7]||"0").substring(0,3);return j?new Date(Date.UTC(H[1],z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,_)):new Date(H[1],z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,_)}}return new Date(x)}(E),this.$x=E.x||{},this.init()},V.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()},V.$utils=function(){return T},V.isValid=function(){return this.$d.toString()!==y},V.isSame=function(E,M){var x=A(E);return this.startOf(M)<=x&&x<=this.endOf(M)},V.isAfter=function(E,M){return A(E)<this.startOf(M)},V.isBefore=function(E,M){return this.endOf(M)<A(E)},V.$g=function(E,M,x){return T.u(E)?this[M]:this.set(x,E)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(E,M){var x=this,j=!!T.u(M)||M,H=T.p(E),z=function(O,Q){var G=T.w(x.$u?Date.UTC(x.$y,Q,O):new Date(x.$y,Q,O),x);return j?G:G.endOf(d)},_=function(O,Q){return T.w(x.toDate()[O].apply(x.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(Q)),x)},U=this.$W,I=this.$M,P=this.$D,D="set"+(this.$u?"UTC":"");switch(H){case k:return j?z(1,0):z(31,11);case u:return j?z(1,I):z(0,I+1);case p:var W=this.$locale().weekStart||0,L=(U<W?U+7:U)-W;return z(j?P-L:P+(6-L),I);case d:case v:return _(D+"Hours",0);case c:return _(D+"Minutes",1);case s:return _(D+"Seconds",2);case i:return _(D+"Milliseconds",3);default:return this.clone()}},V.endOf=function(E){return this.startOf(E,!1)},V.$set=function(E,M){var x,j=T.p(E),H="set"+(this.$u?"UTC":""),z=(x={},x[d]=H+"Date",x[v]=H+"Date",x[u]=H+"Month",x[k]=H+"FullYear",x[c]=H+"Hours",x[s]=H+"Minutes",x[i]=H+"Seconds",x[r]=H+"Milliseconds",x)[j],_=j===d?this.$D+(M-this.$W):M;if(j===u||j===k){var U=this.clone().set(v,1);U.$d[z](_),U.init(),this.$d=U.set(v,Math.min(this.$D,U.daysInMonth())).$d}else z&&this.$d[z](_);return this.init(),this},V.set=function(E,M){return this.clone().$set(E,M)},V.get=function(E){return this[T.p(E)]()},V.add=function(E,M){var x,j=this;E=Number(E);var H=T.p(M),z=function(I){var P=A(j);return T.w(P.date(P.date()+Math.round(I*E)),j)};if(H===u)return this.set(u,this.$M+E);if(H===k)return this.set(k,this.$y+E);if(H===d)return z(1);if(H===p)return z(7);var _=(x={},x[s]=o,x[c]=l,x[i]=a,x)[H]||1,U=this.$d.getTime()+E*_;return T.w(U,this)},V.subtract=function(E,M){return this.add(-1*E,M)},V.format=function(E){var M=this,x=this.$locale();if(!this.isValid())return x.invalidDate||y;var j=E||"YYYY-MM-DDTHH:mm:ssZ",H=T.z(this),z=this.$H,_=this.$m,U=this.$M,I=x.weekdays,P=x.months,D=function(Q,G,te,F){return Q&&(Q[G]||Q(M,j))||te[G].slice(0,F)},W=function(Q){return T.s(z%12||12,Q,"0")},L=x.meridiem||function(Q,G,te){var F=Q<12?"AM":"PM";return te?F.toLowerCase():F},O={YY:String(this.$y).slice(-2),YYYY:this.$y,M:U+1,MM:T.s(U+1,2,"0"),MMM:D(x.monthsShort,U,P,3),MMMM:D(P,U),D:this.$D,DD:T.s(this.$D,2,"0"),d:String(this.$W),dd:D(x.weekdaysMin,this.$W,I,2),ddd:D(x.weekdaysShort,this.$W,I,3),dddd:I[this.$W],H:String(z),HH:T.s(z,2,"0"),h:W(1),hh:W(2),a:L(z,_,!0),A:L(z,_,!1),m:String(_),mm:T.s(_,2,"0"),s:String(this.$s),ss:T.s(this.$s,2,"0"),SSS:T.s(this.$ms,3,"0"),Z:H};return j.replace(f,function(Q,G){return G||O[Q]||H.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(E,M,x){var j,H=T.p(M),z=A(E),_=(z.utcOffset()-this.utcOffset())*o,U=this-z,I=T.m(this,z);return I=(j={},j[k]=I/12,j[u]=I,j[g]=I/3,j[p]=(U-_)/6048e5,j[d]=(U-_)/864e5,j[c]=U/l,j[s]=U/o,j[i]=U/a,j)[H]||U,x?I:T.a(I)},V.daysInMonth=function(){return this.endOf(u).$D},V.$locale=function(){return C[this.$L]},V.locale=function(E,M){if(!E)return this.$L;var x=this.clone(),j=B(E,M,!0);return j&&(x.$L=j),x},V.clone=function(){return T.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},R}(),q=$.prototype;return A.prototype=q,[["$ms",r],["$s",i],["$m",s],["$H",c],["$W",d],["$M",u],["$y",k],["$D",v]].forEach(function(R){q[R[1]]=function(V){return this.$g(V,R[0],R[1])}}),A.extend=function(R,V){return R.$i||(R(V,$,A),R.$i=!0),A},A.locale=B,A.isDayjs=w,A.unix=function(R){return A(1e3*R)},A.en=C[N],A.Ls=C,A.p={},A})})(Ns);var Ed=Ns.exports;const Re=Ye(Ed);var Bs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a={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"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,l=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,s={},c=function(y){return(y=+y)+(y>68?1900:2e3)},d=function(y){return function(b){this[y]=+b}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var f=b.match(/([+-]|\d\d)/g),m=60*f[1]+(+f[2]||0);return m===0?0:f[0]==="+"?-m:m}(y)}],u=function(y){var b=s[y];return b&&(b.indexOf?b:b.s.concat(b.f))},g=function(y,b){var f,m=s.meridiem;if(m){for(var h=1;h<=24;h+=1)if(y.indexOf(m(h,0,b))>-1){f=h>12;break}}else f=y===(b?"pm":"PM");return f},k={A:[i,function(y){this.afternoon=g(y,!1)}],a:[i,function(y){this.afternoon=g(y,!0)}],S:[/\d/,function(y){this.milliseconds=100*+y}],SS:[l,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],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:[l,d("day")],Do:[i,function(y){var b=s.ordinal,f=y.match(/\d+/);if(this.day=f[0],b)for(var m=1;m<=31;m+=1)b(m).replace(/\[|\]/g,"")===y&&(this.day=m)}],M:[r,d("month")],MM:[l,d("month")],MMM:[i,function(y){var b=u("months"),f=(u("monthsShort")||b.map(function(m){return m.slice(0,3)})).indexOf(y)+1;if(f<1)throw new Error;this.month=f%12||f}],MMMM:[i,function(y){var b=u("months").indexOf(y)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,d("year")],YY:[l,function(y){this.year=c(y)}],YYYY:[/\d{4}/,d("year")],Z:p,ZZ:p};function v(y){var b,f;b=y,f=s&&s.formats;for(var m=(y=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,T,$){var q=$&&$.toUpperCase();return T||f[$]||a[$]||f[q].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(R,V,E){return V||E.slice(1)})})).match(o),h=m.length,S=0;S<h;S+=1){var N=m[S],C=k[N],w=C&&C[0],B=C&&C[1];m[S]=B?{regex:w,parser:B}:N.replace(/^\[|\]$/g,"")}return function(A){for(var T={},$=0,q=0;$<h;$+=1){var R=m[$];if(typeof R=="string")q+=R.length;else{var V=R.regex,E=R.parser,M=A.slice(q),x=V.exec(M)[0];E.call(T,x),A=A.replace(x,"")}}return function(j){var H=j.afternoon;if(H!==void 0){var z=j.hours;H?z<12&&(j.hours+=12):z===12&&(j.hours=0),delete j.afternoon}}(T),T}}return function(y,b,f){f.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(c=y.parseTwoDigitYear);var m=b.prototype,h=m.parse;m.parse=function(S){var N=S.date,C=S.utc,w=S.args;this.$u=C;var B=w[1];if(typeof B=="string"){var A=w[2]===!0,T=w[3]===!0,$=A||T,q=w[2];T&&(q=w[2]),s=this.$locale(),!A&&q&&(s=f.Ls[q]),this.$d=function(M,x,j){try{if(["x","X"].indexOf(x)>-1)return new Date((x==="X"?1e3:1)*M);var H=v(x)(M),z=H.year,_=H.month,U=H.day,I=H.hours,P=H.minutes,D=H.seconds,W=H.milliseconds,L=H.zone,O=new Date,Q=U||(z||_?1:O.getDate()),G=z||O.getFullYear(),te=0;z&&!_||(te=_>0?_-1:O.getMonth());var F=I||0,Y=P||0,X=D||0,K=W||0;return L?new Date(Date.UTC(G,te,Q,F,Y,X,K+60*L.offset*1e3)):j?new Date(Date.UTC(G,te,Q,F,Y,X,K)):new Date(G,te,Q,F,Y,X,K)}catch{return new Date("")}}(N,B,C),this.init(),q&&q!==!0&&(this.$L=this.locale(q).$L),$&&N!=this.format(B)&&(this.$d=new Date("")),s={}}else if(B instanceof Array)for(var R=B.length,V=1;V<=R;V+=1){w[1]=B[V-1];var E=f.apply(this,w);if(E.isValid()){this.$d=E.$d,this.$L=E.$L,this.init();break}V===R&&(this.$d=new Date(""))}else h.call(this,S)}}})})(Bs);var xd=Bs.exports;const Dd=Ye(xd);var As={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){var r=o.prototype,i=r.format;l.en.ordinal=function(s){var c=["th","st","nd","rd"],d=s%100;return"["+s+(c[(d-20)%10]||c[d]||c[0])+"]"},r.format=function(s){var c=this,d=this.$locale();if(!this.isValid())return i.bind(this)(s);var p=this.$utils(),u=(s||"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(g){switch(g){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 p.s(c.week(),g==="w"?1:2,"0");case"W":case"WW":return p.s(c.isoWeek(),g==="W"?1:2,"0");case"k":case"kk":return p.s(String(c.$H===0?24:c.$H),g==="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 g}});return i.bind(this)(u)}}})})(As);var Id=As.exports;const qd=Ye(Id);var Vs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){var r=o.prototype,i=function(u){return u&&(u.indexOf?u:u.s)},s=function(u,g,k,v,y){var b=u.name?u:u.$locale(),f=i(b[g]),m=i(b[k]),h=f||m.map(function(N){return N.slice(0,v)});if(!y)return h;var S=b.weekStart;return h.map(function(N,C){return h[(C+(S||0))%7]})},c=function(){return l.Ls[l.locale()]},d=function(u,g){return u.formats[g]||function(k){return k.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(v,y,b){return y||b.slice(1)})}(u.formats[g.toUpperCase()])},p=function(){var u=this;return{months:function(g){return g?g.format("MMMM"):s(u,"months")},monthsShort:function(g){return g?g.format("MMM"):s(u,"monthsShort","months",3)},firstDayOfWeek:function(){return u.$locale().weekStart||0},weekdays:function(g){return g?g.format("dddd"):s(u,"weekdays")},weekdaysMin:function(g){return g?g.format("dd"):s(u,"weekdaysMin","weekdays",2)},weekdaysShort:function(g){return g?g.format("ddd"):s(u,"weekdaysShort","weekdays",3)},longDateFormat:function(g){return d(u.$locale(),g)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return p.bind(this)()},l.localeData=function(){var u=c();return{firstDayOfWeek:function(){return u.weekStart||0},weekdays:function(){return l.weekdays()},weekdaysShort:function(){return l.weekdaysShort()},weekdaysMin:function(){return l.weekdaysMin()},months:function(){return l.months()},monthsShort:function(){return l.monthsShort()},longDateFormat:function(g){return d(u,g)},meridiem:u.meridiem,ordinal:u.ordinal}},l.months=function(){return s(c(),"months")},l.monthsShort=function(){return s(c(),"monthsShort","months",3)},l.weekdays=function(u){return s(c(),"weekdays",null,null,u)},l.weekdaysShort=function(u){return s(c(),"weekdaysShort","weekdays",3,u)},l.weekdaysMin=function(u){return s(c(),"weekdaysMin","weekdays",2,u)}}})})(Vs);var Pd=Vs.exports;const Md=Ye(Pd);var Ts={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a="week",o="year";return function(l,r,i){var s=r.prototype;s.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 p=i(this).startOf(o).add(1,o).date(d),u=i(this).endOf(a);if(p.isBefore(u))return 1}var g=i(this).startOf(o).date(d).startOf(a).subtract(1,"millisecond"),k=this.diff(g,a,!0);return k<0?i(this).startOf("week").week():Math.ceil(k)},s.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(Ts);var Ld=Ts.exports;const zd=Ye(Ld);var $s={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.weekYear=function(){var l=this.month(),r=this.week(),i=this.year();return r===1&&l===11?i+1:l===0&&r>=52?i-1:i}}})})($s);var Od=$s.exports;const Fd=Ye(Od);var Es={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){o.prototype.dayOfYear=function(r){var i=Math.round((l(this).startOf("day")-l(this).startOf("year"))/864e5)+1;return r==null?i:this.add(r-i,"day")}}})})(Es);var Rd=Es.exports;const Kd=Ye(Rd);var xs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.isSameOrAfter=function(l,r){return this.isSame(l,r)||this.isAfter(l,r)}}})})(xs);var Ud=xs.exports;const Hd=Ye(Ud);var Ds={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.isSameOrBefore=function(l,r){return this.isSame(l,r)||this.isBefore(l,r)}}})})(Ds);var jd=Ds.exports;const Wd=Ye(jd);Re.extend(Md);Re.extend(qd);Re.extend(Dd);Re.extend(zd);Re.extend(Fd);Re.extend(Kd);Re.extend(Hd);Re.extend(Wd);const ae={format(e,n){return Re(e).format(n)},parser(e,n){return Re(e,n).toDate()},isLeapYear(e){return e%4==0&&e%100!=0||e%400==0},getWhatDay(e,n,a){const l=new Date(e+"/"+n+"/"+a).getDay();return["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][l]},getMonthPreDay(e,n){let o=new Date(e+"/"+n+"/01").getDay();return o==0&&(o=7),o},getMonthDays(e,n){return/^0/.test(n)&&(n=n.split("")[1]),[0,31,this.isLeapYear(Number(e))?29:28,31,30,31,30,31,31,30,31,30,31][n]},getNumTwoBit(e){return e=Number(e),(e>9?"":"0")+e},date2Str:function(e,n){n=n||"-";const a=e.getFullYear(),o=this.getNumTwoBit(e.getMonth()+1),l=this.getNumTwoBit(e.getDate());return[a,o,l].join(n)},getDay(e,n,a){e=e||0;let o=n??new Date;const l=e*(1e3*60*60*24);return o=new Date(o.getTime()+l),a=a??"YYYY-MM-DD",this.format(o,a)},compareDate(e,n){let a;typeof e=="string"?a=new Date(e.replace("-","/").replace("-","/")):a=e;let o;return typeof n=="string"?o=new Date(n.replace("-","/").replace("-","/")):o=n,!(a>=o)},isEqual(e,n){if(e===n)return!0;if(!e||!n)return!1;let a;typeof e=="string"?a=new Date(e).getTime():a=e;let o;return typeof n=="string"?o=new Date(n).getTime():o=n,a==o},getMonthWeek:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a));let r=l.getDay(),i=l.getDate(),s=6-r;return o!==0&&(r=r==0?7:r,s=7-r),Math.ceil((i+s)/7)},getYearWeek:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a)),r=new Date(Number(e),0,1),i=Math.round((l.valueOf()-r.valueOf())/864e5);let s=l.getDay(),c=6-s;return o!==0&&(s=s==0?7:s,c=7-s),Math.ceil((i+c)/7)},getWeekDate:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a)),r=l.getTime();let i=l.getDay();if(o===0){const c=r-i*864e5,d=r+(6-i)*864e5,p=this.date2Str(new Date(c)),u=this.date2Str(new Date(d));return[p,u]}else{i=i==0?7:i;const s=24*60*60*1e3,c=r-(i-1)*s,d=r+(7-i)*s,p=this.date2Str(new Date(c)),u=this.date2Str(new Date(d));return[p,u]}},formatResultDate:function(e){let n=[...e.split("-")];return n[2]=ae.getNumTwoBit(Number(n[2])),n[3]=`${n[0]}-${n[1]}-${n[2]}`,n[4]=ae.getWhatDay(+n[0],+n[1],+n[2]),n},inScope4Day(e,n,a){const o=new Date(new Date(n).setDate(n.getDate()+a)),l=e.getTime(),r=o.getTime(),i=n.getTime();return r>i?l>=i&&l<=r:l>=r&&l<=i},inScope4Month(e,n,a){const o=new Date(new Date(n).setMonth(n.getMonth()+a)),l=e.getTime(),r=o.getTime(),i=n.getTime();return r>i?l>=i&&l<=r:l>=r&&l<=i}},fr=new Date().getFullYear(),cl={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"},wn=(e,n,a)=>{let o;if(He(n)?o=n:typeof n=="string"&&ve(n)>0?o=ae.parser(n,a):o=new Date,o.toString()==="Invalid Date")return null;let l=Math.max(o.getTime(),e.minDate.getTime());return l=Math.min(l,e.maxDate.getTime()),new Date(l)},Io=(e,n,a)=>{He(n)||(n=e.minDate);let o=Math.max(n.getTime(),e.minDate.getTime());return o=Math.min(o,e.maxDate.getTime()),ae.format(new Date(o),a)};let qo={modelValue:{type:[String,Date]},confirmText:{type:String},cancelText:{type:String},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(fr-10,0,1),validator:He},maxDate:{type:Date,default:()=>new Date(fr+10,11,31),validator:He},visibleItemCount:{type:[Number,String],default:7},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:1e3},teleportDisable:{type:Boolean}};const{create:Yd,scope:Xd}=J("date-picker"),Qd=Yd({components:{Picker:_t},props:{...qo},emits:["click","update:visible","update:modelValue","update:dateIndexs","update:close","cancel","confirm","clear"],setup(e,{emit:n}){const{t:a}=se.useFoxI18n(Xd),o={day:a("day"),year:a("year"),month:a("month"),hour:a("hour"),minute:a("minute"),seconds:a("seconds"),today:a("today")},l=t.ref(!1);t.watch(()=>e.visible,m=>{l.value=m});function r(m,h){return new Date(m,h,0).getDate()}const i=(m,h)=>{const S=e[`${m}Date`],N=S.getFullYear();let C=1,w=1,B=0,A=0;m==="max"&&(C=12,w=r(h.getFullYear(),h.getMonth()+1),B=23,A=59);const T=A;return h.getFullYear()===N&&(C=S.getMonth()+1,h.getMonth()+1===C&&(w=S.getDate(),h.getDate()===w&&(B=S.getHours(),h.getHours()===B&&(A=S.getMinutes())))),{[`${m}Year`]:N,[`${m}Month`]:C,[`${m}Date`]:w,[`${m}Hour`]:B,[`${m}Minute`]:A,[`${m}Seconds`]:T}},s=t.computed(()=>{if(!g.value)return[];const{maxYear:m,maxDate:h,maxMonth:S,maxHour:N,maxMinute:C,maxSeconds:w}=i("max",g.value),{minYear:B,minDate:A,minMonth:T,minHour:$,minMinute:q,minSeconds:R}=i("min",g.value);let V=[{type:"year",range:[B,m]},{type:"month",range:[T,S]},{type:"day",range:[A,h]},{type:"hour",range:[$,N]},{type:"minute",range:[q,C]},{type:"seconds",range:[R,w]}];switch(e.type){case"date":V=V.slice(0,3);break;case"datetime":V=V.slice(0,5);break;case"time":V=V.slice(3,6);break;case"year-month":V=V.slice(0,2);break;case"month-day":V=V.slice(1,3);break;case"datehour":V=V.slice(0,4);break;case"hour-minute":V=V.slice(3,5);break}return V}),c=(m,h,S,N,C)=>{if(!(h>m))return null;const w=[];for(;m<=h;)e.isShowChinese?S==="day"&&N&&m===C?w.push({text:o.today,value:m}):w.push({text:m+o[S],value:m}):w.push({text:`${m}`,value:m}),S==="minute"?m+=e.minuteStep:m++;return w},d=t.computed(()=>{let m=!1;const h=new Date;let S=h.getDate();g.value&&(m=h.getFullYear()===g.value.getFullYear()&&h.getMonth()===g.value.getMonth());let N=[];return s.value.forEach(C=>{let w=c(C.range[0],C.range[1],C.type,m,S);w&&N.push(w)}),N}),p=(m,h)=>m==="year"?h.getFullYear():m==="month"?h.getMonth()+1:m==="day"?h.getDate():m==="hour"?h.getHours():m==="minute"?h.getMinutes():m==="seconds"?h.getSeconds():0,u=t.ref(),g=t.ref(null);t.watch(()=>e.modelValue,m=>{let h;if(typeof m=="string"?m.length==0?h=new Date:e.valueFormat?h=wn(e,e.modelValue,e.valueFormat):h=wn(e,m,cl[e.type]):He(m)?h=m:h=new Date,!!h&&(!g.value||h.getTime()!==g.value.getTime())){g.value=h;let S=[];s.value.forEach(N=>{let C=p(N.type,h);S.push(C)}),u.value=S}},{immediate:!0});const k=m=>{if(e.type==="date"){const h=m[0],S=m[1]-1,N=Math.min(m[2],r(h,S+1));N!==m[2]&&(m[2]=N),g.value=new Date(h,S,N)}else if(e.type==="datetime"){const h=m[0],S=m[1]-1,N=Math.min(m[2],r(h,S+1)),C=m[3],w=m[4];N!==m[2]&&(m[2]=N),g.value=new Date(h,S,N,C,w)}else if(e.type==="time"){const h=m[0],S=m[1],N=m[2],C=g.value??new Date,w=new Date(C.getFullYear(),C.getMonth(),C.getDate(),h,S,N);g.value=w}else if(e.type==="year-month"){const h=m[0],S=m[1]-1;g.value=new Date(h,S)}else if(e.type==="month-day"){const S=(g.value??new Date).getFullYear(),N=m[0]-1,C=Math.min(m[1],r(S,N+1));C!==m[1]&&(m[1]=C);const w=new Date(S,N,C);g.value=w}else if(e.type==="datehour"){const h=m[0],S=m[1]-1,N=Math.min(m[2],r(h,S+1)),C=m[3];N!==m[2]&&(m[2]=N),g.value=new Date(h,S,N,C)}else if(e.type==="hour-minute"){const h=m[0],S=m[1],N=g.value??new Date,C=new Date(N.getFullYear(),N.getMonth(),N.getDate(),h,S);g.value=C}u.value=m};return{columns:d,dateIndexs:u,show:l,onChange:m=>{k(m)},onClose:()=>{l.value=!1,n("update:visible",!1),n("update:close",!1)},onConfirm:m=>{k(m),l.value=!1;let h=g.value??new Date;if(e.valueFormat){let S=Io(e,h,e.valueFormat);n("update:modelValue",S)}else n("update:modelValue",h);n("update:visible",!1),n("confirm",m)},onClear:()=>{n("clear")}}}});function Gd(e,n,a,o,l,r){const i=t.resolveComponent("Picker");return t.openBlock(),t.createBlock(i,{visible:e.show,"model-value":e.dateIndexs,source:e.columns,"value-type":"value","confirm-text":e.confirmText,"cancel-text":e.cancelText,title:e.title,onChange:e.onChange,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","onChange","onConfirm","onClose","onClear","visible-item-count","three-dimensional","swipe-duration","teleport-disable"])}const Xn=ne(Qd,[["render",Gd]]),Zd={format:{type:String},placeholder:{type:String},textAlign:{type:String},clearable:{type:Boolean,default:!0}};function Jd(e){let n=e.format;if(!n){let a=e.type??"date";n=cl[a]}return n}function _d(e,n,a,o,l,r,i=!1){return{props:{...pe,...ge,...qo,...Zd},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(s,c){const d=$e(t.computed(()=>s.disabled)),p=Te(t.computed(()=>s.readonly)),{emitEvent:u}=Ae({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return d.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=se.useFoxI18n(n),k=g(s,["placeholder"]),v=t.ref(!1),b=qe(s,"modelValue",I=>I==null?null:typeof I=="string"?I.length==0?null:s.valueFormat?wn(s,I,s.valueFormat)??I:wn(s,I,cl[s.type])??I:He(I)?I:null,u),f=t.computed(()=>{if(!b.value)return"";const I=Jd(s);return Io(s,b.value,I)}),m="fox-input-item",h=t.computed(()=>({[m]:!0,"is-disabled":d.value,"is-readonly":p.value})),S=Ve(t.computed(()=>s.textAlign),"textAlign"),N=t.computed(()=>{const I={};return S.value&&(I["text-align"]=S.value),I}),C=t.ref(!1),w=()=>{C.value=!0},B=()=>{C.value=!1};c.expose({showPicker:w,hidePicker:B});const A=I=>{C.value=I},T=I=>{if(b.value=I,s.valueFormat){let P=Io(s,I,s.valueFormat);u("update:modelValue",P,{}),u("change",P,{})}else u("update:modelValue",I,{}),u("change",I,{})},$=I=>{let D=I.target.value;v.value=!0,u("focus",D,I)},q=I=>{setTimeout(()=>{v.value=!1},0);let D=I.target.value;s.maxLength&&D.length>Number(s.maxLength)&&(D=D.slice(0,Number(s.maxLength))),u("blur",D,I)},R=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":d.value,"is-readonly":p.value})),V=t.computed(()=>ve(s.unit)>0),E=t.computed(()=>ve(s.unit)>0&&!v.value),M=t.computed(()=>({hidden:!E.value})),x=I=>{b.value="",u("update:modelValue","",I),u("change","",I),u("clear",""),B()},j=t.computed(()=>s.clearable&&!d.value&&!p.value),H=t.computed(()=>{let I=ve(b.value)>0;return s.clearable&&I&&v.value}),z=I=>{H.value?x(I):w()},_=t.computed(()=>H.value&&j.value?o:l),U=t.computed(()=>({action:!0}));return()=>{const I={class:h.value,style:N.value,type:"text",maxlength:s.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:w,onFocus:$,onBlur:q};i&&(I.disabled=!0);const P=[],D=t.h("input",I);P.push(D);const W=[],L={class:["action-icon"]},O=t.h(_.value,L),Q={class:U.value,onClick:z},G=t.h("view",Q,{default:()=>[O]});if(W.push(G),V.value){const ce=t.h("view",{class:M.value},[s.unit]);W.push(ce)}const te={class:R.value},F=t.h("view",te,{default:()=>W});P.push(F);const Y={default:()=>P};Y.label=c.slots.default,Y.prepend=c.slots.prepend,Y.append=c.slots.append,Y.fixedPreTip=c.slots.fixedPreTip,Y.fixedTip=c.slots.fixedTip;const X=be(s,qo);X.valueFormat=null,X.disabled=!1,X.readonly=d.value||p.value,X.visible=C.value,X["onUpdate:visible"]=A,X.modelValue=b.value,X["onUpdate:modelValue"]=T,X.onClear=x;const K={};if(c.slots.top){const ce=c.slots.top();K.top=()=>ce}if(c.slots.bottom){const ce=c.slots.bottom();K.default=()=>ce}const Z=t.h(r,X,K);Y.hide=()=>[Z];const le={...be(s,ge,pe)};return s.prop&&(le.prop=`${s.prop}_item`),t.h(a,le,Y)}}}}const{create:ef,componentName:tf,scope:nf}=J("date-item"),ul=ef(_d(tf,nf,we,oe.CircleClose,oe.Date,Xn,!1)),of=39,lf=64,{create:af,scope:rf}=J("calendar-pane"),sf=af({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:ae.getDay(0)},endDate:{type:String,default:ae.getDay(365)},firstDayOfWeek:{type:Number,default:0}},emits:["choose","update","close","select"],setup(e,{emit:n,slots:a}){const{toLocaleRefs:o,t:l}=se.useFoxI18n(rf),r=o(e,["title","confirmText","startText","endText","today"]),i=JSON.parse(l("weekdays")),s=t.ref([...i.slice(e.firstDayOfWeek,7),...i.slice(0,e.firstDayOfWeek)]),c=t.ref(null),d=t.ref(null),p=t.ref(null),u=t.ref(null),g=t.ref(0),k=t.computed(()=>f.monthsData.slice(f.defaultRange[0],f.defaultRange[1])),v=t.computed(()=>a.btn),y=t.computed(()=>a["top-info"]),b=t.computed(()=>a["bottom-info"]),f=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}),m=L=>L.split("-"),h=L=>ae.isEqual(f.currDate[0],L),S=L=>ae.isEqual(f.currDate[1],L),N=L=>f.currDate?.length>0?f.currDate?.some(O=>ae.isEqual(O,L)):!1,C=(L,O)=>O.curData[0]+"-"+O.curData[1]+"-"+ae.getNumTwoBit(+L.day),w=(L,O)=>{const Q=C(L,O),{type:G}=e;return L.type=="curr"?ae.isEqual(f.currDate,Q)||(G=="range"||G=="week")&&(h(Q)||S(Q))||G=="multiple"&&N(Q)?`${f.dayPrefix}--active`:f.propStartDate&&ae.compareDate(Q,f.propStartDate)||f.propEndDate&&ae.compareDate(f.propEndDate,Q)?`${f.dayPrefix}--disabled`:(G=="range"||G=="week")&&Array.isArray(f.currDate)&&Object.values(f.currDate).length==2&&ae.compareDate(f.currDate[0],Q)&&ae.compareDate(Q,f.currDate[1])?`${f.dayPrefix}--choose`:null:`${f.dayPrefix}--disabled`},B=()=>{const{type:L}=e;if(L=="range"&&f.chooseData.length==2||L!="range"){let O=f.chooseData.slice(0);L=="week"&&(O={weekDate:[T(f.chooseData[0]),T(f.chooseData[1])]}),n("choose",O),e.poppable&&n("update")}},A=(L,O,Q=!1)=>{if(w(L,O)!=`${f.dayPrefix}--disabled`){const{type:G}=e;let[te,F]=O.curData,Y=[...O.curData];if(Y[2]=ae.getNumTwoBit(Number(L.day)),Y[3]=`${Y[0]}-${Y[1]}-${Y[2]}`,Y[4]=ae.getWhatDay(+Y[0],+Y[1],+Y[2]),G=="multiple")if(f.currDate?.length>0){let X;f.currDate?.forEach((K,Z)=>{K==Y[3]&&(X=Z)}),Q?f.chooseData.push([...Y]):X!==void 0?(f.currDate.splice(X,1),f.chooseData.splice(X,1)):(f.currDate.push(Y[3]),f.chooseData.push([...Y]))}else f.currDate=[Y[3]],f.chooseData=[[...Y]];else if(G=="range"){let X=Object.values(f.currDate).length;X==2||X==0?f.currDate=[Y[3]]:ae.compareDate(f.currDate[0],Y[3])?Array.isArray(f.currDate)&&f.currDate.push(Y[3]):Array.isArray(f.currDate)&&f.currDate.unshift(Y[3]),f.chooseData.length==2||!f.chooseData.length?f.chooseData=[[...Y]]:ae.compareDate(f.chooseData[0][3],Y[3])?f.chooseData=[...f.chooseData,[...Y]]:f.chooseData=[[...Y],...f.chooseData]}else if(G=="week"){let X=ae.getWeekDate(te,F,L.day,e.firstDayOfWeek);f.propStartDate&&ae.compareDate(X[0],f.propStartDate)&&X.splice(0,1,f.propStartDate),f.propEndDate&&ae.compareDate(f.propEndDate,X[1])&&X.splice(1,1,f.propEndDate),f.currDate=X,f.chooseData=[ae.formatResultDate(X[0]),ae.formatResultDate(X[1])]}else f.currDate=Y[3],f.chooseData=[...Y];if(!Q){let X=f.chooseData;G=="week"&&(X={weekDate:[T(f.chooseData[0]),T(f.chooseData[1])]}),n("select",X),(e.isAutoBackFill||!e.poppable)&&B()}}},T=L=>{let[O,Q,G]=L;return{date:L,monthWeekNum:ae.getMonthWeek(O,Q,G,e.firstDayOfWeek),yearWeekNum:ae.getYearWeek(O,Q,G,e.firstDayOfWeek)}},$=L=>{const O=f.monthsData[f.monthsData.length-1];let Q=parseInt(O.curData[0]),G=parseInt(O.curData[1].toString().replace(/^0/,""));switch(L){case"prev":G==1&&(Q-=1),G=G==1?12:--G;break;case"next":G==12&&(Q+=1),G=G==12?1:++G;break}return[Q+"",ae.getNumTwoBit(G),ae.getMonthDays(String(Q),String(G))+""]},q=(L,O,Q)=>{let{year:G,month:te}=Q;return Array.from(Array(L),(F,Y)=>({day:String(Y+1),type:O,year:G,month:te}))},R=(L,O,Q,G)=>{L=L-e.firstDayOfWeek;let{year:te,month:F}=Q;return L>=7&&(L-=7),Array.from(Array(G),(X,K)=>({day:String(K+1),type:O,year:te,month:F})).slice(G-L)},V=(L,O)=>{const Q=ae.getMonthPreDay(+L[0],+L[1]);let G=Number(L[1])-1,te=Number(L[0]);G<=0&&(G=12,te+=1);const F=ae.getMonthDays(String(L[0]),String(L[1])),Y=ae.getMonthDays(te+"",G+""),X={year:L[0],month:L[1]},K={curData:L,title:l("monthTitle",{year:X.year,month:X.month}),monthData:[...R(Q,"prev",{month:String(G),year:String(te)},Y),...q(F,"curr",X)],cssHeight:0,cssScrollHeight:0},Z=K.monthData.length>35?6:5;K.cssHeight=of+lf*Z;let ee=0;f.monthsData.length>0&&(ee=f.monthsData[f.monthsData.length-1].cssScrollHeight+f.monthsData[f.monthsData.length-1].cssHeight),K.cssScrollHeight=ee,(!f.endData||!ae.compareDate(`${f.endData[0]}-${f.endData[1]}-${ae.getMonthDays(f.endData[0],f.endData[1])}`,`${L[0]}-${L[1]}-${L[2]}`))&&f.monthsData.push(K)},E=()=>{let L=e.startDate?e.startDate:ae.getDay(0),O=e.endDate?e.endDate:ae.getDay(365);f.propStartDate=L,f.propEndDate=O,f.startData=m(L),f.endData=m(O),(e.defaultValue||Array.isArray(e.defaultValue)&&e.defaultValue.length>0)&&(f.currDate=e.type!=="one"?[...e.defaultValue]:e.defaultValue);const Q={year:Number(f.startData[0]),month:Number(f.startData[1])},G={year:Number(f.endData[0]),month:Number(f.endData[1])};let te=G.month-Q.month;G.year-Q.year>0&&(te=te+12*(G.year-Q.year)),te<=0&&(te=1),V(f.startData);let F=1;do V($("next"));while(F++<te);if(f.monthsNum=te,e.type=="range"&&Array.isArray(f.currDate))f.currDate.length>0&&(L&&ae.compareDate(f.currDate[0],L)&&f.currDate.splice(0,1,L),O&&ae.compareDate(O,f.currDate[1])&&f.currDate.splice(1,1,O),f.defaultData=[...m(f.currDate[0]),...m(f.currDate[1])]);else if(e.type=="multiple"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let Y=[],X={};f.currDate.forEach(K=>{L&&!ae.compareDate(K,L)&&O&&!ae.compareDate(O,K)&&(Object.hasOwnProperty.call(X,K)||(Y.push(K),X[K]=K))}),f.currDate=[...Y],f.defaultData=[...m(Y[0])]}}else if(e.type=="week"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let[Y,X,K]=m(f.currDate[0]),Z=ae.getWeekDate(Y,X,K,e.firstDayOfWeek);f.currDate=Z,L&&ae.compareDate(f.currDate[0],L)&&f.currDate.splice(0,1,L),O&&ae.compareDate(O,f.currDate[1])&&f.currDate.splice(1,1,O),f.defaultData=[...m(f.currDate[0]),...m(f.currDate[1])]}}else f.currDate&&(L&&ae.compareDate(f.currDate,L)?f.currDate=L:O&&!ae.compareDate(f.currDate,O)&&(f.currDate=O),f.defaultData=[...m(f.currDate)])};Ie({scrollToDate:L=>{ae.compareDate(L,f.propStartDate)?L=f.propStartDate:ae.compareDate(L,f.propEndDate)||(L=f.propEndDate);let O=m(L);f.monthsData.forEach((Q,G)=>{if(Q.title==l("monthTitle",{year:O[0],month:O[1]})&&c.value){let te=f.monthsData[G].cssScrollHeight-c.value.scrollTop;if(e.toDateAnimation){let F=0,Y=setInterval(()=>{if(F++,c.value){let X=te/10;c.value.scrollTop=c.value.scrollTop+X}F>=10&&(clearInterval(Y),c.value&&(c.value.scrollTop=f.monthsData[G].cssScrollHeight))},40)}else c.value.scrollTop=f.monthsData[G].cssScrollHeight}})},initPosition:()=>{c?.value&&(c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)},doLayout:()=>{let L=0,O=0;f.defaultData.length>0&&f.monthsData.forEach((te,F)=>{te.title==l("monthTitle",{year:f.defaultData[0],month:f.defaultData[1]})&&(L=F),(e.type=="range"||e.type=="week")&&te.title==l("monthTitle",{year:f.defaultData[3],month:f.defaultData[4]})&&(O=F)}),H(f.monthsNum,L),f.currentIndex=L,f.yearMonthTitle=f.monthsData[f.currentIndex].title,f.defaultData.length>0&&(f.isRange?(A({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0),A({day:f.defaultData[5],type:"curr"},f.monthsData[O],!0)):e.type=="week"?A({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0):e.type=="multiple"?[...f.currDate].forEach(te=>{let F=m(te),Y=f.currentIndex;f.monthsData.forEach((X,K)=>{X.title==l("monthTitle",{year:F[0],month:F[1]})&&(Y=K)}),A({day:F[2],type:"curr"},f.monthsData[Y],!0)}):A({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0));let Q=f.monthsData[f.monthsData.length-1],G=Q.cssHeight+Q.cssScrollHeight;Xe(()=>{c?.value&&d?.value&&u?.value&&(g.value=c.value.clientHeight,d.value.style.height=`${G}px`,c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)}),f.avgHeight=Math.floor(G/(f.monthsNum+1))}});const H=(L,O)=>{L>=3?O>0&&O<L?f.defaultRange=[O-1,O+3]:O==0?f.defaultRange=[O,O+4]:O==L&&(f.defaultRange=[O-2,O+2]):f.defaultRange=[0,L+2];let Q=f.monthsData[f.defaultRange[0]].cssScrollHeight;f.translateY=Q},z=(L,O)=>(e.type=="range"||e.type=="week")&&L.type=="curr"&&w(L,O)=="fox-calendar__day--active",_=(L,O)=>z(L,O)&&h(C(L,O)),U=(L,O)=>f.currDate.length>=2&&S(C(L,O))?z(L,O):!1,I=()=>{if(f.currDate.length>=2)return ae.isEqual(f.currDate[0],f.currDate[1])},P=L=>{const O=`${L.year}-${L.month}-${Number(L.day)<10?"0"+L.day:L.day}`;return ae.isEqual(O,ae.date2Str(new Date))},D=L=>{if(f.monthsData.length<=1)return;const O=L.target.scrollTop;let Q=Math.floor(O/f.avgHeight);if(Q==0)O>=f.monthsData[Q+1].cssScrollHeight&&(Q+=1);else if(Q>0&&Q<f.monthsNum-1)O>=f.monthsData[Q+1].cssScrollHeight&&(Q+=1),O<f.monthsData[Q].cssScrollHeight&&(Q-=1);else{const G=Math.round(O+g.value);G<f.monthsData[Q].cssScrollHeight+f.monthsData[Q].cssHeight&&O>f.monthsData[Q-1].cssScrollHeight&&(Q-=1),Q+1<=f.monthsNum&&G>=f.monthsData[Q+1].cssScrollHeight+f.monthsData[Q+1].cssHeight&&(Q+=1),Q>=1&&O<f.monthsData[Q-1].cssScrollHeight&&(Q-=1)}f.currentIndex!==Q&&(f.currentIndex=Q,H(f.monthsNum,Q)),f.yearMonthTitle=f.monthsData[Q].title},W=()=>{f.chooseData.splice(0),f.monthsData.splice(0),E()};return E(),t.watch(()=>e.defaultValue,L=>{L&&e.poppable&&W()}),{weeks:s,compConthsData:k,showTopBtn:v,topInfo:y,bottomInfo:b,rangeTip:I,mothsViewScroll:D,getClass:w,isStartTip:_,isEndTip:U,chooseDay:A,isCurrDay:P,confirm:B,months:c,...t.toRefs(f),...t.toRefs(e),...r,monthsPanel:d,weeksPanel:p,viewArea:u}}}),cf={class:"fox-calendar__header"},uf={key:0,class:"fox-calendar__header-title"},df={key:1,class:"fox-calendar__header-slot"},ff={key:2,class:"fox-calendar__header-subtitle"},mf={class:"fox-calendar__weekdays",ref:"weeksPanel"},pf={class:"fox-calendar__panel",ref:"monthsPanel"},hf={class:"fox-calendar__month-title"},gf={class:"fox-calendar__days"},yf=["onClick"],vf={class:"fox-calendar__day-value"},bf={key:0,class:"fox-calendar__day-tips fox-calendar__day-tips--top"},kf={key:1,class:"fox-calendar__day-tips fox-calendar__day-tips--bottom"},Sf={key:2,class:"fox-calendar__day-tips--curr"},Cf={key:4,class:"fox-calendar__day-tip"},wf={key:0,class:"fox-calendar__footer"};function Nf(e,n,a,o,l,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",cf,[e.showTitle?(t.openBlock(),t.createElementBlock("view",uf,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.showTopBtn?(t.openBlock(),t.createElementBlock("view",df,[t.renderSlot(e.$slots,"btn")])):t.createCommentVNode("",!0),e.showSubTitle?(t.openBlock(),t.createElementBlock("view",ff,t.toDisplayString(e.yearMonthTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("view",mf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.weeks,(i,s)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__weekday",key:s},t.toDisplayString(i),1))),128))],512)]),t.createElementVNode("view",{class:"fox-calendar__content",ref:"months",onScroll:n[0]||(n[0]=(...i)=>e.mothsViewScroll&&e.mothsViewScroll(...i))},[t.createElementVNode("view",pf,[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,(i,s)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__month",key:s},[t.createElementVNode("view",hf,t.toDisplayString(i.title),1),t.createElementVNode("view",gf,[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(i.monthData,(c,d)=>(t.openBlock(),t.createElementBlock("view",{key:d,class:t.normalizeClass(["fox-calendar__day",e.getClass(c,i)]),onClick:p=>e.chooseDay(c,i)},[t.createElementVNode("view",vf,[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",bf,[t.renderSlot(e.$slots,"top-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),e.bottomInfo?(t.openBlock(),t.createElementBlock("view",kf,[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",Sf,t.toDisplayString(e.today),1)):t.createCommentVNode("",!0),e.isStartTip(c,i)?(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,i)?(t.openBlock(),t.createElementBlock("view",Cf,t.toDisplayString(e.endText),1)):t.createCommentVNode("",!0)],10,yf))),128))],2)])]))),128))],4)],512)],544),e.poppable&&!e.isAutoBackFill?(t.openBlock(),t.createElementBlock("view",wf,[t.createElementVNode("view",{class:"fox-calendar__confirm",onClick:n[1]||(n[1]=(...i)=>e.confirm&&e.confirm(...i))},t.toDisplayString(e.confirmText),1)])):t.createCommentVNode("",!0)],2)}const mr=ne(sf,[["render",Nf]]),Bf=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:Af}=J("calendar"),Vf=Af({components:{[mr.name]:mr,[fe.name]:fe},props:{...sn},emits:["choose","close","update:visible","select"],setup(e,{emit:n,slots:a}){const o=t.computed(()=>a.btn),l=t.computed(()=>a["top-info"]),r=t.computed(()=>a.day),i=t.computed(()=>a["bottom-info"]),s=t.ref(null),c=y=>{s.value?.scrollToDate(y)},d=()=>{s.value?.initPosition()};t.watch(()=>e.visible,y=>{y&&t.nextTick(()=>{s.value?s.value.doLayout():setTimeout(()=>{s.value&&s.value.doLayout()},250)})}),Ie({scrollToDate:c,initPosition:d});const p=()=>{n("update:visible",!1)},u=()=>{n("close"),n("update:visible",!1)};return{closePopup:()=>{u()},update:p,close:u,select:y=>{n("select",y)},choose:y=>{u(),n("choose",y)},calendarRef:s,showTopBtn:o,topInfo:l,dayInfo:r,bottomInfo:i}}});function Tf(e,n,a,o,l,r){const i=t.resolveComponent("fox-calendar-pane"),s=t.resolveComponent("fox-popup");return e.poppable?(t.openBlock(),t.createBlock(s,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(i,{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(i,{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 Qn=ne(Vf,[["render",Tf]]),pr={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}},mo=(e,n)=>{let a;return He(e)?a=e:typeof e=="string"&&ve(e)>0?a=ae.parser(e,n):a=new Date,a},ft=(e,n,a)=>(He(n)||(n=new Date),ae.format(n,a)),mt=e=>{let n=`${e.getFullYear()}`,a=`${e.getMonth()+1}`,o=`${e.getDate()}`,l=ae.date2Str(e),r=ae.getWhatDay(e.getFullYear(),e.getMonth()+1,e.getDate());return[n,a,o,l,r]};function $f(e,n,a,o,{CloseIcon:l,MarkIcon:r},i=!1){return{props:{...pe,...ge,...sn,...pr},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(s,c){const d=$e(t.computed(()=>s.disabled)),p=Te(t.computed(()=>s.readonly)),{emitEvent:u}=Ae({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return d.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=se.useFoxI18n(n),k=g(s,["placeholder"]),v=t.ref(!1),y=t.computed(()=>s.type==="range"),b=t.reactive({startDate:null,endDate:null,startArray:[],endArray:[]}),f=()=>{b.startDate!==null&&(b.startDate=null,b.endDate=null,b.startArray=[],b.endArray=[])},m=(D,W="one",L="YYYY-MM-DD")=>{if(Bf(D)){f();return}if(y.value&&Array.isArray(D)&&D.length==2){let O,Q;typeof D[0]=="string"?(O=mo(D[0],L),Q=mo(D[1],L)):(O=D[0],Q=D[1]);let G=mt(O),te=mt(Q);(b.startDate===null||b.startDate.getTime()!==O.getTime()||b.endDate?.getTime()!==Q.getTime())&&(b.startDate=O,b.startArray=G,b.endDate=Q,b.endArray=te)}else{let O;typeof D=="string"?O=mo(D,L):O=D;let Q=mt(O);(b.startDate===null||b.startDate.getTime()!==O.getTime())&&(b.startDate=O,b.startArray=Q)}};m(s.modelValue,s.type,s.valueFormat),t.watch(()=>s.modelValue,D=>{m(D,s.type,s.valueFormat),u("setValue",D)});const h=t.computed(()=>{if(b.startDate===null)return"";if(y.value){let D=ft(s,b.startDate,s.format),W=ft(s,b.endDate,s.format);return`${D} ${s.rangeSeparator} ${W}`}else{let D=ft(s,b.startDate,s.format);return s.showWeek&&(D=`${D} ${b.startArray[4]}`),D}}),S=t.computed(()=>{if(b.startDate===null)return null;if(y.value){let D=ae.date2Str(b.startDate),W=ae.date2Str(b.endDate??new Date);return[D,W]}else return ae.date2Str(b.startDate)}),N="fox-input-item",C=t.computed(()=>({[N]:!0,"is-disabled":d.value,"is-readonly":p.value})),w=Ve(t.computed(()=>s.textAlign),"textAlign"),B=t.computed(()=>{const D={};return w.value&&(D["text-align"]=w.value),D}),A=t.ref(!1),T=()=>{p.value||d.value||(A.value=!0)},$=D=>{A.value=D},q=D=>{if(D){if(y.value&&Array.isArray(D)){let W=D[0],L=me(W[0]),O=me(W[1]),Q=me(W[2]),G=new Date(L,O-1,Q),te=D[1];L=me(te[0]),O=me(te[1]),Q=me(te[2]);let F=new Date(L,O-1,Q);if(b.startDate=G,b.startArray=mt(G),b.endDate=F,b.endArray=mt(F),s.valueFormat){let Y=ft(s,G,s.valueFormat),X=ft(s,F,s.valueFormat);u("update:modelValue",[Y,X],{})}else u("update:modelValue",[G,F],{})}else{let W=D,L=me(W[0]),O=me(W[1]),Q=me(W[2]),G=new Date(L,O-1,Q);if(b.startDate=G,b.startArray=mt(G),s.valueFormat){let te=ft(s,G,s.valueFormat);u("update:modelValue",te,{})}else u("update:modelValue",G,{})}u("change",D,{})}},R=D=>{let L=D.target.value;v.value=!0,u("focus",L,D)},V=D=>{setTimeout(()=>{v.value=!1},0);let L=D.target.value;s.maxLength&&L.length>Number(s.maxLength)&&(L=L.slice(0,Number(s.maxLength))),u("blur",L,D)},E=t.computed(()=>({[`${N}__append`]:!0,"is-disabled":d.value,"is-readonly":p.value})),M=t.computed(()=>ve(s.unit)>0),x=t.computed(()=>ve(s.unit)>0&&!v.value),j=t.computed(()=>({hidden:!x.value})),H=D=>{f(),u("update:modelValue",null,D),u("change","",D),u("clear","")},z=t.computed(()=>s.clearable&&!d.value&&!p.value),_=t.computed(()=>{let D=ve(h.value)>0;return s.clearable&&D&&v.value}),U=D=>{_.value?H(D):T()},I=t.computed(()=>_.value&&z.value?l:r),P=t.computed(()=>({action:!0}));return()=>{const D={class:C.value,style:B.value,type:"text",maxlength:s.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:h.value,onClick:T,onFocus:R,onBlur:V};i&&(D.disabled=!0);const W=[],L=t.h("input",D);W.push(L);const O=[],Q={class:["action-icon"]},G=t.h(I.value,Q),te={class:P.value,onClick:U},F=t.h("view",te,{default:()=>[G]});if(O.push(F),M.value){const Ce=t.h("view",{class:j.value},[s.unit]);O.push(Ce)}const Y={class:E.value},X=t.h("view",Y,{default:()=>O});W.push(X);const K={default:()=>W};K.label=c.slots.default,K.prepend=c.slots.prepend,K.append=c.slots.append,K.fixedPreTip=c.slots.fixedPreTip,K.fixedTip=c.slots.fixedTip;const Z=be(s,sn);Z.visible=A.value,Z["onUpdate:visible"]=$,Z["default-value"]=S.value,Z.onChoose=q;const ee={};if(c.slots.btn){const Ce=c.slots.btn();ee.btn=()=>Ce}c.slots.day&&(ee.day=c.slots.day),c.slots.topInfo&&(ee.topInfo=c.slots.topInfo),c.slots.bottomInfo&&(ee.bottomInfo=c.slots.bottomInfo);const le=t.h(a,Z,ee);K.hide=()=>[le];const ce={...dt(s,sn,pr)};return s.prop&&(ce.prop=`${s.prop}_item`),t.h(o,ce,K)}}}}const{componentName:Ef,create:xf,scope:Df}=J("calendar-item"),dl=xf($f(Ef,Df,Qn,we,{CloseIcon:oe.CircleClose,MarkIcon:oe.Date},!1)),If={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 qf(e,{CheckNormal:n,Checked:a}){return{props:{...If},setup(o,{emit:l,slots:r}){const i=t.inject("parent",null),s=Pn(),c=t.computed(()=>i.label.value===o.label),d=t.computed(()=>i.position),p=()=>{const y=[];if(c.value){if(r.checkedIcon)return r.checkedIcon();{const b=de(o.iconSize),f=o.checkedIcon??s.radio.Checked??a;return y.push("fox-radio__icon"),o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h(f,{width:b,height:b,class:y})}}else{if(r.icon)return r.icon();{const b=de(o.iconSize),f=o.icon??s.radio.CheckNormal??n;return y.push("fox-radio__icon--unchecked"),o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h(f,{width:b,height:b,class:y})}}},u=()=>{const y=[`${e}__label`];return o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h("view",{class:y},r.default?.())},g=()=>{const y=[`${e}__button`];return c.value&&y.push(`${e}__button--active`),o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h("view",{class:y},r.default?.())},k=()=>{c.value||o.disabled||o.readonly||i.updateValue(o.label)},v=d.value==="left";return()=>t.h("view",{class:`${e} ${e}--${o.shape} ${v?`${e}--reverse`:""}`,onClick:k},[o.shape=="button"?g():v?[u(),p()]:[p(),u()]])}}}const{componentName:Pf,create:Mf}=J("radio"),Gn=Mf(qf(Pf,{CheckNormal:oe.CheckNormal,Checked:oe.CheckChecked})),{componentName:hr,create:Lf}=J("radio-group"),Zn=Lf({props:{modelValue:{type:[Object],default:""},direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},emits:["change","update:modelValue"],setup(e,{slots:n}){const{emitEvent:a}=Vt(),o=l=>a("update:modelValue",l);return t.provide("parent",{label:t.readonly(t.computed(()=>e.modelValue)),position:e.textPosition,updateValue:o}),t.watch(()=>e.modelValue,l=>a("change",l)),()=>{const l={};return e.textAlign&&(l["text-align"]=e.textAlign),t.h("view",{class:`${hr} ${hr}--${e.direction}`,style:l},n.default?.())}}});function gr(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(cn(e,r)===a)return l}else if(o==="item"){if(Pe(a,r))return l}else if(zt(e,r)===a)return l}return-1}function cn(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function zt(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function zf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Of(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Ff=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);let l=et(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(xe(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function Rf(){const e=t.getCurrentInstance();return new Ff(e.proxy)}function Kf(e){return{text:e,value:e}}const yr={shape:{type:String,default:"round"},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}},Uf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},Hf={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,Object],default:""}};function jf(e,n,a,o,l){return{props:{...pe,...ge,...yr,...Uf,...Hf},emits:["change","update:modelValue","setValue"],setup(r,i){const s=Te(t.computed(()=>r.readonly)),c=$e(t.computed(()=>r.disabled)),d=Ve(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Ae({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return s.value},get disabled(){return c.value}},r.prop??i.attrs.name),u=Rf(),g=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,m])=>{if(f){const h=await u.load("radio",f,m);if(h.length>0)if(typeof h[0]=="string"){const C=h.map(w=>Kf(w));g.value=C}else g.value=h;else g.value=[]}},{immediate:!0});let k=t.ref(-1);t.watch([()=>r.modelValue,()=>g.value],async([f,m])=>{k.value=gr(r,m,f,r.valueType),p("setValue",f)},{deep:!0});const v=t.computed(()=>{if(!r.source)return r.modelValue;if(k.value===-1)return null;const f=g.value[k.value];return zt(r,f)}),y=f=>{let m=null,h=null;if(g.value.length>0){let S=gr(r,g.value,f,"value");k.value=S,S>=0&&(h=g.value[S],r.valueType==="text"?m=cn(r,h):r.valueType==="item"?m=h:m=zt(r,h))}else m=f;p("update:modelValue",m),p("change",m,h)},b=()=>{let f=null,m=null;if(g.value.length>0&&k.value!==-1){let h=g.value[k.value];r.valueType==="text"?f=cn(r,h):r.valueType==="item"?f=h:f=zt(r,h)}p("update:modelValue",f),p("change",f,m)};if(Ie({clear(){k.value!==-1&&(k.value=-1,b())}}),r.source){const f=()=>{const m=[],h=be(r,yr);return g.value.forEach((S,N)=>{const C=zt(r,S),w=zf(r,S);let B={...h,label:C,disabled:w};const A=Of(r,S,N);B={...B,...A},c.value&&(B.disabled=!0),s.value&&(B.readonly=!0);const T={};if(i.slots.icon&&(T.icon=i.slots.icon),i.slots.checkedIcon&&(T.checkedIcon=i.slots.checkedIcon),typeof i.slots.text=="function"){const q=i.slots.text(S);T.default=()=>[q]}else{const q=cn(r,S);T.default=()=>q}let $=t.h(l,B,T);m.push($)}),m};return()=>{const m=f(),h={class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:d.value,modelValue:v,"onUpdate:modelValue":y},S=t.h(o,h,{default:()=>m}),N={default:()=>S};N.label=i.slots.default,N.prepend=i.slots.prepend,N.append=i.slots.append,N.fixedPreTip=i.slots.fixedPreTip,N.fixedTip=i.slots.fixedTip;const w={...be(r,ge,pe)};return r.prop&&(w.prop=`${r.prop}_item`),t.h(a,w,N)}}else return()=>{const f=i.slots.options?.()??[];return t.h(o,{class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:d.value,modelValue:v,"update:modelValue":y},{default:()=>f})}}}}const{componentName:Wf,create:Yf,scope:Xf}=J("radio-item"),fl=Yf(jf(Wf,Xf,we,Zn,Gn)),Qf=(e,{CheckNormal:n,Checked:a,Indeterminate:o})=>({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(l,{slots:r}){const{emitEvent:i}=Vt(),s=Pn(),c=t.inject("parent",null),d=t.reactive({partialSelect:l.indeterminate});t.watch(()=>l.indeterminate,h=>{d.partialSelect=h});const p=t.computed(()=>!!c),u=t.computed(()=>p.value?c.value.value.includes(l.label):!!l.modelValue),g=t.computed(()=>p.value?c.position:l.textPosition);let k="";const v=(h,S)=>{k="click",i("update:modelValue",h),i("change",h,S)};t.watch(()=>l.modelValue,h=>{k=="click"?k="":i("change",h)});const y=()=>{const h=[];if(d.partialSelect){if(r.indeterminateIcon)return r.indeterminateIcon();{const S=de(l.iconSize),N=l.indeterminateIcon??s.checkbox.Indeterminate??o;return h.push("fox-checkbox__icon--indeterminate"),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h(N,{width:S,height:S,class:h})}}else if(u.value){if(r.checkedIcon)return r.checkedIcon();{const S=de(l.iconSize),N=l.checkedIcon??s.checkbox.Checked??a;return h.push("fox-checkbox__icon"),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h(N,{width:S,height:S,class:h})}}else{if(r.icon)return r.icon();{const S=de(l.iconSize),N=l.icon??s.checkbox.CheckNormal??n;return h.push("fox-checkbox__icon--unchecked"),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h(N,{width:S,height:S,class:h})}}},b=()=>{const h=[`${e}__label`];return l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h("view",{class:h},r.default?.())},f=()=>{const h=[`${e}__button`];return u.value&&h.push(`${e}__button--active`),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h("view",{class:h},r.default?.())},m=h=>{if(!(l.disabled||l.readonly)){if(u.value&&d.partialSelect){d.partialSelect=!1,v(u.value,r.default?.()[0].children);return}if(v(!u.value,r.default?.()[0].children),p.value){const S=c.value.value,N=c.max.value,{label:C}=l,w=S.indexOf(C);w>-1?S.splice(w,1):w<=-1&&(S.length<N||!N)&&S.push(C),c.updateValue(S)}}};return t.onMounted(()=>{p.value&&c.link(t.getCurrentInstance())}),t.onBeforeUnmount(()=>{p.value&&c.unlink(t.getCurrentInstance())}),()=>t.h("view",{class:`${e} ${e}--${l.shape} ${g.value==="left"?`${e}--reverse`:""}`,onClick:m},[l.shape=="button"?f():[y(),b()]])}}),{componentName:Gf,create:Zf}=J("checkbox"),Jn=Zf(Qf(Gf,{CheckNormal:oe.CheckNormal,Checked:oe.Checked,Indeterminate:oe.CheckDisabled})),{create:Jf,componentName:vr}=J("checkbox-group"),_n=Jf({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:n}){const{emitEvent:a}=Vt(),o=t.reactive({children:[]}),l=d=>{d.proxy&&o.children.push(d.proxy)},r=d=>{d.proxy&&(o.children=o.children.filter(p=>p!==d.proxy))},i=d=>{a("update:modelValue",d),a("change",d)},s=d=>{const p=[];d&&o.children.forEach(u=>{u?.disabled||p.push(u?.label)}),a("update:modelValue",p)},c=()=>{const d=o.children.filter(p=>p?.disabled?!1:!e.modelValue.includes(p.label)).map(p=>p.label);a("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:i,link:l,unlink:r}),t.watch(()=>e.modelValue,d=>{a("change",d)}),Ie({toggleAll:s,toggleReverse:c}),()=>{const d={};return e.textAlign&&(d["text-align"]=e.textAlign),t.h("view",{class:`${vr} ${vr}--${e.direction}`,style:d},n.default?.())}}});function br(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(Po(e,r)===a)return l}else if(o==="item"){if(Pe(a,r))return l}else if(un(e,r)===a)return l}return-1}function Po(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function un(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function _f(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function em(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let tm=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);let l=et(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(xe(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function nm(){const e=t.getCurrentInstance();return new tm(e.proxy)}function om(e){return{text:e,value:e}}const lm={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},kr={icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},shape:{type:String,default:"round"}},am={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:[]}};function rm(e,n,a,o,l){return{props:{...pe,...ge,...lm,...kr,...am},emits:["change","update:modelValue","setValue"],setup(r,i){const s=$e(t.computed(()=>r.disabled)),c=Te(t.computed(()=>r.readonly)),d=Ve(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Ae({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return c.value},get disabled(){return s.value}},r.prop??i.attrs.name),u=nm(),g=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,m])=>{if(f){const h=await u.load("checkbox",f,m);if(h.length>0)if(typeof h[0]=="string"){const C=h.map(w=>om(w));g.value=C}else g.value=h;else g.value=[]}},{immediate:!0});const k=t.ref([]);t.watch([()=>r.modelValue,()=>g.value],async([f,m])=>{const h=[];Array.isArray(f)&&f.forEach(S=>{let N=br(r,m,S,r.valueType);N!==-1&&h.push(N)}),!Pe(h,k.value)&&(k.value=h,p("setValue",h))},{deep:!0});const v=t.computed(()=>{if(!r.source)return r.modelValue;let f=[];return k.value.forEach(m=>{let h=g.value[m];f.push(un(r,h))}),f}),y=f=>{let m=[],h=[];if(g.value.length>0){const S=[];Array.isArray(f)&&f.forEach(N=>{let C=br(r,g.value,N,"value");C!==-1&&S.push(C);const w=g.value[C];h.push(w),r.valueType==="text"?m.push(Po(r,w)):r.valueType==="item"?m.push(w):m.push(un(r,w))}),k.value=S}else m=f;p("update:modelValue",m),p("change",m,h)},b=t.ref();if(Ie({toggleAll:f=>{b.value.toggleAll(f)},toggleReverse:()=>{b.value.toggleReverse()}}),r.source){const f=()=>{const m=[],h=be(r,kr);return g.value.forEach((S,N)=>{const C=un(r,S),w=_f(r,S);let B={...h,label:C,disabled:w};const A=em(r,S,N);B={...B,...A},s.value&&(B.disabled=!0),c.value&&(B.readonly=!0);const T={};if(i.slots.icon&&(T.icon=i.slots.icon),i.slots.checkedIcon&&(T.checkedIcon=i.slots.checkedIcon),i.slots.indeterminateIcon&&(T.indeterminateIcon=i.slots.indeterminateIcon),typeof i.slots.text=="function"){const q=i.slots.text(S);T.default=()=>[q]}else{const q=Po(r,S);T.default=()=>q}let $=t.h(l,B,T);m.push($)}),m};return()=>{const m=f(),h={class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,modelValue:v.value,"onUpdate:modelValue":y},S=t.h(o,h,{default:()=>m}),N={default:()=>S};N.label=i.slots.default,N.prepend=i.slots.prepend,N.append=i.slots.append,N.fixedPreTip=i.slots.fixedPreTip,N.fixedTip=i.slots.fixedTip;const w={...be(r,ge,pe)};return r.prop&&(w.prop=`${r.prop}_item`),t.h(a,w,N)}}else return()=>{const f=i.slots.options?.()??[];return t.h("view",{class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,textAlign:d.value,modelValue:v,"onUpdate:modelValue":y},{default:()=>f})}}}}const{componentName:sm,create:im,scope:cm}=J("checkbox-item"),ml=im(rm(sm,cm,we,_n,Jn)),Mo={modelValue:{type:[String,Boolean,Number],default:!1},disabled:{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:um,create:dm}=J("switch"),fm=dm({components:{Loading1:oe.Loading1},props:{...Mo},emits:["change","update:modelValue","update:loading"],setup(e,{emit:n}){const a=t.computed(()=>e.modelValue===e.activeValue),o=t.computed(()=>{const s=um;return{[s]:!0,[a.value?"fox-switch-open":"fox-switch-close"]:!0,[`${s}-base`]:!0,"is-disabled":e.disabled}}),l=t.computed(()=>({backgroundColor:a.value?e.activeColor:e.inactiveColor}));let r="";const i=s=>{if(e.disabled||e.loading)return;r="click";const c=a.value?e.inactiveValue:e.activeValue;n("update:modelValue",c),n("change",c,s)};return t.watch(()=>e.modelValue,s=>{r=="click"?r="":n("change",s)}),{classes:o,style:l,isActive:a,onClick:i}}}),mm={class:"fox-switch-button"};function pm(e,n,a,o,l,r){const i=t.resolveComponent("Loading1");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onClick:n[0]||(n[0]=(...s)=>e.onClick&&e.onClick(...s)),style:t.normalizeStyle(e.style)},[t.createElementVNode("view",mm,[e.loading?t.renderSlot(e.$slots,"icon",{key:0},()=>[t.createVNode(i,{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 eo=ne(fm,[["render",pm]]);function hm(e,n,a,o){return{props:{...pe,...ge,...Mo},emits:["change","update:modelValue","setValue"],setup(l,r){const i=$e(t.computed(()=>l.disabled)),s=Te(t.computed(()=>l.readonly)),{emitEvent:c}=Ae({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),d=e,p=qe(l,"modelValue",null,c),u=g=>{p.value=g,c("update:modelValue",g,{}),c("change",g,{})};return()=>{const k={...be(l,Mo),disabled:i.value||s.value,value:p.value,"onUpdate:modelValue":u},v=[],y=t.h(o,k);v.push(y);const b={default:()=>v};b.label=r.slots.default,b.fixedPreTip=r.slots.fixedPreTip,b.fixedTip=r.slots.fixedTip;const m={...be(l,ge,pe)};return l.prop&&(m.prop=`${l.prop}_item`),m["content-class"]=d,t.h(a,m,b)}}}}const{componentName:gm,create:ym,scope:vm}=J("switch-item"),pl=ym(hm(gm,vm,we,eo));function bm(e,n,a,o){return{props:{...pe,...ge,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","change"],setup(l,r){const i=$e(t.computed(()=>l.disabled)),s=Te(t.computed(()=>l.readonly)),{emitEvent:c}=Ae({componentName:e,validateCheckEvents:["change"],validateResetEvents:["focus"],get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),{toLocaleRefs:d}=se.useFoxI18n(n),p=d(l,["placeholder"]),u=t.ref(l.modelValue);t.watch(()=>l.modelValue,q=>{u.value=q,c("change",q)});const g=t.computed(()=>({[`${e}`]:!0})),k=t.computed(()=>({[`${e}__main`]:!0,[`${e}__placeholder`]:!i.value&&ue(u.value),"is-disabled":i.value,"is-readonly":s.value})),v=Ve(t.computed(()=>l.textAlign),"textAlign"),y=t.computed(()=>{const q={};return v.value&&(q["text-align"]=v.value),q}),b=t.computed(()=>!ue(l.modelValue)||r.slots.main?!0:!!ue(l.desc)),f=t.computed(()=>ue(u.value)?p.placeholder.value:u.value),m=t.computed(()=>!ue(l.desc)||r.slots.sub),h=t.computed(()=>({[`${e}__sub`]:!0})),S=t.computed(()=>{const q={};return v.value&&(q["text-align"]=v.value),q}),N=()=>{c("focus",u.value)},C=()=>{c("blur",u.value)},w=t.computed(()=>({[`${e}__append`]:!0,"is-disabled":i.value,"is-readonly":s.value})),B=t.computed(()=>ve(l.unit)>0),A=q=>{i.value==!0||s.value==!0||c("click")},T=t.computed(()=>l.icon??a),$=t.computed(()=>({action:!0}));return()=>{const q=[];if(typeof r.slots.content=="function"){const P=r.slots.content();q.push(P)}else{const P=[];if(b.value){const L={tabIndex:0,class:k.value,style:y.value,onFocus:N,onBlur:C};let O=null;r.slots.main?O=t.h("view",L,[r.slots.main(f.value)]):O=t.h("view",L,[f.value]),P.push(O)}if(m.value){const L={tabIndex:0,class:h.value,style:S.value,onFocus:N,onBlur:C};let O=null;r.slots.sub?O=t.h("view",L,[r.slots.sub(l.desc)]):O=t.h("view",L,[l.desc]),P.push(O)}const D={class:g.value,onClick:A},W=t.h("view",D,P);q.push(W)}const R=[],V=de(l.iconSize);let E=r.slots.icon;if(!E){const P={width:V,height:V,class:["action-icon"]};E=t.h(T.value,P)}const M={class:$.value,onClick:A},x=t.h("view",M,{default:()=>[E]});if(R.push(x),B.value){const P=t.h("view",{},[l.unit]);R.push(P)}const j={class:w.value},H=t.h("view",j,{default:()=>R});q.push(H);const z={default:()=>q};z.label=r.slots.default,z.prepend=r.slots.prepend,z.append=r.slots.append,z.fixedPreTip=r.slots.fixedPreTip,z.fixedTip=r.slots.fixedTip;const U={...be(l,ge,pe)};return l.prop&&(U.prop=`${l.prop}_item`),t.h(o,U,z)}}}}const{componentName:km,create:Sm,scope:Cm}=J("link-item"),hl=Sm(bm(km,Cm,oe.ArrowRight,we)),Lo={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:wm,componentName:Nm}=J("rate"),Bm=wm({props:{...Lo},emits:["update:modelValue","change"],setup(e,{emit:n,slots:a}){const o=t.ref([]),l=t.computed(()=>({[Nm]:!0})),r=k=>{n("update:modelValue",k),n("change",k)},i=(k,v)=>{if(e.disabled||e.readonly)return;let y=0;v===1&&e.modelValue===v||(y=v,e.allowHalf&&k==2&&(y-=.5)),r(y)},s=(k,v,y)=>{let b=0;for(let f=v.value.length-1;f>=0;f--){const m=v.value[f];if(k>m.offsetLeft){y?b=f+(k>m.offsetLeft+m.clientWidth/2?1:.5):b=f+1;break}}return b},c=tt(),d={onTouchStart(k){!e.touchable||e.readonly||c.start(k)},onTouchMove(k){e.touchable&&(c.move(k),c.isHorizontal()&&o.value&&(k.preventDefault(),r(s(c.moveX.value,o,e.allowHalf))))}},p=Math.random().toString(36).slice(-8),u=t.computed(()=>e.customIcon??oe.StarFillN);return{classes:l,...d,onClick:i,toPxDesc:he,renderIcon:(k,v)=>t.h(k,v),rateRefs:o,refRandomId:p,slots:a,customIcon:u}}}),Am=["id"],Vm={class:"fox-rate-item__icon--full"},Tm={key:0,class:"fox-rate-item__icon--half"},$m={key:1,class:"fox-rate-item__icon--half"};function Em(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onTouchstart:n[0]||(n[0]=(...i)=>e.onTouchStart&&e.onTouchStart(...i)),onTouchmove:n[1]||(n[1]=(...i)=>e.onTouchMove&&e.onTouchMove(...i))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Number(e.count),i=>(t.openBlock(),t.createElementBlock("view",{class:"fox-rate-item",key:i,ref_for:!0,ref:"rateRefs",id:"rateRefs-"+e.refRandomId+i,style:t.normalizeStyle(i<Number(e.count)?{marginRight:e.toPxDesc(e.spacing)}:{})},[t.createElementVNode("view",Vm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:i<=e.modelValue?e.activeColor:e.voidColor})),{class:t.normalizeClass(["fox-rate-item__icon",{"fox-rate-item__icon--disabled":e.disabled||i>e.modelValue}]),onClick:s=>e.onClick(1,i)},null,8,["class","onClick"]))]),e.allowHalf&&Number(e.modelValue)+1>i?(t.openBlock(),t.createElementBlock("view",Tm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:i<=Number(e.modelValue)+1?e.activeColor:e.voidColor})),{class:"fox-rate-item__icon",onClick:s=>e.onClick(2,i)},null,8,["onClick"]))])):e.allowHalf&&Number(e.modelValue)+1<i?(t.openBlock(),t.createElementBlock("view",$m,[(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:s=>e.onClick(2,i)},null,8,["onClick"]))])):t.createCommentVNode("",!0)],12,Am))),128))],34)}const wt=ne(Bm,[["render",Em]]);function xm(e,n,a,o){return{props:{...pe,...ge,...Lo},emits:["change","update:modelValue","setValue"],setup(l,r){const i=$e(t.computed(()=>l.disabled)),s=Te(t.computed(()=>l.readonly)),{emitEvent:c}=Ae({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),d=e,p=qe(l,"modelValue",null,c),u=g=>{p.value=g,c("update:modelValue",g,{}),c("change",g,{})};return()=>{const k={...be(l,Lo),disabled:i.value,readonly:s.value,value:p.value,"onUpdate:modelValue":u},v=[],y=t.h(o,k);v.push(y);const b={default:()=>v};if(r.slots.default){const h=r.slots.default();b.label=()=>h}const f=be(l,ge,pe);return l.prop&&(f.prop=`${l.prop}_item`),f["content-class"]=d,t.h(a,f,b)}}}}const{componentName:Dm,create:Im,scope:qm}=J("rate-item"),gl=Im(xm(Dm,qm,we,wt)),Pm=/scroll|auto|overlay/i,Is=window;function Mm(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function zo(e,n=Is){let a=e;for(;a&&a!==n&&Mm(a);){const{overflowY:o}=window.getComputedStyle(a);if(Pm.test(o))return a;a=a.parentNode}return n}function qs(e,n=Is){const a=t.ref();return t.onMounted(()=>{e.value&&(a.value=zo(e.value,n))}),a}const Ps=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,Lm={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},immediate:{type:[Boolean],default:!1}};function zm(e,n,a){return{props:{...Lm},emits:["scroll-change","load-more","update:modelValue"],setup(o,{emit:l,slots:r}){const{toLocaleRefs:i}=se.useFoxI18n(n),s=i(o,["pullText","loadText","loadMoreText"]),c=t.ref(),d=qs(c),p=t.reactive({beforeScrollTop:0,isInfiniting:!1,y:0,x:0,distance:0}),u=t.computed(()=>({[e]:!0})),g=m=>m?m.offsetTop+g(m.offsetParent):0,k=()=>{let m=0,h=0,S="down";if(d.value==window){const N=Ps();c.value&&(m=g(c.value)+c.value.offsetHeight-N-window.innerHeight),h=N}else{const{scrollHeight:N,clientHeight:C,scrollTop:w}=d.value;m=N-C-w,h=w}return p.beforeScrollTop>h?S="up":S="down",p.beforeScrollTop=h,l("scroll-change",h),m<=o.threshold&&S=="down"},v=()=>{Xe(()=>{if(!k()||!o.hasMore||p.isInfiniting)return!1;p.isInfiniting=!0,l("update:modelValue",!0),t.nextTick(()=>l("load-more"))})},y=()=>{d.value&&d.value.addEventListener("scroll",v,o.useCapture)},b=()=>{d.value&&d.value.removeEventListener("scroll",v,o.useCapture)};t.onMounted(()=>{y(),o.immediate&&v()}),t.onUnmounted(()=>{b()});const f=t.ref(!1);return t.onActivated(()=>{f.value&&(f.value=!1,y())}),t.onDeactivated(()=>{f.value=!0,b()}),t.watch(()=>o.modelValue,m=>{m||(p.isInfiniting=!1)}),()=>{const m={class:"fox-infinite__container"},h=t.h("view",m,[r?.default?.()]),S=[];if(p.isInfiniting){let B=r?.loading?.()??null;if(!B){let $=r?.loadingIcon?.()??null;if(!$){const V={class:["fox-infinite__bottom-box__img"]};$=t.h(a,V)}const q={class:"fox-infinite__bottom-box__text"},R=t.h("view",q,[s.loadText.value]);B=[$,R]}const A={class:"fox-infinite__bottom-box"},T=t.h("view",A,B);S.push(T)}else if(!o.hasMore){let B=r?.finished?.()??null;if(!B){const A={class:"fox-infinite__bottom-tips"};B=t.h("view",A,[s.loadMoreText.value]),S.push(B)}}const N={class:"fox-infinite__bottom"},C=t.h("view",N,S),w={class:u.value,ref:c};return t.h("view",w,[h,C])}}}}const{componentName:Om,create:Fm,scope:Rm}=J("infinite-loading"),to=Fm(zm(Om,Rm,oe.Loading)),{componentName:Km,create:Um}=J("button"),Hm=Um({components:{Loading:oe.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:n,slots:a}){const{type:o,size:l,shape:r,disabled:i,loading:s,color:c,plain:d,block:p}=t.toRefs(e),u=v=>{!s.value&&!i.value&&n("click",v)},g=t.computed(()=>{const v=Km;return{[v]:!0,[`${v}--${o.value}`]:o.value,[`${v}--${l.value}`]:l.value,[`${v}--${r.value}`]:r.value,[`${v}--plain`]:d.value,[`${v}--block`]:p.value,[`${v}--disabled`]:i.value,[`${v}--loading`]:s.value}}),k=t.computed(()=>{const v={};return c?.value&&(d.value?(v.color=c.value,v.background="#fff",c.value?.includes("gradient")||(v.borderColor=c.value)):(v.color="#fff",v.background=c.value)),v});return{handleClick:u,classes:g,getStyle:k}}}),jm={class:"fox-button__wrap"};function Wm(e,n,a,o,l,r){const i=t.resolveComponent("Loading");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.getStyle),onClick:n[0]||(n[0]=(...s)=>e.handleClick&&e.handleClick(...s))},[t.createElementVNode("view",jm,[e.loading?(t.openBlock(),t.createBlock(i,{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 Le=ne(Hm,[["render",Wm]]),Ym={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},background:{type:String,default:""},inputBackground:{type:String,default:""},focusStyle:{type:Object,default:()=>({})},autofocus:{type:Boolean,default:!1},autoblur:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inputAlign:{type:String,default:"left"}},Xm=(e,n,a)=>({props:{...Ym},emits:["change","update:modelValue","blur","focus","clear","search","click-input","keyup-input","click-left-icon","click-right-icon"],setup(o,{slots:l}){const{emitEvent:r}=Vt(),{toLocaleRefs:i}=se.useFoxI18n(n),s=i(o,["placeholder"]),c=t.reactive({active:!1}),d=t.computed(()=>({background:o.background})),p=t.computed(()=>({background:o.inputBackground})),u=A=>{let $=A.target.value;o.maxLength&&$.length>Number(o.maxLength)&&($=$.slice(0,Number(o.maxLength))),r("update:modelValue",$,A),r("change",$,A)},g=t.ref({}),k=A=>{let $=A.target.value;c.active=!0,g.value=o.focusStyle,r("focus",$,A)},v=A=>{setTimeout(()=>{c.active=!1},0);let $=A.target.value;o.maxLength&&$.length>Number(o.maxLength)&&($=$.slice(0,Number(o.maxLength))),g.value={},r("blur",$,A)},y=A=>{r("update:modelValue","",A),r("change","",A),r("clear","")},b=t.computed(()=>String(o.modelValue).length>0),f=t.computed(()=>{const A={};return b.value||(A.display="none"),A}),m=A=>{o.autoblur&&w.value?.blur(),(typeof A.cancelable!="boolean"||A.cancelable)&&A.preventDefault(),r("search",o.modelValue)},h=A=>{r("keyup-input",A)},S=A=>{r("click-input",A)},N=A=>{r("click-left-icon",o.modelValue,A)},C=t.computed(()=>({textAlign:o.inputAlign})),w=t.ref(null);t.onMounted(()=>{o.autofocus&&w.value.focus()});const B=()=>{const A=[];if(l.leftin){const M={class:[`${e}__search-icon`,`${e}__input-left-search-icon`],onClick:N},x=t.h("view",M,[l.leftin()]);A.push(x)}const T={class:`${e}__input-inner-input`,ref:w,style:C.value,type:o.inputType,maxlengt:o.maxLength,placeholder:s.placeholder.value,value:o.modelValue,disabled:o.disabled,readonly:o.readonly,onClick:S,onInput:u,onFocus:k,onBlur:v,onkeyup:h},$=t.h("input",T),q={class:[`${e}__input-inner`],action:"#",onSubmit:m},R=t.h("form",q,[$]);A.push(R);const V=[];if(o.clearable){const M={class:[`${e}__search-icon`,`${e}__input-clear-icon`],style:f.value,onClick:y},x=l?.clear?.()??o.clearIcon??a,j=t.h("view",M,[t.h(x)]);V.push(j)}if(l.rightin){const M={class:[`${e}__search-icon`,`${e}__input-right-search-icon`]},x=t.h("view",M,[l.rightin()]);V.push(x)}if(V.length>0){const M={class:`${e}__input-inner-right`},x=t.h("view",M,V);A.push(x)}const E={class:[`${e}__search-input`,`${o.shape}`],style:{...p.value,...g.value}};return t.h("view",E,A)};return()=>{const A=[];if(o.label){const q={class:`${e}__search-label`},R=t.h("span",q,[o.label]);A.push(R)}if(l.leftout){const q={class:[`${e}__search-icon`,`${e}__left-search-icon`]},R=t.h("view",q,[l.leftout()]);A.push(R)}const T=B();if(A.push(T),l.rightout){const q={class:[`${e}__search-icon`,`${e}__right-search-icon`]},R=t.h("view",q,[l.rightout()]);A.push(R)}const $={class:`${e}`,style:d.value};return t.h("view",$,A)}}}),{componentName:Qm,create:Gm,scope:Zm}=J("searchbar"),no=Gm(Xm(Qm,Zm,oe.CircleClose)),dn={poppable:{type:[Boolean],default:!1},modelValue:{type:[Array,Number,String,Object],default(){return[]}},visible:{type:[Boolean]},disabled:{type:[Boolean,String],required:!1},textPosition:{type:[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},searchDelayTriggerClear:{type:Number,default:250},popClass:{type:String,required:!1},popCloseable:{type:Boolean,required:!1,default:!0},beforeMethod:{type:Function},beforeClose:{type:Function}};function Jm(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(fn(e,r)===a)return l}else if(o==="item"){if(Pe(a,r))return l}else if(Ms(e,r)===a)return l}return-1}function fn(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Sr(e,n){return typeof e.subTextKey=="string"&&e.subTextKey.length>0?n[e.subTextKey]:n.text}function Ms(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function _m(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function ep(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let tp=class{proxy;constructor(n){this.proxy=n}async load(n,a,o,l,r,i,s){if(Array.isArray(a)){let d=a;typeof s=="function"&&(d=d.filter(s));let p=(o-1)*l,u=p+l;u>d.length&&(u=d.length);const g=d.slice(p,u);return{totalSize:d.length,page:g}}if(typeof a=="function")return await Reflect.apply(a,null,[o,l,r,i]);const c=et(this.proxy,n);return c===null?(console.error(`${n} component not found api function`),{totalSize:0,page:[]}):(xe(r)&&t.isReactive(r)&&(r=t.toRaw(r)),await Reflect.apply(c,null,[a,o,l,r]))}};function np(){const e=t.getCurrentInstance();return new tp(e.proxy)}function op(e,n,a,o,l,r,i,s,c,d,p){return{props:{...dn},emits:["change","update:modelValue","update:text","loaded-data","update:visible"],setup(u,{slots:g}){const{emitEvent:k}=Vt(),{toLocaleRefs:v}=se.useFoxI18n(n),y=v(u,["title","loadText","loadMoreText","seachPlaceholder","confirmText"]),b=np(),f=t.ref([]),m=t.ref(0),h=t.ref(""),S=t.shallowRef(null),N=t.computed(()=>{const F={};return u.params&&Object.assign(F,u.params),ue(h.value)||(F[`${u.searchKey}`]=h.value),S.value&&Object.assign(F,S.value),F});let C=!0;const w=async(F,Y,X)=>{try{if(A.value===!1)return;let K=null;ue(h.value)||(K=ee=>{const le=fn(u,ee);if(typeof le=="string"&&le.includes(h.value))return!0;const re=Sr(u,ee);return!!(typeof re=="string"&&re.includes(h.value))});const Z=await b.load("actionsheet",F,Y,X,N.value,C,K??void 0);C=!1,Array.isArray(Z)?(f.value=Z,m.value=1,A.value=!1):!Array.isArray(Z.page)||Z.page.length===0?(console.warn("[FoxUI] can not load more data"),A.value=!1):(Reflect.apply([].push,f.value,Z.page),m.value=Math.ceil(f.value.length/u.pageSize),(Z.totalSize&&f.value.length>=Z.totalSize||X<Z.page.length)&&(A.value=!1)),B.value=!1}catch(K){console.error("[FoxUI] ActionSheet load more data fail",K),A.value=!0,m.value=0,f.value=[]}setTimeout(()=>{k("loaded-data")},250)},B=t.ref(!1),A=t.ref(!0),T=async()=>{if(!u.source){B.value=!1;return}await w(u.source,m.value+1,u.pageSize)};let $=null;t.watch(h,(F,Y)=>{$&&(clearTimeout($),$=null),ue(F)&&!ue(Y)&&($=setTimeout(()=>{R()},u.searchDelayTriggerClear))});const q=()=>{A.value=!0,m.value=0,f.value=[],u.source&&T()},R=()=>{q()};t.watch([()=>u.source,()=>u.pageSize,()=>u.params],async([F,Y,X])=>{u.source&&q()},{immediate:!0});const V=t.computed(()=>!u.multiple&&u.isAutoBackFill),E=t.ref([]);let M=null;const x=t.ref(u.visible);t.watch(()=>u.visible,F=>{x.value!==F&&(x.value=F),F?M=[...E.value]:M=null});const j=(F,Y)=>{const X=[];return Array.isArray(F)||(F=[F]),F.forEach(K=>{let Z=Jm(u,Y,K,u.valueType);Z!==-1&&X.push(Z)}),Pe(X,E.value)?!1:(E.value=X,!0)};t.watch([()=>u.modelValue,()=>f.value],([F,Y],[X,K])=>{if(j(F,Y)){const ee=H();z(ee)}},{deep:!0});const H=()=>{const F=[],Y=[],X=[];for(let le of E.value){const re=f.value[le];Y.push(re);const ce=fn(u,re);if(X.push(ce),u.valueType==="item")F.push(re);else if(u.valueType==="text")F.push(ce);else{const Ne=Ms(u,re);F.push(Ne)}}let K=null,Z=null,ee=null;return u.multiple?(K=F,Z=X,ee=Y):(K=F[0]??null,Z=X[0]??null,ee=Y[0]??null),{value:K,text:Z,item:ee}},z=F=>{k("update:modelValue",F.value),k("update:text",F.text),k("change",F.value,F.item,F.text)},_=()=>{M&&(E.value=M)},U=F=>{const Y=E.value.indexOf(F);u.multiple?Y===-1?E.value.push(F):E.value.splice(Y,1):Y===-1?E.value=[F]:E.value=[],(V.value||!u.poppable&&!u.showFooter)&&D()},I=F=>{x.value=F,k("update:visible",F)},P=()=>{const F=()=>{_(),I(!1)},Y=u.beforeMethod??u.beforeClose;if(typeof Y=="function"){const X=Y("close");bt(X)?X.then(K=>{K!==!1&&F()}).catch(()=>{F()}):X!==!1&&F()}else F()},D=()=>{const F=H(),Y=()=>{z(F),I(!1)},X=u.beforeMethod??u.beforeClose;if(typeof X=="function"){const K=X("confirm",F.value,F.item,F.text);bt(K)?K.then(Z=>{Z!==!1&&Y()}).catch(()=>{Y()}):K!==!1&&Y()}else Y()},W=()=>{let F=y.title.value??"";g.title&&(F=g.title());const Y=t.h("view",{class:["fox-actionsheet__header-title"]},[F]),X=t.h(c,{class:["fox-actionsheet__header-icon"],onClick:P});return t.h("view",{class:["fox-actionsheet__header"]},[Y,X])},L=()=>{let F=null;if(g.search)F=g.search();else{const Y={onSearch:q,placeholder:y.seachPlaceholder.value,disabled:u.disabled,modelValue:h.value,"onUpdate:modelValue":X=>{h.value=X}};F=t.h(r,Y,{leftin:()=>t.h(d)})}return t.h("view",{class:["fox-actionsheet__searchbar"]},[F])},O=(F,Y,X,K,Z)=>{if(g.optionLabel)return g.optionLabel({text:F,checked:Y,disabled:X,subText:K,item:Z});const ee=[],le=t.h("view",{class:"fox-actionsheet__list-item-text"},[F]);if(ee.push(le),K){const re=t.h("view",{class:"fox-actionsheet__list-item-subtext"},[K]);ee.push(re)}return t.h("view",{class:["fox-actionsheet__list-item-label"]},ee)},Q=(F,Y,X,K)=>{if(g.optionIcon)return g.optionIcon({checked:F,disabled:Y,iconSize:X,item:K});if(F){if(g.checkedIcon)return g.checkedIcon({disabled:Y,item:K});{const Z=u.checkedIcon??s;return t.h(Z,{width:X,height:X,class:["fox-actionsheet__list-item-icon"]})}}else{if(g.icon)return g.icon({disabled:Y,item:K});{const Z=u.icon??i;return t.h(Z,{width:X,height:X,class:["fox-actionsheet__list-item-icon"]})}}},G=()=>{const F=[];for(let Y=0;Y<f.value.length;Y++){const X=f.value[Y],K=fn(u,X),Z=Sr(u,X),ee=["fox-actionsheet__list-item"],le={};let re=_m(u,X),ce=u.iconSize?de(u.iconSize):null;const Ne=ep(u,X,Y);Ne&&(re=re||Ne.disabled,Ne.class&&ee.push(Ne.class),Ne.style&&Object.assign(le,Ne.style)),re=!!(u.disabled||re);const Ce=E.value.includes(Y);re&&ee.push("is-disabled"),Ce&&ee.push("is-checked");const en={class:ee,style:le,key:`${Y}`,onClick:()=>{re||U(Y)}};let nt=[];if(g.option)nt.push(g.option({item:X,checked:Ce,disabled:re}));else{const js=O(K,Ce,re,Z,X);nt.push(js);const Ws=Q(Ce,re,ce,X);nt.push(Ws),u.textPosition==="right"&&nt.reverse()}const Hs=t.h("view",en,nt);F.push(Hs)}return F},te=()=>{let F=[];if(g.buttons)F=g.buttons();else{const X=t.h(l,{type:"primary",block:"block",onClick:D,disabled:u.disabled},{default:()=>y.confirmText.value});F.push(X)}return t.h("view",{class:"fox-actionsheet__footer"},[F])};return Ie({search:async(F=null,Y=!0)=>{S.value=F&&t.toRaw(F),t.triggerRef(S),Y&&(A.value=!0,m.value=0,f.value=[]),t.nextTick(()=>{T()})},clear:()=>{A.value=!0,m.value=0,f.value=[]},confirm:()=>{D()},cancel:()=>{P()}}),()=>{const F=[];if(u.showHeader){const ce=W();F.push(ce)}if(u.showSearchbar){const ce=L();F.push(ce)}let Y=null;if(g.content)Y=g.content();else{const ce=G(),Ne={hasMore:A.value,loadText:y.loadText.value,loadMoreText:y.loadMoreText.value,modelValue:B.value,"onUpdate:modelValue":Ce=>{B.value=Ce},onLoadMore:T};Y=t.h(o,Ne,{default:()=>ce})}const X={};u.optionsHeight&&(X.height=u.optionsHeight);const K={"fox-actionsheet__list":!0};u.poppable||(K["fox-actionsheet__list--inner"]=!0);const Z=t.h("view",{class:K,style:X},[Y]);if(F.push(Z),u.showFooter&&!V.value){const ce=te();F.push(ce)}const ee=t.h("view",{class:"fox-actionsheet"},F);if(!u.poppable)return ee;const le=["fox-actionsheet__popup"];u.popClass&&le.push(u.popClass);const re={popClass:le.join(" "),visible:x.value,closeable:!1,"onUpdate:visible":I,position:u.position,round:"round",onClickOverlay:P,closeOnClickOverlay:u.closeOnClickOverlay};return t.h(a,re,{default:()=>ee})}}}}const{componentName:lp,create:ap,scope:rp}=J("actionsheet-pane"),oo=ap(op(lp,rp,fe,to,Le,no,oe.CheckNormal,oe.Checked,oe.Close,oe.Search2)),Cr={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 sp(e,n,a,o,l,r,i){return{props:{...pe,...ge,...Cr,...dn},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(s,c){const d=$e(t.computed(()=>s.disabled)),p=Te(t.computed(()=>s.readonly)),{emitEvent:u}=Ae({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return d.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=se.useFoxI18n(n),k=g(s,["placeholder"]),v=t.ref(!1),y=qe(s,"modelValue",null,u),b=t.ref(""),f=t.computed(()=>Array.isArray(b.value)?b.value.join(s.separator):b.value),m="fox-input-item",h=t.computed(()=>({[m]:!0,"is-disabled":d.value,"is-readonly":p.value})),S=Ve(t.computed(()=>s.textAlign),"textAlign"),N=t.computed(()=>{const D={};return S.value&&(D["text-align"]=S.value),D}),C=t.ref(!1),w=()=>{C.value=!0},B=D=>{C.value=D},A=D=>{y.value=D,u("update:modelValue",D)},T=(D,W)=>{u("change",D,W)},$=D=>{let L=D.target.value;v.value=!0,u("focus",L,D)},q=D=>{setTimeout(()=>{v.value=!1},0);let L=D.target.value;s.maxLength&&L.length>Number(s.maxLength)&&(L=L.slice(0,Number(s.maxLength))),u("blur",L,D)},R=D=>{b.value=D,u("update:text",D)},V=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":d.value,"is-readonly":p.value})),E=t.computed(()=>ve(s.unit)>0),M=t.computed(()=>ve(s.unit)>0&&!v.value),x=t.computed(()=>({hidden:!M.value})),j=D=>{y.value="",u("update:modelValue","",D),u("change","",D),u("clear","")},H=t.computed(()=>s.clearable&&!d.value&&!p.value),z=t.computed(()=>ve(y.value)>0&&v.value),_=D=>{z.value?j(D):w()},U=t.computed(()=>z.value&&H.value?o:l),I=t.computed(()=>({action:!0})),P=t.ref(null);return Ie({search:D=>{P.value&&P.value.search(D)},clear:()=>{P.value&&P.value.clear},confirm:D=>{P.value&&P.value.confirm()},cancel:()=>{P.value&&P.value.cancel()}}),()=>{const D={class:h.value,style:N.value,type:"text",maxlength:s.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:w,onFocus:$,onBlur:q},W=[],L=t.h("input",D);W.push(L);const O=[],Q={class:["action-icon"]},G=t.h(U.value,Q),te={class:I.value,onClick:_},F=t.h("view",te,{default:()=>[G]});if(O.push(F),E.value){const Ce=t.h("view",{class:x.value},[s.unit]);O.push(Ce)}const Y={class:V.value},X=t.h("view",Y,{default:()=>O});W.push(X);const K={default:()=>W};K.label=c.slots.default,K.prepend=c.slots.prepend,K.append=c.slots.append,K.fixedPreTip=c.slots.fixedPreTip,K.fixedTip=c.slots.fixedTip;const Z=be(s,dn);Z.ref=P,Z.class=s.actionsheetProps,Z.disabled=d.value||p.value,Z.visible=C.value,Z["onUpdate:visible"]=B,Z.modelValue=y.value,Z["onUpdate:modelValue"]=A,Z.text=b.value,Z["onUpdate:text"]=R,Z.onChange=T,Z.poppable=!0,Z["text-position"]=s.textPosition;const ee={title:c.slots.title,search:c.slots.search,option:c.slots.option,optionLabel:c.slots.optionLabel,optionIcon:c.slots.optionIcon,buttons:c.slots.buttons},le=t.h(r,Z,ee);K.hide=()=>[le];const ce={...dt(s,Cr,dn)};return s.prop&&(ce.prop=`${s.prop}_item`),t.h(a,ce,K)}}}}const{componentName:ip,create:cp,scope:up}=J("actionsheet-item"),yl=cp(sp(ip,up,we,oe.CircleClose,oe.ArrowRight,oo)),Oo={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:dp,create:fp}=J("input-number"),mp=fp({components:{Minus:oe.Minus,Plus:oe.Plus},props:{...Oo},emits:["update:modelValue","change","blur","focus","reduce","add","overlimit"],setup(e,{emit:n}){const a=t.computed(()=>{const k=dp;return{[k]:!0,[`${k}--disabled`]:e.disabled}}),o=k=>Number(k).toFixed(Number(e.decimalPlaces)),l=k=>{const v=k.target;n("update:modelValue",v.valueAsNumber,k)},r=(k,v)=>{let y=o(k);n("update:modelValue",y,v),n("change",y,v)},i=(k=Number(e.modelValue))=>k<Number(e.max)&&!e.disabled,s=(k=Number(e.modelValue))=>k>Number(e.min)&&!e.disabled,c=k=>{if(n("reduce",k),s()){let v=Number(e.modelValue)-Number(e.step);r(v,k)}else n("overlimit",k,"reduce")},d=k=>{if(n("add",k),i()){let v=Number(e.modelValue)+Number(e.step);r(v,k)}else n("overlimit",k,"add")},p=k=>{e.disabled||e.readonly||n("focus",k)},u=k=>{if(e.disabled||e.readonly)return;let y=k.target.valueAsNumber;y<Number(e.min)?y=Number(e.min):y>Number(e.max)&&(y=Number(e.max)),r(y,k),n("blur",k)},g=k=>{let v=Number(k);return v<Number(e.min)?v=Number(e.min):v>Number(e.max)&&(v=Number(e.max)),v};return t.watch(()=>[e.max,e.min],()=>{Number(e.min)>Number(e.max)&&console.warn("[FoxUI] <InputNumber>","props.max < props.min");const k=g(e.modelValue);k!==Number(e.modelValue)&&r(k,{})}),{classes:a,change:l,blur:u,focus:p,add:d,addAllow:i,reduce:c,reduceAllow:s,toPxDesc:he}}}),pp=["min","max","disabled","readonly","value"];function hp(e,n,a,o,l,r){const i=t.resolveComponent("Minus"),s=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:n[0]||(n[0]=(...c)=>e.reduce&&e.reduce(...c))},[t.renderSlot(e.$slots,"left-icon",{},()=>[t.createVNode(i,{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:n[1]||(n[1]=(...c)=>e.change&&e.change(...c)),onBlur:n[2]||(n[2]=(...c)=>e.blur&&e.blur(...c)),onFocus:n[3]||(n[3]=(...c)=>e.focus&&e.focus(...c))},null,44,pp),t.createElementVNode("view",{class:t.normalizeClass(["fox-input-number__icon fox-input-number__right",{"fox-input-number__icon--disabled":!e.addAllow()}]),onClick:n[4]||(n[4]=(...c)=>e.add&&e.add(...c))},[t.renderSlot(e.$slots,"right-icon",{},()=>[t.createVNode(s,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2)],2)}const Je=ne(mp,[["render",hp]]);function gp(e,n,a,o){return{props:{...pe,...ge,...Oo},emits:["change","update:modelValue","setValue","add","reduce"],setup(l,r){const i=$e(t.computed(()=>l.disabled)),s=Te(t.computed(()=>l.readonly)),{emitEvent:c}=Ae({componentName:e,validateCheckEvents:["blur","update:modelValue","add","reduce"],validateResetEvents:["focus","setValue"],get validate(){return!i.value&&!s.value}},l.prop??r.attrs.name),d=e,p=qe(l,"modelValue",null,c),u=v=>{p.value=v,c("update:modelValue",v,{}),c("change",v,{})},g=v=>{c("add",v)},k=v=>{c("reduce",v)};return()=>{const v={"left-icon":r.slots["left-icon"],"right-icon":r.slots["right-icon"]},y=be(l,Oo),f={...r.attrs,...y,disabled:i.value,readonly:s.value,value:p.value,"onUpdate:modelValue":u,onAdd:g,onReduce:k},m=t.h(o,f,v),h=[];h.push(m);const S={default:()=>h};S.label=r.slots.default,S.fixedPreTip=r.slots.fixedPreTip,S.fixedTip=r.slots.fixedTip;const C={...be(l,ge,pe)};return l.prop&&(C.prop=`${l.prop}_item`),C["content-class"]=d,t.h(a,C,S)}}}}const{componentName:yp,create:vp,scope:bp}=J("inputnumber-item"),vl=vp(gp(yp,bp,we,Je)),kp={direction:{type:[String],default:"horizontal"},mode:{type:[String]},align:{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"},doitKey:{type:String,required:!1,default:"doit"},labelKey:{type:String,required:!1,default:"label"},itemOptions:{type:[Object,Function],required:!1},step:{type:[Boolean,String]},clickNavigatePolicy:{type:[String]},icon:{type:[Object]},iconSize:{type:[String,Number]},markIcon:{type:[Object]},markIconSize:{type:[String,Number]},layout:{type:[Array],default:()=>["head","main","sub"]},scroll:{type:[Boolean]}};function Sp(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function wr(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Nr(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Cp(e,n){return typeof e.visibleKey=="string"&&e.visibleKey.length>0?n[e.visibleKey]:n.visible??null}function po(e,n){return typeof e.statusKey=="string"&&e.statusKey.length>0?n[e.statusKey]:n.statusKey??null}function Br(e,n){return typeof e.doitKey=="string"&&e.doitKey.length>0?n[e.doitKey]:n.doitKey??null}function Ar(e,n){return typeof e.labelKey=="string"&&e.labelKey.length>0?n[e.labelKey]:n.labelKey??null}function ho(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let wp=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await Reflect.apply(a,null,[o]);const l=et(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(xe(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await Reflect.apply(l,null,[a,o]))}};function Np(){const e=t.getCurrentInstance();return new wp(e.proxy)}function Bp(e,n,a,o){return{props:{...kp},emits:["update:modelValue","change","loaded-data","click"],setup(l,{slots:r,emit:i}){const s=e,c=Np(),d=t.ref([]),p=t.computed(()=>d.value.filter(I=>Cp(l,I)!==!1)),u=t.ref(-1),g=()=>{const I=l.modelValue,P=p.value.findIndex(D=>wr(l,D)===I);u.value!==P&&(u.value=P,l.scroll&&_(P))};t.watch([()=>l.modelValue,p],()=>{g()});const k=I=>u.value===I,v=I=>{if(I<0&&I>=p.value.length)return!1;const P=p.value[I],W=(ho(l,P,I)??{}).status??po(l,P);return k(I)||W},y=t.computed(()=>{const I={[s]:!0};return l.mode?I[`is-${l.mode}`]=!0:l.direction&&(I[`is-${l.direction}`]=!0),l.scroll&&(I["is-scroll"]=!0),I}),b=t.computed(()=>({})),f=(I,P,D,W,L)=>{const O={[`${s}__step`]:!0};return L&&(O[`${L}`]=!0),O[`${m.value}`]=!0,W&&(O["is-doit"]=!0),I===u.value?O["is-active"]=!0:P==="done"?O["is-done"]=!0:P==="error"?O["is-error"]=!0:P==="half"?O["is-half"]=!0:D?O["is-disabled"]=!0:O["is-normal"]=!0,O},m=t.computed(()=>{if(l.mode==="simple")return"start";let I=l.align;return I||(l.direction==="vertical"?I="start":I="center"),I}),h=(I,P={})=>{const D={...P};return m.value==="start"&&I===p.value.length-1?D.flex="0 0 auto":l.step?l.direction==="vertical"?D.height=l.step:D.width=l.step:D.flex="1 1 100%",D},S=(I,P)=>{let D={};if(P<p.value.length-1){const W=P+1;v(P)&&v(W)?l.direction==="vertical"?D.height="100%":D.width="100%":D.opacity="0"}return D},N=I=>p.value.length-1===I,C=(I,P)=>{if(l.clickNavigatePolicy==="disabled"||(l.clickNavigatePolicy==="only-back"||l.clickNavigatePolicy==="only-back-reset")&&P>u.value||u.value===P)return;const D=u.value,W=P;u.value=P,l.scroll&&_(P);const L=wr(l,I);i("update:modelValue",L);const O={fromIndex:D,currentIndex:W,item:I,items:p.value,clickNavigatePolicy:l.clickNavigatePolicy};i("change",L,O)},w=t.ref(!0),B=async(I,P)=>{try{const D=await c.load("stesbar",I,P);Array.isArray(D)&&(d.value=D),w.value=!1}catch(D){console.error("[FoxUI] Load StepsBar Data Fail",D),d.value=[]}setTimeout(()=>{i("loaded-data")},250)};t.watch([()=>l.data,()=>l.params],async([I,P])=>{I&&B(I,P)},{immediate:!0});const A=(I,P,D,W,L)=>{let O=null;if(r.icon)O=r.icon({item:I,index:P,status:W});else if(W==="done"){const G={};l.iconSize&&(G.width=l.iconSize,G.height=l.iconSize);const te=l.icon??a;O=t.h(te,G)}else{const G=D??`${P+1}`;O=t.h("span",{},[G])}const Q={class:"fox-steps-bar__icon",onClick:()=>{i("click",{item:I,index:P}),!L&&C(I,P)}};return t.h("view",Q,[O])},T=(I,P,D)=>{const W=t.h("i",{class:"fox-steps-bar__line-inner",style:S(I,P)});return t.h("view",{class:"fox-steps-bar__line"},[W])},$=()=>{let I=null;if(r.markIcon)I=r.markIcon();else{const D={};l.iconSize&&(D.width=l.markIconSize,D.height=l.markIconSize);const W=l.markIcon??o;I=t.h(W,D)}return t.h("view",{class:"fox-steps-bar__mark"},[I])},q=(I,P,D,W,L)=>{const O=[];if(!N(P)){const te=T(I,P);O.push(te)}const Q=A(I,P,D,W,L);O.push(Q);const G={class:"fox-steps-bar__head"};return t.h("view",G,O)},R=(I,P,D,W)=>{let L=null;r.main?L=r.main({item:I,index:P,status:D}):L=Sp(l,I);const O={class:"fox-steps-bar__main",onClick:()=>{i("click",{item:I,index:P}),!W&&C(I,P)}};return t.h("view",O,[L])},V=(I,P,D)=>{let W=null;if(r.sub){W=r.sub({item:I,index:P,status:D});const L={class:"fox-steps-bar__sub"};return t.h("view",L,[W])}return null},E=(I,P)=>{const D=ho(l,I,P)??{},W=D.status??po(l,I);let L=Nr(l,I);D.disabled===!0&&(L=!0),l.disabled===!0&&(L=!0);const O=D.label??Ar(l,I),Q=[],G=A(I,P,O,W,L);G&&Q.push(G);const te=R(I,P,W,L);if(te&&Q.push(te),!N(P)){const ee=T(I,P);ee&&Q.push(ee)}const F=t.h("view",{class:"fox-steps-bar__head"},Q),Y=D.class,X=D.style??{};let K=Br(l,I);D.doit===!0&&(K=!0);const Z={ref:z(P),class:f(P,W,L,K,Y),style:h(P,X)};return t.h("view",Z,[F])},M=(I,P)=>{const D=ho(l,I,P)??{},W=D.status??po(l,I);let L=Nr(l,I);D.disabled===!0&&(L=!0),l.disabled===!0&&(L=!0);const O=D.label??Ar(l,I),Q=[],G=l.layout;for(let K of G)if(K==="head"){const Z=q(I,P,O,W,L);Q.push(Z)}else if(K==="main"){const Z=R(I,P,W,L);Q.push(Z)}else if(K==="sub"){const Z=V(I,P,W);Q.push(Z)}else if(K==="mark"){const Z=$();Q.push(Z)}const te=D.class,F=D.style??{};let Y=Br(l,I);D.doit===!0&&(Y=!0);const X={ref:z(P),class:f(P,W,L,Y,te),style:h(P,F)};return t.h("view",X,Q)},x=t.ref(),j=t.ref([]),H=(I,P)=>{j.value[P]=I},z=I=>P=>{H(P,I)},_=(I,P)=>{const D=x.value,W=j.value;if(!D||!W||!W[I])return;const L=W[I];let O=0;l.direction==="vertical"?O=L.offsetTop-(D.offsetHeight-L.offsetHeight)/2:O=L.offsetLeft-(D.offsetWidth-L.offsetWidth)/2,U(D,O,.3,l.direction)},U=(I,P,D,W)=>{let L=0;const O=W==="horizontal"?I.scrollLeft:I.scrollTop,Q=Math.round(D*1e3/16);function G(){W==="horizontal"?I.scrollLeft+=(P-O)/Q:I.scrollTop+=(P-O)/Q,++L<Q&&Ke(G)}G()};return()=>{const I=[];if(l.mode==="simple")for(let D=0;D<p.value.length;D++){const W=p.value[D],L=E(W,D);I.push(L)}else for(let D=0;D<p.value.length;D++){const W=p.value[D],L=M(W,D);I.push(L)}const P={ref:x,class:y.value,style:b.value};return t.h("view",P,I)}}}}const{componentName:Ap,create:Vp,scope:Tp}=J("steps-bar"),bl=Vp(Bp(Ap,Tp,oe.Checklist,oe.ArrowRight));function $p(e){e.stopPropagation()}class Ep{startMove;updateMove;isTouch=!1;els=null;moving=!1;touchstart=null;touchmove=null;touchend=null;constructor(n,a){this.startMove=n,this.updateMove=a,this.isTouch=al()}open(n){Array.isArray(n)||(n=[n]),this.els=n;const a=rl(),o=(l,r,i,s)=>{this.updateMove({x:l,y:r})};this.touchstart=l=>{this.moving||(a.start(l),this.startMove({x:a.state.startX,y:a.state.startY}),document.addEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),document.addEventListener(this.isTouch?"touchend":"mouseup",this.touchend),this.moving=!0)},this.touchmove=l=>{this.moving&&(a.move(l),$p(l),o(a.state.deltaX,a.state.deltaY))},this.touchend=()=>{o(a.state.deltaX,a.state.deltaY),this.touchmove&&document.removeEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),this.touchend&&document.removeEventListener(this.isTouch?"touchend":"mouseup",this.touchend),a.reset(),this.moving=!1},this.els.forEach(l=>{this.touchstart&&l.addEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)})}close(){Array.isArray(this.els)&&this.els.forEach(n=>{this.touchstart&&n.removeEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)}),this.els=null}}function xp(e,n){return new Ep(e,n)}const Dp={customClass:{type:[String]},top:{type:[String]},right:{type:[String]},bottom:{type:[String]},left:{type:[String]},width:{type:[String]},height:{type:[String]},color:{type:[String]},background:{type:[String]},borderRadius:{type:[String]},draggable:{type:[Boolean]}},Ip=(e,n,a,o=!1)=>({props:{...Dp},emits:["click"],setup(l,{slots:r,emit:i}){const s=t.reactive({top:l.top,right:l.right,bottom:l.bottom,left:l.left}),c=t.computed(()=>{const m=[`${e}`];return l.customClass&&m.push(l.customClass),m}),d=t.computed(()=>{const m={};return ue(s.top)||(m.top=s.top),ue(s.right)||(m.right=s.right),ue(s.bottom)||(m.bottom=s.bottom),ue(s.left)||(m.left=s.left),ue(l.width)||(m.width=l.width),ue(l.height)||(m.height=l.height),ue(l.color)||(m.color=l.color),ue(l.background)||(m.background=l.background),ue(l.borderRadius)||(m["border-radius"]=l.borderRadius),m}),p=t.computed(()=>({[`${e}__icon`]:!0})),u=()=>{i("click")},g=t.ref(null),k=()=>{s.top=null,s.right=null,s.bottom=null,s.left=null},v={x:0,y:0},f=xp(m=>{if(!g.value)return;const h=g.value;k(),s.left=h.offsetLeft,s.top=h.offsetTop,h.style.left=`${s.left}px`,h.style.top=`${s.top}px`,h.style.right=null,h.style.bottom=null,v.x=s.left,v.y=s.top},m=>{if(!g.value)return;const h=g.value;k(),s.left=v.x+m.x,s.top=v.y+m.y,h.style.left=`${s.left}px`,h.style.top=`${s.top}px`});return t.onMounted(()=>{if(l.draggable&&g.value){const m=[g.value];f.open(m)}}),t.onBeforeUnmount(()=>{l.draggable&&g.value&&f.close()}),()=>{let m=[];const h=typeof r.default=="function"?r.default():[];if(h&&h.length>0)m=h;else{const N=t.h(a,{class:p.value});m.push(N)}const S={ref:N=>{g.value=N},class:c.value,style:d.value,onClick:u};return t.h("view",S,m)}}}),{componentName:qp,create:Pp,scope:Mp}=J("floating-button"),kl=Pp(Ip(qp,Mp,oe.Uploader,!1)),Lp={modelValue:{type:[Boolean],requried:!0},type:{type:[String],requried:!1,default:""},disabled:{type:[Boolean,String],requried:!1},textPosition:{type:[String],requried:!1},collapseText:{type:[String],requried:!1,default:"收起"},expandText:{type:[String],requried:!1,default:"更多"},icon:{type:[Object],requried:!1}};function zp(e,n,a){return{props:{...Lp},emits:["click","update:modelValue"],setup(o,{emit:l}){const r=t.computed(()=>{const u={[`${e}`]:!0};return o.disabled?u[`${e}--disabled`]=!0:u[`${e}--${o.type}`]=!0,u}),i=qe(o,"modelValue"),s=t.computed(()=>i.value?o.expandText??"":o.collapseText??""),c=t.computed(()=>({[`${e}__text`]:!0})),d=t.computed(()=>({[`${e}__icon`]:!0,"is-expand":!i.value,"is-collapse":i.value})),p=()=>{l("update:modelValue",!i.value)};return()=>{const u=[];if(s.value){const b={class:c.value},f=t.h("span",b,[s.value]);u.push(f)}const g={class:d.value},k=o.icon??a,v=t.h(k,g);return u.push(v),o.textPosition==="right"&&u.reverse(),t.h("view",{class:r.value,onClick:p},u)}}}}const{componentName:Op,create:Fp,scope:Rp}=J("more-button"),Sl=Fp(zp(Op,Rp,oe.RectUp)),Kp={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}},Up=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0);function Hp(e,n,a){return{props:{...Kp},setup(o,{attrs:l,slots:r}){const{toLocaleRefs:i}=se.useFoxI18n(n),s=i(o,["confirmText","cancelText"]),c=e,d=t.ref(!0),p=S=>{d.value=S},u=S=>{if(typeof o.unmount=="function")try{o.unmount()}catch(N){console.error(N)}if(typeof o.callback=="function")try{o.callback(S)}catch(N){console.error(N)}},g=()=>{u("confirm")},k=()=>{u("cancel")},v=()=>{o.closeOnClickOverlay!==!1&&u("close")},y=(S,N)=>Up(S)?(N.src=S,t.h("img",N)):typeof S=="string"?(Array.isArray(N.class)?N.class.push(S):N.class&&typeof N.class=="object"?N[`${S}`]=!0:typeof N.class=="string"?N.class=`${N.class}, ${S}`:N.class=S,t.h(o.tag,N)):t.h(S,N),b=()=>{const S=[];if(o.icon){const C={class:[`${c}__header-icon`]},w=y(o.icon,C);S.push(w)}if(o.title){const C=t.h("view",{class:`${c}__header-title`},[o.title]);S.push(C)}if(o.showClose&&o.closeIcon){const C={class:[`${c}__header-close-icon`],onClick:v},w=y(o.closeIcon,C);S.push(w)}const N={class:[`${c}__header`]};return t.h("view",N,S)},f=(S,N)=>{const C=[];if(N){const B={class:`${c}__group-title`},A=t.h("view",B,[N]);C.push(A)}if(S){const B=[];Array.isArray(S)||(S=[S]);for(let A of S){const T={class:`${c}__group-row`,innerHTML:A},$=t.h("view",T);B.push($)}if(B.length>0){const A={class:`${c}__group-rows`},T=t.h("view",A,B);C.push(T)}}if(C.length===0)return null;const w={class:`${c}__group`};return t.h("view",w,C)},m=()=>{const S=[];if(typeof o.message=="string")S.push(o.message);else if(Array.isArray(o.message))for(let C of o.message)if(typeof C=="string"){const w=f(C);S.push(w)}else{const w=f(C.content,C.title);S.push(w)}else if(typeof o.message=="function"){const C=o.message();S.push(C)}else{const C=o.message;S.push(C)}const N={class:`${c}__body`};return t.h("view",N,S)},h=()=>{const S=[];if(o.showCancelButton){const C={class:[`${c}__footer-button`],style:{},onClick:k};o.cancelButtonClass&&C.class.push(o.cancelButtonClass),o.cancleButtonStyle&&typeof o.cancleButtonStyle=="object"&&Object.assign(C.style,o.cancleButtonStyle);const w=t.h("button",C,[o.cancelButtonText??s.cancelText.value]);S.push(w)}if(o.showConfirmButton){const C={class:[`${c}__footer-button`],style:{},onClick:g};o.confirmButtonClass&&C.class.push(o.confirmButtonClass),o.confirmButtonStyle&&typeof o.confirmButtonStyle=="object"&&Object.assign(C.style,o.confirmButtonStyle);const w=t.h("button",C,[o.confirmButtonText??s.confirmText.value]);S.push(w)}if(S.length===0)return null;const N={class:`${c}__footer`};return t.h("view",N,S)};return()=>{const S=[],N=b();N&&S.push(N);const C=m();C&&S.push(C);const w=h();w&&S.push(w);const B={class:{[`${c}`]:!0,[`${c}--${o.type||"info"}`]:!0}},A=t.h("view",B,S),T=[`${c}__popup`];o.popClass&&T.push(o.popClass);const $={};o.width&&($.width=typeof o.width=="number"?`${o.width}px`:o.width),o.height&&($.height=typeof o.height=="number"?`${o.height}px`:o.height);const q={popClass:T.join(" "),style:$,visible:d.value,teleportDisable:!0,closeable:!1,"onUpdate:visible":p,position:o.position,round:"round",onClickOverlay:v,closeOnClickOverlay:o.closeOnClickOverlay};return t.h(a,q,{default:()=>A})}}}}const{componentName:jp,create:Wp,scope:Yp}=J("messagebox"),Xp=Wp(Hp(jp,Yp,fe)),Qp="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",Gp="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",Zp="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",Jp="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",_p=new Kn,eh={showCancelButton:!0,cancelText:"取消",showConfirmButton:!0,confirmText:"确认"},th=e=>{let n=document.body,a=e.teleport;a!="body"&&(typeof a=="string"?n=document.querySelector(a):a&&(n=e.teleport));const o=document.createElement("view"),l=`messagebox-${_p.get()}`;o.id=l,o.classList.add("fox-messagebox__root"),e.zIndex&&(o.style.zIndex=`${e.zIndex}`),e.unmount=()=>{const i=document.querySelector(`#${l}`);i&&i.parentNode?.removeChild(i)};const r=t.createVNode(Xp,e);n.appendChild(o),t.render(r,o)},rt={show:(e,n,a,o)=>{const l={...eh};n&&!Array.isArray(n)&&typeof n=="object"?Object.assign(l,n):(n&&(l.message=n),a&&typeof a=="object"?Object.assign(l,a):(typeof a=="string"&&(l.title=a),o&&typeof o=="object"?Object.assign(l,o):typeof o=="string"&&(l.type=o)));const r=l.type??"info";return l.icon||(r==="success"?l.icon=Zp:r==="warning"?l.icon=Jp:r==="error"?l.icon=Qp:l.icon=Gp),e==="alert"?(l.showCancelButton=!1,l.showConfirmButton=!0):e==="confirm"&&(l.showCancelButton=!0,l.showConfirmButton=!0),l.showClose&&!l.closeIcon&&(l.closeIcon=oe.Close),new Promise((i,s)=>{const c=l.callback;l.callback=d=>{if(typeof c=="function")try{c(d)}catch(p){console.error(p)}i({action:d})},th(l)})},alert:(e,n,a)=>rt.show("alert",e,n,a),confirm:(e,n,a)=>rt.show("confirm",e,n,a),install(e){e.config.globalProperties.$alert=rt.alert,e.config.globalProperties.$confirm=rt.confirm}},nh=(e,n,a)=>{n=n??{bubbles:!1,cancelable:!1,detail:void 0};const o=document.createEvent("Events");let l=!0,r=!0;for(let s in n)s==="bubbles"?l=!!n[s]:s==="cancelable"?r=!!n[s]:o[s]=n[s];o.initEvent(e,l,r),(a??document).dispatchEvent(o)},oh=new Kn,lh=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0),ah=e=>`${e}-${oh.get()}`,rh=Symbol.for("InnerPageScopeKey"),sh=Symbol.for("PageWrapperKey"),ih="FoxLeave",ch="FoxLeaveEnd",uh={width:{type:[String,Number]},height:{type:[String,Number]},closeOnClickOverlay:{type:Boolean,default:!1},title:{type:String},visible:{type:Boolean,default:!0},showDelay:{type:Number,default:10},showClose:{type:Boolean,default:!0},closeIcon:{type:Object},showHeader:{type:Boolean,default:!1},popClass:{type:String},popStyle:{type:Object},position:{type:String,default:"center"},mode:{type:String}};function dh(e,n,a,o){return{props:{...Fe,...uh},emits:["update:visible"],setup(l,{attrs:r,slots:i,emit:s}){t.provide(rh,!0);const c={};t.provide(sh,c);const d=C=>(typeof c.beforeClose=="function"&&c.beforeClose(),!1),p=()=>{d()},u=e,g=C=>{k.value=C,s("update:visible",C)},k=t.ref(!1),v=(C,w)=>lh(C)?(w.src=C,t.h("img",w)):typeof C=="string"?(Array.isArray(w.class)?w.class.push(C):w.class&&typeof w.class=="object"?w[`${C}`]=!0:typeof w.class=="string"?w.class=`${w.class}, ${C}`:w.class=C,t.h(l.tag,w)):t.h(C,w),y=()=>{if(!l.showHeader)return null;const C=[];if(i.header){const B=i.header();C.push(B)}else if(l.title){const B=t.h("view",{class:`${u}__header-title`},[l.title]);C.push(B)}if(C.length===0)return null;const w={class:[`${u}__header`]};return t.h("view",w,C)},b=()=>{if(!l.showClose)return null;const C={class:[`${u}__close-icon`],onClick:p},w=l.closeIcon??o;return v(w,C)};let f=null;const m=C=>{nh(ch,{},f)},h=ah(e),S=()=>{g(!0)},N=()=>{if(!f)return;const C=f.querySelector(".fox-overlay");C&&(C.classList.add("overlay-fade-leave-active"),C.classList.add("overlay-fade-leave-to"));const w=f.querySelector(".fox-popup");w&&(w.classList.add(`fox-popup-slide-${l.position}-leave-active`),w.classList.add(`fox-popup-slide-${l.position}-leave-to`),w.addEventListener("animationend",m,{once:!0}),w.addEventListener("transitionend",m,{once:!0})),document.body.classList.remove("fox-overflow-hidden")};return t.onMounted(()=>{f=document.querySelector(`.${h}`),f?.addEventListener(ih,N,{once:!0}),S()}),()=>{const C=[],w=y();w&&C.push(w);const B=b();B&&C.push(B);const A=i.default?i.default():[];Reflect.apply([].push,C,A);const T={[`${u}`]:!0};l.mode&&(T[`${u}--${l.mode}`]=!0);const $={class:T},q=t.h("view",$,C),R=[`${u}__popup`,h];l.popClass&&R.push(l.popClass),l.position&&R.push(`${u}__popup--${l.position}`);const V={};l.width&&(V.width=typeof l.width=="number"?`${l.width}px`:l.width),l.height&&(V.height=typeof l.height=="number"?`${l.height}px`:l.height);const M={...be(l,Fe),popClass:R.join(" "),style:V,visible:k.value,teleportDisable:!0,closeable:!1,position:l.position,closeOnClickOverlay:l.closeOnClickOverlay,onClickOverlay:p,"onUpdate:visible":g},x=t.h(a,M,{default:()=>q});return t.h("div",{class:[`${u}__root`,h]},[x])}}}}const{componentName:fh,create:mh,scope:ph}=J("popup-wrapper"),Cl=mh(dh(fh,ph,fe,oe.Close)),hh={visible:{type:Boolean},zIndex:{type:Number,default:1},popClass:{type:String},popStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}};function gh(e,n,a,o){return{props:{...hh},emits:["update:visible"],setup(l,{emit:r,slots:i}){const s=c=>{r("update:visible",c)};return()=>{const c=[`${e}__popup`];l.popClass&&c.push(l.popClass);const d={popClass:c,style:l.popStyle??{},position:"top",zIndex:l.zIndex,closeOnClickOverlay:l.closeOnClickOverlay,teleportDisable:!0,visible:l.visible,"onUpdate:visible":s},p=t.h(a,d,i),u={class:`${e}`};return t.h("view",u,[p])}}}}const{componentName:yh,create:vh,scope:bh}=J("dropdown"),wl=vh(gh(yh,bh,fe)),kh={visible:{type:Boolean},reference:{type:Object},referenceInset:{type:Object},width:{type:String},offset:{type:Number,default:()=>6},placement:{type:String,default:()=>"top-start"},autoFit:{type:Boolean,default:()=>!0},title:{type:String},effect:{type:String},showArrow:{type:Boolean,default:()=>!0},arrowSize:{type:Number,default:()=>14},arrowOffset:{type:Number,default:()=>20},showOverlay:{type:Number,default:()=>!0},closeOnClick:{type:Boolean,default:()=>!0},zIndex:{type:[String,Number]},customClass:{type:[String]},customStyle:{type:[Object]},leaveHide:{type:[Boolean]}};function Sh(e,n,a=!1){return{props:{...kh},emits:["update:visible"],setup(o,{emit:l,slots:r,expose:i}){const s=t.ref({top:null,right:null,bottom:null,left:null}),c=t.ref(0),d=t.ref(0),p=t.ref(0),u=t.ref(0),g=t.ref(o.placement),k=t.ref(!1),v=t.ref(!1),y=t.ref(null),b=()=>typeof o.reference=="string"?document.querySelector(o.reference):o.reference,f=(z,_,U,I,P,D,W,L=!0)=>{const O=document.documentElement.clientWidth||document.body.clientWidth,Q=document.documentElement.clientHeight||document.body.clientHeight,G=z.split("-");let te=[];L?G[0]==="top"?te=["top","bottom","right","left"]:G[0]==="bottom"?te=["bottom","top","right","left"]:G[0]==="left"?te=["left","top","bottom","right"]:G[0]==="right"&&(te=["right","top","bottom","left"]):te=[z[0]];const F={top:null,right:null,bottom:null,left:null},Y=[];for(let X=0;X<te.length;X++){const K=te[X];if(Y[0]=K,G[1]&&(Y[1]=G[1]),K==="top"){const Z=U-W-o.arrowSize/2-o.offset;if(Z>=0){F.top=Z;let ee=0;G[1]==="start"?ee=_:G[1]==="end"?ee=_+I-D:ee=_+I/2-D/2;const le=O-ee-D;le<0?(ee+=le,h.value=-le):h.value=0,F.left=ee<0?0:ee;break}}else if(K==="bottom"){const Z=U+P+o.arrowSize/2+o.offset;if(Z+W<=Q){F.top=Z;let ee=0;G[1]==="start"?ee=_:G[1]==="end"?ee=_+I-D:ee=_+I/2-D/2;const le=O-ee-D;le<0?(ee+=le,h.value=-le):h.value=0,F.left=ee<0?0:ee;break}}else if(K==="left"){const Z=_-D-o.arrowSize/2-o.offset;if(Z>=0){F.left=Z;let ee=0;G[1]==="start"?ee=U:G[1]==="end"?ee=U+P-W:ee=U+P/2-W/2,F.top=ee<0?0:ee;break}}else if(K==="right"){const Z=_+I+o.arrowSize/2+o.offset;if(Z+D<=O){F.left=Z;let ee=0;G[1]==="start"?ee=U:G[1]==="end"?ee=U+P-W:ee=U+P/2-W/2,F.top=ee<0?0:ee;break}}}return{bestPlacement:Y.join("-"),bestInsetRect:F}},m=()=>{const z=o.visible,_=o.autoFit;if(!_e||z===!1)return;if(o.reference){const W=b(),L=_o(W);c.value=L.x,d.value=L.y,p.value=W.offsetWidth,u.value=W.offsetHeight}else o.referenceInset&&(c.value=o.referenceInset.left,d.value=o.referenceInset.top,p.value=o.referenceInset.right-o.referenceInset.left,u.value=o.referenceInset.bottom-o.referenceInset.top);const U=y.value.offsetWidth,I=y.value.offsetHeight,{bestPlacement:P,bestInsetRect:D}=f(o.placement,c.value,d.value,p.value,u.value,U,I,_);g.value=P,s.value=D},h=t.ref(0),S=Qe(()=>{m()},10),N=t.ref(o.visible);t.watch([()=>o.visible],([z])=>{N.value=z,z?(k.value=z,setTimeout(()=>{m(),v.value=!0},0)):v.value=!1});const C=t.computed(()=>N.value&&w.value),w=t.ref(!0),B=Qe(z=>{const _=z[0];_&&(w.value=_.isIntersecting)},10),A=new IntersectionObserver(B);t.watch([()=>o.reference,()=>o.referenceInset],([z,_],[U,I])=>{!z&&!_||(setTimeout(()=>{m()},0),o.autoFit&&(U&&(Ft.unwatch(U,S),A.unobserve(U)),z&&(Ft.watch(z,S),A.observe(z))))},{immediate:!0}),t.onBeforeUnmount(()=>{o.reference&&(Ft.unwatch(o.reference,S),A.unobserve(o.reference),A.disconnect())});const T=t.computed(()=>{const z={[e]:!0};return g.value.startsWith("top")?z["is-top"]=!0:g.value.startsWith("right")?z["is-right"]=!0:g.value.startsWith("bottom")?z["is-bottom"]=!0:g.value.startsWith("left")&&(z["is-left"]=!0),z[`is-${o.effect}`]=!0,!v.value&&C.value&&(z["is-opacity"]=!0),v.value&&C.value&&(z["is-show"]=!0),C.value||(z["is-hide"]=!0),o.customClass&&typeof o.customClass=="string"&&(z[`${o.customClass}`]=!0),z}),$=t.computed(()=>{const z={};return s.value.top!==null&&(z.top=`${s.value.top}px`),s.value.right!==null&&(z.right=`${s.value.right}px`),s.value.bottom!==null&&(z.bottom=`${s.value.bottom}px`),s.value.left!==null&&(z.left=`${s.value.left}px`),o.width&&(z.width=o.width),o.zIndex&&(z["z-index"]=`${o.zIndex}`),o.customStyle&&typeof o.customStyle=="object"&&Object.assign(z,o.customStyle),z}),q=()=>{N.value=!1,l("update:visible",!1)},R=()=>{if(!o.showOverlay)return null;const z={class:`${e}__overlay`,onClick:q};return t.h("div",z)},V=()=>{let z=null;return r.title?z=t.h("div",{class:`${e}__title`},{default:r.title}):o.title&&(z=t.h("div",{class:`${e}__title`},[o.title])),z},E=t.computed(()=>({[`${e}__arrow`]:!0})),M=t.computed(()=>{const z={};return o.showArrow?(z.width=`${o.arrowSize}px`,z.height=`${o.arrowSize}px`,g.value==="top"?(z.left="50%",z.bottom="0",z.transform="translate(-50%, 50%)"):g.value==="top-start"?(z.left=`${o.arrowOffset+h.value}px`,z.bottom="0",z.transform="translate(-50%, 50%)"):g.value==="top-end"?(z.right=`${o.arrowOffset-h.value}px`,z.bottom="0",z.transform="translate(-50%, 50%)"):g.value==="right"?(z.left="0",z.top="50%",z.transform="translate(-50%, -50%)"):g.value==="right-start"?(z.left="0",z.top=`${o.arrowOffset}px`,z.transform="translate(-50%, 50%)"):g.value==="right-end"?(z.left="0",z.bottom=`-${o.arrowOffset}px`,z.transform="translate(-50%, 50%)"):g.value==="bottom"?(z.left="50%",z.top="0",z.transform="translate(-50%, -50%)"):g.value==="bottom-start"?(z.left=`${o.arrowOffset+h.value}px`,z.top="0",z.transform="translate(-50%, -50%)"):g.value==="bottom-end"?(z.right=`${o.arrowOffset-h.value}px`,z.top="0",z.transform="translate(-50%, -50%)"):g.value==="left"?(z.right="0",z.top="50%",z.transform="translate(50%, -50%)"):g.value==="left-start"?(z.right="0",z.top=`${o.arrowOffset}px`,z.transform="translate(50%, -50%)"):g.value==="left-end"&&(z.right="0",z.bottom=`-${o.arrowOffset}px`,z.transform="translate(50%, -50%)"),z):{display:"none"}}),x=()=>{const z={class:E.value,style:M.value};return t.h("div",z)},j=()=>{N.value===!1&&(k.value=!1)},H=z=>{if(!y.value||N.value===!1)return;const{relatedTarget:_}=z;y.value.contains(_)||(N.value=!1,l("update:visible",!1))};return i({doLayout:m}),()=>{if(!k.value)return null;const z=[],_=R();_&&z.push(_);const U=[],I=V();if(I&&U.push(I),r.default){const L=r.default();U.push(L)}const P=x();P&&U.push(P);const D={ref:y,class:T.value,style:$.value,onAnimationend:j};o.leaveHide&&(D.onMouseleave=H);const W=t.h("div",D,{default:()=>U});return z.push(W),z}}}}const{componentName:Ch,create:wh,scope:Nh}=J("popover-dialog"),Nl=wh(Sh(Ch,Nh,!1));function Bh(e,n){const a=document.createRange();a.setStart(e,0),a.setEnd(e,e.childNodes.length);const o=a.getBoundingClientRect().width;if(o>0){n(o);return}e.classList.add("is-selectable"),setTimeout(()=>{a.setStart(e,0),a.setEnd(e,e.childNodes.length);const l=a.getBoundingClientRect().width;e.classList.remove("is-selectable"),n(l)},500)}const Ah={tag:{type:[String],required:!1,default:"span"},showOverflowTooltip:{type:[Boolean],required:!1},showArrow:{type:[Boolean],required:!1,default:!0},showAfter:{type:[Number],required:!1,default:300},hideAfter:{type:[Number],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 Vh(e,n,a,o=!1){return{props:{...Ah},emits:["click"],setup(l,r){const i=t.ref(null),s=t.computed(()=>{const h={[`${e}`]:!0,"is-truncated":l.truncated};return l.type&&(h[`${e}--${l.type??"default"}`]=!0),l.size&&(h[`${e}--${l.size}`]=!0),h}),c=t.computed(()=>{const h={},S=l.textColor??l.color;return S&&(h.color=S),h}),d=(h,S)=>{let N=null;if(typeof l.highlightFilter=="string"&&l.highlightFilter.length>0){const C=l.highlightFilter;if(h.indexOf(C)!==-1){const B=h.replace(new RegExp(C,"g"),`<span>${C}</span>`);S.innerHTML=B,S.class["is-highlight"]=!0,N=t.h(l.tag,S)}}else if(typeof l.highlightFilter=="function"){const C=l.highlightFilter(h);C&&(S.innerHTML=C,S.class["is-highlight"]=!0,N=t.h(l.tag,S))}return N},p=h=>{r.emit("click",h)};let u="";const g=()=>{const h=i.value;if(!h)return;const S=h.clientWidth;Bh(h,N=>{const C=h.innerHTML??"";ue(C)||N<S||(u?a?.show(h,C,{type:"text",id:u,showArrow:l.showArrow},!0):u=a?.show(h,C,{type:"text",showArrow:l.showArrow},!0)??"")})},k=()=>{u&&a?.hide(u)};let v=null;const y=h=>{v||(v=setTimeout(()=>{g(),v=null},l.showAfter??0))},b=h=>{v&&(clearTimeout(v),v=null),setTimeout(()=>{k()},l.hideAfter??0)},f=()=>{const h=i.value;h&&(h.addEventListener("mouseover",y),h.addEventListener("mouseleave",b))},m=()=>{const h=i.value;h&&(h.removeEventListener("mouseover",y),h.removeEventListener("mouseleave",b))};return t.onMounted(()=>{!ye(l.showOverflowTooltip)||!a||f()}),t.onBeforeUnmount(()=>{!ye(l.showOverflowTooltip)||!a||m()}),()=>{const h={onClick:p,class:s.value,style:c.value,ref:i};let S=null;if(ye(l.numberFormat)&&typeof r.slots.default=="function"){const B=r.slots.default();if(Array.isArray(B)&&B.length===1){const A=B[0].type.toString();if(A==="Symbol(Text)"||A==="Symbol(v-txt)"){const T=me(l.digits),$=me(l.decimalLength),q=ye(l.autoPadding);let R=`${B[0].children}`,V=R.split("").reverse().join("");V=Nn(V,$,q,T,l.separator),R=V.split("").reverse().join(""),l.highlightFilter!==void 0&&(S=d(R,h)),S||(h.innerHTML=R,S=t.h(l.tag,h))}}}else{if(l.highlightFilter!==void 0&&typeof r.slots.default=="function"){const B=r.slots.default();if(Array.isArray(B)&&B.length===1){const A=B[0].type.toString();if(A==="Symbol(Text)"||A==="Symbol(v-txt)"){const T=`${B[0].children}`;S=d(T,h),S||(h.innerHTML=T,S=t.h(l.tag,h))}}}S||(S=t.h(l.tag,h,{default:r.slots.default}))}if(!l.mark&&!l.icon&&!r.slots.mark)return S;let C=null;if(l.icon){const B={[`${e}__mark-wrap`]:!0};l.type&&(B[`${e}__mark-wrap--${l.type}`]=!0);const A={},T=l.color;T&&(A.color=T);const $={class:B,style:A};C=t.h("view",$,t.h(l.icon))}else if(r.slots.mark){const B={[`${e}__mark-wrap`]:!0};l.type&&(B[`${e}__mark-wrap--${l.type}`]=!0);const A={},T=l.color;T&&(A.color=T);const $={class:B,style:A};C=t.h("view",$,{default:r.slots.mark})}else{const B={[`${e}__mark`]:!0};l.type&&(B[`${e}__mark--${l.type??"default"}`]=!0);const A={},T=l.color;T&&(A["background-color"]=T);const $={class:B,style:A};C=t.h("view",$)}const w={class:{"fox-text__wrap":!0,"text-left":l.textPosition==="left","text-right":l.textPosition==="right"}};return t.h("view",w,[C,S])}}}}const{componentName:Th,create:$h,scope:Eh}=J("text"),Bl=$h(Vh(Th,Eh,Tt,!1));function xh(e,n,a,o,l){let r=[];Array.isArray(e)?r=e:r=[e];const i=[],s=n[0];if(Array.isArray(e)&&!Array.isArray(s)&&!s[l]){let c=n;for(let d=0;c&&d<r.length;d++){let p=r[d],u=c.find(g=>g[o]===p);if(!u)break;i.push(u[a])}return i}if(Array.isArray(s))for(let c=0;c<n.length&&c<r.length;c++){let d=n[c],p=r[c];const u=d.find(g=>g[o]===p);if(!u)break;i.push(u[a])}else{let c=n;for(let d=0;c&&d<r.length;d++){let p=r[d],u=c.find(g=>g[o]===p);if(!u)break;i.push(u[a]),c=u[l]}}return i}class Dh{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);const l=et(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(xe(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}}function Ih(){const e=t.getCurrentInstance();return new Dh(e.proxy)}const qh={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 Ph(e,n,a=!1){return{props:{...qh},setup(o,{attrs:l,slots:r}){const i=Ih(),s=t.ref([]);t.watch([()=>o.source,()=>o.params],async([p,u])=>{s.value=await i.load(o.sourceType,p,u)},{immediate:!0});const c=t.computed(()=>{if(!Array.isArray(s.value)||s.value.length===0)return"";let p=xh(o.modelValue,s.value,o.textKey,o.valueKey,o.childrenKey);return p.length==0?o.emptyText??"":p.length===1?o.optionType=="item"?`${o.modelValue}${o.separator}${p[0]}`:p[0]:p.join(o.separator)}),d=o.resolveTag?t.resolveComponent(o.tag):o.tag;return()=>{const p={...l};return r.default?r.default({text:c.value,value:o.modelValue}):o.resolveTag?o.emptyText!==void 0&&o.emptyText===c.value?t.h(o.emptyTag??"span",{...l,class:o.emptyClass},c.value):t.h(d,p,{default:()=>c.value}):t.h(d,p,c.value)}}}}const{componentName:Mh,create:Lh,scope:zh}=J("mapping"),Al=Lh(Ph(Mh,zh,!1));function Oh(e,n){return{inheritAttrs:!1,props:{name:{type:[String],required:!1,default:""},config:{type:[Object],required:!1,default:{}}},setup(a,{slots:o}){return ts(a.name,()=>a.config),()=>typeof o.default=="function"?o.default():null}}}const{componentName:wA,create:Fh,scope:NA}=J("domain-provider"),Vl=Fh(Oh()),Rh={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 Kh(e,n){return{inheritAttrs:!1,props:Rh,setup(a,{slots:o}){if(_e&&window.IntersectionObserver){const l=new WeakMap;let r=new Map;const i=(g,k)=>{if(p===null){r.set(g,{visible:null,callback:k});return}l.has(g)&&p.unobserve(g),l.set(g,{visible:null,callback:k}),p.observe(g)},s=g=>{if(p===null){r.delete(g);return}l.has(g)&&(l.delete(g),p.unobserve(g))};let c=a.initialVisibleObserverSize;Zi({acquire:()=>{const g=c>0;return c--,g},get disabled(){return a.disabled},get initialHeight(){return a.initialInvisibleObserverHeight},observe:i,unobserve:s});let p=null;const u=(g,k,v)=>{p=new IntersectionObserver(y=>{for(let b of y){let f=!1;b.intersectionRatio>0&&(f=!0);const m=l.get(b.target);if(m)try{if(a.loadPolicy==="lazy"&&!f&&m.visible!==null)return;m.visible=f,m.callback(f)}catch(h){console.error(h)}}},{root:g,rootMargin:k,threshold:v}),r.forEach((y,b)=>{l.set(b,y),p?.observe(b)}),r.clear()};t.watch([()=>a.root,()=>a.disabled],([g,k])=>{if(k||!g||p)return;let v=null;typeof g=="string"?v=document.querySelector(g):v=g,v&&u(v,a.rootMargin,a.threshold)},{immediate:!0}),t.onUnmounted(()=>{p&&(p.disconnect(),p=null)})}return()=>typeof o.default=="function"?o.default():null}}}const{componentName:BA,create:Uh,scope:AA}=J("rolling-provider"),Tl=Uh(Kh()),{componentName:Hh,create:jh}=J("cell"),Wh=jh({components:{Right:oe.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:n}){const a=t.computed(()=>{const r=Hh;return{[r]:!0,[`${r}--clickable`]:e.isLink,[`${r}--center`]:e.center,[`${r}--large`]:e.size=="large"}}),o=t.computed(()=>({borderRadius:he(e.roundRadius)}));return{handleClick:r=>{n("click",r)},classes:a,baseStyle:o}}}),Yh={key:0,class:"fox-cell__icon"},Xh={key:1,class:"fox-cell__title"},Qh={class:"title"},Gh={class:"fox-cell__title-desc"};function Zh(e,n,a,o,l,r){const i=t.resolveComponent("Right");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.baseStyle),onClick:n[0]||(n[0]=(...s)=>e.handleClick&&e.handleClick(...s))},[t.renderSlot(e.$slots,"default",{},()=>[e.$slots.icon?(t.openBlock(),t.createElementBlock("view",Yh,[t.renderSlot(e.$slots,"icon")])):t.createCommentVNode("",!0),e.title||e.subTitle||e.$slots.title?(t.openBlock(),t.createElementBlock("view",Xh,[e.subTitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(e.$slots,"title",{},()=>[t.createElementVNode("view",Qh,t.toDisplayString(e.title),1)]),t.createElementVNode("view",Gh,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(i,{key:0,class:"fox-cell__link"})):t.createCommentVNode("",!0)])])],6)}const $l=ne(Wh,[["render",Zh]]),{componentName:Jh,create:_h}=J("cell-group"),eg=_h({props:{title:{type:String,default:""},desc:{type:String,default:""}},setup(){return{classes:t.computed(()=>({[Jh]:!0}))}}}),tg={key:1,class:"fox-cell-group__title"},ng={key:3,class:"fox-cell-group__desc"},og={class:"fox-cell-group__wrap"};function lg(e,n,a,o,l,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",tg,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",ng,t.toDisplayString(e.desc),1)):t.createCommentVNode("",!0),t.createElementVNode("view",og,[t.renderSlot(e.$slots,"default")])],2)}const El=ne(eg,[["render",lg]]),{componentName:ag,create:rg}=J("image"),sg=rg({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:oe.Image,ImageError:oe.ImageError},emits:["click","load","error"],setup(e,{emit:n}){const a=t.reactive({loading:!0,isError:!1,slotLoding:t.useSlots().loading,slotError:t.useSlots().error}),o=t.computed(()=>{const k=ag;return{[k]:!0,[`${k}-round`]:e.round}}),l=t.ref(null),r=t.ref(!1),i=t.ref(null),s=()=>{const k={threshold:[0],rootMargin:"0px"};l.value=new IntersectionObserver(v=>{v.forEach(y=>{y.isIntersecting&&(r.value=!0,l.value.disconnect())})},k),i.value&&l.value.observe(i.value)};t.onMounted(()=>{e.lazyLoad&&s()}),t.onBeforeUnmount(()=>{l.value&&l.value.disconnect()});const c=t.computed(()=>{let k={};return e.width&&(k.width=he(e.width)),e.height&&(k.height=he(e.height)),e.radius!==void 0&&e.radius!==null&&(k.overflow="hidden",k.borderRadius=he(e.radius)),k}),d=t.computed(()=>({objectFit:e.fit,objectPosition:e.position}));t.watch(()=>e.src,k=>{a.isError=!1,a.loading=!0});const p=()=>{a.loading=!1,n("load")},u=()=>{a.isError=!0,a.loading=!1,n("error")},g=k=>{n("click",k)};return{...t.toRefs(a),imageClick:g,classes:o,styles:d,stylebox:c,error:u,load:p,show:r,imgRef:i}}}),ig=["src","date-src","alt"],cg={key:0,class:"fox-img-loading"},ug={key:1,class:"fox-img-error"};function dg(e,n,a,o,l,r){const i=t.resolveComponent("Image"),s=t.resolveComponent("ImageError");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.stylebox),onClick:n[2]||(n[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:n[0]||(n[0]=(...c)=>e.load&&e.load(...c)),onError:n[1]||(n[1]=(...c)=>e.error&&e.error(...c)),style:t.normalizeStyle(e.styles)},null,44,ig),e.loading?(t.openBlock(),t.createElementBlock("div",cg,[e.slotLoding?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(i,{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",ug,[e.slotError?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(s,{key:0,width:"16px",height:"20px",name:"imageError"})),t.renderSlot(e.$slots,"error")])):t.createCommentVNode("",!0)],6)}const xl=ne(sg,[["render",dg]]),{create:fg}=J("layout"),Dl=fg({}),{componentName:mg,create:pg}=J("col"),hg=pg({props:{span:{type:[String,Number],default:"24"},offset:{type:[String,Number],default:"0"}},setup(e){const n=mg,a=t.inject("gutter"),o=t.computed(()=>({[n]:!0,[`${n}-gutter`]:a,[`fox-col-${e.span}`]:!0,[`fox-col-offset-${e.offset}`]:!0})),l=t.computed(()=>({paddingLeft:a/2+"px",paddingRight:a/2+"px"}));return{classes:o,style:l}}});function gg(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6)}const Il=ne(hg,[["render",gg]]),{componentName:yg,create:vg}=J("row"),bg=vg({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 n=yg;t.provide("gutter",e.gutter);const a=(l,r)=>l?r?`fox-row-${l}-${r}`:"":`fox-row-${r}`;return{classes:t.computed(()=>e.type==="flex"?`
|
|
5
|
+
*/function pn(e,n="0"){let a=0,o=-1;e[0]=="-"&&(a++,o=1,e=e.substring(1),e.length),n[0]=="-"&&(a++,o=2,n=n.substring(1),n.length),e=Be(e),n=Be(n),[e,n]=Ko(Be(e),Be(n)),a==1&&(o==1?e=ao(e):n=ao(n));let l=Ir(e,n);return a?a==2?"-"+Be(l):e.length<l.length?Be(l.substring(1)):"-"+Be(ao(l)):Be(l)}function ao(e){let n="",a=e.length,o=e.split(".")[1],l=o?o.length:0;for(let i=0;i<a;i++)e[i]>="0"&&e[i]<="9"?n+=9-parseInt(e[i]):n+=e[i];let r=l>0?"0."+new Array(l).join("0")+"1":"1";return Ir(n,r)}function Be(e){let n=e.split(".");for(n[0]||(n[0]="0");n[0][0]=="0"&&n[0].length>1;)n[0]=n[0].substring(1);return n[0]+(n[1]?"."+n[1]:"")}function Ko(e,n){let a=e.split("."),o=n.split("."),l=a[0].length,r=o[0].length;return l>r?o[0]=new Array(Math.abs(l-r)+1).join("0")+(o[0]?o[0]:""):a[0]=new Array(Math.abs(l-r)+1).join("0")+(a[0]?a[0]:""),l=a[1]?a[1].length:0,r=o[1]?o[1].length:0,(l||r)&&(l>r?o[1]=(o[1]?o[1]:"")+new Array(Math.abs(l-r)+1).join("0"):a[1]=(a[1]?a[1]:"")+new Array(Math.abs(l-r)+1).join("0")),e=a[0]+(a[1]?"."+a[1]:""),n=o[0]+(o[1]?"."+o[1]:""),[e,n]}function Ir(e,n){[e,n]=Ko(e,n);let a="",o=0;for(let l=e.length-1;l>=0;l--){if(e[l]==="."){a="."+a;continue}let r=parseInt(e[l])+parseInt(n[l])+o;a=r%10+a,o=Math.floor(r/10)}return o?o.toString()+a:a}var ke=(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))(ke||{});function Ut(e,n=0,a=ke.HALF_EVEN){if(a===ke.UNNECESSARY)throw new Error("UNNECESSARY Rounding Mode has not yet been implemented");typeof e=="number"&&(e=e.toString());let o=!1;e[0]==="-"&&(o=!0,e=e.substring(1));let l=e.split("."),r=l[0],i=l[1];if(n<0){if(n=-n,r.length<=n)return"0";{let c=r.substr(0,r.length-n);return e=c+"."+r.substr(r.length-n)+i,c=Ut(e,0,a),(o?"-":"")+c+new Array(n+1).join("0")}}if(n==0)return r.length,Ra(l[1],r,o,a)?(o?"-":"")+ro(r):(o?"-":"")+r;if(l[1]){if(l[1].length<n)return(o?"-":"")+r+"."+l[1]+new Array(n-l[1].length+1).join("0")}else return(o?"-":"")+r+"."+new Array(n+1).join("0");i=l[1].substring(0,n);let s=l[1].substring(n);return s&&Ra(s,i,o,a)&&(i=ro(i),i.length>n)?(o?"-":"")+ro(r,parseInt(i[0]))+"."+i.substring(1):(o?"-":"")+r+"."+i}function Ra(e,n,a,o){if(!e||e===new Array(e.length+1).join("0")||o===ke.DOWN||!a&&o===ke.FLOOR||a&&o===ke.CEILING)return!1;if(o===ke.UP||a&&o===ke.FLOOR||!a&&o===ke.CEILING)return!0;let l="5"+new Array(e.length).join("0");if(e>l)return!0;if(e<l)return!1;switch(o){case ke.HALF_DOWN:return!1;case ke.HALF_UP:return!0;case ke.HALF_EVEN:default:return parseInt(n[n.length-1])%2==1}}function ro(e,n=0){n||(n=1),typeof e=="number"&&e.toString();let a=e.length-1,o="";for(let l=a;l>=0;l--){let r=parseInt(e[l])+n;r==10?(n=1,r=0):n=0,o+=r}return n&&(o+=n),o.split("").reverse().join("")}function yo(e,n){e=e.toString(),n=n.toString();let a=0;e[0]=="-"&&(a++,e=e.substr(1)),n[0]=="-"&&(a++,n=n.substr(1)),e=Et(e),n=Et(n);let o=0,l=0;e.indexOf(".")!=-1&&(o=e.length-e.indexOf(".")-1),n.indexOf(".")!=-1&&(l=n.length-n.indexOf(".")-1);let r=o+l;if(e=Et(e.replace(".","")),n=Et(n.replace(".","")),e.length<n.length){let u=e;e=n,n=u}if(n=="0")return"0";let i=n.length,s=0,c=[],d=i-1,p="";for(let u=0;u<i;u++)c[u]=e.length-1;for(let u=0;u<2*e.length;u++){let g=0;for(let k=n.length-1;k>=d&&k>=0;k--)c[k]>-1&&c[k]<e.length&&(g+=parseInt(e[c[k]--])*parseInt(n[k]));g+=s,s=Math.floor(g/10),p=g%10+p,d--}return p=Et(Qs(p,r)),a==1&&(p="-"+p),p}function Qs(e,n){return n==0?e:(e=n>=e.length?new Array(n-e.length+1).join("0")+e:e,e.substr(0,e.length-n)+"."+e.substr(e.length-n,n))}function Et(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 vo(e,n,a=8){if(n==0)throw new Error("Cannot divide by 0");if(e=e.toString(),n=n.toString(),e=e.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),n=n.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),e==0)return"0";let o=0;n[0]=="-"&&(n=n.substring(1),o++),e[0]=="-"&&(e=e.substring(1),o++);var l=n.indexOf(".")>0?n.length-n.indexOf(".")-1:-1;if(n=Be(n.replace(".","")),l>=0){let d=e.indexOf(".")>0?e.length-e.indexOf(".")-1:-1;if(d==-1)e=Be(e+new Array(l+1).join("0"));else if(l>d)e=e.replace(".",""),e=Be(e+new Array(l-d+1).join("0"));else if(l<d){e=e.replace(".","");let p=e.length-d+l;e=Be(e.substring(0,p)+"."+e.substring(p))}else l==d&&(e=Be(e.replace(".","")))}let r=0,i=n.length,s="",c=e.indexOf(".")>-1&&e.indexOf(".")<i?e.substring(0,i+1):e.substring(0,i);if(e=e.indexOf(".")>-1&&e.indexOf(".")<i?e.substring(i+1):e.substring(i),c.indexOf(".")>-1){let d=c.length-c.indexOf(".")-1;c=c.replace(".",""),i>c.length&&(d+=i-c.length,c=c+new Array(i-c.length+1).join("0")),r=d,s="0."+new Array(d).join("0")}for(a=a+2;r<=a;){let d=0;for(;parseInt(c)>=parseInt(n);)c=pn(c,"-"+n),d++;s+=d,e?(e[0]=="."&&(s+=".",r++,e=e.substring(1)),c=c+e.substring(0,1),e=e.substring(1)):(r||(s+="."),r++,c=c+"0")}return(o==1?"-":"")+Be(Ut(s,a-2))}function bo(e,n){return e=e.toString(),n=n.toString(),n=ko(n),pn(e,n)}function ko(e){return e[0]=="-"?e=e.substr(1):e="-"+e,e}function Ka(e,n){if(n==0)throw new Error("Cannot divide by 0");e=e.toString(),n=n.toString(),Ua(e),Ua(n);let a="";e[0]=="-"&&(a="-",e=e.substr(1)),n[0]=="-"&&(n=n.substr(1));let o=bo(e,yo(n,Ut(vo(e,n),0,ke.FLOOR)));return a+o}function Ua(e){if(e.indexOf(".")!=-1)throw new Error("Modulus of non-integers not supported")}function Ha(e,n){let a=!1;if(e[0]=="-"&&n[0]!="-")return-1;if(e[0]!="-"&&n[0]=="-")return 1;if(e[0]=="-"&&n[0]=="-"&&(e=e.substr(1),n=n.substr(1),a=!0),[e,n]=Ko(e,n),e.localeCompare(n)==0)return 0;for(let o=0;o<e.length;o++)if(e[o]!=n[o])return e[o]>n[o]?a?-1:1:a?1:-1;return 0}class ie{value;static RoundingModes=ke;static validate(n){if(n){if(n=n.toString(),isNaN(n))throw Error("Parameter is not a number: "+n);n[0]=="+"&&(n=n.substring(1))}else n="0";if(n.startsWith(".")?n="0"+n:n.startsWith("-.")&&(n="-0"+n.substr(1)),/e/i.test(n)){let[a,o]=n.split(/[eE]/);a=Be(a);let l="";a[0]=="-"&&(l="-",a=a.substring(1)),a.indexOf(".")>=0?(o=parseInt(o)+a.indexOf("."),a=a.replace(".","")):o=parseInt(o)+a.length,a.length<o?n=l+a+new Array(o-a.length+1).join("0"):a.length>=o&&o>0?n=l+Be(a.substring(0,o))+(a.length>o?"."+a.substring(o):""):n=l+"0."+new Array(-o+1).join("0")+a}return n}constructor(n="0"){this.value=ie.validate(n)}getValue(){return this.value}static getPrettyValue(n,a,o){if(!(a||o))a=3,o=",";else if(!(a&&o))throw Error("Illegal Arguments. Should pass both digits and separator or pass none");n=ie.validate(n);let l=n.charAt(0)=="-";l&&(n=n.substring(1));var r=n.indexOf(".");r=r>0?r:n.length;for(var i="",s=r;s>0;)s<a?(a=s,s=0):s-=a,i=n.substring(s,s+a)+(s<r-a&&s>=0?o:"")+i;return(l?"-":"")+i+n.substring(r)}getPrettyValue(n,a){return ie.getPrettyValue(this.value,n,a)}static round(n,a=0,o=ke.HALF_EVEN){if(n=ie.validate(n),isNaN(a))throw Error("Precision is not a number: "+a);return Ut(n,a,o)}round(n=0,a=ke.HALF_EVEN){if(isNaN(n))throw Error("Precision is not a number: "+n);return new ie(Ut(this.value,n,a))}static floor(n){return n=ie.validate(n),n.indexOf(".")===-1?n:ie.round(n,0,ke.FLOOR)}floor(){return this.value.indexOf(".")===-1?new ie(this.value):new ie(this.value).round(0,ke.FLOOR)}static ceil(n){return n=ie.validate(n),n.indexOf(".")===-1?n:ie.round(n,0,ke.CEILING)}ceil(){return this.value.indexOf(".")===-1?new ie(this.value):new ie(this.value).round(0,ke.CEILING)}static add(n,a){return n=ie.validate(n),a=ie.validate(a),pn(n,a)}add(n){return new ie(pn(this.value,n.getValue()))}static subtract(n,a){return n=ie.validate(n),a=ie.validate(a),bo(n,a)}subtract(n){return new ie(bo(this.value,n.getValue()))}static multiply(n,a){return n=ie.validate(n),a=ie.validate(a),yo(n,a)}multiply(n){return new ie(yo(this.value,n.getValue()))}static divide(n,a,o){return n=ie.validate(n),a=ie.validate(a),vo(n,a,o)}divide(n,a){return new ie(vo(this.value,n.getValue(),a))}static modulus(n,a){return n=ie.validate(n),a=ie.validate(a),Ka(n,a)}modulus(n){return new ie(Ka(this.value,n.getValue()))}static compareTo(n,a){return n=ie.validate(n),a=ie.validate(a),Ha(n,a)}compareTo(n){return Ha(this.value,n.getValue())}static negate(n){return n=ie.validate(n),ko(n)}negate(){return new ie(ko(this.value))}}function qr(e,n){return ie.multiply(`${e}`,`${n}`)}function Uo(e,n,a=8){return ie.divide(`${e}`,`${n}`,a)}function So(e,n){return e=`${e}`,n=`${n}`,ie.compareTo(e,n)}function Pr(e){return ie.negate(e)}function Nn(e,n=-1,a=!1,o=3,l=","){let r=`${e}`;if(r.length==0||r==="-")return"";let i=r.charAt(0);i=="-"?r=r.substring(1):i="";let s=r,c="",d=r.indexOf(".");d!=-1&&(s=r.substring(0,d),c=r.substring(d+1)),n!=-1&&(n<c.length?c=c.substring(0,n):a&&n>c.length&&(c=c.padEnd(n,"0")));let p;if(o>0){let u="",g=s.split("").reverse();for(let k=0;k<g.length;k++)u+=g[k]+((k+1)%o==0&&k+1!=g.length?l:"");c.length==0?p=`${i}${u.split("").reverse().join("")}`:p=`${i}${u.split("").reverse().join("")}.${c}`}else c.length==0?p=`${i}${s}`:p=`${i}${s}.${c}`;return p}function Mr(e){let n=`${e}`,a=n.charAt(0);a=="-"?n=n.substring(1):a="";let o=n.replace(/[^\d\.-]/g,"");return`${a}${o}`}const _e=typeof window<"u",Ke=Xe;function Lr(e){return e==null}const Bn=Array.isArray,Gs=e=>An(e)==="[object Map]",Zs=e=>An(e)==="[object Set]",He=e=>e instanceof Date,hn=e=>typeof e=="function",zr=e=>typeof e=="string",Js=e=>typeof e=="symbol",xe=e=>e!==null&&typeof e=="object",bt=e=>xe(e)&&hn(e.then)&&hn(e.catch),Or=Object.prototype.toString,An=e=>Or.call(e),Co=e=>An(e)==="[object Object]",Fr=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function _s(e){return e.__esModule||Fr&&e[Symbol.toStringTag]==="Module"}const ei=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function st(...e){let n=e[0]!==void 0&&e[0]!==null?e[0]:{},a=1,o=e.length,l=!1;for(typeof n=="boolean"&&(l=n,n=e[a]??{},a++),typeof n!="object"&&(n={});a<o;a++)if(e[a]!==null&&e[a]!==void 0){let r=e[a];for(let i in r){let s=n[i],c=r[i];if(s!==c)if(l===!0&&c&&typeof c=="object"){let d;Array.isArray(c)?d=s&&Array.isArray(s)?s:[]:d=s&&typeof s=="object"?s:{},n[i]=st(l,d,c)}else c!==void 0&&(n[i]=c)}}return n}function wo(e,n,a=!1){if(!a)st(!0,e,n);else{if(typeof n!="object")return{};typeof e!="object"&&(e={});for(let l in n){let r=e[l],i=n[l];if(r!==i)if(typeof i=="object"){if(!Array.isArray(i)&&!Co(i))continue;r=wo(r,i,a),e[l]=r}else{if(typeof i=="function")continue;e[l]=i}}const o=Object.getOwnPropertySymbols(n);for(let l of o){let r=e[l],i=n[l];if(r!==i)if(typeof i=="object"){if(!Array.isArray(i)&&!Co(i))continue;r=wo(r,i,a),e[l]=r}else{if(typeof i=="function")continue;e[l]=i}}}return e}const so=ei?Promise.resolve():null;function ti(e,...n){so!==null?n&&n.length>0?so.then(()=>{e(n)}):so.then(e):n&&n.length>0?setTimeout(()=>{e(n)}):setTimeout(e)}function ye(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 ni={"[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 it(e){let a=Object.prototype.toString.call(e);return e==null?String(e):ni[a]||"object"}function Vn(e){if(!e)return!0;const{display:n}=window.getComputedStyle(e);return n==="none"}function Rr(e){return e&&typeof e=="object"&&"setInterval"in e}function Kr(e){let n=!!e&&"length"in e&&e.length,a=it(e);return a==="function"||Rr(e)?!1:a==="array"||n===0||typeof n=="number"&&n>0&&n-1 in e}function Ur(e,n){let a=+n.length,o=0,l=e.length;for(;o<a;o++)e[l++]=n[o];return e.length=l,e}function oi(e,n=[]){let a=n;return e!=null&&(Kr(Object(e))?Ur(a,typeof e=="string"?[e]:e):a.push(e)),a}function Pe(e,n){if(e==n)return!0;if(e===void 0||n===void 0)return!1;let a=it(e),o=it(n);if(a!==o)return!1;if(a==="object"){let l=Object.keys(e),r=Object.keys(n);if(l.length!==r.length)return!1;for(let i=0;i<l.length;i++){let s=l[i],c=e[s],d=n[s];if(!Pe(c,d))return!1}return!0}else if(a==="array"){if(e.length!==n.length)return!1;for(let l=0;l<e.length;l++){let r=e[l],i=n[l];if(!Pe(r,i))return!1}return!0}return!1}function Hr(e){return Object.prototype.toString.call(e)==="[object RegExp]"}const ue=e=>e==null?!0:typeof e!="string"?!1:e.length===0;function jr(e){return ue(e)?!0:(e.charAt(0)=="-"&&(e=e.substring(1)),ue(e)||/^(([1-9][0-9]*\.[0-9]*)|([0]\.[0-9]*)|([0-9]*)|([0]{1}))$/.test(e))}function Wr(e){if(e==null)return 0;let n=`${e}`;if(n.length==0)return 0;n.charAt(0)=="-"&&(n=n.substring(1)),n=n.replace(/[^\d\.-]/g,"");const a=n.indexOf(".");return a==-1?n.length:a}function Yr(e){if(e==null)return 0;const n=`${e}`;if(n.length==0)return 0;const a=n.indexOf(".");return a==-1?0:n.length-(a+1)}function ja(e,n,a){const o=e.indexOf(n);return o===-1?e:n==="-"&&o!==0?e.slice(0,o):e.slice(0,o+1)+e.slice(o).replace(a,"")}function No(e,n=!0,a=!0){n?e=ja(e,".",/\./g):e=e.replace(/\./g,""),a?e=ja(e,"-",/-/g):e=e.replace(/-/,"");const o=n?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(o,"")}function li(e,n){return typeof e=="object"||Array.isArray(e)?n.findIndex(a=>{if(Pe(e,a))return!0}):n.indexOf(e)}function ai(e,n){if(typeof e=="object"||Array.isArray(e)){let a=n.reverse().findIndex(o=>{if(Pe(e,o))return!0});return a!==-1&&(a=n.length-1-a),a}return n.lastIndexOf(e)}function ve(e){return e==null||e==null?0:typeof e=="string"?e.length:`${e}`.length}function be(e,...n){const a={};return n.forEach(o=>{for(const l in o)a[l]=e[l]}),a}function dt(e,...n){const a=[];n.forEach(l=>{Reflect.apply([].push,a,Reflect.ownKeys(l))});const o={};for(const l in e)a.includes(l)||(o[l]=e[l]);return o}const Xr=(e,n,a)=>{const o=Object.assign({},e),l=Object.assign({},a);return Object.keys(n).length>0?(Object.keys(o).forEach(r=>{l.hasOwnProperty(r)?typeof l[r]=="string"&&(o[r]=n[l[r]]):n[r]&&(o[r]=n[r])}),o):e};function Bo(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&e.stopPropagation()}const ot=(e,n=2)=>{for(e+="";e.length<n;)e="0"+e;return e.toString()},Ue=(e,n,a)=>Math.min(Math.max(e,n),a),Se=Symbol.for("BroadcastKey");class Ho{parent;children=[];callbacks=new Map;proxy=null;name;constructor(n,a,o){this.parent=n,this.proxy=a,this.name=o,n!==null&&n.addChild(this)}addChild(n){this.children.push(n)}removeChild(n){const a=this.children.findIndex(o=>n===o);a!==-1&&this.children.splice(a,1)}destroy(){this.parent!==null&&this.parent.removeChild(this),this.parent=null,this.proxy=null}emit(n,a,...o){if(n.maxLevel!==void 0&&n.maxLevel!==null&&n.maxLevel>0){if(n.level=n.level??0,n.level>n.maxLevel)return[];n.level++}let l=!1;!n.name||n.name==="*"?l=!0:!n.name||n.name==="+"?(l=!1,n.name="*"):Hr(n.name)&&this.name&&n.name.test(this.name)?l=!0:typeof n.name=="function"?l=Reflect.apply(n.name,null,[this.name]):n.name===this.name&&(l=!0);const r=[];if(l){const i=this.callbacks.get(a);if(typeof i=="function"){const c=Reflect.apply(i,this.proxy,[...o]);c!=null&&r.push(c)}const s=this.proxy??{};if(typeof s[a]=="function"){const c=Reflect.apply(s[a],s,[...o]);c!=null&&r.push(c)}}return this.children.forEach(i=>{const s=Reflect.apply(i.emit,i,[{...n},a,...o]);s!=null&&Array.isArray(s)&&Reflect.apply([].push,r,[...s])}),r}emitToChildren(n,a,...o){const l=[];return this.children.forEach(r=>{const i=Reflect.apply(r.emit,r,[{...n},a,...o]);i!=null&&Array.isArray(i)&&Reflect.apply([].push,l,[...i])}),l}on(n,a){this.callbacks.set(n,a)}}function Tn(e,n,a,o){const l=new Ho(n,e,a);if(o&&typeof o=="object")for(const r in o)l.on(r,o[r]);return l}function ri(e,n,a){const o=a;if(o[Se])return o[Se];const l=t.inject(Se,null),r=new Ho(l,a,e);if(n&&typeof n=="object")for(const i in n)r.on(i,n[i]);return o[Se]=r,t.provide(Se,r),t.onUnmounted(()=>{r.destroy(),o[Se]=void 0}),r}function Lt(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[Se]??t.inject(Se,null):t.inject(Se,null)}const at=e=>e.default??e;class si{error(n,a){const o=a,l=a||t.hasInjectionContext()?Lt(a):null;l?l.emit({name:"*",maxLevel:1},"setErrorTip",n):typeof o.setErrorTip=="function"&&o.setErrorTip(n)}reset(n){const a=n,o=n||t.hasInjectionContext()?Lt(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}success(n){const a=n,o=n||t.hasInjectionContext()?Lt(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}decorate(n,a,o){Array.isArray(n)||(n=[n]);const l=o,r=o||t.hasInjectionContext()?Lt(o):null,i=a.find(c=>c.required===!0||c.type==="required"&&c.required!==!1),s=n.find(c=>c.required===!0||c.type==="required"&&c.required!==!1);!i&&s?r?r.emit({name:"*"},"setRequired",!0):typeof l.setRequired=="function"&&l.setRequired(!0):i&&!s&&(r?r.emit({name:"*"},"setRequired",!1):typeof l.setRequired=="function"&&l.setRequired(!1),this.reset(o))}getValue(n){return n.modelValue}}let Ot=new si;function ii(e){Ot=e}function ci(e){Ot?Object.assign(Ot,e):Ot=e}function ui(e,n){at(lt).setValidator(e,n)}function di(e){at(lt).deleteValidator(e)}let Qr=["blur","clear"];function fi(e){Qr=e}function Gr(){return Qr}let Zr=["focus","change","setValue"];function mi(e){Zr=e}function Jr(){return Zr}function pi(e){at(lt).messages(e)}function xt(...e){const n=[];return e.forEach(a=>{a.forEach(o=>{const l=n.findIndex(r=>r.type===o.type);l!==-1&&n.splice(l,1),n.push(o)})}),n}function nn(e){return e.forEach(n=>{n.type==="required"&&(n.required===null||n.required===void 0)&&(n.required=!0),!n.type&&(n.required===!0||n.required===!1)&&(n.type="required")}),e}const Me=Symbol("ValidateSchemaKey");class _r{parent=null;validators={};attrRules=[];rules=[];descriptor;proxy;scope=null;constructor(n,a,o){this.parent=n,this.descriptor=a,this.proxy=o,(this.descriptor.validate??!0)&&this.init()}init(){if(this.descriptor.pureDataValidate===!0||!this.descriptor.valueName||!this.proxy)return;let n=this.proxy.$attrs;n&&(this.scope=t.effectScope(!0),this.scope.run(()=>{t.watchEffect(()=>{const a=nn(xt(this.attrRules,this.rules)),o=[];for(let r in n){let i=n[r];if(this.hasValidator(r,!0)){if(i===!1)continue;let c={type:r};i!==null&&typeof i=="object"&&Object.assign(c,i),o.push(c);continue}let s=this.getValidator(r);if(s!==null){let c={type:r,validator:s};o.push(c)}}this.attrRules=nn(o);const l=xt(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(l,a)})})}))}destroy(){this.scope&&(this.scope.stop(),this.scope=null),this.parent=null,this.proxy=null}execHandler(n,...a){const o=this.descriptor.validateHandler;if(o&&typeof o[n]=="function")return Reflect.apply(o[n],o,[...a]);const l=Ot;return l&&typeof l[n]=="function"?Reflect.apply(l[n],l,[...a]):null}decorate(n,a){this.descriptor.pureDataValidate!==!0&&this.execHandler("decorate",n,a,this.proxy)}success(){this.descriptor.pureDataValidate!==!0&&this.execHandler("success",this.proxy)}error(n){this.descriptor.pureDataValidate!==!0&&this.execHandler("error",n,this.proxy)}getValue(){return this.proxy===null?null:this.execHandler("getValue",this.proxy)}setValidator(n,a,o=!1){o?at(lt).setValidator(n,a):this.validators[n]=a}getValidator(n){let a=this.validators[n]??null;return a||(a=this.parent?.getValidator(n)??null),a}deleteValidator(n,a=!1){a?at(lt).deleteValidator(n):Reflect.deleteProperty(this.validators,n)}hasValidator(n,a=!1){if(a)return at(lt).hasValidator(n);{let o=Reflect.has(this.validators,n);return!o&&this.parent!==null&&(o=this.parent.hasValidator(n,!1)),o}}setRule(n){const a=xt(this.attrRules,this.rules);n===null?this.rules=[]:Array.isArray(n)?this.rules=nn(n):this.rules=nn([n]);const o=xt(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(o,a)})}clear(){this.proxy===null||this.descriptor.pureDataValidate===!0||this.execHandler("reset",this.proxy)}validate(){if(this.descriptor.validate??!0){let a=xt(this.attrRules,this.rules);const o=this.descriptor.fieldName??"value";if(a.length>0){const l={[`${o}`]:a},r=this.getValue(),i={[`${o}`]:r},s=at(lt),c=new s(l),d=this.proxy??i;return c.validate(i,{context:d}).then(u=>{if(u.pass)this.success();else{let g="error";Array.isArray(u.errors)&&u.errors.length>0&&(g=u.errors[0].message??g,u.errors=[u.errors[0]],u.errors[0].ref=d),this.error(g)}return u}).catch(u=>{const g=u.message??`${u}`;return this.error(g),u})}}return Promise.resolve({pass:!0})}}function $n(e,n,a){if(a.valueName=a.valueName??"modelValue",a.valueType=a.valueType??"string",!a.validateHandler&&a.valueName!=="modelValue"){const l=a.valueName;a.validateHandler={getValue(r){return r[l]}}}return new _r(n,a,e)}const gn=Symbol.for("EventEmitterKey");class es{register=new Map;proxy;constructor(n){this.proxy=n}destroy(){this.proxy=null,this.register.clear()}off(n,a){let o=this.register.get(n);if(o&&Array.isArray(o)){let l=o.findIndex(r=>r===a);l!==-1&&o.splice(l,1)}}on(n,a){let o=this.register.get(n);o||(o=new Array,this.register.set(n,o)),o.push(a)}emit(n,...a){const o=this.register.get(n);o&&o.forEach(l=>{try{Reflect.apply(l,null,[n,...a])}catch(r){console.error(r.message,r)}}),this.proxy&&Reflect.apply(this.proxy.$emit,this.proxy,[n,...a])}}function Qe(e,n){let a=null;return function(...o){a&&clearTimeout(a),a=setTimeout(()=>{a=null,Reflect.apply(e,null,[...o])},n)}}function yn(e,n){let a=0;return function(...o){const l=new Date().getTime();l-a<n||(a=l,Reflect.apply(e,null,[...o]))}}function hi(e,n){const a=Qe((o,l)=>{e=o,l()},n);return t.customRef((o,l)=>({get(){return o(),e},set(r){a(r,l)}}))}function gi(e){let n=!1;return function(...a){n||(n=!0,Reflect.apply(e,null,[...a]))}}function jo(e,n,a,o=0,l=!0){let r=n,i=0;if(l){const c=e();if(i++,c||i>a)return}const s=()=>{const c=e();i++,!(c||i>a)&&(r+=o,setTimeout(s,r))};setTimeout(s,r)}const Ee=Symbol("DomainKey"),pt=Symbol("DataItemsKey");class En{_parent=null;get parent(){return this._parent}set parent(n){this._parent=n}_name=null;get name(){return this._name}_broadcast=null;get broadcast(){return this._broadcast}set broadcast(n){this._broadcast=n}_validateSchema=null;get validateSchema(){return this._validateSchema}set validateSchema(n){this._validateSchema=n}_props=t.reactive({});constructor(n=null){this._name=n}destroy(){this._parent=null,this._broadcast=null,this._validateSchema=null,this._props={}}merge(n,a=[]){for(const o in n){const l=n[o];a.length>0&&a.indexOf(l)!==-1||(this._props[o]=l)}}has(n){if(Reflect.has(this._props,n)){const a=this._props[n];if(a!=null)return!0}return this.parent==null?!1:this.parent.has(n)}delete(n){Reflect.deleteProperty(this._props,n)}set(n,a){this._props[n]=a}get(n,a){if(Reflect.has(this._props,n)){const o=this._props[n];if(o!=null)return o}return this.parent==null?a:this.parent.get(n,a)}getForParent(n,a){return this.parent==null?a:this.parent.get(n,a)}getForSelf(n){return this._props[n]}getAll(n){const a=[];let o=this;for(;o!=null;){if(Reflect.has(o._props,n)){const l=o._props[n];a.push(l)}o=o._parent}return a}}const yi=new En;function yt(){return yi}function je(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[Ee]??t.inject(Ee,null):t.inject(Ee,null)}const io=Symbol("OriginalDateKey");function Wo(e,n,a=[],o){const l=t.getCurrentInstance();let r=l?.proxy,i=t.inject(Ee,null);i===null&&(i=yt());const s=e||n.prop||n.name;let c=new En(s);c.parent=i;const d=y=>{r[io]||g(y),c?.set("modelValue",y)},p=()=>c?.getForSelf("modelValue")??null,u=()=>r[io]??null,g=y=>{const b={};st(!0,b,t.toRaw(y)),r[io]=b};t.isReactive(n)||typeof n=="function"?t.watch(n,y=>{c?.merge(y,a)},{immediate:!0}):c.merge(n,a),n.modelValue&&g(n.modelValue);const k=(y,b)=>{c?.set(y,b)},v=y=>c?.getForSelf(y)??null;if(r[Ee]=c,t.provide(Ee,c),l!==null){const y=t.inject(Se,null),b=Tn(r,y,s,o);c.broadcast=b,r[Se]=b,t.provide(Se,b),r.broadcast=(h,S,...N)=>Reflect.apply(b.emit,b,[h,S,...N]);const f=t.inject(Me,null),m=$n(r,f,{componentName:""});c.validateSchema=m,r[Me]=m,t.provide(Me,m),r[pt]=new Map,r.validate=(h=!0)=>{const S=[];let N=null;const C={deep:!1};if(h===!0)N={name:"*"};else if(Array.isArray(h)&&h.length>0){const w=h;N={name:B=>B?w.indexOf(B)!==-1:!1}}else if(h!=null&&typeof h=="object"){const w=h;if(Object.assign(C,w),Array.isArray(w.include)&&w.include.length>0){const B=w.include;N={name:A=>A?B.indexOf(A)!==-1:!1}}else if(Array.isArray(w.exclude)&&w.exclude.length>0){const B=w.exclude;N={name:A=>A?B.indexOf(A)===-1:!1}}else N={name:"*"}}if(N){const w=b?.emitToChildren(N,"validate",C);w&&Reflect.apply([].push,S,w)}return S.length==1?S[0]:S.length>1?Promise.all(S).then(w=>{let B=[];return w.forEach(A=>{A.pass===!1&&Array.isArray(A.errors)&&(B=[...B,...A.errors])}),B.length>0?{pass:!1,errors:B}:{pass:!0}}):Promise.resolve({pass:!0})},r.setNameValidateRules=(h,S=!0,N=!1)=>{if(N===!0){Reflect.ownKeys(h).forEach(w=>{let B=String(w);const A={componentName:"",fieldName:B,pureDataValidate:!0};if(c){const T=os(c,B,A,b,m);r[pt].set(B,T);const $=h[B];$&&T.validateSchema.setRule($)}});return}if(S){const C=Reflect.ownKeys(h),w={name:B=>C.includes(B)};b?.emitToChildren(w,"setNameValidateRules",h,!1)}},r.clearValidate=(h=!0)=>{let S=null;if(h===!0)S={name:"*"};else if(Array.isArray(h)&&h.length>0){const N=h;S={name:C=>C?N.indexOf(C)!==-1:!1}}else if(h!=null&&typeof h=="object"){const N=h;if(Array.isArray(N.include)&&N.include.length>0){const C=N.include;S={name:w=>w?C.indexOf(w)!==-1:!1}}else if(Array.isArray(N.exclude)&&N.exclude.length>0){const C=N.exclude;S={name:w=>w?C.indexOf(w)===-1:!1}}else S={name:"*"}}S&&b?.emitToChildren(S,"clearValidate",!1)},r.resetFields=h=>{const S=p();if(!S)return;const N={};if(st(!0,N,u()??{}),Array.isArray(h))h.forEach(C=>{S[C]=N[C]});else if(h&&Array.isArray(h.include))(h.include??[]).forEach(w=>{S[w]=N[w]});else if(h&&Array.isArray(h.exclude)){let C=h.exclude??[];Reflect.ownKeys(N).forEach(w=>{C.includes(w)||(S[w]=N[w])})}else Object.assign(S,N);r.clearValidate(h)},r.setModelValue=(h,S)=>{!S||S===s?d(h):b?.emitToChildren({name:S},"setModelValue",h)},r.getModelValue=()=>p(),r.setDomainProperty=(h,S)=>{k(h,S)},r.getDomainProperty=h=>v(h)}return t.onUnmounted(function(){c?.validateSchema&&(c.validateSchema.destroy(),r[Me]=void 0,t.provide(Me,null)),c?.broadcast&&(c?.broadcast?.destroy(),r[Se]=void 0,t.provide(Se,null)),c?.destroy(),r[Ee]=void 0,t.provide(Ee,null),r[pt]&&(r[pt].clear(),r[pt]=void 0),r.broadcast=null,r.validate=null,r.setNameValidateRules=null,r.clearValidate=null,r.resetFields=null,r.setModelValue=null,r.getModelValue=null,r.setDomainProperty=null,r.getDomainProperty=null,c=null,r=null}),c}function ts(e,n,a=[]){let l=t.getCurrentInstance()?.proxy,r=t.inject(Ee,null);r===null&&(r=yt());const i=e||n.prop||n.name;let s=new En(i);return s.parent=r,t.isReactive(n)||typeof n=="function"?t.watch(n,c=>{s?.merge(c,a)},{immediate:!0}):s.merge(n,a),l[Ee]=s,t.provide(Ee,s),t.onUnmounted(()=>{s?.destroy(),l[Ee]=void 0,t.provide(Ee,null),s=null,l=null}),s}function ns(e,n,a){const l=je(e)?.get("rules");if(!l)return;let r=l[a];r&&(Array.isArray(r)||(r=[r]),n.setRule(r))}function Ae(e,n,a){const l=t.getCurrentInstance()?.proxy,r=n??"",i=t.inject(Se,null);let s=Tn(l,i,r,a);l[Se]=s,t.provide(Se,s),l.broadcast=(v,y,...b)=>s?Reflect.apply(s.emit,s,[v,y,...b]):null;const c=t.inject(Me,null);e.fieldName=e.fieldName??r;let d=$n(l,c,e);l[Me]=d,t.provide(Me,d),ns(l,d,r),l.validate=(v=null)=>{if(!d)return Promise.resolve({pass:!0});const y=[];let b=!1,f=!1;if(Array.isArray(v)&&v.indexOf(r)!==-1)f=!0,b=!0;else if(v&&typeof v=="object"){const m=v,h=m.ignoreDisabled??!0,S=m.ignoreReadonly??!0,N=m.ignoreHidden??!0;h===!0&&e.disabled===!0||S===!0&&e.readonly===!0||N===!0&&Vn(l.$el)?f=!1:(Array.isArray(m.include)&&m.include.indexOf(r)!==-1||Array.isArray(m.exclude)&&m.exclude.indexOf(r),f=!0),b=m.deep??!1}else typeof v=="boolean"&&(b=v),f=!0;if(f){const m=d?.validate();y.push(m)}if(b){let m=null;const h={deep:!1};if(v===!0)m={name:"*"};else if(Array.isArray(v)&&v.length>0){const S=v;m={name:N=>N?S.indexOf(N)!==-1:!1}}else if(v!=null&&typeof v=="object"){const S=v;if(Object.assign(h,S),Array.isArray(S.include)&&S.include.length>0){const N=S.include;m={name:C=>C?N.indexOf(C)!==-1:!1}}else if(Array.isArray(S.exclude)&&S.exclude.length>0){const N=S.exclude;m={name:C=>C?N.indexOf(C)===-1:!1}}else m={name:"*"}}if(m&&s){const S=s.emitToChildren(m,"validate",h);Reflect.apply([].push,y,S)}}return y.length==1?y[0]:y.length>1?Promise.all(y).then(m=>{let h=[];return m.forEach(S=>{S.pass===!1&&Array.isArray(S.errors)&&(h=[...h,...S.errors])}),h.length>0?{pass:!1,errors:h}:{pass:!0}}):Promise.resolve({pass:!0})},l.setValidateRule=v=>d?.setRule(v),l.setNameValidateRules=(v,y=!1)=>{const b=v[r];if(b&&d?.setRule(b),y&&s){const f={name:m=>Reflect.ownKeys(v).includes(m)};s.emitToChildren(f,"setNameValidateRules",v,!1)}},l.clearValidate=(v=null)=>{(!Array.isArray(v)||v.indexOf(n??"")!==-1)&&d?.clear();let y=null;if(v===!0)y={name:"*"};else if(Array.isArray(v)&&v.length>0){const b=v;y={name:f=>f?b.indexOf(f)!==-1:!1}}else if(v!=null&&typeof v=="object"){const b=v;if(Array.isArray(b.include)&&b.include.length>0){const f=b.include;y={name:m=>m?f.indexOf(m)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const f=b.exclude;y={name:m=>m?f.indexOf(m)===-1:!1}}else y={name:"*"}}y&&s&&s.emitToChildren(y,"clearValidate",!1)};let p=new es(l);l[gn]=p;const u=Qe((v="validate")=>{d&&(v==="reset"?d.clear():d.validate())},60);return(Array.isArray(e.validateCheckEvents)?e.validateCheckEvents:Gr()).forEach(v=>{p&&p.on(v,y=>{u("validate")})}),(Array.isArray(e.validateResetEvents)?e.validateResetEvents:Jr()).forEach(v=>{p&&p.on(v,y=>{u("reset")})}),t.onUnmounted(()=>{s?.destroy(),l[Se]=void 0,t.provide(Se,null),s=null,d?.destroy(),l[Me]=void 0,t.provide(Me,null),d=null,p?.destroy(),l[gn]=void 0,p=null,l.broadcast=null,l.validate=null,l.setValidateRule=null,l.setNameValidateRules=null,l.clearValidate=null}),{broadcast:s,validateSchema:d,emitEvent:(v,...y)=>{p&&Reflect.apply(p.emit,p,[v,...y])},onEvent:(v,y)=>{p&&Reflect.apply(p.on,p,[y])},offEvent:(v,y)=>{p&&Reflect.apply(p.off,p,[y])}}}function os(e,n,a,o,l){const r={},i=n??"",s={getValue(){const p=e.getForSelf("modelValue");return p?p[i]:null},isExist(){const p=e.getForSelf("modelValue");return p?Reflect.has(p,i):!1}};a.fieldName=i,a.validateHandler={getValue(p){return s.getValue()}};let c=$n({},l,a);r.validate=(p=null)=>{if(!s.isExist())return console.warn(`validate error: field [${i}] not exist`),Promise.resolve({pass:!0});const u=[];let g=!1,k=!1;if(Array.isArray(p)&&p.indexOf(i)!==-1)k=!0,g=!0;else if(p&&typeof p=="object"){const v=p;Array.isArray(v.include)&&v.include.indexOf(i)!==-1||Array.isArray(v.exclude)&&v.exclude.indexOf(i),k=!0,g=v.deep??!1}else typeof p=="boolean"&&(g=p),k=!0;if(k&&c){const v=c.validate();u.push(v)}if(g){let v=null;const y={deep:!1};if(p===!0)v={name:"*"};else if(Array.isArray(p)&&p.length>0){const b=p;v={name:f=>f?b.indexOf(f)!==-1:!1}}else if(p!=null&&typeof p=="object"){const b=p;if(Object.assign(y,b),Array.isArray(b.include)&&b.include.length>0){const f=b.include;v={name:m=>m?f.indexOf(m)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const f=b.exclude;v={name:m=>m?f.indexOf(m)===-1:!1}}else v={name:"*"}}if(v&&d){const b=d.emitToChildren(v,"validate",y);Reflect.apply([].push,u,b)}}return u.length==1?u[0]:u.length>1?Promise.all(u).then(v=>{let y=[];return v.forEach(b=>{b.pass===!1&&Array.isArray(b.errors)&&(y=[...y,...b.errors])}),y.length>0?{pass:!1,errors:y}:{pass:!0}}):Promise.resolve({pass:!0})},r.setValidateRule=p=>c?.setRule(p),r.setNameValidateRules=p=>{const u=p[i];u&&c?.setRule(u)};let d=Tn(null,o,i,r);return t.onUnmounted(()=>{c=null,d=null}),{broadcast:d,validateSchema:c}}function Vt(){let n=t.getCurrentInstance()?.proxy,a=new es(n);return n[gn]=a,t.onUnmounted(()=>{a?.destroy(),n[gn]=void 0,a=null,n=null}),{emitEvent:(o,...l)=>{a&&Reflect.apply(a.emit,a,[o,...l])},onEvent:(o,l)=>{a&&Reflect.apply(a.on,a,[l])},offEvent:(o,l)=>{a&&Reflect.apply(a.off,a,[l])}}}const he=e=>e?`${de(e)}px`:"";function de(e,n=-1){if(e==null)return 0;if(typeof e=="number")return e>0&&e<1&&n>0?e*n:e;if(e=e.trim().toLocaleLowerCase(),e.length===0)return 0;let a=e.indexOf("px");if(a!==-1)return Number(e.substring(0,a));if(a=e.indexOf("rem"),a!==-1){let l=Number(e.substring(0,a)),r=1;if(_e){const{fontSize:i}=window.getComputedStyle(document.documentElement,null),s=i.indexOf("px");s>0&&(r=Number(i.substring(0,s)))}return l*=r,l}if(a=e.indexOf("%"),a!==-1)return Number(e.substring(0,a))*n;const o=Number(e);return isNaN(o)?0:o}const Ge="PageStateKey";function Oe(e){const n={top:null,left:null,bottom:null,right:null};return e&&(e.top!==null&&e.top!==void 0&&(n.top=de(e.top)),e.left!==null&&e.left!==void 0&&(n.left=de(e.left)),e.bottom!==null&&e.bottom!==void 0&&(n.bottom=de(e.bottom)),e.right!==null&&e.right!==void 0&&(n.right=de(e.right))),n}function Ao(e,n,a={},o=!0,l=-1,r=-1,i=0,s=0){if(e.headerHeight=de(a.headerHeight??n.headerHeight??-1),e.headerPadding=Oe(a.headerPadding??n.headerPadding),e.footerHeight=de(a.footerHeight??n.footerHeight??-1),e.footerPadding=Oe(a.footerPadding??n.footerPadding),e.contentPadding=Oe(a.contentPadding??n.contentPadding),o){const c=a.height??n.height;c?e.height=de(c,r):e.height=de(r)-de(i,r)-de(s,r),e.width=de(a.width??n.width??0,l)}}function ls(e,n={}){const a={top:null,left:null,bottom:null,right:null},o={width:0,height:0,headerHeight:0,headerPadding:{...a},footerHeight:0,footerPadding:{...a},contentPadding:{...a},contentHeight:null,safeAreaTop:0,safeAreaBottom:0,safeAreaLeft:0,safeAreaRight:0,headerMounted:!1,footerMounted:!1},l=Object.assign(e.get("safeAreaInset")??{},n.safeAreaInset??{});l&&(o.safeAreaTop=de(l.top),o.safeAreaBottom=de(l.bottom),o.safeAreaLeft=de(l.left),o.safeAreaRight=de(l.right));const r=e.get("pageLayout");if(!r)return null;const i=e.get("rootWidth")??-1,s=e.get("rootHeight")??-1,c=e.get("headerBarHeight")??0,d=e.get("footerBarHeight")??0;Ao(o,r,n,!0,i,s,c,d);const p=t.reactive(o),u=e.getForParent(Ge);u&&(o.height=vn(e,u),o.width=bn(e,u),t.watch([()=>vn(e,u),()=>bn(e,u)],([k,v])=>{p.height=k,p.width=v}));const g=!u;return t.watch([()=>n.height,()=>e.get("pageLayout"),()=>e.get("rootWidth"),()=>e.get("rootHeight"),()=>e.get("headerBarHeight"),()=>e.get("footerBarHeight")],([k,v,y=-1,b=-1,f=0,m=0])=>{Ao(p,v,n,g,y,b,f,m)}),e.set(Ge,p),p}function xn(e){return e.get(Ge)}function Dn(e,n){if(n=n??e.get(Ge),n&&n.headerMounted){const a=n.safeAreaTop==-1?0:n.safeAreaTop;return n.headerAllHeight??n.headerHeight+a}return 0}function In(e,n){if(n=n??e.get(Ge),n&&n.footerMounted){const a=n.safeAreaBottom==-1?0:n.safeAreaBottom;return n.footerAllHeight??n.footerHeight+a}return 0}function vn(e,n){if(n=n??e.get(Ge),n){if(n.contentInnerHeight)return n.contentInnerHeight;const a=Dn(e,n),o=In(e,n);return n.height-a-o-(n.contentPadding.top??0)-(n.contentPadding.bottom??0)}return 0}function bn(e,n){return n=n??e.get(Ge),n?n.contentInnerWidth??n.width-(n.contentPadding.left??0)-(n.contentPadding.right??0):0}function vi(e,n){const a=e.get("isInnerPage");return typeof a=="function"?Reflect.apply(a,{},[n,e]):!1}function bi(e){return!!e.getForParent(Ge)}var kn=(e=>(e[e.Parent=0]="Parent",e[e.Near=1]="Near",e))(kn||{});function on(e,n){return e==null?!1:typeof n=="function"?n(e):!0}function Ve(e,n,a=1,o){const l=je();return l==null?e:a===0?t.computed(()=>{const r=l.getAll(n);for(let s=r.length-1;s>=0;s--){const c=r[s];if(on(c,o))return c}const i=e.value;return on(i,o)?i:null}):t.computed(()=>{const r=e.value;if(on(r,o))return r;const i=l.getAll(n);for(let s=0;s<i.length;s++){const c=i[s];if(on(c,o))return c}return null})}function Te(e){return Ve(e,"readonly",1)}function $e(e){return Ve(e,"disabled",1)}function qe(e,n="modelValue",a=null,o){const l=t.toRef(e,n);let r=l.value;typeof a=="function"&&(r=a(l.value));const i=t.ref(r);return t.watch(l,s=>{if(typeof a=="function"){const c=a(s);c!==i.value&&(i.value=c,o&&o("setValue",c))}else s!==i.value&&(i.value=s,o&&o("setValue",s))}),i}const as=new Map,Sn=new Map;let Vo=null;function ki(e){Vo=e}function rs(e,n,a){if(a){let o=Sn.get(a);o||(o=new Map,Sn.set(a,o)),o.set(e,n)}else as.set(e,n)}function et(e,n,a){!a&&Vo&&(a=Vo(e)??void 0);let o=null;if(a){let l=Sn.get(a);l&&(o=l.get(n))}return o||(o=as.get(n)),o}function Si(e,n){for(let a in e){const o=e[a];rs(a,o,n)}}function Ci(e){Sn.delete(e)}function wi(){return{top:0,left:0,bottom:0,right:0}}function Ni(){if(_e){const e=document.documentElement.clientWidth||document.body.clientWidth,n=document.documentElement.clientHeight||document.body.clientHeight;return{rootWidth:e,rootHeight:n,pageLayout:{}}}else return{rootWidth:-1,rootHeight:-1,pageLayout:{headerHeight:-1,footerHeight:-1}}}function Bi(e,n){if(n.componentPrefix){const a=e.indexOf("-");return`${n.componentPrefix}${e.slice(a)}`}return e}class Ai{packages;_version;get version(){return this._version}constructor(n,a){this.packages=n,this._version=a}install(n,a){a?.install!==!1&&this.packages.forEach(r=>{if(r.install)n.use(r);else if(r.name){const i=Bi(r.name,a);n.component(i,r)}});const o=["safeAreaInset","pageLayout","headerBarHeight","footerBarHeight"],l=yt();if(this.initPageLayout(a,l),a.autoAdjustPageLayout!==!1&&window.ResizeObserver){const r=yn(()=>{const s={...a},c=document.documentElement.clientWidth||document.body.clientWidth,d=document.documentElement.clientHeight||document.body.clientHeight;s.width=c,s.height=d,this.initPageLayout(s,l)},150);new window.ResizeObserver(r).observe(window.document.body)}for(const r in a)o.indexOf(r)===-1&&l.set(r,a[r])}initPageLayout(n,a){const o=n.headerBarHeight??0,l=n.footerBarHeight??0,r=st({},wi(),n.safeAreaInset),i=Ni(),s=st({},i.pageLayout,n.pageLayout);a=a??yt(),a.set("safeAreaInset",r),a.set("headerBarHeight",o),a.set("footerBarHeight",l),a.set("pageLayout",s),a.set("rootWidth",i.rootWidth),a.set("rootHeight",i.rootHeight)}setScopeGetter(n){ki(n)}setAPI(n,a,o){rs(n,a,o)}getAPI(n,a,o){return et(n,a,o)}batchSetAPI(n,a){Si(n,a)}clearScopeAPI(n){Ci(n)}getRootDomain(){return yt()}}function J(e){const n="fox-"+e;return{componentName:n,scope:e.replace("-",""),create(a){return a.baseName=e,a.name=n,a.install=o=>{o.component(a.name,a)},t.defineComponent(a)},createDemo(a){return a.baseName=e,a.name="demo-"+e,t.defineComponent(a)}}}const Vi=(e,n)=>{let a=document.body;const o=e.teleport||"body";o!="body"&&(zr(o)?a=document.querySelector(o):a=e.teleport);const l=document.createElement("view"),r=n.name?n.name+"-":"",i=e.id||new Date().getTime();l.id=r+i;let s={};hn(n.wrapper)?s=n.wrapper(a,l):s=n.wrapper;const c=t.createApp(s,e),d=n.components;return d&&d.forEach(p=>{c.use(p)}),a.appendChild(l),{instance:c.mount(l),unmount:()=>{c.unmount(),a.removeChild(l)}}},ss=(e,n)=>e?t.h(e,n):"";function Ie(e,n=null){if(n||(n=t.getCurrentInstance()),n&&n.proxy){let a=n.proxy;Object.assign(a,e)}}const pe={disabled:{type:[Boolean,String],required:!1,default:()=>null},readonly:{type:[Boolean,String],required:!1,default:()=>null},labelPosition:{type:String,required:!1,default:()=>null},labelWidth:{type:[String,Number],required:!1,default:()=>null},textAlign:{type:[String],required:!1,default:()=>null},hasBorder:{type:Boolean,required:!1,default:()=>!0}},ge={prop:{type:String,required:!1},label:{type:String,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}},is={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}},cs={name:{type:String,required:!1},prop:{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}},us=[];for(const e in cs)us.push(e);const Ti=Symbol.for("InnerPageScopeKey"),$i={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}},Ei=(e,n)=>({inheritAttrs:!0,props:{...pe,...is,...$i},setup(a,{slots:o}){const l=Wo(a.name,a),r=t.inject(Ti,!1);if(l){const p=ls(l,a);Ie({getPageContentHeight:()=>vn(l,p),getPageContentWidth:()=>bn(l,p),getPageHeaderHeight:()=>Dn(l,p),getPageFooterHeight:()=>In(l,p)}),p&&r&&(p.contentHeight="100%")}const i=t.computed(()=>({[e]:!0})),s=t.computed(()=>({})),c=t.getCurrentInstance(),d=(p,u=!1)=>{const g=c?.proxy;g&&typeof g.setNameValidateRules=="function"&&g.setNameValidateRules(p,!0,u)};return t.watch([()=>a.rules,()=>a.pureDataRules],([p,u],[g,k])=>{if(p&&g){const v=t.toRaw(g),y=t.toRaw(p),b=y?Reflect.ownKeys(y):[];(v?Reflect.ownKeys(v):[]).forEach(m=>{b.includes(m)||(y[m]=[])}),d(y)}if(u&&k){const v=t.toRaw(k),y=t.toRaw(u),b=y?Reflect.ownKeys(y):[];(v?Reflect.ownKeys(v):[]).forEach(m=>{b.includes(m)||(y[m]=[])}),d(y,!0)}},{deep:!0}),t.onMounted(()=>{if(a.rules){const p=t.toRaw(a.rules);d(p)}if(a.pureDataRules){const p=t.toRaw(a.pureDataRules);d(p,!0)}}),()=>{const p={class:i.value,style:s.value};return t.h("div",p,[o?.default?.()])}}}),{componentName:xi,create:Di,scope:mA}=J("page"),Yo=Di(Ei(xi));function Xo(e){const n=t.unref(e);return{width:n.offsetWidth,height:n.offsetHeight}}function qn(e){const n=t.unref(e),a=window.getComputedStyle(n,null),o=parseFloat(a.getPropertyValue("padding-left")),l=parseFloat(a.getPropertyValue("padding-right")),r=parseFloat(a.getPropertyValue("padding-top")),i=parseFloat(a.getPropertyValue("padding-bottom"));return{width:n.clientWidth-o-l,height:n.clientHeight-r-i}}const Ii=Symbol.for("InnerPageScopeKey"),ds={headerbar:{},radio:{},checkbox:{}};function qi(e){Object.assign(ds,e)}function Pn(){return ds}const Pi=(e,n,a,o=!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},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(l,r){const i=je(),s=i?xn(i):null,c=t.inject(Ii,!1),d=Pn(),p=e,u=t.computed(()=>{const q={[p]:!0,[`${p}--border`]:l.border,[`${p}--fixed`]:l.fixed};return c||(q[`${p}--safe-area-inset-top`]=l.safeAreaInsetTop),q}),g=t.computed(()=>({[`${p}__inner`]:!0,[`${p}__inner--${l.align}`]:!0})),k=l.height!==null&&l.height!==void 0?de(l.height):null,v=t.computed(()=>{const q={safeAreaTop:null,height:null,left:null,top:null,right:null,bottom:null};if(i&&s){const R=Oe(l.padding??s.headerPadding);return Object.assign(q,R),k&&(s.headerHeight=k),s.headerHeight>0&&(q.height=s.headerHeight),q.safeAreaTop=s.safeAreaTop===-1?0:s.safeAreaTop,q.safeAreaTop>0&&(q.top=q.safeAreaTop+(R.top??0),q.height&&q.height>0&&(q.height=q.height+q.safeAreaTop)),q}if(k&&(q.height=k),l.padding){const R=Oe(l.padding);Object.assign(q,R)}return q}),y=t.ref(null),b=()=>{if(s&&y.value&&!Vn(y.value)){if(!o){const q=Xo(y.value);s.headerAllHeight=q.height}return s.headerMounted=!0,!0}return!1};let f=null;t.onMounted(()=>{s&&(jo(b,50,5,50,!0),window.ResizeObserver&&y.value&&(f=new window.ResizeObserver(()=>{b()}),f.observe(y.value)))}),t.onUnmounted(()=>{s&&(s.headerMounted=!1,f&&(f.disconnect(),f=null))});const m=t.computed(()=>{const q={};return v.value.height!==null&&v.value.height!==void 0&&(q.height=`${v.value.height}px`),v.value.top!==null&&v.value.top!==void 0&&(q.paddingTop=`${v.value.top}px`),v.value.left!==null&&v.value.left!==void 0&&(q.paddingLeft=`${v.value.left}px`),v.value.right!==null&&v.value.right!==void 0&&(q.paddingRight=`${v.value.right}px`),v.value.bottom!==null&&v.value.bottom!==void 0&&(q.paddingBottom=`${v.value.bottom}px`),q}),h=t.computed(()=>!(v.value.height!==null&&v.value.height!==void 0&&v.value.height<=0));function S(){r.emit("back")}function N(){r.emit("click-title")}function C(){r.emit("click-right")}function w(){r.emit("click-right-text")}const B=()=>{if(!l.leftShow)return null;const q=[];if(r.slots.left)q.push(r.slots.left());else{if(r.slots.leftIcon){const R=t.h("view",{class:"left-icon",onClick:S},[r.slots.leftIcon()]);q.push(R)}else{const R=l.leftIcon??d.headerbar.Left??a,V=t.h("view",{class:"left-icon",onClick:S},[t.h(R)]);q.push(V)}if(l.leftText){const R=t.h("view",{class:"left-text",onClick:S},[l.leftText]);q.push(R)}}return q.length===0?null:t.h("view",{class:"fox-header-bar__left"},q)},A=()=>{if(!l.rightShow)return null;const q=[];if(r.slots.right)q.push(r.slots.right());else{if(l.rightText){const R=t.h("view",{class:"right-text",onClick:w},[l.rightText]);q.push(R)}if(r.slots.rightIcon){const R=t.h("view",{class:"right-icon",onClick:C},[r.slots.rightIcon()]);q.push(R)}else if(l.rightIcon){const R=t.h("view",{class:"right-icon",onClick:C},[t.h(l.rightIcon)]);q.push(R)}}return q.length===0?null:t.h("view",{class:"fox-header-bar__right"},q)},T=()=>{if(!l.titleShow)return null;const q=[],R=r.slots.default?r.slots.default():null;if(R)q.push(R);else{if(l.title){const V=t.h("view",{class:"title-text"},[l.title]);q.push(V)}if(r.slots.titleIcon){const V=t.h("view",{class:"title-icon",onClick:N},[r.slots.titleIcon()]);q.push(V)}else if(l.titleIcon){const V=t.h("view",{class:"title-icon",onClick:N},[t.h(l.titleIcon)]);q.push(V)}}return q.length===0?null:t.h("view",{class:"fox-header-bar__title"},q)},$=()=>{const q=[],R=r.slots.bottom?r.slots.bottom():null;return R&&q.push(R),q.length===0?null:t.h("view",{class:"fox-header-bar__bottom"},q)};return()=>{if(!h.value)return null;const q=[];if(r.slots.all)q.push(r.slots.all());else{const V=[],E=B();E&&V.push(E);const M=T();M&&V.push(M);const x=A();if(x&&V.push(x),V.length>0){const H=t.h("view",{class:g.value},V);q.push(H)}const j=$();j&&q.push(j)}if(q.length===0)return null;const R={class:u.value,style:m.value,ref:y};return t.h("view",R,q)}}}),{componentName:Mi,create:Li,scope:zi}=J("header-bar"),Qo=Li(Pi(Mi,zi,oe.Left,!1)),Oi=Symbol.for("InnerPageScopeKey");function Fi(e,n,a=!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(o,l){const r=je(),i=r?xn(r):null,s=t.inject(Oi,!1),c=e,d=t.computed(()=>{const b={[c]:!0,[`${c}--${o.align}`]:!0,[`${c}--border`]:o.border,[`${c}--fixed`]:o.fixed};return s||(b[`${c}--safe-area-inset-bottom`]=o.safeAreaInsetBottom),b}),p=o.height!==null&&o.height!==void 0?de(o.height):null,u=t.computed(()=>{const b={safeAreaBottom:null,height:null,left:null,top:null,right:null,bottom:null};if(r&&i){const f=Oe(o.padding??i.footerPadding);return Object.assign(b,f),p&&(i.footerHeight=p),i.footerHeight>0&&(b.height=i.footerHeight),b.safeAreaBottom=i.safeAreaBottom===-1?0:i.safeAreaBottom,b.safeAreaBottom>0&&(b.bottom=b.safeAreaBottom+(f.bottom??0),b.height&&b.height>0&&(b.height=b.height+b.safeAreaBottom)),b}if(p&&(b.height=p),o.padding){const f=Oe(o.padding);Object.assign(b,f)}return b}),g=t.ref(null),k=()=>{if(i&&g.value&&!Vn(g.value)){if(!a){const b=Xo(g.value);i.footerAllHeight=b.height}return i.footerMounted=!0,!0}return!1};let v=null;t.onMounted(()=>{i&&(jo(k,50,5,50,!0),window.ResizeObserver&&(v=new window.ResizeObserver(()=>{k()}),v.observe(g.value)))}),t.onUnmounted(()=>{i&&(i.footerMounted=!1,v&&(v.disconnect(),v=null))});const y=t.computed(()=>{const b={};return u.value.height!==null&&u.value.height!==void 0&&(b.height=he(u.value.height)),u.value.top!==null&&u.value.top!==void 0&&(b.paddingTop=he(u.value.top)),u.value.left!==null&&u.value.left!==void 0&&(b.paddingLeft=he(u.value.left)),u.value.right!==null&&u.value.right!==void 0&&(b.paddingRight=he(u.value.right)),u.value.bottom!==null&&u.value.bottom!==void 0&&(b.paddingBottom=he(u.value.bottom)),b});return()=>{const b=l.slots.default?l.slots.default():[],f={ref:g,class:d.value,style:y.value};return t.h("view",f,b)}}}}const{componentName:Ri,create:Ki,scope:Ui}=J("footer-bar"),Go=Ki(Fi(Ri,Ui,!1));function Hi(e,n){return{props:{padding:{type:[Object],required:!1}},setup(a){const o=je(),l=t.computed(()=>({[e]:!0})),r=o?xn(o):null,i=t.computed(()=>{const d={};if(o&&r){if(a.padding){const f=Oe(a.padding);Object.assign(r.contentPadding,f)}const p=Dn(o,r),u=In(o,r);let g="";r.contentHeight?g=`${r.contentHeight}`:g=`${r.height}px`,console.debug("[content]page height:",g),console.debug("[content]header height:",p),console.debug("[content]footer height:",u),console.debug("[content]padding:",r.contentPadding),d.height=g;let k=(r&&r.contentPadding&&r.contentPadding.top)??-1;(k>=0||p>0)&&(k=k<0?0:k,d.paddingTop=`${p+k}px`);let v=(r&&r.contentPadding&&r.contentPadding.bottom)??-1;(v>=0||u>0)&&(v=v<0?0:v,d.paddingBottom=`${u+v}px`);const y=(r&&r.contentPadding&&r.contentPadding.left)??-1;y>=0&&(d.paddingLeft=`${y}px`);const b=(r&&r.contentPadding&&r.contentPadding.right)??-1;return b>=0&&(d.paddingRight=`${b}px`),d}if(a.padding){const p=Oe(a.padding);p.left&&(d.paddingLeft=`${p.left}px`),p.top&&(d.paddingTop=`${p.top}px`),p.right&&(d.paddingRight=`${p.right}px`),p.bottom&&(d.paddingBottom=`${p.bottom}px`)}return d}),s=t.ref(null),c=Qe(()=>{if(r&&s.value){const d=qn(s.value);r.contentInnerHeight=d.height,r.contentInnerWidth=d.width}},0);return t.onMounted(()=>{c()}),o&&r&&t.watch([()=>i.value,()=>l.value],([])=>{c()}),{contentRef:s,classes:l,styles:i}}}}const{componentName:ji,create:Wi,scope:pA}=J("content"),Yi=Wi(Hi(ji));function Xi(e,n,a,o,l,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 ne=(e,n)=>{const a=e.__vccOpts||e;for(const[o,l]of n)a[o]=l;return a},Zo=ne(Yi,[["render",Xi]]),kt="GroupStateKey",fs=Symbol.for("GroupScopeKey");function Mn(){return t.inject(fs,!1)}function Ln(e=!0){t.provide(fs,e)}function Qi(e,n={}){Reflect.ownKeys(n).forEach(o=>{if(typeof o!="string")return;const l=n[o];Lr(l)||(e[o]=l)})}function Gi(e,n={}){const o={type:"grid",width:e.get("width",-1),column:-1,gutter:-1};Qi(o,n);const l=t.shallowRef(o),r=t.markRaw({layout:l,passport:0,order:{index:0}});return e.set(kt,r),r}function co(e,n,a=-1,o=-1,l=!1,r,i,s){const c=e.get(kt);if(!c)return;const d=e.get("groupLayout")??{};a===-1&&(a=d.column??1),o===-1&&(o=d.gutter??0),r||(r=d.minItemWidth??-1),i||(i=d.maxItemWidth??-1);const p=de(r),u=de(i);s||(s=d.type??"grid");const g=()=>{const k=n===""||n===-1,v=de(n);let y=me(a);const b=de(o);if(!k){let h=(v-(y-1)*b)/y;for(;u!==-1&&h>u;)y++,h=(v-(y-1)*b)/y;for(;p!==-1&&y>1&&h<p;)y--,h=(v-(y-1)*b)/y}let f=!1;const m=c.layout;m.value.width=n,m.value.column!==y&&(m.value.column=y,f=!0),m.value.gutter!==b&&(m.value.gutter=b,f=!0),m.value.type!==s&&(m.value.type=s,f=!0),f&&t.triggerRef(m)};if(l)g();else{const k=++c.passport;setTimeout(()=>{k===c.passport&&g()},50)}}function zn(e,n=!1){let a;return n?a=e.getForParent(kt):a=e.get(kt),a.layout}function On(e,n=!1){let a;return n?a=e.getForParent(kt):a=e.get(kt),a.order}function Wa(e,n=1){if(n==="stretch")return-1;const a=me(n);return a===-1?100:100*a/e}function Fn(e,n,a=1,o=0,l){const r={};let i=0;l?i=de(l):i=Wa(n.column,a),i>0&&(r.width=`${i}%`);const s=Wa(n.column,o);s>0&&(r["margin-left"]=`${s}%`);const c=n.gutter/2;return c>0&&(r["padding-left"]=`${c}px`,r["padding-right"]=`${c}px`),r}function Rn(e,n,a=1,o=0){if(a==="stretch"){const c=e.index%n.column,d=c+(n.column-c);return e.index=e.index+(d-c),{"grid-column":`${c+1} / -1`}}let l=me(a);if(l===-1){const c=e.index%n.column;return n.column,c==0?e.index=e.index+n.column:e.index=e.index+(n.column-c)+n.column,{"grid-column":"1 / -1"}}if(l>n.column){const c=e.index%n.column;return n.column,c==0?e.index=e.index+n.column:e.index=e.index+(n.column-c)+n.column,{"grid-column":"1 / -1"}}const r=me(o)%n.column;let i=(e.index+r)%n.column,s=i+l;return s>n.column?(i=0,s=i+l,e.index=e.index+(n.column-i)+l):e.index=e.index+r+l,r>0?{"grid-column":`${i+1} / span ${l}`}:{"grid-column-start":`span ${l}`}}const ms=Symbol("RollingStateKey");function Zi(e){t.provide(ms,e)}function Ji(){return t.inject(ms,null)}function To(e){let n=0;const a=window.getComputedStyle(e,null);if(a.getPropertyValue("box-sizing")==="content-box"){const l=parseFloat(a.getPropertyValue("padding-top")),r=parseFloat(a.getPropertyValue("padding-bottom"));n=e.clientHeight-l-r}else n=e.offsetHeight;return n}function _i(e){let n=To(e);if(n<=0){const a=e.cloneNode(!0),o=e.offsetWidth;a.style=`width: ${o}px; height: initial; overflow: initial; visibility: hidden;`,document.body.appendChild(a),n=To(a),console.info("2.---------- get expand height",n),document.body.removeChild(a)}return n}function ec(e,n,a){if(e<=0)return"1fr";const o=(e-(n-1)*a)/n;return o>0?`${o}px`:"1fr"}const tc={...pe,...is,...cs};function nc(e,n,a){return{props:tc,emits:["update:collapse","header-click"],setup(o,l){const r=Wo(o.prop??o.name,o,us),i=Gi(r,{type:o.type}),s=Mn();Ln(!0);const c=o.rollingDisplay?Ji():null,d=t.ref(null),p=t.computed(()=>o.rollingDisplay?c&&!c.disabled:!1),u=t.computed(()=>s&&r?zn(r,!0).value:null),g=t.getCurrentInstance(),k=(F,Y=!1)=>{const X=g?.proxy;X&&typeof X.setNameValidateRules=="function"&&X.setNameValidateRules(F,!0,Y)};t.watch([()=>o.rules,()=>o.pureDataRules],([F,Y],[X,K])=>{if(F&&X){const Z=t.toRaw(X),ee=t.toRaw(F),le=ee?Reflect.ownKeys(ee):[];(Z?Reflect.ownKeys(Z):[]).forEach(ce=>{le.includes(ce)||(ee[ce]=[])}),k(ee)}if(Y&&K){const Z=t.toRaw(K),ee=t.toRaw(Y),le=ee?Reflect.ownKeys(ee):[];(Z?Reflect.ownKeys(Z):[]).forEach(ce=>{le.includes(ce)||(ee[ce]=[])}),k(ee,!0)}},{deep:!0});const v=e,y=t.computed(()=>{const F={};if(F.height=E.value,o.width)o.width!=="auto"&&(F.width=he(o.width));else{const Y=s?On(r,!0):null;if(u.value&&Y){if(u.value.type==="grid"){const X=Rn(Y,u.value,o.span,o.offset);Object.assign(F,X)}else if(u.value.type==="flow"){const X=Fn(Y,u.value,o.span,o.offset,o.width);Object.assign(F,X)}}}return F}),b=t.computed(()=>{const F=i.layout.value.type;return F==="grid"||F==="flow"?{[`${v}--${F}`]:!0,[`${v}--${F}-justify-${o.justify}`]:!0,[`${v}--${F}-align-${o.align}`]:!0,[`${v}--gutter`]:!0}:{[`${v}--${F}`]:!0,[`${v}--gutter`]:!0}}),f=t.computed(()=>{if(i.layout.value.type==="grid"){let Y="";if(o.columnWidth)Y=`repeat(auto-fill, ${o.columnWidth})`;else{const X=ec(B.value,i.layout.value.column,i.layout.value.gutter);Y=`repeat(${i.layout.value.column}, ${X})`}return{"column-gap":`${i.layout.value.gutter}px`,"grid-template-columns":Y}}}),m=t.toRef(o,"gutter"),h=t.toRef(o,"column"),S=t.computed(()=>s||p.value?!0:ye(o.isWrap)),N=[],C=F=>{N.push(F)},w=()=>{let F=N.length;N.splice(0,F)},B=t.ref(-1),A=F=>{const Y=qn(F).width;Y>0&&Y!==B.value&&(B.value=Y)};co(r,B.value,h.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type),o.autoLayout&&t.watch([B,h,m],([F,Y,X])=>{i.order.index=0,co(r,F,Y,X,!1,o.minItemWidth,o.maxItemWidth,o.type)});const T=t.computed(()=>M.value?o.expandText??"":o.collapseText??""),$=t.computed(()=>({[`${e}__header-collapse-text`]:!0})),q=t.computed(()=>({[`${e}__header-collapse-icon`]:!0,"is-expand":!M.value,"is-collapse":M.value})),R=t.ref(),V=t.ref(),E=t.computed(()=>x.value||he(o.height)||""),M=t.ref(!1),x=t.ref(""),j=t.ref(!1);let H=-1;const z=(F,Y=!0)=>{const X=R.value;if(X&&M.value!==F){if(H=H<=0?_i(X):H,j.value=!0,Y)if(X.style["will-change"]="height",X.ontransitionend=function(){X.ontransitionend=null,this.style["will-change"]="auto",F||(x.value="",j.value=!1)},F){let K=0;o.collapseHeight?K=o.collapseHeight:V.value&&V.value.classList.contains(`${e}__header`)&&(K=V.value.offsetHeight),x.value=`${H}px`,t.nextTick(()=>{x.value=`${K}px`})}else x.value=`${H}px`;else if(F){let K=0;o.collapseHeight?K=o.collapseHeight:V.value&&V.value.classList.contains(`${e}__header`)&&(K=V.value.offsetHeight),x.value=`${K}px`}else j.value=!1,x.value=`${H}px`;M.value=F,l.emit("update:collapse",F)}};t.watch(()=>o.collapse,F=>{z(F)});const _=F=>{l.emit("header-click",F)},U=()=>{I()},I=F=>{F=F??!M.value,z(F)};Ie({toggleCollapse:I,doLayout:()=>{N[0]&&(A(N[0]),co(r,B.value,h.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type))}});let D=null,W=!0;const L=F=>{if(o.rules){const Y=t.toRaw(o.rules);k(Y)}if(o.pureDataRules){const Y=t.toRaw(o.pureDataRules);k(Y,!0)}if(_e&&(F&&z(ye(o.collapse),!1),o.autoLayout&&Array.isArray(N)&&N.length>0)){const Y=N[0];A(Y),window.ResizeObserver&&(D=new window.ResizeObserver(()=>{A(Y)}),D.observe(Y))}},O=()=>{D?.disconnect(),D=null},Q=!p.value||c?.acquire();Q&&(d.value=p.value?!0:null),t.onMounted(()=>{if(Q&&(L(W),W=!1),p.value&&c){let F=null,Y=c.initialHeight;c.observe(R.value,X=>{if(X!==d.value)if(X)d.value=!0,M.value||(x.value=""),F=setTimeout(()=>{F=null,d.value!==!1&&(L(W),W=!1)},100);else{if(F!==null&&clearTimeout(F),d.value=!1,!M.value)if(W)x.value=c.initialHeight;else{let K=To(R.value);K<=0?x.value=Y:(x.value=`${K}px`,Y=x.value)}W||O()}})}}),t.onUnmounted(()=>{D?.disconnect(),c&&c.unobserve(R.value)});const G=(F="right")=>{const Y=[];if(T.value){const ee={class:$.value},le=t.h("span",ee,[T.value]);Y.push(le)}const X={class:q.value},K=o.collapseIcon??a,Z=t.h(K,X);return Y.push(Z),Y.length>0?t.h("div",{class:{[`${v}__header-collapse`]:!0,[`is-${F}`]:!0},onClick:U},Y):null},te=(F,Y,X,K)=>{const Z={...b.value};return Y===0&&(Z[`${v}__first`]=!0),X>=K-1&&(Z[`${v}__last`]=!0),t.h("div",{ref:C,key:`${Y}`,class:Z,style:f.value},F)};return()=>{if(p.value&&d.value!==!0){const Z=o.tag||"div";return t.h(Z,{ref:R,prop:o.name,class:{[`${v}`]:!0,"is-collapse":j.value},style:y.value},[])}i.order.index=0;const F=[];let Y=0;if(l.slots.header){const Z={key:`${Y++}`,ref:V,class:{[`${v}__header`]:!0,[`${v}__first`]:!0},onClick:_},ee=t.h("div",Z,[l.slots.header()]);F.push(ee)}else{const Z=[],ee=o.collapsePosition==="left";if(ee&&o.showCollapse){const le=G("left");le&&Z.push(le)}if(o.title||l.slots.title){if(o.showMark){const le={class:{[`${v}__header-mark`]:!0}};o.markColor&&(le.style={background:o.markColor});const re=t.h("div",le);Z.push(re)}if(l.slots.title){const le=t.h("div",{class:{[`${v}__header-title`]:!0}},[l.slots.title()]);Z.push(le)}else if(o.title){const le=t.h("div",{class:{[`${v}__header-title`]:!0}},[o.title]);Z.push(le)}}if(l.slots.toolbar&&Z.push(l.slots.toolbar()),!ee&&o.showCollapse){const le=G("right");le&&Z.push(le)}if(Z.length>0){const le={key:`${Y++}`,ref:V,class:{[`${v}__header`]:!0,[`${v}__first`]:!0},onClick:_},re=t.h("div",le,Z);F.push(re)}}w();const X=l.slots.default?l.slots.default():[],K=i.layout.value.type;if(K==="grid"){const Z=te(X,Y++,0,X.length);F.push(Z)}else if(K==="flow"){const Z=te(X,Y++,0,X.length);F.push(Z)}else for(let Z=0;Z<X.length;Z++){const ee=X[Z],le=te([ee],Y++,Z,X.length);F.push(le)}if(S.value){const Z=o.tag||"div";return t.h(Z,{ref:R,prop:o.name,class:{[`${v}`]:!0,"is-collapse":j.value},style:y.value},[F])}else return F}}}}const{componentName:oc,create:lc,scope:ac}=J("group"),Jo=lc(nc(oc,ac,oe.RectUp));function rc(e){return e===window}const sc=/matrix\((.+)\)/,_o=e=>{const n=t.unref(e);if(!n)return{x:0,y:0};if(rc(n))return{x:0,y:0};let a=0,o=0,l=n;for(;l!==null;)a+=l.offsetLeft,o+=l.offsetTop,l=l.offsetParent;let r=0,i=0,s=0,c=0;for(l=n;l!==document;){i+=l.scrollTop,r+=l.scrollLeft;const{transform:d}=window.getComputedStyle(l);if(d){const p=sc.exec(d);if(p){let g=p[1].split(/\s*,\s*/);g.length==6&&(s+=Number(g[4]),c+=Number(g[5]))}}l=l.parentNode}return a-=r,o-=i,a+=s,o+=c,{x:a,y:o}};class ic{watchedListeners=[];add(n){this.watchedListeners.push(n)}remove(n){const a=this.watchedListeners.indexOf(n);a!==-1&&this.watchedListeners.splice(a,1)}size(){return this.watchedListeners.length}listen=()=>{this.watchedListeners.forEach(n=>{try{n()}catch{}})}}class cc{monitorRegister=new WeakMap;watch(n,a){let o=n.parentNode;const l=document.body.parentNode;for(;o&&o!==l;){let r=this.monitorRegister.get(o);r||(r=new ic,o.addEventListener("scroll",r.listen),o===document.body&&o.addEventListener("resize",r.listen),this.monitorRegister.set(o,r)),r.add(a),o=o.parentNode}}unwatch(n,a){let o=n.parentNode;const l=document.body.parentNode;for(;o&&o!==l;){let r=this.monitorRegister.get(o);r&&(r.remove(a),r.size()===0&&(this.monitorRegister.delete(o),o.removeEventListener("scroll",r.listen),o===document.body&&o.removeEventListener("resize",r.listen))),o=o.parentNode}}}const Ft=new cc,ps={price:{type:[Number,String],default:0},needSymbol:{type:Boolean,default:!0},symbol:{type:String,default:"¥"},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:uc,create:dc}=J("price"),fc=dc({props:{...ps},setup(e){const n=t.computed(()=>({[uc]:!0})),a=t.computed(()=>e.needSymbol?e.symbol:""),o=t.computed(()=>ve(e.price)==0?"":Nn(e.price,e.decimalLength,!0,me(e.digits),e.separator)),l=t.computed(()=>{let i=o.value;if(i.length==0)return"";let s=i.indexOf(".");return i.substring(0,s)}),r=t.computed(()=>{let i=o.value;if(i.length==0)return"";let s=i.indexOf(".");return i.substring(s+1)});return{classes:n,showSymbol:a,intText:l,decimalText:r}}}),mc=["innerHTML"],pc=["innerHTML"];function hc(e,n,a,o,l,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,mc)):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,pc)):t.createCommentVNode("",!0)],2)}const Ze=ne(fc,[["render",hc]]),{componentName:uo,create:gc}=J("hint-text"),yc=gc({components:{Price:Ze},props:{...ps,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,n){const a=t.ref({top:null,right:null,bottom:null,left:null}),o=t.ref({x:0,y:0}),l=t.ref(0),r=t.ref(0),i=t.ref(e.placement),s=t.ref(!1),c=t.ref(null),d=($,q,R,V,E,M)=>{const x=document.documentElement.clientWidth||document.body.clientWidth,j=document.documentElement.clientHeight||document.body.clientHeight,H=$.split("-");let z=[];H[0]==="top"?z=["top","bottom","right","left"]:H[0]==="bottom"?z=["bottom","top","right","left"]:H[0]==="left"?z=["left","top","bottom","right"]:H[0]==="right"&&(z=["right","top","bottom","left"]);const _={top:null,right:null,bottom:null,left:null},U=[];for(let I=0;I<z.length;I++){const P=z[I];if(U[0]=P,H[1]&&(U[1]=H[1]),P==="top"){const D=q.y-M-e.arrowSize-e.offset;if(D>=0){_.top=D;let W=0;H[1]==="start"?W=q.x:H[1]==="end"?W=q.x+R-E:W=q.x+R/2-E/2;const L=x-W-E;L<0?(W+=L,u.value=-L):u.value=0,_.left=W<0?0:W;break}}else if(P==="bottom"){const D=q.y+V+e.arrowSize+e.offset;if(D+M<=j){_.top=D;let W=0;H[1]==="start"?W=q.x:H[1]==="end"?W=q.x+R-E:W=q.x+R/2-E/2;const L=x-W-E;L<0?(W+=L,u.value=-L):u.value=0,_.left=W<0?0:W;break}}else if(P==="left"){const D=q.x-E-e.arrowSize-e.offset;if(D>=0){_.left=D;let W=0;H[1]==="start"?W=q.y:H[1]==="end"?W=q.y+V-M:W=q.y+V/2-M/2,_.top=W<0?0:W;break}}else if(P==="right"){const D=q.x+R+e.arrowSize+e.offset;if(D+E<=x){_.left=D;let W=0;H[1]==="start"?W=q.y:H[1]==="end"?W=q.y+V-M:W=q.y+V/2-M/2,_.top=W<0?0:W;break}}}return{bestPlacement:U.join("-"),bestInsetRect:_}},p=($,q,R=10)=>{if(!_e||q===!1||!$)return;o.value=_o(e.reference),l.value=e.reference.offsetWidth,r.value=e.reference.offsetHeight;const V=c.value.offsetHeight,E=c.value.offsetWidth,{bestPlacement:M,bestInsetRect:x}=d(e.placement,o.value,l.value,r.value,E,V);i.value=M,a.value=x,s.value=!0},u=t.ref(0),g=Qe(()=>{p(e.message,e.visible)},10),k=t.ref(e.visible);t.watch(()=>e.visible,$=>{k.value=$});const v=t.computed(()=>k.value&&y.value),y=t.ref(!0),b=Qe($=>{const q=$[0];q&&(y.value=q.isIntersecting)},10),f=new IntersectionObserver(b);t.watch([()=>e.message,()=>e.visible],([$,q])=>{setTimeout(()=>{p(e.message,e.visible)},0)}),t.onMounted(()=>{setTimeout(()=>{p(e.message,e.visible)},0),Ft.watch(e.reference,g),f.observe(e.reference)}),t.onBeforeUnmount(()=>{Ft.unwatch(e.reference,g),f.unobserve(e.reference),f.disconnect()});const m=t.computed(()=>{const $={[uo]:!0};return i.value.startsWith("top")?$["is-top"]=!0:i.value.startsWith("right")?$["is-right"]=!0:i.value.startsWith("bottom")?$["is-bottom"]=!0:i.value.startsWith("right")&&($["is-right"]=!0),e.size==="small"?$["is-small"]=!0:e.size==="large"&&($["is-large"]=!0),e.customClass&&typeof e.customClass=="string"&&($[`${e.customClass}`]=!0),$}),h=t.computed(()=>{const $={};a.value.top!==null&&($.top=`${a.value.top}px`),a.value.right!==null&&($.right=`${a.value.right}px`),a.value.bottom!==null&&($.bottom=`${a.value.bottom}px`),a.value.left!==null&&($.left=`${a.value.left}px`),e.autoFit&&($["min-width"]=`${l.value}px`);const q=document.documentElement.clientWidth||document.body.clientWidth;return $["max-width"]=`${q}px`,s.value&&($.opacity="1"),e.transition||($.transition="none"),e.zIndex&&($["z-index"]=`${e.zIndex}`),e.customStyle&&typeof e.customStyle=="object"&&Object.assign($,e.customStyle),$}),S=t.computed(()=>{const $=[`${uo}__content`];return e.customTextClass&&$.push(e.customTextClass),$}),N=t.computed(()=>{const $={};return e.customTextStyle&&typeof e.customTextStyle=="object"&&Object.assign($,e.customTextStyle),$}),C=t.computed(()=>({[`${uo}__arrow`]:!0})),w=t.computed(()=>{const $={};return e.showArrow?($.width=`${e.arrowSize}px`,$.height=`${e.arrowSize}px`,i.value==="top"?($.left="50%",$.bottom=`-${e.arrowSize}px`,$.transform=" translate(-50%, 0%)"):i.value==="top-start"?($.left=`${e.arrowOffset+u.value}px`,$.bottom=`-${e.arrowSize}px`):i.value==="top-end"?($.right=`${e.arrowOffset-u.value}px`,$.bottom=`-${e.arrowSize}px`):i.value==="right"?($.left=`-${e.arrowSize}px`,$.top="50%",$.transform=" translate(0%, -50%)"):i.value==="right-start"?($.left=`-${e.arrowSize}px`,$.top=`${e.arrowOffset}px`):i.value==="right-end"?($.left=`-${e.arrowSize}px`,$.bottom=`-${e.arrowOffset}px`):i.value==="bottom"?($.left="50%",$.top=`-${e.arrowSize}px`,$.transform=" translate(-50%, 0%)"):i.value==="bottom-start"?($.left=`${e.arrowOffset+u.value}px`,$.top=`-${e.arrowSize}px`):i.value==="bottom-end"?($.right=`${e.arrowOffset-u.value}px`,$.top=`-${e.arrowSize}px`):i.value==="left"?($.right=`-${e.arrowSize}px`,$.top="50%",$.transform=" translate(0%, -50%)"):i.value==="left-start"?($.right=`-${e.arrowSize}px`,$.top=`${e.arrowOffset}px`):i.value==="left-end"&&($.right=`-${e.arrowSize}px`,$.bottom=`-${e.arrowOffset}px`),$):{display:"none"}}),B=t.computed(()=>v.value&&e.closeOnClick),A=t.computed(()=>{const $={};return e.zIndex&&($["z-index"]=`${e.zIndex}`),$});return{show:v,tipRef:c,classes:m,styles:h,textClasses:S,textStyles:N,arrowClasses:C,arrowStyles:w,overlayShow:B,overlayStyle:A,onClickOverlay:()=>{k.value=!1,n.emit("update:visible",!1)}}}}),vc=["innerHTML"];function bc(e,n,a,o,l,r){const i=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:n[0]||(n[0]=(...s)=>e.onClickOverlay&&e.onClickOverlay(...s))},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(i,{key:0,price:e.message,position:"before",size:e.size},null,8,["price","size"])):(t.openBlock(),t.createElementBlock("span",{key:1,innerHTML:e.message},null,8,vc))],6),t.createElementVNode("div",{class:t.normalizeClass(e.arrowClasses),style:t.normalizeStyle(e.arrowStyles)},null,6)],6),[[t.vShow,e.show]])],64)}const hs=ne(yc,[["render",bc]]);class Kn{seed=new Date().getTime();constructor(n){this.seed=n??new Date().getTime()}get(){let n=this.seed++;return this.seed<0&&(this.seed=0),n}}const $o={},kc=new Kn,vt=new Map,Cn=e=>{if(e){const n=document.getElementById(e);vt.delete(e),n&&n.parentNode?.removeChild(n)}else{for(const n of vt.keys()){const a=document.getElementById(n);a&&a.parentNode?.removeChild(a)}vt.clear()}},Sc=e=>{e.unmount=Cn;const n=document.getElementById(e.id);if(n){const a=vt.get(e.id);a?e={...$o,...a,...e}:e={...$o,...e},e.transition=!1;const o=t.createVNode(hs,e);return t.render(o,n),e.id}},Cc=e=>{e.unmount=Cn;let n=e.id??`hinttext_${kc.get()}`;e={...$o,...e},e.id=n,vt.set(n,e);const a=document.createElement("div");a.id=e.id;const o=t.createVNode(hs,e);return t.render(o,a),document.body.appendChild(a),n},wc=e=>{if(!e){console.warn("[FoxUI HintText]: msg不能为空");return}},Tt={show(e,n,a={},o=!0){wc(n);const l=a.id;return l&&vt.has(l)?Sc({...a,message:n,reference:e}):(o&&Cn(),Cc({...a,message:n,reference:e}))},hide(e){Cn(e)},install(e){e.config.globalProperties.$hintText=Tt}};function Nc(e,n,a,o=!1){return{inheritAttrs:!0,props:{...pe,...ge},emits:["appear","disappear"],setup(l,r){const i=l.prop??r.attrs.name;Ae({componentName:e,validate:!1},i);const s=je(),c=Mn();Ln(!1);const d=t.computed(()=>c&&s?zn(s,!1).value:null),p=e,u=t.ref(null),g=t.computed(()=>{const K={[p]:!0,[`${p}__gutter`]:d.value&&d.value.type!=="flow",[`${p}__stretch`]:l.span==="stretch",[`${p}__input--border`]:ye(l.hasBorder)};if(K[l.errorMarkClass]=!!M.value,K[l.warnMarkClass]=!!V.value,K[l.infoMarkClass]=!!q.value,typeof u.value=="function"){const Z=u.value(i);K[Z]=!0}else if(typeof u.value=="string"){const Z=u.value;K[Z]=!0}return K}),k=t.ref(null),v=t.computed(()=>{const K={};if(l.width)l.width!=="auto"&&(K.width=he(l.width));else{const Z=c&&s?On(s,!1):null;if(d.value&&Z){if(d.value.type==="grid"){const ee=Rn(Z,d.value,l.span,l.offset);Object.assign(K,ee)}else if(d.value.type==="flow"){const ee=Fn(Z,d.value,l.span,l.offset,l.width);Object.assign(K,ee)}}}if(typeof k.value=="function"){const Z=k.value(i);Z&&Object.assign(K,Z)}else if(k.value&&typeof k.value=="object"){const Z=k.value;Object.assign(K,Z)}return K}),y=t.ref(null),b=t.computed({get:()=>y.value??ye(l.isRequired),set:K=>{y.value=K}}),f=()=>typeof l.label=="string"&&l.label.length>0||typeof r.slots.label=="function",m=Ve(t.toRef(l,"labelPosition"),"labelPosition",kn.Near),h=t.computed(()=>m&&m.value==="top"?"top":m&&m.value==="right"?"right":"left"),S=t.computed(()=>({[`${p}__main`]:!0,[`${p}__main--${h.value}`]:!0})),N=t.computed(()=>({label:!0,[`label--${h.value}`]:!0})),C=Ve(t.toRef(l,"labelWidth"),"labelWidth",kn.Near),w=t.computed(()=>C&&C.value?{width:he(C.value)}:{}),B=t.computed(()=>({"label--string":!0,"label--required":b.value})),A=t.computed(()=>({content:!0,[l.contentClass]:!0})),T=t.computed(()=>({...l.contentStyle})),$=t.shallowReactive({errorTip:"",errorIcon:null,warnTip:"",warnIcon:null,infoTip:"",infoIcon:null});Ie({setRequired(K){b.value=K},setErrorTip(K){$.errorTip=K},setErrorIcon(K){$.errorIcon=K},setWarnTip(K){$.warnTip=K},setWarnIcon(K){$.warnIcon=K},setInfoTip(K){$.infoTip=K},setInfoIcon(K){$.infoIcon=K},setCustomClassName(K){u.value=K},setCustomStyle(K){k.value=K}});const q=t.computed(()=>l.infoTip||$.infoTip),R=t.computed(()=>l.infoIcon||$.infoIcon),V=t.computed(()=>l.warnTip||$.warnTip),E=t.computed(()=>l.warnIcon||$.warnIcon),M=t.computed(()=>l.errorTip||$.errorTip),x=t.computed(()=>l.errorIcon||$.errorIcon),j=t.computed(()=>M.value?"error":V.value?"warn":q.value?"info":""),H=()=>j.value.length>0,z=t.computed(()=>j.value==="error"?M.value:j.value==="warn"?V.value:j.value==="info"?q.value:""),_=t.computed(()=>j.value==="error"?x.value:j.value==="warn"?E.value:j.value==="info"?R.value:null),U=t.computed(()=>{const K={[`${p}__tip`]:!0,[`${p}__tip--${j.value}`]:!0,[`${p}--animate`]:!0};return j.value==="error"&&l.errorClass?K[`${l.errorClass}`]=!0:j.value==="warn"&&l.warnClass?K[`${l.warnClass}`]=!0:j.value==="info"&&l.infoClass&&(K[`${l.infoClass}`]=!0),K}),I=t.computed(()=>{const K={};return m&&m.value==="top"||!f()?K["padding-left"]="0px":C&&C.value&&(K["padding-left"]=he(C.value)),K}),P=t.ref();let D="";t.watch([()=>l.hintVisible,()=>l.hintText,()=>l.hintType,()=>l.hintProps],([K,Z,ee,le])=>{P.value&&(K&&!ue(Z)?D?a.show(P.value,Z,{...le,id:D,type:ee},!0):D=a.show(P.value,Z,{...le,type:ee},!0):a.hide(D))});let W=null;const L=()=>{W||!P.value||(W=new IntersectionObserver(K=>{let Z=!1;for(let ee of K)if(ee.intersectionRatio>0){Z=!0,Z&&r.emit("appear",ee);break}Z||r.emit("disappear")}),W.observe(P.value))},O=()=>{!W||!P.value||(W.unobserve(P.value),W=null)};t.watch(()=>ye(l.appearListen),K=>{K?L():O()}),t.onMounted(()=>{ye(l.appearListen)&&L()}),t.onUnmounted(O);const Q=()=>{if(!f())return null;const K=[],Z=r.slots?.label?.()??l.label,ee={class:B.value},le=t.h("div",ee,[Z]);if(K.push(le),r.slots.fixedPreTip){const ce=r.slots.fixedPreTip();K.push(ce)}const re={class:N.value,style:w.value};return t.h("div",re,K)},G=()=>{const K=[];if(r.slots.prepend){const ee=r.slots.prepend();K.push(ee)}if(r.slots.default){const ee=r.slots.default();K.push(ee)}if(r.slots.append){const ee=r.slots.append();K.push(ee)}if(r.slots.fixedTip){const ee={class:[`${p}__fixed-tip`]},le=t.h("div",ee,[r.slots.fixedTip()]);K.push(le)}const Z={ref:P,class:A.value,style:T.value};return t.h("div",Z,K)},te=()=>{const K=_.value;return K?typeof K=="function"?t.h("div",{class:"fox-item__tip--icon"},[K()]):t.h("div",{class:"fox-item__tip--icon"},[t.h(K)]):null},F=()=>{const K=z.value;return K?typeof K=="function"?t.h("div",{class:"fox-item__tip--text"},[K()]):t.h("div",{class:"fox-item__tip--text"},[K]):null},Y=()=>{if(!H())return null;const K=[],Z=te();Z&&K.push(Z);const ee=F();ee&&K.push(ee);const le={class:U.value,style:I.value};return t.h("div",le,K)},X=()=>r.slots?.hide?.()??null;return()=>{const K=[],Z=[],ee=Q();ee&&Z.push(ee);const le=G();le&&Z.push(le);const re={class:S.value},ce=t.h("div",re,Z);K.push(ce);const Ne=Y();Ne&&K.push(Ne);const Ce=X();Ce&&K.push(Ce);const en={class:g.value,style:v.value,prop:l.prop};return t.h("div",en,K)}}}}const{componentName:Bc,create:Ac,scope:Vc}=J("item"),we=Ac(Nc(Bc,Vc,Tt,!1));function Tc(e,n){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(a,o){const l=e,r=t.computed(()=>({[l]:!0,[`${l}__stretch`]:a.span==="stretch",[`${l}__${a.align}`]:!0})),i=je(),s=Mn();Ln(!1);const c=t.computed(()=>{const d={};if(a.width)a.width!=="auto"&&(d.width=he(a.width));else if(s&&i){const p=zn(i,!1),u=On(i,!1);if(p.value&&u){if(p.value.type==="grid"){const g=Rn(u,p.value,a.span,a.offset);Object.assign(d,g)}else if(p.value.type==="flow"){const g=Fn(u,p.value,a.span,a.offset,a.width);Object.assign(d,g)}}}return d});return()=>{const d=[];if(o.slots.default){const u=o.slots.default();if(a.divide)for(let g=0;g<u.length;g++){if(g>0){const k=t.h("div",{class:{[`${l}__divide`]:!0}});d.push(k)}d.push(u[g])}else Reflect.apply([].push,d,u)}const p={class:r.value,style:c.value};return t.h("div",p,d)}}}}const{componentName:$c,create:Ec,scope:hA}=J("row-item"),el=Ec(Tc($c));function xc(e,n){return{props:{span:{type:[Number,String],required:!1,default:1},offset:{type:[Number,String],default:0},width:{type:[String,Number],required:!1}},setup(a,o){const l=je(),r=Mn();Ln(!1);const i=t.computed(()=>r&&l?zn(l,!1).value:null),s=e,c=t.computed(()=>({[s]:!0,[`${s}__gutter`]:i.value&&i.value.type!=="flow",[`${s}__stretch`]:a.span==="stretch"})),d=t.computed(()=>{const p={};if(a.width)a.width!=="auto"&&(p.width=he(a.width));else{const u=r&&l?On(l,!1):null;if(i.value&&u){if(i.value.type==="grid"){const g=Rn(u,i.value,a.span,a.offset);Object.assign(p,g)}else if(i.value.type==="flow"){const g=Fn(u,i.value,a.span,a.offset,a.width);Object.assign(p,g)}}}return p});return()=>{const p={class:c.value,style:d.value};return o.slots&&typeof o.slots.default=="function"?t.h("div",p,o.slots.default()):t.h("div",p)}}}}const{componentName:Dc,create:Ic,scope:gA}=J("slot-item"),tl=Ic(xc(Dc)),Ya={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 qc(e,n,a,o){return{props:{...pe,...ge,...Ya},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const i=$e(t.computed(()=>l.disabled)),s=Te(t.computed(()=>l.readonly)),{emitEvent:c}=Ae({componentName:e,get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),{toLocaleRefs:d}=se.useFoxI18n(n),p=d(l,["placeholder"]),u=t.ref(!1),g=qe(l,"modelValue",null,c),k=e,v=t.computed(()=>({[k]:!0,"is-disabled":i.value,"is-readonly":s.value})),y=Ve(t.computed(()=>l.textAlign),"textAlign"),b=t.computed(()=>{const E={};return y.value&&(E["text-align"]=y.value),E}),f=E=>{let x=E.target.value;l.type==="digit"&&(x=No(x,!0)),l.type==="number"&&(x=No(x,!1)),l.maxLength&&x.length>Number(l.maxLength)&&(x=x.slice(0,Number(l.maxLength))),g.value=x,c("update:modelValue",x,E),c("change",x,E)};let m=qe(l,"hintText"),h=t.ref(!1);const S=E=>{let x=E.target.value;u.value=!0,ue(m.value)||(h.value=!0),c("focus",x,E)},N=E=>{setTimeout(()=>{h.value&&(h.value=!1),u.value=!1},0);let x=E.target.value;l.maxLength&&x.length>Number(l.maxLength)&&(x=x.slice(0,Number(l.maxLength))),c("blur",x,E)},C=t.computed(()=>({[`${k}__append`]:!0,"is-disabled":i.value,"is-readonly":s.value})),w=t.computed(()=>{const E={};return r.slots.append&&!B.value&&!R.value&&(E.display="none"),E}),B=t.computed(()=>ve(l.unit)>0),A=t.computed(()=>!R.value),T=t.computed(()=>({[`${k}__unit`]:!0,hidden:!A.value})),$=E=>{g.value="",c("update:modelValue","",E),c("change","",E),c("clear","")},q=t.computed(()=>ye(l.clearable)&&!i.value&&!s.value),R=t.computed(()=>{let E=ve(g.value)>0;return ye(l.clearable)&&E&&u.value}),V=t.computed(()=>({action:!0,hidden:!R.value}));return()=>{const E={class:v.value,style:b.value,type:l.type,maxlength:l.maxLength,placeholder:p.placeholder.value,disabled:i.value,readonly:s.value,value:g.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:f,onFocus:S,onBlur:N},M=[],x=t.h("input",E);M.push(x);const j=[];if(q.value){const D={class:["action-icon"]},W=t.h(o,D),L={class:V.value,onClick:$},O=t.h("view",L,{default:()=>[W]});j.push(O)}if(B.value){const D=t.h("view",{class:T.value},[l.unit]);j.push(D)}const H={class:C.value,style:w.value},z=t.h("view",H,{default:()=>j});M.push(z);const _={default:()=>M};_.label=r.slots.default,_.prepend=r.slots.prepend,_.append=r.slots.append,_.fixedPreTip=r.slots.fixedPreTip,_.fixedTip=r.slots.fixedTip;const I={...dt(l,Ya),hintText:m.value,hintVisible:h.value};return l.prop&&(I.prop=`${l.prop}_item`),t.h(a,I,_)}}}}const{componentName:Pc,create:Mc,scope:Lc}=J("input-item"),nl=Mc(qc(Pc,Lc,we,oe.CircleClose));function Xa(e,n=0){let a=`${e}`,o=a.indexOf(".");if(o==-1)return a;let l=o;for(let r=a.length-1;r>=o;r--)if(a.charAt(r)!="0"){l=r;break}return l-o<n?l=o+n+1:l!=o&&(l+=1),l>a.length?a=a.padEnd(l,"0"):a=a.substring(0,l),a}function Qa(e,n,a=20){if(typeof n=="string"&&(n=me(n)),n==1||n==-1)return`${e}`;if(n==0)return"0";if(n>0){let o=qr(`${e}`,`${n}`);return Xa(o)}else{let o=Uo(`${e}`,Pr(`${n}`),20);return Xa(o)}}function zc(e,n=-1,a=!1,o=3,l=","){return Nn(e,n,a,o,l)}function Ga(e,n,a,o,l=!0){if(e==="")return"";if(e=Mr(e),n=me(n),n==1)return e;if(o)e=Qa(e,n),a&&(e=="0"&&l?e=`${e}.`.padEnd(me(a)+2,"0"):e=Uo(e,1,me(a)));else{let r=-1*n;e=Qa(e,r)}return e}function Za(e,n){let a={maxValid:!0,minValid:!0,message:""};if(n.min!==void 0){let o=ye(n.minInclude),l=So(e,n.min);if(o&&l==-1||!o&&(l==0||l==-1)){let r="请输入不小于 {0} 的数值";a.message=r.replace("{0}",n.min),a.minValid=!1}}if(n.max!=null){let o=ye(n.maxInclude),l=So(e,n.max);(o&&l==1||!o&&(l==0||l==1))&&(a.maxValid=!1)}return a}const Ja={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},textAlign:{type:String,required:!1},adjustPosition:{type:Boolean,default:!0},alwaysSystem:{type:Boolean,default:!1}};function Oc(e,n,a,o){return{props:{...pe,...ge,...Ja},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const i=$e(t.computed(()=>l.disabled)),s=Te(t.computed(()=>l.readonly)),{emitEvent:c}=Ae({componentName:e,get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),d=t.ref(!1),p=qe(l,"modelValue",null,c),u=t.ref("");t.watch([()=>p.value,()=>l.rates,()=>l.precision],([H,z,_])=>{if(ue(H)){u.value="";return}const U=Ga(H,z,_,!1);u.value!==U&&(u.value=U)},{immediate:!0});const g=t.computed(()=>{let H="";return d.value&&(H=u.value),H}),{t:k}=se.useFoxI18n(n),v=t.computed(()=>{let H=l.placeholder??"";return!d.value&&!ue(u.value)?H=zc(u.value,l.decimalLength,l.autoPadding,l.digits,l.separator):H=ue(H)?k(["placeholder"]):H,H}),y=e,b=t.computed(()=>({[y]:!0,[`${y}__placeholder`]:u.value.length>0,"is-disabled":i.value,"is-readonly":s.value})),f=Ve(t.computed(()=>l.textAlign),"textAlign"),m=t.computed(()=>{const H={};return f.value&&(H["text-align"]=f.value),H}),h=t.ref(""),S=t.computed(()=>{let H=h.value;return ue(H)&&(H=l.errorTip??""),H}),N=t.ref(""),C=t.ref(!1),w=H=>{let _=H.target.value;if(ue(_)){u.value="",p.value="",c("update:modelValue","",H),c("change","",H),ye(l.showTip)&&C.value&&(C.value=!1);return}if(_.length>=2){let U=_;if(U.charAt(0)=="-"&&(U=U.substring(1)),U.length>=2&&U.charAt(0)=="0"&&U.charAt(1)!="."){t.triggerRef(u);return}}if(_!="-"){if(!jr(_)){t.triggerRef(u);return}if(l.integerLength!=-1&&Wr(_)>Number(l.integerLength)){t.triggerRef(u);return}if(l.decimalLength&&l.decimalLength!=-1&&Yr(_)>Number(l.decimalLength)){t.triggerRef(u);return}let U=Za(_,l);if(U.maxValid===!1){h.value=U.message,t.triggerRef(u);return}}else if(l.min!=null&&me(l.min)>=0){t.triggerRef(u);return}N.value=_,ye(l.showTip)&&(C.value=_.length>0),u.value=_,p.value=Ga(_,l.rates,l.precision,!0),c("update:modelValue",p.value,H),c("change",p.value,H)},B=H=>{if(d.value=!0,ye(l.showTip)){let z=u.value;ue(z)&&(z=l.hintText),ue(z)||(N.value=z,C.value=!0)}h.value="",c("focus",p.value,H)},A=H=>{if(setTimeout(()=>{d.value=!1,ye(l.showTip)&&C.value===!0&&(C.value=!1)},0),!ue(u.value)){let z=Za(u.value,l);if(z.minValid===!1||z.maxValid===!1){h.value=z.message;return}}c("update:modelValue",p.value,H),c("blur",p.value,H)},T=t.computed(()=>({[`${y}__append`]:!0,"is-disabled":i.value,"is-readonly":s.value})),$=t.computed(()=>{const H={};return r.slots.append&&!q.value&&!x.value&&(H.display="none"),H}),q=t.computed(()=>ve(l.unit)>0),R=t.computed(()=>!x.value),V=t.computed(()=>({[`${y}__unit`]:!0,hidden:!R.value})),E=H=>{p.value="",c("update:modelValue","",H),c("change","",H),c("clear","")},M=t.computed(()=>ye(l.clearable)&&!i.value&&!s.value),x=t.computed(()=>{let H=ve(p.value)>0;return ye(l.clearable)&&H&&d.value}),j=t.computed(()=>({action:!0,hidden:!x.value}));return()=>{let H={class:b.value,style:m.value,type:"digit",maxlength:l.maxLength,placeholder:v.value,disabled:i.value,readonly:s.value,value:g.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:w,onFocus:B,onBlur:A},z=[],_=t.h("input",H);z.push(_);let U=[];if(M.value){const O={class:["action-icon"]},Q=t.h(o,O),G={class:j.value,onClick:E},te=t.h("view",G,{default:()=>[Q]});U.push(te)}if(q.value){const O=t.h("view",{class:V.value},[l.unit]);U.push(O)}const I={class:T.value,style:$.value},P=t.h("view",I,{default:()=>U});z.push(P);const D={default:()=>z};D.label=r.slots.default,D.prepend=r.slots.prepend,D.append=r.slots.append,D.fixedPreTip=r.slots.fixedPreTip,D.fixedTip=r.slots.fixedTip;const L={...dt(l,Ja),errorTip:S.value,hintText:N.value,hintVisible:C.value,hintType:"number"};return l.prop&&(L.prop=`${l.prop}_item`),t.h(a,L,D)}}}}const{componentName:Fc,create:Rc,scope:Kc}=J("money-item"),ol=Rc(Oc(Fc,Kc,we,oe.CircleClose)),Eo={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:Uc,create:Hc,scope:jc}=J("textarea"),Wc=Hc({props:{...Eo},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:n}){let{toLocaleRefs:a}=se.useFoxI18n(jc);const o=a(e,["placeholder"]),l=t.ref(),r=t.computed(()=>{const g=Uc;return{[g]:!0,[`${g}--disabled`]:e.disabled}});t.onMounted(()=>{e.modelValue&&c(String(e.modelValue)),e.autosize&&t.nextTick(s)});const i=t.computed(()=>({textAlign:e.textAlign})),s=()=>{let g=l.value;g.style.height="auto";let k=g.scrollHeight;if(typeof e.autosize=="object"){const{maxHeight:v,minHeight:y}=e.autosize;v!==void 0&&(k=Math.min(k,v)),y!==void 0&&(k=Math.max(k,y))}k&&(console.info("----------- height",k),g.style.height=k+"px")};t.watch(()=>e.modelValue,()=>{e.autosize&&t.nextTick(s)});const c=(g,k)=>{e.maxLength&&g.length>Number(e.maxLength)&&(g=g.substring(0,Number(e.maxLength))),n("update:modelValue",g,k),n("change",g,k)};return{...o,textareaRef:l,classes:r,styles:i,change:g=>{const k=g.target;c(k.value,g)},focus:g=>{e.disabled||e.readonly||n("focus",g)},blur:g=>{if(e.disabled||e.readonly)return;let v=g.target.value;c(v,g),n("blur",{value:v,event:g})}}}}),Yc=["rows","disabled","readonly","value","maxlength","placeholder","autofocus"],Xc={key:0,class:"fox-textarea__limit"};function Qc(e,n,a,o,l,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:n[0]||(n[0]=(...i)=>e.change&&e.change(...i)),onBlur:n[1]||(n[1]=(...i)=>e.blur&&e.blur(...i)),onFocus:n[2]||(n[2]=(...i)=>e.focus&&e.focus(...i)),maxlength:e.maxLength,placeholder:e.placeholder,autofocus:e.autofocus},null,44,Yc),e.limitShow?(t.openBlock(),t.createElementBlock("view",Xc,t.toDisplayString(e.modelValue?e.modelValue.length:0)+"/"+t.toDisplayString(e.maxLength),1)):t.createCommentVNode("",!0)],2)}const Un=ne(Wc,[["render",Qc]]);function Gc(e,n,a,o){return{props:{...pe,...ge,...Eo},emits:["update:modelValue","change","blur","focus","setValue"],setup(l,r){const i=$e(t.computed(()=>l.disabled)),s=Te(t.computed(()=>l.readonly)),{emitEvent:c}=Ae({componentName:e,get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),d=qe(l,"modelValue",null,c),p=y=>{d.value=y,c("update:modelValue",y,{}),c("change",y,{})};let u=qe(l,"hintText"),g=t.ref(!1);const k=y=>{ue(u.value)||(g.value=!0),c("focus",d.value,y)},v=y=>{setTimeout(()=>{g.value&&(g.value=!1)},0),c("blur",d.value,y)};return()=>{const b={...be(l,Eo),disabled:i.value,readonly:s.value,value:d.value,"onUpdate:modelValue":p,onFocus:k,onBlur:v},f=[],m=t.h(o,b);f.push(m);const h={default:()=>f};h.label=r.slots.default,h.prepend=r.slots.prepend,h.append=r.slots.append,h.fixedPreTip=r.slots.fixedPreTip,h.fixedTip=r.slots.fixedTip;const N={...be(l,ge,pe)};return l.prop&&(N.prop=`${l.prop}_item`),t.h(a,N,h)}}}}const{componentName:Zc,create:Jc,scope:_c}=J("textarea-item"),ll=Jc(Gc(Zc,_c,we,Un));function eu(e){return e===window}const De=e=>{const n=t.unref(e);if(eu(n)){const a=n.innerWidth,o=n.innerHeight;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}return n&&n.getBoundingClientRect?n.getBoundingClientRect():{top:0,left:0,right:0,bottom:0,width:0,height:0}},_a=10;function gs(e,n){return e>n&&e>_a?"horizontal":n>e&&n>_a?"vertical":""}function al(){const e=window.navigator.userAgent;return"ontouchstart"in window||e.indexOf("touch")!==-1||e.indexOf("mobile")!==-1}function rl(){const e={startX:0,startY:0,startTime:0,duration:0,moveX:0,moveY:0,deltaX:0,deltaY:0,offsetX:0,offsetY:0,direction:""},n=()=>e.direction==="vertical",a=()=>e.direction==="horizontal",o=()=>{e.deltaX=0,e.deltaY=0,e.offsetX=0,e.offsetY=0,e.direction="",e.startTime=0};return{move:i=>{if(i.touches){const d=i.touches[0];e.deltaX=d.clientX-e.startX,e.deltaY=d.clientY-e.startY,e.moveX=d.clientX,e.moveY=d.clientY}else{const c=i;e.deltaX=c.clientX-e.startX,e.deltaY=c.clientY-e.startY,e.moveX=c.clientX,e.moveY=c.clientY}e.offsetX=Math.abs(e.deltaX),e.offsetY=Math.abs(e.deltaY),e.duration=Date.now()-e.startTime,e.direction||(e.direction=gs(e.offsetX,e.offsetY))},start:i=>{if(o(),i.touches){const d=i.touches[0];e.startX=d.clientX,e.startY=d.clientY}else{const c=i;e.startX=c.clientX,e.startY=c.clientY}e.startTime=Date.now()},reset:o,isVertical:n,isHorizontal:a,state:e}}function tt(){const e=t.ref(0),n=t.ref(0),a=t.ref(0),o=t.ref(0),l=t.ref(0),r=t.ref(0),i=t.ref(0),s=t.ref(0),c=t.ref(0),d=t.ref(0),p=t.ref(""),u=()=>p.value==="vertical",g=()=>p.value==="horizontal",k=()=>{i.value=0,s.value=0,c.value=0,d.value=0,p.value="",a.value=0};return{move:b=>{if(b.touches){const h=b.touches[0];i.value=h.clientX-e.value,s.value=h.clientY-n.value,l.value=h.clientX,r.value=h.clientY}else{const m=b;i.value=m.clientX-e.value,s.value=m.clientY-n.value,l.value=m.clientX,r.value=m.clientY}c.value=Math.abs(i.value),d.value=Math.abs(s.value),o.value=Date.now()-a.value,p.value||(p.value=gs(c.value,d.value))},start:b=>{if(k(),b.touches){const h=b.touches[0];e.value=h.clientX,n.value=h.clientY}else{const m=b;e.value=m.clientX,n.value=m.clientY}a.value=Date.now()},reset:k,startX:e,startY:n,startTime:a,duration:o,moveX:l,moveY:r,deltaX:i,deltaY:s,offsetX:c,offsetY:d,direction:p,isVertical:u,isHorizontal:g}}let tu=2e3;const er=()=>tu++,Fe={visible:{type:Boolean,default:!1},zIndex:{type:[String,Number]},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,Array],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:{}}},nu=(e,n)=>({components:n,props:{...Fe},emits:["click-pop","click-close-icon","open","close","opend","closed","click-overlay","update:visible"],setup(a,{emit:o}){const l=t.reactive({zIndex:0,showSlot:!0,closed:a.closeable});a.visible&&(l.zIndex=er());const r=t.computed(()=>{const y=e,b=[y,`${y}--${a.position}`];return a.round&&b.push("round"),a.position==="bottom"&&a.safeAreaInsetBottom&&b.push(`${y}--${a.position}--safebottom`),typeof a.popClass=="string"?b.push(a.popClass):Array.isArray(a.popClass)&&a.popClass.forEach(f=>{b.push(f)}),b}),i=t.computed(()=>({zIndex:l.zIndex,transitionDuration:`${a.duration}s`,...a.style})),s=t.computed(()=>a.transition?a.transition:`fox-popup-slide-${a.position}`),c=()=>{o("update:visible",!0),a.zIndex?l.zIndex=a.zIndex:l.zIndex=er(),a.destroyOnClose&&(l.showSlot=!0),o("open")},d=()=>{o("update:visible",!1),o("close"),a.destroyOnClose&&setTimeout(()=>{l.showSlot=!1},+a.duration*1e3)},p=y=>{o("click-pop",y)},u=y=>{y.stopPropagation(),o("click-close-icon",y),o("update:visible",!1)},g=y=>{o("click-overlay",y),a.closeOnClickOverlay&&o("update:visible",!1)},k=y=>{o("opend",y)},v=y=>{o("closed",y)};return t.watch(()=>a.visible,y=>{a.visible?c():d()}),t.watch(()=>a.closeable,y=>{l.closed=y}),{...t.toRefs(l),popStyle:i,transitionName:s,classes:r,onClick:p,onClickCloseIcon:u,onClickOverlay:g,onOpened:k,onClosed:v}}}),ys={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:360}},xo={...Fe,...ys,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},cancelText:{type:String},clearText:{type:String},confirmText:{type:String},isAutoBackFill:{type:[Boolean],default:()=>!0},poppable:{type:[Boolean],default:()=>!0}};let vs=36;function ou(){return vs}function lu(e){vs=e}function ze(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Do(e,n){return typeof e.childrenKey=="string"&&e.childrenKey.length>0?n[e.childrenKey]:n.children??null}function au(e,n,a){typeof e.childrenKey=="string"&&e.childrenKey.length>0&&(n[e.childrenKey]=a),n.children=a}function ct(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function tr(e,n){return typeof e.itemOptions=="function"?e.columnOptions(n):e.columnOptions}let ru=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);const l=et(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(xe(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function su(){const e=t.getCurrentInstance();return new ru(e.proxy)}function nr(e,n,a){const o=ze(e,n),l=ze(e,a);if(o!==l)return!1;const r=ct(e,n),i=ct(e,a);return r===i}function iu(e,n,a,o){if(a.length==0)return[];Array.isArray(n)||(n=[n]);const l=[],r=e.valueType??"value";if(o==="singleColumn"||o==="multipleColumn")for(let i=0;i<n.length&&i<a.length;i++){const s=n[i];let d=a[i].findIndex(p=>{if(r==="text")return ze(e,p)===s;if(r==="value"){let u=ct(e,p);return u==null&&(u=ze(e,p)),u===s}else if(r==="item")return nr(e,p,s)});if(d==-1)break;l.push(d)}else{let i=a[0];for(let s=0;s<n.length;s++){const c=n[s];let d=i.findIndex(u=>{if(r==="text")return ze(e,u)===c;if(r==="value"){let g=ct(e,u);return g==null&&(g=ze(e,u)),g===c}else if(r==="item")return nr(e,u,c)});if(d==-1)break;l.push(d);const p=Do(e,i[d]);if(!Array.isArray(p))break;i=p}}return l}function or(e,n,a,o){if(a.length==0)return null;const l={texts:[],values:[],items:[]},r=e.valueType??"value";if(o==="singleColumn"||o==="multipleColumn")for(let i=0;i<n.length&&i<a.length;i++){const s=a[i];let c=n[i];c<0&&c>=s.length&&(c=0);const d=s[c],p=ze(e,d);if(l.texts.push(p),l.items.push(d),r==="text")l.values.push(p);else if(r==="value"){let u=ct(e,d);u==null&&(u=p),l.values.push(u)}else l.values.push(d)}else{let i=a[0];for(let s=0;s<n.length;s++){let c=n[s];c<0&&c>=i.length&&(c=0);const d=i[c],p=Object.assign({},d);p.children=null;const u=ze(e,d);if(l.texts.push(u),l.items.push(p),r==="text")l.values.push(u);else if(r==="value"){let g=ct(e,d);g==null&&(g=u),l.values.push(g)}else l.values.push(p);if(!Array.isArray(d.children))break;i=d.children}}return l}function lr(e){return{text:e,value:e}}const cu=15,uu=300,du=200,{create:fu}=J("picker-column");function mu(e){e.stopPropagation()}function pu(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),mu(e)}const hu=fu({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},visible:{type:Boolean,default:!1},...ys},emits:["click","change","update:modelValue"],setup(e,{emit:n}){const a=t.computed(()=>({"fox-picker__list":!0})),o=t.computed(()=>({height:`${me(e.visibleItemCount)*+e.itemHeight}px`})),l=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)),i=w=>w>=u.currIndex+8||w<=u.currIndex-8,s=t.computed(()=>({transition:`transform ${u.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`rotate3d(1, 0, 0, ${u.deg})`,top:`${r.value}px`})),c=w=>`transform: rotate3d(1, 0, 0, ${-u.rotation*w}deg) translate3d(0px, 0px, 104px)`,d=t.computed(()=>({transition:`transform ${u.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`translate3d(0, ${u.scrollDistance+r.value}px, 0)`})),p=t.ref(null),u=t.reactive({currIndex:e.modelValue,startDistance:0,scrollDistance:0,scrollTime:0,moving:!1,rotation:20,deg:0,transitionEndTrigger:null}),g=w=>ze(e,w),k=w=>ct(e,w),v=tt(),y=()=>{u.transitionEndTrigger&&(u.transitionEndTrigger(),u.transitionEndTrigger=null)},b=(w,B=!1,A=!1)=>{if(u.currIndex=w,B){const T=()=>{u.moving=!1,n("update:modelValue",w),n("change",w)};A?u.transitionEndTrigger=T:T()}},f=(w,B,A)=>{let T=w+u.startDistance;if(B==="end"){const $=-(e.source.length-1)*e.itemHeight;T<$&&(T=$),T>0&&(T=0);let q=Math.abs(Math.round(-T/e.itemHeight));const R=-q*e.itemHeight,V=`${(q+1)*u.rotation}deg`,E=A?A>0:!1;b(q,!0,E),m(R,B,A,V)}else{let $=(-T/e.itemHeight+1)*u.rotation;const q=(e.source.length+1)*u.rotation,R=0;if($=Math.min(Math.max($,R),q),e.threeDimensional&&($<R||$>q))return;m(T,null,void 0,`${$}deg`)}},m=(w=0,B,A=du,T)=>{B==="end"?u.scrollTime=A:u.scrollTime=0,u.deg=T,u.scrollDistance=w},h=(w,B)=>(w=Math.abs(w/B)/.003*(w<0?-1:1),w),S=w=>{e.readonly||(u.startDistance=u.scrollDistance,v.start(w),u.transitionEndTrigger=null)},N=w=>{e.readonly||(u.moving=!0,v.move(w),v.isVertical()&&(u.moving=!0,pu(w)),f(v.deltaY.value,"",0))},C=()=>{if(e.readonly)return;const w=v.deltaY.value,B=v.duration.value;if(B<uu&&Math.abs(w)>cu){const T=h(w,B);f(T,"end",e.swipeDuration)}else f(w,"end",0)};return t.watch(()=>e.modelValue,w=>{const B=u.currIndex-w;if(B!==0){u.currIndex=w,u.startDistance=u.scrollDistance;const A=B*e.itemHeight;f(A,"",0)}}),t.watch(()=>e.source,w=>{if(u.currIndex>=w.length){const T=(w.length-1-u.currIndex)*e.itemHeight;u.startDistance=u.scrollDistance,f(T,"end",0)}}),t.watch(()=>e.visible,w=>{w===!1&&y()}),t.onMounted(()=>{const w=-e.modelValue*e.itemHeight;f(w)}),{classes:a,styles:o,contentClasses:l,itemText:g,itemValue:k,...t.toRefs(u),roller:p,getItemText:ze,onTouchStart:S,onTouchMove:N,onTouchEnd:C,isHidden:i,setRollerStyle:c,touchRollerStyle:s,touchTileStyle:d,stopMomentum:y}}}),gu={key:1,class:"fox-picker__item-tile"};function yu(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles),onTouchstart:n[0]||(n[0]=(...i)=>e.onTouchStart&&e.onTouchStart(...i)),onTouchmove:n[1]||(n[1]=(...i)=>e.onTouchMove&&e.onTouchMove(...i)),onTouchend:n[2]||(n[2]=(...i)=>e.onTouchEnd&&e.onTouchEnd(...i)),onTouchcancel:n[3]||(n[3]=(...i)=>e.onTouchEnd&&e.onTouchEnd(...i)),onTransitionend:n[4]||(n[4]=(...i)=>e.stopMomentum&&e.stopMomentum(...i))},[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,(i,s)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${e.columnIndex}_${s}`},[e.threeDimensional?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-picker__item",{"fox-picker__item-hidden":e.isHidden(s+1)}]),style:t.normalizeStyle(e.setRollerStyle(s+1))},t.toDisplayString(e.itemText(i)),7)):(t.openBlock(),t.createElementBlock("view",gu,t.toDisplayString(e.itemText(i)),1))],64))),128))],6)],38)}const vu=ne(hu,[["render",yu]]);let Dt=0;const ar="fox-overflow-hidden",rr=()=>_e?document.body:{classList:[]},bu=e=>[()=>{if(e())try{!Dt&&rr().classList.add(ar),Dt++}catch{}},()=>{if(e()&&Dt)try{Dt--,!Dt&&rr().classList.remove(ar)}catch{}}],ku={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:Su,create:Cu}=J("overlay"),wu=Cu({props:{...ku},emits:["click","update:visible"],setup(e,{emit:n}){const[a,o]=bu(()=>e.lockScroll),l=t.computed(()=>({[Su]:!0,[e.overlayClass]:!0})),r=t.computed(()=>({transitionDuration:`${e.duration}s`,zIndex:e.zIndex,...e.overlayStyle}));return t.watch(()=>e.visible,s=>{s?a():o()}),{classes:l,style:r,onClick:s=>{n("click",s),e.closeOnClickOverlay&&n("update:visible",!1)}}}});function Nu(e,n,a,o,l,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:n[0]||(n[0]=t.withModifiers((...i)=>e.onClick&&e.onClick(...i),["stop"])),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6),[[t.vShow,e.visible]])]),_:3})}const ut=ne(wu,[["render",Nu]]),{componentName:Bu,create:Au}=J("popup"),Vu=Au(nu(Bu,{FoxOverLay:ut,Close:oe.Close}));function Tu(e,n,a,o,l,r){const i=t.resolveComponent("FoxOverLay"),s=t.resolveComponent("Close");return t.openBlock(),t.createBlock(t.Teleport,{to:e.teleport,disabled:e.teleportDisable},[e.overlay?(t.openBlock(),t.createBlock(i,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:n[1]||(n[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:n[0]||(n[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(s)])],2)):t.createCommentVNode("",!0)],6),[[t.vShow,e.visible]])]),_:3},8,["name","onAfterEnter","onAfterLeave"])],8,["to","disabled"])}const fe=ne(Vu,[["render",Tu]]),$u=t.defineComponent({props:{position:{type:[String],default:()=>"bottom"},visible:{type:[Boolean]},teleport:{type:[String,Element],default:()=>"body"},lockScroll:{type:[Boolean],default:()=>!0},closeOnClickOverlay:{type:[Boolean],default:()=>!0},round:{type:[Boolean],default:()=>!1},teleportDisable:{type:[Boolean],default:()=>!1},poppable:{type:[Boolean],default:()=>!0}},setup(e,{slots:n}){return()=>{if(e.poppable){const a=dt({...e},{poppable:!1});return t.h(fe,a,n)}else return n?.default?.()??null}}});function Eu(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("div",null,[t.renderSlot(e.$slots,"default")])}const xu=ne($u,[["render",Eu]]),{create:Du,componentName:Iu,scope:qu}=J("picker"),Pu=Du({components:{Column:vu,Wrapper:xu},props:{...xo},emits:["close","change","confirm","update:visible","update:text","update:modelValue","clear"],setup(e,{emit:n}){const{toLocaleRefs:a,t:o}=se.useFoxI18n(qu),l=a(e,["title","cancelText","clearText","confirmText"]),r=t.ref(null),i=t.ref(ou());t.watch(()=>e.visible,V=>{V&&i.value<=0&&setTimeout(()=>{if(r.value){const E=De(r.value);i.value=E.height,lu(i.value)}},50)});const s=t.computed(()=>({[Iu]:!0})),c=su(),d=t.ref("singleColumn");let p=t.ref([]);t.watch([()=>e.source,()=>e.params],async([V,E])=>{if(V){let M=await c.load("picker",V,E);if(M.length>0){let x=M[0];if(Array.isArray(x)){if(typeof x[0]=="string"){let j=M,H=[];j.forEach(z=>{let _=z.map(U=>lr(U));H.push(_)}),p.value=H}else p.value=M;d.value="multipleColumn"}else if(typeof x=="string"){let j=M,H=[],z=j.map(_=>lr(_));H.push(z),p.value=H,d.value="singleColumn"}else{const j=Do(e,x);Array.isArray(j)?(d.value="cascade",p.value=[M]):(d.value="singleColumn",p.value=[M])}}else p.value=[]}},{immediate:!0});const u=t.ref([]),g=t.ref(e.modelValue&&!Array.isArray(e.modelValue)?[e.modelValue]:e.modelValue),k=t.ref([]);let v=null;const y=t.ref([]);t.watch([()=>e.modelValue,()=>p.value],([V,E])=>{let M=iu(e,V,E,d.value);if(!Pe(M,y.value)){y.value=M,v||(v=M?[...M]:[]);let x=or(e,M,E,d.value);x&&(u.value=x.texts,n("update:text",u.value))}});let b="";const f=t.ref(e.visible);t.watch(()=>e.visible,V=>{f.value=V,V&&(b="active",y.value.length>0&&(v=[...y.value]))});const m=V=>{let E=tr(e,V);return xe(E)?E.defaultIndex??0:0},h=V=>{if(e.readonly===!0)return!0;let E=tr(e,V);return xe(E)?E.readonly??!1:!1},S=(V,E)=>{let M=y.value;M[V]=E;for(let j=0;j<V;j++)M[j]==null&&(M[j]=m(j));if(d.value==="cascade")for(let j=V+1;j<C.value.length;j++){let H=m(j);j<M.length?M[j]=H:M.push(H)}else for(let j=M.length;j<C.value.length;j++){let H=m(j);M.push(H)}y.value=M;let x=or(e,M,p.value,d.value);x&&(u.value=x.texts,g.value=x.values,k.value=x.items)},N=V=>V<y.value.length?y.value[V]:m(V),C=t.computed(()=>{if(p.value.length==0)return[];if(d.value=="singleColumn"||d.value=="multipleColumn")return p.value;let V=[],E=0,M=p.value[0],x=0;for(;;){let j=M.map(_=>{let U=Object.assign({},_);return au(e,U,null),U});V.push(j),E>=y.value.length?x=0:x=y.value[E],(x<0||x>=M.length)&&(x=0);let H=M[x];const z=Do(e,H);if(!Array.isArray(z))break;M=z,E++}return V}),w=t.computed(()=>me(+e.visibleItemCount-1)/2*i.value),B=(V=!1)=>{if(e.readonly===!0){V&&n("update:visible",!1);return}let E=p.value.length-1;for(;E>=0&&!(y.value[E]===null||y.value[E]===void 0);E--);if(E>=0&&S(E,0),d.value==="singleColumn"){let M=g.value.length>0?g.value[0]:"",x=k.value.length>0?k.value[0]:null;n("update:modelValue",M),n("update:text",u.value),n("change",M,x),V&&(n("confirm",M),n("update:visible",!1))}else n("update:modelValue",g.value),n("update:text",u.value),n("change",g.value,k.value),V&&(n("confirm",g.value),n("update:visible",!1))},A=(V,E)=>{if(b!=="close"&&(S(V,E),e.isAutoBackFill)){const M=!f.value;B(M)}},T=()=>{b==="active"&&(b="confirm",v=Array.isArray(y.value)?[...y.value]:[],B(!0))},$=()=>{d.value==="singleColumn"?(n("update:modelValue",""),n("update:text",""),n("change","")):(n("update:modelValue",[]),n("update:text",""),n("change",[])),y.value=[],v=null};return{...l,pickerLineRef:r,classes:s,columns:C,dataType:d,show:f,itemHeight:i,top:w,isReadonly:h,getIndex:N,change:A,close:()=>{if(b==="active"){if(b="close",v===null||v.length===0)$();else{if(Array.isArray(v))for(let V=0;V<v.length;V++)S(V,v[V]);B(!1)}n("close"),n("update:visible",!1)}},confirm:T,clear:()=>{if(b==="active"){if(b="clear",e.readonly===!0){n("update:visible",!1);return}$(),v=null,n("clear",""),n("update:visible",!1)}}}}}),Mu={key:0,class:"fox-picker__bar"},Lu={class:"fox-picker__title"},zu={class:"fox-picker__bar__action"},Ou={class:"fox-picker__column"};function Fu(e,n,a,o,l,r){const i=t.resolveComponent("Column"),s=t.resolveComponent("Wrapper");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createVNode(s,{position:"bottom",visible:e.show,"onUpdate:visible":n[3]||(n[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,poppable:e.poppable},{default:t.withCtx(()=>[e.poppable?(t.openBlock(),t.createElementBlock("view",Mu,[t.createElementVNode("view",Lu,t.toDisplayString(e.title),1),t.createElementVNode("view",zu,[t.createElementVNode("view",{class:"fox-picker__left fox-picker__cancel fox-picker__button",onClick:n[0]||(n[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:n[1]||(n[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:n[2]||(n[2]=(...c)=>e.clear&&e.clear(...c))},t.toDisplayString(e.clearText),1)):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"top"),t.createElementVNode("view",Ou,[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(i,{visible:e.show,source:c,readonly:e.isReadonly(d),"column-index":d,modelValue:e.getIndex(d),"onUpdate:modelValue":p=>e.change(d,p),"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,["visible","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","poppable"])],2)}const _t=ne(Pu,[["render",Fu]]);function Ru(e,n,a,o,l,r,i=!0){return{props:{...pe,...ge,...xo,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","setValue"],setup(s,c){const d=$e(t.computed(()=>s.disabled)),p=Te(t.computed(()=>s.readonly)),{emitEvent:u}=Ae({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return d.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=se.useFoxI18n(n),k=g(s,["placeholder"]),v=t.ref(!1),y=qe(s,"modelValue",null,u),b=t.ref([]),f=t.computed(()=>Array.isArray(b.value)?b.value.join(s.separator):b.value),m="fox-input-item",h=t.computed(()=>({[m]:!0,"is-disabled":d.value,"is-readonly":p.value})),S=Ve(t.computed(()=>s.textAlign),"textAlign"),N=t.computed(()=>{const P={};return S.value&&(P["text-align"]=S.value),P}),C=t.ref(!1),w=()=>{C.value=!0},B=P=>{C.value=P},A=P=>{y.value=P,u("update:modelValue",P)},T=(P,D)=>{u("change",P,D)},$=P=>{let W=P.target.value;v.value=!0,u("focus",W,P)},q=P=>{setTimeout(()=>{v.value=!1},0);let W=P.target.value;s.maxLength&&W.length>Number(s.maxLength)&&(W=W.slice(0,Number(s.maxLength))),u("blur",W,P)},R=P=>{b.value=P,Array.isArray(P)&&P.length===0?u("update:text",P[0]):u("update:text",P)},V=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":d.value,"is-readonly":p.value})),E=t.computed(()=>ve(s.unit)>0),M=t.computed(()=>ve(s.unit)>0&&!v.value),x=t.computed(()=>({hidden:!M.value})),j=P=>{y.value="",u("update:modelValue","",P),u("change","",P),u("clear","")},H=t.computed(()=>s.clearable&&!d.value&&!p.value),z=t.computed(()=>ve(y.value)>0&&v.value),_=P=>{z.value?j(P):w()},U=t.computed(()=>z.value&&H.value?o:l),I=t.computed(()=>({action:!0}));return()=>{const P={class:h.value,style:N.value,type:"text",maxlength:s.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:w,onFocus:$,onBlur:q};i&&(P.disabled=!0);const D=[],W=t.h("input",P);D.push(W);const L=[],O={class:["action-icon"]},Q=t.h(U.value,O),G={class:I.value,onClick:_},te=t.h("view",G,{default:()=>[Q]});if(L.push(te),E.value){const re=t.h("view",{class:x.value},[s.unit]);L.push(re)}const F={class:V.value},Y=t.h("view",F,{default:()=>L});D.push(Y);const X={default:()=>D};X.label=c.slots.default,X.prepend=c.slots.prepend,X.append=c.slots.append,X.fixedPreTip=c.slots.fixedPreTip,X.fixedTip=c.slots.fixedTip;const K=be(s,xo);K.disabled=!1,K.readonly=d.value||p.value,K.visible=C.value,K["onUpdate:visible"]=B,K.modelValue=y.value,K["onUpdate:modelValue"]=A,K.text=b.value,K["onUpdate:text"]=R,K.onChange=T;const Z=t.h(r,K);X.hide=()=>[Z];const ee=be(s,ge,pe);return s.prop&&(ee.prop=`${s.prop}_item`),t.h(a,ee,X)}}}}const{componentName:Ku,create:Uu,scope:Hu}=J("picker-item"),sl=Uu(Ru(Ku,Hu,we,oe.CircleClose,oe.ArrowRight,_t,!1)),rn=(e,n,a)=>e.map(o=>{const{value:l="value",text:r="text",children:i="children"}=a??{},{[l]:s,[r]:c,[i]:d,...p}=o,u={loading:!1,...p,level:n?(n&&n.level||0)+1:0,value:s,text:c,children:d,_parent:n};return u.children&&u.children.length&&(u.children=rn(u.children,u,a)),u}),bs=(e,n)=>{let a=0,o;for(;(o=e[a++])&&n(o)!==!0;)o.children&&o.children.length&&bs(o.children,n)},ju={topId:null,idKey:"id",pidKey:"pid",sortKey:""},Wu=(e,n)=>{const a={...ju,...n||{}},{topId:o,idKey:l,pidKey:r,sortKey:i}=a;let s=[],c={};return e.forEach(d=>{d={...d};const{[l]:p,[r]:u}=d,g=c[u]=c[u]||[];!s.length&&u===o&&(s=g),g.push(d),d.children=c[p]||(c[p]=[])}),i&&Object.keys(c).forEach(d=>{c[d].length>1&&c[d].sort((p,u)=>p[i]-u[i])}),c=null,s},Yu={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"},doitKey:{type:String,default:"doit"},numKey:{type:String,default:"num"},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},beforeChange:{type:Function}},sr=(e,n)=>n[e.textKey],It=(e,n)=>n[e.valueKey],Xu=(e,n)=>n[e.visibleKey],ir=(e,n)=>n[e.disabledKey],Qu=(e,n)=>{const a=n[e.doitKey];return ye(a)},Gu=(e,n)=>{const a=n[e.numKey];return a==null?null:me(n[a])},cr=(e,n,a)=>{const o=e.itemOptions;return typeof o=="function"?o(n,a):o||null};function Zu(e,n,a,o=!1){return{props:{...Yu},emits:["update:modelValue","change","click"],setup(l,{slots:r,emit:i}){const s=t.computed(()=>{const U={};return U[`${e}`]=!0,U}),c=t.computed(()=>{const U={};return U[`${e}__titles`]=!0,U[`${l.direction}`]=!0,l.align==="left"&&(U.left=!0),l.scroll===!0&&(U.scrollable=!0),l.shape&&(U[`${l.shape}`]=!0),U}),d=t.computed(()=>({})),p=t.computed(()=>{if(!l.gutter)return 0;const U=de(l.gutter);return U<=0?0:U}),u=t.ref(l.modelValue);t.watch(()=>l.modelValue,U=>{u.value!==U&&(u.value=U,x(!1))});const g=t.ref({"fox-tabs-bar__popup":!0,"fox-tabs-bar__popup--show":!1,"fox-tabs-bar__popup--hide":!1}),k=t.computed(()=>{const U={};return y.value||(U.display="none"),U}),v=t.ref(),y=t.ref(!1),b=()=>{const U=!y.value;f(U)},f=U=>{const I=U;I?(y.value=I,setTimeout(()=>{g.value["fox-tabs-bar__popup--show"]=!0,g.value["fox-tabs-bar__popup--hide"]=!1},0)):(g.value["fox-tabs-bar__popup--show"]=!1,g.value["fox-tabs-bar__popup--hide"]=!0,v.value?v.value.addEventListener("transitionend",()=>{y.value=!1},{once:!0}):setTimeout(()=>{y.value=!1},0))},m=t.ref(),h=t.ref([]),S=(U,I)=>{h.value[I]=U},N=U=>I=>{S(I,U)},C=(U,I)=>{const P=m.value,D=h.value;if(!P||!D||!D[U])return;const W=D[U];let L=0;l.direction==="vertical"?L=W.offsetTop-(P.offsetHeight-W.offsetHeight)/2:L=W.offsetLeft-(P.offsetWidth-W.offsetWidth)/2,w(P,L,I?0:.3,l.direction)},w=(U,I,P,D)=>{let W=0;const L=D==="horizontal"?U.scrollLeft:U.scrollTop,O=P===0?1:Math.round(P*1e3/16);function Q(){D==="horizontal"?U.scrollLeft+=(I-L)/O:U.scrollTop+=(I-L)/O,++W<O&&Ke(Q)}Q()},B=(U,I)=>{const P=It(l,U),D={};return D[`${e}__titles-item`]=!0,D.disabled=ir(l,U),D.active=P===u.value,l.shape&&(D[`${l.shape}`]=!0),l.ellipsis&&(D.ellipsis=!0),I&&(I.class&&(D[`${I.class}`]=!0),I.disabled===!0&&(D.disabled=I.disabled)),D},A=(U,I)=>{const P={};if(p.value>0){const D=Math.abs(p.value/2);l.direction==="vertical"?(P["margin-top"]=`${D}px`,P["margin-bottom"]=`${D}px`):(P["margin-left"]=`${D}px`,P["margin-right"]=`${D}px`)}return I&&I.style&&Object.assign(P,I.style),P},T=(U,I)=>`${It(l,U)??I}`,$=(U,I)=>{const P=It(l,U),D={};D[`${e}__popup-item`]=!0,D.disabled=ir(l,U),D.active=P===u.value,l.shape&&(D[`${l.shape}`]=!0);const W=cr(l,U,I);return W&&W.disabled===!0&&(D.disabled=W.disabled),D},q=t.computed(()=>(l.data??[]).filter(I=>Xu(l,I)!==!1)),R=(U,I)=>{const P=It(l,U);if(i("click",U,I),u.value==P)return;const D=()=>{u.value=P,l.scroll&&C(I,!1),i("update:modelValue",P),i("change",U,I)};if(typeof l.beforeChange=="function"){const W=l.beforeChange(U,I);bt(W)?W.then(L=>{L!==!1&&D()}).catch(()=>{D()}):W!==!1&&D()}else D()},V=(U,I)=>function(){R(U,I)},E=(U,I)=>{R(U,I),f(!1)},M=(U,I)=>function(){E(U,I)},x=U=>{if(!Array.isArray(l.data)||!l.scroll)return;const I=l.data.findIndex(P=>It(l,P)===u.value);I!==-1&&C(I,U)};t.watch(()=>l.data,()=>{setTimeout(x,0)}),t.onMounted(()=>{x(!0)});const j=(U,I)=>{if(r.item)return r.item({item:U,index:I});const P=cr(l,U,I),D=[];if(r.text){const Q=r.text({item:U,index:I});D.push(Q)}else{const Q=[];if(P?.doit===!0||Qu(l,U)){const Y={class:[`${e}__titles-item-tip`,"doit"]},X=t.h("view",Y);Q.push(X)}const G=P?.num??Gu(l,U);if(G){let Y="";const X=me(G);X>=100?Y="99+":Y=`${X}`;const K={class:[`${e}__titles-item-tip`,"num"]},Z=t.h("view",K,[Y]);Q.push(Z)}const te={class:`${e}__titles-item-text`};Q.push(sr(l,U));const F=t.h("view",te,Q);D.push(F)}const W={class:`${e}__titles-item-line`},L=t.h("view",W);D.push(L);const O={ref:N(I),class:B(U,P),style:A(U,P),key:T(U,I),onClick:V(U,I)};return t.h("view",O,D)},H=()=>{const U=r.default?r.default():[];if(U.length===0)for(let P=0;P<q.value.length;P++){const D=q.value[P],W=j(D,P);U.push(W)}const I={ref:m,class:c.value,style:d.value};return t.h("view",I,U)},z=()=>{let U=null;r.navigation?U=r.navigation():U=t.h(a);const I={class:`${e}__navigation`,onClick:b};return t.h("view",I,[U])},_=()=>{const U=[];for(let P=0;P<q.value.length;P++){const D=q.value[P];let W=null;r.popupItem?W=r.popupItem({item:D,index:P}):W=sr(l,D);const L={class:$(D,P),key:T(D,P),onClick:M(D,P)},O=t.h("view",L,[W]);U.push(O)}const I={class:g.value,style:k.value};return t.h("view",I,U)};return()=>{const U=[],I=H();if(U.push(I),l.showQuickNavigation){const D=z();U.push(D);const W=_();U.push(W)}const P={class:s.value};return t.h("view",P,U)}}}}const{create:Ju,componentName:_u,scope:ed}=J("tabs-bar"),Hn=Ju(Zu(_u,ed,oe.MoreH,!1)),ks=Symbol("TabsStatesKey"),td={modelValue:{type:[String,Number]},direction:{type:[String],default:"horizontal"},lazy:{type:[Boolean],default:!0}};function nd(e,n,a=!1){return{props:{...td},emits:["update:modelValue","change"],setup(o,{emit:l,slots:r}){const i=t.shallowRef([]),s={current:t.ref(o.modelValue??""),direction:t.ref(o.direction),tabWidth:t.ref(-1),tabHeight:t.ref(-1),add:y=>{const b={name:y};s.current.value===y&&(b.loaded=!0),i.value.push(b),t.triggerRef(i)},remove:y=>{const b=i.value.findIndex(f=>f.name===y);b!==-1&&i.value.splice(b,1)},isLoaded:y=>{if(!o.lazy)return!0;const b=i.value.findIndex(f=>f.name===y);return b!==-1?s.current.value?i.value[b].loaded??!1:b===0:!1}};t.provide(ks,s);const c=y=>{const b=i.value.findIndex(f=>f.name===y);b!==-1&&(i.value[b].loaded=!0,t.triggerRef(i))};t.watch([()=>o.modelValue,()=>o.direction],([y,b])=>{s.current.value!==y&&(s.current.value=y??"",c(y??"")),s.direction.value!==b&&(s.direction.value=b)});const d=t.ref(null),p=t.ref(null),u=t.computed(()=>({[e]:!0,[`${o.direction}`]:!0}));let g=!0;const k=t.computed(()=>{const y={},b=i.value.length;if(b<=0)return y;const f=i.value.findIndex(m=>m.name===s.current.value);return s.direction.value==="vertical"?s.tabHeight.value>0&&(y.height=`${b*s.tabHeight.value}px`,f!==-1&&(y.transform=`translate(0, -${f*s.tabHeight.value}px)`)):s.tabWidth.value>0&&(y.width=`${b*s.tabWidth.value}px`,f!==-1&&(y.transform=`translate(-${f*s.tabWidth.value}px, 0)`)),g&&(g=!1,y.transition="transform 0s ease"),y});let v=null;return t.onMounted(()=>{if(!d.value)return;const y=()=>{const b=qn(d.value);s.tabWidth.value=b.width,s.tabHeight.value=b.height};window.ResizeObserver&&(v=new window.ResizeObserver(y),v.observe(d.value)),y()}),t.onBeforeUnmount(()=>{v&&(v.disconnect(),v=null)}),()=>{const y={class:`${e}__panes`,style:k.value,ref:p},b=t.h("view",y,[r?.default?.()]),f={class:u.value,ref:d};return t.h("view",f,[b])}}}}const{create:od,componentName:ld,scope:ad}=J("tabs-container"),jn=od(nd(ld,ad,!1)),rd={paneKey:{type:[String,Number],required:!0},loaded:{type:[Boolean,String],default:null},emptyIcon:{type:[Object],required:!1},emptyText:{type:[String],required:!1}};function sd(e,n,a){return{props:{...rd},setup(o,{emit:l,slots:r}){const i=t.inject(ks);t.onMounted(()=>{i.add(o.paneKey)}),t.onBeforeUnmount(()=>{i.remove(o.paneKey)});const s=t.computed(()=>{const d={};return i.direction.value==="vertical"&&i.tabHeight.value>0?d.height=`${i.tabHeight.value}px`:i.tabWidth.value>0&&(d.width=`${i.tabWidth.value}px`),d}),c=t.computed(()=>o.loaded!=null?ye(o.loaded):i.isLoaded(o.paneKey));return()=>{let d=[];if(c.value)d=r?.default?.()??[];else if(r.empty)d=r.empty();else{const u={class:`${e}__empty-icon`},g=o.emptyIcon??a,k=t.h(g,u),v={class:`${e}__empty-text`},y=o.emptyText??"Loading",b=t.h("view",v,[y]),f={class:`${e}__empty`},m=t.h("view",f,[k,b]);d.push(m)}const p={class:`${e}`,style:s.value};return t.h("view",p,d)}}}}const{create:id,componentName:cd,scope:ud}=J("tabs-pane"),Wn=id(sd(cd,ud,oe.Loading));class ur{nodes;config;constructor(n,a){this.config={value:"value",text:"text",children:"children",...a||{}},this.nodes=rn(n,null,this.config)}updateChildren(n,a){a?a.children=rn(n,a,this.config):this.nodes=rn(n,null,this.config)}getNodeByValue(n){let a;return bs(this.nodes,o=>{if(o.value===n)return a=o,!0}),a}getPathNodesByValue(n){if(!n.length)return[];const a=[];let o=this.nodes;for(;o&&o.length;){const l=o.find(r=>r.value===n[r.level]);if(!l)break;a.push(l),o=l.children}return a}isLeaf(n,a){const{leaf:o,children:l}=n,r=Array.isArray(l)&&!!l.length;return o||!r&&!a}hasChildren(n,a){if(this.isLeaf(n,a))return!1;const{children:l}=n;return Array.isArray(l)&&!!l.length}}const{create:dd,scope:fd}=J("cascader-pane"),md=dd({components:{Loading:oe.Loading,Checklist:oe.Checklist,TabsBar:Hn,TabsContainer:jn,TabsPane:Wn},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:n}){const{t:a}=se.useFoxI18n(fd),o=t.computed(()=>({lazy:e.lazy,lazyLoad:e.lazyLoad,valueKey:e.valueKey,textKey:e.textKey,childrenKey:e.childrenKey,convertConfig:e.convertConfig})),l=t.ref(0),r=t.ref(!1),i=t.ref(e.modelValue),s=t.ref(new ur([],{})),c=t.ref([]),d=t.computed(()=>o.value.lazy&&!!o.value.lazyLoad),p=t.computed(()=>r.value==!0||c.value.length==0?[{text:"Loading",value:0}]:c.value.map((m,h)=>({text:m.selectedNode?m.selectedNode.text:a("select"),value:h}))),u=new Map;let g;const k=async()=>{u.clear(),c.value=[],l.value=0,r.value=!1,g=null;let{options:m}=e;o.value.convertConfig&&(m=Wu(m,o.value.convertConfig)),s.value=new ur(m,{value:o.value.valueKey,text:o.value.textKey,children:o.value.childrenKey}),d.value&&!s.value.nodes.length&&await y({root:!0,loading:!0,text:"",value:""}),c.value=[{nodes:s.value.nodes,selectedNode:null}],v(!d.value)},v=async(m=!0)=>{const h=i.value;if(h===void 0||!s.value.nodes.length)return;if(h.length===0){l.value=0,c.value=[{nodes:s.value.nodes,selectedNode:null}];return}let S=h;if(d.value&&Array.isArray(h)&&h.length){S=[];let N=s.value.nodes.find(C=>C.value===h[0]);if(N){S=[N.value],r.value=!0;const C=await h.slice(1).reduce(async(w,B)=>{const A=await w;await y(A);const T=A?.children?.find($=>$.value===B);return T&&S.push(B),Promise.resolve(T)},Promise.resolve(N));await y(C),r.value=!1}}S.length&&h===e.modelValue&&s.value.getPathNodesByValue(S).map((C,w)=>{l.value=w,f.handleNode(C,m)})},y=async m=>{if(!m)return;if(!o.value.lazyLoad){m.leaf=!0;return}if(s.value.isLeaf(m,d.value)||s.value.hasChildren(m,d.value))return;m.loading=!0;const h=m.root?null:m;let S=u.get(m);S||(S=new Promise(C=>{o.value.lazyLoad?.(m,C)}),u.set(m,S));const N=await S;Array.isArray(N)&&N.length>0?s.value.updateChildren(N,h):m.leaf=!0,m.loading=!1,u.delete(m)},b=m=>{const h=m.map(S=>S.value);i.value=h,n("change",h,m),n("pathChange",m),n("update:modelValue",h)},f={async handleNode(m,h){const{disabled:S,loading:N}=m;if(!(!h&&S||!c.value[l.value])){if(s.value.isLeaf(m,d.value)){if(m.leaf=!0,c.value[l.value].selectedNode=m,c.value=c.value.slice(0,m.level+1),!h){const C=c.value.map(w=>w.selectedNode);b(C),n("pathChange",C)}return}if(s.value.hasChildren(m,d.value)){const C=m.level+1;if(c.value[l.value].selectedNode=m,c.value=c.value.slice(0,C),c.value.push({nodes:m.children||[],selectedNode:null}),l.value=C,!h){const w=c.value.map(B=>B.selectedNode);n("pathChange",w)}return}g=m,!N&&(await y(m),g===m&&(c.value[l.value].selectedNode=m,f.handleNode(m,h)))}},handleTabChange(m,h){g=null},formatTabTitle(m){return m.selectedNode?m.selectedNode.text:a("select")},isSelected(m,h){return m.selectedNode&&m.selectedNode.value===h.value}};return t.watch([o,()=>e.options],()=>{k()},{deep:!0,immediate:!0}),t.watch(()=>e.modelValue,m=>{Pe(m,i.value)||(i.value=m,v(!d.value))}),t.watch(()=>e.visible,m=>{m&&Array.isArray(i.value)&&i.value.length>0&&v()}),{panes:c,panesTitles:p,initLoading:r,tabsCursor:l,...f}}}),pd={class:"fox-cascader"},hd={role:"menu",class:"fox-cascader__pane"},gd=["aria-checked","aria-disabled","onClick"],yd={class:"fox-cascader__item__title"};function vd(e,n,a,o,l,r){const i=t.resolveComponent("TabsBar"),s=t.resolveComponent("Loading"),c=t.resolveComponent("Checklist"),d=t.resolveComponent("TabsPane"),p=t.resolveComponent("TabsContainer");return t.openBlock(),t.createElementBlock("view",pd,[t.createVNode(i,{modelValue:e.tabsCursor,"onUpdate:modelValue":n[0]||(n[0]=u=>e.tabsCursor=u),data:e.panesTitles,onChange:e.handleTabChange,scroll:!0,align:"left"},null,8,["modelValue","data","onChange"]),t.createVNode(p,{modelValue:e.tabsCursor,"onUpdate:modelValue":n[1]||(n[1]=u=>e.tabsCursor=u)},{default:t.withCtx(()=>[!e.initLoading&&e.panes.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.panes,(u,g)=>(t.openBlock(),t.createBlock(d,{"pane-key":g,key:g},{default:t.withCtx(()=>[t.createElementVNode("view",hd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.nodes,k=>(t.openBlock(),t.createElementBlock("view",{key:k.value,class:t.normalizeClass(["fox-cascader__item",{active:e.isSelected(u,k),disabled:k.disabled}]),"aria-checked":e.isSelected(u,k),"aria-disabled":k.disabled||void 0,role:"menuitemradio",onClick:v=>e.handleNode(k,!1)},[t.createElementVNode("view",yd,t.toDisplayString(k.text),1),k.loading?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-cascader__item__icon-loading",name:"loading"})):(t.openBlock(),t.createBlock(c,{key:1,class:"fox-cascader__item__icon-check",name:"checklist"}))],10,gd))),128))])]),_:2},1032,["pane-key"]))),128)):(t.openBlock(),t.createBlock(d,{key:1,"pane-key":0},{default:t.withCtx(()=>n[2]||(n[2]=[t.createElementVNode("view",{class:"fox-cascader__pane"},null,-1)])),_:1}))]),_:1},8,["modelValue"])])}const bd=ne(md,[["render",vd]]),{create:kd}=J("cascader"),Sd=kd({components:{FoxCascaderPane:bd,FoxPopup:fe},props:{...Fe,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:n}){const a=t.ref(e.modelValue),o=t.computed({get(){return e.visible},set(i){n("update:visible",i)}}),l=(i,s)=>{a.value=i,o.value=!1,n("change",i,s),n("update:modelValue",i)},r=i=>{n("pathChange",i)};return t.watch(()=>e.modelValue,i=>{i!==a.value&&(a.value=i)}),{onChange:l,onPathChange:r,innerValue:a,innerVisible:o}}}),Cd=["innerHTML"];function wd(e,n,a,o,l,r){const i=t.resolveComponent("FoxCascaderPane"),s=t.resolveComponent("FoxPopup");return e.poppable?(t.openBlock(),t.createBlock(s,{key:0,visible:e.innerVisible,"onUpdate:visible":n[0]||(n[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,Cd)):t.createCommentVNode("",!0),t.createVNode(i,{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(i,{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 Yn=ne(Sd,[["render",wd]]);function St(e,n){const a=e.textKey??"text";return n[a]??""}function Ct(e,n){const a=e.valueKey??"value";return n[a]}function Ss(e,n){const a=e.childrenKey??"children";return n[a]}function ln(e,n=[]){const a={texts:[],values:[]};for(let o=0;o<n.length;o++){const l=n[o],r=St(e,l),i=Ct(e,l);a.texts.push(r),a.values.push(i??"")}return a}function Cs(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let i=0;i<n.length;i++)if(St(e,n[i])===r){const c=Ct(e,n[i])??"",d={[e.textKey]:r,[e.valueKey]:c};l.push(d);const p=Ss(e,n[i]);Array.isArray(p)&&Cs(e,p,a,o+1,l);return}}function ws(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let i=0;i<n.length;i++)if(Ct(e,n[i])===r){const c=St(e,n[i])??"",d={[e.textKey]:c,[e.valueKey]:r};l.push(d);const p=Ss(e,n[i]);Array.isArray(p)&&ws(e,p,a,o+1,l);return}}function fo(e,n,a){if(n===a)return!0;if(n.length!==a.length)return!1;for(let o=0;o<n.length;o++){const l=St(e,n[o]),r=St(e,a[o]);if(l!==r)return!1;const i=Ct(e,n[o]),s=Ct(e,a[o]);if(i!==s)return!1}return!0}let Nd=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){const l="cascader";if(Array.isArray(n))return n;if(typeof n=="function")return await n(a,o);const r=et(this.proxy,l);return r===null?(console.error(`${l} component not found api function`),[]):(xe(a)&&t.isReactive(a)&&(a=t.toRaw(a)),await r(n,a,o))}};function Bd(){const e=t.getCurrentInstance();return new Nd(e.proxy)}const dr={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},showAllLevels:{type:[Boolean],default:!0},separator:{type:[String],default:"/"}};function Ad(e,n,a,o,l,r,i=!1){return{props:{...pe,...ge,...dr},emits:["update:modelValue","change","pathChange","blur","focus","clear","update:pathNodes","setValue"],setup(s,c){const d=$e(t.computed(()=>s.disabled)),p=Te(t.computed(()=>s.readonly)),{emitEvent:u}=Ae({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return d.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=se.useFoxI18n(n),k=g(s,["placeholder"]),v=t.ref(!1),y=Bd(),b=t.ref([]),f=t.ref([]),m=t.computed(()=>{if(Array.isArray(f.value)){if(s.showAllLevels===!1){const O=f.value.length-1;return f.value[O]}return f.value.join(s.separator)}else return f.value}),h=t.ref([]),S=t.ref([]);t.watch([()=>s.modelValue,()=>b.value],async([O,Q])=>{if(u("setValue",O),s.lazy===!0){S.value.length==0&&(h.value=Array.isArray(O)?O:[]);return}if(s.valueType==="item"){let G=O;if(!fo(s,G,S.value)){S.value=G;let te=ln(s,G);f.value=te.texts,h.value=te.values}}else if(s.valueType==="text"){let G=O,te=[];if(Cs(s,Q,G,0,te),!fo(s,te,S.value)){S.value=te;let F=ln(s,te);G.value=F.texts,h.value=F.values}}else{let G=[];if(ws(s,Q,O,0,G),!fo(s,G,S.value)){S.value=G;let te=ln(s,G);f.value=te.texts,h.value=te.values}}}),s.lazy===!0&&(h.value=Array.isArray(s.modelValue)?s.modelValue:[]),t.watch([()=>s.source,()=>s.params],async([O,Q])=>{s.lazy||O&&(b.value=await y.load(O,Q))},{immediate:!0});const N="fox-input-item",C=t.computed(()=>({[N]:!0,"is-disabled":d.value,"is-readonly":p.value})),w=Ve(t.computed(()=>s.textAlign),"textAlign"),B=t.computed(()=>{const O={};return w.value&&(O["text-align"]=w.value),O}),A=t.ref(!1),T=()=>{d.value===!0||p.value===!0||(A.value=!0)},$=O=>{A.value=O},q=(O,Q)=>{let G=Q.map(F=>{if(F==null)return F;let Y={...F};return Reflect.deleteProperty(Y,"text"),Y[s.textKey]=F.text??"",Reflect.deleteProperty(Y,"value"),Y[s.valueKey]=F.value??"",Y});S.value=G;let te=ln(s,G);f.value=te.texts,h.value=te.values,s.valueType==="text"?(u("change",f.value,G),u("update:modelValue",f.value)):s.valueType==="item"?(u("change",G,G),u("update:modelValue",G)):(u("change",h.value,G),u("update:modelValue",h.value)),u("update:pathNodes",G)},R=O=>{let Q=O.map(G=>{if(G==null)return G;let te={...G};return Reflect.deleteProperty(te,"text"),te[s.textKey]=G.text??"",Reflect.deleteProperty(te,"value"),te[s.valueKey]=G.value??"",te});u("pathChange",Q)},V=O=>{v.value=!0,u("focus",h.value,O)},E=O=>{setTimeout(()=>{v.value=!1},0),u("blur",h.value,O)},M=t.computed(()=>({[`${N}__append`]:!0,"is-disabled":d.value,"is-readonly":p.value})),x=t.computed(()=>ve(s.unit)>0),j=t.computed(()=>ve(s.unit)>0&&!v.value),H=t.computed(()=>({hidden:!j.value})),z=O=>{S.value=[],f.value=[],h.value=[],u("update:modelValue",[]),u("change",[],O),u("clear",[]),u("update:pathNodes",[])},_=t.computed(()=>s.clearable&&!d.value&&!p.value),U=t.computed(()=>{let O=h.value&&h.value.length>0;return s.clearable&&O&&v.value}),I=O=>{U.value?z(O):T()},P=t.computed(()=>U.value&&_.value?o:l),D=t.computed(()=>({action:!0}));let W=null;const L=()=>typeof W=="function"?W:typeof s.lazyLoad=="function"?s.lazyLoad:(W=async(O,Q)=>{const G=[],te=[];let F=0;if(!O.root){let X=O;for(;X;){const K=St(s,X),Z=Ct(s,X);te.splice(0,0,K),G.splice(0,0,Z),X=X._parent}F=G.length}const Y=await y.load(s.source,{...O,level:F,pathLabels:te,pathValues:G},!0);Q(Y)},W);return()=>{const O={class:C.value,style:B.value,type:"text",maxlength:s.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:m.value,onClick:T,onFocus:V,onBlur:E};i&&(O.disabled=!0);const Q=[],G=t.h("input",O);Q.push(G);const te=[],F={class:["action-icon"]},Y=t.h(P.value,F),X={class:D.value,onClick:I},K=t.h("view",X,{default:()=>[Y]});if(te.push(K),x.value){const nt=t.h("view",{class:H.value},[s.unit]);te.push(nt)}const Z={class:M.value},ee=t.h("view",Z,{default:()=>te});Q.push(ee);const le={default:()=>Q};le.label=c.slots.default,le.prepend=c.slots.prepend,le.append=c.slots.append,le.fixedPreTip=c.slots.fixedPreTip,le.fixedTip=c.slots.fixedTip;let re={};re.visible=A.value,re["onUpdate:visible"]=$,re.modelValue=h.value,re.onChange=q,re.onPathChange=R,re.title=s.title,re.valueKey=s.valueKey,re.textKey=s.textKey,re.childrenKey=s.childrenKey,re.convertConfig=s.convertConfig,s.lazy?(re.lazy=!0,re.lazyLoad=L()):re.options=b.value;const ce=t.h(r,re);le.hide=()=>[ce];const Ce={...dt(s,dr)};return s.prop&&(Ce.prop=`${s.prop}_item`),t.h(a,Ce,le)}}}}const{componentName:Vd,create:Td,scope:$d}=J("cascader-item"),il=Td(Ad(Vd,$d,we,oe.CircleClose,oe.ArrowRight,Yn,!1));var We=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ns={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a=1e3,o=6e4,l=36e5,r="millisecond",i="second",s="minute",c="hour",d="day",p="week",u="month",g="quarter",k="year",v="date",y="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|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,m={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("_")},h=function(R,V,E){var M=String(R);return!M||M.length>=V?R:""+Array(V+1-M.length).join(E)+R},S={s:h,z:function(R){var V=-R.utcOffset(),E=Math.abs(V),M=Math.floor(E/60),x=E%60;return(V<=0?"+":"-")+h(M,2,"0")+":"+h(x,2,"0")},m:function R(V,E){if(V.date()<E.date())return-R(E,V);var M=12*(E.year()-V.year())+(E.month()-V.month()),x=V.clone().add(M,u),j=E-x<0,H=V.clone().add(M+(j?-1:1),u);return+(-(M+(E-x)/(j?x-H:H-x))||0)},a:function(R){return R<0?Math.ceil(R)||0:Math.floor(R)},p:function(R){return{M:u,y:k,w:p,d,D:v,h:c,m:s,s:i,ms:r,Q:g}[R]||String(R||"").toLowerCase().replace(/s$/,"")},u:function(R){return R===void 0}},N="en",C={};C[N]=m;var w=function(R){return R instanceof $},B=function R(V,E,M){var x;if(!V)return N;if(typeof V=="string"){var j=V.toLowerCase();C[j]&&(x=j),E&&(C[j]=E,x=j);var H=V.split("-");if(!x&&H.length>1)return R(H[0])}else{var z=V.name;C[z]=V,x=z}return!M&&x&&(N=x),x||!M&&N},A=function(R,V){if(w(R))return R.clone();var E=typeof V=="object"?V:{};return E.date=R,E.args=arguments,new $(E)},T=S;T.l=B,T.i=w,T.w=function(R,V){return A(R,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var $=function(){function R(E){this.$L=B(E.locale,null,!0),this.parse(E)}var V=R.prototype;return V.parse=function(E){this.$d=function(M){var x=M.date,j=M.utc;if(x===null)return new Date(NaN);if(T.u(x))return new Date;if(x instanceof Date)return new Date(x);if(typeof x=="string"&&!/Z$/i.test(x)){var H=x.match(b);if(H){var z=H[2]-1||0,_=(H[7]||"0").substring(0,3);return j?new Date(Date.UTC(H[1],z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,_)):new Date(H[1],z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,_)}}return new Date(x)}(E),this.$x=E.x||{},this.init()},V.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()},V.$utils=function(){return T},V.isValid=function(){return this.$d.toString()!==y},V.isSame=function(E,M){var x=A(E);return this.startOf(M)<=x&&x<=this.endOf(M)},V.isAfter=function(E,M){return A(E)<this.startOf(M)},V.isBefore=function(E,M){return this.endOf(M)<A(E)},V.$g=function(E,M,x){return T.u(E)?this[M]:this.set(x,E)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(E,M){var x=this,j=!!T.u(M)||M,H=T.p(E),z=function(O,Q){var G=T.w(x.$u?Date.UTC(x.$y,Q,O):new Date(x.$y,Q,O),x);return j?G:G.endOf(d)},_=function(O,Q){return T.w(x.toDate()[O].apply(x.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(Q)),x)},U=this.$W,I=this.$M,P=this.$D,D="set"+(this.$u?"UTC":"");switch(H){case k:return j?z(1,0):z(31,11);case u:return j?z(1,I):z(0,I+1);case p:var W=this.$locale().weekStart||0,L=(U<W?U+7:U)-W;return z(j?P-L:P+(6-L),I);case d:case v:return _(D+"Hours",0);case c:return _(D+"Minutes",1);case s:return _(D+"Seconds",2);case i:return _(D+"Milliseconds",3);default:return this.clone()}},V.endOf=function(E){return this.startOf(E,!1)},V.$set=function(E,M){var x,j=T.p(E),H="set"+(this.$u?"UTC":""),z=(x={},x[d]=H+"Date",x[v]=H+"Date",x[u]=H+"Month",x[k]=H+"FullYear",x[c]=H+"Hours",x[s]=H+"Minutes",x[i]=H+"Seconds",x[r]=H+"Milliseconds",x)[j],_=j===d?this.$D+(M-this.$W):M;if(j===u||j===k){var U=this.clone().set(v,1);U.$d[z](_),U.init(),this.$d=U.set(v,Math.min(this.$D,U.daysInMonth())).$d}else z&&this.$d[z](_);return this.init(),this},V.set=function(E,M){return this.clone().$set(E,M)},V.get=function(E){return this[T.p(E)]()},V.add=function(E,M){var x,j=this;E=Number(E);var H=T.p(M),z=function(I){var P=A(j);return T.w(P.date(P.date()+Math.round(I*E)),j)};if(H===u)return this.set(u,this.$M+E);if(H===k)return this.set(k,this.$y+E);if(H===d)return z(1);if(H===p)return z(7);var _=(x={},x[s]=o,x[c]=l,x[i]=a,x)[H]||1,U=this.$d.getTime()+E*_;return T.w(U,this)},V.subtract=function(E,M){return this.add(-1*E,M)},V.format=function(E){var M=this,x=this.$locale();if(!this.isValid())return x.invalidDate||y;var j=E||"YYYY-MM-DDTHH:mm:ssZ",H=T.z(this),z=this.$H,_=this.$m,U=this.$M,I=x.weekdays,P=x.months,D=function(Q,G,te,F){return Q&&(Q[G]||Q(M,j))||te[G].slice(0,F)},W=function(Q){return T.s(z%12||12,Q,"0")},L=x.meridiem||function(Q,G,te){var F=Q<12?"AM":"PM";return te?F.toLowerCase():F},O={YY:String(this.$y).slice(-2),YYYY:this.$y,M:U+1,MM:T.s(U+1,2,"0"),MMM:D(x.monthsShort,U,P,3),MMMM:D(P,U),D:this.$D,DD:T.s(this.$D,2,"0"),d:String(this.$W),dd:D(x.weekdaysMin,this.$W,I,2),ddd:D(x.weekdaysShort,this.$W,I,3),dddd:I[this.$W],H:String(z),HH:T.s(z,2,"0"),h:W(1),hh:W(2),a:L(z,_,!0),A:L(z,_,!1),m:String(_),mm:T.s(_,2,"0"),s:String(this.$s),ss:T.s(this.$s,2,"0"),SSS:T.s(this.$ms,3,"0"),Z:H};return j.replace(f,function(Q,G){return G||O[Q]||H.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(E,M,x){var j,H=T.p(M),z=A(E),_=(z.utcOffset()-this.utcOffset())*o,U=this-z,I=T.m(this,z);return I=(j={},j[k]=I/12,j[u]=I,j[g]=I/3,j[p]=(U-_)/6048e5,j[d]=(U-_)/864e5,j[c]=U/l,j[s]=U/o,j[i]=U/a,j)[H]||U,x?I:T.a(I)},V.daysInMonth=function(){return this.endOf(u).$D},V.$locale=function(){return C[this.$L]},V.locale=function(E,M){if(!E)return this.$L;var x=this.clone(),j=B(E,M,!0);return j&&(x.$L=j),x},V.clone=function(){return T.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},R}(),q=$.prototype;return A.prototype=q,[["$ms",r],["$s",i],["$m",s],["$H",c],["$W",d],["$M",u],["$y",k],["$D",v]].forEach(function(R){q[R[1]]=function(V){return this.$g(V,R[0],R[1])}}),A.extend=function(R,V){return R.$i||(R(V,$,A),R.$i=!0),A},A.locale=B,A.isDayjs=w,A.unix=function(R){return A(1e3*R)},A.en=C[N],A.Ls=C,A.p={},A})})(Ns);var Ed=Ns.exports;const Re=Ye(Ed);var Bs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a={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"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,l=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,s={},c=function(y){return(y=+y)+(y>68?1900:2e3)},d=function(y){return function(b){this[y]=+b}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var f=b.match(/([+-]|\d\d)/g),m=60*f[1]+(+f[2]||0);return m===0?0:f[0]==="+"?-m:m}(y)}],u=function(y){var b=s[y];return b&&(b.indexOf?b:b.s.concat(b.f))},g=function(y,b){var f,m=s.meridiem;if(m){for(var h=1;h<=24;h+=1)if(y.indexOf(m(h,0,b))>-1){f=h>12;break}}else f=y===(b?"pm":"PM");return f},k={A:[i,function(y){this.afternoon=g(y,!1)}],a:[i,function(y){this.afternoon=g(y,!0)}],S:[/\d/,function(y){this.milliseconds=100*+y}],SS:[l,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],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:[l,d("day")],Do:[i,function(y){var b=s.ordinal,f=y.match(/\d+/);if(this.day=f[0],b)for(var m=1;m<=31;m+=1)b(m).replace(/\[|\]/g,"")===y&&(this.day=m)}],M:[r,d("month")],MM:[l,d("month")],MMM:[i,function(y){var b=u("months"),f=(u("monthsShort")||b.map(function(m){return m.slice(0,3)})).indexOf(y)+1;if(f<1)throw new Error;this.month=f%12||f}],MMMM:[i,function(y){var b=u("months").indexOf(y)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,d("year")],YY:[l,function(y){this.year=c(y)}],YYYY:[/\d{4}/,d("year")],Z:p,ZZ:p};function v(y){var b,f;b=y,f=s&&s.formats;for(var m=(y=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,T,$){var q=$&&$.toUpperCase();return T||f[$]||a[$]||f[q].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(R,V,E){return V||E.slice(1)})})).match(o),h=m.length,S=0;S<h;S+=1){var N=m[S],C=k[N],w=C&&C[0],B=C&&C[1];m[S]=B?{regex:w,parser:B}:N.replace(/^\[|\]$/g,"")}return function(A){for(var T={},$=0,q=0;$<h;$+=1){var R=m[$];if(typeof R=="string")q+=R.length;else{var V=R.regex,E=R.parser,M=A.slice(q),x=V.exec(M)[0];E.call(T,x),A=A.replace(x,"")}}return function(j){var H=j.afternoon;if(H!==void 0){var z=j.hours;H?z<12&&(j.hours+=12):z===12&&(j.hours=0),delete j.afternoon}}(T),T}}return function(y,b,f){f.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(c=y.parseTwoDigitYear);var m=b.prototype,h=m.parse;m.parse=function(S){var N=S.date,C=S.utc,w=S.args;this.$u=C;var B=w[1];if(typeof B=="string"){var A=w[2]===!0,T=w[3]===!0,$=A||T,q=w[2];T&&(q=w[2]),s=this.$locale(),!A&&q&&(s=f.Ls[q]),this.$d=function(M,x,j){try{if(["x","X"].indexOf(x)>-1)return new Date((x==="X"?1e3:1)*M);var H=v(x)(M),z=H.year,_=H.month,U=H.day,I=H.hours,P=H.minutes,D=H.seconds,W=H.milliseconds,L=H.zone,O=new Date,Q=U||(z||_?1:O.getDate()),G=z||O.getFullYear(),te=0;z&&!_||(te=_>0?_-1:O.getMonth());var F=I||0,Y=P||0,X=D||0,K=W||0;return L?new Date(Date.UTC(G,te,Q,F,Y,X,K+60*L.offset*1e3)):j?new Date(Date.UTC(G,te,Q,F,Y,X,K)):new Date(G,te,Q,F,Y,X,K)}catch{return new Date("")}}(N,B,C),this.init(),q&&q!==!0&&(this.$L=this.locale(q).$L),$&&N!=this.format(B)&&(this.$d=new Date("")),s={}}else if(B instanceof Array)for(var R=B.length,V=1;V<=R;V+=1){w[1]=B[V-1];var E=f.apply(this,w);if(E.isValid()){this.$d=E.$d,this.$L=E.$L,this.init();break}V===R&&(this.$d=new Date(""))}else h.call(this,S)}}})})(Bs);var xd=Bs.exports;const Dd=Ye(xd);var As={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){var r=o.prototype,i=r.format;l.en.ordinal=function(s){var c=["th","st","nd","rd"],d=s%100;return"["+s+(c[(d-20)%10]||c[d]||c[0])+"]"},r.format=function(s){var c=this,d=this.$locale();if(!this.isValid())return i.bind(this)(s);var p=this.$utils(),u=(s||"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(g){switch(g){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 p.s(c.week(),g==="w"?1:2,"0");case"W":case"WW":return p.s(c.isoWeek(),g==="W"?1:2,"0");case"k":case"kk":return p.s(String(c.$H===0?24:c.$H),g==="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 g}});return i.bind(this)(u)}}})})(As);var Id=As.exports;const qd=Ye(Id);var Vs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){var r=o.prototype,i=function(u){return u&&(u.indexOf?u:u.s)},s=function(u,g,k,v,y){var b=u.name?u:u.$locale(),f=i(b[g]),m=i(b[k]),h=f||m.map(function(N){return N.slice(0,v)});if(!y)return h;var S=b.weekStart;return h.map(function(N,C){return h[(C+(S||0))%7]})},c=function(){return l.Ls[l.locale()]},d=function(u,g){return u.formats[g]||function(k){return k.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(v,y,b){return y||b.slice(1)})}(u.formats[g.toUpperCase()])},p=function(){var u=this;return{months:function(g){return g?g.format("MMMM"):s(u,"months")},monthsShort:function(g){return g?g.format("MMM"):s(u,"monthsShort","months",3)},firstDayOfWeek:function(){return u.$locale().weekStart||0},weekdays:function(g){return g?g.format("dddd"):s(u,"weekdays")},weekdaysMin:function(g){return g?g.format("dd"):s(u,"weekdaysMin","weekdays",2)},weekdaysShort:function(g){return g?g.format("ddd"):s(u,"weekdaysShort","weekdays",3)},longDateFormat:function(g){return d(u.$locale(),g)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return p.bind(this)()},l.localeData=function(){var u=c();return{firstDayOfWeek:function(){return u.weekStart||0},weekdays:function(){return l.weekdays()},weekdaysShort:function(){return l.weekdaysShort()},weekdaysMin:function(){return l.weekdaysMin()},months:function(){return l.months()},monthsShort:function(){return l.monthsShort()},longDateFormat:function(g){return d(u,g)},meridiem:u.meridiem,ordinal:u.ordinal}},l.months=function(){return s(c(),"months")},l.monthsShort=function(){return s(c(),"monthsShort","months",3)},l.weekdays=function(u){return s(c(),"weekdays",null,null,u)},l.weekdaysShort=function(u){return s(c(),"weekdaysShort","weekdays",3,u)},l.weekdaysMin=function(u){return s(c(),"weekdaysMin","weekdays",2,u)}}})})(Vs);var Pd=Vs.exports;const Md=Ye(Pd);var Ts={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a="week",o="year";return function(l,r,i){var s=r.prototype;s.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 p=i(this).startOf(o).add(1,o).date(d),u=i(this).endOf(a);if(p.isBefore(u))return 1}var g=i(this).startOf(o).date(d).startOf(a).subtract(1,"millisecond"),k=this.diff(g,a,!0);return k<0?i(this).startOf("week").week():Math.ceil(k)},s.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(Ts);var Ld=Ts.exports;const zd=Ye(Ld);var $s={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.weekYear=function(){var l=this.month(),r=this.week(),i=this.year();return r===1&&l===11?i+1:l===0&&r>=52?i-1:i}}})})($s);var Od=$s.exports;const Fd=Ye(Od);var Es={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){o.prototype.dayOfYear=function(r){var i=Math.round((l(this).startOf("day")-l(this).startOf("year"))/864e5)+1;return r==null?i:this.add(r-i,"day")}}})})(Es);var Rd=Es.exports;const Kd=Ye(Rd);var xs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.isSameOrAfter=function(l,r){return this.isSame(l,r)||this.isAfter(l,r)}}})})(xs);var Ud=xs.exports;const Hd=Ye(Ud);var Ds={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.isSameOrBefore=function(l,r){return this.isSame(l,r)||this.isBefore(l,r)}}})})(Ds);var jd=Ds.exports;const Wd=Ye(jd);Re.extend(Md);Re.extend(qd);Re.extend(Dd);Re.extend(zd);Re.extend(Fd);Re.extend(Kd);Re.extend(Hd);Re.extend(Wd);const ae={format(e,n){return Re(e).format(n)},parser(e,n){return Re(e,n).toDate()},isLeapYear(e){return e%4==0&&e%100!=0||e%400==0},getWhatDay(e,n,a){const l=new Date(e+"/"+n+"/"+a).getDay();return["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][l]},getMonthPreDay(e,n){let o=new Date(e+"/"+n+"/01").getDay();return o==0&&(o=7),o},getMonthDays(e,n){return/^0/.test(n)&&(n=n.split("")[1]),[0,31,this.isLeapYear(Number(e))?29:28,31,30,31,30,31,31,30,31,30,31][n]},getNumTwoBit(e){return e=Number(e),(e>9?"":"0")+e},date2Str:function(e,n){n=n||"-";const a=e.getFullYear(),o=this.getNumTwoBit(e.getMonth()+1),l=this.getNumTwoBit(e.getDate());return[a,o,l].join(n)},getDay(e,n,a){e=e||0;let o=n??new Date;const l=e*(1e3*60*60*24);return o=new Date(o.getTime()+l),a=a??"YYYY-MM-DD",this.format(o,a)},compareDate(e,n){let a;typeof e=="string"?a=new Date(e.replace("-","/").replace("-","/")):a=e;let o;return typeof n=="string"?o=new Date(n.replace("-","/").replace("-","/")):o=n,!(a>=o)},isEqual(e,n){if(e===n)return!0;if(!e||!n)return!1;let a;typeof e=="string"?a=new Date(e).getTime():a=e;let o;return typeof n=="string"?o=new Date(n).getTime():o=n,a==o},getMonthWeek:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a));let r=l.getDay(),i=l.getDate(),s=6-r;return o!==0&&(r=r==0?7:r,s=7-r),Math.ceil((i+s)/7)},getYearWeek:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a)),r=new Date(Number(e),0,1),i=Math.round((l.valueOf()-r.valueOf())/864e5);let s=l.getDay(),c=6-s;return o!==0&&(s=s==0?7:s,c=7-s),Math.ceil((i+c)/7)},getWeekDate:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a)),r=l.getTime();let i=l.getDay();if(o===0){const c=r-i*864e5,d=r+(6-i)*864e5,p=this.date2Str(new Date(c)),u=this.date2Str(new Date(d));return[p,u]}else{i=i==0?7:i;const s=24*60*60*1e3,c=r-(i-1)*s,d=r+(7-i)*s,p=this.date2Str(new Date(c)),u=this.date2Str(new Date(d));return[p,u]}},formatResultDate:function(e){let n=[...e.split("-")];return n[2]=ae.getNumTwoBit(Number(n[2])),n[3]=`${n[0]}-${n[1]}-${n[2]}`,n[4]=ae.getWhatDay(+n[0],+n[1],+n[2]),n},inScope4Day(e,n,a){const o=new Date(new Date(n).setDate(n.getDate()+a)),l=e.getTime(),r=o.getTime(),i=n.getTime();return r>i?l>=i&&l<=r:l>=r&&l<=i},inScope4Month(e,n,a){const o=new Date(new Date(n).setMonth(n.getMonth()+a)),l=e.getTime(),r=o.getTime(),i=n.getTime();return r>i?l>=i&&l<=r:l>=r&&l<=i}},fr=new Date().getFullYear(),cl={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"},wn=(e,n,a)=>{let o;if(He(n)?o=n:typeof n=="string"&&ve(n)>0?o=ae.parser(n,a):o=new Date,o.toString()==="Invalid Date")return null;let l=Math.max(o.getTime(),e.minDate.getTime());return l=Math.min(l,e.maxDate.getTime()),new Date(l)},Io=(e,n,a)=>{He(n)||(n=e.minDate);let o=Math.max(n.getTime(),e.minDate.getTime());return o=Math.min(o,e.maxDate.getTime()),ae.format(new Date(o),a)};let qo={modelValue:{type:[String,Date]},confirmText:{type:String},cancelText:{type:String},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(fr-10,0,1),validator:He},maxDate:{type:Date,default:()=>new Date(fr+10,11,31),validator:He},visibleItemCount:{type:[Number,String],default:7},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:1e3},teleportDisable:{type:Boolean}};const{create:Yd,scope:Xd}=J("date-picker"),Qd=Yd({components:{Picker:_t},props:{...qo},emits:["click","update:visible","update:modelValue","update:dateIndexs","update:close","cancel","confirm","clear"],setup(e,{emit:n}){const{t:a}=se.useFoxI18n(Xd),o={day:a("day"),year:a("year"),month:a("month"),hour:a("hour"),minute:a("minute"),seconds:a("seconds"),today:a("today")},l=t.ref(!1);t.watch(()=>e.visible,m=>{l.value=m});function r(m,h){return new Date(m,h,0).getDate()}const i=(m,h)=>{const S=e[`${m}Date`],N=S.getFullYear();let C=1,w=1,B=0,A=0;m==="max"&&(C=12,w=r(h.getFullYear(),h.getMonth()+1),B=23,A=59);const T=A;return h.getFullYear()===N&&(C=S.getMonth()+1,h.getMonth()+1===C&&(w=S.getDate(),h.getDate()===w&&(B=S.getHours(),h.getHours()===B&&(A=S.getMinutes())))),{[`${m}Year`]:N,[`${m}Month`]:C,[`${m}Date`]:w,[`${m}Hour`]:B,[`${m}Minute`]:A,[`${m}Seconds`]:T}},s=t.computed(()=>{if(!g.value)return[];const{maxYear:m,maxDate:h,maxMonth:S,maxHour:N,maxMinute:C,maxSeconds:w}=i("max",g.value),{minYear:B,minDate:A,minMonth:T,minHour:$,minMinute:q,minSeconds:R}=i("min",g.value);let V=[{type:"year",range:[B,m]},{type:"month",range:[T,S]},{type:"day",range:[A,h]},{type:"hour",range:[$,N]},{type:"minute",range:[q,C]},{type:"seconds",range:[R,w]}];switch(e.type){case"date":V=V.slice(0,3);break;case"datetime":V=V.slice(0,5);break;case"time":V=V.slice(3,6);break;case"year-month":V=V.slice(0,2);break;case"month-day":V=V.slice(1,3);break;case"datehour":V=V.slice(0,4);break;case"hour-minute":V=V.slice(3,5);break}return V}),c=(m,h,S,N,C)=>{if(!(h>m))return null;const w=[];for(;m<=h;)e.isShowChinese?S==="day"&&N&&m===C?w.push({text:o.today,value:m}):w.push({text:m+o[S],value:m}):w.push({text:`${m}`,value:m}),S==="minute"?m+=e.minuteStep:m++;return w},d=t.computed(()=>{let m=!1;const h=new Date;let S=h.getDate();g.value&&(m=h.getFullYear()===g.value.getFullYear()&&h.getMonth()===g.value.getMonth());let N=[];return s.value.forEach(C=>{let w=c(C.range[0],C.range[1],C.type,m,S);w&&N.push(w)}),N}),p=(m,h)=>m==="year"?h.getFullYear():m==="month"?h.getMonth()+1:m==="day"?h.getDate():m==="hour"?h.getHours():m==="minute"?h.getMinutes():m==="seconds"?h.getSeconds():0,u=t.ref(),g=t.ref(null);t.watch(()=>e.modelValue,m=>{let h;if(typeof m=="string"?m.length==0?h=new Date:e.valueFormat?h=wn(e,e.modelValue,e.valueFormat):h=wn(e,m,cl[e.type]):He(m)?h=m:h=new Date,!!h&&(!g.value||h.getTime()!==g.value.getTime())){g.value=h;let S=[];s.value.forEach(N=>{let C=p(N.type,h);S.push(C)}),u.value=S}},{immediate:!0});const k=m=>{if(e.type==="date"){const h=m[0],S=m[1]-1,N=Math.min(m[2],r(h,S+1));N!==m[2]&&(m[2]=N),g.value=new Date(h,S,N)}else if(e.type==="datetime"){const h=m[0],S=m[1]-1,N=Math.min(m[2],r(h,S+1)),C=m[3],w=m[4];N!==m[2]&&(m[2]=N),g.value=new Date(h,S,N,C,w)}else if(e.type==="time"){const h=m[0],S=m[1],N=m[2],C=g.value??new Date,w=new Date(C.getFullYear(),C.getMonth(),C.getDate(),h,S,N);g.value=w}else if(e.type==="year-month"){const h=m[0],S=m[1]-1;g.value=new Date(h,S)}else if(e.type==="month-day"){const S=(g.value??new Date).getFullYear(),N=m[0]-1,C=Math.min(m[1],r(S,N+1));C!==m[1]&&(m[1]=C);const w=new Date(S,N,C);g.value=w}else if(e.type==="datehour"){const h=m[0],S=m[1]-1,N=Math.min(m[2],r(h,S+1)),C=m[3];N!==m[2]&&(m[2]=N),g.value=new Date(h,S,N,C)}else if(e.type==="hour-minute"){const h=m[0],S=m[1],N=g.value??new Date,C=new Date(N.getFullYear(),N.getMonth(),N.getDate(),h,S);g.value=C}u.value=m};return{columns:d,dateIndexs:u,show:l,onChange:m=>{k(m)},onClose:()=>{l.value=!1,n("update:visible",!1),n("update:close",!1)},onConfirm:m=>{k(m),l.value=!1;let h=g.value??new Date;if(e.valueFormat){let S=Io(e,h,e.valueFormat);n("update:modelValue",S)}else n("update:modelValue",h);n("update:visible",!1),n("confirm",m)},onClear:()=>{n("clear")}}}});function Gd(e,n,a,o,l,r){const i=t.resolveComponent("Picker");return t.openBlock(),t.createBlock(i,{visible:e.show,"model-value":e.dateIndexs,source:e.columns,"value-type":"value","confirm-text":e.confirmText,"cancel-text":e.cancelText,title:e.title,onChange:e.onChange,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","onChange","onConfirm","onClose","onClear","visible-item-count","three-dimensional","swipe-duration","teleport-disable"])}const Xn=ne(Qd,[["render",Gd]]),Zd={format:{type:String},placeholder:{type:String},textAlign:{type:String},clearable:{type:Boolean,default:!0}};function Jd(e){let n=e.format;if(!n){let a=e.type??"date";n=cl[a]}return n}function _d(e,n,a,o,l,r,i=!1){return{props:{...pe,...ge,...qo,...Zd},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(s,c){const d=$e(t.computed(()=>s.disabled)),p=Te(t.computed(()=>s.readonly)),{emitEvent:u}=Ae({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return d.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=se.useFoxI18n(n),k=g(s,["placeholder"]),v=t.ref(!1),b=qe(s,"modelValue",I=>I==null?null:typeof I=="string"?I.length==0?null:s.valueFormat?wn(s,I,s.valueFormat)??I:wn(s,I,cl[s.type])??I:He(I)?I:null,u),f=t.computed(()=>{if(!b.value)return"";const I=Jd(s);return Io(s,b.value,I)}),m="fox-input-item",h=t.computed(()=>({[m]:!0,"is-disabled":d.value,"is-readonly":p.value})),S=Ve(t.computed(()=>s.textAlign),"textAlign"),N=t.computed(()=>{const I={};return S.value&&(I["text-align"]=S.value),I}),C=t.ref(!1),w=()=>{C.value=!0},B=()=>{C.value=!1};c.expose({showPicker:w,hidePicker:B});const A=I=>{C.value=I},T=I=>{if(b.value=I,s.valueFormat){let P=Io(s,I,s.valueFormat);u("update:modelValue",P,{}),u("change",P,{})}else u("update:modelValue",I,{}),u("change",I,{})},$=I=>{let D=I.target.value;v.value=!0,u("focus",D,I)},q=I=>{setTimeout(()=>{v.value=!1},0);let D=I.target.value;s.maxLength&&D.length>Number(s.maxLength)&&(D=D.slice(0,Number(s.maxLength))),u("blur",D,I)},R=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":d.value,"is-readonly":p.value})),V=t.computed(()=>ve(s.unit)>0),E=t.computed(()=>ve(s.unit)>0&&!v.value),M=t.computed(()=>({hidden:!E.value})),x=I=>{b.value="",u("update:modelValue","",I),u("change","",I),u("clear",""),B()},j=t.computed(()=>s.clearable&&!d.value&&!p.value),H=t.computed(()=>{let I=ve(b.value)>0;return s.clearable&&I&&v.value}),z=I=>{H.value?x(I):w()},_=t.computed(()=>H.value&&j.value?o:l),U=t.computed(()=>({action:!0}));return()=>{const I={class:h.value,style:N.value,type:"text",maxlength:s.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:w,onFocus:$,onBlur:q};i&&(I.disabled=!0);const P=[],D=t.h("input",I);P.push(D);const W=[],L={class:["action-icon"]},O=t.h(_.value,L),Q={class:U.value,onClick:z},G=t.h("view",Q,{default:()=>[O]});if(W.push(G),V.value){const ce=t.h("view",{class:M.value},[s.unit]);W.push(ce)}const te={class:R.value},F=t.h("view",te,{default:()=>W});P.push(F);const Y={default:()=>P};Y.label=c.slots.default,Y.prepend=c.slots.prepend,Y.append=c.slots.append,Y.fixedPreTip=c.slots.fixedPreTip,Y.fixedTip=c.slots.fixedTip;const X=be(s,qo);X.valueFormat=null,X.disabled=!1,X.readonly=d.value||p.value,X.visible=C.value,X["onUpdate:visible"]=A,X.modelValue=b.value,X["onUpdate:modelValue"]=T,X.onClear=x;const K={};if(c.slots.top){const ce=c.slots.top();K.top=()=>ce}if(c.slots.bottom){const ce=c.slots.bottom();K.default=()=>ce}const Z=t.h(r,X,K);Y.hide=()=>[Z];const le={...be(s,ge,pe)};return s.prop&&(le.prop=`${s.prop}_item`),t.h(a,le,Y)}}}}const{create:ef,componentName:tf,scope:nf}=J("date-item"),ul=ef(_d(tf,nf,we,oe.CircleClose,oe.Date,Xn,!1)),of=39,lf=64,{create:af,scope:rf}=J("calendar-pane"),sf=af({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:ae.getDay(0)},endDate:{type:String,default:ae.getDay(365)},firstDayOfWeek:{type:Number,default:0}},emits:["choose","update","close","select"],setup(e,{emit:n,slots:a}){const{toLocaleRefs:o,t:l}=se.useFoxI18n(rf),r=o(e,["title","confirmText","startText","endText","today"]),i=JSON.parse(l("weekdays")),s=t.ref([...i.slice(e.firstDayOfWeek,7),...i.slice(0,e.firstDayOfWeek)]),c=t.ref(null),d=t.ref(null),p=t.ref(null),u=t.ref(null),g=t.ref(0),k=t.computed(()=>f.monthsData.slice(f.defaultRange[0],f.defaultRange[1])),v=t.computed(()=>a.btn),y=t.computed(()=>a["top-info"]),b=t.computed(()=>a["bottom-info"]),f=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}),m=L=>L.split("-"),h=L=>ae.isEqual(f.currDate[0],L),S=L=>ae.isEqual(f.currDate[1],L),N=L=>f.currDate?.length>0?f.currDate?.some(O=>ae.isEqual(O,L)):!1,C=(L,O)=>O.curData[0]+"-"+O.curData[1]+"-"+ae.getNumTwoBit(+L.day),w=(L,O)=>{const Q=C(L,O),{type:G}=e;return L.type=="curr"?ae.isEqual(f.currDate,Q)||(G=="range"||G=="week")&&(h(Q)||S(Q))||G=="multiple"&&N(Q)?`${f.dayPrefix}--active`:f.propStartDate&&ae.compareDate(Q,f.propStartDate)||f.propEndDate&&ae.compareDate(f.propEndDate,Q)?`${f.dayPrefix}--disabled`:(G=="range"||G=="week")&&Array.isArray(f.currDate)&&Object.values(f.currDate).length==2&&ae.compareDate(f.currDate[0],Q)&&ae.compareDate(Q,f.currDate[1])?`${f.dayPrefix}--choose`:null:`${f.dayPrefix}--disabled`},B=()=>{const{type:L}=e;if(L=="range"&&f.chooseData.length==2||L!="range"){let O=f.chooseData.slice(0);L=="week"&&(O={weekDate:[T(f.chooseData[0]),T(f.chooseData[1])]}),n("choose",O),e.poppable&&n("update")}},A=(L,O,Q=!1)=>{if(w(L,O)!=`${f.dayPrefix}--disabled`){const{type:G}=e;let[te,F]=O.curData,Y=[...O.curData];if(Y[2]=ae.getNumTwoBit(Number(L.day)),Y[3]=`${Y[0]}-${Y[1]}-${Y[2]}`,Y[4]=ae.getWhatDay(+Y[0],+Y[1],+Y[2]),G=="multiple")if(f.currDate?.length>0){let X;f.currDate?.forEach((K,Z)=>{K==Y[3]&&(X=Z)}),Q?f.chooseData.push([...Y]):X!==void 0?(f.currDate.splice(X,1),f.chooseData.splice(X,1)):(f.currDate.push(Y[3]),f.chooseData.push([...Y]))}else f.currDate=[Y[3]],f.chooseData=[[...Y]];else if(G=="range"){let X=Object.values(f.currDate).length;X==2||X==0?f.currDate=[Y[3]]:ae.compareDate(f.currDate[0],Y[3])?Array.isArray(f.currDate)&&f.currDate.push(Y[3]):Array.isArray(f.currDate)&&f.currDate.unshift(Y[3]),f.chooseData.length==2||!f.chooseData.length?f.chooseData=[[...Y]]:ae.compareDate(f.chooseData[0][3],Y[3])?f.chooseData=[...f.chooseData,[...Y]]:f.chooseData=[[...Y],...f.chooseData]}else if(G=="week"){let X=ae.getWeekDate(te,F,L.day,e.firstDayOfWeek);f.propStartDate&&ae.compareDate(X[0],f.propStartDate)&&X.splice(0,1,f.propStartDate),f.propEndDate&&ae.compareDate(f.propEndDate,X[1])&&X.splice(1,1,f.propEndDate),f.currDate=X,f.chooseData=[ae.formatResultDate(X[0]),ae.formatResultDate(X[1])]}else f.currDate=Y[3],f.chooseData=[...Y];if(!Q){let X=f.chooseData;G=="week"&&(X={weekDate:[T(f.chooseData[0]),T(f.chooseData[1])]}),n("select",X),(e.isAutoBackFill||!e.poppable)&&B()}}},T=L=>{let[O,Q,G]=L;return{date:L,monthWeekNum:ae.getMonthWeek(O,Q,G,e.firstDayOfWeek),yearWeekNum:ae.getYearWeek(O,Q,G,e.firstDayOfWeek)}},$=L=>{const O=f.monthsData[f.monthsData.length-1];let Q=parseInt(O.curData[0]),G=parseInt(O.curData[1].toString().replace(/^0/,""));switch(L){case"prev":G==1&&(Q-=1),G=G==1?12:--G;break;case"next":G==12&&(Q+=1),G=G==12?1:++G;break}return[Q+"",ae.getNumTwoBit(G),ae.getMonthDays(String(Q),String(G))+""]},q=(L,O,Q)=>{let{year:G,month:te}=Q;return Array.from(Array(L),(F,Y)=>({day:String(Y+1),type:O,year:G,month:te}))},R=(L,O,Q,G)=>{L=L-e.firstDayOfWeek;let{year:te,month:F}=Q;return L>=7&&(L-=7),Array.from(Array(G),(X,K)=>({day:String(K+1),type:O,year:te,month:F})).slice(G-L)},V=(L,O)=>{const Q=ae.getMonthPreDay(+L[0],+L[1]);let G=Number(L[1])-1,te=Number(L[0]);G<=0&&(G=12,te+=1);const F=ae.getMonthDays(String(L[0]),String(L[1])),Y=ae.getMonthDays(te+"",G+""),X={year:L[0],month:L[1]},K={curData:L,title:l("monthTitle",{year:X.year,month:X.month}),monthData:[...R(Q,"prev",{month:String(G),year:String(te)},Y),...q(F,"curr",X)],cssHeight:0,cssScrollHeight:0},Z=K.monthData.length>35?6:5;K.cssHeight=of+lf*Z;let ee=0;f.monthsData.length>0&&(ee=f.monthsData[f.monthsData.length-1].cssScrollHeight+f.monthsData[f.monthsData.length-1].cssHeight),K.cssScrollHeight=ee,(!f.endData||!ae.compareDate(`${f.endData[0]}-${f.endData[1]}-${ae.getMonthDays(f.endData[0],f.endData[1])}`,`${L[0]}-${L[1]}-${L[2]}`))&&f.monthsData.push(K)},E=()=>{let L=e.startDate?e.startDate:ae.getDay(0),O=e.endDate?e.endDate:ae.getDay(365);f.propStartDate=L,f.propEndDate=O,f.startData=m(L),f.endData=m(O),(e.defaultValue||Array.isArray(e.defaultValue)&&e.defaultValue.length>0)&&(f.currDate=e.type!=="one"?[...e.defaultValue]:e.defaultValue);const Q={year:Number(f.startData[0]),month:Number(f.startData[1])},G={year:Number(f.endData[0]),month:Number(f.endData[1])};let te=G.month-Q.month;G.year-Q.year>0&&(te=te+12*(G.year-Q.year)),te<=0&&(te=1),V(f.startData);let F=1;do V($("next"));while(F++<te);if(f.monthsNum=te,e.type=="range"&&Array.isArray(f.currDate))f.currDate.length>0&&(L&&ae.compareDate(f.currDate[0],L)&&f.currDate.splice(0,1,L),O&&ae.compareDate(O,f.currDate[1])&&f.currDate.splice(1,1,O),f.defaultData=[...m(f.currDate[0]),...m(f.currDate[1])]);else if(e.type=="multiple"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let Y=[],X={};f.currDate.forEach(K=>{L&&!ae.compareDate(K,L)&&O&&!ae.compareDate(O,K)&&(Object.hasOwnProperty.call(X,K)||(Y.push(K),X[K]=K))}),f.currDate=[...Y],f.defaultData=[...m(Y[0])]}}else if(e.type=="week"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let[Y,X,K]=m(f.currDate[0]),Z=ae.getWeekDate(Y,X,K,e.firstDayOfWeek);f.currDate=Z,L&&ae.compareDate(f.currDate[0],L)&&f.currDate.splice(0,1,L),O&&ae.compareDate(O,f.currDate[1])&&f.currDate.splice(1,1,O),f.defaultData=[...m(f.currDate[0]),...m(f.currDate[1])]}}else f.currDate&&(L&&ae.compareDate(f.currDate,L)?f.currDate=L:O&&!ae.compareDate(f.currDate,O)&&(f.currDate=O),f.defaultData=[...m(f.currDate)])};Ie({scrollToDate:L=>{ae.compareDate(L,f.propStartDate)?L=f.propStartDate:ae.compareDate(L,f.propEndDate)||(L=f.propEndDate);let O=m(L);f.monthsData.forEach((Q,G)=>{if(Q.title==l("monthTitle",{year:O[0],month:O[1]})&&c.value){let te=f.monthsData[G].cssScrollHeight-c.value.scrollTop;if(e.toDateAnimation){let F=0,Y=setInterval(()=>{if(F++,c.value){let X=te/10;c.value.scrollTop=c.value.scrollTop+X}F>=10&&(clearInterval(Y),c.value&&(c.value.scrollTop=f.monthsData[G].cssScrollHeight))},40)}else c.value.scrollTop=f.monthsData[G].cssScrollHeight}})},initPosition:()=>{c?.value&&(c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)},doLayout:()=>{let L=0,O=0;f.defaultData.length>0&&f.monthsData.forEach((te,F)=>{te.title==l("monthTitle",{year:f.defaultData[0],month:f.defaultData[1]})&&(L=F),(e.type=="range"||e.type=="week")&&te.title==l("monthTitle",{year:f.defaultData[3],month:f.defaultData[4]})&&(O=F)}),H(f.monthsNum,L),f.currentIndex=L,f.yearMonthTitle=f.monthsData[f.currentIndex].title,f.defaultData.length>0&&(f.isRange?(A({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0),A({day:f.defaultData[5],type:"curr"},f.monthsData[O],!0)):e.type=="week"?A({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0):e.type=="multiple"?[...f.currDate].forEach(te=>{let F=m(te),Y=f.currentIndex;f.monthsData.forEach((X,K)=>{X.title==l("monthTitle",{year:F[0],month:F[1]})&&(Y=K)}),A({day:F[2],type:"curr"},f.monthsData[Y],!0)}):A({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0));let Q=f.monthsData[f.monthsData.length-1],G=Q.cssHeight+Q.cssScrollHeight;Xe(()=>{c?.value&&d?.value&&u?.value&&(g.value=c.value.clientHeight,d.value.style.height=`${G}px`,c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)}),f.avgHeight=Math.floor(G/(f.monthsNum+1))}});const H=(L,O)=>{L>=3?O>0&&O<L?f.defaultRange=[O-1,O+3]:O==0?f.defaultRange=[O,O+4]:O==L&&(f.defaultRange=[O-2,O+2]):f.defaultRange=[0,L+2];let Q=f.monthsData[f.defaultRange[0]].cssScrollHeight;f.translateY=Q},z=(L,O)=>(e.type=="range"||e.type=="week")&&L.type=="curr"&&w(L,O)=="fox-calendar__day--active",_=(L,O)=>z(L,O)&&h(C(L,O)),U=(L,O)=>f.currDate.length>=2&&S(C(L,O))?z(L,O):!1,I=()=>{if(f.currDate.length>=2)return ae.isEqual(f.currDate[0],f.currDate[1])},P=L=>{const O=`${L.year}-${L.month}-${Number(L.day)<10?"0"+L.day:L.day}`;return ae.isEqual(O,ae.date2Str(new Date))},D=L=>{if(f.monthsData.length<=1)return;const O=L.target.scrollTop;let Q=Math.floor(O/f.avgHeight);if(Q==0)O>=f.monthsData[Q+1].cssScrollHeight&&(Q+=1);else if(Q>0&&Q<f.monthsNum-1)O>=f.monthsData[Q+1].cssScrollHeight&&(Q+=1),O<f.monthsData[Q].cssScrollHeight&&(Q-=1);else{const G=Math.round(O+g.value);G<f.monthsData[Q].cssScrollHeight+f.monthsData[Q].cssHeight&&O>f.monthsData[Q-1].cssScrollHeight&&(Q-=1),Q+1<=f.monthsNum&&G>=f.monthsData[Q+1].cssScrollHeight+f.monthsData[Q+1].cssHeight&&(Q+=1),Q>=1&&O<f.monthsData[Q-1].cssScrollHeight&&(Q-=1)}f.currentIndex!==Q&&(f.currentIndex=Q,H(f.monthsNum,Q)),f.yearMonthTitle=f.monthsData[Q].title},W=()=>{f.chooseData.splice(0),f.monthsData.splice(0),E()};return E(),t.watch(()=>e.defaultValue,L=>{L&&e.poppable&&W()}),{weeks:s,compConthsData:k,showTopBtn:v,topInfo:y,bottomInfo:b,rangeTip:I,mothsViewScroll:D,getClass:w,isStartTip:_,isEndTip:U,chooseDay:A,isCurrDay:P,confirm:B,months:c,...t.toRefs(f),...t.toRefs(e),...r,monthsPanel:d,weeksPanel:p,viewArea:u}}}),cf={class:"fox-calendar__header"},uf={key:0,class:"fox-calendar__header-title"},df={key:1,class:"fox-calendar__header-slot"},ff={key:2,class:"fox-calendar__header-subtitle"},mf={class:"fox-calendar__weekdays",ref:"weeksPanel"},pf={class:"fox-calendar__panel",ref:"monthsPanel"},hf={class:"fox-calendar__month-title"},gf={class:"fox-calendar__days"},yf=["onClick"],vf={class:"fox-calendar__day-value"},bf={key:0,class:"fox-calendar__day-tips fox-calendar__day-tips--top"},kf={key:1,class:"fox-calendar__day-tips fox-calendar__day-tips--bottom"},Sf={key:2,class:"fox-calendar__day-tips--curr"},Cf={key:4,class:"fox-calendar__day-tip"},wf={key:0,class:"fox-calendar__footer"};function Nf(e,n,a,o,l,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",cf,[e.showTitle?(t.openBlock(),t.createElementBlock("view",uf,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.showTopBtn?(t.openBlock(),t.createElementBlock("view",df,[t.renderSlot(e.$slots,"btn")])):t.createCommentVNode("",!0),e.showSubTitle?(t.openBlock(),t.createElementBlock("view",ff,t.toDisplayString(e.yearMonthTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("view",mf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.weeks,(i,s)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__weekday",key:s},t.toDisplayString(i),1))),128))],512)]),t.createElementVNode("view",{class:"fox-calendar__content",ref:"months",onScroll:n[0]||(n[0]=(...i)=>e.mothsViewScroll&&e.mothsViewScroll(...i))},[t.createElementVNode("view",pf,[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,(i,s)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__month",key:s},[t.createElementVNode("view",hf,t.toDisplayString(i.title),1),t.createElementVNode("view",gf,[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(i.monthData,(c,d)=>(t.openBlock(),t.createElementBlock("view",{key:d,class:t.normalizeClass(["fox-calendar__day",e.getClass(c,i)]),onClick:p=>e.chooseDay(c,i)},[t.createElementVNode("view",vf,[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",bf,[t.renderSlot(e.$slots,"top-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),e.bottomInfo?(t.openBlock(),t.createElementBlock("view",kf,[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",Sf,t.toDisplayString(e.today),1)):t.createCommentVNode("",!0),e.isStartTip(c,i)?(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,i)?(t.openBlock(),t.createElementBlock("view",Cf,t.toDisplayString(e.endText),1)):t.createCommentVNode("",!0)],10,yf))),128))],2)])]))),128))],4)],512)],544),e.poppable&&!e.isAutoBackFill?(t.openBlock(),t.createElementBlock("view",wf,[t.createElementVNode("view",{class:"fox-calendar__confirm",onClick:n[1]||(n[1]=(...i)=>e.confirm&&e.confirm(...i))},t.toDisplayString(e.confirmText),1)])):t.createCommentVNode("",!0)],2)}const mr=ne(sf,[["render",Nf]]),Bf=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:Af}=J("calendar"),Vf=Af({components:{[mr.name]:mr,[fe.name]:fe},props:{...sn},emits:["choose","close","update:visible","select"],setup(e,{emit:n,slots:a}){const o=t.computed(()=>a.btn),l=t.computed(()=>a["top-info"]),r=t.computed(()=>a.day),i=t.computed(()=>a["bottom-info"]),s=t.ref(null),c=y=>{s.value?.scrollToDate(y)},d=()=>{s.value?.initPosition()};t.watch(()=>e.visible,y=>{y&&t.nextTick(()=>{s.value?s.value.doLayout():setTimeout(()=>{s.value&&s.value.doLayout()},250)})}),Ie({scrollToDate:c,initPosition:d});const p=()=>{n("update:visible",!1)},u=()=>{n("close"),n("update:visible",!1)};return{closePopup:()=>{u()},update:p,close:u,select:y=>{n("select",y)},choose:y=>{u(),n("choose",y)},calendarRef:s,showTopBtn:o,topInfo:l,dayInfo:r,bottomInfo:i}}});function Tf(e,n,a,o,l,r){const i=t.resolveComponent("fox-calendar-pane"),s=t.resolveComponent("fox-popup");return e.poppable?(t.openBlock(),t.createBlock(s,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(i,{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(i,{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 Qn=ne(Vf,[["render",Tf]]),pr={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}},mo=(e,n)=>{let a;return He(e)?a=e:typeof e=="string"&&ve(e)>0?a=ae.parser(e,n):a=new Date,a},ft=(e,n,a)=>(He(n)||(n=new Date),ae.format(n,a)),mt=e=>{let n=`${e.getFullYear()}`,a=`${e.getMonth()+1}`,o=`${e.getDate()}`,l=ae.date2Str(e),r=ae.getWhatDay(e.getFullYear(),e.getMonth()+1,e.getDate());return[n,a,o,l,r]};function $f(e,n,a,o,{CloseIcon:l,MarkIcon:r},i=!1){return{props:{...pe,...ge,...sn,...pr},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(s,c){const d=$e(t.computed(()=>s.disabled)),p=Te(t.computed(()=>s.readonly)),{emitEvent:u}=Ae({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return d.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=se.useFoxI18n(n),k=g(s,["placeholder"]),v=t.ref(!1),y=t.computed(()=>s.type==="range"),b=t.reactive({startDate:null,endDate:null,startArray:[],endArray:[]}),f=()=>{b.startDate!==null&&(b.startDate=null,b.endDate=null,b.startArray=[],b.endArray=[])},m=(D,W="one",L="YYYY-MM-DD")=>{if(Bf(D)){f();return}if(y.value&&Array.isArray(D)&&D.length==2){let O,Q;typeof D[0]=="string"?(O=mo(D[0],L),Q=mo(D[1],L)):(O=D[0],Q=D[1]);let G=mt(O),te=mt(Q);(b.startDate===null||b.startDate.getTime()!==O.getTime()||b.endDate?.getTime()!==Q.getTime())&&(b.startDate=O,b.startArray=G,b.endDate=Q,b.endArray=te)}else{let O;typeof D=="string"?O=mo(D,L):O=D;let Q=mt(O);(b.startDate===null||b.startDate.getTime()!==O.getTime())&&(b.startDate=O,b.startArray=Q)}};m(s.modelValue,s.type,s.valueFormat),t.watch(()=>s.modelValue,D=>{m(D,s.type,s.valueFormat),u("setValue",D)});const h=t.computed(()=>{if(b.startDate===null)return"";if(y.value){let D=ft(s,b.startDate,s.format),W=ft(s,b.endDate,s.format);return`${D} ${s.rangeSeparator} ${W}`}else{let D=ft(s,b.startDate,s.format);return s.showWeek&&(D=`${D} ${b.startArray[4]}`),D}}),S=t.computed(()=>{if(b.startDate===null)return null;if(y.value){let D=ae.date2Str(b.startDate),W=ae.date2Str(b.endDate??new Date);return[D,W]}else return ae.date2Str(b.startDate)}),N="fox-input-item",C=t.computed(()=>({[N]:!0,"is-disabled":d.value,"is-readonly":p.value})),w=Ve(t.computed(()=>s.textAlign),"textAlign"),B=t.computed(()=>{const D={};return w.value&&(D["text-align"]=w.value),D}),A=t.ref(!1),T=()=>{p.value||d.value||(A.value=!0)},$=D=>{A.value=D},q=D=>{if(D){if(y.value&&Array.isArray(D)){let W=D[0],L=me(W[0]),O=me(W[1]),Q=me(W[2]),G=new Date(L,O-1,Q),te=D[1];L=me(te[0]),O=me(te[1]),Q=me(te[2]);let F=new Date(L,O-1,Q);if(b.startDate=G,b.startArray=mt(G),b.endDate=F,b.endArray=mt(F),s.valueFormat){let Y=ft(s,G,s.valueFormat),X=ft(s,F,s.valueFormat);u("update:modelValue",[Y,X],{})}else u("update:modelValue",[G,F],{})}else{let W=D,L=me(W[0]),O=me(W[1]),Q=me(W[2]),G=new Date(L,O-1,Q);if(b.startDate=G,b.startArray=mt(G),s.valueFormat){let te=ft(s,G,s.valueFormat);u("update:modelValue",te,{})}else u("update:modelValue",G,{})}u("change",D,{})}},R=D=>{let L=D.target.value;v.value=!0,u("focus",L,D)},V=D=>{setTimeout(()=>{v.value=!1},0);let L=D.target.value;s.maxLength&&L.length>Number(s.maxLength)&&(L=L.slice(0,Number(s.maxLength))),u("blur",L,D)},E=t.computed(()=>({[`${N}__append`]:!0,"is-disabled":d.value,"is-readonly":p.value})),M=t.computed(()=>ve(s.unit)>0),x=t.computed(()=>ve(s.unit)>0&&!v.value),j=t.computed(()=>({hidden:!x.value})),H=D=>{f(),u("update:modelValue",null,D),u("change","",D),u("clear","")},z=t.computed(()=>s.clearable&&!d.value&&!p.value),_=t.computed(()=>{let D=ve(h.value)>0;return s.clearable&&D&&v.value}),U=D=>{_.value?H(D):T()},I=t.computed(()=>_.value&&z.value?l:r),P=t.computed(()=>({action:!0}));return()=>{const D={class:C.value,style:B.value,type:"text",maxlength:s.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:h.value,onClick:T,onFocus:R,onBlur:V};i&&(D.disabled=!0);const W=[],L=t.h("input",D);W.push(L);const O=[],Q={class:["action-icon"]},G=t.h(I.value,Q),te={class:P.value,onClick:U},F=t.h("view",te,{default:()=>[G]});if(O.push(F),M.value){const Ce=t.h("view",{class:j.value},[s.unit]);O.push(Ce)}const Y={class:E.value},X=t.h("view",Y,{default:()=>O});W.push(X);const K={default:()=>W};K.label=c.slots.default,K.prepend=c.slots.prepend,K.append=c.slots.append,K.fixedPreTip=c.slots.fixedPreTip,K.fixedTip=c.slots.fixedTip;const Z=be(s,sn);Z.visible=A.value,Z["onUpdate:visible"]=$,Z["default-value"]=S.value,Z.onChoose=q;const ee={};if(c.slots.btn){const Ce=c.slots.btn();ee.btn=()=>Ce}c.slots.day&&(ee.day=c.slots.day),c.slots.topInfo&&(ee.topInfo=c.slots.topInfo),c.slots.bottomInfo&&(ee.bottomInfo=c.slots.bottomInfo);const le=t.h(a,Z,ee);K.hide=()=>[le];const ce={...dt(s,sn,pr)};return s.prop&&(ce.prop=`${s.prop}_item`),t.h(o,ce,K)}}}}const{componentName:Ef,create:xf,scope:Df}=J("calendar-item"),dl=xf($f(Ef,Df,Qn,we,{CloseIcon:oe.CircleClose,MarkIcon:oe.Date},!1)),If={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 qf(e,{CheckNormal:n,Checked:a}){return{props:{...If},setup(o,{emit:l,slots:r}){const i=t.inject("parent",null),s=Pn(),c=t.computed(()=>i.label.value===o.label),d=t.computed(()=>i.position),p=()=>{const y=[];if(c.value){if(r.checkedIcon)return r.checkedIcon();{const b=de(o.iconSize),f=o.checkedIcon??s.radio.Checked??a;return y.push("fox-radio__icon"),o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h(f,{width:b,height:b,class:y})}}else{if(r.icon)return r.icon();{const b=de(o.iconSize),f=o.icon??s.radio.CheckNormal??n;return y.push("fox-radio__icon--unchecked"),o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h(f,{width:b,height:b,class:y})}}},u=()=>{const y=[`${e}__label`];return o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h("view",{class:y},r.default?.())},g=()=>{const y=[`${e}__button`];return c.value&&y.push(`${e}__button--active`),o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h("view",{class:y},r.default?.())},k=()=>{c.value||o.disabled||o.readonly||i.updateValue(o.label)},v=d.value==="left";return()=>t.h("view",{class:`${e} ${e}--${o.shape} ${v?`${e}--reverse`:""}`,onClick:k},[o.shape=="button"?g():v?[u(),p()]:[p(),u()]])}}}const{componentName:Pf,create:Mf}=J("radio"),Gn=Mf(qf(Pf,{CheckNormal:oe.CheckNormal,Checked:oe.CheckChecked})),{componentName:hr,create:Lf}=J("radio-group"),Zn=Lf({props:{modelValue:{type:[Object],default:""},direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},emits:["change","update:modelValue"],setup(e,{slots:n}){const{emitEvent:a}=Vt(),o=l=>a("update:modelValue",l);return t.provide("parent",{label:t.readonly(t.computed(()=>e.modelValue)),position:e.textPosition,updateValue:o}),t.watch(()=>e.modelValue,l=>a("change",l)),()=>{const l={};return e.textAlign&&(l["text-align"]=e.textAlign),t.h("view",{class:`${hr} ${hr}--${e.direction}`,style:l},n.default?.())}}});function gr(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(cn(e,r)===a)return l}else if(o==="item"){if(Pe(a,r))return l}else if(zt(e,r)===a)return l}return-1}function cn(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function zt(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function zf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Of(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Ff=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);let l=et(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(xe(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function Rf(){const e=t.getCurrentInstance();return new Ff(e.proxy)}function Kf(e){return{text:e,value:e}}const yr={shape:{type:String,default:"round"},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}},Uf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},Hf={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,Object],default:""}};function jf(e,n,a,o,l){return{props:{...pe,...ge,...yr,...Uf,...Hf},emits:["change","update:modelValue","setValue"],setup(r,i){const s=Te(t.computed(()=>r.readonly)),c=$e(t.computed(()=>r.disabled)),d=Ve(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Ae({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return s.value},get disabled(){return c.value}},r.prop??i.attrs.name),u=Rf(),g=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,m])=>{if(f){const h=await u.load("radio",f,m);if(h.length>0)if(typeof h[0]=="string"){const C=h.map(w=>Kf(w));g.value=C}else g.value=h;else g.value=[]}},{immediate:!0});let k=t.ref(-1);t.watch([()=>r.modelValue,()=>g.value],async([f,m])=>{k.value=gr(r,m,f,r.valueType),p("setValue",f)},{deep:!0});const v=t.computed(()=>{if(!r.source)return r.modelValue;if(k.value===-1)return null;const f=g.value[k.value];return zt(r,f)}),y=f=>{let m=null,h=null;if(g.value.length>0){let S=gr(r,g.value,f,"value");k.value=S,S>=0&&(h=g.value[S],r.valueType==="text"?m=cn(r,h):r.valueType==="item"?m=h:m=zt(r,h))}else m=f;p("update:modelValue",m),p("change",m,h)},b=()=>{let f=null,m=null;if(g.value.length>0&&k.value!==-1){let h=g.value[k.value];r.valueType==="text"?f=cn(r,h):r.valueType==="item"?f=h:f=zt(r,h)}p("update:modelValue",f),p("change",f,m)};if(Ie({clear(){k.value!==-1&&(k.value=-1,b())}}),r.source){const f=()=>{const m=[],h=be(r,yr);return g.value.forEach((S,N)=>{const C=zt(r,S),w=zf(r,S);let B={...h,label:C,disabled:w};const A=Of(r,S,N);B={...B,...A},c.value&&(B.disabled=!0),s.value&&(B.readonly=!0);const T={};if(i.slots.icon&&(T.icon=i.slots.icon),i.slots.checkedIcon&&(T.checkedIcon=i.slots.checkedIcon),typeof i.slots.text=="function"){const q=i.slots.text(S);T.default=()=>[q]}else{const q=cn(r,S);T.default=()=>q}let $=t.h(l,B,T);m.push($)}),m};return()=>{const m=f(),h={class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:d.value,modelValue:v,"onUpdate:modelValue":y},S=t.h(o,h,{default:()=>m}),N={default:()=>S};N.label=i.slots.default,N.prepend=i.slots.prepend,N.append=i.slots.append,N.fixedPreTip=i.slots.fixedPreTip,N.fixedTip=i.slots.fixedTip;const w={...be(r,ge,pe)};return r.prop&&(w.prop=`${r.prop}_item`),t.h(a,w,N)}}else return()=>{const f=i.slots.options?.()??[];return t.h(o,{class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:d.value,modelValue:v,"update:modelValue":y},{default:()=>f})}}}}const{componentName:Wf,create:Yf,scope:Xf}=J("radio-item"),fl=Yf(jf(Wf,Xf,we,Zn,Gn)),Qf=(e,{CheckNormal:n,Checked:a,Indeterminate:o})=>({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(l,{slots:r}){const{emitEvent:i}=Vt(),s=Pn(),c=t.inject("parent",null),d=t.reactive({partialSelect:l.indeterminate});t.watch(()=>l.indeterminate,h=>{d.partialSelect=h});const p=t.computed(()=>!!c),u=t.computed(()=>p.value?c.value.value.includes(l.label):!!l.modelValue),g=t.computed(()=>p.value?c.position:l.textPosition);let k="";const v=(h,S)=>{k="click",i("update:modelValue",h),i("change",h,S)};t.watch(()=>l.modelValue,h=>{k=="click"?k="":i("change",h)});const y=()=>{const h=[];if(d.partialSelect){if(r.indeterminateIcon)return r.indeterminateIcon();{const S=de(l.iconSize),N=l.indeterminateIcon??s.checkbox.Indeterminate??o;return h.push("fox-checkbox__icon--indeterminate"),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h(N,{width:S,height:S,class:h})}}else if(u.value){if(r.checkedIcon)return r.checkedIcon();{const S=de(l.iconSize),N=l.checkedIcon??s.checkbox.Checked??a;return h.push("fox-checkbox__icon"),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h(N,{width:S,height:S,class:h})}}else{if(r.icon)return r.icon();{const S=de(l.iconSize),N=l.icon??s.checkbox.CheckNormal??n;return h.push("fox-checkbox__icon--unchecked"),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h(N,{width:S,height:S,class:h})}}},b=()=>{const h=[`${e}__label`];return l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h("view",{class:h},r.default?.())},f=()=>{const h=[`${e}__button`];return u.value&&h.push(`${e}__button--active`),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h("view",{class:h},r.default?.())},m=h=>{if(!(l.disabled||l.readonly)){if(u.value&&d.partialSelect){d.partialSelect=!1,v(u.value,r.default?.()[0].children);return}if(v(!u.value,r.default?.()[0].children),p.value){const S=c.value.value,N=c.max.value,{label:C}=l,w=S.indexOf(C);w>-1?S.splice(w,1):w<=-1&&(S.length<N||!N)&&S.push(C),c.updateValue(S)}}};return t.onMounted(()=>{p.value&&c.link(t.getCurrentInstance())}),t.onBeforeUnmount(()=>{p.value&&c.unlink(t.getCurrentInstance())}),()=>t.h("view",{class:`${e} ${e}--${l.shape} ${g.value==="left"?`${e}--reverse`:""}`,onClick:m},[l.shape=="button"?f():[y(),b()]])}}),{componentName:Gf,create:Zf}=J("checkbox"),Jn=Zf(Qf(Gf,{CheckNormal:oe.CheckNormal,Checked:oe.Checked,Indeterminate:oe.CheckDisabled})),{create:Jf,componentName:vr}=J("checkbox-group"),_n=Jf({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:n}){const{emitEvent:a}=Vt(),o=t.reactive({children:[]}),l=d=>{d.proxy&&o.children.push(d.proxy)},r=d=>{d.proxy&&(o.children=o.children.filter(p=>p!==d.proxy))},i=d=>{a("update:modelValue",d),a("change",d)},s=d=>{const p=[];d&&o.children.forEach(u=>{u?.disabled||p.push(u?.label)}),a("update:modelValue",p)},c=()=>{const d=o.children.filter(p=>p?.disabled?!1:!e.modelValue.includes(p.label)).map(p=>p.label);a("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:i,link:l,unlink:r}),t.watch(()=>e.modelValue,d=>{a("change",d)}),Ie({toggleAll:s,toggleReverse:c}),()=>{const d={};return e.textAlign&&(d["text-align"]=e.textAlign),t.h("view",{class:`${vr} ${vr}--${e.direction}`,style:d},n.default?.())}}});function br(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(Po(e,r)===a)return l}else if(o==="item"){if(Pe(a,r))return l}else if(un(e,r)===a)return l}return-1}function Po(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function un(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function _f(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function em(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let tm=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);let l=et(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(xe(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function nm(){const e=t.getCurrentInstance();return new tm(e.proxy)}function om(e){return{text:e,value:e}}const lm={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},kr={icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},shape:{type:String,default:"round"}},am={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:[]}};function rm(e,n,a,o,l){return{props:{...pe,...ge,...lm,...kr,...am},emits:["change","update:modelValue","setValue"],setup(r,i){const s=$e(t.computed(()=>r.disabled)),c=Te(t.computed(()=>r.readonly)),d=Ve(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Ae({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return c.value},get disabled(){return s.value}},r.prop??i.attrs.name),u=nm(),g=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,m])=>{if(f){const h=await u.load("checkbox",f,m);if(h.length>0)if(typeof h[0]=="string"){const C=h.map(w=>om(w));g.value=C}else g.value=h;else g.value=[]}},{immediate:!0});const k=t.ref([]);t.watch([()=>r.modelValue,()=>g.value],async([f,m])=>{const h=[];Array.isArray(f)&&f.forEach(S=>{let N=br(r,m,S,r.valueType);N!==-1&&h.push(N)}),!Pe(h,k.value)&&(k.value=h,p("setValue",h))},{deep:!0});const v=t.computed(()=>{if(!r.source)return r.modelValue;let f=[];return k.value.forEach(m=>{let h=g.value[m];f.push(un(r,h))}),f}),y=f=>{let m=[],h=[];if(g.value.length>0){const S=[];Array.isArray(f)&&f.forEach(N=>{let C=br(r,g.value,N,"value");C!==-1&&S.push(C);const w=g.value[C];h.push(w),r.valueType==="text"?m.push(Po(r,w)):r.valueType==="item"?m.push(w):m.push(un(r,w))}),k.value=S}else m=f;p("update:modelValue",m),p("change",m,h)},b=t.ref();if(Ie({toggleAll:f=>{b.value.toggleAll(f)},toggleReverse:()=>{b.value.toggleReverse()}}),r.source){const f=()=>{const m=[],h=be(r,kr);return g.value.forEach((S,N)=>{const C=un(r,S),w=_f(r,S);let B={...h,label:C,disabled:w};const A=em(r,S,N);B={...B,...A},s.value&&(B.disabled=!0),c.value&&(B.readonly=!0);const T={};if(i.slots.icon&&(T.icon=i.slots.icon),i.slots.checkedIcon&&(T.checkedIcon=i.slots.checkedIcon),i.slots.indeterminateIcon&&(T.indeterminateIcon=i.slots.indeterminateIcon),typeof i.slots.text=="function"){const q=i.slots.text(S);T.default=()=>[q]}else{const q=Po(r,S);T.default=()=>q}let $=t.h(l,B,T);m.push($)}),m};return()=>{const m=f(),h={class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,modelValue:v.value,"onUpdate:modelValue":y},S=t.h(o,h,{default:()=>m}),N={default:()=>S};N.label=i.slots.default,N.prepend=i.slots.prepend,N.append=i.slots.append,N.fixedPreTip=i.slots.fixedPreTip,N.fixedTip=i.slots.fixedTip;const w={...be(r,ge,pe)};return r.prop&&(w.prop=`${r.prop}_item`),t.h(a,w,N)}}else return()=>{const f=i.slots.options?.()??[];return t.h("view",{class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,textAlign:d.value,modelValue:v,"onUpdate:modelValue":y},{default:()=>f})}}}}const{componentName:sm,create:im,scope:cm}=J("checkbox-item"),ml=im(rm(sm,cm,we,_n,Jn)),Mo={modelValue:{type:[String,Boolean,Number],default:!1},disabled:{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:um,create:dm}=J("switch"),fm=dm({components:{Loading1:oe.Loading1},props:{...Mo},emits:["change","update:modelValue","update:loading"],setup(e,{emit:n}){const a=t.computed(()=>e.modelValue===e.activeValue),o=t.computed(()=>{const s=um;return{[s]:!0,[a.value?"fox-switch-open":"fox-switch-close"]:!0,[`${s}-base`]:!0,"is-disabled":e.disabled}}),l=t.computed(()=>({backgroundColor:a.value?e.activeColor:e.inactiveColor}));let r="";const i=s=>{if(e.disabled||e.loading)return;r="click";const c=a.value?e.inactiveValue:e.activeValue;n("update:modelValue",c),n("change",c,s)};return t.watch(()=>e.modelValue,s=>{r=="click"?r="":n("change",s)}),{classes:o,style:l,isActive:a,onClick:i}}}),mm={class:"fox-switch-button"};function pm(e,n,a,o,l,r){const i=t.resolveComponent("Loading1");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onClick:n[0]||(n[0]=(...s)=>e.onClick&&e.onClick(...s)),style:t.normalizeStyle(e.style)},[t.createElementVNode("view",mm,[e.loading?t.renderSlot(e.$slots,"icon",{key:0},()=>[t.createVNode(i,{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 eo=ne(fm,[["render",pm]]);function hm(e,n,a,o){return{props:{...pe,...ge,...Mo},emits:["change","update:modelValue","setValue"],setup(l,r){const i=$e(t.computed(()=>l.disabled)),s=Te(t.computed(()=>l.readonly)),{emitEvent:c}=Ae({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),d=e,p=qe(l,"modelValue",null,c),u=g=>{p.value=g,c("update:modelValue",g,{}),c("change",g,{})};return()=>{const k={...be(l,Mo),disabled:i.value||s.value,value:p.value,"onUpdate:modelValue":u},v=[],y=t.h(o,k);v.push(y);const b={default:()=>v};b.label=r.slots.default,b.fixedPreTip=r.slots.fixedPreTip,b.fixedTip=r.slots.fixedTip;const m={...be(l,ge,pe)};return l.prop&&(m.prop=`${l.prop}_item`),m["content-class"]=d,t.h(a,m,b)}}}}const{componentName:gm,create:ym,scope:vm}=J("switch-item"),pl=ym(hm(gm,vm,we,eo));function bm(e,n,a,o){return{props:{...pe,...ge,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","change"],setup(l,r){const i=$e(t.computed(()=>l.disabled)),s=Te(t.computed(()=>l.readonly)),{emitEvent:c}=Ae({componentName:e,validateCheckEvents:["change"],validateResetEvents:["focus"],get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),{toLocaleRefs:d}=se.useFoxI18n(n),p=d(l,["placeholder"]),u=t.ref(l.modelValue);t.watch(()=>l.modelValue,q=>{u.value=q,c("change",q)});const g=t.computed(()=>({[`${e}`]:!0})),k=t.computed(()=>({[`${e}__main`]:!0,[`${e}__placeholder`]:!i.value&&ue(u.value),"is-disabled":i.value,"is-readonly":s.value})),v=Ve(t.computed(()=>l.textAlign),"textAlign"),y=t.computed(()=>{const q={};return v.value&&(q["text-align"]=v.value),q}),b=t.computed(()=>!ue(l.modelValue)||r.slots.main?!0:!!ue(l.desc)),f=t.computed(()=>ue(u.value)?p.placeholder.value:u.value),m=t.computed(()=>!ue(l.desc)||r.slots.sub),h=t.computed(()=>({[`${e}__sub`]:!0})),S=t.computed(()=>{const q={};return v.value&&(q["text-align"]=v.value),q}),N=()=>{c("focus",u.value)},C=()=>{c("blur",u.value)},w=t.computed(()=>({[`${e}__append`]:!0,"is-disabled":i.value,"is-readonly":s.value})),B=t.computed(()=>ve(l.unit)>0),A=q=>{i.value==!0||s.value==!0||c("click")},T=t.computed(()=>l.icon??a),$=t.computed(()=>({action:!0}));return()=>{const q=[];if(typeof r.slots.content=="function"){const P=r.slots.content();q.push(P)}else{const P=[];if(b.value){const L={tabIndex:0,class:k.value,style:y.value,onFocus:N,onBlur:C};let O=null;r.slots.main?O=t.h("view",L,[r.slots.main(f.value)]):O=t.h("view",L,[f.value]),P.push(O)}if(m.value){const L={tabIndex:0,class:h.value,style:S.value,onFocus:N,onBlur:C};let O=null;r.slots.sub?O=t.h("view",L,[r.slots.sub(l.desc)]):O=t.h("view",L,[l.desc]),P.push(O)}const D={class:g.value,onClick:A},W=t.h("view",D,P);q.push(W)}const R=[],V=de(l.iconSize);let E=r.slots.icon;if(!E){const P={width:V,height:V,class:["action-icon"]};E=t.h(T.value,P)}const M={class:$.value,onClick:A},x=t.h("view",M,{default:()=>[E]});if(R.push(x),B.value){const P=t.h("view",{},[l.unit]);R.push(P)}const j={class:w.value},H=t.h("view",j,{default:()=>R});q.push(H);const z={default:()=>q};z.label=r.slots.default,z.prepend=r.slots.prepend,z.append=r.slots.append,z.fixedPreTip=r.slots.fixedPreTip,z.fixedTip=r.slots.fixedTip;const U={...be(l,ge,pe)};return l.prop&&(U.prop=`${l.prop}_item`),t.h(o,U,z)}}}}const{componentName:km,create:Sm,scope:Cm}=J("link-item"),hl=Sm(bm(km,Cm,oe.ArrowRight,we)),Lo={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:wm,componentName:Nm}=J("rate"),Bm=wm({props:{...Lo},emits:["update:modelValue","change"],setup(e,{emit:n,slots:a}){const o=t.ref([]),l=t.computed(()=>({[Nm]:!0})),r=k=>{n("update:modelValue",k),n("change",k)},i=(k,v)=>{if(e.disabled||e.readonly)return;let y=0;v===1&&e.modelValue===v||(y=v,e.allowHalf&&k==2&&(y-=.5)),r(y)},s=(k,v,y)=>{let b=0;for(let f=v.value.length-1;f>=0;f--){const m=v.value[f];if(k>m.offsetLeft){y?b=f+(k>m.offsetLeft+m.clientWidth/2?1:.5):b=f+1;break}}return b},c=tt(),d={onTouchStart(k){!e.touchable||e.readonly||c.start(k)},onTouchMove(k){e.touchable&&(c.move(k),c.isHorizontal()&&o.value&&(k.preventDefault(),r(s(c.moveX.value,o,e.allowHalf))))}},p=Math.random().toString(36).slice(-8),u=t.computed(()=>e.customIcon??oe.StarFillN);return{classes:l,...d,onClick:i,toPxDesc:he,renderIcon:(k,v)=>t.h(k,v),rateRefs:o,refRandomId:p,slots:a,customIcon:u}}}),Am=["id"],Vm={class:"fox-rate-item__icon--full"},Tm={key:0,class:"fox-rate-item__icon--half"},$m={key:1,class:"fox-rate-item__icon--half"};function Em(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onTouchstart:n[0]||(n[0]=(...i)=>e.onTouchStart&&e.onTouchStart(...i)),onTouchmove:n[1]||(n[1]=(...i)=>e.onTouchMove&&e.onTouchMove(...i))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Number(e.count),i=>(t.openBlock(),t.createElementBlock("view",{class:"fox-rate-item",key:i,ref_for:!0,ref:"rateRefs",id:"rateRefs-"+e.refRandomId+i,style:t.normalizeStyle(i<Number(e.count)?{marginRight:e.toPxDesc(e.spacing)}:{})},[t.createElementVNode("view",Vm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:i<=e.modelValue?e.activeColor:e.voidColor})),{class:t.normalizeClass(["fox-rate-item__icon",{"fox-rate-item__icon--disabled":e.disabled||i>e.modelValue}]),onClick:s=>e.onClick(1,i)},null,8,["class","onClick"]))]),e.allowHalf&&Number(e.modelValue)+1>i?(t.openBlock(),t.createElementBlock("view",Tm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:i<=Number(e.modelValue)+1?e.activeColor:e.voidColor})),{class:"fox-rate-item__icon",onClick:s=>e.onClick(2,i)},null,8,["onClick"]))])):e.allowHalf&&Number(e.modelValue)+1<i?(t.openBlock(),t.createElementBlock("view",$m,[(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:s=>e.onClick(2,i)},null,8,["onClick"]))])):t.createCommentVNode("",!0)],12,Am))),128))],34)}const wt=ne(Bm,[["render",Em]]);function xm(e,n,a,o){return{props:{...pe,...ge,...Lo},emits:["change","update:modelValue","setValue"],setup(l,r){const i=$e(t.computed(()=>l.disabled)),s=Te(t.computed(()=>l.readonly)),{emitEvent:c}=Ae({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),d=e,p=qe(l,"modelValue",null,c),u=g=>{p.value=g,c("update:modelValue",g,{}),c("change",g,{})};return()=>{const k={...be(l,Lo),disabled:i.value,readonly:s.value,value:p.value,"onUpdate:modelValue":u},v=[],y=t.h(o,k);v.push(y);const b={default:()=>v};if(r.slots.default){const h=r.slots.default();b.label=()=>h}const f=be(l,ge,pe);return l.prop&&(f.prop=`${l.prop}_item`),f["content-class"]=d,t.h(a,f,b)}}}}const{componentName:Dm,create:Im,scope:qm}=J("rate-item"),gl=Im(xm(Dm,qm,we,wt)),Pm=/scroll|auto|overlay/i,Is=window;function Mm(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function zo(e,n=Is){let a=e;for(;a&&a!==n&&Mm(a);){const{overflowY:o}=window.getComputedStyle(a);if(Pm.test(o))return a;a=a.parentNode}return n}function qs(e,n=Is){const a=t.ref();return t.onMounted(()=>{e.value&&(a.value=zo(e.value,n))}),a}const Ps=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,Lm={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},immediate:{type:[Boolean],default:!1}};function zm(e,n,a){return{props:{...Lm},emits:["scroll-change","load-more","update:modelValue"],setup(o,{emit:l,slots:r}){const{toLocaleRefs:i}=se.useFoxI18n(n),s=i(o,["pullText","loadText","loadMoreText"]),c=t.ref(),d=qs(c),p=t.reactive({beforeScrollTop:0,isInfiniting:!1,y:0,x:0,distance:0}),u=t.computed(()=>({[e]:!0})),g=m=>m?m.offsetTop+g(m.offsetParent):0,k=()=>{let m=0,h=0,S="down";if(d.value==window){const N=Ps();c.value&&(m=g(c.value)+c.value.offsetHeight-N-window.innerHeight),h=N}else{const{scrollHeight:N,clientHeight:C,scrollTop:w}=d.value;m=N-C-w,h=w}return p.beforeScrollTop>h?S="up":S="down",p.beforeScrollTop=h,l("scroll-change",h),m<=o.threshold&&S=="down"},v=()=>{Xe(()=>{if(!k()||!o.hasMore||p.isInfiniting)return!1;p.isInfiniting=!0,l("update:modelValue",!0),t.nextTick(()=>l("load-more"))})},y=()=>{d.value&&d.value.addEventListener("scroll",v,o.useCapture)},b=()=>{d.value&&d.value.removeEventListener("scroll",v,o.useCapture)};t.onMounted(()=>{y(),o.immediate&&v()}),t.onUnmounted(()=>{b()});const f=t.ref(!1);return t.onActivated(()=>{f.value&&(f.value=!1,y())}),t.onDeactivated(()=>{f.value=!0,b()}),t.watch(()=>o.modelValue,m=>{m||(p.isInfiniting=!1)}),()=>{const m={class:"fox-infinite__container"},h=t.h("view",m,[r?.default?.()]),S=[];if(p.isInfiniting){let B=r?.loading?.()??null;if(!B){let $=r?.loadingIcon?.()??null;if(!$){const V={class:["fox-infinite__bottom-box__img"]};$=t.h(a,V)}const q={class:"fox-infinite__bottom-box__text"},R=t.h("view",q,[s.loadText.value]);B=[$,R]}const A={class:"fox-infinite__bottom-box"},T=t.h("view",A,B);S.push(T)}else if(!o.hasMore){let B=r?.finished?.()??null;if(!B){const A={class:"fox-infinite__bottom-tips"};B=t.h("view",A,[s.loadMoreText.value]),S.push(B)}}const N={class:"fox-infinite__bottom"},C=t.h("view",N,S),w={class:u.value,ref:c};return t.h("view",w,[h,C])}}}}const{componentName:Om,create:Fm,scope:Rm}=J("infinite-loading"),to=Fm(zm(Om,Rm,oe.Loading)),{componentName:Km,create:Um}=J("button"),Hm=Um({components:{Loading:oe.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:n,slots:a}){const{type:o,size:l,shape:r,disabled:i,loading:s,color:c,plain:d,block:p}=t.toRefs(e),u=v=>{!s.value&&!i.value&&n("click",v)},g=t.computed(()=>{const v=Km;return{[v]:!0,[`${v}--${o.value}`]:o.value,[`${v}--${l.value}`]:l.value,[`${v}--${r.value}`]:r.value,[`${v}--plain`]:d.value,[`${v}--block`]:p.value,[`${v}--disabled`]:i.value,[`${v}--loading`]:s.value}}),k=t.computed(()=>{const v={};return c?.value&&(d.value?(v.color=c.value,v.background="#fff",c.value?.includes("gradient")||(v.borderColor=c.value)):(v.color="#fff",v.background=c.value)),v});return{handleClick:u,classes:g,getStyle:k}}}),jm={class:"fox-button__wrap"};function Wm(e,n,a,o,l,r){const i=t.resolveComponent("Loading");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.getStyle),onClick:n[0]||(n[0]=(...s)=>e.handleClick&&e.handleClick(...s))},[t.createElementVNode("view",jm,[e.loading?(t.openBlock(),t.createBlock(i,{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 Le=ne(Hm,[["render",Wm]]),Ym={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},background:{type:String,default:""},inputBackground:{type:String,default:""},focusStyle:{type:Object,default:()=>({})},autofocus:{type:Boolean,default:!1},autoblur:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inputAlign:{type:String,default:"left"}},Xm=(e,n,a)=>({props:{...Ym},emits:["change","update:modelValue","blur","focus","clear","search","click-input","keyup-input","click-left-icon","click-right-icon"],setup(o,{slots:l}){const{emitEvent:r}=Vt(),{toLocaleRefs:i}=se.useFoxI18n(n),s=i(o,["placeholder"]),c=t.reactive({active:!1}),d=t.computed(()=>({background:o.background})),p=t.computed(()=>({background:o.inputBackground})),u=A=>{let $=A.target.value;o.maxLength&&$.length>Number(o.maxLength)&&($=$.slice(0,Number(o.maxLength))),r("update:modelValue",$,A),r("change",$,A)},g=t.ref({}),k=A=>{let $=A.target.value;c.active=!0,g.value=o.focusStyle,r("focus",$,A)},v=A=>{setTimeout(()=>{c.active=!1},0);let $=A.target.value;o.maxLength&&$.length>Number(o.maxLength)&&($=$.slice(0,Number(o.maxLength))),g.value={},r("blur",$,A)},y=A=>{r("update:modelValue","",A),r("change","",A),r("clear","")},b=t.computed(()=>String(o.modelValue).length>0),f=t.computed(()=>{const A={};return b.value||(A.display="none"),A}),m=A=>{o.autoblur&&w.value?.blur(),(typeof A.cancelable!="boolean"||A.cancelable)&&A.preventDefault(),r("search",o.modelValue)},h=A=>{r("keyup-input",A)},S=A=>{r("click-input",A)},N=A=>{r("click-left-icon",o.modelValue,A)},C=t.computed(()=>({textAlign:o.inputAlign})),w=t.ref(null);t.onMounted(()=>{o.autofocus&&w.value.focus()});const B=()=>{const A=[];if(l.leftin){const M={class:[`${e}__search-icon`,`${e}__input-left-search-icon`],onClick:N},x=t.h("view",M,[l.leftin()]);A.push(x)}const T={class:`${e}__input-inner-input`,ref:w,style:C.value,type:o.inputType,maxlengt:o.maxLength,placeholder:s.placeholder.value,value:o.modelValue,disabled:o.disabled,readonly:o.readonly,onClick:S,onInput:u,onFocus:k,onBlur:v,onkeyup:h},$=t.h("input",T),q={class:[`${e}__input-inner`],action:"#",onSubmit:m},R=t.h("form",q,[$]);A.push(R);const V=[];if(o.clearable){const M={class:[`${e}__search-icon`,`${e}__input-clear-icon`],style:f.value,onClick:y},x=l?.clear?.()??o.clearIcon??a,j=t.h("view",M,[t.h(x)]);V.push(j)}if(l.rightin){const M={class:[`${e}__search-icon`,`${e}__input-right-search-icon`]},x=t.h("view",M,[l.rightin()]);V.push(x)}if(V.length>0){const M={class:`${e}__input-inner-right`},x=t.h("view",M,V);A.push(x)}const E={class:[`${e}__search-input`,`${o.shape}`],style:{...p.value,...g.value}};return t.h("view",E,A)};return()=>{const A=[];if(o.label){const q={class:`${e}__search-label`},R=t.h("span",q,[o.label]);A.push(R)}if(l.leftout){const q={class:[`${e}__search-icon`,`${e}__left-search-icon`]},R=t.h("view",q,[l.leftout()]);A.push(R)}const T=B();if(A.push(T),l.rightout){const q={class:[`${e}__search-icon`,`${e}__right-search-icon`]},R=t.h("view",q,[l.rightout()]);A.push(R)}const $={class:`${e}`,style:d.value};return t.h("view",$,A)}}}),{componentName:Qm,create:Gm,scope:Zm}=J("searchbar"),no=Gm(Xm(Qm,Zm,oe.CircleClose)),dn={poppable:{type:[Boolean],default:!1},modelValue:{type:[Array,Number,String,Object],default(){return[]}},visible:{type:[Boolean]},disabled:{type:[Boolean,String],required:!1},textPosition:{type:[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},searchDelayTriggerClear:{type:Number,default:250},popClass:{type:String,required:!1},popCloseable:{type:Boolean,required:!1,default:!0},beforeMethod:{type:Function},beforeClose:{type:Function}};function Jm(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(fn(e,r)===a)return l}else if(o==="item"){if(Pe(a,r))return l}else if(Ms(e,r)===a)return l}return-1}function fn(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Sr(e,n){return typeof e.subTextKey=="string"&&e.subTextKey.length>0?n[e.subTextKey]:n.text}function Ms(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function _m(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function ep(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let tp=class{proxy;constructor(n){this.proxy=n}async load(n,a,o,l,r,i,s){if(Array.isArray(a)){let d=a;typeof s=="function"&&(d=d.filter(s));let p=(o-1)*l,u=p+l;u>d.length&&(u=d.length);const g=d.slice(p,u);return{totalSize:d.length,page:g}}if(typeof a=="function")return await Reflect.apply(a,null,[o,l,r,i]);const c=et(this.proxy,n);return c===null?(console.error(`${n} component not found api function`),{totalSize:0,page:[]}):(xe(r)&&t.isReactive(r)&&(r=t.toRaw(r)),await Reflect.apply(c,null,[a,o,l,r]))}};function np(){const e=t.getCurrentInstance();return new tp(e.proxy)}function op(e,n,a,o,l,r,i,s,c,d,p){return{props:{...dn},emits:["change","update:modelValue","update:text","loaded-data","update:visible"],setup(u,{slots:g}){const{emitEvent:k}=Vt(),{toLocaleRefs:v}=se.useFoxI18n(n),y=v(u,["title","loadText","loadMoreText","seachPlaceholder","confirmText"]),b=np(),f=t.ref([]),m=t.ref(0),h=t.ref(""),S=t.shallowRef(null),N=t.computed(()=>{const F={};return u.params&&Object.assign(F,u.params),ue(h.value)||(F[`${u.searchKey}`]=h.value),S.value&&Object.assign(F,S.value),F});let C=!0;const w=async(F,Y,X)=>{try{if(A.value===!1)return;let K=null;ue(h.value)||(K=ee=>{const le=fn(u,ee);if(typeof le=="string"&&le.includes(h.value))return!0;const re=Sr(u,ee);return!!(typeof re=="string"&&re.includes(h.value))});const Z=await b.load("actionsheet",F,Y,X,N.value,C,K??void 0);C=!1,Array.isArray(Z)?(f.value=Z,m.value=1,A.value=!1):!Array.isArray(Z.page)||Z.page.length===0?(console.warn("[FoxUI] can not load more data"),A.value=!1):(Reflect.apply([].push,f.value,Z.page),m.value=Math.ceil(f.value.length/u.pageSize),(Z.totalSize&&f.value.length>=Z.totalSize||X<Z.page.length)&&(A.value=!1)),B.value=!1}catch(K){console.error("[FoxUI] ActionSheet load more data fail",K),A.value=!0,m.value=0,f.value=[]}setTimeout(()=>{k("loaded-data")},250)},B=t.ref(!1),A=t.ref(!0),T=async()=>{if(!u.source){B.value=!1;return}await w(u.source,m.value+1,u.pageSize)};let $=null;t.watch(h,(F,Y)=>{$&&(clearTimeout($),$=null),ue(F)&&!ue(Y)&&($=setTimeout(()=>{R()},u.searchDelayTriggerClear))});const q=()=>{A.value=!0,m.value=0,f.value=[],u.source&&T()},R=()=>{q()};t.watch([()=>u.source,()=>u.pageSize,()=>u.params],async([F,Y,X])=>{u.source&&q()},{immediate:!0});const V=t.computed(()=>!u.multiple&&u.isAutoBackFill),E=t.ref([]);let M=null;const x=t.ref(u.visible);t.watch(()=>u.visible,F=>{x.value!==F&&(x.value=F),F?M=[...E.value]:M=null});const j=(F,Y)=>{const X=[];return Array.isArray(F)||(F=[F]),F.forEach(K=>{let Z=Jm(u,Y,K,u.valueType);Z!==-1&&X.push(Z)}),Pe(X,E.value)?!1:(E.value=X,!0)};t.watch([()=>u.modelValue,()=>f.value],([F,Y],[X,K])=>{if(j(F,Y)){const ee=H();z(ee)}},{deep:!0});const H=()=>{const F=[],Y=[],X=[];for(let le of E.value){const re=f.value[le];Y.push(re);const ce=fn(u,re);if(X.push(ce),u.valueType==="item")F.push(re);else if(u.valueType==="text")F.push(ce);else{const Ne=Ms(u,re);F.push(Ne)}}let K=null,Z=null,ee=null;return u.multiple?(K=F,Z=X,ee=Y):(K=F[0]??null,Z=X[0]??null,ee=Y[0]??null),{value:K,text:Z,item:ee}},z=F=>{k("update:modelValue",F.value),k("update:text",F.text),k("change",F.value,F.item,F.text)},_=()=>{M&&(E.value=M)},U=F=>{const Y=E.value.indexOf(F);u.multiple?Y===-1?E.value.push(F):E.value.splice(Y,1):Y===-1?E.value=[F]:E.value=[],(V.value||!u.poppable&&!u.showFooter)&&D()},I=F=>{x.value=F,k("update:visible",F)},P=()=>{const F=()=>{_(),I(!1)},Y=u.beforeMethod??u.beforeClose;if(typeof Y=="function"){const X=Y("close");bt(X)?X.then(K=>{K!==!1&&F()}).catch(()=>{F()}):X!==!1&&F()}else F()},D=()=>{const F=H(),Y=()=>{z(F),I(!1)},X=u.beforeMethod??u.beforeClose;if(typeof X=="function"){const K=X("confirm",F.value,F.item,F.text);bt(K)?K.then(Z=>{Z!==!1&&Y()}).catch(()=>{Y()}):K!==!1&&Y()}else Y()},W=()=>{let F=y.title.value??"";g.title&&(F=g.title());const Y=t.h("view",{class:["fox-actionsheet__header-title"]},[F]),X=t.h(c,{class:["fox-actionsheet__header-icon"],onClick:P});return t.h("view",{class:["fox-actionsheet__header"]},[Y,X])},L=()=>{let F=null;if(g.search)F=g.search();else{const Y={onSearch:q,placeholder:y.seachPlaceholder.value,disabled:u.disabled,modelValue:h.value,"onUpdate:modelValue":X=>{h.value=X}};F=t.h(r,Y,{leftin:()=>t.h(d)})}return t.h("view",{class:["fox-actionsheet__searchbar"]},[F])},O=(F,Y,X,K,Z)=>{if(g.optionLabel)return g.optionLabel({text:F,checked:Y,disabled:X,subText:K,item:Z});const ee=[],le=t.h("view",{class:"fox-actionsheet__list-item-text"},[F]);if(ee.push(le),K){const re=t.h("view",{class:"fox-actionsheet__list-item-subtext"},[K]);ee.push(re)}return t.h("view",{class:["fox-actionsheet__list-item-label"]},ee)},Q=(F,Y,X,K)=>{if(g.optionIcon)return g.optionIcon({checked:F,disabled:Y,iconSize:X,item:K});if(F){if(g.checkedIcon)return g.checkedIcon({disabled:Y,item:K});{const Z=u.checkedIcon??s;return t.h(Z,{width:X,height:X,class:["fox-actionsheet__list-item-icon"]})}}else{if(g.icon)return g.icon({disabled:Y,item:K});{const Z=u.icon??i;return t.h(Z,{width:X,height:X,class:["fox-actionsheet__list-item-icon"]})}}},G=()=>{const F=[];for(let Y=0;Y<f.value.length;Y++){const X=f.value[Y],K=fn(u,X),Z=Sr(u,X),ee=["fox-actionsheet__list-item"],le={};let re=_m(u,X),ce=u.iconSize?de(u.iconSize):null;const Ne=ep(u,X,Y);Ne&&(re=re||Ne.disabled,Ne.class&&ee.push(Ne.class),Ne.style&&Object.assign(le,Ne.style)),re=!!(u.disabled||re);const Ce=E.value.includes(Y);re&&ee.push("is-disabled"),Ce&&ee.push("is-checked");const en={class:ee,style:le,key:`${Y}`,onClick:()=>{re||U(Y)}};let nt=[];if(g.option)nt.push(g.option({item:X,checked:Ce,disabled:re}));else{const js=O(K,Ce,re,Z,X);nt.push(js);const Ws=Q(Ce,re,ce,X);nt.push(Ws),u.textPosition==="right"&&nt.reverse()}const Hs=t.h("view",en,nt);F.push(Hs)}return F},te=()=>{let F=[];if(g.buttons)F=g.buttons();else{const X=t.h(l,{type:"primary",block:"block",onClick:D,disabled:u.disabled},{default:()=>y.confirmText.value});F.push(X)}return t.h("view",{class:"fox-actionsheet__footer"},[F])};return Ie({search:async(F=null,Y=!0)=>{S.value=F&&t.toRaw(F),t.triggerRef(S),Y&&(A.value=!0,m.value=0,f.value=[]),t.nextTick(()=>{T()})},clear:()=>{A.value=!0,m.value=0,f.value=[]},confirm:()=>{D()},cancel:()=>{P()}}),()=>{const F=[];if(u.showHeader){const ce=W();F.push(ce)}if(u.showSearchbar){const ce=L();F.push(ce)}let Y=null;if(g.content)Y=g.content();else{const ce=G(),Ne={hasMore:A.value,loadText:y.loadText.value,loadMoreText:y.loadMoreText.value,modelValue:B.value,"onUpdate:modelValue":Ce=>{B.value=Ce},onLoadMore:T};Y=t.h(o,Ne,{default:()=>ce})}const X={};u.optionsHeight&&(X.height=u.optionsHeight);const K={"fox-actionsheet__list":!0};u.poppable||(K["fox-actionsheet__list--inner"]=!0);const Z=t.h("view",{class:K,style:X},[Y]);if(F.push(Z),u.showFooter&&!V.value){const ce=te();F.push(ce)}const ee=t.h("view",{class:"fox-actionsheet"},F);if(!u.poppable)return ee;const le=["fox-actionsheet__popup"];u.popClass&&le.push(u.popClass);const re={popClass:le.join(" "),visible:x.value,closeable:!1,"onUpdate:visible":I,position:u.position,round:"round",onClickOverlay:P,closeOnClickOverlay:u.closeOnClickOverlay};return t.h(a,re,{default:()=>ee})}}}}const{componentName:lp,create:ap,scope:rp}=J("actionsheet-pane"),oo=ap(op(lp,rp,fe,to,Le,no,oe.CheckNormal,oe.Checked,oe.Close,oe.Search2)),Cr={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 sp(e,n,a,o,l,r,i){return{props:{...pe,...ge,...Cr,...dn},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(s,c){const d=$e(t.computed(()=>s.disabled)),p=Te(t.computed(()=>s.readonly)),{emitEvent:u}=Ae({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return d.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=se.useFoxI18n(n),k=g(s,["placeholder"]),v=t.ref(!1),y=qe(s,"modelValue",null,u),b=t.ref(""),f=t.computed(()=>Array.isArray(b.value)?b.value.join(s.separator):b.value),m="fox-input-item",h=t.computed(()=>({[m]:!0,"is-disabled":d.value,"is-readonly":p.value})),S=Ve(t.computed(()=>s.textAlign),"textAlign"),N=t.computed(()=>{const D={};return S.value&&(D["text-align"]=S.value),D}),C=t.ref(!1),w=()=>{C.value=!0},B=D=>{C.value=D},A=D=>{y.value=D,u("update:modelValue",D)},T=(D,W)=>{u("change",D,W)},$=D=>{let L=D.target.value;v.value=!0,u("focus",L,D)},q=D=>{setTimeout(()=>{v.value=!1},0);let L=D.target.value;s.maxLength&&L.length>Number(s.maxLength)&&(L=L.slice(0,Number(s.maxLength))),u("blur",L,D)},R=D=>{b.value=D,u("update:text",D)},V=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":d.value,"is-readonly":p.value})),E=t.computed(()=>ve(s.unit)>0),M=t.computed(()=>ve(s.unit)>0&&!v.value),x=t.computed(()=>({hidden:!M.value})),j=D=>{y.value="",u("update:modelValue","",D),u("change","",D),u("clear","")},H=t.computed(()=>s.clearable&&!d.value&&!p.value),z=t.computed(()=>ve(y.value)>0&&v.value),_=D=>{z.value?j(D):w()},U=t.computed(()=>z.value&&H.value?o:l),I=t.computed(()=>({action:!0})),P=t.ref(null);return Ie({search:D=>{P.value&&P.value.search(D)},clear:()=>{P.value&&P.value.clear},confirm:D=>{P.value&&P.value.confirm()},cancel:()=>{P.value&&P.value.cancel()}}),()=>{const D={class:h.value,style:N.value,type:"text",maxlength:s.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:w,onFocus:$,onBlur:q},W=[],L=t.h("input",D);W.push(L);const O=[],Q={class:["action-icon"]},G=t.h(U.value,Q),te={class:I.value,onClick:_},F=t.h("view",te,{default:()=>[G]});if(O.push(F),E.value){const Ce=t.h("view",{class:x.value},[s.unit]);O.push(Ce)}const Y={class:V.value},X=t.h("view",Y,{default:()=>O});W.push(X);const K={default:()=>W};K.label=c.slots.default,K.prepend=c.slots.prepend,K.append=c.slots.append,K.fixedPreTip=c.slots.fixedPreTip,K.fixedTip=c.slots.fixedTip;const Z=be(s,dn);Z.ref=P,Z.class=s.actionsheetProps,Z.disabled=d.value||p.value,Z.visible=C.value,Z["onUpdate:visible"]=B,Z.modelValue=y.value,Z["onUpdate:modelValue"]=A,Z.text=b.value,Z["onUpdate:text"]=R,Z.onChange=T,Z.poppable=!0,Z["text-position"]=s.textPosition;const ee={title:c.slots.title,search:c.slots.search,option:c.slots.option,optionLabel:c.slots.optionLabel,optionIcon:c.slots.optionIcon,buttons:c.slots.buttons},le=t.h(r,Z,ee);K.hide=()=>[le];const ce={...dt(s,Cr,dn)};return s.prop&&(ce.prop=`${s.prop}_item`),t.h(a,ce,K)}}}}const{componentName:ip,create:cp,scope:up}=J("actionsheet-item"),yl=cp(sp(ip,up,we,oe.CircleClose,oe.ArrowRight,oo)),Oo={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:dp,create:fp}=J("input-number"),mp=fp({components:{Minus:oe.Minus,Plus:oe.Plus},props:{...Oo},emits:["update:modelValue","change","blur","focus","reduce","add","overlimit"],setup(e,{emit:n}){const a=t.computed(()=>{const k=dp;return{[k]:!0,[`${k}--disabled`]:e.disabled}}),o=k=>Number(k).toFixed(Number(e.decimalPlaces)),l=k=>{const v=k.target;n("update:modelValue",v.valueAsNumber,k)},r=(k,v)=>{let y=o(k);n("update:modelValue",y,v),n("change",y,v)},i=(k=Number(e.modelValue))=>k<Number(e.max)&&!e.disabled,s=(k=Number(e.modelValue))=>k>Number(e.min)&&!e.disabled,c=k=>{if(n("reduce",k),s()){let v=Number(e.modelValue)-Number(e.step);r(v,k)}else n("overlimit",k,"reduce")},d=k=>{if(n("add",k),i()){let v=Number(e.modelValue)+Number(e.step);r(v,k)}else n("overlimit",k,"add")},p=k=>{e.disabled||e.readonly||n("focus",k)},u=k=>{if(e.disabled||e.readonly)return;let y=k.target.valueAsNumber;y<Number(e.min)?y=Number(e.min):y>Number(e.max)&&(y=Number(e.max)),r(y,k),n("blur",k)},g=k=>{let v=Number(k);return v<Number(e.min)?v=Number(e.min):v>Number(e.max)&&(v=Number(e.max)),v};return t.watch(()=>[e.max,e.min],()=>{Number(e.min)>Number(e.max)&&console.warn("[FoxUI] <InputNumber>","props.max < props.min");const k=g(e.modelValue);k!==Number(e.modelValue)&&r(k,{})}),{classes:a,change:l,blur:u,focus:p,add:d,addAllow:i,reduce:c,reduceAllow:s,toPxDesc:he}}}),pp=["min","max","disabled","readonly","value"];function hp(e,n,a,o,l,r){const i=t.resolveComponent("Minus"),s=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:n[0]||(n[0]=(...c)=>e.reduce&&e.reduce(...c))},[t.renderSlot(e.$slots,"left-icon",{},()=>[t.createVNode(i,{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:n[1]||(n[1]=(...c)=>e.change&&e.change(...c)),onBlur:n[2]||(n[2]=(...c)=>e.blur&&e.blur(...c)),onFocus:n[3]||(n[3]=(...c)=>e.focus&&e.focus(...c))},null,44,pp),t.createElementVNode("view",{class:t.normalizeClass(["fox-input-number__icon fox-input-number__right",{"fox-input-number__icon--disabled":!e.addAllow()}]),onClick:n[4]||(n[4]=(...c)=>e.add&&e.add(...c))},[t.renderSlot(e.$slots,"right-icon",{},()=>[t.createVNode(s,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2)],2)}const Je=ne(mp,[["render",hp]]);function gp(e,n,a,o){return{props:{...pe,...ge,...Oo},emits:["change","update:modelValue","setValue","add","reduce"],setup(l,r){const i=$e(t.computed(()=>l.disabled)),s=Te(t.computed(()=>l.readonly)),{emitEvent:c}=Ae({componentName:e,validateCheckEvents:["blur","update:modelValue","add","reduce"],validateResetEvents:["focus","setValue"],get validate(){return!i.value&&!s.value}},l.prop??r.attrs.name),d=e,p=qe(l,"modelValue",null,c),u=v=>{p.value=v,c("update:modelValue",v,{}),c("change",v,{})},g=v=>{c("add",v)},k=v=>{c("reduce",v)};return()=>{const v={"left-icon":r.slots["left-icon"],"right-icon":r.slots["right-icon"]},y=be(l,Oo),f={...r.attrs,...y,disabled:i.value,readonly:s.value,value:p.value,"onUpdate:modelValue":u,onAdd:g,onReduce:k},m=t.h(o,f,v),h=[];h.push(m);const S={default:()=>h};S.label=r.slots.default,S.fixedPreTip=r.slots.fixedPreTip,S.fixedTip=r.slots.fixedTip;const C={...be(l,ge,pe)};return l.prop&&(C.prop=`${l.prop}_item`),C["content-class"]=d,t.h(a,C,S)}}}}const{componentName:yp,create:vp,scope:bp}=J("inputnumber-item"),vl=vp(gp(yp,bp,we,Je)),kp={direction:{type:[String],default:"horizontal"},mode:{type:[String]},align:{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"},doitKey:{type:String,required:!1,default:"doit"},labelKey:{type:String,required:!1,default:"label"},itemOptions:{type:[Object,Function],required:!1},step:{type:[Boolean,String]},clickNavigatePolicy:{type:[String]},icon:{type:[Object]},iconSize:{type:[String,Number]},markIcon:{type:[Object]},markIconSize:{type:[String,Number]},layout:{type:[Array],default:()=>["head","main","sub"]},scroll:{type:[Boolean]}};function Sp(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function wr(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Nr(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Cp(e,n){return typeof e.visibleKey=="string"&&e.visibleKey.length>0?n[e.visibleKey]:n.visible??null}function po(e,n){return typeof e.statusKey=="string"&&e.statusKey.length>0?n[e.statusKey]:n.statusKey??null}function Br(e,n){return typeof e.doitKey=="string"&&e.doitKey.length>0?n[e.doitKey]:n.doitKey??null}function Ar(e,n){return typeof e.labelKey=="string"&&e.labelKey.length>0?n[e.labelKey]:n.labelKey??null}function ho(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let wp=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await Reflect.apply(a,null,[o]);const l=et(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(xe(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await Reflect.apply(l,null,[a,o]))}};function Np(){const e=t.getCurrentInstance();return new wp(e.proxy)}function Bp(e,n,a,o){return{props:{...kp},emits:["update:modelValue","change","loaded-data","click"],setup(l,{slots:r,emit:i}){const s=e,c=Np(),d=t.ref([]),p=t.computed(()=>d.value.filter(I=>Cp(l,I)!==!1)),u=t.ref(-1),g=()=>{const I=l.modelValue,P=p.value.findIndex(D=>wr(l,D)===I);u.value!==P&&(u.value=P,l.scroll&&_(P))};t.watch([()=>l.modelValue,p],()=>{g()});const k=I=>u.value===I,v=I=>{if(I<0&&I>=p.value.length)return!1;const P=p.value[I],W=(ho(l,P,I)??{}).status??po(l,P);return k(I)||W},y=t.computed(()=>{const I={[s]:!0};return l.mode?I[`is-${l.mode}`]=!0:l.direction&&(I[`is-${l.direction}`]=!0),l.scroll&&(I["is-scroll"]=!0),I}),b=t.computed(()=>({})),f=(I,P,D,W,L)=>{const O={[`${s}__step`]:!0};return L&&(O[`${L}`]=!0),O[`${m.value}`]=!0,W&&(O["is-doit"]=!0),I===u.value?O["is-active"]=!0:P==="done"?O["is-done"]=!0:P==="error"?O["is-error"]=!0:P==="half"?O["is-half"]=!0:D?O["is-disabled"]=!0:O["is-normal"]=!0,O},m=t.computed(()=>{if(l.mode==="simple")return"start";let I=l.align;return I||(l.direction==="vertical"?I="start":I="center"),I}),h=(I,P={})=>{const D={...P};return m.value==="start"&&I===p.value.length-1?D.flex="0 0 auto":l.step?l.direction==="vertical"?D.height=l.step:D.width=l.step:D.flex="1 1 100%",D},S=(I,P)=>{let D={};if(P<p.value.length-1){const W=P+1;v(P)&&v(W)?l.direction==="vertical"?D.height="100%":D.width="100%":D.opacity="0"}return D},N=I=>p.value.length-1===I,C=(I,P)=>{if(l.clickNavigatePolicy==="disabled"||(l.clickNavigatePolicy==="only-back"||l.clickNavigatePolicy==="only-back-reset")&&P>u.value||u.value===P)return;const D=u.value,W=P;u.value=P,l.scroll&&_(P);const L=wr(l,I);i("update:modelValue",L);const O={fromIndex:D,currentIndex:W,item:I,items:p.value,clickNavigatePolicy:l.clickNavigatePolicy};i("change",L,O)},w=t.ref(!0),B=async(I,P)=>{try{const D=await c.load("stesbar",I,P);Array.isArray(D)&&(d.value=D),w.value=!1}catch(D){console.error("[FoxUI] Load StepsBar Data Fail",D),d.value=[]}setTimeout(()=>{i("loaded-data")},250)};t.watch([()=>l.data,()=>l.params],async([I,P])=>{I&&B(I,P)},{immediate:!0});const A=(I,P,D,W,L)=>{let O=null;if(r.icon)O=r.icon({item:I,index:P,status:W});else if(W==="done"){const G={};l.iconSize&&(G.width=l.iconSize,G.height=l.iconSize);const te=l.icon??a;O=t.h(te,G)}else{const G=D??`${P+1}`;O=t.h("span",{},[G])}const Q={class:"fox-steps-bar__icon",onClick:()=>{i("click",{item:I,index:P}),!L&&C(I,P)}};return t.h("view",Q,[O])},T=(I,P,D)=>{const W=t.h("i",{class:"fox-steps-bar__line-inner",style:S(I,P)});return t.h("view",{class:"fox-steps-bar__line"},[W])},$=()=>{let I=null;if(r.markIcon)I=r.markIcon();else{const D={};l.iconSize&&(D.width=l.markIconSize,D.height=l.markIconSize);const W=l.markIcon??o;I=t.h(W,D)}return t.h("view",{class:"fox-steps-bar__mark"},[I])},q=(I,P,D,W,L)=>{const O=[];if(!N(P)){const te=T(I,P);O.push(te)}const Q=A(I,P,D,W,L);O.push(Q);const G={class:"fox-steps-bar__head"};return t.h("view",G,O)},R=(I,P,D,W)=>{let L=null;r.main?L=r.main({item:I,index:P,status:D}):L=Sp(l,I);const O={class:"fox-steps-bar__main",onClick:()=>{i("click",{item:I,index:P}),!W&&C(I,P)}};return t.h("view",O,[L])},V=(I,P,D)=>{let W=null;if(r.sub){W=r.sub({item:I,index:P,status:D});const L={class:"fox-steps-bar__sub"};return t.h("view",L,[W])}return null},E=(I,P)=>{const D=ho(l,I,P)??{},W=D.status??po(l,I);let L=Nr(l,I);D.disabled===!0&&(L=!0),l.disabled===!0&&(L=!0);const O=D.label??Ar(l,I),Q=[],G=A(I,P,O,W,L);G&&Q.push(G);const te=R(I,P,W,L);if(te&&Q.push(te),!N(P)){const ee=T(I,P);ee&&Q.push(ee)}const F=t.h("view",{class:"fox-steps-bar__head"},Q),Y=D.class,X=D.style??{};let K=Br(l,I);D.doit===!0&&(K=!0);const Z={ref:z(P),class:f(P,W,L,K,Y),style:h(P,X)};return t.h("view",Z,[F])},M=(I,P)=>{const D=ho(l,I,P)??{},W=D.status??po(l,I);let L=Nr(l,I);D.disabled===!0&&(L=!0),l.disabled===!0&&(L=!0);const O=D.label??Ar(l,I),Q=[],G=l.layout;for(let K of G)if(K==="head"){const Z=q(I,P,O,W,L);Q.push(Z)}else if(K==="main"){const Z=R(I,P,W,L);Q.push(Z)}else if(K==="sub"){const Z=V(I,P,W);Q.push(Z)}else if(K==="mark"){const Z=$();Q.push(Z)}const te=D.class,F=D.style??{};let Y=Br(l,I);D.doit===!0&&(Y=!0);const X={ref:z(P),class:f(P,W,L,Y,te),style:h(P,F)};return t.h("view",X,Q)},x=t.ref(),j=t.ref([]),H=(I,P)=>{j.value[P]=I},z=I=>P=>{H(P,I)},_=(I,P)=>{const D=x.value,W=j.value;if(!D||!W||!W[I])return;const L=W[I];let O=0;l.direction==="vertical"?O=L.offsetTop-(D.offsetHeight-L.offsetHeight)/2:O=L.offsetLeft-(D.offsetWidth-L.offsetWidth)/2,U(D,O,.3,l.direction)},U=(I,P,D,W)=>{let L=0;const O=W==="horizontal"?I.scrollLeft:I.scrollTop,Q=Math.round(D*1e3/16);function G(){W==="horizontal"?I.scrollLeft+=(P-O)/Q:I.scrollTop+=(P-O)/Q,++L<Q&&Ke(G)}G()};return()=>{const I=[];if(l.mode==="simple")for(let D=0;D<p.value.length;D++){const W=p.value[D],L=E(W,D);I.push(L)}else for(let D=0;D<p.value.length;D++){const W=p.value[D],L=M(W,D);I.push(L)}const P={ref:x,class:y.value,style:b.value};return t.h("view",P,I)}}}}const{componentName:Ap,create:Vp,scope:Tp}=J("steps-bar"),bl=Vp(Bp(Ap,Tp,oe.Checklist,oe.ArrowRight));function $p(e){e.stopPropagation()}class Ep{startMove;updateMove;isTouch=!1;els=null;moving=!1;touchstart=null;touchmove=null;touchend=null;constructor(n,a){this.startMove=n,this.updateMove=a,this.isTouch=al()}open(n){Array.isArray(n)||(n=[n]),this.els=n;const a=rl(),o=(l,r,i,s)=>{this.updateMove({x:l,y:r})};this.touchstart=l=>{this.moving||(a.start(l),this.startMove({x:a.state.startX,y:a.state.startY}),document.addEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),document.addEventListener(this.isTouch?"touchend":"mouseup",this.touchend),this.moving=!0)},this.touchmove=l=>{this.moving&&(a.move(l),$p(l),o(a.state.deltaX,a.state.deltaY))},this.touchend=()=>{o(a.state.deltaX,a.state.deltaY),this.touchmove&&document.removeEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),this.touchend&&document.removeEventListener(this.isTouch?"touchend":"mouseup",this.touchend),a.reset(),this.moving=!1},this.els.forEach(l=>{this.touchstart&&l.addEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)})}close(){Array.isArray(this.els)&&this.els.forEach(n=>{this.touchstart&&n.removeEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)}),this.els=null}}function xp(e,n){return new Ep(e,n)}const Dp={customClass:{type:[String]},top:{type:[String]},right:{type:[String]},bottom:{type:[String]},left:{type:[String]},width:{type:[String]},height:{type:[String]},color:{type:[String]},background:{type:[String]},borderRadius:{type:[String]},draggable:{type:[Boolean]}},Ip=(e,n,a,o=!1)=>({props:{...Dp},emits:["click"],setup(l,{slots:r,emit:i}){const s=t.reactive({top:l.top,right:l.right,bottom:l.bottom,left:l.left}),c=t.computed(()=>{const m=[`${e}`];return l.customClass&&m.push(l.customClass),m}),d=t.computed(()=>{const m={};return ue(s.top)||(m.top=s.top),ue(s.right)||(m.right=s.right),ue(s.bottom)||(m.bottom=s.bottom),ue(s.left)||(m.left=s.left),ue(l.width)||(m.width=l.width),ue(l.height)||(m.height=l.height),ue(l.color)||(m.color=l.color),ue(l.background)||(m.background=l.background),ue(l.borderRadius)||(m["border-radius"]=l.borderRadius),m}),p=t.computed(()=>({[`${e}__icon`]:!0})),u=()=>{i("click")},g=t.ref(null),k=()=>{s.top=null,s.right=null,s.bottom=null,s.left=null},v={x:0,y:0},f=xp(m=>{if(!g.value)return;const h=g.value;k(),s.left=h.offsetLeft,s.top=h.offsetTop,h.style.left=`${s.left}px`,h.style.top=`${s.top}px`,h.style.right=null,h.style.bottom=null,v.x=s.left,v.y=s.top},m=>{if(!g.value)return;const h=g.value;k(),s.left=v.x+m.x,s.top=v.y+m.y,h.style.left=`${s.left}px`,h.style.top=`${s.top}px`});return t.onMounted(()=>{if(l.draggable&&g.value){const m=[g.value];f.open(m)}}),t.onBeforeUnmount(()=>{l.draggable&&g.value&&f.close()}),()=>{let m=[];const h=typeof r.default=="function"?r.default():[];if(h&&h.length>0)m=h;else{const N=t.h(a,{class:p.value});m.push(N)}const S={ref:N=>{g.value=N},class:c.value,style:d.value,onClick:u};return t.h("view",S,m)}}}),{componentName:qp,create:Pp,scope:Mp}=J("floating-button"),kl=Pp(Ip(qp,Mp,oe.Uploader,!1)),Lp={modelValue:{type:[Boolean],requried:!0},type:{type:[String],requried:!1,default:""},disabled:{type:[Boolean,String],requried:!1},textPosition:{type:[String],requried:!1},collapseText:{type:[String],requried:!1,default:"收起"},expandText:{type:[String],requried:!1,default:"更多"},icon:{type:[Object],requried:!1}};function zp(e,n,a){return{props:{...Lp},emits:["click","update:modelValue"],setup(o,{emit:l}){const r=t.computed(()=>{const u={[`${e}`]:!0};return o.disabled?u[`${e}--disabled`]=!0:u[`${e}--${o.type}`]=!0,u}),i=qe(o,"modelValue"),s=t.computed(()=>i.value?o.expandText??"":o.collapseText??""),c=t.computed(()=>({[`${e}__text`]:!0})),d=t.computed(()=>({[`${e}__icon`]:!0,"is-expand":!i.value,"is-collapse":i.value})),p=()=>{l("update:modelValue",!i.value)};return()=>{const u=[];if(s.value){const b={class:c.value},f=t.h("span",b,[s.value]);u.push(f)}const g={class:d.value},k=o.icon??a,v=t.h(k,g);return u.push(v),o.textPosition==="right"&&u.reverse(),t.h("view",{class:r.value,onClick:p},u)}}}}const{componentName:Op,create:Fp,scope:Rp}=J("more-button"),Sl=Fp(zp(Op,Rp,oe.RectUp)),Kp={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}},Up=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0);function Hp(e,n,a){return{props:{...Kp},setup(o,{attrs:l,slots:r}){const{toLocaleRefs:i}=se.useFoxI18n(n),s=i(o,["confirmText","cancelText"]),c=e,d=t.ref(!0),p=S=>{d.value=S},u=S=>{if(typeof o.unmount=="function")try{o.unmount()}catch(N){console.error(N)}if(typeof o.callback=="function")try{o.callback(S)}catch(N){console.error(N)}},g=()=>{u("confirm")},k=()=>{u("cancel")},v=()=>{o.closeOnClickOverlay!==!1&&u("close")},y=(S,N)=>Up(S)?(N.src=S,t.h("img",N)):typeof S=="string"?(Array.isArray(N.class)?N.class.push(S):N.class&&typeof N.class=="object"?N[`${S}`]=!0:typeof N.class=="string"?N.class=`${N.class}, ${S}`:N.class=S,t.h(o.tag,N)):t.h(S,N),b=()=>{const S=[];if(o.icon){const C={class:[`${c}__header-icon`]},w=y(o.icon,C);S.push(w)}if(o.title){const C=t.h("view",{class:`${c}__header-title`},[o.title]);S.push(C)}if(o.showClose&&o.closeIcon){const C={class:[`${c}__header-close-icon`],onClick:v},w=y(o.closeIcon,C);S.push(w)}const N={class:[`${c}__header`]};return t.h("view",N,S)},f=(S,N)=>{const C=[];if(N){const B={class:`${c}__group-title`},A=t.h("view",B,[N]);C.push(A)}if(S){const B=[];Array.isArray(S)||(S=[S]);for(let A of S){const T={class:`${c}__group-row`,innerHTML:A},$=t.h("view",T);B.push($)}if(B.length>0){const A={class:`${c}__group-rows`},T=t.h("view",A,B);C.push(T)}}if(C.length===0)return null;const w={class:`${c}__group`};return t.h("view",w,C)},m=()=>{const S=[];if(typeof o.message=="string")S.push(o.message);else if(Array.isArray(o.message))for(let C of o.message)if(typeof C=="string"){const w=f(C);S.push(w)}else{const w=f(C.content,C.title);S.push(w)}else if(typeof o.message=="function"){const C=o.message();S.push(C)}else{const C=o.message;S.push(C)}const N={class:`${c}__body`};return t.h("view",N,S)},h=()=>{const S=[];if(o.showCancelButton){const C={class:[`${c}__footer-button`],style:{},onClick:k};o.cancelButtonClass&&C.class.push(o.cancelButtonClass),o.cancleButtonStyle&&typeof o.cancleButtonStyle=="object"&&Object.assign(C.style,o.cancleButtonStyle);const w=t.h("button",C,[o.cancelButtonText??s.cancelText.value]);S.push(w)}if(o.showConfirmButton){const C={class:[`${c}__footer-button`],style:{},onClick:g};o.confirmButtonClass&&C.class.push(o.confirmButtonClass),o.confirmButtonStyle&&typeof o.confirmButtonStyle=="object"&&Object.assign(C.style,o.confirmButtonStyle);const w=t.h("button",C,[o.confirmButtonText??s.confirmText.value]);S.push(w)}if(S.length===0)return null;const N={class:`${c}__footer`};return t.h("view",N,S)};return()=>{const S=[],N=b();N&&S.push(N);const C=m();C&&S.push(C);const w=h();w&&S.push(w);const B={class:{[`${c}`]:!0,[`${c}--${o.type||"info"}`]:!0}},A=t.h("view",B,S),T=[`${c}__popup`];o.popClass&&T.push(o.popClass);const $={};o.width&&($.width=typeof o.width=="number"?`${o.width}px`:o.width),o.height&&($.height=typeof o.height=="number"?`${o.height}px`:o.height);const q={popClass:T.join(" "),style:$,visible:d.value,teleportDisable:!0,closeable:!1,"onUpdate:visible":p,position:o.position,round:"round",onClickOverlay:v,closeOnClickOverlay:o.closeOnClickOverlay};return t.h(a,q,{default:()=>A})}}}}const{componentName:jp,create:Wp,scope:Yp}=J("messagebox"),Xp=Wp(Hp(jp,Yp,fe)),Qp="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",Gp="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",Zp="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",Jp="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",_p=new Kn,eh={showCancelButton:!0,cancelText:"取消",showConfirmButton:!0,confirmText:"确认"},th=e=>{let n=document.body,a=e.teleport;a!="body"&&(typeof a=="string"?n=document.querySelector(a):a&&(n=e.teleport));const o=document.createElement("view"),l=`messagebox-${_p.get()}`;o.id=l,o.classList.add("fox-messagebox__root"),e.zIndex&&(o.style.zIndex=`${e.zIndex}`),e.unmount=()=>{const i=document.querySelector(`#${l}`);i&&i.parentNode?.removeChild(i)};const r=t.createVNode(Xp,e);n.appendChild(o),t.render(r,o)},rt={show:(e,n,a,o)=>{const l={...eh};n&&!Array.isArray(n)&&typeof n=="object"?Object.assign(l,n):(n&&(l.message=n),a&&typeof a=="object"?Object.assign(l,a):(typeof a=="string"&&(l.title=a),o&&typeof o=="object"?Object.assign(l,o):typeof o=="string"&&(l.type=o)));const r=l.type??"info";return l.icon||(r==="success"?l.icon=Zp:r==="warning"?l.icon=Jp:r==="error"?l.icon=Qp:l.icon=Gp),e==="alert"?(l.showCancelButton=!1,l.showConfirmButton=!0):e==="confirm"&&(l.showCancelButton=!0,l.showConfirmButton=!0),l.showClose&&!l.closeIcon&&(l.closeIcon=oe.Close),new Promise((i,s)=>{const c=l.callback;l.callback=d=>{if(typeof c=="function")try{c(d)}catch(p){console.error(p)}i({action:d})},th(l)})},alert:(e,n,a)=>rt.show("alert",e,n,a),confirm:(e,n,a)=>rt.show("confirm",e,n,a),install(e){e.config.globalProperties.$alert=rt.alert,e.config.globalProperties.$confirm=rt.confirm}},nh=(e,n,a)=>{n=n??{bubbles:!1,cancelable:!1,detail:void 0};const o=document.createEvent("Events");let l=!0,r=!0;for(let s in n)s==="bubbles"?l=!!n[s]:s==="cancelable"?r=!!n[s]:o[s]=n[s];o.initEvent(e,l,r),(a??document).dispatchEvent(o)},oh=new Kn,lh=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0),ah=e=>`${e}-${oh.get()}`,rh=Symbol.for("InnerPageScopeKey"),sh=Symbol.for("PageWrapperKey"),ih="FoxLeave",ch="FoxLeaveEnd",uh={width:{type:[String,Number]},height:{type:[String,Number]},closeOnClickOverlay:{type:Boolean,default:!1},title:{type:String},visible:{type:Boolean,default:!0},showDelay:{type:Number,default:10},showClose:{type:Boolean,default:!0},closeIcon:{type:Object},showHeader:{type:Boolean,default:!1},popClass:{type:String},popStyle:{type:Object},position:{type:String,default:"center"},mode:{type:String}};function dh(e,n,a,o){return{props:{...Fe,...uh},emits:["update:visible"],setup(l,{attrs:r,slots:i,emit:s}){t.provide(rh,!0);const c={};t.provide(sh,c);const d=C=>(typeof c.beforeClose=="function"&&c.beforeClose(),!1),p=()=>{d()},u=e,g=C=>{k.value=C,s("update:visible",C)},k=t.ref(!1),v=(C,w)=>lh(C)?(w.src=C,t.h("img",w)):typeof C=="string"?(Array.isArray(w.class)?w.class.push(C):w.class&&typeof w.class=="object"?w[`${C}`]=!0:typeof w.class=="string"?w.class=`${w.class}, ${C}`:w.class=C,t.h(l.tag,w)):t.h(C,w),y=()=>{if(!l.showHeader)return null;const C=[];if(i.header){const B=i.header();C.push(B)}else if(l.title){const B=t.h("view",{class:`${u}__header-title`},[l.title]);C.push(B)}if(C.length===0)return null;const w={class:[`${u}__header`]};return t.h("view",w,C)},b=()=>{if(!l.showClose)return null;const C={class:[`${u}__close-icon`],onClick:p},w=l.closeIcon??o;return v(w,C)};let f=null;const m=C=>{nh(ch,{},f)},h=ah(e),S=()=>{g(!0)},N=()=>{if(!f)return;const C=f.querySelector(".fox-overlay");C&&(C.classList.add("overlay-fade-leave-active"),C.classList.add("overlay-fade-leave-to"));const w=f.querySelector(".fox-popup");w&&(w.classList.add(`fox-popup-slide-${l.position}-leave-active`),w.classList.add(`fox-popup-slide-${l.position}-leave-to`),w.addEventListener("animationend",m,{once:!0}),w.addEventListener("transitionend",m,{once:!0})),document.body.classList.remove("fox-overflow-hidden")};return t.onMounted(()=>{f=document.querySelector(`.${h}`),f?.addEventListener(ih,N,{once:!0}),S()}),()=>{const C=[],w=y();w&&C.push(w);const B=b();B&&C.push(B);const A=i.default?i.default():[];Reflect.apply([].push,C,A);const T={[`${u}`]:!0};l.mode&&(T[`${u}--${l.mode}`]=!0);const $={class:T},q=t.h("view",$,C),R=[`${u}__popup`,h];l.popClass&&R.push(l.popClass),l.position&&R.push(`${u}__popup--${l.position}`);const V={};l.width&&(V.width=typeof l.width=="number"?`${l.width}px`:l.width),l.height&&(V.height=typeof l.height=="number"?`${l.height}px`:l.height);const M={...be(l,Fe),popClass:R.join(" "),style:V,visible:k.value,teleportDisable:!0,closeable:!1,position:l.position,closeOnClickOverlay:l.closeOnClickOverlay,onClickOverlay:p,"onUpdate:visible":g},x=t.h(a,M,{default:()=>q});return t.h("div",{class:[`${u}__root`,h]},[x])}}}}const{componentName:fh,create:mh,scope:ph}=J("popup-wrapper"),Cl=mh(dh(fh,ph,fe,oe.Close)),hh={visible:{type:Boolean},zIndex:{type:Number,default:1},popClass:{type:String},popStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}};function gh(e,n,a,o){return{props:{...hh},emits:["update:visible"],setup(l,{emit:r,slots:i}){const s=c=>{r("update:visible",c)};return()=>{const c=[`${e}__popup`];l.popClass&&c.push(l.popClass);const d={popClass:c,style:l.popStyle??{},position:"top",zIndex:l.zIndex,closeOnClickOverlay:l.closeOnClickOverlay,teleportDisable:!0,visible:l.visible,"onUpdate:visible":s},p=t.h(a,d,i),u={class:`${e}`};return t.h("view",u,[p])}}}}const{componentName:yh,create:vh,scope:bh}=J("dropdown"),wl=vh(gh(yh,bh,fe)),kh={visible:{type:Boolean},reference:{type:Object},referenceInset:{type:Object},width:{type:String},offset:{type:Number,default:()=>6},placement:{type:String,default:()=>"top-start"},autoFit:{type:Boolean,default:()=>!0},title:{type:String},effect:{type:String},showArrow:{type:Boolean,default:()=>!0},arrowSize:{type:Number,default:()=>14},arrowOffset:{type:Number,default:()=>20},showOverlay:{type:Number,default:()=>!0},closeOnClick:{type:Boolean,default:()=>!0},zIndex:{type:[String,Number]},customClass:{type:[String]},customStyle:{type:[Object]},leaveHide:{type:[Boolean]}};function Sh(e,n,a=!1){return{props:{...kh},emits:["update:visible"],setup(o,{emit:l,slots:r,expose:i}){const s=t.ref({top:null,right:null,bottom:null,left:null}),c=t.ref(0),d=t.ref(0),p=t.ref(0),u=t.ref(0),g=t.ref(o.placement),k=t.ref(!1),v=t.ref(!1),y=t.ref(null),b=()=>typeof o.reference=="string"?document.querySelector(o.reference):o.reference,f=(z,_,U,I,P,D,W,L=!0)=>{const O=document.documentElement.clientWidth||document.body.clientWidth,Q=document.documentElement.clientHeight||document.body.clientHeight,G=z.split("-");let te=[];L?G[0]==="top"?te=["top","bottom","right","left"]:G[0]==="bottom"?te=["bottom","top","right","left"]:G[0]==="left"?te=["left","top","bottom","right"]:G[0]==="right"&&(te=["right","top","bottom","left"]):te=[z[0]];const F={top:null,right:null,bottom:null,left:null},Y=[];for(let X=0;X<te.length;X++){const K=te[X];if(Y[0]=K,G[1]&&(Y[1]=G[1]),K==="top"){const Z=U-W-o.arrowSize/2-o.offset;if(Z>=0){F.top=Z;let ee=0;G[1]==="start"?ee=_:G[1]==="end"?ee=_+I-D:ee=_+I/2-D/2;const le=O-ee-D;le<0?(ee+=le,h.value=-le):h.value=0,F.left=ee<0?0:ee;break}}else if(K==="bottom"){const Z=U+P+o.arrowSize/2+o.offset;if(Z+W<=Q){F.top=Z;let ee=0;G[1]==="start"?ee=_:G[1]==="end"?ee=_+I-D:ee=_+I/2-D/2;const le=O-ee-D;le<0?(ee+=le,h.value=-le):h.value=0,F.left=ee<0?0:ee;break}}else if(K==="left"){const Z=_-D-o.arrowSize/2-o.offset;if(Z>=0){F.left=Z;let ee=0;G[1]==="start"?ee=U:G[1]==="end"?ee=U+P-W:ee=U+P/2-W/2,F.top=ee<0?0:ee;break}}else if(K==="right"){const Z=_+I+o.arrowSize/2+o.offset;if(Z+D<=O){F.left=Z;let ee=0;G[1]==="start"?ee=U:G[1]==="end"?ee=U+P-W:ee=U+P/2-W/2,F.top=ee<0?0:ee;break}}}return{bestPlacement:Y.join("-"),bestInsetRect:F}},m=()=>{const z=o.visible,_=o.autoFit;if(!_e||z===!1)return;if(o.reference){const W=b(),L=_o(W);c.value=L.x,d.value=L.y,p.value=W.offsetWidth,u.value=W.offsetHeight}else o.referenceInset&&(c.value=o.referenceInset.left,d.value=o.referenceInset.top,p.value=o.referenceInset.right-o.referenceInset.left,u.value=o.referenceInset.bottom-o.referenceInset.top);const U=y.value.offsetWidth,I=y.value.offsetHeight,{bestPlacement:P,bestInsetRect:D}=f(o.placement,c.value,d.value,p.value,u.value,U,I,_);g.value=P,s.value=D},h=t.ref(0),S=Qe(()=>{m()},10),N=t.ref(o.visible);t.watch([()=>o.visible],([z])=>{N.value=z,z?(k.value=z,setTimeout(()=>{m(),v.value=!0},0)):v.value=!1});const C=t.computed(()=>N.value&&w.value),w=t.ref(!0),B=Qe(z=>{const _=z[0];_&&(w.value=_.isIntersecting)},10),A=new IntersectionObserver(B);t.watch([()=>o.reference,()=>o.referenceInset],([z,_],[U,I])=>{!z&&!_||(setTimeout(()=>{m()},0),o.autoFit&&(U&&(Ft.unwatch(U,S),A.unobserve(U)),z&&(Ft.watch(z,S),A.observe(z))))},{immediate:!0}),t.onBeforeUnmount(()=>{o.reference&&(Ft.unwatch(o.reference,S),A.unobserve(o.reference),A.disconnect())});const T=t.computed(()=>{const z={[e]:!0};return g.value.startsWith("top")?z["is-top"]=!0:g.value.startsWith("right")?z["is-right"]=!0:g.value.startsWith("bottom")?z["is-bottom"]=!0:g.value.startsWith("left")&&(z["is-left"]=!0),z[`is-${o.effect}`]=!0,!v.value&&C.value&&(z["is-opacity"]=!0),v.value&&C.value&&(z["is-show"]=!0),C.value||(z["is-hide"]=!0),o.customClass&&typeof o.customClass=="string"&&(z[`${o.customClass}`]=!0),z}),$=t.computed(()=>{const z={};return s.value.top!==null&&(z.top=`${s.value.top}px`),s.value.right!==null&&(z.right=`${s.value.right}px`),s.value.bottom!==null&&(z.bottom=`${s.value.bottom}px`),s.value.left!==null&&(z.left=`${s.value.left}px`),o.width&&(z.width=o.width),o.zIndex&&(z["z-index"]=`${o.zIndex}`),o.customStyle&&typeof o.customStyle=="object"&&Object.assign(z,o.customStyle),z}),q=()=>{N.value=!1,l("update:visible",!1)},R=()=>{if(!o.showOverlay)return null;const z={class:`${e}__overlay`,onClick:q};return t.h("div",z)},V=()=>{let z=null;return r.title?z=t.h("div",{class:`${e}__title`},{default:r.title}):o.title&&(z=t.h("div",{class:`${e}__title`},[o.title])),z},E=t.computed(()=>({[`${e}__arrow`]:!0})),M=t.computed(()=>{const z={};return o.showArrow?(z.width=`${o.arrowSize}px`,z.height=`${o.arrowSize}px`,g.value==="top"?(z.left="50%",z.bottom="0",z.transform="translate(-50%, 50%)"):g.value==="top-start"?(z.left=`${o.arrowOffset+h.value}px`,z.bottom="0",z.transform="translate(-50%, 50%)"):g.value==="top-end"?(z.right=`${o.arrowOffset-h.value}px`,z.bottom="0",z.transform="translate(-50%, 50%)"):g.value==="right"?(z.left="0",z.top="50%",z.transform="translate(-50%, -50%)"):g.value==="right-start"?(z.left="0",z.top=`${o.arrowOffset}px`,z.transform="translate(-50%, 50%)"):g.value==="right-end"?(z.left="0",z.bottom=`-${o.arrowOffset}px`,z.transform="translate(-50%, 50%)"):g.value==="bottom"?(z.left="50%",z.top="0",z.transform="translate(-50%, -50%)"):g.value==="bottom-start"?(z.left=`${o.arrowOffset+h.value}px`,z.top="0",z.transform="translate(-50%, -50%)"):g.value==="bottom-end"?(z.right=`${o.arrowOffset-h.value}px`,z.top="0",z.transform="translate(-50%, -50%)"):g.value==="left"?(z.right="0",z.top="50%",z.transform="translate(50%, -50%)"):g.value==="left-start"?(z.right="0",z.top=`${o.arrowOffset}px`,z.transform="translate(50%, -50%)"):g.value==="left-end"&&(z.right="0",z.bottom=`-${o.arrowOffset}px`,z.transform="translate(50%, -50%)"),z):{display:"none"}}),x=()=>{const z={class:E.value,style:M.value};return t.h("div",z)},j=()=>{N.value===!1&&(k.value=!1)},H=z=>{if(!y.value||N.value===!1)return;const{relatedTarget:_}=z;y.value.contains(_)||(N.value=!1,l("update:visible",!1))};return i({doLayout:m}),()=>{if(!k.value)return null;const z=[],_=R();_&&z.push(_);const U=[],I=V();if(I&&U.push(I),r.default){const L=r.default();U.push(L)}const P=x();P&&U.push(P);const D={ref:y,class:T.value,style:$.value,onAnimationend:j};o.leaveHide&&(D.onMouseleave=H);const W=t.h("div",D,{default:()=>U});return z.push(W),z}}}}const{componentName:Ch,create:wh,scope:Nh}=J("popover-dialog"),Nl=wh(Sh(Ch,Nh,!1));function Bh(e,n){const a=document.createRange();a.setStart(e,0),a.setEnd(e,e.childNodes.length);const o=a.getBoundingClientRect().width;if(o>0){n(o);return}e.classList.add("is-selectable"),setTimeout(()=>{a.setStart(e,0),a.setEnd(e,e.childNodes.length);const l=a.getBoundingClientRect().width;e.classList.remove("is-selectable"),n(l)},500)}const Ah={tag:{type:[String],required:!1,default:"span"},showOverflowTooltip:{type:[Boolean],required:!1},showArrow:{type:[Boolean],required:!1,default:!0},showAfter:{type:[Number],required:!1,default:300},hideAfter:{type:[Number],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 Vh(e,n,a,o=!1){return{props:{...Ah},emits:["click"],setup(l,r){const i=t.ref(null),s=t.computed(()=>{const h={[`${e}`]:!0,"is-truncated":l.truncated};return l.type&&(h[`${e}--${l.type??"default"}`]=!0),l.size&&(h[`${e}--${l.size}`]=!0),h}),c=t.computed(()=>{const h={},S=l.textColor??l.color;return S&&(h.color=S),h}),d=(h,S)=>{let N=null;if(typeof l.highlightFilter=="string"&&l.highlightFilter.length>0){const C=l.highlightFilter;if(h.indexOf(C)!==-1){const B=h.replace(new RegExp(C,"g"),`<span>${C}</span>`);S.innerHTML=B,S.class["is-highlight"]=!0,N=t.h(l.tag,S)}}else if(typeof l.highlightFilter=="function"){const C=l.highlightFilter(h);C&&(S.innerHTML=C,S.class["is-highlight"]=!0,N=t.h(l.tag,S))}return N},p=h=>{r.emit("click",h)};let u="";const g=()=>{const h=i.value;if(!h)return;const S=h.clientWidth;Bh(h,N=>{const C=h.innerHTML??"";ue(C)||N<S||(u?a?.show(h,C,{type:"text",id:u,showArrow:l.showArrow},!0):u=a?.show(h,C,{type:"text",showArrow:l.showArrow},!0)??"")})},k=()=>{u&&a?.hide(u)};let v=null;const y=h=>{v||(v=setTimeout(()=>{g(),v=null},l.showAfter??0))},b=h=>{v&&(clearTimeout(v),v=null),setTimeout(()=>{k()},l.hideAfter??0)},f=()=>{const h=i.value;h&&(h.addEventListener("mouseover",y),h.addEventListener("mouseleave",b))},m=()=>{const h=i.value;h&&(h.removeEventListener("mouseover",y),h.removeEventListener("mouseleave",b))};return t.onMounted(()=>{!ye(l.showOverflowTooltip)||!a||f()}),t.onBeforeUnmount(()=>{!ye(l.showOverflowTooltip)||!a||m()}),()=>{const h={onClick:p,class:s.value,style:c.value,ref:i};let S=null;if(ye(l.numberFormat)&&typeof r.slots.default=="function"){const B=r.slots.default();if(Array.isArray(B)&&B.length===1){const A=B[0].type.toString();if(A==="Symbol(Text)"||A==="Symbol(v-txt)"){const T=me(l.digits),$=me(l.decimalLength),q=ye(l.autoPadding);let R=`${B[0].children}`,V=R.split("").reverse().join("");V=Nn(V,$,q,T,l.separator),R=V.split("").reverse().join(""),l.highlightFilter!==void 0&&(S=d(R,h)),S||(h.innerHTML=R,S=t.h(l.tag,h))}}}else{if(l.highlightFilter!==void 0&&typeof r.slots.default=="function"){const B=r.slots.default();if(Array.isArray(B)&&B.length===1){const A=B[0].type.toString();if(A==="Symbol(Text)"||A==="Symbol(v-txt)"){const T=`${B[0].children}`;S=d(T,h),S||(h.innerHTML=T,S=t.h(l.tag,h))}}}S||(S=t.h(l.tag,h,{default:r.slots.default}))}if(!l.mark&&!l.icon&&!r.slots.mark)return S;let C=null;if(l.icon){const B={[`${e}__mark-wrap`]:!0};l.type&&(B[`${e}__mark-wrap--${l.type}`]=!0);const A={},T=l.color;T&&(A.color=T);const $={class:B,style:A};C=t.h("view",$,t.h(l.icon))}else if(r.slots.mark){const B={[`${e}__mark-wrap`]:!0};l.type&&(B[`${e}__mark-wrap--${l.type}`]=!0);const A={},T=l.color;T&&(A.color=T);const $={class:B,style:A};C=t.h("view",$,{default:r.slots.mark})}else{const B={[`${e}__mark`]:!0};l.type&&(B[`${e}__mark--${l.type??"default"}`]=!0);const A={},T=l.color;T&&(A["background-color"]=T);const $={class:B,style:A};C=t.h("view",$)}const w={class:{"fox-text__wrap":!0,"text-left":l.textPosition==="left","text-right":l.textPosition==="right"}};return t.h("view",w,[C,S])}}}}const{componentName:Th,create:$h,scope:Eh}=J("text"),Bl=$h(Vh(Th,Eh,Tt,!1));function xh(e,n,a,o,l){let r=[];Array.isArray(e)?r=e:r=[e];const i=[],s=n[0];if(Array.isArray(e)&&!Array.isArray(s)&&!s[l]){let c=n;for(let d=0;c&&d<r.length;d++){let p=r[d],u=c.find(g=>g[o]===p);if(!u)break;i.push(u[a])}return i}if(Array.isArray(s))for(let c=0;c<n.length&&c<r.length;c++){let d=n[c],p=r[c];const u=d.find(g=>g[o]===p);if(!u)break;i.push(u[a])}else{let c=n;for(let d=0;c&&d<r.length;d++){let p=r[d],u=c.find(g=>g[o]===p);if(!u)break;i.push(u[a]),c=u[l]}}return i}class Dh{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);const l=et(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(xe(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}}function Ih(){const e=t.getCurrentInstance();return new Dh(e.proxy)}const qh={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 Ph(e,n,a=!1){return{props:{...qh},setup(o,{attrs:l,slots:r}){const i=Ih(),s=t.ref([]);t.watch([()=>o.source,()=>o.params],async([p,u])=>{s.value=await i.load(o.sourceType,p,u)},{immediate:!0});const c=t.computed(()=>{if(!Array.isArray(s.value)||s.value.length===0)return"";let p=xh(o.modelValue,s.value,o.textKey,o.valueKey,o.childrenKey);return p.length==0?o.emptyText??"":p.length===1?o.optionType=="item"?`${o.modelValue}${o.separator}${p[0]}`:p[0]:p.join(o.separator)}),d=o.resolveTag?t.resolveComponent(o.tag):o.tag;return()=>{const p={...l};return r.default?r.default({text:c.value,value:o.modelValue}):o.resolveTag?o.emptyText!==void 0&&o.emptyText===c.value?t.h(o.emptyTag??"span",{...l,class:o.emptyClass},c.value):t.h(d,p,{default:()=>c.value}):t.h(d,p,c.value)}}}}const{componentName:Mh,create:Lh,scope:zh}=J("mapping"),Al=Lh(Ph(Mh,zh,!1));function Oh(e,n){return{inheritAttrs:!1,props:{name:{type:[String],required:!1,default:""},config:{type:[Object],required:!1,default:{}}},setup(a,{slots:o}){return ts(a.name,()=>a.config),()=>typeof o.default=="function"?o.default():null}}}const{componentName:wA,create:Fh,scope:NA}=J("domain-provider"),Vl=Fh(Oh()),Rh={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 Kh(e,n){return{inheritAttrs:!1,props:Rh,setup(a,{slots:o}){if(_e&&window.IntersectionObserver){const l=new WeakMap;let r=new Map;const i=(g,k)=>{if(p===null){r.set(g,{visible:null,callback:k});return}l.has(g)&&p.unobserve(g),l.set(g,{visible:null,callback:k}),p.observe(g)},s=g=>{if(p===null){r.delete(g);return}l.has(g)&&(l.delete(g),p.unobserve(g))};let c=a.initialVisibleObserverSize;Zi({acquire:()=>{const g=c>0;return c--,g},get disabled(){return a.disabled},get initialHeight(){return a.initialInvisibleObserverHeight},observe:i,unobserve:s});let p=null;const u=(g,k,v)=>{p=new IntersectionObserver(y=>{for(let b of y){let f=!1;b.intersectionRatio>0&&(f=!0);const m=l.get(b.target);if(m)try{if(a.loadPolicy==="lazy"&&!f&&m.visible!==null)return;m.visible=f,m.callback(f)}catch(h){console.error(h)}}},{root:g,rootMargin:k,threshold:v}),r.forEach((y,b)=>{l.set(b,y),p?.observe(b)}),r.clear()};t.watch([()=>a.root,()=>a.disabled],([g,k])=>{if(k||!g||p)return;let v=null;typeof g=="string"?v=document.querySelector(g):v=g,v&&u(v,a.rootMargin,a.threshold)},{immediate:!0}),t.onUnmounted(()=>{p&&(p.disconnect(),p=null)})}return()=>typeof o.default=="function"?o.default():null}}}const{componentName:BA,create:Uh,scope:AA}=J("rolling-provider"),Tl=Uh(Kh()),{componentName:Hh,create:jh}=J("cell"),Wh=jh({components:{Right:oe.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:n}){const a=t.computed(()=>{const r=Hh;return{[r]:!0,[`${r}--clickable`]:e.isLink,[`${r}--center`]:e.center,[`${r}--large`]:e.size=="large"}}),o=t.computed(()=>({borderRadius:he(e.roundRadius)}));return{handleClick:r=>{n("click",r)},classes:a,baseStyle:o}}}),Yh={key:0,class:"fox-cell__icon"},Xh={key:1,class:"fox-cell__title"},Qh={class:"title"},Gh={class:"fox-cell__title-desc"};function Zh(e,n,a,o,l,r){const i=t.resolveComponent("Right");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.baseStyle),onClick:n[0]||(n[0]=(...s)=>e.handleClick&&e.handleClick(...s))},[t.renderSlot(e.$slots,"default",{},()=>[e.$slots.icon?(t.openBlock(),t.createElementBlock("view",Yh,[t.renderSlot(e.$slots,"icon")])):t.createCommentVNode("",!0),e.title||e.subTitle||e.$slots.title?(t.openBlock(),t.createElementBlock("view",Xh,[e.subTitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(e.$slots,"title",{},()=>[t.createElementVNode("view",Qh,t.toDisplayString(e.title),1)]),t.createElementVNode("view",Gh,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(i,{key:0,class:"fox-cell__link"})):t.createCommentVNode("",!0)])])],6)}const $l=ne(Wh,[["render",Zh]]),{componentName:Jh,create:_h}=J("cell-group"),eg=_h({props:{title:{type:String,default:""},desc:{type:String,default:""}},setup(){return{classes:t.computed(()=>({[Jh]:!0}))}}}),tg={key:1,class:"fox-cell-group__title"},ng={key:3,class:"fox-cell-group__desc"},og={class:"fox-cell-group__wrap"};function lg(e,n,a,o,l,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",tg,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",ng,t.toDisplayString(e.desc),1)):t.createCommentVNode("",!0),t.createElementVNode("view",og,[t.renderSlot(e.$slots,"default")])],2)}const El=ne(eg,[["render",lg]]),{componentName:ag,create:rg}=J("image"),sg=rg({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:oe.Image,ImageError:oe.ImageError},emits:["click","load","error"],setup(e,{emit:n}){const a=t.reactive({loading:!0,isError:!1,slotLoding:t.useSlots().loading,slotError:t.useSlots().error}),o=t.computed(()=>{const k=ag;return{[k]:!0,[`${k}-round`]:e.round}}),l=t.ref(null),r=t.ref(!1),i=t.ref(null),s=()=>{const k={threshold:[0],rootMargin:"0px"};l.value=new IntersectionObserver(v=>{v.forEach(y=>{y.isIntersecting&&(r.value=!0,l.value.disconnect())})},k),i.value&&l.value.observe(i.value)};t.onMounted(()=>{e.lazyLoad&&s()}),t.onBeforeUnmount(()=>{l.value&&l.value.disconnect()});const c=t.computed(()=>{let k={};return e.width&&(k.width=he(e.width)),e.height&&(k.height=he(e.height)),e.radius!==void 0&&e.radius!==null&&(k.overflow="hidden",k.borderRadius=he(e.radius)),k}),d=t.computed(()=>({objectFit:e.fit,objectPosition:e.position}));t.watch(()=>e.src,k=>{a.isError=!1,a.loading=!0});const p=()=>{a.loading=!1,n("load")},u=()=>{a.isError=!0,a.loading=!1,n("error")},g=k=>{n("click",k)};return{...t.toRefs(a),imageClick:g,classes:o,styles:d,stylebox:c,error:u,load:p,show:r,imgRef:i}}}),ig=["src","date-src","alt"],cg={key:0,class:"fox-img-loading"},ug={key:1,class:"fox-img-error"};function dg(e,n,a,o,l,r){const i=t.resolveComponent("Image"),s=t.resolveComponent("ImageError");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.stylebox),onClick:n[2]||(n[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:n[0]||(n[0]=(...c)=>e.load&&e.load(...c)),onError:n[1]||(n[1]=(...c)=>e.error&&e.error(...c)),style:t.normalizeStyle(e.styles)},null,44,ig),e.loading?(t.openBlock(),t.createElementBlock("div",cg,[e.slotLoding?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(i,{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",ug,[e.slotError?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(s,{key:0,width:"16px",height:"20px",name:"imageError"})),t.renderSlot(e.$slots,"error")])):t.createCommentVNode("",!0)],6)}const xl=ne(sg,[["render",dg]]),{create:fg}=J("layout"),Dl=fg({}),{componentName:mg,create:pg}=J("col"),hg=pg({props:{span:{type:[String,Number],default:"24"},offset:{type:[String,Number],default:"0"}},setup(e){const n=mg,a=t.inject("gutter"),o=t.computed(()=>({[n]:!0,[`${n}-gutter`]:a,[`fox-col-${e.span}`]:!0,[`fox-col-offset-${e.offset}`]:!0})),l=t.computed(()=>({paddingLeft:a/2+"px",paddingRight:a/2+"px"}));return{classes:o,style:l}}});function gg(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6)}const Il=ne(hg,[["render",gg]]),{componentName:yg,create:vg}=J("row"),bg=vg({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 n=yg;t.provide("gutter",e.gutter);const a=(l,r)=>l?r?`fox-row-${l}-${r}`:"":`fox-row-${r}`;return{classes:t.computed(()=>e.type==="flex"?`
|
|
6
6
|
${a("",e.type)}
|
|
7
7
|
${a("justify",e.justify)}
|
|
8
8
|
${a("align",e.align)}
|